Added exact label names for labels

This commit is contained in:
Svetlana Isakova
2014-08-29 19:51:54 +04:00
parent ebcac73874
commit 3d7c22f242
35 changed files with 353 additions and 353 deletions
@@ -118,7 +118,7 @@ public class JetControlFlowProcessor {
JetElement parent = PsiTreeUtil.getParentOfType(subroutine, JetElement.class);
assert parent != null;
Label afterDeclaration = builder.createUnboundLabel();
Label afterDeclaration = builder.createUnboundLabel("after local declaration");
builder.nondeterministicJump(afterDeclaration, parent, null);
generate(subroutine);
@@ -383,7 +383,7 @@ public class JetControlFlowProcessor {
else if (operationType == ELVIS) {
generateInstructions(left);
mark(expression);
Label afterElvis = builder.createUnboundLabel();
Label afterElvis = builder.createUnboundLabel("after elvis operator");
builder.jumpOnTrue(afterElvis, expression, builder.getBoundValue(left));
if (right != null) {
generateInstructions(right);
@@ -403,7 +403,7 @@ public class JetControlFlowProcessor {
JetExpression left = expression.getLeft();
JetExpression right = expression.getRight();
Label resultLabel = builder.createUnboundLabel();
Label resultLabel = builder.createUnboundLabel("result of boolean operation");
generateInstructions(left);
if (operationType == ANDAND) {
builder.jumpOnFalse(resultLabel, expression, builder.getBoundValue(left));
@@ -640,7 +640,7 @@ public class JetControlFlowProcessor {
if (condition != null) {
generateInstructions(condition);
}
Label elseLabel = builder.createUnboundLabel();
Label elseLabel = builder.createUnboundLabel("else branch");
builder.jumpOnFalse(elseLabel, expression, builder.getBoundValue(condition));
JetExpression thenBranch = expression.getThen();
if (thenBranch != null) {
@@ -650,7 +650,7 @@ public class JetControlFlowProcessor {
else {
builder.loadUnit(expression);
}
Label resultLabel = builder.createUnboundLabel();
Label resultLabel = builder.createUnboundLabel("'if' expression result");
builder.jump(resultLabel, expression);
builder.bindLabel(elseLabel);
JetExpression elseBranch = expression.getElse();
@@ -864,8 +864,8 @@ public class JetControlFlowProcessor {
declareLoopParameter(expression);
// TODO : primitive cases
Label loopExitPoint = builder.createUnboundLabel();
Label conditionEntryPoint = builder.createUnboundLabel();
Label loopExitPoint = builder.createUnboundLabel("'for' loop exit point");
Label conditionEntryPoint = builder.createUnboundLabel("'for' loop condition entry point");
builder.bindLabel(conditionEntryPoint);
builder.nondeterministicJump(loopExitPoint, expression, null);
@@ -1296,7 +1296,7 @@ public class JetControlFlowProcessor {
List<JetExpression> branches = new ArrayList<JetExpression>();
Label doneLabel = builder.createUnboundLabel();
Label doneLabel = builder.createUnboundLabel("after 'when' expression");
Label nextLabel = null;
for (Iterator<JetWhenEntry> iterator = expression.getEntries().iterator(); iterator.hasNext(); ) {
@@ -1309,7 +1309,7 @@ public class JetControlFlowProcessor {
trace.report(ELSE_MISPLACED_IN_WHEN.on(whenEntry));
}
}
Label bodyLabel = builder.createUnboundLabel();
Label bodyLabel = builder.createUnboundLabel("'when' entry body");
JetWhenCondition[] conditions = whenEntry.getConditions();
for (int i = 0; i < conditions.length; i++) {
@@ -1321,7 +1321,7 @@ public class JetControlFlowProcessor {
}
if (!isElse) {
nextLabel = builder.createUnboundLabel();
nextLabel = builder.createUnboundLabel("next 'when' entry");
JetWhenCondition lastCondition = KotlinPackage.lastOrNull(conditions);
builder.nondeterministicJump(nextLabel, expression, builder.getBoundValue(lastCondition));
}
@@ -18,17 +18,17 @@ L0:
r(2) -> <v1>
mark(1 < 2)
call(1 < 2, compareTo|<v0>, <v1>) -> <v2>
jf(L2|<v2>)
jf(L2 [else branch]|<v2>)
3 mark({ use(b) }) USE: in: {b=READ} out: {b=READ}
r(b) -> <v3> USE: in: {} out: {b=READ}
mark(use(b))
call(use(b), use|<v3>) -> <v4>
2 jmp(L3) USE: in: {} out: {}
L2:
2 jmp(L3 ['if' expression result]) USE: in: {} out: {}
L2 [else branch]:
3 mark({ b = true })
r(true) -> <v5> USE: in: {b=ONLY_WRITTEN_NEVER_READ} out: {b=ONLY_WRITTEN_NEVER_READ}
w(b|<v5>) INIT: in: {b=D} out: {b=ID} USE: in: {} out: {b=ONLY_WRITTEN_NEVER_READ}
L3:
L3 ['if' expression result]:
2 merge(if (1 < 2) { use(b) } else { b = true }|<v4>, !<v6>) -> <v7> INIT: in: {b=D} out: {b=D}
L1:
1 <END> INIT: in: {} out: {}
@@ -53,4 +53,4 @@ error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {}
=====================
=====================
@@ -15,9 +15,9 @@ L0:
w(a|<v0>) INIT: in: {a=D} out: {a=ID}
v(val f = { (x: Int) -> val y = x + a use(a) }) INIT: in: {a=ID} out: {a=ID, f=D}
mark({ (x: Int) -> val y = x + a use(a) }) INIT: in: {a=ID, f=D} out: {a=ID, f=D}
jmp?(L2)
jmp?(L2 [after local declaration])
d({ (x: Int) -> val y = x + a use(a) }) USE: in: {a=READ} out: {a=READ}
L2:
L2 [after local declaration]:
r({ (x: Int) -> val y = x + a use(a) }) -> <v1>
w(f|<v1>) INIT: in: {a=ID, f=D} out: {a=ID, f=ID}
L1:
@@ -9,9 +9,9 @@ L0:
1 <START> INIT: in: {} out: {}
v(val sum: (Int)->Int = { (x: Int) -> sum(x - 1) + x }) INIT: in: {} out: {sum=D}
mark({ (x: Int) -> sum(x - 1) + x }) INIT: in: {sum=D} out: {sum=D}
jmp?(L2)
jmp?(L2 [after local declaration])
d({ (x: Int) -> sum(x - 1) + x }) USE: in: {sum=READ} out: {sum=READ}
L2:
L2 [after local declaration]:
r({ (x: Int) -> sum(x - 1) + x }) -> <v0>
w(sum|<v0>) INIT: in: {sum=D} out: {sum=ID}
L1:
@@ -91,9 +91,9 @@ L0:
magic[IMPLICIT_RECEIVER](obj) -> <v3> INIT: in: {obj=D, x=D} out: {obj=D, x=D}
r(obj|<v3>) -> <v4>
w(x|<v4>) INIT: in: {obj=D, x=D} out: {obj=D, x=ID}
1 jmp?(L2) INIT: in: {obj=D} out: {obj=D}
1 jmp?(L2 [after local declaration]) INIT: in: {obj=D} out: {obj=D}
d(fun foo() { val y = obj }) USE: in: {obj=READ} out: {obj=READ}
L2:
L2 [after local declaration]:
r(object: A(obj) { { val x = obj } fun foo() { val y = obj } }) -> <v5>
w(obj|<v5>) INIT: in: {obj=D} out: {obj=ID}
L1:
@@ -142,4 +142,4 @@ error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {}
=====================
=====================
@@ -19,16 +19,16 @@ L0:
r(2) -> <v1>
mark(1 < 2)
call(1 < 2, compareTo|<v0>, <v1>) -> <v2>
jf(L2|<v2>)
jf(L2 [else branch]|<v2>)
3 mark({ b = false })
r(false) -> <v3> USE: in: {b=WRITTEN_AFTER_READ} out: {b=WRITTEN_AFTER_READ}
w(b|<v3>) INIT: in: {b=D} out: {b=ID} USE: in: {b=READ} out: {b=WRITTEN_AFTER_READ}
2 jmp(L3) INIT: in: {b=ID} out: {b=ID} USE: in: {b=READ} out: {b=READ}
L2:
2 jmp(L3 ['if' expression result]) INIT: in: {b=ID} out: {b=ID} USE: in: {b=READ} out: {b=READ}
L2 [else branch]:
3 mark({ b = true }) INIT: in: {b=D} out: {b=D}
r(true) -> <v5> USE: in: {b=WRITTEN_AFTER_READ} out: {b=WRITTEN_AFTER_READ}
w(b|<v5>) INIT: in: {b=D} out: {b=ID} USE: in: {b=READ} out: {b=WRITTEN_AFTER_READ}
L3:
L3 ['if' expression result]:
2 merge(if (1 < 2) { b = false } else { b = true }|!<v4>, !<v6>) -> <v7> INIT: in: {b=ID} out: {b=ID}
error(use(b), No resolved call) USE: in: {b=READ} out: {b=READ}
r(b) -> <v8> USE: in: {} out: {b=READ}
@@ -41,4 +41,4 @@ error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
=====================
@@ -21,8 +21,8 @@ L0:
2 mark({ for (i in numbers) { val b: Boolean if (1 < 2) { b = false } else { b = true } use(b) continue } }) INIT: in: {numbers=ID} out: {numbers=ID} USE: in: {numbers=READ} out: {numbers=READ}
3 r(numbers) -> <v1> USE: in: {} out: {numbers=READ}
v(i) INIT: in: {numbers=ID} out: {i=D, numbers=ID}
L3:
jmp?(L2) INIT: in: {i=D, numbers=ID} out: {i=D, numbers=ID}
L3 ['for' loop condition entry point]:
jmp?(L2 ['for' loop exit point]) INIT: in: {i=D, numbers=ID} out: {i=D, numbers=ID}
L4 [loop entry point]:
L5 [body entry point]:
magic[LOOP_RANGE_ITERATION](numbers|<v1>) -> <v2>
@@ -35,23 +35,23 @@ L5 [body entry point]:
r(2) -> <v4>
mark(1 < 2)
call(1 < 2, compareTo|<v3>, <v4>) -> <v5>
jf(L6|<v5>)
jf(L6 [else branch]|<v5>)
5 mark({ b = false })
r(false) -> <v6> USE: in: {b=WRITTEN_AFTER_READ} out: {b=WRITTEN_AFTER_READ}
w(b|<v6>) INIT: in: {b=D, i=ID, numbers=ID} out: {b=ID, i=ID, numbers=ID} USE: in: {b=READ} out: {b=WRITTEN_AFTER_READ}
4 jmp(L7) INIT: in: {b=ID, i=ID, numbers=ID} out: {b=ID, i=ID, numbers=ID} USE: in: {b=READ} out: {b=READ}
L6:
4 jmp(L7 ['if' expression result]) INIT: in: {b=ID, i=ID, numbers=ID} out: {b=ID, i=ID, numbers=ID} USE: in: {b=READ} out: {b=READ}
L6 [else branch]:
5 mark({ b = true }) INIT: in: {b=D, i=ID, numbers=ID} out: {b=D, i=ID, numbers=ID}
r(true) -> <v8> USE: in: {b=WRITTEN_AFTER_READ} out: {b=WRITTEN_AFTER_READ}
w(b|<v8>) INIT: in: {b=D, i=ID, numbers=ID} out: {b=ID, i=ID, numbers=ID} USE: in: {b=READ} out: {b=WRITTEN_AFTER_READ}
L7:
L7 ['if' expression result]:
4 merge(if (1 < 2) { b = false } else { b = true }|!<v7>, !<v9>) -> <v10> INIT: in: {b=ID, i=ID, numbers=ID} out: {b=ID, i=ID, numbers=ID} USE: in: {b=READ} out: {b=READ}
r(b) -> <v11> USE: in: {} out: {b=READ}
mark(use(b))
call(use(b), use|<v11>) -> <v12>
jmp(L4 [loop entry point]) USE: in: {} out: {}
- 3 jmp?(L4 [loop entry point])
L2:
L2 ['for' loop exit point]:
read (Unit) INIT: in: {i=D, numbers=ID} out: {i=D, numbers=ID}
L1:
1 <END> INIT: in: {numbers=ID} out: {numbers=ID}
@@ -76,4 +76,4 @@ error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {}
=====================
=====================
@@ -17,8 +17,8 @@ L0:
mark(1..10)
call(1..10, rangeTo|<v1>, <v2>) -> <v3>
v(i) INIT: in: {} out: {i=D}
L3:
jmp?(L2) INIT: in: {i=D} out: {i=D}
L3 ['for' loop condition entry point]:
jmp?(L2 ['for' loop exit point]) INIT: in: {i=D} out: {i=D}
L4 [loop entry point]:
L5 [body entry point]:
magic[LOOP_RANGE_ITERATION](1..10|<v3>) -> <v4>
@@ -29,7 +29,7 @@ L5 [body entry point]:
r(i) -> <v5> INIT: in: {a=D, i=ID} out: {a=D, i=ID}
w(a|<v5>) INIT: in: {a=D, i=ID} out: {a=ID, i=ID}
3 jmp?(L4 [loop entry point]) INIT: in: {i=ID} out: {i=ID} USE: in: {i=READ} out: {i=READ}
L2:
L2 ['for' loop exit point]:
read (Unit) INIT: in: {i=D} out: {i=D}
2 mark("after") INIT: in: {} out: {}
r("after") -> <v6>
@@ -39,4 +39,4 @@ error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
=====================
@@ -18,9 +18,9 @@ L0:
w(b|<v1>) INIT: in: {b=D} out: {b=ID}
v(val f = { (x: Int) -> val a = x + b }) INIT: in: {b=ID} out: {b=ID, f=D}
mark({ (x: Int) -> val a = x + b }) INIT: in: {b=ID, f=D} out: {b=ID, f=D}
jmp?(L2)
jmp?(L2 [after local declaration])
d({ (x: Int) -> val a = x + b }) USE: in: {b=READ} out: {b=READ}
L2:
L2 [after local declaration]:
r({ (x: Int) -> val a = x + b }) -> <v2>
w(f|<v2>) INIT: in: {b=ID, f=D} out: {b=ID, f=ID}
mark("after") INIT: in: {b=ID, f=ID} out: {b=ID, f=ID}
@@ -55,4 +55,4 @@ error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {}
=====================
=====================
@@ -17,18 +17,18 @@ L0:
r("before") -> <v0>
mark(if (true) { val a = 1 } else { val b = 2 })
r(true) -> <v1>
jf(L2|<v1>)
jf(L2 [else branch]|<v1>)
3 mark({ val a = 1 })
v(val a = 1) INIT: in: {} out: {a=D}
r(1) -> <v2> INIT: in: {a=D} out: {a=D}
w(a|<v2>) INIT: in: {a=D} out: {a=ID}
2 jmp(L3) INIT: in: {} out: {}
L2:
2 jmp(L3 ['if' expression result]) INIT: in: {} out: {}
L2 [else branch]:
3 mark({ val b = 2 })
v(val b = 2) INIT: in: {} out: {b=D}
r(2) -> <v3> INIT: in: {b=D} out: {b=D}
w(b|<v3>) INIT: in: {b=D} out: {b=ID}
L3:
L3 ['if' expression result]:
2 merge(if (true) { val a = 1 } else { val b = 2 }|!<v4>, !<v5>) -> <v6> INIT: in: {} out: {}
mark("after")
r("after") -> <v7>
@@ -38,4 +38,4 @@ error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
=====================
@@ -25,9 +25,9 @@ L0:
magic[IMPLICIT_RECEIVER](x) -> <v2> INIT: in: {a=D, x=ID} out: {a=D, x=ID}
r(x|<v2>) -> <v3>
w(a|<v3>) INIT: in: {a=D, x=ID} out: {a=ID, x=ID}
2 jmp?(L2) INIT: in: {x=ID} out: {x=ID}
2 jmp?(L2 [after local declaration]) INIT: in: {x=ID} out: {x=ID}
d(fun foo() { val b = x }) USE: in: {x=READ} out: {x=READ}
L2:
L2 [after local declaration]:
mark("after")
r("after") -> <v4>
L1:
@@ -55,4 +55,4 @@ error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
=====================
@@ -16,9 +16,9 @@ L0:
v(val b = 1) INIT: in: {} out: {b=D}
r(1) -> <v1> INIT: in: {b=D} out: {b=D}
w(b|<v1>) INIT: in: {b=D} out: {b=ID}
jmp?(L2) INIT: in: {b=ID} out: {b=ID}
jmp?(L2 [after local declaration]) INIT: in: {b=ID} out: {b=ID}
d(fun local(x: Int) { val a = x + b }) USE: in: {b=READ} out: {b=READ}
L2:
L2 [after local declaration]:
mark("after")
r("after") -> <v2>
L1:
@@ -51,4 +51,4 @@ error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {}
=====================
=====================
@@ -14,9 +14,9 @@ L0:
v(val b = 1) INIT: in: {} out: {b=D}
r(1) -> <v1> INIT: in: {b=D} out: {b=D}
w(b|<v1>) INIT: in: {b=D} out: {b=ID}
jmp?(L2) INIT: in: {b=ID} out: {b=ID}
jmp?(L2 [after local declaration]) INIT: in: {b=ID} out: {b=ID}
d(fun local(x: Int) = x + b) USE: in: {b=READ} out: {b=READ}
L2:
L2 [after local declaration]:
mark("after")
r("after") -> <v2>
L1:
@@ -45,4 +45,4 @@ error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {}
=====================
=====================
@@ -21,9 +21,9 @@ L0:
v(val a = 1) INIT: in: {} out: {a=D}
r(1) -> <v1> INIT: in: {a=D} out: {a=D}
w(a|<v1>) INIT: in: {a=D} out: {a=ID}
2 jmp?(L2) INIT: in: {} out: {}
2 jmp?(L2 [after local declaration]) INIT: in: {} out: {}
d(fun foo() { val b = 2 })
L2:
L2 [after local declaration]:
mark("after")
r("after") -> <v2>
L1:
@@ -50,4 +50,4 @@ error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
=====================
@@ -23,9 +23,9 @@ L0:
v(val x = 1) INIT: in: {bar=D} out: {bar=D, x=D}
r(1) -> <v1> INIT: in: {bar=D, x=D} out: {bar=D, x=D}
w(x|<v1>) INIT: in: {bar=D, x=D} out: {bar=D, x=ID}
2 jmp?(L2) INIT: in: {bar=D} out: {bar=D}
2 jmp?(L2 [after local declaration]) INIT: in: {bar=D} out: {bar=D}
d(fun foo() { val a = 2 })
L2:
L2 [after local declaration]:
r(object { { val x = 1 } fun foo() { val a = 2 } }) -> <v2>
w(bar|<v2>) INIT: in: {bar=D} out: {bar=ID}
mark("after") INIT: in: {bar=ID} out: {bar=ID}
@@ -54,4 +54,4 @@ error:
<ERROR>
sink:
<SINK> USE: in: {} out: {}
=====================
=====================
@@ -15,13 +15,13 @@ L0:
1 <START> INIT: in: {} out: {} USE: in: {} out: {}
2 mark({ class A { var a : Int get() { return $a } set(v: Int) { $a = v } } })
v(var a : Int get() { return $a } set(v: Int) { $a = v }) INIT: in: {} out: {a=D}
jmp?(L2) INIT: in: {a=D} out: {a=D}
jmp?(L2 [after local declaration]) INIT: in: {a=D} out: {a=D}
d(get() { return $a }) USE: in: {a=READ} out: {a=READ}
L2:
jmp?(L5)
L2 [after local declaration]:
jmp?(L5 [after local declaration])
d(set(v: Int) { $a = v }) USE: in: {a=ONLY_WRITTEN_NEVER_READ} out: {a=ONLY_WRITTEN_NEVER_READ}
L1:
L5:
L5 [after local declaration]:
1 <END> INIT: in: {} out: {}
error:
<ERROR>
@@ -66,4 +66,4 @@ error:
<ERROR> INIT: in: {} out: {}
sink:
<SINK> INIT: in: {a=I, v=ID} out: {a=I, v=ID} USE: in: {} out: {}
=====================
=====================
@@ -36,10 +36,10 @@ L0:
mark(genfun<Any>())
call(genfun<Any>(), genfun) -> <v8>
mark({1})
jmp?(L2) NEXT:[r({1}) -> <v9>, d({1})]
jmp?(L2 [after local declaration]) NEXT:[r({1}) -> <v9>, d({1})]
d({1}) NEXT:[<SINK>]
L2:
r({1}) -> <v9> PREV:[jmp?(L2)]
L2 [after local declaration]:
r({1}) -> <v9> PREV:[jmp?(L2 [after local declaration])]
mark(flfun {1})
call(flfun {1}, flfun|<v9>) -> <v10>
mark(3.equals(4))
@@ -56,15 +56,15 @@ L2:
mark(1 + 2)
call(1 + 2, plus|<v17>, <v18>) -> <v19>
r(a) -> <v20>
jf(L5|<v20>) NEXT:[magic[AND](a && true|<v20>, <v21>) -> <v22>, r(true) -> <v21>]
jf(L5 [result of boolean operation]|<v20>) NEXT:[magic[AND](a && true|<v20>, <v21>) -> <v22>, r(true) -> <v21>]
r(true) -> <v21>
L5:
magic[AND](a && true|<v20>, <v21>) -> <v22> PREV:[jf(L5|<v20>), r(true) -> <v21>]
L5 [result of boolean operation]:
magic[AND](a && true|<v20>, <v21>) -> <v22> PREV:[jf(L5 [result of boolean operation]|<v20>), r(true) -> <v21>]
r(a) -> <v23>
jt(L6|<v23>) NEXT:[r(false) -> <v24>, magic[OR](a || false|<v23>, <v24>) -> <v25>]
jt(L6 [result of boolean operation]|<v23>) NEXT:[r(false) -> <v24>, magic[OR](a || false|<v23>, <v24>) -> <v25>]
r(false) -> <v24>
L6:
magic[OR](a || false|<v23>, <v24>) -> <v25> PREV:[jt(L6|<v23>), r(false) -> <v24>]
L6 [result of boolean operation]:
magic[OR](a || false|<v23>, <v24>) -> <v25> PREV:[jt(L6 [result of boolean operation]|<v23>), r(false) -> <v24>]
L1:
1 <END> NEXT:[<SINK>]
error:
@@ -15,22 +15,22 @@ L0:
2 mark({ for (e in c) { { break } } })
3 r(c) -> <v1>
v(e)
L3:
jmp?(L2) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](c|<v1>) -> <v2>]
L3 ['for' loop condition entry point]:
jmp?(L2 ['for' loop exit point]) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](c|<v1>) -> <v2>]
L4 [loop entry point]:
L5 [body entry point]:
magic[LOOP_RANGE_ITERATION](c|<v1>) -> <v2> PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
magic[LOOP_RANGE_ITERATION](c|<v1>) -> <v2> PREV:[jmp?(L2 ['for' loop exit point]), jmp?(L4 [loop entry point])]
w(e|<v2>)
mark(for (e in c) { { break } })
4 mark({ { break } })
mark({ break })
jmp?(L6) NEXT:[r({ break }) -> <v3>, d({ break })]
jmp?(L6 [after local declaration]) NEXT:[r({ break }) -> <v3>, d({ break })]
d({ break }) NEXT:[<SINK>]
L6:
r({ break }) -> <v3> PREV:[jmp?(L6)]
L6 [after local declaration]:
r({ break }) -> <v3> PREV:[jmp?(L6 [after local declaration])]
3 jmp?(L4 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](c|<v1>) -> <v2>, read (Unit)]
L2:
read (Unit) PREV:[jmp?(L2), jmp(L2), jmp?(L4 [loop entry point])]
L2 ['for' loop exit point]:
read (Unit) PREV:[jmp?(L2 ['for' loop exit point]), jmp(L2 ['for' loop exit point]), jmp?(L4 [loop entry point])]
L1:
1 <END> NEXT:[<SINK>]
error:
@@ -46,12 +46,12 @@ sink:
L7:
5 <START>
6 mark(break)
jmp(L2) NEXT:[read (Unit)]
- 5 ret(*|!<v0>) L8 PREV:[]
jmp(L2 ['for' loop exit point]) NEXT:[read (Unit)]
- 5 ret(*|!<v0>) L8 PREV:[]
L8:
<END> NEXT:[<SINK>] PREV:[]
<END> NEXT:[<SINK>] PREV:[]
error:
<ERROR> PREV:[]
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
<SINK> PREV:[<ERROR>, <END>]
=====================
@@ -56,17 +56,17 @@ L0:
r(3) -> <v2>
mark(2 > 3)
call(2 > 3, compareTo|<v1>, <v2>) -> <v3>
jf(L3|<v3>) NEXT:[read (Unit), mark({ return })]
jf(L3 [else branch]|<v3>) NEXT:[read (Unit), mark({ return })]
4 mark({ return })
L4 [start finally]:
5 mark({ 2 })
r(2) -> <v4>
L5 [finish finally]:
4 ret L1 NEXT:[<END>]
- 3 jmp(L6) NEXT:[merge(if (2 > 3) { return }|!<v5>) -> <v6>] PREV:[]
L3:
read (Unit) PREV:[jf(L3|<v3>)]
L6:
- 3 jmp(L6 ['if' expression result]) NEXT:[merge(if (2 > 3) { return }|!<v5>) -> <v6>] PREV:[]
L3 [else branch]:
read (Unit) PREV:[jf(L3 [else branch]|<v3>)]
L6 ['if' expression result]:
merge(if (2 > 3) { return }|!<v5>) -> <v6>
2 jmp(L7 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L2 [onExceptionToFinallyBlock]:
@@ -107,10 +107,10 @@ L0:
r(1) -> <v0>
mark(@l{ () -> if (2 > 3) { return@l } })
mark({ () -> if (2 > 3) { return@l } })
jmp?(L3) NEXT:[r({ () -> if (2 > 3) { return@l } }) -> <v1>, d({ () -> if (2 > 3) { return@l } })]
jmp?(L3 [after local declaration]) NEXT:[r({ () -> if (2 > 3) { return@l } }) -> <v1>, d({ () -> if (2 > 3) { return@l } })]
d({ () -> if (2 > 3) { return@l } }) NEXT:[<SINK>]
L3:
r({ () -> if (2 > 3) { return@l } }) -> <v1> PREV:[jmp?(L3)]
L3 [after local declaration]:
r({ () -> if (2 > 3) { return@l } }) -> <v1> PREV:[jmp?(L3 [after local declaration])]
2 jmp(L8 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L2 [onExceptionToFinallyBlock]:
L9 [start finally]:
@@ -144,13 +144,13 @@ L4:
r(3) -> <v1>
mark(2 > 3)
call(2 > 3, compareTo|<v0>, <v1>) -> <v2>
jf(L6|<v2>) NEXT:[read (Unit), mark({ return@l })]
jf(L6 [else branch]|<v2>) NEXT:[read (Unit), mark({ return@l })]
6 mark({ return@l })
ret L5 NEXT:[<END>]
- 5 jmp(L7) NEXT:[merge(if (2 > 3) { return@l }|!<v3>) -> <v4>] PREV:[]
L6:
read (Unit) PREV:[jf(L6|<v2>)]
L7:
- 5 jmp(L7 ['if' expression result]) NEXT:[merge(if (2 > 3) { return@l }|!<v3>) -> <v4>] PREV:[]
L6 [else branch]:
read (Unit) PREV:[jf(L6 [else branch]|<v2>)]
L7 ['if' expression result]:
merge(if (2 > 3) { return@l }|!<v3>) -> <v4>
L5:
4 <END> NEXT:[<SINK>] PREV:[ret L5, merge(if (2 > 3) { return@l }|!<v3>) -> <v4>]
@@ -178,10 +178,10 @@ L0:
2 mark({ @l{ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } } })
mark(@l{ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } })
mark({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } })
jmp?(L2) NEXT:[r({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) -> <v0>, d({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } })]
jmp?(L2 [after local declaration]) NEXT:[r({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) -> <v0>, d({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } })]
d({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) NEXT:[<SINK>]
L2:
r({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) -> <v0> PREV:[jmp?(L2)]
L2 [after local declaration]:
r({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) -> <v0> PREV:[jmp?(L2 [after local declaration])]
L1:
1 <END> NEXT:[<SINK>]
error:
@@ -213,17 +213,17 @@ L3:
r(3) -> <v2>
mark(2 > 3)
call(2 > 3, compareTo|<v1>, <v2>) -> <v3>
jf(L6|<v3>) NEXT:[read (Unit), mark({ return@l })]
jf(L6 [else branch]|<v3>) NEXT:[read (Unit), mark({ return@l })]
6 mark({ return@l })
L7 [start finally]:
7 mark({ 2 })
r(2) -> <v4>
L8 [finish finally]:
6 ret L4 NEXT:[<END>]
- 5 jmp(L9) NEXT:[merge(if (2 > 3) { return@l }|!<v5>) -> <v6>] PREV:[]
L6:
read (Unit) PREV:[jf(L6|<v3>)]
L9:
- 5 jmp(L9 ['if' expression result]) NEXT:[merge(if (2 > 3) { return@l }|!<v5>) -> <v6>] PREV:[]
L6 [else branch]:
read (Unit) PREV:[jf(L6 [else branch]|<v3>)]
L9 ['if' expression result]:
merge(if (2 > 3) { return@l }|!<v5>) -> <v6>
4 jmp(L10 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L5 [onExceptionToFinallyBlock]:
@@ -275,17 +275,17 @@ L4 [body entry point]:
r(3) -> <v4>
mark(2 > 3)
call(2 > 3, compareTo|<v3>, <v4>) -> <v5>
jf(L7|<v5>) NEXT:[read (Unit), mark({ break @l })]
jf(L7 [else branch]|<v5>) NEXT:[read (Unit), mark({ break @l })]
5 mark({ break @l })
L8 [start finally]:
6 mark({ 2 })
r(2) -> <v6>
L9 [finish finally]:
5 jmp(L3 [loop exit point]) NEXT:[read (Unit)]
- 4 jmp(L10) NEXT:[merge(if (2 > 3) { break @l }|!<v7>) -> <v8>] PREV:[]
L7:
read (Unit) PREV:[jf(L7|<v5>)]
L10:
- 4 jmp(L10 ['if' expression result]) NEXT:[merge(if (2 > 3) { break @l }|!<v7>) -> <v8>] PREV:[]
L7 [else branch]:
read (Unit) PREV:[jf(L7 [else branch]|<v5>)]
L10 ['if' expression result]:
merge(if (2 > 3) { break @l }|!<v7>) -> <v8>
3 jmp(L11 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L6 [onExceptionToFinallyBlock]:
@@ -341,13 +341,13 @@ L5 [body entry point]:
r(3) -> <v4>
mark(2 > 3)
call(2 > 3, compareTo|<v3>, <v4>) -> <v5>
jf(L7|<v5>) NEXT:[read (Unit), mark({ break @l })]
jf(L7 [else branch]|<v5>) NEXT:[read (Unit), mark({ break @l })]
5 mark({ break @l })
jmp(L4 [loop exit point]) NEXT:[read (Unit)]
- 4 jmp(L8) NEXT:[merge(if (2 > 3) { break @l }|!<v6>) -> <v7>] PREV:[]
L7:
read (Unit) PREV:[jf(L7|<v5>)]
L8:
- 4 jmp(L8 ['if' expression result]) NEXT:[merge(if (2 > 3) { break @l }|!<v6>) -> <v7>] PREV:[]
L7 [else branch]:
read (Unit) PREV:[jf(L7 [else branch]|<v5>)]
L8 ['if' expression result]:
merge(if (2 > 3) { break @l }|!<v6>) -> <v7>
3 jmp(L3 [loop entry point]) NEXT:[r(true) -> <v0>]
L4 [loop exit point]:
@@ -405,13 +405,13 @@ L5 [body entry point]:
r(3) -> <v4>
mark(2 > 3)
call(2 > 3, compareTo|<v3>, <v4>) -> <v5>
jf(L7|<v5>) NEXT:[read (Unit), mark({ break @l })]
jf(L7 [else branch]|<v5>) NEXT:[read (Unit), mark({ break @l })]
5 mark({ break @l })
jmp(L4 [loop exit point]) NEXT:[read (Unit)]
- 4 jmp(L8) NEXT:[merge(if (2 > 3) { break @l }|!<v6>) -> <v7>] PREV:[]
L7:
read (Unit) PREV:[jf(L7|<v5>)]
L8:
- 4 jmp(L8 ['if' expression result]) NEXT:[merge(if (2 > 3) { break @l }|!<v6>) -> <v7>] PREV:[]
L7 [else branch]:
read (Unit) PREV:[jf(L7 [else branch]|<v5>)]
L8 ['if' expression result]:
merge(if (2 > 3) { break @l }|!<v6>) -> <v7>
3 jmp(L3 [loop entry point]) NEXT:[r(true) -> <v0>]
L4 [loop exit point]:
@@ -460,11 +460,11 @@ L0:
mark(1..a)
call(1..a, rangeTo|<v1>, <v2>) -> <v3>
v(i)
L3:
jmp?(L2) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4>]
L3 ['for' loop condition entry point]:
jmp?(L2 ['for' loop exit point]) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4>]
L4 [loop entry point]:
L5 [body entry point]:
magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4> PREV:[jmp?(L2), jmp(L4 [loop entry point]), jmp?(L4 [loop entry point])]
magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4> PREV:[jmp?(L2 ['for' loop exit point]), jmp(L4 [loop entry point]), jmp?(L4 [loop entry point])]
w(i|<v4>)
mark(for (i in 1..a) { try { 1 if (2 > 3) { continue @l } } finally { 2 } })
4 mark({ try { 1 if (2 > 3) { continue @l } } finally { 2 } })
@@ -477,17 +477,17 @@ L5 [body entry point]:
r(3) -> <v7>
mark(2 > 3)
call(2 > 3, compareTo|<v6>, <v7>) -> <v8>
jf(L7|<v8>) NEXT:[read (Unit), mark({ continue @l })]
jf(L7 [else branch]|<v8>) NEXT:[read (Unit), mark({ continue @l })]
6 mark({ continue @l })
L8 [start finally]:
7 mark({ 2 })
r(2) -> <v9>
L9 [finish finally]:
6 jmp(L4 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4>]
- 5 jmp(L10) NEXT:[merge(if (2 > 3) { continue @l }|!<v10>) -> <v11>] PREV:[]
L7:
read (Unit) PREV:[jf(L7|<v8>)]
L10:
- 5 jmp(L10 ['if' expression result]) NEXT:[merge(if (2 > 3) { continue @l }|!<v10>) -> <v11>] PREV:[]
L7 [else branch]:
read (Unit) PREV:[jf(L7 [else branch]|<v8>)]
L10 ['if' expression result]:
merge(if (2 > 3) { continue @l }|!<v10>) -> <v11>
4 jmp(L11 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L6 [onExceptionToFinallyBlock]:
@@ -499,8 +499,8 @@ L11 [skipFinallyToErrorBlock]:
r(2) -> <v9>
4 merge(try { 1 if (2 > 3) { continue @l } } finally { 2 }|<v11>) -> <v12>
3 jmp?(L4 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4>, read (Unit)]
L2:
read (Unit) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
L2 ['for' loop exit point]:
read (Unit) PREV:[jmp?(L2 ['for' loop exit point]), jmp?(L4 [loop entry point])]
L1:
1 <END> NEXT:[<SINK>]
error:
@@ -538,11 +538,11 @@ L0:
mark(1..a)
call(1..a, rangeTo|<v1>, <v2>) -> <v3>
v(i)
L4:
jmp?(L3) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4>]
L4 ['for' loop condition entry point]:
jmp?(L3 ['for' loop exit point]) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4>]
L5 [loop entry point]:
L6 [body entry point]:
magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4> PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])]
magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4> PREV:[jmp?(L3 ['for' loop exit point]), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])]
w(i|<v4>)
mark(for (i in 1..a) { 1 if (2 > 3) { continue @l } })
5 mark({ 1 if (2 > 3) { continue @l } })
@@ -552,17 +552,17 @@ L6 [body entry point]:
r(3) -> <v7>
mark(2 > 3)
call(2 > 3, compareTo|<v6>, <v7>) -> <v8>
jf(L7|<v8>) NEXT:[read (Unit), mark({ continue @l })]
jf(L7 [else branch]|<v8>) NEXT:[read (Unit), mark({ continue @l })]
6 mark({ continue @l })
jmp(L5 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4>]
- 5 jmp(L8) NEXT:[merge(if (2 > 3) { continue @l }|!<v9>) -> <v10>] PREV:[]
L7:
read (Unit) PREV:[jf(L7|<v8>)]
L8:
- 5 jmp(L8 ['if' expression result]) NEXT:[merge(if (2 > 3) { continue @l }|!<v9>) -> <v10>] PREV:[]
L7 [else branch]:
read (Unit) PREV:[jf(L7 [else branch]|<v8>)]
L8 ['if' expression result]:
merge(if (2 > 3) { continue @l }|!<v9>) -> <v10>
4 jmp?(L5 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4>, read (Unit)]
L3:
read (Unit) PREV:[jmp?(L3), jmp?(L5 [loop entry point])]
L3 ['for' loop exit point]:
read (Unit) PREV:[jmp?(L3 ['for' loop exit point]), jmp?(L5 [loop entry point])]
3 r(5) -> <v12>
2 jmp(L9 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L2 [onExceptionToFinallyBlock]:
@@ -611,11 +611,11 @@ L0:
mark(1..a)
call(1..a, rangeTo|<v1>, <v2>) -> <v3>
v(i)
L4:
jmp?(L3) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4>]
L4 ['for' loop condition entry point]:
jmp?(L3 ['for' loop exit point]) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4>]
L5 [loop entry point]:
L6 [body entry point]:
magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4> PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])]
magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4> PREV:[jmp?(L3 ['for' loop exit point]), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])]
w(i|<v4>)
mark(for (i in 1..a) { 1 if (2 > 3) { continue @l } })
5 mark({ 1 if (2 > 3) { continue @l } })
@@ -625,17 +625,17 @@ L6 [body entry point]:
r(3) -> <v7>
mark(2 > 3)
call(2 > 3, compareTo|<v6>, <v7>) -> <v8>
jf(L7|<v8>) NEXT:[read (Unit), mark({ continue @l })]
jf(L7 [else branch]|<v8>) NEXT:[read (Unit), mark({ continue @l })]
6 mark({ continue @l })
jmp(L5 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4>]
- 5 jmp(L8) NEXT:[merge(if (2 > 3) { continue @l }|!<v9>) -> <v10>] PREV:[]
L7:
read (Unit) PREV:[jf(L7|<v8>)]
L8:
- 5 jmp(L8 ['if' expression result]) NEXT:[merge(if (2 > 3) { continue @l }|!<v9>) -> <v10>] PREV:[]
L7 [else branch]:
read (Unit) PREV:[jf(L7 [else branch]|<v8>)]
L8 ['if' expression result]:
merge(if (2 > 3) { continue @l }|!<v9>) -> <v10>
4 jmp?(L5 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..a|<v3>) -> <v4>, read (Unit)]
L3:
read (Unit) PREV:[jmp?(L3), jmp?(L5 [loop entry point])]
L3 ['for' loop exit point]:
read (Unit) PREV:[jmp?(L3 ['for' loop exit point]), jmp?(L5 [loop entry point])]
2 jmp(L9 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })]
L2 [onExceptionToFinallyBlock]:
L10 [start finally]:
@@ -973,4 +973,4 @@ error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -180,12 +180,12 @@ L11 [start finally]:
mark(if (cond()) return else continue)
mark(cond())
call(cond(), cond) -> <v6>
jf(L12|<v6>) NEXT:[jmp(L2 [loop entry point]), ret L1]
jf(L12 [else branch]|<v6>) NEXT:[jmp(L2 [loop entry point]), ret L1]
ret L1 NEXT:[<END>]
- jmp(L13) NEXT:[merge(if (cond()) return else continue|!<v7>, !<v8>) -> <v9>] PREV:[]
L12:
jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[jf(L12|<v6>)]
L13:
- jmp(L13 ['if' expression result]) NEXT:[merge(if (cond()) return else continue|!<v7>, !<v8>) -> <v9>] PREV:[]
L12 [else branch]:
jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[jf(L12 [else branch]|<v6>)]
L13 ['if' expression result]:
- merge(if (cond()) return else continue|!<v7>, !<v8>) -> <v9> PREV:[]
L14 [finish finally]:
- 3 jmp(error) NEXT:[<ERROR>] PREV:[]
@@ -194,10 +194,10 @@ L10 [skipFinallyToErrorBlock]:
mark(if (cond()) return else continue)
mark(cond())
call(cond(), cond) -> <v6>
jf(copy L12|<v6>) NEXT:[jmp(L2 [loop entry point]), ret L1]
jf(copy L12 [else branch]|<v6>) NEXT:[jmp(L2 [loop entry point]), ret L1]
ret L1 NEXT:[<END>]
- jmp(copy L13) NEXT:[merge(if (cond()) return else continue|!<v7>, !<v8>) -> <v9>] PREV:[]
jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[jf(copy L12|<v6>)]
- jmp(copy L13 ['if' expression result]) NEXT:[merge(if (cond()) return else continue|!<v7>, !<v8>) -> <v9>] PREV:[]
jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[jf(copy L12 [else branch]|<v6>)]
- merge(if (cond()) return else continue|!<v7>, !<v8>) -> <v9> PREV:[]
- 3 merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue }|<v1>, <v3>, <v5>) -> <v10> PREV:[]
- 2 jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[]
@@ -317,14 +317,14 @@ L4 [start finally]:
r(null) -> <v3>
mark(list != null)
call(list != null, equals|<v2>, <v3>) -> <v4>
jf(L5|<v4>) NEXT:[read (Unit), mark({ })]
jf(L5 [else branch]|<v4>) NEXT:[read (Unit), mark({ })]
4 mark({ })
read (Unit)
3 jmp(L6) NEXT:[merge(if(list != null) { }|!<v5>) -> <v6>]
L5:
read (Unit) PREV:[jf(L5|<v4>)]
L6:
merge(if(list != null) { }|!<v5>) -> <v6> PREV:[jmp(L6), read (Unit)]
3 jmp(L6 ['if' expression result]) NEXT:[merge(if(list != null) { }|!<v5>) -> <v6>]
L5 [else branch]:
read (Unit) PREV:[jf(L5 [else branch]|<v4>)]
L6 ['if' expression result]:
merge(if(list != null) { }|!<v5>) -> <v6> PREV:[jmp(L6 ['if' expression result]), read (Unit)]
L7 [finish finally]:
2 jmp(error) NEXT:[<ERROR>]
L3 [skipFinallyToErrorBlock]:
@@ -334,12 +334,12 @@ L3 [skipFinallyToErrorBlock]:
r(null) -> <v3>
mark(list != null)
call(list != null, equals|<v2>, <v3>) -> <v4>
jf(copy L5|<v4>) NEXT:[read (Unit), mark({ })]
jf(copy L5 [else branch]|<v4>) NEXT:[read (Unit), mark({ })]
4 mark({ })
read (Unit)
3 jmp(copy L6) NEXT:[merge(if(list != null) { }|!<v5>) -> <v6>]
read (Unit) PREV:[jf(copy L5|<v4>)]
merge(if(list != null) { }|!<v5>) -> <v6> PREV:[jmp(copy L6), read (Unit)]
3 jmp(copy L6 ['if' expression result]) NEXT:[merge(if(list != null) { }|!<v5>) -> <v6>]
read (Unit) PREV:[jf(copy L5 [else branch]|<v4>)]
merge(if(list != null) { }|!<v5>) -> <v6> PREV:[jmp(copy L6 ['if' expression result]), read (Unit)]
2 merge(try { doSmth() } finally { if(list != null) { } }|<v1>) -> <v7>
L1:
1 <END> NEXT:[<SINK>]
@@ -347,4 +347,4 @@ error:
<ERROR> PREV:[jmp(error)]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -13,11 +13,11 @@ L0:
mark(1..2)
call(1..2, rangeTo|<v0>, <v1>) -> <v2>
v(i)
L3:
jmp?(L2) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..2|<v2>) -> <v3>]
L3 ['for' loop condition entry point]:
jmp?(L2 ['for' loop exit point]) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..2|<v2>) -> <v3>]
L4 [loop entry point]:
L5 [body entry point]:
magic[LOOP_RANGE_ITERATION](1..2|<v2>) -> <v3> PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
magic[LOOP_RANGE_ITERATION](1..2|<v2>) -> <v3> PREV:[jmp?(L2 ['for' loop exit point]), jmp?(L4 [loop entry point])]
w(i|<v3>)
mark(for (i in 1..2) { doSmth(i) })
4 mark({ doSmth(i) })
@@ -25,8 +25,8 @@ L5 [body entry point]:
mark(doSmth(i))
call(doSmth(i), doSmth|<v4>) -> <v5>
3 jmp?(L4 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..2|<v2>) -> <v3>, read (Unit)]
L2:
read (Unit) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
L2 ['for' loop exit point]:
read (Unit) PREV:[jmp?(L2 ['for' loop exit point]), jmp?(L4 [loop entry point])]
L1:
1 <END> NEXT:[<SINK>]
error:
@@ -50,4 +50,4 @@ error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -25,35 +25,35 @@ L0:
v(var u: String)
mark(if (b) { u = "s" })
r(b) -> <v1>
jf(L2|<v1>) NEXT:[read (Unit), mark({ u = "s" })]
jf(L2 [else branch]|<v1>) NEXT:[read (Unit), mark({ u = "s" })]
3 mark({ u = "s" })
mark("s")
r("s") -> <v2>
w(u|<v2>)
2 jmp(L3) NEXT:[merge(if (b) { u = "s" }|!<v3>) -> <v4>]
L2:
read (Unit) PREV:[jf(L2|<v1>)]
L3:
merge(if (b) { u = "s" }|!<v3>) -> <v4> PREV:[jmp(L3), read (Unit)]
2 jmp(L3 ['if' expression result]) NEXT:[merge(if (b) { u = "s" }|!<v3>) -> <v4>]
L2 [else branch]:
read (Unit) PREV:[jf(L2 [else branch]|<v1>)]
L3 ['if' expression result]:
merge(if (b) { u = "s" }|!<v3>) -> <v4> PREV:[jmp(L3 ['if' expression result]), read (Unit)]
r(u) -> <v5>
mark(doSmth(u))
call(doSmth(u), doSmth|<v5>) -> <v6>
v(var r: String)
mark(if (b) { r = "s" } else { r = "t" })
r(b) -> <v7>
jf(L4|<v7>) NEXT:[mark({ r = "t" }), mark({ r = "s" })]
jf(L4 [else branch]|<v7>) NEXT:[mark({ r = "t" }), mark({ r = "s" })]
3 mark({ r = "s" })
mark("s")
r("s") -> <v8>
w(r|<v8>)
2 jmp(L5) NEXT:[merge(if (b) { r = "s" } else { r = "t" }|!<v9>, !<v11>) -> <v12>]
L4:
3 mark({ r = "t" }) PREV:[jf(L4|<v7>)]
2 jmp(L5 ['if' expression result]) NEXT:[merge(if (b) { r = "s" } else { r = "t" }|!<v9>, !<v11>) -> <v12>]
L4 [else branch]:
3 mark({ r = "t" }) PREV:[jf(L4 [else branch]|<v7>)]
mark("t")
r("t") -> <v10>
w(r|<v10>)
L5:
2 merge(if (b) { r = "s" } else { r = "t" }|!<v9>, !<v11>) -> <v12> PREV:[jmp(L5), w(r|<v10>)]
L5 ['if' expression result]:
2 merge(if (b) { r = "s" } else { r = "t" }|!<v9>, !<v11>) -> <v12> PREV:[jmp(L5 ['if' expression result]), w(r|<v10>)]
r(r) -> <v13>
mark(doSmth(r))
call(doSmth(r), doSmth|<v13>) -> <v14>
@@ -87,13 +87,13 @@ L0:
w(i|<v1>)
mark(if (b) { return; })
r(b) -> <v2>
jf(L2|<v2>) NEXT:[read (Unit), mark({ return; })]
jf(L2 [else branch]|<v2>) NEXT:[read (Unit), mark({ return; })]
3 mark({ return; })
ret L1 NEXT:[<END>]
- 2 jmp(L3) NEXT:[merge(if (b) { return; }|!<v3>) -> <v4>] PREV:[]
L2:
read (Unit) PREV:[jf(L2|<v2>)]
L3:
- 2 jmp(L3 ['if' expression result]) NEXT:[merge(if (b) { return; }|!<v3>) -> <v4>] PREV:[]
L2 [else branch]:
read (Unit) PREV:[jf(L2 [else branch]|<v2>)]
L3 ['if' expression result]:
merge(if (b) { return; }|!<v3>) -> <v4>
r(i) -> <v5>
mark(doSmth(i))
@@ -102,13 +102,13 @@ L3:
mark(i is Int)
r(i) -> <v7>
magic[IS](i is Int|<v7>) -> <v8>
jf(L4|<v8>) NEXT:[read (Unit), mark({ return; })]
jf(L4 [else branch]|<v8>) NEXT:[read (Unit), mark({ return; })]
3 mark({ return; })
ret L1 NEXT:[<END>]
- 2 jmp(L5) NEXT:[merge(if (i is Int) { return; }|!<v9>) -> <v10>] PREV:[]
L4:
read (Unit) PREV:[jf(L4|<v8>)]
L5:
- 2 jmp(L5 ['if' expression result]) NEXT:[merge(if (i is Int) { return; }|!<v9>) -> <v10>] PREV:[]
L4 [else branch]:
read (Unit) PREV:[jf(L4 [else branch]|<v8>)]
L5 ['if' expression result]:
merge(if (i is Int) { return; }|!<v9>) -> <v10>
L1:
1 <END> NEXT:[<SINK>] PREV:[ret L1, ret L1, merge(if (i is Int) { return; }|!<v9>) -> <v10>]
@@ -133,4 +133,4 @@ error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -16,18 +16,18 @@ L0:
mark(is Int -> return a)
mark(is Int)
magic[IS](is Int|<v1>) -> <v2>
jmp?(L4|<v2>) NEXT:[merge(when(a) { is Int -> return a }|!<v4>) -> <v5>, r(a) -> <v3>]
L3:
jmp?(L4 [next 'when' entry]|<v2>) NEXT:[merge(when(a) { is Int -> return a }|!<v4>) -> <v5>, r(a) -> <v3>]
L3 ['when' entry body]:
r(a) -> <v3>
ret(*|<v3>) L1 NEXT:[<END>]
- jmp(L2) PREV:[]
L2:
L4:
merge(when(a) { is Int -> return a }|!<v4>) -> <v5> PREV:[jmp?(L4|<v2>)]
- jmp(L2 [after 'when' expression]) PREV:[]
L2 [after 'when' expression]:
L4 [next 'when' entry]:
merge(when(a) { is Int -> return a }|!<v4>) -> <v5> PREV:[jmp?(L4 [next 'when' entry]|<v2>)]
L1:
1 <END> NEXT:[<SINK>] PREV:[ret(*|<v3>) L1, merge(when(a) { is Int -> return a }|!<v4>) -> <v5>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -23,62 +23,62 @@ L0:
mark(1)
r(1) -> <v2>
magic[EQUALS_IN_WHEN_CONDITION](1|<v1>, <v2>) -> <v3>
jmp?(L4|<v3>) NEXT:[mark(in Collections.singleton(2) -> "2"), mark("1")]
L3:
jmp?(L4 [next 'when' entry]|<v3>) NEXT:[mark(in Collections.singleton(2) -> "2"), mark("1")]
L3 ['when' entry body]:
mark("1")
r("1") -> <v4>
jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|<v4>, <v8>, <v10>, <v14>, <v16>, <v17>) -> <v18>]
L4:
mark(in Collections.singleton(2) -> "2") PREV:[jmp?(L4|<v3>)]
jmp(L2 [after 'when' expression]) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|<v4>, <v8>, <v10>, <v14>, <v16>, <v17>) -> <v18>]
L4 [next 'when' entry]:
mark(in Collections.singleton(2) -> "2") PREV:[jmp?(L4 [next 'when' entry]|<v3>)]
mark(Collections.singleton(2))
r(2) -> <v5>
mark(singleton(2))
call(singleton(2), singleton|<v5>) -> <v6>
mark(in Collections.singleton(2))
call(in Collections.singleton(2), contains|<v6>, <v1>) -> <v7>
jmp?(L6|<v7>) NEXT:[mark(is Int -> "Int"), mark("2")]
L5:
jmp?(L6 [next 'when' entry]|<v7>) NEXT:[mark(is Int -> "Int"), mark("2")]
L5 ['when' entry body]:
mark("2")
r("2") -> <v8>
jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|<v4>, <v8>, <v10>, <v14>, <v16>, <v17>) -> <v18>]
L6:
mark(is Int -> "Int") PREV:[jmp?(L6|<v7>)]
jmp(L2 [after 'when' expression]) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|<v4>, <v8>, <v10>, <v14>, <v16>, <v17>) -> <v18>]
L6 [next 'when' entry]:
mark(is Int -> "Int") PREV:[jmp?(L6 [next 'when' entry]|<v7>)]
mark(is Int)
magic[IS](is Int|<v1>) -> <v9>
jmp?(L8|<v9>) NEXT:[mark(!in Collections.singleton(3) -> "!3"), mark("Int")]
L7:
jmp?(L8 [next 'when' entry]|<v9>) NEXT:[mark(!in Collections.singleton(3) -> "!3"), mark("Int")]
L7 ['when' entry body]:
mark("Int")
r("Int") -> <v10>
jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|<v4>, <v8>, <v10>, <v14>, <v16>, <v17>) -> <v18>]
L8:
mark(!in Collections.singleton(3) -> "!3") PREV:[jmp?(L8|<v9>)]
jmp(L2 [after 'when' expression]) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|<v4>, <v8>, <v10>, <v14>, <v16>, <v17>) -> <v18>]
L8 [next 'when' entry]:
mark(!in Collections.singleton(3) -> "!3") PREV:[jmp?(L8 [next 'when' entry]|<v9>)]
mark(Collections.singleton(3))
r(3) -> <v11>
mark(singleton(3))
call(singleton(3), singleton|<v11>) -> <v12>
mark(!in Collections.singleton(3))
call(!in Collections.singleton(3), contains|<v12>, <v1>) -> <v13>
jmp?(L10|<v13>) NEXT:[mark(!is Number -> "!Number"), mark("!3")]
L9:
jmp?(L10 [next 'when' entry]|<v13>) NEXT:[mark(!is Number -> "!Number"), mark("!3")]
L9 ['when' entry body]:
mark("!3")
r("!3") -> <v14>
jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|<v4>, <v8>, <v10>, <v14>, <v16>, <v17>) -> <v18>]
L10:
mark(!is Number -> "!Number") PREV:[jmp?(L10|<v13>)]
jmp(L2 [after 'when' expression]) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|<v4>, <v8>, <v10>, <v14>, <v16>, <v17>) -> <v18>]
L10 [next 'when' entry]:
mark(!is Number -> "!Number") PREV:[jmp?(L10 [next 'when' entry]|<v13>)]
mark(!is Number)
magic[IS](!is Number|<v1>) -> <v15>
jmp?(L12|<v15>) NEXT:[mark(else -> null), mark("!Number")]
L11:
jmp?(L12 [next 'when' entry]|<v15>) NEXT:[mark(else -> null), mark("!Number")]
L11 ['when' entry body]:
mark("!Number")
r("!Number") -> <v16>
jmp(L2) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|<v4>, <v8>, <v10>, <v14>, <v16>, <v17>) -> <v18>]
L12:
mark(else -> null) PREV:[jmp?(L12|<v15>)]
L13:
jmp(L2 [after 'when' expression]) NEXT:[merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|<v4>, <v8>, <v10>, <v14>, <v16>, <v17>) -> <v18>]
L12 [next 'when' entry]:
mark(else -> null) PREV:[jmp?(L12 [next 'when' entry]|<v15>)]
L13 ['when' entry body]:
r(null) -> <v17>
jmp(L2)
L2:
merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|<v4>, <v8>, <v10>, <v14>, <v16>, <v17>) -> <v18> PREV:[jmp(L2), jmp(L2), jmp(L2), jmp(L2), jmp(L2), jmp(L2)]
jmp(L2 [after 'when' expression])
L2 [after 'when' expression]:
merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|<v4>, <v8>, <v10>, <v14>, <v16>, <v17>) -> <v18> PREV:[jmp(L2 [after 'when' expression]), jmp(L2 [after 'when' expression]), jmp(L2 [after 'when' expression]), jmp(L2 [after 'when' expression]), jmp(L2 [after 'when' expression]), jmp(L2 [after 'when' expression])]
w(t|<v18>)
L1:
1 <END> NEXT:[<SINK>]
@@ -86,4 +86,4 @@ error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -18,18 +18,18 @@ L0:
r(b) -> <v3>
mark(a == b)
call(a == b, equals|<v2>, <v3>) -> <v4>
jf(L2|<v4>) NEXT:[read (Unit), mark({ })]
jf(L2 [else branch]|<v4>) NEXT:[read (Unit), mark({ })]
3 mark({ })
read (Unit)
2 jmp(L3) NEXT:[merge(if (a == b) { }|!<v5>) -> <v6>]
L2:
read (Unit) PREV:[jf(L2|<v4>)]
L3:
merge(if (a == b) { }|!<v5>) -> <v6> PREV:[jmp(L3), read (Unit)]
2 jmp(L3 ['if' expression result]) NEXT:[merge(if (a == b) { }|!<v5>) -> <v6>]
L2 [else branch]:
read (Unit) PREV:[jf(L2 [else branch]|<v4>)]
L3 ['if' expression result]:
merge(if (a == b) { }|!<v5>) -> <v6> PREV:[jmp(L3 ['if' expression result]), read (Unit)]
L1:
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -17,18 +17,18 @@ L0:
r(b) -> <v3>
mark(a != b)
call(a != b, equals|<v2>, <v3>) -> <v4>
jf(L2|<v4>) NEXT:[read (Unit), mark({})]
jf(L2 [else branch]|<v4>) NEXT:[read (Unit), mark({})]
3 mark({})
read (Unit)
2 jmp(L3) NEXT:[merge(if (a != b) {}|!<v5>) -> <v6>]
L2:
read (Unit) PREV:[jf(L2|<v4>)]
L3:
merge(if (a != b) {}|!<v5>) -> <v6> PREV:[jmp(L3), read (Unit)]
2 jmp(L3 ['if' expression result]) NEXT:[merge(if (a != b) {}|!<v5>) -> <v6>]
L2 [else branch]:
read (Unit) PREV:[jf(L2 [else branch]|<v4>)]
L3 ['if' expression result]:
merge(if (a != b) {}|!<v5>) -> <v6> PREV:[jmp(L3 ['if' expression result]), read (Unit)]
L1:
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -8,9 +8,9 @@ L0:
2 mark({ return ?: null })
ret L1 NEXT:[<END>]
- mark(return ?: null) PREV:[]
- jt(L2) NEXT:[r(null) -> <v0>, merge(return ?: null|!<v1>, <v0>) -> <v2>] PREV:[]
- jt(L2 [after elvis operator]) NEXT:[r(null) -> <v0>, merge(return ?: null|!<v1>, <v0>) -> <v2>] PREV:[]
- r(null) -> <v0> PREV:[]
L2:
L2 [after elvis operator]:
- merge(return ?: null|!<v1>, <v0>) -> <v2> PREV:[]
L1:
1 <END> NEXT:[<SINK>] PREV:[ret L1]
@@ -7,16 +7,16 @@ L0:
1 <START>
2 mark({ {} })
mark({})
jmp?(L2) NEXT:[r({}) -> <v0>, d({})]
d({}) NEXT:[<SINK>]
L2:
r({}) -> <v0> PREV:[jmp?(L2)]
jmp?(L2 [after local declaration]) NEXT:[r({}) -> <v0>, d({})]
d({}) NEXT:[<SINK>]
L2 [after local declaration]:
r({}) -> <v0> PREV:[jmp?(L2 [after local declaration])]
L1:
1 <END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>, d({})]
<SINK> PREV:[<ERROR>, <END>, d({})]
=====================
== anonymous_0 ==
{}
@@ -31,4 +31,4 @@ error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -141,10 +141,10 @@ L0:
v(val a = object { val y : Int fun inner_bar() { y = 10 } })
mark(object { val y : Int fun inner_bar() { y = 10 } })
v(val y : Int)
jmp?(L2) NEXT:[r(object { val y : Int fun inner_bar() { y = 10 } }) -> <v0>, d(fun inner_bar() { y = 10 })]
jmp?(L2 [after local declaration]) NEXT:[r(object { val y : Int fun inner_bar() { y = 10 } }) -> <v0>, d(fun inner_bar() { y = 10 })]
d(fun inner_bar() { y = 10 }) NEXT:[<SINK>]
L2:
r(object { val y : Int fun inner_bar() { y = 10 } }) -> <v0> PREV:[jmp?(L2)]
L2 [after local declaration]:
r(object { val y : Int fun inner_bar() { y = 10 } }) -> <v0> PREV:[jmp?(L2 [after local declaration])]
w(a|<v0>)
L1:
1 <END> NEXT:[<SINK>]
@@ -196,10 +196,10 @@ L0:
magic[IMPLICIT_RECEIVER]($x) -> <v0>
r(1) -> <v1>
w($x|<v0>, <v1>)
2 jmp?(L2) NEXT:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> <v3>, d(fun ggg() { y = 10 })]
2 jmp?(L2 [after local declaration]) NEXT:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> <v3>, d(fun ggg() { y = 10 })]
d(fun ggg() { y = 10 }) NEXT:[<SINK>]
L2:
r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> <v3> PREV:[jmp?(L2)]
L2 [after local declaration]:
r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> <v3> PREV:[jmp?(L2 [after local declaration])]
w(a|<v3>)
L1:
1 <END> NEXT:[<SINK>]
@@ -254,13 +254,13 @@ L0:
magic[IMPLICIT_RECEIVER]($x) -> <v1>
r(2) -> <v2>
w($x|<v1>, <v2>)
2 jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })]
2 jmp?(L2 [after local declaration]) NEXT:[jmp?(L5 [after local declaration]), d(fun foo() { x = 3 })]
d(fun foo() { x = 3 }) NEXT:[<SINK>]
L2:
jmp?(L5) NEXT:[r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> <v4>, d(fun bar() { x = 4 })] PREV:[jmp?(L2)]
L2 [after local declaration]:
jmp?(L5 [after local declaration]) NEXT:[r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> <v4>, d(fun bar() { x = 4 })] PREV:[jmp?(L2 [after local declaration])]
d(fun bar() { x = 4 }) NEXT:[<SINK>]
L5:
r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> <v4> PREV:[jmp?(L5)]
L5 [after local declaration]:
r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> <v4> PREV:[jmp?(L5 [after local declaration])]
w(a|<v4>)
L1:
1 <END> NEXT:[<SINK>]
@@ -304,4 +304,4 @@ error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -14,11 +14,11 @@ fun f() {
L0:
1 <START>
2 mark({ class LocalClass() { fun f() { val x = "" fun loc() { val x3 = "" } } } })
jmp?(L2) NEXT:[<END>, d(fun f() { val x = "" fun loc() { val x3 = "" } })]
jmp?(L2 [after local declaration]) NEXT:[<END>, d(fun f() { val x = "" fun loc() { val x3 = "" } })]
d(fun f() { val x = "" fun loc() { val x3 = "" } }) NEXT:[<SINK>]
L1:
L2:
1 <END> NEXT:[<SINK>] PREV:[jmp?(L2)]
L2 [after local declaration]:
1 <END> NEXT:[<SINK>] PREV:[jmp?(L2 [after local declaration])]
error:
<ERROR> PREV:[]
sink:
@@ -40,11 +40,11 @@ L3:
mark("")
r("") -> <v0>
w(x|<v0>)
jmp?(L5) NEXT:[<END>, d(fun loc() { val x3 = "" })]
jmp?(L5 [after local declaration]) NEXT:[<END>, d(fun loc() { val x3 = "" })]
d(fun loc() { val x3 = "" }) NEXT:[<SINK>]
L4:
L5:
3 <END> NEXT:[<SINK>] PREV:[jmp?(L5)]
L5 [after local declaration]:
3 <END> NEXT:[<SINK>] PREV:[jmp?(L5 [after local declaration])]
error:
<ERROR> PREV:[]
sink:
@@ -68,4 +68,4 @@ error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -13,11 +13,11 @@ L0:
1 <START>
2 mark({ class B { val a: Int get() { val b: Int return b } } })
v(val a: Int get() { val b: Int return b })
jmp?(L2) NEXT:[<END>, d(get() { val b: Int return b })]
jmp?(L2 [after local declaration]) NEXT:[<END>, d(get() { val b: Int return b })]
d(get() { val b: Int return b }) NEXT:[<SINK>]
L1:
L2:
1 <END> NEXT:[<SINK>] PREV:[jmp?(L2)]
L2 [after local declaration]:
1 <END> NEXT:[<SINK>] PREV:[jmp?(L2 [after local declaration])]
error:
<ERROR> PREV:[]
sink:
@@ -41,4 +41,4 @@ error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -44,27 +44,27 @@ L0:
w(x|<v4>)
mark(if (true) 1 else 2)
r(true) -> <v5>
jf(L2|<v5>) NEXT:[r(2) -> <v7>, r(1) -> <v6>]
jf(L2 [else branch]|<v5>) NEXT:[r(2) -> <v7>, r(1) -> <v6>]
r(1) -> <v6>
jmp(L3) NEXT:[merge(if (true) 1 else 2|<v6>, <v7>) -> <v8>]
L2:
r(2) -> <v7> PREV:[jf(L2|<v5>)]
L3:
merge(if (true) 1 else 2|<v6>, <v7>) -> <v8> PREV:[jmp(L3), r(2) -> <v7>]
jmp(L3 ['if' expression result]) NEXT:[merge(if (true) 1 else 2|<v6>, <v7>) -> <v8>]
L2 [else branch]:
r(2) -> <v7> PREV:[jf(L2 [else branch]|<v5>)]
L3 ['if' expression result]:
merge(if (true) 1 else 2|<v6>, <v7>) -> <v8> PREV:[jmp(L3 ['if' expression result]), r(2) -> <v7>]
w(x|<v8>)
v(val y = true && false)
r(true) -> <v9>
jf(L4|<v9>) NEXT:[magic[AND](true && false|<v9>, <v10>) -> <v11>, r(false) -> <v10>]
jf(L4 [result of boolean operation]|<v9>) NEXT:[magic[AND](true && false|<v9>, <v10>) -> <v11>, r(false) -> <v10>]
r(false) -> <v10>
L4:
magic[AND](true && false|<v9>, <v10>) -> <v11> PREV:[jf(L4|<v9>), r(false) -> <v10>]
L4 [result of boolean operation]:
magic[AND](true && false|<v9>, <v10>) -> <v11> PREV:[jf(L4 [result of boolean operation]|<v9>), r(false) -> <v10>]
w(y|<v11>)
v(val z = false && true)
r(false) -> <v12>
jf(L5|<v12>) NEXT:[magic[AND](false && true|<v12>, <v13>) -> <v14>, r(true) -> <v13>]
jf(L5 [result of boolean operation]|<v12>) NEXT:[magic[AND](false && true|<v12>, <v13>) -> <v14>, r(true) -> <v13>]
r(true) -> <v13>
L5:
magic[AND](false && true|<v12>, <v13>) -> <v14> PREV:[jf(L5|<v12>), r(true) -> <v13>]
L5 [result of boolean operation]:
magic[AND](false && true|<v12>, <v13>) -> <v14> PREV:[jf(L5 [result of boolean operation]|<v12>), r(true) -> <v13>]
w(z|<v14>)
v(val t = Test())
mark(Test())
@@ -86,4 +86,4 @@ error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -28,63 +28,63 @@ L0:
2 mark({ if (a) { 1 } else { 2 } 3 if (a && b) 5 else 6 7 if (a || b) 8 else 9 10 if (a) 11 12 if (a) else 13 14 })
mark(if (a) { 1 } else { 2 })
r(a) -> <v2>
jf(L2|<v2>) NEXT:[mark({ 2 }), mark({ 1 })]
jf(L2 [else branch]|<v2>) NEXT:[mark({ 2 }), mark({ 1 })]
3 mark({ 1 })
r(1) -> <v3>
2 jmp(L3) NEXT:[merge(if (a) { 1 } else { 2 }|<v3>, <v4>) -> <v5>]
L2:
3 mark({ 2 }) PREV:[jf(L2|<v2>)]
2 jmp(L3 ['if' expression result]) NEXT:[merge(if (a) { 1 } else { 2 }|<v3>, <v4>) -> <v5>]
L2 [else branch]:
3 mark({ 2 }) PREV:[jf(L2 [else branch]|<v2>)]
r(2) -> <v4>
L3:
2 merge(if (a) { 1 } else { 2 }|<v3>, <v4>) -> <v5> PREV:[jmp(L3), r(2) -> <v4>]
L3 ['if' expression result]:
2 merge(if (a) { 1 } else { 2 }|<v3>, <v4>) -> <v5> PREV:[jmp(L3 ['if' expression result]), r(2) -> <v4>]
r(3) -> <v6>
mark(if (a && b) 5 else 6)
r(a) -> <v7>
jf(L4|<v7>) NEXT:[magic[AND](a && b|<v7>, <v8>) -> <v9>, r(b) -> <v8>]
jf(L4 [result of boolean operation]|<v7>) NEXT:[magic[AND](a && b|<v7>, <v8>) -> <v9>, r(b) -> <v8>]
r(b) -> <v8>
L4:
magic[AND](a && b|<v7>, <v8>) -> <v9> PREV:[jf(L4|<v7>), r(b) -> <v8>]
jf(L5|<v9>) NEXT:[r(6) -> <v11>, r(5) -> <v10>]
L4 [result of boolean operation]:
magic[AND](a && b|<v7>, <v8>) -> <v9> PREV:[jf(L4 [result of boolean operation]|<v7>), r(b) -> <v8>]
jf(L5 [else branch]|<v9>) NEXT:[r(6) -> <v11>, r(5) -> <v10>]
r(5) -> <v10>
jmp(L6) NEXT:[merge(if (a && b) 5 else 6|<v10>, <v11>) -> <v12>]
L5:
r(6) -> <v11> PREV:[jf(L5|<v9>)]
L6:
merge(if (a && b) 5 else 6|<v10>, <v11>) -> <v12> PREV:[jmp(L6), r(6) -> <v11>]
jmp(L6 ['if' expression result]) NEXT:[merge(if (a && b) 5 else 6|<v10>, <v11>) -> <v12>]
L5 [else branch]:
r(6) -> <v11> PREV:[jf(L5 [else branch]|<v9>)]
L6 ['if' expression result]:
merge(if (a && b) 5 else 6|<v10>, <v11>) -> <v12> PREV:[jmp(L6 ['if' expression result]), r(6) -> <v11>]
r(7) -> <v13>
mark(if (a || b) 8 else 9)
r(a) -> <v14>
jt(L7|<v14>) NEXT:[r(b) -> <v15>, magic[OR](a || b|<v14>, <v15>) -> <v16>]
jt(L7 [result of boolean operation]|<v14>) NEXT:[r(b) -> <v15>, magic[OR](a || b|<v14>, <v15>) -> <v16>]
r(b) -> <v15>
L7:
magic[OR](a || b|<v14>, <v15>) -> <v16> PREV:[jt(L7|<v14>), r(b) -> <v15>]
jf(L8|<v16>) NEXT:[r(9) -> <v18>, r(8) -> <v17>]
L7 [result of boolean operation]:
magic[OR](a || b|<v14>, <v15>) -> <v16> PREV:[jt(L7 [result of boolean operation]|<v14>), r(b) -> <v15>]
jf(L8 [else branch]|<v16>) NEXT:[r(9) -> <v18>, r(8) -> <v17>]
r(8) -> <v17>
jmp(L9) NEXT:[merge(if (a || b) 8 else 9|<v17>, <v18>) -> <v19>]
L8:
r(9) -> <v18> PREV:[jf(L8|<v16>)]
L9:
merge(if (a || b) 8 else 9|<v17>, <v18>) -> <v19> PREV:[jmp(L9), r(9) -> <v18>]
jmp(L9 ['if' expression result]) NEXT:[merge(if (a || b) 8 else 9|<v17>, <v18>) -> <v19>]
L8 [else branch]:
r(9) -> <v18> PREV:[jf(L8 [else branch]|<v16>)]
L9 ['if' expression result]:
merge(if (a || b) 8 else 9|<v17>, <v18>) -> <v19> PREV:[jmp(L9 ['if' expression result]), r(9) -> <v18>]
r(10) -> <v20>
mark(if (a) 11)
r(a) -> <v21>
jf(L10|<v21>) NEXT:[read (Unit), r(11) -> <v22>]
jf(L10 [else branch]|<v21>) NEXT:[read (Unit), r(11) -> <v22>]
r(11) -> <v22>
jmp(L11) NEXT:[merge(if (a) 11|<v22>) -> <v23>]
L10:
read (Unit) PREV:[jf(L10|<v21>)]
L11:
merge(if (a) 11|<v22>) -> <v23> PREV:[jmp(L11), read (Unit)]
jmp(L11 ['if' expression result]) NEXT:[merge(if (a) 11|<v22>) -> <v23>]
L10 [else branch]:
read (Unit) PREV:[jf(L10 [else branch]|<v21>)]
L11 ['if' expression result]:
merge(if (a) 11|<v22>) -> <v23> PREV:[jmp(L11 ['if' expression result]), read (Unit)]
r(12) -> <v24>
mark(if (a) else 13)
r(a) -> <v25>
jf(L12|<v25>) NEXT:[r(13) -> <v26>, read (Unit)]
jf(L12 [else branch]|<v25>) NEXT:[r(13) -> <v26>, read (Unit)]
read (Unit)
jmp(L13) NEXT:[merge(if (a) else 13|<v26>) -> <v27>]
L12:
r(13) -> <v26> PREV:[jf(L12|<v25>)]
L13:
merge(if (a) else 13|<v26>) -> <v27> PREV:[jmp(L13), r(13) -> <v26>]
jmp(L13 ['if' expression result]) NEXT:[merge(if (a) else 13|<v26>) -> <v27>]
L12 [else branch]:
r(13) -> <v26> PREV:[jf(L12 [else branch]|<v25>)]
L13 ['if' expression result]:
merge(if (a) else 13|<v26>) -> <v27> PREV:[jmp(L13 ['if' expression result]), r(13) -> <v26>]
r(14) -> <v28>
L1:
1 <END> NEXT:[<SINK>]
@@ -92,4 +92,4 @@ error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -7,16 +7,16 @@ L0:
1 <START>
2 mark({ false || (return false) })
r(false) -> <v0>
jt(L2|<v0>) NEXT:[mark((return false)), magic[OR](false || (return false)|<v0>, !<v2>) -> <v3>]
jt(L2 [result of boolean operation]|<v0>) NEXT:[mark((return false)), magic[OR](false || (return false)|<v0>, !<v2>) -> <v3>]
mark((return false))
r(false) -> <v1>
ret(*|<v1>) L1 NEXT:[<END>]
L2:
magic[OR](false || (return false)|<v0>, !<v2>) -> <v3> PREV:[jt(L2|<v0>)]
L2 [result of boolean operation]:
magic[OR](false || (return false)|<v0>, !<v2>) -> <v3> PREV:[jt(L2 [result of boolean operation]|<v0>)]
L1:
1 <END> NEXT:[<SINK>] PREV:[ret(*|<v1>) L1, magic[OR](false || (return false)|<v0>, !<v2>) -> <v3>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -49,10 +49,10 @@ L0:
2 mark({ with(1) { "".(foo)() } })
r(1) -> <v0>
mark({ "".(foo)() })
jmp?(L2) NEXT:[r({ "".(foo)() }) -> <v1>, d({ "".(foo)() })]
jmp?(L2 [after local declaration]) NEXT:[r({ "".(foo)() }) -> <v1>, d({ "".(foo)() })]
d({ "".(foo)() }) NEXT:[<SINK>]
L2:
r({ "".(foo)() }) -> <v1> PREV:[jmp?(L2)]
L2 [after local declaration]:
r({ "".(foo)() }) -> <v1> PREV:[jmp?(L2 [after local declaration])]
mark(with(1) { "".(foo)() })
call(with(1) { "".(foo)() }, with|<v0>, <v1>) -> <v2>
L1:
@@ -84,4 +84,4 @@ error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================
@@ -21,13 +21,13 @@ L0:
call(toLong(), toLong|<v3>) -> <v4>
mark(x == 0.toLong())
call(x == 0.toLong(), equals|<v2>, <v4>) -> <v5>
jf(L2|<v5>) NEXT:[read (Unit), r(sum) -> <v6>]
jf(L2 [else branch]|<v5>) NEXT:[read (Unit), r(sum) -> <v6>]
r(sum) -> <v6>
ret(*|<v6>) L1 NEXT:[<END>]
- jmp(L3) NEXT:[merge(if (x == 0.toLong()) return sum|!<v7>) -> <v8>] PREV:[]
L2:
read (Unit) PREV:[jf(L2|<v5>)]
L3:
- jmp(L3 ['if' expression result]) NEXT:[merge(if (x == 0.toLong()) return sum|!<v7>) -> <v8>] PREV:[]
L2 [else branch]:
read (Unit) PREV:[jf(L2 [else branch]|<v5>)]
L3 ['if' expression result]:
merge(if (x == 0.toLong()) return sum|!<v7>) -> <v8>
r(x) -> <v9>
r(1) -> <v10>
@@ -46,4 +46,4 @@ error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================