* configure.ac: New switch for disabling -O2 (--disable-optimizations).
[cacao.git] / tests / regression / jasmin / test_nullpointerexception_monitorexit.j
1 .class public test_nullpointerexception_monitorexit
2 .super java/lang/Object
3
4 ; ======================================================================
5
6 .method public <init>()V
7    aload_0
8    invokenonvirtual java/lang/Object/<init>()V
9    return
10 .end method
11
12 ; ======================================================================
13
14 .method public static check(I)V
15         .limit locals 1
16         .limit stack 10
17         getstatic java/lang/System/out Ljava/io/PrintStream;
18         iload_0
19         invokevirtual java/io/PrintStream/println(I)V
20         return
21 .end method
22
23 ; ======================================================================
24
25 .method public static main([Ljava/lang/String;)V
26         .limit stack 2
27         .limit locals 2
28
29         .catch java/lang/NullPointerException from ex_start to ex_end using handler
30
31         ldc 42
32         istore 1
33
34         aload 0
35         ifnull force_basic_block_boundary
36
37         ; --------------------------------------------------
38
39 ex_start:
40         aconst_null
41         monitorexit
42 ex_end:
43
44         ; --------------------------------------------------
45
46 force_basic_block_boundary:
47
48         iload 1
49         invokestatic test_nullpointerexception_monitorexit/check(I)V
50         return
51
52 handler:
53         
54         ldc 123
55         invokestatic test_nullpointerexception_monitorexit/check(I)V
56         ; OUTPUT: 123
57         return
58
59 .end method