Pseudocode: Consume value of true condition in while-loop

This commit is contained in:
Alexey Sedunov
2014-07-23 12:47:01 +04:00
parent e11ffb8542
commit b0bf11c51e
5 changed files with 72 additions and 57 deletions
@@ -16,14 +16,15 @@ L2 [loop entry point]:
L5 [condition entry point]:
r(true) -> <v1>
mark(while (true) { val a: Int })
magic[VALUE_CONSUMER](true|<v1>) -> <v2>
L4 [body entry point]:
3 mark({ val a: Int })
v(val a: Int) INIT: in: {} out: {a=D}
2 jmp(L2 [loop entry point]) INIT: in: {} out: {} USE: in: {} out: {}
L3 [loop exit point]:
- read (Unit)
- read (Unit) -> <v3>
- mark("after")
- r("after") -> <v2>
- r("after") -> <v4>
L1:
1 <END> INIT: in: {} out: {}
error: