Files
kotlin-fork/compiler/testData/cfg/conventions/setViaVar.instructions
T
Stanislav Erokhin dd24fd47f7 Update control flow test data for tower resolution algorithm
- locals win
- drop old invokeExtension convention
2015-12-11 17:01:02 +03:00

104 lines
2.4 KiB
Plaintext
Vendored

== Bar ==
class Bar {
fun invoke(x: Int, y: Int) {}
}
---------------------
L0:
1 <START>
L1:
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== invoke ==
fun invoke(x: Int, y: Int) {}
---------------------
L0:
1 <START>
v(x: Int)
magic[FAKE_INITIALIZER](x: Int) -> <v0>
w(x|<v0>)
v(y: Int)
magic[FAKE_INITIALIZER](y: Int) -> <v1>
w(y|<v1>)
2 mark({})
read (Unit)
L1:
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== Foo ==
class Foo {
val set: Bar = Bar()
}
---------------------
L0:
1 <START>
v(val set: Bar = Bar())
mark(Bar())
call(Bar(), <init>) -> <v0>
w(set|<v0>)
L1:
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== test1 ==
fun test1(foo: Foo) {
foo[1] = 2
}
---------------------
L0:
1 <START>
v(foo: Foo)
magic[FAKE_INITIALIZER](foo: Foo) -> <v0>
w(foo|<v0>)
2 mark({ foo[1] = 2 })
mark(foo[1])
r(foo) -> <v1>
r(foo[1], set|<v1>) -> <v2>
r(1) -> <v3>
r(2) -> <v4>
call(foo[1] = 2, invoke|<v2>, <v3>, <v4>) -> <v5>
L1:
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== test2 ==
fun test2(foo: Foo, set: Foo.(Int, Int) -> Int) {
foo[1] = 2
}
---------------------
L0:
1 <START>
v(foo: Foo)
magic[FAKE_INITIALIZER](foo: Foo) -> <v0>
w(foo|<v0>)
v(set: Foo.(Int, Int) -> Int)
magic[FAKE_INITIALIZER](set: Foo.(Int, Int) -> Int) -> <v1>
w(set|<v1>)
2 mark({ foo[1] = 2 })
mark(foo[1])
r(foo) -> <v2>
r(foo[1], set) -> <v3>
r(1) -> <v4>
r(2) -> <v5>
call(foo[1] = 2, invoke|<v3>, <v2>, <v4>, <v5>) -> <v6>
L1:
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================