update NOTICE and LICENSE
[nit.git] / c_src / string._sep.c
1 /* This C file is generated by NIT to compile module string. */
2 #include "string._sep.h"
3 val_t string___AbstractString___items(val_t p0){
4 struct {struct stack_frame_t me;} fra;
5 val_t REGB0;
6 val_t tmp;
7 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
8 fra.me.file = LOCATE_string;
9 fra.me.line = 26;
10 fra.me.meth = LOCATE_string___AbstractString___items;
11 fra.me.has_broke = 0;
12 fra.me.REG_size = 1;
13 fra.me.REG[0] = NIT_NULL;
14 fra.me.REG[0] = p0;
15 /* ./../lib/standard//string.nit:26 */
16 REGB0 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
17 if (UNTAG_Bool(REGB0)) {
18 } else {
19 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 26);
20 }
21 fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
22 stack_frame_head = fra.me.prev;
23 return fra.me.REG[0];
24 }
25 val_t string___AbstractString_____bra(val_t p0, val_t p1){
26 struct {struct stack_frame_t me;} fra;
27 val_t REGB0;
28 val_t REGB1;
29 val_t tmp;
30 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
31 fra.me.file = LOCATE_string;
32 fra.me.line = 28;
33 fra.me.meth = LOCATE_string___AbstractString_____bra;
34 fra.me.has_broke = 0;
35 fra.me.REG_size = 1;
36 fra.me.REG[0] = NIT_NULL;
37 fra.me.REG[0] = p0;
38 REGB0 = p1;
39 /* ./../lib/standard//string.nit:28 */
40 REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
41 if (UNTAG_Bool(REGB1)) {
42 } else {
43 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 28);
44 }
45 fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
46 /* ./../lib/standard//string.nit:585 */
47 REGB0 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]);
48 /* ./../lib/standard//string.nit:28 */
49 goto label1;
50 label1: while(0);
51 stack_frame_head = fra.me.prev;
52 return REGB0;
53 }
54 val_t string___AbstractString___substring(val_t p0, val_t p1, val_t p2){
55 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
56 val_t REGB0;
57 val_t REGB1;
58 val_t REGB2;
59 val_t tmp;
60 static val_t once_value_3; /* Once value */
61 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
62 fra.me.file = LOCATE_string;
63 fra.me.line = 30;
64 fra.me.meth = LOCATE_string___AbstractString___substring;
65 fra.me.has_broke = 0;
66 fra.me.REG_size = 3;
67 fra.me.REG[0] = NIT_NULL;
68 fra.me.REG[1] = NIT_NULL;
69 fra.me.REG[2] = NIT_NULL;
70 fra.me.REG[0] = p0;
71 REGB0 = p1;
72 REGB1 = p2;
73 /* ./../lib/standard//string.nit:38 */
74 REGB2 = TAG_Int(0);
75 /* ./../lib/standard//kernel.nit:213 */
76 REGB2 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB2));
77 /* ./../lib/standard//string.nit:38 */
78 if (UNTAG_Bool(REGB2)) {
79 } else {
80 nit_abort("Assert failed", NULL, LOCATE_string, 38);
81 }
82 /* ./../lib/standard//kernel.nit:215 */
83 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
84 /* ./../lib/standard//string.nit:39 */
85 REGB1 = REGB2;
86 /* ./../lib/standard//string.nit:40 */
87 REGB2 = TAG_Int(0);
88 /* ./../lib/standard//kernel.nit:212 */
89 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
90 /* ./../lib/standard//string.nit:40 */
91 if (UNTAG_Bool(REGB2)) {
92 REGB2 = TAG_Int(0);
93 REGB0 = REGB2;
94 }
95 /* ./../lib/standard//collection//array.nit:23 */
96 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
97 if (UNTAG_Bool(REGB2)) {
98 } else {
99 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
100 }
101 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
102 /* ./../lib/standard//kernel.nit:214 */
103 REGB2 = TAG_Bool(UNTAG_Int(REGB1)>UNTAG_Int(REGB2));
104 /* ./../lib/standard//string.nit:41 */
105 if (UNTAG_Bool(REGB2)) {
106 /* ./../lib/standard//collection//array.nit:23 */
107 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
108 if (UNTAG_Bool(REGB2)) {
109 } else {
110 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
111 }
112 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
113 /* ./../lib/standard//string.nit:41 */
114 REGB1 = REGB2;
115 }
116 /* ./../lib/standard//kernel.nit:212 */
117 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
118 /* ./../lib/standard//string.nit:42 */
119 if (UNTAG_Bool(REGB2)) {
120 /* ./../lib/standard//kernel.nit:217 */
121 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
122 /* ./../lib/standard//string.nit:43 */
123 fra.me.REG[1] = NEW_Buffer_string___Buffer___with_capacity(REGB2);
124 /* ./../lib/standard//string.nit:44 */
125 while(1) {
126 /* ./../lib/standard//kernel.nit:212 */
127 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
128 /* ./../lib/standard//string.nit:44 */
129 if (UNTAG_Bool(REGB2)) {
130 /* ./../lib/standard//string.nit:45 */
131 REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
132 if (UNTAG_Bool(REGB2)) {
133 } else {
134 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 45);
135 }
136 fra.me.REG[2] = ATTR_string___AbstractString____items(fra.me.REG[0]);
137 /* ./../lib/standard//string.nit:585 */
138 REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
139 /* ./../lib/standard//string.nit:45 */
140 CALL_abstract_collection___Sequence___push(fra.me.REG[1])(fra.me.REG[1], REGB2);
141 /* ./../lib/standard//string.nit:46 */
142 REGB2 = TAG_Int(1);
143 /* ./../lib/standard//kernel.nit:215 */
144 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
145 /* ./../lib/standard//string.nit:46 */
146 REGB0 = REGB2;
147 } else {
148 /* ./../lib/standard//string.nit:44 */
149 goto label1;
150 }
151 }
152 label1: while(0);
153 /* ./../lib/standard//string.nit:48 */
154 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
155 goto label2;
156 } else {
157 /* ./../lib/standard//string.nit:50 */
158 if (!once_value_3) {
159 fra.me.REG[0] = BOX_NativeString("");
160 REGB0 = TAG_Int(0);
161 fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
162 once_value_3 = fra.me.REG[0];
163 register_static_object(&once_value_3);
164 } else fra.me.REG[0] = once_value_3;
165 fra.me.REG[0] = fra.me.REG[0];
166 fra.me.REG[1] = fra.me.REG[0];
167 goto label2;
168 }
169 label2: while(0);
170 stack_frame_head = fra.me.prev;
171 return fra.me.REG[1];
172 }
173 val_t string___AbstractString___substring_from(val_t p0, val_t p1){
174 struct {struct stack_frame_t me;} fra;
175 val_t REGB0;
176 val_t REGB1;
177 val_t tmp;
178 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
179 fra.me.file = LOCATE_string;
180 fra.me.line = 54;
181 fra.me.meth = LOCATE_string___AbstractString___substring_from;
182 fra.me.has_broke = 0;
183 fra.me.REG_size = 1;
184 fra.me.REG[0] = NIT_NULL;
185 fra.me.REG[0] = p0;
186 REGB0 = p1;
187 /* ./../lib/standard//collection//array.nit:23 */
188 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
189 if (UNTAG_Bool(REGB1)) {
190 } else {
191 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
192 }
193 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
194 /* ./../lib/standard//kernel.nit:212 */
195 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
196 /* ./../lib/standard//string.nit:61 */
197 if (UNTAG_Bool(REGB1)) {
198 } else {
199 nit_abort("Assert failed", NULL, LOCATE_string, 61);
200 }
201 /* ./../lib/standard//collection//array.nit:23 */
202 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
203 if (UNTAG_Bool(REGB1)) {
204 } else {
205 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
206 }
207 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
208 /* ./../lib/standard//kernel.nit:217 */
209 REGB1 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
210 /* ./../lib/standard//string.nit:62 */
211 fra.me.REG[0] = CALL_string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB1);
212 goto label1;
213 label1: while(0);
214 stack_frame_head = fra.me.prev;
215 return fra.me.REG[0];
216 }
217 val_t string___AbstractString___has_substring(val_t p0, val_t p1, val_t p2){
218 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
219 val_t REGB0;
220 val_t REGB1;
221 val_t REGB2;
222 val_t REGB3;
223 val_t REGB4;
224 val_t REGB5;
225 val_t tmp;
226 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
227 fra.me.file = LOCATE_string;
228 fra.me.line = 65;
229 fra.me.meth = LOCATE_string___AbstractString___has_substring;
230 fra.me.has_broke = 0;
231 fra.me.REG_size = 3;
232 fra.me.REG[0] = NIT_NULL;
233 fra.me.REG[1] = NIT_NULL;
234 fra.me.REG[2] = NIT_NULL;
235 fra.me.REG[0] = p0;
236 fra.me.REG[1] = p1;
237 REGB0 = p2;
238 /* ./../lib/standard//collection//array.nit:23 */
239 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
240 if (UNTAG_Bool(REGB1)) {
241 } else {
242 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
243 }
244 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
245 /* ./../lib/standard//string.nit:71 */
246 REGB2 = TAG_Int(1);
247 /* ./../lib/standard//kernel.nit:217 */
248 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
249 /* ./../lib/standard//kernel.nit:215 */
250 REGB0 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
251 /* ./../lib/standard//string.nit:73 */
252 REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
253 if (UNTAG_Bool(REGB1)) {
254 } else {
255 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 73);
256 }
257 fra.me.REG[2] = ATTR_string___AbstractString____items(fra.me.REG[0]);
258 /* ./../lib/standard//string.nit:74 */
259 REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
260 if (UNTAG_Bool(REGB1)) {
261 } else {
262 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 74);
263 }
264 fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[1]);
265 /* ./../lib/standard//collection//array.nit:23 */
266 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
267 if (UNTAG_Bool(REGB1)) {
268 } else {
269 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
270 }
271 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
272 /* ./../lib/standard//kernel.nit:214 */
273 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
274 /* ./../lib/standard//string.nit:75 */
275 if (UNTAG_Bool(REGB1)) {
276 REGB1 = TAG_Bool(true);
277 } else {
278 /* ./../lib/standard//kernel.nit:214 */
279 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB0));
280 /* ./../lib/standard//string.nit:75 */
281 REGB1 = REGB3;
282 }
283 if (UNTAG_Bool(REGB1)) {
284 REGB1 = TAG_Bool(false);
285 goto label1;
286 }
287 /* ./../lib/standard//string.nit:76 */
288 while(1) {
289 REGB3 = TAG_Int(0);
290 /* ./../lib/standard//kernel.nit:213 */
291 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB3));
292 /* ./../lib/standard//string.nit:76 */
293 if (UNTAG_Bool(REGB3)) {
294 /* ./../lib/standard//string.nit:585 */
295 REGB3 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
296 REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB2)]);
297 /* ./../lib/standard//string.nit:77 */
298 REGB5 = TAG_Bool(IS_EQUAL_OO(REGB3,REGB4));
299 if (UNTAG_Bool(REGB5)) {
300 } else {
301 /* ./../lib/standard//kernel.nit:347 */
302 REGB4 = TAG_Bool((REGB3)==(REGB4));
303 /* ./../lib/standard//string.nit:77 */
304 REGB5 = REGB4;
305 }
306 REGB5 = TAG_Bool(!UNTAG_Bool(REGB5));
307 if (UNTAG_Bool(REGB5)) {
308 REGB5 = TAG_Bool(false);
309 REGB1 = REGB5;
310 goto label1;
311 }
312 /* ./../lib/standard//string.nit:78 */
313 REGB5 = TAG_Int(1);
314 /* ./../lib/standard//kernel.nit:217 */
315 REGB5 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB5));
316 /* ./../lib/standard//string.nit:78 */
317 REGB0 = REGB5;
318 /* ./../lib/standard//string.nit:79 */
319 REGB5 = TAG_Int(1);
320 /* ./../lib/standard//kernel.nit:217 */
321 REGB5 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB5));
322 /* ./../lib/standard//string.nit:79 */
323 REGB2 = REGB5;
324 } else {
325 /* ./../lib/standard//string.nit:76 */
326 goto label2;
327 }
328 }
329 label2: while(0);
330 /* ./../lib/standard//string.nit:81 */
331 REGB2 = TAG_Bool(true);
332 REGB1 = REGB2;
333 goto label1;
334 label1: while(0);
335 stack_frame_head = fra.me.prev;
336 return REGB1;
337 }
338 val_t string___AbstractString___has_prefix(val_t p0, val_t p1){
339 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
340 val_t REGB0;
341 val_t tmp;
342 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
343 fra.me.file = LOCATE_string;
344 fra.me.line = 84;
345 fra.me.meth = LOCATE_string___AbstractString___has_prefix;
346 fra.me.has_broke = 0;
347 fra.me.REG_size = 2;
348 fra.me.REG[0] = NIT_NULL;
349 fra.me.REG[1] = NIT_NULL;
350 fra.me.REG[0] = p0;
351 fra.me.REG[1] = p1;
352 /* ./../lib/standard//string.nit:88 */
353 REGB0 = TAG_Int(0);
354 REGB0 = CALL_string___AbstractString___has_substring(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0);
355 goto label1;
356 label1: while(0);
357 stack_frame_head = fra.me.prev;
358 return REGB0;
359 }
360 val_t string___AbstractString___has_suffix(val_t p0, val_t p1){
361 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
362 val_t REGB0;
363 val_t REGB1;
364 val_t tmp;
365 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
366 fra.me.file = LOCATE_string;
367 fra.me.line = 90;
368 fra.me.meth = LOCATE_string___AbstractString___has_suffix;
369 fra.me.has_broke = 0;
370 fra.me.REG_size = 2;
371 fra.me.REG[0] = NIT_NULL;
372 fra.me.REG[1] = NIT_NULL;
373 fra.me.REG[0] = p0;
374 fra.me.REG[1] = p1;
375 /* ./../lib/standard//collection//array.nit:23 */
376 REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
377 if (UNTAG_Bool(REGB0)) {
378 } else {
379 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
380 }
381 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
382 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
383 if (UNTAG_Bool(REGB1)) {
384 } else {
385 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
386 }
387 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
388 /* ./../lib/standard//kernel.nit:217 */
389 REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1));
390 /* ./../lib/standard//string.nit:94 */
391 REGB1 = CALL_string___AbstractString___has_substring(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB1);
392 goto label1;
393 label1: while(0);
394 stack_frame_head = fra.me.prev;
395 return REGB1;
396 }
397 val_t string___AbstractString___to_i(val_t p0){
398 struct {struct stack_frame_t me;} fra;
399 val_t REGB0;
400 val_t tmp;
401 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
402 fra.me.file = LOCATE_string;
403 fra.me.line = 96;
404 fra.me.meth = LOCATE_string___AbstractString___to_i;
405 fra.me.has_broke = 0;
406 fra.me.REG_size = 1;
407 fra.me.REG[0] = NIT_NULL;
408 fra.me.REG[0] = p0;
409 /* ./../lib/standard//string.nit:100 */
410 fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
411 fra.me.REG[0] = CALL_string___String___to_cstring(fra.me.REG[0])(fra.me.REG[0]);
412 /* ./../lib/standard//string.nit:596 */
413 REGB0 = TAG_Int(atoi(UNBOX_NativeString(fra.me.REG[0])));
414 /* ./../lib/standard//string.nit:100 */
415 goto label1;
416 label1: while(0);
417 stack_frame_head = fra.me.prev;
418 return REGB0;
419 }
420 val_t string___AbstractString___to_hex(val_t p0){
421 struct {struct stack_frame_t me;} fra;
422 val_t REGB0;
423 val_t tmp;
424 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
425 fra.me.file = LOCATE_string;
426 fra.me.line = 103;
427 fra.me.meth = LOCATE_string___AbstractString___to_hex;
428 fra.me.has_broke = 0;
429 fra.me.REG_size = 1;
430 fra.me.REG[0] = NIT_NULL;
431 fra.me.REG[0] = p0;
432 /* ./../lib/standard//string.nit:104 */
433 REGB0 = TAG_Int(16);
434 REGB0 = CALL_string___AbstractString___a_to(fra.me.REG[0])(fra.me.REG[0], REGB0);
435 goto label1;
436 label1: while(0);
437 stack_frame_head = fra.me.prev;
438 return REGB0;
439 }
440 val_t string___AbstractString___a_to(val_t p0, val_t p1){
441 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
442 val_t REGB0;
443 val_t tmp;
444 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
445 fra.me.file = LOCATE_string;
446 fra.me.line = 106;
447 fra.me.meth = LOCATE_string___AbstractString___a_to;
448 fra.me.has_broke = 0;
449 fra.me.REG_size = 4;
450 fra.me.REG[0] = NIT_NULL;
451 fra.me.REG[1] = NIT_NULL;
452 fra.me.REG[2] = NIT_NULL;
453 fra.me.REG[3] = NIT_NULL;
454 fra.me.REG[0] = p0;
455 REGB0 = p1;
456 /* ./../lib/standard//string.nit:106 */
457 fra.me.REG[1] = REGB0;
458 /* ./../lib/standard//string.nit:109 */
459 REGB0 = TAG_Int(0);
460 fra.me.REG[2] = REGB0;
461 /* ./../lib/standard//string.nit:110 */
462 REGB0 = TAG_Bool(false);
463 fra.me.REG[3] = REGB0;
464 CALL_abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_string___AbstractString___a_to_1));
465 switch ((&(fra.me))->has_broke) {
466 case 0: break;
467 case 1: (&(fra.me))->has_broke = 0; goto label3;
468 }
469 /* ./../lib/standard//string.nit:127 */
470 if (UNTAG_Bool(fra.me.REG[3])) {
471 /* ./../lib/standard//kernel.nit:216 */
472 REGB0 = TAG_Int(-UNTAG_Int(fra.me.REG[2]));
473 /* ./../lib/standard//string.nit:128 */
474 fra.me.REG[0] = REGB0;
475 goto label3;
476 } else {
477 /* ./../lib/standard//string.nit:130 */
478 fra.me.REG[0] = fra.me.REG[2];
479 goto label3;
480 }
481 label3: while(0);
482 stack_frame_head = fra.me.prev;
483 return fra.me.REG[0];
484 }
485 void OC_string___AbstractString___a_to_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
486 struct {struct stack_frame_t me;} fra;
487 val_t REGB0;
488 val_t REGB1;
489 fun_t CREG[1];
490 val_t tmp;
491 /* ./../lib/standard//string.nit:112 */
492 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
493 fra.me.file = LOCATE_string;
494 fra.me.line = 0;
495 fra.me.meth = LOCATE_string___AbstractString___a_to;
496 fra.me.has_broke = 0;
497 fra.me.REG_size = 1;
498 fra.me.REG[0] = NIT_NULL;
499 fra.me.closure_ctx = closctx_param;
500 fra.me.closure_funs = CREG;
501 fra.me.REG[0] = p0;
502 CREG[0] = clos_fun0;
503 REGB0 = fra.me.REG[0];
504 /* ./../lib/standard//string.nit:114 */
505 REGB0 = CALL_kernel___Char___to_i(REGB0)(REGB0);
506 /* ./../lib/standard//kernel.nit:214 */
507 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(closctx->REG[1]));
508 /* ./../lib/standard//string.nit:115 */
509 if (UNTAG_Bool(REGB1)) {
510 /* ./../lib/standard//string.nit:116 */
511 if (UNTAG_Bool(closctx->REG[3])) {
512 /* ./../lib/standard//kernel.nit:216 */
513 REGB1 = TAG_Int(-UNTAG_Int(closctx->REG[2]));
514 /* ./../lib/standard//string.nit:117 */
515 closctx->REG[0] = REGB1;
516 closctx->has_broke = 1;
517 goto label2;
518 } else {
519 /* ./../lib/standard//string.nit:119 */
520 closctx->REG[0] = closctx->REG[2];
521 closctx->has_broke = 1;
522 goto label2;
523 }
524 } else {
525 /* ./../lib/standard//string.nit:121 */
526 REGB1 = TAG_Int(0);
527 /* ./../lib/standard//kernel.nit:212 */
528 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
529 /* ./../lib/standard//string.nit:121 */
530 if (UNTAG_Bool(REGB1)) {
531 /* ./../lib/standard//string.nit:122 */
532 REGB1 = TAG_Bool(true);
533 closctx->REG[3] = REGB1;
534 } else {
535 /* ./../lib/standard//kernel.nit:218 */
536 REGB1 = TAG_Int(UNTAG_Int(closctx->REG[2])*UNTAG_Int(closctx->REG[1]));
537 /* ./../lib/standard//kernel.nit:215 */
538 REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
539 /* ./../lib/standard//string.nit:124 */
540 closctx->REG[2] = REGB0;
541 }
542 }
543 label2: while(0);
544 stack_frame_head = fra.me.prev;
545 return;
546 }
547 val_t string___AbstractString___to_upper(val_t p0){
548 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
549 val_t REGB0;
550 val_t tmp;
551 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
552 fra.me.file = LOCATE_string;
553 fra.me.line = 134;
554 fra.me.meth = LOCATE_string___AbstractString___to_upper;
555 fra.me.has_broke = 0;
556 fra.me.REG_size = 2;
557 fra.me.REG[0] = NIT_NULL;
558 fra.me.REG[1] = NIT_NULL;
559 fra.me.REG[0] = p0;
560 /* ./../lib/standard//collection//array.nit:23 */
561 REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
562 if (UNTAG_Bool(REGB0)) {
563 } else {
564 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
565 }
566 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
567 /* ./../lib/standard//string.nit:137 */
568 fra.me.REG[1] = NEW_Buffer_string___Buffer___with_capacity(REGB0);
569 CALL_abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_string___AbstractString___to_upper_1));
570 /* ./../lib/standard//string.nit:139 */
571 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
572 goto label2;
573 label2: while(0);
574 stack_frame_head = fra.me.prev;
575 return fra.me.REG[1];
576 }
577 void OC_string___AbstractString___to_upper_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
578 struct {struct stack_frame_t me;} fra;
579 val_t REGB0;
580 fun_t CREG[1];
581 val_t tmp;
582 /* ./../lib/standard//string.nit:138 */
583 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
584 fra.me.file = LOCATE_string;
585 fra.me.line = 0;
586 fra.me.meth = LOCATE_string___AbstractString___to_upper;
587 fra.me.has_broke = 0;
588 fra.me.REG_size = 1;
589 fra.me.REG[0] = NIT_NULL;
590 fra.me.closure_ctx = closctx_param;
591 fra.me.closure_funs = CREG;
592 fra.me.REG[0] = p0;
593 CREG[0] = clos_fun0;
594 REGB0 = fra.me.REG[0];
595 REGB0 = CALL_kernel___Char___to_upper(REGB0)(REGB0);
596 CALL_abstract_collection___SimpleCollection___add(closctx->REG[1])(closctx->REG[1], REGB0);
597 stack_frame_head = fra.me.prev;
598 return;
599 }
600 val_t string___AbstractString___to_lower(val_t p0){
601 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
602 val_t REGB0;
603 val_t tmp;
604 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
605 fra.me.file = LOCATE_string;
606 fra.me.line = 142;
607 fra.me.meth = LOCATE_string___AbstractString___to_lower;
608 fra.me.has_broke = 0;
609 fra.me.REG_size = 2;
610 fra.me.REG[0] = NIT_NULL;
611 fra.me.REG[1] = NIT_NULL;
612 fra.me.REG[0] = p0;
613 /* ./../lib/standard//collection//array.nit:23 */
614 REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
615 if (UNTAG_Bool(REGB0)) {
616 } else {
617 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
618 }
619 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
620 /* ./../lib/standard//string.nit:145 */
621 fra.me.REG[1] = NEW_Buffer_string___Buffer___with_capacity(REGB0);
622 CALL_abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_string___AbstractString___to_lower_1));
623 /* ./../lib/standard//string.nit:147 */
624 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
625 goto label2;
626 label2: while(0);
627 stack_frame_head = fra.me.prev;
628 return fra.me.REG[1];
629 }
630 void OC_string___AbstractString___to_lower_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
631 struct {struct stack_frame_t me;} fra;
632 val_t REGB0;
633 fun_t CREG[1];
634 val_t tmp;
635 /* ./../lib/standard//string.nit:146 */
636 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
637 fra.me.file = LOCATE_string;
638 fra.me.line = 0;
639 fra.me.meth = LOCATE_string___AbstractString___to_lower;
640 fra.me.has_broke = 0;
641 fra.me.REG_size = 1;
642 fra.me.REG[0] = NIT_NULL;
643 fra.me.closure_ctx = closctx_param;
644 fra.me.closure_funs = CREG;
645 fra.me.REG[0] = p0;
646 CREG[0] = clos_fun0;
647 REGB0 = fra.me.REG[0];
648 REGB0 = CALL_kernel___Char___to_lower(REGB0)(REGB0);
649 CALL_abstract_collection___SimpleCollection___add(closctx->REG[1])(closctx->REG[1], REGB0);
650 stack_frame_head = fra.me.prev;
651 return;
652 }
653 void string___AbstractString___output(val_t p0){
654 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
655 val_t REGB0;
656 val_t REGB1;
657 val_t tmp;
658 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
659 fra.me.file = LOCATE_string;
660 fra.me.line = 151;
661 fra.me.meth = LOCATE_string___AbstractString___output;
662 fra.me.has_broke = 0;
663 fra.me.REG_size = 2;
664 fra.me.REG[0] = NIT_NULL;
665 fra.me.REG[1] = NIT_NULL;
666 fra.me.REG[0] = p0;
667 /* ./../lib/standard//string.nit:153 */
668 REGB0 = TAG_Int(0);
669 /* ./../lib/standard//string.nit:154 */
670 while(1) {
671 /* ./../lib/standard//collection//array.nit:23 */
672 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
673 if (UNTAG_Bool(REGB1)) {
674 } else {
675 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
676 }
677 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
678 /* ./../lib/standard//kernel.nit:212 */
679 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
680 /* ./../lib/standard//string.nit:154 */
681 if (UNTAG_Bool(REGB1)) {
682 /* ./../lib/standard//string.nit:155 */
683 REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
684 if (UNTAG_Bool(REGB1)) {
685 } else {
686 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 155);
687 }
688 fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[0]);
689 /* ./../lib/standard//string.nit:585 */
690 REGB1 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB0)]);
691 /* ./../lib/standard//kernel.nit:349 */
692 printf("%c", (unsigned char)UNTAG_Char(REGB1));;
693 /* ./../lib/standard//string.nit:156 */
694 REGB1 = TAG_Int(1);
695 /* ./../lib/standard//kernel.nit:215 */
696 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
697 /* ./../lib/standard//string.nit:156 */
698 REGB0 = REGB1;
699 } else {
700 /* ./../lib/standard//string.nit:154 */
701 goto label1;
702 }
703 }
704 label1: while(0);
705 stack_frame_head = fra.me.prev;
706 return;
707 }
708 void string___String___with_native(val_t p0, val_t p1, val_t p2, int* init_table){
709 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_String].i;
710 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
711 val_t REGB0;
712 val_t REGB1;
713 val_t tmp;
714 if (init_table[itpos0]) return;
715 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
716 fra.me.file = LOCATE_string;
717 fra.me.line = 167;
718 fra.me.meth = LOCATE_string___String___with_native;
719 fra.me.has_broke = 0;
720 fra.me.REG_size = 2;
721 fra.me.REG[0] = NIT_NULL;
722 fra.me.REG[1] = NIT_NULL;
723 fra.me.REG[0] = p0;
724 fra.me.REG[1] = p1;
725 REGB0 = p2;
726 /* ./../lib/standard//string.nit:170 */
727 REGB1 = TAG_Int(0);
728 /* ./../lib/standard//kernel.nit:213 */
729 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
730 /* ./../lib/standard//string.nit:170 */
731 if (UNTAG_Bool(REGB1)) {
732 } else {
733 nit_abort("Assert failed", NULL, LOCATE_string, 170);
734 }
735 /* ./../lib/standard//string.nit:171 */
736 ATTR_string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1];
737 /* ./../lib/standard//string.nit:172 */
738 ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0;
739 stack_frame_head = fra.me.prev;
740 init_table[itpos0] = 1;
741 return;
742 }
743 void string___String___from_cstring(val_t p0, val_t p1, int* init_table){
744 int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_String].i;
745 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
746 val_t REGB0;
747 val_t tmp;
748 if (init_table[itpos1]) return;
749 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
750 fra.me.file = LOCATE_string;
751 fra.me.line = 175;
752 fra.me.meth = LOCATE_string___String___from_cstring;
753 fra.me.has_broke = 0;
754 fra.me.REG_size = 2;
755 fra.me.REG[0] = NIT_NULL;
756 fra.me.REG[1] = NIT_NULL;
757 fra.me.REG[0] = p0;
758 fra.me.REG[1] = p1;
759 /* ./../lib/standard//string.nit:178 */
760 REGB0 = CALL_string___NativeString___cstring_length(fra.me.REG[1])(fra.me.REG[1]);
761 /* ./../lib/standard//string.nit:179 */
762 ATTR_string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1];
763 /* ./../lib/standard//string.nit:180 */
764 ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0;
765 stack_frame_head = fra.me.prev;
766 init_table[itpos1] = 1;
767 return;
768 }
769 val_t string___String___to_cstring(val_t p0){
770 struct {struct stack_frame_t me;} fra;
771 val_t REGB0;
772 val_t tmp;
773 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
774 fra.me.file = LOCATE_string;
775 fra.me.line = 183;
776 fra.me.meth = LOCATE_string___String___to_cstring;
777 fra.me.has_broke = 0;
778 fra.me.REG_size = 1;
779 fra.me.REG[0] = NIT_NULL;
780 fra.me.REG[0] = p0;
781 /* ./../lib/standard//string.nit:186 */
782 REGB0 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
783 if (UNTAG_Bool(REGB0)) {
784 } else {
785 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 186);
786 }
787 fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
788 goto label1;
789 label1: while(0);
790 stack_frame_head = fra.me.prev;
791 return fra.me.REG[0];
792 }
793 val_t string___String_____eqeq(val_t p0, val_t p1){
794 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
795 val_t REGB0;
796 val_t REGB1;
797 val_t REGB2;
798 val_t REGB3;
799 val_t REGB4;
800 val_t REGB5;
801 val_t tmp;
802 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
803 fra.me.file = LOCATE_string;
804 fra.me.line = 189;
805 fra.me.meth = LOCATE_string___String_____eqeq;
806 fra.me.has_broke = 0;
807 fra.me.REG_size = 2;
808 fra.me.REG[0] = NIT_NULL;
809 fra.me.REG[1] = NIT_NULL;
810 fra.me.REG[0] = p0;
811 fra.me.REG[1] = p1;
812 /* ./../lib/standard//string.nit:191 */
813 REGB0 = TAG_Bool((fra.me.REG[1]!=NIT_NULL) && VAL_ISA(fra.me.REG[1], COLOR_String, ID_String)) /*cast String*/;
814 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
815 if (UNTAG_Bool(REGB0)) {
816 REGB0 = TAG_Bool(true);
817 } else {
818 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
819 REGB0 = REGB1;
820 }
821 if (UNTAG_Bool(REGB0)) {
822 REGB0 = TAG_Bool(false);
823 goto label1;
824 }
825 /* ./../lib/standard//collection//array.nit:23 */
826 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
827 if (UNTAG_Bool(REGB1)) {
828 } else {
829 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
830 }
831 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
832 /* ./../lib/standard//string.nit:193 */
833 REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
834 if (UNTAG_Bool(REGB2)) {
835 nit_abort("Reciever is null", NULL, LOCATE_string, 193);
836 }
837 /* ./../lib/standard//collection//array.nit:23 */
838 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
839 if (UNTAG_Bool(REGB2)) {
840 } else {
841 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
842 }
843 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
844 /* ./../lib/standard//string.nit:193 */
845 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1));
846 if (UNTAG_Bool(REGB3)) {
847 } else {
848 /* ./../lib/standard//kernel.nit:207 */
849 REGB2 = TAG_Bool((REGB2)==(REGB1));
850 /* ./../lib/standard//string.nit:193 */
851 REGB3 = REGB2;
852 }
853 REGB3 = TAG_Bool(!UNTAG_Bool(REGB3));
854 if (UNTAG_Bool(REGB3)) {
855 REGB3 = TAG_Bool(false);
856 REGB0 = REGB3;
857 goto label1;
858 }
859 /* ./../lib/standard//string.nit:194 */
860 REGB3 = TAG_Int(0);
861 /* ./../lib/standard//string.nit:195 */
862 REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
863 if (UNTAG_Bool(REGB2)) {
864 } else {
865 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 195);
866 }
867 fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
868 /* ./../lib/standard//string.nit:196 */
869 REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
870 if (UNTAG_Bool(REGB2)) {
871 } else {
872 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 196);
873 }
874 fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[1]);
875 /* ./../lib/standard//string.nit:197 */
876 while(1) {
877 /* ./../lib/standard//kernel.nit:212 */
878 REGB2 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB1));
879 /* ./../lib/standard//string.nit:197 */
880 if (UNTAG_Bool(REGB2)) {
881 /* ./../lib/standard//string.nit:585 */
882 REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB3)]);
883 REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB3)]);
884 /* ./../lib/standard//string.nit:198 */
885 REGB5 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB4));
886 if (UNTAG_Bool(REGB5)) {
887 } else {
888 /* ./../lib/standard//kernel.nit:347 */
889 REGB4 = TAG_Bool((REGB2)==(REGB4));
890 /* ./../lib/standard//string.nit:198 */
891 REGB5 = REGB4;
892 }
893 REGB5 = TAG_Bool(!UNTAG_Bool(REGB5));
894 if (UNTAG_Bool(REGB5)) {
895 REGB5 = TAG_Bool(false);
896 REGB0 = REGB5;
897 goto label1;
898 }
899 /* ./../lib/standard//string.nit:199 */
900 REGB5 = TAG_Int(1);
901 /* ./../lib/standard//kernel.nit:215 */
902 REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB5));
903 /* ./../lib/standard//string.nit:199 */
904 REGB3 = REGB5;
905 } else {
906 /* ./../lib/standard//string.nit:197 */
907 goto label2;
908 }
909 }
910 label2: while(0);
911 /* ./../lib/standard//string.nit:201 */
912 REGB3 = TAG_Bool(true);
913 REGB0 = REGB3;
914 goto label1;
915 label1: while(0);
916 stack_frame_head = fra.me.prev;
917 return REGB0;
918 }
919 val_t string___String_____l(val_t p0, val_t p1){
920 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
921 val_t REGB0;
922 val_t REGB1;
923 val_t REGB2;
924 val_t REGB3;
925 val_t REGB4;
926 val_t REGB5;
927 val_t tmp;
928 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
929 fra.me.file = LOCATE_string;
930 fra.me.line = 204;
931 fra.me.meth = LOCATE_string___String_____l;
932 fra.me.has_broke = 0;
933 fra.me.REG_size = 2;
934 fra.me.REG[0] = NIT_NULL;
935 fra.me.REG[1] = NIT_NULL;
936 fra.me.REG[0] = p0;
937 fra.me.REG[1] = p1;
938 /* ./../lib/standard//string.nit:206 */
939 REGB0 = TAG_Int(0);
940 /* ./../lib/standard//collection//array.nit:23 */
941 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
942 if (UNTAG_Bool(REGB1)) {
943 } else {
944 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
945 }
946 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
947 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
948 if (UNTAG_Bool(REGB2)) {
949 } else {
950 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
951 }
952 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
953 /* ./../lib/standard//string.nit:209 */
954 REGB3 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
955 if (UNTAG_Bool(REGB3)) {
956 } else {
957 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 209);
958 }
959 fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
960 /* ./../lib/standard//string.nit:210 */
961 REGB3 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
962 if (UNTAG_Bool(REGB3)) {
963 } else {
964 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 210);
965 }
966 fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[1]);
967 /* ./../lib/standard//string.nit:211 */
968 while(1) {
969 /* ./../lib/standard//kernel.nit:212 */
970 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
971 /* ./../lib/standard//string.nit:211 */
972 if (UNTAG_Bool(REGB3)) {
973 /* ./../lib/standard//kernel.nit:212 */
974 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
975 } else {
976 /* ./../lib/standard//string.nit:211 */
977 REGB4 = TAG_Bool(false);
978 REGB3 = REGB4;
979 }
980 if (UNTAG_Bool(REGB3)) {
981 /* ./../lib/standard//string.nit:585 */
982 REGB3 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]);
983 /* ./../lib/standard//kernel.nit:382 */
984 REGB3 = TAG_Int((unsigned char)UNTAG_Char(REGB3));
985 /* ./../lib/standard//string.nit:585 */
986 REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB0)]);
987 /* ./../lib/standard//kernel.nit:382 */
988 REGB4 = TAG_Int((unsigned char)UNTAG_Char(REGB4));
989 /* ./../lib/standard//kernel.nit:212 */
990 REGB5 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
991 /* ./../lib/standard//string.nit:214 */
992 if (UNTAG_Bool(REGB5)) {
993 /* ./../lib/standard//string.nit:215 */
994 REGB5 = TAG_Bool(true);
995 goto label1;
996 } else {
997 /* ./../lib/standard//kernel.nit:212 */
998 REGB3 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB3));
999 /* ./../lib/standard//string.nit:216 */
1000 if (UNTAG_Bool(REGB3)) {
1001 /* ./../lib/standard//string.nit:217 */
1002 REGB3 = TAG_Bool(false);
1003 REGB5 = REGB3;
1004 goto label1;
1005 }
1006 }
1007 /* ./../lib/standard//string.nit:219 */
1008 REGB3 = TAG_Int(1);
1009 /* ./../lib/standard//kernel.nit:215 */
1010 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
1011 /* ./../lib/standard//string.nit:219 */
1012 REGB0 = REGB3;
1013 } else {
1014 /* ./../lib/standard//string.nit:211 */
1015 goto label2;
1016 }
1017 }
1018 label2: while(0);
1019 /* ./../lib/standard//kernel.nit:212 */
1020 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
1021 /* ./../lib/standard//string.nit:221 */
1022 if (UNTAG_Bool(REGB2)) {
1023 /* ./../lib/standard//string.nit:222 */
1024 REGB2 = TAG_Bool(true);
1025 REGB5 = REGB2;
1026 goto label1;
1027 } else {
1028 /* ./../lib/standard//string.nit:224 */
1029 REGB2 = TAG_Bool(false);
1030 REGB5 = REGB2;
1031 goto label1;
1032 }
1033 label1: while(0);
1034 stack_frame_head = fra.me.prev;
1035 return REGB5;
1036 }
1037 val_t string___String_____plus(val_t p0, val_t p1){
1038 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1039 val_t REGB0;
1040 val_t REGB1;
1041 val_t tmp;
1042 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1043 fra.me.file = LOCATE_string;
1044 fra.me.line = 228;
1045 fra.me.meth = LOCATE_string___String_____plus;
1046 fra.me.has_broke = 0;
1047 fra.me.REG_size = 3;
1048 fra.me.REG[0] = NIT_NULL;
1049 fra.me.REG[1] = NIT_NULL;
1050 fra.me.REG[2] = NIT_NULL;
1051 fra.me.REG[0] = p0;
1052 fra.me.REG[1] = p1;
1053 /* ./../lib/standard//collection//array.nit:23 */
1054 REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1055 if (UNTAG_Bool(REGB0)) {
1056 } else {
1057 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1058 }
1059 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1060 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1061 if (UNTAG_Bool(REGB1)) {
1062 } else {
1063 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1064 }
1065 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
1066 /* ./../lib/standard//kernel.nit:215 */
1067 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1068 /* ./../lib/standard//string.nit:231 */
1069 fra.me.REG[2] = NEW_Buffer_string___Buffer___with_capacity(REGB1);
1070 /* ./../lib/standard//string.nit:232 */
1071 CALL_abstract_collection___Sequence___append(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
1072 /* ./../lib/standard//string.nit:233 */
1073 CALL_abstract_collection___Sequence___append(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
1074 /* ./../lib/standard//string.nit:234 */
1075 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
1076 goto label1;
1077 label1: while(0);
1078 stack_frame_head = fra.me.prev;
1079 return fra.me.REG[2];
1080 }
1081 val_t string___String_____star(val_t p0, val_t p1){
1082 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1083 val_t REGB0;
1084 val_t REGB1;
1085 val_t tmp;
1086 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1087 fra.me.file = LOCATE_string;
1088 fra.me.line = 237;
1089 fra.me.meth = LOCATE_string___String_____star;
1090 fra.me.has_broke = 0;
1091 fra.me.REG_size = 2;
1092 fra.me.REG[0] = NIT_NULL;
1093 fra.me.REG[1] = NIT_NULL;
1094 fra.me.REG[0] = p0;
1095 REGB0 = p1;
1096 /* ./../lib/standard//string.nit:240 */
1097 REGB1 = TAG_Int(0);
1098 /* ./../lib/standard//kernel.nit:213 */
1099 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
1100 /* ./../lib/standard//string.nit:240 */
1101 if (UNTAG_Bool(REGB1)) {
1102 } else {
1103 nit_abort("Assert failed", NULL, LOCATE_string, 240);
1104 }
1105 /* ./../lib/standard//collection//array.nit:23 */
1106 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1107 if (UNTAG_Bool(REGB1)) {
1108 } else {
1109 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1110 }
1111 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1112 /* ./../lib/standard//kernel.nit:218 */
1113 REGB1 = TAG_Int(UNTAG_Int(REGB1)*UNTAG_Int(REGB0));
1114 /* ./../lib/standard//string.nit:241 */
1115 fra.me.REG[1] = NEW_Buffer_string___Buffer___with_capacity(REGB1);
1116 /* ./../lib/standard//string.nit:242 */
1117 while(1) {
1118 REGB1 = TAG_Int(0);
1119 /* ./../lib/standard//kernel.nit:214 */
1120 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
1121 /* ./../lib/standard//string.nit:242 */
1122 if (UNTAG_Bool(REGB1)) {
1123 /* ./../lib/standard//string.nit:243 */
1124 CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
1125 /* ./../lib/standard//string.nit:244 */
1126 REGB1 = TAG_Int(1);
1127 /* ./../lib/standard//kernel.nit:217 */
1128 REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1));
1129 /* ./../lib/standard//string.nit:244 */
1130 REGB0 = REGB1;
1131 } else {
1132 /* ./../lib/standard//string.nit:242 */
1133 goto label1;
1134 }
1135 }
1136 label1: while(0);
1137 /* ./../lib/standard//string.nit:246 */
1138 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
1139 goto label2;
1140 label2: while(0);
1141 stack_frame_head = fra.me.prev;
1142 return fra.me.REG[1];
1143 }
1144 val_t string___String___to_s(val_t p0){
1145 struct {struct stack_frame_t me;} fra;
1146 val_t tmp;
1147 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1148 fra.me.file = LOCATE_string;
1149 fra.me.line = 249;
1150 fra.me.meth = LOCATE_string___String___to_s;
1151 fra.me.has_broke = 0;
1152 fra.me.REG_size = 1;
1153 fra.me.REG[0] = NIT_NULL;
1154 fra.me.REG[0] = p0;
1155 /* ./../lib/standard//string.nit:249 */
1156 goto label1;
1157 label1: while(0);
1158 stack_frame_head = fra.me.prev;
1159 return fra.me.REG[0];
1160 }
1161 val_t string___String___hash(val_t p0){
1162 struct {struct stack_frame_t me;} fra;
1163 val_t REGB0;
1164 val_t REGB1;
1165 val_t REGB2;
1166 val_t REGB3;
1167 val_t tmp;
1168 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1169 fra.me.file = LOCATE_string;
1170 fra.me.line = 251;
1171 fra.me.meth = LOCATE_string___String___hash;
1172 fra.me.has_broke = 0;
1173 fra.me.REG_size = 1;
1174 fra.me.REG[0] = NIT_NULL;
1175 fra.me.REG[0] = p0;
1176 /* ./../lib/standard//string.nit:254 */
1177 REGB0 = TAG_Int(5381);
1178 /* ./../lib/standard//string.nit:255 */
1179 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1180 if (UNTAG_Bool(REGB1)) {
1181 } else {
1182 nit_abort("Uninitialized attribute %s", "_length", LOCATE_string, 255);
1183 }
1184 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1185 REGB2 = TAG_Int(1);
1186 /* ./../lib/standard//kernel.nit:217 */
1187 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
1188 /* ./../lib/standard//string.nit:256 */
1189 REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1190 if (UNTAG_Bool(REGB1)) {
1191 } else {
1192 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 256);
1193 }
1194 fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
1195 /* ./../lib/standard//string.nit:257 */
1196 while(1) {
1197 REGB1 = TAG_Int(0);
1198 /* ./../lib/standard//kernel.nit:213 */
1199 REGB1 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB1));
1200 /* ./../lib/standard//string.nit:257 */
1201 if (UNTAG_Bool(REGB1)) {
1202 /* ./../lib/standard//string.nit:258 */
1203 REGB1 = TAG_Int(32);
1204 /* ./../lib/standard//kernel.nit:218 */
1205 REGB1 = TAG_Int(UNTAG_Int(REGB0)*UNTAG_Int(REGB1));
1206 /* ./../lib/standard//kernel.nit:215 */
1207 REGB1 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
1208 /* ./../lib/standard//string.nit:585 */
1209 REGB3 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB2)]);
1210 /* ./../lib/standard//kernel.nit:382 */
1211 REGB3 = TAG_Int((unsigned char)UNTAG_Char(REGB3));
1212 /* ./../lib/standard//kernel.nit:215 */
1213 REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
1214 /* ./../lib/standard//string.nit:258 */
1215 REGB0 = REGB3;
1216 /* ./../lib/standard//string.nit:259 */
1217 REGB3 = TAG_Int(1);
1218 /* ./../lib/standard//kernel.nit:217 */
1219 REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
1220 /* ./../lib/standard//string.nit:259 */
1221 REGB2 = REGB3;
1222 } else {
1223 /* ./../lib/standard//string.nit:257 */
1224 goto label1;
1225 }
1226 }
1227 label1: while(0);
1228 /* ./../lib/standard//string.nit:261 */
1229 goto label2;
1230 label2: while(0);
1231 stack_frame_head = fra.me.prev;
1232 return REGB0;
1233 }
1234 void string___Buffer_____braeq(val_t p0, val_t p1, val_t p2){
1235 struct {struct stack_frame_t me;} fra;
1236 val_t REGB0;
1237 val_t REGB1;
1238 val_t REGB2;
1239 val_t REGB3;
1240 val_t tmp;
1241 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1242 fra.me.file = LOCATE_string;
1243 fra.me.line = 275;
1244 fra.me.meth = LOCATE_string___Buffer_____braeq;
1245 fra.me.has_broke = 0;
1246 fra.me.REG_size = 1;
1247 fra.me.REG[0] = NIT_NULL;
1248 fra.me.REG[0] = p0;
1249 REGB0 = p1;
1250 REGB1 = p2;
1251 /* ./../lib/standard//collection//array.nit:23 */
1252 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1253 if (UNTAG_Bool(REGB2)) {
1254 } else {
1255 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1256 }
1257 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1258 /* ./../lib/standard//string.nit:277 */
1259 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB2));
1260 if (UNTAG_Bool(REGB3)) {
1261 } else {
1262 /* ./../lib/standard//kernel.nit:207 */
1263 REGB2 = TAG_Bool((REGB0)==(REGB2));
1264 /* ./../lib/standard//string.nit:277 */
1265 REGB3 = REGB2;
1266 }
1267 if (UNTAG_Bool(REGB3)) {
1268 /* ./../lib/standard//string.nit:278 */
1269 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB1);
1270 /* ./../lib/standard//string.nit:279 */
1271 goto label1;
1272 }
1273 /* ./../lib/standard//string.nit:281 */
1274 REGB3 = TAG_Int(0);
1275 /* ./../lib/standard//kernel.nit:213 */
1276 REGB3 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB3));
1277 /* ./../lib/standard//string.nit:281 */
1278 if (UNTAG_Bool(REGB3)) {
1279 /* ./../lib/standard//collection//array.nit:23 */
1280 REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1281 if (UNTAG_Bool(REGB3)) {
1282 } else {
1283 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1284 }
1285 REGB3 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1286 /* ./../lib/standard//kernel.nit:212 */
1287 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB3));
1288 } else {
1289 /* ./../lib/standard//string.nit:281 */
1290 REGB2 = TAG_Bool(false);
1291 REGB3 = REGB2;
1292 }
1293 if (UNTAG_Bool(REGB3)) {
1294 } else {
1295 nit_abort("Assert failed", NULL, LOCATE_string, 281);
1296 }
1297 /* ./../lib/standard//string.nit:282 */
1298 REGB3 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1299 if (UNTAG_Bool(REGB3)) {
1300 } else {
1301 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 282);
1302 }
1303 fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
1304 /* ./../lib/standard//string.nit:586 */
1305 UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB1);;
1306 label1: while(0);
1307 stack_frame_head = fra.me.prev;
1308 return;
1309 }
1310 void string___Buffer___add(val_t p0, val_t p1){
1311 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1312 val_t REGB0;
1313 val_t REGB1;
1314 val_t REGB2;
1315 val_t tmp;
1316 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1317 fra.me.file = LOCATE_string;
1318 fra.me.line = 285;
1319 fra.me.meth = LOCATE_string___Buffer___add;
1320 fra.me.has_broke = 0;
1321 fra.me.REG_size = 2;
1322 fra.me.REG[0] = NIT_NULL;
1323 fra.me.REG[1] = NIT_NULL;
1324 fra.me.REG[0] = p0;
1325 REGB0 = p1;
1326 /* ./../lib/standard//string.nit:287 */
1327 REGB1 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
1328 if (UNTAG_Bool(REGB1)) {
1329 } else {
1330 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_string, 287);
1331 }
1332 REGB1 = ATTR_string___Buffer____capacity(fra.me.REG[0]);
1333 /* ./../lib/standard//collection//array.nit:23 */
1334 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1335 if (UNTAG_Bool(REGB2)) {
1336 } else {
1337 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1338 }
1339 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1340 /* ./../lib/standard//kernel.nit:211 */
1341 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB2));
1342 /* ./../lib/standard//string.nit:287 */
1343 if (UNTAG_Bool(REGB2)) {
1344 /* ./../lib/standard//collection//array.nit:23 */
1345 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1346 if (UNTAG_Bool(REGB2)) {
1347 } else {
1348 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1349 }
1350 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1351 /* ./../lib/standard//string.nit:287 */
1352 REGB1 = TAG_Int(5);
1353 /* ./../lib/standard//kernel.nit:215 */
1354 REGB1 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1));
1355 /* ./../lib/standard//string.nit:287 */
1356 CALL_array___AbstractArray___enlarge(fra.me.REG[0])(fra.me.REG[0], REGB1);
1357 }
1358 /* ./../lib/standard//string.nit:288 */
1359 REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1360 if (UNTAG_Bool(REGB1)) {
1361 } else {
1362 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 288);
1363 }
1364 fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[0]);
1365 /* ./../lib/standard//collection//array.nit:23 */
1366 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1367 if (UNTAG_Bool(REGB1)) {
1368 } else {
1369 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1370 }
1371 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1372 /* ./../lib/standard//string.nit:586 */
1373 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB1)]=UNTAG_Char(REGB0);;
1374 /* ./../lib/standard//string.nit:289 */
1375 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1376 REGB1 = TAG_Int(1);
1377 /* ./../lib/standard//kernel.nit:215 */
1378 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1379 /* ./../lib/standard//string.nit:289 */
1380 ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB1;
1381 stack_frame_head = fra.me.prev;
1382 return;
1383 }
1384 void string___Buffer___enlarge(val_t p0, val_t p1){
1385 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1386 val_t REGB0;
1387 val_t REGB1;
1388 val_t REGB2;
1389 val_t REGB3;
1390 val_t tmp;
1391 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1392 fra.me.file = LOCATE_string;
1393 fra.me.line = 292;
1394 fra.me.meth = LOCATE_string___Buffer___enlarge;
1395 fra.me.has_broke = 0;
1396 fra.me.REG_size = 3;
1397 fra.me.REG[0] = NIT_NULL;
1398 fra.me.REG[1] = NIT_NULL;
1399 fra.me.REG[2] = NIT_NULL;
1400 fra.me.REG[0] = p0;
1401 REGB0 = p1;
1402 /* ./../lib/standard//string.nit:294 */
1403 REGB1 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
1404 if (UNTAG_Bool(REGB1)) {
1405 } else {
1406 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_string, 294);
1407 }
1408 REGB1 = ATTR_string___Buffer____capacity(fra.me.REG[0]);
1409 /* ./../lib/standard//kernel.nit:211 */
1410 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB1));
1411 /* ./../lib/standard//string.nit:295 */
1412 if (UNTAG_Bool(REGB2)) {
1413 goto label1;
1414 }
1415 /* ./../lib/standard//string.nit:296 */
1416 while(1) {
1417 /* ./../lib/standard//kernel.nit:211 */
1418 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB0));
1419 /* ./../lib/standard//string.nit:296 */
1420 if (UNTAG_Bool(REGB2)) {
1421 REGB2 = TAG_Int(2);
1422 /* ./../lib/standard//kernel.nit:218 */
1423 REGB2 = TAG_Int(UNTAG_Int(REGB1)*UNTAG_Int(REGB2));
1424 /* ./../lib/standard//string.nit:296 */
1425 REGB3 = TAG_Int(2);
1426 /* ./../lib/standard//kernel.nit:215 */
1427 REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
1428 /* ./../lib/standard//string.nit:296 */
1429 REGB1 = REGB3;
1430 } else {
1431 goto label2;
1432 }
1433 }
1434 label2: while(0);
1435 /* ./../lib/standard//string.nit:297 */
1436 REGB0 = TAG_Int(1);
1437 /* ./../lib/standard//kernel.nit:215 */
1438 REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
1439 /* ./../lib/standard//string.nit:601 */
1440 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB0) * sizeof(char))));
1441 /* ./../lib/standard//string.nit:298 */
1442 REGB0 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1443 if (UNTAG_Bool(REGB0)) {
1444 } else {
1445 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 298);
1446 }
1447 fra.me.REG[2] = ATTR_string___AbstractString____items(fra.me.REG[0]);
1448 /* ./../lib/standard//collection//array.nit:23 */
1449 REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1450 if (UNTAG_Bool(REGB0)) {
1451 } else {
1452 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1453 }
1454 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1455 /* ./../lib/standard//string.nit:298 */
1456 REGB3 = TAG_Int(0);
1457 REGB2 = TAG_Int(0);
1458 /* ./../lib/standard//string.nit:587 */
1459 (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB3), UNTAG_Int(REGB0));;
1460 /* ./../lib/standard//string.nit:299 */
1461 ATTR_string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1];
1462 /* ./../lib/standard//string.nit:300 */
1463 ATTR_string___Buffer____capacity(fra.me.REG[0]) = REGB1;
1464 label1: while(0);
1465 stack_frame_head = fra.me.prev;
1466 return;
1467 }
1468 void string___Buffer___append(val_t p0, val_t p1){
1469 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
1470 val_t REGB0;
1471 val_t REGB1;
1472 val_t REGB2;
1473 val_t tmp;
1474 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1475 fra.me.file = LOCATE_string;
1476 fra.me.line = 303;
1477 fra.me.meth = LOCATE_string___Buffer___append;
1478 fra.me.has_broke = 0;
1479 fra.me.REG_size = 5;
1480 fra.me.REG[0] = NIT_NULL;
1481 fra.me.REG[1] = NIT_NULL;
1482 fra.me.REG[2] = NIT_NULL;
1483 fra.me.REG[3] = NIT_NULL;
1484 fra.me.REG[4] = NIT_NULL;
1485 fra.me.REG[0] = p0;
1486 fra.me.REG[1] = p1;
1487 /* ./../lib/standard//string.nit:303 */
1488 fra.me.REG[2] = fra.me.REG[0];
1489 fra.me.REG[3] = fra.me.REG[1];
1490 /* ./../lib/standard//string.nit:305 */
1491 REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[3], COLOR_String, ID_String)) /*cast String*/;
1492 if (UNTAG_Bool(REGB0)) {
1493 /* ./../lib/standard//collection//array.nit:23 */
1494 REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
1495 if (UNTAG_Bool(REGB0)) {
1496 } else {
1497 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1498 }
1499 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
1500 /* ./../lib/standard//string.nit:307 */
1501 REGB1 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[2])!=NIT_NULL);
1502 if (UNTAG_Bool(REGB1)) {
1503 } else {
1504 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_string, 307);
1505 }
1506 REGB1 = ATTR_string___Buffer____capacity(fra.me.REG[2]);
1507 /* ./../lib/standard//collection//array.nit:23 */
1508 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1509 if (UNTAG_Bool(REGB2)) {
1510 } else {
1511 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1512 }
1513 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
1514 /* ./../lib/standard//kernel.nit:215 */
1515 REGB2 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
1516 /* ./../lib/standard//kernel.nit:212 */
1517 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
1518 /* ./../lib/standard//string.nit:307 */
1519 if (UNTAG_Bool(REGB2)) {
1520 /* ./../lib/standard//collection//array.nit:23 */
1521 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1522 if (UNTAG_Bool(REGB2)) {
1523 } else {
1524 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1525 }
1526 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
1527 /* ./../lib/standard//kernel.nit:215 */
1528 REGB2 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
1529 /* ./../lib/standard//string.nit:307 */
1530 CALL_array___AbstractArray___enlarge(fra.me.REG[2])(fra.me.REG[2], REGB2);
1531 }
1532 /* ./../lib/standard//string.nit:308 */
1533 fra.me.REG[3] = CALL_string___AbstractString___items(fra.me.REG[3])(fra.me.REG[3]);
1534 REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[2])!=NIT_NULL);
1535 if (UNTAG_Bool(REGB2)) {
1536 } else {
1537 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 308);
1538 }
1539 fra.me.REG[4] = ATTR_string___AbstractString____items(fra.me.REG[2]);
1540 REGB2 = TAG_Int(0);
1541 /* ./../lib/standard//collection//array.nit:23 */
1542 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1543 if (UNTAG_Bool(REGB1)) {
1544 } else {
1545 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1546 }
1547 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
1548 /* ./../lib/standard//string.nit:587 */
1549 (void)memcpy(UNBOX_NativeString(fra.me.REG[4])+UNTAG_Int(REGB1), UNBOX_NativeString(fra.me.REG[3])+UNTAG_Int(REGB2), UNTAG_Int(REGB0));;
1550 /* ./../lib/standard//string.nit:309 */
1551 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
1552 /* ./../lib/standard//kernel.nit:215 */
1553 REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
1554 /* ./../lib/standard//string.nit:309 */
1555 ATTR_array___AbstractArrayRead____length(fra.me.REG[2]) = REGB0;
1556 } else {
1557 /* ./../lib/standard//string.nit:311 */
1558 CALL_SUPER_string___Buffer___append(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
1559 }
1560 stack_frame_head = fra.me.prev;
1561 return;
1562 }
1563 val_t string___Buffer___to_s(val_t p0){
1564 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1565 val_t REGB0;
1566 val_t REGB1;
1567 val_t REGB2;
1568 val_t tmp;
1569 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1570 fra.me.file = LOCATE_string;
1571 fra.me.line = 315;
1572 fra.me.meth = LOCATE_string___Buffer___to_s;
1573 fra.me.has_broke = 0;
1574 fra.me.REG_size = 3;
1575 fra.me.REG[0] = NIT_NULL;
1576 fra.me.REG[1] = NIT_NULL;
1577 fra.me.REG[2] = NIT_NULL;
1578 fra.me.REG[0] = p0;
1579 /* ./../lib/standard//collection//array.nit:23 */
1580 REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1581 if (UNTAG_Bool(REGB0)) {
1582 } else {
1583 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1584 }
1585 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1586 /* ./../lib/standard//string.nit:318 */
1587 REGB1 = TAG_Int(1);
1588 /* ./../lib/standard//kernel.nit:215 */
1589 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1590 /* ./../lib/standard//string.nit:601 */
1591 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
1592 /* ./../lib/standard//string.nit:319 */
1593 REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1594 if (UNTAG_Bool(REGB1)) {
1595 } else {
1596 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 319);
1597 }
1598 fra.me.REG[2] = ATTR_string___AbstractString____items(fra.me.REG[0]);
1599 REGB1 = TAG_Int(0);
1600 REGB2 = TAG_Int(0);
1601 /* ./../lib/standard//string.nit:587 */
1602 (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB1), UNTAG_Int(REGB0));;
1603 /* ./../lib/standard//collection//array.nit:23 */
1604 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1605 if (UNTAG_Bool(REGB2)) {
1606 } else {
1607 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1608 }
1609 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1610 /* ./../lib/standard//string.nit:322 */
1611 REGB1 = TAG_Char('\0');
1612 /* ./../lib/standard//string.nit:586 */
1613 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB2)]=UNTAG_Char(REGB1);;
1614 /* ./../lib/standard//collection//array.nit:23 */
1615 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1616 if (UNTAG_Bool(REGB1)) {
1617 } else {
1618 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1619 }
1620 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1621 /* ./../lib/standard//string.nit:324 */
1622 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB1);
1623 goto label1;
1624 label1: while(0);
1625 stack_frame_head = fra.me.prev;
1626 return fra.me.REG[1];
1627 }
1628 val_t string___Buffer_____l(val_t p0, val_t p1){
1629 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1630 val_t REGB0;
1631 val_t REGB1;
1632 val_t REGB2;
1633 val_t REGB3;
1634 val_t REGB4;
1635 val_t REGB5;
1636 val_t tmp;
1637 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1638 fra.me.file = LOCATE_string;
1639 fra.me.line = 327;
1640 fra.me.meth = LOCATE_string___Buffer_____l;
1641 fra.me.has_broke = 0;
1642 fra.me.REG_size = 2;
1643 fra.me.REG[0] = NIT_NULL;
1644 fra.me.REG[1] = NIT_NULL;
1645 fra.me.REG[0] = p0;
1646 fra.me.REG[1] = p1;
1647 /* ./../lib/standard//string.nit:329 */
1648 REGB0 = TAG_Int(0);
1649 /* ./../lib/standard//collection//array.nit:23 */
1650 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1651 if (UNTAG_Bool(REGB1)) {
1652 } else {
1653 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1654 }
1655 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1656 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1657 if (UNTAG_Bool(REGB2)) {
1658 } else {
1659 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1660 }
1661 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
1662 /* ./../lib/standard//string.nit:332 */
1663 while(1) {
1664 /* ./../lib/standard//kernel.nit:212 */
1665 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1666 /* ./../lib/standard//string.nit:332 */
1667 if (UNTAG_Bool(REGB3)) {
1668 /* ./../lib/standard//kernel.nit:212 */
1669 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
1670 } else {
1671 /* ./../lib/standard//string.nit:332 */
1672 REGB4 = TAG_Bool(false);
1673 REGB3 = REGB4;
1674 }
1675 if (UNTAG_Bool(REGB3)) {
1676 /* ./../lib/standard//string.nit:333 */
1677 REGB3 = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB0);
1678 /* ./../lib/standard//kernel.nit:382 */
1679 REGB3 = TAG_Int((unsigned char)UNTAG_Char(REGB3));
1680 /* ./../lib/standard//string.nit:334 */
1681 REGB4 = CALL_abstract_collection___MapRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB0);
1682 /* ./../lib/standard//kernel.nit:382 */
1683 REGB4 = TAG_Int((unsigned char)UNTAG_Char(REGB4));
1684 /* ./../lib/standard//kernel.nit:212 */
1685 REGB5 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
1686 /* ./../lib/standard//string.nit:335 */
1687 if (UNTAG_Bool(REGB5)) {
1688 /* ./../lib/standard//string.nit:336 */
1689 REGB5 = TAG_Bool(true);
1690 goto label1;
1691 } else {
1692 /* ./../lib/standard//kernel.nit:212 */
1693 REGB3 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB3));
1694 /* ./../lib/standard//string.nit:337 */
1695 if (UNTAG_Bool(REGB3)) {
1696 /* ./../lib/standard//string.nit:338 */
1697 REGB3 = TAG_Bool(false);
1698 REGB5 = REGB3;
1699 goto label1;
1700 }
1701 }
1702 /* ./../lib/standard//string.nit:340 */
1703 REGB3 = TAG_Int(1);
1704 /* ./../lib/standard//kernel.nit:215 */
1705 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
1706 /* ./../lib/standard//string.nit:340 */
1707 REGB0 = REGB3;
1708 } else {
1709 /* ./../lib/standard//string.nit:332 */
1710 goto label2;
1711 }
1712 }
1713 label2: while(0);
1714 /* ./../lib/standard//kernel.nit:212 */
1715 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
1716 /* ./../lib/standard//string.nit:342 */
1717 if (UNTAG_Bool(REGB2)) {
1718 /* ./../lib/standard//string.nit:343 */
1719 REGB2 = TAG_Bool(true);
1720 REGB5 = REGB2;
1721 goto label1;
1722 } else {
1723 /* ./../lib/standard//string.nit:345 */
1724 REGB2 = TAG_Bool(false);
1725 REGB5 = REGB2;
1726 goto label1;
1727 }
1728 label1: while(0);
1729 stack_frame_head = fra.me.prev;
1730 return REGB5;
1731 }
1732 void string___Buffer___init(val_t p0, int* init_table){
1733 int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Buffer].i;
1734 struct {struct stack_frame_t me;} fra;
1735 val_t REGB0;
1736 val_t tmp;
1737 if (init_table[itpos2]) return;
1738 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1739 fra.me.file = LOCATE_string;
1740 fra.me.line = 349;
1741 fra.me.meth = LOCATE_string___Buffer___init;
1742 fra.me.has_broke = 0;
1743 fra.me.REG_size = 1;
1744 fra.me.REG[0] = NIT_NULL;
1745 fra.me.REG[0] = p0;
1746 /* ./../lib/standard//string.nit:352 */
1747 REGB0 = TAG_Int(5);
1748 CALL_string___Buffer___with_capacity(fra.me.REG[0])(fra.me.REG[0], REGB0, init_table);
1749 stack_frame_head = fra.me.prev;
1750 init_table[itpos2] = 1;
1751 return;
1752 }
1753 void string___Buffer___from(val_t p0, val_t p1, int* init_table){
1754 int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Buffer].i;
1755 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1756 val_t REGB0;
1757 val_t REGB1;
1758 val_t REGB2;
1759 val_t tmp;
1760 if (init_table[itpos3]) return;
1761 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1762 fra.me.file = LOCATE_string;
1763 fra.me.line = 355;
1764 fra.me.meth = LOCATE_string___Buffer___from;
1765 fra.me.has_broke = 0;
1766 fra.me.REG_size = 3;
1767 fra.me.REG[0] = NIT_NULL;
1768 fra.me.REG[1] = NIT_NULL;
1769 fra.me.REG[2] = NIT_NULL;
1770 fra.me.REG[0] = p0;
1771 fra.me.REG[1] = p1;
1772 /* ./../lib/standard//string.nit:355 */
1773 fra.me.REG[2] = fra.me.REG[0];
1774 CALL_string___StringCapable___init(fra.me.REG[0])(fra.me.REG[0], init_table);
1775 /* ./../lib/standard//collection//array.nit:23 */
1776 REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1777 if (UNTAG_Bool(REGB0)) {
1778 } else {
1779 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1780 }
1781 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
1782 /* ./../lib/standard//string.nit:357 */
1783 REGB1 = TAG_Int(1);
1784 /* ./../lib/standard//kernel.nit:215 */
1785 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1786 /* ./../lib/standard//string.nit:357 */
1787 ATTR_string___Buffer____capacity(fra.me.REG[2]) = REGB1;
1788 /* ./../lib/standard//collection//array.nit:23 */
1789 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1790 if (UNTAG_Bool(REGB1)) {
1791 } else {
1792 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1793 }
1794 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
1795 /* ./../lib/standard//string.nit:358 */
1796 ATTR_array___AbstractArrayRead____length(fra.me.REG[2]) = REGB1;
1797 /* ./../lib/standard//string.nit:359 */
1798 REGB1 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[2])!=NIT_NULL);
1799 if (UNTAG_Bool(REGB1)) {
1800 } else {
1801 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_string, 359);
1802 }
1803 REGB1 = ATTR_string___Buffer____capacity(fra.me.REG[2]);
1804 /* ./../lib/standard//string.nit:601 */
1805 fra.me.REG[0] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
1806 /* ./../lib/standard//string.nit:359 */
1807 ATTR_string___AbstractString____items(fra.me.REG[2]) = fra.me.REG[0];
1808 /* ./../lib/standard//string.nit:360 */
1809 fra.me.REG[1] = CALL_string___AbstractString___items(fra.me.REG[1])(fra.me.REG[1]);
1810 REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[2])!=NIT_NULL);
1811 if (UNTAG_Bool(REGB1)) {
1812 } else {
1813 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 360);
1814 }
1815 fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[2]);
1816 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1817 if (UNTAG_Bool(REGB1)) {
1818 } else {
1819 nit_abort("Uninitialized attribute %s", "_length", LOCATE_string, 360);
1820 }
1821 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
1822 REGB0 = TAG_Int(0);
1823 REGB2 = TAG_Int(0);
1824 /* ./../lib/standard//string.nit:587 */
1825 (void)memcpy(UNBOX_NativeString(fra.me.REG[0])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB0), UNTAG_Int(REGB1));;
1826 stack_frame_head = fra.me.prev;
1827 init_table[itpos3] = 1;
1828 return;
1829 }
1830 void string___Buffer___with_capacity(val_t p0, val_t p1, int* init_table){
1831 int itpos4 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Buffer].i;
1832 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1833 val_t REGB0;
1834 val_t REGB1;
1835 val_t tmp;
1836 if (init_table[itpos4]) return;
1837 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1838 fra.me.file = LOCATE_string;
1839 fra.me.line = 363;
1840 fra.me.meth = LOCATE_string___Buffer___with_capacity;
1841 fra.me.has_broke = 0;
1842 fra.me.REG_size = 2;
1843 fra.me.REG[0] = NIT_NULL;
1844 fra.me.REG[1] = NIT_NULL;
1845 fra.me.REG[0] = p0;
1846 REGB0 = p1;
1847 /* ./../lib/standard//string.nit:363 */
1848 fra.me.REG[1] = fra.me.REG[0];
1849 CALL_string___StringCapable___init(fra.me.REG[0])(fra.me.REG[0], init_table);
1850 /* ./../lib/standard//string.nit:366 */
1851 REGB1 = TAG_Int(0);
1852 /* ./../lib/standard//kernel.nit:213 */
1853 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
1854 /* ./../lib/standard//string.nit:366 */
1855 if (UNTAG_Bool(REGB1)) {
1856 } else {
1857 nit_abort("Assert failed", NULL, LOCATE_string, 366);
1858 }
1859 /* ./../lib/standard//string.nit:368 */
1860 REGB1 = TAG_Int(1);
1861 /* ./../lib/standard//kernel.nit:215 */
1862 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1863 /* ./../lib/standard//string.nit:601 */
1864 fra.me.REG[0] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
1865 /* ./../lib/standard//string.nit:368 */
1866 ATTR_string___AbstractString____items(fra.me.REG[1]) = fra.me.REG[0];
1867 /* ./../lib/standard//string.nit:369 */
1868 ATTR_string___Buffer____capacity(fra.me.REG[1]) = REGB0;
1869 /* ./../lib/standard//string.nit:370 */
1870 REGB0 = TAG_Int(0);
1871 ATTR_array___AbstractArrayRead____length(fra.me.REG[1]) = REGB0;
1872 stack_frame_head = fra.me.prev;
1873 init_table[itpos4] = 1;
1874 return;
1875 }
1876 val_t string___Buffer_____eqeq(val_t p0, val_t p1){
1877 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1878 val_t REGB0;
1879 val_t REGB1;
1880 val_t REGB2;
1881 val_t REGB3;
1882 val_t REGB4;
1883 val_t REGB5;
1884 val_t tmp;
1885 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1886 fra.me.file = LOCATE_string;
1887 fra.me.line = 373;
1888 fra.me.meth = LOCATE_string___Buffer_____eqeq;
1889 fra.me.has_broke = 0;
1890 fra.me.REG_size = 2;
1891 fra.me.REG[0] = NIT_NULL;
1892 fra.me.REG[1] = NIT_NULL;
1893 fra.me.REG[0] = p0;
1894 fra.me.REG[1] = p1;
1895 /* ./../lib/standard//string.nit:375 */
1896 REGB0 = TAG_Bool((fra.me.REG[1]!=NIT_NULL) && VAL_ISA(fra.me.REG[1], COLOR_Buffer, ID_Buffer)) /*cast Buffer*/;
1897 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1898 if (UNTAG_Bool(REGB0)) {
1899 REGB0 = TAG_Bool(true);
1900 } else {
1901 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
1902 REGB0 = REGB1;
1903 }
1904 if (UNTAG_Bool(REGB0)) {
1905 REGB0 = TAG_Bool(false);
1906 goto label1;
1907 }
1908 /* ./../lib/standard//collection//array.nit:23 */
1909 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1910 if (UNTAG_Bool(REGB1)) {
1911 } else {
1912 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1913 }
1914 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1915 /* ./../lib/standard//string.nit:377 */
1916 REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
1917 if (UNTAG_Bool(REGB2)) {
1918 nit_abort("Reciever is null", NULL, LOCATE_string, 377);
1919 }
1920 /* ./../lib/standard//collection//array.nit:23 */
1921 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1922 if (UNTAG_Bool(REGB2)) {
1923 } else {
1924 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1925 }
1926 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
1927 /* ./../lib/standard//string.nit:377 */
1928 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1));
1929 if (UNTAG_Bool(REGB3)) {
1930 } else {
1931 /* ./../lib/standard//kernel.nit:207 */
1932 REGB2 = TAG_Bool((REGB2)==(REGB1));
1933 /* ./../lib/standard//string.nit:377 */
1934 REGB3 = REGB2;
1935 }
1936 REGB3 = TAG_Bool(!UNTAG_Bool(REGB3));
1937 if (UNTAG_Bool(REGB3)) {
1938 REGB3 = TAG_Bool(false);
1939 REGB0 = REGB3;
1940 goto label1;
1941 }
1942 /* ./../lib/standard//string.nit:378 */
1943 REGB3 = TAG_Int(0);
1944 /* ./../lib/standard//string.nit:379 */
1945 REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1946 if (UNTAG_Bool(REGB2)) {
1947 } else {
1948 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 379);
1949 }
1950 fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
1951 /* ./../lib/standard//string.nit:380 */
1952 REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
1953 if (UNTAG_Bool(REGB2)) {
1954 } else {
1955 nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 380);
1956 }
1957 fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[1]);
1958 /* ./../lib/standard//string.nit:381 */
1959 while(1) {
1960 /* ./../lib/standard//kernel.nit:212 */
1961 REGB2 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB1));
1962 /* ./../lib/standard//string.nit:381 */
1963 if (UNTAG_Bool(REGB2)) {
1964 /* ./../lib/standard//string.nit:585 */
1965 REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB3)]);
1966 REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB3)]);
1967 /* ./../lib/standard//string.nit:382 */
1968 REGB5 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB4));
1969 if (UNTAG_Bool(REGB5)) {
1970 } else {
1971 /* ./../lib/standard//kernel.nit:347 */
1972 REGB4 = TAG_Bool((REGB2)==(REGB4));
1973 /* ./../lib/standard//string.nit:382 */
1974 REGB5 = REGB4;
1975 }
1976 REGB5 = TAG_Bool(!UNTAG_Bool(REGB5));
1977 if (UNTAG_Bool(REGB5)) {
1978 REGB5 = TAG_Bool(false);
1979 REGB0 = REGB5;
1980 goto label1;
1981 }
1982 /* ./../lib/standard//string.nit:383 */
1983 REGB5 = TAG_Int(1);
1984 /* ./../lib/standard//kernel.nit:215 */
1985 REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB5));
1986 /* ./../lib/standard//string.nit:383 */
1987 REGB3 = REGB5;
1988 } else {
1989 /* ./../lib/standard//string.nit:381 */
1990 goto label2;
1991 }
1992 }
1993 label2: while(0);
1994 /* ./../lib/standard//string.nit:385 */
1995 REGB3 = TAG_Bool(true);
1996 REGB0 = REGB3;
1997 goto label1;
1998 label1: while(0);
1999 stack_frame_head = fra.me.prev;
2000 return REGB0;
2001 }
2002 val_t string___Buffer___capacity(val_t p0){
2003 struct {struct stack_frame_t me;} fra;
2004 val_t REGB0;
2005 val_t tmp;
2006 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2007 fra.me.file = LOCATE_string;
2008 fra.me.line = 388;
2009 fra.me.meth = LOCATE_string___Buffer___capacity;
2010 fra.me.has_broke = 0;
2011 fra.me.REG_size = 1;
2012 fra.me.REG[0] = NIT_NULL;
2013 fra.me.REG[0] = p0;
2014 /* ./../lib/standard//string.nit:388 */
2015 REGB0 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
2016 if (UNTAG_Bool(REGB0)) {
2017 } else {
2018 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_string, 388);
2019 }
2020 REGB0 = ATTR_string___Buffer____capacity(fra.me.REG[0]);
2021 stack_frame_head = fra.me.prev;
2022 return REGB0;
2023 }
2024 val_t string___Object___to_s(val_t p0){
2025 struct {struct stack_frame_t me;} fra;
2026 val_t tmp;
2027 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2028 fra.me.file = LOCATE_string;
2029 fra.me.line = 398;
2030 fra.me.meth = LOCATE_string___Object___to_s;
2031 fra.me.has_broke = 0;
2032 fra.me.REG_size = 1;
2033 fra.me.REG[0] = NIT_NULL;
2034 fra.me.REG[0] = p0;
2035 /* ./../lib/standard//string.nit:399 */
2036 fra.me.REG[0] = CALL_string___Object___inspect(fra.me.REG[0])(fra.me.REG[0]);
2037 goto label1;
2038 label1: while(0);
2039 stack_frame_head = fra.me.prev;
2040 return fra.me.REG[0];
2041 }
2042 val_t string___Object___inspect(val_t p0){
2043 struct {struct stack_frame_t me;} fra;
2044 val_t tmp;
2045 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2046 fra.me.file = LOCATE_string;
2047 fra.me.line = 401;
2048 fra.me.meth = LOCATE_string___Object___inspect;
2049 fra.me.has_broke = 0;
2050 fra.me.REG_size = 1;
2051 fra.me.REG[0] = NIT_NULL;
2052 fra.me.REG[0] = p0;
2053 /* ./../lib/standard//string.nit:405 */
2054 fra.me.REG[0] = CALL_string___Object___inspect_head(fra.me.REG[0])(fra.me.REG[0]);
2055 /* ./../lib/standard//string.nit:407 */
2056 goto label1;
2057 label1: while(0);
2058 stack_frame_head = fra.me.prev;
2059 return fra.me.REG[0];
2060 }
2061 val_t string___Object___inspect_head(val_t p0){
2062 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
2063 val_t REGB0;
2064 val_t tmp;
2065 static val_t once_value_1; /* Once value */
2066 static val_t once_value_2; /* Once value */
2067 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2068 fra.me.file = LOCATE_string;
2069 fra.me.line = 410;
2070 fra.me.meth = LOCATE_string___Object___inspect_head;
2071 fra.me.has_broke = 0;
2072 fra.me.REG_size = 3;
2073 fra.me.REG[0] = NIT_NULL;
2074 fra.me.REG[1] = NIT_NULL;
2075 fra.me.REG[2] = NIT_NULL;
2076 fra.me.REG[0] = p0;
2077 /* ./../lib/standard//string.nit:414 */
2078 REGB0 = TAG_Int(3);
2079 fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB0);
2080 if (!once_value_1) {
2081 fra.me.REG[2] = BOX_NativeString("<");
2082 REGB0 = TAG_Int(1);
2083 fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
2084 once_value_1 = fra.me.REG[2];
2085 register_static_object(&once_value_1);
2086 } else fra.me.REG[2] = once_value_1;
2087 fra.me.REG[2] = fra.me.REG[2];
2088 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
2089 REGB0 = CALL_kernel___Object___object_id(fra.me.REG[0])(fra.me.REG[0]);
2090 fra.me.REG[0] = CALL_string___Int___to_hex(REGB0)(REGB0);
2091 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
2092 if (!once_value_2) {
2093 fra.me.REG[0] = BOX_NativeString("");
2094 REGB0 = TAG_Int(0);
2095 fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
2096 once_value_2 = fra.me.REG[0];
2097 register_static_object(&once_value_2);
2098 } else fra.me.REG[0] = once_value_2;
2099 fra.me.REG[0] = fra.me.REG[0];
2100 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
2101 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
2102 goto label3;
2103 label3: while(0);
2104 stack_frame_head = fra.me.prev;
2105 return fra.me.REG[1];
2106 }
2107 val_t string___Object___args(val_t p0){
2108 struct {struct stack_frame_t me;} fra;
2109 val_t tmp;
2110 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2111 fra.me.file = LOCATE_string;
2112 fra.me.line = 417;
2113 fra.me.meth = LOCATE_string___Object___args;
2114 fra.me.has_broke = 0;
2115 fra.me.REG_size = 1;
2116 fra.me.REG[0] = NIT_NULL;
2117 fra.me.REG[0] = p0;
2118 /* ./../lib/standard//string.nit:419 */
2119 fra.me.REG[0] = CALL_kernel___Object___sys(fra.me.REG[0])(fra.me.REG[0]);
2120 fra.me.REG[0] = CALL_string___Object___args(fra.me.REG[0])(fra.me.REG[0]);
2121 goto label1;
2122 label1: while(0);
2123 stack_frame_head = fra.me.prev;
2124 return fra.me.REG[0];
2125 }
2126 val_t string___Bool___to_s(val_t p0){
2127 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2128 val_t REGB0;
2129 val_t tmp;
2130 static val_t once_value_1; /* Once value */
2131 static val_t once_value_2; /* Once value */
2132 static val_t once_value_4; /* Once value */
2133 static val_t once_value_5; /* Once value */
2134 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2135 fra.me.file = LOCATE_string;
2136 fra.me.line = 424;
2137 fra.me.meth = LOCATE_string___Bool___to_s;
2138 fra.me.has_broke = 0;
2139 fra.me.REG_size = 2;
2140 fra.me.REG[0] = NIT_NULL;
2141 fra.me.REG[1] = NIT_NULL;
2142 REGB0 = p0;
2143 /* ./../lib/standard//string.nit:426 */
2144 if (UNTAG_Bool(REGB0)) {
2145 /* ./../lib/standard//string.nit:427 */
2146 if (!once_value_1) {
2147 if (!once_value_2) {
2148 fra.me.REG[0] = BOX_NativeString("true");
2149 REGB0 = TAG_Int(4);
2150 fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
2151 once_value_2 = fra.me.REG[0];
2152 register_static_object(&once_value_2);
2153 } else fra.me.REG[0] = once_value_2;
2154 fra.me.REG[0] = fra.me.REG[0];
2155 once_value_1 = fra.me.REG[0];
2156 register_static_object(&once_value_1);
2157 } else fra.me.REG[0] = once_value_1;
2158 fra.me.REG[0] = fra.me.REG[0];
2159 goto label3;
2160 } else {
2161 /* ./../lib/standard//string.nit:429 */
2162 if (!once_value_4) {
2163 if (!once_value_5) {
2164 fra.me.REG[1] = BOX_NativeString("false");
2165 REGB0 = TAG_Int(5);
2166 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
2167 once_value_5 = fra.me.REG[1];
2168 register_static_object(&once_value_5);
2169 } else fra.me.REG[1] = once_value_5;
2170 fra.me.REG[1] = fra.me.REG[1];
2171 once_value_4 = fra.me.REG[1];
2172 register_static_object(&once_value_4);
2173 } else fra.me.REG[1] = once_value_4;
2174 fra.me.REG[1] = fra.me.REG[1];
2175 fra.me.REG[0] = fra.me.REG[1];
2176 goto label3;
2177 }
2178 label3: while(0);
2179 stack_frame_head = fra.me.prev;
2180 return fra.me.REG[0];
2181 }
2182 void string___Int___fill_buffer(val_t p0, val_t p1, val_t p2, val_t p3){
2183 struct {struct stack_frame_t me;} fra;
2184 val_t REGB0;
2185 val_t REGB1;
2186 val_t REGB2;
2187 val_t REGB3;
2188 val_t REGB4;
2189 val_t tmp;
2190 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2191 fra.me.file = LOCATE_string;
2192 fra.me.line = 435;
2193 fra.me.meth = LOCATE_string___Int___fill_buffer;
2194 fra.me.has_broke = 0;
2195 fra.me.REG_size = 1;
2196 fra.me.REG[0] = NIT_NULL;
2197 REGB0 = p0;
2198 fra.me.REG[0] = p1;
2199 REGB1 = p2;
2200 REGB2 = p3;
2201 /* ./../lib/standard//string.nit:441 */
2202 REGB2 = TAG_Int(0);
2203 /* ./../lib/standard//kernel.nit:212 */
2204 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
2205 /* ./../lib/standard//string.nit:441 */
2206 if (UNTAG_Bool(REGB2)) {
2207 /* ./../lib/standard//kernel.nit:216 */
2208 REGB2 = TAG_Int(-UNTAG_Int(REGB0));
2209 /* ./../lib/standard//string.nit:443 */
2210 REGB3 = TAG_Int(0);
2211 REGB4 = TAG_Char('-');
2212 CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB3, REGB4);
2213 } else {
2214 /* ./../lib/standard//string.nit:444 */
2215 REGB4 = TAG_Int(0);
2216 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB4));
2217 if (UNTAG_Bool(REGB3)) {
2218 } else {
2219 /* ./../lib/standard//kernel.nit:207 */
2220 REGB4 = TAG_Bool((REGB0)==(REGB4));
2221 /* ./../lib/standard//string.nit:444 */
2222 REGB3 = REGB4;
2223 }
2224 if (UNTAG_Bool(REGB3)) {
2225 /* ./../lib/standard//string.nit:445 */
2226 REGB3 = TAG_Int(0);
2227 REGB4 = TAG_Char('0');
2228 CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB3, REGB4);
2229 /* ./../lib/standard//string.nit:446 */
2230 goto label1;
2231 } else {
2232 /* ./../lib/standard//string.nit:448 */
2233 REGB2 = REGB0;
2234 }
2235 }
2236 /* ./../lib/standard//string.nit:451 */
2237 REGB0 = CALL_kernel___Int___digit_count(REGB0)(REGB0, REGB1);
2238 REGB4 = TAG_Int(1);
2239 /* ./../lib/standard//kernel.nit:217 */
2240 REGB4 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB4));
2241 /* ./../lib/standard//string.nit:452 */
2242 while(1) {
2243 REGB0 = TAG_Int(0);
2244 /* ./../lib/standard//kernel.nit:213 */
2245 REGB0 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB0));
2246 /* ./../lib/standard//string.nit:452 */
2247 if (UNTAG_Bool(REGB0)) {
2248 REGB0 = TAG_Int(0);
2249 /* ./../lib/standard//kernel.nit:214 */
2250 REGB0 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB0));
2251 } else {
2252 /* ./../lib/standard//string.nit:452 */
2253 REGB3 = TAG_Bool(false);
2254 REGB0 = REGB3;
2255 }
2256 if (UNTAG_Bool(REGB0)) {
2257 /* ./../lib/standard//kernel.nit:220 */
2258 REGB0 = TAG_Int(UNTAG_Int(REGB2)%UNTAG_Int(REGB1));
2259 /* ./../lib/standard//string.nit:453 */
2260 REGB0 = CALL_kernel___Int___to_c(REGB0)(REGB0);
2261 CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB4, REGB0);
2262 /* ./../lib/standard//kernel.nit:219 */
2263 REGB0 = TAG_Int(UNTAG_Int(REGB2)/UNTAG_Int(REGB1));
2264 /* ./../lib/standard//string.nit:454 */
2265 REGB2 = REGB0;
2266 /* ./../lib/standard//string.nit:455 */
2267 REGB0 = TAG_Int(1);
2268 /* ./../lib/standard//kernel.nit:217 */
2269 REGB0 = TAG_Int(UNTAG_Int(REGB4)-UNTAG_Int(REGB0));
2270 /* ./../lib/standard//string.nit:455 */
2271 REGB4 = REGB0;
2272 } else {
2273 /* ./../lib/standard//string.nit:452 */
2274 goto label2;
2275 }
2276 }
2277 label2: while(0);
2278 label1: while(0);
2279 stack_frame_head = fra.me.prev;
2280 return;
2281 }
2282 val_t string___Int___to_s(val_t p0){
2283 struct {struct stack_frame_t me;} fra;
2284 val_t REGB0;
2285 val_t REGB1;
2286 val_t REGB2;
2287 val_t tmp;
2288 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2289 fra.me.file = LOCATE_string;
2290 fra.me.line = 459;
2291 fra.me.meth = LOCATE_string___Int___to_s;
2292 fra.me.has_broke = 0;
2293 fra.me.REG_size = 1;
2294 fra.me.REG[0] = NIT_NULL;
2295 REGB0 = p0;
2296 /* ./../lib/standard//string.nit:460 */
2297 REGB1 = TAG_Int(10);
2298 REGB2 = TAG_Bool(true);
2299 fra.me.REG[0] = CALL_string___Int___to_base(REGB0)(REGB0, REGB1, REGB2);
2300 goto label1;
2301 label1: while(0);
2302 stack_frame_head = fra.me.prev;
2303 return fra.me.REG[0];
2304 }
2305 val_t string___Int___to_hex(val_t p0){
2306 struct {struct stack_frame_t me;} fra;
2307 val_t REGB0;
2308 val_t REGB1;
2309 val_t REGB2;
2310 val_t tmp;
2311 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2312 fra.me.file = LOCATE_string;
2313 fra.me.line = 462;
2314 fra.me.meth = LOCATE_string___Int___to_hex;
2315 fra.me.has_broke = 0;
2316 fra.me.REG_size = 1;
2317 fra.me.REG[0] = NIT_NULL;
2318 REGB0 = p0;
2319 /* ./../lib/standard//string.nit:463 */
2320 REGB1 = TAG_Int(16);
2321 REGB2 = TAG_Bool(false);
2322 fra.me.REG[0] = CALL_string___Int___to_base(REGB0)(REGB0, REGB1, REGB2);
2323 goto label1;
2324 label1: while(0);
2325 stack_frame_head = fra.me.prev;
2326 return fra.me.REG[0];
2327 }
2328 val_t string___Int___to_base(val_t p0, val_t p1, val_t p2){
2329 struct {struct stack_frame_t me;} fra;
2330 val_t REGB0;
2331 val_t REGB1;
2332 val_t REGB2;
2333 val_t REGB3;
2334 val_t REGB4;
2335 val_t tmp;
2336 static val_t once_value_1; /* Once value */
2337 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2338 fra.me.file = LOCATE_string;
2339 fra.me.line = 465;
2340 fra.me.meth = LOCATE_string___Int___to_base;
2341 fra.me.has_broke = 0;
2342 fra.me.REG_size = 1;
2343 fra.me.REG[0] = NIT_NULL;
2344 REGB0 = p0;
2345 REGB1 = p1;
2346 REGB2 = p2;
2347 /* ./../lib/standard//string.nit:468 */
2348 REGB3 = CALL_kernel___Int___digit_count(REGB0)(REGB0, REGB1);
2349 /* ./../lib/standard//string.nit:469 */
2350 if (!once_value_1) {
2351 fra.me.REG[0] = BOX_NativeString(" ");
2352 REGB4 = TAG_Int(1);
2353 fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB4);
2354 once_value_1 = fra.me.REG[0];
2355 register_static_object(&once_value_1);
2356 } else fra.me.REG[0] = once_value_1;
2357 fra.me.REG[0] = fra.me.REG[0];
2358 fra.me.REG[0] = CALL_string___String_____star(fra.me.REG[0])(fra.me.REG[0], REGB3);
2359 fra.me.REG[0] = NEW_Buffer_string___Buffer___from(fra.me.REG[0]);
2360 /* ./../lib/standard//string.nit:470 */
2361 CALL_string___Int___fill_buffer(REGB0)(REGB0, fra.me.REG[0], REGB1, REGB2);
2362 /* ./../lib/standard//string.nit:471 */
2363 fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
2364 goto label2;
2365 label2: while(0);
2366 stack_frame_head = fra.me.prev;
2367 return fra.me.REG[0];
2368 }
2369 val_t string___Float___to_s(val_t p0){
2370 struct {struct stack_frame_t me;} fra;
2371 val_t REGB0;
2372 val_t tmp;
2373 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2374 fra.me.file = LOCATE_string;
2375 fra.me.line = 476;
2376 fra.me.meth = LOCATE_string___Float___to_s;
2377 fra.me.has_broke = 0;
2378 fra.me.REG_size = 1;
2379 fra.me.REG[0] = NIT_NULL;
2380 fra.me.REG[0] = p0;
2381 /* ./../lib/standard//string.nit:476 */
2382 REGB0 = TAG_Int(6);
2383 fra.me.REG[0] = CALL_string___Float___to_precision(fra.me.REG[0])(fra.me.REG[0], REGB0);
2384 goto label1;
2385 label1: while(0);
2386 stack_frame_head = fra.me.prev;
2387 return fra.me.REG[0];
2388 }
2389 val_t string___Float___to_precision(val_t p0, val_t p1){
2390 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2391 val_t REGB0;
2392 val_t REGB1;
2393 val_t REGB2;
2394 val_t tmp;
2395 static val_t once_value_3; /* Once value */
2396 static val_t once_value_4; /* Once value */
2397 static val_t once_value_5; /* Once value */
2398 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2399 fra.me.file = LOCATE_string;
2400 fra.me.line = 478;
2401 fra.me.meth = LOCATE_string___Float___to_precision;
2402 fra.me.has_broke = 0;
2403 fra.me.REG_size = 4;
2404 fra.me.REG[0] = NIT_NULL;
2405 fra.me.REG[1] = NIT_NULL;
2406 fra.me.REG[2] = NIT_NULL;
2407 fra.me.REG[3] = NIT_NULL;
2408 fra.me.REG[0] = p0;
2409 REGB0 = p1;
2410 /* ./../lib/standard//string.nit:481 */
2411 REGB1 = TAG_Int(0);
2412 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
2413 if (UNTAG_Bool(REGB2)) {
2414 } else {
2415 /* ./../lib/standard//kernel.nit:207 */
2416 REGB1 = TAG_Bool((REGB0)==(REGB1));
2417 /* ./../lib/standard//string.nit:481 */
2418 REGB2 = REGB1;
2419 }
2420 if (UNTAG_Bool(REGB2)) {
2421 /* ./../lib/standard//kernel.nit:196 */
2422 REGB2 = TAG_Int((bigint)UNBOX_Float(fra.me.REG[0]));
2423 /* ./../lib/standard//string.nit:481 */
2424 fra.me.REG[1] = CALL_string___Object___to_s(REGB2)(REGB2);
2425 goto label1;
2426 }
2427 /* ./../lib/standard//kernel.nit:196 */
2428 REGB2 = TAG_Int((bigint)UNBOX_Float(fra.me.REG[0]));
2429 /* ./../lib/standard//string.nit:484 */
2430 fra.me.REG[2] = BOX_Float(1.0);
2431 /* ./../lib/standard//string.nit:485 */
2432 while(1) {
2433 REGB1 = TAG_Int(0);
2434 /* ./../lib/standard//kernel.nit:214 */
2435 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
2436 /* ./../lib/standard//string.nit:485 */
2437 if (UNTAG_Bool(REGB1)) {
2438 /* ./../lib/standard//string.nit:486 */
2439 fra.me.REG[3] = BOX_Float(10.0);
2440 /* ./../lib/standard//kernel.nit:193 */
2441 fra.me.REG[3] = BOX_Float(UNBOX_Float(fra.me.REG[2])*UNBOX_Float(fra.me.REG[3]));
2442 /* ./../lib/standard//string.nit:486 */
2443 fra.me.REG[2] = fra.me.REG[3];
2444 /* ./../lib/standard//string.nit:487 */
2445 REGB1 = TAG_Int(1);
2446 /* ./../lib/standard//kernel.nit:217 */
2447 REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1));
2448 /* ./../lib/standard//string.nit:487 */
2449 REGB0 = REGB1;
2450 } else {
2451 /* ./../lib/standard//string.nit:485 */
2452 goto label2;
2453 }
2454 }
2455 label2: while(0);
2456 /* ./../lib/standard//kernel.nit:224 */
2457 fra.me.REG[3] = BOX_Float((float)UNTAG_Int(REGB2));
2458 /* ./../lib/standard//kernel.nit:192 */
2459 fra.me.REG[3] = BOX_Float(UNBOX_Float(fra.me.REG[0])-UNBOX_Float(fra.me.REG[3]));
2460 /* ./../lib/standard//kernel.nit:193 */
2461 fra.me.REG[2] = BOX_Float(UNBOX_Float(fra.me.REG[3])*UNBOX_Float(fra.me.REG[2]));
2462 /* ./../lib/standard//kernel.nit:196 */
2463 REGB0 = TAG_Int((bigint)UNBOX_Float(fra.me.REG[2]));
2464 /* ./../lib/standard//string.nit:490 */
2465 REGB1 = TAG_Int(5);
2466 fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB1);
2467 if (!once_value_3) {
2468 fra.me.REG[3] = BOX_NativeString("");
2469 REGB1 = TAG_Int(0);
2470 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB1);
2471 once_value_3 = fra.me.REG[3];
2472 register_static_object(&once_value_3);
2473 } else fra.me.REG[3] = once_value_3;
2474 fra.me.REG[3] = fra.me.REG[3];
2475 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
2476 fra.me.REG[3] = CALL_string___Object___to_s(REGB2)(REGB2);
2477 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
2478 if (!once_value_4) {
2479 fra.me.REG[3] = BOX_NativeString(".");
2480 REGB2 = TAG_Int(1);
2481 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB2);
2482 once_value_4 = fra.me.REG[3];
2483 register_static_object(&once_value_4);
2484 } else fra.me.REG[3] = once_value_4;
2485 fra.me.REG[3] = fra.me.REG[3];
2486 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
2487 fra.me.REG[3] = CALL_string___Object___to_s(REGB0)(REGB0);
2488 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
2489 if (!once_value_5) {
2490 fra.me.REG[3] = BOX_NativeString("");
2491 REGB0 = TAG_Int(0);
2492 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
2493 once_value_5 = fra.me.REG[3];
2494 register_static_object(&once_value_5);
2495 } else fra.me.REG[3] = once_value_5;
2496 fra.me.REG[3] = fra.me.REG[3];
2497 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
2498 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
2499 fra.me.REG[1] = fra.me.REG[2];
2500 goto label1;
2501 label1: while(0);
2502 stack_frame_head = fra.me.prev;
2503 return fra.me.REG[1];
2504 }
2505 val_t string___Char___to_s(val_t p0){
2506 struct {struct stack_frame_t me;} fra;
2507 val_t REGB0;
2508 val_t REGB1;
2509 val_t tmp;
2510 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2511 fra.me.file = LOCATE_string;
2512 fra.me.line = 495;
2513 fra.me.meth = LOCATE_string___Char___to_s;
2514 fra.me.has_broke = 0;
2515 fra.me.REG_size = 1;
2516 fra.me.REG[0] = NIT_NULL;
2517 REGB0 = p0;
2518 /* ./../lib/standard//string.nit:497 */
2519 REGB1 = TAG_Int(1);
2520 fra.me.REG[0] = NEW_Buffer_string___Buffer___with_capacity(REGB1);
2521 /* ./../lib/standard//string.nit:498 */
2522 REGB1 = TAG_Int(0);
2523 CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB1, REGB0);
2524 /* ./../lib/standard//string.nit:499 */
2525 fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
2526 goto label1;
2527 label1: while(0);
2528 stack_frame_head = fra.me.prev;
2529 return fra.me.REG[0];
2530 }
2531 val_t string___Collection___to_s(val_t p0){
2532 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2533 val_t tmp;
2534 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2535 fra.me.file = LOCATE_string;
2536 fra.me.line = 504;
2537 fra.me.meth = LOCATE_string___Collection___to_s;
2538 fra.me.has_broke = 0;
2539 fra.me.REG_size = 2;
2540 fra.me.REG[0] = NIT_NULL;
2541 fra.me.REG[1] = NIT_NULL;
2542 fra.me.REG[0] = p0;
2543 /* ./../lib/standard//string.nit:507 */
2544 fra.me.REG[1] = NEW_Buffer_string___Buffer___init();
2545 CALL_abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_string___Collection___to_s_1));
2546 /* ./../lib/standard//string.nit:509 */
2547 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
2548 goto label2;
2549 label2: while(0);
2550 stack_frame_head = fra.me.prev;
2551 return fra.me.REG[1];
2552 }
2553 void OC_string___Collection___to_s_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
2554 struct {struct stack_frame_t me;} fra;
2555 val_t REGB0;
2556 val_t REGB1;
2557 fun_t CREG[1];
2558 val_t tmp;
2559 /* ./../lib/standard//string.nit:508 */
2560 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2561 fra.me.file = LOCATE_string;
2562 fra.me.line = 0;
2563 fra.me.meth = LOCATE_string___Collection___to_s;
2564 fra.me.has_broke = 0;
2565 fra.me.REG_size = 1;
2566 fra.me.REG[0] = NIT_NULL;
2567 fra.me.closure_ctx = closctx_param;
2568 fra.me.closure_funs = CREG;
2569 fra.me.REG[0] = p0;
2570 CREG[0] = clos_fun0;
2571 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
2572 if (UNTAG_Bool(REGB0)) {
2573 } else {
2574 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
2575 if (UNTAG_Bool(REGB1)) {
2576 REGB1 = TAG_Bool(false);
2577 REGB0 = REGB1;
2578 } else {
2579 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
2580 REGB0 = REGB1;
2581 }
2582 }
2583 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
2584 if (UNTAG_Bool(REGB0)) {
2585 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
2586 if (UNTAG_Bool(REGB0)) {
2587 nit_abort("Reciever is null", NULL, LOCATE_string, 508);
2588 }
2589 fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
2590 CALL_abstract_collection___Sequence___append(closctx->REG[1])(closctx->REG[1], fra.me.REG[0]);
2591 }
2592 stack_frame_head = fra.me.prev;
2593 return;
2594 }
2595 val_t string___Collection___join(val_t p0, val_t p1){
2596 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
2597 val_t REGB0;
2598 val_t REGB1;
2599 val_t tmp;
2600 static val_t once_value_1; /* Once value */
2601 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2602 fra.me.file = LOCATE_string;
2603 fra.me.line = 512;
2604 fra.me.meth = LOCATE_string___Collection___join;
2605 fra.me.has_broke = 0;
2606 fra.me.REG_size = 6;
2607 fra.me.REG[0] = NIT_NULL;
2608 fra.me.REG[1] = NIT_NULL;
2609 fra.me.REG[2] = NIT_NULL;
2610 fra.me.REG[3] = NIT_NULL;
2611 fra.me.REG[4] = NIT_NULL;
2612 fra.me.REG[5] = NIT_NULL;
2613 fra.me.REG[0] = p0;
2614 fra.me.REG[1] = p1;
2615 /* ./../lib/standard//string.nit:515 */
2616 REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]);
2617 if (UNTAG_Bool(REGB0)) {
2618 if (!once_value_1) {
2619 fra.me.REG[2] = BOX_NativeString("");
2620 REGB0 = TAG_Int(0);
2621 fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
2622 once_value_1 = fra.me.REG[2];
2623 register_static_object(&once_value_1);
2624 } else fra.me.REG[2] = once_value_1;
2625 fra.me.REG[2] = fra.me.REG[2];
2626 goto label2;
2627 }
2628 /* ./../lib/standard//string.nit:517 */
2629 fra.me.REG[3] = NEW_Buffer_string___Buffer___init();
2630 /* ./../lib/standard//string.nit:520 */
2631 fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]);
2632 /* ./../lib/standard//string.nit:521 */
2633 fra.me.REG[4] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]);
2634 /* ./../lib/standard//string.nit:522 */
2635 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
2636 if (UNTAG_Bool(REGB0)) {
2637 } else {
2638 REGB1 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
2639 if (UNTAG_Bool(REGB1)) {
2640 REGB1 = TAG_Bool(false);
2641 REGB0 = REGB1;
2642 } else {
2643 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], NIT_NULL);
2644 REGB0 = REGB1;
2645 }
2646 }
2647 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
2648 if (UNTAG_Bool(REGB0)) {
2649 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
2650 if (UNTAG_Bool(REGB0)) {
2651 nit_abort("Reciever is null", NULL, LOCATE_string, 522);
2652 }
2653 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
2654 CALL_abstract_collection___Sequence___append(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
2655 }
2656 /* ./../lib/standard//string.nit:525 */
2657 CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
2658 /* ./../lib/standard//string.nit:526 */
2659 while(1) {
2660 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]);
2661 if (UNTAG_Bool(REGB0)) {
2662 /* ./../lib/standard//string.nit:527 */
2663 CALL_abstract_collection___Sequence___append(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
2664 /* ./../lib/standard//string.nit:528 */
2665 fra.me.REG[5] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]);
2666 fra.me.REG[4] = fra.me.REG[5];
2667 /* ./../lib/standard//string.nit:529 */
2668 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
2669 if (UNTAG_Bool(REGB0)) {
2670 } else {
2671 REGB1 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
2672 if (UNTAG_Bool(REGB1)) {
2673 REGB1 = TAG_Bool(false);
2674 REGB0 = REGB1;
2675 } else {
2676 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], NIT_NULL);
2677 REGB0 = REGB1;
2678 }
2679 }
2680 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
2681 if (UNTAG_Bool(REGB0)) {
2682 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
2683 if (UNTAG_Bool(REGB0)) {
2684 nit_abort("Reciever is null", NULL, LOCATE_string, 529);
2685 }
2686 fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
2687 CALL_abstract_collection___Sequence___append(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
2688 }
2689 /* ./../lib/standard//string.nit:530 */
2690 CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
2691 } else {
2692 /* ./../lib/standard//string.nit:526 */
2693 goto label3;
2694 }
2695 }
2696 label3: while(0);
2697 /* ./../lib/standard//string.nit:532 */
2698 fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
2699 fra.me.REG[2] = fra.me.REG[3];
2700 goto label2;
2701 label2: while(0);
2702 stack_frame_head = fra.me.prev;
2703 return fra.me.REG[2];
2704 }
2705 val_t string___Array___to_s(val_t p0){
2706 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
2707 val_t REGB0;
2708 val_t REGB1;
2709 val_t REGB2;
2710 val_t REGB3;
2711 val_t REGB4;
2712 val_t tmp;
2713 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2714 fra.me.file = LOCATE_string;
2715 fra.me.line = 537;
2716 fra.me.meth = LOCATE_string___Array___to_s;
2717 fra.me.has_broke = 0;
2718 fra.me.REG_size = 3;
2719 fra.me.REG[0] = NIT_NULL;
2720 fra.me.REG[1] = NIT_NULL;
2721 fra.me.REG[2] = NIT_NULL;
2722 fra.me.REG[0] = p0;
2723 /* ./../lib/standard//string.nit:540 */
2724 fra.me.REG[1] = NEW_Buffer_string___Buffer___init();
2725 /* ./../lib/standard//string.nit:541 */
2726 REGB0 = TAG_Int(0);
2727 /* ./../lib/standard//collection//array.nit:23 */
2728 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2729 if (UNTAG_Bool(REGB1)) {
2730 } else {
2731 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
2732 }
2733 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
2734 /* ./../lib/standard//string.nit:543 */
2735 while(1) {
2736 /* ./../lib/standard//kernel.nit:212 */
2737 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
2738 /* ./../lib/standard//string.nit:543 */
2739 if (UNTAG_Bool(REGB2)) {
2740 /* ./../lib/standard//collection//array.nit:243 */
2741 fra.me.REG[2] = fra.me.REG[0];
2742 REGB2 = REGB0;
2743 /* ./../lib/standard//collection//array.nit:245 */
2744 REGB3 = TAG_Int(0);
2745 /* ./../lib/standard//kernel.nit:213 */
2746 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB3));
2747 /* ./../lib/standard//collection//array.nit:245 */
2748 if (UNTAG_Bool(REGB3)) {
2749 REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
2750 if (UNTAG_Bool(REGB3)) {
2751 } else {
2752 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245);
2753 }
2754 REGB3 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
2755 /* ./../lib/standard//kernel.nit:212 */
2756 REGB3 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB3));
2757 } else {
2758 /* ./../lib/standard//collection//array.nit:245 */
2759 REGB4 = TAG_Bool(false);
2760 REGB3 = REGB4;
2761 }
2762 if (UNTAG_Bool(REGB3)) {
2763 } else {
2764 nit_abort("Assert %s failed", "'index'", LOCATE_array, 245);
2765 }
2766 /* ./../lib/standard//collection//array.nit:246 */
2767 fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[2]);
2768 REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
2769 if (UNTAG_Bool(REGB3)) {
2770 nit_abort("Reciever is null", NULL, LOCATE_array, 246);
2771 }
2772 /* ./../lib/standard//collection//array.nit:654 */
2773 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB2)];
2774 /* ./../lib/standard//collection//array.nit:246 */
2775 goto label1;
2776 label1: while(0);
2777 /* ./../lib/standard//string.nit:545 */
2778 REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
2779 if (UNTAG_Bool(REGB2)) {
2780 } else {
2781 REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
2782 if (UNTAG_Bool(REGB3)) {
2783 REGB3 = TAG_Bool(false);
2784 REGB2 = REGB3;
2785 } else {
2786 REGB3 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
2787 REGB2 = REGB3;
2788 }
2789 }
2790 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
2791 if (UNTAG_Bool(REGB2)) {
2792 REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
2793 if (UNTAG_Bool(REGB2)) {
2794 nit_abort("Reciever is null", NULL, LOCATE_string, 545);
2795 }
2796 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
2797 CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
2798 }
2799 /* ./../lib/standard//string.nit:546 */
2800 REGB2 = TAG_Int(1);
2801 /* ./../lib/standard//kernel.nit:215 */
2802 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
2803 /* ./../lib/standard//string.nit:546 */
2804 REGB0 = REGB2;
2805 } else {
2806 /* ./../lib/standard//string.nit:543 */
2807 goto label2;
2808 }
2809 }
2810 label2: while(0);
2811 /* ./../lib/standard//string.nit:548 */
2812 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
2813 goto label3;
2814 label3: while(0);
2815 stack_frame_head = fra.me.prev;
2816 return fra.me.REG[1];
2817 }
2818 val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){
2819 struct {struct stack_frame_t me; val_t MORE_REG[8];} fra;
2820 val_t REGB0;
2821 val_t REGB1;
2822 val_t tmp;
2823 static val_t once_value_1; /* Once value */
2824 static val_t once_value_3; /* Once value */
2825 static val_t once_value_4; /* Once value */
2826 static val_t once_value_5; /* Once value */
2827 static val_t once_value_6; /* Once value */
2828 static val_t once_value_7; /* Once value */
2829 static val_t once_value_8; /* Once value */
2830 static val_t once_value_9; /* Once value */
2831 static val_t once_value_10; /* Once value */
2832 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2833 fra.me.file = LOCATE_string;
2834 fra.me.line = 553;
2835 fra.me.meth = LOCATE_string___Map___map_join;
2836 fra.me.has_broke = 0;
2837 fra.me.REG_size = 9;
2838 fra.me.REG[0] = NIT_NULL;
2839 fra.me.REG[1] = NIT_NULL;
2840 fra.me.REG[2] = NIT_NULL;
2841 fra.me.REG[3] = NIT_NULL;
2842 fra.me.REG[4] = NIT_NULL;
2843 fra.me.REG[5] = NIT_NULL;
2844 fra.me.REG[6] = NIT_NULL;
2845 fra.me.REG[7] = NIT_NULL;
2846 fra.me.REG[8] = NIT_NULL;
2847 fra.me.REG[0] = p0;
2848 fra.me.REG[1] = p1;
2849 fra.me.REG[2] = p2;
2850 /* ./../lib/standard//string.nit:556 */
2851 REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]);
2852 if (UNTAG_Bool(REGB0)) {
2853 if (!once_value_1) {
2854 fra.me.REG[3] = BOX_NativeString("");
2855 REGB0 = TAG_Int(0);
2856 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
2857 once_value_1 = fra.me.REG[3];
2858 register_static_object(&once_value_1);
2859 } else fra.me.REG[3] = once_value_1;
2860 fra.me.REG[3] = fra.me.REG[3];
2861 goto label2;
2862 }
2863 /* ./../lib/standard//string.nit:558 */
2864 fra.me.REG[4] = NEW_Buffer_string___Buffer___init();
2865 /* ./../lib/standard//string.nit:561 */
2866 fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]);
2867 /* ./../lib/standard//string.nit:562 */
2868 fra.me.REG[5] = CALL_abstract_collection___MapIterator___key(fra.me.REG[0])(fra.me.REG[0]);
2869 /* ./../lib/standard//string.nit:563 */
2870 fra.me.REG[6] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]);
2871 /* ./../lib/standard//string.nit:564 */
2872 REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
2873 if (UNTAG_Bool(REGB0)) {
2874 } else {
2875 REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
2876 if (UNTAG_Bool(REGB1)) {
2877 REGB1 = TAG_Bool(false);
2878 REGB0 = REGB1;
2879 } else {
2880 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], NIT_NULL);
2881 REGB0 = REGB1;
2882 }
2883 }
2884 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
2885 if (UNTAG_Bool(REGB0)) {
2886 REGB0 = TAG_Int(7);
2887 fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
2888 if (!once_value_3) {
2889 fra.me.REG[8] = BOX_NativeString("");
2890 REGB0 = TAG_Int(0);
2891 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
2892 once_value_3 = fra.me.REG[8];
2893 register_static_object(&once_value_3);
2894 } else fra.me.REG[8] = once_value_3;
2895 fra.me.REG[8] = fra.me.REG[8];
2896 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
2897 fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
2898 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
2899 if (!once_value_4) {
2900 fra.me.REG[8] = BOX_NativeString("");
2901 REGB0 = TAG_Int(0);
2902 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
2903 once_value_4 = fra.me.REG[8];
2904 register_static_object(&once_value_4);
2905 } else fra.me.REG[8] = once_value_4;
2906 fra.me.REG[8] = fra.me.REG[8];
2907 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
2908 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]);
2909 if (!once_value_5) {
2910 fra.me.REG[8] = BOX_NativeString("");
2911 REGB0 = TAG_Int(0);
2912 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
2913 once_value_5 = fra.me.REG[8];
2914 register_static_object(&once_value_5);
2915 } else fra.me.REG[8] = once_value_5;
2916 fra.me.REG[8] = fra.me.REG[8];
2917 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
2918 fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
2919 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
2920 if (!once_value_6) {
2921 fra.me.REG[8] = BOX_NativeString("");
2922 REGB0 = TAG_Int(0);
2923 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
2924 once_value_6 = fra.me.REG[8];
2925 register_static_object(&once_value_6);
2926 } else fra.me.REG[8] = once_value_6;
2927 fra.me.REG[8] = fra.me.REG[8];
2928 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
2929 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
2930 CALL_abstract_collection___Sequence___append(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[7]);
2931 }
2932 /* ./../lib/standard//string.nit:567 */
2933 CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
2934 /* ./../lib/standard//string.nit:568 */
2935 while(1) {
2936 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]);
2937 if (UNTAG_Bool(REGB0)) {
2938 /* ./../lib/standard//string.nit:569 */
2939 CALL_abstract_collection___Sequence___append(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
2940 /* ./../lib/standard//string.nit:570 */
2941 fra.me.REG[7] = CALL_abstract_collection___MapIterator___key(fra.me.REG[0])(fra.me.REG[0]);
2942 fra.me.REG[5] = fra.me.REG[7];
2943 /* ./../lib/standard//string.nit:571 */
2944 fra.me.REG[7] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]);
2945 fra.me.REG[6] = fra.me.REG[7];
2946 /* ./../lib/standard//string.nit:572 */
2947 REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
2948 if (UNTAG_Bool(REGB0)) {
2949 } else {
2950 REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
2951 if (UNTAG_Bool(REGB1)) {
2952 REGB1 = TAG_Bool(false);
2953 REGB0 = REGB1;
2954 } else {
2955 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], NIT_NULL);
2956 REGB0 = REGB1;
2957 }
2958 }
2959 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
2960 if (UNTAG_Bool(REGB0)) {
2961 REGB0 = TAG_Int(7);
2962 fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
2963 if (!once_value_7) {
2964 fra.me.REG[8] = BOX_NativeString("");
2965 REGB0 = TAG_Int(0);
2966 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
2967 once_value_7 = fra.me.REG[8];
2968 register_static_object(&once_value_7);
2969 } else fra.me.REG[8] = once_value_7;
2970 fra.me.REG[8] = fra.me.REG[8];
2971 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
2972 fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
2973 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
2974 if (!once_value_8) {
2975 fra.me.REG[8] = BOX_NativeString("");
2976 REGB0 = TAG_Int(0);
2977 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
2978 once_value_8 = fra.me.REG[8];
2979 register_static_object(&once_value_8);
2980 } else fra.me.REG[8] = once_value_8;
2981 fra.me.REG[8] = fra.me.REG[8];
2982 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
2983 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]);
2984 if (!once_value_9) {
2985 fra.me.REG[8] = BOX_NativeString("");
2986 REGB0 = TAG_Int(0);
2987 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
2988 once_value_9 = fra.me.REG[8];
2989 register_static_object(&once_value_9);
2990 } else fra.me.REG[8] = once_value_9;
2991 fra.me.REG[8] = fra.me.REG[8];
2992 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
2993 fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
2994 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
2995 if (!once_value_10) {
2996 fra.me.REG[8] = BOX_NativeString("");
2997 REGB0 = TAG_Int(0);
2998 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
2999 once_value_10 = fra.me.REG[8];
3000 register_static_object(&once_value_10);
3001 } else fra.me.REG[8] = once_value_10;
3002 fra.me.REG[8] = fra.me.REG[8];
3003 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
3004 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
3005 CALL_abstract_collection___Sequence___append(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[7]);
3006 }
3007 /* ./../lib/standard//string.nit:573 */
3008 CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
3009 } else {
3010 /* ./../lib/standard//string.nit:568 */
3011 goto label11;
3012 }
3013 }
3014 label11: while(0);
3015 /* ./../lib/standard//string.nit:575 */
3016 fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
3017 fra.me.REG[3] = fra.me.REG[4];
3018 goto label2;
3019 label2: while(0);
3020 stack_frame_head = fra.me.prev;
3021 return fra.me.REG[3];
3022 }
3023 val_t string___NativeString_____bra(val_t p0, val_t p1){
3024 struct {struct stack_frame_t me;} fra;
3025 val_t REGB0;
3026 val_t tmp;
3027 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3028 fra.me.file = LOCATE_string;
3029 fra.me.line = 585;
3030 fra.me.meth = LOCATE_string___NativeString_____bra;
3031 fra.me.has_broke = 0;
3032 fra.me.REG_size = 1;
3033 fra.me.REG[0] = NIT_NULL;
3034 fra.me.REG[0] = p0;
3035 REGB0 = p1;
3036 /* ./../lib/standard//string.nit:585 */
3037 REGB0 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]);
3038 stack_frame_head = fra.me.prev;
3039 return REGB0;
3040 }
3041 void string___NativeString_____braeq(val_t p0, val_t p1, val_t p2){
3042 struct {struct stack_frame_t me;} fra;
3043 val_t REGB0;
3044 val_t REGB1;
3045 val_t tmp;
3046 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3047 fra.me.file = LOCATE_string;
3048 fra.me.line = 586;
3049 fra.me.meth = LOCATE_string___NativeString_____braeq;
3050 fra.me.has_broke = 0;
3051 fra.me.REG_size = 1;
3052 fra.me.REG[0] = NIT_NULL;
3053 fra.me.REG[0] = p0;
3054 REGB0 = p1;
3055 REGB1 = p2;
3056 /* ./../lib/standard//string.nit:586 */
3057 UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB1);;
3058 stack_frame_head = fra.me.prev;
3059 return;
3060 }
3061 void string___NativeString___copy_to(val_t p0, val_t p1, val_t p2, val_t p3, val_t p4){
3062 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
3063 val_t REGB0;
3064 val_t REGB1;
3065 val_t REGB2;
3066 val_t tmp;
3067 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3068 fra.me.file = LOCATE_string;
3069 fra.me.line = 587;
3070 fra.me.meth = LOCATE_string___NativeString___copy_to;
3071 fra.me.has_broke = 0;
3072 fra.me.REG_size = 2;
3073 fra.me.REG[0] = NIT_NULL;
3074 fra.me.REG[1] = NIT_NULL;
3075 fra.me.REG[0] = p0;
3076 fra.me.REG[1] = p1;
3077 REGB0 = p2;
3078 REGB1 = p3;
3079 REGB2 = p4;
3080 /* ./../lib/standard//string.nit:587 */
3081 (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[0])+UNTAG_Int(REGB1), UNTAG_Int(REGB0));;
3082 stack_frame_head = fra.me.prev;
3083 return;
3084 }
3085 val_t string___NativeString___cstring_length(val_t p0){
3086 struct {struct stack_frame_t me;} fra;
3087 val_t REGB0;
3088 val_t REGB1;
3089 val_t REGB2;
3090 val_t REGB3;
3091 val_t tmp;
3092 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3093 fra.me.file = LOCATE_string;
3094 fra.me.line = 589;
3095 fra.me.meth = LOCATE_string___NativeString___cstring_length;
3096 fra.me.has_broke = 0;
3097 fra.me.REG_size = 1;
3098 fra.me.REG[0] = NIT_NULL;
3099 fra.me.REG[0] = p0;
3100 /* ./../lib/standard//string.nit:592 */
3101 REGB0 = TAG_Int(0);
3102 /* ./../lib/standard//string.nit:593 */
3103 while(1) {
3104 /* ./../lib/standard//string.nit:585 */
3105 REGB1 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]);
3106 /* ./../lib/standard//string.nit:593 */
3107 REGB2 = TAG_Char('\0');
3108 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB2));
3109 if (UNTAG_Bool(REGB3)) {
3110 } else {
3111 /* ./../lib/standard//kernel.nit:347 */
3112 REGB2 = TAG_Bool((REGB1)==(REGB2));
3113 /* ./../lib/standard//string.nit:593 */
3114 REGB3 = REGB2;
3115 }
3116 REGB3 = TAG_Bool(!UNTAG_Bool(REGB3));
3117 if (UNTAG_Bool(REGB3)) {
3118 REGB3 = TAG_Int(1);
3119 /* ./../lib/standard//kernel.nit:215 */
3120 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
3121 /* ./../lib/standard//string.nit:593 */
3122 REGB0 = REGB3;
3123 } else {
3124 goto label1;
3125 }
3126 }
3127 label1: while(0);
3128 /* ./../lib/standard//string.nit:594 */
3129 goto label2;
3130 label2: while(0);
3131 stack_frame_head = fra.me.prev;
3132 return REGB0;
3133 }
3134 val_t string___NativeString___atoi(val_t p0){
3135 struct {struct stack_frame_t me;} fra;
3136 val_t REGB0;
3137 val_t tmp;
3138 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3139 fra.me.file = LOCATE_string;
3140 fra.me.line = 596;
3141 fra.me.meth = LOCATE_string___NativeString___atoi;
3142 fra.me.has_broke = 0;
3143 fra.me.REG_size = 1;
3144 fra.me.REG[0] = NIT_NULL;
3145 fra.me.REG[0] = p0;
3146 /* ./../lib/standard//string.nit:596 */
3147 REGB0 = TAG_Int(atoi(UNBOX_NativeString(fra.me.REG[0])));
3148 stack_frame_head = fra.me.prev;
3149 return REGB0;
3150 }
3151 void string___NativeString___init(val_t p0, int* init_table){
3152 int itpos5 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_NativeString].i;
3153 struct {struct stack_frame_t me;} fra;
3154 val_t tmp;
3155 if (init_table[itpos5]) return;
3156 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3157 fra.me.file = LOCATE_string;
3158 fra.me.line = 0;
3159 fra.me.meth = LOCATE_string___NativeString___init;
3160 fra.me.has_broke = 0;
3161 fra.me.REG_size = 0;
3162 stack_frame_head = fra.me.prev;
3163 init_table[itpos5] = 1;
3164 return;
3165 }
3166 val_t string___StringCapable___calloc_string(val_t p0, val_t p1){
3167 struct {struct stack_frame_t me;} fra;
3168 val_t REGB0;
3169 val_t tmp;
3170 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3171 fra.me.file = LOCATE_string;
3172 fra.me.line = 601;
3173 fra.me.meth = LOCATE_string___StringCapable___calloc_string;
3174 fra.me.has_broke = 0;
3175 fra.me.REG_size = 1;
3176 fra.me.REG[0] = NIT_NULL;
3177 fra.me.REG[0] = p0;
3178 REGB0 = p1;
3179 /* ./../lib/standard//string.nit:601 */
3180 fra.me.REG[0] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB0) * sizeof(char))));
3181 stack_frame_head = fra.me.prev;
3182 return fra.me.REG[0];
3183 }
3184 void string___StringCapable___init(val_t p0, int* init_table){
3185 int itpos6 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_StringCapable].i;
3186 struct {struct stack_frame_t me;} fra;
3187 val_t tmp;
3188 if (init_table[itpos6]) return;
3189 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3190 fra.me.file = LOCATE_string;
3191 fra.me.line = 0;
3192 fra.me.meth = LOCATE_string___StringCapable___init;
3193 fra.me.has_broke = 0;
3194 fra.me.REG_size = 0;
3195 stack_frame_head = fra.me.prev;
3196 init_table[itpos6] = 1;
3197 return;
3198 }
3199 val_t string___Sys___args(val_t p0){
3200 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
3201 val_t REGB0;
3202 val_t REGB1;
3203 val_t tmp;
3204 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3205 fra.me.file = LOCATE_string;
3206 fra.me.line = 607;
3207 fra.me.meth = LOCATE_string___Sys___args;
3208 fra.me.has_broke = 0;
3209 fra.me.REG_size = 2;
3210 fra.me.REG[0] = NIT_NULL;
3211 fra.me.REG[1] = NIT_NULL;
3212 fra.me.REG[0] = p0;
3213 /* ./../lib/standard//string.nit:609 */
3214 fra.me.REG[1] = ATTR_string___Sys____args_cache(fra.me.REG[0]);
3215 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
3216 if (UNTAG_Bool(REGB0)) {
3217 } else {
3218 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
3219 if (UNTAG_Bool(REGB1)) {
3220 REGB1 = TAG_Bool(false);
3221 REGB0 = REGB1;
3222 } else {
3223 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
3224 REGB0 = REGB1;
3225 }
3226 }
3227 if (UNTAG_Bool(REGB0)) {
3228 CALL_string___Sys___init_args(fra.me.REG[0])(fra.me.REG[0]);
3229 }
3230 /* ./../lib/standard//string.nit:610 */
3231 fra.me.REG[0] = ATTR_string___Sys____args_cache(fra.me.REG[0]);
3232 REGB0 = TAG_Bool(fra.me.REG[0]!=NIT_NULL);
3233 if (UNTAG_Bool(REGB0)) {
3234 } else {
3235 nit_abort("Cast failed", NULL, LOCATE_string, 610);
3236 }
3237 goto label1;
3238 label1: while(0);
3239 stack_frame_head = fra.me.prev;
3240 return fra.me.REG[0];
3241 }
3242 val_t string___Sys___program_name(val_t p0){
3243 struct {struct stack_frame_t me;} fra;
3244 val_t REGB0;
3245 val_t tmp;
3246 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3247 fra.me.file = LOCATE_string;
3248 fra.me.line = 613;
3249 fra.me.meth = LOCATE_string___Sys___program_name;
3250 fra.me.has_broke = 0;
3251 fra.me.REG_size = 1;
3252 fra.me.REG[0] = NIT_NULL;
3253 fra.me.REG[0] = p0;
3254 /* ./../lib/standard//string.nit:616 */
3255 REGB0 = TAG_Int(0);
3256 fra.me.REG[0] = CALL_string___Sys___native_argv(fra.me.REG[0])(fra.me.REG[0], REGB0);
3257 fra.me.REG[0] = NEW_String_string___String___from_cstring(fra.me.REG[0]);
3258 goto label1;
3259 label1: while(0);
3260 stack_frame_head = fra.me.prev;
3261 return fra.me.REG[0];
3262 }
3263 void string___Sys___init_args(val_t p0){
3264 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
3265 val_t REGB0;
3266 val_t REGB1;
3267 val_t REGB2;
3268 val_t tmp;
3269 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3270 fra.me.file = LOCATE_string;
3271 fra.me.line = 619;
3272 fra.me.meth = LOCATE_string___Sys___init_args;
3273 fra.me.has_broke = 0;
3274 fra.me.REG_size = 3;
3275 fra.me.REG[0] = NIT_NULL;
3276 fra.me.REG[1] = NIT_NULL;
3277 fra.me.REG[2] = NIT_NULL;
3278 fra.me.REG[0] = p0;
3279 /* ./../lib/standard//string.nit:622 */
3280 REGB0 = CALL_string___Sys___native_argc(fra.me.REG[0])(fra.me.REG[0]);
3281 /* ./../lib/standard//string.nit:623 */
3282 REGB1 = TAG_Int(0);
3283 fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB1);
3284 /* ./../lib/standard//string.nit:624 */
3285 REGB1 = TAG_Int(1);
3286 /* ./../lib/standard//string.nit:625 */
3287 while(1) {
3288 /* ./../lib/standard//kernel.nit:212 */
3289 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB0));
3290 /* ./../lib/standard//string.nit:625 */
3291 if (UNTAG_Bool(REGB2)) {
3292 /* ./../lib/standard//string.nit:626 */
3293 REGB2 = TAG_Int(1);
3294 /* ./../lib/standard//kernel.nit:217 */
3295 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
3296 /* ./../lib/standard//string.nit:626 */
3297 fra.me.REG[2] = CALL_string___Sys___native_argv(fra.me.REG[0])(fra.me.REG[0], REGB1);
3298 fra.me.REG[2] = NEW_String_string___String___from_cstring(fra.me.REG[2]);
3299 CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB2, fra.me.REG[2]);
3300 /* ./../lib/standard//string.nit:627 */
3301 REGB2 = TAG_Int(1);
3302 /* ./../lib/standard//kernel.nit:215 */
3303 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
3304 /* ./../lib/standard//string.nit:627 */
3305 REGB1 = REGB2;
3306 } else {
3307 /* ./../lib/standard//string.nit:625 */
3308 goto label1;
3309 }
3310 }
3311 label1: while(0);
3312 /* ./../lib/standard//string.nit:629 */
3313 ATTR_string___Sys____args_cache(fra.me.REG[0]) = fra.me.REG[1];
3314 stack_frame_head = fra.me.prev;
3315 return;
3316 }
3317 val_t string___Sys___native_argc(val_t p0){
3318 struct {struct stack_frame_t me;} fra;
3319 val_t REGB0;
3320 val_t tmp;
3321 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3322 fra.me.file = LOCATE_string;
3323 fra.me.line = 632;
3324 fra.me.meth = LOCATE_string___Sys___native_argc;
3325 fra.me.has_broke = 0;
3326 fra.me.REG_size = 1;
3327 fra.me.REG[0] = NIT_NULL;
3328 fra.me.REG[0] = p0;
3329 /* ./../lib/standard//string.nit:632 */
3330 REGB0 = TAG_Int(kernel_Sys_Sys_native_argc_0(fra.me.REG[0]));
3331 stack_frame_head = fra.me.prev;
3332 return REGB0;
3333 }
3334 val_t string___Sys___native_argv(val_t p0, val_t p1){
3335 struct {struct stack_frame_t me;} fra;
3336 val_t REGB0;
3337 val_t tmp;
3338 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3339 fra.me.file = LOCATE_string;
3340 fra.me.line = 634;
3341 fra.me.meth = LOCATE_string___Sys___native_argv;
3342 fra.me.has_broke = 0;
3343 fra.me.REG_size = 1;
3344 fra.me.REG[0] = NIT_NULL;
3345 fra.me.REG[0] = p0;
3346 REGB0 = p1;
3347 /* ./../lib/standard//string.nit:634 */
3348 fra.me.REG[0] = BOX_NativeString(kernel_Sys_Sys_native_argv_1(fra.me.REG[0], UNTAG_Int(REGB0)));
3349 stack_frame_head = fra.me.prev;
3350 return fra.me.REG[0];
3351 }