Mark some expressions after processing their components

when it's semantically correct

Expressions: calls, 'for' loops, elvis operators
It's significant for reporting 'unreachable code' correctly
This commit is contained in:
Svetlana Isakova
2014-06-12 12:58:57 +04:00
parent 6e622f2301
commit 9480907514
39 changed files with 181 additions and 178 deletions
@@ -14,14 +14,14 @@ L0:
2 mark({ val b: Boolean if (1 < 2) { use(b) } else { b = true } })
v(val b: Boolean) INIT: in: {} out: {b=D}
mark(if (1 < 2) { use(b) } else { b = true }) INIT: in: {b=D} out: {b=D}
mark(1 < 2)
r(1) -> <v0>
r(2) -> <v1>
mark(1 < 2)
call(<, compareTo|<v0>, <v1>) -> <v2>
jf(L2|<v2>)
3 mark({ use(b) })
mark(use(b)) USE: in: {b=READ} out: {b=READ}
3 mark({ use(b) }) USE: in: {b=READ} out: {b=READ}
r(b) -> <v3> USE: in: {} out: {b=READ}
mark(use(b))
call(use, use|<v3>) -> <v4>
2 jmp(L3) USE: in: {} out: {}
L2: