* tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub.j:
authoredwin <none@none>
Tue, 12 Sep 2006 00:21:01 +0000 (00:21 +0000)
committeredwin <none@none>
Tue, 12 Sep 2006 00:21:01 +0000 (00:21 +0000)
Renamed to test_verify_fail_jsr_handler_in_sub.j, as it fails on the
reference implementation.

* tests/regression/jasmin/test_verify_ok_jsr_exceptions.j: Renamed to
test_verify_fail_jsr_exceptions.j, likewise.

* tests/regression/jasmin/test_verify_fail_ret_uninit_var.j,
tests/regression/jasmin/test_verify_fail_aload_retaddress.j,
tests/regression/jasmin/test_verify_fail_ret_bad_type.j: Made
expected error match both CACAO's message and the reference
implementation's message.

--HG--
branch : unified_variables
rename : tests/regression/jasmin/test_verify_ok_jsr_exceptions.j => tests/regression/jasmin/test_verify_fail_jsr_exceptions.j
rename : tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub.j => tests/regression/jasmin/test_verify_fail_jsr_handler_in_sub.j

tests/regression/jasmin/test_verify_fail_aload_retaddress.j
tests/regression/jasmin/test_verify_fail_jsr_exceptions.j [new file with mode: 0644]
tests/regression/jasmin/test_verify_fail_jsr_handler_in_sub.j [new file with mode: 0644]
tests/regression/jasmin/test_verify_fail_ret_bad_type.j
tests/regression/jasmin/test_verify_fail_ret_uninit_var.j
tests/regression/jasmin/test_verify_ok_jsr_exceptions.j [deleted file]
tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub.j [deleted file]

index 27b5e37b802894994bdb331a9deb498b7424ea5b..47512b4ff632c79b2368ac20ba3d4c9d7e158973 100644 (file)
@@ -36,6 +36,6 @@ sbr_1:
        aload 2 
        pop
        ret 2
-       ; ERROR: VerifyError.*load of returnAddress
+       ; ERROR: VerifyError
 
 .end method
diff --git a/tests/regression/jasmin/test_verify_fail_jsr_exceptions.j b/tests/regression/jasmin/test_verify_fail_jsr_exceptions.j
new file mode 100644 (file)
index 0000000..c853000
--- /dev/null
@@ -0,0 +1,86 @@
+.class public test_verify_fail_jsr_exceptions
+.super java/lang/Object
+
+; ======================================================================
+
+.method public <init>()V
+   aload_0
+   invokenonvirtual java/lang/Object/<init>()V
+   return
+.end method
+
+; ======================================================================
+
+.method public static checkI(I)V
+       .limit locals 1
+       .limit stack 10
+       getstatic java/lang/System/out Ljava/io/PrintStream;
+       iload_0
+       invokevirtual java/io/PrintStream/println(I)V
+       return
+.end method
+
+; ======================================================================
+
+.method public static main([Ljava/lang/String;)V
+       .limit stack 3
+       .limit locals 3
+
+       .catch java/lang/Exception from test_start to test_end using handler
+
+       ldc 35
+       istore 1
+
+       aload 0
+       ifnull force_basic_block_boundary
+
+       ; --------------------------------------------------
+       jsr sbr_1
+       ldc 111
+       invokestatic test_verify_fail_jsr_exceptions/checkI(I)V
+       return
+
+continue_1:
+       jsr sbr_2
+       ldc 222
+       invokestatic test_verify_fail_jsr_exceptions/checkI(I)V
+       return
+
+test_start:
+continue_2:
+
+; ERROR: VerifyError
+; This fails, because the "astore 1" is _after_ the exception range boundary
+
+       astore 1
+       ldc 2
+       ldc 0
+       idiv
+       pop
+
+       astore 1
+       ldc 2
+       ldc 0
+       idiv
+       pop
+       return
+
+test_end:
+       ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+       return
+       
+sbr_1:
+       goto continue_1
+
+sbr_2:
+       goto continue_2
+
+handler:
+       pop
+       ret 1
+
+.end method
+
diff --git a/tests/regression/jasmin/test_verify_fail_jsr_handler_in_sub.j b/tests/regression/jasmin/test_verify_fail_jsr_handler_in_sub.j
new file mode 100644 (file)
index 0000000..95a8885
--- /dev/null
@@ -0,0 +1,70 @@
+.class public test_verify_fail_jsr_handler_in_sub
+.super java/lang/Object
+
+; ======================================================================
+
+.method public <init>()V
+   aload_0
+   invokenonvirtual java/lang/Object/<init>()V
+   return
+.end method
+
+; ======================================================================
+
+.method public static checkI(I)V
+       .limit locals 1
+       .limit stack 10
+       getstatic java/lang/System/out Ljava/io/PrintStream;
+       iload_0
+       invokevirtual java/io/PrintStream/println(I)V
+       return
+.end method
+
+; ======================================================================
+
+.method public static main([Ljava/lang/String;)V
+       .limit stack 2
+       .limit locals 3
+
+       .catch java/lang/Exception from test_start to test_end using handler
+
+       ldc 35
+       istore 1
+
+       aload 0
+       ifnull force_basic_block_boundary
+
+       ; --------------------------------------------------
+
+       jsr sbr_1
+       iload 1
+       invokestatic test_verify_fail_jsr_handler_in_sub/checkI(I)V
+
+       ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+       return
+       
+; ERROR: VerifyError
+; This fails, because the "astore 2" is _after_ the exception range boundary
+
+sbr_1:
+test_start:
+       astore 2
+       ldc 2
+       ldc 0
+       idiv
+       pop
+       ldc 666
+       invokestatic test_verify_fail_jsr_handler_in_sub/checkI(I)V
+       return
+test_end:
+
+handler:
+       pop
+       ldc 48
+       invokestatic test_verify_fail_jsr_handler_in_sub/checkI(I)V
+       ret 2
+
+.end method
index 228d1ea9bec40e267cb3cc325dff4a11bad61c56..7dae8f2f45429c9dca08f5adf2523f823ce98ee9 100644 (file)
@@ -50,6 +50,6 @@ sbr_1:
        ldc "string"
        astore 2
        ret 2
-       ; ERROR: VerifyError.*RET with non-returnAddress
+       ; ERROR: VerifyError
 
 .end method
index 58357486645bafbc1b21d5d3ba0e92c57d51c615..e08470f84b2ffd3f94f338b0cfc987421a5377f5 100644 (file)
@@ -34,6 +34,6 @@ force_basic_block_boundary:
 sbr_1:
        pop
        ret 2
-       ; ERROR: VerifyError.*RET with non-returnAddress
+       ; ERROR: VerifyError
 
 .end method
diff --git a/tests/regression/jasmin/test_verify_ok_jsr_exceptions.j b/tests/regression/jasmin/test_verify_ok_jsr_exceptions.j
deleted file mode 100644 (file)
index d5f1429..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-.class public test_verify_ok_jsr_exceptions
-.super java/lang/Object
-
-; ======================================================================
-
-.method public <init>()V
-   aload_0
-   invokenonvirtual java/lang/Object/<init>()V
-   return
-.end method
-
-; ======================================================================
-
-.method public static checkI(I)V
-       .limit locals 1
-       .limit stack 10
-       getstatic java/lang/System/out Ljava/io/PrintStream;
-       iload_0
-       invokevirtual java/io/PrintStream/println(I)V
-       return
-.end method
-
-; ======================================================================
-
-.method public static main([Ljava/lang/String;)V
-       .limit stack 3
-       .limit locals 3
-
-       .catch java/lang/Exception from test_start to test_end using handler
-
-       ldc 35
-       istore 1
-
-       aload 0
-       ifnull force_basic_block_boundary
-
-       ; --------------------------------------------------
-       jsr sbr_1
-       ldc 111
-       invokestatic test_verify_ok_jsr_exceptions/checkI(I)V
-       return
-
-continue_1:
-       jsr sbr_2
-       ldc 222
-       invokestatic test_verify_ok_jsr_exceptions/checkI(I)V
-       return
-
-test_start:
-continue_2:
-       astore 1
-       ldc 2
-       ldc 0
-       idiv
-       pop
-
-       astore 1
-       ldc 2
-       ldc 0
-       idiv
-       pop
-       return
-
-test_end:
-       ; --------------------------------------------------
-
-force_basic_block_boundary:
-
-       return
-       
-sbr_1:
-       goto continue_1
-
-sbr_2:
-       goto continue_2
-
-handler:
-       pop
-       ret 1
-
-.end method
-
diff --git a/tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub.j b/tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub.j
deleted file mode 100644 (file)
index 48de7b5..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-.class public test_verify_ok_jsr_handler_in_sub
-.super java/lang/Object
-
-; ======================================================================
-
-.method public <init>()V
-   aload_0
-   invokenonvirtual java/lang/Object/<init>()V
-   return
-.end method
-
-; ======================================================================
-
-.method public static checkI(I)V
-       .limit locals 1
-       .limit stack 10
-       getstatic java/lang/System/out Ljava/io/PrintStream;
-       iload_0
-       invokevirtual java/io/PrintStream/println(I)V
-       return
-.end method
-
-; ======================================================================
-
-.method public static main([Ljava/lang/String;)V
-       .limit stack 2
-       .limit locals 3
-
-       .catch java/lang/Exception from test_start to test_end using handler
-
-       ldc 35
-       istore 1
-
-       aload 0
-       ifnull force_basic_block_boundary
-
-       ; --------------------------------------------------
-
-       jsr sbr_1
-       ; OUTPUT: 48
-       iload 1
-       invokestatic test_verify_ok_jsr_handler_in_sub/checkI(I)V
-       ; OUTPUT: 35
-
-       ; --------------------------------------------------
-
-force_basic_block_boundary:
-
-       return
-       
-sbr_1:
-test_start:
-       astore 2
-       ldc 2
-       ldc 0
-       idiv
-       pop
-       ldc 666
-       invokestatic test_verify_ok_jsr_handler_in_sub/checkI(I)V
-       return
-test_end:
-
-handler:
-       pop
-       ldc 48
-       invokestatic test_verify_ok_jsr_handler_in_sub/checkI(I)V
-       ret 2
-
-.end method