Do not display trivial sets of next/previous instructions in test data

For better readability of test failures
This commit is contained in:
Andrey Breslav
2013-12-04 14:04:52 +04:00
parent e8c94a9d1d
commit 6a4043c9a0
38 changed files with 1171 additions and 1156 deletions
@@ -16,45 +16,45 @@ class AnonymousInitializers() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val k = 34)] PREV:[] <START>
v(val k = 34) NEXT:[r(34)] PREV:[<START>] v(val k = 34)
r(34) NEXT:[w(k)] PREV:[v(val k = 34)] r(34)
w(k) NEXT:[v(val i: Int)] PREV:[r(34)] w(k)
v(val i: Int) NEXT:[r(12)] PREV:[w(k)] v(val i: Int)
r(12) NEXT:[w($i)] PREV:[v(val i: Int)] r(12)
w($i) NEXT:[v(val j: Int get() = 20)] PREV:[r(12)] w($i)
v(val j: Int get() = 20) NEXT:[jmp?(L2)] PREV:[w($i)] v(val j: Int get() = 20)
jmp?(L2) NEXT:[r(13), d(get() = 20)] PREV:[v(val j: Int get() = 20)] jmp?(L2) NEXT:[r(13), d(get() = 20)]
d(get() = 20) NEXT:[<SINK>] PREV:[jmp?(L2)] d(get() = 20) NEXT:[<SINK>]
L2: L2:
r(13) NEXT:[w($i)] PREV:[jmp?(L2)] r(13) PREV:[jmp?(L2)]
w($i) NEXT:[<END>] PREV:[r(13)] w($i)
L1: L1:
<END> NEXT:[<SINK>] PREV:[w($i)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d(get() = 20)] <SINK> PREV:[<ERROR>, <END>, d(get() = 20)]
L3: L3:
<START> NEXT:[r(20)] PREV:[] <START>
r(20) NEXT:[<END>] PREV:[<START>] r(20)
L4: L4:
<END> NEXT:[<SINK>] PREV:[r(20)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== get_j == == get_j ==
get() = 20 get() = 20
--------------------- ---------------------
L3: L3:
<START> NEXT:[r(20)] PREV:[] <START>
r(20) NEXT:[<END>] PREV:[<START>] r(20)
L4: L4:
<END> NEXT:[<SINK>] PREV:[r(20)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
+26 -26
View File
@@ -10,33 +10,33 @@ fun foo() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val a = Array<Int>)] PREV:[] <START>
v(val a = Array<Int>) NEXT:[call(Array, <init>)] PREV:[<START>] v(val a = Array<Int>)
call(Array, <init>) NEXT:[w(a)] PREV:[v(val a = Array<Int>)] call(Array, <init>)
w(a) NEXT:[r(3)] PREV:[call(Array, <init>)] w(a)
r(3) NEXT:[r(a)] PREV:[w(a)] r(3)
r(a) NEXT:[r(10)] PREV:[r(3)] r(a)
r(10) NEXT:[r(4)] PREV:[r(a)] r(10)
r(4) NEXT:[call(a[10], set)] PREV:[r(10)] r(4)
call(a[10], set) NEXT:[r(2)] PREV:[r(4)] call(a[10], set)
r(2) NEXT:[r(a)] PREV:[call(a[10], set)] r(2)
r(a) NEXT:[r(10)] PREV:[r(2)] r(a)
r(10) NEXT:[call(a[10], get)] PREV:[r(a)] r(10)
call(a[10], get) NEXT:[r(100)] PREV:[r(10)] call(a[10], get)
r(100) NEXT:[r(a)] PREV:[call(a[10], get)] r(100)
r(a) NEXT:[r(10)] PREV:[r(100)] r(a)
r(10) NEXT:[call(a[10], get)] PREV:[r(a)] r(10)
call(a[10], get) NEXT:[r(1)] PREV:[r(10)] call(a[10], get)
r(1) NEXT:[call(+=, plus)] PREV:[call(a[10], get)] r(1)
call(+=, plus) NEXT:[r(a)] PREV:[r(1)] call(+=, plus)
r(a) NEXT:[r(10)] PREV:[call(+=, plus)] r(a)
r(10) NEXT:[r(1)] PREV:[r(a)] r(10)
r(1) NEXT:[call(a[10], set)] PREV:[r(10)] r(1)
call(a[10], set) NEXT:[<END>] PREV:[r(1)] call(a[10], set)
L1: L1:
<END> NEXT:[<SINK>] PREV:[call(a[10], set)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
+42 -42
View File
@@ -4,14 +4,14 @@ class Test {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(var x : Int;)] PREV:[] <START>
v(var x : Int;) NEXT:[<END>] PREV:[<START>] v(var x : Int;)
L1: L1:
<END> NEXT:[<SINK>] PREV:[v(var x : Int;)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== assignments == == assignments ==
fun assignments() : Unit { fun assignments() : Unit {
@@ -29,48 +29,48 @@ fun assignments() : Unit {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(var x = 1)] PREV:[] <START>
v(var x = 1) NEXT:[r(1)] PREV:[<START>] v(var x = 1)
r(1) NEXT:[w(x)] PREV:[v(var x = 1)] r(1)
w(x) NEXT:[r(2)] PREV:[r(1)] w(x)
r(2) NEXT:[w(x)] PREV:[w(x)] r(2)
w(x) NEXT:[r(x)] PREV:[r(2)] w(x)
r(x) NEXT:[r(2)] PREV:[w(x)] r(x)
r(2) NEXT:[call(+=, plus)] PREV:[r(x)] r(2)
call(+=, plus) NEXT:[w(x)] PREV:[r(2)] call(+=, plus)
w(x) NEXT:[r(true)] PREV:[call(+=, plus)] w(x)
r(true) NEXT:[jf(L2)] PREV:[w(x)] r(true)
jf(L2) NEXT:[r(2), r(1)] PREV:[r(true)] jf(L2) NEXT:[r(2), r(1)]
r(1) NEXT:[jmp(L3)] PREV:[jf(L2)] r(1)
jmp(L3) NEXT:[w(x)] PREV:[r(1)] jmp(L3) NEXT:[w(x)]
L2: L2:
r(2) NEXT:[w(x)] PREV:[jf(L2)] r(2) PREV:[jf(L2)]
L3: L3:
w(x) NEXT:[v(val y = true && false)] PREV:[jmp(L3), r(2)] w(x) PREV:[jmp(L3), r(2)]
v(val y = true && false) NEXT:[r(true)] PREV:[w(x)] v(val y = true && false)
r(true) NEXT:[jf(L4)] PREV:[v(val y = true && false)] r(true)
jf(L4) NEXT:[r(true && false), r(false)] PREV:[r(true)] jf(L4) NEXT:[r(true && false), r(false)]
r(false) NEXT:[r(true && false)] PREV:[jf(L4)] r(false)
L4: L4:
r(true && false) NEXT:[w(y)] PREV:[jf(L4), r(false)] r(true && false) PREV:[jf(L4), r(false)]
w(y) NEXT:[v(val z = false && true)] PREV:[r(true && false)] w(y)
v(val z = false && true) NEXT:[r(false)] PREV:[w(y)] v(val z = false && true)
r(false) NEXT:[jf(L5)] PREV:[v(val z = false && true)] r(false)
jf(L5) NEXT:[r(false && true), r(true)] PREV:[r(false)] jf(L5) NEXT:[r(false && true), r(true)]
r(true) NEXT:[r(false && true)] PREV:[jf(L5)] r(true)
L5: L5:
r(false && true) NEXT:[w(z)] PREV:[jf(L5), r(true)] r(false && true) PREV:[jf(L5), r(true)]
w(z) NEXT:[v(val t = Test())] PREV:[r(false && true)] w(z)
v(val t = Test()) NEXT:[call(Test, <init>)] PREV:[w(z)] v(val t = Test())
call(Test, <init>) NEXT:[w(t)] PREV:[v(val t = Test())] call(Test, <init>)
w(t) NEXT:[r(1)] PREV:[call(Test, <init>)] w(t)
r(1) NEXT:[r(t)] PREV:[w(t)] r(1)
r(t) NEXT:[w(t.x)] PREV:[r(1)] r(t)
w(t.x) NEXT:[<END>] PREV:[r(t)] w(t.x)
L1: L1:
<END> NEXT:[<SINK>] PREV:[w(t.x)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
+66 -66
View File
@@ -18,112 +18,112 @@ fun f(a : Boolean) : Unit {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(a : Boolean)] PREV:[] <START>
v(a : Boolean) NEXT:[w(a)] PREV:[<START>] v(a : Boolean)
w(a) NEXT:[r(1)] PREV:[v(a : Boolean)] w(a)
r(1) NEXT:[r(a)] PREV:[w(a)] r(1)
r(a) NEXT:[r(2)] PREV:[r(1)] r(a)
r(2) NEXT:[call(toLong, toLong)] PREV:[r(a)] r(2)
call(toLong, toLong) NEXT:[r(a)] PREV:[r(2)] call(toLong, toLong)
r(a) NEXT:[r(3)] PREV:[call(toLong, toLong)] r(a)
r(3) NEXT:[call(foo, foo)] PREV:[r(a)] r(3)
call(foo, foo) NEXT:[call(genfun, genfun)] PREV:[r(3)] call(foo, foo)
call(genfun, genfun) NEXT:[jmp?(L2)] PREV:[call(foo, foo)] call(genfun, genfun)
jmp?(L2) NEXT:[r({1}), d({1})] PREV:[call(genfun, genfun)] jmp?(L2) NEXT:[r({1}), d({1})]
d({1}) NEXT:[<SINK>] PREV:[jmp?(L2)] d({1}) NEXT:[<SINK>]
L2: L2:
r({1}) NEXT:[call(flfun, flfun)] PREV:[jmp?(L2)] r({1}) PREV:[jmp?(L2)]
call(flfun, flfun) NEXT:[r(3)] PREV:[r({1})] call(flfun, flfun)
r(3) NEXT:[r(4)] PREV:[call(flfun, flfun)] r(3)
r(4) NEXT:[call(equals, equals)] PREV:[r(3)] r(4)
call(equals, equals) NEXT:[r(3)] PREV:[r(4)] call(equals, equals)
r(3) NEXT:[r(4)] PREV:[call(equals, equals)] r(3)
r(4) NEXT:[call(equals, equals)] PREV:[r(3)] r(4)
call(equals, equals) NEXT:[r(1)] PREV:[r(4)] call(equals, equals)
r(1) NEXT:[r(2)] PREV:[call(equals, equals)] r(1)
r(2) NEXT:[call(+, plus)] PREV:[r(1)] r(2)
call(+, plus) NEXT:[r(a)] PREV:[r(2)] call(+, plus)
r(a) NEXT:[jf(L5)] PREV:[call(+, plus)] r(a)
jf(L5) NEXT:[r(a && true), r(true)] PREV:[r(a)] jf(L5) NEXT:[r(a && true), r(true)]
r(true) NEXT:[r(a && true)] PREV:[jf(L5)] r(true)
L5: L5:
r(a && true) NEXT:[r(a)] PREV:[jf(L5), r(true)] r(a && true) PREV:[jf(L5), r(true)]
r(a) NEXT:[jt(L6)] PREV:[r(a && true)] r(a)
jt(L6) NEXT:[r(false), r(a || false)] PREV:[r(a)] jt(L6) NEXT:[r(false), r(a || false)]
r(false) NEXT:[r(a || false)] PREV:[jt(L6)] r(false)
L6: L6:
r(a || false) NEXT:[<END>] PREV:[jt(L6), r(false)] r(a || false) PREV:[jt(L6), r(false)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[r(a || false)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d({1})] <SINK> PREV:[<ERROR>, <END>, d({1})]
L3: L3:
<START> NEXT:[r(1)] PREV:[] <START>
r(1) NEXT:[<END>] PREV:[<START>] r(1)
L4: L4:
<END> NEXT:[<SINK>] PREV:[r(1)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== anonymous_0 == == anonymous_0 ==
{1} {1}
--------------------- ---------------------
L3: L3:
<START> NEXT:[r(1)] PREV:[] <START>
r(1) NEXT:[<END>] PREV:[<START>] r(1)
L4: L4:
<END> NEXT:[<SINK>] PREV:[r(1)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== foo == == foo ==
fun foo(a : Boolean, b : Int) : Unit {} fun foo(a : Boolean, b : Int) : Unit {}
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(a : Boolean)] PREV:[] <START>
v(a : Boolean) NEXT:[w(a)] PREV:[<START>] v(a : Boolean)
w(a) NEXT:[v(b : Int)] PREV:[v(a : Boolean)] w(a)
v(b : Int) NEXT:[w(b)] PREV:[w(a)] v(b : Int)
w(b) NEXT:[read (Unit)] PREV:[v(b : Int)] w(b)
read (Unit) NEXT:[<END>] PREV:[w(b)] read (Unit)
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== genfun == == genfun ==
fun genfun<T>() : Unit {} fun genfun<T>() : Unit {}
--------------------- ---------------------
L0: L0:
<START> NEXT:[read (Unit)] PREV:[] <START>
read (Unit) NEXT:[<END>] PREV:[<START>] read (Unit)
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== flfun == == flfun ==
fun flfun(f : () -> Any) : Unit {} fun flfun(f : () -> Any) : Unit {}
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(f : () -> Any)] PREV:[] <START>
v(f : () -> Any) NEXT:[w(f)] PREV:[<START>] v(f : () -> Any)
w(f) NEXT:[read (Unit)] PREV:[v(f : () -> Any)] w(f)
read (Unit) NEXT:[<END>] PREV:[w(f)] read (Unit)
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,40 +4,40 @@ class Delegate {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[<END>] PREV:[] <START>
L1: L1:
<END> NEXT:[<SINK>] PREV:[<START>] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== a == == a ==
val a = Delegate() val a = Delegate()
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val a = Delegate())] PREV:[] <START>
v(val a = Delegate()) NEXT:[call(Delegate, <init>)] PREV:[<START>] v(val a = Delegate())
call(Delegate, <init>) NEXT:[w(a)] PREV:[v(val a = Delegate())] call(Delegate, <init>)
w(a) NEXT:[<END>] PREV:[call(Delegate, <init>)] w(a)
L1: L1:
<END> NEXT:[<SINK>] PREV:[w(a)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== b == == b ==
val b by a val b by a
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val b by a)] PREV:[] <START>
v(val b by a) NEXT:[r(a)] PREV:[<START>] v(val b by a)
r(a) NEXT:[<END>] PREV:[v(val b by a)] r(a)
L1: L1:
<END> NEXT:[<SINK>] PREV:[r(a)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -2,12 +2,12 @@
fun empty() {} fun empty() {}
--------------------- ---------------------
L0: L0:
<START> NEXT:[read (Unit)] PREV:[] <START>
read (Unit) NEXT:[<END>] PREV:[<START>] read (Unit)
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,13 +4,13 @@ fun fail() : Nothing {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[call(RuntimeException, <init>)] PREV:[] <START>
call(RuntimeException, <init>) NEXT:[throw (throw java.lang.RuntimeException())] PREV:[<START>] call(RuntimeException, <init>)
throw (throw java.lang.RuntimeException()) NEXT:[<ERROR>] PREV:[call(RuntimeException, <init>)] throw (throw java.lang.RuntimeException()) NEXT:[<ERROR>]
L1: L1:
<END> NEXT:[<SINK>] PREV:[] <END> NEXT:[<SINK>] PREV:[]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[throw (throw java.lang.RuntimeException())] <ERROR> PREV:[throw (throw java.lang.RuntimeException())]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
File diff suppressed because it is too large Load Diff
+110 -110
View File
@@ -2,53 +2,53 @@
fun doSmth() {} fun doSmth() {}
--------------------- ---------------------
L0: L0:
<START> NEXT:[read (Unit)] PREV:[] <START>
read (Unit) NEXT:[<END>] PREV:[<START>] read (Unit)
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== doSmth1 == == doSmth1 ==
fun doSmth1() {} fun doSmth1() {}
--------------------- ---------------------
L0: L0:
<START> NEXT:[read (Unit)] PREV:[] <START>
read (Unit) NEXT:[<END>] PREV:[<START>] read (Unit)
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== doSmth2 == == doSmth2 ==
fun doSmth2() {} fun doSmth2() {}
--------------------- ---------------------
L0: L0:
<START> NEXT:[read (Unit)] PREV:[] <START>
read (Unit) NEXT:[<END>] PREV:[<START>] read (Unit)
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== cond == == cond ==
fun cond() {} fun cond() {}
--------------------- ---------------------
L0: L0:
<START> NEXT:[read (Unit)] PREV:[] <START>
read (Unit) NEXT:[<END>] PREV:[<START>] read (Unit)
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== testCopy1 == == testCopy1 ==
fun testCopy1() : Int { fun testCopy1() : Int {
@@ -67,39 +67,39 @@ fun testCopy1() : Int {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[jmp?(L2 [onException])] PREV:[] <START>
jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[<START>] jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(1), call(doSmth, doSmth)] PREV:[jmp?(L2 [onException])] jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(1), call(doSmth, doSmth)]
call(doSmth, doSmth) NEXT:[jmp(L4 [afterCatches])] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] call(doSmth, doSmth)
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[call(doSmth, doSmth)] jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
L2 [onException]: L2 [onException]:
jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])] jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])]
v(e: NullPointerException) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])] v(e: NullPointerException)
w(e) NEXT:[call(doSmth1, doSmth1)] PREV:[v(e: NullPointerException)] w(e)
call(doSmth1, doSmth1) NEXT:[jmp(L4 [afterCatches])] PREV:[w(e)] call(doSmth1, doSmth1)
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[call(doSmth1, doSmth1)] jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
L5 [catch 0]: L5 [catch 0]:
v(e: Exception) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])] v(e: Exception) PREV:[jmp?(L5 [catch 0])]
w(e) NEXT:[call(doSmth2, doSmth2)] PREV:[v(e: Exception)] w(e)
call(doSmth2, doSmth2) NEXT:[jmp(L4 [afterCatches])] PREV:[w(e)] call(doSmth2, doSmth2)
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[call(doSmth2, doSmth2)] jmp(L4 [afterCatches])
L4 [afterCatches]: L4 [afterCatches]:
jmp(L6 [skipFinallyToErrorBlock]) NEXT:[r(1)] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])] jmp(L6 [skipFinallyToErrorBlock]) NEXT:[r(1)] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])]
L3 [onExceptionToFinallyBlock]: L3 [onExceptionToFinallyBlock]:
L7 [start finally]: L7 [start finally]:
r(1) NEXT:[ret(*) L1] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] r(1) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
ret(*) L1 NEXT:[<END>] PREV:[r(1)] ret(*) L1 NEXT:[<END>]
L8 [finish finally]: L8 [finish finally]:
- jmp(error) NEXT:[<ERROR>] PREV:[] - jmp(error) NEXT:[<ERROR>] PREV:[]
L6 [skipFinallyToErrorBlock]: L6 [skipFinallyToErrorBlock]:
r(1) NEXT:[ret(*) L1] PREV:[jmp(L6 [skipFinallyToErrorBlock])] r(1) PREV:[jmp(L6 [skipFinallyToErrorBlock])]
ret(*) L1 NEXT:[<END>] PREV:[r(1)] ret(*) L1
L1: L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1] <END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== testCopy2 == == testCopy2 ==
fun testCopy2() { fun testCopy2() {
@@ -121,34 +121,34 @@ fun testCopy2() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[call(cond, cond)] PREV:[] <START>
L2 [loop entry point]: L2 [loop entry point]:
L5 [condition entry point]: L5 [condition entry point]:
call(cond, cond) NEXT:[jf(L3 [loop exit point])] PREV:[<START>, jmp(L2 [loop entry point]), jmp(L2 [loop entry point])] call(cond, cond) PREV:[<START>, jmp(L2 [loop entry point]), jmp(L2 [loop entry point])]
jf(L3 [loop exit point]) NEXT:[read (Unit), jmp?(L6 [onException])] PREV:[call(cond, cond)] jf(L3 [loop exit point]) NEXT:[read (Unit), jmp?(L6 [onException])]
L4 [body entry point]: L4 [body entry point]:
jmp?(L6 [onException]) NEXT:[jmp?(L9 [catch 0]), jmp?(L7 [onExceptionToFinallyBlock])] PREV:[jf(L3 [loop exit point])] jmp?(L6 [onException]) NEXT:[jmp?(L9 [catch 0]), jmp?(L7 [onExceptionToFinallyBlock])]
jmp?(L7 [onExceptionToFinallyBlock]) NEXT:[call(cond, cond), call(doSmth, doSmth)] PREV:[jmp?(L6 [onException])] jmp?(L7 [onExceptionToFinallyBlock]) NEXT:[call(cond, cond), call(doSmth, doSmth)]
call(doSmth, doSmth) NEXT:[jmp(L8 [afterCatches])] PREV:[jmp?(L7 [onExceptionToFinallyBlock])] call(doSmth, doSmth)
jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[call(doSmth, doSmth)] jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])]
L6 [onException]: L6 [onException]:
jmp?(L9 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L6 [onException])] jmp?(L9 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L6 [onException])]
v(e: NullPointerException) NEXT:[w(e)] PREV:[jmp?(L9 [catch 0])] v(e: NullPointerException)
w(e) NEXT:[call(doSmth1, doSmth1)] PREV:[v(e: NullPointerException)] w(e)
call(doSmth1, doSmth1) NEXT:[jmp(L8 [afterCatches])] PREV:[w(e)] call(doSmth1, doSmth1)
jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[call(doSmth1, doSmth1)] jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])]
L9 [catch 0]: L9 [catch 0]:
v(e: Exception) NEXT:[w(e)] PREV:[jmp?(L9 [catch 0])] v(e: Exception) PREV:[jmp?(L9 [catch 0])]
w(e) NEXT:[call(doSmth2, doSmth2)] PREV:[v(e: Exception)] w(e)
call(doSmth2, doSmth2) NEXT:[jmp(L8 [afterCatches])] PREV:[w(e)] call(doSmth2, doSmth2)
jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[call(doSmth2, doSmth2)] jmp(L8 [afterCatches])
L8 [afterCatches]: L8 [afterCatches]:
jmp(L10 [skipFinallyToErrorBlock]) NEXT:[call(cond, cond)] PREV:[jmp(L8 [afterCatches]), jmp(L8 [afterCatches]), jmp(L8 [afterCatches])] jmp(L10 [skipFinallyToErrorBlock]) NEXT:[call(cond, cond)] PREV:[jmp(L8 [afterCatches]), jmp(L8 [afterCatches]), jmp(L8 [afterCatches])]
L7 [onExceptionToFinallyBlock]: L7 [onExceptionToFinallyBlock]:
L11 [start finally]: L11 [start finally]:
call(cond, cond) NEXT:[jf(L12)] PREV:[jmp?(L7 [onExceptionToFinallyBlock])] call(cond, cond) PREV:[jmp?(L7 [onExceptionToFinallyBlock])]
jf(L12) NEXT:[jmp(L2 [loop entry point]), ret L1] PREV:[call(cond, cond)] jf(L12) NEXT:[jmp(L2 [loop entry point]), ret L1]
ret L1 NEXT:[<END>] PREV:[jf(L12)] ret L1 NEXT:[<END>]
- jmp(L13) NEXT:[jmp(error)] PREV:[] - jmp(L13) NEXT:[jmp(error)] PREV:[]
L12: L12:
jmp(L2 [loop entry point]) NEXT:[call(cond, cond)] PREV:[jf(L12)] jmp(L2 [loop entry point]) NEXT:[call(cond, cond)] PREV:[jf(L12)]
@@ -156,20 +156,20 @@ L13:
L14 [finish finally]: L14 [finish finally]:
- jmp(error) NEXT:[<ERROR>] PREV:[] - jmp(error) NEXT:[<ERROR>] PREV:[]
L10 [skipFinallyToErrorBlock]: L10 [skipFinallyToErrorBlock]:
call(cond, cond) NEXT:[jf(copy L12)] PREV:[jmp(L10 [skipFinallyToErrorBlock])] call(cond, cond) PREV:[jmp(L10 [skipFinallyToErrorBlock])]
jf(copy L12) NEXT:[jmp(L2 [loop entry point]), ret L1] PREV:[call(cond, cond)] jf(copy L12) NEXT:[jmp(L2 [loop entry point]), ret L1]
ret L1 NEXT:[<END>] PREV:[jf(copy L12)] ret L1 NEXT:[<END>]
- jmp(copy L13) NEXT:[jmp(L2 [loop entry point])] PREV:[] - jmp(copy L13) NEXT:[jmp(L2 [loop entry point])] PREV:[]
jmp(L2 [loop entry point]) NEXT:[call(cond, cond)] PREV:[jf(copy L12)] jmp(L2 [loop entry point]) NEXT:[call(cond, cond)] PREV:[jf(copy L12)]
- jmp(L2 [loop entry point]) NEXT:[call(cond, cond)] PREV:[] - jmp(L2 [loop entry point]) NEXT:[call(cond, cond)] PREV:[]
L3 [loop exit point]: L3 [loop exit point]:
read (Unit) NEXT:[<END>] PREV:[jf(L3 [loop exit point])] read (Unit) PREV:[jf(L3 [loop exit point])]
L1: L1:
<END> NEXT:[<SINK>] PREV:[ret L1, ret L1, read (Unit)] <END> NEXT:[<SINK>] PREV:[ret L1, ret L1, read (Unit)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== testCopy3 == == testCopy3 ==
fun testCopy3() { fun testCopy3() {
@@ -188,47 +188,47 @@ fun testCopy3() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[jmp?(L2 [onException])] PREV:[] <START>
jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[<START>] jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[call(cond, cond), call(doSmth, doSmth)] PREV:[jmp?(L2 [onException])] jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[call(cond, cond), call(doSmth, doSmth)]
call(doSmth, doSmth) NEXT:[jmp(L4 [afterCatches])] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] call(doSmth, doSmth)
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[call(doSmth, doSmth)] jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
L2 [onException]: L2 [onException]:
jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])] jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])]
v(e: NullPointerException) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])] v(e: NullPointerException)
w(e) NEXT:[call(doSmth1, doSmth1)] PREV:[v(e: NullPointerException)] w(e)
call(doSmth1, doSmth1) NEXT:[jmp(L4 [afterCatches])] PREV:[w(e)] call(doSmth1, doSmth1)
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[call(doSmth1, doSmth1)] jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
L5 [catch 0]: L5 [catch 0]:
v(e: Exception) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])] v(e: Exception) PREV:[jmp?(L5 [catch 0])]
w(e) NEXT:[call(doSmth2, doSmth2)] PREV:[v(e: Exception)] w(e)
call(doSmth2, doSmth2) NEXT:[jmp(L4 [afterCatches])] PREV:[w(e)] call(doSmth2, doSmth2)
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[call(doSmth2, doSmth2)] jmp(L4 [afterCatches])
L4 [afterCatches]: L4 [afterCatches]:
jmp(L6 [skipFinallyToErrorBlock]) NEXT:[call(cond, cond)] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])] jmp(L6 [skipFinallyToErrorBlock]) NEXT:[call(cond, cond)] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])]
L3 [onExceptionToFinallyBlock]: L3 [onExceptionToFinallyBlock]:
L7 [start finally]: L7 [start finally]:
L8 [loop entry point]: L8 [loop entry point]:
L11 [condition entry point]: L11 [condition entry point]:
call(cond, cond) NEXT:[jf(L9 [loop exit point])] PREV:[jmp?(L3 [onExceptionToFinallyBlock]), jmp(L8 [loop entry point])] call(cond, cond) PREV:[jmp?(L3 [onExceptionToFinallyBlock]), jmp(L8 [loop entry point])]
jf(L9 [loop exit point]) NEXT:[read (Unit), jmp(L8 [loop entry point])] PREV:[call(cond, cond)] jf(L9 [loop exit point]) NEXT:[read (Unit), jmp(L8 [loop entry point])]
L10 [body entry point]: L10 [body entry point]:
jmp(L8 [loop entry point]) NEXT:[call(cond, cond)] PREV:[jf(L9 [loop exit point])] jmp(L8 [loop entry point]) NEXT:[call(cond, cond)]
L9 [loop exit point]: L9 [loop exit point]:
read (Unit) NEXT:[jmp(error)] PREV:[jf(L9 [loop exit point])] read (Unit) PREV:[jf(L9 [loop exit point])]
L12 [finish finally]: L12 [finish finally]:
jmp(error) NEXT:[<ERROR>] PREV:[read (Unit)] jmp(error) NEXT:[<ERROR>]
L6 [skipFinallyToErrorBlock]: L6 [skipFinallyToErrorBlock]:
call(cond, cond) NEXT:[jf(copy L9 [loop exit point])] PREV:[jmp(L6 [skipFinallyToErrorBlock]), jmp(copy L8 [loop entry point])] call(cond, cond) PREV:[jmp(L6 [skipFinallyToErrorBlock]), jmp(copy L8 [loop entry point])]
jf(copy L9 [loop exit point]) NEXT:[read (Unit), jmp(copy L8 [loop entry point])] PREV:[call(cond, cond)] jf(copy L9 [loop exit point]) NEXT:[read (Unit), jmp(copy L8 [loop entry point])]
jmp(copy L8 [loop entry point]) NEXT:[call(cond, cond)] PREV:[jf(copy L9 [loop exit point])] jmp(copy L8 [loop entry point]) NEXT:[call(cond, cond)]
read (Unit) NEXT:[<END>] PREV:[jf(copy L9 [loop exit point])] read (Unit) PREV:[jf(copy L9 [loop exit point])]
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[jmp(error)] <ERROR> PREV:[jmp(error)]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== doTestCopy4 == == doTestCopy4 ==
fun doTestCopy4(list: List<String>?) : Int { fun doTestCopy4(list: List<String>?) : Int {
@@ -242,37 +242,37 @@ fun doTestCopy4(list: List<String>?) : Int {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(list: List<String>?)] PREV:[] <START>
v(list: List<String>?) NEXT:[w(list)] PREV:[<START>] v(list: List<String>?)
w(list) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[v(list: List<String>?)] w(list)
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(list), call(doSmth, doSmth)] PREV:[w(list)] jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(list), call(doSmth, doSmth)]
call(doSmth, doSmth) NEXT:[jmp(L3 [skipFinallyToErrorBlock])] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] call(doSmth, doSmth)
jmp(L3 [skipFinallyToErrorBlock]) NEXT:[r(list)] PREV:[call(doSmth, doSmth)] jmp(L3 [skipFinallyToErrorBlock]) NEXT:[r(list)]
L2 [onExceptionToFinallyBlock]: L2 [onExceptionToFinallyBlock]:
L4 [start finally]: L4 [start finally]:
r(list) NEXT:[r(null)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] r(list) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(null) NEXT:[call(list != null, equals)] PREV:[r(list)] r(null)
call(list != null, equals) NEXT:[jf(L5)] PREV:[r(null)] call(list != null, equals)
jf(L5) NEXT:[read (Unit), read (Unit)] PREV:[call(list != null, equals)] jf(L5) NEXT:[read (Unit), read (Unit)]
read (Unit) NEXT:[jmp(L6)] PREV:[jf(L5)] read (Unit)
jmp(L6) NEXT:[jmp(error)] PREV:[read (Unit)] jmp(L6) NEXT:[jmp(error)]
L5: L5:
read (Unit) NEXT:[jmp(error)] PREV:[jf(L5)] read (Unit) PREV:[jf(L5)]
L6: L6:
L7 [finish finally]: L7 [finish finally]:
jmp(error) NEXT:[<ERROR>] PREV:[jmp(L6), read (Unit)] jmp(error) NEXT:[<ERROR>] PREV:[jmp(L6), read (Unit)]
L3 [skipFinallyToErrorBlock]: L3 [skipFinallyToErrorBlock]:
r(list) NEXT:[r(null)] PREV:[jmp(L3 [skipFinallyToErrorBlock])] r(list) PREV:[jmp(L3 [skipFinallyToErrorBlock])]
r(null) NEXT:[call(list != null, equals)] PREV:[r(list)] r(null)
call(list != null, equals) NEXT:[jf(copy L5)] PREV:[r(null)] call(list != null, equals)
jf(copy L5) NEXT:[read (Unit), read (Unit)] PREV:[call(list != null, equals)] jf(copy L5) NEXT:[read (Unit), read (Unit)]
read (Unit) NEXT:[jmp(copy L6)] PREV:[jf(copy L5)] read (Unit)
jmp(copy L6) NEXT:[<END>] PREV:[read (Unit)] jmp(copy L6) NEXT:[<END>]
read (Unit) NEXT:[<END>] PREV:[jf(copy L5)] read (Unit) PREV:[jf(copy L5)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[jmp(copy L6), read (Unit)] <END> NEXT:[<SINK>] PREV:[jmp(copy L6), read (Unit)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[jmp(error)] <ERROR> PREV:[jmp(error)]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
+21 -21
View File
@@ -6,40 +6,40 @@ fun t1() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(1)] PREV:[] <START>
r(1) NEXT:[r(2)] PREV:[<START>] r(1)
r(2) NEXT:[call(.., rangeTo)] PREV:[r(1)] r(2)
call(.., rangeTo) NEXT:[v(i)] PREV:[r(2)] call(.., rangeTo)
v(i) NEXT:[w(i)] PREV:[call(.., rangeTo)] v(i)
w(i) NEXT:[jmp?(L2)] PREV:[v(i)] w(i)
L3: L3:
jmp?(L2) NEXT:[read (Unit), r(i)] PREV:[w(i)] jmp?(L2) NEXT:[read (Unit), r(i)]
L4 [loop entry point]: L4 [loop entry point]:
L5 [body entry point]: L5 [body entry point]:
r(i) NEXT:[call(doSmth, doSmth)] PREV:[jmp?(L2), jmp?(L4 [loop entry point])] r(i) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
call(doSmth, doSmth) NEXT:[jmp?(L4 [loop entry point])] PREV:[r(i)] call(doSmth, doSmth)
jmp?(L4 [loop entry point]) NEXT:[r(i), read (Unit)] PREV:[call(doSmth, doSmth)] jmp?(L4 [loop entry point]) NEXT:[r(i), read (Unit)]
L2: L2:
read (Unit) NEXT:[<END>] PREV:[jmp?(L2), jmp?(L4 [loop entry point])] read (Unit) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== doSmth == == doSmth ==
fun doSmth(i: Int) {} fun doSmth(i: Int) {}
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(i: Int)] PREV:[] <START>
v(i: Int) NEXT:[w(i)] PREV:[<START>] v(i: Int)
w(i) NEXT:[read (Unit)] PREV:[v(i: Int)] w(i)
read (Unit) NEXT:[<END>] PREV:[w(i)] read (Unit)
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
+50 -50
View File
@@ -17,38 +17,38 @@ fun t1(b: Boolean) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(b: Boolean)] PREV:[] <START>
v(b: Boolean) NEXT:[w(b)] PREV:[<START>] v(b: Boolean)
w(b) NEXT:[v(var u: String)] PREV:[v(b: Boolean)] w(b)
v(var u: String) NEXT:[r(b)] PREV:[w(b)] v(var u: String)
r(b) NEXT:[jf(L2)] PREV:[v(var u: String)] r(b)
jf(L2) NEXT:[read (Unit), r("s")] PREV:[r(b)] jf(L2) NEXT:[read (Unit), r("s")]
r("s") NEXT:[w(u)] PREV:[jf(L2)] r("s")
w(u) NEXT:[jmp(L3)] PREV:[r("s")] w(u)
jmp(L3) NEXT:[r(u)] PREV:[w(u)] jmp(L3) NEXT:[r(u)]
L2: L2:
read (Unit) NEXT:[r(u)] PREV:[jf(L2)] read (Unit) PREV:[jf(L2)]
L3: L3:
r(u) NEXT:[call(doSmth, doSmth)] PREV:[jmp(L3), read (Unit)] r(u) PREV:[jmp(L3), read (Unit)]
call(doSmth, doSmth) NEXT:[v(var r: String)] PREV:[r(u)] call(doSmth, doSmth)
v(var r: String) NEXT:[r(b)] PREV:[call(doSmth, doSmth)] v(var r: String)
r(b) NEXT:[jf(L4)] PREV:[v(var r: String)] r(b)
jf(L4) NEXT:[r("t"), r("s")] PREV:[r(b)] jf(L4) NEXT:[r("t"), r("s")]
r("s") NEXT:[w(r)] PREV:[jf(L4)] r("s")
w(r) NEXT:[jmp(L5)] PREV:[r("s")] w(r)
jmp(L5) NEXT:[r(r)] PREV:[w(r)] jmp(L5) NEXT:[r(r)]
L4: L4:
r("t") NEXT:[w(r)] PREV:[jf(L4)] r("t") PREV:[jf(L4)]
w(r) NEXT:[r(r)] PREV:[r("t")] w(r)
L5: L5:
r(r) NEXT:[call(doSmth, doSmth)] PREV:[jmp(L5), w(r)] r(r) PREV:[jmp(L5), w(r)]
call(doSmth, doSmth) NEXT:[<END>] PREV:[r(r)] call(doSmth, doSmth)
L1: L1:
<END> NEXT:[<SINK>] PREV:[call(doSmth, doSmth)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== t2 == == t2 ==
fun t2(b: Boolean) { fun t2(b: Boolean) {
@@ -63,47 +63,47 @@ fun t2(b: Boolean) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(b: Boolean)] PREV:[] <START>
v(b: Boolean) NEXT:[w(b)] PREV:[<START>] v(b: Boolean)
w(b) NEXT:[v(val i = 3)] PREV:[v(b: Boolean)] w(b)
v(val i = 3) NEXT:[r(3)] PREV:[w(b)] v(val i = 3)
r(3) NEXT:[w(i)] PREV:[v(val i = 3)] r(3)
w(i) NEXT:[r(b)] PREV:[r(3)] w(i)
r(b) NEXT:[jf(L2)] PREV:[w(i)] r(b)
jf(L2) NEXT:[read (Unit), ret L1] PREV:[r(b)] jf(L2) NEXT:[read (Unit), ret L1]
ret L1 NEXT:[<END>] PREV:[jf(L2)] ret L1 NEXT:[<END>]
- jmp(L3) NEXT:[r(i)] PREV:[] - jmp(L3) NEXT:[r(i)] PREV:[]
L2: L2:
read (Unit) NEXT:[r(i)] PREV:[jf(L2)] read (Unit) PREV:[jf(L2)]
L3: L3:
r(i) NEXT:[call(doSmth, doSmth)] PREV:[read (Unit)] r(i)
call(doSmth, doSmth) NEXT:[r(i)] PREV:[r(i)] call(doSmth, doSmth)
r(i) NEXT:[jf(L4)] PREV:[call(doSmth, doSmth)] r(i)
jf(L4) NEXT:[read (Unit), ret L1] PREV:[r(i)] jf(L4) NEXT:[read (Unit), ret L1]
ret L1 NEXT:[<END>] PREV:[jf(L4)] ret L1 NEXT:[<END>]
- jmp(L5) NEXT:[<END>] PREV:[] - jmp(L5) NEXT:[<END>] PREV:[]
L4: L4:
read (Unit) NEXT:[<END>] PREV:[jf(L4)] read (Unit) PREV:[jf(L4)]
L1: L1:
L5: L5:
<END> NEXT:[<SINK>] PREV:[ret L1, ret L1, read (Unit)] <END> NEXT:[<SINK>] PREV:[ret L1, ret L1, read (Unit)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== doSmth == == doSmth ==
fun doSmth(s: String) {} fun doSmth(s: String) {}
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(s: String)] PREV:[] <START>
v(s: String) NEXT:[w(s)] PREV:[<START>] v(s: String)
w(s) NEXT:[read (Unit)] PREV:[v(s: String)] w(s)
read (Unit) NEXT:[<END>] PREV:[w(s)] read (Unit)
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
+40 -40
View File
@@ -18,61 +18,61 @@ fun lazyBooleans(a : Boolean, b : Boolean) : Unit {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(a : Boolean)] PREV:[] <START>
v(a : Boolean) NEXT:[w(a)] PREV:[<START>] v(a : Boolean)
w(a) NEXT:[v(b : Boolean)] PREV:[v(a : Boolean)] w(a)
v(b : Boolean) NEXT:[w(b)] PREV:[w(a)] v(b : Boolean)
w(b) NEXT:[r(a)] PREV:[v(b : Boolean)] w(b)
r(a) NEXT:[jf(L2)] PREV:[w(b)] r(a)
jf(L2) NEXT:[r(2), r(1)] PREV:[r(a)] jf(L2) NEXT:[r(2), r(1)]
r(1) NEXT:[jmp(L3)] PREV:[jf(L2)] r(1)
jmp(L3) NEXT:[r(3)] PREV:[r(1)] jmp(L3) NEXT:[r(3)]
L2: L2:
r(2) NEXT:[r(3)] PREV:[jf(L2)] r(2) PREV:[jf(L2)]
L3: L3:
r(3) NEXT:[r(a)] PREV:[jmp(L3), r(2)] r(3) PREV:[jmp(L3), r(2)]
r(a) NEXT:[jf(L4)] PREV:[r(3)] r(a)
jf(L4) NEXT:[jf(L5), r(b)] PREV:[r(a)] jf(L4) NEXT:[jf(L5), r(b)]
r(b) NEXT:[jf(L5)] PREV:[jf(L4)] r(b)
L4: L4:
jf(L5) NEXT:[r(6), r(5)] PREV:[jf(L4), r(b)] jf(L5) NEXT:[r(6), r(5)] PREV:[jf(L4), r(b)]
r(5) NEXT:[jmp(L6)] PREV:[jf(L5)] r(5)
jmp(L6) NEXT:[r(7)] PREV:[r(5)] jmp(L6) NEXT:[r(7)]
L5: L5:
r(6) NEXT:[r(7)] PREV:[jf(L5)] r(6) PREV:[jf(L5)]
L6: L6:
r(7) NEXT:[r(a)] PREV:[jmp(L6), r(6)] r(7) PREV:[jmp(L6), r(6)]
r(a) NEXT:[jt(L7)] PREV:[r(7)] r(a)
jt(L7) NEXT:[r(b), jf(L8)] PREV:[r(a)] jt(L7) NEXT:[r(b), jf(L8)]
r(b) NEXT:[jf(L8)] PREV:[jt(L7)] r(b)
L7: L7:
jf(L8) NEXT:[r(9), r(8)] PREV:[jt(L7), r(b)] jf(L8) NEXT:[r(9), r(8)] PREV:[jt(L7), r(b)]
r(8) NEXT:[jmp(L9)] PREV:[jf(L8)] r(8)
jmp(L9) NEXT:[r(10)] PREV:[r(8)] jmp(L9) NEXT:[r(10)]
L8: L8:
r(9) NEXT:[r(10)] PREV:[jf(L8)] r(9) PREV:[jf(L8)]
L9: L9:
r(10) NEXT:[r(a)] PREV:[jmp(L9), r(9)] r(10) PREV:[jmp(L9), r(9)]
r(a) NEXT:[jf(L10)] PREV:[r(10)] r(a)
jf(L10) NEXT:[read (Unit), r(11)] PREV:[r(a)] jf(L10) NEXT:[read (Unit), r(11)]
r(11) NEXT:[jmp(L11)] PREV:[jf(L10)] r(11)
jmp(L11) NEXT:[r(12)] PREV:[r(11)] jmp(L11) NEXT:[r(12)]
L10: L10:
read (Unit) NEXT:[r(12)] PREV:[jf(L10)] read (Unit) PREV:[jf(L10)]
L11: L11:
r(12) NEXT:[r(a)] PREV:[jmp(L11), read (Unit)] r(12) PREV:[jmp(L11), read (Unit)]
r(a) NEXT:[jf(L12)] PREV:[r(12)] r(a)
jf(L12) NEXT:[r(13), read (Unit)] PREV:[r(a)] jf(L12) NEXT:[r(13), read (Unit)]
read (Unit) NEXT:[jmp(L13)] PREV:[jf(L12)] read (Unit)
jmp(L13) NEXT:[r(14)] PREV:[read (Unit)] jmp(L13) NEXT:[r(14)]
L12: L12:
r(13) NEXT:[r(14)] PREV:[jf(L12)] r(13) PREV:[jf(L12)]
L13: L13:
r(14) NEXT:[<END>] PREV:[jmp(L13), r(13)] r(14) PREV:[jmp(L13), r(13)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[r(14)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -18,31 +18,31 @@ class C() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val a: Int = 1)] PREV:[] <START>
v(val a: Int = 1) NEXT:[r(1)] PREV:[<START>] v(val a: Int = 1)
r(1) NEXT:[w(a)] PREV:[v(val a: Int = 1)] r(1)
w(a) NEXT:[<END>] PREV:[r(1)] w(a)
L1: L1:
<END> NEXT:[<SINK>] PREV:[w(a)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== doSmth == == doSmth ==
fun doSmth(i: Int) {} fun doSmth(i: Int) {}
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(i: Int)] PREV:[] <START>
v(i: Int) NEXT:[w(i)] PREV:[<START>] v(i: Int)
w(i) NEXT:[read (Unit)] PREV:[v(i: Int)] w(i)
read (Unit) NEXT:[<END>] PREV:[w(i)] read (Unit)
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== test1 == == test1 ==
fun test1() { fun test1() {
@@ -55,19 +55,19 @@ fun test1() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val a = object { val x : Int { $x = 1 } })] PREV:[] <START>
v(val a = object { val x : Int { $x = 1 } }) NEXT:[v(val x : Int)] PREV:[<START>] v(val a = object { val x : Int { $x = 1 } })
v(val x : Int) NEXT:[r(1)] PREV:[v(val a = object { val x : Int { $x = 1 } })] v(val x : Int)
r(1) NEXT:[w($x)] PREV:[v(val x : Int)] r(1)
w($x) NEXT:[r(object { val x : Int { $x = 1 } })] PREV:[r(1)] w($x)
r(object { val x : Int { $x = 1 } }) NEXT:[w(a)] PREV:[w($x)] r(object { val x : Int { $x = 1 } })
w(a) NEXT:[<END>] PREV:[r(object { val x : Int { $x = 1 } })] w(a)
L1: L1:
<END> NEXT:[<SINK>] PREV:[w(a)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== O == == O ==
object O { object O {
@@ -78,16 +78,16 @@ object O {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val x : Int)] PREV:[] <START>
v(val x : Int) NEXT:[r(1)] PREV:[<START>] v(val x : Int)
r(1) NEXT:[w($x)] PREV:[v(val x : Int)] r(1)
w($x) NEXT:[<END>] PREV:[r(1)] w($x)
L1: L1:
<END> NEXT:[<SINK>] PREV:[w($x)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== test2 == == test2 ==
fun test2() { fun test2() {
@@ -98,22 +98,22 @@ fun test2() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val b = 1)] PREV:[] <START>
v(val b = 1) NEXT:[r(1)] PREV:[<START>] v(val b = 1)
r(1) NEXT:[w(b)] PREV:[v(val b = 1)] r(1)
w(b) NEXT:[v(val a = object { val x = b })] PREV:[r(1)] w(b)
v(val a = object { val x = b }) NEXT:[v(val x = b)] PREV:[w(b)] v(val a = object { val x = b })
v(val x = b) NEXT:[r(b)] PREV:[v(val a = object { val x = b })] v(val x = b)
r(b) NEXT:[w(x)] PREV:[v(val x = b)] r(b)
w(x) NEXT:[r(object { val x = b })] PREV:[r(b)] w(x)
r(object { val x = b }) NEXT:[w(a)] PREV:[w(x)] r(object { val x = b })
w(a) NEXT:[<END>] PREV:[r(object { val x = b })] w(a)
L1: L1:
<END> NEXT:[<SINK>] PREV:[w(a)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== test3 == == test3 ==
fun test3() { fun test3() {
@@ -126,30 +126,30 @@ fun test3() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val a = object { val y : Int fun inner_bar() { y = 10 } })] PREV:[] <START>
v(val a = object { val y : Int fun inner_bar() { y = 10 } }) NEXT:[v(val y : Int)] PREV:[<START>] v(val a = object { val y : Int fun inner_bar() { y = 10 } })
v(val y : Int) NEXT:[jmp?(L2)] PREV:[v(val a = object { val y : Int fun inner_bar() { y = 10 } })] v(val y : Int)
jmp?(L2) NEXT:[r(object { val y : Int fun inner_bar() { y = 10 } }), d(fun inner_bar() { y = 10 })] PREV:[v(val y : Int)] jmp?(L2) NEXT:[r(object { val y : Int fun inner_bar() { y = 10 } }), d(fun inner_bar() { y = 10 })]
d(fun inner_bar() { y = 10 }) NEXT:[<SINK>] PREV:[jmp?(L2)] d(fun inner_bar() { y = 10 }) NEXT:[<SINK>]
L2: L2:
r(object { val y : Int fun inner_bar() { y = 10 } }) NEXT:[w(a)] PREV:[jmp?(L2)] r(object { val y : Int fun inner_bar() { y = 10 } }) PREV:[jmp?(L2)]
w(a) NEXT:[<END>] PREV:[r(object { val y : Int fun inner_bar() { y = 10 } })] w(a)
L1: L1:
<END> NEXT:[<SINK>] PREV:[w(a)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d(fun inner_bar() { y = 10 })] <SINK> PREV:[<ERROR>, <END>, d(fun inner_bar() { y = 10 })]
L3: L3:
<START> NEXT:[r(10)] PREV:[] <START>
r(10) NEXT:[w(y)] PREV:[<START>] r(10)
w(y) NEXT:[<END>] PREV:[r(10)] w(y)
L4: L4:
<END> NEXT:[<SINK>] PREV:[w(y)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== inner_bar == == inner_bar ==
fun inner_bar() { fun inner_bar() {
@@ -157,15 +157,15 @@ fun inner_bar() {
} }
--------------------- ---------------------
L3: L3:
<START> NEXT:[r(10)] PREV:[] <START>
r(10) NEXT:[w(y)] PREV:[<START>] r(10)
w(y) NEXT:[<END>] PREV:[r(10)] w(y)
L4: L4:
<END> NEXT:[<SINK>] PREV:[w(y)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== test4 == == test4 ==
fun test4() { fun test4() {
@@ -182,33 +182,33 @@ fun test4() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } })] PREV:[] <START>
v(val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) NEXT:[v(val x : Int)] PREV:[<START>] v(val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } })
v(val x : Int) NEXT:[v(val y : Int)] PREV:[v(val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } })] v(val x : Int)
v(val y : Int) NEXT:[r(1)] PREV:[v(val x : Int)] v(val y : Int)
r(1) NEXT:[w($x)] PREV:[v(val y : Int)] r(1)
w($x) NEXT:[jmp?(L2)] PREV:[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 })] PREV:[w($x)] 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>] PREV:[jmp?(L2)] d(fun ggg() { y = 10 }) NEXT:[<SINK>]
L2: L2:
r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) NEXT:[w(a)] PREV:[jmp?(L2)] r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) PREV:[jmp?(L2)]
w(a) NEXT:[<END>] PREV:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } })] w(a)
L1: L1:
<END> NEXT:[<SINK>] PREV:[w(a)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d(fun ggg() { y = 10 })] <SINK> PREV:[<ERROR>, <END>, d(fun ggg() { y = 10 })]
L3: L3:
<START> NEXT:[r(10)] PREV:[] <START>
r(10) NEXT:[w(y)] PREV:[<START>] r(10)
w(y) NEXT:[<END>] PREV:[r(10)] w(y)
L4: L4:
<END> NEXT:[<SINK>] PREV:[w(y)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== ggg == == ggg ==
fun ggg() { fun ggg() {
@@ -216,15 +216,15 @@ fun ggg() {
} }
--------------------- ---------------------
L3: L3:
<START> NEXT:[r(10)] PREV:[] <START>
r(10) NEXT:[w(y)] PREV:[<START>] r(10)
w(y) NEXT:[<END>] PREV:[r(10)] w(y)
L4: L4:
<END> NEXT:[<SINK>] PREV:[w(y)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== test5 == == test5 ==
fun test5() { fun test5() {
@@ -243,47 +243,47 @@ fun test5() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } })] PREV:[] <START>
v(val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) NEXT:[v(var x = 1)] PREV:[<START>] v(val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } })
v(var x = 1) NEXT:[r(1)] PREV:[v(val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } })] v(var x = 1)
r(1) NEXT:[w(x)] PREV:[v(var x = 1)] r(1)
w(x) NEXT:[r(2)] PREV:[r(1)] w(x)
r(2) NEXT:[w($x)] PREV:[w(x)] r(2)
w($x) NEXT:[jmp?(L2)] PREV:[r(2)] w($x)
jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })] PREV:[w($x)] jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })]
d(fun foo() { x = 3 }) NEXT:[<SINK>] PREV:[jmp?(L2)] d(fun foo() { x = 3 }) NEXT:[<SINK>]
L2: 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)] 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)]
d(fun bar() { x = 4 }) NEXT:[<SINK>] PREV:[jmp?(L5)] d(fun bar() { x = 4 }) NEXT:[<SINK>]
L5: L5:
r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) NEXT:[w(a)] PREV:[jmp?(L5)] r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) PREV:[jmp?(L5)]
w(a) NEXT:[<END>] PREV:[r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } })] w(a)
L1: L1:
<END> NEXT:[<SINK>] PREV:[w(a)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d(fun foo() { x = 3 }), d(fun bar() { x = 4 })] <SINK> PREV:[<ERROR>, <END>, d(fun foo() { x = 3 }), d(fun bar() { x = 4 })]
L3: L3:
<START> NEXT:[r(3)] PREV:[] <START>
r(3) NEXT:[w(x)] PREV:[<START>] r(3)
w(x) NEXT:[<END>] PREV:[r(3)] w(x)
L4: L4:
<END> NEXT:[<SINK>] PREV:[w(x)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
L6: L6:
<START> NEXT:[r(4)] PREV:[] <START>
r(4) NEXT:[w(x)] PREV:[<START>] r(4)
w(x) NEXT:[<END>] PREV:[r(4)] w(x)
L7: L7:
<END> NEXT:[<SINK>] PREV:[w(x)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== foo == == foo ==
fun foo() { fun foo() {
@@ -291,15 +291,15 @@ fun foo() {
} }
--------------------- ---------------------
L3: L3:
<START> NEXT:[r(3)] PREV:[] <START>
r(3) NEXT:[w(x)] PREV:[<START>] r(3)
w(x) NEXT:[<END>] PREV:[r(3)] w(x)
L4: L4:
<END> NEXT:[<SINK>] PREV:[w(x)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== bar == == bar ==
fun bar() { fun bar() {
@@ -307,13 +307,13 @@ fun bar() {
} }
--------------------- ---------------------
L6: L6:
<START> NEXT:[r(4)] PREV:[] <START>
r(4) NEXT:[w(x)] PREV:[<START>] r(4)
w(x) NEXT:[<END>] PREV:[r(4)] w(x)
L7: L7:
<END> NEXT:[<SINK>] PREV:[w(x)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
+20 -20
View File
@@ -5,13 +5,13 @@ class C {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[<END>] PREV:[] <START>
L1: L1:
<END> NEXT:[<SINK>] PREV:[<START>] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== test == == test ==
fun test(c: C) { fun test(c: C) {
@@ -20,23 +20,23 @@ fun test(c: C) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(c: C)] PREV:[] <START>
v(c: C) NEXT:[w(c)] PREV:[<START>] v(c: C)
w(c) NEXT:[r(c)] PREV:[v(c: C)] w(c)
r(c) NEXT:[v(a)] PREV:[w(c)] r(c)
v(a) NEXT:[call(a, component1)] PREV:[r(c)] v(a)
call(a, component1) NEXT:[w(a)] PREV:[v(a)] call(a, component1)
w(a) NEXT:[v(b)] PREV:[call(a, component1)] w(a)
v(b) NEXT:[call(b, component2)] PREV:[w(a)] v(b)
call(b, component2) NEXT:[w(b)] PREV:[v(b)] call(b, component2)
w(b) NEXT:[v(val d = 1)] PREV:[call(b, component2)] w(b)
v(val d = 1) NEXT:[r(1)] PREV:[w(b)] v(val d = 1)
r(1) NEXT:[w(d)] PREV:[v(val d = 1)] r(1)
w(d) NEXT:[<END>] PREV:[r(1)] w(d)
L1: L1:
<END> NEXT:[<SINK>] PREV:[w(d)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,13 +4,13 @@ trait A {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[<END>] PREV:[] <START>
L1: L1:
<END> NEXT:[<SINK>] PREV:[<START>] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== B == == B ==
class B : A { class B : A {
@@ -18,14 +18,14 @@ class B : A {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[unsupported(DELEGATOR_SUPER_CLASS : A)] PREV:[] <START>
unsupported(DELEGATOR_SUPER_CLASS : A) NEXT:[<END>] PREV:[<START>] unsupported(DELEGATOR_SUPER_CLASS : A)
L1: L1:
<END> NEXT:[<SINK>] PREV:[unsupported(DELEGATOR_SUPER_CLASS : A)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== foo == == foo ==
fun foo(b: B) : Int { fun foo(b: B) : Int {
@@ -34,20 +34,20 @@ fun foo(b: B) : Int {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(b: B)] PREV:[] <START>
v(b: B) NEXT:[w(b)] PREV:[<START>] v(b: B)
w(b) NEXT:[v(val o = object : A by b {})] PREV:[v(b: B)] w(b)
v(val o = object : A by b {}) NEXT:[r(b)] PREV:[w(b)] v(val o = object : A by b {})
r(b) NEXT:[r(object : A by b {})] PREV:[v(val o = object : A by b {})] r(b)
r(object : A by b {}) NEXT:[w(o)] PREV:[r(b)] r(object : A by b {})
w(o) NEXT:[r(o)] PREV:[r(object : A by b {})] w(o)
r(o) NEXT:[call(foo, foo)] PREV:[w(o)] r(o)
call(foo, foo) NEXT:[ret(*) L1] PREV:[r(o)] call(foo, foo)
ret(*) L1 NEXT:[<END>] PREV:[call(foo, foo)] ret(*) L1
L1: L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -6,24 +6,24 @@ fun main() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(1)] PREV:[] <START>
L2 [loop entry point]: L2 [loop entry point]:
L5 [condition entry point]: L5 [condition entry point]:
r(1) NEXT:[r(0)] PREV:[<START>, jmp(L2 [loop entry point])] r(1) PREV:[<START>, jmp(L2 [loop entry point])]
r(0) NEXT:[call(>, compareTo)] PREV:[r(1)] r(0)
call(>, compareTo) NEXT:[jf(L3 [loop exit point])] PREV:[r(0)] call(>, compareTo)
jf(L3 [loop exit point]) NEXT:[read (Unit), r(2)] PREV:[call(>, compareTo)] jf(L3 [loop exit point]) NEXT:[read (Unit), r(2)]
L4 [body entry point]: L4 [body entry point]:
r(2) NEXT:[jmp(L2 [loop entry point])] PREV:[jf(L3 [loop exit point])] r(2)
jmp(L2 [loop entry point]) NEXT:[r(1)] PREV:[r(2)] jmp(L2 [loop entry point]) NEXT:[r(1)]
L3 [loop exit point]: L3 [loop exit point]:
read (Unit) NEXT:[<END>] PREV:[jf(L3 [loop exit point])] read (Unit) PREV:[jf(L3 [loop exit point])]
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== dowhile == == dowhile ==
fun dowhile() { fun dowhile() {
@@ -32,21 +32,21 @@ fun dowhile() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[ret L1] PREV:[] <START>
L2 [loop entry point]: L2 [loop entry point]:
L4 [body entry point]: L4 [body entry point]:
ret L1 NEXT:[<END>] PREV:[<START>] ret L1 NEXT:[<END>]
L5 [condition entry point]: L5 [condition entry point]:
- r(1) NEXT:[r(0)] PREV:[] - r(1) PREV:[]
- r(0) NEXT:[call(>, compareTo)] PREV:[] - r(0) PREV:[]
- call(>, compareTo) NEXT:[jt(L2 [loop entry point])] PREV:[] - call(>, compareTo) PREV:[]
- jt(L2 [loop entry point]) NEXT:[read (Unit), ret L1] PREV:[] - jt(L2 [loop entry point]) NEXT:[read (Unit), ret L1] PREV:[]
L3 [loop exit point]: L3 [loop exit point]:
- read (Unit) NEXT:[<END>] PREV:[] - read (Unit) PREV:[]
L1: L1:
<END> NEXT:[<SINK>] PREV:[ret L1] <END> NEXT:[<SINK>] PREV:[ret L1]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,17 +4,17 @@ fun blockAndAndMismatch() : Boolean {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(false)] PREV:[] <START>
r(false) NEXT:[jt(L2)] PREV:[<START>] r(false)
jt(L2) NEXT:[r(false), r(false || (return false))] PREV:[r(false)] jt(L2) NEXT:[r(false), r(false || (return false))]
r(false) NEXT:[ret(*) L1] PREV:[jt(L2)] r(false)
ret(*) L1 NEXT:[<END>] PREV:[r(false)] ret(*) L1 NEXT:[<END>]
L2: L2:
r(false || (return false)) NEXT:[<END>] PREV:[jt(L2)] r(false || (return false)) PREV:[jt(L2)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, r(false || (return false))] <END> NEXT:[<SINK>] PREV:[ret(*) L1, r(false || (return false))]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -2,12 +2,12 @@
fun short() = 1 fun short() = 1
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(1)] PREV:[] <START>
r(1) NEXT:[<END>] PREV:[<START>] r(1)
L1: L1:
<END> NEXT:[<SINK>] PREV:[r(1)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,13 +4,13 @@ abstract class Ab {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[<END>] PREV:[] <START>
L1: L1:
<END> NEXT:[<SINK>] PREV:[<START>] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== test == == test ==
fun test(ab: Ab) { fun test(ab: Ab) {
@@ -18,17 +18,17 @@ fun test(ab: Ab) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(ab: Ab)] PREV:[] <START>
v(ab: Ab) NEXT:[w(ab)] PREV:[<START>] v(ab: Ab)
w(ab) NEXT:[r(ab)] PREV:[v(ab: Ab)] w(ab)
r(ab) NEXT:[call(getArray, getArray)] PREV:[w(ab)] r(ab)
call(getArray, getArray) NEXT:[r(1)] PREV:[r(ab)] call(getArray, getArray)
r(1) NEXT:[call(ab.getArray()[1], get)] PREV:[call(getArray, getArray)] r(1)
call(ab.getArray()[1], get) NEXT:[<END>] PREV:[r(1)] call(ab.getArray()[1], get)
L1: L1:
<END> NEXT:[<SINK>] PREV:[call(ab.getArray()[1], get)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
+10 -10
View File
@@ -4,17 +4,17 @@ fun foo(a: Array<Int>) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(a: Array<Int>)] PREV:[] <START>
v(a: Array<Int>) NEXT:[w(a)] PREV:[<START>] v(a: Array<Int>)
w(a) NEXT:[r(a)] PREV:[v(a: Array<Int>)] w(a)
r(a) NEXT:[r(1)] PREV:[w(a)] r(a)
r(1) NEXT:[r(2)] PREV:[r(a)] r(1)
r(2) NEXT:[call(a[1], set)] PREV:[r(1)] r(2)
call(a[1], set) NEXT:[<END>] PREV:[r(2)] call(a[1], set)
L1: L1:
<END> NEXT:[<SINK>] PREV:[call(a[1], set)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,22 +4,22 @@ fun foo(a: Array<Int>) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(a: Array<Int>)] PREV:[] <START>
v(a: Array<Int>) NEXT:[w(a)] PREV:[<START>] v(a: Array<Int>)
w(a) NEXT:[r(a)] PREV:[v(a: Array<Int>)] w(a)
r(a) NEXT:[r(0)] PREV:[w(a)] r(a)
r(0) NEXT:[call(a[0], get)] PREV:[r(a)] r(0)
call(a[0], get) NEXT:[r(1)] PREV:[r(0)] call(a[0], get)
r(1) NEXT:[call(+=, plus)] PREV:[call(a[0], get)] r(1)
call(+=, plus) NEXT:[r(a)] PREV:[r(1)] call(+=, plus)
r(a) NEXT:[r(0)] PREV:[call(+=, plus)] r(a)
r(0) NEXT:[r(1)] PREV:[r(a)] r(0)
r(1) NEXT:[call(a[0], set)] PREV:[r(0)] r(1)
call(a[0], set) NEXT:[<END>] PREV:[r(1)] call(a[0], set)
L1: L1:
<END> NEXT:[<SINK>] PREV:[call(a[0], set)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,15 +4,15 @@ fun Int.bar(c: C) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(c: C)] PREV:[] <START>
v(c: C) NEXT:[w(c)] PREV:[<START>] v(c: C)
w(c) NEXT:[r(c)] PREV:[v(c: C)] w(c)
r(c) NEXT:[unsupported(BINARY_EXPRESSION : this = c)] PREV:[w(c)] r(c)
unsupported(BINARY_EXPRESSION : this = c) NEXT:[<END>] PREV:[r(c)] unsupported(BINARY_EXPRESSION : this = c)
L1: L1:
<END> NEXT:[<SINK>] PREV:[unsupported(BINARY_EXPRESSION : this = c)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -9,38 +9,38 @@ class C {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val a: Int get() = 1)] PREV:[] <START>
v(val a: Int get() = 1) NEXT:[jmp?(L2)] PREV:[<START>] v(val a: Int get() = 1)
jmp?(L2) NEXT:[r($a), d(get() = 1)] PREV:[v(val a: Int get() = 1)] jmp?(L2) NEXT:[r($a), d(get() = 1)]
d(get() = 1) NEXT:[<SINK>] PREV:[jmp?(L2)] d(get() = 1) NEXT:[<SINK>]
L2: L2:
r($a) NEXT:[<END>] PREV:[jmp?(L2)] r($a) PREV:[jmp?(L2)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[r($a)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d(get() = 1)] <SINK> PREV:[<ERROR>, <END>, d(get() = 1)]
L3: L3:
<START> NEXT:[r(1)] PREV:[] <START>
r(1) NEXT:[<END>] PREV:[<START>] r(1)
L4: L4:
<END> NEXT:[<SINK>] PREV:[r(1)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== get_a == == get_a ==
get() = 1 get() = 1
--------------------- ---------------------
L3: L3:
<START> NEXT:[r(1)] PREV:[] <START>
r(1) NEXT:[<END>] PREV:[<START>] r(1)
L4: L4:
<END> NEXT:[<SINK>] PREV:[r(1)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -5,14 +5,14 @@ fun test() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[call(Exception, <init>)] PREV:[] <START>
call(Exception, <init>) NEXT:[throw (throw Exception())] PREV:[<START>] call(Exception, <init>)
throw (throw Exception()) NEXT:[<ERROR>] PREV:[call(Exception, <init>)] throw (throw Exception()) NEXT:[<ERROR>]
- call(test, test) NEXT:[<END>] PREV:[] - call(test, test) PREV:[]
L1: L1:
<END> NEXT:[<SINK>] PREV:[] <END> NEXT:[<SINK>] PREV:[]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[throw (throw Exception())] <ERROR> PREV:[throw (throw Exception())]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,15 +4,15 @@ fun foo() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[ret L1] PREV:[] <START>
ret L1 NEXT:[<END>] PREV:[<START>] ret L1 NEXT:[<END>]
- jt(L2) NEXT:[r(null), <END>] PREV:[] - jt(L2) NEXT:[r(null), <END>] PREV:[]
- r(null) NEXT:[<END>] PREV:[] - r(null) PREV:[]
L1: L1:
L2: L2:
<END> NEXT:[<SINK>] PREV:[ret L1] <END> NEXT:[<SINK>] PREV:[ret L1]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
+14 -14
View File
@@ -5,24 +5,24 @@ fun foo(a: Int, b: Int) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(a: Int)] PREV:[] <START>
v(a: Int) NEXT:[w(a)] PREV:[<START>] v(a: Int)
w(a) NEXT:[v(b: Int)] PREV:[v(a: Int)] w(a)
v(b: Int) NEXT:[w(b)] PREV:[w(a)] v(b: Int)
w(b) NEXT:[r(a)] PREV:[v(b: Int)] w(b)
r(a) NEXT:[r(b)] PREV:[w(b)] r(a)
r(b) NEXT:[call(a == b, equals)] PREV:[r(a)] r(b)
call(a == b, equals) NEXT:[jf(L2)] PREV:[r(b)] call(a == b, equals)
jf(L2) NEXT:[read (Unit), read (Unit)] PREV:[call(a == b, equals)] jf(L2) NEXT:[read (Unit), read (Unit)]
read (Unit) NEXT:[jmp(L3)] PREV:[jf(L2)] read (Unit)
jmp(L3) NEXT:[<END>] PREV:[read (Unit)] jmp(L3) NEXT:[<END>]
L2: L2:
read (Unit) NEXT:[<END>] PREV:[jf(L2)] read (Unit) PREV:[jf(L2)]
L1: L1:
L3: L3:
<END> NEXT:[<SINK>] PREV:[jmp(L3), read (Unit)] <END> NEXT:[<SINK>] PREV:[jmp(L3), read (Unit)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,15 +4,15 @@ fun invoke(f: () -> Unit) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(f: () -> Unit)] PREV:[] <START>
v(f: () -> Unit) NEXT:[w(f)] PREV:[<START>] v(f: () -> Unit)
w(f) NEXT:[r(f)] PREV:[v(f: () -> Unit)] w(f)
r(f) NEXT:[call((f), <for expression (f)>)] PREV:[w(f)] r(f)
call((f), <for expression (f)>) NEXT:[<END>] PREV:[r(f)] call((f), <for expression (f)>)
L1: L1:
<END> NEXT:[<SINK>] PREV:[call((f), <for expression (f)>)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -5,17 +5,17 @@ fun foo() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(var i = 1)] PREV:[] <START>
v(var i = 1) NEXT:[r(1)] PREV:[<START>] v(var i = 1)
r(1) NEXT:[w(i)] PREV:[v(var i = 1)] r(1)
w(i) NEXT:[r(i)] PREV:[r(1)] w(i)
r(i) NEXT:[call(++, inc)] PREV:[w(i)] r(i)
call(++, inc) NEXT:[w(i)] PREV:[r(i)] call(++, inc)
w(i) NEXT:[<END>] PREV:[call(++, inc)] w(i)
L1: L1:
<END> NEXT:[<SINK>] PREV:[w(i)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
+8 -8
View File
@@ -4,15 +4,15 @@ fun foo(f: () -> Unit) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(f: () -> Unit)] PREV:[] <START>
v(f: () -> Unit) NEXT:[w(f)] PREV:[<START>] v(f: () -> Unit)
w(f) NEXT:[r(f)] PREV:[v(f: () -> Unit)] w(f)
r(f) NEXT:[call(f, invoke)] PREV:[w(f)] r(f)
call(f, invoke) NEXT:[<END>] PREV:[r(f)] call(f, invoke)
L1: L1:
<END> NEXT:[<SINK>] PREV:[call(f, invoke)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -5,19 +5,19 @@ fun foo(x: Int) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(x: Int)] PREV:[] <START>
v(x: Int) NEXT:[w(x)] PREV:[<START>] v(x: Int)
w(x) NEXT:[r(x)] PREV:[v(x: Int)] w(x)
r(x) NEXT:[v(a)] PREV:[w(x)] r(x)
v(a) NEXT:[w(a)] PREV:[r(x)] v(a)
w(a) NEXT:[v(b)] PREV:[v(a)] w(a)
v(b) NEXT:[w(b)] PREV:[w(a)] v(b)
w(b) NEXT:[r(a)] PREV:[v(b)] w(b)
r(a) NEXT:[<END>] PREV:[w(b)] r(a)
L1: L1:
<END> NEXT:[<SINK>] PREV:[r(a)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
+14 -14
View File
@@ -4,24 +4,24 @@ fun neq(a: Int, b: Int) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(a: Int)] PREV:[] <START>
v(a: Int) NEXT:[w(a)] PREV:[<START>] v(a: Int)
w(a) NEXT:[v(b: Int)] PREV:[v(a: Int)] w(a)
v(b: Int) NEXT:[w(b)] PREV:[w(a)] v(b: Int)
w(b) NEXT:[r(a)] PREV:[v(b: Int)] w(b)
r(a) NEXT:[r(b)] PREV:[w(b)] r(a)
r(b) NEXT:[call(a != b, equals)] PREV:[r(a)] r(b)
call(a != b, equals) NEXT:[jf(L2)] PREV:[r(b)] call(a != b, equals)
jf(L2) NEXT:[read (Unit), read (Unit)] PREV:[call(a != b, equals)] jf(L2) NEXT:[read (Unit), read (Unit)]
read (Unit) NEXT:[jmp(L3)] PREV:[jf(L2)] read (Unit)
jmp(L3) NEXT:[<END>] PREV:[read (Unit)] jmp(L3) NEXT:[<END>]
L2: L2:
read (Unit) NEXT:[<END>] PREV:[jf(L2)] read (Unit) PREV:[jf(L2)]
L1: L1:
L3: L3:
<END> NEXT:[<SINK>] PREV:[jmp(L3), read (Unit)] <END> NEXT:[<SINK>] PREV:[jmp(L3), read (Unit)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,15 +4,15 @@ fun test(s: String?) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(s: String?)] PREV:[] <START>
v(s: String?) NEXT:[w(s)] PREV:[<START>] v(s: String?)
w(s) NEXT:[r(s)] PREV:[v(s: String?)] w(s)
r(s) NEXT:[r(length)] PREV:[w(s)] r(s)
r(length) NEXT:[<END>] PREV:[r(s)] r(length)
L1: L1:
<END> NEXT:[<SINK>] PREV:[r(length)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -7,27 +7,27 @@ fun illegalWhenBlock(a: Any): Any {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(a: Any)] PREV:[] <START>
v(a: Any) NEXT:[w(a)] PREV:[<START>] v(a: Any)
w(a) NEXT:[r(a)] PREV:[v(a: Any)] w(a)
r(a) NEXT:[jmp?(L4)] PREV:[w(a)] r(a)
jmp?(L4) NEXT:[jmp?(L6), r(a)] PREV:[r(a)] jmp?(L4) NEXT:[jmp?(L6), r(a)]
L3: L3:
r(a) NEXT:[ret(*) L1] PREV:[jmp?(L4)] r(a)
ret(*) L1 NEXT:[<END>] PREV:[r(a)] ret(*) L1 NEXT:[<END>]
- jmp(L2) NEXT:[<END>] PREV:[] - jmp(L2) NEXT:[<END>] PREV:[]
L4: L4:
jmp?(L6) NEXT:[<END>, r(a)] PREV:[jmp?(L4)] jmp?(L6) NEXT:[<END>, r(a)] PREV:[jmp?(L4)]
L5: L5:
r(a) NEXT:[ret(*) L1] PREV:[jmp?(L6)] r(a)
ret(*) L1 NEXT:[<END>] PREV:[r(a)] ret(*) L1 NEXT:[<END>]
- jmp(L2) NEXT:[<END>] PREV:[] - jmp(L2) PREV:[]
L1: L1:
L2: L2:
L6: L6:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, jmp?(L6), ret(*) L1] <END> NEXT:[<SINK>] PREV:[ret(*) L1, jmp?(L6), ret(*) L1]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,13 +4,13 @@ fun Function0<Unit>.foo() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(this)] PREV:[] <START>
r(this) NEXT:[call(this, <for expression this>)] PREV:[<START>] r(this)
call(this, <for expression this>) NEXT:[<END>] PREV:[r(this)] call(this, <for expression this>)
L1: L1:
<END> NEXT:[<SINK>] PREV:[call(this, <for expression this>)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,12 +4,12 @@ fun <T> foo() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[error(T, No resolved call)] PREV:[] <START>
error(T, No resolved call) NEXT:[<END>] PREV:[<START>] error(T, No resolved call)
L1: L1:
<END> NEXT:[<SINK>] PREV:[error(T, No resolved call)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,16 +4,16 @@ fun test(a: Any) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(a: Any)] PREV:[] <START>
v(a: Any) NEXT:[w(a)] PREV:[<START>] v(a: Any)
w(a) NEXT:[error(foo, No resolved call)] PREV:[v(a: Any)] w(a)
error(foo, No resolved call) NEXT:[error(foo, No resolved call)] PREV:[w(a)] error(foo, No resolved call)
error(foo, No resolved call) NEXT:[r(a)] PREV:[error(foo, No resolved call)] error(foo, No resolved call)
r(a) NEXT:[<END>] PREV:[error(foo, No resolved call)] r(a)
L1: L1:
<END> NEXT:[<SINK>] PREV:[r(a)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,37 +4,37 @@ fun foo() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[jmp?(L2)] PREV:[] <START>
jmp?(L2) NEXT:[r({}), d({})] PREV:[<START>] jmp?(L2) NEXT:[r({}), d({})]
d({}) NEXT:[<SINK>] PREV:[jmp?(L2)] d({}) NEXT:[<SINK>]
L2: L2:
r({}) NEXT:[<END>] PREV:[jmp?(L2)] r({}) PREV:[jmp?(L2)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[r({})] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d({})] <SINK> PREV:[<ERROR>, <END>, d({})]
L3: L3:
<START> NEXT:[read (Unit)] PREV:[] <START>
read (Unit) NEXT:[<END>] PREV:[<START>] read (Unit)
L4: L4:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
== anonymous_0 == == anonymous_0 ==
{} {}
--------------------- ---------------------
L3: L3:
<START> NEXT:[read (Unit)] PREV:[] <START>
read (Unit) NEXT:[<END>] PREV:[<START>] read (Unit)
L4: L4:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> PREV:[<ERROR>, <END>]
===================== =====================
@@ -19,6 +19,7 @@ package org.jetbrains.jet.cfg;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.io.FileUtil;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.ConfigurationKind; import org.jetbrains.jet.ConfigurationKind;
import org.jetbrains.jet.JetTestUtils; import org.jetbrains.jet.JetTestUtils;
import org.jetbrains.jet.analyzer.AnalyzeExhaust; import org.jetbrains.jet.analyzer.AnalyzeExhaust;
@@ -121,11 +122,6 @@ public abstract class AbstractControlFlowTest extends KotlinTestWithEnvironment
} }
File expectedInstructionsFile = JetTestUtils.replaceExtension(file, "instructions"); File expectedInstructionsFile = JetTestUtils.replaceExtension(file, "instructions");
if (!expectedInstructionsFile.exists()) {
FileUtil.writeToFile(expectedInstructionsFile, instructionDump.toString());
fail("No expected instructions for " + FileUtil.getNameWithoutExtension(file) + " generated result is written into " + expectedInstructionsFile);
}
JetTestUtils.assertEqualsToFile(expectedInstructionsFile, instructionDump.toString()); JetTestUtils.assertEqualsToFile(expectedInstructionsFile, instructionDump.toString());
// StringBuilder graphDump = new StringBuilder(); // StringBuilder graphDump = new StringBuilder();
@@ -226,7 +222,7 @@ public abstract class AbstractControlFlowTest extends KotlinTestWithEnvironment
maxNextLength = instructionListText.length(); maxNextLength = instructionListText.length();
} }
} }
for (int i = 0, instructionsSize = instructions.size(); i < instructionsSize; i++) { for (int i = 0; i < instructions.size(); i++) {
Instruction instruction = instructions.get(i); Instruction instruction = instructions.get(i);
if (instruction instanceof LocalFunctionDeclarationInstruction) { if (instruction instanceof LocalFunctionDeclarationInstruction) {
LocalFunctionDeclarationInstruction localFunctionDeclarationInstruction = (LocalFunctionDeclarationInstruction) instruction; LocalFunctionDeclarationInstruction localFunctionDeclarationInstruction = (LocalFunctionDeclarationInstruction) instruction;
@@ -238,15 +234,34 @@ public abstract class AbstractControlFlowTest extends KotlinTestWithEnvironment
} }
} }
out.append(formatInstruction(instruction, maxLength, remainedAfterPostProcessInstructions)). out.append(formatInstruction(instruction, maxLength, remainedAfterPostProcessInstructions));
append(" NEXT:").append(String.format("%1$-" + maxNextLength + "s", formatInstructionList(instruction.getNextInstructions()))).
append(" PREV:").append(formatInstructionList(instruction.getPreviousInstructions())).append("\n"); // Only print NEXT and PREV if the values are non-trivial
Instruction next = i == instructions.size() - 1 ? null : instructions.get(i + 1);
Collection<Instruction> nextInstructions = instruction.getNextInstructions();
if (!sameContents(next, nextInstructions)) {
out.append(" NEXT:").append(String.format("%1$-" + maxNextLength + "s", formatInstructionList(nextInstructions)));
}
Instruction prev = i == 0 ? null : instructions.get(i - 1);
Collection<Instruction> previousInstructions = instruction.getPreviousInstructions();
if (!sameContents(prev, previousInstructions)) {
out.append(" PREV:").append(formatInstructionList(previousInstructions));
}
out.append("\n");
} }
for (PseudocodeImpl local : locals) { for (PseudocodeImpl local : locals) {
dumpInstructions(local, out); dumpInstructions(local, out);
} }
} }
private static boolean sameContents(@Nullable Instruction natural, Collection<Instruction> actual) {
if (natural == null) {
return actual.isEmpty();
}
return Collections.singleton(natural).equals(new HashSet<Instruction>(actual));
}
public void dumpEdges(List<Instruction> instructions, final PrintStream out, final int[] count, final Map<Instruction, String> nodeToName) { public void dumpEdges(List<Instruction> instructions, final PrintStream out, final int[] count, final Map<Instruction, String> nodeToName) {
for (Instruction fromInst : instructions) { for (Instruction fromInst : instructions) {
fromInst.accept(new InstructionVisitor() { fromInst.accept(new InstructionVisitor() {