Do not generate call for elvis + move dead code tests

This commit is contained in:
Andrey Breslav
2013-12-03 19:56:29 +04:00
parent e0cf73d989
commit e8c94a9d1d
6 changed files with 46 additions and 6 deletions
@@ -0,0 +1,18 @@
== test ==
fun test() {
throw Exception()
test()
}
---------------------
L0:
<START> NEXT:[call(Exception, <init>)] PREV:[]
call(Exception, <init>) NEXT:[throw (throw Exception())] PREV:[<START>]
throw (throw Exception()) NEXT:[<ERROR>] PREV:[call(Exception, <init>)]
- call(test, test) NEXT:[<END>] PREV:[]
L1:
<END> NEXT:[<SINK>] PREV:[]
error:
<ERROR> NEXT:[<SINK>] PREV:[throw (throw Exception())]
sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
@@ -0,0 +1,4 @@
fun test() {
throw Exception()
test()
}
@@ -0,0 +1,18 @@
== foo ==
fun foo() {
return ?: null
}
---------------------
L0:
<START> NEXT:[ret L1] PREV:[]
ret L1 NEXT:[<END>] PREV:[<START>]
- jt(L2) NEXT:[r(null), <END>] PREV:[]
- r(null) NEXT:[<END>] PREV:[]
L1:
L2:
<END> NEXT:[<SINK>] PREV:[ret L1]
error:
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
@@ -0,0 +1,3 @@
fun foo() {
return ?: null
}