Updated tests for control flow: call instruction stores call element
instead of callee expression
This commit is contained in:
@@ -17,7 +17,7 @@ class AnonymousInitializers() {
|
||||
---------------------
|
||||
<v1>: AnonymousInitializers NEW: magic($i) -> <v1>
|
||||
<v3>: AnonymousInitializers NEW: magic($i) -> <v3>
|
||||
34 <v0>: Int NEW: r(34) -> <v0>
|
||||
12 <v2>: Int NEW: r(12) -> <v2>
|
||||
13 <v4>: Int NEW: r(13) -> <v4>
|
||||
=====================
|
||||
34 <v0>: Int NEW: r(34) -> <v0>
|
||||
12 <v2>: Int NEW: r(12) -> <v2>
|
||||
13 <v4>: Int NEW: r(13) -> <v4>
|
||||
=====================
|
||||
@@ -9,7 +9,7 @@ L0:
|
||||
mark(throw java.lang.RuntimeException())
|
||||
mark(java.lang.RuntimeException())
|
||||
mark(RuntimeException())
|
||||
call(RuntimeException, <init>) -> <v0>
|
||||
call(RuntimeException(), <init>) -> <v0>
|
||||
throw (throw java.lang.RuntimeException()|<v0>) NEXT:[<ERROR>]
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>] PREV:[]
|
||||
|
||||
@@ -3,6 +3,6 @@ fun fail() : Nothing {
|
||||
throw java.lang.RuntimeException()
|
||||
}
|
||||
---------------------
|
||||
RuntimeException() <v0>: {<: Throwable} NEW: call(RuntimeException, <init>) -> <v0>
|
||||
RuntimeException() <v0>: {<: Throwable} NEW: call(RuntimeException(), <init>) -> <v0>
|
||||
java.lang.RuntimeException() <v0>: {<: Throwable} COPY
|
||||
=====================
|
||||
|
||||
@@ -72,7 +72,7 @@ L0:
|
||||
mark(o.foo())
|
||||
r(o) -> <v3>
|
||||
mark(foo())
|
||||
call(foo, foo|<v3>) -> <v4>
|
||||
call(foo(), foo|<v3>) -> <v4>
|
||||
ret(*|<v4>) L1
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>]
|
||||
|
||||
@@ -25,10 +25,10 @@ fun foo(b: B) : Int {
|
||||
return o.foo()
|
||||
}
|
||||
---------------------
|
||||
<v0>: B NEW: magic(b: B) -> <v0>
|
||||
b <v1>: * NEW: r(b) -> <v1>
|
||||
<v0>: B NEW: magic(b: B) -> <v0>
|
||||
b <v1>: * NEW: r(b) -> <v1>
|
||||
object : A by b {} <v2>: <no name provided> NEW: r(object : A by b {}) -> <v2>
|
||||
o <v3>: {<: A} NEW: r(o) -> <v3>
|
||||
foo() <v4>: Int NEW: call(foo, foo|<v3>) -> <v4>
|
||||
o.foo() <v4>: Int COPY
|
||||
=====================
|
||||
o <v3>: {<: A} NEW: r(o) -> <v3>
|
||||
foo() <v4>: Int NEW: call(foo(), foo|<v3>) -> <v4>
|
||||
o.foo() <v4>: Int COPY
|
||||
=====================
|
||||
@@ -21,9 +21,9 @@ fun test(c: C) {
|
||||
val d = 1
|
||||
}
|
||||
---------------------
|
||||
<v0>: C NEW: magic(c: C) -> <v0>
|
||||
<v0>: C NEW: magic(c: C) -> <v0>
|
||||
a <v2>: Int NEW: call(a, component1|<v1>) -> <v2>
|
||||
b <v3>: Int NEW: call(b, component2|<v1>) -> <v3>
|
||||
c <v1>: C NEW: r(c) -> <v1>
|
||||
1 <v4>: Int NEW: r(1) -> <v4>
|
||||
c <v1>: C NEW: r(c) -> <v1>
|
||||
1 <v4>: Int NEW: r(1) -> <v4>
|
||||
=====================
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@ fun foo(x: Int) {
|
||||
<v0>: Int NEW: magic(x: Int) -> <v0>
|
||||
<v2>: {<: [ERROR : component1() return type]} NEW: magic(a|<v1>) -> <v2>
|
||||
<v3>: {<: [ERROR : component2() return type]} NEW: magic(b|<v1>) -> <v3>
|
||||
x <v1>: * NEW: r(x) -> <v1>
|
||||
a <v4>: * NEW: r(a) -> <v4>
|
||||
{ val (a, b) = x a } <v4>: * COPY
|
||||
=====================
|
||||
x <v1>: * NEW: r(x) -> <v1>
|
||||
a <v4>: * NEW: r(a) -> <v4>
|
||||
{ val (a, b) = x a } <v4>: * COPY
|
||||
=====================
|
||||
@@ -38,14 +38,14 @@ L0:
|
||||
1 <START>
|
||||
v(val a = Delegate())
|
||||
mark(Delegate())
|
||||
call(Delegate, <init>) -> <v0>
|
||||
call(Delegate(), <init>) -> <v0>
|
||||
w(a|<v0>)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== b ==
|
||||
val b by a
|
||||
|
||||
@@ -7,14 +7,14 @@ class Delegate {
|
||||
== get ==
|
||||
fun get(_this: Any, p: PropertyMetadata): Int = 0
|
||||
---------------------
|
||||
<v0>: {<: Any} NEW: magic(_this: Any) -> <v0>
|
||||
<v0>: {<: Any} NEW: magic(_this: Any) -> <v0>
|
||||
<v1>: {<: PropertyMetadata} NEW: magic(p: PropertyMetadata) -> <v1>
|
||||
0 <v2>: Int NEW: r(0) -> <v2>
|
||||
0 <v2>: Int NEW: r(0) -> <v2>
|
||||
=====================
|
||||
== a ==
|
||||
val a = Delegate()
|
||||
---------------------
|
||||
Delegate() <v0>: Delegate NEW: call(Delegate, <init>) -> <v0>
|
||||
Delegate() <v0>: Delegate NEW: call(Delegate(), <init>) -> <v0>
|
||||
=====================
|
||||
== b ==
|
||||
val b by a
|
||||
|
||||
@@ -8,7 +8,7 @@ class C {
|
||||
}
|
||||
}
|
||||
---------------------
|
||||
<v0>: C NEW: magic($a) -> <v0>
|
||||
<v0>: C NEW: magic($a) -> <v0>
|
||||
$a <v1>: * NEW: r($a|<v0>) -> <v1>
|
||||
{ $a } <v1>: * COPY
|
||||
=====================
|
||||
{ $a } <v1>: * COPY
|
||||
=====================
|
||||
+4
-4
@@ -25,11 +25,11 @@ L0:
|
||||
r(this) -> <v1>
|
||||
r($bar|<v1>) -> <v2>
|
||||
mark("foo" + this.$bar)
|
||||
call(+, plus|<v0>, <v2>) -> <v3>
|
||||
call("foo" + this.$bar, plus|<v0>, <v2>) -> <v3>
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -8,10 +8,10 @@ abstract class Bar {
|
||||
== foo ==
|
||||
fun foo() = "foo" + this.$bar
|
||||
---------------------
|
||||
"foo" <v0>: String NEW: r("foo") -> <v0>
|
||||
this <v1>: {<: Bar} COPY
|
||||
this <v1>: {<: Bar} NEW: r(this) -> <v1>
|
||||
$bar <v2>: {<: Any?} NEW: r($bar|<v1>) -> <v2>
|
||||
this.$bar <v2>: {<: Any?} COPY
|
||||
"foo" + this.$bar <v3>: String NEW: call(+, plus|<v0>, <v2>) -> <v3>
|
||||
=====================
|
||||
"foo" <v0>: String NEW: r("foo") -> <v0>
|
||||
this <v1>: {<: Bar} COPY
|
||||
this <v1>: {<: Bar} NEW: r(this) -> <v1>
|
||||
$bar <v2>: {<: Any?} NEW: r($bar|<v1>) -> <v2>
|
||||
this.$bar <v2>: {<: Any?} COPY
|
||||
"foo" + this.$bar <v3>: String NEW: call("foo" + this.$bar, plus|<v0>, <v2>) -> <v3>
|
||||
=====================
|
||||
Reference in New Issue
Block a user