Pseudocode: Add debug information to magic instructions

This commit is contained in:
Alexey Sedunov
2014-06-26 13:06:28 +04:00
parent d636d362b7
commit 4707f4a5e9
125 changed files with 1204 additions and 1157 deletions
@@ -18,19 +18,19 @@ fun get(_this: Any, p: PropertyMetadata): Int = 0
L0:
1 <START>
v(_this: Any)
magic(_this: Any) -> <v0>
magic[FAKE_INITIALIZER](_this: Any) -> <v0>
w(_this|<v0>)
v(p: PropertyMetadata)
magic(p: PropertyMetadata) -> <v1>
magic[FAKE_INITIALIZER](p: PropertyMetadata) -> <v1>
w(p|<v1>)
r(0) -> <v2>
ret(*|<v2>) L1
L1:
<END> NEXT:[<SINK>]
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
<SINK> PREV:[<ERROR>, <END>]
=====================
== a ==
val a = Delegate()
@@ -7,8 +7,8 @@ class Delegate {
== get ==
fun get(_this: Any, p: PropertyMetadata): Int = 0
---------------------
<v0>: {<: Any} NEW: magic(_this: Any) -> <v0>
<v1>: {<: PropertyMetadata} NEW: magic(p: PropertyMetadata) -> <v1>
<v0>: {<: Any} NEW: magic[FAKE_INITIALIZER](_this: Any) -> <v0>
<v1>: {<: PropertyMetadata} NEW: magic[FAKE_INITIALIZER](p: PropertyMetadata) -> <v1>
0 <v2>: Int NEW: r(0) -> <v2>
=====================
== a ==
@@ -12,12 +12,12 @@ L0:
1 <START>
v(val a: Int get() = 1)
2 mark({ $a })
magic($a) -> <v0>
magic[IMPLICIT_RECEIVER]($a) -> <v0>
r($a|<v0>) -> <v1>
L1:
1 <END> NEXT:[<SINK>]
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
<SINK> PREV:[<ERROR>, <END>]
=====================
@@ -8,7 +8,7 @@ class C {
}
}
---------------------
<v0>: C NEW: magic($a) -> <v0>
<v0>: C NEW: magic[IMPLICIT_RECEIVER]($a) -> <v0>
$a <v1>: * NEW: r($a|<v0>) -> <v1>
{ $a } <v1>: * COPY
=====================
=====================