New test.
* tests/regression/jasmin/
test_verify_fail_load_wrong_type_within_block.j: New test.
* tests/regression/jasmin/test_verify_fail_local_index.j: New test.
* tests/regression/jasmin/test_verify_fail_long_local_index.j:
New test.
* tests/regression/jasmin/test_verify_fail_long_local.j: New test.
* tests/regression/jasmin/test_verify_fail_split_local.j: New test.
* tests/regression/jasmin/test_verify_ok_overwrite_local_type.j:
New test.
* tests/regression/jasmin/test_verify_ok_untyped_local.j: New test.
--HG--
branch : unified_variables
--- /dev/null
+.class public test_verify_fail_load_wrong_type
+.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 2
+
+ ldc 35
+ istore 1
+
+ aload 0
+ ifnull force_basic_block_boundary
+
+ ; --------------------------------------------------
+
+ fload 1
+ ; ERROR: VerifyError
+ pop
+
+ ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+ iload 1
+ invokestatic test_verify_fail_load_wrong_type/checkI(I)V
+
+ return
+.end method
--- /dev/null
+.class public test_verify_fail_load_wrong_type_within_block
+.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 2
+
+ ldc 35
+ istore 1
+
+ aload 0
+ ifnull force_basic_block_boundary
+
+ ; --------------------------------------------------
+
+ ldc "string constant"
+ astore 1
+
+ iload 1
+ ; ERROR: VerifyError
+ invokestatic test_verify_fail_load_wrong_type_within_block/checkI(I)V
+
+ ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+ iload 1
+ invokestatic test_verify_fail_load_wrong_type_within_block/checkI(I)V
+
+ return
+.end method
--- /dev/null
+.class public test_verify_fail_local_index
+.super java/lang/Object
+
+; ======================================================================
+
+.method public <init>()V
+ aload_0
+ invokenonvirtual java/lang/Object/<init>()V
+ return
+.end method
+
+; ======================================================================
+
+.method public static main([Ljava/lang/String;)V
+ .limit stack 2
+ .limit locals 2
+
+ ldc 42
+ istore 1
+
+ aload 0
+ ifnull force_basic_block_boundary
+
+ ; --------------------------------------------------
+
+ ldc 1234
+ istore 2
+ ; ERROR: VerifyError
+
+ ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+ return
+.end method
--- /dev/null
+.class public test_verify_fail_long_local
+.super java/lang/Object
+
+; ======================================================================
+
+.method public <init>()V
+ aload_0
+ invokenonvirtual java/lang/Object/<init>()V
+ return
+.end method
+
+; ======================================================================
+
+.method public static check(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
+
+ ldc 42
+ istore 2
+
+ aload 0
+ ifnull force_basic_block_boundary
+
+ ; --------------------------------------------------
+
+ ldc2_w 1234567890987654321
+ lstore 1
+
+ ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+ iload 2
+ ; ERROR: VerifyError
+ invokestatic test_verify_fail_long_local/check(I)V
+
+ return
+.end method
--- /dev/null
+.class public test_verify_fail_long_local_index
+.super java/lang/Object
+
+; ======================================================================
+
+.method public <init>()V
+ aload_0
+ invokenonvirtual java/lang/Object/<init>()V
+ return
+.end method
+
+; ======================================================================
+
+.method public static main([Ljava/lang/String;)V
+ .limit stack 2
+ .limit locals 2
+
+ ldc 42
+ istore 1
+
+ aload 0
+ ifnull force_basic_block_boundary
+
+ ; --------------------------------------------------
+
+ ldc2_w 1234567890987654321
+ lstore 1
+ ; ERROR: VerifyError
+
+ ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+ return
+.end method
--- /dev/null
+.class public test_verify_fail_split_local
+.super java/lang/Object
+
+; ======================================================================
+
+.method public <init>()V
+ aload_0
+ invokenonvirtual java/lang/Object/<init>()V
+ return
+.end method
+
+; ======================================================================
+
+.method public static check(J)V
+ .limit locals 2
+ .limit stack 10
+ getstatic java/lang/System/out Ljava/io/PrintStream;
+ lload_0
+ invokevirtual java/io/PrintStream/println(J)V
+ return
+.end method
+
+; ======================================================================
+
+.method public static main([Ljava/lang/String;)V
+ .limit stack 2
+ .limit locals 3
+
+ ldc2_w 123456789
+ lstore 1
+
+ aload 0
+ ifnull force_basic_block_boundary
+
+ ; --------------------------------------------------
+
+ ldc 42
+ istore 2
+
+ ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+ lload 1
+ ; ERROR: VerifyError
+ invokestatic test_verify_fail_split_local/check(J)V
+
+ return
+.end method
--- /dev/null
+.class public test_verify_ok_overwrite_local_type
+.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 2
+
+ ldc "a string"
+ astore 1
+
+ ldc 42
+ istore 1
+
+ iload 1
+ invokestatic test_verify_ok_overwrite_local_type/checkI(I)V
+ ; OUTPUT: 42
+
+ return
+.end method
--- /dev/null
+.class public test_verify_ok_untyped_local
+.super java/lang/Object
+
+; ======================================================================
+
+.method public <init>()V
+ aload_0
+ invokenonvirtual java/lang/Object/<init>()V
+ return
+.end method
+
+; ======================================================================
+
+.method public static check(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 check(Ljava/lang/String;)V
+ .limit locals 1
+ .limit stack 10
+ getstatic java/lang/System/out Ljava/io/PrintStream;
+ aload_0
+ invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
+ return
+.end method
+
+; ======================================================================
+
+.method public static main([Ljava/lang/String;)V
+ .limit stack 2
+ .limit locals 2
+
+ ldc "will it work?"
+ astore 1
+
+ aload 0
+ ifnull force_basic_block_boundary
+
+ ; --------------------------------------------------
+
+ ldc 42
+ istore 1
+
+ iload 1
+ invokestatic test_verify_ok_untyped_local/check(I)V
+ ; OUTPUT: 42
+
+ ldc "wow, it works!"
+ astore 1
+
+ ; --------------------------------------------------
+
+force_basic_block_boundary:
+
+ aload 1
+ invokestatic test_verify_ok_untyped_local/check(Ljava/lang/String;)V
+ ; OUTPUT: wow, it works!
+
+ return
+.end method
+