Added information about 'nothing' to control flow graph

This commit is contained in:
svtk
2011-10-12 15:07:11 +04:00
parent 240ed30c2f
commit 06a7fa1f16
14 changed files with 914 additions and 885 deletions
@@ -36,15 +36,3 @@ l1:
error:
<ERROR>
=====================
== a ==
val a = Array<Int>
---------------------
l0:
<START>
r(Array)
r(Array<Int>)
l1:
<END>
error:
<ERROR>
=====================
@@ -55,56 +55,3 @@ l1:
error:
<ERROR>
=====================
== x ==
var x = 1
---------------------
l0:
<START>
r(1)
l1:
<END>
error:
<ERROR>
=====================
== y ==
val y = true && false
---------------------
l0:
<START>
r(true)
jf(l2)
r(false)
l2:
r(true && false)
l1:
<END>
error:
<ERROR>
=====================
== z ==
val z = false && true
---------------------
l0:
<START>
r(false)
jf(l2)
r(true)
l2:
r(false && true)
l1:
<END>
error:
<ERROR>
=====================
== t ==
val t = Test()
---------------------
l0:
<START>
r(Test)
r(Test())
l1:
<END>
error:
<ERROR>
=====================
+2 -2
View File
@@ -136,9 +136,9 @@ fun tf() : Int {
}
fun failtest(a : Int) : Int {
<error>if (fail() || true) {
if (fail() || <error>true</error>) {
}</error>
}
<error>return 1</error>
}
@@ -136,16 +136,16 @@ fun tf() : Int {
}
fun failtest(a : Int) : Int {
<!UNREACHABLE_BECAUSE_OF_NOTHING!>if (fail() || true) {
if (fail() || <!UNREACHABLE_CODE!>true<!>) {
}<!>
<!UNREACHABLE_BECAUSE_OF_NOTHING!>return 1<!>
}
<!UNREACHABLE_CODE!>return 1<!>
}
fun foo(a : Nothing) : Unit {
1
a
<!UNREACHABLE_BECAUSE_OF_NOTHING!>2<!>
<!UNREACHABLE_CODE!>2<!>
}
fun fail() : Nothing {