* src/vm/jit/arm/codegen.c: removed unused ICMD_GETSTATIC branch
[cacao.git] / tests / regression / jasmin / test_verify_unspecced_ok_backward_with_new_on_stack.j
1 .class public test_verify_unspecced_ok_backward_with_new_on_stack
2 .super java/lang/Object
3
4 ; The check against backward branches with uninitialized objects on the stack
5 ; is unnecessary. In this case there is a VerifyError because the type merge
6 ; leads to the _|_ (bottom) type in a stack slot, which is forbidden.
7 ;
8 ; Reference:
9 ;     Alessandro Coglio
10 ;     Improving the official specification of Java bytecode verification
11 ;     Proceedings of the 3rd ECOOP Workshop on Formal Techniques for Java Programs
12 ;     June 2001
13 ;     citeseer.ist.psu.edu/article/coglio03improving.html
14
15 ; ======================================================================
16
17 .method public <init>()V
18    aload_0
19    invokenonvirtual java/lang/Object/<init>()V
20    return
21 .end method
22
23 ; ======================================================================
24
25 .method public toString()Ljava/lang/String;
26         .limit stack 1
27         .limit locals 1
28
29         ldc "it's me"
30         areturn
31
32 .end method
33
34 ; ======================================================================
35
36 .method public static main([Ljava/lang/String;)V
37         .limit stack 2
38         .limit locals 3
39
40         ldc 0
41         istore 1
42
43         ; aconst_null
44         new test_verify_unspecced_ok_backward_with_new_on_stack
45
46 backward:
47
48         iload 1
49         iinc 1 1
50         ifeq backward
51
52         dup
53         invokespecial test_verify_unspecced_ok_backward_with_new_on_stack/<init>()V
54
55         getstatic java/lang/System/out Ljava/io/PrintStream;
56         swap
57         invokevirtual java/io/PrintStream/println(Ljava/lang/Object;)V
58         ; OUTPUT: it's me
59
60         return
61 .end method