compile: casts ('isa' and 'as') with nullable info
[nit.git] / c_src / string._sep.c
1 /* This C file is generated by NIT to compile module string. */
2 #include "string._sep.h"
3 val_t string___String_____eqeq(val_t self, val_t param0) {
4 struct trace_t trace = {NULL, NULL, 294, LOCATE_string___String_____eqeq};
5 val_t variable[9];
6 void **closurevariable = NULL;
7 trace.prev = tracehead; tracehead = &trace;
8 trace.file = LOCATE_string;
9 variable[0] = self;
10 variable[1] = param0;
11 variable[3] = TAG_Bool(( variable[1] /*o*/==NIT_NULL) || VAL_ISA( variable[1] /*o*/, COLOR_String, ID_String)) /*cast String*/;
12 variable[3] = TAG_Bool(!UNTAG_Bool(variable[3]));
13 if (!UNTAG_Bool(variable[3])) { /* or */
14 variable[3] = TAG_Bool(IS_EQUAL_NN( variable[1] /*o*/, NIT_NULL /*null*/));
15 }
16 if (UNTAG_Bool(variable[3])) { /*if*/
17 variable[2] = TAG_Bool(false);
18 goto return_label0;
19 }
20 variable[3] = TAG_Bool(( variable[1] /*o*/==NIT_NULL) || VAL_ISA( variable[1] /*o*/, COLOR_String, ID_String)) /*cast String*/;
21 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String_____eqeq, LOCATE_string, 297); nit_exit(1);}
22 variable[4] = variable[0];
23 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArray::length*/;
24 variable[3] = variable[4];
25 variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*o*/)( variable[1] /*o*/) /*AbstractArray::length*/;
26 variable[4] = TAG_Bool((variable[4])!=( variable[3] /*l*/));
27 if (UNTAG_Bool(variable[4])) { /*if*/
28 variable[2] = TAG_Bool(false);
29 goto return_label0;
30 }
31 variable[4] = TAG_Int(0);
32 variable[6] = variable[0];
33 variable[6] = ATTR_string___String____items(variable[6]) /*String::_items*/;
34 variable[5] = variable[6];
35 variable[7] = ATTR_string___String____items( variable[1] /*o*/) /*String::_items*/;
36 variable[6] = variable[7];
37 while (true) { /*while*/
38 variable[7] = TAG_Bool(UNTAG_Int( variable[4] /*i*/)<UNTAG_Int( variable[3] /*l*/));
39 if (!UNTAG_Bool(variable[7])) break; /* while*/
40 variable[7] = TAG_Char(UNBOX_NativeString( variable[5] /*it*/)[UNTAG_Int( variable[4] /*i*/)]);
41 variable[8] = TAG_Char(UNBOX_NativeString( variable[6] /*oit*/)[UNTAG_Int( variable[4] /*i*/)]);
42 variable[7] = TAG_Bool((variable[7])!=(variable[8]));
43 if (UNTAG_Bool(variable[7])) { /*if*/
44 variable[2] = TAG_Bool(false);
45 goto return_label0;
46 }
47 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
48 continue_1: while(0);
49 }
50 break_1: while(0);
51 variable[2] = TAG_Bool(true);
52 goto return_label0;
53 return_label0: while(false);
54 tracehead = trace.prev;
55 return variable[2];
56 }
57 void string___String___output(val_t self) {
58 struct trace_t trace = {NULL, NULL, 285, LOCATE_string___String___output};
59 val_t variable[4];
60 void **closurevariable = NULL;
61 trace.prev = tracehead; tracehead = &trace;
62 trace.file = LOCATE_string;
63 variable[0] = self;
64 variable[2] = TAG_Int(0);
65 while (true) { /*while*/
66 variable[3] = variable[0];
67 variable[3] = CALL_abstract_collection___Collection___length(variable[3])(variable[3]) /*AbstractArray::length*/;
68 variable[3] = TAG_Bool(UNTAG_Int( variable[2] /*i*/)<UNTAG_Int(variable[3]));
69 if (!UNTAG_Bool(variable[3])) break; /* while*/
70 variable[3] = variable[0];
71 variable[3] = ATTR_string___String____items(variable[3]) /*String::_items*/;
72 variable[3] = TAG_Char(UNBOX_NativeString(variable[3])[UNTAG_Int( variable[2] /*i*/)]);
73 printf("%c", (unsigned char)UNTAG_Char(variable[3]));
74 variable[2] = TAG_Int(UNTAG_Int(variable[2])+UNTAG_Int( TAG_Int(1))) /*i*/;
75 continue_3: while(0);
76 }
77 break_3: while(0);
78 return_label2: while(false);
79 tracehead = trace.prev;
80 return;
81 }
82 val_t string___String_____bra(val_t self, val_t param0) {
83 struct trace_t trace = {NULL, NULL, 31, LOCATE_string___String_____bra};
84 val_t variable[4];
85 void **closurevariable = NULL;
86 trace.prev = tracehead; tracehead = &trace;
87 trace.file = LOCATE_string;
88 variable[0] = self;
89 variable[1] = param0;
90 variable[3] = variable[0];
91 variable[3] = ATTR_string___String____items(variable[3]) /*String::_items*/;
92 variable[3] = TAG_Char(UNBOX_NativeString(variable[3])[UNTAG_Int( variable[1] /*index*/)]);
93 variable[2] = variable[3];
94 goto return_label4;
95 return_label4: while(false);
96 tracehead = trace.prev;
97 return variable[2];
98 }
99 void string___String_____braeq(val_t self, val_t param0, val_t param1) {
100 struct trace_t trace = {NULL, NULL, 33, LOCATE_string___String_____braeq};
101 val_t variable[6];
102 void **closurevariable = NULL;
103 trace.prev = tracehead; tracehead = &trace;
104 trace.file = LOCATE_string;
105 variable[0] = self;
106 variable[1] = param0;
107 variable[2] = param1;
108 variable[4] = variable[0];
109 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArray::length*/;
110 variable[4] = TAG_Bool(( variable[1] /*index*/)==(variable[4]));
111 if (UNTAG_Bool(variable[4])) { /*if*/
112 variable[4] = variable[0];
113 CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[2] /*item*/) /*String::add*/;
114 goto return_label5;
115 }
116 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*index*/)>=UNTAG_Int( TAG_Int(0)));
117 variable[5] = variable[4];
118 if (UNTAG_Bool(variable[5])) { /* and */
119 variable[5] = variable[0];
120 variable[5] = CALL_abstract_collection___Collection___length(variable[5])(variable[5]) /*AbstractArray::length*/;
121 variable[5] = TAG_Bool(UNTAG_Int( variable[1] /*index*/)<UNTAG_Int(variable[5]));
122 }
123 variable[4] = variable[5];
124 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String_____braeq, LOCATE_string, 39); nit_exit(1);}
125 variable[4] = variable[0];
126 variable[4] = ATTR_string___String____items(variable[4]) /*String::_items*/;
127 UNBOX_NativeString(variable[4])[UNTAG_Int( variable[1] /*index*/)]=UNTAG_Char( variable[2] /*item*/);
128 return_label5: while(false);
129 tracehead = trace.prev;
130 return;
131 }
132 void string___String___add(val_t self, val_t param0) {
133 struct trace_t trace = {NULL, NULL, 43, LOCATE_string___String___add};
134 val_t variable[5];
135 void **closurevariable = NULL;
136 trace.prev = tracehead; tracehead = &trace;
137 trace.file = LOCATE_string;
138 variable[0] = self;
139 variable[1] = param0;
140 variable[3] = variable[0];
141 variable[3] = ATTR_string___String____capacity(variable[3]) /*String::_capacity*/;
142 variable[4] = variable[0];
143 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArray::length*/;
144 variable[3] = TAG_Bool(UNTAG_Int(variable[3])<=UNTAG_Int(variable[4]));
145 if (UNTAG_Bool(variable[3])) { /*if*/
146 variable[3] = variable[0];
147 variable[4] = variable[0];
148 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArray::length*/;
149 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(5)));
150 CALL_array___AbstractArray___enlarge(variable[3])(variable[3], variable[4]) /*String::enlarge*/;
151 }
152 variable[3] = variable[0];
153 variable[3] = ATTR_string___String____items(variable[3]) /*String::_items*/;
154 variable[4] = variable[0];
155 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArray::length*/;
156 UNBOX_NativeString(variable[3])[UNTAG_Int(variable[4])]=UNTAG_Char( variable[1] /*c*/);
157 variable[3] = variable[0];
158 ATTR_array___AbstractArray____length(variable[3]) /*AbstractArray::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArray____length(variable[3]) /*AbstractArray::_length*/)+UNTAG_Int( TAG_Int(1)));
159 return_label6: while(false);
160 tracehead = trace.prev;
161 return;
162 }
163 void string___String___append(val_t self, val_t param0) {
164 struct trace_t trace = {NULL, NULL, 61, LOCATE_string___String___append};
165 val_t variable[7];
166 void **closurevariable = NULL;
167 trace.prev = tracehead; tracehead = &trace;
168 trace.file = LOCATE_string;
169 variable[0] = self;
170 variable[1] = param0;
171 variable[3] = TAG_Bool(( variable[1] /*s*/==NIT_NULL) || VAL_ISA( variable[1] /*s*/, COLOR_String, ID_String)) /*cast String*/;
172 if (UNTAG_Bool(variable[3])) { /*if*/
173 variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArray::length*/;
174 variable[3] = variable[4];
175 variable[4] = variable[0];
176 variable[4] = ATTR_string___String____capacity(variable[4]) /*String::_capacity*/;
177 variable[5] = variable[0];
178 variable[5] = CALL_abstract_collection___Collection___length(variable[5])(variable[5]) /*AbstractArray::length*/;
179 variable[5] = TAG_Int(UNTAG_Int(variable[5])+UNTAG_Int( variable[3] /*sl*/));
180 variable[4] = TAG_Bool(UNTAG_Int(variable[4])<UNTAG_Int(variable[5]));
181 if (UNTAG_Bool(variable[4])) { /*if*/
182 variable[4] = variable[0];
183 variable[5] = variable[0];
184 variable[5] = CALL_abstract_collection___Collection___length(variable[5])(variable[5]) /*AbstractArray::length*/;
185 variable[5] = TAG_Int(UNTAG_Int(variable[5])+UNTAG_Int( variable[3] /*sl*/));
186 CALL_array___AbstractArray___enlarge(variable[4])(variable[4], variable[5]) /*String::enlarge*/;
187 }
188 variable[4] = CALL_string___String___items( variable[1] /*s*/)( variable[1] /*s*/) /*String::items*/;
189 variable[5] = variable[0];
190 variable[5] = ATTR_string___String____items(variable[5]) /*String::_items*/;
191 variable[6] = variable[0];
192 variable[6] = CALL_abstract_collection___Collection___length(variable[6])(variable[6]) /*AbstractArray::length*/;
193 (void)memcpy(UNBOX_NativeString(variable[5])+UNTAG_Int(variable[6]), UNBOX_NativeString(variable[4])+UNTAG_Int( TAG_Int(0)), UNTAG_Int( variable[3] /*sl*/));
194 variable[4] = variable[0];
195 ATTR_array___AbstractArray____length(variable[4]) /*AbstractArray::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArray____length(variable[4]) /*AbstractArray::_length*/)+UNTAG_Int( variable[3] /*sl*/));
196 } else { /*if*/
197 CALL_SUPER_string___String___append(variable[0])(variable[0], variable[1]) /*super String::append*/;
198 }
199 return_label7: while(false);
200 tracehead = trace.prev;
201 return;
202 }
203 void string___String___enlarge(val_t self, val_t param0) {
204 struct trace_t trace = {NULL, NULL, 50, LOCATE_string___String___enlarge};
205 val_t variable[7];
206 void **closurevariable = NULL;
207 trace.prev = tracehead; tracehead = &trace;
208 trace.file = LOCATE_string;
209 variable[0] = self;
210 variable[1] = param0;
211 variable[4] = variable[0];
212 variable[4] = ATTR_string___String____capacity(variable[4]) /*String::_capacity*/;
213 variable[3] = variable[4];
214 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*cap*/)<=UNTAG_Int( variable[3] /*c*/));
215 if (UNTAG_Bool(variable[4])) { /*if*/
216 goto return_label8;
217 }
218 while (true) { /*while*/
219 variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*c*/)<=UNTAG_Int( variable[1] /*cap*/));
220 if (!UNTAG_Bool(variable[4])) break; /* while*/
221 variable[4] = TAG_Int(UNTAG_Int( variable[3] /*c*/)*UNTAG_Int( TAG_Int(2)));
222 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(2)));
223 variable[3] = variable[4] /*c=*/;
224 continue_9: while(0);
225 }
226 break_9: while(0);
227 variable[5] = variable[0];
228 variable[5] = BOX_NativeString((char*)malloc((UNTAG_Int( variable[3] /*c*/) * sizeof(char))));
229 variable[4] = variable[5];
230 variable[5] = variable[0];
231 variable[5] = ATTR_string___String____items(variable[5]) /*String::_items*/;
232 variable[6] = variable[0];
233 variable[6] = CALL_abstract_collection___Collection___length(variable[6])(variable[6]) /*AbstractArray::length*/;
234 (void)memcpy(UNBOX_NativeString( variable[4] /*a*/)+UNTAG_Int( TAG_Int(0)), UNBOX_NativeString(variable[5])+UNTAG_Int( TAG_Int(0)), UNTAG_Int(variable[6]));
235 variable[5] = variable[0];
236 ATTR_string___String____items(variable[5]) /*String::_items*/ = variable[4] /*a*/;
237 variable[5] = variable[0];
238 ATTR_string___String____capacity(variable[5]) /*String::_capacity*/ = variable[3] /*c*/;
239 return_label8: while(false);
240 tracehead = trace.prev;
241 return;
242 }
243 val_t string___String___to_s(val_t self) {
244 struct trace_t trace = {NULL, NULL, 94, LOCATE_string___String___to_s};
245 val_t variable[4];
246 void **closurevariable = NULL;
247 trace.prev = tracehead; tracehead = &trace;
248 trace.file = LOCATE_string;
249 variable[0] = self;
250 variable[2] = variable[0];
251 variable[3] = NEW_String_string___String___from(variable[2]); /*new String*/
252 variable[2] = variable[3];
253 variable[1] = variable[2];
254 goto return_label10;
255 return_label10: while(false);
256 tracehead = trace.prev;
257 return variable[1];
258 }
259 val_t string___String_____l(val_t self, val_t param0) {
260 struct trace_t trace = {NULL, NULL, 209, LOCATE_string___String_____l};
261 val_t variable[9];
262 void **closurevariable = NULL;
263 trace.prev = tracehead; tracehead = &trace;
264 trace.file = LOCATE_string;
265 variable[0] = self;
266 variable[1] = param0;
267 variable[3] = TAG_Int(0);
268 variable[5] = variable[0];
269 variable[5] = CALL_abstract_collection___Collection___length(variable[5])(variable[5]) /*AbstractArray::length*/;
270 variable[4] = variable[5];
271 variable[6] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArray::length*/;
272 variable[5] = variable[6];
273 while (true) { /*while*/
274 variable[6] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int( variable[4] /*l1*/));
275 variable[7] = variable[6];
276 if (UNTAG_Bool(variable[7])) { /* and */
277 variable[7] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int( variable[5] /*l2*/));
278 }
279 variable[6] = variable[7];
280 if (!UNTAG_Bool(variable[6])) break; /* while*/
281 variable[7] = variable[0];
282 variable[7] = CALL_abstract_collection___Map_____bra(variable[7])(variable[7], variable[3] /*i*/) /*String::[]*/;
283 variable[7] = TAG_Int((unsigned char)UNTAG_Char(variable[7]));
284 variable[6] = variable[7];
285 variable[8] = CALL_abstract_collection___Map_____bra( variable[1] /*s*/)( variable[1] /*s*/, variable[3] /*i*/) /*String::[]*/;
286 variable[8] = TAG_Int((unsigned char)UNTAG_Char(variable[8]));
287 variable[7] = variable[8];
288 variable[8] = TAG_Bool(UNTAG_Int( variable[6] /*c1*/)<UNTAG_Int( variable[7] /*c2*/));
289 if (UNTAG_Bool(variable[8])) { /*if*/
290 variable[2] = TAG_Bool(true);
291 goto return_label11;
292 } else { /*if*/
293 variable[8] = TAG_Bool(UNTAG_Int( variable[7] /*c2*/)<UNTAG_Int( variable[6] /*c1*/));
294 if (UNTAG_Bool(variable[8])) { /*if*/
295 variable[2] = TAG_Bool(false);
296 goto return_label11;
297 }
298 }
299 variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
300 continue_12: while(0);
301 }
302 break_12: while(0);
303 variable[6] = TAG_Bool(UNTAG_Int( variable[4] /*l1*/)<UNTAG_Int( variable[5] /*l2*/));
304 if (UNTAG_Bool(variable[6])) { /*if*/
305 variable[2] = TAG_Bool(true);
306 goto return_label11;
307 } else { /*if*/
308 variable[2] = TAG_Bool(false);
309 goto return_label11;
310 }
311 return_label11: while(false);
312 tracehead = trace.prev;
313 return variable[2];
314 }
315 val_t string___String_____plus(val_t self, val_t param0) {
316 struct trace_t trace = {NULL, NULL, 73, LOCATE_string___String_____plus};
317 val_t variable[6];
318 void **closurevariable = NULL;
319 trace.prev = tracehead; tracehead = &trace;
320 trace.file = LOCATE_string;
321 variable[0] = self;
322 variable[1] = param0;
323 variable[4] = variable[0];
324 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArray::length*/;
325 variable[5] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArray::length*/;
326 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int(variable[5]));
327 variable[5] = NEW_String_string___String___with_capacity(variable[4]); /*new String*/
328 variable[4] = variable[5];
329 variable[3] = variable[4];
330 variable[4] = variable[0];
331 CALL_abstract_collection___IndexedCollection___append( variable[3] /*r*/)( variable[3] /*r*/, variable[4]) /*String::append*/;
332 CALL_abstract_collection___IndexedCollection___append( variable[3] /*r*/)( variable[3] /*r*/, variable[1] /*s*/) /*String::append*/;
333 variable[2] = variable[3] /*r*/;
334 goto return_label13;
335 return_label13: while(false);
336 tracehead = trace.prev;
337 return variable[2];
338 }
339 val_t string___String_____star(val_t self, val_t param0) {
340 struct trace_t trace = {NULL, NULL, 82, LOCATE_string___String_____star};
341 val_t variable[6];
342 void **closurevariable = NULL;
343 trace.prev = tracehead; tracehead = &trace;
344 trace.file = LOCATE_string;
345 variable[0] = self;
346 variable[1] = param0;
347 variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*i*/)>=UNTAG_Int( TAG_Int(0)));
348 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String_____star, LOCATE_string, 85); nit_exit(1);}
349 variable[4] = variable[0];
350 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArray::length*/;
351 variable[4] = TAG_Int(UNTAG_Int(variable[4])*UNTAG_Int( variable[1] /*i*/));
352 variable[5] = NEW_String_string___String___with_capacity(variable[4]); /*new String*/
353 variable[4] = variable[5];
354 variable[3] = variable[4];
355 while (true) { /*while*/
356 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*i*/)>UNTAG_Int( TAG_Int(0)));
357 if (!UNTAG_Bool(variable[4])) break; /* while*/
358 variable[4] = variable[0];
359 CALL_abstract_collection___IndexedCollection___append( variable[3] /*r*/)( variable[3] /*r*/, variable[4]) /*String::append*/;
360 variable[1] = TAG_Int(UNTAG_Int(variable[1])-UNTAG_Int( TAG_Int(1))) /*i*/;
361 continue_15: while(0);
362 }
363 break_15: while(0);
364 variable[2] = variable[3] /*r*/;
365 goto return_label14;
366 return_label14: while(false);
367 tracehead = trace.prev;
368 return variable[2];
369 }
370 val_t string___String___to_i(val_t self) {
371 struct trace_t trace = {NULL, NULL, 97, LOCATE_string___String___to_i};
372 val_t variable[3];
373 void **closurevariable = NULL;
374 trace.prev = tracehead; tracehead = &trace;
375 trace.file = LOCATE_string;
376 variable[0] = self;
377 variable[2] = variable[0];
378 variable[2] = CALL_string___String___to_cstring(variable[2])(variable[2]) /*String::to_cstring*/;
379 variable[2] = TAG_Int(atoi(UNBOX_NativeString(variable[2])));
380 variable[1] = variable[2];
381 goto return_label16;
382 return_label16: while(false);
383 tracehead = trace.prev;
384 return variable[1];
385 }
386 val_t string___String___to_hex(val_t self) {
387 struct trace_t trace = {NULL, NULL, 104, LOCATE_string___String___to_hex};
388 val_t variable[3];
389 void **closurevariable = NULL;
390 trace.prev = tracehead; tracehead = &trace;
391 trace.file = LOCATE_string;
392 variable[0] = self;
393 variable[2] = variable[0];
394 variable[2] = CALL_string___String___a_to(variable[2])(variable[2], TAG_Int(16)) /*String::a_to*/;
395 variable[1] = variable[2];
396 goto return_label17;
397 return_label17: while(false);
398 tracehead = trace.prev;
399 return variable[1];
400 }
401 val_t string___String___a_to(val_t self, val_t param0) {
402 struct trace_t trace = {NULL, NULL, 107, LOCATE_string___String___a_to};
403 val_t variable[10];
404 void **closurevariable = NULL;
405 trace.prev = tracehead; tracehead = &trace;
406 trace.file = LOCATE_string;
407 variable[0] = self;
408 variable[1] = param0;
409 variable[3] = TAG_Int(0);
410 variable[4] = TAG_Bool(false);
411 variable[5] = variable[0];
412 variable[5] = CALL_abstract_collection___Collection___iterator(variable[5])(variable[5]) /*AbstractArray::iterator*/;
413 while (true) { /*for*/
414 variable[6] = CALL_abstract_collection___Iterator___is_ok(variable[5])(variable[5]) /*ArrayIterator::is_ok*/;
415 if (!UNTAG_Bool(variable[6])) break; /*for*/
416 variable[6] = CALL_abstract_collection___Iterator___item(variable[5])(variable[5]) /*ArrayIterator::item*/;
417 variable[7] = variable[6];
418 variable[9] = CALL_kernel___Char___to_i( variable[7] /*c*/)( variable[7] /*c*/) /*Char::to_i*/;
419 variable[8] = variable[9];
420 variable[9] = TAG_Bool(UNTAG_Int( variable[8] /*v*/)>UNTAG_Int( variable[1] /*base*/));
421 if (UNTAG_Bool(variable[9])) { /*if*/
422 if (UNTAG_Bool( variable[4] /*neg*/)) { /*if*/
423 variable[9] = TAG_Int(-UNTAG_Int( variable[3] /*i*/));
424 variable[2] = variable[9];
425 goto return_label18;
426 } else { /*if*/
427 variable[2] = variable[3] /*i*/;
428 goto return_label18;
429 }
430 } else { /*if*/
431 variable[9] = TAG_Bool(UNTAG_Int( variable[8] /*v*/)<UNTAG_Int( TAG_Int(0)));
432 if (UNTAG_Bool(variable[9])) { /*if*/
433 variable[4] = TAG_Bool(true) /*neg=*/;
434 } else { /*if*/
435 variable[9] = TAG_Int(UNTAG_Int( variable[3] /*i*/)*UNTAG_Int( variable[1] /*base*/));
436 variable[9] = TAG_Int(UNTAG_Int(variable[9])+UNTAG_Int( variable[8] /*v*/));
437 variable[3] = variable[9] /*i=*/;
438 }
439 }
440 continue_19: while(0);
441 CALL_abstract_collection___Iterator___next(variable[5])(variable[5]) /*ArrayIterator::next*/;
442 }
443 break_19: while(0);
444 if (UNTAG_Bool( variable[4] /*neg*/)) { /*if*/
445 variable[5] = TAG_Int(-UNTAG_Int( variable[3] /*i*/));
446 variable[2] = variable[5];
447 goto return_label18;
448 } else { /*if*/
449 variable[2] = variable[3] /*i*/;
450 goto return_label18;
451 }
452 return_label18: while(false);
453 tracehead = trace.prev;
454 return variable[2];
455 }
456 val_t string___String___to_cstring(val_t self) {
457 struct trace_t trace = {NULL, NULL, 135, LOCATE_string___String___to_cstring};
458 val_t variable[4];
459 void **closurevariable = NULL;
460 trace.prev = tracehead; tracehead = &trace;
461 trace.file = LOCATE_string;
462 variable[0] = self;
463 variable[2] = variable[0];
464 variable[3] = variable[0];
465 variable[3] = CALL_abstract_collection___Collection___length(variable[3])(variable[3]) /*AbstractArray::length*/;
466 CALL_abstract_collection___Map_____braeq(variable[2])(variable[2], variable[3], TAG_Char('\0')) /*String::[]=*/;
467 variable[2] = variable[0];
468 ATTR_array___AbstractArray____length(variable[2]) /*AbstractArray::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArray____length(variable[2]) /*AbstractArray::_length*/)-UNTAG_Int( TAG_Int(1)));
469 variable[2] = variable[0];
470 variable[2] = ATTR_string___String____items(variable[2]) /*String::_items*/;
471 variable[1] = variable[2];
472 goto return_label20;
473 return_label20: while(false);
474 tracehead = trace.prev;
475 return variable[1];
476 }
477 val_t string___String___substring(val_t self, val_t param0, val_t param1) {
478 struct trace_t trace = {NULL, NULL, 143, LOCATE_string___String___substring};
479 val_t variable[7];
480 void **closurevariable = NULL;
481 trace.prev = tracehead; tracehead = &trace;
482 trace.file = LOCATE_string;
483 variable[0] = self;
484 variable[1] = param0;
485 variable[2] = param1;
486 variable[4] = TAG_Bool(UNTAG_Int( variable[2] /*count*/)>=UNTAG_Int( TAG_Int(0)));
487 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String___substring, LOCATE_string, 151); nit_exit(1);}
488 variable[2] = TAG_Int(UNTAG_Int(variable[2])+UNTAG_Int( variable[1] /*from*/)) /*count*/;
489 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*from*/)<UNTAG_Int( TAG_Int(0)));
490 if (UNTAG_Bool(variable[4])) { /*if*/
491 variable[1] = TAG_Int(0) /*from=*/;
492 }
493 variable[4] = variable[0];
494 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArray::length*/;
495 variable[4] = TAG_Bool(UNTAG_Int( variable[2] /*count*/)>UNTAG_Int(variable[4]));
496 if (UNTAG_Bool(variable[4])) { /*if*/
497 variable[4] = variable[0];
498 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArray::length*/;
499 variable[2] = variable[4] /*count=*/;
500 }
501 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*from*/)<UNTAG_Int( variable[2] /*count*/));
502 if (UNTAG_Bool(variable[4])) { /*if*/
503 variable[5] = TAG_Int(UNTAG_Int( variable[2] /*count*/)-UNTAG_Int( variable[1] /*from*/));
504 variable[6] = NEW_String_string___String___with_capacity(variable[5]); /*new String*/
505 variable[5] = variable[6];
506 variable[4] = variable[5];
507 while (true) { /*while*/
508 variable[5] = TAG_Bool(UNTAG_Int( variable[1] /*from*/)<UNTAG_Int( variable[2] /*count*/));
509 if (!UNTAG_Bool(variable[5])) break; /* while*/
510 variable[5] = variable[0];
511 variable[5] = ATTR_string___String____items(variable[5]) /*String::_items*/;
512 variable[5] = TAG_Char(UNBOX_NativeString(variable[5])[UNTAG_Int( variable[1] /*from*/)]);
513 CALL_abstract_collection___IndexedCollection___push( variable[4] /*r*/)( variable[4] /*r*/, variable[5]) /*AbstractArray::push*/;
514 variable[1] = TAG_Int(UNTAG_Int(variable[1])+UNTAG_Int( TAG_Int(1))) /*from*/;
515 continue_22: while(0);
516 }
517 break_22: while(0);
518 variable[3] = variable[4] /*r*/;
519 goto return_label21;
520 } else { /*if*/
521 variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
522 variable[3] = variable[4];
523 goto return_label21;
524 }
525 return_label21: while(false);
526 tracehead = trace.prev;
527 return variable[3];
528 }
529 val_t string___String___substring_from(val_t self, val_t param0) {
530 struct trace_t trace = {NULL, NULL, 167, LOCATE_string___String___substring_from};
531 val_t variable[5];
532 void **closurevariable = NULL;
533 trace.prev = tracehead; tracehead = &trace;
534 trace.file = LOCATE_string;
535 variable[0] = self;
536 variable[1] = param0;
537 variable[3] = variable[0];
538 variable[3] = CALL_abstract_collection___Collection___length(variable[3])(variable[3]) /*AbstractArray::length*/;
539 variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*from*/)<UNTAG_Int(variable[3]));
540 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String___substring_from, LOCATE_string, 174); nit_exit(1);}
541 variable[3] = variable[0];
542 variable[4] = variable[0];
543 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArray::length*/;
544 variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int( variable[1] /*from*/));
545 variable[3] = CALL_string___String___substring(variable[3])(variable[3], variable[1] /*from*/, variable[4]) /*String::substring*/;
546 variable[2] = variable[3];
547 goto return_label23;
548 return_label23: while(false);
549 tracehead = trace.prev;
550 return variable[2];
551 }
552 val_t string___String___has_substring(val_t self, val_t param0, val_t param1) {
553 struct trace_t trace = {NULL, NULL, 178, LOCATE_string___String___has_substring};
554 val_t variable[10];
555 void **closurevariable = NULL;
556 trace.prev = tracehead; tracehead = &trace;
557 trace.file = LOCATE_string;
558 variable[0] = self;
559 variable[1] = param0;
560 variable[2] = param1;
561 variable[5] = CALL_abstract_collection___Collection___length( variable[1] /*str*/)( variable[1] /*str*/) /*AbstractArray::length*/;
562 variable[5] = TAG_Int(UNTAG_Int(variable[5])-UNTAG_Int( TAG_Int(1)));
563 variable[4] = variable[5];
564 variable[6] = TAG_Int(UNTAG_Int( variable[2] /*pos*/)+UNTAG_Int( variable[4] /*itsindex*/));
565 variable[5] = variable[6];
566 variable[7] = variable[0];
567 variable[7] = ATTR_string___String____items(variable[7]) /*String::_items*/;
568 variable[6] = variable[7];
569 variable[8] = ATTR_string___String____items( variable[1] /*str*/) /*String::_items*/;
570 variable[7] = variable[8];
571 variable[8] = variable[0];
572 variable[8] = CALL_abstract_collection___Collection___length(variable[8])(variable[8]) /*AbstractArray::length*/;
573 variable[8] = TAG_Bool(UNTAG_Int( variable[5] /*myindex*/)>UNTAG_Int(variable[8]));
574 variable[9] = variable[8];
575 if (!UNTAG_Bool(variable[9])) { /* or */
576 variable[9] = TAG_Bool(UNTAG_Int( variable[4] /*itsindex*/)>UNTAG_Int( variable[5] /*myindex*/));
577 }
578 variable[8] = variable[9];
579 if (UNTAG_Bool(variable[8])) { /*if*/
580 variable[3] = TAG_Bool(false);
581 goto return_label24;
582 }
583 while (true) { /*while*/
584 variable[8] = TAG_Bool(UNTAG_Int( variable[4] /*itsindex*/)>UNTAG_Int( TAG_Int(0)));
585 if (!UNTAG_Bool(variable[8])) break; /* while*/
586 variable[8] = TAG_Char(UNBOX_NativeString( variable[6] /*myitems*/)[UNTAG_Int( variable[5] /*myindex*/)]);
587 variable[9] = TAG_Char(UNBOX_NativeString( variable[7] /*itsitems*/)[UNTAG_Int( variable[4] /*itsindex*/)]);
588 variable[8] = TAG_Bool((variable[8])!=(variable[9]));
589 if (UNTAG_Bool(variable[8])) { /*if*/
590 variable[3] = TAG_Bool(false);
591 goto return_label24;
592 }
593 variable[5] = TAG_Int(UNTAG_Int(variable[5])-UNTAG_Int( variable[5] /*myindex*/)) /*myindex*/;
594 variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int( variable[4] /*itsindex*/)) /*itsindex*/;
595 continue_25: while(0);
596 }
597 break_25: while(0);
598 variable[3] = TAG_Bool(true);
599 goto return_label24;
600 return_label24: while(false);
601 tracehead = trace.prev;
602 return variable[3];
603 }
604 val_t string___String___has_prefix(val_t self, val_t param0) {
605 struct trace_t trace = {NULL, NULL, 197, LOCATE_string___String___has_prefix};
606 val_t variable[4];
607 void **closurevariable = NULL;
608 trace.prev = tracehead; tracehead = &trace;
609 trace.file = LOCATE_string;
610 variable[0] = self;
611 variable[1] = param0;
612 variable[3] = variable[0];
613 variable[3] = CALL_string___String___has_substring(variable[3])(variable[3], variable[1] /*prefix*/, TAG_Int(0)) /*String::has_substring*/;
614 variable[2] = variable[3];
615 goto return_label26;
616 return_label26: while(false);
617 tracehead = trace.prev;
618 return variable[2];
619 }
620 val_t string___String___has_suffix(val_t self, val_t param0) {
621 struct trace_t trace = {NULL, NULL, 203, LOCATE_string___String___has_suffix};
622 val_t variable[6];
623 void **closurevariable = NULL;
624 trace.prev = tracehead; tracehead = &trace;
625 trace.file = LOCATE_string;
626 variable[0] = self;
627 variable[1] = param0;
628 variable[3] = variable[0];
629 variable[4] = variable[0];
630 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArray::length*/;
631 variable[5] = CALL_abstract_collection___Collection___length( variable[1] /*suffix*/)( variable[1] /*suffix*/) /*AbstractArray::length*/;
632 variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int(variable[5]));
633 variable[3] = CALL_string___String___has_substring(variable[3])(variable[3], variable[1] /*suffix*/, variable[4]) /*String::has_substring*/;
634 variable[2] = variable[3];
635 goto return_label27;
636 return_label27: while(false);
637 tracehead = trace.prev;
638 return variable[2];
639 }
640 void string___String___init(val_t self, int* init_table) {
641 struct trace_t trace = {NULL, NULL, 231, LOCATE_string___String___init};
642 val_t variable[3];
643 void **closurevariable = NULL;
644 trace.prev = tracehead; tracehead = &trace;
645 trace.file = LOCATE_string;
646 variable[0] = self;
647 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i]) return;
648 variable[2] = variable[0];
649 CALL_string___String___with_capacity(variable[2])(variable[2], TAG_Int(5), init_table /*YYY*/) /*String::with_capacity*/;
650 return_label28: while(false);
651 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i] = 1;
652 tracehead = trace.prev;
653 return;
654 }
655 void string___String___from(val_t self, val_t param0, int* init_table) {
656 struct trace_t trace = {NULL, NULL, 237, LOCATE_string___String___from};
657 val_t variable[6];
658 void **closurevariable = NULL;
659 trace.prev = tracehead; tracehead = &trace;
660 trace.file = LOCATE_string;
661 variable[0] = self;
662 variable[1] = param0;
663 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i]) return;
664 variable[3] = variable[0];
665 variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArray::length*/;
666 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1)));
667 ATTR_string___String____capacity(variable[3]) /*String::_capacity*/ = variable[4];
668 variable[3] = variable[0];
669 variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArray::length*/;
670 ATTR_array___AbstractArray____length(variable[3]) /*AbstractArray::_length*/ = variable[4];
671 variable[3] = variable[0];
672 variable[4] = variable[0];
673 variable[5] = variable[0];
674 variable[5] = ATTR_string___String____capacity(variable[5]) /*String::_capacity*/;
675 variable[4] = BOX_NativeString((char*)malloc((UNTAG_Int(variable[5]) * sizeof(char))));
676 ATTR_string___String____items(variable[3]) /*String::_items*/ = variable[4];
677 variable[3] = CALL_string___String___items( variable[1] /*s*/)( variable[1] /*s*/) /*String::items*/;
678 variable[4] = variable[0];
679 variable[4] = ATTR_string___String____items(variable[4]) /*String::_items*/;
680 variable[5] = variable[0];
681 variable[5] = ATTR_array___AbstractArray____length(variable[5]) /*AbstractArray::_length*/;
682 (void)memcpy(UNBOX_NativeString(variable[4])+UNTAG_Int( TAG_Int(0)), UNBOX_NativeString(variable[3])+UNTAG_Int( TAG_Int(0)), UNTAG_Int(variable[5]));
683 return_label29: while(false);
684 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i] = 1;
685 tracehead = trace.prev;
686 return;
687 }
688 void string___String___with_capacity(val_t self, val_t param0, int* init_table) {
689 struct trace_t trace = {NULL, NULL, 245, LOCATE_string___String___with_capacity};
690 val_t variable[5];
691 void **closurevariable = NULL;
692 trace.prev = tracehead; tracehead = &trace;
693 trace.file = LOCATE_string;
694 variable[0] = self;
695 variable[1] = param0;
696 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i]) return;
697 variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*cap*/)>=UNTAG_Int( TAG_Int(0)));
698 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String___with_capacity, LOCATE_string, 248); nit_exit(1);}
699 variable[3] = variable[0];
700 variable[4] = variable[0];
701 variable[4] = BOX_NativeString((char*)malloc((UNTAG_Int( variable[1] /*cap*/) * sizeof(char))));
702 ATTR_string___String____items(variable[3]) /*String::_items*/ = variable[4];
703 variable[3] = variable[0];
704 ATTR_string___String____capacity(variable[3]) /*String::_capacity*/ = variable[1] /*cap*/;
705 variable[3] = variable[0];
706 ATTR_array___AbstractArray____length(variable[3]) /*AbstractArray::_length*/ = TAG_Int(0);
707 return_label30: while(false);
708 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i] = 1;
709 tracehead = trace.prev;
710 return;
711 }
712 void string___String___with_native(val_t self, val_t param0, val_t param1, int* init_table) {
713 struct trace_t trace = {NULL, NULL, 255, LOCATE_string___String___with_native};
714 val_t variable[5];
715 void **closurevariable = NULL;
716 trace.prev = tracehead; tracehead = &trace;
717 trace.file = LOCATE_string;
718 variable[0] = self;
719 variable[1] = param0;
720 variable[2] = param1;
721 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i]) return;
722 variable[4] = TAG_Bool(UNTAG_Int( variable[2] /*size*/)>=UNTAG_Int( TAG_Int(0)));
723 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String___with_native, LOCATE_string, 258); nit_exit(1);}
724 variable[4] = variable[0];
725 ATTR_string___String____items(variable[4]) /*String::_items*/ = variable[1] /*nat*/;
726 variable[4] = variable[0];
727 ATTR_string___String____capacity(variable[4]) /*String::_capacity*/ = variable[2] /*size*/;
728 variable[4] = variable[0];
729 ATTR_array___AbstractArray____length(variable[4]) /*AbstractArray::_length*/ = variable[2] /*size*/;
730 return_label31: while(false);
731 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i] = 1;
732 tracehead = trace.prev;
733 return;
734 }
735 void string___String___from_cstring(val_t self, val_t param0, int* init_table) {
736 struct trace_t trace = {NULL, NULL, 264, LOCATE_string___String___from_cstring};
737 val_t variable[6];
738 void **closurevariable = NULL;
739 trace.prev = tracehead; tracehead = &trace;
740 trace.file = LOCATE_string;
741 variable[0] = self;
742 variable[1] = param0;
743 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i]) return;
744 variable[4] = CALL_string___NativeString___cstring_length( variable[1] /*str*/)( variable[1] /*str*/) /*NativeString::cstring_length*/;
745 variable[3] = variable[4];
746 variable[4] = variable[0];
747 ATTR_string___String____items(variable[4]) /*String::_items*/ = variable[1] /*str*/;
748 variable[4] = variable[0];
749 variable[5] = TAG_Int(UNTAG_Int( variable[3] /*size*/)+UNTAG_Int( TAG_Int(1)));
750 ATTR_string___String____capacity(variable[4]) /*String::_capacity*/ = variable[5];
751 variable[4] = variable[0];
752 ATTR_array___AbstractArray____length(variable[4]) /*AbstractArray::_length*/ = variable[3] /*size*/;
753 return_label32: while(false);
754 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i] = 1;
755 tracehead = trace.prev;
756 return;
757 }
758 void string___String___filled_with(val_t self, val_t param0, val_t param1, int* init_table) {
759 struct trace_t trace = {NULL, NULL, 273, LOCATE_string___String___filled_with};
760 val_t variable[6];
761 void **closurevariable = NULL;
762 trace.prev = tracehead; tracehead = &trace;
763 trace.file = LOCATE_string;
764 variable[0] = self;
765 variable[1] = param0;
766 variable[2] = param1;
767 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i]) return;
768 variable[4] = variable[0];
769 CALL_string___String___with_capacity(variable[4])(variable[4], variable[2] /*count*/, init_table /*YYY*/) /*String::with_capacity*/;
770 variable[4] = TAG_Int(0);
771 while (true) { /*while*/
772 variable[5] = TAG_Bool(UNTAG_Int( variable[4] /*i*/)<UNTAG_Int( variable[2] /*count*/));
773 if (!UNTAG_Bool(variable[5])) break; /* while*/
774 variable[5] = variable[0];
775 variable[5] = ATTR_string___String____items(variable[5]) /*String::_items*/;
776 UNBOX_NativeString(variable[5])[UNTAG_Int( variable[4] /*i*/)]=UNTAG_Char( variable[1] /*c*/);
777 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
778 continue_34: while(0);
779 }
780 break_34: while(0);
781 variable[5] = variable[0];
782 ATTR_array___AbstractArray____length(variable[5]) /*AbstractArray::_length*/ = variable[2] /*count*/;
783 return_label33: while(false);
784 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i] = 1;
785 tracehead = trace.prev;
786 return;
787 }
788 val_t string___String___to_upper(val_t self) {
789 struct trace_t trace = {NULL, NULL, 310, LOCATE_string___String___to_upper};
790 val_t variable[7];
791 void **closurevariable = NULL;
792 trace.prev = tracehead; tracehead = &trace;
793 trace.file = LOCATE_string;
794 variable[0] = self;
795 variable[3] = variable[0];
796 variable[3] = CALL_abstract_collection___Collection___length(variable[3])(variable[3]) /*AbstractArray::length*/;
797 variable[4] = NEW_String_string___String___with_capacity(variable[3]); /*new String*/
798 variable[3] = variable[4];
799 variable[2] = variable[3];
800 variable[3] = variable[0];
801 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArray::iterator*/;
802 while (true) { /*for*/
803 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
804 if (!UNTAG_Bool(variable[4])) break; /*for*/
805 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/;
806 variable[5] = variable[4];
807 variable[6] = CALL_kernel___Char___to_upper( variable[5] /*i*/)( variable[5] /*i*/) /*Char::to_upper*/;
808 CALL_abstract_collection___SimpleCollection___add( variable[2] /*s*/)( variable[2] /*s*/, variable[6]) /*String::add*/;
809 continue_36: while(0);
810 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
811 }
812 break_36: while(0);
813 variable[1] = variable[2] /*s*/;
814 goto return_label35;
815 return_label35: while(false);
816 tracehead = trace.prev;
817 return variable[1];
818 }
819 val_t string___String___to_lower(val_t self) {
820 struct trace_t trace = {NULL, NULL, 318, LOCATE_string___String___to_lower};
821 val_t variable[7];
822 void **closurevariable = NULL;
823 trace.prev = tracehead; tracehead = &trace;
824 trace.file = LOCATE_string;
825 variable[0] = self;
826 variable[3] = variable[0];
827 variable[3] = CALL_abstract_collection___Collection___length(variable[3])(variable[3]) /*AbstractArray::length*/;
828 variable[4] = NEW_String_string___String___with_capacity(variable[3]); /*new String*/
829 variable[3] = variable[4];
830 variable[2] = variable[3];
831 variable[3] = variable[0];
832 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArray::iterator*/;
833 while (true) { /*for*/
834 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
835 if (!UNTAG_Bool(variable[4])) break; /*for*/
836 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/;
837 variable[5] = variable[4];
838 variable[6] = CALL_kernel___Char___to_lower( variable[5] /*i*/)( variable[5] /*i*/) /*Char::to_lower*/;
839 CALL_abstract_collection___SimpleCollection___add( variable[2] /*s*/)( variable[2] /*s*/, variable[6]) /*String::add*/;
840 continue_38: while(0);
841 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
842 }
843 break_38: while(0);
844 variable[1] = variable[2] /*s*/;
845 goto return_label37;
846 return_label37: while(false);
847 tracehead = trace.prev;
848 return variable[1];
849 }
850 val_t string___String___items(val_t self) {
851 struct trace_t trace = {NULL, NULL, 326, LOCATE_string___String___items};
852 val_t *variable = NULL;
853 void **closurevariable = NULL;
854 trace.prev = tracehead; tracehead = &trace;
855 trace.file = LOCATE_string;
856 tracehead = trace.prev;
857 return ATTR_string___String____items( self) /*String::_items*/;
858 }
859 val_t string___String___capacity(val_t self) {
860 struct trace_t trace = {NULL, NULL, 327, LOCATE_string___String___capacity};
861 val_t *variable = NULL;
862 void **closurevariable = NULL;
863 trace.prev = tracehead; tracehead = &trace;
864 trace.file = LOCATE_string;
865 tracehead = trace.prev;
866 return ATTR_string___String____capacity( self) /*String::_capacity*/;
867 }
868 val_t string___Object___to_s(val_t self) {
869 struct trace_t trace = {NULL, NULL, 337, LOCATE_string___Object___to_s};
870 val_t variable[3];
871 void **closurevariable = NULL;
872 trace.prev = tracehead; tracehead = &trace;
873 trace.file = LOCATE_string;
874 variable[0] = self;
875 variable[2] = variable[0];
876 variable[2] = CALL_string___Object___inspect(variable[2])(variable[2]) /*Object::inspect*/;
877 variable[1] = variable[2];
878 goto return_label39;
879 return_label39: while(false);
880 tracehead = trace.prev;
881 return variable[1];
882 }
883 val_t string___Object___inspect(val_t self) {
884 struct trace_t trace = {NULL, NULL, 340, LOCATE_string___Object___inspect};
885 val_t variable[4];
886 void **closurevariable = NULL;
887 trace.prev = tracehead; tracehead = &trace;
888 trace.file = LOCATE_string;
889 variable[0] = self;
890 variable[3] = variable[0];
891 variable[3] = CALL_string___Object___inspect_head(variable[3])(variable[3]) /*Object::inspect_head*/;
892 variable[2] = variable[3];
893 CALL_abstract_collection___SimpleCollection___add( variable[2] /*r*/)( variable[2] /*r*/, TAG_Char('>')) /*String::add*/;
894 variable[1] = variable[2] /*r*/;
895 goto return_label40;
896 return_label40: while(false);
897 tracehead = trace.prev;
898 return variable[1];
899 }
900 val_t string___Object___inspect_head(val_t self) {
901 struct trace_t trace = {NULL, NULL, 349, LOCATE_string___Object___inspect_head};
902 val_t variable[9];
903 void **closurevariable = NULL;
904 trace.prev = tracehead; tracehead = &trace;
905 trace.file = LOCATE_string;
906 variable[0] = self;
907 variable[2] = NEW_Array_array___Array___with_capacity(TAG_Int(3)); /*new Array[String]*/
908 variable[3] = NEW_String_string___String___with_native(BOX_NativeString("<"), TAG_Int(1)); /*new String*/
909 variable[4] = variable[3];
910 CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[4]) /*AbstractArray::add*/;
911 variable[5] = variable[0];
912 variable[5] = TAG_Int((bigint)variable[5]);
913 variable[5] = CALL_string___Int___to_hex(variable[5])(variable[5]) /*Int::to_hex*/;
914 variable[6] = variable[5];
915 CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[6]) /*AbstractArray::add*/;
916 variable[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
917 variable[8] = variable[7];
918 CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[8]) /*AbstractArray::add*/;
919 variable[2] = CALL_string___Object___to_s(variable[2])(variable[2]) /*Object::to_s*/;
920 variable[1] = variable[2];
921 goto return_label41;
922 return_label41: while(false);
923 tracehead = trace.prev;
924 return variable[1];
925 }
926 val_t string___Object___args(val_t self) {
927 struct trace_t trace = {NULL, NULL, 356, LOCATE_string___Object___args};
928 val_t variable[3];
929 void **closurevariable = NULL;
930 trace.prev = tracehead; tracehead = &trace;
931 trace.file = LOCATE_string;
932 variable[0] = self;
933 variable[2] = variable[0];
934 variable[2] = (G_sys);
935 variable[2] = CALL_string___Object___args(variable[2])(variable[2]) /*Sys::args*/;
936 variable[1] = variable[2];
937 goto return_label42;
938 return_label42: while(false);
939 tracehead = trace.prev;
940 return variable[1];
941 }
942 val_t string___Bool___to_s(val_t self) {
943 struct trace_t trace = {NULL, NULL, 363, LOCATE_string___Bool___to_s};
944 static val_t once_value_44; static int once_bool_44; /* Once value for variable[2]*/
945 static val_t once_value_45; static int once_bool_45; /* Once value for variable[2]*/
946 val_t variable[3];
947 void **closurevariable = NULL;
948 trace.prev = tracehead; tracehead = &trace;
949 trace.file = LOCATE_string;
950 variable[0] = self;
951 variable[2] = variable[0];
952 if (UNTAG_Bool(variable[2])) { /*if*/
953 if (once_bool_44) variable[2] = once_value_44;
954 else {
955 variable[2] = NEW_String_string___String___with_native(BOX_NativeString("true"), TAG_Int(4)); /*new String*/
956 once_value_44 = variable[2];
957 once_bool_44 = true;
958 }
959 variable[1] = variable[2];
960 goto return_label43;
961 } else { /*if*/
962 if (once_bool_45) variable[2] = once_value_45;
963 else {
964 variable[2] = NEW_String_string___String___with_native(BOX_NativeString("false"), TAG_Int(5)); /*new String*/
965 once_value_45 = variable[2];
966 once_bool_45 = true;
967 }
968 variable[1] = variable[2];
969 goto return_label43;
970 }
971 return_label43: while(false);
972 tracehead = trace.prev;
973 return variable[1];
974 }
975 val_t string___Int___to_s(val_t self) {
976 struct trace_t trace = {NULL, NULL, 398, LOCATE_string___Int___to_s};
977 val_t variable[3];
978 void **closurevariable = NULL;
979 trace.prev = tracehead; tracehead = &trace;
980 trace.file = LOCATE_string;
981 variable[0] = self;
982 variable[2] = variable[0];
983 variable[2] = CALL_string___Int___to_base(variable[2])(variable[2], TAG_Int(10), TAG_Bool(true)) /*Int::to_base*/;
984 variable[1] = variable[2];
985 goto return_label46;
986 return_label46: while(false);
987 tracehead = trace.prev;
988 return variable[1];
989 }
990 void string___Int___fill_string(val_t self, val_t param0, val_t param1, val_t param2) {
991 struct trace_t trace = {NULL, NULL, 374, LOCATE_string___Int___fill_string};
992 val_t variable[9];
993 void **closurevariable = NULL;
994 trace.prev = tracehead; tracehead = &trace;
995 trace.file = LOCATE_string;
996 variable[0] = self;
997 variable[1] = param0;
998 variable[2] = param1;
999 variable[3] = param2;
1000 /*variable[5] is variable n*/
1001 variable[6] = variable[0];
1002 variable[6] = TAG_Bool(UNTAG_Int(variable[6])<UNTAG_Int( TAG_Int(0)));
1003 if (UNTAG_Bool(variable[6])) { /*if*/
1004 variable[6] = variable[0];
1005 variable[6] = TAG_Int(-UNTAG_Int(variable[6]));
1006 variable[5] = variable[6] /*n=*/;
1007 CALL_abstract_collection___Map_____braeq( variable[1] /*s*/)( variable[1] /*s*/, TAG_Int(0), TAG_Char('-')) /*String::[]=*/;
1008 } else { /*if*/
1009 variable[6] = variable[0];
1010 variable[6] = TAG_Bool((variable[6])==( TAG_Int(0)));
1011 if (UNTAG_Bool(variable[6])) { /*if*/
1012 CALL_abstract_collection___Map_____braeq( variable[1] /*s*/)( variable[1] /*s*/, TAG_Int(0), TAG_Char('0')) /*String::[]=*/;
1013 goto return_label47;
1014 } else { /*if*/
1015 variable[6] = variable[0];
1016 variable[5] = variable[6] /*n=*/;
1017 }
1018 }
1019 variable[7] = variable[0];
1020 variable[7] = CALL_kernel___Int___digit_count(variable[7])(variable[7], variable[2] /*base*/) /*Int::digit_count*/;
1021 variable[7] = TAG_Int(UNTAG_Int(variable[7])-UNTAG_Int( TAG_Int(1)));
1022 variable[6] = variable[7];
1023 while (true) { /*while*/
1024 variable[7] = TAG_Bool(UNTAG_Int( variable[6] /*pos*/)>=UNTAG_Int( TAG_Int(0)));
1025 variable[8] = variable[7];
1026 if (UNTAG_Bool(variable[8])) { /* and */
1027 variable[8] = TAG_Bool(UNTAG_Int( variable[5] /*n*/)>UNTAG_Int( TAG_Int(0)));
1028 }
1029 variable[7] = variable[8];
1030 if (!UNTAG_Bool(variable[7])) break; /* while*/
1031 variable[7] = TAG_Int(UNTAG_Int( variable[5] /*n*/)%UNTAG_Int( variable[2] /*base*/));
1032 variable[7] = CALL_kernel___Int___to_c(variable[7])(variable[7]) /*Int::to_c*/;
1033 CALL_abstract_collection___Map_____braeq( variable[1] /*s*/)( variable[1] /*s*/, variable[6] /*pos*/, variable[7]) /*String::[]=*/;
1034 variable[7] = TAG_Int(UNTAG_Int( variable[5] /*n*/)/UNTAG_Int( variable[2] /*base*/));
1035 variable[5] = variable[7] /*n=*/;
1036 variable[6] = TAG_Int(UNTAG_Int(variable[6])-UNTAG_Int( TAG_Int(1))) /*pos*/;
1037 continue_48: while(0);
1038 }
1039 break_48: while(0);
1040 return_label47: while(false);
1041 tracehead = trace.prev;
1042 return;
1043 }
1044 val_t string___Int___to_hex(val_t self) {
1045 struct trace_t trace = {NULL, NULL, 401, LOCATE_string___Int___to_hex};
1046 val_t variable[3];
1047 void **closurevariable = NULL;
1048 trace.prev = tracehead; tracehead = &trace;
1049 trace.file = LOCATE_string;
1050 variable[0] = self;
1051 variable[2] = variable[0];
1052 variable[2] = CALL_string___Int___to_base(variable[2])(variable[2], TAG_Int(16), TAG_Bool(false)) /*Int::to_base*/;
1053 variable[1] = variable[2];
1054 goto return_label49;
1055 return_label49: while(false);
1056 tracehead = trace.prev;
1057 return variable[1];
1058 }
1059 val_t string___Int___to_base(val_t self, val_t param0, val_t param1) {
1060 struct trace_t trace = {NULL, NULL, 404, LOCATE_string___Int___to_base};
1061 val_t variable[7];
1062 void **closurevariable = NULL;
1063 trace.prev = tracehead; tracehead = &trace;
1064 trace.file = LOCATE_string;
1065 variable[0] = self;
1066 variable[1] = param0;
1067 variable[2] = param1;
1068 variable[5] = variable[0];
1069 variable[5] = CALL_kernel___Int___digit_count(variable[5])(variable[5], variable[1] /*base*/) /*Int::digit_count*/;
1070 variable[4] = variable[5];
1071 variable[6] = NEW_String_string___String___filled_with( TAG_Char(' '), variable[4] /*l*/); /*new String*/
1072 variable[5] = variable[6];
1073 variable[6] = variable[0];
1074 CALL_string___Int___fill_string(variable[6])(variable[6], variable[5] /*s*/, variable[1] /*base*/, variable[2] /*signed*/) /*Int::fill_string*/;
1075 variable[3] = variable[5] /*s*/;
1076 goto return_label50;
1077 return_label50: while(false);
1078 tracehead = trace.prev;
1079 return variable[3];
1080 }
1081 val_t string___Float___to_s(val_t self) {
1082 struct trace_t trace = {NULL, NULL, 415, LOCATE_string___Float___to_s};
1083 val_t variable[3];
1084 void **closurevariable = NULL;
1085 trace.prev = tracehead; tracehead = &trace;
1086 trace.file = LOCATE_string;
1087 variable[0] = self;
1088 variable[2] = variable[0];
1089 variable[2] = CALL_string___Float___to_precision(variable[2])(variable[2], TAG_Int(6)) /*Float::to_precision*/;
1090 variable[1] = variable[2];
1091 goto return_label51;
1092 return_label51: while(false);
1093 tracehead = trace.prev;
1094 return variable[1];
1095 }
1096 val_t string___Float___to_precision(val_t self, val_t param0) {
1097 struct trace_t trace = {NULL, NULL, 417, LOCATE_string___Float___to_precision};
1098 val_t variable[15];
1099 void **closurevariable = NULL;
1100 trace.prev = tracehead; tracehead = &trace;
1101 trace.file = LOCATE_string;
1102 variable[0] = self;
1103 variable[1] = param0;
1104 variable[3] = TAG_Bool(( variable[1] /*nb*/)==( TAG_Int(0)));
1105 if (UNTAG_Bool(variable[3])) { /*if*/
1106 variable[3] = variable[0];
1107 variable[3] = TAG_Int((bigint)UNBOX_Float(variable[3]));
1108 variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Int::to_s*/;
1109 variable[2] = variable[3];
1110 goto return_label52;
1111 }
1112 variable[4] = variable[0];
1113 variable[4] = TAG_Int((bigint)UNBOX_Float(variable[4]));
1114 variable[3] = variable[4];
1115 variable[5] = BOX_Float(1.0);
1116 variable[4] = variable[5];
1117 while (true) { /*while*/
1118 variable[5] = TAG_Bool(UNTAG_Int( variable[1] /*nb*/)>UNTAG_Int( TAG_Int(0)));
1119 if (!UNTAG_Bool(variable[5])) break; /* while*/
1120 variable[5] = BOX_Float(10.0);
1121 variable[5] = BOX_Float(UNBOX_Float( variable[4] /*dec*/)*UNBOX_Float(variable[5]));
1122 variable[4] = variable[5] /*dec=*/;
1123 variable[1] = TAG_Int(UNTAG_Int(variable[1])-UNTAG_Int( TAG_Int(1))) /*nb*/;
1124 continue_53: while(0);
1125 }
1126 break_53: while(0);
1127 variable[6] = variable[0];
1128 variable[7] = BOX_Float((float)UNTAG_Int( variable[3] /*i*/));
1129 variable[6] = BOX_Float(UNBOX_Float(variable[6])-UNBOX_Float(variable[7]));
1130 variable[6] = BOX_Float(UNBOX_Float(variable[6])*UNBOX_Float( variable[4] /*dec*/));
1131 variable[6] = TAG_Int((bigint)UNBOX_Float(variable[6]));
1132 variable[5] = variable[6];
1133 variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(5)); /*new Array[String]*/
1134 variable[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
1135 variable[8] = variable[7];
1136 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[8]) /*AbstractArray::add*/;
1137 variable[9] = variable[3] /*i*/;
1138 variable[9] = CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/;
1139 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[9]) /*AbstractArray::add*/;
1140 variable[10] = NEW_String_string___String___with_native(BOX_NativeString("."), TAG_Int(1)); /*new String*/
1141 variable[11] = variable[10];
1142 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[11]) /*AbstractArray::add*/;
1143 variable[12] = variable[5] /*d*/;
1144 variable[12] = CALL_string___Object___to_s(variable[12])(variable[12]) /*Object::to_s*/;
1145 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[12]) /*AbstractArray::add*/;
1146 variable[13] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
1147 variable[14] = variable[13];
1148 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[14]) /*AbstractArray::add*/;
1149 variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
1150 variable[2] = variable[6];
1151 goto return_label52;
1152 return_label52: while(false);
1153 tracehead = trace.prev;
1154 return variable[2];
1155 }
1156 val_t string___Char___to_s(val_t self) {
1157 struct trace_t trace = {NULL, NULL, 434, LOCATE_string___Char___to_s};
1158 val_t variable[4];
1159 void **closurevariable = NULL;
1160 trace.prev = tracehead; tracehead = &trace;
1161 trace.file = LOCATE_string;
1162 variable[0] = self;
1163 variable[3] = NEW_String_string___String___with_capacity( TAG_Int(1)); /*new String*/
1164 variable[2] = variable[3];
1165 variable[3] = variable[0];
1166 CALL_abstract_collection___Map_____braeq( variable[2] /*s*/)( variable[2] /*s*/, TAG_Int(0), variable[3]) /*String::[]=*/;
1167 variable[1] = variable[2] /*s*/;
1168 goto return_label54;
1169 return_label54: while(false);
1170 tracehead = trace.prev;
1171 return variable[1];
1172 }
1173 val_t string___Collection___to_s(val_t self) {
1174 struct trace_t trace = {NULL, NULL, 443, LOCATE_string___Collection___to_s};
1175 val_t variable[7];
1176 void **closurevariable = NULL;
1177 trace.prev = tracehead; tracehead = &trace;
1178 trace.file = LOCATE_string;
1179 variable[0] = self;
1180 variable[3] = NEW_String_string___String___init(); /*new String*/
1181 variable[2] = variable[3];
1182 variable[3] = variable[0];
1183 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*Collection::iterator*/;
1184 while (true) { /*for*/
1185 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*Iterator::is_ok*/;
1186 if (!UNTAG_Bool(variable[4])) break; /*for*/
1187 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*Iterator::item*/;
1188 variable[5] = variable[4];
1189 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*e*/ == NIT_NULL /*null*/) || (( variable[5] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*e*/)( variable[5] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1190 if (UNTAG_Bool(variable[6])) { /*if*/
1191 variable[6] = CALL_string___Object___to_s( variable[5] /*e*/)( variable[5] /*e*/) /*Object::to_s*/;
1192 CALL_abstract_collection___IndexedCollection___append( variable[2] /*s*/)( variable[2] /*s*/, variable[6]) /*String::append*/;
1193 }
1194 continue_56: while(0);
1195 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
1196 }
1197 break_56: while(0);
1198 variable[1] = variable[2] /*s*/;
1199 goto return_label55;
1200 return_label55: while(false);
1201 tracehead = trace.prev;
1202 return variable[1];
1203 }
1204 val_t string___Collection___join(val_t self, val_t param0) {
1205 struct trace_t trace = {NULL, NULL, 451, LOCATE_string___Collection___join};
1206 val_t variable[7];
1207 void **closurevariable = NULL;
1208 trace.prev = tracehead; tracehead = &trace;
1209 trace.file = LOCATE_string;
1210 variable[0] = self;
1211 variable[1] = param0;
1212 variable[3] = variable[0];
1213 variable[3] = CALL_abstract_collection___Collection___is_empty(variable[3])(variable[3]) /*Collection::is_empty*/;
1214 if (UNTAG_Bool(variable[3])) { /*if*/
1215 variable[3] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
1216 variable[2] = variable[3];
1217 goto return_label57;
1218 }
1219 variable[4] = NEW_String_string___String___init(); /*new String*/
1220 variable[3] = variable[4];
1221 variable[5] = variable[0];
1222 variable[5] = CALL_abstract_collection___Collection___iterator(variable[5])(variable[5]) /*Collection::iterator*/;
1223 variable[4] = variable[5];
1224 variable[6] = CALL_abstract_collection___Iterator___item( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::item*/;
1225 variable[5] = variable[6];
1226 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*e*/ == NIT_NULL /*null*/) || (( variable[5] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*e*/)( variable[5] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1227 if (UNTAG_Bool(variable[6])) { /*if*/
1228 variable[6] = CALL_string___Object___to_s( variable[5] /*e*/)( variable[5] /*e*/) /*Object::to_s*/;
1229 CALL_abstract_collection___IndexedCollection___append( variable[3] /*s*/)( variable[3] /*s*/, variable[6]) /*String::append*/;
1230 }
1231 CALL_abstract_collection___Iterator___next( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::next*/;
1232 while (true) { /*while*/
1233 variable[6] = CALL_abstract_collection___Iterator___is_ok( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::is_ok*/;
1234 if (!UNTAG_Bool(variable[6])) break; /* while*/
1235 CALL_abstract_collection___IndexedCollection___append( variable[3] /*s*/)( variable[3] /*s*/, variable[1] /*sep*/) /*String::append*/;
1236 variable[6] = CALL_abstract_collection___Iterator___item( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::item*/;
1237 variable[5] = variable[6] /*e=*/;
1238 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*e*/ == NIT_NULL /*null*/) || (( variable[5] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*e*/)( variable[5] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1239 if (UNTAG_Bool(variable[6])) { /*if*/
1240 variable[6] = CALL_string___Object___to_s( variable[5] /*e*/)( variable[5] /*e*/) /*Object::to_s*/;
1241 CALL_abstract_collection___IndexedCollection___append( variable[3] /*s*/)( variable[3] /*s*/, variable[6]) /*String::append*/;
1242 }
1243 CALL_abstract_collection___Iterator___next( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::next*/;
1244 continue_58: while(0);
1245 }
1246 break_58: while(0);
1247 variable[2] = variable[3] /*s*/;
1248 goto return_label57;
1249 return_label57: while(false);
1250 tracehead = trace.prev;
1251 return variable[2];
1252 }
1253 val_t string___Map___map_join(val_t self, val_t param0, val_t param1) {
1254 struct trace_t trace = {NULL, NULL, 476, LOCATE_string___Map___map_join};
1255 val_t variable[20];
1256 void **closurevariable = NULL;
1257 trace.prev = tracehead; tracehead = &trace;
1258 trace.file = LOCATE_string;
1259 variable[0] = self;
1260 variable[1] = param0;
1261 variable[2] = param1;
1262 variable[4] = variable[0];
1263 variable[4] = CALL_abstract_collection___Collection___is_empty(variable[4])(variable[4]) /*Collection::is_empty*/;
1264 if (UNTAG_Bool(variable[4])) { /*if*/
1265 variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
1266 variable[3] = variable[4];
1267 goto return_label59;
1268 }
1269 variable[5] = NEW_String_string___String___init(); /*new String*/
1270 variable[4] = variable[5];
1271 variable[6] = variable[0];
1272 variable[6] = CALL_abstract_collection___Collection___iterator(variable[6])(variable[6]) /*Map::iterator*/;
1273 variable[5] = variable[6];
1274 variable[7] = CALL_abstract_collection___MapIterator___key( variable[5] /*i*/)( variable[5] /*i*/) /*MapIterator::key*/;
1275 variable[6] = variable[7];
1276 variable[8] = CALL_abstract_collection___Iterator___item( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::item*/;
1277 variable[7] = variable[8];
1278 variable[8] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[7] /*e*/ == NIT_NULL /*null*/) || (( variable[7] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[7] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[7] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[7] /*e*/)( variable[7] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1279 if (UNTAG_Bool(variable[8])) { /*if*/
1280 variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(7)); /*new Array[String]*/
1281 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
1282 variable[10] = variable[9];
1283 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[10]) /*AbstractArray::add*/;
1284 variable[11] = variable[6] /*k*/;
1285 variable[11] = CALL_string___Object___to_s(variable[11])(variable[11]) /*Object::to_s*/;
1286 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[11]) /*AbstractArray::add*/;
1287 variable[12] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
1288 variable[13] = variable[12];
1289 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[13]) /*AbstractArray::add*/;
1290 variable[14] = variable[2] /*couple_sep*/;
1291 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[14]) /*AbstractArray::add*/;
1292 variable[15] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
1293 variable[16] = variable[15];
1294 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[16]) /*AbstractArray::add*/;
1295 variable[17] = variable[7] /*e*/;
1296 variable[17] = CALL_string___Object___to_s(variable[17])(variable[17]) /*Object::to_s*/;
1297 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[17]) /*AbstractArray::add*/;
1298 variable[18] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
1299 variable[19] = variable[18];
1300 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[19]) /*AbstractArray::add*/;
1301 variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
1302 CALL_abstract_collection___IndexedCollection___append( variable[4] /*s*/)( variable[4] /*s*/, variable[8]) /*String::append*/;
1303 }
1304 CALL_abstract_collection___Iterator___next( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::next*/;
1305 while (true) { /*while*/
1306 variable[8] = CALL_abstract_collection___Iterator___is_ok( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::is_ok*/;
1307 if (!UNTAG_Bool(variable[8])) break; /* while*/
1308 CALL_abstract_collection___IndexedCollection___append( variable[4] /*s*/)( variable[4] /*s*/, variable[1] /*sep*/) /*String::append*/;
1309 variable[8] = CALL_abstract_collection___MapIterator___key( variable[5] /*i*/)( variable[5] /*i*/) /*MapIterator::key*/;
1310 variable[6] = variable[8] /*k=*/;
1311 variable[8] = CALL_abstract_collection___Iterator___item( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::item*/;
1312 variable[7] = variable[8] /*e=*/;
1313 variable[8] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[7] /*e*/ == NIT_NULL /*null*/) || (( variable[7] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[7] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[7] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[7] /*e*/)( variable[7] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1314 if (UNTAG_Bool(variable[8])) { /*if*/
1315 variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(7)); /*new Array[String]*/
1316 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
1317 variable[10] = variable[9];
1318 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[10]) /*AbstractArray::add*/;
1319 variable[11] = variable[6] /*k*/;
1320 variable[11] = CALL_string___Object___to_s(variable[11])(variable[11]) /*Object::to_s*/;
1321 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[11]) /*AbstractArray::add*/;
1322 variable[12] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
1323 variable[13] = variable[12];
1324 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[13]) /*AbstractArray::add*/;
1325 variable[14] = variable[2] /*couple_sep*/;
1326 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[14]) /*AbstractArray::add*/;
1327 variable[15] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
1328 variable[16] = variable[15];
1329 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[16]) /*AbstractArray::add*/;
1330 variable[17] = variable[7] /*e*/;
1331 variable[17] = CALL_string___Object___to_s(variable[17])(variable[17]) /*Object::to_s*/;
1332 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[17]) /*AbstractArray::add*/;
1333 variable[18] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
1334 variable[19] = variable[18];
1335 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[19]) /*AbstractArray::add*/;
1336 variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
1337 CALL_abstract_collection___IndexedCollection___append( variable[4] /*s*/)( variable[4] /*s*/, variable[8]) /*String::append*/;
1338 }
1339 CALL_abstract_collection___Iterator___next( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::next*/;
1340 continue_60: while(0);
1341 }
1342 break_60: while(0);
1343 variable[3] = variable[4] /*s*/;
1344 goto return_label59;
1345 return_label59: while(false);
1346 tracehead = trace.prev;
1347 return variable[3];
1348 }
1349 val_t string___NativeString_____bra(val_t self, val_t param0) {
1350 struct trace_t trace = {NULL, NULL, 508, LOCATE_string___NativeString_____bra};
1351 val_t *variable = NULL;
1352 void **closurevariable = NULL;
1353 trace.prev = tracehead; tracehead = &trace;
1354 trace.file = LOCATE_string;
1355 tracehead = trace.prev;
1356 return TAG_Char(UNBOX_NativeString( self)[UNTAG_Int( param0)]);
1357 }
1358 void string___NativeString_____braeq(val_t self, val_t param0, val_t param1) {
1359 struct trace_t trace = {NULL, NULL, 509, LOCATE_string___NativeString_____braeq};
1360 val_t *variable = NULL;
1361 void **closurevariable = NULL;
1362 trace.prev = tracehead; tracehead = &trace;
1363 trace.file = LOCATE_string;
1364 UNBOX_NativeString( self)[UNTAG_Int( param0)]=UNTAG_Char( param1);
1365 tracehead = trace.prev;
1366 return;
1367 }
1368 void string___NativeString___copy_to(val_t self, val_t param0, val_t param1, val_t param2, val_t param3) {
1369 struct trace_t trace = {NULL, NULL, 510, LOCATE_string___NativeString___copy_to};
1370 val_t *variable = NULL;
1371 void **closurevariable = NULL;
1372 trace.prev = tracehead; tracehead = &trace;
1373 trace.file = LOCATE_string;
1374 (void)memcpy(UNBOX_NativeString( param0)+UNTAG_Int( param3), UNBOX_NativeString( self)+UNTAG_Int( param2), UNTAG_Int( param1));
1375 tracehead = trace.prev;
1376 return;
1377 }
1378 val_t string___NativeString___cstring_length(val_t self) {
1379 struct trace_t trace = {NULL, NULL, 512, LOCATE_string___NativeString___cstring_length};
1380 val_t variable[4];
1381 void **closurevariable = NULL;
1382 trace.prev = tracehead; tracehead = &trace;
1383 trace.file = LOCATE_string;
1384 variable[0] = self;
1385 variable[2] = TAG_Int(0);
1386 while (true) { /*while*/
1387 variable[3] = variable[0];
1388 variable[3] = TAG_Char(UNBOX_NativeString(variable[3])[UNTAG_Int( variable[2] /*l*/)]);
1389 variable[3] = TAG_Bool((variable[3])!=( TAG_Char('\0')));
1390 if (!UNTAG_Bool(variable[3])) break; /* while*/
1391 variable[2] = TAG_Int(UNTAG_Int(variable[2])+UNTAG_Int( TAG_Int(1))) /*l*/;
1392 continue_62: while(0);
1393 }
1394 break_62: while(0);
1395 variable[1] = variable[2] /*l*/;
1396 goto return_label61;
1397 return_label61: while(false);
1398 tracehead = trace.prev;
1399 return variable[1];
1400 }
1401 val_t string___NativeString___atoi(val_t self) {
1402 struct trace_t trace = {NULL, NULL, 519, LOCATE_string___NativeString___atoi};
1403 val_t *variable = NULL;
1404 void **closurevariable = NULL;
1405 trace.prev = tracehead; tracehead = &trace;
1406 trace.file = LOCATE_string;
1407 tracehead = trace.prev;
1408 return TAG_Int(atoi(UNBOX_NativeString( self)));
1409 }
1410 void string___NativeString___init(val_t self, int* init_table) {
1411 struct trace_t trace = {NULL, NULL, 0, LOCATE_string___NativeString___init};
1412 val_t *variable = NULL;
1413 void **closurevariable = NULL;
1414 trace.prev = tracehead; tracehead = &trace;
1415 trace.file = LOCATE_string;
1416 tracehead = trace.prev;
1417 return;
1418 }
1419 val_t string___StringCapable___calloc_string(val_t self, val_t param0) {
1420 struct trace_t trace = {NULL, NULL, 524, LOCATE_string___StringCapable___calloc_string};
1421 val_t *variable = NULL;
1422 void **closurevariable = NULL;
1423 trace.prev = tracehead; tracehead = &trace;
1424 trace.file = LOCATE_string;
1425 tracehead = trace.prev;
1426 return BOX_NativeString((char*)malloc((UNTAG_Int( param0) * sizeof(char))));
1427 }
1428 void string___StringCapable___init(val_t self, int* init_table) {
1429 struct trace_t trace = {NULL, NULL, 0, LOCATE_string___StringCapable___init};
1430 val_t *variable = NULL;
1431 void **closurevariable = NULL;
1432 trace.prev = tracehead; tracehead = &trace;
1433 trace.file = LOCATE_string;
1434 tracehead = trace.prev;
1435 return;
1436 }
1437 val_t string___Sys___args(val_t self) {
1438 struct trace_t trace = {NULL, NULL, 530, LOCATE_string___Sys___args};
1439 val_t variable[3];
1440 void **closurevariable = NULL;
1441 trace.prev = tracehead; tracehead = &trace;
1442 trace.file = LOCATE_string;
1443 variable[0] = self;
1444 variable[2] = variable[0];
1445 variable[2] = ATTR_string___Sys____args_cache(variable[2]) /*Sys::_args_cache*/;
1446 variable[2] = TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[2])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[2], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[2])(variable[2], NIT_NULL /*null*/) /*Object::==*/)))));
1447 if (UNTAG_Bool(variable[2])) { /*if*/
1448 variable[2] = variable[0];
1449 CALL_string___Sys___init_args(variable[2])(variable[2]) /*Sys::init_args*/;
1450 }
1451 variable[2] = variable[0];
1452 variable[2] = ATTR_string___Sys____args_cache(variable[2]) /*Sys::_args_cache*/;
1453 variable[1] = variable[2];
1454 goto return_label63;
1455 return_label63: while(false);
1456 tracehead = trace.prev;
1457 return variable[1];
1458 }
1459 val_t string___Sys___program_name(val_t self) {
1460 struct trace_t trace = {NULL, NULL, 536, LOCATE_string___Sys___program_name};
1461 val_t variable[4];
1462 void **closurevariable = NULL;
1463 trace.prev = tracehead; tracehead = &trace;
1464 trace.file = LOCATE_string;
1465 variable[0] = self;
1466 variable[2] = variable[0];
1467 variable[2] = CALL_string___Sys___native_argv(variable[2])(variable[2], TAG_Int(0)) /*Sys::native_argv*/;
1468 variable[3] = NEW_String_string___String___from_cstring(variable[2]); /*new String*/
1469 variable[2] = variable[3];
1470 variable[1] = variable[2];
1471 goto return_label64;
1472 return_label64: while(false);
1473 tracehead = trace.prev;
1474 return variable[1];
1475 }
1476 void string___Sys___init_args(val_t self) {
1477 struct trace_t trace = {NULL, NULL, 542, LOCATE_string___Sys___init_args};
1478 val_t variable[8];
1479 void **closurevariable = NULL;
1480 trace.prev = tracehead; tracehead = &trace;
1481 trace.file = LOCATE_string;
1482 variable[0] = self;
1483 variable[3] = variable[0];
1484 variable[3] = CALL_string___Sys___native_argc(variable[3])(variable[3]) /*Sys::native_argc*/;
1485 variable[2] = variable[3];
1486 variable[4] = NEW_Array_array___Array___with_capacity( TAG_Int(0)); /*new Array[String]*/
1487 variable[3] = variable[4];
1488 variable[4] = TAG_Int(1);
1489 while (true) { /*while*/
1490 variable[5] = TAG_Bool(UNTAG_Int( variable[4] /*i*/)<UNTAG_Int( variable[2] /*argc*/));
1491 if (!UNTAG_Bool(variable[5])) break; /* while*/
1492 variable[5] = TAG_Int(UNTAG_Int( variable[4] /*i*/)-UNTAG_Int( TAG_Int(1)));
1493 variable[6] = variable[0];
1494 variable[6] = CALL_string___Sys___native_argv(variable[6])(variable[6], variable[4] /*i*/) /*Sys::native_argv*/;
1495 variable[7] = NEW_String_string___String___from_cstring(variable[6]); /*new String*/
1496 variable[6] = variable[7];
1497 CALL_abstract_collection___Map_____braeq( variable[3] /*args*/)( variable[3] /*args*/, variable[5], variable[6]) /*Array::[]=*/;
1498 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
1499 continue_66: while(0);
1500 }
1501 break_66: while(0);
1502 variable[5] = variable[0];
1503 ATTR_string___Sys____args_cache(variable[5]) /*Sys::_args_cache*/ = variable[3] /*args*/;
1504 return_label65: while(false);
1505 tracehead = trace.prev;
1506 return;
1507 }
1508 val_t string___Sys___native_argc(val_t self) {
1509 struct trace_t trace = {NULL, NULL, 555, LOCATE_string___Sys___native_argc};
1510 val_t *variable = NULL;
1511 void **closurevariable = NULL;
1512 trace.prev = tracehead; tracehead = &trace;
1513 trace.file = LOCATE_string;
1514 tracehead = trace.prev;
1515 return TAG_Int(kernel_Sys_Sys_native_argc_0( self));
1516 }
1517 val_t string___Sys___native_argv(val_t self, val_t param0) {
1518 struct trace_t trace = {NULL, NULL, 557, LOCATE_string___Sys___native_argv};
1519 val_t *variable = NULL;
1520 void **closurevariable = NULL;
1521 trace.prev = tracehead; tracehead = &trace;
1522 trace.file = LOCATE_string;
1523 tracehead = trace.prev;
1524 return BOX_NativeString(kernel_Sys_Sys_native_argv_1( self, UNTAG_Int( param0)));
1525 }