Test data fixed: mark() instructions added
This commit is contained in:
@@ -21,16 +21,18 @@ L0:
|
||||
r(34)
|
||||
w(k)
|
||||
v(val i: Int)
|
||||
mark({ $i = 12 })
|
||||
r(12)
|
||||
w($i)
|
||||
v(val j: Int get() = 20)
|
||||
jmp?(L2) NEXT:[r(13), d(get() = 20)]
|
||||
d(get() = 20) NEXT:[<SINK>]
|
||||
jmp?(L2) NEXT:[mark({ $i = 13 }), d(get() = 20)]
|
||||
d(get() = 20) NEXT:[<SINK>]
|
||||
L2:
|
||||
r(13) PREV:[jmp?(L2)]
|
||||
mark({ $i = 13 }) PREV:[jmp?(L2)]
|
||||
r(13)
|
||||
w($i)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
|
||||
@@ -10,33 +10,39 @@ fun foo() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(val a = Array<Int>)
|
||||
call(Array, <init>)
|
||||
w(a)
|
||||
r(3)
|
||||
r(a)
|
||||
r(10)
|
||||
r(4)
|
||||
call(a[10], set)
|
||||
r(2)
|
||||
r(a)
|
||||
r(10)
|
||||
call(a[10], get)
|
||||
r(100)
|
||||
r(a)
|
||||
r(10)
|
||||
call(a[10], get)
|
||||
r(1)
|
||||
call(+=, plus)
|
||||
r(a)
|
||||
r(10)
|
||||
r(1)
|
||||
call(a[10], set)
|
||||
<START>
|
||||
mark({ val a = Array<Int> 3 a[10] = 4 2 a[10] 100 a[10] += 1 })
|
||||
v(val a = Array<Int>)
|
||||
mark(Array<Int>)
|
||||
call(Array, <init>)
|
||||
w(a)
|
||||
r(3)
|
||||
mark(a[10])
|
||||
r(a)
|
||||
r(10)
|
||||
r(4)
|
||||
call(a[10], set)
|
||||
r(2)
|
||||
mark(a[10])
|
||||
r(a)
|
||||
r(10)
|
||||
call(a[10], get)
|
||||
r(100)
|
||||
mark(a[10] += 1)
|
||||
mark(a[10])
|
||||
r(a)
|
||||
r(10)
|
||||
call(a[10], get)
|
||||
r(1)
|
||||
call(+=, plus)
|
||||
r(a)
|
||||
r(10)
|
||||
r(1)
|
||||
call(a[10], set)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -29,48 +29,52 @@ fun assignments() : Unit {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(var x = 1)
|
||||
r(1)
|
||||
w(x)
|
||||
r(2)
|
||||
w(x)
|
||||
r(x)
|
||||
r(2)
|
||||
call(+=, plus)
|
||||
w(x)
|
||||
r(true)
|
||||
jf(L2) NEXT:[r(2), r(1)]
|
||||
r(1)
|
||||
jmp(L3) NEXT:[w(x)]
|
||||
<START>
|
||||
mark({ var x = 1 x = 2 x += 2 x = if (true) 1 else 2 val y = true && false val z = false && true val t = Test(); t.x = 1 })
|
||||
v(var x = 1)
|
||||
r(1)
|
||||
w(x)
|
||||
r(2)
|
||||
w(x)
|
||||
mark(x += 2)
|
||||
r(x)
|
||||
r(2)
|
||||
call(+=, plus)
|
||||
w(x)
|
||||
mark(if (true) 1 else 2)
|
||||
r(true)
|
||||
jf(L2) NEXT:[r(2), r(1)]
|
||||
r(1)
|
||||
jmp(L3) NEXT:[w(x)]
|
||||
L2:
|
||||
r(2) PREV:[jf(L2)]
|
||||
r(2) PREV:[jf(L2)]
|
||||
L3:
|
||||
w(x) PREV:[jmp(L3), r(2)]
|
||||
v(val y = true && false)
|
||||
r(true)
|
||||
jf(L4) NEXT:[r(true && false), r(false)]
|
||||
r(false)
|
||||
w(x) PREV:[jmp(L3), r(2)]
|
||||
v(val y = true && false)
|
||||
r(true)
|
||||
jf(L4) NEXT:[r(true && false), r(false)]
|
||||
r(false)
|
||||
L4:
|
||||
r(true && false) PREV:[jf(L4), r(false)]
|
||||
w(y)
|
||||
v(val z = false && true)
|
||||
r(false)
|
||||
jf(L5) NEXT:[r(false && true), r(true)]
|
||||
r(true)
|
||||
r(true && false) PREV:[jf(L4), r(false)]
|
||||
w(y)
|
||||
v(val z = false && true)
|
||||
r(false)
|
||||
jf(L5) NEXT:[r(false && true), r(true)]
|
||||
r(true)
|
||||
L5:
|
||||
r(false && true) PREV:[jf(L5), r(true)]
|
||||
w(z)
|
||||
v(val t = Test())
|
||||
call(Test, <init>)
|
||||
w(t)
|
||||
r(1)
|
||||
r(t)
|
||||
w(t.x)
|
||||
r(false && true) PREV:[jf(L5), r(true)]
|
||||
w(z)
|
||||
v(val t = Test())
|
||||
mark(Test())
|
||||
call(Test, <init>)
|
||||
w(t)
|
||||
r(1)
|
||||
r(t)
|
||||
w(t.x)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -18,52 +18,64 @@ fun f(a : Boolean) : Unit {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(a : Boolean)
|
||||
w(a)
|
||||
r(1)
|
||||
r(a)
|
||||
r(2)
|
||||
call(toLong, toLong)
|
||||
r(a)
|
||||
r(3)
|
||||
call(foo, foo)
|
||||
call(genfun, genfun)
|
||||
jmp?(L2) NEXT:[r({1}), d({1})]
|
||||
d({1}) NEXT:[<SINK>]
|
||||
<START>
|
||||
v(a : Boolean)
|
||||
w(a)
|
||||
mark({ 1 a 2.toLong() foo(a, 3) genfun<Any>() flfun {1} 3.equals(4) 3 equals 4 1 + 2 a && true a || false })
|
||||
r(1)
|
||||
r(a)
|
||||
mark(2.toLong())
|
||||
mark(toLong())
|
||||
r(2)
|
||||
call(toLong, toLong)
|
||||
mark(foo(a, 3))
|
||||
r(a)
|
||||
r(3)
|
||||
call(foo, foo)
|
||||
mark(genfun<Any>())
|
||||
call(genfun, genfun)
|
||||
mark(flfun {1})
|
||||
mark({1})
|
||||
jmp?(L2) NEXT:[r({1}), d({1})]
|
||||
d({1}) NEXT:[<SINK>]
|
||||
L2:
|
||||
r({1}) PREV:[jmp?(L2)]
|
||||
call(flfun, flfun)
|
||||
r(3)
|
||||
r(4)
|
||||
call(equals, equals)
|
||||
r(3)
|
||||
r(4)
|
||||
call(equals, equals)
|
||||
r(1)
|
||||
r(2)
|
||||
call(+, plus)
|
||||
r(a)
|
||||
jf(L5) NEXT:[r(a && true), r(true)]
|
||||
r(true)
|
||||
r({1}) PREV:[jmp?(L2)]
|
||||
call(flfun, flfun)
|
||||
mark(3.equals(4))
|
||||
mark(equals(4))
|
||||
r(3)
|
||||
r(4)
|
||||
call(equals, equals)
|
||||
mark(3 equals 4)
|
||||
r(3)
|
||||
r(4)
|
||||
call(equals, equals)
|
||||
mark(1 + 2)
|
||||
r(1)
|
||||
r(2)
|
||||
call(+, plus)
|
||||
r(a)
|
||||
jf(L5) NEXT:[r(a && true), r(true)]
|
||||
r(true)
|
||||
L5:
|
||||
r(a && true) PREV:[jf(L5), r(true)]
|
||||
r(a)
|
||||
jt(L6) NEXT:[r(false), r(a || false)]
|
||||
r(false)
|
||||
r(a && true) PREV:[jf(L5), r(true)]
|
||||
r(a)
|
||||
jt(L6) NEXT:[r(false), r(a || false)]
|
||||
r(false)
|
||||
L6:
|
||||
r(a || false) PREV:[jt(L6), r(false)]
|
||||
r(a || false) PREV:[jt(L6), r(false)]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>, d({1})]
|
||||
<SINK> PREV:[<ERROR>, <END>, d({1})]
|
||||
L3:
|
||||
<START>
|
||||
mark(1)
|
||||
r(1)
|
||||
L4:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
@@ -74,9 +86,10 @@ sink:
|
||||
---------------------
|
||||
L3:
|
||||
<START>
|
||||
mark(1)
|
||||
r(1)
|
||||
L4:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
@@ -91,6 +104,7 @@ L0:
|
||||
w(a)
|
||||
v(b : Int)
|
||||
w(b)
|
||||
mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
@@ -104,6 +118,7 @@ fun genfun<T>() : Unit {}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
@@ -119,6 +134,7 @@ L0:
|
||||
<START>
|
||||
v(f : () -> Any)
|
||||
w(f)
|
||||
mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
|
||||
@@ -18,6 +18,7 @@ val a = Delegate()
|
||||
L0:
|
||||
<START>
|
||||
v(val a = Delegate())
|
||||
mark(Delegate())
|
||||
call(Delegate, <init>)
|
||||
w(a)
|
||||
L1:
|
||||
|
||||
@@ -3,6 +3,7 @@ fun empty() {}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
|
||||
@@ -4,13 +4,17 @@ fun fail() : Nothing {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
call(RuntimeException, <init>)
|
||||
throw (throw java.lang.RuntimeException()) NEXT:[<ERROR>]
|
||||
<START>
|
||||
mark({ throw java.lang.RuntimeException() })
|
||||
mark(throw java.lang.RuntimeException())
|
||||
mark(java.lang.RuntimeException())
|
||||
mark(RuntimeException())
|
||||
call(RuntimeException, <init>)
|
||||
throw (throw java.lang.RuntimeException()) NEXT:[<ERROR>]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>] PREV:[]
|
||||
<END> NEXT:[<SINK>] PREV:[]
|
||||
error:
|
||||
<ERROR> PREV:[throw (throw java.lang.RuntimeException())]
|
||||
<ERROR> PREV:[throw (throw java.lang.RuntimeException())]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@ fun t2() {
|
||||
fun t3() {
|
||||
try {
|
||||
1
|
||||
@{ () =>
|
||||
@{ () ->
|
||||
if (2 > 3) {
|
||||
return@
|
||||
}
|
||||
@@ -31,7 +31,7 @@ fun t3() {
|
||||
}
|
||||
|
||||
fun t4() {
|
||||
@{ () =>
|
||||
@{ () ->
|
||||
try {
|
||||
1
|
||||
if (2 > 3) {
|
||||
|
||||
@@ -3,6 +3,7 @@ fun doSmth() {}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
@@ -16,6 +17,7 @@ fun doSmth1() {}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
@@ -29,6 +31,7 @@ fun doSmth2() {}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
@@ -42,6 +45,7 @@ fun cond() {}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
@@ -67,39 +71,49 @@ fun testCopy1() : Int {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])]
|
||||
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[r(1), call(doSmth, doSmth)]
|
||||
call(doSmth, doSmth)
|
||||
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
|
||||
<START>
|
||||
mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 } })
|
||||
mark(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 })
|
||||
jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])]
|
||||
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ return 1 }), mark({ doSmth() })]
|
||||
mark({ doSmth() })
|
||||
mark(doSmth())
|
||||
call(doSmth, doSmth)
|
||||
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
|
||||
L2 [onException]:
|
||||
jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])]
|
||||
v(e: NullPointerException)
|
||||
w(e)
|
||||
call(doSmth1, doSmth1)
|
||||
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
|
||||
jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])]
|
||||
v(e: NullPointerException)
|
||||
w(e)
|
||||
mark({ doSmth1() })
|
||||
mark(doSmth1())
|
||||
call(doSmth1, doSmth1)
|
||||
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
|
||||
L5 [catch 0]:
|
||||
v(e: Exception) PREV:[jmp?(L5 [catch 0])]
|
||||
w(e)
|
||||
call(doSmth2, doSmth2)
|
||||
jmp(L4 [afterCatches])
|
||||
v(e: Exception) PREV:[jmp?(L5 [catch 0])]
|
||||
w(e)
|
||||
mark({ doSmth2() })
|
||||
mark(doSmth2())
|
||||
call(doSmth2, doSmth2)
|
||||
jmp(L4 [afterCatches])
|
||||
L4 [afterCatches]:
|
||||
jmp(L6 [skipFinallyToErrorBlock]) NEXT:[r(1)] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])]
|
||||
jmp(L6 [skipFinallyToErrorBlock]) NEXT:[mark({ return 1 })] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])]
|
||||
L3 [onExceptionToFinallyBlock]:
|
||||
L7 [start finally]:
|
||||
r(1) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
|
||||
ret(*) L1 NEXT:[<END>]
|
||||
mark({ return 1 }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
|
||||
r(1)
|
||||
ret(*) L1 NEXT:[<END>]
|
||||
L8 [finish finally]:
|
||||
- jmp(error) NEXT:[<ERROR>] PREV:[]
|
||||
- jmp(error) NEXT:[<ERROR>] PREV:[]
|
||||
L6 [skipFinallyToErrorBlock]:
|
||||
r(1) PREV:[jmp(L6 [skipFinallyToErrorBlock])]
|
||||
ret(*) L1
|
||||
mark({ return 1 }) PREV:[jmp(L6 [skipFinallyToErrorBlock])]
|
||||
r(1)
|
||||
ret(*) L1
|
||||
L1:
|
||||
<END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
|
||||
<END> NEXT:[<SINK>] PREV:[ret(*) L1, ret(*) L1]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== testCopy2 ==
|
||||
fun testCopy2() {
|
||||
@@ -121,55 +135,72 @@ fun testCopy2() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
<START>
|
||||
mark({ while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } })
|
||||
mark(while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } })
|
||||
L2 [loop entry point]:
|
||||
L5 [condition entry point]:
|
||||
call(cond, cond) PREV:[<START>, jmp(L2 [loop entry point]), jmp(L2 [loop entry point])]
|
||||
jf(L3 [loop exit point]) NEXT:[read (Unit), jmp?(L6 [onException])]
|
||||
mark(cond()) PREV:[mark(while (cond()) { try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } }), jmp(L2 [loop entry point]), jmp(L2 [loop entry point])]
|
||||
call(cond, cond)
|
||||
jf(L3 [loop exit point]) NEXT:[read (Unit), mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } })]
|
||||
L4 [body entry point]:
|
||||
jmp?(L6 [onException]) NEXT:[jmp?(L9 [catch 0]), jmp?(L7 [onExceptionToFinallyBlock])]
|
||||
jmp?(L7 [onExceptionToFinallyBlock]) NEXT:[call(cond, cond), call(doSmth, doSmth)]
|
||||
call(doSmth, doSmth)
|
||||
jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])]
|
||||
mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } })
|
||||
mark(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue })
|
||||
jmp?(L6 [onException]) NEXT:[jmp?(L9 [catch 0]), jmp?(L7 [onExceptionToFinallyBlock])]
|
||||
jmp?(L7 [onExceptionToFinallyBlock]) NEXT:[mark({ if (cond()) return else continue }), mark({ doSmth() })]
|
||||
mark({ doSmth() })
|
||||
mark(doSmth())
|
||||
call(doSmth, doSmth)
|
||||
jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])]
|
||||
L6 [onException]:
|
||||
jmp?(L9 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L6 [onException])]
|
||||
v(e: NullPointerException)
|
||||
w(e)
|
||||
call(doSmth1, doSmth1)
|
||||
jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])]
|
||||
jmp?(L9 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L6 [onException])]
|
||||
v(e: NullPointerException)
|
||||
w(e)
|
||||
mark({ doSmth1() })
|
||||
mark(doSmth1())
|
||||
call(doSmth1, doSmth1)
|
||||
jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])]
|
||||
L9 [catch 0]:
|
||||
v(e: Exception) PREV:[jmp?(L9 [catch 0])]
|
||||
w(e)
|
||||
call(doSmth2, doSmth2)
|
||||
jmp(L8 [afterCatches])
|
||||
v(e: Exception) PREV:[jmp?(L9 [catch 0])]
|
||||
w(e)
|
||||
mark({ doSmth2() })
|
||||
mark(doSmth2())
|
||||
call(doSmth2, doSmth2)
|
||||
jmp(L8 [afterCatches])
|
||||
L8 [afterCatches]:
|
||||
jmp(L10 [skipFinallyToErrorBlock]) NEXT:[call(cond, cond)] PREV:[jmp(L8 [afterCatches]), jmp(L8 [afterCatches]), jmp(L8 [afterCatches])]
|
||||
jmp(L10 [skipFinallyToErrorBlock]) NEXT:[mark({ if (cond()) return else continue })] PREV:[jmp(L8 [afterCatches]), jmp(L8 [afterCatches]), jmp(L8 [afterCatches])]
|
||||
L7 [onExceptionToFinallyBlock]:
|
||||
L11 [start finally]:
|
||||
call(cond, cond) PREV:[jmp?(L7 [onExceptionToFinallyBlock])]
|
||||
jf(L12) NEXT:[jmp(L2 [loop entry point]), ret L1]
|
||||
ret L1 NEXT:[<END>]
|
||||
- jmp(L13) NEXT:[jmp(error)] PREV:[]
|
||||
mark({ if (cond()) return else continue }) PREV:[jmp?(L7 [onExceptionToFinallyBlock])]
|
||||
mark(if (cond()) return else continue)
|
||||
mark(cond())
|
||||
call(cond, cond)
|
||||
jf(L12) NEXT:[jmp(L2 [loop entry point]), ret L1]
|
||||
ret L1 NEXT:[<END>]
|
||||
- jmp(L13) NEXT:[jmp(error)] PREV:[]
|
||||
L12:
|
||||
jmp(L2 [loop entry point]) NEXT:[call(cond, cond)] PREV:[jf(L12)]
|
||||
jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[jf(L12)]
|
||||
L13:
|
||||
L14 [finish finally]:
|
||||
- jmp(error) NEXT:[<ERROR>] PREV:[]
|
||||
- jmp(error) NEXT:[<ERROR>] PREV:[]
|
||||
L10 [skipFinallyToErrorBlock]:
|
||||
call(cond, cond) PREV:[jmp(L10 [skipFinallyToErrorBlock])]
|
||||
jf(copy L12) NEXT:[jmp(L2 [loop entry point]), ret L1]
|
||||
ret L1 NEXT:[<END>]
|
||||
- jmp(copy L13) NEXT:[jmp(L2 [loop entry point])] PREV:[]
|
||||
jmp(L2 [loop entry point]) NEXT:[call(cond, cond)] PREV:[jf(copy L12)]
|
||||
- jmp(L2 [loop entry point]) NEXT:[call(cond, cond)] PREV:[]
|
||||
mark({ if (cond()) return else continue }) PREV:[jmp(L10 [skipFinallyToErrorBlock])]
|
||||
mark(if (cond()) return else continue)
|
||||
mark(cond())
|
||||
call(cond, cond)
|
||||
jf(copy L12) NEXT:[jmp(L2 [loop entry point]), ret L1]
|
||||
ret L1 NEXT:[<END>]
|
||||
- jmp(copy L13) NEXT:[jmp(L2 [loop entry point])] PREV:[]
|
||||
jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[jf(copy L12)]
|
||||
- jmp(L2 [loop entry point]) NEXT:[mark(cond())] PREV:[]
|
||||
L3 [loop exit point]:
|
||||
read (Unit) PREV:[jf(L3 [loop exit point])]
|
||||
read (Unit) PREV:[jf(L3 [loop exit point])]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>] PREV:[ret L1, ret L1, read (Unit)]
|
||||
<END> NEXT:[<SINK>] PREV:[ret L1, ret L1, read (Unit)]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== testCopy3 ==
|
||||
fun testCopy3() {
|
||||
@@ -188,47 +219,61 @@ fun testCopy3() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])]
|
||||
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[call(cond, cond), call(doSmth, doSmth)]
|
||||
call(doSmth, doSmth)
|
||||
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
|
||||
<START>
|
||||
mark({ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); } })
|
||||
mark(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); })
|
||||
jmp?(L2 [onException]) NEXT:[jmp?(L5 [catch 0]), jmp?(L3 [onExceptionToFinallyBlock])]
|
||||
jmp?(L3 [onExceptionToFinallyBlock]) NEXT:[mark({ while (cond()); }), mark({ doSmth() })]
|
||||
mark({ doSmth() })
|
||||
mark(doSmth())
|
||||
call(doSmth, doSmth)
|
||||
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
|
||||
L2 [onException]:
|
||||
jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])]
|
||||
v(e: NullPointerException)
|
||||
w(e)
|
||||
call(doSmth1, doSmth1)
|
||||
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
|
||||
jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])]
|
||||
v(e: NullPointerException)
|
||||
w(e)
|
||||
mark({ doSmth1() })
|
||||
mark(doSmth1())
|
||||
call(doSmth1, doSmth1)
|
||||
jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])]
|
||||
L5 [catch 0]:
|
||||
v(e: Exception) PREV:[jmp?(L5 [catch 0])]
|
||||
w(e)
|
||||
call(doSmth2, doSmth2)
|
||||
jmp(L4 [afterCatches])
|
||||
v(e: Exception) PREV:[jmp?(L5 [catch 0])]
|
||||
w(e)
|
||||
mark({ doSmth2() })
|
||||
mark(doSmth2())
|
||||
call(doSmth2, doSmth2)
|
||||
jmp(L4 [afterCatches])
|
||||
L4 [afterCatches]:
|
||||
jmp(L6 [skipFinallyToErrorBlock]) NEXT:[call(cond, cond)] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])]
|
||||
jmp(L6 [skipFinallyToErrorBlock]) NEXT:[mark({ while (cond()); })] PREV:[jmp(L4 [afterCatches]), jmp(L4 [afterCatches]), jmp(L4 [afterCatches])]
|
||||
L3 [onExceptionToFinallyBlock]:
|
||||
L7 [start finally]:
|
||||
mark({ while (cond()); }) PREV:[jmp?(L3 [onExceptionToFinallyBlock])]
|
||||
mark(while (cond()))
|
||||
L8 [loop entry point]:
|
||||
L11 [condition entry point]:
|
||||
call(cond, cond) PREV:[jmp?(L3 [onExceptionToFinallyBlock]), jmp(L8 [loop entry point])]
|
||||
jf(L9 [loop exit point]) NEXT:[read (Unit), jmp(L8 [loop entry point])]
|
||||
mark(cond()) PREV:[mark(while (cond())), jmp(L8 [loop entry point])]
|
||||
call(cond, cond)
|
||||
jf(L9 [loop exit point]) NEXT:[read (Unit), jmp(L8 [loop entry point])]
|
||||
L10 [body entry point]:
|
||||
jmp(L8 [loop entry point]) NEXT:[call(cond, cond)]
|
||||
jmp(L8 [loop entry point]) NEXT:[mark(cond())]
|
||||
L9 [loop exit point]:
|
||||
read (Unit) PREV:[jf(L9 [loop exit point])]
|
||||
read (Unit) PREV:[jf(L9 [loop exit point])]
|
||||
L12 [finish finally]:
|
||||
jmp(error) NEXT:[<ERROR>]
|
||||
jmp(error) NEXT:[<ERROR>]
|
||||
L6 [skipFinallyToErrorBlock]:
|
||||
call(cond, cond) PREV:[jmp(L6 [skipFinallyToErrorBlock]), jmp(copy L8 [loop entry point])]
|
||||
jf(copy L9 [loop exit point]) NEXT:[read (Unit), jmp(copy L8 [loop entry point])]
|
||||
jmp(copy L8 [loop entry point]) NEXT:[call(cond, cond)]
|
||||
read (Unit) PREV:[jf(copy L9 [loop exit point])]
|
||||
mark({ while (cond()); }) PREV:[jmp(L6 [skipFinallyToErrorBlock])]
|
||||
mark(while (cond()))
|
||||
mark(cond()) PREV:[mark(while (cond())), jmp(copy L8 [loop entry point])]
|
||||
call(cond, cond)
|
||||
jf(copy L9 [loop exit point]) NEXT:[read (Unit), jmp(copy L8 [loop entry point])]
|
||||
jmp(copy L8 [loop entry point]) NEXT:[mark(cond())]
|
||||
read (Unit) PREV:[jf(copy L9 [loop exit point])]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[jmp(error)]
|
||||
<ERROR> PREV:[jmp(error)]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== doTestCopy4 ==
|
||||
fun doTestCopy4(list: List<String>?) : Int {
|
||||
@@ -242,37 +287,49 @@ fun doTestCopy4(list: List<String>?) : Int {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(list: List<String>?)
|
||||
w(list)
|
||||
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(list), call(doSmth, doSmth)]
|
||||
call(doSmth, doSmth)
|
||||
jmp(L3 [skipFinallyToErrorBlock]) NEXT:[r(list)]
|
||||
<START>
|
||||
v(list: List<String>?)
|
||||
w(list)
|
||||
mark({ try { doSmth() } finally { if(list != null) { } } })
|
||||
mark(try { doSmth() } finally { if(list != null) { } })
|
||||
jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[mark({ if(list != null) { } }), mark({ doSmth() })]
|
||||
mark({ doSmth() })
|
||||
mark(doSmth())
|
||||
call(doSmth, doSmth)
|
||||
jmp(L3 [skipFinallyToErrorBlock]) NEXT:[mark({ if(list != null) { } })]
|
||||
L2 [onExceptionToFinallyBlock]:
|
||||
L4 [start finally]:
|
||||
r(list) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
|
||||
r(null)
|
||||
call(list != null, equals)
|
||||
jf(L5) NEXT:[read (Unit), read (Unit)]
|
||||
read (Unit)
|
||||
jmp(L6) NEXT:[jmp(error)]
|
||||
mark({ if(list != null) { } }) PREV:[jmp?(L2 [onExceptionToFinallyBlock])]
|
||||
mark(if(list != null) { })
|
||||
mark(list != null)
|
||||
r(list)
|
||||
r(null)
|
||||
call(list != null, equals)
|
||||
jf(L5) NEXT:[read (Unit), mark({ })]
|
||||
mark({ })
|
||||
read (Unit)
|
||||
jmp(L6) NEXT:[jmp(error)]
|
||||
L5:
|
||||
read (Unit) PREV:[jf(L5)]
|
||||
read (Unit) PREV:[jf(L5)]
|
||||
L6:
|
||||
L7 [finish finally]:
|
||||
jmp(error) NEXT:[<ERROR>] PREV:[jmp(L6), read (Unit)]
|
||||
jmp(error) NEXT:[<ERROR>] PREV:[jmp(L6), read (Unit)]
|
||||
L3 [skipFinallyToErrorBlock]:
|
||||
r(list) PREV:[jmp(L3 [skipFinallyToErrorBlock])]
|
||||
r(null)
|
||||
call(list != null, equals)
|
||||
jf(copy L5) NEXT:[read (Unit), read (Unit)]
|
||||
read (Unit)
|
||||
jmp(copy L6) NEXT:[<END>]
|
||||
read (Unit) PREV:[jf(copy L5)]
|
||||
mark({ if(list != null) { } }) PREV:[jmp(L3 [skipFinallyToErrorBlock])]
|
||||
mark(if(list != null) { })
|
||||
mark(list != null)
|
||||
r(list)
|
||||
r(null)
|
||||
call(list != null, equals)
|
||||
jf(copy L5) NEXT:[read (Unit), mark({ })]
|
||||
mark({ })
|
||||
read (Unit)
|
||||
jmp(copy L6) NEXT:[<END>]
|
||||
read (Unit) PREV:[jf(copy L5)]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>] PREV:[jmp(copy L6), read (Unit)]
|
||||
<END> NEXT:[<SINK>] PREV:[jmp(copy L6), read (Unit)]
|
||||
error:
|
||||
<ERROR> PREV:[jmp(error)]
|
||||
<ERROR> PREV:[jmp(error)]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -6,27 +6,32 @@ fun t1() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
r(1)
|
||||
r(2)
|
||||
call(.., rangeTo)
|
||||
v(i)
|
||||
w(i)
|
||||
<START>
|
||||
mark({ for (i in 1..2) { doSmth(i) } })
|
||||
mark(for (i in 1..2) { doSmth(i) })
|
||||
mark(1..2)
|
||||
r(1)
|
||||
r(2)
|
||||
call(.., rangeTo)
|
||||
v(i)
|
||||
w(i)
|
||||
L3:
|
||||
jmp?(L2) NEXT:[read (Unit), r(i)]
|
||||
jmp?(L2) NEXT:[read (Unit), mark({ doSmth(i) })]
|
||||
L4 [loop entry point]:
|
||||
L5 [body entry point]:
|
||||
r(i) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
|
||||
call(doSmth, doSmth)
|
||||
jmp?(L4 [loop entry point]) NEXT:[r(i), read (Unit)]
|
||||
mark({ doSmth(i) }) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
|
||||
mark(doSmth(i))
|
||||
r(i)
|
||||
call(doSmth, doSmth)
|
||||
jmp?(L4 [loop entry point]) NEXT:[mark({ doSmth(i) }), read (Unit)]
|
||||
L2:
|
||||
read (Unit) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
|
||||
read (Unit) PREV:[jmp?(L2), jmp?(L4 [loop entry point])]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== doSmth ==
|
||||
fun doSmth(i: Int) {}
|
||||
@@ -35,6 +40,7 @@ L0:
|
||||
<START>
|
||||
v(i: Int)
|
||||
w(i)
|
||||
mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
|
||||
@@ -17,38 +17,49 @@ fun t1(b: Boolean) {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(b: Boolean)
|
||||
w(b)
|
||||
v(var u: String)
|
||||
r(b)
|
||||
jf(L2) NEXT:[read (Unit), r("s")]
|
||||
r("s")
|
||||
w(u)
|
||||
jmp(L3) NEXT:[r(u)]
|
||||
<START>
|
||||
v(b: Boolean)
|
||||
w(b)
|
||||
mark({ var u: String if (b) { u = "s" } doSmth(u) var r: String if (b) { r = "s" } else { r = "t" } doSmth(r) })
|
||||
v(var u: String)
|
||||
mark(if (b) { u = "s" })
|
||||
r(b)
|
||||
jf(L2) NEXT:[read (Unit), mark({ u = "s" })]
|
||||
mark({ u = "s" })
|
||||
mark("s")
|
||||
r("s")
|
||||
w(u)
|
||||
jmp(L3) NEXT:[mark(doSmth(u))]
|
||||
L2:
|
||||
read (Unit) PREV:[jf(L2)]
|
||||
read (Unit) PREV:[jf(L2)]
|
||||
L3:
|
||||
r(u) PREV:[jmp(L3), read (Unit)]
|
||||
call(doSmth, doSmth)
|
||||
v(var r: String)
|
||||
r(b)
|
||||
jf(L4) NEXT:[r("t"), r("s")]
|
||||
r("s")
|
||||
w(r)
|
||||
jmp(L5) NEXT:[r(r)]
|
||||
mark(doSmth(u)) PREV:[jmp(L3), read (Unit)]
|
||||
r(u)
|
||||
call(doSmth, doSmth)
|
||||
v(var r: String)
|
||||
mark(if (b) { r = "s" } else { r = "t" })
|
||||
r(b)
|
||||
jf(L4) NEXT:[mark({ r = "t" }), mark({ r = "s" })]
|
||||
mark({ r = "s" })
|
||||
mark("s")
|
||||
r("s")
|
||||
w(r)
|
||||
jmp(L5) NEXT:[mark(doSmth(r))]
|
||||
L4:
|
||||
r("t") PREV:[jf(L4)]
|
||||
w(r)
|
||||
mark({ r = "t" }) PREV:[jf(L4)]
|
||||
mark("t")
|
||||
r("t")
|
||||
w(r)
|
||||
L5:
|
||||
r(r) PREV:[jmp(L5), w(r)]
|
||||
call(doSmth, doSmth)
|
||||
mark(doSmth(r)) PREV:[jmp(L5), w(r)]
|
||||
r(r)
|
||||
call(doSmth, doSmth)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== t2 ==
|
||||
fun t2(b: Boolean) {
|
||||
@@ -63,34 +74,41 @@ fun t2(b: Boolean) {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(b: Boolean)
|
||||
w(b)
|
||||
v(val i = 3)
|
||||
r(3)
|
||||
w(i)
|
||||
r(b)
|
||||
jf(L2) NEXT:[read (Unit), ret L1]
|
||||
ret L1 NEXT:[<END>]
|
||||
- jmp(L3) NEXT:[r(i)] PREV:[]
|
||||
<START>
|
||||
v(b: Boolean)
|
||||
w(b)
|
||||
mark({ val i = 3 if (b) { return; } doSmth(i) if (i is Int) { return; } })
|
||||
v(val i = 3)
|
||||
r(3)
|
||||
w(i)
|
||||
mark(if (b) { return; })
|
||||
r(b)
|
||||
jf(L2) NEXT:[read (Unit), mark({ return; })]
|
||||
mark({ return; })
|
||||
ret L1 NEXT:[<END>]
|
||||
- jmp(L3) NEXT:[mark(doSmth(i))] PREV:[]
|
||||
L2:
|
||||
read (Unit) PREV:[jf(L2)]
|
||||
read (Unit) PREV:[jf(L2)]
|
||||
L3:
|
||||
r(i)
|
||||
call(doSmth, doSmth)
|
||||
r(i)
|
||||
jf(L4) NEXT:[read (Unit), ret L1]
|
||||
ret L1 NEXT:[<END>]
|
||||
- jmp(L5) NEXT:[<END>] PREV:[]
|
||||
mark(doSmth(i))
|
||||
r(i)
|
||||
call(doSmth, doSmth)
|
||||
mark(if (i is Int) { return; })
|
||||
mark(i is Int)
|
||||
r(i)
|
||||
jf(L4) NEXT:[read (Unit), mark({ return; })]
|
||||
mark({ return; })
|
||||
ret L1 NEXT:[<END>]
|
||||
- jmp(L5) NEXT:[<END>] PREV:[]
|
||||
L4:
|
||||
read (Unit) PREV:[jf(L4)]
|
||||
read (Unit) PREV:[jf(L4)]
|
||||
L1:
|
||||
L5:
|
||||
<END> NEXT:[<SINK>] PREV:[ret L1, ret L1, read (Unit)]
|
||||
<END> NEXT:[<SINK>] PREV:[ret L1, ret L1, read (Unit)]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== doSmth ==
|
||||
fun doSmth(s: String) {}
|
||||
@@ -99,6 +117,7 @@ L0:
|
||||
<START>
|
||||
v(s: String)
|
||||
w(s)
|
||||
mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
|
||||
@@ -18,61 +18,69 @@ fun lazyBooleans(a : Boolean, b : Boolean) : Unit {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(a : Boolean)
|
||||
w(a)
|
||||
v(b : Boolean)
|
||||
w(b)
|
||||
r(a)
|
||||
jf(L2) NEXT:[r(2), r(1)]
|
||||
r(1)
|
||||
jmp(L3) NEXT:[r(3)]
|
||||
<START>
|
||||
v(a : Boolean)
|
||||
w(a)
|
||||
v(b : Boolean)
|
||||
w(b)
|
||||
mark({ if (a) { 1 } else { 2 } 3 if (a && b) 5 else 6 7 if (a || b) 8 else 9 10 if (a) 11 12 if (a) else 13 14 })
|
||||
mark(if (a) { 1 } else { 2 })
|
||||
r(a)
|
||||
jf(L2) NEXT:[mark({ 2 }), mark({ 1 })]
|
||||
mark({ 1 })
|
||||
r(1)
|
||||
jmp(L3) NEXT:[r(3)]
|
||||
L2:
|
||||
r(2) PREV:[jf(L2)]
|
||||
mark({ 2 }) PREV:[jf(L2)]
|
||||
r(2)
|
||||
L3:
|
||||
r(3) PREV:[jmp(L3), r(2)]
|
||||
r(a)
|
||||
jf(L4) NEXT:[jf(L5), r(b)]
|
||||
r(b)
|
||||
r(3) PREV:[jmp(L3), r(2)]
|
||||
mark(if (a && b) 5 else 6)
|
||||
r(a)
|
||||
jf(L4) NEXT:[jf(L5), r(b)]
|
||||
r(b)
|
||||
L4:
|
||||
jf(L5) NEXT:[r(6), r(5)] PREV:[jf(L4), r(b)]
|
||||
r(5)
|
||||
jmp(L6) NEXT:[r(7)]
|
||||
jf(L5) NEXT:[r(6), r(5)] PREV:[jf(L4), r(b)]
|
||||
r(5)
|
||||
jmp(L6) NEXT:[r(7)]
|
||||
L5:
|
||||
r(6) PREV:[jf(L5)]
|
||||
r(6) PREV:[jf(L5)]
|
||||
L6:
|
||||
r(7) PREV:[jmp(L6), r(6)]
|
||||
r(a)
|
||||
jt(L7) NEXT:[r(b), jf(L8)]
|
||||
r(b)
|
||||
r(7) PREV:[jmp(L6), r(6)]
|
||||
mark(if (a || b) 8 else 9)
|
||||
r(a)
|
||||
jt(L7) NEXT:[r(b), jf(L8)]
|
||||
r(b)
|
||||
L7:
|
||||
jf(L8) NEXT:[r(9), r(8)] PREV:[jt(L7), r(b)]
|
||||
r(8)
|
||||
jmp(L9) NEXT:[r(10)]
|
||||
jf(L8) NEXT:[r(9), r(8)] PREV:[jt(L7), r(b)]
|
||||
r(8)
|
||||
jmp(L9) NEXT:[r(10)]
|
||||
L8:
|
||||
r(9) PREV:[jf(L8)]
|
||||
r(9) PREV:[jf(L8)]
|
||||
L9:
|
||||
r(10) PREV:[jmp(L9), r(9)]
|
||||
r(a)
|
||||
jf(L10) NEXT:[read (Unit), r(11)]
|
||||
r(11)
|
||||
jmp(L11) NEXT:[r(12)]
|
||||
r(10) PREV:[jmp(L9), r(9)]
|
||||
mark(if (a) 11)
|
||||
r(a)
|
||||
jf(L10) NEXT:[read (Unit), r(11)]
|
||||
r(11)
|
||||
jmp(L11) NEXT:[r(12)]
|
||||
L10:
|
||||
read (Unit) PREV:[jf(L10)]
|
||||
read (Unit) PREV:[jf(L10)]
|
||||
L11:
|
||||
r(12) PREV:[jmp(L11), read (Unit)]
|
||||
r(a)
|
||||
jf(L12) NEXT:[r(13), read (Unit)]
|
||||
read (Unit)
|
||||
jmp(L13) NEXT:[r(14)]
|
||||
r(12) PREV:[jmp(L11), read (Unit)]
|
||||
mark(if (a) else 13)
|
||||
r(a)
|
||||
jf(L12) NEXT:[r(13), read (Unit)]
|
||||
read (Unit)
|
||||
jmp(L13) NEXT:[r(14)]
|
||||
L12:
|
||||
r(13) PREV:[jf(L12)]
|
||||
r(13) PREV:[jf(L12)]
|
||||
L13:
|
||||
r(14) PREV:[jmp(L13), r(13)]
|
||||
r(14) PREV:[jmp(L13), r(13)]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -36,6 +36,7 @@ L0:
|
||||
<START>
|
||||
v(i: Int)
|
||||
w(i)
|
||||
mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
@@ -55,19 +56,22 @@ fun test1() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(val a = object { val x : Int { $x = 1 } })
|
||||
v(val x : Int)
|
||||
r(1)
|
||||
w($x)
|
||||
r(object { val x : Int { $x = 1 } })
|
||||
w(a)
|
||||
<START>
|
||||
mark({ val a = object { val x : Int { $x = 1 } } })
|
||||
v(val a = object { val x : Int { $x = 1 } })
|
||||
mark(object { val x : Int { $x = 1 } })
|
||||
v(val x : Int)
|
||||
mark({ $x = 1 })
|
||||
r(1)
|
||||
w($x)
|
||||
r(object { val x : Int { $x = 1 } })
|
||||
w(a)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== O ==
|
||||
object O {
|
||||
@@ -78,16 +82,17 @@ object O {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(val x : Int)
|
||||
r(1)
|
||||
w($x)
|
||||
<START>
|
||||
v(val x : Int)
|
||||
mark({ $x = 1 })
|
||||
r(1)
|
||||
w($x)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== test2 ==
|
||||
fun test2() {
|
||||
@@ -98,22 +103,24 @@ fun test2() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(val b = 1)
|
||||
r(1)
|
||||
w(b)
|
||||
v(val a = object { val x = b })
|
||||
v(val x = b)
|
||||
r(b)
|
||||
w(x)
|
||||
r(object { val x = b })
|
||||
w(a)
|
||||
<START>
|
||||
mark({ val b = 1 val a = object { val x = b } })
|
||||
v(val b = 1)
|
||||
r(1)
|
||||
w(b)
|
||||
v(val a = object { val x = b })
|
||||
mark(object { val x = b })
|
||||
v(val x = b)
|
||||
r(b)
|
||||
w(x)
|
||||
r(object { val x = b })
|
||||
w(a)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== test3 ==
|
||||
fun test3() {
|
||||
@@ -126,30 +133,33 @@ fun test3() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(val a = object { val y : Int fun inner_bar() { y = 10 } })
|
||||
v(val y : Int)
|
||||
jmp?(L2) NEXT:[r(object { val y : Int fun inner_bar() { y = 10 } }), d(fun inner_bar() { y = 10 })]
|
||||
d(fun inner_bar() { y = 10 }) NEXT:[<SINK>]
|
||||
<START>
|
||||
mark({ val a = object { val y : Int fun inner_bar() { y = 10 } } })
|
||||
v(val a = object { val y : Int fun inner_bar() { y = 10 } })
|
||||
mark(object { val y : Int fun inner_bar() { y = 10 } })
|
||||
v(val y : Int)
|
||||
jmp?(L2) NEXT:[r(object { val y : Int fun inner_bar() { y = 10 } }), d(fun inner_bar() { y = 10 })]
|
||||
d(fun inner_bar() { y = 10 }) NEXT:[<SINK>]
|
||||
L2:
|
||||
r(object { val y : Int fun inner_bar() { y = 10 } }) PREV:[jmp?(L2)]
|
||||
w(a)
|
||||
r(object { val y : Int fun inner_bar() { y = 10 } }) PREV:[jmp?(L2)]
|
||||
w(a)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>, d(fun inner_bar() { y = 10 })]
|
||||
<SINK> PREV:[<ERROR>, <END>, d(fun inner_bar() { y = 10 })]
|
||||
L3:
|
||||
<START>
|
||||
r(10)
|
||||
w(y)
|
||||
<START>
|
||||
mark({ y = 10 })
|
||||
r(10)
|
||||
w(y)
|
||||
L4:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== inner_bar ==
|
||||
fun inner_bar() {
|
||||
@@ -157,15 +167,16 @@ fun inner_bar() {
|
||||
}
|
||||
---------------------
|
||||
L3:
|
||||
<START>
|
||||
r(10)
|
||||
w(y)
|
||||
<START>
|
||||
mark({ y = 10 })
|
||||
r(10)
|
||||
w(y)
|
||||
L4:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== test4 ==
|
||||
fun test4() {
|
||||
@@ -182,33 +193,37 @@ fun test4() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } })
|
||||
v(val x : Int)
|
||||
v(val y : Int)
|
||||
r(1)
|
||||
w($x)
|
||||
jmp?(L2) NEXT:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }), d(fun ggg() { y = 10 })]
|
||||
d(fun ggg() { y = 10 }) NEXT:[<SINK>]
|
||||
<START>
|
||||
mark({ val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } } })
|
||||
v(val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } })
|
||||
mark(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } })
|
||||
v(val x : Int)
|
||||
v(val y : Int)
|
||||
mark({ $x = 1 })
|
||||
r(1)
|
||||
w($x)
|
||||
jmp?(L2) NEXT:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }), d(fun ggg() { y = 10 })]
|
||||
d(fun ggg() { y = 10 }) NEXT:[<SINK>]
|
||||
L2:
|
||||
r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) PREV:[jmp?(L2)]
|
||||
w(a)
|
||||
r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) PREV:[jmp?(L2)]
|
||||
w(a)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>, d(fun ggg() { y = 10 })]
|
||||
<SINK> PREV:[<ERROR>, <END>, d(fun ggg() { y = 10 })]
|
||||
L3:
|
||||
<START>
|
||||
r(10)
|
||||
w(y)
|
||||
<START>
|
||||
mark({ y = 10 })
|
||||
r(10)
|
||||
w(y)
|
||||
L4:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== ggg ==
|
||||
fun ggg() {
|
||||
@@ -216,15 +231,16 @@ fun ggg() {
|
||||
}
|
||||
---------------------
|
||||
L3:
|
||||
<START>
|
||||
r(10)
|
||||
w(y)
|
||||
<START>
|
||||
mark({ y = 10 })
|
||||
r(10)
|
||||
w(y)
|
||||
L4:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== test5 ==
|
||||
fun test5() {
|
||||
@@ -243,47 +259,52 @@ fun test5() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } })
|
||||
v(var x = 1)
|
||||
r(1)
|
||||
w(x)
|
||||
r(2)
|
||||
w($x)
|
||||
jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })]
|
||||
d(fun foo() { x = 3 }) NEXT:[<SINK>]
|
||||
<START>
|
||||
mark({ val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } } })
|
||||
v(val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } })
|
||||
mark(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } })
|
||||
v(var x = 1)
|
||||
r(1)
|
||||
w(x)
|
||||
mark({ $x = 2 })
|
||||
r(2)
|
||||
w($x)
|
||||
jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })]
|
||||
d(fun foo() { x = 3 }) NEXT:[<SINK>]
|
||||
L2:
|
||||
jmp?(L5) NEXT:[r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }), d(fun bar() { x = 4 })] PREV:[jmp?(L2)]
|
||||
d(fun bar() { x = 4 }) NEXT:[<SINK>]
|
||||
jmp?(L5) NEXT:[r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }), d(fun bar() { x = 4 })] PREV:[jmp?(L2)]
|
||||
d(fun bar() { x = 4 }) NEXT:[<SINK>]
|
||||
L5:
|
||||
r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) PREV:[jmp?(L5)]
|
||||
w(a)
|
||||
r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) PREV:[jmp?(L5)]
|
||||
w(a)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>, d(fun foo() { x = 3 }), d(fun bar() { x = 4 })]
|
||||
<SINK> PREV:[<ERROR>, <END>, d(fun foo() { x = 3 }), d(fun bar() { x = 4 })]
|
||||
L3:
|
||||
<START>
|
||||
r(3)
|
||||
w(x)
|
||||
<START>
|
||||
mark({ x = 3 })
|
||||
r(3)
|
||||
w(x)
|
||||
L4:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
L6:
|
||||
<START>
|
||||
r(4)
|
||||
w(x)
|
||||
<START>
|
||||
mark({ x = 4 })
|
||||
r(4)
|
||||
w(x)
|
||||
L7:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== foo ==
|
||||
fun foo() {
|
||||
@@ -291,15 +312,16 @@ fun foo() {
|
||||
}
|
||||
---------------------
|
||||
L3:
|
||||
<START>
|
||||
r(3)
|
||||
w(x)
|
||||
<START>
|
||||
mark({ x = 3 })
|
||||
r(3)
|
||||
w(x)
|
||||
L4:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== bar ==
|
||||
fun bar() {
|
||||
@@ -307,13 +329,14 @@ fun bar() {
|
||||
}
|
||||
---------------------
|
||||
L6:
|
||||
<START>
|
||||
r(4)
|
||||
w(x)
|
||||
<START>
|
||||
mark({ x = 4 })
|
||||
r(4)
|
||||
w(x)
|
||||
L7:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -20,23 +20,24 @@ fun test(c: C) {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(c: C)
|
||||
w(c)
|
||||
r(c)
|
||||
v(a)
|
||||
call(a, component1)
|
||||
w(a)
|
||||
v(b)
|
||||
call(b, component2)
|
||||
w(b)
|
||||
v(val d = 1)
|
||||
r(1)
|
||||
w(d)
|
||||
<START>
|
||||
v(c: C)
|
||||
w(c)
|
||||
mark({ val (a, b) = c val d = 1 })
|
||||
r(c)
|
||||
v(a)
|
||||
call(a, component1)
|
||||
w(a)
|
||||
v(b)
|
||||
call(b, component2)
|
||||
w(b)
|
||||
v(val d = 1)
|
||||
r(1)
|
||||
w(d)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -34,20 +34,24 @@ fun foo(b: B) : Int {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(b: B)
|
||||
w(b)
|
||||
v(val o = object : A by b {})
|
||||
r(b)
|
||||
r(object : A by b {})
|
||||
w(o)
|
||||
r(o)
|
||||
call(foo, foo)
|
||||
ret(*) L1
|
||||
<START>
|
||||
v(b: B)
|
||||
w(b)
|
||||
mark({ val o = object : A by b {} return o.foo() })
|
||||
v(val o = object : A by b {})
|
||||
mark(object : A by b {})
|
||||
r(b)
|
||||
r(object : A by b {})
|
||||
w(o)
|
||||
mark(o.foo())
|
||||
mark(foo())
|
||||
r(o)
|
||||
call(foo, foo)
|
||||
ret(*) L1
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -6,24 +6,28 @@ fun main() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
<START>
|
||||
mark({ while(1 > 0) { 2 } })
|
||||
mark(while(1 > 0) { 2 })
|
||||
L2 [loop entry point]:
|
||||
L5 [condition entry point]:
|
||||
r(1) PREV:[<START>, jmp(L2 [loop entry point])]
|
||||
r(0)
|
||||
call(>, compareTo)
|
||||
jf(L3 [loop exit point]) NEXT:[read (Unit), r(2)]
|
||||
mark(1 > 0) PREV:[mark(while(1 > 0) { 2 }), jmp(L2 [loop entry point])]
|
||||
r(1)
|
||||
r(0)
|
||||
call(>, compareTo)
|
||||
jf(L3 [loop exit point]) NEXT:[read (Unit), mark({ 2 })]
|
||||
L4 [body entry point]:
|
||||
r(2)
|
||||
jmp(L2 [loop entry point]) NEXT:[r(1)]
|
||||
mark({ 2 })
|
||||
r(2)
|
||||
jmp(L2 [loop entry point]) NEXT:[mark(1 > 0)]
|
||||
L3 [loop exit point]:
|
||||
read (Unit) PREV:[jf(L3 [loop exit point])]
|
||||
read (Unit) PREV:[jf(L3 [loop exit point])]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== dowhile ==
|
||||
fun dowhile() {
|
||||
@@ -32,21 +36,25 @@ fun dowhile() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
<START>
|
||||
mark({ do {return} while(1 > 0) })
|
||||
mark(do {return} while(1 > 0))
|
||||
L2 [loop entry point]:
|
||||
L4 [body entry point]:
|
||||
ret L1 NEXT:[<END>]
|
||||
mark({return})
|
||||
ret L1 NEXT:[<END>]
|
||||
L5 [condition entry point]:
|
||||
- r(1) PREV:[]
|
||||
- r(0) PREV:[]
|
||||
- call(>, compareTo) PREV:[]
|
||||
- jt(L2 [loop entry point]) NEXT:[read (Unit), ret L1] PREV:[]
|
||||
- mark(1 > 0) PREV:[]
|
||||
- r(1) PREV:[]
|
||||
- r(0) PREV:[]
|
||||
- call(>, compareTo) PREV:[]
|
||||
- jt(L2 [loop entry point]) NEXT:[read (Unit), mark({return})] PREV:[]
|
||||
L3 [loop exit point]:
|
||||
- read (Unit) PREV:[]
|
||||
- read (Unit) PREV:[]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>] PREV:[ret L1]
|
||||
<END> NEXT:[<SINK>] PREV:[ret L1]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -4,17 +4,19 @@ fun blockAndAndMismatch() : Boolean {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
r(false)
|
||||
jt(L2) NEXT:[r(false), r(false || (return false))]
|
||||
r(false)
|
||||
ret(*) L1 NEXT:[<END>]
|
||||
<START>
|
||||
mark({ false || (return false) })
|
||||
r(false)
|
||||
jt(L2) NEXT:[mark((return false)), r(false || (return false))]
|
||||
mark((return false))
|
||||
r(false)
|
||||
ret(*) L1 NEXT:[<END>]
|
||||
L2:
|
||||
r(false || (return false)) PREV:[jt(L2)]
|
||||
r(false || (return false)) PREV:[jt(L2)]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>] PREV:[ret(*) L1, r(false || (return false))]
|
||||
<END> NEXT:[<SINK>] PREV:[ret(*) L1, r(false || (return false))]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -21,6 +21,10 @@ L0:
|
||||
<START>
|
||||
v(ab: Ab)
|
||||
w(ab)
|
||||
mark({ ab.getArray()[1] })
|
||||
mark(ab.getArray()[1])
|
||||
mark(ab.getArray())
|
||||
mark(getArray())
|
||||
r(ab)
|
||||
call(getArray, getArray)
|
||||
r(1)
|
||||
|
||||
@@ -4,17 +4,19 @@ fun foo(a: Array<Int>) {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(a: Array<Int>)
|
||||
w(a)
|
||||
r(a)
|
||||
r(1)
|
||||
r(2)
|
||||
call(a[1], set)
|
||||
<START>
|
||||
v(a: Array<Int>)
|
||||
w(a)
|
||||
mark({ a[1] = 2 })
|
||||
mark(a[1])
|
||||
r(a)
|
||||
r(1)
|
||||
r(2)
|
||||
call(a[1], set)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -4,22 +4,25 @@ fun foo(a: Array<Int>) {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(a: Array<Int>)
|
||||
w(a)
|
||||
r(a)
|
||||
r(0)
|
||||
call(a[0], get)
|
||||
r(1)
|
||||
call(+=, plus)
|
||||
r(a)
|
||||
r(0)
|
||||
r(1)
|
||||
call(a[0], set)
|
||||
<START>
|
||||
v(a: Array<Int>)
|
||||
w(a)
|
||||
mark({ a[0] += 1 })
|
||||
mark(a[0] += 1)
|
||||
mark(a[0])
|
||||
r(a)
|
||||
r(0)
|
||||
call(a[0], get)
|
||||
r(1)
|
||||
call(+=, plus)
|
||||
r(a)
|
||||
r(0)
|
||||
r(1)
|
||||
call(a[0], set)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -7,6 +7,7 @@ L0:
|
||||
<START>
|
||||
v(c: C)
|
||||
w(c)
|
||||
mark({ this = c })
|
||||
r(c)
|
||||
unsupported(BINARY_EXPRESSION : this = c)
|
||||
L1:
|
||||
|
||||
@@ -11,12 +11,13 @@ class C {
|
||||
L0:
|
||||
<START>
|
||||
v(val a: Int get() = 1)
|
||||
jmp?(L2) NEXT:[r($a), d(get() = 1)]
|
||||
d(get() = 1) NEXT:[<SINK>]
|
||||
jmp?(L2) NEXT:[mark({ $a }), d(get() = 1)]
|
||||
d(get() = 1) NEXT:[<SINK>]
|
||||
L2:
|
||||
r($a) PREV:[jmp?(L2)]
|
||||
mark({ $a }) PREV:[jmp?(L2)]
|
||||
r($a)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
|
||||
@@ -5,14 +5,18 @@ fun test() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
call(Exception, <init>)
|
||||
throw (throw Exception()) NEXT:[<ERROR>]
|
||||
- call(test, test) PREV:[]
|
||||
<START>
|
||||
mark({ throw Exception() test() })
|
||||
mark(throw Exception())
|
||||
mark(Exception())
|
||||
call(Exception, <init>)
|
||||
throw (throw Exception()) NEXT:[<ERROR>]
|
||||
- mark(test()) PREV:[]
|
||||
- call(test, test) PREV:[]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>] PREV:[]
|
||||
<END> NEXT:[<SINK>] PREV:[]
|
||||
error:
|
||||
<ERROR> PREV:[throw (throw Exception())]
|
||||
<ERROR> PREV:[throw (throw Exception())]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -4,15 +4,16 @@ fun foo() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
ret L1 NEXT:[<END>]
|
||||
- jt(L2) NEXT:[r(null), <END>] PREV:[]
|
||||
- r(null) PREV:[]
|
||||
<START>
|
||||
mark({ return ?: null })
|
||||
ret L1 NEXT:[<END>]
|
||||
- jt(L2) NEXT:[r(null), <END>] PREV:[]
|
||||
- r(null) PREV:[]
|
||||
L1:
|
||||
L2:
|
||||
<END> NEXT:[<SINK>] PREV:[ret L1]
|
||||
<END> NEXT:[<SINK>] PREV:[ret L1]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -5,24 +5,28 @@ fun foo(a: Int, b: Int) {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(a: Int)
|
||||
w(a)
|
||||
v(b: Int)
|
||||
w(b)
|
||||
r(a)
|
||||
r(b)
|
||||
call(a == b, equals)
|
||||
jf(L2) NEXT:[read (Unit), read (Unit)]
|
||||
read (Unit)
|
||||
jmp(L3) NEXT:[<END>]
|
||||
<START>
|
||||
v(a: Int)
|
||||
w(a)
|
||||
v(b: Int)
|
||||
w(b)
|
||||
mark({ if (a == b) { } })
|
||||
mark(if (a == b) { })
|
||||
mark(a == b)
|
||||
r(a)
|
||||
r(b)
|
||||
call(a == b, equals)
|
||||
jf(L2) NEXT:[read (Unit), mark({ })]
|
||||
mark({ })
|
||||
read (Unit)
|
||||
jmp(L3) NEXT:[<END>]
|
||||
L2:
|
||||
read (Unit) PREV:[jf(L2)]
|
||||
read (Unit) PREV:[jf(L2)]
|
||||
L1:
|
||||
L3:
|
||||
<END> NEXT:[<SINK>] PREV:[jmp(L3), read (Unit)]
|
||||
<END> NEXT:[<SINK>] PREV:[jmp(L3), read (Unit)]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -7,6 +7,9 @@ L0:
|
||||
<START>
|
||||
v(f: () -> Unit)
|
||||
w(f)
|
||||
mark({ (f)() })
|
||||
mark((f)())
|
||||
mark((f))
|
||||
r(f)
|
||||
call((f), <for expression (f)>)
|
||||
L1:
|
||||
|
||||
@@ -5,17 +5,19 @@ fun foo() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(var i = 1)
|
||||
r(1)
|
||||
w(i)
|
||||
r(i)
|
||||
call(++, inc)
|
||||
w(i)
|
||||
<START>
|
||||
mark({ var i = 1 i++ })
|
||||
v(var i = 1)
|
||||
r(1)
|
||||
w(i)
|
||||
mark(i++)
|
||||
r(i)
|
||||
call(++, inc)
|
||||
w(i)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -7,6 +7,8 @@ L0:
|
||||
<START>
|
||||
v(f: () -> Unit)
|
||||
w(f)
|
||||
mark({ f() })
|
||||
mark(f())
|
||||
r(f)
|
||||
call(f, invoke)
|
||||
L1:
|
||||
|
||||
@@ -5,19 +5,20 @@ fun foo(x: Int) {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(x: Int)
|
||||
w(x)
|
||||
r(x)
|
||||
v(a)
|
||||
w(a)
|
||||
v(b)
|
||||
w(b)
|
||||
r(a)
|
||||
<START>
|
||||
v(x: Int)
|
||||
w(x)
|
||||
mark({ val (a, b) = x a })
|
||||
r(x)
|
||||
v(a)
|
||||
w(a)
|
||||
v(b)
|
||||
w(b)
|
||||
r(a)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -4,24 +4,28 @@ fun neq(a: Int, b: Int) {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(a: Int)
|
||||
w(a)
|
||||
v(b: Int)
|
||||
w(b)
|
||||
r(a)
|
||||
r(b)
|
||||
call(a != b, equals)
|
||||
jf(L2) NEXT:[read (Unit), read (Unit)]
|
||||
read (Unit)
|
||||
jmp(L3) NEXT:[<END>]
|
||||
<START>
|
||||
v(a: Int)
|
||||
w(a)
|
||||
v(b: Int)
|
||||
w(b)
|
||||
mark({ if (a != b) {} })
|
||||
mark(if (a != b) {})
|
||||
mark(a != b)
|
||||
r(a)
|
||||
r(b)
|
||||
call(a != b, equals)
|
||||
jf(L2) NEXT:[read (Unit), mark({})]
|
||||
mark({})
|
||||
read (Unit)
|
||||
jmp(L3) NEXT:[<END>]
|
||||
L2:
|
||||
read (Unit) PREV:[jf(L2)]
|
||||
read (Unit) PREV:[jf(L2)]
|
||||
L1:
|
||||
L3:
|
||||
<END> NEXT:[<SINK>] PREV:[jmp(L3), read (Unit)]
|
||||
<END> NEXT:[<SINK>] PREV:[jmp(L3), read (Unit)]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -4,15 +4,17 @@ fun test(s: String?) {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(s: String?)
|
||||
w(s)
|
||||
r(s)
|
||||
r(length)
|
||||
<START>
|
||||
v(s: String?)
|
||||
w(s)
|
||||
mark({ s?.length })
|
||||
mark(s?.length)
|
||||
r(s)
|
||||
r(length)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -6,17 +6,17 @@ fun illegalWhenBlock(a: Any): Any {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
v(a: Any)
|
||||
w(a)
|
||||
<START>
|
||||
v(a: Any)
|
||||
w(a)
|
||||
mark({ when(a) { is Int -> return a } })
|
||||
mark(when(a) { is Int -> return a })
|
||||
r(a)
|
||||
mark(is Int -> return a)
|
||||
jmp?(L4) NEXT:[<END>, r(a)]
|
||||
mark(when(a) { is Int -> return a })
|
||||
r(a)
|
||||
mark(is Int -> return a)
|
||||
jmp?(L4) NEXT:[<END>, r(a)]
|
||||
L3:
|
||||
r(a)
|
||||
ret(*) L1 NEXT:[<END>]
|
||||
r(a)
|
||||
ret(*) L1 NEXT:[<END>]
|
||||
- jmp(L2) PREV:[]
|
||||
L1:
|
||||
L2:
|
||||
|
||||
@@ -5,6 +5,8 @@ fun Function0<Unit>.foo() {
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
mark({ this() })
|
||||
mark(this())
|
||||
r(this)
|
||||
call(this, <for expression this>)
|
||||
L1:
|
||||
|
||||
@@ -5,6 +5,7 @@ fun <T> foo() {
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
mark({ T })
|
||||
error(T, No resolved call)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
|
||||
@@ -7,6 +7,9 @@ L0:
|
||||
<START>
|
||||
v(a: Any)
|
||||
w(a)
|
||||
mark({ a.foo() })
|
||||
mark(a.foo())
|
||||
mark(foo())
|
||||
error(foo, No resolved call)
|
||||
error(foo, No resolved call)
|
||||
r(a)
|
||||
|
||||
@@ -4,19 +4,22 @@ fun foo() {
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
<START>
|
||||
jmp?(L2) NEXT:[r({}), d({})]
|
||||
d({}) NEXT:[<SINK>]
|
||||
<START>
|
||||
mark({ {} })
|
||||
mark({})
|
||||
jmp?(L2) NEXT:[r({}), d({})]
|
||||
d({}) NEXT:[<SINK>]
|
||||
L2:
|
||||
r({}) PREV:[jmp?(L2)]
|
||||
r({}) PREV:[jmp?(L2)]
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>, d({})]
|
||||
<SINK> PREV:[<ERROR>, <END>, d({})]
|
||||
L3:
|
||||
<START>
|
||||
mark()
|
||||
read (Unit)
|
||||
L4:
|
||||
<END> NEXT:[<SINK>]
|
||||
@@ -30,6 +33,7 @@ sink:
|
||||
---------------------
|
||||
L3:
|
||||
<START>
|
||||
mark()
|
||||
read (Unit)
|
||||
L4:
|
||||
<END> NEXT:[<SINK>]
|
||||
|
||||
Reference in New Issue
Block a user