Quick compiler exception support
Handle MOVE_RESULT, THROW and THROW_VERIFICATION_ERROR. Enable
runtests 007 and 014 to pass. Minor munging of the tests to make
them easier to selectively compile with the Quick compiler.
Change-Id: I756def54d81771b144e8ebc213cd90077e23758b
diff --git a/test/005-args/src/Main.java b/test/005-args/src/Main.java
index 1240ec5..8abb63c 100644
--- a/test/005-args/src/Main.java
+++ b/test/005-args/src/Main.java
@@ -18,8 +18,11 @@
* Test passing arguments of various sizes
*/
public class Main {
- public static void main (String args[]) {
+ public static void args_005() {
new ArgsTest()
.argTest(123, 'q', 3.343434, 0x1122334455667788L, 0.12345f);
}
+ public static void main (String args[]) {
+ args_005();
+ }
}
diff --git a/test/007-exceptions/expected.txt b/test/007-exceptions/expected.txt
index 982c777..ef6eaff 100644
--- a/test/007-exceptions/expected.txt
+++ b/test/007-exceptions/expected.txt
@@ -1,8 +1,9 @@
Got an NPE: second throw
java.lang.NullPointerException: second throw
- at Main.catchAndRethrow(Main.java:36)
- at Main.main(Main.java:23)
+ at Main.catchAndRethrow(Main.java:39)
+ at Main.exceptions_007(Main.java:23)
+ at Main.main(Main.java:31)
Caused by: java.lang.NullPointerException: first throw
- at Main.throwNullPointerException(Main.java:43)
- at Main.catchAndRethrow(Main.java:33)
- ... 1 more
+ at Main.throwNullPointerException(Main.java:46)
+ at Main.catchAndRethrow(Main.java:36)
+ ... 2 more
diff --git a/test/007-exceptions/src/Main.java b/test/007-exceptions/src/Main.java
index c7da215..1f76f12 100644
--- a/test/007-exceptions/src/Main.java
+++ b/test/007-exceptions/src/Main.java
@@ -18,7 +18,7 @@
* Exceptions across method calls
*/
public class Main {
- public static void main (String args[]) {
+ public static void exceptions_007() {
try {
catchAndRethrow();
} catch (NullPointerException npe) {
@@ -27,6 +27,9 @@
npe.printStackTrace();
}
}
+ public static void main (String args[]) {
+ exceptions_007();
+ }
private static void catchAndRethrow() {
try {
diff --git a/test/014-math3/src/Main.java b/test/014-math3/src/Main.java
index f55b17a..07e5be3 100644
--- a/test/014-math3/src/Main.java
+++ b/test/014-math3/src/Main.java
@@ -18,7 +18,7 @@
* Test math exceptions
*/
public class Main {
- public static void main(String args[]) {
+ public static void math_014() {
int expectedThrows = 2;
int i;
long j;
@@ -54,4 +54,7 @@
else
System.out.println("testMath3 success");
}
+ public static void main(String args[]) {
+ math_014();
+ }
}