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