Added/updated tests for LexicalScope.

This commit is contained in:
Svetlana Isakova
2014-03-05 19:32:10 +04:00
parent 2cfcd1783b
commit 006f3ccbe9
81 changed files with 1404 additions and 604 deletions
@@ -10,8 +10,8 @@ fun foo() {
}
---------------------
L0:
<START> INIT: in: {} out: {}
mark({ val b: Boolean if (1 < 2) { use(b) } else { b = true } })
1 <START> INIT: in: {} out: {}
2 mark({ val b: Boolean if (1 < 2) { use(b) } else { b = true } })
v(val b: Boolean) INIT: in: {} out: {b=D}
mark(if (1 < 2) { use(b) } else { b = true }) INIT: in: {b=D} out: {b=D}
mark(1 < 2)
@@ -19,18 +19,18 @@ L0:
r(2)
call(<, compareTo)
jf(L2)
mark({ use(b) })
3 mark({ use(b) })
mark(use(b)) USE: in: {b=READ} out: {b=READ}
r(b) USE: in: {} out: {b=READ}
call(use, use)
jmp(L3) USE: in: {} out: {}
2 jmp(L3) USE: in: {} out: {}
L2:
mark({ b = true })
3 mark({ b = true })
r(true) USE: in: {b=ONLY_WRITTEN_NEVER_READ} out: {b=ONLY_WRITTEN_NEVER_READ}
w(b) INIT: in: {b=D} out: {b=ID} USE: in: {} out: {b=ONLY_WRITTEN_NEVER_READ}
L1:
L3:
<END> INIT: in: {b=D} out: {b=D}
1 <END> INIT: in: {b=D} out: {b=D}
error:
<ERROR> INIT: in: {} out: {}
sink:
@@ -40,7 +40,7 @@ sink:
fun use(vararg a: Any?) = a
---------------------
L0:
<START> INIT: in: {} out: {}
1 <START> INIT: in: {} out: {}
v(vararg a: Any?) INIT: in: {} out: {a=D}
w(a) INIT: in: {a=D} out: {a=ID} USE: in: {a=READ} out: {a=READ}
r(a) INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {a=READ}
@@ -7,11 +7,11 @@ class A {
}
---------------------
L0:
<START> INIT: in: {} out: {}
mark({ x = 1 })
1 <START> INIT: in: {} out: {}
2 mark({ x = 1 })
r(1) USE: in: {x=ONLY_WRITTEN_NEVER_READ} out: {x=ONLY_WRITTEN_NEVER_READ}
w(x) INIT: in: {} out: {x=I} USE: in: {} out: {x=ONLY_WRITTEN_NEVER_READ}
v(val x: Int) INIT: in: {x=I} out: {x=ID}
1 v(val x: Int) INIT: in: {x=I} out: {x=ID}
L1:
<END> INIT: in: {x=ID} out: {x=ID}
error:
@@ -8,8 +8,8 @@ fun foo() {
}
---------------------
L0:
<START> INIT: in: {} out: {}
mark({ val a = 1 val f = { (x: Int) -> val y = x + a use(a) } })
1 <START> INIT: in: {} out: {}
2 mark({ val a = 1 val f = { (x: Int) -> val y = x + a use(a) } })
v(val a = 1) INIT: in: {} out: {a=D}
r(1) INIT: in: {a=D} out: {a=D}
w(a) INIT: in: {a=D} out: {a=ID}
@@ -21,7 +21,7 @@ L2:
r({ (x: Int) -> val y = x + a use(a) }) INIT: in: {a=ID, f=D} out: {a=ID, f=D}
w(f) INIT: in: {a=ID, f=D} out: {a=ID, f=ID}
L1:
<END> INIT: in: {a=ID, f=ID} out: {a=ID, f=ID}
1 <END> INIT: in: {a=ID, f=ID} out: {a=ID, f=ID}
error:
<ERROR> INIT: in: {} out: {}
sink:
@@ -34,10 +34,10 @@ sink:
}
---------------------
L3:
<START> INIT: in: {a=ID, f=D} out: {a=ID, f=D}
3 <START> INIT: in: {a=ID, f=D} out: {a=ID, f=D}
v(x: Int) INIT: in: {a=ID, f=D} out: {a=ID, f=D, x=D}
w(x) INIT: in: {a=ID, f=D, x=D} out: {a=ID, f=D, x=ID}
mark(val y = x + a use(a)) INIT: in: {a=ID, f=D, x=ID} out: {a=ID, f=D, x=ID}
4 mark(val y = x + a use(a)) INIT: in: {a=ID, f=D, x=ID} out: {a=ID, f=D, x=ID}
v(val y = x + a) INIT: in: {a=ID, f=D, x=ID} out: {a=ID, f=D, x=ID, y=D}
mark(x + a) INIT: in: {a=ID, f=D, x=ID, y=D} out: {a=ID, f=D, x=ID, y=D} USE: in: {a=READ, x=READ} out: {a=READ, x=READ}
r(x) USE: in: {a=READ} out: {a=READ, x=READ}
@@ -48,7 +48,7 @@ L3:
r(a) USE: in: {} out: {a=READ}
call(use, use)
L4:
<END>
3 <END>
error:
<ERROR> INIT: in: {} out: {}
sink:
@@ -58,7 +58,7 @@ sink:
fun use(vararg a: Any?) = a
---------------------
L0:
<START> INIT: in: {} out: {}
1 <START> INIT: in: {} out: {}
v(vararg a: Any?) INIT: in: {} out: {a=D}
w(a) INIT: in: {a=D} out: {a=ID} USE: in: {a=READ} out: {a=READ}
r(a) INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {a=READ}
@@ -7,8 +7,8 @@ fun foo() {
}
---------------------
L0:
<START> INIT: in: {} out: {}
mark({ val a = 1 val b: Int b = 2 42 })
1 <START> INIT: in: {} out: {}
2 mark({ val a = 1 val b: Int b = 2 42 })
v(val a = 1) INIT: in: {} out: {a=D}
r(1) INIT: in: {a=D} out: {a=D}
w(a) INIT: in: {a=D} out: {a=ID}
@@ -17,7 +17,7 @@ L0:
w(b) INIT: in: {a=ID, b=D} out: {a=ID, b=ID} USE: in: {} out: {b=ONLY_WRITTEN_NEVER_READ}
r(42) INIT: in: {a=ID, b=ID} out: {a=ID, b=ID}
L1:
<END>
1 <END>
error:
<ERROR> INIT: in: {} out: {}
sink:
@@ -31,10 +31,10 @@ fun bar(foo: Foo) {
}
---------------------
L0:
<START> INIT: in: {} out: {}
1 <START> INIT: in: {} out: {}
v(foo: Foo) INIT: in: {} out: {foo=D}
w(foo) INIT: in: {foo=D} out: {foo=ID}
mark({ foo.c foo.c = 2 42 }) INIT: in: {foo=ID} out: {foo=ID}
2 mark({ foo.c foo.c = 2 42 }) INIT: in: {foo=ID} out: {foo=ID}
mark(foo.c)
r(foo) USE: in: {c=READ, foo=READ} out: {c=READ, foo=READ}
r(c) USE: in: {c=ONLY_WRITTEN_NEVER_READ, foo=READ} out: {c=READ, foo=READ}
@@ -43,7 +43,7 @@ L0:
w(foo.c) INIT: in: {foo=ID} out: {c=I, foo=ID} USE: in: {} out: {c=ONLY_WRITTEN_NEVER_READ}
r(42) INIT: in: {c=I, foo=ID} out: {c=I, foo=ID}
L1:
<END>
1 <END>
error:
<ERROR> INIT: in: {} out: {}
sink:
@@ -55,7 +55,7 @@ trait Foo {
}
---------------------
L0:
<START> INIT: in: {} out: {}
1 <START> INIT: in: {} out: {}
v(var c: Int) INIT: in: {} out: {c=D}
L1:
<END> INIT: in: {c=D} out: {c=D}
@@ -7,8 +7,8 @@ fun foo() {
}
---------------------
L0:
<START> INIT: in: {} out: {}
mark({ var a = 1 use(a) a = 2 use(a) })
1 <START> INIT: in: {} out: {}
2 mark({ var a = 1 use(a) a = 2 use(a) })
v(var a = 1) INIT: in: {} out: {a=D}
r(1) INIT: in: {a=D} out: {a=D}
w(a) INIT: in: {a=D} out: {a=ID}
@@ -21,7 +21,7 @@ L0:
r(a) USE: in: {} out: {a=READ}
call(use, use)
L1:
<END>
1 <END>
error:
<ERROR> INIT: in: {} out: {}
sink:
@@ -34,13 +34,13 @@ fun bar() {
}
---------------------
L0:
<START> INIT: in: {} out: {}
mark({ val b: Int b = 3 })
1 <START> INIT: in: {} out: {}
2 mark({ val b: Int b = 3 })
v(val b: Int) INIT: in: {} out: {b=D}
r(3) INIT: in: {b=D} out: {b=D} USE: in: {b=ONLY_WRITTEN_NEVER_READ} out: {b=ONLY_WRITTEN_NEVER_READ}
w(b) INIT: in: {b=D} out: {b=ID} USE: in: {} out: {b=ONLY_WRITTEN_NEVER_READ}
L1:
<END> INIT: in: {b=ID} out: {b=ID}
1 <END> INIT: in: {b=ID} out: {b=ID}
error:
<ERROR> INIT: in: {} out: {}
sink:
@@ -50,7 +50,7 @@ sink:
fun use(a: Int) = a
---------------------
L0:
<START> INIT: in: {} out: {}
1 <START> INIT: in: {} out: {}
v(a: Int) INIT: in: {} out: {a=D}
w(a) INIT: in: {a=D} out: {a=ID} USE: in: {a=READ} out: {a=READ}
r(a) INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {a=READ}
@@ -0,0 +1,38 @@
== foo ==
fun foo() {
"before"
do {
var a = 2
} while (a > 0)
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" do { var a = 2 } while (a > 0) "after" })
mark("before")
r("before")
3 mark(do { var a = 2 } while (a > 0))
L2 [loop entry point]:
L4 [body entry point]:
mark({ var a = 2 }) INIT: in: {a=ID} out: {a=ID}
v(var a = 2)
r(2)
w(a)
L5 [condition entry point]:
mark(a > 0)
r(a)
r(0)
call(>, compareTo)
jt(L2 [loop entry point]) USE: in: {a=READ} out: {a=READ}
L3 [loop exit point]:
read (Unit)
2 mark("after")
r("after")
L1:
1 <END>
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {}
=====================
@@ -0,0 +1,7 @@
fun foo() {
"before"
do {
var a = 2
} while (a > 0)
"after"
}
@@ -0,0 +1,41 @@
== foo ==
fun foo() {
"before"
for (i in 1..10) {
val a = i
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" for (i in 1..10) { val a = i } "after" })
mark("before")
r("before")
3 mark(for (i in 1..10) { val a = i })
mark(1..10)
r(1)
r(10)
call(.., rangeTo)
v(i) INIT: in: {} out: {i=D}
w(i) INIT: in: {i=D} out: {i=ID}
L3:
jmp?(L2) INIT: in: {i=ID} out: {i=ID}
L4 [loop entry point]:
L5 [body entry point]:
4 mark({ val a = i }) INIT: in: {a=ID, i=ID} out: {a=ID, i=ID}
v(val a = i)
r(i)
w(a)
3 jmp?(L4 [loop entry point]) USE: in: {i=READ} out: {i=READ}
L2:
read (Unit)
2 mark("after")
r("after")
L1:
1 <END>
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID, i=ID} out: {a=ID, i=ID} USE: in: {} out: {}
=====================
@@ -0,0 +1,7 @@
fun foo() {
"before"
for (i in 1..10) {
val a = i
}
"after"
}
@@ -0,0 +1,57 @@
== foo ==
fun foo() {
"before"
val b = 1
val f = { (x: Int) ->
val a = x + b
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" val b = 1 val f = { (x: Int) -> val a = x + b } "after" })
mark("before")
r("before")
v(val b = 1) INIT: in: {} out: {b=D}
r(1) INIT: in: {b=D} out: {b=D}
w(b) INIT: in: {b=D} out: {b=ID}
v(val f = { (x: Int) -> val a = x + b }) INIT: in: {b=ID} out: {b=ID, f=D}
mark({ (x: Int) -> val a = x + b }) INIT: in: {b=ID, f=D} out: {b=ID, f=D}
jmp?(L2)
d({ (x: Int) -> val a = x + b }) INIT: in: {a=ID, b=ID, f=D, x=ID} out: {a=ID, b=ID, f=D, x=ID} USE: in: {b=READ, x=READ} out: {b=READ, x=READ}
L2:
r({ (x: Int) -> val a = x + b }) INIT: in: {b=ID, f=D} out: {b=ID, f=D}
w(f) INIT: in: {b=ID, f=D} out: {b=ID, f=ID}
mark("after") INIT: in: {b=ID, f=ID} out: {b=ID, f=ID}
r("after")
L1:
1 <END>
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID, b=ID, f=D, x=ID} out: {a=ID, b=ID, f=D, x=ID} USE: in: {} out: {}
=====================
== anonymous_0 ==
{ (x: Int) ->
val a = x + b
}
---------------------
L3:
3 <START> INIT: in: {b=ID, f=D} out: {b=ID, f=D}
v(x: Int) INIT: in: {b=ID, f=D} out: {b=ID, f=D, x=D}
w(x) INIT: in: {b=ID, f=D, x=D} out: {b=ID, f=D, x=ID}
4 mark(val a = x + b) INIT: in: {b=ID, f=D, x=ID} out: {b=ID, f=D, x=ID}
v(val a = x + b) INIT: in: {b=ID, f=D, x=ID} out: {a=D, b=ID, f=D, x=ID}
mark(x + b) INIT: in: {a=D, b=ID, f=D, x=ID} out: {a=D, b=ID, f=D, x=ID} USE: in: {b=READ, x=READ} out: {b=READ, x=READ}
r(x) USE: in: {b=READ} out: {b=READ, x=READ}
r(b) USE: in: {} out: {b=READ}
call(+, plus)
w(a) INIT: in: {a=D, b=ID, f=D, x=ID} out: {a=ID, b=ID, f=D, x=ID}
L4:
3 <END> INIT: in: {a=ID, b=ID, f=D, x=ID} out: {a=ID, b=ID, f=D, x=ID}
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID, b=ID, f=D, x=ID} out: {a=ID, b=ID, f=D, x=ID} USE: in: {} out: {}
=====================
@@ -0,0 +1,8 @@
fun foo() {
"before"
val b = 1
val f = { (x: Int) ->
val a = x + b
}
"after"
}
@@ -0,0 +1,40 @@
== foo ==
fun foo() {
"before"
if (true) {
val a = 1
}
else {
val b = 2
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" if (true) { val a = 1 } else { val b = 2 } "after" })
mark("before")
r("before")
mark(if (true) { val a = 1 } else { val b = 2 })
r(true)
jf(L2)
3 mark({ val a = 1 })
v(val a = 1) INIT: in: {} out: {a=D}
r(1) INIT: in: {a=D} out: {a=D}
w(a) INIT: in: {a=D} out: {a=ID}
2 jmp(L3) INIT: in: {a=ID} out: {a=ID}
L2:
3 mark({ val b = 2 }) INIT: in: {} out: {}
v(val b = 2) INIT: in: {} out: {b=D}
r(2) INIT: in: {b=D} out: {b=D}
w(b) INIT: in: {b=D} out: {b=ID}
L3:
2 mark("after") INIT: in: {a=ID, b=ID} out: {a=ID, b=ID}
r("after")
L1:
1 <END>
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID, b=ID} out: {a=ID, b=ID} USE: in: {} out: {}
=====================
@@ -0,0 +1,10 @@
fun foo() {
"before"
if (true) {
val a = 1
}
else {
val b = 2
}
"after"
}
@@ -0,0 +1,55 @@
== foo ==
fun foo() {
"before"
class A(val x: Int) {
{
val a = x
}
fun foo() {
val b = x
}
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" class A(val x: Int) { { val a = x } fun foo() { val b = x } } "after" })
mark("before")
r("before")
v(val x: Int) INIT: in: {} out: {x=D}
w(x) INIT: in: {x=D} out: {x=ID}
3 mark({ val a = x }) INIT: in: {x=ID} out: {x=ID}
v(val a = x) INIT: in: {x=ID} out: {a=D, x=ID}
r(x) INIT: in: {a=D, x=ID} out: {a=D, x=ID}
w(a) INIT: in: {a=D, x=ID} out: {a=ID, x=ID}
2 jmp?(L2) INIT: in: {a=ID, x=ID} out: {a=ID, x=ID}
d(fun foo() { val b = x }) INIT: in: {a=ID, b=ID, x=ID} out: {a=ID, b=ID, x=ID} USE: in: {x=READ} out: {x=READ}
L2:
mark("after") INIT: in: {a=ID, x=ID} out: {a=ID, x=ID}
r("after")
L1:
1 <END>
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID, b=ID, x=ID} out: {a=ID, b=ID, x=ID} USE: in: {} out: {}
=====================
== foo ==
fun foo() {
val b = x
}
---------------------
L3:
3 <START> INIT: in: {a=ID, x=ID} out: {a=ID, x=ID}
4 mark({ val b = x })
v(val b = x) INIT: in: {a=ID, x=ID} out: {a=ID, b=D, x=ID} USE: in: {x=READ} out: {x=READ}
r(x) INIT: in: {a=ID, b=D, x=ID} out: {a=ID, b=D, x=ID} USE: in: {} out: {x=READ}
w(b) INIT: in: {a=ID, b=D, x=ID} out: {a=ID, b=ID, x=ID}
L4:
3 <END> INIT: in: {a=ID, b=ID, x=ID} out: {a=ID, b=ID, x=ID}
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID, b=ID, x=ID} out: {a=ID, b=ID, x=ID} USE: in: {} out: {}
=====================
@@ -0,0 +1,12 @@
fun foo() {
"before"
class A(val x: Int) {
{
val a = x
}
fun foo() {
val b = x
}
}
"after"
}
@@ -0,0 +1,53 @@
== foo ==
fun foo() {
"before"
val b = 1
fun local(x: Int) {
val a = x + b
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" val b = 1 fun local(x: Int) { val a = x + b } "after" })
mark("before")
r("before")
v(val b = 1) INIT: in: {} out: {b=D}
r(1) INIT: in: {b=D} out: {b=D}
w(b) INIT: in: {b=D} out: {b=ID}
jmp?(L2) INIT: in: {b=ID} out: {b=ID}
d(fun local(x: Int) { val a = x + b }) INIT: in: {a=ID, b=ID, x=ID} out: {a=ID, b=ID, x=ID} USE: in: {b=READ, x=READ} out: {b=READ, x=READ}
L2:
mark("after") INIT: in: {b=ID} out: {b=ID}
r("after")
L1:
1 <END>
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID, b=ID, x=ID} out: {a=ID, b=ID, x=ID} USE: in: {} out: {}
=====================
== local ==
fun local(x: Int) {
val a = x + b
}
---------------------
L3:
3 <START> INIT: in: {b=ID} out: {b=ID}
v(x: Int) INIT: in: {b=ID} out: {b=ID, x=D}
w(x) INIT: in: {b=ID, x=D} out: {b=ID, x=ID}
4 mark({ val a = x + b }) INIT: in: {b=ID, x=ID} out: {b=ID, x=ID}
v(val a = x + b) INIT: in: {b=ID, x=ID} out: {a=D, b=ID, x=ID}
mark(x + b) INIT: in: {a=D, b=ID, x=ID} out: {a=D, b=ID, x=ID} USE: in: {b=READ, x=READ} out: {b=READ, x=READ}
r(x) USE: in: {b=READ} out: {b=READ, x=READ}
r(b) USE: in: {} out: {b=READ}
call(+, plus)
w(a) INIT: in: {a=D, b=ID, x=ID} out: {a=ID, b=ID, x=ID}
L4:
3 <END> INIT: in: {a=ID, b=ID, x=ID} out: {a=ID, b=ID, x=ID}
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID, b=ID, x=ID} out: {a=ID, b=ID, x=ID} USE: in: {} out: {}
=====================
@@ -0,0 +1,8 @@
fun foo() {
"before"
val b = 1
fun local(x: Int) {
val a = x + b
}
"after"
}
@@ -0,0 +1,46 @@
== foo ==
fun foo() {
"before"
val b = 1
fun local(x: Int) = x + b
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {} USE: in: {} out: {}
2 mark({ "before" val b = 1 fun local(x: Int) = x + b "after" })
mark("before")
r("before")
v(val b = 1) INIT: in: {} out: {b=D}
r(1) INIT: in: {b=D} out: {b=D}
w(b) INIT: in: {b=D} out: {b=ID}
jmp?(L2) INIT: in: {b=ID} out: {b=ID}
d(fun local(x: Int) = x + b) USE: in: {b=READ} out: {b=READ}
L2:
mark("after")
r("after")
L1:
1 <END> INIT: in: {} out: {}
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
== local ==
fun local(x: Int) = x + b
---------------------
L3:
3 <START> INIT: in: {} out: {}
v(x: Int) INIT: in: {} out: {x=D}
w(x) INIT: in: {x=D} out: {x=ID}
mark(x + b) INIT: in: {x=ID} out: {x=ID} USE: in: {b=READ, x=READ} out: {b=READ, x=READ}
r(x) USE: in: {b=READ} out: {b=READ, x=READ}
r(b) USE: in: {} out: {b=READ}
call(+, plus)
L4:
<END>
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {}
=====================
@@ -0,0 +1,6 @@
fun foo() {
"before"
val b = 1
fun local(x: Int) = x + b
"after"
}
@@ -0,0 +1,53 @@
== foo ==
fun foo() {
"before"
object A {
{
val a = 1
}
fun foo() {
val b = 2
}
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" object A { { val a = 1 } fun foo() { val b = 2 } } "after" })
mark("before")
r("before")
3 mark({ val a = 1 })
v(val a = 1) INIT: in: {} out: {a=D}
r(1) INIT: in: {a=D} out: {a=D}
w(a) INIT: in: {a=D} out: {a=ID}
2 jmp?(L2) INIT: in: {a=ID} out: {a=ID}
d(fun foo() { val b = 2 }) INIT: in: {a=ID, b=ID} out: {a=ID, b=ID}
L2:
mark("after") INIT: in: {a=ID} out: {a=ID}
r("after")
L1:
1 <END>
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID, b=ID} out: {a=ID, b=ID} USE: in: {} out: {}
=====================
== foo ==
fun foo() {
val b = 2
}
---------------------
L3:
3 <START> INIT: in: {a=ID} out: {a=ID}
4 mark({ val b = 2 })
v(val b = 2) INIT: in: {a=ID} out: {a=ID, b=D}
r(2) INIT: in: {a=ID, b=D} out: {a=ID, b=D}
w(b) INIT: in: {a=ID, b=D} out: {a=ID, b=ID}
L4:
3 <END> INIT: in: {a=ID, b=ID} out: {a=ID, b=ID}
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID, b=ID} out: {a=ID, b=ID} USE: in: {} out: {}
=====================
@@ -0,0 +1,12 @@
fun foo() {
"before"
object A {
{
val a = 1
}
fun foo() {
val b = 2
}
}
"after"
}
@@ -0,0 +1,57 @@
== foo ==
fun foo() {
"before"
val bar = object {
{
val x = 1
}
fun foo() {
val a = 2
}
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" val bar = object { { val x = 1 } fun foo() { val a = 2 } } "after" })
mark("before")
r("before")
v(val bar = object { { val x = 1 } fun foo() { val a = 2 } }) INIT: in: {} out: {bar=D}
mark(object { { val x = 1 } fun foo() { val a = 2 } }) INIT: in: {bar=D} out: {bar=D}
3 mark({ val x = 1 })
v(val x = 1) INIT: in: {bar=D} out: {bar=D, x=D}
r(1) INIT: in: {bar=D, x=D} out: {bar=D, x=D}
w(x) INIT: in: {bar=D, x=D} out: {bar=D, x=ID}
2 jmp?(L2) INIT: in: {bar=D, x=ID} out: {bar=D, x=ID}
d(fun foo() { val a = 2 }) INIT: in: {a=ID, bar=D, x=ID} out: {a=ID, bar=D, x=ID}
L2:
r(object { { val x = 1 } fun foo() { val a = 2 } }) INIT: in: {bar=D, x=ID} out: {bar=D, x=ID}
w(bar) INIT: in: {bar=D, x=ID} out: {bar=ID, x=ID}
mark("after") INIT: in: {bar=ID, x=ID} out: {bar=ID, x=ID}
r("after")
L1:
1 <END>
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID, bar=D, x=ID} out: {a=ID, bar=D, x=ID} USE: in: {} out: {}
=====================
== foo ==
fun foo() {
val a = 2
}
---------------------
L3:
3 <START> INIT: in: {bar=D, x=ID} out: {bar=D, x=ID}
4 mark({ val a = 2 })
v(val a = 2) INIT: in: {bar=D, x=ID} out: {a=D, bar=D, x=ID}
r(2) INIT: in: {a=D, bar=D, x=ID} out: {a=D, bar=D, x=ID}
w(a) INIT: in: {a=D, bar=D, x=ID} out: {a=ID, bar=D, x=ID}
L4:
3 <END> INIT: in: {a=ID, bar=D, x=ID} out: {a=ID, bar=D, x=ID}
error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID, bar=D, x=ID} out: {a=ID, bar=D, x=ID} USE: in: {} out: {}
=====================
@@ -0,0 +1,12 @@
fun foo() {
"before"
val bar = object {
{
val x = 1
}
fun foo() {
val a = 2
}
}
"after"
}
@@ -0,0 +1,66 @@
== 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 }) USE: in: {a=READ} out: {a=READ}
r($a) USE: in: {} out: {a=READ}
ret(*) 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}
w(v) INIT: in: {v=D} out: {v=ID}
4 mark({ $a = v }) INIT: in: {v=ID} out: {v=ID} USE: in: {a=ONLY_WRITTEN_NEVER_READ, v=READ} out: {a=ONLY_WRITTEN_NEVER_READ, v=READ}
r(v) USE: in: {a=ONLY_WRITTEN_NEVER_READ} out: {a=ONLY_WRITTEN_NEVER_READ, v=READ}
w($a) 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: {}
=====================
@@ -0,0 +1,11 @@
fun foo() {
class A {
var a : Int
get() {
return $a
}
set(v: Int) {
$a = v
}
}
}
@@ -0,0 +1,59 @@
== foo ==
fun foo() {
"before"
try {
foo()
}
catch (e: Exception) {
val a = e
}
finally {
val a = 1
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 } "after" })
mark("before")
r("before")
mark(try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 })
jmp?(L2 [onException]) USE: in: {e=READ} out: {e=READ}
jmp?(L3 [onExceptionToFinallyBlock])
3 mark({ foo() })
mark(foo())
call(foo, foo)
2 jmp(L4 [afterCatches]) USE: in: {} out: {}
L2 [onException]:
3 v(e: Exception) INIT: in: {} out: {e=D}
w(e) INIT: in: {e=D} out: {e=ID}
4 mark({ val a = e }) INIT: in: {e=ID} out: {e=ID}
v(val a = e) INIT: in: {e=ID} out: {a=D, e=ID} USE: in: {e=READ} out: {e=READ}
r(e) INIT: in: {a=D, e=ID} out: {a=D, e=ID} USE: in: {} out: {e=READ}
w(a) INIT: in: {a=D, e=ID} out: {a=ID, e=ID}
3 jmp(L4 [afterCatches]) INIT: in: {a=ID, e=ID} out: {a=ID, e=ID}
L4 [afterCatches]:
2 jmp(L5 [skipFinallyToErrorBlock])
L3 [onExceptionToFinallyBlock]:
L6 [start finally]:
3 mark({ val a = 1 }) INIT: in: {} out: {}
v(val a = 1) INIT: in: {} out: {a=D}
r(1) INIT: in: {a=D} out: {a=D}
w(a) INIT: in: {a=D} out: {a=ID}
L7 [finish finally]:
2 jmp(error) INIT: in: {a=ID} out: {a=ID}
L5 [skipFinallyToErrorBlock]:
3 mark({ val a = 1 }) INIT: in: {a=ID, e=ID} out: {a=ID, e=ID}
v(val a = 1) INIT: in: {a=ID, e=ID} out: {a=D, a=ID, e=ID}
r(1) INIT: in: {a=D, a=ID, e=ID} out: {a=D, a=ID, e=ID}
w(a) INIT: in: {a=D, a=ID, e=ID} out: {a=ID, a=ID, e=ID}
2 mark("after") INIT: in: {a=ID, a=ID, e=ID} out: {a=ID, a=ID, e=ID}
r("after")
L1:
1 <END>
error:
<ERROR> INIT: in: {a=ID} out: {a=ID}
sink:
<SINK> INIT: in: {a=ID, a=ID, e=ID} out: {a=ID, a=ID, e=ID} USE: in: {} out: {}
=====================
@@ -0,0 +1,13 @@
fun foo() {
"before"
try {
foo()
}
catch (e: Exception) {
val a = e
}
finally {
val a = 1
}
"after"
}
@@ -0,0 +1,33 @@
== foo ==
fun foo() {
"before"
while (true) {
val a: Int
}
"after"
}
---------------------
L0:
1 <START> INIT: in: {} out: {}
2 mark({ "before" while (true) { val a: Int } "after" })
mark("before")
r("before")
mark(while (true) { val a: Int })
L2 [loop entry point]:
L5 [condition entry point]:
r(true) INIT: in: {a=D} out: {a=D}
L4 [body entry point]:
3 mark({ val a: Int })
v(val a: Int)
2 jmp(L2 [loop entry point]) USE: in: {} out: {}
L3 [loop exit point]:
- read (Unit)
- mark("after")
- r("after")
L1:
1 <END> INIT: in: {} out: {}
error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
@@ -0,0 +1,7 @@
fun foo() {
"before"
while (true) {
val a: Int
}
"after"
}
@@ -10,8 +10,8 @@ fun foo() {
}
---------------------
L0:
<START>
mark({ val a = Array<Int> 3 a[10] = 4 2 a[10] 100 a[10] += 1 })
1 <START>
2 mark({ val a = Array<Int> 3 a[10] = 4 2 a[10] 100 a[10] += 1 })
v(val a = Array<Int>)
mark(Array<Int>)
call(Array, <init>)
@@ -41,7 +41,7 @@ L0:
r(1)
call(a[10], set)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,10 +4,10 @@ fun test(array: Array<(Int)->Unit>) {
}
---------------------
L0:
<START>
1 <START>
v(array: Array<(Int)->Unit>)
w(array)
mark({ array[11](3) })
2 mark({ array[11](3) })
mark(array[11](3))
mark(array[11])
r(array)
@@ -16,7 +16,7 @@ L0:
r(3)
call(array[11], <for expression array[11]>)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,7 +4,7 @@ abstract class Ab {
}
---------------------
L0:
<START>
1 <START>
L1:
<END> NEXT:[<SINK>]
error:
@@ -16,7 +16,7 @@ sink:
abstract fun getArray() : Array<Int>
---------------------
L0:
<START>
1 <START>
L1:
<END> NEXT:[<SINK>]
error:
@@ -30,10 +30,10 @@ fun test(ab: Ab) {
}
---------------------
L0:
<START>
1 <START>
v(ab: Ab)
w(ab)
mark({ ab.getArray()[1] })
2 mark({ ab.getArray()[1] })
mark(ab.getArray()[1])
mark(ab.getArray())
mark(getArray())
@@ -42,7 +42,7 @@ L0:
r(1)
call(ab.getArray()[1], get)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,17 +4,17 @@ fun foo(a: Array<Int>) {
}
---------------------
L0:
<START>
1 <START>
v(a: Array<Int>)
w(a)
mark({ a[1] = 2 })
2 mark({ a[1] = 2 })
mark(a[1])
r(a)
r(1)
r(2)
call(a[1], set)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,10 +4,10 @@ fun foo(a: Array<Int>) {
}
---------------------
L0:
<START>
1 <START>
v(a: Array<Int>)
w(a)
mark({ a[0] += 1 })
2 mark({ a[0] += 1 })
mark(a[0] += 1)
mark(a[0])
r(a)
@@ -21,7 +21,7 @@ L0:
r(1)
call(a[0], set)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
+15 -15
View File
@@ -18,10 +18,10 @@ fun f(a : Boolean) : Unit {
}
---------------------
L0:
<START>
1 <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 })
2 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())
@@ -65,7 +65,7 @@ L5:
L6:
r(a || false) PREV:[jt(L6), r(false)]
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -75,11 +75,11 @@ sink:
{1}
---------------------
L3:
<START>
mark(1)
3 <START>
4 mark(1)
r(1)
L4:
<END> NEXT:[<SINK>]
3 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -89,15 +89,15 @@ sink:
fun foo(a : Boolean, b : Int) : Unit {}
---------------------
L0:
<START>
1 <START>
v(a : Boolean)
w(a)
v(b : Int)
w(b)
mark({})
2 mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -107,11 +107,11 @@ sink:
fun genfun<T>() : Unit {}
---------------------
L0:
<START>
mark({})
1 <START>
2 mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -121,13 +121,13 @@ sink:
fun flfun(f : () -> Any) : Unit {}
---------------------
L0:
<START>
1 <START>
v(f : () -> Any)
w(f)
mark({})
2 mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -2,11 +2,11 @@
fun empty() {}
---------------------
L0:
<START>
mark({})
1 <START>
2 mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -2,7 +2,7 @@
fun short() = 1
---------------------
L0:
<START>
1 <START>
r(1)
L1:
<END> NEXT:[<SINK>]
@@ -8,24 +8,24 @@ fun t1() {
}
---------------------
L0:
<START>
mark({ try { 1 } finally { 2 } })
1 <START>
2 mark({ try { 1 } finally { 2 } })
mark(try { 1 } finally { 2 })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ 1 })]
mark({ 1 })
3 mark({ 1 })
r(1)
jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
2 jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L2 [onExceptionToFinallyBlock]:
L4 [start finally]:
mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
3 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(2)
L5 [finish finally]:
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L3 [skipFinallyToErrorBlock]:
mark({ 2 }) PREV:[jmp(L3 [skipFinallyToErrorBlock])]
3 mark({ 2 }) PREV:[jmp(L3 [skipFinallyToErrorBlock])]
r(2)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -44,11 +44,11 @@ fun t2() {
}
---------------------
L0:
<START>
mark({ try { 1 if (2 > 3) { return } } finally { 2 } })
1 <START>
2 mark({ try { 1 if (2 > 3) { return } } finally { 2 } })
mark(try { 1 if (2 > 3) { return } } finally { 2 })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ 1 if (2 > 3) { return } })]
mark({ 1 if (2 > 3) { return } })
3 mark({ 1 if (2 > 3) { return } })
r(1)
mark(if (2 > 3) { return })
mark(2 > 3)
@@ -56,26 +56,26 @@ L0:
r(3)
call(>, compareTo)
jf(L3) NEXT:[read (Unit), mark({ return })]
mark({ return })
4 mark({ return })
L4 [start finally]:
mark({ 2 })
5 mark({ 2 })
r(2)
L5 [finish finally]:
ret L1 NEXT:[<END>]
- jmp(L6) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[]
4 ret L1 NEXT:[<END>]
- 3 jmp(L6) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[]
L3:
read (Unit) PREV:[jf(L3)]
L6:
jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
2 jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L2 [onExceptionToFinallyBlock]:
mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
5 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(2)
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L7 [skipFinallyToErrorBlock]:
mark({ 2 }) PREV:[jmp(L7 [skipFinallyToErrorBlock])]
5 mark({ 2 }) PREV:[jmp(L7 [skipFinallyToErrorBlock])]
r(2)
L1:
<END> NEXT:[<SINK>] PREV:[ret L1, r(2)]
1 <END> NEXT:[<SINK>] PREV:[ret L1, r(2)]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -96,11 +96,11 @@ fun t3() {
}
---------------------
L0:
<START>
mark({ try { 1 @{ () -> if (2 > 3) { return@ } } } finally { 2 } })
1 <START>
2 mark({ try { 1 @{ () -> if (2 > 3) { return@ } } } finally { 2 } })
mark(try { 1 @{ () -> if (2 > 3) { return@ } } } finally { 2 })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ 1 @{ () -> if (2 > 3) { return@ } } })]
mark({ 1 @{ () -> if (2 > 3) { return@ } } })
3 mark({ 1 @{ () -> if (2 > 3) { return@ } } })
r(1)
mark(@{ () -> if (2 > 3) { return@ } })
mark({ () -> if (2 > 3) { return@ } })
@@ -108,18 +108,18 @@ L0:
d({ () -> if (2 > 3) { return@ } }) NEXT:[<SINK>]
L3:
r({ () -> if (2 > 3) { return@ } }) PREV:[jmp?(L3)]
jmp(L8 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
2 jmp(L8 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L2 [onExceptionToFinallyBlock]:
L9 [start finally]:
mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
3 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(2)
L10 [finish finally]:
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L8 [skipFinallyToErrorBlock]:
mark({ 2 }) PREV:[jmp(L8 [skipFinallyToErrorBlock])]
3 mark({ 2 }) PREV:[jmp(L8 [skipFinallyToErrorBlock])]
r(2)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -133,22 +133,22 @@ sink:
}
---------------------
L4:
<START>
mark(if (2 > 3) { return@ })
4 <START>
5 mark(if (2 > 3) { return@ })
mark(if (2 > 3) { return@ })
mark(2 > 3)
r(2)
r(3)
call(>, compareTo)
jf(L6) NEXT:[read (Unit), mark({ return@ })]
mark({ return@ })
6 mark({ return@ })
ret L5 NEXT:[<END>]
- jmp(L7) NEXT:[<END>] PREV:[]
- 5 jmp(L7) NEXT:[<END>] PREV:[]
L6:
read (Unit) PREV:[jf(L6)]
L5:
L7:
<END> NEXT:[<SINK>] PREV:[ret L5, read (Unit)]
4 <END> NEXT:[<SINK>] PREV:[ret L5, read (Unit)]
error:
<ERROR> PREV:[]
sink:
@@ -169,8 +169,8 @@ fun t4() {
}
---------------------
L0:
<START>
mark({ @{ () -> try { 1 if (2 > 3) { return@ } } finally { 2 } } })
1 <START>
2 mark({ @{ () -> try { 1 if (2 > 3) { return@ } } finally { 2 } } })
mark(@{ () -> try { 1 if (2 > 3) { return@ } } finally { 2 } })
mark({ () -> try { 1 if (2 > 3) { return@ } } finally { 2 } })
jmp?(L2) NEXT:[r({ () -> try { 1 if (2 > 3) { return@ } } finally { 2 } }), d({ () -> try { 1 if (2 > 3) { return@ } } finally { 2 } })]
@@ -178,7 +178,7 @@ L0:
L2:
r({ () -> try { 1 if (2 > 3) { return@ } } finally { 2 } }) PREV:[jmp?(L2)]
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -197,11 +197,11 @@ sink:
}
---------------------
L3:
<START>
mark(try { 1 if (2 > 3) { return@ } } finally { 2 })
3 <START>
4 mark(try { 1 if (2 > 3) { return@ } } finally { 2 })
mark(try { 1 if (2 > 3) { return@ } } finally { 2 })
jmp?(L5 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ 1 if (2 > 3) { return@ } })]
mark({ 1 if (2 > 3) { return@ } })
5 mark({ 1 if (2 > 3) { return@ } })
r(1)
mark(if (2 > 3) { return@ })
mark(2 > 3)
@@ -209,26 +209,26 @@ L3:
r(3)
call(>, compareTo)
jf(L6) NEXT:[read (Unit), mark({ return@ })]
mark({ return@ })
6 mark({ return@ })
L7 [start finally]:
mark({ 2 })
7 mark({ 2 })
r(2)
L8 [finish finally]:
ret L4 NEXT:[<END>]
- jmp(L9) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[]
6 ret L4 NEXT:[<END>]
- 5 jmp(L9) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[]
L6:
read (Unit) PREV:[jf(L6)]
L9:
jmp(L10 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
4 jmp(L10 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L5 [onExceptionToFinallyBlock]:
mark({ 2 }) PREV:[jmp?(L5 [onExceptionToFinallyBlock])]
7 mark({ 2 }) PREV:[jmp?(L5 [onExceptionToFinallyBlock])]
r(2)
jmp(error) NEXT:[<ERROR>]
4 jmp(error) NEXT:[<ERROR>]
L10 [skipFinallyToErrorBlock]:
mark({ 2 }) PREV:[jmp(L10 [skipFinallyToErrorBlock])]
7 mark({ 2 }) PREV:[jmp(L10 [skipFinallyToErrorBlock])]
r(2)
L4:
<END> NEXT:[<SINK>] PREV:[ret L4, r(2)]
3 <END> NEXT:[<SINK>] PREV:[ret L4, r(2)]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -249,18 +249,18 @@ fun t5() {
}
---------------------
L0:
<START>
mark({ @ while(true) { try { 1 if (2 > 3) { break @ } } finally { 2 } } })
1 <START>
2 mark({ @ while(true) { try { 1 if (2 > 3) { break @ } } finally { 2 } } })
mark(@ while(true) { try { 1 if (2 > 3) { break @ } } finally { 2 } })
mark(while(true) { try { 1 if (2 > 3) { break @ } } finally { 2 } })
L2 [loop entry point]:
L5 [condition entry point]:
r(true) PREV:[mark(while(true) { try { 1 if (2 > 3) { break @ } } finally { 2 } }), jmp(L2 [loop entry point])]
L4 [body entry point]:
mark({ try { 1 if (2 > 3) { break @ } } finally { 2 } })
3 mark({ try { 1 if (2 > 3) { break @ } } finally { 2 } })
mark(try { 1 if (2 > 3) { break @ } } finally { 2 })
jmp?(L6 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ 1 if (2 > 3) { break @ } })]
mark({ 1 if (2 > 3) { break @ } })
4 mark({ 1 if (2 > 3) { break @ } })
r(1)
mark(if (2 > 3) { break @ })
mark(2 > 3)
@@ -268,29 +268,29 @@ L4 [body entry point]:
r(3)
call(>, compareTo)
jf(L7) NEXT:[read (Unit), mark({ break @ })]
mark({ break @ })
5 mark({ break @ })
L8 [start finally]:
mark({ 2 })
6 mark({ 2 })
r(2)
L9 [finish finally]:
jmp(L3 [loop exit point]) NEXT:[read (Unit)]
- jmp(L10) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[]
5 jmp(L3 [loop exit point]) NEXT:[read (Unit)]
- 4 jmp(L10) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[]
L7:
read (Unit) PREV:[jf(L7)]
L10:
jmp(L11 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
3 jmp(L11 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L6 [onExceptionToFinallyBlock]:
mark({ 2 }) PREV:[jmp?(L6 [onExceptionToFinallyBlock])]
6 mark({ 2 }) PREV:[jmp?(L6 [onExceptionToFinallyBlock])]
r(2)
jmp(error) NEXT:[<ERROR>]
3 jmp(error) NEXT:[<ERROR>]
L11 [skipFinallyToErrorBlock]:
mark({ 2 }) PREV:[jmp(L11 [skipFinallyToErrorBlock])]
6 mark({ 2 }) PREV:[jmp(L11 [skipFinallyToErrorBlock])]
r(2)
jmp(L2 [loop entry point]) NEXT:[r(true)]
2 jmp(L2 [loop entry point]) NEXT:[r(true)]
L3 [loop exit point]:
read (Unit) PREV:[jmp(L3 [loop exit point])]
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -312,18 +312,18 @@ fun t6() {
}
---------------------
L0:
<START>
mark({ try { @ while(true) { 1 if (2 > 3) { break @ } } 5 } finally { 2 } })
1 <START>
2 mark({ try { @ while(true) { 1 if (2 > 3) { break @ } } 5 } finally { 2 } })
mark(try { @ while(true) { 1 if (2 > 3) { break @ } } 5 } finally { 2 })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ @ while(true) { 1 if (2 > 3) { break @ } } 5 })]
mark({ @ while(true) { 1 if (2 > 3) { break @ } } 5 })
3 mark({ @ while(true) { 1 if (2 > 3) { break @ } } 5 })
mark(@ while(true) { 1 if (2 > 3) { break @ } })
mark(while(true) { 1 if (2 > 3) { break @ } })
L3 [loop entry point]:
L6 [condition entry point]:
r(true) PREV:[mark(while(true) { 1 if (2 > 3) { break @ } }), jmp(L3 [loop entry point])]
L5 [body entry point]:
mark({ 1 if (2 > 3) { break @ } })
4 mark({ 1 if (2 > 3) { break @ } })
r(1)
mark(if (2 > 3) { break @ })
mark(2 > 3)
@@ -331,28 +331,28 @@ L5 [body entry point]:
r(3)
call(>, compareTo)
jf(L7) NEXT:[read (Unit), mark({ break @ })]
mark({ break @ })
5 mark({ break @ })
jmp(L4 [loop exit point]) NEXT:[read (Unit)]
- jmp(L8) NEXT:[jmp(L3 [loop entry point])] PREV:[]
- 4 jmp(L8) NEXT:[jmp(L3 [loop entry point])] PREV:[]
L7:
read (Unit) PREV:[jf(L7)]
L8:
jmp(L3 [loop entry point]) NEXT:[r(true)]
3 jmp(L3 [loop entry point]) NEXT:[r(true)]
L4 [loop exit point]:
read (Unit) PREV:[jmp(L4 [loop exit point])]
r(5)
jmp(L9 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
2 jmp(L9 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L2 [onExceptionToFinallyBlock]:
L10 [start finally]:
mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
3 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(2)
L11 [finish finally]:
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L9 [skipFinallyToErrorBlock]:
mark({ 2 }) PREV:[jmp(L9 [skipFinallyToErrorBlock])]
3 mark({ 2 }) PREV:[jmp(L9 [skipFinallyToErrorBlock])]
r(2)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -373,18 +373,18 @@ fun t7() {
}
---------------------
L0:
<START>
mark({ try { @ while(true) { 1 if (2 > 3) { break @ } } } finally { 2 } })
1 <START>
2 mark({ try { @ while(true) { 1 if (2 > 3) { break @ } } } finally { 2 } })
mark(try { @ while(true) { 1 if (2 > 3) { break @ } } } finally { 2 })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ @ while(true) { 1 if (2 > 3) { break @ } } })]
mark({ @ while(true) { 1 if (2 > 3) { break @ } } })
3 mark({ @ while(true) { 1 if (2 > 3) { break @ } } })
mark(@ while(true) { 1 if (2 > 3) { break @ } })
mark(while(true) { 1 if (2 > 3) { break @ } })
L3 [loop entry point]:
L6 [condition entry point]:
r(true) PREV:[mark(while(true) { 1 if (2 > 3) { break @ } }), jmp(L3 [loop entry point])]
L5 [body entry point]:
mark({ 1 if (2 > 3) { break @ } })
4 mark({ 1 if (2 > 3) { break @ } })
r(1)
mark(if (2 > 3) { break @ })
mark(2 > 3)
@@ -392,27 +392,27 @@ L5 [body entry point]:
r(3)
call(>, compareTo)
jf(L7) NEXT:[read (Unit), mark({ break @ })]
mark({ break @ })
5 mark({ break @ })
jmp(L4 [loop exit point]) NEXT:[read (Unit)]
- jmp(L8) NEXT:[jmp(L3 [loop entry point])] PREV:[]
- 4 jmp(L8) NEXT:[jmp(L3 [loop entry point])] PREV:[]
L7:
read (Unit) PREV:[jf(L7)]
L8:
jmp(L3 [loop entry point]) NEXT:[r(true)]
3 jmp(L3 [loop entry point]) NEXT:[r(true)]
L4 [loop exit point]:
read (Unit) PREV:[jmp(L4 [loop exit point])]
jmp(L9 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
2 jmp(L9 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L2 [onExceptionToFinallyBlock]:
L10 [start finally]:
mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
3 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(2)
L11 [finish finally]:
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L9 [skipFinallyToErrorBlock]:
mark({ 2 }) PREV:[jmp(L9 [skipFinallyToErrorBlock])]
3 mark({ 2 }) PREV:[jmp(L9 [skipFinallyToErrorBlock])]
r(2)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -433,12 +433,12 @@ fun t8(a : Int) {
}
---------------------
L0:
<START>
1 <START>
v(a : Int)
w(a)
mark({ @ for (i in 1..a) { try { 1 if (2 > 3) { continue @ } } finally { 2 } } })
2 mark({ @ for (i in 1..a) { try { 1 if (2 > 3) { continue @ } } finally { 2 } } })
mark(@ for (i in 1..a) { try { 1 if (2 > 3) { continue @ } } finally { 2 } })
mark(for (i in 1..a) { try { 1 if (2 > 3) { continue @ } } finally { 2 } })
3 mark(for (i in 1..a) { try { 1 if (2 > 3) { continue @ } } finally { 2 } })
mark(1..a)
r(1)
r(a)
@@ -449,10 +449,10 @@ L3:
jmp?(L2) NEXT:[read (Unit), mark({ try { 1 if (2 > 3) { continue @ } } finally { 2 } })]
L4 [loop entry point]:
L5 [body entry point]:
mark({ try { 1 if (2 > 3) { continue @ } } finally { 2 } }) PREV:[jmp?(L2), jmp(L4 [loop entry point]), jmp?(L4 [loop entry point])]
4 mark({ try { 1 if (2 > 3) { continue @ } } finally { 2 } }) PREV:[jmp?(L2), jmp(L4 [loop entry point]), jmp?(L4 [loop entry point])]
mark(try { 1 if (2 > 3) { continue @ } } finally { 2 })
jmp?(L6 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ 1 if (2 > 3) { continue @ } })]
mark({ 1 if (2 > 3) { continue @ } })
5 mark({ 1 if (2 > 3) { continue @ } })
r(1)
mark(if (2 > 3) { continue @ })
mark(2 > 3)
@@ -460,29 +460,29 @@ L5 [body entry point]:
r(3)
call(>, compareTo)
jf(L7) NEXT:[read (Unit), mark({ continue @ })]
mark({ continue @ })
6 mark({ continue @ })
L8 [start finally]:
mark({ 2 })
7 mark({ 2 })
r(2)
L9 [finish finally]:
jmp(L4 [loop entry point]) NEXT:[mark({ try { 1 if (2 > 3) { continue @ } } finally { 2 } })]
- jmp(L10) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[]
6 jmp(L4 [loop entry point]) NEXT:[mark({ try { 1 if (2 > 3) { continue @ } } finally { 2 } })]
- 5 jmp(L10) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[]
L7:
read (Unit) PREV:[jf(L7)]
L10:
jmp(L11 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
4 jmp(L11 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L6 [onExceptionToFinallyBlock]:
mark({ 2 }) PREV:[jmp?(L6 [onExceptionToFinallyBlock])]
7 mark({ 2 }) PREV:[jmp?(L6 [onExceptionToFinallyBlock])]
r(2)
jmp(error) NEXT:[<ERROR>]
4 jmp(error) NEXT:[<ERROR>]
L11 [skipFinallyToErrorBlock]:
mark({ 2 }) PREV:[jmp(L11 [skipFinallyToErrorBlock])]
7 mark({ 2 }) PREV:[jmp(L11 [skipFinallyToErrorBlock])]
r(2)
jmp?(L4 [loop entry point]) NEXT:[mark({ try { 1 if (2 > 3) { continue @ } } finally { 2 } }), read (Unit)]
3 jmp?(L4 [loop entry point]) NEXT:[mark({ try { 1 if (2 > 3) { continue @ } } finally { 2 } }), read (Unit)]
L2:
read (Unit) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -504,15 +504,15 @@ fun t9(a : Int) {
}
---------------------
L0:
<START>
1 <START>
v(a : Int)
w(a)
mark({ try { @ for (i in 1..a) { 1 if (2 > 3) { continue @ } } 5 } finally { 2 } })
2 mark({ try { @ for (i in 1..a) { 1 if (2 > 3) { continue @ } } 5 } finally { 2 } })
mark(try { @ for (i in 1..a) { 1 if (2 > 3) { continue @ } } 5 } finally { 2 })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ @ for (i in 1..a) { 1 if (2 > 3) { continue @ } } 5 })]
mark({ @ for (i in 1..a) { 1 if (2 > 3) { continue @ } } 5 })
3 mark({ @ for (i in 1..a) { 1 if (2 > 3) { continue @ } } 5 })
mark(@ for (i in 1..a) { 1 if (2 > 3) { continue @ } })
mark(for (i in 1..a) { 1 if (2 > 3) { continue @ } })
4 mark(for (i in 1..a) { 1 if (2 > 3) { continue @ } })
mark(1..a)
r(1)
r(a)
@@ -523,7 +523,7 @@ L4:
jmp?(L3) NEXT:[read (Unit), mark({ 1 if (2 > 3) { continue @ } })]
L5 [loop entry point]:
L6 [body entry point]:
mark({ 1 if (2 > 3) { continue @ } }) PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])]
5 mark({ 1 if (2 > 3) { continue @ } }) PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])]
r(1)
mark(if (2 > 3) { continue @ })
mark(2 > 3)
@@ -531,28 +531,28 @@ L6 [body entry point]:
r(3)
call(>, compareTo)
jf(L7) NEXT:[read (Unit), mark({ continue @ })]
mark({ continue @ })
6 mark({ continue @ })
jmp(L5 [loop entry point]) NEXT:[mark({ 1 if (2 > 3) { continue @ } })]
- jmp(L8) NEXT:[jmp?(L5 [loop entry point])] PREV:[]
- 5 jmp(L8) NEXT:[jmp?(L5 [loop entry point])] PREV:[]
L7:
read (Unit) PREV:[jf(L7)]
L8:
jmp?(L5 [loop entry point]) NEXT:[mark({ 1 if (2 > 3) { continue @ } }), read (Unit)]
4 jmp?(L5 [loop entry point]) NEXT:[mark({ 1 if (2 > 3) { continue @ } }), read (Unit)]
L3:
read (Unit) PREV:[jmp?(L3), jmp?(L5 [loop entry point])]
r(5)
jmp(L9 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
3 r(5)
2 jmp(L9 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L2 [onExceptionToFinallyBlock]:
L10 [start finally]:
mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
3 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(2)
L11 [finish finally]:
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L9 [skipFinallyToErrorBlock]:
mark({ 2 }) PREV:[jmp(L9 [skipFinallyToErrorBlock])]
3 mark({ 2 }) PREV:[jmp(L9 [skipFinallyToErrorBlock])]
r(2)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -573,15 +573,15 @@ fun t10(a : Int) {
}
---------------------
L0:
<START>
1 <START>
v(a : Int)
w(a)
mark({ try { @ for (i in 1..a) { 1 if (2 > 3) { continue @ } } } finally { 2 } })
2 mark({ try { @ for (i in 1..a) { 1 if (2 > 3) { continue @ } } } finally { 2 } })
mark(try { @ for (i in 1..a) { 1 if (2 > 3) { continue @ } } } finally { 2 })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ 2 }), mark({ @ for (i in 1..a) { 1 if (2 > 3) { continue @ } } })]
mark({ @ for (i in 1..a) { 1 if (2 > 3) { continue @ } } })
3 mark({ @ for (i in 1..a) { 1 if (2 > 3) { continue @ } } })
mark(@ for (i in 1..a) { 1 if (2 > 3) { continue @ } })
mark(for (i in 1..a) { 1 if (2 > 3) { continue @ } })
4 mark(for (i in 1..a) { 1 if (2 > 3) { continue @ } })
mark(1..a)
r(1)
r(a)
@@ -592,7 +592,7 @@ L4:
jmp?(L3) NEXT:[read (Unit), mark({ 1 if (2 > 3) { continue @ } })]
L5 [loop entry point]:
L6 [body entry point]:
mark({ 1 if (2 > 3) { continue @ } }) PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])]
5 mark({ 1 if (2 > 3) { continue @ } }) PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])]
r(1)
mark(if (2 > 3) { continue @ })
mark(2 > 3)
@@ -600,27 +600,27 @@ L6 [body entry point]:
r(3)
call(>, compareTo)
jf(L7) NEXT:[read (Unit), mark({ continue @ })]
mark({ continue @ })
6 mark({ continue @ })
jmp(L5 [loop entry point]) NEXT:[mark({ 1 if (2 > 3) { continue @ } })]
- jmp(L8) NEXT:[jmp?(L5 [loop entry point])] PREV:[]
- 5 jmp(L8) NEXT:[jmp?(L5 [loop entry point])] PREV:[]
L7:
read (Unit) PREV:[jf(L7)]
L8:
jmp?(L5 [loop entry point]) NEXT:[mark({ 1 if (2 > 3) { continue @ } }), read (Unit)]
4 jmp?(L5 [loop entry point]) NEXT:[mark({ 1 if (2 > 3) { continue @ } }), read (Unit)]
L3:
read (Unit) PREV:[jmp?(L3), jmp?(L5 [loop entry point])]
jmp(L9 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
2 jmp(L9 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L2 [onExceptionToFinallyBlock]:
L10 [start finally]:
mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
3 mark({ 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(2)
L11 [finish finally]:
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L9 [skipFinallyToErrorBlock]:
mark({ 2 }) PREV:[jmp(L9 [skipFinallyToErrorBlock])]
3 mark({ 2 }) PREV:[jmp(L9 [skipFinallyToErrorBlock])]
r(2)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -637,30 +637,30 @@ fun t11() {
}
---------------------
L0:
<START>
mark({ try { return 1 } finally { return 2 } })
1 <START>
2 mark({ try { return 1 } finally { return 2 } })
mark(try { return 1 } finally { return 2 })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ return 2 }), mark({ return 1 })]
mark({ return 1 })
3 mark({ return 1 })
r(1)
L3 [start finally]:
mark({ return 2 })
4 mark({ return 2 })
r(2)
ret(*) L1 NEXT:[<END>]
L4 [finish finally]:
- ret(*) L1 NEXT:[<END>] PREV:[]
- jmp(L5 [skipFinallyToErrorBlock]) NEXT:[mark({ return 2 })] PREV:[]
- 3 ret(*) L1 NEXT:[<END>] PREV:[]
- 2 jmp(L5 [skipFinallyToErrorBlock]) NEXT:[mark({ return 2 })] PREV:[]
L2 [onExceptionToFinallyBlock]:
mark({ return 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
4 mark({ return 2 }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(2)
ret(*) L1 NEXT:[<END>]
- jmp(error) NEXT:[<ERROR>] PREV:[]
- 2 jmp(error) NEXT:[<ERROR>] PREV:[]
L5 [skipFinallyToErrorBlock]:
- mark({ return 2 }) PREV:[]
- 4 mark({ return 2 }) PREV:[]
- r(2) PREV:[]
- ret(*) L1 PREV:[]
L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
1 <END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
error:
<ERROR> PREV:[]
sink:
@@ -677,33 +677,33 @@ fun t12() : Int {
}
---------------------
L0:
<START>
mark({ try { return 1 } finally { doSmth(3) } })
1 <START>
2 mark({ try { return 1 } finally { doSmth(3) } })
mark(try { return 1 } finally { doSmth(3) })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ doSmth(3) }), mark({ return 1 })]
mark({ return 1 })
3 mark({ return 1 })
r(1)
L3 [start finally]:
mark({ doSmth(3) })
4 mark({ doSmth(3) })
mark(doSmth(3))
r(3)
call(doSmth, doSmth)
L4 [finish finally]:
ret(*) L1 NEXT:[<END>]
- jmp(L5 [skipFinallyToErrorBlock]) NEXT:[mark({ doSmth(3) })] PREV:[]
3 ret(*) L1 NEXT:[<END>]
- 2 jmp(L5 [skipFinallyToErrorBlock]) NEXT:[mark({ doSmth(3) })] PREV:[]
L2 [onExceptionToFinallyBlock]:
mark({ doSmth(3) }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
4 mark({ doSmth(3) }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
mark(doSmth(3))
r(3)
call(doSmth, doSmth)
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L5 [skipFinallyToErrorBlock]:
- mark({ doSmth(3) }) PREV:[]
- 4 mark({ doSmth(3) }) PREV:[]
- mark(doSmth(3)) PREV:[]
- r(3) PREV:[]
- call(doSmth, doSmth) PREV:[]
L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1]
1 <END> NEXT:[<SINK>] PREV:[ret(*) L1]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -723,44 +723,44 @@ fun t13() : Int {
}
---------------------
L0:
<START>
mark({ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) } })
1 <START>
2 mark({ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) } })
mark(try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) })
jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ doSmth(3) }), mark({ return 1 })]
mark({ return 1 })
3 mark({ return 1 })
r(1)
L4 [start finally]:
mark({ doSmth(3) })
4 mark({ doSmth(3) })
mark(doSmth(3))
r(3)
call(doSmth, doSmth)
L5 [finish finally]:
ret(*) L1 NEXT:[<END>]
- jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[]
3 ret(*) L1 NEXT:[<END>]
- 2 jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[]
L2 [onException]:
v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])]
3 v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])]
w(e)
mark({ doSmth(2) })
4 mark({ doSmth(2) })
mark(doSmth(2))
r(2)
call(doSmth, doSmth)
jmp(L6 [afterCatches])
3 jmp(L6 [afterCatches])
L6 [afterCatches]:
jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ doSmth(3) })]
2 jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ doSmth(3) })]
L3 [onExceptionToFinallyBlock]:
mark({ doSmth(3) }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
4 mark({ doSmth(3) }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
mark(doSmth(3))
r(3)
call(doSmth, doSmth)
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L7 [skipFinallyToErrorBlock]:
mark({ doSmth(3) }) PREV:[jmp(L7 [skipFinallyToErrorBlock])]
4 mark({ doSmth(3) }) PREV:[jmp(L7 [skipFinallyToErrorBlock])]
mark(doSmth(3))
r(3)
call(doSmth, doSmth)
L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, call(doSmth, doSmth)]
1 <END> NEXT:[<SINK>] PREV:[ret(*) L1, call(doSmth, doSmth)]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -777,25 +777,25 @@ fun t14() : Int {
}
---------------------
L0:
<START>
mark({ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } })
1 <START>
2 mark({ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } })
mark(try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) })
jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), mark({ return 1 })]
mark({ return 1 })
3 mark({ return 1 })
r(1)
ret(*) L1 NEXT:[<END>]
- jmp(L3 [afterCatches]) NEXT:[<END>] PREV:[]
- 2 jmp(L3 [afterCatches]) NEXT:[<END>] PREV:[]
L2 [onException]:
v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])]
3 v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])]
w(e)
mark({ doSmth(2) })
4 mark({ doSmth(2) })
mark(doSmth(2))
r(2)
call(doSmth, doSmth)
jmp(L3 [afterCatches])
3 jmp(L3 [afterCatches])
L1:
L3 [afterCatches]:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, jmp(L3 [afterCatches])]
1 <END> NEXT:[<SINK>] PREV:[ret(*) L1, jmp(L3 [afterCatches])]
error:
<ERROR> PREV:[]
sink:
@@ -815,47 +815,47 @@ fun t15() : Int {
}
---------------------
L0:
<START>
mark({ try { return 1 } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } })
1 <START>
2 mark({ try { return 1 } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } })
mark(try { return 1 } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) })
jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ doSmth(3) }), mark({ return 1 })]
mark({ return 1 })
3 mark({ return 1 })
r(1)
L4 [start finally]:
mark({ doSmth(3) })
4 mark({ doSmth(3) })
mark(doSmth(3))
r(3)
call(doSmth, doSmth)
L5 [finish finally]:
ret(*) L1 NEXT:[<END>]
- jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[]
3 ret(*) L1 NEXT:[<END>]
- 2 jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[]
L2 [onException]:
v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])]
3 v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])]
w(e)
mark({ return 2 })
4 mark({ return 2 })
r(2)
mark({ doSmth(3) })
mark(doSmth(3))
r(3)
call(doSmth, doSmth)
ret(*) L1 NEXT:[<END>]
- jmp(L6 [afterCatches]) PREV:[]
- 3 jmp(L6 [afterCatches]) PREV:[]
L6 [afterCatches]:
- jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ doSmth(3) })] PREV:[]
- 2 jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ doSmth(3) })] PREV:[]
L3 [onExceptionToFinallyBlock]:
mark({ doSmth(3) }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
4 mark({ doSmth(3) }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
mark(doSmth(3))
r(3)
call(doSmth, doSmth)
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L7 [skipFinallyToErrorBlock]:
- mark({ doSmth(3) }) PREV:[]
- 4 mark({ doSmth(3) }) PREV:[]
- mark(doSmth(3)) PREV:[]
- r(3) PREV:[]
- call(doSmth, doSmth) PREV:[]
L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
1 <END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -875,44 +875,44 @@ fun t16() : Int {
}
---------------------
L0:
<START>
mark({ try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } })
1 <START>
2 mark({ try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } })
mark(try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) })
jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ doSmth(3) }), mark({ doSmth(1) })]
mark({ doSmth(1) })
3 mark({ doSmth(1) })
mark(doSmth(1))
r(1)
call(doSmth, doSmth)
jmp(L4 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])]
2 jmp(L4 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])]
L2 [onException]:
v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])]
3 v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])]
w(e)
mark({ return 2 })
4 mark({ return 2 })
r(2)
L5 [start finally]:
mark({ doSmth(3) })
5 mark({ doSmth(3) })
mark(doSmth(3))
r(3)
call(doSmth, doSmth)
L6 [finish finally]:
ret(*) L1 NEXT:[<END>]
- jmp(L4 [afterCatches]) PREV:[]
4 ret(*) L1 NEXT:[<END>]
- 3 jmp(L4 [afterCatches]) PREV:[]
L4 [afterCatches]:
jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ doSmth(3) })] PREV:[jmp(L4 [afterCatches])]
2 jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ doSmth(3) })] PREV:[jmp(L4 [afterCatches])]
L3 [onExceptionToFinallyBlock]:
mark({ doSmth(3) }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
5 mark({ doSmth(3) }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
mark(doSmth(3))
r(3)
call(doSmth, doSmth)
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L7 [skipFinallyToErrorBlock]:
mark({ doSmth(3) }) PREV:[jmp(L7 [skipFinallyToErrorBlock])]
5 mark({ doSmth(3) }) PREV:[jmp(L7 [skipFinallyToErrorBlock])]
mark(doSmth(3))
r(3)
call(doSmth, doSmth)
L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, call(doSmth, doSmth)]
1 <END> NEXT:[<SINK>] PREV:[ret(*) L1, call(doSmth, doSmth)]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -923,13 +923,13 @@ fun doSmth(i: Int) {
}
---------------------
L0:
<START>
1 <START>
v(i: Int)
w(i)
mark({ })
2 mark({ })
read (Unit)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -2,11 +2,11 @@
fun doSmth() {}
---------------------
L0:
<START>
mark({})
1 <START>
2 mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -16,11 +16,11 @@ sink:
fun doSmth1() {}
---------------------
L0:
<START>
mark({})
1 <START>
2 mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -30,11 +30,11 @@ sink:
fun doSmth2() {}
---------------------
L0:
<START>
mark({})
1 <START>
2 mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -44,11 +44,11 @@ sink:
fun cond() {}
---------------------
L0:
<START>
mark({})
1 <START>
2 mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -71,45 +71,45 @@ fun testCopy1() : Int {
}
---------------------
L0:
<START>
mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 } })
1 <START>
2 mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 } })
mark(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 })
jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ return 1 }), mark({ doSmth() })]
mark({ doSmth() })
3 mark({ doSmth() })
mark(doSmth())
call(doSmth, doSmth)
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
2 jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
L2 [onException]:
jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])]
v(e: NullPointerException)
3 v(e: NullPointerException)
w(e)
mark({ doSmth1() })
4 mark({ doSmth1() })
mark(doSmth1())
call(doSmth1, doSmth1)
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
3 jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
L5 [catch 0]:
v(e: Exception) PREV:[jmp?(L5 [catch 0])]
w(e)
mark({ doSmth2() })
4 mark({ doSmth2() })
mark(doSmth2())
call(doSmth2, doSmth2)
jmp(L4 [afterCatches])
3 jmp(L4 [afterCatches])
L4 [afterCatches]:
jmp(L6 [skipFinallyToErrorBlock]) NEXT:[mark({ return 1 })] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])]
2 jmp(L6 [skipFinallyToErrorBlock]) NEXT:[mark({ return 1 })] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])]
L3 [onExceptionToFinallyBlock]:
L7 [start finally]:
mark({ return 1 }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
3 mark({ return 1 }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
r(1)
ret(*) L1 NEXT:[<END>]
L8 [finish finally]:
- jmp(error) NEXT:[<ERROR>] PREV:[]
- 2 jmp(error) NEXT:[<ERROR>] PREV:[]
L6 [skipFinallyToErrorBlock]:
mark({ return 1 }) PREV:[jmp(L6 [skipFinallyToErrorBlock])]
3 mark({ return 1 }) PREV:[jmp(L6 [skipFinallyToErrorBlock])]
r(1)
ret(*) L1
L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
1 <END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
error:
<ERROR> PREV:[]
sink:
@@ -135,8 +135,8 @@ fun testCopy2() {
}
---------------------
L0:
<START>
mark({ while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } })
1 <START>
2 mark({ while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } })
mark(while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } })
L2 [loop entry point]:
L5 [condition entry point]:
@@ -144,34 +144,34 @@ L5 [condition entry point]:
call(cond, cond)
jf(L3 [loop exit point]) NEXT:[read (Unit), mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } })]
L4 [body entry point]:
mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } })
3 mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } })
mark(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue })
jmp?(L6 [onException]) NEXT:[jmp?(L9 [catch 0]), jmp?(L7 [onExceptionToFinallyBlock])]
jmp?(L7 [onExceptionToFinallyBlock]) NEXT:[mark({ if (cond()) return else continue }), mark({ doSmth() })]
mark({ doSmth() })
4 mark({ doSmth() })
mark(doSmth())
call(doSmth, doSmth)
jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])]
3 jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])]
L6 [onException]:
jmp?(L9 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L6 [onException])]
v(e: NullPointerException)
4 v(e: NullPointerException)
w(e)
mark({ doSmth1() })
5 mark({ doSmth1() })
mark(doSmth1())
call(doSmth1, doSmth1)
jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])]
4 jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])]
L9 [catch 0]:
v(e: Exception) PREV:[jmp?(L9 [catch 0])]
w(e)
mark({ doSmth2() })
5 mark({ doSmth2() })
mark(doSmth2())
call(doSmth2, doSmth2)
jmp(L8 [afterCatches])
4 jmp(L8 [afterCatches])
L8 [afterCatches]:
jmp(L10 [skipFinallyToErrorBlock]) NEXT:[mark({ if (cond()) return else continue })] PREV:[jmp(L8 [afterCatches]), jmp(L8 [afterCatches]), jmp(L8 [afterCatches])]
3 jmp(L10 [skipFinallyToErrorBlock]) NEXT:[mark({ if (cond()) return else continue })] PREV:[jmp(L8 [afterCatches]), jmp(L8 [afterCatches]), jmp(L8 [afterCatches])]
L7 [onExceptionToFinallyBlock]:
L11 [start finally]:
mark({ if (cond()) return else continue }) PREV:[jmp?(L7 [onExceptionToFinallyBlock])]
4 mark({ if (cond()) return else continue }) PREV:[jmp?(L7 [onExceptionToFinallyBlock])]
mark(if (cond()) return else continue)
mark(cond())
call(cond, cond)
@@ -182,9 +182,9 @@ L12:
jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[jf(L12)]
L13:
L14 [finish finally]:
- jmp(error) NEXT:[<ERROR>] PREV:[]
- 3 jmp(error) NEXT:[<ERROR>] PREV:[]
L10 [skipFinallyToErrorBlock]:
mark({ if (cond()) return else continue }) PREV:[jmp(L10 [skipFinallyToErrorBlock])]
4 mark({ if (cond()) return else continue }) PREV:[jmp(L10 [skipFinallyToErrorBlock])]
mark(if (cond()) return else continue)
mark(cond())
call(cond, cond)
@@ -192,11 +192,11 @@ L10 [skipFinallyToErrorBlock]:
ret L1 NEXT:[<END>]
- jmp(copy L13) NEXT:[jmp(L2 [loop entry point])] PREV:[]
jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[jf(copy L12)]
- jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[]
- 2 jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[]
L3 [loop exit point]:
read (Unit) PREV:[jf(L3 [loop exit point])]
L1:
<END> NEXT:[<SINK>] PREV:[ret L1, ret L1, read (Unit)]
1 <END> NEXT:[<SINK>] PREV:[ret L1, ret L1, read (Unit)]
error:
<ERROR> PREV:[]
sink:
@@ -219,35 +219,35 @@ fun testCopy3() {
}
---------------------
L0:
<START>
mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); } })
1 <START>
2 mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); } })
mark(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); })
jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ while (cond()); }), mark({ doSmth() })]
mark({ doSmth() })
3 mark({ doSmth() })
mark(doSmth())
call(doSmth, doSmth)
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
2 jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
L2 [onException]:
jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])]
v(e: NullPointerException)
3 v(e: NullPointerException)
w(e)
mark({ doSmth1() })
4 mark({ doSmth1() })
mark(doSmth1())
call(doSmth1, doSmth1)
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
3 jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
L5 [catch 0]:
v(e: Exception) PREV:[jmp?(L5 [catch 0])]
w(e)
mark({ doSmth2() })
4 mark({ doSmth2() })
mark(doSmth2())
call(doSmth2, doSmth2)
jmp(L4 [afterCatches])
3 jmp(L4 [afterCatches])
L4 [afterCatches]:
jmp(L6 [skipFinallyToErrorBlock]) NEXT:[mark({ while (cond()); })] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])]
2 jmp(L6 [skipFinallyToErrorBlock]) NEXT:[mark({ while (cond()); })] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])]
L3 [onExceptionToFinallyBlock]:
L7 [start finally]:
mark({ while (cond()); }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
3 mark({ while (cond()); }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
mark(while (cond()))
L8 [loop entry point]:
L11 [condition entry point]:
@@ -259,9 +259,9 @@ L10 [body entry point]:
L9 [loop exit point]:
read (Unit) PREV:[jf(L9 [loop exit point])]
L12 [finish finally]:
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L6 [skipFinallyToErrorBlock]:
mark({ while (cond()); }) PREV:[jmp(L6 [skipFinallyToErrorBlock])]
3 mark({ while (cond()); }) PREV:[jmp(L6 [skipFinallyToErrorBlock])]
mark(while (cond()))
mark(cond()) PREV:[mark(while (cond())), jmp(copy L8 [loop entry point])]
call(cond, cond)
@@ -269,7 +269,7 @@ L6 [skipFinallyToErrorBlock]:
jmp(copy L8 [loop entry point]) NEXT:[mark(cond())]
read (Unit) PREV:[jf(copy L9 [loop exit point])]
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -287,47 +287,47 @@ fun doTestCopy4(list: List<String>?) : Int {
}
---------------------
L0:
<START>
1 <START>
v(list: List<String>?)
w(list)
mark({ try { doSmth() } finally { if(list != null) { } } })
2 mark({ try { doSmth() } finally { if(list != null) { } } })
mark(try { doSmth() } finally { if(list != null) { } })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ if(list != null) { } }), mark({ doSmth() })]
mark({ doSmth() })
3 mark({ doSmth() })
mark(doSmth())
call(doSmth, doSmth)
jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ if(list != null) { } })]
2 jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ if(list != null) { } })]
L2 [onExceptionToFinallyBlock]:
L4 [start finally]:
mark({ if(list != null) { } }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
3 mark({ if(list != null) { } }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
mark(if(list != null) { })
mark(list != null)
r(list)
r(null)
call(!=, equals)
jf(L5) NEXT:[read (Unit), mark({ })]
mark({ })
4 mark({ })
read (Unit)
jmp(L6) NEXT:[jmp(error)]
3 jmp(L6) NEXT:[jmp(error)]
L5:
read (Unit) PREV:[jf(L5)]
L6:
L7 [finish finally]:
jmp(error) NEXT:[<ERROR>] PREV:[jmp(L6), read (Unit)]
2 jmp(error) NEXT:[<ERROR>] PREV:[jmp(L6), read (Unit)]
L3 [skipFinallyToErrorBlock]:
mark({ if(list != null) { } }) PREV:[jmp(L3 [skipFinallyToErrorBlock])]
3 mark({ if(list != null) { } }) PREV:[jmp(L3 [skipFinallyToErrorBlock])]
mark(if(list != null) { })
mark(list != null)
r(list)
r(null)
call(!=, equals)
jf(copy L5) NEXT:[read (Unit), mark({ })]
mark({ })
4 mark({ })
read (Unit)
jmp(copy L6) NEXT:[<END>]
3 jmp(copy L6) NEXT:[<END>]
read (Unit) PREV:[jf(copy L5)]
L1:
<END> NEXT:[<SINK>] PREV:[jmp(copy L6), read (Unit)]
1 <END> NEXT:[<SINK>] PREV:[jmp(copy L6), read (Unit)]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -6,9 +6,9 @@ fun t1() {
}
---------------------
L0:
<START>
mark({ for (i in 1..2) { doSmth(i) } })
mark(for (i in 1..2) { doSmth(i) })
1 <START>
2 mark({ for (i in 1..2) { doSmth(i) } })
3 mark(for (i in 1..2) { doSmth(i) })
mark(1..2)
r(1)
r(2)
@@ -19,15 +19,15 @@ L3:
jmp?(L2) NEXT:[read (Unit), mark({ doSmth(i) })]
L4 [loop entry point]:
L5 [body entry point]:
mark({ doSmth(i) }) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
4 mark({ doSmth(i) }) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
mark(doSmth(i))
r(i)
call(doSmth, doSmth)
jmp?(L4 [loop entry point]) NEXT:[mark({ doSmth(i) }), read (Unit)]
3 jmp?(L4 [loop entry point]) NEXT:[mark({ doSmth(i) }), read (Unit)]
L2:
read (Unit) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -37,13 +37,13 @@ sink:
fun doSmth(i: Int) {}
---------------------
L0:
<START>
1 <START>
v(i: Int)
w(i)
mark({})
2 mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -17,19 +17,19 @@ fun t1(b: Boolean) {
}
---------------------
L0:
<START>
1 <START>
v(b: Boolean)
w(b)
mark({ var u: String if (b) { u = "s" } doSmth(u) var r: String if (b) { r = "s" } else { r = "t" } doSmth(r) })
2 mark({ var u: String if (b) { u = "s" } doSmth(u) var r: String if (b) { r = "s" } else { r = "t" } doSmth(r) })
v(var u: String)
mark(if (b) { u = "s" })
r(b)
jf(L2) NEXT:[read (Unit), mark({ u = "s" })]
mark({ u = "s" })
3 mark({ u = "s" })
mark("s")
r("s")
w(u)
jmp(L3) NEXT:[mark(doSmth(u))]
2 jmp(L3) NEXT:[mark(doSmth(u))]
L2:
read (Unit) PREV:[jf(L2)]
L3:
@@ -40,22 +40,22 @@ L3:
mark(if (b) { r = "s" } else { r = "t" })
r(b)
jf(L4) NEXT:[mark({ r = "t" }), mark({ r = "s" })]
mark({ r = "s" })
3 mark({ r = "s" })
mark("s")
r("s")
w(r)
jmp(L5) NEXT:[mark(doSmth(r))]
2 jmp(L5) NEXT:[mark(doSmth(r))]
L4:
mark({ r = "t" }) PREV:[jf(L4)]
3 mark({ r = "t" }) PREV:[jf(L4)]
mark("t")
r("t")
w(r)
L5:
mark(doSmth(r)) PREV:[jmp(L5), w(r)]
2 mark(doSmth(r)) PREV:[jmp(L5), w(r)]
r(r)
call(doSmth, doSmth)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -74,19 +74,19 @@ fun t2(b: Boolean) {
}
---------------------
L0:
<START>
1 <START>
v(b: Boolean)
w(b)
mark({ val i = 3 if (b) { return; } doSmth(i) if (i is Int) { return; } })
2 mark({ val i = 3 if (b) { return; } doSmth(i) if (i is Int) { return; } })
v(val i = 3)
r(3)
w(i)
mark(if (b) { return; })
r(b)
jf(L2) NEXT:[read (Unit), mark({ return; })]
mark({ return; })
3 mark({ return; })
ret L1 NEXT:[<END>]
- jmp(L3) NEXT:[mark(doSmth(i))] PREV:[]
- 2 jmp(L3) NEXT:[mark(doSmth(i))] PREV:[]
L2:
read (Unit) PREV:[jf(L2)]
L3:
@@ -97,14 +97,14 @@ L3:
mark(i is Int)
r(i)
jf(L4) NEXT:[read (Unit), mark({ return; })]
mark({ return; })
3 mark({ return; })
ret L1 NEXT:[<END>]
- jmp(L5) NEXT:[<END>] PREV:[]
- 2 jmp(L5) NEXT:[<END>] PREV:[]
L4:
read (Unit) PREV:[jf(L4)]
L1:
L5:
<END> NEXT:[<SINK>] PREV:[ret L1, ret L1, read (Unit)]
1 <END> NEXT:[<SINK>] PREV:[ret L1, ret L1, read (Unit)]
error:
<ERROR> PREV:[]
sink:
@@ -114,13 +114,13 @@ sink:
fun doSmth(s: String) {}
---------------------
L0:
<START>
1 <START>
v(s: String)
w(s)
mark({})
2 mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -6,8 +6,8 @@ fun main() {
}
---------------------
L0:
<START>
mark({ while(1 > 0) { 2 } })
1 <START>
2 mark({ while(1 > 0) { 2 } })
mark(while(1 > 0) { 2 })
L2 [loop entry point]:
L5 [condition entry point]:
@@ -17,13 +17,13 @@ L5 [condition entry point]:
call(>, compareTo)
jf(L3 [loop exit point]) NEXT:[read (Unit), mark({ 2 })]
L4 [body entry point]:
mark({ 2 })
3 mark({ 2 })
r(2)
jmp(L2 [loop entry point]) NEXT:[mark(1 > 0)]
2 jmp(L2 [loop entry point]) NEXT:[mark(1 > 0)]
L3 [loop exit point]:
read (Unit) PREV:[jf(L3 [loop exit point])]
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -36,9 +36,9 @@ fun dowhile() {
}
---------------------
L0:
<START>
mark({ do {return} while(1 > 0) })
mark(do {return} while(1 > 0))
1 <START>
2 mark({ do {return} while(1 > 0) })
3 mark(do {return} while(1 > 0))
L2 [loop entry point]:
L4 [body entry point]:
mark({return})
@@ -52,7 +52,7 @@ L5 [condition entry point]:
L3 [loop exit point]:
- read (Unit) PREV:[]
L1:
<END> NEXT:[<SINK>] PREV:[ret L1]
1 <END> NEXT:[<SINK>] PREV:[ret L1]
error:
<ERROR> PREV:[]
sink:
@@ -6,10 +6,10 @@ fun illegalWhenBlock(a: Any): Any {
}
---------------------
L0:
<START>
1 <START>
v(a: Any)
w(a)
mark({ when(a) { is Int -> return a } })
2 mark({ when(a) { is Int -> return a } })
mark(when(a) { is Int -> return a })
r(a)
mark(is Int -> return a)
@@ -21,7 +21,7 @@ L3:
L1:
L2:
L4:
<END> NEXT:[<SINK>] PREV:[jmp?(L4), ret(*) L1]
1 <END> NEXT:[<SINK>] PREV:[jmp?(L4), ret(*) L1]
error:
<ERROR> PREV:[]
sink:
@@ -5,26 +5,26 @@ fun foo(a: Int, b: Int) {
}
---------------------
L0:
<START>
1 <START>
v(a: Int)
w(a)
v(b: Int)
w(b)
mark({ if (a == b) { } })
2 mark({ if (a == b) { } })
mark(if (a == b) { })
mark(a == b)
r(a)
r(b)
call(==, equals)
jf(L2) NEXT:[read (Unit), mark({ })]
mark({ })
3 mark({ })
read (Unit)
jmp(L3) NEXT:[<END>]
2 jmp(L3) NEXT:[<END>]
L2:
read (Unit) PREV:[jf(L2)]
L1:
L3:
<END> NEXT:[<SINK>] PREV:[jmp(L3), read (Unit)]
1 <END> NEXT:[<SINK>] PREV:[jmp(L3), read (Unit)]
error:
<ERROR> PREV:[]
sink:
@@ -5,8 +5,8 @@ fun foo() {
}
---------------------
L0:
<START>
mark({ var i = 1 i++ })
1 <START>
2 mark({ var i = 1 i++ })
v(var i = 1)
r(1)
w(i)
@@ -15,7 +15,7 @@ L0:
call(++, inc)
w(i)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,15 +4,15 @@ fun foo(f: () -> Unit) {
}
---------------------
L0:
<START>
1 <START>
v(f: () -> Unit)
w(f)
mark({ f() })
2 mark({ f() })
mark(f())
r(f)
call(f, invoke)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,26 +4,26 @@ fun neq(a: Int, b: Int) {
}
---------------------
L0:
<START>
1 <START>
v(a: Int)
w(a)
v(b: Int)
w(b)
mark({ if (a != b) {} })
2 mark({ if (a != b) {} })
mark(if (a != b) {})
mark(a != b)
r(a)
r(b)
call(!=, equals)
jf(L2) NEXT:[read (Unit), mark({})]
mark({})
3 mark({})
read (Unit)
jmp(L3) NEXT:[<END>]
2 jmp(L3) NEXT:[<END>]
L2:
read (Unit) PREV:[jf(L2)]
L1:
L3:
<END> NEXT:[<SINK>] PREV:[jmp(L3), read (Unit)]
1 <END> NEXT:[<SINK>] PREV:[jmp(L3), read (Unit)]
error:
<ERROR> PREV:[]
sink:
@@ -5,8 +5,8 @@ fun test() {
}
---------------------
L0:
<START>
mark({ throw Exception() test() })
1 <START>
2 mark({ throw Exception() test() })
mark(throw Exception())
mark(Exception())
call(Exception, <init>)
@@ -14,7 +14,7 @@ L0:
- mark(test()) PREV:[]
- call(test, test) PREV:[]
L1:
<END> NEXT:[<SINK>] PREV:[]
1 <END> NEXT:[<SINK>] PREV:[]
error:
<ERROR> PREV:[throw (throw Exception())]
sink:
@@ -4,14 +4,14 @@ fun foo() {
}
---------------------
L0:
<START>
mark({ return ?: null })
1 <START>
2 mark({ return ?: null })
ret L1 NEXT:[<END>]
- jt(L2) NEXT:[r(null), <END>] PREV:[]
- r(null) PREV:[]
L1:
L2:
<END> NEXT:[<SINK>] PREV:[ret L1]
1 <END> NEXT:[<SINK>] PREV:[ret L1]
error:
<ERROR> PREV:[]
sink:
@@ -4,8 +4,8 @@ fun test() {
}
---------------------
L0:
<START>
mark({ "${throw Exception()} ${1}" })
1 <START>
2 mark({ "${throw Exception()} ${1}" })
mark("${throw Exception()} ${1}")
mark(throw Exception())
mark(Exception())
@@ -14,7 +14,7 @@ L0:
- r(1) PREV:[]
- r("${throw Exception()} ${1}") PREV:[]
L1:
<END> NEXT:[<SINK>] PREV:[]
1 <END> NEXT:[<SINK>] PREV:[]
error:
<ERROR> PREV:[throw (throw Exception())]
sink:
@@ -16,20 +16,20 @@ class AnonymousInitializers() {
}
---------------------
L0:
<START>
1 <START>
v(val k = 34)
r(34)
w(k)
v(val i: Int)
mark({ $i = 12 })
2 mark({ $i = 12 })
r(12)
w($i)
v(val j: Int get() = 20)
mark({ $i = 13 })
1 v(val j: Int get() = 20)
2 mark({ $i = 13 })
r(13)
w($i)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,15 +4,15 @@ fun foo() {
}
---------------------
L0:
<START>
mark({ {} })
1 <START>
2 mark({ {} })
mark({})
jmp?(L2) NEXT:[r({}), d({})]
d({}) NEXT:[<SINK>]
L2:
r({}) PREV:[jmp?(L2)]
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -22,11 +22,11 @@ sink:
{}
---------------------
L3:
<START>
mark()
3 <START>
4 mark()
read (Unit)
L4:
<END> NEXT:[<SINK>]
3 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,15 +4,15 @@ fun fail() : Nothing {
}
---------------------
L0:
<START>
mark({ throw java.lang.RuntimeException() })
1 <START>
2 mark({ throw java.lang.RuntimeException() })
mark(throw java.lang.RuntimeException())
mark(java.lang.RuntimeException())
mark(RuntimeException())
call(RuntimeException, <init>)
throw (throw java.lang.RuntimeException()) NEXT:[<ERROR>]
L1:
<END> NEXT:[<SINK>] PREV:[]
1 <END> NEXT:[<SINK>] PREV:[]
error:
<ERROR> PREV:[throw (throw java.lang.RuntimeException())]
sink:
@@ -4,11 +4,11 @@ fun <T> foo() {
}
---------------------
L0:
<START>
mark({ T })
1 <START>
2 mark({ T })
error(T, No resolved call)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -18,7 +18,7 @@ class C() {
}
---------------------
L0:
<START>
1 <START>
v(val a: Int = 1)
r(1)
w(a)
@@ -33,13 +33,13 @@ sink:
fun doSmth(i: Int) {}
---------------------
L0:
<START>
1 <START>
v(i: Int)
w(i)
mark({})
2 mark({})
read (Unit)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -56,18 +56,18 @@ fun test1() {
}
---------------------
L0:
<START>
mark({ val a = object { val x : Int { $x = 1 } } })
1 <START>
2 mark({ val a = object { val x : Int { $x = 1 } } })
v(val a = object { val x : Int { $x = 1 } })
mark(object { val x : Int { $x = 1 } })
v(val x : Int)
mark({ $x = 1 })
3 mark({ $x = 1 })
r(1)
w($x)
r(object { val x : Int { $x = 1 } })
2 r(object { val x : Int { $x = 1 } })
w(a)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -82,13 +82,13 @@ object O {
}
---------------------
L0:
<START>
1 <START>
v(val x : Int)
mark({ $x = 1 })
2 mark({ $x = 1 })
r(1)
w($x)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -103,8 +103,8 @@ fun test2() {
}
---------------------
L0:
<START>
mark({ val b = 1 val a = object { val x = b } })
1 <START>
2 mark({ val b = 1 val a = object { val x = b } })
v(val b = 1)
r(1)
w(b)
@@ -116,7 +116,7 @@ L0:
r(object { val x = b })
w(a)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -133,8 +133,8 @@ fun test3() {
}
---------------------
L0:
<START>
mark({ val a = object { val y : Int fun inner_bar() { y = 10 } } })
1 <START>
2 mark({ val a = object { val y : Int fun inner_bar() { y = 10 } } })
v(val a = object { val y : Int fun inner_bar() { y = 10 } })
mark(object { val y : Int fun inner_bar() { y = 10 } })
v(val y : Int)
@@ -144,7 +144,7 @@ L2:
r(object { val y : Int fun inner_bar() { y = 10 } }) PREV:[jmp?(L2)]
w(a)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -156,12 +156,12 @@ fun inner_bar() {
}
---------------------
L3:
<START>
mark({ y = 10 })
3 <START>
4 mark({ y = 10 })
r(10)
w(y)
L4:
<END> NEXT:[<SINK>]
3 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -182,22 +182,22 @@ fun test4() {
}
---------------------
L0:
<START>
mark({ val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } } })
1 <START>
2 mark({ val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } } })
v(val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } })
mark(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } })
v(val x : Int)
v(val y : Int)
mark({ $x = 1 })
3 mark({ $x = 1 })
r(1)
w($x)
jmp?(L2) NEXT:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }), d(fun ggg() { y = 10 })]
2 jmp?(L2) NEXT:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }), d(fun ggg() { y = 10 })]
d(fun ggg() { y = 10 }) NEXT:[<SINK>]
L2:
r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) PREV:[jmp?(L2)]
w(a)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -209,12 +209,12 @@ fun ggg() {
}
---------------------
L3:
<START>
mark({ y = 10 })
3 <START>
4 mark({ y = 10 })
r(10)
w(y)
L4:
<END> NEXT:[<SINK>]
3 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -237,17 +237,17 @@ fun test5() {
}
---------------------
L0:
<START>
mark({ val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } } })
1 <START>
2 mark({ val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } } })
v(val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } })
mark(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } })
v(var x = 1)
r(1)
w(x)
mark({ $x = 2 })
3 mark({ $x = 2 })
r(2)
w($x)
jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })]
2 jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })]
d(fun foo() { x = 3 }) NEXT:[<SINK>]
L2:
jmp?(L5) NEXT:[r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }), d(fun bar() { x = 4 })] PREV:[jmp?(L2)]
@@ -256,7 +256,7 @@ L5:
r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) PREV:[jmp?(L5)]
w(a)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -268,12 +268,12 @@ fun foo() {
}
---------------------
L3:
<START>
mark({ x = 3 })
3 <START>
4 mark({ x = 3 })
r(3)
w(x)
L4:
<END> NEXT:[<SINK>]
3 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -285,12 +285,12 @@ fun bar() {
}
---------------------
L6:
<START>
mark({ x = 4 })
3 <START>
4 mark({ x = 4 })
r(4)
w(x)
L7:
<END> NEXT:[<SINK>]
3 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,7 +4,7 @@ trait A {
}
---------------------
L0:
<START>
1 <START>
L1:
<END> NEXT:[<SINK>]
error:
@@ -16,7 +16,7 @@ sink:
fun foo() : Int
---------------------
L0:
<START>
1 <START>
L1:
<END> NEXT:[<SINK>]
error:
@@ -30,7 +30,7 @@ class B : A {
}
---------------------
L0:
<START>
1 <START>
unsupported(DELEGATOR_SUPER_CLASS : A)
L1:
<END> NEXT:[<SINK>]
@@ -43,7 +43,7 @@ sink:
override fun foo() = 10
---------------------
L0:
<START>
1 <START>
r(10)
L1:
<END> NEXT:[<SINK>]
@@ -59,10 +59,10 @@ fun foo(b: B) : Int {
}
---------------------
L0:
<START>
1 <START>
v(b: B)
w(b)
mark({ val o = object : A by b {} return o.foo() })
2 mark({ val o = object : A by b {} return o.foo() })
v(val o = object : A by b {})
mark(object : A by b {})
r(b)
@@ -74,7 +74,7 @@ L0:
call(foo, foo)
ret(*) L1
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -12,13 +12,13 @@ fun f() {
}
---------------------
L0:
<START>
mark({ class LocalClass() { fun f() { val x = "" fun loc() { val x3 = "" } } } })
1 <START>
2 mark({ class LocalClass() { fun f() { val x = "" fun loc() { val x3 = "" } } } })
jmp?(L2) NEXT:[<END>, d(fun f() { val x = "" fun loc() { val x3 = "" } })]
d(fun f() { val x = "" fun loc() { val x3 = "" } }) NEXT:[<SINK>]
L1:
L2:
<END> NEXT:[<SINK>] PREV:[jmp?(L2)]
1 <END> NEXT:[<SINK>] PREV:[jmp?(L2)]
error:
<ERROR> PREV:[]
sink:
@@ -34,8 +34,8 @@ fun f() {
}
---------------------
L3:
<START>
mark({ val x = "" fun loc() { val x3 = "" } })
3 <START>
4 mark({ val x = "" fun loc() { val x3 = "" } })
v(val x = "")
mark("")
r("")
@@ -44,7 +44,7 @@ L3:
d(fun loc() { val x3 = "" }) NEXT:[<SINK>]
L4:
L5:
<END> NEXT:[<SINK>] PREV:[jmp?(L5)]
3 <END> NEXT:[<SINK>] PREV:[jmp?(L5)]
error:
<ERROR> PREV:[]
sink:
@@ -56,14 +56,14 @@ fun loc() {
}
---------------------
L6:
<START>
mark({ val x3 = "" })
5 <START>
6 mark({ val x3 = "" })
v(val x3 = "")
mark("")
r("")
w(x3)
L7:
<END> NEXT:[<SINK>]
5 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -10,14 +10,14 @@ fun foo() {
}
---------------------
L0:
<START>
mark({ class B { val a: Int get() { val b: Int return b } } })
1 <START>
2 mark({ class B { val a: Int get() { val b: Int return b } } })
v(val a: Int get() { val b: Int return b })
jmp?(L2) NEXT:[<END>, d(get() { val b: Int return b })]
d(get() { val b: Int return b }) NEXT:[<SINK>]
L1:
L2:
<END> NEXT:[<SINK>] PREV:[jmp?(L2)]
1 <END> NEXT:[<SINK>] PREV:[jmp?(L2)]
error:
<ERROR> PREV:[]
sink:
@@ -30,13 +30,13 @@ get() {
}
---------------------
L3:
<START>
mark({ val b: Int return b })
3 <START>
4 mark({ val b: Int return b })
v(val b: Int)
r(b)
ret(*) L4
L4:
<END> NEXT:[<SINK>]
3 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -5,7 +5,7 @@ class C {
}
---------------------
L0:
<START>
1 <START>
L1:
<END> NEXT:[<SINK>]
error:
@@ -17,7 +17,7 @@ sink:
fun component1() = 1
---------------------
L0:
<START>
1 <START>
r(1)
L1:
<END> NEXT:[<SINK>]
@@ -30,7 +30,7 @@ sink:
fun component2() = 2
---------------------
L0:
<START>
1 <START>
r(2)
L1:
<END> NEXT:[<SINK>]
@@ -46,10 +46,10 @@ fun test(c: C) {
}
---------------------
L0:
<START>
1 <START>
v(c: C)
w(c)
mark({ val (a, b) = c val d = 1 })
2 mark({ val (a, b) = c val d = 1 })
r(c)
v(a)
call(a, component1)
@@ -61,7 +61,7 @@ L0:
r(1)
w(d)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -5,10 +5,10 @@ fun foo(x: Int) {
}
---------------------
L0:
<START>
1 <START>
v(x: Int)
w(x)
mark({ val (a, b) = x a })
2 mark({ val (a, b) = x a })
r(x)
v(a)
w(a)
@@ -16,7 +16,7 @@ L0:
w(b)
r(a)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,7 +4,7 @@ class Delegate {
}
---------------------
L0:
<START>
1 <START>
L1:
<END> NEXT:[<SINK>]
error:
@@ -16,7 +16,7 @@ sink:
fun get(_this: Any, p: PropertyMetadata): Int = 0
---------------------
L0:
<START>
1 <START>
v(_this: Any)
w(_this)
v(p: PropertyMetadata)
@@ -33,7 +33,7 @@ sink:
val a = Delegate()
---------------------
L0:
<START>
1 <START>
v(val a = Delegate())
mark(Delegate())
call(Delegate, <init>)
@@ -49,7 +49,7 @@ sink:
val b by a
---------------------
L0:
<START>
1 <START>
v(val b by a)
r(a)
L1:
@@ -9,12 +9,12 @@ class C {
}
---------------------
L0:
<START>
1 <START>
v(val a: Int get() = 1)
mark({ $a })
2 mark({ $a })
r($a)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -5,7 +5,7 @@ abstract class Bar {
}
---------------------
L0:
<START>
1 <START>
v(abstract var bar : String)
L1:
<END> NEXT:[<SINK>]
@@ -18,7 +18,7 @@ sink:
fun foo() = "foo" + this.$bar
---------------------
L0:
<START>
1 <START>
mark("foo" + this.$bar)
mark("foo")
r("foo")
@@ -4,7 +4,7 @@ class Test {
}
---------------------
L0:
<START>
1 <START>
v(var x : Int;)
L1:
<END> NEXT:[<SINK>]
@@ -29,8 +29,8 @@ fun assignments() : Unit {
}
---------------------
L0:
<START>
mark({ var x = 1 x = 2 x += 2 x = if (true) 1 else 2 val y = true && false val z = false && true val t = Test(); t.x = 1 })
1 <START>
2 mark({ var x = 1 x = 2 x += 2 x = if (true) 1 else 2 val y = true && false val z = false && true val t = Test(); t.x = 1 })
v(var x = 1)
r(1)
w(x)
@@ -72,7 +72,7 @@ L5:
r(t)
w(t.x)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -18,23 +18,23 @@ fun lazyBooleans(a : Boolean, b : Boolean) : Unit {
}
---------------------
L0:
<START>
1 <START>
v(a : Boolean)
w(a)
v(b : Boolean)
w(b)
mark({ if (a) { 1 } else { 2 } 3 if (a && b) 5 else 6 7 if (a || b) 8 else 9 10 if (a) 11 12 if (a) else 13 14 })
2 mark({ if (a) { 1 } else { 2 } 3 if (a && b) 5 else 6 7 if (a || b) 8 else 9 10 if (a) 11 12 if (a) else 13 14 })
mark(if (a) { 1 } else { 2 })
r(a)
jf(L2) NEXT:[mark({ 2 }), mark({ 1 })]
mark({ 1 })
3 mark({ 1 })
r(1)
jmp(L3) NEXT:[r(3)]
2 jmp(L3) NEXT:[r(3)]
L2:
mark({ 2 }) PREV:[jf(L2)]
3 mark({ 2 }) PREV:[jf(L2)]
r(2)
L3:
r(3) PREV:[jmp(L3), r(2)]
2 r(3) PREV:[jmp(L3), r(2)]
mark(if (a && b) 5 else 6)
r(a)
jf(L4) NEXT:[jf(L5), r(b)]
@@ -78,7 +78,7 @@ L12:
L13:
r(14) PREV:[jmp(L13), r(13)]
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,8 +4,8 @@ fun blockAndAndMismatch() : Boolean {
}
---------------------
L0:
<START>
mark({ false || (return false) })
1 <START>
2 mark({ false || (return false) })
r(false)
jt(L2) NEXT:[mark((return false)), r(false || (return false))]
mark((return false))
@@ -14,7 +14,7 @@ L0:
L2:
r(false || (return false)) PREV:[jt(L2)]
L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, r(false || (return false))]
1 <END> NEXT:[<SINK>] PREV:[ret(*) L1, r(false || (return false))]
error:
<ERROR> PREV:[]
sink:
@@ -4,14 +4,14 @@ fun Int.bar(c: C) {
}
---------------------
L0:
<START>
1 <START>
v(c: C)
w(c)
mark({ this = c })
2 mark({ this = c })
r(c)
unsupported(BINARY_EXPRESSION : this = c)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -2,7 +2,7 @@
class JetToken
---------------------
L0:
<START>
1 <START>
L1:
<END> NEXT:[<SINK>]
error:
@@ -59,8 +59,8 @@ public open class JetKeywordCompletionContributor() {
}
---------------------
L0:
<START>
mark({ val inTopLevel = 1.0 BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) .add(IN_KEYWORD, inTopLevel, inTopLevel) .add(OUT_KEYWORD, inTopLevel) .add(OBJECT_KEYWORD, unresolvedCode) .registerAll() })
1 <START>
2 mark({ val inTopLevel = 1.0 BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) .add(IN_KEYWORD, inTopLevel, inTopLevel) .add(OUT_KEYWORD, inTopLevel) .add(OBJECT_KEYWORD, unresolvedCode) .registerAll() })
v(val inTopLevel = 1.0)
r(1.0)
w(inTopLevel)
@@ -217,7 +217,7 @@ L0:
call(add, add)
call(registerAll, registerAll)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -227,7 +227,7 @@ sink:
val ABSTRACT_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val ABSTRACT_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -243,7 +243,7 @@ sink:
val FINAL_KEYWORD OPEN_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val FINAL_KEYWORD OPEN_KEYWORD = JetToken())
L1:
<END> NEXT:[<SINK>]
@@ -256,7 +256,7 @@ sink:
val OPEN_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val OPEN_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -272,7 +272,7 @@ sink:
val INTERNAL_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val INTERNAL_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -288,7 +288,7 @@ sink:
val PRIVATE_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val PRIVATE_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -304,7 +304,7 @@ sink:
val PROTECTED_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val PROTECTED_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -320,7 +320,7 @@ sink:
val PUBLIC_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val PUBLIC_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -336,7 +336,7 @@ sink:
val CLASS_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val CLASS_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -352,7 +352,7 @@ sink:
val ENUM_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val ENUM_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -368,7 +368,7 @@ sink:
val FUN_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val FUN_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -384,7 +384,7 @@ sink:
val GET_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val GET_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -400,7 +400,7 @@ sink:
val SET_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val SET_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -416,7 +416,7 @@ sink:
val TRAIT_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val TRAIT_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -432,7 +432,7 @@ sink:
val VAL_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val VAL_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -448,7 +448,7 @@ sink:
val VAR_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val VAR_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -464,7 +464,7 @@ sink:
val TYPE_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val TYPE_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -480,7 +480,7 @@ sink:
val IMPORT_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val IMPORT_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -496,7 +496,7 @@ sink:
val PACKAGE_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val PACKAGE_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -512,7 +512,7 @@ sink:
val OVERRIDE_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val OVERRIDE_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -528,7 +528,7 @@ sink:
val IN_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val IN_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -544,7 +544,7 @@ sink:
val OUT_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val OUT_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -560,7 +560,7 @@ sink:
val OBJECT_KEYWORD = JetToken()
---------------------
L0:
<START>
1 <START>
v(val OBJECT_KEYWORD = JetToken())
mark(JetToken())
call(JetToken, <init>)
@@ -4,16 +4,16 @@ fun invoke(f: () -> Unit) {
}
---------------------
L0:
<START>
1 <START>
v(f: () -> Unit)
w(f)
mark({ (f)() })
2 mark({ (f)() })
mark((f)())
mark((f))
r(f)
call((f), <for expression (f)>)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,15 +4,15 @@ fun test(s: String?) {
}
---------------------
L0:
<START>
1 <START>
v(s: String?)
w(s)
mark({ s?.length })
2 mark({ s?.length })
mark(s?.length)
r(s)
r(length)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,14 +4,14 @@ fun foo(s: String) {
}
---------------------
L0:
<START>
1 <START>
v(s: String)
w(s)
mark({ s. })
2 mark({ s. })
mark(s.)
r(s)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,13 +4,13 @@ fun Function0<Unit>.foo() {
}
---------------------
L0:
<START>
mark({ this() })
1 <START>
2 mark({ this() })
mark(this())
r(this)
call(this, <for expression this>)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,17 +4,17 @@ fun test(a: Any) {
}
---------------------
L0:
<START>
1 <START>
v(a: Any)
w(a)
mark({ a.foo() })
2 mark({ a.foo() })
mark(a.foo())
mark(foo())
error(foo, No resolved call)
error(foo, No resolved call)
r(a)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -4,13 +4,13 @@ fun main(arg : Array<String>) {
}
---------------------
L0:
<START>
1 <START>
v(arg : Array<String>)
w(arg)
mark({ a })
2 mark({ a })
error(a, No resolved call)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
@@ -8,26 +8,26 @@ tailRecursive fun test() : Int {
}
---------------------
L0:
<START>
mark({ try { // do nothing } finally { test() } })
1 <START>
2 mark({ try { // do nothing } finally { test() } })
mark(try { // do nothing } finally { test() })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ test() }), mark({ // do nothing })]
mark({ // do nothing })
3 mark({ // do nothing })
read (Unit)
jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ test() })]
2 jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ test() })]
L2 [onExceptionToFinallyBlock]:
L4 [start finally]:
mark({ test() }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
3 mark({ test() }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
mark(test())
call(test, test)
L5 [finish finally]:
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L3 [skipFinallyToErrorBlock]:
mark({ test() }) PREV:[jmp(L3 [skipFinallyToErrorBlock])]
3 mark({ test() }) PREV:[jmp(L3 [skipFinallyToErrorBlock])]
mark(test())
call(test, test)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -8,28 +8,28 @@ tailRecursive fun test() : Int {
}
---------------------
L0:
<START>
mark({ try { // do nothing } finally { return test() } })
1 <START>
2 mark({ try { // do nothing } finally { return test() } })
mark(try { // do nothing } finally { return test() })
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ return test() }), mark({ // do nothing })]
mark({ // do nothing })
3 mark({ // do nothing })
read (Unit)
jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ return test() })]
2 jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ return test() })]
L2 [onExceptionToFinallyBlock]:
L4 [start finally]:
mark({ return test() }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
3 mark({ return test() }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
mark(test())
call(test, test)
ret(*) L1 NEXT:[<END>]
L5 [finish finally]:
- jmp(error) NEXT:[<ERROR>] PREV:[]
- 2 jmp(error) NEXT:[<ERROR>] PREV:[]
L3 [skipFinallyToErrorBlock]:
mark({ return test() }) PREV:[jmp(L3 [skipFinallyToErrorBlock])]
3 mark({ return test() }) PREV:[jmp(L3 [skipFinallyToErrorBlock])]
mark(test())
call(test, test)
ret(*) L1
L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
1 <END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
error:
<ERROR> PREV:[]
sink:
@@ -5,12 +5,12 @@ tailRecursive fun sum(x: Long, sum: Long): Long {
}
---------------------
L0:
<START>
1 <START>
v(x: Long)
w(x)
v(sum: Long)
w(sum)
mark({ if (x == 0.toLong()) return sum return sum(x - 1, sum + x) })
2 mark({ if (x == 0.toLong()) return sum return sum(x - 1, sum + x) })
mark(if (x == 0.toLong()) return sum)
mark(x == 0.toLong())
r(x)
@@ -38,7 +38,7 @@ L3:
call(sum, sum)
ret(*) L1
L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
1 <END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
error:
<ERROR> PREV:[]
sink:
@@ -8,24 +8,24 @@ tailRecursive fun foo() {
}
---------------------
L0:
<START>
mark({ try { return foo() } catch (e: Throwable) { } })
1 <START>
2 mark({ try { return foo() } catch (e: Throwable) { } })
mark(try { return foo() } catch (e: Throwable) { })
jmp?(L2 [onException]) NEXT:[v(e: Throwable), mark({ return foo() })]
mark({ return foo() })
3 mark({ return foo() })
mark(foo())
call(foo, foo)
ret(*) L1 NEXT:[<END>]
- jmp(L3 [afterCatches]) NEXT:[<END>] PREV:[]
- 2 jmp(L3 [afterCatches]) NEXT:[<END>] PREV:[]
L2 [onException]:
v(e: Throwable) PREV:[jmp?(L2 [onException])]
3 v(e: Throwable) PREV:[jmp?(L2 [onException])]
w(e)
mark({ })
4 mark({ })
read (Unit)
jmp(L3 [afterCatches])
3 jmp(L3 [afterCatches])
L1:
L3 [afterCatches]:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, jmp(L3 [afterCatches])]
1 <END> NEXT:[<SINK>] PREV:[ret(*) L1, jmp(L3 [afterCatches])]
error:
<ERROR> PREV:[]
sink:
@@ -10,37 +10,37 @@ fun test() : Unit {
}
---------------------
L0:
<START>
mark({ try { test() } catch (any : Exception) { test() } finally { test() } })
1 <START>
2 mark({ try { test() } catch (any : Exception) { test() } finally { test() } })
mark(try { test() } catch (any : Exception) { test() } finally { test() })
jmp?(L2 [onException]) NEXT:[v(any : Exception), jmp?(L3 [onExceptionToFinallyBlock])]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ test() }), mark({ test() })]
mark({ test() })
3 mark({ test() })
mark(test())
call(test, test)
jmp(L4 [afterCatches]) NEXT:[jmp(L5 [skipFinallyToErrorBlock])]
2 jmp(L4 [afterCatches]) NEXT:[jmp(L5 [skipFinallyToErrorBlock])]
L2 [onException]:
v(any : Exception) PREV:[jmp?(L2 [onException])]
3 v(any : Exception) PREV:[jmp?(L2 [onException])]
w(any)
mark({ test() })
4 mark({ test() })
mark(test())
call(test, test)
jmp(L4 [afterCatches])
3 jmp(L4 [afterCatches])
L4 [afterCatches]:
jmp(L5 [skipFinallyToErrorBlock]) NEXT:[mark({ test() })] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches])]
2 jmp(L5 [skipFinallyToErrorBlock]) NEXT:[mark({ test() })] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches])]
L3 [onExceptionToFinallyBlock]:
L6 [start finally]:
mark({ test() }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
3 mark({ test() }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
mark(test())
call(test, test)
L7 [finish finally]:
jmp(error) NEXT:[<ERROR>]
2 jmp(error) NEXT:[<ERROR>]
L5 [skipFinallyToErrorBlock]:
mark({ test() }) PREV:[jmp(L5 [skipFinallyToErrorBlock])]
3 mark({ test() }) PREV:[jmp(L5 [skipFinallyToErrorBlock])]
mark(test())
call(test, test)
L1:
<END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[jmp(error)]
sink:
@@ -20,6 +20,7 @@ import com.google.common.collect.Sets;
import com.intellij.openapi.util.text.StringUtil;
import kotlin.Function3;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.ConfigurationKind;
import org.jetbrains.jet.JetTestUtils;
import org.jetbrains.jet.analyzer.AnalyzeExhaust;
@@ -125,11 +126,27 @@ public abstract class AbstractPseudocodeTest extends KotlinTestWithEnvironment {
protected void checkPseudocode(PseudocodeImpl pseudocode) {
}
private static String formatInstruction(Instruction instruction, int maxLength, Set<Instruction> remainedAfterPostProcessInstructions) {
String[] parts = instruction.toString().split("\n");
private String getIsDeadInstructionPrefix(
@NotNull Instruction instruction,
@NotNull Set<Instruction> remainedAfterPostProcessInstructions
) {
boolean isRemovedThroughPostProcess = !remainedAfterPostProcessInstructions.contains(instruction);
assert isRemovedThroughPostProcess == ((InstructionImpl)instruction).isDead();
String prefix = isRemovedThroughPostProcess ? "- " : " ";
return isRemovedThroughPostProcess ? "-" : " ";
}
private String getDepthInstructionPrefix(@NotNull Instruction instruction, @Nullable Instruction previous) {
Integer prevDepth = previous != null ? previous.getLexicalScope().getDepth() : null;
int depth = instruction.getLexicalScope().getDepth();
if (prevDepth == null || depth != prevDepth) {
return String.format("%2d ", depth);
}
return " ";
}
private String formatInstruction(Instruction instruction, int maxLength, String prefix) {
String[] parts = instruction.toString().split("\n");
if (parts.length == 1) {
return prefix + String.format("%1$-" + maxLength + "s", instruction);
}
@@ -168,11 +185,14 @@ public abstract class AbstractPseudocodeTest extends KotlinTestWithEnvironment {
StringBuilder line = new StringBuilder();
line.append(formatInstruction(instruction, instructionColumnWidth, remainedAfterPostProcessInstructions));
// Only print NEXT and PREV if the values are non-trivial
Instruction next = i == instructions.size() - 1 ? null : instructions.get(i + 1);
Instruction prev = i == 0 ? null : instructions.get(i - 1);
String prefix = getIsDeadInstructionPrefix(instruction, remainedAfterPostProcessInstructions) +
getDepthInstructionPrefix(instruction, prev);
line.append(formatInstruction(instruction, instructionColumnWidth, prefix));
line.append(getInstructionData.invoke(instruction, next, prev));
out.append(StringUtil.trimTrailing(line.toString()));
@@ -31,7 +31,7 @@ import org.jetbrains.jet.cfg.AbstractDataFlowTest;
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/cfg-variables")
@InnerTestClasses({DataFlowTestGenerated.Basic.class})
@InnerTestClasses({DataFlowTestGenerated.Basic.class, DataFlowTestGenerated.LexicalScopes.class})
public class DataFlowTestGenerated extends AbstractDataFlowTest {
public void testAllFilesPresentInCfg_variables() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg-variables"), Pattern.compile("^(.+)\\.kt$"), true);
@@ -70,10 +70,79 @@ public class DataFlowTestGenerated extends AbstractDataFlowTest {
}
@TestMetadata("compiler/testData/cfg-variables/lexicalScopes")
public static class LexicalScopes extends AbstractDataFlowTest {
public void testAllFilesPresentInLexicalScopes() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg-variables/lexicalScopes"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("doWhileScope.kt")
public void testDoWhileScope() throws Exception {
doTest("compiler/testData/cfg-variables/lexicalScopes/doWhileScope.kt");
}
@TestMetadata("forScope.kt")
public void testForScope() throws Exception {
doTest("compiler/testData/cfg-variables/lexicalScopes/forScope.kt");
}
@TestMetadata("functionLiteralScope.kt")
public void testFunctionLiteralScope() throws Exception {
doTest("compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.kt");
}
@TestMetadata("ifScope.kt")
public void testIfScope() throws Exception {
doTest("compiler/testData/cfg-variables/lexicalScopes/ifScope.kt");
}
@TestMetadata("localClass.kt")
public void testLocalClass() throws Exception {
doTest("compiler/testData/cfg-variables/lexicalScopes/localClass.kt");
}
@TestMetadata("localFunctionScope.kt")
public void testLocalFunctionScope() throws Exception {
doTest("compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.kt");
}
@TestMetadata("localFunctionScopeWithoutBody.kt")
public void testLocalFunctionScopeWithoutBody() throws Exception {
doTest("compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.kt");
}
@TestMetadata("localObject.kt")
public void testLocalObject() throws Exception {
doTest("compiler/testData/cfg-variables/lexicalScopes/localObject.kt");
}
@TestMetadata("objectLiteralScope.kt")
public void testObjectLiteralScope() throws Exception {
doTest("compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt");
}
@TestMetadata("propertyAccessorScope.kt")
public void testPropertyAccessorScope() throws Exception {
doTest("compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.kt");
}
@TestMetadata("tryScope.kt")
public void testTryScope() throws Exception {
doTest("compiler/testData/cfg-variables/lexicalScopes/tryScope.kt");
}
@TestMetadata("whileScope.kt")
public void testWhileScope() throws Exception {
doTest("compiler/testData/cfg-variables/lexicalScopes/whileScope.kt");
}
}
public static Test suite() {
TestSuite suite = new TestSuite("DataFlowTestGenerated");
suite.addTestSuite(DataFlowTestGenerated.class);
suite.addTestSuite(Basic.class);
suite.addTestSuite(LexicalScopes.class);
return suite;
}
}