Pseudocode: Add debug information to magic instructions
This commit is contained in:
@@ -50,7 +50,7 @@ fun test(c: C) {
|
||||
L0:
|
||||
1 <START>
|
||||
v(c: C)
|
||||
magic(c: C) -> <v0>
|
||||
magic[FAKE_INITIALIZER](c: C) -> <v0>
|
||||
w(c|<v0>)
|
||||
2 mark({ val (a, b) = c val d = 1 })
|
||||
r(c) -> <v1>
|
||||
@@ -64,9 +64,9 @@ L0:
|
||||
r(1) -> <v4>
|
||||
w(d|<v4>)
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>]
|
||||
1 <END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
@@ -21,9 +21,9 @@ fun test(c: C) {
|
||||
val d = 1
|
||||
}
|
||||
---------------------
|
||||
<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>
|
||||
<v0>: C NEW: magic[FAKE_INITIALIZER](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>
|
||||
=====================
|
||||
|
||||
+6
-6
@@ -7,21 +7,21 @@ fun foo(x: Int) {
|
||||
L0:
|
||||
1 <START>
|
||||
v(x: Int)
|
||||
magic(x: Int) -> <v0>
|
||||
magic[FAKE_INITIALIZER](x: Int) -> <v0>
|
||||
w(x|<v0>)
|
||||
2 mark({ val (a, b) = x a })
|
||||
r(x) -> <v1>
|
||||
v(a)
|
||||
magic(a|<v1>) -> <v2>
|
||||
magic[UNRESOLVED_CALL](a|<v1>) -> <v2>
|
||||
w(a|<v2>)
|
||||
v(b)
|
||||
magic(b|<v1>) -> <v3>
|
||||
magic[UNRESOLVED_CALL](b|<v1>) -> <v3>
|
||||
w(b|<v3>)
|
||||
r(a) -> <v4>
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>]
|
||||
1 <END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
|
||||
+7
-7
@@ -4,10 +4,10 @@ fun foo(x: Int) {
|
||||
a
|
||||
}
|
||||
---------------------
|
||||
<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
|
||||
=====================
|
||||
<v0>: Int NEW: magic[FAKE_INITIALIZER](x: Int) -> <v0>
|
||||
<v2>: {<: [ERROR : component1() return type]} NEW: magic[UNRESOLVED_CALL](a|<v1>) -> <v2>
|
||||
<v3>: {<: [ERROR : component2() return type]} NEW: magic[UNRESOLVED_CALL](b|<v1>) -> <v3>
|
||||
x <v1>: * NEW: r(x) -> <v1>
|
||||
a <v4>: * NEW: r(a) -> <v4>
|
||||
{ val (a, b) = x a } <v4>: * COPY
|
||||
=====================
|
||||
|
||||
Reference in New Issue
Block a user