Basic tests for dead code detection

This commit is contained in:
Andrey Breslav
2011-04-13 17:48:51 +04:00
parent 69ef281d47
commit 96526603e4
17 changed files with 164 additions and 26 deletions
+4 -4
View File
@@ -9,7 +9,7 @@ l6:
r(b)
jf(l8)
r(1)
ret(*)
ret(*) l5
jmp(l9)
l8:
read (Unit)
@@ -32,7 +32,7 @@ l4:
<START>
r(2)
r(5)
ret(*)
ret(*) l5
l5:
<END>
=====================
@@ -60,7 +60,7 @@ l0:
r(a)
jf(l2)
r(1)
ret(*)
ret(*) l1
jmp(l3)
l2:
read (Unit)
@@ -84,7 +84,7 @@ l4:
<START>
r(2)
r(5)
ret(*)
ret(*) l5
l5:
<END>
=====================
@@ -1,17 +1,16 @@
== blockAndAndMismatch ==
fun blockAndAndMismatch() : Boolean {
(return true) || (return false)
false || (return false)
}
---------------------
l0:
<START>
r(true)
ret(*)
r(false)
jt(l2)
r(false)
ret(*)
ret(*) l1
l2:
r((return true) || (return false))
r(false || (return false))
l1:
<END>
=====================
+1 -1
View File
@@ -1,3 +1,3 @@
fun blockAndAndMismatch() : Boolean {
(return true) || (return false)
false || (return false)
}