Pseudocode: Generate additional returns for implicit return values (lambdas, functions with expression bodies)

This commit is contained in:
Alexey Sedunov
2014-06-27 13:42:40 +04:00
parent 3e3918ab6e
commit 0a8fa404bf
21 changed files with 73 additions and 68 deletions
@@ -43,8 +43,9 @@ L3:
r(x) -> <v7> USE: in: {} out: {x=READ}
mark(sum(x - 1) + x)
call(sum(x - 1) + x, plus|<v6>, <v7>) -> <v8>
2 ret(*|<v8>) L4
L4:
2 <END>
<END>
error:
<ERROR> INIT: in: {} out: {}
sink:
@@ -68,6 +68,7 @@ L0:
magic(vararg a: Any?) -> <v0> INIT: in: {a=D} out: {a=D}
w(a|<v0>) INIT: in: {a=D} out: {a=ID} USE: in: {a=READ} out: {a=READ}
r(a) -> <v1> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {a=READ}
ret(*|<v1>) L1
L1:
<END>
error: