Pseudocode: Implement computation of expected type predicates

This commit is contained in:
Alexey Sedunov
2014-06-23 14:02:22 +04:00
parent 50228fa085
commit 5e2c2b4eca
87 changed files with 1154 additions and 803 deletions
@@ -7,15 +7,15 @@ class Delegate {
== get ==
fun get(_this: Any, p: PropertyMetadata): Int = 0
---------------------
0 <v2> NEW()
0 <v2>: Int NEW()
=====================
== a ==
val a = Delegate()
---------------------
Delegate() <v0> NEW()
Delegate() <v0>: Delegate NEW()
=====================
== b ==
val b by a
---------------------
a <v0> NEW()
a <v0>: * NEW()
=====================
@@ -8,6 +8,6 @@ class C {
}
}
---------------------
$a <v1> NEW(<v0>)
{ $a } <v1> COPY
$a <v1>: * NEW(<v0>)
{ $a } <v1>: * COPY
=====================
@@ -8,10 +8,10 @@ abstract class Bar {
== foo ==
fun foo() = "foo" + this.$bar
---------------------
"foo" <v0> NEW()
this <v1> COPY
this <v1> NEW()
$bar <v2> NEW(<v1>)
this.$bar <v2> COPY
"foo" + this.$bar <v3> NEW(<v0>, <v2>)
"foo" <v0>: String NEW()
this <v1>: {<: Bar} COPY
this <v1>: {<: Bar} NEW()
$bar <v2>: {<: Any?} NEW(<v1>)
this.$bar <v2>: {<: Any?} COPY
"foo" + this.$bar <v3>: String NEW(<v0>, <v2>)
=====================