lib: remove exec::kill and exec::term
[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 void string___AbstractString___output(val_t self) {
4 struct trace_t trace = {NULL, NULL, 150, LOCATE_string___AbstractString___output};
5 val_t variable[4];
6 struct WBT_ **closurevariable = NULL;
7 trace.prev = tracehead; tracehead = &trace;
8 trace.file = LOCATE_string;
9 /* Register variable[0]: Local variable */
10 variable[0] = self;
11 /* Register variable[1]: Method return value and escape marker */
12 /* Register variable[2]: Local variable */
13 variable[2] = TAG_Int(0);
14 while (true) { /*while*/
15 /* Register variable[3]: Result */
16 variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
17 /* Register variable[3]: Result */
18 variable[3] = TAG_Bool(UNTAG_Int( variable[2] /*i*/)<UNTAG_Int(variable[3]));
19 if (!UNTAG_Bool(variable[3])) break; /* while*/
20 /* Register variable[3]: Result */
21 variable[3] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
22 /* Register variable[3]: Result */
23 variable[3] = TAG_Char(UNBOX_NativeString(variable[3])[UNTAG_Int( variable[2] /*i*/)]);
24 printf("%c", (unsigned char)UNTAG_Char(variable[3]));
25 variable[2] = TAG_Int(UNTAG_Int(variable[2])+UNTAG_Int( TAG_Int(1))) /*i*/;
26 continue_1: while(0);
27 }
28 break_1: while(0);
29 return_label0: while(false);
30 tracehead = trace.prev;
31 return;
32 }
33 val_t string___AbstractString_____bra(val_t self, val_t param0) {
34 struct trace_t trace = {NULL, NULL, 27, LOCATE_string___AbstractString_____bra};
35 val_t variable[4];
36 struct WBT_ **closurevariable = NULL;
37 trace.prev = tracehead; tracehead = &trace;
38 trace.file = LOCATE_string;
39 /* Register variable[0]: Local variable */
40 variable[0] = self;
41 /* Register variable[1]: Local variable */
42 variable[1] = param0;
43 /* Register variable[2]: Method return value and escape marker */
44 /* Register variable[3]: Result */
45 variable[3] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
46 /* Register variable[3]: Result */
47 variable[3] = TAG_Char(UNBOX_NativeString(variable[3])[UNTAG_Int( variable[1] /*index*/)]);
48 variable[2] = variable[3];
49 goto return_label2;
50 return_label2: while(false);
51 tracehead = trace.prev;
52 return variable[2];
53 }
54 val_t string___AbstractString___items(val_t self) {
55 struct trace_t trace = {NULL, NULL, 25, LOCATE_string___AbstractString___items};
56 val_t *variable = NULL;
57 struct WBT_ **closurevariable = NULL;
58 trace.prev = tracehead; tracehead = &trace;
59 trace.file = LOCATE_string;
60 tracehead = trace.prev;
61 return ATTR_string___AbstractString____items( self) /*AbstractString::_items*/;
62 }
63 val_t string___AbstractString___substring(val_t self, val_t param0, val_t param1) {
64 struct trace_t trace = {NULL, NULL, 29, LOCATE_string___AbstractString___substring};
65 static val_t once_value_5 = NIT_NULL; /* Once value for string variable[4]*/
66 val_t variable[6];
67 struct WBT_ **closurevariable = NULL;
68 trace.prev = tracehead; tracehead = &trace;
69 trace.file = LOCATE_string;
70 /* Register variable[0]: Local variable */
71 variable[0] = self;
72 /* Register variable[1]: Local variable */
73 variable[1] = param0;
74 /* Register variable[2]: Local variable */
75 variable[2] = param1;
76 /* Register variable[3]: Method return value and escape marker */
77 /* Register variable[4]: Result */
78 variable[4] = TAG_Bool(UNTAG_Int( variable[2] /*count*/)>=UNTAG_Int( TAG_Int(0)));
79 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___AbstractString___substring, LOCATE_string, 37); nit_exit(1);}
80 variable[2] = TAG_Int(UNTAG_Int(variable[2])+UNTAG_Int( variable[1] /*from*/)) /*count*/;
81 /* Register variable[4]: Result */
82 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*from*/)<UNTAG_Int( TAG_Int(0)));
83 if (UNTAG_Bool(variable[4])) { /*if*/
84 variable[1] = TAG_Int(0) /*from=*/;
85 }
86 /* Register variable[4]: Result */
87 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
88 /* Register variable[4]: Result */
89 variable[4] = TAG_Bool(UNTAG_Int( variable[2] /*count*/)>UNTAG_Int(variable[4]));
90 if (UNTAG_Bool(variable[4])) { /*if*/
91 /* Register variable[4]: Result */
92 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
93 variable[2] = variable[4] /*count=*/;
94 }
95 /* Register variable[4]: Result */
96 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*from*/)<UNTAG_Int( variable[2] /*count*/));
97 if (UNTAG_Bool(variable[4])) { /*if*/
98 /* Register variable[4]: Local variable */
99 /* Register variable[5]: Result */
100 variable[5] = TAG_Int(UNTAG_Int( variable[2] /*count*/)-UNTAG_Int( variable[1] /*from*/));
101 /* Register variable[5]: Result */
102 variable[5] = NEW_Buffer_string___Buffer___with_capacity(variable[5]) /*new Buffer*/;
103 variable[4] = variable[5];
104 while (true) { /*while*/
105 /* Register variable[5]: Result */
106 variable[5] = TAG_Bool(UNTAG_Int( variable[1] /*from*/)<UNTAG_Int( variable[2] /*count*/));
107 if (!UNTAG_Bool(variable[5])) break; /* while*/
108 /* Register variable[5]: Result */
109 variable[5] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
110 /* Register variable[5]: Result */
111 variable[5] = TAG_Char(UNBOX_NativeString(variable[5])[UNTAG_Int( variable[1] /*from*/)]);
112 CALL_abstract_collection___IndexedCollection___push( variable[4] /*r*/)( variable[4] /*r*/, variable[5]) /*AbstractArray::push*/;
113 variable[1] = TAG_Int(UNTAG_Int(variable[1])+UNTAG_Int( TAG_Int(1))) /*from*/;
114 continue_4: while(0);
115 }
116 break_4: while(0);
117 /* Register variable[5]: Result */
118 variable[5] = CALL_string___Object___to_s( variable[4] /*r*/)( variable[4] /*r*/) /*Buffer::to_s*/;
119 variable[3] = variable[5];
120 goto return_label3;
121 } else { /*if*/
122 /* Register variable[4]: Once String constant */
123 if (once_value_5 != NIT_NULL) variable[4] = once_value_5;
124 else {
125 variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
126 once_value_5 = variable[4];
127 }
128 /* Register variable[4]: Result */
129 variable[3] = variable[4];
130 goto return_label3;
131 }
132 return_label3: while(false);
133 tracehead = trace.prev;
134 return variable[3];
135 }
136 val_t string___AbstractString___substring_from(val_t self, val_t param0) {
137 struct trace_t trace = {NULL, NULL, 53, LOCATE_string___AbstractString___substring_from};
138 val_t variable[4];
139 struct WBT_ **closurevariable = NULL;
140 trace.prev = tracehead; tracehead = &trace;
141 trace.file = LOCATE_string;
142 /* Register variable[0]: Local variable */
143 variable[0] = self;
144 /* Register variable[1]: Local variable */
145 variable[1] = param0;
146 /* Register variable[2]: Method return value and escape marker */
147 /* Register variable[3]: Result */
148 variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
149 /* Register variable[3]: Result */
150 variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*from*/)<UNTAG_Int(variable[3]));
151 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___AbstractString___substring_from, LOCATE_string, 60); nit_exit(1);}
152 /* Register variable[3]: Result */
153 variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
154 /* Register variable[3]: Result */
155 variable[3] = TAG_Int(UNTAG_Int(variable[3])-UNTAG_Int( variable[1] /*from*/));
156 /* Register variable[3]: Result */
157 variable[3] = CALL_string___AbstractString___substring(variable[0])(variable[0], variable[1] /*from*/, variable[3]) /*AbstractString::substring*/;
158 variable[2] = variable[3];
159 goto return_label6;
160 return_label6: while(false);
161 tracehead = trace.prev;
162 return variable[2];
163 }
164 val_t string___AbstractString___has_substring(val_t self, val_t param0, val_t param1) {
165 struct trace_t trace = {NULL, NULL, 64, LOCATE_string___AbstractString___has_substring};
166 val_t variable[10];
167 struct WBT_ **closurevariable = NULL;
168 trace.prev = tracehead; tracehead = &trace;
169 trace.file = LOCATE_string;
170 /* Register variable[0]: Local variable */
171 variable[0] = self;
172 /* Register variable[1]: Local variable */
173 variable[1] = param0;
174 /* Register variable[2]: Local variable */
175 variable[2] = param1;
176 /* Register variable[3]: Method return value and escape marker */
177 /* Register variable[4]: Local variable */
178 /* Register variable[5]: Result */
179 variable[5] = CALL_abstract_collection___Collection___length( variable[1] /*str*/)( variable[1] /*str*/) /*AbstractArrayRead::length*/;
180 /* Register variable[5]: Result */
181 variable[5] = TAG_Int(UNTAG_Int(variable[5])-UNTAG_Int( TAG_Int(1)));
182 variable[4] = variable[5];
183 /* Register variable[5]: Local variable */
184 /* Register variable[6]: Result */
185 variable[6] = TAG_Int(UNTAG_Int( variable[2] /*pos*/)+UNTAG_Int( variable[4] /*itsindex*/));
186 variable[5] = variable[6];
187 /* Register variable[6]: Local variable */
188 /* Register variable[7]: Result */
189 variable[7] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
190 variable[6] = variable[7];
191 /* Register variable[7]: Local variable */
192 /* Register variable[8]: Result */
193 variable[8] = ATTR_string___AbstractString____items( variable[1] /*str*/) /*AbstractString::_items*/;
194 variable[7] = variable[8];
195 /* Register variable[8]: Result */
196 variable[8] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
197 /* Register variable[8]: Result */
198 variable[8] = TAG_Bool(UNTAG_Int( variable[5] /*myindex*/)>UNTAG_Int(variable[8]));
199 /* Ensure var variable[8]: Left 'or' operand*/
200 if (!UNTAG_Bool(variable[8])) { /* or */
201 /* Register variable[8]: Result */
202 variable[8] = TAG_Bool(UNTAG_Int( variable[4] /*itsindex*/)>UNTAG_Int( variable[5] /*myindex*/));
203 }
204 /* Register variable[8]: Result */
205 if (UNTAG_Bool(variable[8])) { /*if*/
206 variable[3] = TAG_Bool(false);
207 goto return_label7;
208 }
209 while (true) { /*while*/
210 /* Register variable[8]: Result */
211 variable[8] = TAG_Bool(UNTAG_Int( variable[4] /*itsindex*/)>UNTAG_Int( TAG_Int(0)));
212 if (!UNTAG_Bool(variable[8])) break; /* while*/
213 /* Register variable[8]: Result */
214 variable[8] = TAG_Char(UNBOX_NativeString( variable[6] /*myitems*/)[UNTAG_Int( variable[5] /*myindex*/)]);
215 /* Register variable[9]: Result */
216 variable[9] = TAG_Char(UNBOX_NativeString( variable[7] /*itsitems*/)[UNTAG_Int( variable[4] /*itsindex*/)]);
217 /* Register variable[8]: Result */
218 variable[8] = TAG_Bool((variable[8])!=(variable[9]));
219 if (UNTAG_Bool(variable[8])) { /*if*/
220 variable[3] = TAG_Bool(false);
221 goto return_label7;
222 }
223 variable[5] = TAG_Int(UNTAG_Int(variable[5])-UNTAG_Int( variable[5] /*myindex*/)) /*myindex*/;
224 variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int( variable[4] /*itsindex*/)) /*itsindex*/;
225 continue_8: while(0);
226 }
227 break_8: while(0);
228 variable[3] = TAG_Bool(true);
229 goto return_label7;
230 return_label7: while(false);
231 tracehead = trace.prev;
232 return variable[3];
233 }
234 val_t string___AbstractString___has_prefix(val_t self, val_t param0) {
235 struct trace_t trace = {NULL, NULL, 83, LOCATE_string___AbstractString___has_prefix};
236 val_t variable[4];
237 struct WBT_ **closurevariable = NULL;
238 trace.prev = tracehead; tracehead = &trace;
239 trace.file = LOCATE_string;
240 /* Register variable[0]: Local variable */
241 variable[0] = self;
242 /* Register variable[1]: Local variable */
243 variable[1] = param0;
244 /* Register variable[2]: Method return value and escape marker */
245 /* Register variable[3]: Result */
246 variable[3] = CALL_string___AbstractString___has_substring(variable[0])(variable[0], variable[1] /*prefix*/, TAG_Int(0)) /*AbstractString::has_substring*/;
247 variable[2] = variable[3];
248 goto return_label9;
249 return_label9: while(false);
250 tracehead = trace.prev;
251 return variable[2];
252 }
253 val_t string___AbstractString___has_suffix(val_t self, val_t param0) {
254 struct trace_t trace = {NULL, NULL, 89, LOCATE_string___AbstractString___has_suffix};
255 val_t variable[5];
256 struct WBT_ **closurevariable = NULL;
257 trace.prev = tracehead; tracehead = &trace;
258 trace.file = LOCATE_string;
259 /* Register variable[0]: Local variable */
260 variable[0] = self;
261 /* Register variable[1]: Local variable */
262 variable[1] = param0;
263 /* Register variable[2]: Method return value and escape marker */
264 /* Register variable[3]: Result */
265 variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
266 /* Register variable[4]: Result */
267 variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*suffix*/)( variable[1] /*suffix*/) /*AbstractArrayRead::length*/;
268 /* Register variable[3]: Result */
269 variable[3] = TAG_Int(UNTAG_Int(variable[3])-UNTAG_Int(variable[4]));
270 /* Register variable[3]: Result */
271 variable[3] = CALL_string___AbstractString___has_substring(variable[0])(variable[0], variable[1] /*suffix*/, variable[3]) /*AbstractString::has_substring*/;
272 variable[2] = variable[3];
273 goto return_label10;
274 return_label10: while(false);
275 tracehead = trace.prev;
276 return variable[2];
277 }
278 val_t string___AbstractString___to_i(val_t self) {
279 struct trace_t trace = {NULL, NULL, 95, LOCATE_string___AbstractString___to_i};
280 val_t variable[3];
281 struct WBT_ **closurevariable = NULL;
282 trace.prev = tracehead; tracehead = &trace;
283 trace.file = LOCATE_string;
284 /* Register variable[0]: Local variable */
285 variable[0] = self;
286 /* Register variable[1]: Method return value and escape marker */
287 /* Register variable[2]: Result */
288 variable[2] = CALL_string___Object___to_s(variable[0])(variable[0]) /*Collection::to_s*/;
289 /* Register variable[2]: Result */
290 variable[2] = CALL_string___String___to_cstring(variable[2])(variable[2]) /*String::to_cstring*/;
291 /* Register variable[2]: Result */
292 variable[2] = TAG_Int(atoi(UNBOX_NativeString(variable[2])));
293 variable[1] = variable[2];
294 goto return_label11;
295 return_label11: while(false);
296 tracehead = trace.prev;
297 return variable[1];
298 }
299 val_t string___AbstractString___to_hex(val_t self) {
300 struct trace_t trace = {NULL, NULL, 102, LOCATE_string___AbstractString___to_hex};
301 val_t variable[3];
302 struct WBT_ **closurevariable = NULL;
303 trace.prev = tracehead; tracehead = &trace;
304 trace.file = LOCATE_string;
305 /* Register variable[0]: Local variable */
306 variable[0] = self;
307 /* Register variable[1]: Method return value and escape marker */
308 /* Register variable[2]: Result */
309 variable[2] = CALL_string___AbstractString___a_to(variable[0])(variable[0], TAG_Int(16)) /*AbstractString::a_to*/;
310 variable[1] = variable[2];
311 goto return_label12;
312 return_label12: while(false);
313 tracehead = trace.prev;
314 return variable[1];
315 }
316 val_t string___AbstractString___a_to(val_t self, val_t param0) {
317 struct trace_t trace = {NULL, NULL, 105, LOCATE_string___AbstractString___a_to};
318 val_t variable[10];
319 struct WBT_ **closurevariable = NULL;
320 trace.prev = tracehead; tracehead = &trace;
321 trace.file = LOCATE_string;
322 /* Register variable[0]: Local variable */
323 variable[0] = self;
324 /* Register variable[1]: Local variable */
325 variable[1] = param0;
326 /* Register variable[2]: Method return value and escape marker */
327 /* Register variable[3]: Local variable */
328 variable[3] = TAG_Int(0);
329 /* Register variable[4]: Local variable */
330 variable[4] = TAG_Bool(false);
331 /* Register variable[5]: For iterator */
332 variable[5] = CALL_abstract_collection___Collection___iterator(variable[0])(variable[0]) /*AbstractArrayRead::iterator*/;
333 while (true) { /*for*/
334 /* Register variable[6]: For 'is_ok' result */
335 variable[6] = CALL_abstract_collection___Iterator___is_ok(variable[5])(variable[5]) /*ArrayIterator::is_ok*/;
336 if (!UNTAG_Bool(variable[6])) break; /*for*/
337 variable[6] = CALL_abstract_collection___Iterator___item(variable[5])(variable[5]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
338 /* Register variable[7]: Local variable */
339 variable[7] = variable[6];
340 /* Register variable[8]: Local variable */
341 /* Register variable[9]: Result */
342 variable[9] = CALL_kernel___Char___to_i( variable[7] /*c*/)( variable[7] /*c*/) /*Char::to_i*/;
343 variable[8] = variable[9];
344 /* Register variable[9]: Result */
345 variable[9] = TAG_Bool(UNTAG_Int( variable[8] /*v*/)>UNTAG_Int( variable[1] /*base*/));
346 if (UNTAG_Bool(variable[9])) { /*if*/
347 if (UNTAG_Bool( variable[4] /*neg*/)) { /*if*/
348 /* Register variable[9]: Result */
349 variable[9] = TAG_Int(-UNTAG_Int( variable[3] /*i*/));
350 variable[2] = variable[9];
351 goto return_label13;
352 } else { /*if*/
353 variable[2] = variable[3] /*i*/;
354 goto return_label13;
355 }
356 } else { /*if*/
357 /* Register variable[9]: Result */
358 variable[9] = TAG_Bool(UNTAG_Int( variable[8] /*v*/)<UNTAG_Int( TAG_Int(0)));
359 if (UNTAG_Bool(variable[9])) { /*if*/
360 variable[4] = TAG_Bool(true) /*neg=*/;
361 } else { /*if*/
362 /* Register variable[9]: Result */
363 variable[9] = TAG_Int(UNTAG_Int( variable[3] /*i*/)*UNTAG_Int( variable[1] /*base*/));
364 /* Register variable[9]: Result */
365 variable[9] = TAG_Int(UNTAG_Int(variable[9])+UNTAG_Int( variable[8] /*v*/));
366 variable[3] = variable[9] /*i=*/;
367 }
368 }
369 continue_14: while(0);
370 CALL_abstract_collection___Iterator___next(variable[5])(variable[5]) /*ArrayIterator::next*/;
371 }
372 break_14: while(0);
373 if (UNTAG_Bool( variable[4] /*neg*/)) { /*if*/
374 /* Register variable[5]: Result */
375 variable[5] = TAG_Int(-UNTAG_Int( variable[3] /*i*/));
376 variable[2] = variable[5];
377 goto return_label13;
378 } else { /*if*/
379 variable[2] = variable[3] /*i*/;
380 goto return_label13;
381 }
382 return_label13: while(false);
383 tracehead = trace.prev;
384 return variable[2];
385 }
386 val_t string___AbstractString___to_upper(val_t self) {
387 struct trace_t trace = {NULL, NULL, 133, LOCATE_string___AbstractString___to_upper};
388 val_t variable[7];
389 struct WBT_ **closurevariable = NULL;
390 trace.prev = tracehead; tracehead = &trace;
391 trace.file = LOCATE_string;
392 /* Register variable[0]: Local variable */
393 variable[0] = self;
394 /* Register variable[1]: Method return value and escape marker */
395 /* Register variable[2]: Local variable */
396 /* Register variable[3]: Result */
397 variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
398 /* Register variable[3]: Result */
399 variable[3] = NEW_Buffer_string___Buffer___with_capacity(variable[3]) /*new Buffer*/;
400 variable[2] = variable[3];
401 /* Register variable[3]: For iterator */
402 variable[3] = CALL_abstract_collection___Collection___iterator(variable[0])(variable[0]) /*AbstractArrayRead::iterator*/;
403 while (true) { /*for*/
404 /* Register variable[4]: For 'is_ok' result */
405 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
406 if (!UNTAG_Bool(variable[4])) break; /*for*/
407 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
408 /* Register variable[5]: Local variable */
409 variable[5] = variable[4];
410 /* Register variable[6]: Result */
411 variable[6] = CALL_kernel___Char___to_upper( variable[5] /*i*/)( variable[5] /*i*/) /*Char::to_upper*/;
412 CALL_abstract_collection___SimpleCollection___add( variable[2] /*s*/)( variable[2] /*s*/, variable[6]) /*Buffer::add*/;
413 continue_16: while(0);
414 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
415 }
416 break_16: while(0);
417 /* Register variable[3]: Result */
418 variable[3] = CALL_string___Object___to_s( variable[2] /*s*/)( variable[2] /*s*/) /*Buffer::to_s*/;
419 variable[1] = variable[3];
420 goto return_label15;
421 return_label15: while(false);
422 tracehead = trace.prev;
423 return variable[1];
424 }
425 val_t string___AbstractString___to_lower(val_t self) {
426 struct trace_t trace = {NULL, NULL, 141, LOCATE_string___AbstractString___to_lower};
427 val_t variable[7];
428 struct WBT_ **closurevariable = NULL;
429 trace.prev = tracehead; tracehead = &trace;
430 trace.file = LOCATE_string;
431 /* Register variable[0]: Local variable */
432 variable[0] = self;
433 /* Register variable[1]: Method return value and escape marker */
434 /* Register variable[2]: Local variable */
435 /* Register variable[3]: Result */
436 variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
437 /* Register variable[3]: Result */
438 variable[3] = NEW_Buffer_string___Buffer___with_capacity(variable[3]) /*new Buffer*/;
439 variable[2] = variable[3];
440 /* Register variable[3]: For iterator */
441 variable[3] = CALL_abstract_collection___Collection___iterator(variable[0])(variable[0]) /*AbstractArrayRead::iterator*/;
442 while (true) { /*for*/
443 /* Register variable[4]: For 'is_ok' result */
444 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
445 if (!UNTAG_Bool(variable[4])) break; /*for*/
446 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
447 /* Register variable[5]: Local variable */
448 variable[5] = variable[4];
449 /* Register variable[6]: Result */
450 variable[6] = CALL_kernel___Char___to_lower( variable[5] /*i*/)( variable[5] /*i*/) /*Char::to_lower*/;
451 CALL_abstract_collection___SimpleCollection___add( variable[2] /*s*/)( variable[2] /*s*/, variable[6]) /*Buffer::add*/;
452 continue_18: while(0);
453 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
454 }
455 break_18: while(0);
456 /* Register variable[3]: Result */
457 variable[3] = CALL_string___Object___to_s( variable[2] /*s*/)( variable[2] /*s*/) /*Buffer::to_s*/;
458 variable[1] = variable[3];
459 goto return_label17;
460 return_label17: while(false);
461 tracehead = trace.prev;
462 return variable[1];
463 }
464 val_t string___String_____eqeq(val_t self, val_t param0) {
465 struct trace_t trace = {NULL, NULL, 188, LOCATE_string___String_____eqeq};
466 val_t variable[9];
467 struct WBT_ **closurevariable = NULL;
468 trace.prev = tracehead; tracehead = &trace;
469 trace.file = LOCATE_string;
470 /* Register variable[0]: Local variable */
471 variable[0] = self;
472 /* Register variable[1]: Local variable */
473 variable[1] = param0;
474 /* Register variable[2]: Method return value and escape marker */
475 /* Register variable[3]: Result */
476 variable[3] = TAG_Bool(( variable[1] /*o*/==NIT_NULL) || VAL_ISA( variable[1] /*o*/, COLOR_String, ID_String)) /*cast String*/;
477 variable[3] = TAG_Bool(!UNTAG_Bool(variable[3])) /* Ensure var: Left 'or' operand*/;
478 if (!UNTAG_Bool(variable[3])) { /* or */
479 /* Register variable[3]: Result */
480 variable[3] = TAG_Bool(IS_EQUAL_NN( variable[1] /*o*/, NIT_NULL /*null*/));
481 }
482 /* Register variable[3]: Result */
483 if (UNTAG_Bool(variable[3])) { /*if*/
484 variable[2] = TAG_Bool(false);
485 goto return_label19;
486 }
487 /* Register variable[3]: Result */
488 variable[3] = TAG_Bool(( variable[1] /*o*/==NIT_NULL) || VAL_ISA( variable[1] /*o*/, COLOR_String, ID_String)) /*cast String*/;
489 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String_____eqeq, LOCATE_string, 191); nit_exit(1);}
490 /* Register variable[3]: Local variable */
491 /* Register variable[4]: Result */
492 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
493 variable[3] = variable[4];
494 /* Register variable[4]: Result */
495 variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*o*/)( variable[1] /*o*/) /*AbstractArrayRead::length*/;
496 /* Register variable[4]: Result */
497 variable[4] = TAG_Bool((variable[4])!=( variable[3] /*l*/));
498 if (UNTAG_Bool(variable[4])) { /*if*/
499 variable[2] = TAG_Bool(false);
500 goto return_label19;
501 }
502 /* Register variable[4]: Local variable */
503 variable[4] = TAG_Int(0);
504 /* Register variable[5]: Local variable */
505 /* Register variable[6]: Result */
506 variable[6] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
507 variable[5] = variable[6];
508 /* Register variable[6]: Local variable */
509 /* Register variable[7]: Result */
510 variable[7] = ATTR_string___AbstractString____items( variable[1] /*o*/) /*AbstractString::_items*/;
511 variable[6] = variable[7];
512 while (true) { /*while*/
513 /* Register variable[7]: Result */
514 variable[7] = TAG_Bool(UNTAG_Int( variable[4] /*i*/)<UNTAG_Int( variable[3] /*l*/));
515 if (!UNTAG_Bool(variable[7])) break; /* while*/
516 /* Register variable[7]: Result */
517 variable[7] = TAG_Char(UNBOX_NativeString( variable[5] /*it*/)[UNTAG_Int( variable[4] /*i*/)]);
518 /* Register variable[8]: Result */
519 variable[8] = TAG_Char(UNBOX_NativeString( variable[6] /*oit*/)[UNTAG_Int( variable[4] /*i*/)]);
520 /* Register variable[7]: Result */
521 variable[7] = TAG_Bool((variable[7])!=(variable[8]));
522 if (UNTAG_Bool(variable[7])) { /*if*/
523 variable[2] = TAG_Bool(false);
524 goto return_label19;
525 }
526 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
527 continue_20: while(0);
528 }
529 break_20: while(0);
530 variable[2] = TAG_Bool(true);
531 goto return_label19;
532 return_label19: while(false);
533 tracehead = trace.prev;
534 return variable[2];
535 }
536 val_t string___String_____l(val_t self, val_t param0) {
537 struct trace_t trace = {NULL, NULL, 204, LOCATE_string___String_____l};
538 val_t variable[11];
539 struct WBT_ **closurevariable = NULL;
540 trace.prev = tracehead; tracehead = &trace;
541 trace.file = LOCATE_string;
542 /* Register variable[0]: Local variable */
543 variable[0] = self;
544 /* Register variable[1]: Local variable */
545 variable[1] = param0;
546 /* Register variable[2]: Method return value and escape marker */
547 /* Register variable[3]: Local variable */
548 variable[3] = TAG_Int(0);
549 /* Register variable[4]: Local variable */
550 /* Register variable[5]: Result */
551 variable[5] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
552 variable[4] = variable[5];
553 /* Register variable[5]: Local variable */
554 /* Register variable[6]: Result */
555 variable[6] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/;
556 variable[5] = variable[6];
557 /* Register variable[6]: Local variable */
558 /* Register variable[7]: Result */
559 variable[7] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
560 variable[6] = variable[7];
561 /* Register variable[7]: Local variable */
562 /* Register variable[8]: Result */
563 variable[8] = ATTR_string___AbstractString____items( variable[1] /*s*/) /*AbstractString::_items*/;
564 variable[7] = variable[8];
565 while (true) { /*while*/
566 /* Register variable[8]: Result */
567 variable[8] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int( variable[4] /*l1*/));
568 /* Ensure var variable[8]: Left 'and' operand*/
569 if (UNTAG_Bool(variable[8])) { /* and */
570 /* Register variable[8]: Result */
571 variable[8] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int( variable[5] /*l2*/));
572 }
573 /* Register variable[8]: Result */
574 if (!UNTAG_Bool(variable[8])) break; /* while*/
575 /* Register variable[8]: Local variable */
576 /* Register variable[9]: Result */
577 variable[9] = TAG_Char(UNBOX_NativeString( variable[6] /*n1*/)[UNTAG_Int( variable[3] /*i*/)]);
578 /* Register variable[9]: Result */
579 variable[9] = TAG_Int((unsigned char)UNTAG_Char(variable[9]));
580 variable[8] = variable[9];
581 /* Register variable[9]: Local variable */
582 /* Register variable[10]: Result */
583 variable[10] = TAG_Char(UNBOX_NativeString( variable[7] /*n2*/)[UNTAG_Int( variable[3] /*i*/)]);
584 /* Register variable[10]: Result */
585 variable[10] = TAG_Int((unsigned char)UNTAG_Char(variable[10]));
586 variable[9] = variable[10];
587 /* Register variable[10]: Result */
588 variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*c1*/)<UNTAG_Int( variable[9] /*c2*/));
589 if (UNTAG_Bool(variable[10])) { /*if*/
590 variable[2] = TAG_Bool(true);
591 goto return_label21;
592 } else { /*if*/
593 /* Register variable[10]: Result */
594 variable[10] = TAG_Bool(UNTAG_Int( variable[9] /*c2*/)<UNTAG_Int( variable[8] /*c1*/));
595 if (UNTAG_Bool(variable[10])) { /*if*/
596 variable[2] = TAG_Bool(false);
597 goto return_label21;
598 }
599 }
600 variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
601 continue_22: while(0);
602 }
603 break_22: while(0);
604 /* Register variable[8]: Result */
605 variable[8] = TAG_Bool(UNTAG_Int( variable[4] /*l1*/)<UNTAG_Int( variable[5] /*l2*/));
606 if (UNTAG_Bool(variable[8])) { /*if*/
607 variable[2] = TAG_Bool(true);
608 goto return_label21;
609 } else { /*if*/
610 variable[2] = TAG_Bool(false);
611 goto return_label21;
612 }
613 return_label21: while(false);
614 tracehead = trace.prev;
615 return variable[2];
616 }
617 val_t string___String___to_s(val_t self) {
618 struct trace_t trace = {NULL, NULL, 249, LOCATE_string___String___to_s};
619 val_t variable[2];
620 struct WBT_ **closurevariable = NULL;
621 trace.prev = tracehead; tracehead = &trace;
622 trace.file = LOCATE_string;
623 /* Register variable[0]: Local variable */
624 variable[0] = self;
625 /* Register variable[1]: Method return value and escape marker */
626 variable[1] = variable[0];
627 goto return_label23;
628 return_label23: while(false);
629 tracehead = trace.prev;
630 return variable[1];
631 }
632 void string___String___with_native(val_t self, val_t param0, val_t param1, int* init_table) {
633 struct trace_t trace = {NULL, NULL, 166, LOCATE_string___String___with_native};
634 val_t variable[5];
635 struct WBT_ **closurevariable = NULL;
636 trace.prev = tracehead; tracehead = &trace;
637 trace.file = LOCATE_string;
638 /* Register variable[0]: Local variable */
639 variable[0] = self;
640 /* Register variable[1]: Local variable */
641 variable[1] = param0;
642 /* Register variable[2]: Local variable */
643 variable[2] = param1;
644 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i]) return;
645 /* Register variable[3]: Method return value and escape marker */
646 /* Register variable[4]: Result */
647 variable[4] = TAG_Bool(UNTAG_Int( variable[2] /*size*/)>=UNTAG_Int( TAG_Int(0)));
648 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String___with_native, LOCATE_string, 169); nit_exit(1);}
649 ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/ = variable[1] /*nat*/;
650 ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/ = variable[2] /*size*/;
651 return_label24: while(false);
652 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i] = 1;
653 tracehead = trace.prev;
654 return;
655 }
656 void string___String___from_cstring(val_t self, val_t param0, int* init_table) {
657 struct trace_t trace = {NULL, NULL, 174, LOCATE_string___String___from_cstring};
658 val_t variable[5];
659 struct WBT_ **closurevariable = NULL;
660 trace.prev = tracehead; tracehead = &trace;
661 trace.file = LOCATE_string;
662 /* Register variable[0]: Local variable */
663 variable[0] = self;
664 /* Register variable[1]: Local variable */
665 variable[1] = param0;
666 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i]) return;
667 /* Register variable[2]: Method return value and escape marker */
668 /* Register variable[3]: Local variable */
669 /* Register variable[4]: Result */
670 variable[4] = CALL_string___NativeString___cstring_length( variable[1] /*str*/)( variable[1] /*str*/) /*NativeString::cstring_length*/;
671 variable[3] = variable[4];
672 ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/ = variable[1] /*str*/;
673 ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/ = variable[3] /*size*/;
674 return_label25: while(false);
675 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i] = 1;
676 tracehead = trace.prev;
677 return;
678 }
679 val_t string___String___to_cstring(val_t self) {
680 struct trace_t trace = {NULL, NULL, 182, LOCATE_string___String___to_cstring};
681 val_t variable[3];
682 struct WBT_ **closurevariable = NULL;
683 trace.prev = tracehead; tracehead = &trace;
684 trace.file = LOCATE_string;
685 /* Register variable[0]: Local variable */
686 variable[0] = self;
687 /* Register variable[1]: Method return value and escape marker */
688 /* Register variable[2]: Result */
689 variable[2] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
690 variable[1] = variable[2];
691 goto return_label26;
692 return_label26: while(false);
693 tracehead = trace.prev;
694 return variable[1];
695 }
696 val_t string___String_____plus(val_t self, val_t param0) {
697 struct trace_t trace = {NULL, NULL, 228, LOCATE_string___String_____plus};
698 val_t variable[6];
699 struct WBT_ **closurevariable = NULL;
700 trace.prev = tracehead; tracehead = &trace;
701 trace.file = LOCATE_string;
702 /* Register variable[0]: Local variable */
703 variable[0] = self;
704 /* Register variable[1]: Local variable */
705 variable[1] = param0;
706 /* Register variable[2]: Method return value and escape marker */
707 /* Register variable[3]: Local variable */
708 /* Register variable[4]: Result */
709 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
710 /* Register variable[5]: Result */
711 variable[5] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/;
712 /* Register variable[4]: Result */
713 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int(variable[5]));
714 /* Register variable[4]: Result */
715 variable[4] = NEW_Buffer_string___Buffer___with_capacity(variable[4]) /*new Buffer*/;
716 variable[3] = variable[4];
717 CALL_abstract_collection___IndexedCollection___append( variable[3] /*r*/)( variable[3] /*r*/, variable[0]) /*Buffer::append*/;
718 CALL_abstract_collection___IndexedCollection___append( variable[3] /*r*/)( variable[3] /*r*/, variable[1] /*s*/) /*Buffer::append*/;
719 /* Register variable[4]: Result */
720 variable[4] = CALL_string___Object___to_s( variable[3] /*r*/)( variable[3] /*r*/) /*Buffer::to_s*/;
721 variable[2] = variable[4];
722 goto return_label27;
723 return_label27: while(false);
724 tracehead = trace.prev;
725 return variable[2];
726 }
727 val_t string___String_____star(val_t self, val_t param0) {
728 struct trace_t trace = {NULL, NULL, 237, LOCATE_string___String_____star};
729 val_t variable[5];
730 struct WBT_ **closurevariable = NULL;
731 trace.prev = tracehead; tracehead = &trace;
732 trace.file = LOCATE_string;
733 /* Register variable[0]: Local variable */
734 variable[0] = self;
735 /* Register variable[1]: Local variable */
736 variable[1] = param0;
737 /* Register variable[2]: Method return value and escape marker */
738 /* Register variable[3]: Result */
739 variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*i*/)>=UNTAG_Int( TAG_Int(0)));
740 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String_____star, LOCATE_string, 240); nit_exit(1);}
741 /* Register variable[3]: Local variable */
742 /* Register variable[4]: Result */
743 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
744 /* Register variable[4]: Result */
745 variable[4] = TAG_Int(UNTAG_Int(variable[4])*UNTAG_Int( variable[1] /*i*/));
746 /* Register variable[4]: Result */
747 variable[4] = NEW_Buffer_string___Buffer___with_capacity(variable[4]) /*new Buffer*/;
748 variable[3] = variable[4];
749 while (true) { /*while*/
750 /* Register variable[4]: Result */
751 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*i*/)>UNTAG_Int( TAG_Int(0)));
752 if (!UNTAG_Bool(variable[4])) break; /* while*/
753 CALL_abstract_collection___IndexedCollection___append( variable[3] /*r*/)( variable[3] /*r*/, variable[0]) /*Buffer::append*/;
754 variable[1] = TAG_Int(UNTAG_Int(variable[1])-UNTAG_Int( TAG_Int(1))) /*i*/;
755 continue_29: while(0);
756 }
757 break_29: while(0);
758 /* Register variable[4]: Result */
759 variable[4] = CALL_string___Object___to_s( variable[3] /*r*/)( variable[3] /*r*/) /*Buffer::to_s*/;
760 variable[2] = variable[4];
761 goto return_label28;
762 return_label28: while(false);
763 tracehead = trace.prev;
764 return variable[2];
765 }
766 val_t string___Buffer_____eqeq(val_t self, val_t param0) {
767 struct trace_t trace = {NULL, NULL, 359, LOCATE_string___Buffer_____eqeq};
768 val_t variable[9];
769 struct WBT_ **closurevariable = NULL;
770 trace.prev = tracehead; tracehead = &trace;
771 trace.file = LOCATE_string;
772 /* Register variable[0]: Local variable */
773 variable[0] = self;
774 /* Register variable[1]: Local variable */
775 variable[1] = param0;
776 /* Register variable[2]: Method return value and escape marker */
777 /* Register variable[3]: Result */
778 variable[3] = TAG_Bool(( variable[1] /*o*/==NIT_NULL) || VAL_ISA( variable[1] /*o*/, COLOR_Buffer, ID_Buffer)) /*cast Buffer*/;
779 variable[3] = TAG_Bool(!UNTAG_Bool(variable[3])) /* Ensure var: Left 'or' operand*/;
780 if (!UNTAG_Bool(variable[3])) { /* or */
781 /* Register variable[3]: Result */
782 variable[3] = TAG_Bool(IS_EQUAL_NN( variable[1] /*o*/, NIT_NULL /*null*/));
783 }
784 /* Register variable[3]: Result */
785 if (UNTAG_Bool(variable[3])) { /*if*/
786 variable[2] = TAG_Bool(false);
787 goto return_label30;
788 }
789 /* Register variable[3]: Result */
790 variable[3] = TAG_Bool(( variable[1] /*o*/==NIT_NULL) || VAL_ISA( variable[1] /*o*/, COLOR_Buffer, ID_Buffer)) /*cast Buffer*/;
791 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___Buffer_____eqeq, LOCATE_string, 362); nit_exit(1);}
792 /* Register variable[3]: Local variable */
793 /* Register variable[4]: Result */
794 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
795 variable[3] = variable[4];
796 /* Register variable[4]: Result */
797 variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*o*/)( variable[1] /*o*/) /*AbstractArrayRead::length*/;
798 /* Register variable[4]: Result */
799 variable[4] = TAG_Bool((variable[4])!=( variable[3] /*l*/));
800 if (UNTAG_Bool(variable[4])) { /*if*/
801 variable[2] = TAG_Bool(false);
802 goto return_label30;
803 }
804 /* Register variable[4]: Local variable */
805 variable[4] = TAG_Int(0);
806 /* Register variable[5]: Local variable */
807 /* Register variable[6]: Result */
808 variable[6] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
809 variable[5] = variable[6];
810 /* Register variable[6]: Local variable */
811 /* Register variable[7]: Result */
812 variable[7] = ATTR_string___AbstractString____items( variable[1] /*o*/) /*AbstractString::_items*/;
813 variable[6] = variable[7];
814 while (true) { /*while*/
815 /* Register variable[7]: Result */
816 variable[7] = TAG_Bool(UNTAG_Int( variable[4] /*i*/)<UNTAG_Int( variable[3] /*l*/));
817 if (!UNTAG_Bool(variable[7])) break; /* while*/
818 /* Register variable[7]: Result */
819 variable[7] = TAG_Char(UNBOX_NativeString( variable[5] /*it*/)[UNTAG_Int( variable[4] /*i*/)]);
820 /* Register variable[8]: Result */
821 variable[8] = TAG_Char(UNBOX_NativeString( variable[6] /*oit*/)[UNTAG_Int( variable[4] /*i*/)]);
822 /* Register variable[7]: Result */
823 variable[7] = TAG_Bool((variable[7])!=(variable[8]));
824 if (UNTAG_Bool(variable[7])) { /*if*/
825 variable[2] = TAG_Bool(false);
826 goto return_label30;
827 }
828 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
829 continue_31: while(0);
830 }
831 break_31: while(0);
832 variable[2] = TAG_Bool(true);
833 goto return_label30;
834 return_label30: while(false);
835 tracehead = trace.prev;
836 return variable[2];
837 }
838 val_t string___Buffer___to_s(val_t self) {
839 struct trace_t trace = {NULL, NULL, 301, LOCATE_string___Buffer___to_s};
840 val_t variable[5];
841 struct WBT_ **closurevariable = NULL;
842 trace.prev = tracehead; tracehead = &trace;
843 trace.file = LOCATE_string;
844 /* Register variable[0]: Local variable */
845 variable[0] = self;
846 /* Register variable[1]: Method return value and escape marker */
847 /* Register variable[2]: Local variable */
848 /* Register variable[3]: Result */
849 variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
850 variable[2] = variable[3];
851 /* Register variable[3]: Local variable */
852 /* Register variable[4]: Result */
853 variable[4] = TAG_Int(UNTAG_Int( variable[2] /*l*/)+UNTAG_Int( TAG_Int(1)));
854 /* Register variable[4]: Result */
855 variable[4] = BOX_NativeString((char*)malloc((UNTAG_Int(variable[4]) * sizeof(char))));
856 variable[3] = variable[4];
857 /* Register variable[4]: Result */
858 variable[4] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
859 (void)memcpy(UNBOX_NativeString( variable[3] /*a*/)+UNTAG_Int( TAG_Int(0)), UNBOX_NativeString(variable[4])+UNTAG_Int( TAG_Int(0)), UNTAG_Int( variable[2] /*l*/));
860 /* Register variable[4]: Result */
861 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
862 UNBOX_NativeString( variable[3] /*a*/)[UNTAG_Int(variable[4])]=UNTAG_Char( TAG_Char('\0'));
863 /* Register variable[4]: Result */
864 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
865 /* Register variable[4]: Result */
866 variable[4] = NEW_String_string___String___with_native( variable[3] /*a*/, variable[4]) /*new String*/;
867 variable[1] = variable[4];
868 goto return_label32;
869 return_label32: while(false);
870 tracehead = trace.prev;
871 return variable[1];
872 }
873 val_t string___Buffer_____l(val_t self, val_t param0) {
874 struct trace_t trace = {NULL, NULL, 313, LOCATE_string___Buffer_____l};
875 val_t variable[9];
876 struct WBT_ **closurevariable = NULL;
877 trace.prev = tracehead; tracehead = &trace;
878 trace.file = LOCATE_string;
879 /* Register variable[0]: Local variable */
880 variable[0] = self;
881 /* Register variable[1]: Local variable */
882 variable[1] = param0;
883 /* Register variable[2]: Method return value and escape marker */
884 /* Register variable[3]: Local variable */
885 variable[3] = TAG_Int(0);
886 /* Register variable[4]: Local variable */
887 /* Register variable[5]: Result */
888 variable[5] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
889 variable[4] = variable[5];
890 /* Register variable[5]: Local variable */
891 /* Register variable[6]: Result */
892 variable[6] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/;
893 variable[5] = variable[6];
894 while (true) { /*while*/
895 /* Register variable[6]: Result */
896 variable[6] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int( variable[4] /*l1*/));
897 /* Ensure var variable[6]: Left 'and' operand*/
898 if (UNTAG_Bool(variable[6])) { /* and */
899 /* Register variable[6]: Result */
900 variable[6] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int( variable[5] /*l2*/));
901 }
902 /* Register variable[6]: Result */
903 if (!UNTAG_Bool(variable[6])) break; /* while*/
904 /* Register variable[6]: Local variable */
905 /* Register variable[7]: Result */
906 variable[7] = CALL_abstract_collection___MapRead_____bra(variable[0])(variable[0], variable[3] /*i*/) /*AbstractString::[]*/;
907 /* Register variable[7]: Result */
908 variable[7] = TAG_Int((unsigned char)UNTAG_Char(variable[7]));
909 variable[6] = variable[7];
910 /* Register variable[7]: Local variable */
911 /* Register variable[8]: Result */
912 variable[8] = CALL_abstract_collection___MapRead_____bra( variable[1] /*s*/)( variable[1] /*s*/, variable[3] /*i*/) /*AbstractString::[]*/;
913 /* Register variable[8]: Result */
914 variable[8] = TAG_Int((unsigned char)UNTAG_Char(variable[8]));
915 variable[7] = variable[8];
916 /* Register variable[8]: Result */
917 variable[8] = TAG_Bool(UNTAG_Int( variable[6] /*c1*/)<UNTAG_Int( variable[7] /*c2*/));
918 if (UNTAG_Bool(variable[8])) { /*if*/
919 variable[2] = TAG_Bool(true);
920 goto return_label33;
921 } else { /*if*/
922 /* Register variable[8]: Result */
923 variable[8] = TAG_Bool(UNTAG_Int( variable[7] /*c2*/)<UNTAG_Int( variable[6] /*c1*/));
924 if (UNTAG_Bool(variable[8])) { /*if*/
925 variable[2] = TAG_Bool(false);
926 goto return_label33;
927 }
928 }
929 variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
930 continue_34: while(0);
931 }
932 break_34: while(0);
933 /* Register variable[6]: Result */
934 variable[6] = TAG_Bool(UNTAG_Int( variable[4] /*l1*/)<UNTAG_Int( variable[5] /*l2*/));
935 if (UNTAG_Bool(variable[6])) { /*if*/
936 variable[2] = TAG_Bool(true);
937 goto return_label33;
938 } else { /*if*/
939 variable[2] = TAG_Bool(false);
940 goto return_label33;
941 }
942 return_label33: while(false);
943 tracehead = trace.prev;
944 return variable[2];
945 }
946 void string___Buffer_____braeq(val_t self, val_t param0, val_t param1) {
947 struct trace_t trace = {NULL, NULL, 261, LOCATE_string___Buffer_____braeq};
948 val_t variable[5];
949 struct WBT_ **closurevariable = NULL;
950 trace.prev = tracehead; tracehead = &trace;
951 trace.file = LOCATE_string;
952 /* Register variable[0]: Local variable */
953 variable[0] = self;
954 /* Register variable[1]: Local variable */
955 variable[1] = param0;
956 /* Register variable[2]: Local variable */
957 variable[2] = param1;
958 /* Register variable[3]: Method return value and escape marker */
959 /* Register variable[4]: Result */
960 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
961 /* Register variable[4]: Result */
962 variable[4] = TAG_Bool(( variable[1] /*index*/)==(variable[4]));
963 if (UNTAG_Bool(variable[4])) { /*if*/
964 CALL_abstract_collection___SimpleCollection___add(variable[0])(variable[0], variable[2] /*item*/) /*Buffer::add*/;
965 goto return_label35;
966 }
967 /* Register variable[4]: Result */
968 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*index*/)>=UNTAG_Int( TAG_Int(0)));
969 /* Ensure var variable[4]: Left 'and' operand*/
970 if (UNTAG_Bool(variable[4])) { /* and */
971 /* Register variable[4]: Result */
972 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
973 /* Register variable[4]: Result */
974 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*index*/)<UNTAG_Int(variable[4]));
975 }
976 /* Register variable[4]: Result */
977 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___Buffer_____braeq, LOCATE_string, 267); nit_exit(1);}
978 /* Register variable[4]: Result */
979 variable[4] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
980 UNBOX_NativeString(variable[4])[UNTAG_Int( variable[1] /*index*/)]=UNTAG_Char( variable[2] /*item*/);
981 return_label35: while(false);
982 tracehead = trace.prev;
983 return;
984 }
985 void string___Buffer___add(val_t self, val_t param0) {
986 struct trace_t trace = {NULL, NULL, 271, LOCATE_string___Buffer___add};
987 val_t variable[5];
988 struct WBT_ **closurevariable = NULL;
989 trace.prev = tracehead; tracehead = &trace;
990 trace.file = LOCATE_string;
991 /* Register variable[0]: Local variable */
992 variable[0] = self;
993 /* Register variable[1]: Local variable */
994 variable[1] = param0;
995 /* Register variable[2]: Method return value and escape marker */
996 /* Register variable[3]: Result */
997 variable[3] = ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/;
998 /* Register variable[4]: Result */
999 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
1000 /* Register variable[3]: Result */
1001 variable[3] = TAG_Bool(UNTAG_Int(variable[3])<=UNTAG_Int(variable[4]));
1002 if (UNTAG_Bool(variable[3])) { /*if*/
1003 /* Register variable[3]: Result */
1004 variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
1005 /* Register variable[3]: Result */
1006 variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(5)));
1007 CALL_array___AbstractArray___enlarge(variable[0])(variable[0], variable[3]) /*Buffer::enlarge*/;
1008 }
1009 /* Register variable[3]: Result */
1010 variable[3] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
1011 /* Register variable[4]: Result */
1012 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
1013 UNBOX_NativeString(variable[3])[UNTAG_Int(variable[4])]=UNTAG_Char( variable[1] /*c*/);
1014 ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/)+UNTAG_Int( TAG_Int(1)));
1015 return_label36: while(false);
1016 tracehead = trace.prev;
1017 return;
1018 }
1019 void string___Buffer___append(val_t self, val_t param0) {
1020 struct trace_t trace = {NULL, NULL, 289, LOCATE_string___Buffer___append};
1021 val_t variable[7];
1022 struct WBT_ **closurevariable = NULL;
1023 trace.prev = tracehead; tracehead = &trace;
1024 trace.file = LOCATE_string;
1025 /* Register variable[0]: Local variable */
1026 variable[0] = self;
1027 /* Register variable[1]: Local variable */
1028 variable[1] = param0;
1029 /* Register variable[2]: Method return value and escape marker */
1030 /* Register variable[3]: Result */
1031 variable[3] = TAG_Bool(( variable[1] /*s*/==NIT_NULL) || VAL_ISA( variable[1] /*s*/, COLOR_String, ID_String)) /*cast String*/;
1032 if (UNTAG_Bool(variable[3])) { /*if*/
1033 /* Register variable[3]: Local variable */
1034 /* Register variable[4]: Result */
1035 variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/;
1036 variable[3] = variable[4];
1037 /* Register variable[4]: Result */
1038 variable[4] = ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/;
1039 /* Register variable[5]: Result */
1040 variable[5] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
1041 /* Register variable[5]: Result */
1042 variable[5] = TAG_Int(UNTAG_Int(variable[5])+UNTAG_Int( variable[3] /*sl*/));
1043 /* Register variable[4]: Result */
1044 variable[4] = TAG_Bool(UNTAG_Int(variable[4])<UNTAG_Int(variable[5]));
1045 if (UNTAG_Bool(variable[4])) { /*if*/
1046 /* Register variable[4]: Result */
1047 variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
1048 /* Register variable[4]: Result */
1049 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( variable[3] /*sl*/));
1050 CALL_array___AbstractArray___enlarge(variable[0])(variable[0], variable[4]) /*Buffer::enlarge*/;
1051 }
1052 /* Register variable[4]: Result */
1053 variable[4] = CALL_string___AbstractString___items( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractString::items*/;
1054 /* Register variable[5]: Result */
1055 variable[5] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
1056 /* Register variable[6]: Result */
1057 variable[6] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
1058 (void)memcpy(UNBOX_NativeString(variable[5])+UNTAG_Int(variable[6]), UNBOX_NativeString(variable[4])+UNTAG_Int( TAG_Int(0)), UNTAG_Int( variable[3] /*sl*/));
1059 ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/)+UNTAG_Int( variable[3] /*sl*/));
1060 } else { /*if*/
1061 CALL_SUPER_string___Buffer___append(variable[0])(variable[0], variable[1]) /*super Buffer::append*/;
1062 }
1063 return_label37: while(false);
1064 tracehead = trace.prev;
1065 return;
1066 }
1067 void string___Buffer___enlarge(val_t self, val_t param0) {
1068 struct trace_t trace = {NULL, NULL, 278, LOCATE_string___Buffer___enlarge};
1069 val_t variable[7];
1070 struct WBT_ **closurevariable = NULL;
1071 trace.prev = tracehead; tracehead = &trace;
1072 trace.file = LOCATE_string;
1073 /* Register variable[0]: Local variable */
1074 variable[0] = self;
1075 /* Register variable[1]: Local variable */
1076 variable[1] = param0;
1077 /* Register variable[2]: Method return value and escape marker */
1078 /* Register variable[3]: Local variable */
1079 /* Register variable[4]: Result */
1080 variable[4] = ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/;
1081 variable[3] = variable[4];
1082 /* Register variable[4]: Result */
1083 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*cap*/)<=UNTAG_Int( variable[3] /*c*/));
1084 if (UNTAG_Bool(variable[4])) { /*if*/
1085 goto return_label38;
1086 }
1087 while (true) { /*while*/
1088 /* Register variable[4]: Result */
1089 variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*c*/)<=UNTAG_Int( variable[1] /*cap*/));
1090 if (!UNTAG_Bool(variable[4])) break; /* while*/
1091 /* Register variable[4]: Result */
1092 variable[4] = TAG_Int(UNTAG_Int( variable[3] /*c*/)*UNTAG_Int( TAG_Int(2)));
1093 /* Register variable[4]: Result */
1094 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(2)));
1095 variable[3] = variable[4] /*c=*/;
1096 continue_39: while(0);
1097 }
1098 break_39: while(0);
1099 /* Register variable[4]: Local variable */
1100 /* Register variable[5]: Result */
1101 variable[5] = TAG_Int(UNTAG_Int( variable[3] /*c*/)+UNTAG_Int( TAG_Int(1)));
1102 /* Register variable[5]: Result */
1103 variable[5] = BOX_NativeString((char*)malloc((UNTAG_Int(variable[5]) * sizeof(char))));
1104 variable[4] = variable[5];
1105 /* Register variable[5]: Result */
1106 variable[5] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
1107 /* Register variable[6]: Result */
1108 variable[6] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
1109 (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]));
1110 ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/ = variable[4] /*a*/;
1111 ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/ = variable[3] /*c*/;
1112 return_label38: while(false);
1113 tracehead = trace.prev;
1114 return;
1115 }
1116 void string___Buffer___init(val_t self, int* init_table) {
1117 struct trace_t trace = {NULL, NULL, 335, LOCATE_string___Buffer___init};
1118 val_t variable[2];
1119 struct WBT_ **closurevariable = NULL;
1120 trace.prev = tracehead; tracehead = &trace;
1121 trace.file = LOCATE_string;
1122 /* Register variable[0]: Local variable */
1123 variable[0] = self;
1124 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Buffer].i]) return;
1125 /* Register variable[1]: Method return value and escape marker */
1126 CALL_string___Buffer___with_capacity(variable[0])(variable[0], TAG_Int(5), init_table /*YYY*/) /*Buffer::with_capacity*/;
1127 return_label40: while(false);
1128 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Buffer].i] = 1;
1129 tracehead = trace.prev;
1130 return;
1131 }
1132 void string___Buffer___from(val_t self, val_t param0, int* init_table) {
1133 struct trace_t trace = {NULL, NULL, 341, LOCATE_string___Buffer___from};
1134 val_t variable[6];
1135 struct WBT_ **closurevariable = NULL;
1136 trace.prev = tracehead; tracehead = &trace;
1137 trace.file = LOCATE_string;
1138 /* Register variable[0]: Local variable */
1139 variable[0] = self;
1140 /* Register variable[1]: Local variable */
1141 variable[1] = param0;
1142 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Buffer].i]) return;
1143 /* Register variable[2]: Method return value and escape marker */
1144 /* Register variable[3]: Result */
1145 variable[3] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/;
1146 /* Register variable[3]: Result */
1147 variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1)));
1148 ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/ = variable[3];
1149 /* Register variable[3]: Result */
1150 variable[3] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/;
1151 ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/ = variable[3];
1152 /* Register variable[3]: Result */
1153 variable[3] = ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/;
1154 /* Register variable[3]: Result */
1155 variable[3] = BOX_NativeString((char*)malloc((UNTAG_Int(variable[3]) * sizeof(char))));
1156 ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/ = variable[3];
1157 /* Register variable[3]: Result */
1158 variable[3] = CALL_string___AbstractString___items( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractString::items*/;
1159 /* Register variable[4]: Result */
1160 variable[4] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
1161 /* Register variable[5]: Result */
1162 variable[5] = ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/;
1163 (void)memcpy(UNBOX_NativeString(variable[4])+UNTAG_Int( TAG_Int(0)), UNBOX_NativeString(variable[3])+UNTAG_Int( TAG_Int(0)), UNTAG_Int(variable[5]));
1164 return_label41: while(false);
1165 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Buffer].i] = 1;
1166 tracehead = trace.prev;
1167 return;
1168 }
1169 void string___Buffer___with_capacity(val_t self, val_t param0, int* init_table) {
1170 struct trace_t trace = {NULL, NULL, 349, LOCATE_string___Buffer___with_capacity};
1171 val_t variable[4];
1172 struct WBT_ **closurevariable = NULL;
1173 trace.prev = tracehead; tracehead = &trace;
1174 trace.file = LOCATE_string;
1175 /* Register variable[0]: Local variable */
1176 variable[0] = self;
1177 /* Register variable[1]: Local variable */
1178 variable[1] = param0;
1179 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Buffer].i]) return;
1180 /* Register variable[2]: Method return value and escape marker */
1181 /* Register variable[3]: Result */
1182 variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*cap*/)>=UNTAG_Int( TAG_Int(0)));
1183 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___Buffer___with_capacity, LOCATE_string, 352); nit_exit(1);}
1184 /* Register variable[3]: Result */
1185 variable[3] = TAG_Int(UNTAG_Int( variable[1] /*cap*/)+UNTAG_Int( TAG_Int(1)));
1186 /* Register variable[3]: Result */
1187 variable[3] = BOX_NativeString((char*)malloc((UNTAG_Int(variable[3]) * sizeof(char))));
1188 ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/ = variable[3];
1189 ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/ = variable[1] /*cap*/;
1190 ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/ = TAG_Int(0);
1191 return_label42: while(false);
1192 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Buffer].i] = 1;
1193 tracehead = trace.prev;
1194 return;
1195 }
1196 val_t string___Buffer___capacity(val_t self) {
1197 struct trace_t trace = {NULL, NULL, 375, LOCATE_string___Buffer___capacity};
1198 val_t *variable = NULL;
1199 struct WBT_ **closurevariable = NULL;
1200 trace.prev = tracehead; tracehead = &trace;
1201 trace.file = LOCATE_string;
1202 tracehead = trace.prev;
1203 return ATTR_string___Buffer____capacity( self) /*Buffer::_capacity*/;
1204 }
1205 val_t string___Object___to_s(val_t self) {
1206 struct trace_t trace = {NULL, NULL, 385, LOCATE_string___Object___to_s};
1207 val_t variable[3];
1208 struct WBT_ **closurevariable = NULL;
1209 trace.prev = tracehead; tracehead = &trace;
1210 trace.file = LOCATE_string;
1211 /* Register variable[0]: Local variable */
1212 variable[0] = self;
1213 /* Register variable[1]: Method return value and escape marker */
1214 /* Register variable[2]: Result */
1215 variable[2] = CALL_string___Object___inspect(variable[0])(variable[0]) /*Object::inspect*/;
1216 variable[1] = variable[2];
1217 goto return_label43;
1218 return_label43: while(false);
1219 tracehead = trace.prev;
1220 return variable[1];
1221 }
1222 val_t string___Object___inspect(val_t self) {
1223 struct trace_t trace = {NULL, NULL, 388, LOCATE_string___Object___inspect};
1224 val_t variable[4];
1225 struct WBT_ **closurevariable = NULL;
1226 trace.prev = tracehead; tracehead = &trace;
1227 trace.file = LOCATE_string;
1228 /* Register variable[0]: Local variable */
1229 variable[0] = self;
1230 /* Register variable[1]: Method return value and escape marker */
1231 /* Register variable[2]: Local variable */
1232 /* Register variable[3]: Result */
1233 variable[3] = CALL_string___Object___inspect_head(variable[0])(variable[0]) /*Object::inspect_head*/;
1234 variable[2] = variable[3];
1235 variable[1] = variable[2] /*r*/;
1236 goto return_label44;
1237 return_label44: while(false);
1238 tracehead = trace.prev;
1239 return variable[1];
1240 }
1241 val_t string___Object___inspect_head(val_t self) {
1242 struct trace_t trace = {NULL, NULL, 397, LOCATE_string___Object___inspect_head};
1243 static val_t once_value_46 = NIT_NULL; /* Once value for string variable[3]*/
1244 static val_t once_value_47 = NIT_NULL; /* Once value for string variable[3]*/
1245 val_t variable[4];
1246 struct WBT_ **closurevariable = NULL;
1247 trace.prev = tracehead; tracehead = &trace;
1248 trace.file = LOCATE_string;
1249 /* Register variable[0]: Local variable */
1250 variable[0] = self;
1251 /* Register variable[1]: Method return value and escape marker */
1252 variable[2] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
1253 /* Register variable[3]: Once String constant */
1254 if (once_value_46 != NIT_NULL) variable[3] = once_value_46;
1255 else {
1256 variable[3] = NEW_String_string___String___with_native(BOX_NativeString("<"), TAG_Int(1)) /*new String*/;
1257 once_value_46 = variable[3];
1258 }
1259 /* Register variable[3]: Result */
1260 /* Ensure var variable[3]: super-string element*/
1261 CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[3]) /*AbstractArray::add*/;
1262 /* Register variable[3]: Result */
1263 variable[3] = TAG_Int((bigint)variable[0]);
1264 /* Register variable[3]: Result */
1265 variable[3] = CALL_string___Int___to_hex(variable[3])(variable[3]) /*Int::to_hex*/;
1266 /* Ensure var variable[3]: super-string element*/
1267 CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[3]) /*AbstractArray::add*/;
1268 /* Register variable[3]: Once String constant */
1269 if (once_value_47 != NIT_NULL) variable[3] = once_value_47;
1270 else {
1271 variable[3] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1272 once_value_47 = variable[3];
1273 }
1274 /* Register variable[3]: Result */
1275 /* Ensure var variable[3]: super-string element*/
1276 CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[3]) /*AbstractArray::add*/;
1277 /* Register variable[2]: Result */
1278 variable[2] = CALL_string___Object___to_s(variable[2])(variable[2]) /*Object::to_s*/;
1279 variable[1] = variable[2];
1280 goto return_label45;
1281 return_label45: while(false);
1282 tracehead = trace.prev;
1283 return variable[1];
1284 }
1285 val_t string___Object___args(val_t self) {
1286 struct trace_t trace = {NULL, NULL, 404, LOCATE_string___Object___args};
1287 val_t variable[3];
1288 struct WBT_ **closurevariable = NULL;
1289 trace.prev = tracehead; tracehead = &trace;
1290 trace.file = LOCATE_string;
1291 /* Register variable[0]: Local variable */
1292 variable[0] = self;
1293 /* Register variable[1]: Method return value and escape marker */
1294 /* Register variable[2]: Result */
1295 variable[2] = (G_sys);
1296 /* Register variable[2]: Result */
1297 variable[2] = CALL_string___Object___args(variable[2])(variable[2]) /*Sys::args*/;
1298 variable[1] = variable[2];
1299 goto return_label48;
1300 return_label48: while(false);
1301 tracehead = trace.prev;
1302 return variable[1];
1303 }
1304 val_t string___Bool___to_s(val_t self) {
1305 struct trace_t trace = {NULL, NULL, 411, LOCATE_string___Bool___to_s};
1306 static val_t once_value_50; static int once_bool_50; /* Once value for variable[2]*/
1307 static val_t once_value_51 = NIT_NULL; /* Once value for string variable[2]*/
1308 static val_t once_value_52; static int once_bool_52; /* Once value for variable[2]*/
1309 static val_t once_value_53 = NIT_NULL; /* Once value for string variable[2]*/
1310 val_t variable[3];
1311 struct WBT_ **closurevariable = NULL;
1312 trace.prev = tracehead; tracehead = &trace;
1313 trace.file = LOCATE_string;
1314 /* Register variable[0]: Local variable */
1315 variable[0] = self;
1316 /* Register variable[1]: Method return value and escape marker */
1317 if (UNTAG_Bool(variable[0])) { /*if*/
1318 /* Register variable[2]: Once expression result */
1319 if (once_bool_50) variable[2] = once_value_50;
1320 else {
1321 /* Register variable[2]: Once String constant */
1322 if (once_value_51 != NIT_NULL) variable[2] = once_value_51;
1323 else {
1324 variable[2] = NEW_String_string___String___with_native(BOX_NativeString("true"), TAG_Int(4)) /*new String*/;
1325 once_value_51 = variable[2];
1326 }
1327 /* Register variable[2]: Result */
1328 once_value_50 = variable[2];
1329 once_bool_50 = true;
1330 }
1331 /* Register variable[2]: Result */
1332 variable[1] = variable[2];
1333 goto return_label49;
1334 } else { /*if*/
1335 /* Register variable[2]: Once expression result */
1336 if (once_bool_52) variable[2] = once_value_52;
1337 else {
1338 /* Register variable[2]: Once String constant */
1339 if (once_value_53 != NIT_NULL) variable[2] = once_value_53;
1340 else {
1341 variable[2] = NEW_String_string___String___with_native(BOX_NativeString("false"), TAG_Int(5)) /*new String*/;
1342 once_value_53 = variable[2];
1343 }
1344 /* Register variable[2]: Result */
1345 once_value_52 = variable[2];
1346 once_bool_52 = true;
1347 }
1348 /* Register variable[2]: Result */
1349 variable[1] = variable[2];
1350 goto return_label49;
1351 }
1352 return_label49: while(false);
1353 tracehead = trace.prev;
1354 return variable[1];
1355 }
1356 val_t string___Int___to_s(val_t self) {
1357 struct trace_t trace = {NULL, NULL, 446, LOCATE_string___Int___to_s};
1358 val_t variable[3];
1359 struct WBT_ **closurevariable = NULL;
1360 trace.prev = tracehead; tracehead = &trace;
1361 trace.file = LOCATE_string;
1362 /* Register variable[0]: Local variable */
1363 variable[0] = self;
1364 /* Register variable[1]: Method return value and escape marker */
1365 /* Register variable[2]: Result */
1366 variable[2] = CALL_string___Int___to_base(variable[0])(variable[0], TAG_Int(10), TAG_Bool(true)) /*Int::to_base*/;
1367 variable[1] = variable[2];
1368 goto return_label54;
1369 return_label54: while(false);
1370 tracehead = trace.prev;
1371 return variable[1];
1372 }
1373 void string___Int___fill_buffer(val_t self, val_t param0, val_t param1, val_t param2) {
1374 struct trace_t trace = {NULL, NULL, 422, LOCATE_string___Int___fill_buffer};
1375 val_t variable[8];
1376 struct WBT_ **closurevariable = NULL;
1377 trace.prev = tracehead; tracehead = &trace;
1378 trace.file = LOCATE_string;
1379 /* Register variable[0]: Local variable */
1380 variable[0] = self;
1381 /* Register variable[1]: Local variable */
1382 variable[1] = param0;
1383 /* Register variable[2]: Local variable */
1384 variable[2] = param1;
1385 /* Register variable[3]: Local variable */
1386 variable[3] = param2;
1387 /* Register variable[4]: Method return value and escape marker */
1388 /* Register variable[5]: Local variable */
1389 /*variable[5] is variable n*/
1390 /* Register variable[6]: Result */
1391 variable[6] = TAG_Bool(UNTAG_Int(variable[0])<UNTAG_Int( TAG_Int(0)));
1392 if (UNTAG_Bool(variable[6])) { /*if*/
1393 /* Register variable[6]: Result */
1394 variable[6] = TAG_Int(-UNTAG_Int(variable[0]));
1395 variable[5] = variable[6] /*n=*/;
1396 CALL_abstract_collection___Map_____braeq( variable[1] /*s*/)( variable[1] /*s*/, TAG_Int(0), TAG_Char('-')) /*Buffer::[]=*/;
1397 } else { /*if*/
1398 /* Register variable[6]: Result */
1399 variable[6] = TAG_Bool((variable[0])==( TAG_Int(0)));
1400 if (UNTAG_Bool(variable[6])) { /*if*/
1401 CALL_abstract_collection___Map_____braeq( variable[1] /*s*/)( variable[1] /*s*/, TAG_Int(0), TAG_Char('0')) /*Buffer::[]=*/;
1402 goto return_label55;
1403 } else { /*if*/
1404 variable[5] = variable[0] /*n=*/;
1405 }
1406 }
1407 /* Register variable[6]: Local variable */
1408 /* Register variable[7]: Result */
1409 variable[7] = CALL_kernel___Int___digit_count(variable[0])(variable[0], variable[2] /*base*/) /*Int::digit_count*/;
1410 /* Register variable[7]: Result */
1411 variable[7] = TAG_Int(UNTAG_Int(variable[7])-UNTAG_Int( TAG_Int(1)));
1412 variable[6] = variable[7];
1413 while (true) { /*while*/
1414 /* Register variable[7]: Result */
1415 variable[7] = TAG_Bool(UNTAG_Int( variable[6] /*pos*/)>=UNTAG_Int( TAG_Int(0)));
1416 /* Ensure var variable[7]: Left 'and' operand*/
1417 if (UNTAG_Bool(variable[7])) { /* and */
1418 /* Register variable[7]: Result */
1419 variable[7] = TAG_Bool(UNTAG_Int( variable[5] /*n*/)>UNTAG_Int( TAG_Int(0)));
1420 }
1421 /* Register variable[7]: Result */
1422 if (!UNTAG_Bool(variable[7])) break; /* while*/
1423 /* Register variable[7]: Result */
1424 variable[7] = TAG_Int(UNTAG_Int( variable[5] /*n*/)%UNTAG_Int( variable[2] /*base*/));
1425 /* Register variable[7]: Result */
1426 variable[7] = CALL_kernel___Int___to_c(variable[7])(variable[7]) /*Int::to_c*/;
1427 CALL_abstract_collection___Map_____braeq( variable[1] /*s*/)( variable[1] /*s*/, variable[6] /*pos*/, variable[7]) /*Buffer::[]=*/;
1428 /* Register variable[7]: Result */
1429 variable[7] = TAG_Int(UNTAG_Int( variable[5] /*n*/)/UNTAG_Int( variable[2] /*base*/));
1430 variable[5] = variable[7] /*n=*/;
1431 variable[6] = TAG_Int(UNTAG_Int(variable[6])-UNTAG_Int( TAG_Int(1))) /*pos*/;
1432 continue_56: while(0);
1433 }
1434 break_56: while(0);
1435 return_label55: while(false);
1436 tracehead = trace.prev;
1437 return;
1438 }
1439 val_t string___Int___to_hex(val_t self) {
1440 struct trace_t trace = {NULL, NULL, 449, LOCATE_string___Int___to_hex};
1441 val_t variable[3];
1442 struct WBT_ **closurevariable = NULL;
1443 trace.prev = tracehead; tracehead = &trace;
1444 trace.file = LOCATE_string;
1445 /* Register variable[0]: Local variable */
1446 variable[0] = self;
1447 /* Register variable[1]: Method return value and escape marker */
1448 /* Register variable[2]: Result */
1449 variable[2] = CALL_string___Int___to_base(variable[0])(variable[0], TAG_Int(16), TAG_Bool(false)) /*Int::to_base*/;
1450 variable[1] = variable[2];
1451 goto return_label57;
1452 return_label57: while(false);
1453 tracehead = trace.prev;
1454 return variable[1];
1455 }
1456 val_t string___Int___to_base(val_t self, val_t param0, val_t param1) {
1457 struct trace_t trace = {NULL, NULL, 452, LOCATE_string___Int___to_base};
1458 static val_t once_value_59 = NIT_NULL; /* Once value for string variable[6]*/
1459 val_t variable[7];
1460 struct WBT_ **closurevariable = NULL;
1461 trace.prev = tracehead; tracehead = &trace;
1462 trace.file = LOCATE_string;
1463 /* Register variable[0]: Local variable */
1464 variable[0] = self;
1465 /* Register variable[1]: Local variable */
1466 variable[1] = param0;
1467 /* Register variable[2]: Local variable */
1468 variable[2] = param1;
1469 /* Register variable[3]: Method return value and escape marker */
1470 /* Register variable[4]: Local variable */
1471 /* Register variable[5]: Result */
1472 variable[5] = CALL_kernel___Int___digit_count(variable[0])(variable[0], variable[1] /*base*/) /*Int::digit_count*/;
1473 variable[4] = variable[5];
1474 /* Register variable[5]: Local variable */
1475 /* Register variable[6]: Once String constant */
1476 if (once_value_59 != NIT_NULL) variable[6] = once_value_59;
1477 else {
1478 variable[6] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)) /*new String*/;
1479 once_value_59 = variable[6];
1480 }
1481 /* Register variable[6]: Result */
1482 /* Register variable[6]: Result */
1483 variable[6] = CALL_string___String_____star(variable[6])(variable[6], variable[4] /*l*/) /*String::**/;
1484 /* Register variable[6]: Result */
1485 variable[6] = NEW_Buffer_string___Buffer___from(variable[6]) /*new Buffer*/;
1486 variable[5] = variable[6];
1487 CALL_string___Int___fill_buffer(variable[0])(variable[0], variable[5] /*s*/, variable[1] /*base*/, variable[2] /*signed*/) /*Int::fill_buffer*/;
1488 /* Register variable[6]: Result */
1489 variable[6] = CALL_string___Object___to_s( variable[5] /*s*/)( variable[5] /*s*/) /*Buffer::to_s*/;
1490 variable[3] = variable[6];
1491 goto return_label58;
1492 return_label58: while(false);
1493 tracehead = trace.prev;
1494 return variable[3];
1495 }
1496 val_t string___Float___to_s(val_t self) {
1497 struct trace_t trace = {NULL, NULL, 463, LOCATE_string___Float___to_s};
1498 val_t variable[3];
1499 struct WBT_ **closurevariable = NULL;
1500 trace.prev = tracehead; tracehead = &trace;
1501 trace.file = LOCATE_string;
1502 /* Register variable[0]: Local variable */
1503 variable[0] = self;
1504 /* Register variable[1]: Method return value and escape marker */
1505 /* Register variable[2]: Result */
1506 variable[2] = CALL_string___Float___to_precision(variable[0])(variable[0], TAG_Int(6)) /*Float::to_precision*/;
1507 variable[1] = variable[2];
1508 goto return_label60;
1509 return_label60: while(false);
1510 tracehead = trace.prev;
1511 return variable[1];
1512 }
1513 val_t string___Float___to_precision(val_t self, val_t param0) {
1514 struct trace_t trace = {NULL, NULL, 465, LOCATE_string___Float___to_precision};
1515 static val_t once_value_63 = NIT_NULL; /* Once value for string variable[7]*/
1516 static val_t once_value_64 = NIT_NULL; /* Once value for string variable[7]*/
1517 static val_t once_value_65 = NIT_NULL; /* Once value for string variable[7]*/
1518 val_t variable[8];
1519 struct WBT_ **closurevariable = NULL;
1520 trace.prev = tracehead; tracehead = &trace;
1521 trace.file = LOCATE_string;
1522 /* Register variable[0]: Local variable */
1523 variable[0] = self;
1524 /* Register variable[1]: Local variable */
1525 variable[1] = param0;
1526 /* Register variable[2]: Method return value and escape marker */
1527 /* Register variable[3]: Result */
1528 variable[3] = TAG_Bool(( variable[1] /*nb*/)==( TAG_Int(0)));
1529 if (UNTAG_Bool(variable[3])) { /*if*/
1530 /* Register variable[3]: Result */
1531 variable[3] = TAG_Int((bigint)UNBOX_Float(variable[0]));
1532 /* Register variable[3]: Result */
1533 variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Int::to_s*/;
1534 variable[2] = variable[3];
1535 goto return_label61;
1536 }
1537 /* Register variable[3]: Local variable */
1538 /* Register variable[4]: Result */
1539 variable[4] = TAG_Int((bigint)UNBOX_Float(variable[0]));
1540 variable[3] = variable[4];
1541 /* Register variable[4]: Local variable */
1542 /* Register variable[5]: Result */
1543 variable[5] = BOX_Float(1.0);
1544 variable[4] = variable[5];
1545 while (true) { /*while*/
1546 /* Register variable[5]: Result */
1547 variable[5] = TAG_Bool(UNTAG_Int( variable[1] /*nb*/)>UNTAG_Int( TAG_Int(0)));
1548 if (!UNTAG_Bool(variable[5])) break; /* while*/
1549 /* Register variable[5]: Result */
1550 variable[5] = BOX_Float(10.0);
1551 /* Register variable[5]: Result */
1552 variable[5] = BOX_Float(UNBOX_Float( variable[4] /*dec*/)*UNBOX_Float(variable[5]));
1553 variable[4] = variable[5] /*dec=*/;
1554 variable[1] = TAG_Int(UNTAG_Int(variable[1])-UNTAG_Int( TAG_Int(1))) /*nb*/;
1555 continue_62: while(0);
1556 }
1557 break_62: while(0);
1558 /* Register variable[5]: Local variable */
1559 /* Register variable[6]: Result */
1560 variable[6] = BOX_Float((float)UNTAG_Int( variable[3] /*i*/));
1561 /* Register variable[6]: Result */
1562 variable[6] = BOX_Float(UNBOX_Float(variable[0])-UNBOX_Float(variable[6]));
1563 /* Register variable[6]: Result */
1564 variable[6] = BOX_Float(UNBOX_Float(variable[6])*UNBOX_Float( variable[4] /*dec*/));
1565 /* Register variable[6]: Result */
1566 variable[6] = TAG_Int((bigint)UNBOX_Float(variable[6]));
1567 variable[5] = variable[6];
1568 variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
1569 /* Register variable[7]: Once String constant */
1570 if (once_value_63 != NIT_NULL) variable[7] = once_value_63;
1571 else {
1572 variable[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1573 once_value_63 = variable[7];
1574 }
1575 /* Register variable[7]: Result */
1576 /* Ensure var variable[7]: super-string element*/
1577 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
1578 variable[7] = variable[3] /*i*/ /* Ensure var: super-string element*/;
1579 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
1580 /* Register variable[7]: Once String constant */
1581 if (once_value_64 != NIT_NULL) variable[7] = once_value_64;
1582 else {
1583 variable[7] = NEW_String_string___String___with_native(BOX_NativeString("."), TAG_Int(1)) /*new String*/;
1584 once_value_64 = variable[7];
1585 }
1586 /* Register variable[7]: Result */
1587 /* Ensure var variable[7]: super-string element*/
1588 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
1589 variable[7] = variable[5] /*d*/ /* Ensure var: super-string element*/;
1590 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
1591 /* Register variable[7]: Once String constant */
1592 if (once_value_65 != NIT_NULL) variable[7] = once_value_65;
1593 else {
1594 variable[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1595 once_value_65 = variable[7];
1596 }
1597 /* Register variable[7]: Result */
1598 /* Ensure var variable[7]: super-string element*/
1599 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
1600 /* Register variable[6]: Result */
1601 variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
1602 variable[2] = variable[6];
1603 goto return_label61;
1604 return_label61: while(false);
1605 tracehead = trace.prev;
1606 return variable[2];
1607 }
1608 val_t string___Char___to_s(val_t self) {
1609 struct trace_t trace = {NULL, NULL, 482, LOCATE_string___Char___to_s};
1610 val_t variable[4];
1611 struct WBT_ **closurevariable = NULL;
1612 trace.prev = tracehead; tracehead = &trace;
1613 trace.file = LOCATE_string;
1614 /* Register variable[0]: Local variable */
1615 variable[0] = self;
1616 /* Register variable[1]: Method return value and escape marker */
1617 /* Register variable[2]: Local variable */
1618 /* Register variable[3]: Result */
1619 variable[3] = NEW_Buffer_string___Buffer___with_capacity( TAG_Int(1)) /*new Buffer*/;
1620 variable[2] = variable[3];
1621 CALL_abstract_collection___Map_____braeq( variable[2] /*s*/)( variable[2] /*s*/, TAG_Int(0), variable[0]) /*Buffer::[]=*/;
1622 /* Register variable[3]: Result */
1623 variable[3] = CALL_string___Object___to_s( variable[2] /*s*/)( variable[2] /*s*/) /*Buffer::to_s*/;
1624 variable[1] = variable[3];
1625 goto return_label66;
1626 return_label66: while(false);
1627 tracehead = trace.prev;
1628 return variable[1];
1629 }
1630 val_t string___Collection___to_s(val_t self) {
1631 struct trace_t trace = {NULL, NULL, 491, LOCATE_string___Collection___to_s};
1632 val_t variable[7];
1633 struct WBT_ **closurevariable = NULL;
1634 trace.prev = tracehead; tracehead = &trace;
1635 trace.file = LOCATE_string;
1636 /* Register variable[0]: Local variable */
1637 variable[0] = self;
1638 /* Register variable[1]: Method return value and escape marker */
1639 /* Register variable[2]: Local variable */
1640 /* Register variable[3]: Result */
1641 variable[3] = NEW_Buffer_string___Buffer___init() /*new Buffer*/;
1642 variable[2] = variable[3];
1643 /* Register variable[3]: For iterator */
1644 variable[3] = CALL_abstract_collection___Collection___iterator(variable[0])(variable[0]) /*Collection::iterator*/;
1645 while (true) { /*for*/
1646 /* Register variable[4]: For 'is_ok' result */
1647 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*Iterator::is_ok*/;
1648 if (!UNTAG_Bool(variable[4])) break; /*for*/
1649 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*Iterator::item*/ /* Ensure var: For item*/;
1650 /* Register variable[5]: Local variable */
1651 variable[5] = variable[4];
1652 /* Register variable[6]: Result */
1653 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::==*/)))))));
1654 if (UNTAG_Bool(variable[6])) { /*if*/
1655 /* Register variable[6]: Result */
1656 variable[6] = CALL_string___Object___to_s( variable[5] /*e*/)( variable[5] /*e*/) /*Object::to_s*/;
1657 CALL_abstract_collection___IndexedCollection___append( variable[2] /*s*/)( variable[2] /*s*/, variable[6]) /*Buffer::append*/;
1658 }
1659 continue_68: while(0);
1660 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
1661 }
1662 break_68: while(0);
1663 /* Register variable[3]: Result */
1664 variable[3] = CALL_string___Object___to_s( variable[2] /*s*/)( variable[2] /*s*/) /*Buffer::to_s*/;
1665 variable[1] = variable[3];
1666 goto return_label67;
1667 return_label67: while(false);
1668 tracehead = trace.prev;
1669 return variable[1];
1670 }
1671 val_t string___Collection___join(val_t self, val_t param0) {
1672 struct trace_t trace = {NULL, NULL, 499, LOCATE_string___Collection___join};
1673 static val_t once_value_70 = NIT_NULL; /* Once value for string variable[3]*/
1674 val_t variable[7];
1675 struct WBT_ **closurevariable = NULL;
1676 trace.prev = tracehead; tracehead = &trace;
1677 trace.file = LOCATE_string;
1678 /* Register variable[0]: Local variable */
1679 variable[0] = self;
1680 /* Register variable[1]: Local variable */
1681 variable[1] = param0;
1682 /* Register variable[2]: Method return value and escape marker */
1683 /* Register variable[3]: Result */
1684 variable[3] = CALL_abstract_collection___Collection___is_empty(variable[0])(variable[0]) /*Collection::is_empty*/;
1685 if (UNTAG_Bool(variable[3])) { /*if*/
1686 /* Register variable[3]: Once String constant */
1687 if (once_value_70 != NIT_NULL) variable[3] = once_value_70;
1688 else {
1689 variable[3] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1690 once_value_70 = variable[3];
1691 }
1692 /* Register variable[3]: Result */
1693 variable[2] = variable[3];
1694 goto return_label69;
1695 }
1696 /* Register variable[3]: Local variable */
1697 /* Register variable[4]: Result */
1698 variable[4] = NEW_Buffer_string___Buffer___init() /*new Buffer*/;
1699 variable[3] = variable[4];
1700 /* Register variable[4]: Local variable */
1701 /* Register variable[5]: Result */
1702 variable[5] = CALL_abstract_collection___Collection___iterator(variable[0])(variable[0]) /*Collection::iterator*/;
1703 variable[4] = variable[5];
1704 /* Register variable[5]: Local variable */
1705 /* Register variable[6]: Result */
1706 variable[6] = CALL_abstract_collection___Iterator___item( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::item*/;
1707 variable[5] = variable[6];
1708 /* Register variable[6]: Result */
1709 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::==*/)))))));
1710 if (UNTAG_Bool(variable[6])) { /*if*/
1711 /* Register variable[6]: Result */
1712 variable[6] = CALL_string___Object___to_s( variable[5] /*e*/)( variable[5] /*e*/) /*Object::to_s*/;
1713 CALL_abstract_collection___IndexedCollection___append( variable[3] /*s*/)( variable[3] /*s*/, variable[6]) /*Buffer::append*/;
1714 }
1715 CALL_abstract_collection___Iterator___next( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::next*/;
1716 while (true) { /*while*/
1717 /* Register variable[6]: Result */
1718 variable[6] = CALL_abstract_collection___Iterator___is_ok( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::is_ok*/;
1719 if (!UNTAG_Bool(variable[6])) break; /* while*/
1720 CALL_abstract_collection___IndexedCollection___append( variable[3] /*s*/)( variable[3] /*s*/, variable[1] /*sep*/) /*Buffer::append*/;
1721 /* Register variable[6]: Result */
1722 variable[6] = CALL_abstract_collection___Iterator___item( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::item*/;
1723 variable[5] = variable[6] /*e=*/;
1724 /* Register variable[6]: Result */
1725 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::==*/)))))));
1726 if (UNTAG_Bool(variable[6])) { /*if*/
1727 /* Register variable[6]: Result */
1728 variable[6] = CALL_string___Object___to_s( variable[5] /*e*/)( variable[5] /*e*/) /*Object::to_s*/;
1729 CALL_abstract_collection___IndexedCollection___append( variable[3] /*s*/)( variable[3] /*s*/, variable[6]) /*Buffer::append*/;
1730 }
1731 CALL_abstract_collection___Iterator___next( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::next*/;
1732 continue_71: while(0);
1733 }
1734 break_71: while(0);
1735 /* Register variable[6]: Result */
1736 variable[6] = CALL_string___Object___to_s( variable[3] /*s*/)( variable[3] /*s*/) /*Buffer::to_s*/;
1737 variable[2] = variable[6];
1738 goto return_label69;
1739 return_label69: while(false);
1740 tracehead = trace.prev;
1741 return variable[2];
1742 }
1743 val_t string___Array___to_s(val_t self) {
1744 struct trace_t trace = {NULL, NULL, 524, LOCATE_string___Array___to_s};
1745 val_t variable[10];
1746 struct WBT_ **closurevariable = NULL;
1747 trace.prev = tracehead; tracehead = &trace;
1748 trace.file = LOCATE_string;
1749 /* Register variable[0]: Local variable */
1750 variable[0] = self;
1751 /* Register variable[1]: Method return value and escape marker */
1752 /* Register variable[2]: Local variable */
1753 /* Register variable[3]: Result */
1754 variable[3] = NEW_Buffer_string___Buffer___init() /*new Buffer*/;
1755 variable[2] = variable[3];
1756 /* Register variable[3]: Local variable */
1757 variable[3] = TAG_Int(0);
1758 /* Register variable[4]: Local variable */
1759 /* Register variable[5]: Result */
1760 variable[5] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
1761 variable[4] = variable[5];
1762 while (true) { /*while*/
1763 /* Register variable[5]: Result */
1764 variable[5] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int( variable[4] /*l*/));
1765 if (!UNTAG_Bool(variable[5])) break; /* while*/
1766 /* Register variable[5]: Local variable */
1767 /* Register variable[6]: Local variable */
1768 variable[6] = variable[0];
1769 /* Register variable[7]: Local variable */
1770 variable[7] = variable[3] /*i*/;
1771 /* Register variable[8]: Method return value and escape marker */
1772 /* Register variable[9]: Result */
1773 variable[9] = TAG_Bool(UNTAG_Int( variable[7] /*index*/)>=UNTAG_Int( TAG_Int(0)));
1774 /* Ensure var variable[9]: Left 'and' operand*/
1775 if (UNTAG_Bool(variable[9])) { /* and */
1776 /* Register variable[9]: Result */
1777 variable[9] = ATTR_array___AbstractArrayRead____length(variable[6]) /*AbstractArrayRead::_length*/;
1778 /* Register variable[9]: Result */
1779 variable[9] = TAG_Bool(UNTAG_Int( variable[7] /*index*/)<UNTAG_Int(variable[9]));
1780 }
1781 /* Register variable[9]: Result */
1782 if (!UNTAG_Bool(variable[9])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_string, 234); nit_exit(1);}
1783 /* Register variable[9]: Result */
1784 variable[9] = ATTR_array___Array____items(variable[6]) /*Array::_items*/;
1785 /* Register variable[9]: Result */
1786 variable[9] = UNBOX_NativeArray(variable[9])[UNTAG_Int( variable[7] /*index*/)];
1787 variable[8] = variable[9];
1788 goto return_label74;
1789 return_label74: while(false);
1790 /* Register variable[6]: Result */
1791 variable[6] = variable[8];
1792 variable[5] = variable[6];
1793 /* Register variable[6]: Result */
1794 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::==*/)))))));
1795 if (UNTAG_Bool(variable[6])) { /*if*/
1796 /* Register variable[6]: Result */
1797 variable[6] = CALL_string___Object___to_s( variable[5] /*e*/)( variable[5] /*e*/) /*Object::to_s*/;
1798 CALL_abstract_collection___IndexedCollection___append( variable[2] /*s*/)( variable[2] /*s*/, variable[6]) /*Buffer::append*/;
1799 }
1800 variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
1801 continue_73: while(0);
1802 }
1803 break_73: while(0);
1804 /* Register variable[5]: Result */
1805 variable[5] = CALL_string___Object___to_s( variable[2] /*s*/)( variable[2] /*s*/) /*Buffer::to_s*/;
1806 variable[1] = variable[5];
1807 goto return_label72;
1808 return_label72: while(false);
1809 tracehead = trace.prev;
1810 return variable[1];
1811 }
1812 val_t string___Map___map_join(val_t self, val_t param0, val_t param1) {
1813 struct trace_t trace = {NULL, NULL, 540, LOCATE_string___Map___map_join};
1814 static val_t once_value_76 = NIT_NULL; /* Once value for string variable[4]*/
1815 static val_t once_value_77 = NIT_NULL; /* Once value for string variable[9]*/
1816 static val_t once_value_78 = NIT_NULL; /* Once value for string variable[9]*/
1817 static val_t once_value_79 = NIT_NULL; /* Once value for string variable[9]*/
1818 static val_t once_value_80 = NIT_NULL; /* Once value for string variable[9]*/
1819 static val_t once_value_82 = NIT_NULL; /* Once value for string variable[9]*/
1820 static val_t once_value_83 = NIT_NULL; /* Once value for string variable[9]*/
1821 static val_t once_value_84 = NIT_NULL; /* Once value for string variable[9]*/
1822 static val_t once_value_85 = NIT_NULL; /* Once value for string variable[9]*/
1823 val_t variable[10];
1824 struct WBT_ **closurevariable = NULL;
1825 trace.prev = tracehead; tracehead = &trace;
1826 trace.file = LOCATE_string;
1827 /* Register variable[0]: Local variable */
1828 variable[0] = self;
1829 /* Register variable[1]: Local variable */
1830 variable[1] = param0;
1831 /* Register variable[2]: Local variable */
1832 variable[2] = param1;
1833 /* Register variable[3]: Method return value and escape marker */
1834 /* Register variable[4]: Result */
1835 variable[4] = CALL_abstract_collection___Collection___is_empty(variable[0])(variable[0]) /*Collection::is_empty*/;
1836 if (UNTAG_Bool(variable[4])) { /*if*/
1837 /* Register variable[4]: Once String constant */
1838 if (once_value_76 != NIT_NULL) variable[4] = once_value_76;
1839 else {
1840 variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1841 once_value_76 = variable[4];
1842 }
1843 /* Register variable[4]: Result */
1844 variable[3] = variable[4];
1845 goto return_label75;
1846 }
1847 /* Register variable[4]: Local variable */
1848 /* Register variable[5]: Result */
1849 variable[5] = NEW_Buffer_string___Buffer___init() /*new Buffer*/;
1850 variable[4] = variable[5];
1851 /* Register variable[5]: Local variable */
1852 /* Register variable[6]: Result */
1853 variable[6] = CALL_abstract_collection___Collection___iterator(variable[0])(variable[0]) /*MapRead::iterator*/;
1854 variable[5] = variable[6];
1855 /* Register variable[6]: Local variable */
1856 /* Register variable[7]: Result */
1857 variable[7] = CALL_abstract_collection___MapIterator___key( variable[5] /*i*/)( variable[5] /*i*/) /*MapIterator::key*/;
1858 variable[6] = variable[7];
1859 /* Register variable[7]: Local variable */
1860 /* Register variable[8]: Result */
1861 variable[8] = CALL_abstract_collection___Iterator___item( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::item*/;
1862 variable[7] = variable[8];
1863 /* Register variable[8]: Result */
1864 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::==*/)))))));
1865 if (UNTAG_Bool(variable[8])) { /*if*/
1866 variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(7)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
1867 /* Register variable[9]: Once String constant */
1868 if (once_value_77 != NIT_NULL) variable[9] = once_value_77;
1869 else {
1870 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1871 once_value_77 = variable[9];
1872 }
1873 /* Register variable[9]: Result */
1874 /* Ensure var variable[9]: super-string element*/
1875 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1876 variable[9] = variable[6] /*k*/ /* Ensure var: super-string element*/;
1877 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
1878 /* Register variable[9]: Once String constant */
1879 if (once_value_78 != NIT_NULL) variable[9] = once_value_78;
1880 else {
1881 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1882 once_value_78 = variable[9];
1883 }
1884 /* Register variable[9]: Result */
1885 /* Ensure var variable[9]: super-string element*/
1886 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1887 variable[9] = variable[2] /*couple_sep*/ /* Ensure var: super-string element*/;
1888 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1889 /* Register variable[9]: Once String constant */
1890 if (once_value_79 != NIT_NULL) variable[9] = once_value_79;
1891 else {
1892 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1893 once_value_79 = variable[9];
1894 }
1895 /* Register variable[9]: Result */
1896 /* Ensure var variable[9]: super-string element*/
1897 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1898 variable[9] = variable[7] /*e*/ /* Ensure var: super-string element*/;
1899 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
1900 /* Register variable[9]: Once String constant */
1901 if (once_value_80 != NIT_NULL) variable[9] = once_value_80;
1902 else {
1903 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1904 once_value_80 = variable[9];
1905 }
1906 /* Register variable[9]: Result */
1907 /* Ensure var variable[9]: super-string element*/
1908 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1909 /* Register variable[8]: Result */
1910 variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
1911 CALL_abstract_collection___IndexedCollection___append( variable[4] /*s*/)( variable[4] /*s*/, variable[8]) /*Buffer::append*/;
1912 }
1913 CALL_abstract_collection___Iterator___next( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::next*/;
1914 while (true) { /*while*/
1915 /* Register variable[8]: Result */
1916 variable[8] = CALL_abstract_collection___Iterator___is_ok( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::is_ok*/;
1917 if (!UNTAG_Bool(variable[8])) break; /* while*/
1918 CALL_abstract_collection___IndexedCollection___append( variable[4] /*s*/)( variable[4] /*s*/, variable[1] /*sep*/) /*Buffer::append*/;
1919 /* Register variable[8]: Result */
1920 variable[8] = CALL_abstract_collection___MapIterator___key( variable[5] /*i*/)( variable[5] /*i*/) /*MapIterator::key*/;
1921 variable[6] = variable[8] /*k=*/;
1922 /* Register variable[8]: Result */
1923 variable[8] = CALL_abstract_collection___Iterator___item( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::item*/;
1924 variable[7] = variable[8] /*e=*/;
1925 /* Register variable[8]: Result */
1926 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::==*/)))))));
1927 if (UNTAG_Bool(variable[8])) { /*if*/
1928 variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(7)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
1929 /* Register variable[9]: Once String constant */
1930 if (once_value_82 != NIT_NULL) variable[9] = once_value_82;
1931 else {
1932 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1933 once_value_82 = variable[9];
1934 }
1935 /* Register variable[9]: Result */
1936 /* Ensure var variable[9]: super-string element*/
1937 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1938 variable[9] = variable[6] /*k*/ /* Ensure var: super-string element*/;
1939 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
1940 /* Register variable[9]: Once String constant */
1941 if (once_value_83 != NIT_NULL) variable[9] = once_value_83;
1942 else {
1943 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1944 once_value_83 = variable[9];
1945 }
1946 /* Register variable[9]: Result */
1947 /* Ensure var variable[9]: super-string element*/
1948 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1949 variable[9] = variable[2] /*couple_sep*/ /* Ensure var: super-string element*/;
1950 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1951 /* Register variable[9]: Once String constant */
1952 if (once_value_84 != NIT_NULL) variable[9] = once_value_84;
1953 else {
1954 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1955 once_value_84 = variable[9];
1956 }
1957 /* Register variable[9]: Result */
1958 /* Ensure var variable[9]: super-string element*/
1959 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1960 variable[9] = variable[7] /*e*/ /* Ensure var: super-string element*/;
1961 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
1962 /* Register variable[9]: Once String constant */
1963 if (once_value_85 != NIT_NULL) variable[9] = once_value_85;
1964 else {
1965 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1966 once_value_85 = variable[9];
1967 }
1968 /* Register variable[9]: Result */
1969 /* Ensure var variable[9]: super-string element*/
1970 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1971 /* Register variable[8]: Result */
1972 variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
1973 CALL_abstract_collection___IndexedCollection___append( variable[4] /*s*/)( variable[4] /*s*/, variable[8]) /*Buffer::append*/;
1974 }
1975 CALL_abstract_collection___Iterator___next( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::next*/;
1976 continue_81: while(0);
1977 }
1978 break_81: while(0);
1979 /* Register variable[8]: Result */
1980 variable[8] = CALL_string___Object___to_s( variable[4] /*s*/)( variable[4] /*s*/) /*Buffer::to_s*/;
1981 variable[3] = variable[8];
1982 goto return_label75;
1983 return_label75: while(false);
1984 tracehead = trace.prev;
1985 return variable[3];
1986 }
1987 val_t string___NativeString_____bra(val_t self, val_t param0) {
1988 struct trace_t trace = {NULL, NULL, 572, LOCATE_string___NativeString_____bra};
1989 val_t *variable = NULL;
1990 struct WBT_ **closurevariable = NULL;
1991 trace.prev = tracehead; tracehead = &trace;
1992 trace.file = LOCATE_string;
1993 tracehead = trace.prev;
1994 return TAG_Char(UNBOX_NativeString( self)[UNTAG_Int( param0)]);
1995 }
1996 void string___NativeString_____braeq(val_t self, val_t param0, val_t param1) {
1997 struct trace_t trace = {NULL, NULL, 573, LOCATE_string___NativeString_____braeq};
1998 val_t *variable = NULL;
1999 struct WBT_ **closurevariable = NULL;
2000 trace.prev = tracehead; tracehead = &trace;
2001 trace.file = LOCATE_string;
2002 UNBOX_NativeString( self)[UNTAG_Int( param0)]=UNTAG_Char( param1);
2003 tracehead = trace.prev;
2004 return;
2005 }
2006 void string___NativeString___copy_to(val_t self, val_t param0, val_t param1, val_t param2, val_t param3) {
2007 struct trace_t trace = {NULL, NULL, 574, LOCATE_string___NativeString___copy_to};
2008 val_t *variable = NULL;
2009 struct WBT_ **closurevariable = NULL;
2010 trace.prev = tracehead; tracehead = &trace;
2011 trace.file = LOCATE_string;
2012 (void)memcpy(UNBOX_NativeString( param0)+UNTAG_Int( param3), UNBOX_NativeString( self)+UNTAG_Int( param2), UNTAG_Int( param1));
2013 tracehead = trace.prev;
2014 return;
2015 }
2016 val_t string___NativeString___cstring_length(val_t self) {
2017 struct trace_t trace = {NULL, NULL, 576, LOCATE_string___NativeString___cstring_length};
2018 val_t variable[4];
2019 struct WBT_ **closurevariable = NULL;
2020 trace.prev = tracehead; tracehead = &trace;
2021 trace.file = LOCATE_string;
2022 /* Register variable[0]: Local variable */
2023 variable[0] = self;
2024 /* Register variable[1]: Method return value and escape marker */
2025 /* Register variable[2]: Local variable */
2026 variable[2] = TAG_Int(0);
2027 while (true) { /*while*/
2028 /* Register variable[3]: Result */
2029 variable[3] = TAG_Char(UNBOX_NativeString(variable[0])[UNTAG_Int( variable[2] /*l*/)]);
2030 /* Register variable[3]: Result */
2031 variable[3] = TAG_Bool((variable[3])!=( TAG_Char('\0')));
2032 if (!UNTAG_Bool(variable[3])) break; /* while*/
2033 variable[2] = TAG_Int(UNTAG_Int(variable[2])+UNTAG_Int( TAG_Int(1))) /*l*/;
2034 continue_87: while(0);
2035 }
2036 break_87: while(0);
2037 variable[1] = variable[2] /*l*/;
2038 goto return_label86;
2039 return_label86: while(false);
2040 tracehead = trace.prev;
2041 return variable[1];
2042 }
2043 val_t string___NativeString___atoi(val_t self) {
2044 struct trace_t trace = {NULL, NULL, 583, LOCATE_string___NativeString___atoi};
2045 val_t *variable = NULL;
2046 struct WBT_ **closurevariable = NULL;
2047 trace.prev = tracehead; tracehead = &trace;
2048 trace.file = LOCATE_string;
2049 tracehead = trace.prev;
2050 return TAG_Int(atoi(UNBOX_NativeString( self)));
2051 }
2052 void string___NativeString___init(val_t self, int* init_table) {
2053 struct trace_t trace = {NULL, NULL, 0, LOCATE_string___NativeString___init};
2054 val_t *variable = NULL;
2055 struct WBT_ **closurevariable = NULL;
2056 trace.prev = tracehead; tracehead = &trace;
2057 trace.file = LOCATE_string;
2058 tracehead = trace.prev;
2059 return;
2060 }
2061 val_t string___StringCapable___calloc_string(val_t self, val_t param0) {
2062 struct trace_t trace = {NULL, NULL, 588, LOCATE_string___StringCapable___calloc_string};
2063 val_t *variable = NULL;
2064 struct WBT_ **closurevariable = NULL;
2065 trace.prev = tracehead; tracehead = &trace;
2066 trace.file = LOCATE_string;
2067 tracehead = trace.prev;
2068 return BOX_NativeString((char*)malloc((UNTAG_Int( param0) * sizeof(char))));
2069 }
2070 void string___StringCapable___init(val_t self, int* init_table) {
2071 struct trace_t trace = {NULL, NULL, 0, LOCATE_string___StringCapable___init};
2072 val_t *variable = NULL;
2073 struct WBT_ **closurevariable = NULL;
2074 trace.prev = tracehead; tracehead = &trace;
2075 trace.file = LOCATE_string;
2076 tracehead = trace.prev;
2077 return;
2078 }
2079 val_t string___Sys___args(val_t self) {
2080 struct trace_t trace = {NULL, NULL, 594, LOCATE_string___Sys___args};
2081 val_t variable[3];
2082 struct WBT_ **closurevariable = NULL;
2083 trace.prev = tracehead; tracehead = &trace;
2084 trace.file = LOCATE_string;
2085 /* Register variable[0]: Local variable */
2086 variable[0] = self;
2087 /* Register variable[1]: Method return value and escape marker */
2088 /* Register variable[2]: Result */
2089 variable[2] = ATTR_string___Sys____args_cache(variable[0]) /*Sys::_args_cache*/;
2090 /* Register variable[2]: Result */
2091 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::==*/)))));
2092 if (UNTAG_Bool(variable[2])) { /*if*/
2093 CALL_string___Sys___init_args(variable[0])(variable[0]) /*Sys::init_args*/;
2094 }
2095 /* Register variable[2]: Result */
2096 variable[2] = ATTR_string___Sys____args_cache(variable[0]) /*Sys::_args_cache*/;
2097 variable[1] = variable[2];
2098 goto return_label88;
2099 return_label88: while(false);
2100 tracehead = trace.prev;
2101 return variable[1];
2102 }
2103 val_t string___Sys___program_name(val_t self) {
2104 struct trace_t trace = {NULL, NULL, 600, LOCATE_string___Sys___program_name};
2105 val_t variable[3];
2106 struct WBT_ **closurevariable = NULL;
2107 trace.prev = tracehead; tracehead = &trace;
2108 trace.file = LOCATE_string;
2109 /* Register variable[0]: Local variable */
2110 variable[0] = self;
2111 /* Register variable[1]: Method return value and escape marker */
2112 /* Register variable[2]: Result */
2113 variable[2] = CALL_string___Sys___native_argv(variable[0])(variable[0], TAG_Int(0)) /*Sys::native_argv*/;
2114 /* Register variable[2]: Result */
2115 variable[2] = NEW_String_string___String___from_cstring(variable[2]) /*new String*/;
2116 variable[1] = variable[2];
2117 goto return_label89;
2118 return_label89: while(false);
2119 tracehead = trace.prev;
2120 return variable[1];
2121 }
2122 void string___Sys___init_args(val_t self) {
2123 struct trace_t trace = {NULL, NULL, 606, LOCATE_string___Sys___init_args};
2124 val_t variable[7];
2125 struct WBT_ **closurevariable = NULL;
2126 trace.prev = tracehead; tracehead = &trace;
2127 trace.file = LOCATE_string;
2128 /* Register variable[0]: Local variable */
2129 variable[0] = self;
2130 /* Register variable[1]: Method return value and escape marker */
2131 /* Register variable[2]: Local variable */
2132 /* Register variable[3]: Result */
2133 variable[3] = CALL_string___Sys___native_argc(variable[0])(variable[0]) /*Sys::native_argc*/;
2134 variable[2] = variable[3];
2135 /* Register variable[3]: Local variable */
2136 /* Register variable[4]: Result */
2137 variable[4] = NEW_Array_array___Array___with_capacity( TAG_Int(0)) /*new Array[String]*/;
2138 variable[3] = variable[4];
2139 /* Register variable[4]: Local variable */
2140 variable[4] = TAG_Int(1);
2141 while (true) { /*while*/
2142 /* Register variable[5]: Result */
2143 variable[5] = TAG_Bool(UNTAG_Int( variable[4] /*i*/)<UNTAG_Int( variable[2] /*argc*/));
2144 if (!UNTAG_Bool(variable[5])) break; /* while*/
2145 /* Register variable[5]: Result */
2146 variable[5] = TAG_Int(UNTAG_Int( variable[4] /*i*/)-UNTAG_Int( TAG_Int(1)));
2147 /* Register variable[6]: Result */
2148 variable[6] = CALL_string___Sys___native_argv(variable[0])(variable[0], variable[4] /*i*/) /*Sys::native_argv*/;
2149 /* Register variable[6]: Result */
2150 variable[6] = NEW_String_string___String___from_cstring(variable[6]) /*new String*/;
2151 CALL_abstract_collection___Map_____braeq( variable[3] /*args*/)( variable[3] /*args*/, variable[5], variable[6]) /*Array::[]=*/;
2152 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
2153 continue_91: while(0);
2154 }
2155 break_91: while(0);
2156 ATTR_string___Sys____args_cache(variable[0]) /*Sys::_args_cache*/ = variable[3] /*args*/;
2157 return_label90: while(false);
2158 tracehead = trace.prev;
2159 return;
2160 }
2161 val_t string___Sys___native_argc(val_t self) {
2162 struct trace_t trace = {NULL, NULL, 619, LOCATE_string___Sys___native_argc};
2163 val_t *variable = NULL;
2164 struct WBT_ **closurevariable = NULL;
2165 trace.prev = tracehead; tracehead = &trace;
2166 trace.file = LOCATE_string;
2167 tracehead = trace.prev;
2168 return TAG_Int(kernel_Sys_Sys_native_argc_0( self));
2169 }
2170 val_t string___Sys___native_argv(val_t self, val_t param0) {
2171 struct trace_t trace = {NULL, NULL, 621, LOCATE_string___Sys___native_argv};
2172 val_t *variable = NULL;
2173 struct WBT_ **closurevariable = NULL;
2174 trace.prev = tracehead; tracehead = &trace;
2175 trace.file = LOCATE_string;
2176 tracehead = trace.prev;
2177 return BOX_NativeString(kernel_Sys_Sys_native_argv_1( self, UNTAG_Int( param0)));
2178 }