Files
kotlin-fork/compiler/testData/cfg/basic/Basic.instructions
T
Svetlana Isakova 1fc4573a8c removed duplication of pseudocode in tests
for local functions
2014-03-07 21:08:15 +04:00

136 lines
3.3 KiB
Plaintext

== f ==
fun f(a : Boolean) : Unit {
1
a
2.toLong()
foo(a, 3)
genfun<Any>()
flfun {1}
3.equals(4)
3 equals 4
1 + 2
a && true
a || false
}
---------------------
L0:
<START>
v(a : Boolean)
w(a)
mark({ 1 a 2.toLong() foo(a, 3) genfun<Any>() flfun {1} 3.equals(4) 3 equals 4 1 + 2 a && true a || false })
r(1)
r(a)
mark(2.toLong())
mark(toLong())
r(2)
call(toLong, toLong)
mark(foo(a, 3))
r(a)
r(3)
call(foo, foo)
mark(genfun<Any>())
call(genfun, genfun)
mark(flfun {1})
mark({1})
jmp?(L2) NEXT:[r({1}), d({1})]
d({1}) NEXT:[<SINK>]
L2:
r({1}) PREV:[jmp?(L2)]
call(flfun, flfun)
mark(3.equals(4))
mark(equals(4))
r(3)
r(4)
call(equals, equals)
mark(3 equals 4)
r(3)
r(4)
call(equals, equals)
mark(1 + 2)
r(1)
r(2)
call(+, plus)
r(a)
jf(L5) NEXT:[r(a && true), r(true)]
r(true)
L5:
r(a && true) PREV:[jf(L5), r(true)]
r(a)
jt(L6) NEXT:[r(false), r(a || false)]
r(false)
L6:
r(a || false) PREV:[jt(L6), r(false)]
L1:
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>, d({1})]
=====================
== anonymous_0 ==
{1}
---------------------
L3:
<START>
mark(1)
r(1)
L4:
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== foo ==
fun foo(a : Boolean, b : Int) : Unit {}
---------------------
L0:
<START>
v(a : Boolean)
w(a)
v(b : Int)
w(b)
mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== genfun ==
fun genfun<T>() : Unit {}
---------------------
L0:
<START>
mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
== flfun ==
fun flfun(f : () -> Any) : Unit {}
---------------------
L0:
<START>
v(f : () -> Any)
w(f)
mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================