Pseudocode: don't write full label name when jump on it

This commit is contained in:
Svetlana Isakova
2014-09-03 16:00:41 +04:00
parent 3a9b7bbade
commit 976d5ab030
89 changed files with 482 additions and 480 deletions
@@ -15,27 +15,27 @@ L0:
3 mark(do { if (b) break; continue; } while (true))
L2 [loop entry point]:
L4 [body entry point]:
mark({ if (b) break; continue; }) PREV:[mark(do { if (b) break; continue; } while (true)), jt(L2 [loop entry point]|<v5>)]
mark({ if (b) break; continue; }) PREV:[mark(do { if (b) break; continue; } while (true)), jt(L2|<v5>)]
mark(if (b) break)
r(b) -> <v1>
jf(L7 [else branch]|<v1>) NEXT:[read (Unit), jmp(L3 [loop exit point])]
jmp(L3 [loop exit point]) NEXT:[read (Unit)]
- jmp(L8 ['if' expression result]) NEXT:[merge(if (b) break|!<v2>) -> <v3>] PREV:[]
jf(L7|<v1>) NEXT:[read (Unit), jmp(L3)]
jmp(L3) NEXT:[read (Unit)]
- jmp(L8) NEXT:[merge(if (b) break|!<v2>) -> <v3>] PREV:[]
L7 [else branch]:
read (Unit) PREV:[jf(L7 [else branch]|<v1>)]
read (Unit) PREV:[jf(L7|<v1>)]
L8 ['if' expression result]:
merge(if (b) break|!<v2>) -> <v3>
jmp(L6 [condition entry point])
jmp(L6)
L5 [body exit point]:
L6 [condition entry point]:
r(true) -> <v5>
jt(L2 [loop entry point]|<v5>) NEXT:[read (Unit), mark({ if (b) break; continue; })]
jt(L2|<v5>) NEXT:[read (Unit), mark({ if (b) break; continue; })]
L3 [loop exit point]:
read (Unit) PREV:[jmp(L3 [loop exit point]), jt(L2 [loop entry point]|<v5>)]
read (Unit) PREV:[jmp(L3), jt(L2|<v5>)]
L1:
1 <END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
=====================
=====================