Merge branch 'alexis/various-fixes' into wip
[nit.git] / c_src / compiling._sep.c
1 /* This C file is generated by NIT to compile module compiling. */
2 #include "compiling._sep.h"
3 void compiling___Program___generate_classes_init_to_icode(val_t p0){
4 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
5 val_t REGB0;
6 val_t tmp;
7 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
8 fra.me.file = LOCATE_compiling;
9 fra.me.line = 26;
10 fra.me.meth = LOCATE_compiling___Program___generate_classes_init_to_icode;
11 fra.me.has_broke = 0;
12 fra.me.REG_size = 3;
13 fra.me.REG[0] = NIT_NULL;
14 fra.me.REG[1] = NIT_NULL;
15 fra.me.REG[2] = NIT_NULL;
16 fra.me.REG[0] = p0;
17 fra.me.REG[1] = CALL_program___Program___module(fra.me.REG[0])(fra.me.REG[0]);
18 fra.me.REG[1] = CALL_abstractmetamodel___MMModule___local_classes(fra.me.REG[1])(fra.me.REG[1]);
19 fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
20 /* ./compiling//compiling.nit:29 */
21 while(1) {
22 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
23 if (UNTAG_Bool(REGB0)) {
24 fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
25 /* ./compiling//compiling.nit:30 */
26 CALL_compiling_global___MMLocalClass___generate_allocation_iroutines(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
27 } else {
28 /* ./compiling//compiling.nit:29 */
29 goto label1;
30 }
31 CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
32 }
33 label1: while(0);
34 stack_frame_head = fra.me.prev;
35 return;
36 }
37 void compiling___Program___compile_prog_to_c(val_t p0, val_t p1){
38 struct {struct stack_frame_t me; val_t MORE_REG[8];} fra;
39 val_t REGB0;
40 val_t REGB1;
41 val_t tmp;
42 static val_t once_value_1; /* Once value */
43 static val_t once_value_2; /* Once value */
44 static val_t once_value_3; /* Once value */
45 static val_t once_value_4; /* Once value */
46 static val_t once_value_5; /* Once value */
47 static val_t once_value_6; /* Once value */
48 static val_t once_value_7; /* Once value */
49 static val_t once_value_8; /* Once value */
50 static val_t once_value_9; /* Once value */
51 static val_t once_value_10; /* Once value */
52 static val_t once_value_11; /* Once value */
53 static val_t once_value_12; /* Once value */
54 static val_t once_value_13; /* Once value */
55 static val_t once_value_14; /* Once value */
56 static val_t once_value_16; /* Once value */
57 static val_t once_value_17; /* Once value */
58 static val_t once_value_18; /* Once value */
59 static val_t once_value_19; /* Once value */
60 static val_t once_value_20; /* Once value */
61 static val_t once_value_21; /* Once value */
62 static val_t once_value_22; /* Once value */
63 static val_t once_value_23; /* Once value */
64 static val_t once_value_24; /* Once value */
65 static val_t once_value_25; /* Once value */
66 static val_t once_value_27; /* Once value */
67 static val_t once_value_28; /* Once value */
68 static val_t once_value_29; /* Once value */
69 static val_t once_value_30; /* Once value */
70 static val_t once_value_31; /* Once value */
71 static val_t once_value_32; /* Once value */
72 static val_t once_value_33; /* Once value */
73 static val_t once_value_34; /* Once value */
74 static val_t once_value_35; /* Once value */
75 static val_t once_value_36; /* Once value */
76 static val_t once_value_37; /* Once value */
77 static val_t once_value_38; /* Once value */
78 static val_t once_value_39; /* Once value */
79 static val_t once_value_40; /* Once value */
80 static val_t once_value_41; /* Once value */
81 static val_t once_value_42; /* Once value */
82 static val_t once_value_43; /* Once value */
83 static val_t once_value_44; /* Once value */
84 static val_t once_value_45; /* Once value */
85 static val_t once_value_46; /* Once value */
86 static val_t once_value_47; /* Once value */
87 static val_t once_value_48; /* Once value */
88 static val_t once_value_49; /* Once value */
89 static val_t once_value_50; /* Once value */
90 static val_t once_value_51; /* Once value */
91 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
92 fra.me.file = LOCATE_compiling;
93 fra.me.line = 34;
94 fra.me.meth = LOCATE_compiling___Program___compile_prog_to_c;
95 fra.me.has_broke = 0;
96 fra.me.REG_size = 9;
97 fra.me.REG[0] = NIT_NULL;
98 fra.me.REG[1] = NIT_NULL;
99 fra.me.REG[2] = NIT_NULL;
100 fra.me.REG[3] = NIT_NULL;
101 fra.me.REG[4] = NIT_NULL;
102 fra.me.REG[5] = NIT_NULL;
103 fra.me.REG[6] = NIT_NULL;
104 fra.me.REG[7] = NIT_NULL;
105 fra.me.REG[8] = NIT_NULL;
106 fra.me.REG[0] = p0;
107 fra.me.REG[1] = p1;
108 fra.me.REG[2] = CALL_compiling_base___ToolContext___compdir(fra.me.REG[1])(fra.me.REG[1]);
109 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
110 /* ./compiling//compiling.nit:39 */
111 if (UNTAG_Bool(REGB0)) {
112 fprintf(stderr, "Reciever is null");
113 fprintf(stderr, " (%s:%d)\n", LOCATE_compiling, 39);
114 nit_exit(1);
115 }
116 CALL_file___String___mkdir(fra.me.REG[2])(fra.me.REG[2]);
117 fra.me.REG[2] = NEW_Array_array___Array___init();
118 fra.me.REG[3] = NEW_ArraySet_array___ArraySet___init();
119 /* ./compiling//compiling.nit:43 */
120 if (!once_value_1) {
121 fra.me.REG[4] = BOX_NativeString("$CLIBDIR/nit_main.c");
122 REGB0 = TAG_Int(19);
123 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
124 once_value_1 = fra.me.REG[4];
125 register_static_object(&once_value_1);
126 } else fra.me.REG[4] = once_value_1;
127 array___Array___add(fra.me.REG[2], fra.me.REG[4]);
128 /* ./compiling//compiling.nit:44 */
129 if (!once_value_2) {
130 fra.me.REG[4] = BOX_NativeString("$CLIBDIR/gc.c");
131 REGB0 = TAG_Int(13);
132 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
133 once_value_2 = fra.me.REG[4];
134 register_static_object(&once_value_2);
135 } else fra.me.REG[4] = once_value_2;
136 array___Array___add(fra.me.REG[2], fra.me.REG[4]);
137 /* ./compiling//compiling.nit:45 */
138 if (!once_value_3) {
139 fra.me.REG[4] = BOX_NativeString("$CLIBDIR/gc_static_objects_list.c");
140 REGB0 = TAG_Int(33);
141 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
142 once_value_3 = fra.me.REG[4];
143 register_static_object(&once_value_3);
144 } else fra.me.REG[4] = once_value_3;
145 array___Array___add(fra.me.REG[2], fra.me.REG[4]);
146 /* ./compiling//compiling.nit:46 */
147 if (!once_value_4) {
148 fra.me.REG[4] = BOX_NativeString("Generating C code");
149 REGB0 = TAG_Int(17);
150 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
151 once_value_4 = fra.me.REG[4];
152 register_static_object(&once_value_4);
153 } else fra.me.REG[4] = once_value_4;
154 REGB0 = TAG_Int(1);
155 CALL_mmloader___ToolContext___info(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4], REGB0);
156 fra.me.REG[4] = CALL_program___Program___module(fra.me.REG[0])(fra.me.REG[0]);
157 fra.me.REG[4] = CALL_abstractmetamodel___MMModule___mhe(fra.me.REG[4])(fra.me.REG[4]);
158 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
159 /* ./compiling//compiling.nit:47 */
160 if (UNTAG_Bool(REGB0)) {
161 fprintf(stderr, "Reciever is null");
162 fprintf(stderr, " (%s:%d)\n", LOCATE_compiling, 47);
163 nit_exit(1);
164 }
165 fra.me.REG[4] = CALL_partial_order___PartialOrderElement___greaters_and_self(fra.me.REG[4])(fra.me.REG[4]);
166 fra.me.REG[4] = CALL_abstract_collection___Collection___iterator(fra.me.REG[4])(fra.me.REG[4]);
167 while(1) {
168 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[4])(fra.me.REG[4]);
169 if (UNTAG_Bool(REGB0)) {
170 fra.me.REG[5] = CALL_abstract_collection___Iterator___item(fra.me.REG[4])(fra.me.REG[4]);
171 REGB0 = TAG_Int(5);
172 fra.me.REG[6] = NEW_Array_array___Array___with_capacity(REGB0);
173 /* ./compiling//compiling.nit:48 */
174 if (!once_value_5) {
175 fra.me.REG[7] = BOX_NativeString("");
176 REGB0 = TAG_Int(0);
177 fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB0);
178 once_value_5 = fra.me.REG[7];
179 register_static_object(&once_value_5);
180 } else fra.me.REG[7] = once_value_5;
181 array___Array___add(fra.me.REG[6], fra.me.REG[7]);
182 fra.me.REG[7] = CALL_compiling_base___ToolContext___compdir(fra.me.REG[1])(fra.me.REG[1]);
183 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
184 array___Array___add(fra.me.REG[6], fra.me.REG[7]);
185 if (!once_value_6) {
186 fra.me.REG[7] = BOX_NativeString("/");
187 REGB0 = TAG_Int(1);
188 fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB0);
189 once_value_6 = fra.me.REG[7];
190 register_static_object(&once_value_6);
191 } else fra.me.REG[7] = once_value_6;
192 array___Array___add(fra.me.REG[6], fra.me.REG[7]);
193 fra.me.REG[7] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[5])(fra.me.REG[5]);
194 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
195 array___Array___add(fra.me.REG[6], fra.me.REG[7]);
196 if (!once_value_7) {
197 fra.me.REG[7] = BOX_NativeString("._sep.c");
198 REGB0 = TAG_Int(7);
199 fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB0);
200 once_value_7 = fra.me.REG[7];
201 register_static_object(&once_value_7);
202 } else fra.me.REG[7] = once_value_7;
203 array___Array___add(fra.me.REG[6], fra.me.REG[7]);
204 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
205 array___Array___add(fra.me.REG[2], fra.me.REG[6]);
206 REGB0 = TAG_Int(3);
207 fra.me.REG[6] = NEW_Array_array___Array___with_capacity(REGB0);
208 /* ./compiling//compiling.nit:49 */
209 if (!once_value_8) {
210 fra.me.REG[7] = BOX_NativeString("Generating C code for module: ");
211 REGB0 = TAG_Int(30);
212 fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB0);
213 once_value_8 = fra.me.REG[7];
214 register_static_object(&once_value_8);
215 } else fra.me.REG[7] = once_value_8;
216 array___Array___add(fra.me.REG[6], fra.me.REG[7]);
217 fra.me.REG[7] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[5])(fra.me.REG[5]);
218 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
219 array___Array___add(fra.me.REG[6], fra.me.REG[7]);
220 if (!once_value_9) {
221 fra.me.REG[7] = BOX_NativeString("");
222 REGB0 = TAG_Int(0);
223 fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB0);
224 once_value_9 = fra.me.REG[7];
225 register_static_object(&once_value_9);
226 } else fra.me.REG[7] = once_value_9;
227 array___Array___add(fra.me.REG[6], fra.me.REG[7]);
228 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
229 REGB0 = TAG_Int(2);
230 CALL_mmloader___ToolContext___info(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[6], REGB0);
231 /* ./compiling//compiling.nit:50 */
232 CALL_compiling___MMModule___compile_separate_module(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[1], fra.me.REG[0]);
233 fra.me.REG[5] = CALL_abstractmetamodel___MMModule___location(fra.me.REG[5])(fra.me.REG[5]);
234 fra.me.REG[5] = CALL_location___Location___file(fra.me.REG[5])(fra.me.REG[5]);
235 /* ./compiling//compiling.nit:51 */
236 if (!once_value_10) {
237 fra.me.REG[6] = BOX_NativeString(".nit");
238 REGB0 = TAG_Int(4);
239 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
240 once_value_10 = fra.me.REG[6];
241 register_static_object(&once_value_10);
242 } else fra.me.REG[6] = once_value_10;
243 fra.me.REG[6] = CALL_file___String___strip_extension(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
244 /* ./compiling//compiling.nit:52 */
245 if (!once_value_11) {
246 fra.me.REG[5] = BOX_NativeString("_nit.h");
247 REGB0 = TAG_Int(6);
248 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
249 once_value_11 = fra.me.REG[5];
250 register_static_object(&once_value_11);
251 } else fra.me.REG[5] = once_value_11;
252 fra.me.REG[5] = CALL_string___String_____plus(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[5]);
253 REGB0 = CALL_file___String___file_exists(fra.me.REG[5])(fra.me.REG[5]);
254 if (UNTAG_Bool(REGB0)) {
255 REGB0 = TAG_Int(3);
256 fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB0);
257 /* ./compiling//compiling.nit:53 */
258 if (!once_value_12) {
259 fra.me.REG[7] = BOX_NativeString("-I ");
260 REGB0 = TAG_Int(3);
261 fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB0);
262 once_value_12 = fra.me.REG[7];
263 register_static_object(&once_value_12);
264 } else fra.me.REG[7] = once_value_12;
265 array___Array___add(fra.me.REG[5], fra.me.REG[7]);
266 fra.me.REG[7] = CALL_file___String___dirname(fra.me.REG[6])(fra.me.REG[6]);
267 array___Array___add(fra.me.REG[5], fra.me.REG[7]);
268 if (!once_value_13) {
269 fra.me.REG[7] = BOX_NativeString("");
270 REGB0 = TAG_Int(0);
271 fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB0);
272 once_value_13 = fra.me.REG[7];
273 register_static_object(&once_value_13);
274 } else fra.me.REG[7] = once_value_13;
275 array___Array___add(fra.me.REG[5], fra.me.REG[7]);
276 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
277 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
278 }
279 /* ./compiling//compiling.nit:55 */
280 if (!once_value_14) {
281 fra.me.REG[5] = BOX_NativeString("_nit.c");
282 REGB0 = TAG_Int(6);
283 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
284 once_value_14 = fra.me.REG[5];
285 register_static_object(&once_value_14);
286 } else fra.me.REG[5] = once_value_14;
287 fra.me.REG[5] = CALL_string___String_____plus(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[5]);
288 fra.me.REG[6] = fra.me.REG[5];
289 REGB0 = CALL_file___String___file_exists(fra.me.REG[6])(fra.me.REG[6]);
290 /* ./compiling//compiling.nit:56 */
291 if (UNTAG_Bool(REGB0)) {
292 array___Array___add(fra.me.REG[2], fra.me.REG[6]);
293 }
294 } else {
295 /* ./compiling//compiling.nit:47 */
296 goto label15;
297 }
298 CALL_abstract_collection___Iterator___next(fra.me.REG[4])(fra.me.REG[4]);
299 }
300 label15: while(0);
301 /* ./compiling//compiling.nit:59 */
302 if (!once_value_16) {
303 fra.me.REG[4] = BOX_NativeString("Generating main, tables and makefile ...");
304 REGB0 = TAG_Int(40);
305 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
306 once_value_16 = fra.me.REG[4];
307 register_static_object(&once_value_16);
308 } else fra.me.REG[4] = once_value_16;
309 REGB0 = TAG_Int(1);
310 CALL_mmloader___ToolContext___info(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4], REGB0);
311 REGB0 = TAG_Int(5);
312 fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB0);
313 /* ./compiling//compiling.nit:60 */
314 if (!once_value_17) {
315 fra.me.REG[6] = BOX_NativeString("");
316 REGB0 = TAG_Int(0);
317 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
318 once_value_17 = fra.me.REG[6];
319 register_static_object(&once_value_17);
320 } else fra.me.REG[6] = once_value_17;
321 array___Array___add(fra.me.REG[4], fra.me.REG[6]);
322 fra.me.REG[6] = CALL_compiling_base___ToolContext___compdir(fra.me.REG[1])(fra.me.REG[1]);
323 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
324 array___Array___add(fra.me.REG[4], fra.me.REG[6]);
325 if (!once_value_18) {
326 fra.me.REG[6] = BOX_NativeString("/");
327 REGB0 = TAG_Int(1);
328 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
329 once_value_18 = fra.me.REG[6];
330 register_static_object(&once_value_18);
331 } else fra.me.REG[6] = once_value_18;
332 array___Array___add(fra.me.REG[4], fra.me.REG[6]);
333 fra.me.REG[6] = CALL_program___Program___module(fra.me.REG[0])(fra.me.REG[0]);
334 fra.me.REG[6] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[6])(fra.me.REG[6]);
335 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
336 array___Array___add(fra.me.REG[4], fra.me.REG[6]);
337 if (!once_value_19) {
338 fra.me.REG[6] = BOX_NativeString("._tables.c");
339 REGB0 = TAG_Int(10);
340 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
341 once_value_19 = fra.me.REG[6];
342 register_static_object(&once_value_19);
343 } else fra.me.REG[6] = once_value_19;
344 array___Array___add(fra.me.REG[4], fra.me.REG[6]);
345 fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
346 array___Array___add(fra.me.REG[2], fra.me.REG[4]);
347 /* ./compiling//compiling.nit:61 */
348 CALL_compiling___Program___compile_main(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
349 REGB0 = TAG_Int(5);
350 fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB0);
351 /* ./compiling//compiling.nit:63 */
352 if (!once_value_20) {
353 fra.me.REG[6] = BOX_NativeString("");
354 REGB0 = TAG_Int(0);
355 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
356 once_value_20 = fra.me.REG[6];
357 register_static_object(&once_value_20);
358 } else fra.me.REG[6] = once_value_20;
359 array___Array___add(fra.me.REG[4], fra.me.REG[6]);
360 fra.me.REG[6] = CALL_compiling_base___ToolContext___compdir(fra.me.REG[1])(fra.me.REG[1]);
361 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
362 array___Array___add(fra.me.REG[4], fra.me.REG[6]);
363 if (!once_value_21) {
364 fra.me.REG[6] = BOX_NativeString("/");
365 REGB0 = TAG_Int(1);
366 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
367 once_value_21 = fra.me.REG[6];
368 register_static_object(&once_value_21);
369 } else fra.me.REG[6] = once_value_21;
370 array___Array___add(fra.me.REG[4], fra.me.REG[6]);
371 fra.me.REG[6] = CALL_program___Program___module(fra.me.REG[0])(fra.me.REG[0]);
372 fra.me.REG[6] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[6])(fra.me.REG[6]);
373 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
374 array___Array___add(fra.me.REG[4], fra.me.REG[6]);
375 if (!once_value_22) {
376 fra.me.REG[6] = BOX_NativeString("._build.sh");
377 REGB0 = TAG_Int(10);
378 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
379 once_value_22 = fra.me.REG[6];
380 register_static_object(&once_value_22);
381 } else fra.me.REG[6] = once_value_22;
382 array___Array___add(fra.me.REG[4], fra.me.REG[6]);
383 fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
384 fra.me.REG[6] = NEW_OFStream_file___OFStream___open(fra.me.REG[4]);
385 /* ./compiling//compiling.nit:65 */
386 if (!once_value_23) {
387 fra.me.REG[5] = BOX_NativeString("");
388 REGB0 = TAG_Int(0);
389 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
390 once_value_23 = fra.me.REG[5];
391 register_static_object(&once_value_23);
392 } else fra.me.REG[5] = once_value_23;
393 REGB0 = CALL_mmloader___ToolContext___verbose_level(fra.me.REG[1])(fra.me.REG[1]);
394 REGB1 = TAG_Int(0);
395 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
396 /* ./compiling//compiling.nit:67 */
397 if (UNTAG_Bool(REGB1)) {
398 /* ./compiling//compiling.nit:68 */
399 if (!once_value_24) {
400 fra.me.REG[7] = BOX_NativeString("-");
401 REGB1 = TAG_Int(1);
402 fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB1);
403 once_value_24 = fra.me.REG[7];
404 register_static_object(&once_value_24);
405 } else fra.me.REG[7] = once_value_24;
406 fra.me.REG[5] = fra.me.REG[7];
407 REGB1 = TAG_Int(1);
408 REGB0 = CALL_mmloader___ToolContext___verbose_level(fra.me.REG[1])(fra.me.REG[1]);
409 fra.me.REG[7] = NEW_Range_range___Range___init(REGB1, REGB0);
410 fra.me.REG[7] = CALL_abstract_collection___Collection___iterator(fra.me.REG[7])(fra.me.REG[7]);
411 /* ./compiling//compiling.nit:69 */
412 while(1) {
413 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[7])(fra.me.REG[7]);
414 if (UNTAG_Bool(REGB0)) {
415 REGB0 = CALL_abstract_collection___Iterator___item(fra.me.REG[7])(fra.me.REG[7]);
416 if (!once_value_25) {
417 fra.me.REG[8] = BOX_NativeString("v");
418 REGB0 = TAG_Int(1);
419 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
420 once_value_25 = fra.me.REG[8];
421 register_static_object(&once_value_25);
422 } else fra.me.REG[8] = once_value_25;
423 fra.me.REG[8] = CALL_string___String_____plus(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[8]);
424 fra.me.REG[5] = fra.me.REG[8];
425 } else {
426 goto label26;
427 }
428 CALL_abstract_collection___Iterator___next(fra.me.REG[7])(fra.me.REG[7]);
429 }
430 label26: while(0);
431 }
432 /* ./compiling//compiling.nit:72 */
433 if (!once_value_27) {
434 fra.me.REG[7] = BOX_NativeString("#!/bin/sh\n");
435 REGB0 = TAG_Int(10);
436 fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB0);
437 once_value_27 = fra.me.REG[7];
438 register_static_object(&once_value_27);
439 } else fra.me.REG[7] = once_value_27;
440 CALL_stream___OStream___write(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
441 REGB0 = TAG_Int(3);
442 fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
443 /* ./compiling//compiling.nit:73 */
444 if (!once_value_28) {
445 fra.me.REG[8] = BOX_NativeString("# This shell script is generated by NIT to compile the program ");
446 REGB0 = TAG_Int(63);
447 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
448 once_value_28 = fra.me.REG[8];
449 register_static_object(&once_value_28);
450 } else fra.me.REG[8] = once_value_28;
451 array___Array___add(fra.me.REG[7], fra.me.REG[8]);
452 fra.me.REG[8] = CALL_program___Program___module(fra.me.REG[0])(fra.me.REG[0]);
453 fra.me.REG[8] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[8])(fra.me.REG[8]);
454 fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[8])(fra.me.REG[8]);
455 array___Array___add(fra.me.REG[7], fra.me.REG[8]);
456 if (!once_value_29) {
457 fra.me.REG[8] = BOX_NativeString(".\n");
458 REGB0 = TAG_Int(2);
459 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
460 once_value_29 = fra.me.REG[8];
461 register_static_object(&once_value_29);
462 } else fra.me.REG[8] = once_value_29;
463 array___Array___add(fra.me.REG[7], fra.me.REG[8]);
464 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
465 CALL_stream___OStream___write(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
466 REGB0 = TAG_Int(3);
467 fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
468 /* ./compiling//compiling.nit:74 */
469 if (!once_value_30) {
470 fra.me.REG[8] = BOX_NativeString("CLIBDIR=\"");
471 REGB0 = TAG_Int(9);
472 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
473 once_value_30 = fra.me.REG[8];
474 register_static_object(&once_value_30);
475 } else fra.me.REG[8] = once_value_30;
476 array___Array___add(fra.me.REG[7], fra.me.REG[8]);
477 fra.me.REG[8] = CALL_compiling_base___ToolContext___clibdir(fra.me.REG[1])(fra.me.REG[1]);
478 fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[8])(fra.me.REG[8]);
479 array___Array___add(fra.me.REG[7], fra.me.REG[8]);
480 if (!once_value_31) {
481 fra.me.REG[8] = BOX_NativeString("\"\n");
482 REGB0 = TAG_Int(2);
483 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
484 once_value_31 = fra.me.REG[8];
485 register_static_object(&once_value_31);
486 } else fra.me.REG[8] = once_value_31;
487 array___Array___add(fra.me.REG[7], fra.me.REG[8]);
488 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
489 CALL_stream___OStream___write(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
490 REGB0 = TAG_Int(9);
491 fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
492 /* ./compiling//compiling.nit:75 */
493 if (!once_value_32) {
494 fra.me.REG[8] = BOX_NativeString("");
495 REGB0 = TAG_Int(0);
496 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
497 once_value_32 = fra.me.REG[8];
498 register_static_object(&once_value_32);
499 } else fra.me.REG[8] = once_value_32;
500 array___Array___add(fra.me.REG[7], fra.me.REG[8]);
501 fra.me.REG[8] = CALL_compiling_base___ToolContext___bindir(fra.me.REG[1])(fra.me.REG[1]);
502 fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[8])(fra.me.REG[8]);
503 array___Array___add(fra.me.REG[7], fra.me.REG[8]);
504 if (!once_value_33) {
505 fra.me.REG[8] = BOX_NativeString("/gccx ");
506 REGB0 = TAG_Int(6);
507 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
508 once_value_33 = fra.me.REG[8];
509 register_static_object(&once_value_33);
510 } else fra.me.REG[8] = once_value_33;
511 array___Array___add(fra.me.REG[7], fra.me.REG[8]);
512 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
513 if (!once_value_34) {
514 fra.me.REG[5] = BOX_NativeString(" -d ");
515 REGB0 = TAG_Int(4);
516 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
517 once_value_34 = fra.me.REG[5];
518 register_static_object(&once_value_34);
519 } else fra.me.REG[5] = once_value_34;
520 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
521 fra.me.REG[5] = CALL_compiling_base___ToolContext___compdir(fra.me.REG[1])(fra.me.REG[1]);
522 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
523 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
524 if (!once_value_35) {
525 fra.me.REG[5] = BOX_NativeString(" -I $CLIBDIR ");
526 REGB0 = TAG_Int(13);
527 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
528 once_value_35 = fra.me.REG[5];
529 register_static_object(&once_value_35);
530 } else fra.me.REG[5] = once_value_35;
531 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
532 if (!once_value_36) {
533 fra.me.REG[5] = BOX_NativeString(" ");
534 REGB0 = TAG_Int(1);
535 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
536 once_value_36 = fra.me.REG[5];
537 register_static_object(&once_value_36);
538 } else fra.me.REG[5] = once_value_36;
539 fra.me.REG[5] = CALL_string___Collection___join(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
540 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
541 if (!once_value_37) {
542 fra.me.REG[5] = BOX_NativeString("");
543 REGB0 = TAG_Int(0);
544 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
545 once_value_37 = fra.me.REG[5];
546 register_static_object(&once_value_37);
547 } else fra.me.REG[5] = once_value_37;
548 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
549 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
550 CALL_stream___OStream___write(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
551 fra.me.REG[7] = CALL_compiling_base___ToolContext___output_file(fra.me.REG[1])(fra.me.REG[1]);
552 REGB0 = TAG_Bool(fra.me.REG[7]==NIT_NULL);
553 /* ./compiling//compiling.nit:76 */
554 if (UNTAG_Bool(REGB0)) {
555 } else {
556 REGB1 = TAG_Bool(fra.me.REG[7]==NIT_NULL);
557 if (UNTAG_Bool(REGB1)) {
558 REGB1 = TAG_Bool(false);
559 REGB0 = REGB1;
560 } else {
561 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[7])(fra.me.REG[7], NIT_NULL);
562 REGB0 = REGB1;
563 }
564 }
565 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
566 if (UNTAG_Bool(REGB0)) {
567 REGB0 = TAG_Int(3);
568 fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
569 /* ./compiling//compiling.nit:77 */
570 if (!once_value_38) {
571 fra.me.REG[5] = BOX_NativeString(" -o ");
572 REGB0 = TAG_Int(4);
573 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
574 once_value_38 = fra.me.REG[5];
575 register_static_object(&once_value_38);
576 } else fra.me.REG[5] = once_value_38;
577 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
578 fra.me.REG[5] = CALL_compiling_base___ToolContext___output_file(fra.me.REG[1])(fra.me.REG[1]);
579 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
580 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
581 if (!once_value_39) {
582 fra.me.REG[5] = BOX_NativeString("");
583 REGB0 = TAG_Int(0);
584 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
585 once_value_39 = fra.me.REG[5];
586 register_static_object(&once_value_39);
587 } else fra.me.REG[5] = once_value_39;
588 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
589 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
590 CALL_stream___OStream___write(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
591 } else {
592 fra.me.REG[7] = CALL_compiling_base___ToolContext___ext_prefix(fra.me.REG[1])(fra.me.REG[1]);
593 REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[7])(fra.me.REG[7]);
594 /* ./compiling//compiling.nit:78 */
595 if (UNTAG_Bool(REGB0)) {
596 REGB0 = TAG_Int(3);
597 fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
598 /* ./compiling//compiling.nit:79 */
599 if (!once_value_40) {
600 fra.me.REG[5] = BOX_NativeString(" -o ");
601 REGB0 = TAG_Int(4);
602 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
603 once_value_40 = fra.me.REG[5];
604 register_static_object(&once_value_40);
605 } else fra.me.REG[5] = once_value_40;
606 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
607 fra.me.REG[5] = CALL_program___Program___module(fra.me.REG[0])(fra.me.REG[0]);
608 fra.me.REG[5] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[5])(fra.me.REG[5]);
609 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
610 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
611 if (!once_value_41) {
612 fra.me.REG[5] = BOX_NativeString("");
613 REGB0 = TAG_Int(0);
614 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
615 once_value_41 = fra.me.REG[5];
616 register_static_object(&once_value_41);
617 } else fra.me.REG[5] = once_value_41;
618 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
619 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
620 CALL_stream___OStream___write(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
621 } else {
622 REGB0 = TAG_Int(5);
623 fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
624 /* ./compiling//compiling.nit:81 */
625 if (!once_value_42) {
626 fra.me.REG[5] = BOX_NativeString(" -o ");
627 REGB0 = TAG_Int(4);
628 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
629 once_value_42 = fra.me.REG[5];
630 register_static_object(&once_value_42);
631 } else fra.me.REG[5] = once_value_42;
632 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
633 fra.me.REG[5] = CALL_program___Program___module(fra.me.REG[0])(fra.me.REG[0]);
634 fra.me.REG[5] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[5])(fra.me.REG[5]);
635 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
636 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
637 if (!once_value_43) {
638 fra.me.REG[5] = BOX_NativeString("_");
639 REGB0 = TAG_Int(1);
640 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
641 once_value_43 = fra.me.REG[5];
642 register_static_object(&once_value_43);
643 } else fra.me.REG[5] = once_value_43;
644 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
645 fra.me.REG[5] = CALL_compiling_base___ToolContext___ext_prefix(fra.me.REG[1])(fra.me.REG[1]);
646 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
647 if (!once_value_44) {
648 fra.me.REG[5] = BOX_NativeString("");
649 REGB0 = TAG_Int(0);
650 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
651 once_value_44 = fra.me.REG[5];
652 register_static_object(&once_value_44);
653 } else fra.me.REG[5] = once_value_44;
654 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
655 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
656 CALL_stream___OStream___write(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
657 }
658 }
659 REGB0 = CALL_compiling_base___ToolContext___boost(fra.me.REG[1])(fra.me.REG[1]);
660 /* ./compiling//compiling.nit:83 */
661 if (UNTAG_Bool(REGB0)) {
662 if (!once_value_45) {
663 fra.me.REG[7] = BOX_NativeString(" -O");
664 REGB0 = TAG_Int(3);
665 fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB0);
666 once_value_45 = fra.me.REG[7];
667 register_static_object(&once_value_45);
668 } else fra.me.REG[7] = once_value_45;
669 CALL_stream___OStream___write(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
670 }
671 REGB0 = TAG_Int(3);
672 fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
673 /* ./compiling//compiling.nit:84 */
674 if (!once_value_46) {
675 fra.me.REG[5] = BOX_NativeString(" \"$@\" \\\n ");
676 REGB0 = TAG_Int(10);
677 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
678 once_value_46 = fra.me.REG[5];
679 register_static_object(&once_value_46);
680 } else fra.me.REG[5] = once_value_46;
681 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
682 if (!once_value_47) {
683 fra.me.REG[5] = BOX_NativeString("\\\n ");
684 REGB0 = TAG_Int(4);
685 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
686 once_value_47 = fra.me.REG[5];
687 register_static_object(&once_value_47);
688 } else fra.me.REG[5] = once_value_47;
689 fra.me.REG[5] = CALL_string___Collection___join(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[5]);
690 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
691 if (!once_value_48) {
692 fra.me.REG[5] = BOX_NativeString("\n");
693 REGB0 = TAG_Int(1);
694 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
695 once_value_48 = fra.me.REG[5];
696 register_static_object(&once_value_48);
697 } else fra.me.REG[5] = once_value_48;
698 array___Array___add(fra.me.REG[7], fra.me.REG[5]);
699 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
700 CALL_stream___OStream___write(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
701 /* ./compiling//compiling.nit:85 */
702 CALL_stream___IOS___close(fra.me.REG[6])(fra.me.REG[6]);
703 REGB0 = CALL_compiling_base___ToolContext___no_cc(fra.me.REG[1])(fra.me.REG[1]);
704 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
705 /* ./compiling//compiling.nit:87 */
706 if (UNTAG_Bool(REGB0)) {
707 /* ./compiling//compiling.nit:88 */
708 if (!once_value_49) {
709 fra.me.REG[6] = BOX_NativeString("Building");
710 REGB0 = TAG_Int(8);
711 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
712 once_value_49 = fra.me.REG[6];
713 register_static_object(&once_value_49);
714 } else fra.me.REG[6] = once_value_49;
715 REGB0 = TAG_Int(1);
716 CALL_mmloader___ToolContext___info(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[6], REGB0);
717 fra.me.REG[0] = CALL_kernel___Object___sys(fra.me.REG[0])(fra.me.REG[0]);
718 REGB0 = TAG_Int(3);
719 fra.me.REG[6] = NEW_Array_array___Array___with_capacity(REGB0);
720 /* ./compiling//compiling.nit:89 */
721 if (!once_value_50) {
722 fra.me.REG[1] = BOX_NativeString("sh ");
723 REGB0 = TAG_Int(3);
724 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
725 once_value_50 = fra.me.REG[1];
726 register_static_object(&once_value_50);
727 } else fra.me.REG[1] = once_value_50;
728 array___Array___add(fra.me.REG[6], fra.me.REG[1]);
729 array___Array___add(fra.me.REG[6], fra.me.REG[4]);
730 if (!once_value_51) {
731 fra.me.REG[4] = BOX_NativeString("");
732 REGB0 = TAG_Int(0);
733 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
734 once_value_51 = fra.me.REG[4];
735 register_static_object(&once_value_51);
736 } else fra.me.REG[4] = once_value_51;
737 array___Array___add(fra.me.REG[6], fra.me.REG[4]);
738 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
739 CALL_exec___Sys___system(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[6]);
740 }
741 stack_frame_head = fra.me.prev;
742 return;
743 }
744 void compiling___Program___compile_main(val_t p0, val_t p1){
745 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
746 val_t REGB0;
747 val_t tmp;
748 static val_t once_value_1; /* Once value */
749 static val_t once_value_2; /* Once value */
750 static val_t once_value_3; /* Once value */
751 static val_t once_value_4; /* Once value */
752 static val_t once_value_5; /* Once value */
753 static val_t once_value_6; /* Once value */
754 static val_t once_value_7; /* Once value */
755 static val_t once_value_8; /* Once value */
756 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
757 fra.me.file = LOCATE_compiling;
758 fra.me.line = 93;
759 fra.me.meth = LOCATE_compiling___Program___compile_main;
760 fra.me.has_broke = 0;
761 fra.me.REG_size = 6;
762 fra.me.REG[0] = NIT_NULL;
763 fra.me.REG[1] = NIT_NULL;
764 fra.me.REG[2] = NIT_NULL;
765 fra.me.REG[3] = NIT_NULL;
766 fra.me.REG[4] = NIT_NULL;
767 fra.me.REG[5] = NIT_NULL;
768 fra.me.REG[0] = p0;
769 fra.me.REG[1] = p1;
770 fra.me.REG[2] = CALL_program___Program___module(fra.me.REG[0])(fra.me.REG[0]);
771 fra.me.REG[2] = NEW_GlobalCompilerVisitor_compiling_global___GlobalCompilerVisitor___init(fra.me.REG[2], fra.me.REG[1], fra.me.REG[0]);
772 REGB0 = TAG_Int(0);
773 fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
774 /* ./compiling//compiling.nit:97 */
775 if (!once_value_1) {
776 fra.me.REG[4] = BOX_NativeString("#include <nit_common.h>");
777 REGB0 = TAG_Int(23);
778 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
779 once_value_1 = fra.me.REG[4];
780 register_static_object(&once_value_1);
781 } else fra.me.REG[4] = once_value_1;
782 array___Array___add(fra.me.REG[3], fra.me.REG[4]);
783 CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
784 /* ./compiling//compiling.nit:98 */
785 CALL_compiling_global___Program___compile_tables_to_c(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
786 /* ./compiling//compiling.nit:99 */
787 CALL_compiling_global___Program___compile_main_part(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
788 REGB0 = TAG_Int(5);
789 fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
790 /* ./compiling//compiling.nit:100 */
791 if (!once_value_2) {
792 fra.me.REG[4] = BOX_NativeString("");
793 REGB0 = TAG_Int(0);
794 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
795 once_value_2 = fra.me.REG[4];
796 register_static_object(&once_value_2);
797 } else fra.me.REG[4] = once_value_2;
798 array___Array___add(fra.me.REG[3], fra.me.REG[4]);
799 fra.me.REG[1] = CALL_compiling_base___ToolContext___compdir(fra.me.REG[1])(fra.me.REG[1]);
800 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
801 array___Array___add(fra.me.REG[3], fra.me.REG[1]);
802 if (!once_value_3) {
803 fra.me.REG[1] = BOX_NativeString("/");
804 REGB0 = TAG_Int(1);
805 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
806 once_value_3 = fra.me.REG[1];
807 register_static_object(&once_value_3);
808 } else fra.me.REG[1] = once_value_3;
809 array___Array___add(fra.me.REG[3], fra.me.REG[1]);
810 fra.me.REG[1] = CALL_program___Program___module(fra.me.REG[0])(fra.me.REG[0]);
811 fra.me.REG[1] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[1])(fra.me.REG[1]);
812 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
813 array___Array___add(fra.me.REG[3], fra.me.REG[1]);
814 if (!once_value_4) {
815 fra.me.REG[1] = BOX_NativeString("._tables.c");
816 REGB0 = TAG_Int(10);
817 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
818 once_value_4 = fra.me.REG[1];
819 register_static_object(&once_value_4);
820 } else fra.me.REG[1] = once_value_4;
821 array___Array___add(fra.me.REG[3], fra.me.REG[1]);
822 fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
823 fra.me.REG[3] = NEW_OFStream_file___OFStream___open(fra.me.REG[3]);
824 REGB0 = TAG_Int(3);
825 fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB0);
826 /* ./compiling//compiling.nit:101 */
827 if (!once_value_5) {
828 fra.me.REG[4] = BOX_NativeString("/* This C file is generated by NIT to compile program ");
829 REGB0 = TAG_Int(54);
830 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
831 once_value_5 = fra.me.REG[4];
832 register_static_object(&once_value_5);
833 } else fra.me.REG[4] = once_value_5;
834 array___Array___add(fra.me.REG[1], fra.me.REG[4]);
835 fra.me.REG[4] = CALL_program___Program___module(fra.me.REG[0])(fra.me.REG[0]);
836 fra.me.REG[4] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[4])(fra.me.REG[4]);
837 fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
838 array___Array___add(fra.me.REG[1], fra.me.REG[4]);
839 if (!once_value_6) {
840 fra.me.REG[4] = BOX_NativeString(". */\n");
841 REGB0 = TAG_Int(5);
842 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
843 once_value_6 = fra.me.REG[4];
844 register_static_object(&once_value_6);
845 } else fra.me.REG[4] = once_value_6;
846 array___Array___add(fra.me.REG[1], fra.me.REG[4]);
847 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
848 CALL_stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
849 fra.me.REG[0] = CALL_program___Program___module(fra.me.REG[0])(fra.me.REG[0]);
850 fra.me.REG[0] = CALL_abstractmetamodel___MMModule___mhe(fra.me.REG[0])(fra.me.REG[0]);
851 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
852 /* ./compiling//compiling.nit:102 */
853 if (UNTAG_Bool(REGB0)) {
854 fprintf(stderr, "Reciever is null");
855 fprintf(stderr, " (%s:%d)\n", LOCATE_compiling, 102);
856 nit_exit(1);
857 }
858 fra.me.REG[0] = CALL_partial_order___PartialOrderElement___greaters_and_self(fra.me.REG[0])(fra.me.REG[0]);
859 fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]);
860 while(1) {
861 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]);
862 if (UNTAG_Bool(REGB0)) {
863 fra.me.REG[1] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]);
864 REGB0 = TAG_Int(3);
865 fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB0);
866 /* ./compiling//compiling.nit:103 */
867 if (!once_value_7) {
868 fra.me.REG[5] = BOX_NativeString("#include \"");
869 REGB0 = TAG_Int(10);
870 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
871 once_value_7 = fra.me.REG[5];
872 register_static_object(&once_value_7);
873 } else fra.me.REG[5] = once_value_7;
874 array___Array___add(fra.me.REG[4], fra.me.REG[5]);
875 fra.me.REG[1] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[1])(fra.me.REG[1]);
876 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
877 array___Array___add(fra.me.REG[4], fra.me.REG[1]);
878 if (!once_value_8) {
879 fra.me.REG[1] = BOX_NativeString("._sep.h\"\n");
880 REGB0 = TAG_Int(9);
881 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
882 once_value_8 = fra.me.REG[1];
883 register_static_object(&once_value_8);
884 } else fra.me.REG[1] = once_value_8;
885 array___Array___add(fra.me.REG[4], fra.me.REG[1]);
886 fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
887 CALL_stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
888 } else {
889 /* ./compiling//compiling.nit:102 */
890 goto label9;
891 }
892 CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
893 }
894 label9: while(0);
895 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
896 /* ./compiling//compiling.nit:105 */
897 CALL_stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
898 /* ./compiling//compiling.nit:106 */
899 CALL_stream___IOS___close(fra.me.REG[3])(fra.me.REG[3]);
900 stack_frame_head = fra.me.prev;
901 return;
902 }
903 void compiling___MMModule___compile_separate_module(val_t p0, val_t p1, val_t p2){
904 struct {struct stack_frame_t me; val_t MORE_REG[7];} fra;
905 val_t REGB0;
906 val_t tmp;
907 static val_t once_value_1; /* Once value */
908 static val_t once_value_2; /* Once value */
909 static val_t once_value_3; /* Once value */
910 static val_t once_value_4; /* Once value */
911 static val_t once_value_5; /* Once value */
912 static val_t once_value_6; /* Once value */
913 static val_t once_value_7; /* Once value */
914 static val_t once_value_8; /* Once value */
915 static val_t once_value_9; /* Once value */
916 static val_t once_value_10; /* Once value */
917 static val_t once_value_11; /* Once value */
918 static val_t once_value_12; /* Once value */
919 static val_t once_value_13; /* Once value */
920 static val_t once_value_14; /* Once value */
921 static val_t once_value_15; /* Once value */
922 static val_t once_value_16; /* Once value */
923 static val_t once_value_17; /* Once value */
924 static val_t once_value_20; /* Once value */
925 static val_t once_value_21; /* Once value */
926 static val_t once_value_22; /* Once value */
927 static val_t once_value_23; /* Once value */
928 static val_t once_value_24; /* Once value */
929 static val_t once_value_25; /* Once value */
930 static val_t once_value_26; /* Once value */
931 static val_t once_value_27; /* Once value */
932 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
933 fra.me.file = LOCATE_compiling;
934 fra.me.line = 111;
935 fra.me.meth = LOCATE_compiling___MMModule___compile_separate_module;
936 fra.me.has_broke = 0;
937 fra.me.REG_size = 8;
938 fra.me.REG[0] = NIT_NULL;
939 fra.me.REG[1] = NIT_NULL;
940 fra.me.REG[2] = NIT_NULL;
941 fra.me.REG[3] = NIT_NULL;
942 fra.me.REG[4] = NIT_NULL;
943 fra.me.REG[5] = NIT_NULL;
944 fra.me.REG[6] = NIT_NULL;
945 fra.me.REG[7] = NIT_NULL;
946 fra.me.REG[0] = p0;
947 fra.me.REG[1] = p1;
948 fra.me.REG[2] = p2;
949 fra.me.REG[2] = NEW_GlobalCompilerVisitor_compiling_global___GlobalCompilerVisitor___init(fra.me.REG[0], fra.me.REG[1], fra.me.REG[2]);
950 REGB0 = TAG_Int(0);
951 fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
952 /* ./compiling//compiling.nit:115 */
953 if (!once_value_1) {
954 fra.me.REG[4] = BOX_NativeString("#include <nit_common.h>");
955 REGB0 = TAG_Int(23);
956 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
957 once_value_1 = fra.me.REG[4];
958 register_static_object(&once_value_1);
959 } else fra.me.REG[4] = once_value_1;
960 array___Array___add(fra.me.REG[3], fra.me.REG[4]);
961 CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
962 fra.me.REG[3] = CALL_abstractmetamodel___MMModule___location(fra.me.REG[0])(fra.me.REG[0]);
963 fra.me.REG[3] = CALL_location___Location___file(fra.me.REG[3])(fra.me.REG[3]);
964 /* ./compiling//compiling.nit:116 */
965 if (!once_value_2) {
966 fra.me.REG[4] = BOX_NativeString(".nit");
967 REGB0 = TAG_Int(4);
968 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
969 once_value_2 = fra.me.REG[4];
970 register_static_object(&once_value_2);
971 } else fra.me.REG[4] = once_value_2;
972 fra.me.REG[4] = CALL_file___String___strip_extension(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
973 /* ./compiling//compiling.nit:117 */
974 if (!once_value_3) {
975 fra.me.REG[3] = BOX_NativeString("_nit.h");
976 REGB0 = TAG_Int(6);
977 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
978 once_value_3 = fra.me.REG[3];
979 register_static_object(&once_value_3);
980 } else fra.me.REG[3] = once_value_3;
981 fra.me.REG[3] = CALL_string___String_____plus(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
982 fra.me.REG[4] = fra.me.REG[3];
983 REGB0 = CALL_file___String___file_exists(fra.me.REG[4])(fra.me.REG[4]);
984 /* ./compiling//compiling.nit:118 */
985 if (UNTAG_Bool(REGB0)) {
986 REGB0 = TAG_Int(0);
987 fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
988 REGB0 = TAG_Int(3);
989 fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB0);
990 if (!once_value_4) {
991 fra.me.REG[6] = BOX_NativeString("#include <");
992 REGB0 = TAG_Int(10);
993 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
994 once_value_4 = fra.me.REG[6];
995 register_static_object(&once_value_4);
996 } else fra.me.REG[6] = once_value_4;
997 array___Array___add(fra.me.REG[5], fra.me.REG[6]);
998 if (!once_value_5) {
999 fra.me.REG[6] = BOX_NativeString("");
1000 REGB0 = TAG_Int(0);
1001 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
1002 once_value_5 = fra.me.REG[6];
1003 register_static_object(&once_value_5);
1004 } else fra.me.REG[6] = once_value_5;
1005 fra.me.REG[6] = CALL_file___String___basename(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[6]);
1006 array___Array___add(fra.me.REG[5], fra.me.REG[6]);
1007 if (!once_value_6) {
1008 fra.me.REG[6] = BOX_NativeString(">");
1009 REGB0 = TAG_Int(1);
1010 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
1011 once_value_6 = fra.me.REG[6];
1012 register_static_object(&once_value_6);
1013 } else fra.me.REG[6] = once_value_6;
1014 array___Array___add(fra.me.REG[5], fra.me.REG[6]);
1015 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
1016 array___Array___add(fra.me.REG[3], fra.me.REG[5]);
1017 CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
1018 }
1019 /* ./compiling//compiling.nit:119 */
1020 CALL_compiling_global___MMModule___declare_class_tables_to_c(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
1021 /* ./compiling//compiling.nit:120 */
1022 CALL_compiling_global___MMModule___compile_mod_to_c(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
1023 REGB0 = TAG_Int(5);
1024 fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
1025 /* ./compiling//compiling.nit:121 */
1026 if (!once_value_7) {
1027 fra.me.REG[5] = BOX_NativeString("");
1028 REGB0 = TAG_Int(0);
1029 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
1030 once_value_7 = fra.me.REG[5];
1031 register_static_object(&once_value_7);
1032 } else fra.me.REG[5] = once_value_7;
1033 array___Array___add(fra.me.REG[3], fra.me.REG[5]);
1034 fra.me.REG[5] = CALL_compiling_base___ToolContext___compdir(fra.me.REG[1])(fra.me.REG[1]);
1035 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
1036 array___Array___add(fra.me.REG[3], fra.me.REG[5]);
1037 if (!once_value_8) {
1038 fra.me.REG[5] = BOX_NativeString("/");
1039 REGB0 = TAG_Int(1);
1040 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
1041 once_value_8 = fra.me.REG[5];
1042 register_static_object(&once_value_8);
1043 } else fra.me.REG[5] = once_value_8;
1044 array___Array___add(fra.me.REG[3], fra.me.REG[5]);
1045 fra.me.REG[5] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
1046 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
1047 array___Array___add(fra.me.REG[3], fra.me.REG[5]);
1048 if (!once_value_9) {
1049 fra.me.REG[5] = BOX_NativeString("._sep.h");
1050 REGB0 = TAG_Int(7);
1051 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
1052 once_value_9 = fra.me.REG[5];
1053 register_static_object(&once_value_9);
1054 } else fra.me.REG[5] = once_value_9;
1055 array___Array___add(fra.me.REG[3], fra.me.REG[5]);
1056 fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
1057 fra.me.REG[3] = NEW_OFStream_file___OFStream___open(fra.me.REG[3]);
1058 REGB0 = TAG_Int(3);
1059 fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB0);
1060 /* ./compiling//compiling.nit:122 */
1061 if (!once_value_10) {
1062 fra.me.REG[6] = BOX_NativeString("/* This C header file is generated by NIT to compile modules and programs that requires ");
1063 REGB0 = TAG_Int(88);
1064 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
1065 once_value_10 = fra.me.REG[6];
1066 register_static_object(&once_value_10);
1067 } else fra.me.REG[6] = once_value_10;
1068 array___Array___add(fra.me.REG[5], fra.me.REG[6]);
1069 fra.me.REG[6] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
1070 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
1071 array___Array___add(fra.me.REG[5], fra.me.REG[6]);
1072 if (!once_value_11) {
1073 fra.me.REG[6] = BOX_NativeString(". */\n");
1074 REGB0 = TAG_Int(5);
1075 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
1076 once_value_11 = fra.me.REG[6];
1077 register_static_object(&once_value_11);
1078 } else fra.me.REG[6] = once_value_11;
1079 array___Array___add(fra.me.REG[5], fra.me.REG[6]);
1080 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
1081 CALL_stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
1082 REGB0 = TAG_Int(3);
1083 fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB0);
1084 /* ./compiling//compiling.nit:123 */
1085 if (!once_value_12) {
1086 fra.me.REG[6] = BOX_NativeString("#ifndef ");
1087 REGB0 = TAG_Int(8);
1088 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
1089 once_value_12 = fra.me.REG[6];
1090 register_static_object(&once_value_12);
1091 } else fra.me.REG[6] = once_value_12;
1092 array___Array___add(fra.me.REG[5], fra.me.REG[6]);
1093 fra.me.REG[6] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
1094 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
1095 array___Array___add(fra.me.REG[5], fra.me.REG[6]);
1096 if (!once_value_13) {
1097 fra.me.REG[6] = BOX_NativeString("_sep\n");
1098 REGB0 = TAG_Int(5);
1099 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
1100 once_value_13 = fra.me.REG[6];
1101 register_static_object(&once_value_13);
1102 } else fra.me.REG[6] = once_value_13;
1103 array___Array___add(fra.me.REG[5], fra.me.REG[6]);
1104 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
1105 CALL_stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
1106 REGB0 = TAG_Int(3);
1107 fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB0);
1108 /* ./compiling//compiling.nit:124 */
1109 if (!once_value_14) {
1110 fra.me.REG[6] = BOX_NativeString("#define ");
1111 REGB0 = TAG_Int(8);
1112 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
1113 once_value_14 = fra.me.REG[6];
1114 register_static_object(&once_value_14);
1115 } else fra.me.REG[6] = once_value_14;
1116 array___Array___add(fra.me.REG[5], fra.me.REG[6]);
1117 fra.me.REG[6] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
1118 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
1119 array___Array___add(fra.me.REG[5], fra.me.REG[6]);
1120 if (!once_value_15) {
1121 fra.me.REG[6] = BOX_NativeString("_sep\n");
1122 REGB0 = TAG_Int(5);
1123 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
1124 once_value_15 = fra.me.REG[6];
1125 register_static_object(&once_value_15);
1126 } else fra.me.REG[6] = once_value_15;
1127 array___Array___add(fra.me.REG[5], fra.me.REG[6]);
1128 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
1129 CALL_stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
1130 fra.me.REG[5] = CALL_abstractmetamodel___MMModule___mhe(fra.me.REG[0])(fra.me.REG[0]);
1131 REGB0 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
1132 /* ./compiling//compiling.nit:125 */
1133 if (UNTAG_Bool(REGB0)) {
1134 fprintf(stderr, "Reciever is null");
1135 fprintf(stderr, " (%s:%d)\n", LOCATE_compiling, 125);
1136 nit_exit(1);
1137 }
1138 fra.me.REG[5] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[5])(fra.me.REG[5]);
1139 fra.me.REG[5] = CALL_abstract_collection___Collection___iterator(fra.me.REG[5])(fra.me.REG[5]);
1140 while(1) {
1141 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[5])(fra.me.REG[5]);
1142 if (UNTAG_Bool(REGB0)) {
1143 fra.me.REG[6] = CALL_abstract_collection___Iterator___item(fra.me.REG[5])(fra.me.REG[5]);
1144 REGB0 = TAG_Int(3);
1145 fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB0);
1146 if (!once_value_16) {
1147 fra.me.REG[7] = BOX_NativeString("#include \"");
1148 REGB0 = TAG_Int(10);
1149 fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB0);
1150 once_value_16 = fra.me.REG[7];
1151 register_static_object(&once_value_16);
1152 } else fra.me.REG[7] = once_value_16;
1153 array___Array___add(fra.me.REG[4], fra.me.REG[7]);
1154 fra.me.REG[6] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[6])(fra.me.REG[6]);
1155 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
1156 array___Array___add(fra.me.REG[4], fra.me.REG[6]);
1157 if (!once_value_17) {
1158 fra.me.REG[6] = BOX_NativeString("._sep.h\"\n");
1159 REGB0 = TAG_Int(9);
1160 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
1161 once_value_17 = fra.me.REG[6];
1162 register_static_object(&once_value_17);
1163 } else fra.me.REG[6] = once_value_17;
1164 array___Array___add(fra.me.REG[4], fra.me.REG[6]);
1165 fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
1166 CALL_stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
1167 } else {
1168 goto label18;
1169 }
1170 CALL_abstract_collection___Iterator___next(fra.me.REG[5])(fra.me.REG[5]);
1171 }
1172 label18: while(0);
1173 fra.me.REG[5] = CALL_compiling_base___CompilerVisitor___ctx(fra.me.REG[2])(fra.me.REG[2]);
1174 fra.me.REG[5] = CALL_compiling_base___CContext___decls(fra.me.REG[5])(fra.me.REG[5]);
1175 fra.me.REG[5] = CALL_abstract_collection___Collection___iterator(fra.me.REG[5])(fra.me.REG[5]);
1176 /* ./compiling//compiling.nit:126 */
1177 while(1) {
1178 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[5])(fra.me.REG[5]);
1179 if (UNTAG_Bool(REGB0)) {
1180 fra.me.REG[4] = CALL_abstract_collection___Iterator___item(fra.me.REG[5])(fra.me.REG[5]);
1181 /* ./compiling//compiling.nit:127 */
1182 CALL_stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
1183 } else {
1184 /* ./compiling//compiling.nit:126 */
1185 goto label19;
1186 }
1187 CALL_abstract_collection___Iterator___next(fra.me.REG[5])(fra.me.REG[5]);
1188 }
1189 label19: while(0);
1190 /* ./compiling//compiling.nit:129 */
1191 if (!once_value_20) {
1192 fra.me.REG[5] = BOX_NativeString("#endif\n");
1193 REGB0 = TAG_Int(7);
1194 fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
1195 once_value_20 = fra.me.REG[5];
1196 register_static_object(&once_value_20);
1197 } else fra.me.REG[5] = once_value_20;
1198 CALL_stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
1199 /* ./compiling//compiling.nit:130 */
1200 CALL_stream___IOS___close(fra.me.REG[3])(fra.me.REG[3]);
1201 REGB0 = TAG_Int(5);
1202 fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB0);
1203 /* ./compiling//compiling.nit:132 */
1204 if (!once_value_21) {
1205 fra.me.REG[4] = BOX_NativeString("");
1206 REGB0 = TAG_Int(0);
1207 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
1208 once_value_21 = fra.me.REG[4];
1209 register_static_object(&once_value_21);
1210 } else fra.me.REG[4] = once_value_21;
1211 array___Array___add(fra.me.REG[5], fra.me.REG[4]);
1212 fra.me.REG[1] = CALL_compiling_base___ToolContext___compdir(fra.me.REG[1])(fra.me.REG[1]);
1213 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
1214 array___Array___add(fra.me.REG[5], fra.me.REG[1]);
1215 if (!once_value_22) {
1216 fra.me.REG[1] = BOX_NativeString("/");
1217 REGB0 = TAG_Int(1);
1218 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
1219 once_value_22 = fra.me.REG[1];
1220 register_static_object(&once_value_22);
1221 } else fra.me.REG[1] = once_value_22;
1222 array___Array___add(fra.me.REG[5], fra.me.REG[1]);
1223 fra.me.REG[1] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
1224 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
1225 array___Array___add(fra.me.REG[5], fra.me.REG[1]);
1226 if (!once_value_23) {
1227 fra.me.REG[1] = BOX_NativeString("._sep.c");
1228 REGB0 = TAG_Int(7);
1229 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
1230 once_value_23 = fra.me.REG[1];
1231 register_static_object(&once_value_23);
1232 } else fra.me.REG[1] = once_value_23;
1233 array___Array___add(fra.me.REG[5], fra.me.REG[1]);
1234 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
1235 fra.me.REG[5] = NEW_OFStream_file___OFStream___open(fra.me.REG[5]);
1236 fra.me.REG[3] = fra.me.REG[5];
1237 REGB0 = TAG_Int(3);
1238 fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB0);
1239 /* ./compiling//compiling.nit:133 */
1240 if (!once_value_24) {
1241 fra.me.REG[1] = BOX_NativeString("/* This C file is generated by NIT to compile module ");
1242 REGB0 = TAG_Int(53);
1243 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
1244 once_value_24 = fra.me.REG[1];
1245 register_static_object(&once_value_24);
1246 } else fra.me.REG[1] = once_value_24;
1247 array___Array___add(fra.me.REG[5], fra.me.REG[1]);
1248 fra.me.REG[1] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
1249 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
1250 array___Array___add(fra.me.REG[5], fra.me.REG[1]);
1251 if (!once_value_25) {
1252 fra.me.REG[1] = BOX_NativeString(". */\n");
1253 REGB0 = TAG_Int(5);
1254 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
1255 once_value_25 = fra.me.REG[1];
1256 register_static_object(&once_value_25);
1257 } else fra.me.REG[1] = once_value_25;
1258 array___Array___add(fra.me.REG[5], fra.me.REG[1]);
1259 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
1260 CALL_stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
1261 REGB0 = TAG_Int(3);
1262 fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB0);
1263 /* ./compiling//compiling.nit:134 */
1264 if (!once_value_26) {
1265 fra.me.REG[1] = BOX_NativeString("#include \"");
1266 REGB0 = TAG_Int(10);
1267 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
1268 once_value_26 = fra.me.REG[1];
1269 register_static_object(&once_value_26);
1270 } else fra.me.REG[1] = once_value_26;
1271 array___Array___add(fra.me.REG[5], fra.me.REG[1]);
1272 fra.me.REG[0] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
1273 fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
1274 array___Array___add(fra.me.REG[5], fra.me.REG[0]);
1275 if (!once_value_27) {
1276 fra.me.REG[0] = BOX_NativeString("._sep.h\"\n");
1277 REGB0 = TAG_Int(9);
1278 fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
1279 once_value_27 = fra.me.REG[0];
1280 register_static_object(&once_value_27);
1281 } else fra.me.REG[0] = once_value_27;
1282 array___Array___add(fra.me.REG[5], fra.me.REG[0]);
1283 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
1284 CALL_stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
1285 fra.me.REG[2] = CALL_compiling_base___CompilerVisitor___ctx(fra.me.REG[2])(fra.me.REG[2]);
1286 fra.me.REG[2] = CALL_compiling_base___CContext___instrs(fra.me.REG[2])(fra.me.REG[2]);
1287 fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(fra.me.REG[2])(fra.me.REG[2]);
1288 /* ./compiling//compiling.nit:135 */
1289 while(1) {
1290 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
1291 if (UNTAG_Bool(REGB0)) {
1292 fra.me.REG[5] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
1293 /* ./compiling//compiling.nit:136 */
1294 CALL_stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
1295 } else {
1296 /* ./compiling//compiling.nit:135 */
1297 goto label28;
1298 }
1299 CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
1300 }
1301 label28: while(0);
1302 /* ./compiling//compiling.nit:138 */
1303 CALL_stream___IOS___close(fra.me.REG[3])(fra.me.REG[3]);
1304 stack_frame_head = fra.me.prev;
1305 return;
1306 }