Test data fixed: mark() instructions added

This commit is contained in:
Andrey Breslav
2013-12-04 14:30:41 +04:00
parent e09d3aab3a
commit 87879ba654
37 changed files with 1358 additions and 976 deletions
@@ -6,24 +6,28 @@ fun main() {
}
---------------------
L0:
<START>
<START>
mark({ while(1 > 0) { 2 } })
mark(while(1 > 0) { 2 })
L2 [loop entry point]:
L5 [condition entry point]:
r(1) PREV:[<START>, jmp(L2 [loop entry point])]
r(0)
call(>, compareTo)
jf(L3 [loop exit point]) NEXT:[read (Unit), r(2)]
mark(1 > 0) PREV:[mark(while(1 > 0) { 2 }), jmp(L2 [loop entry point])]
r(1)
r(0)
call(>, compareTo)
jf(L3 [loop exit point]) NEXT:[read (Unit), mark({ 2 })]
L4 [body entry point]:
r(2)
jmp(L2 [loop entry point]) NEXT:[r(1)]
mark({ 2 })
r(2)
jmp(L2 [loop entry point]) NEXT:[mark(1 > 0)]
L3 [loop exit point]:
read (Unit) PREV:[jf(L3 [loop exit point])]
read (Unit) PREV:[jf(L3 [loop exit point])]
L1:
<END> NEXT:[<SINK>]
<END> NEXT:[<SINK>]
error:
<ERROR> PREV:[]
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
<SINK> PREV:[<ERROR>, <END>]
=====================
== dowhile ==
fun dowhile() {
@@ -32,21 +36,25 @@ fun dowhile() {
}
---------------------
L0:
<START>
<START>
mark({ do {return} while(1 > 0) })
mark(do {return} while(1 > 0))
L2 [loop entry point]:
L4 [body entry point]:
ret L1 NEXT:[<END>]
mark({return})
ret L1 NEXT:[<END>]
L5 [condition entry point]:
- r(1) PREV:[]
- r(0) PREV:[]
- call(>, compareTo) PREV:[]
- jt(L2 [loop entry point]) NEXT:[read (Unit), ret L1] PREV:[]
- mark(1 > 0) PREV:[]
- r(1) PREV:[]
- r(0) PREV:[]
- call(>, compareTo) PREV:[]
- jt(L2 [loop entry point]) NEXT:[read (Unit), mark({return})] PREV:[]
L3 [loop exit point]:
- read (Unit) PREV:[]
- read (Unit) PREV:[]
L1:
<END> NEXT:[<SINK>] PREV:[ret L1]
<END> NEXT:[<SINK>] PREV:[ret L1]
error:
<ERROR> PREV:[]
<ERROR> PREV:[]
sink:
<SINK> PREV:[<ERROR>, <END>]
<SINK> PREV:[<ERROR>, <END>]
=====================