CFA test data updated

This commit is contained in:
Andrey Breslav
2013-12-03 18:26:27 +04:00
parent ef194ffe23
commit 81003ba298
15 changed files with 554 additions and 809 deletions
+35 -44
View File
@@ -18,56 +18,47 @@ fun f(a : Boolean) : Unit {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(a : Boolean)] PREV:[] <START> NEXT:[v(a : Boolean)] PREV:[]
v(a : Boolean) NEXT:[w(a)] PREV:[<START>] v(a : Boolean) NEXT:[w(a)] PREV:[<START>]
w(a) NEXT:[r(1)] PREV:[v(a : Boolean)] w(a) NEXT:[r(1)] PREV:[v(a : Boolean)]
r(1) NEXT:[r(a)] PREV:[w(a)] r(1) NEXT:[r(a)] PREV:[w(a)]
r(a) NEXT:[r(2)] PREV:[r(1)] r(a) NEXT:[r(2)] PREV:[r(1)]
r(2) NEXT:[r(toLong)] PREV:[r(a)] r(2) NEXT:[call(toLong, toLong)] PREV:[r(a)]
r(toLong) NEXT:[r(toLong())] PREV:[r(2)] call(toLong, toLong) NEXT:[r(a)] PREV:[r(2)]
r(toLong()) NEXT:[r(2.toLong())] PREV:[r(toLong)] r(a) NEXT:[r(3)] PREV:[call(toLong, toLong)]
r(2.toLong()) NEXT:[r(a)] PREV:[r(toLong())] r(3) NEXT:[call(foo, foo)] PREV:[r(a)]
r(a) NEXT:[r(3)] PREV:[r(2.toLong())] call(foo, foo) NEXT:[call(genfun, genfun)] PREV:[r(3)]
r(3) NEXT:[r(foo)] PREV:[r(a)] call(genfun, genfun) NEXT:[jmp?(L2)] PREV:[call(foo, foo)]
r(foo) NEXT:[r(foo(a, 3))] PREV:[r(3)] jmp?(L2) NEXT:[r({1}), d({1})] PREV:[call(genfun, genfun)]
r(foo(a, 3)) NEXT:[r(genfun)] PREV:[r(foo)] d({1}) NEXT:[<SINK>] PREV:[jmp?(L2)]
r(genfun) NEXT:[r(genfun<Any>())] PREV:[r(foo(a, 3))]
r(genfun<Any>()) NEXT:[jmp?(L2)] PREV:[r(genfun)]
jmp?(L2) NEXT:[r({1}), d({1})] PREV:[r(genfun<Any>())]
d({1}) NEXT:[<SINK>] PREV:[jmp?(L2)]
L2: L2:
r({1}) NEXT:[r(flfun)] PREV:[jmp?(L2)] r({1}) NEXT:[call(flfun, flfun)] PREV:[jmp?(L2)]
r(flfun) NEXT:[r(flfun {1})] PREV:[r({1})] call(flfun, flfun) NEXT:[r(3)] PREV:[r({1})]
r(flfun {1}) NEXT:[r(3)] PREV:[r(flfun)] r(3) NEXT:[r(4)] PREV:[call(flfun, flfun)]
r(3) NEXT:[r(4)] PREV:[r(flfun {1})] r(4) NEXT:[call(equals, equals)] PREV:[r(3)]
r(4) NEXT:[r(equals)] PREV:[r(3)] call(equals, equals) NEXT:[r(3)] PREV:[r(4)]
r(equals) NEXT:[r(equals(4))] PREV:[r(4)] r(3) NEXT:[r(4)] PREV:[call(equals, equals)]
r(equals(4)) NEXT:[r(3.equals(4))] PREV:[r(equals)] r(4) NEXT:[call(equals, equals)] PREV:[r(3)]
r(3.equals(4)) NEXT:[r(3)] PREV:[r(equals(4))] call(equals, equals) NEXT:[r(1)] PREV:[r(4)]
r(3) NEXT:[r(4)] PREV:[r(3.equals(4))] r(1) NEXT:[r(2)] PREV:[call(equals, equals)]
r(4) NEXT:[r(equals)] PREV:[r(3)] r(2) NEXT:[call(+, plus)] PREV:[r(1)]
r(equals) NEXT:[r(3 equals 4)] PREV:[r(4)] call(+, plus) NEXT:[r(a)] PREV:[r(2)]
r(3 equals 4) NEXT:[r(1)] PREV:[r(equals)] r(a) NEXT:[jf(L5)] PREV:[call(+, plus)]
r(1) NEXT:[r(2)] PREV:[r(3 equals 4)] jf(L5) NEXT:[r(a && true), r(true)] PREV:[r(a)]
r(2) NEXT:[r(+)] PREV:[r(1)] r(true) NEXT:[r(a && true)] PREV:[jf(L5)]
r(+) NEXT:[r(1 + 2)] PREV:[r(2)]
r(1 + 2) NEXT:[r(a)] PREV:[r(+)]
r(a) NEXT:[jf(L5)] PREV:[r(1 + 2)]
jf(L5) NEXT:[r(a && true), r(true)] PREV:[r(a)]
r(true) NEXT:[r(a && true)] PREV:[jf(L5)]
L5: L5:
r(a && true) NEXT:[r(a)] PREV:[jf(L5), r(true)] r(a && true) NEXT:[r(a)] PREV:[jf(L5), r(true)]
r(a) NEXT:[jt(L6)] PREV:[r(a && true)] r(a) NEXT:[jt(L6)] PREV:[r(a && true)]
jt(L6) NEXT:[r(false), r(a || false)] PREV:[r(a)] jt(L6) NEXT:[r(false), r(a || false)] PREV:[r(a)]
r(false) NEXT:[r(a || false)] PREV:[jt(L6)] r(false) NEXT:[r(a || false)] PREV:[jt(L6)]
L6: L6:
r(a || false) NEXT:[<END>] PREV:[jt(L6), r(false)] r(a || false) NEXT:[<END>] PREV:[jt(L6), r(false)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[r(a || false)] <END> NEXT:[<SINK>] PREV:[r(a || false)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d({1})] <SINK> NEXT:[] PREV:[<ERROR>, <END>, d({1})]
L3: L3:
<START> NEXT:[r(1)] PREV:[] <START> NEXT:[r(1)] PREV:[]
r(1) NEXT:[<END>] PREV:[<START>] r(1) NEXT:[<END>] PREV:[<START>]
+4 -6
View File
@@ -5,12 +5,10 @@ fun test() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(Exception)] PREV:[] <START> NEXT:[call(Exception, <init>)] PREV:[]
r(Exception) NEXT:[r(Exception())] PREV:[<START>] call(Exception, <init>) NEXT:[throw (throw Exception())] PREV:[<START>]
r(Exception()) NEXT:[throw (throw Exception())] PREV:[r(Exception)] throw (throw Exception()) NEXT:[<ERROR>] PREV:[call(Exception, <init>)]
throw (throw Exception()) NEXT:[<ERROR>] PREV:[r(Exception())] - call(test, test) NEXT:[<END>] PREV:[]
- r(test) NEXT:[r(test())] PREV:[]
- r(test()) NEXT:[<END>] PREV:[]
L1: L1:
<END> NEXT:[<SINK>] PREV:[] <END> NEXT:[<SINK>] PREV:[]
error: error:
@@ -1,18 +1,31 @@
== Delegate ==
class Delegate {
fun get(_this: Any, p: PropertyMetadata): Int = 0
}
---------------------
L0:
<START> NEXT:[<END>] PREV:[]
L1:
<END> NEXT:[<SINK>] PREV:[<START>]
error:
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== a == == a ==
val a = Delegate() val a = Delegate()
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(val a = Delegate())] PREV:[] <START> NEXT:[v(val a = Delegate())] PREV:[]
v(val a = Delegate()) NEXT:[r(Delegate)] PREV:[<START>] v(val a = Delegate()) NEXT:[call(Delegate, <init>)] PREV:[<START>]
r(Delegate) NEXT:[r(Delegate())] PREV:[v(val a = Delegate())] call(Delegate, <init>) NEXT:[w(a)] PREV:[v(val a = Delegate())]
r(Delegate()) NEXT:[w(a)] PREV:[r(Delegate)] w(a) NEXT:[<END>] PREV:[call(Delegate, <init>)]
w(a) NEXT:[<END>] PREV:[r(Delegate())]
L1: L1:
<END> NEXT:[<SINK>] PREV:[w(a)] <END> NEXT:[<SINK>] PREV:[w(a)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== b == == b ==
val b by a val b by a
@@ -1,3 +1,7 @@
class Delegate {
fun get(_this: Any, p: PropertyMetadata): Int = 0
}
val a = Delegate() val a = Delegate()
val b by a val b by a
@@ -4,14 +4,9 @@ fun fail() : Nothing {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(java)] PREV:[] <START> NEXT:[call(RuntimeException, <init>)] PREV:[]
r(java) NEXT:[r(lang)] PREV:[<START>] call(RuntimeException, <init>) NEXT:[throw (throw java.lang.RuntimeException())] PREV:[<START>]
r(lang) NEXT:[r(java.lang)] PREV:[r(java)] throw (throw java.lang.RuntimeException()) NEXT:[<ERROR>] PREV:[call(RuntimeException, <init>)]
r(java.lang) NEXT:[r(RuntimeException)] PREV:[r(lang)]
r(RuntimeException) NEXT:[r(RuntimeException())] PREV:[r(java.lang)]
r(RuntimeException()) NEXT:[r(java.lang.RuntimeException())] PREV:[r(RuntimeException)]
r(java.lang.RuntimeException()) NEXT:[throw (throw java.lang.RuntimeException())] PREV:[r(RuntimeException())]
throw (throw java.lang.RuntimeException()) NEXT:[<ERROR>] PREV:[r(java.lang.RuntimeException())]
L1: L1:
<END> NEXT:[<SINK>] PREV:[] <END> NEXT:[<SINK>] PREV:[]
error: error:
+222 -442
View File
@@ -8,13 +8,8 @@ fun t1() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { 1 } finally { 2 }) ] PREV:[] <START> NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[]
r(try { jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[<START>]
1
} finally {
2
}) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[<START>]
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 } finally { 2 }) ]
r(1) NEXT:[jmp(L3 [skipFinallyToErrorBlock])] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] r(1) NEXT:[jmp(L3 [skipFinallyToErrorBlock])] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
jmp(L3 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r(1)] jmp(L3 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r(1)]
L2 [onExceptionToFinallyBlock]: L2 [onExceptionToFinallyBlock]:
@@ -44,22 +39,13 @@ fun t2() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { 1 if (2 > 3) { retur..)] PREV:[] <START> NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[]
r(try { jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[<START>]
1
if (2 > 3) {
return
}
} finally {
2
}) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[<START>]
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { retur..)]
r(1) NEXT:[r(2)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] r(1) NEXT:[r(2)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(2) NEXT:[r(3)] PREV:[r(1)] r(2) NEXT:[r(3)] PREV:[r(1)]
r(3) NEXT:[r(>)] PREV:[r(2)] r(3) NEXT:[call(>, compareTo)] PREV:[r(2)]
r(>) NEXT:[r(2 > 3)] PREV:[r(3)] call(>, compareTo) NEXT:[jf(L3)] PREV:[r(3)]
r(2 > 3) NEXT:[jf(L3)] PREV:[r(>)] jf(L3) NEXT:[read (Unit), r(2)] PREV:[call(>, compareTo)]
jf(L3) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)]
L4 [start finally]: L4 [start finally]:
r(2) NEXT:[ret L1] PREV:[jf(L3)] r(2) NEXT:[ret L1] PREV:[jf(L3)]
L5 [finish finally]: L5 [finish finally]:
@@ -96,30 +82,20 @@ fun t3() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { 1 @{ () => if (2 > 3..)] PREV:[] <START> NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[]
r(try { jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[<START>]
1
@{ () =>
if (2 > 3) {
return@
}
}
} finally {
2
}) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[<START>]
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 @{ () => if (2 > 3..)]
r(1) NEXT:[jmp?(L3)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] r(1) NEXT:[jmp?(L3)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
jmp?(L3) NEXT:[r({ () => if (2 > 3) { retur..), d({ () => if (2 > 3) { retur..)] PREV:[r(1)] jmp?(L3) NEXT:[r({ () => if (2 > 3) { retur..), d({ () => if (2 > 3) { retur..)] PREV:[r(1)]
d({ () => d({ () =>
if (2 > 3) { if (2 > 3) {
return@ return@
} }
}) NEXT:[<SINK>] PREV:[jmp?(L3)] }) NEXT:[<SINK>] PREV:[jmp?(L3)]
L3: L3:
r({ () => r({ () =>
if (2 > 3) { if (2 > 3) {
return@ return@
} }
}) NEXT:[jmp(L8 [skipFinallyToErrorBlock])] PREV:[jmp?(L3)] }) NEXT:[jmp(L8 [skipFinallyToErrorBlock])] PREV:[jmp?(L3)]
jmp(L8 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r({ () => if (2 > 3) { retur..)] jmp(L8 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r({ () => if (2 > 3) { retur..)]
L2 [onExceptionToFinallyBlock]: L2 [onExceptionToFinallyBlock]:
@@ -136,24 +112,22 @@ error:
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d({ () => if (2 > 3) { retur..)] <SINK> NEXT:[] PREV:[<ERROR>, <END>, d({ () => if (2 > 3) { retur..)]
L4: L4:
<START> NEXT:[r(())] PREV:[] <START> NEXT:[r(2)] PREV:[]
r(()) NEXT:[r(2)] PREV:[<START>] r(2) NEXT:[r(3)] PREV:[<START>]
r(2) NEXT:[r(3)] PREV:[r(())] r(3) NEXT:[call(>, compareTo)] PREV:[r(2)]
r(3) NEXT:[r(>)] PREV:[r(2)] call(>, compareTo) NEXT:[jf(L6)] PREV:[r(3)]
r(>) NEXT:[r(2 > 3)] PREV:[r(3)] jf(L6) NEXT:[read (Unit), ret L5] PREV:[call(>, compareTo)]
r(2 > 3) NEXT:[jf(L6)] PREV:[r(>)] ret L5 NEXT:[<END>] PREV:[jf(L6)]
jf(L6) NEXT:[read (Unit), ret L5] PREV:[r(2 > 3)] - jmp(L7) NEXT:[<END>] PREV:[]
ret L5 NEXT:[<END>] PREV:[jf(L6)]
- jmp(L7) NEXT:[<END>] PREV:[]
L6: L6:
read (Unit) NEXT:[<END>] PREV:[jf(L6)] read (Unit) NEXT:[<END>] PREV:[jf(L6)]
L5: L5:
L7: L7:
<END> NEXT:[<SINK>] PREV:[ret L5, read (Unit)] <END> NEXT:[<SINK>] PREV:[ret L5, read (Unit)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== anonymous_0 == == anonymous_0 ==
{ () => { () =>
@@ -163,24 +137,22 @@ sink:
} }
--------------------- ---------------------
L4: L4:
<START> NEXT:[r(())] PREV:[] <START> NEXT:[r(2)] PREV:[]
r(()) NEXT:[r(2)] PREV:[<START>] r(2) NEXT:[r(3)] PREV:[<START>]
r(2) NEXT:[r(3)] PREV:[r(())] r(3) NEXT:[call(>, compareTo)] PREV:[r(2)]
r(3) NEXT:[r(>)] PREV:[r(2)] call(>, compareTo) NEXT:[jf(L6)] PREV:[r(3)]
r(>) NEXT:[r(2 > 3)] PREV:[r(3)] jf(L6) NEXT:[read (Unit), ret L5] PREV:[call(>, compareTo)]
r(2 > 3) NEXT:[jf(L6)] PREV:[r(>)] ret L5 NEXT:[<END>] PREV:[jf(L6)]
jf(L6) NEXT:[read (Unit), ret L5] PREV:[r(2 > 3)] - jmp(L7) NEXT:[<END>] PREV:[]
ret L5 NEXT:[<END>] PREV:[jf(L6)]
- jmp(L7) NEXT:[<END>] PREV:[]
L6: L6:
read (Unit) NEXT:[<END>] PREV:[jf(L6)] read (Unit) NEXT:[<END>] PREV:[jf(L6)]
L5: L5:
L7: L7:
<END> NEXT:[<SINK>] PREV:[ret L5, read (Unit)] <END> NEXT:[<SINK>] PREV:[ret L5, read (Unit)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== t4 == == t4 ==
fun t4() { fun t4() {
@@ -199,26 +171,26 @@ fun t4() {
L0: L0:
<START> NEXT:[jmp?(L2)] PREV:[] <START> NEXT:[jmp?(L2)] PREV:[]
jmp?(L2) NEXT:[r({ () => try { 1 if (2 > 3)..), d({ () => try { 1 if (2 > 3)..)] PREV:[<START>] jmp?(L2) NEXT:[r({ () => try { 1 if (2 > 3)..), d({ () => try { 1 if (2 > 3)..)] PREV:[<START>]
d({ () => d({ () =>
try { try {
1 1
if (2 > 3) { if (2 > 3) {
return@ return@
} }
} finally { } finally {
2 2
} }
}) NEXT:[<SINK>] PREV:[jmp?(L2)] }) NEXT:[<SINK>] PREV:[jmp?(L2)]
L2: L2:
r({ () => r({ () =>
try { try {
1 1
if (2 > 3) { if (2 > 3) {
return@ return@
} }
} finally { } finally {
2 2
} }
}) NEXT:[<END>] PREV:[jmp?(L2)] }) NEXT:[<END>] PREV:[jmp?(L2)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[r({ () => try { 1 if (2 > 3)..)] <END> NEXT:[<SINK>] PREV:[r({ () => try { 1 if (2 > 3)..)]
@@ -227,23 +199,13 @@ error:
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d({ () => try { 1 if (2 > 3)..)] <SINK> NEXT:[] PREV:[<ERROR>, <END>, d({ () => try { 1 if (2 > 3)..)]
L3: L3:
<START> NEXT:[r(())] PREV:[] <START> NEXT:[jmp?(L5 [onExceptionToFinallyBlock])] PREV:[]
r(()) NEXT:[r(try { 1 if (2 > 3) { retur..)] PREV:[<START>] jmp?(L5 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[<START>]
r(try {
1
if (2 > 3) {
return@
}
} finally {
2
}) NEXT:[jmp?(L5 [onExceptionToFinallyBlock])] PREV:[r(())]
jmp?(L5 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { retur..)]
r(1) NEXT:[r(2)] PREV:[jmp?(L5 [onExceptionToFinallyBlock])] r(1) NEXT:[r(2)] PREV:[jmp?(L5 [onExceptionToFinallyBlock])]
r(2) NEXT:[r(3)] PREV:[r(1)] r(2) NEXT:[r(3)] PREV:[r(1)]
r(3) NEXT:[r(>)] PREV:[r(2)] r(3) NEXT:[call(>, compareTo)] PREV:[r(2)]
r(>) NEXT:[r(2 > 3)] PREV:[r(3)] call(>, compareTo) NEXT:[jf(L6)] PREV:[r(3)]
r(2 > 3) NEXT:[jf(L6)] PREV:[r(>)] jf(L6) NEXT:[read (Unit), r(2)] PREV:[call(>, compareTo)]
jf(L6) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)]
L7 [start finally]: L7 [start finally]:
r(2) NEXT:[ret L4] PREV:[jf(L6)] r(2) NEXT:[ret L4] PREV:[jf(L6)]
L8 [finish finally]: L8 [finish finally]:
@@ -278,23 +240,13 @@ sink:
} }
--------------------- ---------------------
L3: L3:
<START> NEXT:[r(())] PREV:[] <START> NEXT:[jmp?(L5 [onExceptionToFinallyBlock])] PREV:[]
r(()) NEXT:[r(try { 1 if (2 > 3) { retur..)] PREV:[<START>] jmp?(L5 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[<START>]
r(try {
1
if (2 > 3) {
return@
}
} finally {
2
}) NEXT:[jmp?(L5 [onExceptionToFinallyBlock])] PREV:[r(())]
jmp?(L5 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { retur..)]
r(1) NEXT:[r(2)] PREV:[jmp?(L5 [onExceptionToFinallyBlock])] r(1) NEXT:[r(2)] PREV:[jmp?(L5 [onExceptionToFinallyBlock])]
r(2) NEXT:[r(3)] PREV:[r(1)] r(2) NEXT:[r(3)] PREV:[r(1)]
r(3) NEXT:[r(>)] PREV:[r(2)] r(3) NEXT:[call(>, compareTo)] PREV:[r(2)]
r(>) NEXT:[r(2 > 3)] PREV:[r(3)] call(>, compareTo) NEXT:[jf(L6)] PREV:[r(3)]
r(2 > 3) NEXT:[jf(L6)] PREV:[r(>)] jf(L6) NEXT:[read (Unit), r(2)] PREV:[call(>, compareTo)]
jf(L6) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)]
L7 [start finally]: L7 [start finally]:
r(2) NEXT:[ret L4] PREV:[jf(L6)] r(2) NEXT:[ret L4] PREV:[jf(L6)]
L8 [finish finally]: L8 [finish finally]:
@@ -331,36 +283,17 @@ fun t5() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(while(true) { try { 1 if (..)] PREV:[] <START> NEXT:[r(true)] PREV:[]
r(while(true) {
try {
1
if (2 > 3) {
break @
}
} finally {
2
}
}) NEXT:[r(true)] PREV:[<START>]
L2 [loop entry point]: L2 [loop entry point]:
L5 [condition entry point]: L5 [condition entry point]:
r(true) NEXT:[r(try { 1 if (2 > 3) { break..)] PREV:[r(while(true) { try { 1 if (..), jmp(L2 [loop entry point])] r(true) NEXT:[jmp?(L6 [onExceptionToFinallyBlock])] PREV:[<START>, jmp(L2 [loop entry point])]
L4 [body entry point]: L4 [body entry point]:
r(try { jmp?(L6 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(true)]
1
if (2 > 3) {
break @
}
} finally {
2
}) NEXT:[jmp?(L6 [onExceptionToFinallyBlock])] PREV:[r(true)]
jmp?(L6 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { break..)]
r(1) NEXT:[r(2)] PREV:[jmp?(L6 [onExceptionToFinallyBlock])] r(1) NEXT:[r(2)] PREV:[jmp?(L6 [onExceptionToFinallyBlock])]
r(2) NEXT:[r(3)] PREV:[r(1)] r(2) NEXT:[r(3)] PREV:[r(1)]
r(3) NEXT:[r(>)] PREV:[r(2)] r(3) NEXT:[call(>, compareTo)] PREV:[r(2)]
r(>) NEXT:[r(2 > 3)] PREV:[r(3)] call(>, compareTo) NEXT:[jf(L7)] PREV:[r(3)]
r(2 > 3) NEXT:[jf(L7)] PREV:[r(>)] jf(L7) NEXT:[read (Unit), r(2)] PREV:[call(>, compareTo)]
jf(L7) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)]
L8 [start finally]: L8 [start finally]:
r(2) NEXT:[jmp(L3 [loop exit point])] PREV:[jf(L7)] r(2) NEXT:[jmp(L3 [loop exit point])] PREV:[jf(L7)]
L9 [finish finally]: L9 [finish finally]:
@@ -401,35 +334,17 @@ fun t6() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { @ while(true) { 1 if..)] PREV:[] <START> NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[]
r(try { jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(true)] PREV:[<START>]
@ while(true) {
1
if (2 > 3) {
break @
}
}
5
} finally {
2
}) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[<START>]
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(while(true) { 1 if (2 > 3)..)] PREV:[r(try { @ while(true) { 1 if..)]
r(while(true) {
1
if (2 > 3) {
break @
}
}) NEXT:[r(true)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
L3 [loop entry point]: L3 [loop entry point]:
L6 [condition entry point]: L6 [condition entry point]:
r(true) NEXT:[r(1)] PREV:[r(while(true) { 1 if (2 > 3)..), jmp(L3 [loop entry point])] r(true) NEXT:[r(1)] PREV:[jmp?(L2 [onExceptionToFinallyBlock]), jmp(L3 [loop entry point])]
L5 [body entry point]: L5 [body entry point]:
r(1) NEXT:[r(2)] PREV:[r(true)] r(1) NEXT:[r(2)] PREV:[r(true)]
r(2) NEXT:[r(3)] PREV:[r(1)] r(2) NEXT:[r(3)] PREV:[r(1)]
r(3) NEXT:[r(>)] PREV:[r(2)] r(3) NEXT:[call(>, compareTo)] PREV:[r(2)]
r(>) NEXT:[r(2 > 3)] PREV:[r(3)] call(>, compareTo) NEXT:[jf(L7)] PREV:[r(3)]
r(2 > 3) NEXT:[jf(L7)] PREV:[r(>)] jf(L7) NEXT:[read (Unit), jmp(L4 [loop exit point])] PREV:[call(>, compareTo)]
jf(L7) NEXT:[read (Unit), jmp(L4 [loop exit point])] PREV:[r(2 > 3)]
jmp(L4 [loop exit point]) NEXT:[read (Unit)] PREV:[jf(L7)] jmp(L4 [loop exit point]) NEXT:[read (Unit)] PREV:[jf(L7)]
- jmp(L8) NEXT:[jmp(L3 [loop entry point])] PREV:[] - jmp(L8) NEXT:[jmp(L3 [loop entry point])] PREV:[]
L7: L7:
@@ -469,34 +384,17 @@ fun t7() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { @ while(true) { 1 if..)] PREV:[] <START> NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[]
r(try { jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(true)] PREV:[<START>]
@ while(true) {
1
if (2 > 3) {
break @
}
}
} finally {
2
}) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[<START>]
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(while(true) { 1 if (2 > 3)..)] PREV:[r(try { @ while(true) { 1 if..)]
r(while(true) {
1
if (2 > 3) {
break @
}
}) NEXT:[r(true)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
L3 [loop entry point]: L3 [loop entry point]:
L6 [condition entry point]: L6 [condition entry point]:
r(true) NEXT:[r(1)] PREV:[r(while(true) { 1 if (2 > 3)..), jmp(L3 [loop entry point])] r(true) NEXT:[r(1)] PREV:[jmp?(L2 [onExceptionToFinallyBlock]), jmp(L3 [loop entry point])]
L5 [body entry point]: L5 [body entry point]:
r(1) NEXT:[r(2)] PREV:[r(true)] r(1) NEXT:[r(2)] PREV:[r(true)]
r(2) NEXT:[r(3)] PREV:[r(1)] r(2) NEXT:[r(3)] PREV:[r(1)]
r(3) NEXT:[r(>)] PREV:[r(2)] r(3) NEXT:[call(>, compareTo)] PREV:[r(2)]
r(>) NEXT:[r(2 > 3)] PREV:[r(3)] call(>, compareTo) NEXT:[jf(L7)] PREV:[r(3)]
r(2 > 3) NEXT:[jf(L7)] PREV:[r(>)] jf(L7) NEXT:[read (Unit), jmp(L4 [loop exit point])] PREV:[call(>, compareTo)]
jf(L7) NEXT:[read (Unit), jmp(L4 [loop exit point])] PREV:[r(2 > 3)]
jmp(L4 [loop exit point]) NEXT:[read (Unit)] PREV:[jf(L7)] jmp(L4 [loop exit point]) NEXT:[read (Unit)] PREV:[jf(L7)]
- jmp(L8) NEXT:[jmp(L3 [loop entry point])] PREV:[] - jmp(L8) NEXT:[jmp(L3 [loop entry point])] PREV:[]
L7: L7:
@@ -535,67 +433,47 @@ fun t8(a : Int) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(a : Int)] PREV:[] <START> NEXT:[v(a : Int)] PREV:[]
v(a : Int) NEXT:[w(a)] PREV:[<START>] v(a : Int) NEXT:[w(a)] PREV:[<START>]
w(a) NEXT:[r(for (i in 1..a) { try { 1 ..)] PREV:[v(a : Int)] w(a) NEXT:[r(1)] PREV:[v(a : Int)]
r(for (i in 1..a) { r(1) NEXT:[r(a)] PREV:[w(a)]
try { r(a) NEXT:[call(.., rangeTo)] PREV:[r(1)]
1 call(.., rangeTo) NEXT:[v(i)] PREV:[r(a)]
if (2 > 3) { v(i) NEXT:[w(i)] PREV:[call(.., rangeTo)]
continue @ w(i) NEXT:[jmp?(L2)] PREV:[v(i)]
}
} finally {
2
}
}) NEXT:[r(1)] PREV:[w(a)]
r(1) NEXT:[r(a)] PREV:[r(for (i in 1..a) { try { 1 ..)]
r(a) NEXT:[r(..)] PREV:[r(1)]
r(..) NEXT:[r(1..a)] PREV:[r(a)]
r(1..a) NEXT:[v(i)] PREV:[r(..)]
v(i) NEXT:[w(i)] PREV:[r(1..a)]
w(i) NEXT:[jmp?(L2)] PREV:[v(i)]
L3: L3:
jmp?(L2) NEXT:[read (Unit), r(try { 1 if (2 > 3) { conti..)] PREV:[w(i)] jmp?(L2) NEXT:[read (Unit), jmp?(L6 [onExceptionToFinallyBlock])] PREV:[w(i)]
L4 [loop entry point]: L4 [loop entry point]:
L5 [body entry point]: L5 [body entry point]:
r(try { jmp?(L6 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[jmp?(L2), jmp(L4 [loop entry point]), jmp?(L4 [loop entry point])]
1 r(1) NEXT:[r(2)] PREV:[jmp?(L6 [onExceptionToFinallyBlock])]
if (2 > 3) { r(2) NEXT:[r(3)] PREV:[r(1)]
continue @ r(3) NEXT:[call(>, compareTo)] PREV:[r(2)]
} call(>, compareTo) NEXT:[jf(L7)] PREV:[r(3)]
} finally { jf(L7) NEXT:[read (Unit), r(2)] PREV:[call(>, compareTo)]
2
}) NEXT:[jmp?(L6 [onExceptionToFinallyBlock])] PREV:[jmp?(L2), jmp(L4 [loop entry point]), jmp?(L4 [loop entry point])]
jmp?(L6 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { 1 if (2 > 3) { conti..)]
r(1) NEXT:[r(2)] PREV:[jmp?(L6 [onExceptionToFinallyBlock])]
r(2) NEXT:[r(3)] PREV:[r(1)]
r(3) NEXT:[r(>)] PREV:[r(2)]
r(>) NEXT:[r(2 > 3)] PREV:[r(3)]
r(2 > 3) NEXT:[jf(L7)] PREV:[r(>)]
jf(L7) NEXT:[read (Unit), r(2)] PREV:[r(2 > 3)]
L8 [start finally]: L8 [start finally]:
r(2) NEXT:[jmp(L4 [loop entry point])] PREV:[jf(L7)] r(2) NEXT:[jmp(L4 [loop entry point])] PREV:[jf(L7)]
L9 [finish finally]: L9 [finish finally]:
jmp(L4 [loop entry point]) NEXT:[r(try { 1 if (2 > 3) { conti..)] PREV:[r(2)] jmp(L4 [loop entry point]) NEXT:[jmp?(L6 [onExceptionToFinallyBlock])] PREV:[r(2)]
- jmp(L10) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[] - jmp(L10) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[]
L7: L7:
read (Unit) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[jf(L7)] read (Unit) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[jf(L7)]
L10: L10:
jmp(L11 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)] jmp(L11 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[read (Unit)]
L6 [onExceptionToFinallyBlock]: L6 [onExceptionToFinallyBlock]:
r(2) NEXT:[jmp(error)] PREV:[jmp?(L6 [onExceptionToFinallyBlock])] r(2) NEXT:[jmp(error)] PREV:[jmp?(L6 [onExceptionToFinallyBlock])]
jmp(error) NEXT:[<ERROR>] PREV:[r(2)] jmp(error) NEXT:[<ERROR>] PREV:[r(2)]
L11 [skipFinallyToErrorBlock]: L11 [skipFinallyToErrorBlock]:
r(2) NEXT:[jmp?(L4 [loop entry point])] PREV:[jmp(L11 [skipFinallyToErrorBlock])] r(2) NEXT:[jmp?(L4 [loop entry point])] PREV:[jmp(L11 [skipFinallyToErrorBlock])]
jmp?(L4 [loop entry point]) NEXT:[r(try { 1 if (2 > 3) { conti..), read (Unit)] PREV:[r(2)] jmp?(L4 [loop entry point]) NEXT:[jmp?(L6 [onExceptionToFinallyBlock]), read (Unit)] PREV:[r(2)]
L2: L2:
read (Unit) NEXT:[<END>] PREV:[jmp?(L2), jmp?(L4 [loop entry point])] read (Unit) NEXT:[<END>] PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>] PREV:[read (Unit)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[jmp(error)] <ERROR> NEXT:[<SINK>] PREV:[jmp(error)]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== t9 == == t9 ==
fun t9(a : Int) { fun t9(a : Int) {
@@ -615,30 +493,12 @@ fun t9(a : Int) {
L0: L0:
<START> NEXT:[v(a : Int)] PREV:[] <START> NEXT:[v(a : Int)] PREV:[]
v(a : Int) NEXT:[w(a)] PREV:[<START>] v(a : Int) NEXT:[w(a)] PREV:[<START>]
w(a) NEXT:[r(try { @ for (i in 1..a) { ..)] PREV:[v(a : Int)] w(a) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[v(a : Int)]
r(try { jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[w(a)]
@ for (i in 1..a) { r(1) NEXT:[r(a)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
1 r(a) NEXT:[call(.., rangeTo)] PREV:[r(1)]
if (2 > 3) { call(.., rangeTo) NEXT:[v(i)] PREV:[r(a)]
continue @ v(i) NEXT:[w(i)] PREV:[call(.., rangeTo)]
}
}
5
} finally {
2
}) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[w(a)]
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(for (i in 1..a) { 1 if (2 ..)] PREV:[r(try { @ for (i in 1..a) { ..)]
r(for (i in 1..a) {
1
if (2 > 3) {
continue @
}
}) NEXT:[r(1)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(1) NEXT:[r(a)] PREV:[r(for (i in 1..a) { 1 if (2 ..)]
r(a) NEXT:[r(..)] PREV:[r(1)]
r(..) NEXT:[r(1..a)] PREV:[r(a)]
r(1..a) NEXT:[v(i)] PREV:[r(..)]
v(i) NEXT:[w(i)] PREV:[r(1..a)]
w(i) NEXT:[jmp?(L3)] PREV:[v(i)] w(i) NEXT:[jmp?(L3)] PREV:[v(i)]
L4: L4:
jmp?(L3) NEXT:[read (Unit), r(1)] PREV:[w(i)] jmp?(L3) NEXT:[read (Unit), r(1)] PREV:[w(i)]
@@ -646,10 +506,9 @@ L5 [loop entry point]:
L6 [body entry point]: L6 [body entry point]:
r(1) NEXT:[r(2)] PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])] r(1) NEXT:[r(2)] PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])]
r(2) NEXT:[r(3)] PREV:[r(1)] r(2) NEXT:[r(3)] PREV:[r(1)]
r(3) NEXT:[r(>)] PREV:[r(2)] r(3) NEXT:[call(>, compareTo)] PREV:[r(2)]
r(>) NEXT:[r(2 > 3)] PREV:[r(3)] call(>, compareTo) NEXT:[jf(L7)] PREV:[r(3)]
r(2 > 3) NEXT:[jf(L7)] PREV:[r(>)] jf(L7) NEXT:[read (Unit), jmp(L5 [loop entry point])] PREV:[call(>, compareTo)]
jf(L7) NEXT:[read (Unit), jmp(L5 [loop entry point])] PREV:[r(2 > 3)]
jmp(L5 [loop entry point]) NEXT:[r(1)] PREV:[jf(L7)] jmp(L5 [loop entry point]) NEXT:[r(1)] PREV:[jf(L7)]
- jmp(L8) NEXT:[jmp?(L5 [loop entry point])] PREV:[] - jmp(L8) NEXT:[jmp?(L5 [loop entry point])] PREV:[]
L7: L7:
@@ -691,29 +550,12 @@ fun t10(a : Int) {
L0: L0:
<START> NEXT:[v(a : Int)] PREV:[] <START> NEXT:[v(a : Int)] PREV:[]
v(a : Int) NEXT:[w(a)] PREV:[<START>] v(a : Int) NEXT:[w(a)] PREV:[<START>]
w(a) NEXT:[r(try { @ for (i in 1..a) { ..)] PREV:[v(a : Int)] w(a) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[v(a : Int)]
r(try { jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[w(a)]
@ for (i in 1..a) { r(1) NEXT:[r(a)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
1 r(a) NEXT:[call(.., rangeTo)] PREV:[r(1)]
if (2 > 3) { call(.., rangeTo) NEXT:[v(i)] PREV:[r(a)]
continue @ v(i) NEXT:[w(i)] PREV:[call(.., rangeTo)]
}
}
} finally {
2
}) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[w(a)]
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(for (i in 1..a) { 1 if (2 ..)] PREV:[r(try { @ for (i in 1..a) { ..)]
r(for (i in 1..a) {
1
if (2 > 3) {
continue @
}
}) NEXT:[r(1)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(1) NEXT:[r(a)] PREV:[r(for (i in 1..a) { 1 if (2 ..)]
r(a) NEXT:[r(..)] PREV:[r(1)]
r(..) NEXT:[r(1..a)] PREV:[r(a)]
r(1..a) NEXT:[v(i)] PREV:[r(..)]
v(i) NEXT:[w(i)] PREV:[r(1..a)]
w(i) NEXT:[jmp?(L3)] PREV:[v(i)] w(i) NEXT:[jmp?(L3)] PREV:[v(i)]
L4: L4:
jmp?(L3) NEXT:[read (Unit), r(1)] PREV:[w(i)] jmp?(L3) NEXT:[read (Unit), r(1)] PREV:[w(i)]
@@ -721,10 +563,9 @@ L5 [loop entry point]:
L6 [body entry point]: L6 [body entry point]:
r(1) NEXT:[r(2)] PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])] r(1) NEXT:[r(2)] PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])]
r(2) NEXT:[r(3)] PREV:[r(1)] r(2) NEXT:[r(3)] PREV:[r(1)]
r(3) NEXT:[r(>)] PREV:[r(2)] r(3) NEXT:[call(>, compareTo)] PREV:[r(2)]
r(>) NEXT:[r(2 > 3)] PREV:[r(3)] call(>, compareTo) NEXT:[jf(L7)] PREV:[r(3)]
r(2 > 3) NEXT:[jf(L7)] PREV:[r(>)] jf(L7) NEXT:[read (Unit), jmp(L5 [loop entry point])] PREV:[call(>, compareTo)]
jf(L7) NEXT:[read (Unit), jmp(L5 [loop entry point])] PREV:[r(2 > 3)]
jmp(L5 [loop entry point]) NEXT:[r(1)] PREV:[jf(L7)] jmp(L5 [loop entry point]) NEXT:[r(1)] PREV:[jf(L7)]
- jmp(L8) NEXT:[jmp?(L5 [loop entry point])] PREV:[] - jmp(L8) NEXT:[jmp?(L5 [loop entry point])] PREV:[]
L7: L7:
@@ -759,14 +600,8 @@ fun t11() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { return 1 } finally {..)] PREV:[] <START> NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[]
r(try { jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[<START>]
return 1
}
finally {
return 2
}) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[<START>]
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[r(try { return 1 } finally {..)]
r(1) NEXT:[r(2)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] r(1) NEXT:[r(2)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
L3 [start finally]: L3 [start finally]:
r(2) NEXT:[ret(*) L1] PREV:[r(1)] r(2) NEXT:[ret(*) L1] PREV:[r(1)]
@@ -799,31 +634,22 @@ fun t12() : Int {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { return 1 } finally {..)] PREV:[] <START> NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[]
r(try { jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[<START>]
return 1
}
finally {
doSmth(3)
}) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[<START>]
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[r(try { return 1 } finally {..)]
r(1) NEXT:[r(3)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] r(1) NEXT:[r(3)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
L3 [start finally]: L3 [start finally]:
r(3) NEXT:[r(doSmth)] PREV:[r(1)] r(3) NEXT:[call(doSmth, doSmth)] PREV:[r(1)]
r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] call(doSmth, doSmth) NEXT:[ret(*) L1] PREV:[r(3)]
r(doSmth(3)) NEXT:[ret(*) L1] PREV:[r(doSmth)]
L4 [finish finally]: L4 [finish finally]:
ret(*) L1 NEXT:[<END>] PREV:[r(doSmth(3))] ret(*) L1 NEXT:[<END>] PREV:[call(doSmth, doSmth)]
- jmp(L5 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[] - jmp(L5 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[]
L2 [onExceptionToFinallyBlock]: L2 [onExceptionToFinallyBlock]:
r(3) NEXT:[r(doSmth)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] r(3) NEXT:[call(doSmth, doSmth)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] call(doSmth, doSmth) NEXT:[jmp(error)] PREV:[r(3)]
r(doSmth(3)) NEXT:[jmp(error)] PREV:[r(doSmth)] jmp(error) NEXT:[<ERROR>] PREV:[call(doSmth, doSmth)]
jmp(error) NEXT:[<ERROR>] PREV:[r(doSmth(3))]
L5 [skipFinallyToErrorBlock]: L5 [skipFinallyToErrorBlock]:
- r(3) NEXT:[r(doSmth)] PREV:[] - r(3) NEXT:[call(doSmth, doSmth)] PREV:[]
- r(doSmth) NEXT:[r(doSmth(3))] PREV:[] - call(doSmth, doSmth) NEXT:[<END>] PREV:[]
- r(doSmth(3)) NEXT:[<END>] PREV:[]
L1: L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1] <END> NEXT:[<SINK>] PREV:[ret(*) L1]
error: error:
@@ -845,50 +671,37 @@ fun t13() : Int {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { return 1 } catch (e:..)] PREV:[] <START> NEXT:[jmp?(L2 [onException])] PREV:[]
r(try { jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[<START>]
return 1 jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[jmp?(L2 [onException])]
} r(1) NEXT:[r(3)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
catch (e: UnsupportedOperationException) {
doSmth(2)
}
finally {
doSmth(3)
}) NEXT:[jmp?(L2 [onException])] PREV:[<START>]
jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[r(try { return 1 } catch (e:..)]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[jmp?(L2 [onException])]
r(1) NEXT:[r(3)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
L4 [start finally]: L4 [start finally]:
r(3) NEXT:[r(doSmth)] PREV:[r(1)] r(3) NEXT:[call(doSmth, doSmth)] PREV:[r(1)]
r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] call(doSmth, doSmth) NEXT:[ret(*) L1] PREV:[r(3)]
r(doSmth(3)) NEXT:[ret(*) L1] PREV:[r(doSmth)]
L5 [finish finally]: L5 [finish finally]:
ret(*) L1 NEXT:[<END>] PREV:[r(doSmth(3))] ret(*) L1 NEXT:[<END>] PREV:[call(doSmth, doSmth)]
- jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[] - jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[]
L2 [onException]: L2 [onException]:
v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(L2 [onException])] v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(L2 [onException])]
w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)] w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)]
r(2) NEXT:[r(doSmth)] PREV:[w(e)] r(2) NEXT:[call(doSmth, doSmth)] PREV:[w(e)]
r(doSmth) NEXT:[r(doSmth(2))] PREV:[r(2)] call(doSmth, doSmth) NEXT:[jmp(L6 [afterCatches])] PREV:[r(2)]
r(doSmth(2)) NEXT:[jmp(L6 [afterCatches])] PREV:[r(doSmth)] jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[call(doSmth, doSmth)]
jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[r(doSmth(2))]
L6 [afterCatches]: L6 [afterCatches]:
jmp(L7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[jmp(L6 [afterCatches])] jmp(L7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[jmp(L6 [afterCatches])]
L3 [onExceptionToFinallyBlock]: L3 [onExceptionToFinallyBlock]:
r(3) NEXT:[r(doSmth)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] r(3) NEXT:[call(doSmth, doSmth)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] call(doSmth, doSmth) NEXT:[jmp(error)] PREV:[r(3)]
r(doSmth(3)) NEXT:[jmp(error)] PREV:[r(doSmth)] jmp(error) NEXT:[<ERROR>] PREV:[call(doSmth, doSmth)]
jmp(error) NEXT:[<ERROR>] PREV:[r(doSmth(3))]
L7 [skipFinallyToErrorBlock]: L7 [skipFinallyToErrorBlock]:
r(3) NEXT:[r(doSmth)] PREV:[jmp(L7 [skipFinallyToErrorBlock])] r(3) NEXT:[call(doSmth, doSmth)] PREV:[jmp(L7 [skipFinallyToErrorBlock])]
r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] call(doSmth, doSmth) NEXT:[<END>] PREV:[r(3)]
r(doSmth(3)) NEXT:[<END>] PREV:[r(doSmth)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, r(doSmth(3))] <END> NEXT:[<SINK>] PREV:[ret(*) L1, call(doSmth, doSmth)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[jmp(error)] <ERROR> NEXT:[<SINK>] PREV:[jmp(error)]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== t14 == == t14 ==
fun t14() : Int { fun t14() : Int {
@@ -901,31 +714,24 @@ fun t14() : Int {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { return 1 } catch (e:..)] PREV:[] <START> NEXT:[jmp?(L2 [onException])] PREV:[]
r(try { jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), r(1)] PREV:[<START>]
return 1 r(1) NEXT:[ret(*) L1] PREV:[jmp?(L2 [onException])]
} ret(*) L1 NEXT:[<END>] PREV:[r(1)]
catch (e: UnsupportedOperationException) { - jmp(L3 [afterCatches]) NEXT:[<END>] PREV:[]
doSmth(2)
}) NEXT:[jmp?(L2 [onException])] PREV:[<START>]
jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), r(1)] PREV:[r(try { return 1 } catch (e:..)]
r(1) NEXT:[ret(*) L1] PREV:[jmp?(L2 [onException])]
ret(*) L1 NEXT:[<END>] PREV:[r(1)]
- jmp(L3 [afterCatches]) NEXT:[<END>] PREV:[]
L2 [onException]: L2 [onException]:
v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(L2 [onException])] v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(L2 [onException])]
w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)] w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)]
r(2) NEXT:[r(doSmth)] PREV:[w(e)] r(2) NEXT:[call(doSmth, doSmth)] PREV:[w(e)]
r(doSmth) NEXT:[r(doSmth(2))] PREV:[r(2)] call(doSmth, doSmth) NEXT:[jmp(L3 [afterCatches])] PREV:[r(2)]
r(doSmth(2)) NEXT:[jmp(L3 [afterCatches])] PREV:[r(doSmth)] jmp(L3 [afterCatches]) NEXT:[<END>] PREV:[call(doSmth, doSmth)]
jmp(L3 [afterCatches]) NEXT:[<END>] PREV:[r(doSmth(2))]
L1: L1:
L3 [afterCatches]: L3 [afterCatches]:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, jmp(L3 [afterCatches])] <END> NEXT:[<SINK>] PREV:[ret(*) L1, jmp(L3 [afterCatches])]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== t15 == == t15 ==
fun t15() : Int { fun t15() : Int {
@@ -941,52 +747,39 @@ fun t15() : Int {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { return 1 } catch (e:..)] PREV:[] <START> NEXT:[jmp?(L2 [onException])] PREV:[]
r(try { jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[<START>]
return 1 jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[jmp?(L2 [onException])]
} r(1) NEXT:[r(3)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
catch (e: UnsupportedOperationException) {
return 2
}
finally {
doSmth(3)
}) NEXT:[jmp?(L2 [onException])] PREV:[<START>]
jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[r(try { return 1 } catch (e:..)]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[jmp?(L2 [onException])]
r(1) NEXT:[r(3)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
L4 [start finally]: L4 [start finally]:
r(3) NEXT:[r(doSmth)] PREV:[r(1)] r(3) NEXT:[call(doSmth, doSmth)] PREV:[r(1)]
r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] call(doSmth, doSmth) NEXT:[ret(*) L1] PREV:[r(3)]
r(doSmth(3)) NEXT:[ret(*) L1] PREV:[r(doSmth)]
L5 [finish finally]: L5 [finish finally]:
ret(*) L1 NEXT:[<END>] PREV:[r(doSmth(3))] ret(*) L1 NEXT:[<END>] PREV:[call(doSmth, doSmth)]
- jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[] - jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[]
L2 [onException]: L2 [onException]:
v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(L2 [onException])] v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(L2 [onException])]
w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)] w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)]
r(2) NEXT:[r(3)] PREV:[w(e)] r(2) NEXT:[r(3)] PREV:[w(e)]
r(3) NEXT:[r(doSmth)] PREV:[r(2)] r(3) NEXT:[call(doSmth, doSmth)] PREV:[r(2)]
r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] call(doSmth, doSmth) NEXT:[ret(*) L1] PREV:[r(3)]
r(doSmth(3)) NEXT:[ret(*) L1] PREV:[r(doSmth)] ret(*) L1 NEXT:[<END>] PREV:[call(doSmth, doSmth)]
ret(*) L1 NEXT:[<END>] PREV:[r(doSmth(3))] - jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[]
- jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[]
L6 [afterCatches]: L6 [afterCatches]:
- jmp(L7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[] - jmp(L7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[]
L3 [onExceptionToFinallyBlock]: L3 [onExceptionToFinallyBlock]:
r(3) NEXT:[r(doSmth)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] r(3) NEXT:[call(doSmth, doSmth)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] call(doSmth, doSmth) NEXT:[jmp(error)] PREV:[r(3)]
r(doSmth(3)) NEXT:[jmp(error)] PREV:[r(doSmth)] jmp(error) NEXT:[<ERROR>] PREV:[call(doSmth, doSmth)]
jmp(error) NEXT:[<ERROR>] PREV:[r(doSmth(3))]
L7 [skipFinallyToErrorBlock]: L7 [skipFinallyToErrorBlock]:
- r(3) NEXT:[r(doSmth)] PREV:[] - r(3) NEXT:[call(doSmth, doSmth)] PREV:[]
- r(doSmth) NEXT:[r(doSmth(3))] PREV:[] - call(doSmth, doSmth) NEXT:[<END>] PREV:[]
- r(doSmth(3)) NEXT:[<END>] PREV:[]
L1: L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1] <END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[jmp(error)] <ERROR> NEXT:[<SINK>] PREV:[jmp(error)]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== t16 == == t16 ==
fun t16() : Int { fun t16() : Int {
@@ -1002,50 +795,37 @@ fun t16() : Int {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { doSmth(1) } catch (e..)] PREV:[] <START> NEXT:[jmp?(L2 [onException])] PREV:[]
r(try { jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[<START>]
doSmth(1) jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[jmp?(L2 [onException])]
} r(1) NEXT:[call(doSmth, doSmth)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
catch (e: UnsupportedOperationException) { call(doSmth, doSmth) NEXT:[jmp(L4 [afterCatches])] PREV:[r(1)]
return 2 jmp(L4 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[call(doSmth, doSmth)]
}
finally {
doSmth(3)
}) NEXT:[jmp?(L2 [onException])] PREV:[<START>]
jmp?(L2 [onException]) NEXT:[v(e: UnsupportedOperationException), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[r(try { doSmth(1) } catch (e..)]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(3), r(1)] PREV:[jmp?(L2 [onException])]
r(1) NEXT:[r(doSmth)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
r(doSmth) NEXT:[r(doSmth(1))] PREV:[r(1)]
r(doSmth(1)) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth)]
jmp(L4 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[r(doSmth(1))]
L2 [onException]: L2 [onException]:
v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(L2 [onException])] v(e: UnsupportedOperationException) NEXT:[w(e)] PREV:[jmp?(L2 [onException])]
w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)] w(e) NEXT:[r(2)] PREV:[v(e: UnsupportedOperationException)]
r(2) NEXT:[r(3)] PREV:[w(e)] r(2) NEXT:[r(3)] PREV:[w(e)]
L5 [start finally]: L5 [start finally]:
r(3) NEXT:[r(doSmth)] PREV:[r(2)] r(3) NEXT:[call(doSmth, doSmth)] PREV:[r(2)]
r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] call(doSmth, doSmth) NEXT:[ret(*) L1] PREV:[r(3)]
r(doSmth(3)) NEXT:[ret(*) L1] PREV:[r(doSmth)]
L6 [finish finally]: L6 [finish finally]:
ret(*) L1 NEXT:[<END>] PREV:[r(doSmth(3))] ret(*) L1 NEXT:[<END>] PREV:[call(doSmth, doSmth)]
- jmp(L4 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[] - jmp(L4 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[]
L4 [afterCatches]: L4 [afterCatches]:
jmp(L7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[jmp(L4 [afterCatches])] jmp(L7 [skipFinallyToErrorBlock]) NEXT:[r(3)] PREV:[jmp(L4 [afterCatches])]
L3 [onExceptionToFinallyBlock]: L3 [onExceptionToFinallyBlock]:
r(3) NEXT:[r(doSmth)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])] r(3) NEXT:[call(doSmth, doSmth)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] call(doSmth, doSmth) NEXT:[jmp(error)] PREV:[r(3)]
r(doSmth(3)) NEXT:[jmp(error)] PREV:[r(doSmth)] jmp(error) NEXT:[<ERROR>] PREV:[call(doSmth, doSmth)]
jmp(error) NEXT:[<ERROR>] PREV:[r(doSmth(3))]
L7 [skipFinallyToErrorBlock]: L7 [skipFinallyToErrorBlock]:
r(3) NEXT:[r(doSmth)] PREV:[jmp(L7 [skipFinallyToErrorBlock])] r(3) NEXT:[call(doSmth, doSmth)] PREV:[jmp(L7 [skipFinallyToErrorBlock])]
r(doSmth) NEXT:[r(doSmth(3))] PREV:[r(3)] call(doSmth, doSmth) NEXT:[<END>] PREV:[r(3)]
r(doSmth(3)) NEXT:[<END>] PREV:[r(doSmth)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1, r(doSmth(3))] <END> NEXT:[<SINK>] PREV:[ret(*) L1, call(doSmth, doSmth)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[jmp(error)] <ERROR> NEXT:[<SINK>] PREV:[jmp(error)]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== doSmth == == doSmth ==
fun doSmth(i: Int) { fun doSmth(i: Int) {
+148 -172
View File
@@ -1,3 +1,55 @@
== doSmth ==
fun doSmth() {}
---------------------
L0:
<START> NEXT:[read (Unit)] PREV:[]
read (Unit) NEXT:[<END>] PREV:[<START>]
L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== doSmth1 ==
fun doSmth1() {}
---------------------
L0:
<START> NEXT:[read (Unit)] PREV:[]
read (Unit) NEXT:[<END>] PREV:[<START>]
L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== doSmth2 ==
fun doSmth2() {}
---------------------
L0:
<START> NEXT:[read (Unit)] PREV:[]
read (Unit) NEXT:[<END>] PREV:[<START>]
L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== cond ==
fun cond() {}
---------------------
L0:
<START> NEXT:[read (Unit)] PREV:[]
read (Unit) NEXT:[<END>] PREV:[<START>]
L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== testCopy1 == == testCopy1 ==
fun testCopy1() : Int { fun testCopy1() : Int {
try { try {
@@ -15,54 +67,39 @@ fun testCopy1() : Int {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { doSmth() } catch (e:..)] PREV:[] <START> NEXT:[jmp?(L2 [onException])] PREV:[]
r(try { jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[<START>]
doSmth() jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(1), call(doSmth, doSmth)] PREV:[jmp?(L2 [onException])]
} call(doSmth, doSmth) NEXT:[jmp(L4 [afterCatches])] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
catch (e: NullPointerException) { jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[call(doSmth, doSmth)]
doSmth1()
}
catch (e: Exception) {
doSmth2()
}
finally {
return 1
}) NEXT:[jmp?(L2 [onException])] PREV:[<START>]
jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[r(try { doSmth() } catch (e:..)]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(1), r(doSmth)] PREV:[jmp?(L2 [onException])]
r(doSmth) NEXT:[r(doSmth())] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
r(doSmth()) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth)]
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[r(doSmth())]
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) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])]
w(e) NEXT:[r(doSmth1)] PREV:[v(e: NullPointerException)] w(e) NEXT:[call(doSmth1, doSmth1)] PREV:[v(e: NullPointerException)]
r(doSmth1) NEXT:[r(doSmth1())] PREV:[w(e)] call(doSmth1, doSmth1) NEXT:[jmp(L4 [afterCatches])] PREV:[w(e)]
r(doSmth1()) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth1)] jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[call(doSmth1, doSmth1)]
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[r(doSmth1())]
L5 [catch 0]: L5 [catch 0]:
v(e: Exception) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])] v(e: Exception) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])]
w(e) NEXT:[r(doSmth2)] PREV:[v(e: Exception)] w(e) NEXT:[call(doSmth2, doSmth2)] PREV:[v(e: Exception)]
r(doSmth2) NEXT:[r(doSmth2())] PREV:[w(e)] call(doSmth2, doSmth2) NEXT:[jmp(L4 [afterCatches])] PREV:[w(e)]
r(doSmth2()) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth2)] jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[call(doSmth2, doSmth2)]
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[r(doSmth2())]
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) NEXT:[ret(*) L1] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
ret(*) L1 NEXT:[<END>] PREV:[r(1)] ret(*) L1 NEXT:[<END>] PREV:[r(1)]
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) NEXT:[ret(*) L1] PREV:[jmp(L6 [skipFinallyToErrorBlock])]
ret(*) L1 NEXT:[<END>] PREV:[r(1)] ret(*) L1 NEXT:[<END>] PREV:[r(1)]
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> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== testCopy2 == == testCopy2 ==
fun testCopy2() { fun testCopy2() {
@@ -84,89 +121,55 @@ fun testCopy2() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(while (cond()) { try { doS..)] PREV:[] <START> NEXT:[call(cond, cond)] PREV:[]
r(while (cond()) {
try {
doSmth()
}
catch (e: NullPointerException) {
doSmth1()
}
catch (e: Exception) {
doSmth2()
}
finally {
if (cond()) return
else continue
}
}) NEXT:[r(cond)] PREV:[<START>]
L2 [loop entry point]: L2 [loop entry point]:
L5 [condition entry point]: L5 [condition entry point]:
r(cond) NEXT:[r(cond())] PREV:[r(while (cond()) { try { doS..), jmp(L2 [loop entry point]), jmp(L2 [loop entry point])] call(cond, cond) NEXT:[jf(L3 [loop exit point])] PREV:[<START>, jmp(L2 [loop entry point]), jmp(L2 [loop entry point])]
r(cond()) NEXT:[jf(L3 [loop exit point])] PREV:[r(cond)] jf(L3 [loop exit point]) NEXT:[read (Unit), jmp?(L6 [onException])] PREV:[call(cond, cond)]
jf(L3 [loop exit point]) NEXT:[read (Unit), r(try { doSmth() } catch (e:..)] PREV:[r(cond())]
L4 [body entry point]: L4 [body entry point]:
r(try { jmp?(L6 [onException]) NEXT:[jmp?(L9 [catch 0]), jmp?(L7 [onExceptionToFinallyBlock])] PREV:[jf(L3 [loop exit point])]
doSmth() jmp?(L7 [onExceptionToFinallyBlock]) NEXT:[call(cond, cond), call(doSmth, doSmth)] PREV:[jmp?(L6 [onException])]
} call(doSmth, doSmth) NEXT:[jmp(L8 [afterCatches])] PREV:[jmp?(L7 [onExceptionToFinallyBlock])]
catch (e: NullPointerException) { jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[call(doSmth, doSmth)]
doSmth1()
}
catch (e: Exception) {
doSmth2()
}
finally {
if (cond()) return
else continue
}) NEXT:[jmp?(L6 [onException])] PREV:[jf(L3 [loop exit point])]
jmp?(L6 [onException]) NEXT:[jmp?(L9 [catch 0]), jmp?(L7 [onExceptionToFinallyBlock])] PREV:[r(try { doSmth() } catch (e:..)]
jmp?(L7 [onExceptionToFinallyBlock]) NEXT:[r(cond), r(doSmth)] PREV:[jmp?(L6 [onException])]
r(doSmth) NEXT:[r(doSmth())] PREV:[jmp?(L7 [onExceptionToFinallyBlock])]
r(doSmth()) NEXT:[jmp(L8 [afterCatches])] PREV:[r(doSmth)]
jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[r(doSmth())]
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) NEXT:[w(e)] PREV:[jmp?(L9 [catch 0])]
w(e) NEXT:[r(doSmth1)] PREV:[v(e: NullPointerException)] w(e) NEXT:[call(doSmth1, doSmth1)] PREV:[v(e: NullPointerException)]
r(doSmth1) NEXT:[r(doSmth1())] PREV:[w(e)] call(doSmth1, doSmth1) NEXT:[jmp(L8 [afterCatches])] PREV:[w(e)]
r(doSmth1()) NEXT:[jmp(L8 [afterCatches])] PREV:[r(doSmth1)] jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[call(doSmth1, doSmth1)]
jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[r(doSmth1())]
L9 [catch 0]: L9 [catch 0]:
v(e: Exception) NEXT:[w(e)] PREV:[jmp?(L9 [catch 0])] v(e: Exception) NEXT:[w(e)] PREV:[jmp?(L9 [catch 0])]
w(e) NEXT:[r(doSmth2)] PREV:[v(e: Exception)] w(e) NEXT:[call(doSmth2, doSmth2)] PREV:[v(e: Exception)]
r(doSmth2) NEXT:[r(doSmth2())] PREV:[w(e)] call(doSmth2, doSmth2) NEXT:[jmp(L8 [afterCatches])] PREV:[w(e)]
r(doSmth2()) NEXT:[jmp(L8 [afterCatches])] PREV:[r(doSmth2)] jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[call(doSmth2, doSmth2)]
jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] PREV:[r(doSmth2())]
L8 [afterCatches]: L8 [afterCatches]:
jmp(L10 [skipFinallyToErrorBlock]) NEXT:[r(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]:
r(cond) NEXT:[r(cond())] PREV:[jmp?(L7 [onExceptionToFinallyBlock])] call(cond, cond) NEXT:[jf(L12)] PREV:[jmp?(L7 [onExceptionToFinallyBlock])]
r(cond()) NEXT:[jf(L12)] PREV:[r(cond)] jf(L12) NEXT:[jmp(L2 [loop entry point]), ret L1] PREV:[call(cond, cond)]
jf(L12) NEXT:[jmp(L2 [loop entry point]), ret L1] PREV:[r(cond())] ret L1 NEXT:[<END>] PREV:[jf(L12)]
ret L1 NEXT:[<END>] PREV:[jf(L12)] - jmp(L13) NEXT:[jmp(error)] PREV:[]
- jmp(L13) NEXT:[jmp(error)] PREV:[]
L12: L12:
jmp(L2 [loop entry point]) NEXT:[r(cond)] PREV:[jf(L12)] jmp(L2 [loop entry point]) NEXT:[call(cond, cond)] PREV:[jf(L12)]
L13: L13:
L14 [finish finally]: L14 [finish finally]:
- jmp(error) NEXT:[<ERROR>] PREV:[] - jmp(error) NEXT:[<ERROR>] PREV:[]
L10 [skipFinallyToErrorBlock]: L10 [skipFinallyToErrorBlock]:
r(cond) NEXT:[r(cond())] PREV:[jmp(L10 [skipFinallyToErrorBlock])] call(cond, cond) NEXT:[jf(copy L12)] PREV:[jmp(L10 [skipFinallyToErrorBlock])]
r(cond()) NEXT:[jf(copy L12)] PREV:[r(cond)] 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] PREV:[r(cond())] ret L1 NEXT:[<END>] PREV:[jf(copy L12)]
ret L1 NEXT:[<END>] PREV:[jf(copy L12)] - 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:[r(cond)] PREV:[jf(copy L12)] - jmp(L2 [loop entry point]) NEXT:[call(cond, cond)] PREV:[]
- jmp(L2 [loop entry point]) NEXT:[r(cond)] PREV:[]
L3 [loop exit point]: L3 [loop exit point]:
read (Unit) NEXT:[<END>] PREV:[jf(L3 [loop exit point])] read (Unit) NEXT:[<END>] 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> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== testCopy3 == == testCopy3 ==
fun testCopy3() { fun testCopy3() {
@@ -185,69 +188,50 @@ fun testCopy3() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { doSmth() } catch (e:..)] PREV:[] <START> NEXT:[jmp?(L2 [onException])] PREV:[]
r(try { jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[<START>]
doSmth() jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[call(cond, cond), call(doSmth, doSmth)] PREV:[jmp?(L2 [onException])]
} call(doSmth, doSmth) NEXT:[jmp(L4 [afterCatches])] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
catch (e: NullPointerException) { jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[call(doSmth, doSmth)]
doSmth1()
}
catch (e: Exception) {
doSmth2()
}
finally {
while (cond());
}) NEXT:[jmp?(L2 [onException])] PREV:[<START>]
jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])] PREV:[r(try { doSmth() } catch (e:..)]
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(while (cond())), r(doSmth)] PREV:[jmp?(L2 [onException])]
r(doSmth) NEXT:[r(doSmth())] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
r(doSmth()) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth)]
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[r(doSmth())]
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) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])]
w(e) NEXT:[r(doSmth1)] PREV:[v(e: NullPointerException)] w(e) NEXT:[call(doSmth1, doSmth1)] PREV:[v(e: NullPointerException)]
r(doSmth1) NEXT:[r(doSmth1())] PREV:[w(e)] call(doSmth1, doSmth1) NEXT:[jmp(L4 [afterCatches])] PREV:[w(e)]
r(doSmth1()) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth1)] jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[call(doSmth1, doSmth1)]
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[r(doSmth1())]
L5 [catch 0]: L5 [catch 0]:
v(e: Exception) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])] v(e: Exception) NEXT:[w(e)] PREV:[jmp?(L5 [catch 0])]
w(e) NEXT:[r(doSmth2)] PREV:[v(e: Exception)] w(e) NEXT:[call(doSmth2, doSmth2)] PREV:[v(e: Exception)]
r(doSmth2) NEXT:[r(doSmth2())] PREV:[w(e)] call(doSmth2, doSmth2) NEXT:[jmp(L4 [afterCatches])] PREV:[w(e)]
r(doSmth2()) NEXT:[jmp(L4 [afterCatches])] PREV:[r(doSmth2)] jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[call(doSmth2, doSmth2)]
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] PREV:[r(doSmth2())]
L4 [afterCatches]: L4 [afterCatches]:
jmp(L6 [skipFinallyToErrorBlock]) NEXT:[r(while (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]:
r(while (cond())) NEXT:[r(cond)] PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
L8 [loop entry point]: L8 [loop entry point]:
L11 [condition entry point]: L11 [condition entry point]:
r(cond) NEXT:[r(cond())] PREV:[r(while (cond())), jmp(L8 [loop entry point])] call(cond, cond) NEXT:[jf(L9 [loop exit point])] PREV:[jmp?(L3 [onExceptionToFinallyBlock]), jmp(L8 [loop entry point])]
r(cond()) NEXT:[jf(L9 [loop exit point])] PREV:[r(cond)] 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])] PREV:[r(cond())]
L10 [body entry point]: L10 [body entry point]:
jmp(L8 [loop entry point]) NEXT:[r(cond)] PREV:[jf(L9 [loop exit point])] jmp(L8 [loop entry point]) NEXT:[call(cond, cond)] PREV:[jf(L9 [loop exit point])]
L9 [loop exit point]: L9 [loop exit point]:
read (Unit) NEXT:[jmp(error)] PREV:[jf(L9 [loop exit point])] read (Unit) NEXT:[jmp(error)] PREV:[jf(L9 [loop exit point])]
L12 [finish finally]: L12 [finish finally]:
jmp(error) NEXT:[<ERROR>] PREV:[read (Unit)] jmp(error) NEXT:[<ERROR>] PREV:[read (Unit)]
L6 [skipFinallyToErrorBlock]: L6 [skipFinallyToErrorBlock]:
r(while (cond())) NEXT:[r(cond)] PREV:[jmp(L6 [skipFinallyToErrorBlock])] call(cond, cond) NEXT:[jf(copy L9 [loop exit point])] PREV:[jmp(L6 [skipFinallyToErrorBlock]), jmp(copy L8 [loop entry point])]
r(cond) NEXT:[r(cond())] PREV:[r(while (cond())), 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)]
r(cond()) NEXT:[jf(copy L9 [loop exit point])] PREV:[r(cond)] jmp(copy L8 [loop entry point]) NEXT:[call(cond, cond)] PREV:[jf(copy L9 [loop exit point])]
jf(copy L9 [loop exit point]) NEXT:[read (Unit), jmp(copy L8 [loop entry point])] PREV:[r(cond())] read (Unit) NEXT:[<END>] PREV:[jf(copy L9 [loop exit point])]
jmp(copy L8 [loop entry point]) NEXT:[r(cond)] PREV:[jf(copy L9 [loop exit point])]
read (Unit) NEXT:[<END>] PREV:[jf(copy L9 [loop exit point])]
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>] PREV:[read (Unit)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[jmp(error)] <ERROR> NEXT:[<SINK>] PREV:[jmp(error)]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== doTestCopy4 == == doTestCopy4 ==
fun doTestCopy4() : Int { fun doTestCopy4(list: List<String>?) : Int {
try { try {
doSmth() doSmth()
} }
@@ -258,25 +242,18 @@ fun doTestCopy4() : Int {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(try { doSmth() } finally {..)] PREV:[] <START> NEXT:[v(list: List<String>?)] PREV:[]
r(try { v(list: List<String>?) NEXT:[w(list)] PREV:[<START>]
doSmth() w(list) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[v(list: List<String>?)]
} jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(list), call(doSmth, doSmth)] PREV:[w(list)]
finally { call(doSmth, doSmth) NEXT:[jmp(L3 [skipFinallyToErrorBlock])] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
if(list != null) { jmp(L3 [skipFinallyToErrorBlock]) NEXT:[r(list)] PREV:[call(doSmth, doSmth)]
}
}) NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[<START>]
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(list), r(doSmth)] PREV:[r(try { doSmth() } finally {..)]
r(doSmth) NEXT:[r(doSmth())] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(doSmth()) NEXT:[jmp(L3 [skipFinallyToErrorBlock])] PREV:[r(doSmth)]
jmp(L3 [skipFinallyToErrorBlock]) NEXT:[r(list)] PREV:[r(doSmth())]
L2 [onExceptionToFinallyBlock]: L2 [onExceptionToFinallyBlock]:
L4 [start finally]: L4 [start finally]:
r(list) NEXT:[r(null)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] r(list) NEXT:[r(null)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
r(null) NEXT:[r(!=)] PREV:[r(list)] r(null) NEXT:[call(list != null, equals)] PREV:[r(list)]
r(!=) NEXT:[r(list != null)] PREV:[r(null)] call(list != null, equals) NEXT:[jf(L5)] PREV:[r(null)]
r(list != null) NEXT:[jf(L5)] PREV:[r(!=)] jf(L5) NEXT:[read (Unit), read (Unit)] PREV:[call(list != null, equals)]
jf(L5) NEXT:[read (Unit), read (Unit)] PREV:[r(list != null)]
read (Unit) NEXT:[jmp(L6)] PREV:[jf(L5)] read (Unit) NEXT:[jmp(L6)] PREV:[jf(L5)]
jmp(L6) NEXT:[jmp(error)] PREV:[read (Unit)] jmp(L6) NEXT:[jmp(error)] PREV:[read (Unit)]
L5: L5:
@@ -286,10 +263,9 @@ 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) NEXT:[r(null)] PREV:[jmp(L3 [skipFinallyToErrorBlock])]
r(null) NEXT:[r(!=)] PREV:[r(list)] r(null) NEXT:[call(list != null, equals)] PREV:[r(list)]
r(!=) NEXT:[r(list != null)] PREV:[r(null)] call(list != null, equals) NEXT:[jf(copy L5)] PREV:[r(null)]
r(list != null) NEXT:[jf(copy L5)] PREV:[r(!=)] jf(copy L5) NEXT:[read (Unit), read (Unit)] PREV:[call(list != null, equals)]
jf(copy L5) NEXT:[read (Unit), read (Unit)] PREV:[r(list != null)]
read (Unit) NEXT:[jmp(copy L6)] PREV:[jf(copy L5)] read (Unit) NEXT:[jmp(copy L6)] PREV:[jf(copy L5)]
jmp(copy L6) NEXT:[<END>] PREV:[read (Unit)] jmp(copy L6) NEXT:[<END>] PREV:[read (Unit)]
read (Unit) NEXT:[<END>] PREV:[jf(copy L5)] read (Unit) NEXT:[<END>] PREV:[jf(copy L5)]
+6 -1
View File
@@ -1,3 +1,8 @@
fun doSmth() {}
fun doSmth1() {}
fun doSmth2() {}
fun cond() {}
fun testCopy1() : Int { fun testCopy1() : Int {
try { try {
doSmth() doSmth()
@@ -46,7 +51,7 @@ fun testCopy3() {
} }
} }
fun doTestCopy4() : Int { fun doTestCopy4(list: List<String>?) : Int {
try { try {
doSmth() doSmth()
} }
+14 -19
View File
@@ -6,32 +6,27 @@ fun t1() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(for (i in 1..2) { doSmth(i..)] PREV:[] <START> NEXT:[r(1)] PREV:[]
r(for (i in 1..2) { r(1) NEXT:[r(2)] PREV:[<START>]
doSmth(i) r(2) NEXT:[call(.., rangeTo)] PREV:[r(1)]
}) NEXT:[r(1)] PREV:[<START>] call(.., rangeTo) NEXT:[v(i)] PREV:[r(2)]
r(1) NEXT:[r(2)] PREV:[r(for (i in 1..2) { doSmth(i..)] v(i) NEXT:[w(i)] PREV:[call(.., rangeTo)]
r(2) NEXT:[r(..)] PREV:[r(1)] w(i) NEXT:[jmp?(L2)] PREV:[v(i)]
r(..) NEXT:[r(1..2)] PREV:[r(2)]
r(1..2) NEXT:[v(i)] PREV:[r(..)]
v(i) NEXT:[w(i)] PREV:[r(1..2)]
w(i) NEXT:[jmp?(L2)] PREV:[v(i)]
L3: L3:
jmp?(L2) NEXT:[read (Unit), r(i)] PREV:[w(i)] jmp?(L2) NEXT:[read (Unit), r(i)] PREV:[w(i)]
L4 [loop entry point]: L4 [loop entry point]:
L5 [body entry point]: L5 [body entry point]:
r(i) NEXT:[r(doSmth)] PREV:[jmp?(L2), jmp?(L4 [loop entry point])] r(i) NEXT:[call(doSmth, doSmth)] PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
r(doSmth) NEXT:[r(doSmth(i))] PREV:[r(i)] call(doSmth, doSmth) NEXT:[jmp?(L4 [loop entry point])] PREV:[r(i)]
r(doSmth(i)) NEXT:[jmp?(L4 [loop entry point])] PREV:[r(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)] PREV:[r(doSmth(i))]
L2: L2:
read (Unit) NEXT:[<END>] PREV:[jmp?(L2), jmp?(L4 [loop entry point])] read (Unit) NEXT:[<END>] PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
L1: L1:
<END> NEXT:[<SINK>] PREV:[read (Unit)] <END> NEXT:[<SINK>] PREV:[read (Unit)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== doSmth == == doSmth ==
fun doSmth(i: Int) {} fun doSmth(i: Int) {}
+46 -50
View File
@@ -17,40 +17,38 @@ fun t1(b: Boolean) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(b: Boolean)] PREV:[] <START> NEXT:[v(b: Boolean)] PREV:[]
v(b: Boolean) NEXT:[w(b)] PREV:[<START>] v(b: Boolean) NEXT:[w(b)] PREV:[<START>]
w(b) NEXT:[v(var u: String)] PREV:[v(b: Boolean)] w(b) NEXT:[v(var u: String)] PREV:[v(b: Boolean)]
v(var u: String) NEXT:[r(b)] PREV:[w(b)] v(var u: String) NEXT:[r(b)] PREV:[w(b)]
r(b) NEXT:[jf(L2)] PREV:[v(var u: String)] r(b) NEXT:[jf(L2)] PREV:[v(var u: String)]
jf(L2) NEXT:[read (Unit), r("s")] PREV:[r(b)] jf(L2) NEXT:[read (Unit), r("s")] PREV:[r(b)]
r("s") NEXT:[w(u)] PREV:[jf(L2)] r("s") NEXT:[w(u)] PREV:[jf(L2)]
w(u) NEXT:[jmp(L3)] PREV:[r("s")] w(u) NEXT:[jmp(L3)] PREV:[r("s")]
jmp(L3) NEXT:[r(u)] PREV:[w(u)] jmp(L3) NEXT:[r(u)] PREV:[w(u)]
L2: L2:
read (Unit) NEXT:[r(u)] PREV:[jf(L2)] read (Unit) NEXT:[r(u)] PREV:[jf(L2)]
L3: L3:
r(u) NEXT:[r(doSmth)] PREV:[jmp(L3), read (Unit)] r(u) NEXT:[call(doSmth, doSmth)] PREV:[jmp(L3), read (Unit)]
r(doSmth) NEXT:[r(doSmth(u))] PREV:[r(u)] call(doSmth, doSmth) NEXT:[v(var r: String)] PREV:[r(u)]
r(doSmth(u)) NEXT:[v(var r: String)] PREV:[r(doSmth)] v(var r: String) NEXT:[r(b)] PREV:[call(doSmth, doSmth)]
v(var r: String) NEXT:[r(b)] PREV:[r(doSmth(u))] r(b) NEXT:[jf(L4)] PREV:[v(var r: String)]
r(b) NEXT:[jf(L4)] PREV:[v(var r: String)] jf(L4) NEXT:[r("t"), r("s")] PREV:[r(b)]
jf(L4) NEXT:[r("t"), r("s")] PREV:[r(b)] r("s") NEXT:[w(r)] PREV:[jf(L4)]
r("s") NEXT:[w(r)] PREV:[jf(L4)] w(r) NEXT:[jmp(L5)] PREV:[r("s")]
w(r) NEXT:[jmp(L5)] PREV:[r("s")] jmp(L5) NEXT:[r(r)] PREV:[w(r)]
jmp(L5) NEXT:[r(r)] PREV:[w(r)]
L4: L4:
r("t") NEXT:[w(r)] PREV:[jf(L4)] r("t") NEXT:[w(r)] PREV:[jf(L4)]
w(r) NEXT:[r(r)] PREV:[r("t")] w(r) NEXT:[r(r)] PREV:[r("t")]
L5: L5:
r(r) NEXT:[r(doSmth)] PREV:[jmp(L5), w(r)] r(r) NEXT:[call(doSmth, doSmth)] PREV:[jmp(L5), w(r)]
r(doSmth) NEXT:[r(doSmth(r))] PREV:[r(r)] call(doSmth, doSmth) NEXT:[<END>] PREV:[r(r)]
r(doSmth(r)) NEXT:[<END>] PREV:[r(doSmth)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[r(doSmth(r))] <END> NEXT:[<SINK>] PREV:[call(doSmth, doSmth)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== t2 == == t2 ==
fun t2(b: Boolean) { fun t2(b: Boolean) {
@@ -65,36 +63,34 @@ fun t2(b: Boolean) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(b: Boolean)] PREV:[] <START> NEXT:[v(b: Boolean)] PREV:[]
v(b: Boolean) NEXT:[w(b)] PREV:[<START>] v(b: Boolean) NEXT:[w(b)] PREV:[<START>]
w(b) NEXT:[v(val i = 3)] PREV:[v(b: Boolean)] w(b) NEXT:[v(val i = 3)] PREV:[v(b: Boolean)]
v(val i = 3) NEXT:[r(3)] PREV:[w(b)] v(val i = 3) NEXT:[r(3)] PREV:[w(b)]
r(3) NEXT:[w(i)] PREV:[v(val i = 3)] r(3) NEXT:[w(i)] PREV:[v(val i = 3)]
w(i) NEXT:[r(b)] PREV:[r(3)] w(i) NEXT:[r(b)] PREV:[r(3)]
r(b) NEXT:[jf(L2)] PREV:[w(i)] r(b) NEXT:[jf(L2)] PREV:[w(i)]
jf(L2) NEXT:[read (Unit), ret L1] PREV:[r(b)] jf(L2) NEXT:[read (Unit), ret L1] PREV:[r(b)]
ret L1 NEXT:[<END>] PREV:[jf(L2)] ret L1 NEXT:[<END>] PREV:[jf(L2)]
- jmp(L3) NEXT:[r(i)] PREV:[] - jmp(L3) NEXT:[r(i)] PREV:[]
L2: L2:
read (Unit) NEXT:[r(i)] PREV:[jf(L2)] read (Unit) NEXT:[r(i)] PREV:[jf(L2)]
L3: L3:
r(i) NEXT:[r(doSmth)] PREV:[read (Unit)] r(i) NEXT:[call(doSmth, doSmth)] PREV:[read (Unit)]
r(doSmth) NEXT:[r(doSmth(i))] PREV:[r(i)] call(doSmth, doSmth) NEXT:[r(i)] PREV:[r(i)]
r(doSmth(i)) NEXT:[r(i)] PREV:[r(doSmth)] r(i) NEXT:[jf(L4)] PREV:[call(doSmth, doSmth)]
r(i) NEXT:[r(i is Int)] PREV:[r(doSmth(i))] jf(L4) NEXT:[read (Unit), ret L1] PREV:[r(i)]
r(i is Int) NEXT:[jf(L4)] PREV:[r(i)] ret L1 NEXT:[<END>] PREV:[jf(L4)]
jf(L4) NEXT:[read (Unit), ret L1] PREV:[r(i is Int)] - jmp(L5) NEXT:[<END>] PREV:[]
ret L1 NEXT:[<END>] PREV:[jf(L4)]
- jmp(L5) NEXT:[<END>] PREV:[]
L4: L4:
read (Unit) NEXT:[<END>] PREV:[jf(L4)] read (Unit) NEXT:[<END>] 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> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
== doSmth == == doSmth ==
fun doSmth(s: String) {} fun doSmth(s: String) {}
+16 -14
View File
@@ -20,21 +20,23 @@ fun test(c: C) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(c: C)] PREV:[] <START> NEXT:[v(c: C)] PREV:[]
v(c: C) NEXT:[w(c)] PREV:[<START>] v(c: C) NEXT:[w(c)] PREV:[<START>]
w(c) NEXT:[r(c)] PREV:[v(c: C)] w(c) NEXT:[r(c)] PREV:[v(c: C)]
r(c) NEXT:[v(a)] PREV:[w(c)] r(c) NEXT:[v(a)] PREV:[w(c)]
v(a) NEXT:[w(a)] PREV:[r(c)] v(a) NEXT:[call(a, component1)] PREV:[r(c)]
w(a) NEXT:[v(b)] PREV:[v(a)] call(a, component1) NEXT:[w(a)] PREV:[v(a)]
v(b) NEXT:[w(b)] PREV:[w(a)] w(a) NEXT:[v(b)] PREV:[call(a, component1)]
w(b) NEXT:[v(val d = 1)] PREV:[v(b)] v(b) NEXT:[call(b, component2)] PREV:[w(a)]
v(val d = 1) NEXT:[r(1)] PREV:[w(b)] call(b, component2) NEXT:[w(b)] PREV:[v(b)]
r(1) NEXT:[w(d)] PREV:[v(val d = 1)] w(b) NEXT:[v(val d = 1)] PREV:[call(b, component2)]
w(d) NEXT:[<END>] PREV:[r(1)] v(val d = 1) NEXT:[r(1)] PREV:[w(b)]
r(1) NEXT:[w(d)] PREV:[v(val d = 1)]
w(d) NEXT:[<END>] PREV:[r(1)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[w(d)] <END> NEXT:[<SINK>] PREV:[w(d)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
@@ -41,11 +41,9 @@ L0:
r(b) NEXT:[r(object : A by b {})] PREV:[v(val o = object : A by b {})] r(b) NEXT:[r(object : A by b {})] PREV:[v(val o = object : A by b {})]
r(object : A by b {}) NEXT:[w(o)] PREV:[r(b)] r(object : A by b {}) NEXT:[w(o)] PREV:[r(b)]
w(o) NEXT:[r(o)] PREV:[r(object : A by b {})] w(o) NEXT:[r(o)] PREV:[r(object : A by b {})]
r(o) NEXT:[r(foo)] PREV:[w(o)] r(o) NEXT:[call(foo, foo)] PREV:[w(o)]
r(foo) NEXT:[r(foo())] PREV:[r(o)] call(foo, foo) NEXT:[ret(*) L1] PREV:[r(o)]
r(foo()) NEXT:[r(o.foo())] PREV:[r(foo)] ret(*) L1 NEXT:[<END>] PREV:[call(foo, foo)]
r(o.foo()) NEXT:[ret(*) L1] PREV:[r(foo())]
ret(*) L1 NEXT:[<END>] PREV:[r(o.foo())]
L1: L1:
<END> NEXT:[<SINK>] PREV:[ret(*) L1] <END> NEXT:[<SINK>] PREV:[ret(*) L1]
error: error:
@@ -6,17 +6,13 @@ fun main() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(while(1 > 0) { 2 }) ] PREV:[] <START> NEXT:[r(1)] PREV:[]
r(while(1 > 0) {
2
}) 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:[r(while(1 > 0) { 2 }) , jmp(L2 [loop entry point])] r(1) NEXT:[r(0)] PREV:[<START>, jmp(L2 [loop entry point])]
r(0) NEXT:[r(>)] PREV:[r(1)] r(0) NEXT:[call(>, compareTo)] PREV:[r(1)]
r(>) NEXT:[r(1 > 0)] PREV:[r(0)] call(>, compareTo) NEXT:[jf(L3 [loop exit point])] PREV:[r(0)]
r(1 > 0) NEXT:[jf(L3 [loop exit point])] PREV:[r(>)] jf(L3 [loop exit point]) NEXT:[read (Unit), r(2)] PREV:[call(>, compareTo)]
jf(L3 [loop exit point]) NEXT:[read (Unit), r(2)] PREV:[r(1 > 0)]
L4 [body entry point]: L4 [body entry point]:
r(2) NEXT:[jmp(L2 [loop entry point])] PREV:[jf(L3 [loop exit point])] r(2) NEXT:[jmp(L2 [loop entry point])] PREV:[jf(L3 [loop exit point])]
jmp(L2 [loop entry point]) NEXT:[r(1)] PREV:[r(2)] jmp(L2 [loop entry point]) NEXT:[r(1)] PREV:[r(2)]
@@ -36,24 +32,21 @@ fun dowhile() {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(do {return} while(1 > 0)) ] PREV:[] <START> NEXT:[ret L1] PREV:[]
r(do {return}
while(1 > 0)) 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:[r(do {return} while(1 > 0)) ] ret L1 NEXT:[<END>] PREV:[<START>]
L5 [condition entry point]: L5 [condition entry point]:
- r(1) NEXT:[r(0)] PREV:[] - r(1) NEXT:[r(0)] PREV:[]
- r(0) NEXT:[r(>)] PREV:[] - r(0) NEXT:[call(>, compareTo)] PREV:[]
- r(>) NEXT:[r(1 > 0)] PREV:[] - call(>, compareTo) NEXT:[jt(L2 [loop entry point])] PREV:[]
- r(1 > 0) NEXT:[jt(L2 [loop entry point])] 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) NEXT:[<END>] PREV:[]
L1: L1:
<END> NEXT:[<SINK>] PREV:[ret L1] <END> NEXT:[<SINK>] PREV:[ret L1]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,18 +4,17 @@ fun blockAndAndMismatch() : Boolean {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[r(false)] PREV:[] <START> NEXT:[r(false)] PREV:[]
r(false) NEXT:[jt(L2)] PREV:[<START>] r(false) NEXT:[jt(L2)] PREV:[<START>]
jt(L2) NEXT:[r((return false)), r(false || (return false))] PREV:[r(false)] jt(L2) NEXT:[r(false), r(false || (return false))] PREV:[r(false)]
r((return false)) NEXT:[r(false)] PREV:[jt(L2)] r(false) NEXT:[ret(*) L1] PREV:[jt(L2)]
r(false) NEXT:[ret(*) L1] PREV:[r((return false))] ret(*) L1 NEXT:[<END>] PREV:[r(false)]
ret(*) L1 NEXT:[<END>] PREV:[r(false)]
L2: L2:
r(false || (return false)) NEXT:[<END>] PREV:[jt(L2)] r(false || (return false)) NEXT:[<END>] 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> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================
@@ -4,15 +4,15 @@ fun test(s: String?) {
} }
--------------------- ---------------------
L0: L0:
<START> NEXT:[v(s: String?)] PREV:[] <START> NEXT:[v(s: String?)] PREV:[]
v(s: String?) NEXT:[w(s)] PREV:[<START>] v(s: String?) NEXT:[w(s)] PREV:[<START>]
w(s) NEXT:[r(s)] PREV:[v(s: String?)] w(s) NEXT:[r(s)] PREV:[v(s: String?)]
r(s) NEXT:[call(length, length)] PREV:[w(s)] r(s) NEXT:[r(length)] PREV:[w(s)]
call(length, length) NEXT:[<END>] PREV:[r(s)] r(length) NEXT:[<END>] PREV:[r(s)]
L1: L1:
<END> NEXT:[<SINK>] PREV:[call(length, length)] <END> NEXT:[<SINK>] PREV:[r(length)]
error: error:
<ERROR> NEXT:[<SINK>] PREV:[] <ERROR> NEXT:[<SINK>] PREV:[]
sink: sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>] <SINK> NEXT:[] PREV:[<ERROR>, <END>]
===================== =====================