tests for dead code in pseudocode

This commit is contained in:
Svetlana Isakova
2012-05-26 13:36:00 +04:00
parent ac41cab340
commit d1d0722b5a
2 changed files with 24 additions and 0 deletions
@@ -0,0 +1,20 @@
== test ==
fun test() {
throw Exception()
test()
}
---------------------
l0:
<START> NEXT:[r(Exception)] PREV:[]
r(Exception) NEXT:[r(Exception())] PREV:[<START>]
r(Exception()) NEXT:[jmp(error)] PREV:[r(Exception)]
jmp(error) NEXT:[<ERROR>] PREV:[r(Exception())]
- r(test) NEXT:[r(test())] PREV:[]
- r(test()) NEXT:[<END>] PREV:[]
l1:
<END> NEXT:[<SINK>] PREV:[]
error:
<ERROR> NEXT:[<SINK>] PREV:[jmp(error)]
sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
+4
View File
@@ -0,0 +1,4 @@
fun test() {
throw Exception()
test()
}