1
2method A.<init>():void
3{
4	.src "tryCatch.java"
5	.line 2
6	.prologue_end
7	.line 2
8	    0| move-object v0, v2
9	.local v0, "this", A
10	    1| move-object v1, v0
11	    2| invoke-direct {v1}, java.lang.Throwable.<init>():void
12	    5| invoke-static/range {}, Tracer.OnExit():void
13	    8| return-void
14}
15
16method B.<init>():void
17{
18	.src "tryCatch.java"
19	.line 6
20	.prologue_end
21	.line 6
22	    0| move-object v0, v2
23	.local v0, "this", B
24	    1| move-object v1, v0
25	    2| invoke-direct {v1}, java.lang.Throwable.<init>():void
26	    5| invoke-static/range {}, Tracer.OnExit():void
27	    8| return-void
28}
29
30method TryCatch.<init>():void
31{
32	.src "tryCatch.java"
33	.line 10
34	.prologue_end
35	.line 10
36	    0| move-object v0, v2
37	.local v0, "this", TryCatch
38	    1| move-object v1, v0
39	    2| invoke-direct {v1}, java.lang.Object.<init>():void
40	    5| invoke-static/range {}, Tracer.OnExit():void
41	    8| return-void
42}
43
44method TryCatch.foo(int):int
45{
46	.params "?"
47	.src "tryCatch.java"
48	.line 27
49	.prologue_end
50	.line 27
51	    0| move v0, v4
52	.local v0, "x", int
53	    1| move v1, v0
54	    2| if-lez v1, Label_4
55	.line 28
56	    4| move v1, v0
57	    5| packed-switch v1, Label_5
58	.line 31
59	    8| const/4 v1, #+1 (0x00000001 | 1.40130e-45)
60	    9| move v0, v1
61Label_1:
62	.line 34
63	.end_local v0
64	   10| invoke-static/range {v0..v0}, Tracer.OnExit(int):int
65	   13| move-result v0
66	   14| return v0
67Label_2:
68	.line 29
69	.restart_local v0
70	   15| new-instance v1, A
71	   17| move-object v3, v1
72	   18| move-object v1, v3
73	   19| move-object v2, v3
74	   20| invoke-direct {v2}, A.<init>():void
75	   23| throw v1
76Label_3:
77	.line 30
78	   24| new-instance v1, B
79	   26| move-object v3, v1
80	   27| move-object v1, v3
81	   28| move-object v2, v3
82	   29| invoke-direct {v2}, B.<init>():void
83	   32| throw v1
84Label_4:
85	.line 34
86	   33| const/4 v1, #+0 (0x00000000 | 0.00000)
87	   34| move v0, v1
88	   35| goto/16 Label_1
89	   37| nop
90Label_5: <aligned>
91	.line 28
92	   38| packed-switch-payload
93		    1: Label_2
94		    2: Label_3
95}
96
97method TryCatch.main(java.lang.String[]):void
98{
99	.params "?"
100	.src "tryCatch.java"
101	.line 15
102	.prologue_end
103	.line 15
104	    0| move-object v0, v6
105	.local v0, "args", java.lang.String[]
106	    1| const/4 v3, #+0 (0x00000000 | 0.00000)
107	.try_begin_1
108	    2| invoke-static {v3}, TryCatch.foo(int):int
109	.try_end_1
110	  catch(B) : Label_3
111	  catch(A) : Label_4
112	  catch(...) : Label_5
113	    5| move-result v3
114Label_1:
115	.line 18
116	.line 22
117	    6| sget-object v3, java.lang.System.out
118	    8| const-string v4, "finally\n"
119	   10| const/4 v5, #+0 (0x00000000 | 0.00000)
120	   11| new-array v5, v5, java.lang.Object[]
121	   13| invoke-virtual {v3,v4,v5}, java.io.PrintStream.printf(java.lang.String, java.lang.Object[]):java.io.PrintStream
122	   16| move-result-object v3
123Label_2:
124	.line 23
125	.line 24
126	   17| invoke-static/range {}, Tracer.OnExit():void
127	   20| return-void
128Label_3:
129	.line 16
130	   21| move-exception v3
131	   22| move-object v1, v3
132	.try_begin_2
133	.line 17
134	.local v1, "ex", B
135	   23| sget-object v3, java.lang.System.out
136	   25| const-string v4, "catch: B\n"
137	   27| const/4 v5, #+0 (0x00000000 | 0.00000)
138	   28| new-array v5, v5, java.lang.Object[]
139	   30| invoke-virtual {v3,v4,v5}, java.io.PrintStream.printf(java.lang.String, java.lang.Object[]):java.io.PrintStream
140	.try_end_2
141	  catch(A) : Label_4
142	  catch(...) : Label_5
143	   33| move-result-object v3
144	   34| goto/16 Label_1
145Label_4:
146	.line 19
147	.end_local v1
148	   36| move-exception v3
149	   37| move-object v1, v3
150	.try_begin_3
151	.line 20
152	.local v1, "ex", A
153	   38| sget-object v3, java.lang.System.out
154	   40| const-string v4, "catch: A\n"
155	   42| const/4 v5, #+0 (0x00000000 | 0.00000)
156	   43| new-array v5, v5, java.lang.Object[]
157	   45| invoke-virtual {v3,v4,v5}, java.io.PrintStream.printf(java.lang.String, java.lang.Object[]):java.io.PrintStream
158	.try_end_3
159	  catch(...) : Label_5
160	   48| move-result-object v3
161	.line 22
162	   49| sget-object v3, java.lang.System.out
163	   51| const-string v4, "finally\n"
164	   53| const/4 v5, #+0 (0x00000000 | 0.00000)
165	   54| new-array v5, v5, java.lang.Object[]
166	   56| invoke-virtual {v3,v4,v5}, java.io.PrintStream.printf(java.lang.String, java.lang.Object[]):java.io.PrintStream
167	   59| move-result-object v3
168	.line 23
169	   60| goto/16 Label_2
170Label_5:
171	.line 22
172	.end_local v1
173	   62| move-exception v3
174	   63| move-object v2, v3
175	   64| sget-object v3, java.lang.System.out
176	   66| const-string v4, "finally\n"
177	   68| const/4 v5, #+0 (0x00000000 | 0.00000)
178	   69| new-array v5, v5, java.lang.Object[]
179	   71| invoke-virtual {v3,v4,v5}, java.io.PrintStream.printf(java.lang.String, java.lang.Object[]):java.io.PrintStream
180	   74| move-result-object v3
181	   75| move-object v3, v2
182	   76| throw v3
183}
184