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