Control-Flow: Add tests for pseudo-values of labeled expressions

This commit is contained in:
Alexey Sedunov
2015-04-20 14:32:18 +03:00
parent 417611e2be
commit 5b1906fb13
5 changed files with 57 additions and 0 deletions
@@ -0,0 +1,26 @@
== foo ==
fun foo(): Int {
val t = @x (1 + 2)
return t
}
---------------------
L0:
1 <START>
2 mark({ val t = @x (1 + 2) return t })
v(val t = @x (1 + 2))
mark(@x (1 + 2))
mark((1 + 2))
r(1) -> <v0>
r(2) -> <v1>
mark(1 + 2)
call(1 + 2, plus|<v0>, <v1>) -> <v2>
w(t|<v2>)
r(t) -> <v3>
ret(*|<v3>) L1
L1:
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================