blob: 79fc5243e55356ba44f0d02990949644bd0107f1 [file] [log] [blame]
== myRun ==
inline fun myRun(block: () -> Unit) {
contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
}
block()
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
v(block: () -> Unit) INIT: in: {} out: {}
magic[FAKE_INITIALIZER](block: () -> Unit) -> <v0> INIT: in: {} out: {}
w(block|<v0>) INIT: in: {} out: {}
2 mark({ contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } block() }) INIT: in: {} out: {}
mark({ callsInPlace(block, InvocationKind.EXACTLY_ONCE) })
jmp?(L2)
d({ callsInPlace(block, InvocationKind.EXACTLY_ONCE) })
L2 [after local declaration]:
r({ callsInPlace(block, InvocationKind.EXACTLY_ONCE) }) -> <v1>
mark(contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) })
call(contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }, contract|<v1>) -> <v2>
r(block) -> <v3>
mark(block())
call(block(), invoke|<v3>) -> <v4>
L1:
1 <END>
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
== anonymous_0 ==
{
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
}
---------------------
L3:
3 <START> INIT: in: {} out: {}
4 mark(callsInPlace(block, InvocationKind.EXACTLY_ONCE))
magic[IMPLICIT_RECEIVER](callsInPlace(block, InvocationKind.EXACTLY_ONCE)) -> <v0>
r(block) -> <v1>
mark(InvocationKind.EXACTLY_ONCE)
r(EXACTLY_ONCE) -> <v2>
mark(callsInPlace(block, InvocationKind.EXACTLY_ONCE))
call(callsInPlace(block, InvocationKind.EXACTLY_ONCE), callsInPlace|<v0>, <v1>, <v2>) -> <v3>
L4:
3 <END>
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
== unknownRun ==
inline fun <T> unknownRun(block: () -> T): T = block()
---------------------
L0:
1 <START> INIT: in: {} out: {}
v(block: () -> T) INIT: in: {} out: {}
magic[FAKE_INITIALIZER](block: () -> T) -> <v0> INIT: in: {} out: {}
w(block|<v0>) INIT: in: {} out: {}
r(block) -> <v1> INIT: in: {} out: {}
mark(block())
call(block(), invoke|<v1>) -> <v2>
ret(*|<v2>) L1
L1:
<END>
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
== throwIfNotCalled ==
fun throwIfNotCalled() {
val x: Int
myRun outer@ {
unknownRun {
myRun {
x = 42
return@outer
}
}
throw java.lang.IllegalArgumentException()
}
println(<!UNINITIALIZED_VARIABLE!>x<!>)
}
---------------------
L0:
1 <START> INIT: in: {} out: {} USE: in: {} out: {}
2 mark({ val x: Int myRun outer@ { unknownRun { myRun { x = 42 return@outer } } throw java.lang.IllegalArgumentException() } println(<!UNINITIALIZED_VARIABLE!>x<!>) })
v(val x: Int) INIT: in: {} out: {x=D}
mark(outer@ { unknownRun { myRun { x = 42 return@outer } } throw java.lang.IllegalArgumentException() }) INIT: in: {x=D} out: {x=D}
mark({ unknownRun { myRun { x = 42 return@outer } } throw java.lang.IllegalArgumentException() })
r({ unknownRun { myRun { x = 42 return@outer } } throw java.lang.IllegalArgumentException() }) -> <v0>
mark(myRun outer@ { unknownRun { myRun { x = 42 return@outer } } throw java.lang.IllegalArgumentException() })
call(myRun outer@ { unknownRun { myRun { x = 42 return@outer } } throw java.lang.IllegalArgumentException() }, myRun|<v0>) -> <v1>
L2 [before inlined declaration]:
inlined({ unknownRun { myRun { x = 42 return@outer } } throw java.lang.IllegalArgumentException() }) INIT: in: {x=ID} out: {x=ID} USE: in: {x=ONLY_WRITTEN_NEVER_READ} out: {x=ONLY_WRITTEN_NEVER_READ}
L3 [after inlined declaration]:
mark(println(<)
magic[UNRESOLVED_CALL](println(<|!<v2>) -> <v3>
L1:
1 <END> INIT: in: {} out: {}
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
== inlined anonymous_1 ==
{
unknownRun {
myRun {
x = 42
return@outer
}
}
throw java.lang.IllegalArgumentException()
}
---------------------
L4:
3 <START> INIT: in: {x=D} out: {x=D}
4 mark(unknownRun { myRun { x = 42 return@outer } } throw java.lang.IllegalArgumentException())
mark({ myRun { x = 42 return@outer } })
jmp?(L6)
d({ myRun { x = 42 return@outer } }) INIT: in: {} out: {} USE: in: {x=ONLY_WRITTEN_NEVER_READ} out: {x=ONLY_WRITTEN_NEVER_READ}
L6 [after local declaration]:
r({ myRun { x = 42 return@outer } }) -> <v0> INIT: in: {x=D} out: {x=D}
mark(unknownRun { myRun { x = 42 return@outer } })
call(unknownRun { myRun { x = 42 return@outer } }, unknownRun|<v0>) -> <v1>
mark(throw java.lang.IllegalArgumentException())
mark(java.lang.IllegalArgumentException())
mark(IllegalArgumentException())
call(IllegalArgumentException(), <init>) -> <v2>
throw (throw java.lang.IllegalArgumentException()|<v2>)
L5:
3 <END> INIT: in: {x=ID} out: {x=ID}
error:
<ERROR> INIT: in: {x=D} out: {x=D}
sink:
<SINK> INIT: in: {x=I?} out: {x=I?} USE: in: {} out: {}
=====================
== anonymous_2 ==
{
myRun {
x = 42
return@outer
}
}
---------------------
L7:
5 <START> INIT: in: {x=D} out: {x=D}
6 mark(myRun { x = 42 return@outer })
mark({ x = 42 return@outer })
r({ x = 42 return@outer }) -> <v0>
mark(myRun { x = 42 return@outer })
call(myRun { x = 42 return@outer }, myRun|<v0>) -> <v1>
L9 [before inlined declaration]:
inlined({ x = 42 return@outer }) USE: in: {x=ONLY_WRITTEN_NEVER_READ} out: {x=ONLY_WRITTEN_NEVER_READ}
L8:
L10 [after inlined declaration]:
5 <END> INIT: in: {} out: {}
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
== inlined anonymous_3 ==
{
x = 42
return@outer
}
---------------------
L11:
7 <START> INIT: in: {x=D} out: {x=D}
8 mark(x = 42 return@outer)
r(42) -> <v0> USE: in: {x=ONLY_WRITTEN_NEVER_READ} out: {x=ONLY_WRITTEN_NEVER_READ}
w(x|<v0>) INIT: in: {x=D} out: {x=ID} USE: in: {} out: {x=ONLY_WRITTEN_NEVER_READ}
ret L5 INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {}
L12:
- 7 <END>
error:
- <ERROR>
sink:
- <SINK>
=====================