JET-50 Drop the 'new' keyword

This commit is contained in:
Andrey Breslav
2011-06-15 18:00:10 +04:00
parent c9d9001ad8
commit c2fbbff782
103 changed files with 921 additions and 980 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
== foo ==
fun foo() {
val a = new Array<Int>
val a = Array<Int>
3
a[10] = 4
2
@@ -11,7 +11,8 @@ fun foo() {
---------------------
l0:
<START>
r(new Array<Int>)
r(Array)
r(Array<Int>)
w(a)
r(3)
r(4)
+1 -1
View File
@@ -1,5 +1,5 @@
fun foo() {
val a = new Array<Int>
val a = Array<Int>
3
a[10] = 4
2
+3 -2
View File
@@ -9,7 +9,7 @@ fun assignments() : Unit {
val y = true && false
val z = false && true
val t = new Test();
val t = Test();
t.x = 1
}
---------------------
@@ -43,7 +43,8 @@ l4:
l5:
r(false && true)
w(z)
r(new Test())
r(Test)
r(Test())
w(t)
r(1)
r(t)
+1 -1
View File
@@ -12,6 +12,6 @@ fun assignments() : Unit {
val y = true && false
val z = false && true
val t = new Test();
val t = Test();
t.x = 1
}
+7 -2
View File
@@ -1,11 +1,16 @@
== fail ==
fun fail() : Nothing {
throw new java.lang.RuntimeException()
throw java.lang.RuntimeException()
}
---------------------
l0:
<START>
r(new java.lang.RuntimeException())
r(java)
r(lang)
r(java.lang)
r(RuntimeException)
r(RuntimeException())
r(java.lang.RuntimeException())
jmp(error)
l1:
<END>
+1 -1
View File
@@ -1,3 +1,3 @@
fun fail() : Nothing {
throw new java.lang.RuntimeException()
throw java.lang.RuntimeException()
}