1 /* This C file is generated by NIT to compile module icode_generator. */
2 #include "icode_generator._sep.h"
3 void icode_generator___Program___generate_icode_files(val_t p0
){
4 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
7 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
8 fra
.me
.file
= LOCATE_icode_generator
;
10 fra
.me
.meth
= LOCATE_icode_generator___Program___generate_icode_files
;
13 fra
.me
.REG
[0] = NIT_NULL
;
14 fra
.me
.REG
[1] = NIT_NULL
;
16 /* ./compiling//icode_generator.nit:27 */
17 fra
.me
.REG
[1] = CALL_program___Program___tc(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
18 fra
.me
.REG
[1] = CALL_compiling_base___ToolContext___compdir(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
19 REGB0
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
20 if (UNTAG_Bool(REGB0
)) {
21 nit_abort("Reciever is null", NULL
, LOCATE_icode_generator
, 27);
23 CALL_file___String___mkdir(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
24 CALL_program___Program___with_each_live_local_classes(fra
.me
.REG
[0])(fra
.me
.REG
[0], (&(fra
.me
)), ((fun_t
)OC_icode_generator___Program___generate_icode_files_1
));
25 stack_frame_head
= fra
.me
.prev
;
28 void OC_icode_generator___Program___generate_icode_files_1(struct stack_frame_t
*closctx
, val_t p0
){
29 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
32 /* ./compiling//icode_generator.nit:29 */
33 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
34 fra
.me
.file
= LOCATE_icode_generator
;
36 fra
.me
.meth
= LOCATE_icode_generator___Program___generate_icode_files
;
39 fra
.me
.REG
[0] = NIT_NULL
;
40 fra
.me
.REG
[1] = NIT_NULL
;
42 /* ./compiling//icode_generator.nit:30 */
43 fra
.me
.REG
[1] = CALL_program___Program___tc(closctx
->REG
[0])(closctx
->REG
[0]);
44 fra
.me
.REG
[1] = CALL_compiling_base___ToolContext___compdir(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
45 REGB0
= TAG_Bool((fra
.me
.REG
[1]!=NIT_NULL
) && VAL_ISA(fra
.me
.REG
[1], COLOR_String
, ID_String
)) /*cast String*/;
46 if (UNTAG_Bool(REGB0
)) {
48 nit_abort("Cast failed", NULL
, LOCATE_icode_generator
, 30);
50 CALL_icode_generator___MMLocalClass___generate_icode_file(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1]);
51 stack_frame_head
= fra
.me
.prev
;
54 void icode_generator___FileICodeDumper___init(val_t p0
, val_t p1
, int* init_table
){
55 int itpos0
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_FileICodeDumper
].i
;
56 struct {struct stack_frame_t me
; val_t MORE_REG
[2];} fra
;
60 if (init_table
[itpos0
]) return;
61 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
62 fra
.me
.file
= LOCATE_icode_generator
;
64 fra
.me
.meth
= LOCATE_icode_generator___FileICodeDumper___init
;
67 fra
.me
.REG
[0] = NIT_NULL
;
68 fra
.me
.REG
[1] = NIT_NULL
;
69 fra
.me
.REG
[2] = NIT_NULL
;
72 /* ./compiling//icode_generator.nit:40 */
73 fra
.me
.REG
[2] = fra
.me
.REG
[0];
74 /* ./compiling//icode_generator.nit:42 */
75 REGB0
= TAG_Bool(false);
76 REGB1
= TAG_Bool(false);
77 CALL_icode_dump___ICodeDumper___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, REGB1
, init_table
);
78 /* ./compiling//icode_generator.nit:43 */
79 ATTR_icode_generator___FileICodeDumper____file(fra
.me
.REG
[2]) = fra
.me
.REG
[1];
80 stack_frame_head
= fra
.me
.prev
;
81 init_table
[itpos0
] = 1;
84 void icode_generator___FileICodeDumper___write(val_t p0
, val_t p1
){
85 struct {struct stack_frame_t me
; val_t MORE_REG
[3];} fra
;
90 static val_t once_value_1
; /* Once value */
91 static val_t once_value_3
; /* Once value */
92 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
93 fra
.me
.file
= LOCATE_icode_generator
;
95 fra
.me
.meth
= LOCATE_icode_generator___FileICodeDumper___write
;
98 fra
.me
.REG
[0] = NIT_NULL
;
99 fra
.me
.REG
[1] = NIT_NULL
;
100 fra
.me
.REG
[2] = NIT_NULL
;
101 fra
.me
.REG
[3] = NIT_NULL
;
104 /* ./compiling//icode_generator.nit:47 */
106 REGB1
= CALL_icode_dump___ICodeDumper___indent_level(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
107 /* ./../lib/standard//kernel.nit:332 */
109 /* ./../lib/standard//kernel.nit:212 */
110 REGB2
= TAG_Bool(UNTAG_Int(REGB0
)<UNTAG_Int(REGB1
));
111 /* ./../lib/standard//kernel.nit:332 */
112 if (UNTAG_Bool(REGB2
)) {
113 /* ./compiling//icode_generator.nit:48 */
114 REGB2
= TAG_Bool(ATTR_icode_generator___FileICodeDumper____file(fra
.me
.REG
[0])!=NIT_NULL
);
115 if (UNTAG_Bool(REGB2
)) {
117 nit_abort("Uninitialized attribute %s", "_file", LOCATE_icode_generator
, 48);
119 fra
.me
.REG
[2] = ATTR_icode_generator___FileICodeDumper____file(fra
.me
.REG
[0]);
121 fra
.me
.REG
[3] = BOX_NativeString(" ");
123 fra
.me
.REG
[3] = NEW_String_string___String___with_native(fra
.me
.REG
[3], REGB2
);
124 once_value_1
= fra
.me
.REG
[3];
125 register_static_object(&once_value_1
);
126 } else fra
.me
.REG
[3] = once_value_1
;
127 fra
.me
.REG
[3] = fra
.me
.REG
[3];
128 CALL_stream___OStream___write(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[3]);
129 /* ./../lib/standard//kernel.nit:334 */
131 /* ./../lib/standard//kernel.nit:215 */
132 REGB2
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB2
));
133 /* ./../lib/standard//kernel.nit:334 */
136 /* ./../lib/standard//kernel.nit:332 */
141 /* ./compiling//icode_generator.nit:50 */
142 REGB0
= TAG_Bool(ATTR_icode_generator___FileICodeDumper____file(fra
.me
.REG
[0])!=NIT_NULL
);
143 if (UNTAG_Bool(REGB0
)) {
145 nit_abort("Uninitialized attribute %s", "_file", LOCATE_icode_generator
, 50);
147 fra
.me
.REG
[3] = ATTR_icode_generator___FileICodeDumper____file(fra
.me
.REG
[0]);
148 CALL_stream___OStream___write(fra
.me
.REG
[3])(fra
.me
.REG
[3], fra
.me
.REG
[1]);
149 /* ./compiling//icode_generator.nit:51 */
150 REGB0
= TAG_Bool(ATTR_icode_generator___FileICodeDumper____file(fra
.me
.REG
[0])!=NIT_NULL
);
151 if (UNTAG_Bool(REGB0
)) {
153 nit_abort("Uninitialized attribute %s", "_file", LOCATE_icode_generator
, 51);
155 fra
.me
.REG
[0] = ATTR_icode_generator___FileICodeDumper____file(fra
.me
.REG
[0]);
157 fra
.me
.REG
[1] = BOX_NativeString("\n");
159 fra
.me
.REG
[1] = NEW_String_string___String___with_native(fra
.me
.REG
[1], REGB0
);
160 once_value_3
= fra
.me
.REG
[1];
161 register_static_object(&once_value_3
);
162 } else fra
.me
.REG
[1] = once_value_3
;
163 fra
.me
.REG
[1] = fra
.me
.REG
[1];
164 CALL_stream___OStream___write(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1]);
165 stack_frame_head
= fra
.me
.prev
;
168 void icode_generator___MMLocalClass___generate_icode_file(val_t p0
, val_t p1
){
169 struct {struct stack_frame_t me
; val_t MORE_REG
[3];} fra
;
173 static val_t once_value_1
; /* Once value */
174 static val_t once_value_2
; /* Once value */
175 static val_t once_value_3
; /* Once value */
176 static val_t once_value_4
; /* Once value */
177 static val_t once_value_5
; /* Once value */
178 static val_t once_value_6
; /* Once value */
179 static val_t once_value_7
; /* Once value */
180 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
181 fra
.me
.file
= LOCATE_icode_generator
;
183 fra
.me
.meth
= LOCATE_icode_generator___MMLocalClass___generate_icode_file
;
184 fra
.me
.has_broke
= 0;
186 fra
.me
.REG
[0] = NIT_NULL
;
187 fra
.me
.REG
[1] = NIT_NULL
;
188 fra
.me
.REG
[2] = NIT_NULL
;
189 fra
.me
.REG
[3] = NIT_NULL
;
192 /* ./compiling//icode_generator.nit:58 */
194 fra
.me
.REG
[2] = NEW_Array_array___Array___with_capacity(REGB0
);
196 fra
.me
.REG
[3] = BOX_NativeString("");
198 fra
.me
.REG
[3] = NEW_String_string___String___with_native(fra
.me
.REG
[3], REGB0
);
199 once_value_1
= fra
.me
.REG
[3];
200 register_static_object(&once_value_1
);
201 } else fra
.me
.REG
[3] = once_value_1
;
202 fra
.me
.REG
[3] = fra
.me
.REG
[3];
203 CALL_abstract_collection___SimpleCollection___add(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[3]);
204 CALL_abstract_collection___SimpleCollection___add(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[1]);
206 fra
.me
.REG
[1] = BOX_NativeString("/");
208 fra
.me
.REG
[1] = NEW_String_string___String___with_native(fra
.me
.REG
[1], REGB0
);
209 once_value_2
= fra
.me
.REG
[1];
210 register_static_object(&once_value_2
);
211 } else fra
.me
.REG
[1] = once_value_2
;
212 fra
.me
.REG
[1] = fra
.me
.REG
[1];
213 CALL_abstract_collection___SimpleCollection___add(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[1]);
214 fra
.me
.REG
[1] = CALL_string___Object___to_s(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
215 CALL_abstract_collection___SimpleCollection___add(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[1]);
217 fra
.me
.REG
[1] = BOX_NativeString(".icode");
219 fra
.me
.REG
[1] = NEW_String_string___String___with_native(fra
.me
.REG
[1], REGB0
);
220 once_value_3
= fra
.me
.REG
[1];
221 register_static_object(&once_value_3
);
222 } else fra
.me
.REG
[1] = once_value_3
;
223 fra
.me
.REG
[1] = fra
.me
.REG
[1];
224 CALL_abstract_collection___SimpleCollection___add(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[1]);
225 fra
.me
.REG
[2] = CALL_string___Object___to_s(fra
.me
.REG
[2])(fra
.me
.REG
[2]);
226 fra
.me
.REG
[2] = NEW_OFStream_file___OFStream___open(fra
.me
.REG
[2]);
227 /* ./compiling//icode_generator.nit:59 */
228 fra
.me
.REG
[1] = CALL_primitive_info___MMLocalClass___primitive_info(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
229 REGB0
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
230 if (UNTAG_Bool(REGB0
)) {
232 REGB1
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
233 if (UNTAG_Bool(REGB1
)) {
234 REGB1
= TAG_Bool(false);
237 REGB1
= CALL_kernel___Object_____eqeq(fra
.me
.REG
[1])(fra
.me
.REG
[1], NIT_NULL
);
241 if (UNTAG_Bool(REGB0
)) {
242 /* ./compiling//icode_generator.nit:61 */
243 fra
.me
.REG
[1] = CALL_program___MMLocalClass___init_var_iroutine(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
244 REGB0
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
245 if (UNTAG_Bool(REGB0
)) {
247 REGB1
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
248 if (UNTAG_Bool(REGB1
)) {
249 REGB1
= TAG_Bool(false);
252 REGB1
= CALL_kernel___Object_____eqeq(fra
.me
.REG
[1])(fra
.me
.REG
[1], NIT_NULL
);
256 REGB0
= TAG_Bool(!UNTAG_Bool(REGB0
));
257 if (UNTAG_Bool(REGB0
)) {
258 /* ./compiling//icode_generator.nit:62 */
259 fra
.me
.REG
[1] = NEW_FileICodeDumper_icode_generator___FileICodeDumper___init(fra
.me
.REG
[2]);
260 /* ./compiling//icode_generator.nit:63 */
261 CALL_icode_dump___ICodeDumper___indent(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
262 /* ./compiling//icode_generator.nit:64 */
264 fra
.me
.REG
[3] = BOX_NativeString("Init var iroutine::\n");
266 fra
.me
.REG
[3] = NEW_String_string___String___with_native(fra
.me
.REG
[3], REGB0
);
267 once_value_4
= fra
.me
.REG
[3];
268 register_static_object(&once_value_4
);
269 } else fra
.me
.REG
[3] = once_value_4
;
270 fra
.me
.REG
[3] = fra
.me
.REG
[3];
271 CALL_stream___OStream___write(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[3]);
272 /* ./compiling//icode_generator.nit:65 */
273 fra
.me
.REG
[3] = CALL_program___MMLocalClass___init_var_iroutine(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
274 REGB0
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
275 if (UNTAG_Bool(REGB0
)) {
276 nit_abort("Reciever is null", NULL
, LOCATE_icode_generator
, 65);
278 CALL_icode_dump___IRoutine___dump(fra
.me
.REG
[3])(fra
.me
.REG
[3], fra
.me
.REG
[1]);
279 /* ./compiling//icode_generator.nit:66 */
281 fra
.me
.REG
[1] = BOX_NativeString("\n\n");
283 fra
.me
.REG
[1] = NEW_String_string___String___with_native(fra
.me
.REG
[1], REGB0
);
284 once_value_5
= fra
.me
.REG
[1];
285 register_static_object(&once_value_5
);
286 } else fra
.me
.REG
[1] = once_value_5
;
287 fra
.me
.REG
[1] = fra
.me
.REG
[1];
288 CALL_stream___OStream___write(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[1]);
290 /* ./compiling//icode_generator.nit:68 */
291 fra
.me
.REG
[1] = CALL_program___MMLocalClass___checknew_iroutine(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
292 REGB0
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
293 if (UNTAG_Bool(REGB0
)) {
295 REGB1
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
296 if (UNTAG_Bool(REGB1
)) {
297 REGB1
= TAG_Bool(false);
300 REGB1
= CALL_kernel___Object_____eqeq(fra
.me
.REG
[1])(fra
.me
.REG
[1], NIT_NULL
);
304 REGB0
= TAG_Bool(!UNTAG_Bool(REGB0
));
305 if (UNTAG_Bool(REGB0
)) {
306 /* ./compiling//icode_generator.nit:69 */
307 fra
.me
.REG
[1] = NEW_FileICodeDumper_icode_generator___FileICodeDumper___init(fra
.me
.REG
[2]);
308 /* ./compiling//icode_generator.nit:70 */
309 CALL_icode_dump___ICodeDumper___indent(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
310 /* ./compiling//icode_generator.nit:71 */
312 fra
.me
.REG
[3] = BOX_NativeString("Check new instance iroutine::\n");
314 fra
.me
.REG
[3] = NEW_String_string___String___with_native(fra
.me
.REG
[3], REGB0
);
315 once_value_6
= fra
.me
.REG
[3];
316 register_static_object(&once_value_6
);
317 } else fra
.me
.REG
[3] = once_value_6
;
318 fra
.me
.REG
[3] = fra
.me
.REG
[3];
319 CALL_stream___OStream___write(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[3]);
320 /* ./compiling//icode_generator.nit:72 */
321 fra
.me
.REG
[3] = CALL_program___MMLocalClass___checknew_iroutine(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
322 REGB0
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
323 if (UNTAG_Bool(REGB0
)) {
324 nit_abort("Reciever is null", NULL
, LOCATE_icode_generator
, 72);
326 CALL_icode_dump___IRoutine___dump(fra
.me
.REG
[3])(fra
.me
.REG
[3], fra
.me
.REG
[1]);
327 /* ./compiling//icode_generator.nit:73 */
329 fra
.me
.REG
[1] = BOX_NativeString("\n\n");
331 fra
.me
.REG
[1] = NEW_String_string___String___with_native(fra
.me
.REG
[1], REGB0
);
332 once_value_7
= fra
.me
.REG
[1];
333 register_static_object(&once_value_7
);
334 } else fra
.me
.REG
[1] = once_value_7
;
335 fra
.me
.REG
[1] = fra
.me
.REG
[1];
336 CALL_stream___OStream___write(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[1]);
338 /* ./compiling//icode_generator.nit:77 */
339 fra
.me
.REG
[1] = CALL_abstractmetamodel___MMLocalClass___global_properties(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
340 CALL_abstract_collection___Collection___iterate(fra
.me
.REG
[1])(fra
.me
.REG
[1], (&(fra
.me
)), ((fun_t
)OC_icode_generator___MMLocalClass___generate_icode_file_8
));
342 /* ./compiling//icode_generator.nit:90 */
343 fra
.me
.REG
[1] = CALL_abstractmetamodel___MMLocalClass___global_properties(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
344 CALL_abstract_collection___Collection___iterate(fra
.me
.REG
[1])(fra
.me
.REG
[1], (&(fra
.me
)), ((fun_t
)OC_icode_generator___MMLocalClass___generate_icode_file_13
));
345 /* ./compiling//icode_generator.nit:96 */
346 CALL_stream___IOS___close(fra
.me
.REG
[2])(fra
.me
.REG
[2]);
347 stack_frame_head
= fra
.me
.prev
;
350 void OC_icode_generator___MMLocalClass___generate_icode_file_8(struct stack_frame_t
*closctx
, val_t p0
, struct stack_frame_t
*closctx_param
, fun_t clos_fun0
){
351 struct {struct stack_frame_t me
; val_t MORE_REG
[3];} fra
;
355 static val_t once_value_10
; /* Once value */
356 static val_t once_value_11
; /* Once value */
357 static val_t once_value_12
; /* Once value */
358 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
359 fra
.me
.file
= LOCATE_icode_generator
;
361 fra
.me
.meth
= LOCATE_icode_generator___MMLocalClass___generate_icode_file
;
362 fra
.me
.has_broke
= 0;
364 fra
.me
.REG
[0] = NIT_NULL
;
365 fra
.me
.REG
[1] = NIT_NULL
;
366 fra
.me
.REG
[2] = NIT_NULL
;
367 fra
.me
.REG
[3] = NIT_NULL
;
368 fra
.me
.closure_ctx
= closctx_param
;
369 fra
.me
.closure_funs
= CREG
;
372 /* ./compiling//icode_generator.nit:78 */
373 REGB0
= CALL_abstractmetamodel___MMGlobalProperty___is_init_for(fra
.me
.REG
[0])(fra
.me
.REG
[0], closctx
->REG
[0]);
374 REGB0
= TAG_Bool(!UNTAG_Bool(REGB0
));
375 if (UNTAG_Bool(REGB0
)) {
378 /* ./compiling//icode_generator.nit:79 */
379 fra
.me
.REG
[0] = CALL_abstractmetamodel___MMLocalClass_____bra(closctx
->REG
[0])(closctx
->REG
[0], fra
.me
.REG
[0]);
380 /* ./compiling//icode_generator.nit:80 */
381 REGB0
= TAG_Bool(VAL_ISA(fra
.me
.REG
[0], COLOR_MMMethod
, ID_MMMethod
)) /*cast MMMethod*/;
382 if (UNTAG_Bool(REGB0
)) {
384 nit_abort("Assert failed", NULL
, LOCATE_icode_generator
, 80);
386 /* ./compiling//icode_generator.nit:81 */
387 fra
.me
.REG
[1] = NEW_FileICodeDumper_icode_generator___FileICodeDumper___init(closctx
->REG
[2]);
388 /* ./compiling//icode_generator.nit:82 */
389 CALL_icode_dump___ICodeDumper___indent(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
390 /* ./compiling//icode_generator.nit:83 */
392 fra
.me
.REG
[2] = NEW_Array_array___Array___with_capacity(REGB0
);
393 if (!once_value_10
) {
394 fra
.me
.REG
[3] = BOX_NativeString("New instance:: ");
396 fra
.me
.REG
[3] = NEW_String_string___String___with_native(fra
.me
.REG
[3], REGB0
);
397 once_value_10
= fra
.me
.REG
[3];
398 register_static_object(&once_value_10
);
399 } else fra
.me
.REG
[3] = once_value_10
;
400 fra
.me
.REG
[3] = fra
.me
.REG
[3];
401 CALL_abstract_collection___SimpleCollection___add(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[3]);
402 fra
.me
.REG
[3] = CALL_abstractmetamodel___MMLocalProperty___full_name(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
403 CALL_abstract_collection___SimpleCollection___add(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[3]);
404 if (!once_value_11
) {
405 fra
.me
.REG
[3] = BOX_NativeString("\n");
407 fra
.me
.REG
[3] = NEW_String_string___String___with_native(fra
.me
.REG
[3], REGB0
);
408 once_value_11
= fra
.me
.REG
[3];
409 register_static_object(&once_value_11
);
410 } else fra
.me
.REG
[3] = once_value_11
;
411 fra
.me
.REG
[3] = fra
.me
.REG
[3];
412 CALL_abstract_collection___SimpleCollection___add(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[3]);
413 fra
.me
.REG
[2] = CALL_string___Object___to_s(fra
.me
.REG
[2])(fra
.me
.REG
[2]);
414 CALL_stream___OStream___write(closctx
->REG
[2])(closctx
->REG
[2], fra
.me
.REG
[2]);
415 /* ./compiling//icode_generator.nit:84 */
416 fra
.me
.REG
[2] = CALL_program___MMLocalClass___new_instance_iroutine(closctx
->REG
[0])(closctx
->REG
[0]);
417 fra
.me
.REG
[0] = CALL_abstract_collection___MapRead_____bra(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[0]);
418 REGB0
= TAG_Bool(fra
.me
.REG
[0]==NIT_NULL
);
419 if (UNTAG_Bool(REGB0
)) {
420 nit_abort("Reciever is null", NULL
, LOCATE_icode_generator
, 84);
422 CALL_icode_dump___IRoutine___dump(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1]);
423 /* ./compiling//icode_generator.nit:85 */
424 if (!once_value_12
) {
425 fra
.me
.REG
[1] = BOX_NativeString("\n\n");
427 fra
.me
.REG
[1] = NEW_String_string___String___with_native(fra
.me
.REG
[1], REGB0
);
428 once_value_12
= fra
.me
.REG
[1];
429 register_static_object(&once_value_12
);
430 } else fra
.me
.REG
[1] = once_value_12
;
431 fra
.me
.REG
[1] = fra
.me
.REG
[1];
432 CALL_stream___OStream___write(closctx
->REG
[2])(closctx
->REG
[2], fra
.me
.REG
[1]);
434 stack_frame_head
= fra
.me
.prev
;
437 void OC_icode_generator___MMLocalClass___generate_icode_file_13(struct stack_frame_t
*closctx
, val_t p0
, struct stack_frame_t
*closctx_param
, fun_t clos_fun0
){
438 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
443 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
444 fra
.me
.file
= LOCATE_icode_generator
;
446 fra
.me
.meth
= LOCATE_icode_generator___MMLocalClass___generate_icode_file
;
447 fra
.me
.has_broke
= 0;
449 fra
.me
.REG
[0] = NIT_NULL
;
450 fra
.me
.REG
[1] = NIT_NULL
;
451 fra
.me
.closure_ctx
= closctx_param
;
452 fra
.me
.closure_funs
= CREG
;
455 /* ./compiling//icode_generator.nit:91 */
456 fra
.me
.REG
[0] = CALL_abstractmetamodel___MMLocalClass_____bra(closctx
->REG
[0])(closctx
->REG
[0], fra
.me
.REG
[0]);
457 /* ./compiling//icode_generator.nit:92 */
458 fra
.me
.REG
[1] = CALL_abstractmetamodel___MMLocalProperty___local_class(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
459 REGB0
= TAG_Bool(IS_EQUAL_OO(fra
.me
.REG
[1],closctx
->REG
[0]));
460 if (UNTAG_Bool(REGB0
)) {
462 REGB1
= CALL_kernel___Object_____eqeq(fra
.me
.REG
[1])(fra
.me
.REG
[1], closctx
->REG
[0]);
465 if (UNTAG_Bool(REGB0
)) {
466 REGB0
= TAG_Bool(VAL_ISA(fra
.me
.REG
[0], COLOR_MMMethod
, ID_MMMethod
)) /*cast MMMethod*/;
468 REGB1
= TAG_Bool(false);
471 if (UNTAG_Bool(REGB0
)) {
472 /* ./compiling//icode_generator.nit:93 */
473 CALL_icode_generator___MMMethod___generate_icode(fra
.me
.REG
[0])(fra
.me
.REG
[0], closctx
->REG
[2]);
475 stack_frame_head
= fra
.me
.prev
;
478 void icode_generator___MMMethod___generate_icode(val_t p0
, val_t p1
){
479 struct {struct stack_frame_t me
; val_t MORE_REG
[4];} fra
;
482 static val_t once_value_1
; /* Once value */
483 static val_t once_value_2
; /* Once value */
484 static val_t once_value_3
; /* Once value */
485 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
486 fra
.me
.file
= LOCATE_icode_generator
;
488 fra
.me
.meth
= LOCATE_icode_generator___MMMethod___generate_icode
;
489 fra
.me
.has_broke
= 0;
491 fra
.me
.REG
[0] = NIT_NULL
;
492 fra
.me
.REG
[1] = NIT_NULL
;
493 fra
.me
.REG
[2] = NIT_NULL
;
494 fra
.me
.REG
[3] = NIT_NULL
;
495 fra
.me
.REG
[4] = NIT_NULL
;
498 /* ./compiling//icode_generator.nit:103 */
499 fra
.me
.REG
[2] = NEW_FileICodeDumper_icode_generator___FileICodeDumper___init(fra
.me
.REG
[1]);
500 /* ./compiling//icode_generator.nit:104 */
501 CALL_icode_dump___ICodeDumper___indent(fra
.me
.REG
[2])(fra
.me
.REG
[2]);
502 /* ./compiling//icode_generator.nit:105 */
504 fra
.me
.REG
[3] = NEW_Array_array___Array___with_capacity(REGB0
);
506 fra
.me
.REG
[4] = BOX_NativeString("Method:: ");
508 fra
.me
.REG
[4] = NEW_String_string___String___with_native(fra
.me
.REG
[4], REGB0
);
509 once_value_1
= fra
.me
.REG
[4];
510 register_static_object(&once_value_1
);
511 } else fra
.me
.REG
[4] = once_value_1
;
512 fra
.me
.REG
[4] = fra
.me
.REG
[4];
513 CALL_abstract_collection___SimpleCollection___add(fra
.me
.REG
[3])(fra
.me
.REG
[3], fra
.me
.REG
[4]);
514 fra
.me
.REG
[4] = CALL_abstractmetamodel___MMLocalProperty___full_name(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
515 CALL_abstract_collection___SimpleCollection___add(fra
.me
.REG
[3])(fra
.me
.REG
[3], fra
.me
.REG
[4]);
517 fra
.me
.REG
[4] = BOX_NativeString("\n");
519 fra
.me
.REG
[4] = NEW_String_string___String___with_native(fra
.me
.REG
[4], REGB0
);
520 once_value_2
= fra
.me
.REG
[4];
521 register_static_object(&once_value_2
);
522 } else fra
.me
.REG
[4] = once_value_2
;
523 fra
.me
.REG
[4] = fra
.me
.REG
[4];
524 CALL_abstract_collection___SimpleCollection___add(fra
.me
.REG
[3])(fra
.me
.REG
[3], fra
.me
.REG
[4]);
525 fra
.me
.REG
[3] = CALL_string___Object___to_s(fra
.me
.REG
[3])(fra
.me
.REG
[3]);
526 CALL_stream___OStream___write(fra
.me
.REG
[1])(fra
.me
.REG
[1], fra
.me
.REG
[3]);
527 /* ./compiling//icode_generator.nit:106 */
528 fra
.me
.REG
[0] = CALL_icode_base___MMMethod___iroutine(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
529 REGB0
= TAG_Bool(fra
.me
.REG
[0]==NIT_NULL
);
530 if (UNTAG_Bool(REGB0
)) {
531 nit_abort("Reciever is null", NULL
, LOCATE_icode_generator
, 106);
533 CALL_icode_dump___IRoutine___dump(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[2]);
534 /* ./compiling//icode_generator.nit:107 */
536 fra
.me
.REG
[2] = BOX_NativeString("\n\n");
538 fra
.me
.REG
[2] = NEW_String_string___String___with_native(fra
.me
.REG
[2], REGB0
);
539 once_value_3
= fra
.me
.REG
[2];
540 register_static_object(&once_value_3
);
541 } else fra
.me
.REG
[2] = once_value_3
;
542 fra
.me
.REG
[2] = fra
.me
.REG
[2];
543 CALL_stream___OStream___write(fra
.me
.REG
[1])(fra
.me
.REG
[1], fra
.me
.REG
[2]);
544 stack_frame_head
= fra
.me
.prev
;