1{module, bad_catch_try}.  %% version = 0
2
3{exports, [{bad_1,1},
4           {bad_2,1},
5           {bad_3,1},
6           {bad_4,1},
7           {bad_5,1},
8           {bad_6,1},
9           {foo,1},
10           {module_info,0},
11           {module_info,1}]}.
12
13{attributes, []}.
14
15{labels, 31}.
16
17
18{function, bad_1, 1, 2}.
19  {label,1}.
20    {func_info,{atom,bad_catch_try},{atom,bad_1},1}.
21  {label,2}.
22    {allocate,1,1}.
23    {'catch',{x,0},{f,3}}.
24    {call,1,{f,26}}.
25  {label,3}.
26    {catch_end,{x,0}}.
27    {test,is_tuple,{f,4},[{x,0}]}.
28    {test,test_arity,{f,4},[{x,0},2]}.
29    {get_tuple_element,{x,0},0,{x,1}}.
30    {test,is_eq_exact,{f,4},[{x,1},{atom,'EXIT'}]}.
31    {move,{atom,error},{x,0}}.
32    {deallocate,1}.
33    return.
34  {label,4}.
35    {move,{atom,ok},{x,0}}.
36    {deallocate,1}.
37    return.
38
39
40{function, bad_2, 1, 6}.
41  {label,5}.
42    {func_info,{atom,bad_catch_try},{atom,bad_2},1}.
43  {label,6}.
44    {allocate,1,1}.
45    {'catch',{y,0},{f,7}}.
46    {call,1,{f,26}}.
47  {label,7}.
48    {catch_end,{x,9}}.
49    {test,is_tuple,{f,8},[{x,0}]}.
50    {test,test_arity,{f,8},[{x,0},2]}.
51    {get_tuple_element,{x,0},0,{x,1}}.
52    {test,is_eq_exact,{f,8},[{x,1},{atom,'EXIT'}]}.
53    {move,{atom,error},{x,0}}.
54    {deallocate,1}.
55    return.
56  {label,8}.
57    {move,{atom,ok},{x,0}}.
58    {deallocate,1}.
59    return.
60
61
62{function, bad_3, 1, 10}.
63  {label,9}.
64    {func_info,{atom,bad_catch_try},{atom,bad_3},1}.
65  {label,10}.
66    {allocate,2,1}.
67    {move,{atom,kalle},{y,1}}.
68    {'catch',{y,0},{f,11}}.
69    {call,1,{f,26}}.
70  {label,11}.
71    {catch_end,{y,1}}.
72    {test,is_tuple,{f,12},[{x,0}]}.
73    {test,test_arity,{f,12},[{x,0},2]}.
74    {get_tuple_element,{x,0},0,{x,1}}.
75    {test,is_eq_exact,{f,12},[{x,1},{atom,'EXIT'}]}.
76    {move,{atom,error},{x,0}}.
77    {deallocate,1}.
78    return.
79  {label,12}.
80    {move,{atom,ok},{x,0}}.
81    {deallocate,1}.
82    return.
83
84
85{function, bad_4, 1, 14}.
86  {label,13}.
87    {func_info,{atom,bad_catch_try},{atom,bad_4},1}.
88  {label,14}.
89    {allocate_zero,1,1}.
90    {'try',{x,0},{f,15}}.
91    {call,1,{f,26}}.
92    {try_end,{y,0}}.
93    {move,{atom,ok},{x,0}}.
94    {jump,{f,16}}.
95  {label,15}.
96    {try_case,{y,0}}.
97    {test,is_ne_exact,{f,16},[{x,0},{atom,error}]}.
98    {bif,raise,{f,0},[{x,2},{x,1}],{x,0}}.
99    {'%live',1}.
100  {label,16}.
101    {deallocate,1}.
102    return.
103
104
105{function, bad_5, 1, 18}.
106  {label,17}.
107    {func_info,{atom,bad_catch_try},{atom,bad_5},1}.
108  {label,18}.
109    {allocate_zero,2,1}.
110    {'try',{y,0},{f,19}}.
111    {call,1,{f,26}}.
112    {try_end,{y,0}}.
113    {move,{atom,ok},{x,0}}.
114    {jump,{f,20}}.
115  {label,19}.
116    {move,{x,0},{y,1}}.
117    {try_case,{y,1}}.
118    {test,is_ne_exact,{f,20},[{x,0},{atom,error}]}.
119    {bif,raise,{f,0},[{x,2},{x,1}],{x,0}}.
120    {'%live',1}.
121  {label,20}.
122    {deallocate,1}.
123    return.
124
125
126{function, bad_6, 1, 22}.
127  {label,21}.
128    {func_info,{atom,bad_catch_try},{atom,bad_6},1}.
129  {label,22}.
130    {allocate_zero,1,1}.
131    {'try',{y,0},{f,23}}.
132    {call,1,{f,26}}.
133    {move,{integer,1},{y,1}}.
134    {try_end,{y,0}}.
135    {move,{atom,ok},{x,0}}.
136    {jump,{f,24}}.
137  {label,23}.
138    {try_case,{y,0}}.
139    {test,is_ne_exact,{f,24},[{x,0},{atom,error}]}.
140    {bif,raise,{f,0},[{x,2},{x,1}],{x,0}}.
141    {'%live',1}.
142  {label,24}.
143    {deallocate,1}.
144    return.
145
146
147{function, foo, 1, 26}.
148  {label,25}.
149    {func_info,{atom,bad_catch_try},{atom,foo},1}.
150  {label,26}.
151    return.
152
153
154{function, module_info, 0, 28}.
155  {label,27}.
156    {func_info,{atom,bad_catch_try},{atom,module_info},0}.
157  {label,28}.
158    {move,{atom,bad_catch_try},{x,0}}.
159    {call_ext_only,1,{extfunc,erlang,get_module_info,1}}.
160
161
162{function, module_info, 1, 30}.
163  {label,29}.
164    {func_info,{atom,bad_catch_try},{atom,module_info},1}.
165  {label,30}.
166    {move,{x,0},{x,1}}.
167    {move,{atom,bad_catch_try},{x,0}}.
168    {call_ext_only,2,{extfunc,erlang,get_module_info,2}}.
169