Files
kotlin-fork/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.instructions
T
2014-07-11 19:13:49 +04:00

70 lines
3.0 KiB
Plaintext

== foo ==
fun foo() {
class A {
var a : Int
get() {
return $a
}
set(v: Int) {
$a = v
}
}
}
---------------------
L0:
1 <START> INIT: in: {} out: {} USE: in: {} out: {}
2 mark({ class A { var a : Int get() { return $a } set(v: Int) { $a = v } } })
v(var a : Int get() { return $a } set(v: Int) { $a = v }) INIT: in: {} out: {a=D}
jmp?(L2) INIT: in: {a=D} out: {a=D}
d(get() { return $a }) USE: in: {a=READ} out: {a=READ}
L2:
jmp?(L5)
d(set(v: Int) { $a = v }) USE: in: {a=ONLY_WRITTEN_NEVER_READ} out: {a=ONLY_WRITTEN_NEVER_READ}
L1:
L5:
1 <END> INIT: in: {} out: {}
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
== get_a ==
get() {
return $a
}
---------------------
L3:
3 <START> INIT: in: {} out: {}
4 mark({ return $a })
magic[IMPLICIT_RECEIVER]($a) -> <v0> USE: in: {a=READ} out: {a=READ}
r($a|<v0>) -> <v1> USE: in: {} out: {a=READ}
ret(*|<v1>) L4
L4:
3 <END>
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
== set_a ==
set(v: Int) {
$a = v
}
---------------------
L6:
3 <START> INIT: in: {} out: {}
v(v: Int) INIT: in: {} out: {v=D}
magic[FAKE_INITIALIZER](v: Int) -> <v0> INIT: in: {v=D} out: {v=D}
w(v|<v0>) INIT: in: {v=D} out: {v=ID}
4 mark({ $a = v }) INIT: in: {v=ID} out: {v=ID}
magic[IMPLICIT_RECEIVER]($a) -> <v1> USE: in: {a=ONLY_WRITTEN_NEVER_READ, v=READ} out: {a=ONLY_WRITTEN_NEVER_READ, v=READ}
r(v) -> <v2> USE: in: {a=ONLY_WRITTEN_NEVER_READ} out: {a=ONLY_WRITTEN_NEVER_READ, v=READ}
w($a|<v1>, <v2>) INIT: in: {v=ID} out: {a=I, v=ID} USE: in: {} out: {a=ONLY_WRITTEN_NEVER_READ}
L7:
3 <END> INIT: in: {a=I, v=ID} out: {a=I, v=ID}
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=I, v=ID} out: {a=I, v=ID} USE: in: {} out: {}
=====================