Pseudocode: Introduce pseudo-value analysis

This commit is contained in:
Alexey Sedunov
2014-05-12 17:42:44 +04:00
parent 3ce96671d9
commit d2c055e9da
103 changed files with 2417 additions and 1432 deletions
@@ -18,16 +18,18 @@ fun get(_this: Any, p: PropertyMetadata): Int = 0
L0:
1 <START>
v(_this: Any)
w(_this)
magic(_this: Any) -> <v0>
w(_this|<v0>)
v(p: PropertyMetadata)
w(p)
r(0)
magic(p: PropertyMetadata) -> <v1>
w(p|<v1>)
r(0) -> <v2>
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()
@@ -36,14 +38,14 @@ L0:
1 <START>
v(val a = Delegate())
mark(Delegate())
call(Delegate, <init>)
w(a)
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
@@ -51,7 +53,7 @@ val b by a
L0:
1 <START>
v(val b by a)
r(a)
r(a) -> <v0>
L1:
<END> NEXT:[<SINK>]
error:
@@ -12,7 +12,7 @@ L0:
1 <START>
v(val a: Int get() = 1)
2 mark({ $a })
r($a)
r($a) -> <v0>
L1:
1 <END> NEXT:[<SINK>]
error:
@@ -21,15 +21,15 @@ L0:
1 <START>
mark("foo" + this.$bar)
mark("foo")
r("foo")
r("foo") -> <v0>
mark(this.$bar)
r(this)
r($bar)
call(+, plus)
r(this) -> <v1>
r($bar|<v1>) -> <v2>
call(+, 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>]
=====================