Pseudocode: don't write full label name when jump on it
This commit is contained in:
@@ -18,12 +18,12 @@ L0:
|
||||
r(2) -> <v1>
|
||||
mark(1 < 2)
|
||||
call(1 < 2, compareTo|<v0>, <v1>) -> <v2>
|
||||
jf(L2 [else branch]|<v2>)
|
||||
jf(L2|<v2>)
|
||||
3 mark({ use(b) }) USE: in: {b=READ} out: {b=READ}
|
||||
r(b) -> <v3> USE: in: {} out: {b=READ}
|
||||
mark(use(b))
|
||||
call(use(b), use|<v3>) -> <v4>
|
||||
2 jmp(L3 ['if' expression result]) USE: in: {} out: {}
|
||||
2 jmp(L3) USE: in: {} out: {}
|
||||
L2 [else branch]:
|
||||
3 mark({ b = true })
|
||||
r(true) -> <v5> USE: in: {b=ONLY_WRITTEN_NEVER_READ} out: {b=ONLY_WRITTEN_NEVER_READ}
|
||||
|
||||
@@ -19,4 +19,4 @@ error:
|
||||
<ERROR> INIT: in: {} out: {}
|
||||
sink:
|
||||
<SINK> INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {}
|
||||
=====================
|
||||
=====================
|
||||
@@ -15,7 +15,7 @@ L0:
|
||||
w(a|<v0>) INIT: in: {a=D} out: {a=ID}
|
||||
v(val f = { (x: Int) -> val y = x + a use(a) }) INIT: in: {a=ID} out: {a=ID, f=D}
|
||||
mark({ (x: Int) -> val y = x + a use(a) }) INIT: in: {a=ID, f=D} out: {a=ID, f=D}
|
||||
jmp?(L2 [after local declaration])
|
||||
jmp?(L2)
|
||||
d({ (x: Int) -> val y = x + a use(a) }) USE: in: {a=READ} out: {a=READ}
|
||||
L2 [after local declaration]:
|
||||
r({ (x: Int) -> val y = x + a use(a) }) -> <v1>
|
||||
@@ -72,4 +72,4 @@ error:
|
||||
<ERROR> INIT: in: {} out: {}
|
||||
sink:
|
||||
<SINK> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {}
|
||||
=====================
|
||||
=====================
|
||||
@@ -64,4 +64,4 @@ error:
|
||||
<ERROR> INIT: in: {} out: {}
|
||||
sink:
|
||||
<SINK> INIT: in: {c=D} out: {c=D} USE: in: {} out: {}
|
||||
=====================
|
||||
=====================
|
||||
@@ -62,4 +62,4 @@ error:
|
||||
<ERROR> INIT: in: {} out: {}
|
||||
sink:
|
||||
<SINK> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {}
|
||||
=====================
|
||||
=====================
|
||||
Reference in New Issue
Block a user