315d61d151a9fcab1b37c1ef53a0bf701d0cb831
[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 static const char LOCATE_standard___string___AbstractString___items[] = "string::AbstractString::items";
4 val_t standard___string___AbstractString___items(val_t p0){
5 struct {struct stack_frame_t me;} fra;
6 val_t REGB0;
7 val_t tmp;
8 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
9 fra.me.file = LOCATE_standard___string;
10 fra.me.line = 28;
11 fra.me.meth = LOCATE_standard___string___AbstractString___items;
12 fra.me.has_broke = 0;
13 fra.me.REG_size = 1;
14 fra.me.nitni_local_ref_head = NULL;
15 fra.me.REG[0] = NIT_NULL;
16 fra.me.REG[0] = p0;
17 /* ../lib/standard/string.nit:28 */
18 REGB0 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
19 if (UNTAG_Bool(REGB0)) {
20 } else {
21 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 28);
22 }
23 fra.me.REG[0] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
24 stack_frame_head = fra.me.prev;
25 return fra.me.REG[0];
26 }
27 static const char LOCATE_standard___string___AbstractString_____bra[] = "string::AbstractString::(abstract_collection::SequenceRead::[])";
28 val_t standard___string___AbstractString_____bra(val_t p0, val_t p1){
29 struct {struct stack_frame_t me;} fra;
30 val_t REGB0;
31 val_t REGB1;
32 val_t tmp;
33 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
34 fra.me.file = LOCATE_standard___string;
35 fra.me.line = 30;
36 fra.me.meth = LOCATE_standard___string___AbstractString_____bra;
37 fra.me.has_broke = 0;
38 fra.me.REG_size = 1;
39 fra.me.nitni_local_ref_head = NULL;
40 fra.me.REG[0] = NIT_NULL;
41 fra.me.REG[0] = p0;
42 REGB0 = p1;
43 /* ../lib/standard/string.nit:30 */
44 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
45 if (UNTAG_Bool(REGB1)) {
46 } else {
47 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 30);
48 }
49 fra.me.REG[0] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
50 /* ../lib/standard/string.nit:955 */
51 REGB0 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]);
52 /* ../lib/standard/string.nit:30 */
53 goto label1;
54 label1: while(0);
55 stack_frame_head = fra.me.prev;
56 return REGB0;
57 }
58 static const char LOCATE_standard___string___AbstractString___substring[] = "string::AbstractString::substring";
59 val_t standard___string___AbstractString___substring(val_t p0, val_t p1, val_t p2){
60 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
61 val_t REGB0;
62 val_t REGB1;
63 val_t REGB2;
64 val_t REGB3;
65 val_t tmp;
66 static val_t once_value_3; /* Once value */
67 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
68 fra.me.file = LOCATE_standard___string;
69 fra.me.line = 32;
70 fra.me.meth = LOCATE_standard___string___AbstractString___substring;
71 fra.me.has_broke = 0;
72 fra.me.REG_size = 3;
73 fra.me.nitni_local_ref_head = NULL;
74 fra.me.REG[0] = NIT_NULL;
75 fra.me.REG[1] = NIT_NULL;
76 fra.me.REG[2] = NIT_NULL;
77 fra.me.REG[0] = p0;
78 REGB0 = p1;
79 REGB1 = p2;
80 /* ../lib/standard/string.nit:40 */
81 REGB2 = TAG_Int(0);
82 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
83 if (UNTAG_Bool(REGB3)) {
84 } else {
85 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
86 }
87 /* ../lib/standard/kernel.nit:236 */
88 REGB2 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB2));
89 /* ../lib/standard/string.nit:40 */
90 if (UNTAG_Bool(REGB2)) {
91 } else {
92 nit_abort("Assert failed", NULL, LOCATE_standard___string, 40);
93 }
94 /* ../lib/standard/kernel.nit:238 */
95 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
96 /* ../lib/standard/string.nit:41 */
97 REGB1 = REGB2;
98 /* ../lib/standard/string.nit:42 */
99 REGB2 = TAG_Int(0);
100 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
101 if (UNTAG_Bool(REGB3)) {
102 } else {
103 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
104 }
105 /* ../lib/standard/kernel.nit:235 */
106 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
107 /* ../lib/standard/string.nit:42 */
108 if (UNTAG_Bool(REGB2)) {
109 REGB2 = TAG_Int(0);
110 REGB0 = REGB2;
111 }
112 /* ../lib/standard/collection/array.nit:24 */
113 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
114 if (UNTAG_Bool(REGB2)) {
115 } else {
116 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
117 }
118 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
119 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
120 if (UNTAG_Bool(REGB3)) {
121 } else {
122 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
123 }
124 /* ../lib/standard/kernel.nit:237 */
125 REGB2 = TAG_Bool(UNTAG_Int(REGB1)>UNTAG_Int(REGB2));
126 /* ../lib/standard/string.nit:43 */
127 if (UNTAG_Bool(REGB2)) {
128 /* ../lib/standard/collection/array.nit:24 */
129 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
130 if (UNTAG_Bool(REGB2)) {
131 } else {
132 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
133 }
134 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
135 /* ../lib/standard/string.nit:43 */
136 REGB1 = REGB2;
137 }
138 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
139 if (UNTAG_Bool(REGB2)) {
140 } else {
141 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
142 }
143 /* ../lib/standard/kernel.nit:235 */
144 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
145 /* ../lib/standard/string.nit:44 */
146 if (UNTAG_Bool(REGB2)) {
147 /* ../lib/standard/kernel.nit:240 */
148 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
149 /* ../lib/standard/string.nit:45 */
150 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB2);
151 /* ../lib/standard/string.nit:46 */
152 while(1) {
153 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
154 if (UNTAG_Bool(REGB2)) {
155 } else {
156 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
157 }
158 /* ../lib/standard/kernel.nit:235 */
159 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
160 /* ../lib/standard/string.nit:46 */
161 if (UNTAG_Bool(REGB2)) {
162 /* ../lib/standard/string.nit:47 */
163 REGB2 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
164 if (UNTAG_Bool(REGB2)) {
165 } else {
166 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 47);
167 }
168 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
169 /* ../lib/standard/string.nit:955 */
170 REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
171 /* ../lib/standard/string.nit:47 */
172 CALL_standard___collection___abstract_collection___Sequence___push(fra.me.REG[1])(fra.me.REG[1], REGB2);
173 /* ../lib/standard/string.nit:48 */
174 REGB2 = TAG_Int(1);
175 /* ../lib/standard/kernel.nit:238 */
176 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
177 /* ../lib/standard/string.nit:48 */
178 REGB0 = REGB2;
179 } else {
180 /* ../lib/standard/string.nit:46 */
181 goto label1;
182 }
183 }
184 label1: while(0);
185 /* ../lib/standard/string.nit:50 */
186 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
187 goto label2;
188 } else {
189 /* ../lib/standard/string.nit:52 */
190 if (!once_value_3) {
191 fra.me.REG[0] = BOX_NativeString("");
192 REGB0 = TAG_Int(0);
193 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
194 once_value_3 = fra.me.REG[0];
195 register_static_object(&once_value_3);
196 } else fra.me.REG[0] = once_value_3;
197 fra.me.REG[0] = fra.me.REG[0];
198 fra.me.REG[1] = fra.me.REG[0];
199 goto label2;
200 }
201 label2: while(0);
202 stack_frame_head = fra.me.prev;
203 return fra.me.REG[1];
204 }
205 static const char LOCATE_standard___string___AbstractString___substring_from[] = "string::AbstractString::substring_from";
206 val_t standard___string___AbstractString___substring_from(val_t p0, val_t p1){
207 struct {struct stack_frame_t me;} fra;
208 val_t REGB0;
209 val_t REGB1;
210 val_t REGB2;
211 val_t tmp;
212 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
213 fra.me.file = LOCATE_standard___string;
214 fra.me.line = 56;
215 fra.me.meth = LOCATE_standard___string___AbstractString___substring_from;
216 fra.me.has_broke = 0;
217 fra.me.REG_size = 1;
218 fra.me.nitni_local_ref_head = NULL;
219 fra.me.REG[0] = NIT_NULL;
220 fra.me.REG[0] = p0;
221 REGB0 = p1;
222 /* ../lib/standard/collection/array.nit:24 */
223 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
224 if (UNTAG_Bool(REGB1)) {
225 } else {
226 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
227 }
228 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
229 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
230 if (UNTAG_Bool(REGB2)) {
231 } else {
232 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
233 }
234 /* ../lib/standard/kernel.nit:235 */
235 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
236 /* ../lib/standard/string.nit:63 */
237 if (UNTAG_Bool(REGB1)) {
238 } else {
239 nit_abort("Assert failed", NULL, LOCATE_standard___string, 63);
240 }
241 /* ../lib/standard/collection/array.nit:24 */
242 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
243 if (UNTAG_Bool(REGB1)) {
244 } else {
245 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
246 }
247 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
248 /* ../lib/standard/kernel.nit:240 */
249 REGB1 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
250 /* ../lib/standard/string.nit:64 */
251 fra.me.REG[0] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB1);
252 goto label1;
253 label1: while(0);
254 stack_frame_head = fra.me.prev;
255 return fra.me.REG[0];
256 }
257 static const char LOCATE_standard___string___AbstractString___has_substring[] = "string::AbstractString::has_substring";
258 val_t standard___string___AbstractString___has_substring(val_t p0, val_t p1, val_t p2){
259 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
260 val_t REGB0;
261 val_t REGB1;
262 val_t REGB2;
263 val_t REGB3;
264 val_t REGB4;
265 val_t REGB5;
266 val_t REGB6;
267 val_t tmp;
268 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
269 fra.me.file = LOCATE_standard___string;
270 fra.me.line = 67;
271 fra.me.meth = LOCATE_standard___string___AbstractString___has_substring;
272 fra.me.has_broke = 0;
273 fra.me.REG_size = 4;
274 fra.me.nitni_local_ref_head = NULL;
275 fra.me.REG[0] = NIT_NULL;
276 fra.me.REG[1] = NIT_NULL;
277 fra.me.REG[2] = NIT_NULL;
278 fra.me.REG[3] = NIT_NULL;
279 fra.me.REG[0] = p0;
280 fra.me.REG[1] = p1;
281 REGB0 = p2;
282 /* ../lib/standard/collection/array.nit:24 */
283 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
284 if (UNTAG_Bool(REGB1)) {
285 } else {
286 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
287 }
288 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
289 /* ../lib/standard/string.nit:73 */
290 REGB2 = TAG_Int(1);
291 /* ../lib/standard/kernel.nit:240 */
292 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
293 /* ../lib/standard/kernel.nit:238 */
294 REGB0 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
295 /* ../lib/standard/string.nit:75 */
296 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
297 if (UNTAG_Bool(REGB1)) {
298 } else {
299 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 75);
300 }
301 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
302 /* ../lib/standard/string.nit:76 */
303 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
304 if (UNTAG_Bool(REGB1)) {
305 } else {
306 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 76);
307 }
308 fra.me.REG[3] = ATTR_standard___string___AbstractString____items(fra.me.REG[1]);
309 /* ../lib/standard/collection/array.nit:24 */
310 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
311 if (UNTAG_Bool(REGB1)) {
312 } else {
313 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
314 }
315 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
316 REGB3 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
317 if (UNTAG_Bool(REGB3)) {
318 } else {
319 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
320 }
321 /* ../lib/standard/kernel.nit:237 */
322 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
323 /* ../lib/standard/string.nit:77 */
324 if (UNTAG_Bool(REGB1)) {
325 REGB1 = TAG_Bool(1);
326 } else {
327 REGB3 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
328 if (UNTAG_Bool(REGB3)) {
329 } else {
330 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
331 }
332 /* ../lib/standard/kernel.nit:237 */
333 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB0));
334 /* ../lib/standard/string.nit:77 */
335 REGB1 = REGB3;
336 }
337 if (UNTAG_Bool(REGB1)) {
338 REGB1 = TAG_Bool(0);
339 goto label1;
340 }
341 /* ../lib/standard/string.nit:78 */
342 REGB3 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[1])!=NIT_NULL);
343 if (UNTAG_Bool(REGB3)) {
344 } else {
345 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 78);
346 }
347 REGB3 = ATTR_standard___string___String____index_from(fra.me.REG[1]);
348 /* ../lib/standard/kernel.nit:238 */
349 REGB4 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
350 /* ../lib/standard/string.nit:79 */
351 REGB2 = REGB4;
352 /* ../lib/standard/string.nit:80 */
353 while(1) {
354 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
355 if (UNTAG_Bool(REGB4)) {
356 } else {
357 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
358 }
359 /* ../lib/standard/kernel.nit:236 */
360 REGB4 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB3));
361 /* ../lib/standard/string.nit:80 */
362 if (UNTAG_Bool(REGB4)) {
363 /* ../lib/standard/string.nit:955 */
364 REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
365 REGB5 = TAG_Char(UNBOX_NativeString(fra.me.REG[3])[UNTAG_Int(REGB2)]);
366 /* ../lib/standard/string.nit:81 */
367 REGB6 = TAG_Bool(IS_EQUAL_OO(REGB4,REGB5));
368 if (UNTAG_Bool(REGB6)) {
369 } else {
370 /* ../lib/standard/kernel.nit:381 */
371 REGB5 = TAG_Bool((REGB4)==(REGB5));
372 /* ../lib/standard/string.nit:81 */
373 REGB6 = REGB5;
374 }
375 REGB6 = TAG_Bool(!UNTAG_Bool(REGB6));
376 if (UNTAG_Bool(REGB6)) {
377 REGB6 = TAG_Bool(0);
378 REGB1 = REGB6;
379 goto label1;
380 }
381 /* ../lib/standard/string.nit:82 */
382 REGB6 = TAG_Int(1);
383 /* ../lib/standard/kernel.nit:240 */
384 REGB6 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB6));
385 /* ../lib/standard/string.nit:82 */
386 REGB0 = REGB6;
387 /* ../lib/standard/string.nit:83 */
388 REGB6 = TAG_Int(1);
389 /* ../lib/standard/kernel.nit:240 */
390 REGB6 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB6));
391 /* ../lib/standard/string.nit:83 */
392 REGB2 = REGB6;
393 } else {
394 /* ../lib/standard/string.nit:80 */
395 goto label2;
396 }
397 }
398 label2: while(0);
399 /* ../lib/standard/string.nit:85 */
400 REGB2 = TAG_Bool(1);
401 REGB1 = REGB2;
402 goto label1;
403 label1: while(0);
404 stack_frame_head = fra.me.prev;
405 return REGB1;
406 }
407 static const char LOCATE_standard___string___AbstractString___has_prefix[] = "string::AbstractString::has_prefix";
408 val_t standard___string___AbstractString___has_prefix(val_t p0, val_t p1){
409 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
410 val_t REGB0;
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 = 88;
415 fra.me.meth = LOCATE_standard___string___AbstractString___has_prefix;
416 fra.me.has_broke = 0;
417 fra.me.REG_size = 2;
418 fra.me.nitni_local_ref_head = NULL;
419 fra.me.REG[0] = NIT_NULL;
420 fra.me.REG[1] = NIT_NULL;
421 fra.me.REG[0] = p0;
422 fra.me.REG[1] = p1;
423 /* ../lib/standard/string.nit:92 */
424 REGB0 = TAG_Int(0);
425 REGB0 = CALL_standard___string___AbstractString___has_substring(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0);
426 goto label1;
427 label1: while(0);
428 stack_frame_head = fra.me.prev;
429 return REGB0;
430 }
431 static const char LOCATE_standard___string___AbstractString___has_suffix[] = "string::AbstractString::has_suffix";
432 val_t standard___string___AbstractString___has_suffix(val_t p0, val_t p1){
433 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
434 val_t REGB0;
435 val_t REGB1;
436 val_t tmp;
437 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
438 fra.me.file = LOCATE_standard___string;
439 fra.me.line = 94;
440 fra.me.meth = LOCATE_standard___string___AbstractString___has_suffix;
441 fra.me.has_broke = 0;
442 fra.me.REG_size = 2;
443 fra.me.nitni_local_ref_head = NULL;
444 fra.me.REG[0] = NIT_NULL;
445 fra.me.REG[1] = NIT_NULL;
446 fra.me.REG[0] = p0;
447 fra.me.REG[1] = p1;
448 /* ../lib/standard/collection/array.nit:24 */
449 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
450 if (UNTAG_Bool(REGB0)) {
451 } else {
452 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
453 }
454 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
455 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
456 if (UNTAG_Bool(REGB1)) {
457 } else {
458 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
459 }
460 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
461 /* ../lib/standard/kernel.nit:240 */
462 REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1));
463 /* ../lib/standard/string.nit:98 */
464 REGB1 = CALL_standard___string___AbstractString___has_substring(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB1);
465 goto label1;
466 label1: while(0);
467 stack_frame_head = fra.me.prev;
468 return REGB1;
469 }
470 static const char LOCATE_standard___string___AbstractString___to_i[] = "string::AbstractString::to_i";
471 val_t standard___string___AbstractString___to_i(val_t p0){
472 struct {struct stack_frame_t me;} fra;
473 val_t REGB0;
474 val_t tmp;
475 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
476 fra.me.file = LOCATE_standard___string;
477 fra.me.line = 100;
478 fra.me.meth = LOCATE_standard___string___AbstractString___to_i;
479 fra.me.has_broke = 0;
480 fra.me.REG_size = 1;
481 fra.me.nitni_local_ref_head = NULL;
482 fra.me.REG[0] = NIT_NULL;
483 fra.me.REG[0] = p0;
484 /* ../lib/standard/string.nit:104 */
485 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
486 fra.me.REG[0] = CALL_standard___string___String___to_cstring(fra.me.REG[0])(fra.me.REG[0]);
487 /* ../lib/standard/string.nit:966 */
488 REGB0 = TAG_Int(atoi(UNBOX_NativeString(fra.me.REG[0])));
489 /* ../lib/standard/string.nit:104 */
490 goto label1;
491 label1: while(0);
492 stack_frame_head = fra.me.prev;
493 return REGB0;
494 }
495 static const char LOCATE_standard___string___AbstractString___to_f[] = "string::AbstractString::to_f";
496 val_t standard___string___AbstractString___to_f(val_t p0){
497 struct {struct stack_frame_t me;} fra;
498 val_t tmp;
499 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
500 fra.me.file = LOCATE_standard___string;
501 fra.me.line = 107;
502 fra.me.meth = LOCATE_standard___string___AbstractString___to_f;
503 fra.me.has_broke = 0;
504 fra.me.REG_size = 1;
505 fra.me.nitni_local_ref_head = NULL;
506 fra.me.REG[0] = NIT_NULL;
507 fra.me.REG[0] = p0;
508 /* ../lib/standard/string.nit:111 */
509 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
510 fra.me.REG[0] = CALL_standard___string___String___to_cstring(fra.me.REG[0])(fra.me.REG[0]);
511 fra.me.REG[0] = CALL_standard___string___NativeString___atof(fra.me.REG[0])(fra.me.REG[0]);
512 goto label1;
513 label1: while(0);
514 stack_frame_head = fra.me.prev;
515 return fra.me.REG[0];
516 }
517 static const char LOCATE_standard___string___AbstractString___to_hex[] = "string::AbstractString::to_hex";
518 val_t standard___string___AbstractString___to_hex(val_t p0){
519 struct {struct stack_frame_t me;} fra;
520 val_t REGB0;
521 val_t tmp;
522 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
523 fra.me.file = LOCATE_standard___string;
524 fra.me.line = 114;
525 fra.me.meth = LOCATE_standard___string___AbstractString___to_hex;
526 fra.me.has_broke = 0;
527 fra.me.REG_size = 1;
528 fra.me.nitni_local_ref_head = NULL;
529 fra.me.REG[0] = NIT_NULL;
530 fra.me.REG[0] = p0;
531 /* ../lib/standard/string.nit:115 */
532 REGB0 = TAG_Int(16);
533 REGB0 = CALL_standard___string___AbstractString___a_to(fra.me.REG[0])(fra.me.REG[0], REGB0);
534 goto label1;
535 label1: while(0);
536 stack_frame_head = fra.me.prev;
537 return REGB0;
538 }
539 static const char LOCATE_standard___string___AbstractString___a_to[] = "string::AbstractString::a_to";
540 val_t standard___string___AbstractString___a_to(val_t p0, val_t p1){
541 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
542 val_t REGB0;
543 val_t tmp;
544 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
545 fra.me.file = LOCATE_standard___string;
546 fra.me.line = 117;
547 fra.me.meth = LOCATE_standard___string___AbstractString___a_to;
548 fra.me.has_broke = 0;
549 fra.me.REG_size = 4;
550 fra.me.nitni_local_ref_head = NULL;
551 fra.me.REG[0] = NIT_NULL;
552 fra.me.REG[1] = NIT_NULL;
553 fra.me.REG[2] = NIT_NULL;
554 fra.me.REG[3] = NIT_NULL;
555 fra.me.REG[0] = p0;
556 REGB0 = p1;
557 /* ../lib/standard/string.nit:117 */
558 fra.me.REG[1] = REGB0;
559 /* ../lib/standard/string.nit:120 */
560 REGB0 = TAG_Int(0);
561 fra.me.REG[2] = REGB0;
562 /* ../lib/standard/string.nit:121 */
563 REGB0 = TAG_Bool(0);
564 fra.me.REG[3] = REGB0;
565 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));
566 switch ((&(fra.me))->has_broke) {
567 case 0: break;
568 case 1: (&(fra.me))->has_broke = 0; goto label3;
569 }
570 /* ../lib/standard/string.nit:138 */
571 if (UNTAG_Bool(fra.me.REG[3])) {
572 /* ../lib/standard/kernel.nit:239 */
573 REGB0 = TAG_Int(-UNTAG_Int(fra.me.REG[2]));
574 /* ../lib/standard/string.nit:139 */
575 fra.me.REG[0] = REGB0;
576 goto label3;
577 } else {
578 /* ../lib/standard/string.nit:141 */
579 fra.me.REG[0] = fra.me.REG[2];
580 goto label3;
581 }
582 label3: while(0);
583 stack_frame_head = fra.me.prev;
584 return fra.me.REG[0];
585 }
586 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){
587 struct {struct stack_frame_t me;} fra;
588 val_t REGB0;
589 val_t REGB1;
590 val_t REGB2;
591 fun_t CREG[1];
592 val_t tmp;
593 /* ../lib/standard/string.nit:123 */
594 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
595 fra.me.file = LOCATE_standard___string;
596 fra.me.line = 0;
597 fra.me.meth = LOCATE_standard___string___AbstractString___a_to;
598 fra.me.has_broke = 0;
599 fra.me.REG_size = 1;
600 fra.me.nitni_local_ref_head = NULL;
601 fra.me.REG[0] = NIT_NULL;
602 fra.me.closure_ctx = closctx_param;
603 fra.me.closure_funs = CREG;
604 fra.me.REG[0] = p0;
605 CREG[0] = clos_fun0;
606 REGB0 = fra.me.REG[0];
607 /* ../lib/standard/string.nit:125 */
608 REGB0 = CALL_standard___kernel___Char___to_i(REGB0)(REGB0);
609 REGB1 = TAG_Bool(VAL_ISA(closctx->REG[1], VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
610 if (UNTAG_Bool(REGB1)) {
611 } else {
612 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
613 }
614 /* ../lib/standard/kernel.nit:237 */
615 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(closctx->REG[1]));
616 /* ../lib/standard/string.nit:126 */
617 if (UNTAG_Bool(REGB1)) {
618 /* ../lib/standard/string.nit:127 */
619 if (UNTAG_Bool(closctx->REG[3])) {
620 /* ../lib/standard/kernel.nit:239 */
621 REGB1 = TAG_Int(-UNTAG_Int(closctx->REG[2]));
622 /* ../lib/standard/string.nit:128 */
623 closctx->REG[0] = REGB1;
624 closctx->has_broke = 1;
625 goto label2;
626 } else {
627 /* ../lib/standard/string.nit:130 */
628 closctx->REG[0] = closctx->REG[2];
629 closctx->has_broke = 1;
630 goto label2;
631 }
632 } else {
633 /* ../lib/standard/string.nit:132 */
634 REGB1 = TAG_Int(0);
635 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
636 if (UNTAG_Bool(REGB2)) {
637 } else {
638 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
639 }
640 /* ../lib/standard/kernel.nit:235 */
641 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
642 /* ../lib/standard/string.nit:132 */
643 if (UNTAG_Bool(REGB1)) {
644 /* ../lib/standard/string.nit:133 */
645 REGB1 = TAG_Bool(1);
646 closctx->REG[3] = REGB1;
647 } else {
648 /* ../lib/standard/kernel.nit:241 */
649 REGB1 = TAG_Int(UNTAG_Int(closctx->REG[2])*UNTAG_Int(closctx->REG[1]));
650 /* ../lib/standard/kernel.nit:238 */
651 REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
652 /* ../lib/standard/string.nit:135 */
653 closctx->REG[2] = REGB0;
654 }
655 }
656 label2: while(0);
657 stack_frame_head = fra.me.prev;
658 return;
659 }
660 static const char LOCATE_standard___string___AbstractString___is_numeric[] = "string::AbstractString::is_numeric";
661 val_t standard___string___AbstractString___is_numeric(val_t p0){
662 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
663 val_t REGB0;
664 val_t tmp;
665 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
666 fra.me.file = LOCATE_standard___string;
667 fra.me.line = 145;
668 fra.me.meth = LOCATE_standard___string___AbstractString___is_numeric;
669 fra.me.has_broke = 0;
670 fra.me.REG_size = 2;
671 fra.me.nitni_local_ref_head = NULL;
672 fra.me.REG[0] = NIT_NULL;
673 fra.me.REG[1] = NIT_NULL;
674 fra.me.REG[0] = p0;
675 /* ../lib/standard/string.nit:148 */
676 REGB0 = TAG_Bool(0);
677 fra.me.REG[1] = REGB0;
678 CALL_standard___collection___abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_standard___string___AbstractString___is_numeric_1));
679 switch ((&(fra.me))->has_broke) {
680 case 0: break;
681 case 1: (&(fra.me))->has_broke = 0; goto label3;
682 }
683 /* ../lib/standard/string.nit:161 */
684 REGB0 = TAG_Bool(1);
685 fra.me.REG[0] = REGB0;
686 goto label3;
687 label3: while(0);
688 stack_frame_head = fra.me.prev;
689 return fra.me.REG[0];
690 }
691 void OC_standard___string___AbstractString___is_numeric_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
692 struct {struct stack_frame_t me;} fra;
693 val_t REGB0;
694 val_t REGB1;
695 val_t REGB2;
696 val_t REGB3;
697 fun_t CREG[1];
698 val_t tmp;
699 /* ../lib/standard/string.nit:149 */
700 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
701 fra.me.file = LOCATE_standard___string;
702 fra.me.line = 0;
703 fra.me.meth = LOCATE_standard___string___AbstractString___is_numeric;
704 fra.me.has_broke = 0;
705 fra.me.REG_size = 1;
706 fra.me.nitni_local_ref_head = NULL;
707 fra.me.REG[0] = NIT_NULL;
708 fra.me.closure_ctx = closctx_param;
709 fra.me.closure_funs = CREG;
710 fra.me.REG[0] = p0;
711 CREG[0] = clos_fun0;
712 REGB0 = fra.me.REG[0];
713 /* ../lib/standard/string.nit:151 */
714 REGB1 = CALL_standard___string___Char___is_numeric(REGB0)(REGB0);
715 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
716 if (UNTAG_Bool(REGB1)) {
717 /* ../lib/standard/string.nit:153 */
718 REGB1 = TAG_Char('.');
719 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
720 if (UNTAG_Bool(REGB2)) {
721 } else {
722 /* ../lib/standard/kernel.nit:381 */
723 REGB1 = TAG_Bool((REGB0)==(REGB1));
724 /* ../lib/standard/string.nit:153 */
725 REGB2 = REGB1;
726 }
727 if (UNTAG_Bool(REGB2)) {
728 REGB2 = TAG_Bool(1);
729 } else {
730 REGB1 = TAG_Char(',');
731 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
732 if (UNTAG_Bool(REGB3)) {
733 } else {
734 /* ../lib/standard/kernel.nit:381 */
735 REGB1 = TAG_Bool((REGB0)==(REGB1));
736 /* ../lib/standard/string.nit:153 */
737 REGB3 = REGB1;
738 }
739 REGB2 = REGB3;
740 }
741 if (UNTAG_Bool(REGB2)) {
742 REGB2 = TAG_Bool(!UNTAG_Bool(closctx->REG[1]));
743 } else {
744 REGB3 = TAG_Bool(0);
745 REGB2 = REGB3;
746 }
747 if (UNTAG_Bool(REGB2)) {
748 /* ../lib/standard/string.nit:155 */
749 REGB2 = TAG_Bool(1);
750 closctx->REG[1] = REGB2;
751 } else {
752 /* ../lib/standard/string.nit:157 */
753 REGB2 = TAG_Bool(0);
754 closctx->REG[0] = REGB2;
755 closctx->has_broke = 1;
756 goto label2;
757 }
758 }
759 label2: while(0);
760 stack_frame_head = fra.me.prev;
761 return;
762 }
763 static const char LOCATE_standard___string___AbstractString___to_upper[] = "string::AbstractString::to_upper";
764 val_t standard___string___AbstractString___to_upper(val_t p0){
765 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
766 val_t REGB0;
767 val_t tmp;
768 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
769 fra.me.file = LOCATE_standard___string;
770 fra.me.line = 164;
771 fra.me.meth = LOCATE_standard___string___AbstractString___to_upper;
772 fra.me.has_broke = 0;
773 fra.me.REG_size = 2;
774 fra.me.nitni_local_ref_head = NULL;
775 fra.me.REG[0] = NIT_NULL;
776 fra.me.REG[1] = NIT_NULL;
777 fra.me.REG[0] = p0;
778 /* ../lib/standard/collection/array.nit:24 */
779 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
780 if (UNTAG_Bool(REGB0)) {
781 } else {
782 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
783 }
784 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
785 /* ../lib/standard/string.nit:167 */
786 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB0);
787 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));
788 /* ../lib/standard/string.nit:169 */
789 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
790 goto label2;
791 label2: while(0);
792 stack_frame_head = fra.me.prev;
793 return fra.me.REG[1];
794 }
795 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){
796 struct {struct stack_frame_t me;} fra;
797 val_t REGB0;
798 fun_t CREG[1];
799 val_t tmp;
800 /* ../lib/standard/string.nit:168 */
801 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
802 fra.me.file = LOCATE_standard___string;
803 fra.me.line = 0;
804 fra.me.meth = LOCATE_standard___string___AbstractString___to_upper;
805 fra.me.has_broke = 0;
806 fra.me.REG_size = 1;
807 fra.me.nitni_local_ref_head = NULL;
808 fra.me.REG[0] = NIT_NULL;
809 fra.me.closure_ctx = closctx_param;
810 fra.me.closure_funs = CREG;
811 fra.me.REG[0] = p0;
812 CREG[0] = clos_fun0;
813 REGB0 = fra.me.REG[0];
814 REGB0 = CALL_standard___kernel___Char___to_upper(REGB0)(REGB0);
815 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx->REG[1])(closctx->REG[1], REGB0);
816 stack_frame_head = fra.me.prev;
817 return;
818 }
819 static const char LOCATE_standard___string___AbstractString___to_lower[] = "string::AbstractString::to_lower";
820 val_t standard___string___AbstractString___to_lower(val_t p0){
821 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
822 val_t REGB0;
823 val_t tmp;
824 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
825 fra.me.file = LOCATE_standard___string;
826 fra.me.line = 172;
827 fra.me.meth = LOCATE_standard___string___AbstractString___to_lower;
828 fra.me.has_broke = 0;
829 fra.me.REG_size = 2;
830 fra.me.nitni_local_ref_head = NULL;
831 fra.me.REG[0] = NIT_NULL;
832 fra.me.REG[1] = NIT_NULL;
833 fra.me.REG[0] = p0;
834 /* ../lib/standard/collection/array.nit:24 */
835 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
836 if (UNTAG_Bool(REGB0)) {
837 } else {
838 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
839 }
840 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
841 /* ../lib/standard/string.nit:175 */
842 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB0);
843 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));
844 /* ../lib/standard/string.nit:177 */
845 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
846 goto label2;
847 label2: while(0);
848 stack_frame_head = fra.me.prev;
849 return fra.me.REG[1];
850 }
851 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){
852 struct {struct stack_frame_t me;} fra;
853 val_t REGB0;
854 fun_t CREG[1];
855 val_t tmp;
856 /* ../lib/standard/string.nit:176 */
857 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
858 fra.me.file = LOCATE_standard___string;
859 fra.me.line = 0;
860 fra.me.meth = LOCATE_standard___string___AbstractString___to_lower;
861 fra.me.has_broke = 0;
862 fra.me.REG_size = 1;
863 fra.me.nitni_local_ref_head = NULL;
864 fra.me.REG[0] = NIT_NULL;
865 fra.me.closure_ctx = closctx_param;
866 fra.me.closure_funs = CREG;
867 fra.me.REG[0] = p0;
868 CREG[0] = clos_fun0;
869 REGB0 = fra.me.REG[0];
870 REGB0 = CALL_standard___kernel___Char___to_lower(REGB0)(REGB0);
871 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx->REG[1])(closctx->REG[1], REGB0);
872 stack_frame_head = fra.me.prev;
873 return;
874 }
875 static const char LOCATE_standard___string___AbstractString___trim[] = "string::AbstractString::trim";
876 val_t standard___string___AbstractString___trim(val_t p0){
877 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
878 val_t REGB0;
879 val_t REGB1;
880 val_t REGB2;
881 val_t REGB3;
882 val_t REGB4;
883 val_t tmp;
884 static val_t once_value_2; /* Once value */
885 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
886 fra.me.file = LOCATE_standard___string;
887 fra.me.line = 180;
888 fra.me.meth = LOCATE_standard___string___AbstractString___trim;
889 fra.me.has_broke = 0;
890 fra.me.REG_size = 3;
891 fra.me.nitni_local_ref_head = NULL;
892 fra.me.REG[0] = NIT_NULL;
893 fra.me.REG[1] = NIT_NULL;
894 fra.me.REG[2] = NIT_NULL;
895 fra.me.REG[0] = p0;
896 /* ../lib/standard/string.nit:184 */
897 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
898 if (UNTAG_Bool(REGB0)) {
899 } else {
900 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 184);
901 }
902 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
903 REGB1 = TAG_Int(0);
904 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
905 if (UNTAG_Bool(REGB2)) {
906 } else {
907 /* ../lib/standard/kernel.nit:230 */
908 REGB1 = TAG_Bool((REGB0)==(REGB1));
909 /* ../lib/standard/string.nit:184 */
910 REGB2 = REGB1;
911 }
912 if (UNTAG_Bool(REGB2)) {
913 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
914 goto label1;
915 }
916 /* ../lib/standard/string.nit:186 */
917 REGB2 = TAG_Int(0);
918 /* ../lib/standard/string.nit:187 */
919 while(1) {
920 REGB1 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB2);
921 /* ../lib/standard/kernel.nit:416 */
922 REGB1 = TAG_Int((unsigned char)UNTAG_Char(REGB1));
923 /* ../lib/standard/string.nit:187 */
924 REGB0 = TAG_Int(32);
925 REGB3 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
926 if (UNTAG_Bool(REGB3)) {
927 } else {
928 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
929 }
930 /* ../lib/standard/kernel.nit:234 */
931 REGB0 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB0));
932 /* ../lib/standard/string.nit:187 */
933 if (UNTAG_Bool(REGB0)) {
934 /* ../lib/standard/string.nit:188 */
935 REGB0 = TAG_Int(1);
936 /* ../lib/standard/kernel.nit:238 */
937 REGB0 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
938 /* ../lib/standard/string.nit:188 */
939 REGB2 = REGB0;
940 /* ../lib/standard/string.nit:189 */
941 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
942 if (UNTAG_Bool(REGB0)) {
943 } else {
944 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 189);
945 }
946 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
947 REGB1 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB0));
948 if (UNTAG_Bool(REGB1)) {
949 } else {
950 /* ../lib/standard/kernel.nit:230 */
951 REGB0 = TAG_Bool((REGB2)==(REGB0));
952 /* ../lib/standard/string.nit:189 */
953 REGB1 = REGB0;
954 }
955 if (UNTAG_Bool(REGB1)) {
956 if (!once_value_2) {
957 fra.me.REG[2] = BOX_NativeString("");
958 REGB1 = TAG_Int(0);
959 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB1);
960 once_value_2 = fra.me.REG[2];
961 register_static_object(&once_value_2);
962 } else fra.me.REG[2] = once_value_2;
963 fra.me.REG[2] = fra.me.REG[2];
964 fra.me.REG[1] = fra.me.REG[2];
965 goto label1;
966 }
967 } else {
968 /* ../lib/standard/string.nit:187 */
969 goto label3;
970 }
971 }
972 label3: while(0);
973 /* ../lib/standard/collection/array.nit:24 */
974 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
975 if (UNTAG_Bool(REGB1)) {
976 } else {
977 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
978 }
979 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
980 /* ../lib/standard/string.nit:192 */
981 REGB0 = TAG_Int(1);
982 /* ../lib/standard/kernel.nit:240 */
983 REGB0 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
984 /* ../lib/standard/string.nit:193 */
985 while(1) {
986 REGB1 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB0);
987 /* ../lib/standard/kernel.nit:416 */
988 REGB1 = TAG_Int((unsigned char)UNTAG_Char(REGB1));
989 /* ../lib/standard/string.nit:193 */
990 REGB3 = TAG_Int(32);
991 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
992 if (UNTAG_Bool(REGB4)) {
993 } else {
994 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
995 }
996 /* ../lib/standard/kernel.nit:234 */
997 REGB3 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB3));
998 /* ../lib/standard/string.nit:193 */
999 if (UNTAG_Bool(REGB3)) {
1000 /* ../lib/standard/string.nit:194 */
1001 REGB3 = TAG_Int(1);
1002 /* ../lib/standard/kernel.nit:240 */
1003 REGB3 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB3));
1004 /* ../lib/standard/string.nit:194 */
1005 REGB0 = REGB3;
1006 /* ../lib/standard/string.nit:195 */
1007 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB2));
1008 if (UNTAG_Bool(REGB3)) {
1009 } else {
1010 /* ../lib/standard/kernel.nit:230 */
1011 REGB1 = TAG_Bool((REGB0)==(REGB2));
1012 /* ../lib/standard/string.nit:195 */
1013 REGB3 = REGB1;
1014 }
1015 if (UNTAG_Bool(REGB3)) {
1016 REGB3 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB2);
1017 fra.me.REG[2] = CALL_standard___string___Object___to_s(REGB3)(REGB3);
1018 fra.me.REG[1] = fra.me.REG[2];
1019 goto label1;
1020 }
1021 } else {
1022 /* ../lib/standard/string.nit:193 */
1023 goto label4;
1024 }
1025 }
1026 label4: while(0);
1027 /* ../lib/standard/kernel.nit:240 */
1028 REGB0 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
1029 /* ../lib/standard/string.nit:197 */
1030 REGB3 = TAG_Int(1);
1031 /* ../lib/standard/kernel.nit:238 */
1032 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
1033 /* ../lib/standard/string.nit:197 */
1034 fra.me.REG[0] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB2, REGB3);
1035 fra.me.REG[1] = fra.me.REG[0];
1036 goto label1;
1037 label1: while(0);
1038 stack_frame_head = fra.me.prev;
1039 return fra.me.REG[1];
1040 }
1041 static const char LOCATE_standard___string___AbstractString___output[] = "string::AbstractString::(kernel::Object::output)";
1042 void standard___string___AbstractString___output(val_t p0){
1043 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1044 val_t REGB0;
1045 val_t REGB1;
1046 val_t REGB2;
1047 val_t tmp;
1048 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1049 fra.me.file = LOCATE_standard___string;
1050 fra.me.line = 200;
1051 fra.me.meth = LOCATE_standard___string___AbstractString___output;
1052 fra.me.has_broke = 0;
1053 fra.me.REG_size = 2;
1054 fra.me.nitni_local_ref_head = NULL;
1055 fra.me.REG[0] = NIT_NULL;
1056 fra.me.REG[1] = NIT_NULL;
1057 fra.me.REG[0] = p0;
1058 /* ../lib/standard/string.nit:202 */
1059 REGB0 = TAG_Int(0);
1060 /* ../lib/standard/string.nit:203 */
1061 while(1) {
1062 /* ../lib/standard/collection/array.nit:24 */
1063 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1064 if (UNTAG_Bool(REGB1)) {
1065 } else {
1066 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1067 }
1068 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1069 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1070 if (UNTAG_Bool(REGB2)) {
1071 } else {
1072 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1073 }
1074 /* ../lib/standard/kernel.nit:235 */
1075 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1076 /* ../lib/standard/string.nit:203 */
1077 if (UNTAG_Bool(REGB1)) {
1078 /* ../lib/standard/string.nit:204 */
1079 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1080 if (UNTAG_Bool(REGB1)) {
1081 } else {
1082 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 204);
1083 }
1084 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1085 /* ../lib/standard/string.nit:955 */
1086 REGB1 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB0)]);
1087 /* ../lib/standard/kernel.nit:383 */
1088 printf("%c", (unsigned char)UNTAG_Char(REGB1));;
1089 /* ../lib/standard/string.nit:205 */
1090 REGB1 = TAG_Int(1);
1091 /* ../lib/standard/kernel.nit:238 */
1092 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1093 /* ../lib/standard/string.nit:205 */
1094 REGB0 = REGB1;
1095 } else {
1096 /* ../lib/standard/string.nit:203 */
1097 goto label1;
1098 }
1099 }
1100 label1: while(0);
1101 stack_frame_head = fra.me.prev;
1102 return;
1103 }
1104 static const char LOCATE_standard___string___String___index_from[] = "string::String::index_from";
1105 val_t standard___string___String___index_from(val_t p0){
1106 struct {struct stack_frame_t me;} fra;
1107 val_t REGB0;
1108 val_t tmp;
1109 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1110 fra.me.file = LOCATE_standard___string;
1111 fra.me.line = 218;
1112 fra.me.meth = LOCATE_standard___string___String___index_from;
1113 fra.me.has_broke = 0;
1114 fra.me.REG_size = 1;
1115 fra.me.nitni_local_ref_head = NULL;
1116 fra.me.REG[0] = NIT_NULL;
1117 fra.me.REG[0] = p0;
1118 /* ../lib/standard/string.nit:218 */
1119 REGB0 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
1120 if (UNTAG_Bool(REGB0)) {
1121 } else {
1122 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 218);
1123 }
1124 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1125 stack_frame_head = fra.me.prev;
1126 return REGB0;
1127 }
1128 static const char LOCATE_standard___string___String___index_to[] = "string::String::index_to";
1129 val_t standard___string___String___index_to(val_t p0){
1130 struct {struct stack_frame_t me;} fra;
1131 val_t REGB0;
1132 val_t tmp;
1133 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1134 fra.me.file = LOCATE_standard___string;
1135 fra.me.line = 221;
1136 fra.me.meth = LOCATE_standard___string___String___index_to;
1137 fra.me.has_broke = 0;
1138 fra.me.REG_size = 1;
1139 fra.me.nitni_local_ref_head = NULL;
1140 fra.me.REG[0] = NIT_NULL;
1141 fra.me.REG[0] = p0;
1142 /* ../lib/standard/string.nit:221 */
1143 REGB0 = TAG_Bool(ATTR_standard___string___String____index_to(fra.me.REG[0])!=NIT_NULL);
1144 if (UNTAG_Bool(REGB0)) {
1145 } else {
1146 nit_abort("Uninitialized attribute %s", "_index_to", LOCATE_standard___string, 221);
1147 }
1148 REGB0 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
1149 stack_frame_head = fra.me.prev;
1150 return REGB0;
1151 }
1152 static const char LOCATE_standard___string___String_____bra[] = "string::String::(abstract_collection::SequenceRead::[])";
1153 val_t standard___string___String_____bra(val_t p0, val_t p1){
1154 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1155 val_t REGB0;
1156 val_t REGB1;
1157 val_t REGB2;
1158 val_t REGB3;
1159 val_t tmp;
1160 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1161 fra.me.file = LOCATE_standard___string;
1162 fra.me.line = 228;
1163 fra.me.meth = LOCATE_standard___string___String_____bra;
1164 fra.me.has_broke = 0;
1165 fra.me.REG_size = 2;
1166 fra.me.nitni_local_ref_head = NULL;
1167 fra.me.REG[0] = NIT_NULL;
1168 fra.me.REG[1] = NIT_NULL;
1169 fra.me.REG[0] = p0;
1170 REGB0 = p1;
1171 /* ../lib/standard/string.nit:231 */
1172 REGB1 = TAG_Int(0);
1173 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1174 if (UNTAG_Bool(REGB2)) {
1175 } else {
1176 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1177 }
1178 /* ../lib/standard/kernel.nit:236 */
1179 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
1180 /* ../lib/standard/string.nit:231 */
1181 if (UNTAG_Bool(REGB1)) {
1182 } else {
1183 nit_abort("Assert failed", NULL, LOCATE_standard___string, 231);
1184 }
1185 /* ../lib/standard/string.nit:234 */
1186 REGB1 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
1187 if (UNTAG_Bool(REGB1)) {
1188 } else {
1189 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 234);
1190 }
1191 REGB1 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1192 /* ../lib/standard/kernel.nit:238 */
1193 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1194 /* ../lib/standard/string.nit:234 */
1195 REGB2 = TAG_Bool(ATTR_standard___string___String____index_to(fra.me.REG[0])!=NIT_NULL);
1196 if (UNTAG_Bool(REGB2)) {
1197 } else {
1198 nit_abort("Uninitialized attribute %s", "_index_to", LOCATE_standard___string, 234);
1199 }
1200 REGB2 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
1201 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1202 if (UNTAG_Bool(REGB3)) {
1203 } else {
1204 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1205 }
1206 /* ../lib/standard/kernel.nit:234 */
1207 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB2));
1208 /* ../lib/standard/string.nit:234 */
1209 if (UNTAG_Bool(REGB2)) {
1210 } else {
1211 nit_abort("Assert failed", NULL, LOCATE_standard___string, 234);
1212 }
1213 /* ../lib/standard/string.nit:235 */
1214 REGB2 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1215 if (UNTAG_Bool(REGB2)) {
1216 } else {
1217 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 235);
1218 }
1219 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1220 REGB2 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
1221 if (UNTAG_Bool(REGB2)) {
1222 } else {
1223 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 235);
1224 }
1225 REGB2 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1226 /* ../lib/standard/kernel.nit:238 */
1227 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
1228 /* ../lib/standard/string.nit:955 */
1229 REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB2)]);
1230 /* ../lib/standard/string.nit:235 */
1231 goto label1;
1232 label1: while(0);
1233 stack_frame_head = fra.me.prev;
1234 return REGB2;
1235 }
1236 static const char LOCATE_standard___string___String___substring[] = "string::String::(string::AbstractString::substring)";
1237 val_t standard___string___String___substring(val_t p0, val_t p1, val_t p2){
1238 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1239 val_t REGB0;
1240 val_t REGB1;
1241 val_t REGB2;
1242 val_t REGB3;
1243 val_t REGB4;
1244 val_t tmp;
1245 static val_t once_value_2; /* Once value */
1246 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1247 fra.me.file = LOCATE_standard___string;
1248 fra.me.line = 238;
1249 fra.me.meth = LOCATE_standard___string___String___substring;
1250 fra.me.has_broke = 0;
1251 fra.me.REG_size = 3;
1252 fra.me.nitni_local_ref_head = NULL;
1253 fra.me.REG[0] = NIT_NULL;
1254 fra.me.REG[1] = NIT_NULL;
1255 fra.me.REG[2] = NIT_NULL;
1256 fra.me.REG[0] = p0;
1257 REGB0 = p1;
1258 REGB1 = p2;
1259 /* ../lib/standard/string.nit:251 */
1260 REGB2 = TAG_Int(0);
1261 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1262 if (UNTAG_Bool(REGB3)) {
1263 } else {
1264 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1265 }
1266 /* ../lib/standard/kernel.nit:236 */
1267 REGB2 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB2));
1268 /* ../lib/standard/string.nit:251 */
1269 if (UNTAG_Bool(REGB2)) {
1270 } else {
1271 nit_abort("Assert failed", NULL, LOCATE_standard___string, 251);
1272 }
1273 /* ../lib/standard/string.nit:253 */
1274 REGB2 = TAG_Int(0);
1275 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1276 if (UNTAG_Bool(REGB3)) {
1277 } else {
1278 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1279 }
1280 /* ../lib/standard/kernel.nit:235 */
1281 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
1282 /* ../lib/standard/string.nit:253 */
1283 if (UNTAG_Bool(REGB2)) {
1284 /* ../lib/standard/kernel.nit:238 */
1285 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
1286 /* ../lib/standard/string.nit:254 */
1287 REGB1 = REGB2;
1288 /* ../lib/standard/string.nit:255 */
1289 REGB2 = TAG_Int(0);
1290 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1291 if (UNTAG_Bool(REGB3)) {
1292 } else {
1293 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1294 }
1295 /* ../lib/standard/kernel.nit:235 */
1296 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
1297 /* ../lib/standard/string.nit:255 */
1298 if (UNTAG_Bool(REGB2)) {
1299 REGB2 = TAG_Int(0);
1300 REGB1 = REGB2;
1301 }
1302 /* ../lib/standard/string.nit:256 */
1303 REGB2 = TAG_Int(0);
1304 REGB0 = REGB2;
1305 }
1306 /* ../lib/standard/string.nit:259 */
1307 REGB2 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
1308 if (UNTAG_Bool(REGB2)) {
1309 } else {
1310 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 259);
1311 }
1312 REGB2 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1313 /* ../lib/standard/kernel.nit:238 */
1314 REGB0 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
1315 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1316 /* ../lib/standard/string.nit:261 */
1317 REGB3 = TAG_Bool(ATTR_standard___string___String____index_to(fra.me.REG[0])!=NIT_NULL);
1318 if (UNTAG_Bool(REGB3)) {
1319 } else {
1320 nit_abort("Uninitialized attribute %s", "_index_to", LOCATE_standard___string, 261);
1321 }
1322 REGB3 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
1323 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
1324 if (UNTAG_Bool(REGB4)) {
1325 } else {
1326 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1327 }
1328 /* ../lib/standard/kernel.nit:237 */
1329 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB3));
1330 /* ../lib/standard/string.nit:261 */
1331 if (UNTAG_Bool(REGB3)) {
1332 REGB3 = TAG_Bool(ATTR_standard___string___String____index_to(fra.me.REG[0])!=NIT_NULL);
1333 if (UNTAG_Bool(REGB3)) {
1334 } else {
1335 nit_abort("Uninitialized attribute %s", "_index_to", LOCATE_standard___string, 261);
1336 }
1337 REGB3 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
1338 REGB2 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1339 if (UNTAG_Bool(REGB2)) {
1340 } else {
1341 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 261);
1342 }
1343 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1344 fra.me.REG[1] = NEW_String_standard___string___String___from_substring(REGB0, REGB3, fra.me.REG[1]);
1345 goto label1;
1346 }
1347 /* ../lib/standard/string.nit:263 */
1348 REGB3 = TAG_Int(0);
1349 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB3));
1350 if (UNTAG_Bool(REGB2)) {
1351 } else {
1352 /* ../lib/standard/kernel.nit:230 */
1353 REGB3 = TAG_Bool((REGB1)==(REGB3));
1354 /* ../lib/standard/string.nit:263 */
1355 REGB2 = REGB3;
1356 }
1357 if (UNTAG_Bool(REGB2)) {
1358 if (!once_value_2) {
1359 fra.me.REG[2] = BOX_NativeString("");
1360 REGB2 = TAG_Int(0);
1361 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB2);
1362 once_value_2 = fra.me.REG[2];
1363 register_static_object(&once_value_2);
1364 } else fra.me.REG[2] = once_value_2;
1365 fra.me.REG[2] = fra.me.REG[2];
1366 fra.me.REG[1] = fra.me.REG[2];
1367 goto label1;
1368 }
1369 /* ../lib/standard/kernel.nit:238 */
1370 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1371 /* ../lib/standard/string.nit:265 */
1372 REGB2 = TAG_Int(1);
1373 /* ../lib/standard/kernel.nit:240 */
1374 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
1375 /* ../lib/standard/string.nit:265 */
1376 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1377 if (UNTAG_Bool(REGB1)) {
1378 } else {
1379 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 265);
1380 }
1381 fra.me.REG[0] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1382 fra.me.REG[0] = NEW_String_standard___string___String___from_substring(REGB0, REGB2, fra.me.REG[0]);
1383 fra.me.REG[1] = fra.me.REG[0];
1384 goto label1;
1385 label1: while(0);
1386 stack_frame_head = fra.me.prev;
1387 return fra.me.REG[1];
1388 }
1389 static const char LOCATE_standard___string___String___substring_from[] = "string::String::(string::AbstractString::substring_from)";
1390 val_t standard___string___String___substring_from(val_t p0, val_t p1){
1391 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1392 val_t REGB0;
1393 val_t REGB1;
1394 val_t REGB2;
1395 val_t tmp;
1396 static val_t once_value_1; /* Once value */
1397 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1398 fra.me.file = LOCATE_standard___string;
1399 fra.me.line = 268;
1400 fra.me.meth = LOCATE_standard___string___String___substring_from;
1401 fra.me.has_broke = 0;
1402 fra.me.REG_size = 2;
1403 fra.me.nitni_local_ref_head = NULL;
1404 fra.me.REG[0] = NIT_NULL;
1405 fra.me.REG[1] = NIT_NULL;
1406 fra.me.REG[0] = p0;
1407 REGB0 = p1;
1408 /* ../lib/standard/string.nit:278 */
1409 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1410 if (UNTAG_Bool(REGB1)) {
1411 } else {
1412 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 278);
1413 }
1414 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1415 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1416 if (UNTAG_Bool(REGB2)) {
1417 } else {
1418 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1419 }
1420 /* ../lib/standard/kernel.nit:237 */
1421 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
1422 /* ../lib/standard/string.nit:278 */
1423 if (UNTAG_Bool(REGB1)) {
1424 if (!once_value_1) {
1425 fra.me.REG[1] = BOX_NativeString("");
1426 REGB1 = TAG_Int(0);
1427 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB1);
1428 once_value_1 = fra.me.REG[1];
1429 register_static_object(&once_value_1);
1430 } else fra.me.REG[1] = once_value_1;
1431 fra.me.REG[1] = fra.me.REG[1];
1432 goto label2;
1433 }
1434 /* ../lib/standard/string.nit:279 */
1435 REGB1 = TAG_Int(0);
1436 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1437 if (UNTAG_Bool(REGB2)) {
1438 } else {
1439 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1440 }
1441 /* ../lib/standard/kernel.nit:235 */
1442 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1443 /* ../lib/standard/string.nit:279 */
1444 if (UNTAG_Bool(REGB1)) {
1445 REGB1 = TAG_Int(0);
1446 REGB0 = REGB1;
1447 }
1448 /* ../lib/standard/string.nit:280 */
1449 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1450 if (UNTAG_Bool(REGB1)) {
1451 } else {
1452 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 280);
1453 }
1454 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1455 fra.me.REG[0] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB1);
1456 fra.me.REG[1] = fra.me.REG[0];
1457 goto label2;
1458 label2: while(0);
1459 stack_frame_head = fra.me.prev;
1460 return fra.me.REG[1];
1461 }
1462 static const char LOCATE_standard___string___String___has_substring[] = "string::String::(string::AbstractString::has_substring)";
1463 val_t standard___string___String___has_substring(val_t p0, val_t p1, val_t p2){
1464 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
1465 val_t REGB0;
1466 val_t REGB1;
1467 val_t REGB2;
1468 val_t REGB3;
1469 val_t REGB4;
1470 val_t REGB5;
1471 val_t REGB6;
1472 val_t tmp;
1473 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1474 fra.me.file = LOCATE_standard___string;
1475 fra.me.line = 283;
1476 fra.me.meth = LOCATE_standard___string___String___has_substring;
1477 fra.me.has_broke = 0;
1478 fra.me.REG_size = 4;
1479 fra.me.nitni_local_ref_head = NULL;
1480 fra.me.REG[0] = NIT_NULL;
1481 fra.me.REG[1] = NIT_NULL;
1482 fra.me.REG[2] = NIT_NULL;
1483 fra.me.REG[3] = NIT_NULL;
1484 fra.me.REG[0] = p0;
1485 fra.me.REG[1] = p1;
1486 REGB0 = p2;
1487 /* ../lib/standard/string.nit:289 */
1488 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1489 if (UNTAG_Bool(REGB1)) {
1490 } else {
1491 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 289);
1492 }
1493 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1494 REGB2 = TAG_Int(1);
1495 /* ../lib/standard/kernel.nit:240 */
1496 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
1497 /* ../lib/standard/kernel.nit:238 */
1498 REGB0 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
1499 /* ../lib/standard/string.nit:292 */
1500 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1501 if (UNTAG_Bool(REGB1)) {
1502 } else {
1503 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 292);
1504 }
1505 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1506 /* ../lib/standard/string.nit:294 */
1507 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
1508 if (UNTAG_Bool(REGB1)) {
1509 } else {
1510 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 294);
1511 }
1512 fra.me.REG[3] = ATTR_standard___string___AbstractString____items(fra.me.REG[1]);
1513 /* ../lib/standard/string.nit:296 */
1514 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1515 if (UNTAG_Bool(REGB1)) {
1516 } else {
1517 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 296);
1518 }
1519 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1520 REGB3 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1521 if (UNTAG_Bool(REGB3)) {
1522 } else {
1523 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1524 }
1525 /* ../lib/standard/kernel.nit:237 */
1526 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
1527 /* ../lib/standard/string.nit:296 */
1528 if (UNTAG_Bool(REGB1)) {
1529 REGB1 = TAG_Bool(1);
1530 } else {
1531 REGB3 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
1532 if (UNTAG_Bool(REGB3)) {
1533 } else {
1534 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1535 }
1536 /* ../lib/standard/kernel.nit:237 */
1537 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB0));
1538 /* ../lib/standard/string.nit:296 */
1539 REGB1 = REGB3;
1540 }
1541 if (UNTAG_Bool(REGB1)) {
1542 REGB1 = TAG_Bool(0);
1543 goto label1;
1544 }
1545 /* ../lib/standard/string.nit:298 */
1546 REGB3 = CALL_standard___string___String___index_from(fra.me.REG[1])(fra.me.REG[1]);
1547 /* ../lib/standard/kernel.nit:238 */
1548 REGB4 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
1549 /* ../lib/standard/string.nit:299 */
1550 REGB2 = REGB4;
1551 /* ../lib/standard/string.nit:300 */
1552 REGB4 = CALL_standard___string___String___index_from(fra.me.REG[0])(fra.me.REG[0]);
1553 /* ../lib/standard/kernel.nit:238 */
1554 REGB4 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB4));
1555 /* ../lib/standard/string.nit:300 */
1556 REGB0 = REGB4;
1557 /* ../lib/standard/string.nit:302 */
1558 while(1) {
1559 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
1560 if (UNTAG_Bool(REGB4)) {
1561 } else {
1562 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1563 }
1564 /* ../lib/standard/kernel.nit:236 */
1565 REGB4 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB3));
1566 /* ../lib/standard/string.nit:302 */
1567 if (UNTAG_Bool(REGB4)) {
1568 /* ../lib/standard/string.nit:955 */
1569 REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
1570 REGB5 = TAG_Char(UNBOX_NativeString(fra.me.REG[3])[UNTAG_Int(REGB2)]);
1571 /* ../lib/standard/string.nit:303 */
1572 REGB6 = TAG_Bool(IS_EQUAL_OO(REGB4,REGB5));
1573 if (UNTAG_Bool(REGB6)) {
1574 } else {
1575 /* ../lib/standard/kernel.nit:381 */
1576 REGB5 = TAG_Bool((REGB4)==(REGB5));
1577 /* ../lib/standard/string.nit:303 */
1578 REGB6 = REGB5;
1579 }
1580 REGB6 = TAG_Bool(!UNTAG_Bool(REGB6));
1581 if (UNTAG_Bool(REGB6)) {
1582 REGB6 = TAG_Bool(0);
1583 REGB1 = REGB6;
1584 goto label1;
1585 }
1586 /* ../lib/standard/string.nit:304 */
1587 REGB6 = TAG_Int(1);
1588 /* ../lib/standard/kernel.nit:240 */
1589 REGB6 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB6));
1590 /* ../lib/standard/string.nit:304 */
1591 REGB0 = REGB6;
1592 /* ../lib/standard/string.nit:305 */
1593 REGB6 = TAG_Int(1);
1594 /* ../lib/standard/kernel.nit:240 */
1595 REGB6 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB6));
1596 /* ../lib/standard/string.nit:305 */
1597 REGB2 = REGB6;
1598 } else {
1599 /* ../lib/standard/string.nit:302 */
1600 goto label2;
1601 }
1602 }
1603 label2: while(0);
1604 /* ../lib/standard/string.nit:308 */
1605 REGB2 = TAG_Bool(1);
1606 REGB1 = REGB2;
1607 goto label1;
1608 label1: while(0);
1609 stack_frame_head = fra.me.prev;
1610 return REGB1;
1611 }
1612 static const char LOCATE_standard___string___String___to_upper[] = "string::String::(string::AbstractString::to_upper)";
1613 val_t standard___string___String___to_upper(val_t p0){
1614 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1615 val_t REGB0;
1616 val_t REGB1;
1617 val_t REGB2;
1618 val_t REGB3;
1619 val_t tmp;
1620 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1621 fra.me.file = LOCATE_standard___string;
1622 fra.me.line = 311;
1623 fra.me.meth = LOCATE_standard___string___String___to_upper;
1624 fra.me.has_broke = 0;
1625 fra.me.REG_size = 3;
1626 fra.me.nitni_local_ref_head = NULL;
1627 fra.me.REG[0] = NIT_NULL;
1628 fra.me.REG[1] = NIT_NULL;
1629 fra.me.REG[2] = NIT_NULL;
1630 fra.me.REG[0] = p0;
1631 /* ../lib/standard/string.nit:314 */
1632 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1633 if (UNTAG_Bool(REGB0)) {
1634 } else {
1635 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 314);
1636 }
1637 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1638 REGB1 = TAG_Int(1);
1639 /* ../lib/standard/kernel.nit:238 */
1640 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1641 /* ../lib/standard/string.nit:972 */
1642 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
1643 /* ../lib/standard/string.nit:315 */
1644 REGB1 = TAG_Int(0);
1645 /* ../lib/standard/string.nit:317 */
1646 REGB0 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1647 if (UNTAG_Bool(REGB0)) {
1648 } else {
1649 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 317);
1650 }
1651 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1652 /* ../lib/standard/string.nit:318 */
1653 REGB0 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
1654 if (UNTAG_Bool(REGB0)) {
1655 } else {
1656 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 318);
1657 }
1658 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1659 /* ../lib/standard/string.nit:319 */
1660 REGB2 = TAG_Bool(ATTR_standard___string___String____index_to(fra.me.REG[0])!=NIT_NULL);
1661 if (UNTAG_Bool(REGB2)) {
1662 } else {
1663 nit_abort("Uninitialized attribute %s", "_index_to", LOCATE_standard___string, 319);
1664 }
1665 REGB2 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
1666 /* ../lib/standard/string.nit:321 */
1667 while(1) {
1668 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1669 if (UNTAG_Bool(REGB3)) {
1670 } else {
1671 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1672 }
1673 /* ../lib/standard/kernel.nit:234 */
1674 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB2));
1675 /* ../lib/standard/string.nit:321 */
1676 if (UNTAG_Bool(REGB3)) {
1677 /* ../lib/standard/string.nit:955 */
1678 REGB3 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
1679 /* ../lib/standard/string.nit:322 */
1680 REGB3 = CALL_standard___kernel___Char___to_upper(REGB3)(REGB3);
1681 /* ../lib/standard/string.nit:956 */
1682 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB1)]=UNTAG_Char(REGB3);;
1683 /* ../lib/standard/string.nit:323 */
1684 REGB3 = TAG_Int(1);
1685 /* ../lib/standard/kernel.nit:238 */
1686 REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
1687 /* ../lib/standard/string.nit:323 */
1688 REGB1 = REGB3;
1689 /* ../lib/standard/string.nit:324 */
1690 REGB3 = TAG_Int(1);
1691 /* ../lib/standard/kernel.nit:238 */
1692 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
1693 /* ../lib/standard/string.nit:324 */
1694 REGB0 = REGB3;
1695 } else {
1696 /* ../lib/standard/string.nit:321 */
1697 goto label1;
1698 }
1699 }
1700 label1: while(0);
1701 /* ../lib/standard/collection/array.nit:24 */
1702 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1703 if (UNTAG_Bool(REGB0)) {
1704 } else {
1705 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1706 }
1707 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1708 /* ../lib/standard/string.nit:327 */
1709 REGB1 = TAG_Char('\0');
1710 /* ../lib/standard/string.nit:956 */
1711 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB1);;
1712 /* ../lib/standard/string.nit:329 */
1713 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1714 if (UNTAG_Bool(REGB1)) {
1715 } else {
1716 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 329);
1717 }
1718 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1719 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB1);
1720 goto label2;
1721 label2: while(0);
1722 stack_frame_head = fra.me.prev;
1723 return fra.me.REG[1];
1724 }
1725 static const char LOCATE_standard___string___String___to_lower[] = "string::String::(string::AbstractString::to_lower)";
1726 val_t standard___string___String___to_lower(val_t p0){
1727 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1728 val_t REGB0;
1729 val_t REGB1;
1730 val_t REGB2;
1731 val_t REGB3;
1732 val_t tmp;
1733 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1734 fra.me.file = LOCATE_standard___string;
1735 fra.me.line = 332;
1736 fra.me.meth = LOCATE_standard___string___String___to_lower;
1737 fra.me.has_broke = 0;
1738 fra.me.REG_size = 3;
1739 fra.me.nitni_local_ref_head = NULL;
1740 fra.me.REG[0] = NIT_NULL;
1741 fra.me.REG[1] = NIT_NULL;
1742 fra.me.REG[2] = NIT_NULL;
1743 fra.me.REG[0] = p0;
1744 /* ../lib/standard/string.nit:335 */
1745 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1746 if (UNTAG_Bool(REGB0)) {
1747 } else {
1748 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 335);
1749 }
1750 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1751 REGB1 = TAG_Int(1);
1752 /* ../lib/standard/kernel.nit:238 */
1753 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1754 /* ../lib/standard/string.nit:972 */
1755 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
1756 /* ../lib/standard/string.nit:336 */
1757 REGB1 = TAG_Int(0);
1758 /* ../lib/standard/string.nit:338 */
1759 REGB0 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1760 if (UNTAG_Bool(REGB0)) {
1761 } else {
1762 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 338);
1763 }
1764 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1765 /* ../lib/standard/string.nit:339 */
1766 REGB0 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
1767 if (UNTAG_Bool(REGB0)) {
1768 } else {
1769 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 339);
1770 }
1771 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1772 /* ../lib/standard/string.nit:340 */
1773 REGB2 = TAG_Bool(ATTR_standard___string___String____index_to(fra.me.REG[0])!=NIT_NULL);
1774 if (UNTAG_Bool(REGB2)) {
1775 } else {
1776 nit_abort("Uninitialized attribute %s", "_index_to", LOCATE_standard___string, 340);
1777 }
1778 REGB2 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
1779 /* ../lib/standard/string.nit:342 */
1780 while(1) {
1781 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1782 if (UNTAG_Bool(REGB3)) {
1783 } else {
1784 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1785 }
1786 /* ../lib/standard/kernel.nit:234 */
1787 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB2));
1788 /* ../lib/standard/string.nit:342 */
1789 if (UNTAG_Bool(REGB3)) {
1790 /* ../lib/standard/string.nit:955 */
1791 REGB3 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
1792 /* ../lib/standard/string.nit:343 */
1793 REGB3 = CALL_standard___kernel___Char___to_lower(REGB3)(REGB3);
1794 /* ../lib/standard/string.nit:956 */
1795 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB1)]=UNTAG_Char(REGB3);;
1796 /* ../lib/standard/string.nit:344 */
1797 REGB3 = TAG_Int(1);
1798 /* ../lib/standard/kernel.nit:238 */
1799 REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
1800 /* ../lib/standard/string.nit:344 */
1801 REGB1 = REGB3;
1802 /* ../lib/standard/string.nit:345 */
1803 REGB3 = TAG_Int(1);
1804 /* ../lib/standard/kernel.nit:238 */
1805 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
1806 /* ../lib/standard/string.nit:345 */
1807 REGB0 = REGB3;
1808 } else {
1809 /* ../lib/standard/string.nit:342 */
1810 goto label1;
1811 }
1812 }
1813 label1: while(0);
1814 /* ../lib/standard/collection/array.nit:24 */
1815 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1816 if (UNTAG_Bool(REGB0)) {
1817 } else {
1818 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1819 }
1820 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1821 /* ../lib/standard/string.nit:348 */
1822 REGB1 = TAG_Char('\0');
1823 /* ../lib/standard/string.nit:956 */
1824 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB1);;
1825 /* ../lib/standard/string.nit:350 */
1826 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1827 if (UNTAG_Bool(REGB1)) {
1828 } else {
1829 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 350);
1830 }
1831 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1832 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB1);
1833 goto label2;
1834 label2: while(0);
1835 stack_frame_head = fra.me.prev;
1836 return fra.me.REG[1];
1837 }
1838 static const char LOCATE_standard___string___String___trim[] = "string::String::(string::AbstractString::trim)";
1839 val_t standard___string___String___trim(val_t p0){
1840 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1841 val_t REGB0;
1842 val_t REGB1;
1843 val_t REGB2;
1844 val_t REGB3;
1845 val_t REGB4;
1846 val_t tmp;
1847 static val_t once_value_2; /* Once value */
1848 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1849 fra.me.file = LOCATE_standard___string;
1850 fra.me.line = 353;
1851 fra.me.meth = LOCATE_standard___string___String___trim;
1852 fra.me.has_broke = 0;
1853 fra.me.REG_size = 3;
1854 fra.me.nitni_local_ref_head = NULL;
1855 fra.me.REG[0] = NIT_NULL;
1856 fra.me.REG[1] = NIT_NULL;
1857 fra.me.REG[2] = NIT_NULL;
1858 fra.me.REG[0] = p0;
1859 /* ../lib/standard/string.nit:355 */
1860 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1861 if (UNTAG_Bool(REGB0)) {
1862 } else {
1863 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 355);
1864 }
1865 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1866 REGB1 = TAG_Int(0);
1867 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
1868 if (UNTAG_Bool(REGB2)) {
1869 } else {
1870 /* ../lib/standard/kernel.nit:230 */
1871 REGB1 = TAG_Bool((REGB0)==(REGB1));
1872 /* ../lib/standard/string.nit:355 */
1873 REGB2 = REGB1;
1874 }
1875 if (UNTAG_Bool(REGB2)) {
1876 fra.me.REG[1] = fra.me.REG[0];
1877 goto label1;
1878 }
1879 /* ../lib/standard/string.nit:357 */
1880 REGB2 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
1881 if (UNTAG_Bool(REGB2)) {
1882 } else {
1883 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 357);
1884 }
1885 REGB2 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1886 /* ../lib/standard/string.nit:358 */
1887 while(1) {
1888 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1889 if (UNTAG_Bool(REGB1)) {
1890 } else {
1891 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 358);
1892 }
1893 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1894 /* ../lib/standard/string.nit:955 */
1895 REGB1 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB2)]);
1896 /* ../lib/standard/kernel.nit:416 */
1897 REGB1 = TAG_Int((unsigned char)UNTAG_Char(REGB1));
1898 /* ../lib/standard/string.nit:358 */
1899 REGB0 = TAG_Int(32);
1900 REGB3 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1901 if (UNTAG_Bool(REGB3)) {
1902 } else {
1903 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1904 }
1905 /* ../lib/standard/kernel.nit:234 */
1906 REGB0 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB0));
1907 /* ../lib/standard/string.nit:358 */
1908 if (UNTAG_Bool(REGB0)) {
1909 /* ../lib/standard/string.nit:359 */
1910 REGB0 = TAG_Int(1);
1911 /* ../lib/standard/kernel.nit:238 */
1912 REGB0 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
1913 /* ../lib/standard/string.nit:359 */
1914 REGB2 = REGB0;
1915 /* ../lib/standard/string.nit:360 */
1916 REGB0 = TAG_Bool(ATTR_standard___string___String____index_to(fra.me.REG[0])!=NIT_NULL);
1917 if (UNTAG_Bool(REGB0)) {
1918 } else {
1919 nit_abort("Uninitialized attribute %s", "_index_to", LOCATE_standard___string, 360);
1920 }
1921 REGB0 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
1922 REGB1 = TAG_Int(1);
1923 /* ../lib/standard/kernel.nit:238 */
1924 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1925 /* ../lib/standard/string.nit:360 */
1926 REGB0 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1));
1927 if (UNTAG_Bool(REGB0)) {
1928 } else {
1929 /* ../lib/standard/kernel.nit:230 */
1930 REGB1 = TAG_Bool((REGB2)==(REGB1));
1931 /* ../lib/standard/string.nit:360 */
1932 REGB0 = REGB1;
1933 }
1934 if (UNTAG_Bool(REGB0)) {
1935 if (!once_value_2) {
1936 fra.me.REG[2] = BOX_NativeString("");
1937 REGB0 = TAG_Int(0);
1938 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
1939 once_value_2 = fra.me.REG[2];
1940 register_static_object(&once_value_2);
1941 } else fra.me.REG[2] = once_value_2;
1942 fra.me.REG[2] = fra.me.REG[2];
1943 fra.me.REG[1] = fra.me.REG[2];
1944 goto label1;
1945 }
1946 } else {
1947 /* ../lib/standard/string.nit:358 */
1948 goto label3;
1949 }
1950 }
1951 label3: while(0);
1952 /* ../lib/standard/string.nit:363 */
1953 REGB0 = TAG_Bool(ATTR_standard___string___String____index_to(fra.me.REG[0])!=NIT_NULL);
1954 if (UNTAG_Bool(REGB0)) {
1955 } else {
1956 nit_abort("Uninitialized attribute %s", "_index_to", LOCATE_standard___string, 363);
1957 }
1958 REGB0 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
1959 /* ../lib/standard/string.nit:364 */
1960 while(1) {
1961 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1962 if (UNTAG_Bool(REGB1)) {
1963 } else {
1964 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 364);
1965 }
1966 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1967 /* ../lib/standard/string.nit:955 */
1968 REGB1 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
1969 /* ../lib/standard/kernel.nit:416 */
1970 REGB1 = TAG_Int((unsigned char)UNTAG_Char(REGB1));
1971 /* ../lib/standard/string.nit:364 */
1972 REGB3 = TAG_Int(32);
1973 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1974 if (UNTAG_Bool(REGB4)) {
1975 } else {
1976 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1977 }
1978 /* ../lib/standard/kernel.nit:234 */
1979 REGB3 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB3));
1980 /* ../lib/standard/string.nit:364 */
1981 if (UNTAG_Bool(REGB3)) {
1982 /* ../lib/standard/string.nit:365 */
1983 REGB3 = TAG_Int(1);
1984 /* ../lib/standard/kernel.nit:240 */
1985 REGB3 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB3));
1986 /* ../lib/standard/string.nit:365 */
1987 REGB0 = REGB3;
1988 /* ../lib/standard/string.nit:366 */
1989 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB2));
1990 if (UNTAG_Bool(REGB3)) {
1991 } else {
1992 /* ../lib/standard/kernel.nit:230 */
1993 REGB1 = TAG_Bool((REGB0)==(REGB2));
1994 /* ../lib/standard/string.nit:366 */
1995 REGB3 = REGB1;
1996 }
1997 if (UNTAG_Bool(REGB3)) {
1998 REGB3 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
1999 if (UNTAG_Bool(REGB3)) {
2000 } else {
2001 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 366);
2002 }
2003 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2004 /* ../lib/standard/string.nit:955 */
2005 REGB3 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB2)]);
2006 /* ../lib/standard/string.nit:366 */
2007 fra.me.REG[2] = CALL_standard___string___Object___to_s(REGB3)(REGB3);
2008 fra.me.REG[1] = fra.me.REG[2];
2009 goto label1;
2010 }
2011 } else {
2012 /* ../lib/standard/string.nit:364 */
2013 goto label4;
2014 }
2015 }
2016 label4: while(0);
2017 /* ../lib/standard/string.nit:368 */
2018 REGB3 = CALL_standard___string___String___index_from(fra.me.REG[0])(fra.me.REG[0]);
2019 /* ../lib/standard/kernel.nit:240 */
2020 REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
2021 /* ../lib/standard/string.nit:368 */
2022 REGB2 = REGB3;
2023 /* ../lib/standard/string.nit:369 */
2024 REGB3 = CALL_standard___string___String___index_from(fra.me.REG[0])(fra.me.REG[0]);
2025 /* ../lib/standard/kernel.nit:240 */
2026 REGB3 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB3));
2027 /* ../lib/standard/string.nit:369 */
2028 REGB0 = REGB3;
2029 /* ../lib/standard/kernel.nit:240 */
2030 REGB0 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
2031 /* ../lib/standard/string.nit:370 */
2032 REGB3 = TAG_Int(1);
2033 /* ../lib/standard/kernel.nit:238 */
2034 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
2035 /* ../lib/standard/string.nit:370 */
2036 fra.me.REG[0] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB2, REGB3);
2037 fra.me.REG[1] = fra.me.REG[0];
2038 goto label1;
2039 label1: while(0);
2040 stack_frame_head = fra.me.prev;
2041 return fra.me.REG[1];
2042 }
2043 static const char LOCATE_standard___string___String___output[] = "string::String::(kernel::Object::output)";
2044 void standard___string___String___output(val_t p0){
2045 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2046 val_t REGB0;
2047 val_t REGB1;
2048 val_t REGB2;
2049 val_t tmp;
2050 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2051 fra.me.file = LOCATE_standard___string;
2052 fra.me.line = 373;
2053 fra.me.meth = LOCATE_standard___string___String___output;
2054 fra.me.has_broke = 0;
2055 fra.me.REG_size = 2;
2056 fra.me.nitni_local_ref_head = NULL;
2057 fra.me.REG[0] = NIT_NULL;
2058 fra.me.REG[1] = NIT_NULL;
2059 fra.me.REG[0] = p0;
2060 /* ../lib/standard/string.nit:375 */
2061 REGB0 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2062 if (UNTAG_Bool(REGB0)) {
2063 } else {
2064 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 375);
2065 }
2066 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2067 /* ../lib/standard/string.nit:376 */
2068 REGB1 = TAG_Bool(ATTR_standard___string___String____index_to(fra.me.REG[0])!=NIT_NULL);
2069 if (UNTAG_Bool(REGB1)) {
2070 } else {
2071 nit_abort("Uninitialized attribute %s", "_index_to", LOCATE_standard___string, 376);
2072 }
2073 REGB1 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
2074 /* ../lib/standard/string.nit:377 */
2075 while(1) {
2076 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2077 if (UNTAG_Bool(REGB2)) {
2078 } else {
2079 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2080 }
2081 /* ../lib/standard/kernel.nit:234 */
2082 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB1));
2083 /* ../lib/standard/string.nit:377 */
2084 if (UNTAG_Bool(REGB2)) {
2085 /* ../lib/standard/string.nit:378 */
2086 REGB2 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2087 if (UNTAG_Bool(REGB2)) {
2088 } else {
2089 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 378);
2090 }
2091 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2092 /* ../lib/standard/string.nit:955 */
2093 REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB0)]);
2094 /* ../lib/standard/kernel.nit:383 */
2095 printf("%c", (unsigned char)UNTAG_Char(REGB2));;
2096 /* ../lib/standard/string.nit:379 */
2097 REGB2 = TAG_Int(1);
2098 /* ../lib/standard/kernel.nit:238 */
2099 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
2100 /* ../lib/standard/string.nit:379 */
2101 REGB0 = REGB2;
2102 } else {
2103 /* ../lib/standard/string.nit:377 */
2104 goto label1;
2105 }
2106 }
2107 label1: while(0);
2108 stack_frame_head = fra.me.prev;
2109 return;
2110 }
2111 static const char LOCATE_standard___string___String___from_substring[] = "string::String::from_substring";
2112 void standard___string___String___from_substring(val_t p0, val_t p1, val_t p2, val_t p3, int* init_table){
2113 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string___String].i;
2114 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2115 val_t REGB0;
2116 val_t REGB1;
2117 val_t tmp;
2118 if (init_table[itpos0]) return;
2119 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2120 fra.me.file = LOCATE_standard___string;
2121 fra.me.line = 387;
2122 fra.me.meth = LOCATE_standard___string___String___from_substring;
2123 fra.me.has_broke = 0;
2124 fra.me.REG_size = 2;
2125 fra.me.nitni_local_ref_head = NULL;
2126 fra.me.REG[0] = NIT_NULL;
2127 fra.me.REG[1] = NIT_NULL;
2128 fra.me.REG[0] = p0;
2129 REGB0 = p1;
2130 REGB1 = p2;
2131 fra.me.REG[1] = p3;
2132 /* ../lib/standard/string.nit:395 */
2133 ATTR_standard___string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1];
2134 /* ../lib/standard/string.nit:396 */
2135 ATTR_standard___string___String____index_from(fra.me.REG[0]) = REGB0;
2136 /* ../lib/standard/string.nit:397 */
2137 ATTR_standard___string___String____index_to(fra.me.REG[0]) = REGB1;
2138 /* ../lib/standard/kernel.nit:240 */
2139 REGB0 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
2140 /* ../lib/standard/string.nit:398 */
2141 REGB1 = TAG_Int(1);
2142 /* ../lib/standard/kernel.nit:238 */
2143 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2144 /* ../lib/standard/string.nit:398 */
2145 ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]) = REGB1;
2146 stack_frame_head = fra.me.prev;
2147 init_table[itpos0] = 1;
2148 return;
2149 }
2150 static const char LOCATE_standard___string___String___with_native[] = "string::String::with_native";
2151 void standard___string___String___with_native(val_t p0, val_t p1, val_t p2, int* init_table){
2152 int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string___String].i;
2153 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2154 val_t REGB0;
2155 val_t REGB1;
2156 val_t REGB2;
2157 val_t tmp;
2158 if (init_table[itpos1]) return;
2159 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2160 fra.me.file = LOCATE_standard___string;
2161 fra.me.line = 401;
2162 fra.me.meth = LOCATE_standard___string___String___with_native;
2163 fra.me.has_broke = 0;
2164 fra.me.REG_size = 2;
2165 fra.me.nitni_local_ref_head = NULL;
2166 fra.me.REG[0] = NIT_NULL;
2167 fra.me.REG[1] = NIT_NULL;
2168 fra.me.REG[0] = p0;
2169 fra.me.REG[1] = p1;
2170 REGB0 = p2;
2171 /* ../lib/standard/string.nit:404 */
2172 REGB1 = TAG_Int(0);
2173 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2174 if (UNTAG_Bool(REGB2)) {
2175 } else {
2176 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2177 }
2178 /* ../lib/standard/kernel.nit:236 */
2179 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
2180 /* ../lib/standard/string.nit:404 */
2181 if (UNTAG_Bool(REGB1)) {
2182 } else {
2183 nit_abort("Assert failed", NULL, LOCATE_standard___string, 404);
2184 }
2185 /* ../lib/standard/string.nit:405 */
2186 ATTR_standard___string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1];
2187 /* ../lib/standard/string.nit:406 */
2188 ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0;
2189 /* ../lib/standard/string.nit:407 */
2190 REGB0 = TAG_Int(0);
2191 ATTR_standard___string___String____index_from(fra.me.REG[0]) = REGB0;
2192 /* ../lib/standard/string.nit:408 */
2193 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2194 if (UNTAG_Bool(REGB0)) {
2195 } else {
2196 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 408);
2197 }
2198 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2199 REGB1 = TAG_Int(1);
2200 /* ../lib/standard/kernel.nit:240 */
2201 REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1));
2202 /* ../lib/standard/string.nit:408 */
2203 ATTR_standard___string___String____index_to(fra.me.REG[0]) = REGB1;
2204 stack_frame_head = fra.me.prev;
2205 init_table[itpos1] = 1;
2206 return;
2207 }
2208 static const char LOCATE_standard___string___String___from_cstring[] = "string::String::from_cstring";
2209 void standard___string___String___from_cstring(val_t p0, val_t p1, int* init_table){
2210 int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string___String].i;
2211 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2212 val_t REGB0;
2213 val_t tmp;
2214 if (init_table[itpos2]) return;
2215 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2216 fra.me.file = LOCATE_standard___string;
2217 fra.me.line = 411;
2218 fra.me.meth = LOCATE_standard___string___String___from_cstring;
2219 fra.me.has_broke = 0;
2220 fra.me.REG_size = 2;
2221 fra.me.nitni_local_ref_head = NULL;
2222 fra.me.REG[0] = NIT_NULL;
2223 fra.me.REG[1] = NIT_NULL;
2224 fra.me.REG[0] = p0;
2225 fra.me.REG[1] = p1;
2226 /* ../lib/standard/string.nit:414 */
2227 REGB0 = CALL_standard___string___NativeString___cstring_length(fra.me.REG[1])(fra.me.REG[1]);
2228 CALL_standard___string___String___with_native(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0, init_table);
2229 stack_frame_head = fra.me.prev;
2230 init_table[itpos2] = 1;
2231 return;
2232 }
2233 static const char LOCATE_standard___string___String___copy_from_native[] = "string::String::copy_from_native";
2234 void standard___string___String___copy_from_native(val_t p0, val_t p1, int* init_table){
2235 int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string___String].i;
2236 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
2237 val_t REGB0;
2238 val_t REGB1;
2239 val_t REGB2;
2240 val_t tmp;
2241 if (init_table[itpos3]) return;
2242 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2243 fra.me.file = LOCATE_standard___string;
2244 fra.me.line = 417;
2245 fra.me.meth = LOCATE_standard___string___String___copy_from_native;
2246 fra.me.has_broke = 0;
2247 fra.me.REG_size = 3;
2248 fra.me.nitni_local_ref_head = NULL;
2249 fra.me.REG[0] = NIT_NULL;
2250 fra.me.REG[1] = NIT_NULL;
2251 fra.me.REG[2] = NIT_NULL;
2252 fra.me.REG[0] = p0;
2253 fra.me.REG[1] = p1;
2254 /* ../lib/standard/string.nit:423 */
2255 REGB0 = CALL_standard___string___NativeString___cstring_length(fra.me.REG[1])(fra.me.REG[1]);
2256 /* ../lib/standard/string.nit:424 */
2257 REGB1 = TAG_Int(1);
2258 /* ../lib/standard/kernel.nit:238 */
2259 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2260 /* ../lib/standard/string.nit:972 */
2261 fra.me.REG[2] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
2262 /* ../lib/standard/string.nit:425 */
2263 REGB1 = TAG_Int(0);
2264 REGB2 = TAG_Int(0);
2265 /* ../lib/standard/string.nit:957 */
2266 (void)memcpy(UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB1), UNTAG_Int(REGB0));;
2267 /* ../lib/standard/string.nit:426 */
2268 REGB2 = TAG_Char('\0');
2269 /* ../lib/standard/string.nit:956 */
2270 UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB2);;
2271 /* ../lib/standard/string.nit:427 */
2272 CALL_standard___string___String___with_native(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2], REGB0, init_table);
2273 stack_frame_head = fra.me.prev;
2274 init_table[itpos3] = 1;
2275 return;
2276 }
2277 static const char LOCATE_standard___string___String___to_cstring[] = "string::String::to_cstring";
2278 val_t standard___string___String___to_cstring(val_t p0){
2279 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
2280 val_t REGB0;
2281 val_t REGB1;
2282 val_t REGB2;
2283 val_t REGB3;
2284 val_t tmp;
2285 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2286 fra.me.file = LOCATE_standard___string;
2287 fra.me.line = 430;
2288 fra.me.meth = LOCATE_standard___string___String___to_cstring;
2289 fra.me.has_broke = 0;
2290 fra.me.REG_size = 3;
2291 fra.me.nitni_local_ref_head = NULL;
2292 fra.me.REG[0] = NIT_NULL;
2293 fra.me.REG[1] = NIT_NULL;
2294 fra.me.REG[2] = NIT_NULL;
2295 fra.me.REG[0] = p0;
2296 /* ../lib/standard/string.nit:434 */
2297 REGB0 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2298 if (UNTAG_Bool(REGB0)) {
2299 } else {
2300 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 434);
2301 }
2302 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2303 REGB1 = TAG_Int(0);
2304 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2305 if (UNTAG_Bool(REGB2)) {
2306 } else {
2307 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2308 }
2309 /* ../lib/standard/kernel.nit:237 */
2310 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
2311 /* ../lib/standard/string.nit:434 */
2312 if (UNTAG_Bool(REGB1)) {
2313 REGB1 = TAG_Bool(1);
2314 } else {
2315 REGB0 = TAG_Bool(ATTR_standard___string___String____index_to(fra.me.REG[0])!=NIT_NULL);
2316 if (UNTAG_Bool(REGB0)) {
2317 } else {
2318 nit_abort("Uninitialized attribute %s", "_index_to", LOCATE_standard___string, 434);
2319 }
2320 REGB0 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
2321 fra.me.REG[1] = CALL_standard___string___AbstractString___items(fra.me.REG[0])(fra.me.REG[0]);
2322 REGB2 = CALL_standard___string___NativeString___cstring_length(fra.me.REG[1])(fra.me.REG[1]);
2323 REGB3 = TAG_Int(1);
2324 /* ../lib/standard/kernel.nit:240 */
2325 REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
2326 /* ../lib/standard/string.nit:434 */
2327 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB3));
2328 if (UNTAG_Bool(REGB2)) {
2329 } else {
2330 /* ../lib/standard/kernel.nit:230 */
2331 REGB3 = TAG_Bool((REGB0)==(REGB3));
2332 /* ../lib/standard/string.nit:434 */
2333 REGB2 = REGB3;
2334 }
2335 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
2336 REGB1 = REGB2;
2337 }
2338 if (UNTAG_Bool(REGB1)) {
2339 /* ../lib/standard/string.nit:435 */
2340 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2341 if (UNTAG_Bool(REGB1)) {
2342 } else {
2343 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 435);
2344 }
2345 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2346 REGB2 = TAG_Int(1);
2347 /* ../lib/standard/kernel.nit:238 */
2348 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
2349 /* ../lib/standard/string.nit:972 */
2350 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB2) * sizeof(char))));
2351 /* ../lib/standard/string.nit:436 */
2352 fra.me.REG[2] = CALL_standard___string___AbstractString___items(fra.me.REG[0])(fra.me.REG[0]);
2353 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2354 if (UNTAG_Bool(REGB2)) {
2355 } else {
2356 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 436);
2357 }
2358 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2359 REGB1 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2360 if (UNTAG_Bool(REGB1)) {
2361 } else {
2362 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 436);
2363 }
2364 REGB1 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2365 REGB3 = TAG_Int(0);
2366 /* ../lib/standard/string.nit:957 */
2367 (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB3), UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB1), UNTAG_Int(REGB2));;
2368 /* ../lib/standard/collection/array.nit:24 */
2369 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2370 if (UNTAG_Bool(REGB3)) {
2371 } else {
2372 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2373 }
2374 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2375 /* ../lib/standard/string.nit:437 */
2376 REGB1 = TAG_Char('\0');
2377 /* ../lib/standard/string.nit:956 */
2378 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB3)]=UNTAG_Char(REGB1);;
2379 /* ../lib/standard/string.nit:438 */
2380 goto label1;
2381 }
2382 /* ../lib/standard/string.nit:440 */
2383 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2384 if (UNTAG_Bool(REGB1)) {
2385 } else {
2386 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 440);
2387 }
2388 fra.me.REG[0] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2389 fra.me.REG[1] = fra.me.REG[0];
2390 goto label1;
2391 label1: while(0);
2392 stack_frame_head = fra.me.prev;
2393 return fra.me.REG[1];
2394 }
2395 static const char LOCATE_standard___string___String_____eqeq[] = "string::String::(kernel::Object::==)";
2396 val_t standard___string___String_____eqeq(val_t p0, val_t p1){
2397 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2398 val_t REGB0;
2399 val_t REGB1;
2400 val_t REGB2;
2401 val_t REGB3;
2402 val_t REGB4;
2403 val_t REGB5;
2404 val_t REGB6;
2405 val_t tmp;
2406 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2407 fra.me.file = LOCATE_standard___string;
2408 fra.me.line = 443;
2409 fra.me.meth = LOCATE_standard___string___String_____eqeq;
2410 fra.me.has_broke = 0;
2411 fra.me.REG_size = 2;
2412 fra.me.nitni_local_ref_head = NULL;
2413 fra.me.REG[0] = NIT_NULL;
2414 fra.me.REG[1] = NIT_NULL;
2415 fra.me.REG[0] = p0;
2416 fra.me.REG[1] = p1;
2417 /* ../lib/standard/string.nit:445 */
2418 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*/;
2419 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
2420 if (UNTAG_Bool(REGB0)) {
2421 REGB0 = TAG_Bool(1);
2422 } else {
2423 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
2424 REGB0 = REGB1;
2425 }
2426 if (UNTAG_Bool(REGB0)) {
2427 REGB0 = TAG_Bool(0);
2428 goto label1;
2429 }
2430 /* ../lib/standard/string.nit:447 */
2431 REGB1 = CALL_standard___kernel___Object___object_id(fra.me.REG[0])(fra.me.REG[0]);
2432 REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
2433 if (UNTAG_Bool(REGB2)) {
2434 nit_abort("Reciever is null", NULL, LOCATE_standard___string, 447);
2435 }
2436 REGB2 = CALL_standard___kernel___Object___object_id(fra.me.REG[1])(fra.me.REG[1]);
2437 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB2));
2438 if (UNTAG_Bool(REGB3)) {
2439 } else {
2440 /* ../lib/standard/kernel.nit:230 */
2441 REGB2 = TAG_Bool((REGB1)==(REGB2));
2442 /* ../lib/standard/string.nit:447 */
2443 REGB3 = REGB2;
2444 }
2445 if (UNTAG_Bool(REGB3)) {
2446 REGB3 = TAG_Bool(1);
2447 REGB0 = REGB3;
2448 goto label1;
2449 }
2450 /* ../lib/standard/string.nit:449 */
2451 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2452 if (UNTAG_Bool(REGB3)) {
2453 } else {
2454 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 449);
2455 }
2456 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2457 /* ../lib/standard/string.nit:451 */
2458 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
2459 if (UNTAG_Bool(REGB2)) {
2460 } else {
2461 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 451);
2462 }
2463 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
2464 REGB1 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB3));
2465 if (UNTAG_Bool(REGB1)) {
2466 } else {
2467 /* ../lib/standard/kernel.nit:230 */
2468 REGB2 = TAG_Bool((REGB2)==(REGB3));
2469 /* ../lib/standard/string.nit:451 */
2470 REGB1 = REGB2;
2471 }
2472 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
2473 if (UNTAG_Bool(REGB1)) {
2474 REGB1 = TAG_Bool(0);
2475 REGB0 = REGB1;
2476 goto label1;
2477 }
2478 /* ../lib/standard/string.nit:453 */
2479 REGB1 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2480 if (UNTAG_Bool(REGB1)) {
2481 } else {
2482 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 453);
2483 }
2484 REGB1 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2485 /* ../lib/standard/string.nit:454 */
2486 REGB2 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[1])!=NIT_NULL);
2487 if (UNTAG_Bool(REGB2)) {
2488 } else {
2489 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 454);
2490 }
2491 REGB2 = ATTR_standard___string___String____index_from(fra.me.REG[1]);
2492 /* ../lib/standard/kernel.nit:238 */
2493 REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
2494 /* ../lib/standard/string.nit:458 */
2495 REGB4 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
2496 if (UNTAG_Bool(REGB4)) {
2497 } else {
2498 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 458);
2499 }
2500 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[1]);
2501 /* ../lib/standard/string.nit:459 */
2502 REGB4 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2503 if (UNTAG_Bool(REGB4)) {
2504 } else {
2505 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 459);
2506 }
2507 fra.me.REG[0] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2508 /* ../lib/standard/string.nit:461 */
2509 while(1) {
2510 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
2511 if (UNTAG_Bool(REGB4)) {
2512 } else {
2513 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2514 }
2515 /* ../lib/standard/kernel.nit:235 */
2516 REGB4 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB3));
2517 /* ../lib/standard/string.nit:461 */
2518 if (UNTAG_Bool(REGB4)) {
2519 /* ../lib/standard/string.nit:955 */
2520 REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB1)]);
2521 REGB5 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB2)]);
2522 /* ../lib/standard/string.nit:462 */
2523 REGB6 = TAG_Bool(IS_EQUAL_OO(REGB4,REGB5));
2524 if (UNTAG_Bool(REGB6)) {
2525 } else {
2526 /* ../lib/standard/kernel.nit:381 */
2527 REGB5 = TAG_Bool((REGB4)==(REGB5));
2528 /* ../lib/standard/string.nit:462 */
2529 REGB6 = REGB5;
2530 }
2531 REGB6 = TAG_Bool(!UNTAG_Bool(REGB6));
2532 if (UNTAG_Bool(REGB6)) {
2533 REGB6 = TAG_Bool(0);
2534 REGB0 = REGB6;
2535 goto label1;
2536 }
2537 /* ../lib/standard/string.nit:463 */
2538 REGB6 = TAG_Int(1);
2539 /* ../lib/standard/kernel.nit:238 */
2540 REGB6 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB6));
2541 /* ../lib/standard/string.nit:463 */
2542 REGB1 = REGB6;
2543 /* ../lib/standard/string.nit:464 */
2544 REGB6 = TAG_Int(1);
2545 /* ../lib/standard/kernel.nit:238 */
2546 REGB6 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB6));
2547 /* ../lib/standard/string.nit:464 */
2548 REGB2 = REGB6;
2549 } else {
2550 /* ../lib/standard/string.nit:461 */
2551 goto label2;
2552 }
2553 }
2554 label2: while(0);
2555 /* ../lib/standard/string.nit:467 */
2556 REGB2 = TAG_Bool(1);
2557 REGB0 = REGB2;
2558 goto label1;
2559 label1: while(0);
2560 stack_frame_head = fra.me.prev;
2561 return REGB0;
2562 }
2563 static const char LOCATE_standard___string___String_____l[] = "string::String::(kernel::Comparable::<)";
2564 val_t standard___string___String_____l(val_t p0, val_t p1){
2565 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2566 val_t REGB0;
2567 val_t REGB1;
2568 val_t REGB2;
2569 val_t REGB3;
2570 val_t REGB4;
2571 val_t REGB5;
2572 val_t REGB6;
2573 val_t REGB7;
2574 val_t REGB8;
2575 val_t REGB9;
2576 val_t tmp;
2577 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2578 fra.me.file = LOCATE_standard___string;
2579 fra.me.line = 470;
2580 fra.me.meth = LOCATE_standard___string___String_____l;
2581 fra.me.has_broke = 0;
2582 fra.me.REG_size = 4;
2583 fra.me.nitni_local_ref_head = NULL;
2584 fra.me.REG[0] = NIT_NULL;
2585 fra.me.REG[1] = NIT_NULL;
2586 fra.me.REG[2] = NIT_NULL;
2587 fra.me.REG[3] = NIT_NULL;
2588 fra.me.REG[0] = p0;
2589 fra.me.REG[1] = p1;
2590 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*/;
2591 if (UNTAG_Bool(REGB0)) {
2592 } else {
2593 nit_abort("Cast failed", NULL, LOCATE_standard___string, 0);
2594 }
2595 /* ../lib/standard/string.nit:474 */
2596 REGB0 = CALL_standard___kernel___Object___object_id(fra.me.REG[0])(fra.me.REG[0]);
2597 REGB1 = CALL_standard___kernel___Object___object_id(fra.me.REG[1])(fra.me.REG[1]);
2598 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
2599 if (UNTAG_Bool(REGB2)) {
2600 } else {
2601 /* ../lib/standard/kernel.nit:230 */
2602 REGB1 = TAG_Bool((REGB0)==(REGB1));
2603 /* ../lib/standard/string.nit:474 */
2604 REGB2 = REGB1;
2605 }
2606 if (UNTAG_Bool(REGB2)) {
2607 REGB2 = TAG_Bool(0);
2608 goto label1;
2609 }
2610 /* ../lib/standard/string.nit:479 */
2611 REGB1 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2612 if (UNTAG_Bool(REGB1)) {
2613 } else {
2614 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 479);
2615 }
2616 REGB1 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2617 /* ../lib/standard/string.nit:480 */
2618 REGB0 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[1])!=NIT_NULL);
2619 if (UNTAG_Bool(REGB0)) {
2620 } else {
2621 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 480);
2622 }
2623 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[1]);
2624 /* ../lib/standard/string.nit:482 */
2625 REGB3 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2626 if (UNTAG_Bool(REGB3)) {
2627 } else {
2628 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 482);
2629 }
2630 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2631 /* ../lib/standard/string.nit:483 */
2632 REGB3 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
2633 if (UNTAG_Bool(REGB3)) {
2634 } else {
2635 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 483);
2636 }
2637 fra.me.REG[3] = ATTR_standard___string___AbstractString____items(fra.me.REG[1]);
2638 /* ../lib/standard/string.nit:485 */
2639 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2640 if (UNTAG_Bool(REGB3)) {
2641 } else {
2642 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 485);
2643 }
2644 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2645 /* ../lib/standard/string.nit:486 */
2646 REGB4 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
2647 if (UNTAG_Bool(REGB4)) {
2648 } else {
2649 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 486);
2650 }
2651 REGB4 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
2652 /* ../lib/standard/kernel.nit:238 */
2653 REGB5 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
2654 /* ../lib/standard/string.nit:490 */
2655 while(1) {
2656 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
2657 if (UNTAG_Bool(REGB6)) {
2658 } else {
2659 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2660 }
2661 /* ../lib/standard/kernel.nit:235 */
2662 REGB6 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB5));
2663 /* ../lib/standard/string.nit:490 */
2664 if (UNTAG_Bool(REGB6)) {
2665 /* ../lib/standard/string.nit:955 */
2666 REGB6 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB1)]);
2667 REGB7 = TAG_Char(UNBOX_NativeString(fra.me.REG[3])[UNTAG_Int(REGB0)]);
2668 /* ../lib/standard/string.nit:494 */
2669 REGB8 = TAG_Bool(IS_EQUAL_OO(REGB6,REGB7));
2670 if (UNTAG_Bool(REGB8)) {
2671 } else {
2672 /* ../lib/standard/kernel.nit:381 */
2673 REGB9 = TAG_Bool((REGB6)==(REGB7));
2674 /* ../lib/standard/string.nit:494 */
2675 REGB8 = REGB9;
2676 }
2677 REGB8 = TAG_Bool(!UNTAG_Bool(REGB8));
2678 if (UNTAG_Bool(REGB8)) {
2679 REGB8 = TAG_Bool(VAL_ISA(REGB7, VTCOLOR_standard___kernel___Comparable___OTHER(REGB6), VTID_standard___kernel___Comparable___OTHER(REGB6))) /*cast OTHER*/;
2680 if (UNTAG_Bool(REGB8)) {
2681 } else {
2682 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2683 }
2684 /* ../lib/standard/kernel.nit:386 */
2685 REGB7 = TAG_Bool(UNTAG_Char(REGB6)<UNTAG_Char(REGB7));
2686 /* ../lib/standard/string.nit:495 */
2687 if (UNTAG_Bool(REGB7)) {
2688 REGB7 = TAG_Bool(1);
2689 REGB2 = REGB7;
2690 goto label1;
2691 }
2692 /* ../lib/standard/string.nit:496 */
2693 REGB7 = TAG_Bool(0);
2694 REGB2 = REGB7;
2695 goto label1;
2696 }
2697 /* ../lib/standard/string.nit:499 */
2698 REGB7 = TAG_Int(1);
2699 /* ../lib/standard/kernel.nit:238 */
2700 REGB7 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB7));
2701 /* ../lib/standard/string.nit:499 */
2702 REGB1 = REGB7;
2703 /* ../lib/standard/string.nit:500 */
2704 REGB7 = TAG_Int(1);
2705 /* ../lib/standard/kernel.nit:238 */
2706 REGB7 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB7));
2707 /* ../lib/standard/string.nit:500 */
2708 REGB0 = REGB7;
2709 } else {
2710 /* ../lib/standard/string.nit:490 */
2711 goto label2;
2712 }
2713 }
2714 label2: while(0);
2715 REGB0 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
2716 if (UNTAG_Bool(REGB0)) {
2717 } else {
2718 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2719 }
2720 /* ../lib/standard/kernel.nit:235 */
2721 REGB4 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
2722 /* ../lib/standard/string.nit:503 */
2723 REGB2 = REGB4;
2724 goto label1;
2725 label1: while(0);
2726 stack_frame_head = fra.me.prev;
2727 return REGB2;
2728 }
2729 static const char LOCATE_standard___string___String_____plus[] = "string::String::+";
2730 val_t standard___string___String_____plus(val_t p0, val_t p1){
2731 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2732 val_t REGB0;
2733 val_t REGB1;
2734 val_t REGB2;
2735 val_t REGB3;
2736 val_t tmp;
2737 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2738 fra.me.file = LOCATE_standard___string;
2739 fra.me.line = 506;
2740 fra.me.meth = LOCATE_standard___string___String_____plus;
2741 fra.me.has_broke = 0;
2742 fra.me.REG_size = 4;
2743 fra.me.nitni_local_ref_head = NULL;
2744 fra.me.REG[0] = NIT_NULL;
2745 fra.me.REG[1] = NIT_NULL;
2746 fra.me.REG[2] = NIT_NULL;
2747 fra.me.REG[3] = NIT_NULL;
2748 fra.me.REG[0] = p0;
2749 fra.me.REG[1] = p1;
2750 /* ../lib/standard/string.nit:509 */
2751 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2752 if (UNTAG_Bool(REGB0)) {
2753 } else {
2754 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 509);
2755 }
2756 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2757 /* ../lib/standard/string.nit:510 */
2758 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
2759 if (UNTAG_Bool(REGB1)) {
2760 } else {
2761 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 510);
2762 }
2763 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
2764 /* ../lib/standard/kernel.nit:238 */
2765 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2766 /* ../lib/standard/string.nit:512 */
2767 REGB3 = TAG_Int(1);
2768 /* ../lib/standard/kernel.nit:238 */
2769 REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
2770 /* ../lib/standard/string.nit:972 */
2771 fra.me.REG[2] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB3) * sizeof(char))));
2772 /* ../lib/standard/string.nit:514 */
2773 REGB3 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2774 if (UNTAG_Bool(REGB3)) {
2775 } else {
2776 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 514);
2777 }
2778 fra.me.REG[3] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2779 REGB3 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2780 if (UNTAG_Bool(REGB3)) {
2781 } else {
2782 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 514);
2783 }
2784 REGB3 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2785 REGB2 = TAG_Int(0);
2786 /* ../lib/standard/string.nit:957 */
2787 (void)memcpy(UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[3])+UNTAG_Int(REGB3), UNTAG_Int(REGB0));;
2788 /* ../lib/standard/string.nit:515 */
2789 REGB2 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
2790 if (UNTAG_Bool(REGB2)) {
2791 } else {
2792 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 515);
2793 }
2794 fra.me.REG[3] = ATTR_standard___string___AbstractString____items(fra.me.REG[1]);
2795 REGB2 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[1])!=NIT_NULL);
2796 if (UNTAG_Bool(REGB2)) {
2797 } else {
2798 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 515);
2799 }
2800 REGB2 = ATTR_standard___string___String____index_from(fra.me.REG[1]);
2801 /* ../lib/standard/string.nit:957 */
2802 (void)memcpy(UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB0), UNBOX_NativeString(fra.me.REG[3])+UNTAG_Int(REGB2), UNTAG_Int(REGB1));;
2803 /* ../lib/standard/kernel.nit:238 */
2804 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2805 /* ../lib/standard/string.nit:517 */
2806 REGB3 = TAG_Char('\0');
2807 /* ../lib/standard/string.nit:956 */
2808 UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB2)]=UNTAG_Char(REGB3);;
2809 /* ../lib/standard/kernel.nit:238 */
2810 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2811 /* ../lib/standard/string.nit:519 */
2812 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB1);
2813 goto label1;
2814 label1: while(0);
2815 stack_frame_head = fra.me.prev;
2816 return fra.me.REG[2];
2817 }
2818 static const char LOCATE_standard___string___String_____star[] = "string::String::*";
2819 val_t standard___string___String_____star(val_t p0, val_t p1){
2820 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2821 val_t REGB0;
2822 val_t REGB1;
2823 val_t REGB2;
2824 val_t REGB3;
2825 val_t REGB4;
2826 val_t REGB5;
2827 val_t tmp;
2828 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2829 fra.me.file = LOCATE_standard___string;
2830 fra.me.line = 522;
2831 fra.me.meth = LOCATE_standard___string___String_____star;
2832 fra.me.has_broke = 0;
2833 fra.me.REG_size = 2;
2834 fra.me.nitni_local_ref_head = NULL;
2835 fra.me.REG[0] = NIT_NULL;
2836 fra.me.REG[1] = NIT_NULL;
2837 fra.me.REG[0] = p0;
2838 REGB0 = p1;
2839 /* ../lib/standard/string.nit:525 */
2840 REGB1 = TAG_Int(0);
2841 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2842 if (UNTAG_Bool(REGB2)) {
2843 } else {
2844 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2845 }
2846 /* ../lib/standard/kernel.nit:236 */
2847 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
2848 /* ../lib/standard/string.nit:525 */
2849 if (UNTAG_Bool(REGB1)) {
2850 } else {
2851 nit_abort("Assert failed", NULL, LOCATE_standard___string, 525);
2852 }
2853 /* ../lib/standard/string.nit:527 */
2854 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2855 if (UNTAG_Bool(REGB1)) {
2856 } else {
2857 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 527);
2858 }
2859 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2860 /* ../lib/standard/kernel.nit:241 */
2861 REGB2 = TAG_Int(UNTAG_Int(REGB1)*UNTAG_Int(REGB0));
2862 /* ../lib/standard/string.nit:531 */
2863 REGB3 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2864 if (UNTAG_Bool(REGB3)) {
2865 } else {
2866 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 531);
2867 }
2868 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2869 /* ../lib/standard/string.nit:533 */
2870 REGB3 = TAG_Int(1);
2871 /* ../lib/standard/kernel.nit:238 */
2872 REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
2873 /* ../lib/standard/string.nit:972 */
2874 fra.me.REG[0] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB3) * sizeof(char))));
2875 /* ../lib/standard/string.nit:535 */
2876 REGB3 = TAG_Char('\0');
2877 /* ../lib/standard/string.nit:956 */
2878 UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB2)]=UNTAG_Char(REGB3);;
2879 /* ../lib/standard/string.nit:537 */
2880 REGB3 = TAG_Int(0);
2881 /* ../lib/standard/string.nit:539 */
2882 REGB4 = TAG_Int(1);
2883 /* ../lib/standard/kernel.nit:344 */
2884 while(1) {
2885 REGB5 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
2886 if (UNTAG_Bool(REGB5)) {
2887 } else {
2888 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2889 }
2890 /* ../lib/standard/kernel.nit:234 */
2891 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<=UNTAG_Int(REGB0));
2892 /* ../lib/standard/kernel.nit:344 */
2893 if (UNTAG_Bool(REGB5)) {
2894 /* ../lib/standard/string.nit:540 */
2895 REGB5 = TAG_Int(0);
2896 /* ../lib/standard/string.nit:957 */
2897 (void)memcpy(UNBOX_NativeString(fra.me.REG[0])+UNTAG_Int(REGB3), UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB5), UNTAG_Int(REGB1));;
2898 /* ../lib/standard/kernel.nit:238 */
2899 REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB1));
2900 /* ../lib/standard/string.nit:541 */
2901 REGB3 = REGB5;
2902 /* ../lib/standard/kernel.nit:346 */
2903 REGB5 = TAG_Int(1);
2904 /* ../lib/standard/kernel.nit:238 */
2905 REGB5 = TAG_Int(UNTAG_Int(REGB4)+UNTAG_Int(REGB5));
2906 /* ../lib/standard/kernel.nit:346 */
2907 REGB4 = REGB5;
2908 } else {
2909 /* ../lib/standard/kernel.nit:344 */
2910 goto label1;
2911 }
2912 }
2913 label1: while(0);
2914 /* ../lib/standard/string.nit:544 */
2915 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB2);
2916 goto label2;
2917 label2: while(0);
2918 stack_frame_head = fra.me.prev;
2919 return fra.me.REG[0];
2920 }
2921 static const char LOCATE_standard___string___String___to_s[] = "string::String::(string::Object::to_s)";
2922 val_t standard___string___String___to_s(val_t p0){
2923 struct {struct stack_frame_t me;} fra;
2924 val_t tmp;
2925 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2926 fra.me.file = LOCATE_standard___string;
2927 fra.me.line = 547;
2928 fra.me.meth = LOCATE_standard___string___String___to_s;
2929 fra.me.has_broke = 0;
2930 fra.me.REG_size = 1;
2931 fra.me.nitni_local_ref_head = NULL;
2932 fra.me.REG[0] = NIT_NULL;
2933 fra.me.REG[0] = p0;
2934 /* ../lib/standard/string.nit:547 */
2935 goto label1;
2936 label1: while(0);
2937 stack_frame_head = fra.me.prev;
2938 return fra.me.REG[0];
2939 }
2940 static const char LOCATE_standard___string___String___hash[] = "string::String::(hash::Object::hash)";
2941 val_t standard___string___String___hash(val_t p0){
2942 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2943 val_t REGB0;
2944 val_t REGB1;
2945 val_t REGB2;
2946 val_t REGB3;
2947 val_t REGB4;
2948 val_t tmp;
2949 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2950 fra.me.file = LOCATE_standard___string;
2951 fra.me.line = 549;
2952 fra.me.meth = LOCATE_standard___string___String___hash;
2953 fra.me.has_broke = 0;
2954 fra.me.REG_size = 2;
2955 fra.me.nitni_local_ref_head = NULL;
2956 fra.me.REG[0] = NIT_NULL;
2957 fra.me.REG[1] = NIT_NULL;
2958 fra.me.REG[0] = p0;
2959 /* ../lib/standard/string.nit:552 */
2960 REGB0 = TAG_Int(5381);
2961 /* ../lib/standard/string.nit:553 */
2962 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2963 if (UNTAG_Bool(REGB1)) {
2964 } else {
2965 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 553);
2966 }
2967 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2968 REGB2 = TAG_Int(1);
2969 /* ../lib/standard/kernel.nit:240 */
2970 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
2971 /* ../lib/standard/string.nit:555 */
2972 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2973 if (UNTAG_Bool(REGB1)) {
2974 } else {
2975 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 555);
2976 }
2977 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2978 /* ../lib/standard/string.nit:556 */
2979 REGB1 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2980 if (UNTAG_Bool(REGB1)) {
2981 } else {
2982 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 556);
2983 }
2984 REGB1 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2985 /* ../lib/standard/kernel.nit:238 */
2986 REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1));
2987 /* ../lib/standard/string.nit:558 */
2988 REGB2 = REGB3;
2989 /* ../lib/standard/string.nit:560 */
2990 while(1) {
2991 REGB3 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
2992 if (UNTAG_Bool(REGB3)) {
2993 } else {
2994 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2995 }
2996 /* ../lib/standard/kernel.nit:236 */
2997 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB1));
2998 /* ../lib/standard/string.nit:560 */
2999 if (UNTAG_Bool(REGB3)) {
3000 /* ../lib/standard/string.nit:561 */
3001 REGB3 = TAG_Int(32);
3002 /* ../lib/standard/kernel.nit:241 */
3003 REGB3 = TAG_Int(UNTAG_Int(REGB0)*UNTAG_Int(REGB3));
3004 /* ../lib/standard/kernel.nit:238 */
3005 REGB3 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB0));
3006 /* ../lib/standard/string.nit:561 */
3007 REGB4 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3008 if (UNTAG_Bool(REGB4)) {
3009 } else {
3010 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 561);
3011 }
3012 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3013 /* ../lib/standard/string.nit:955 */
3014 REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB2)]);
3015 /* ../lib/standard/kernel.nit:416 */
3016 REGB4 = TAG_Int((unsigned char)UNTAG_Char(REGB4));
3017 /* ../lib/standard/kernel.nit:238 */
3018 REGB4 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB4));
3019 /* ../lib/standard/string.nit:561 */
3020 REGB0 = REGB4;
3021 /* ../lib/standard/string.nit:562 */
3022 REGB4 = TAG_Int(1);
3023 /* ../lib/standard/kernel.nit:240 */
3024 REGB4 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB4));
3025 /* ../lib/standard/string.nit:562 */
3026 REGB2 = REGB4;
3027 } else {
3028 /* ../lib/standard/string.nit:560 */
3029 goto label1;
3030 }
3031 }
3032 label1: while(0);
3033 /* ../lib/standard/string.nit:565 */
3034 goto label2;
3035 label2: while(0);
3036 stack_frame_head = fra.me.prev;
3037 return REGB0;
3038 }
3039 static const char LOCATE_standard___string___Buffer_____braeq[] = "string::Buffer::(abstract_collection::Sequence::[]=)";
3040 void standard___string___Buffer_____braeq(val_t p0, val_t p1, val_t p2){
3041 struct {struct stack_frame_t me;} fra;
3042 val_t REGB0;
3043 val_t REGB1;
3044 val_t REGB2;
3045 val_t REGB3;
3046 val_t tmp;
3047 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3048 fra.me.file = LOCATE_standard___string;
3049 fra.me.line = 578;
3050 fra.me.meth = LOCATE_standard___string___Buffer_____braeq;
3051 fra.me.has_broke = 0;
3052 fra.me.REG_size = 1;
3053 fra.me.nitni_local_ref_head = NULL;
3054 fra.me.REG[0] = NIT_NULL;
3055 fra.me.REG[0] = p0;
3056 REGB0 = p1;
3057 REGB1 = p2;
3058 /* ../lib/standard/collection/array.nit:24 */
3059 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3060 if (UNTAG_Bool(REGB2)) {
3061 } else {
3062 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3063 }
3064 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3065 /* ../lib/standard/string.nit:580 */
3066 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB2));
3067 if (UNTAG_Bool(REGB3)) {
3068 } else {
3069 /* ../lib/standard/kernel.nit:230 */
3070 REGB2 = TAG_Bool((REGB0)==(REGB2));
3071 /* ../lib/standard/string.nit:580 */
3072 REGB3 = REGB2;
3073 }
3074 if (UNTAG_Bool(REGB3)) {
3075 /* ../lib/standard/string.nit:581 */
3076 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB1);
3077 /* ../lib/standard/string.nit:582 */
3078 goto label1;
3079 }
3080 /* ../lib/standard/string.nit:584 */
3081 REGB3 = TAG_Int(0);
3082 REGB2 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
3083 if (UNTAG_Bool(REGB2)) {
3084 } else {
3085 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3086 }
3087 /* ../lib/standard/kernel.nit:236 */
3088 REGB3 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB3));
3089 /* ../lib/standard/string.nit:584 */
3090 if (UNTAG_Bool(REGB3)) {
3091 /* ../lib/standard/collection/array.nit:24 */
3092 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3093 if (UNTAG_Bool(REGB3)) {
3094 } else {
3095 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3096 }
3097 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3098 REGB2 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
3099 if (UNTAG_Bool(REGB2)) {
3100 } else {
3101 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3102 }
3103 /* ../lib/standard/kernel.nit:235 */
3104 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB3));
3105 } else {
3106 /* ../lib/standard/string.nit:584 */
3107 REGB2 = TAG_Bool(0);
3108 REGB3 = REGB2;
3109 }
3110 if (UNTAG_Bool(REGB3)) {
3111 } else {
3112 nit_abort("Assert failed", NULL, LOCATE_standard___string, 584);
3113 }
3114 /* ../lib/standard/string.nit:585 */
3115 REGB3 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3116 if (UNTAG_Bool(REGB3)) {
3117 } else {
3118 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 585);
3119 }
3120 fra.me.REG[0] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3121 /* ../lib/standard/string.nit:956 */
3122 UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB1);;
3123 label1: while(0);
3124 stack_frame_head = fra.me.prev;
3125 return;
3126 }
3127 static const char LOCATE_standard___string___Buffer___add[] = "string::Buffer::(abstract_collection::SimpleCollection::add)";
3128 void standard___string___Buffer___add(val_t p0, val_t p1){
3129 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
3130 val_t REGB0;
3131 val_t REGB1;
3132 val_t REGB2;
3133 val_t REGB3;
3134 val_t tmp;
3135 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3136 fra.me.file = LOCATE_standard___string;
3137 fra.me.line = 588;
3138 fra.me.meth = LOCATE_standard___string___Buffer___add;
3139 fra.me.has_broke = 0;
3140 fra.me.REG_size = 2;
3141 fra.me.nitni_local_ref_head = NULL;
3142 fra.me.REG[0] = NIT_NULL;
3143 fra.me.REG[1] = NIT_NULL;
3144 fra.me.REG[0] = p0;
3145 REGB0 = p1;
3146 /* ../lib/standard/string.nit:590 */
3147 REGB1 = TAG_Bool(ATTR_standard___string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
3148 if (UNTAG_Bool(REGB1)) {
3149 } else {
3150 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___string, 590);
3151 }
3152 REGB1 = ATTR_standard___string___Buffer____capacity(fra.me.REG[0]);
3153 /* ../lib/standard/collection/array.nit:24 */
3154 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3155 if (UNTAG_Bool(REGB2)) {
3156 } else {
3157 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3158 }
3159 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3160 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
3161 if (UNTAG_Bool(REGB3)) {
3162 } else {
3163 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3164 }
3165 /* ../lib/standard/kernel.nit:234 */
3166 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB2));
3167 /* ../lib/standard/string.nit:590 */
3168 if (UNTAG_Bool(REGB2)) {
3169 /* ../lib/standard/collection/array.nit:24 */
3170 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3171 if (UNTAG_Bool(REGB2)) {
3172 } else {
3173 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3174 }
3175 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3176 /* ../lib/standard/string.nit:590 */
3177 REGB1 = TAG_Int(5);
3178 /* ../lib/standard/kernel.nit:238 */
3179 REGB1 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1));
3180 /* ../lib/standard/string.nit:590 */
3181 CALL_standard___collection___array___AbstractArray___enlarge(fra.me.REG[0])(fra.me.REG[0], REGB1);
3182 }
3183 /* ../lib/standard/string.nit:591 */
3184 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3185 if (UNTAG_Bool(REGB1)) {
3186 } else {
3187 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 591);
3188 }
3189 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3190 /* ../lib/standard/collection/array.nit:24 */
3191 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3192 if (UNTAG_Bool(REGB1)) {
3193 } else {
3194 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3195 }
3196 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3197 /* ../lib/standard/string.nit:956 */
3198 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB1)]=UNTAG_Char(REGB0);;
3199 /* ../lib/standard/string.nit:592 */
3200 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3201 REGB1 = TAG_Int(1);
3202 /* ../lib/standard/kernel.nit:238 */
3203 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
3204 /* ../lib/standard/string.nit:592 */
3205 ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]) = REGB1;
3206 stack_frame_head = fra.me.prev;
3207 return;
3208 }
3209 static const char LOCATE_standard___string___Buffer___enlarge[] = "string::Buffer::(array::AbstractArray::enlarge)";
3210 void standard___string___Buffer___enlarge(val_t p0, val_t p1){
3211 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
3212 val_t REGB0;
3213 val_t REGB1;
3214 val_t REGB2;
3215 val_t REGB3;
3216 val_t tmp;
3217 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3218 fra.me.file = LOCATE_standard___string;
3219 fra.me.line = 595;
3220 fra.me.meth = LOCATE_standard___string___Buffer___enlarge;
3221 fra.me.has_broke = 0;
3222 fra.me.REG_size = 3;
3223 fra.me.nitni_local_ref_head = NULL;
3224 fra.me.REG[0] = NIT_NULL;
3225 fra.me.REG[1] = NIT_NULL;
3226 fra.me.REG[2] = NIT_NULL;
3227 fra.me.REG[0] = p0;
3228 REGB0 = p1;
3229 /* ../lib/standard/string.nit:597 */
3230 REGB1 = TAG_Bool(ATTR_standard___string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
3231 if (UNTAG_Bool(REGB1)) {
3232 } else {
3233 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___string, 597);
3234 }
3235 REGB1 = ATTR_standard___string___Buffer____capacity(fra.me.REG[0]);
3236 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
3237 if (UNTAG_Bool(REGB2)) {
3238 } else {
3239 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3240 }
3241 /* ../lib/standard/kernel.nit:234 */
3242 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB1));
3243 /* ../lib/standard/string.nit:598 */
3244 if (UNTAG_Bool(REGB2)) {
3245 goto label1;
3246 }
3247 /* ../lib/standard/string.nit:599 */
3248 while(1) {
3249 REGB2 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
3250 if (UNTAG_Bool(REGB2)) {
3251 } else {
3252 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3253 }
3254 /* ../lib/standard/kernel.nit:234 */
3255 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB0));
3256 /* ../lib/standard/string.nit:599 */
3257 if (UNTAG_Bool(REGB2)) {
3258 REGB2 = TAG_Int(2);
3259 /* ../lib/standard/kernel.nit:241 */
3260 REGB2 = TAG_Int(UNTAG_Int(REGB1)*UNTAG_Int(REGB2));
3261 /* ../lib/standard/string.nit:599 */
3262 REGB3 = TAG_Int(2);
3263 /* ../lib/standard/kernel.nit:238 */
3264 REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
3265 /* ../lib/standard/string.nit:599 */
3266 REGB1 = REGB3;
3267 } else {
3268 goto label2;
3269 }
3270 }
3271 label2: while(0);
3272 /* ../lib/standard/string.nit:600 */
3273 REGB0 = TAG_Int(1);
3274 /* ../lib/standard/kernel.nit:238 */
3275 REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
3276 /* ../lib/standard/string.nit:972 */
3277 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB0) * sizeof(char))));
3278 /* ../lib/standard/string.nit:601 */
3279 REGB0 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3280 if (UNTAG_Bool(REGB0)) {
3281 } else {
3282 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 601);
3283 }
3284 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3285 /* ../lib/standard/collection/array.nit:24 */
3286 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3287 if (UNTAG_Bool(REGB0)) {
3288 } else {
3289 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3290 }
3291 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3292 /* ../lib/standard/string.nit:601 */
3293 REGB3 = TAG_Int(0);
3294 REGB2 = TAG_Int(0);
3295 /* ../lib/standard/string.nit:957 */
3296 (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB3), UNTAG_Int(REGB0));;
3297 /* ../lib/standard/string.nit:602 */
3298 ATTR_standard___string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1];
3299 /* ../lib/standard/string.nit:603 */
3300 ATTR_standard___string___Buffer____capacity(fra.me.REG[0]) = REGB1;
3301 label1: while(0);
3302 stack_frame_head = fra.me.prev;
3303 return;
3304 }
3305 static const char LOCATE_standard___string___Buffer___append[] = "string::Buffer::(abstract_collection::Sequence::append)";
3306 void standard___string___Buffer___append(val_t p0, val_t p1){
3307 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
3308 val_t REGB0;
3309 val_t REGB1;
3310 val_t REGB2;
3311 val_t REGB3;
3312 val_t tmp;
3313 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3314 fra.me.file = LOCATE_standard___string;
3315 fra.me.line = 606;
3316 fra.me.meth = LOCATE_standard___string___Buffer___append;
3317 fra.me.has_broke = 0;
3318 fra.me.REG_size = 6;
3319 fra.me.nitni_local_ref_head = NULL;
3320 fra.me.REG[0] = NIT_NULL;
3321 fra.me.REG[1] = NIT_NULL;
3322 fra.me.REG[2] = NIT_NULL;
3323 fra.me.REG[3] = NIT_NULL;
3324 fra.me.REG[4] = NIT_NULL;
3325 fra.me.REG[5] = NIT_NULL;
3326 fra.me.REG[0] = p0;
3327 fra.me.REG[1] = p1;
3328 /* ../lib/standard/string.nit:606 */
3329 fra.me.REG[2] = fra.me.REG[0];
3330 fra.me.REG[3] = fra.me.REG[1];
3331 /* ../lib/standard/string.nit:608 */
3332 REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[3], COLOR_standard___string___String, ID_standard___string___String)) /*cast String*/;
3333 if (UNTAG_Bool(REGB0)) {
3334 /* ../lib/standard/collection/array.nit:24 */
3335 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
3336 if (UNTAG_Bool(REGB0)) {
3337 } else {
3338 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3339 }
3340 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
3341 /* ../lib/standard/string.nit:610 */
3342 REGB1 = TAG_Bool(ATTR_standard___string___Buffer____capacity(fra.me.REG[2])!=NIT_NULL);
3343 if (UNTAG_Bool(REGB1)) {
3344 } else {
3345 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___string, 610);
3346 }
3347 REGB1 = ATTR_standard___string___Buffer____capacity(fra.me.REG[2]);
3348 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
3349 if (UNTAG_Bool(REGB2)) {
3350 } else {
3351 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 610);
3352 }
3353 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
3354 /* ../lib/standard/kernel.nit:238 */
3355 REGB2 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
3356 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
3357 if (UNTAG_Bool(REGB3)) {
3358 } else {
3359 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3360 }
3361 /* ../lib/standard/kernel.nit:235 */
3362 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
3363 /* ../lib/standard/string.nit:610 */
3364 if (UNTAG_Bool(REGB2)) {
3365 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
3366 if (UNTAG_Bool(REGB2)) {
3367 } else {
3368 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 610);
3369 }
3370 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
3371 /* ../lib/standard/kernel.nit:238 */
3372 REGB2 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
3373 /* ../lib/standard/string.nit:610 */
3374 CALL_standard___collection___array___AbstractArray___enlarge(fra.me.REG[2])(fra.me.REG[2], REGB2);
3375 }
3376 /* ../lib/standard/string.nit:611 */
3377 fra.me.REG[4] = CALL_standard___string___AbstractString___items(fra.me.REG[3])(fra.me.REG[3]);
3378 REGB2 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[2])!=NIT_NULL);
3379 if (UNTAG_Bool(REGB2)) {
3380 } else {
3381 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 611);
3382 }
3383 fra.me.REG[5] = ATTR_standard___string___AbstractString____items(fra.me.REG[2]);
3384 REGB2 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[3])!=NIT_NULL);
3385 if (UNTAG_Bool(REGB2)) {
3386 } else {
3387 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 611);
3388 }
3389 REGB2 = ATTR_standard___string___String____index_from(fra.me.REG[3]);
3390 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
3391 if (UNTAG_Bool(REGB1)) {
3392 } else {
3393 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 611);
3394 }
3395 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
3396 /* ../lib/standard/string.nit:957 */
3397 (void)memcpy(UNBOX_NativeString(fra.me.REG[5])+UNTAG_Int(REGB1), UNBOX_NativeString(fra.me.REG[4])+UNTAG_Int(REGB2), UNTAG_Int(REGB0));;
3398 /* ../lib/standard/string.nit:612 */
3399 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
3400 /* ../lib/standard/kernel.nit:238 */
3401 REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
3402 /* ../lib/standard/string.nit:612 */
3403 ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]) = REGB0;
3404 } else {
3405 /* ../lib/standard/string.nit:614 */
3406 CALL_SUPER_standard___string___Buffer___append(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
3407 }
3408 stack_frame_head = fra.me.prev;
3409 return;
3410 }
3411 static const char LOCATE_standard___string___Buffer___to_s[] = "string::Buffer::(string::Object::to_s)";
3412 val_t standard___string___Buffer___to_s(val_t p0){
3413 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
3414 val_t REGB0;
3415 val_t REGB1;
3416 val_t REGB2;
3417 val_t tmp;
3418 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3419 fra.me.file = LOCATE_standard___string;
3420 fra.me.line = 618;
3421 fra.me.meth = LOCATE_standard___string___Buffer___to_s;
3422 fra.me.has_broke = 0;
3423 fra.me.REG_size = 3;
3424 fra.me.nitni_local_ref_head = NULL;
3425 fra.me.REG[0] = NIT_NULL;
3426 fra.me.REG[1] = NIT_NULL;
3427 fra.me.REG[2] = NIT_NULL;
3428 fra.me.REG[0] = p0;
3429 /* ../lib/standard/collection/array.nit:24 */
3430 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3431 if (UNTAG_Bool(REGB0)) {
3432 } else {
3433 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3434 }
3435 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3436 /* ../lib/standard/string.nit:621 */
3437 REGB1 = TAG_Int(1);
3438 /* ../lib/standard/kernel.nit:238 */
3439 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
3440 /* ../lib/standard/string.nit:972 */
3441 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
3442 /* ../lib/standard/string.nit:622 */
3443 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3444 if (UNTAG_Bool(REGB1)) {
3445 } else {
3446 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 622);
3447 }
3448 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3449 REGB1 = TAG_Int(0);
3450 REGB2 = TAG_Int(0);
3451 /* ../lib/standard/string.nit:957 */
3452 (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB1), UNTAG_Int(REGB0));;
3453 /* ../lib/standard/collection/array.nit:24 */
3454 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3455 if (UNTAG_Bool(REGB2)) {
3456 } else {
3457 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3458 }
3459 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3460 /* ../lib/standard/string.nit:625 */
3461 REGB1 = TAG_Char('\0');
3462 /* ../lib/standard/string.nit:956 */
3463 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB2)]=UNTAG_Char(REGB1);;
3464 /* ../lib/standard/collection/array.nit:24 */
3465 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3466 if (UNTAG_Bool(REGB1)) {
3467 } else {
3468 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3469 }
3470 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3471 /* ../lib/standard/string.nit:627 */
3472 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB1);
3473 goto label1;
3474 label1: while(0);
3475 stack_frame_head = fra.me.prev;
3476 return fra.me.REG[1];
3477 }
3478 static const char LOCATE_standard___string___Buffer_____l[] = "string::Buffer::(kernel::Comparable::<)";
3479 val_t standard___string___Buffer_____l(val_t p0, val_t p1){
3480 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
3481 val_t REGB0;
3482 val_t REGB1;
3483 val_t REGB2;
3484 val_t REGB3;
3485 val_t REGB4;
3486 val_t REGB5;
3487 val_t REGB6;
3488 val_t tmp;
3489 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3490 fra.me.file = LOCATE_standard___string;
3491 fra.me.line = 630;
3492 fra.me.meth = LOCATE_standard___string___Buffer_____l;
3493 fra.me.has_broke = 0;
3494 fra.me.REG_size = 2;
3495 fra.me.nitni_local_ref_head = NULL;
3496 fra.me.REG[0] = NIT_NULL;
3497 fra.me.REG[1] = NIT_NULL;
3498 fra.me.REG[0] = p0;
3499 fra.me.REG[1] = p1;
3500 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*/;
3501 if (UNTAG_Bool(REGB0)) {
3502 } else {
3503 nit_abort("Cast failed", NULL, LOCATE_standard___string, 0);
3504 }
3505 /* ../lib/standard/string.nit:632 */
3506 REGB0 = TAG_Int(0);
3507 /* ../lib/standard/collection/array.nit:24 */
3508 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3509 if (UNTAG_Bool(REGB1)) {
3510 } else {
3511 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3512 }
3513 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3514 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
3515 if (UNTAG_Bool(REGB2)) {
3516 } else {
3517 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3518 }
3519 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
3520 /* ../lib/standard/string.nit:635 */
3521 while(1) {
3522 REGB3 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
3523 if (UNTAG_Bool(REGB3)) {
3524 } else {
3525 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3526 }
3527 /* ../lib/standard/kernel.nit:235 */
3528 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
3529 /* ../lib/standard/string.nit:635 */
3530 if (UNTAG_Bool(REGB3)) {
3531 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
3532 if (UNTAG_Bool(REGB3)) {
3533 } else {
3534 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3535 }
3536 /* ../lib/standard/kernel.nit:235 */
3537 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
3538 } else {
3539 /* ../lib/standard/string.nit:635 */
3540 REGB4 = TAG_Bool(0);
3541 REGB3 = REGB4;
3542 }
3543 if (UNTAG_Bool(REGB3)) {
3544 /* ../lib/standard/string.nit:636 */
3545 REGB3 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB0);
3546 /* ../lib/standard/kernel.nit:416 */
3547 REGB3 = TAG_Int((unsigned char)UNTAG_Char(REGB3));
3548 /* ../lib/standard/string.nit:637 */
3549 REGB4 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB0);
3550 /* ../lib/standard/kernel.nit:416 */
3551 REGB4 = TAG_Int((unsigned char)UNTAG_Char(REGB4));
3552 REGB5 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
3553 if (UNTAG_Bool(REGB5)) {
3554 } else {
3555 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3556 }
3557 /* ../lib/standard/kernel.nit:235 */
3558 REGB5 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
3559 /* ../lib/standard/string.nit:638 */
3560 if (UNTAG_Bool(REGB5)) {
3561 /* ../lib/standard/string.nit:639 */
3562 REGB5 = TAG_Bool(1);
3563 goto label1;
3564 } else {
3565 REGB6 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
3566 if (UNTAG_Bool(REGB6)) {
3567 } else {
3568 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3569 }
3570 /* ../lib/standard/kernel.nit:235 */
3571 REGB3 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB3));
3572 /* ../lib/standard/string.nit:640 */
3573 if (UNTAG_Bool(REGB3)) {
3574 /* ../lib/standard/string.nit:641 */
3575 REGB3 = TAG_Bool(0);
3576 REGB5 = REGB3;
3577 goto label1;
3578 }
3579 }
3580 /* ../lib/standard/string.nit:643 */
3581 REGB3 = TAG_Int(1);
3582 /* ../lib/standard/kernel.nit:238 */
3583 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
3584 /* ../lib/standard/string.nit:643 */
3585 REGB0 = REGB3;
3586 } else {
3587 /* ../lib/standard/string.nit:635 */
3588 goto label2;
3589 }
3590 }
3591 label2: while(0);
3592 REGB0 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
3593 if (UNTAG_Bool(REGB0)) {
3594 } else {
3595 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3596 }
3597 /* ../lib/standard/kernel.nit:235 */
3598 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
3599 /* ../lib/standard/string.nit:645 */
3600 if (UNTAG_Bool(REGB2)) {
3601 /* ../lib/standard/string.nit:646 */
3602 REGB2 = TAG_Bool(1);
3603 REGB5 = REGB2;
3604 goto label1;
3605 } else {
3606 /* ../lib/standard/string.nit:648 */
3607 REGB2 = TAG_Bool(0);
3608 REGB5 = REGB2;
3609 goto label1;
3610 }
3611 label1: while(0);
3612 stack_frame_head = fra.me.prev;
3613 return REGB5;
3614 }
3615 static const char LOCATE_standard___string___Buffer___init[] = "string::Buffer::init";
3616 void standard___string___Buffer___init(val_t p0, int* init_table){
3617 int itpos4 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string___Buffer].i;
3618 struct {struct stack_frame_t me;} fra;
3619 val_t REGB0;
3620 val_t tmp;
3621 if (init_table[itpos4]) return;
3622 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3623 fra.me.file = LOCATE_standard___string;
3624 fra.me.line = 652;
3625 fra.me.meth = LOCATE_standard___string___Buffer___init;
3626 fra.me.has_broke = 0;
3627 fra.me.REG_size = 1;
3628 fra.me.nitni_local_ref_head = NULL;
3629 fra.me.REG[0] = NIT_NULL;
3630 fra.me.REG[0] = p0;
3631 /* ../lib/standard/string.nit:655 */
3632 REGB0 = TAG_Int(5);
3633 CALL_standard___string___Buffer___with_capacity(fra.me.REG[0])(fra.me.REG[0], REGB0, init_table);
3634 stack_frame_head = fra.me.prev;
3635 init_table[itpos4] = 1;
3636 return;
3637 }
3638 static const char LOCATE_standard___string___Buffer___from[] = "string::Buffer::from";
3639 void standard___string___Buffer___from(val_t p0, val_t p1, int* init_table){
3640 int itpos5 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string___Buffer].i;
3641 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
3642 val_t REGB0;
3643 val_t REGB1;
3644 val_t REGB2;
3645 val_t tmp;
3646 if (init_table[itpos5]) return;
3647 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3648 fra.me.file = LOCATE_standard___string;
3649 fra.me.line = 658;
3650 fra.me.meth = LOCATE_standard___string___Buffer___from;
3651 fra.me.has_broke = 0;
3652 fra.me.REG_size = 4;
3653 fra.me.nitni_local_ref_head = NULL;
3654 fra.me.REG[0] = NIT_NULL;
3655 fra.me.REG[1] = NIT_NULL;
3656 fra.me.REG[2] = NIT_NULL;
3657 fra.me.REG[3] = NIT_NULL;
3658 fra.me.REG[0] = p0;
3659 fra.me.REG[1] = p1;
3660 /* ../lib/standard/collection/array.nit:24 */
3661 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
3662 if (UNTAG_Bool(REGB0)) {
3663 } else {
3664 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3665 }
3666 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
3667 /* ../lib/standard/string.nit:660 */
3668 REGB1 = TAG_Int(1);
3669 /* ../lib/standard/kernel.nit:238 */
3670 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
3671 /* ../lib/standard/string.nit:660 */
3672 ATTR_standard___string___Buffer____capacity(fra.me.REG[0]) = REGB1;
3673 /* ../lib/standard/collection/array.nit:24 */
3674 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
3675 if (UNTAG_Bool(REGB1)) {
3676 } else {
3677 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3678 }
3679 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
3680 /* ../lib/standard/string.nit:661 */
3681 ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]) = REGB1;
3682 /* ../lib/standard/string.nit:662 */
3683 REGB1 = TAG_Bool(ATTR_standard___string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
3684 if (UNTAG_Bool(REGB1)) {
3685 } else {
3686 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___string, 662);
3687 }
3688 REGB1 = ATTR_standard___string___Buffer____capacity(fra.me.REG[0]);
3689 /* ../lib/standard/string.nit:972 */
3690 fra.me.REG[2] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
3691 /* ../lib/standard/string.nit:662 */
3692 ATTR_standard___string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[2];
3693 /* ../lib/standard/string.nit:663 */
3694 fra.me.REG[2] = CALL_standard___string___AbstractString___items(fra.me.REG[1])(fra.me.REG[1]);
3695 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3696 if (UNTAG_Bool(REGB1)) {
3697 } else {
3698 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 663);
3699 }
3700 fra.me.REG[3] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3701 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3702 if (UNTAG_Bool(REGB1)) {
3703 } else {
3704 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 663);
3705 }
3706 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3707 REGB0 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[1])!=NIT_NULL);
3708 if (UNTAG_Bool(REGB0)) {
3709 } else {
3710 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 663);
3711 }
3712 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[1]);
3713 REGB2 = TAG_Int(0);
3714 /* ../lib/standard/string.nit:957 */
3715 (void)memcpy(UNBOX_NativeString(fra.me.REG[3])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB0), UNTAG_Int(REGB1));;
3716 stack_frame_head = fra.me.prev;
3717 init_table[itpos5] = 1;
3718 return;
3719 }
3720 static const char LOCATE_standard___string___Buffer___with_capacity[] = "string::Buffer::with_capacity";
3721 void standard___string___Buffer___with_capacity(val_t p0, val_t p1, int* init_table){
3722 int itpos6 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string___Buffer].i;
3723 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
3724 val_t REGB0;
3725 val_t REGB1;
3726 val_t REGB2;
3727 val_t tmp;
3728 if (init_table[itpos6]) return;
3729 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3730 fra.me.file = LOCATE_standard___string;
3731 fra.me.line = 666;
3732 fra.me.meth = LOCATE_standard___string___Buffer___with_capacity;
3733 fra.me.has_broke = 0;
3734 fra.me.REG_size = 2;
3735 fra.me.nitni_local_ref_head = NULL;
3736 fra.me.REG[0] = NIT_NULL;
3737 fra.me.REG[1] = NIT_NULL;
3738 fra.me.REG[0] = p0;
3739 REGB0 = p1;
3740 /* ../lib/standard/string.nit:669 */
3741 REGB1 = TAG_Int(0);
3742 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
3743 if (UNTAG_Bool(REGB2)) {
3744 } else {
3745 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3746 }
3747 /* ../lib/standard/kernel.nit:236 */
3748 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
3749 /* ../lib/standard/string.nit:669 */
3750 if (UNTAG_Bool(REGB1)) {
3751 } else {
3752 nit_abort("Assert failed", NULL, LOCATE_standard___string, 669);
3753 }
3754 /* ../lib/standard/string.nit:671 */
3755 REGB1 = TAG_Int(1);
3756 /* ../lib/standard/kernel.nit:238 */
3757 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
3758 /* ../lib/standard/string.nit:972 */
3759 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
3760 /* ../lib/standard/string.nit:671 */
3761 ATTR_standard___string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1];
3762 /* ../lib/standard/string.nit:672 */
3763 ATTR_standard___string___Buffer____capacity(fra.me.REG[0]) = REGB0;
3764 /* ../lib/standard/string.nit:673 */
3765 REGB0 = TAG_Int(0);
3766 ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0;
3767 stack_frame_head = fra.me.prev;
3768 init_table[itpos6] = 1;
3769 return;
3770 }
3771 static const char LOCATE_standard___string___Buffer_____eqeq[] = "string::Buffer::(kernel::Object::==)";
3772 val_t standard___string___Buffer_____eqeq(val_t p0, val_t p1){
3773 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
3774 val_t REGB0;
3775 val_t REGB1;
3776 val_t REGB2;
3777 val_t REGB3;
3778 val_t REGB4;
3779 val_t REGB5;
3780 val_t tmp;
3781 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3782 fra.me.file = LOCATE_standard___string;
3783 fra.me.line = 676;
3784 fra.me.meth = LOCATE_standard___string___Buffer_____eqeq;
3785 fra.me.has_broke = 0;
3786 fra.me.REG_size = 2;
3787 fra.me.nitni_local_ref_head = NULL;
3788 fra.me.REG[0] = NIT_NULL;
3789 fra.me.REG[1] = NIT_NULL;
3790 fra.me.REG[0] = p0;
3791 fra.me.REG[1] = p1;
3792 /* ../lib/standard/string.nit:678 */
3793 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*/;
3794 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
3795 if (UNTAG_Bool(REGB0)) {
3796 REGB0 = TAG_Bool(1);
3797 } else {
3798 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
3799 REGB0 = REGB1;
3800 }
3801 if (UNTAG_Bool(REGB0)) {
3802 REGB0 = TAG_Bool(0);
3803 goto label1;
3804 }
3805 /* ../lib/standard/collection/array.nit:24 */
3806 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3807 if (UNTAG_Bool(REGB1)) {
3808 } else {
3809 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3810 }
3811 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3812 /* ../lib/standard/string.nit:680 */
3813 REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
3814 if (UNTAG_Bool(REGB2)) {
3815 nit_abort("Reciever is null", NULL, LOCATE_standard___string, 680);
3816 }
3817 /* ../lib/standard/collection/array.nit:24 */
3818 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
3819 if (UNTAG_Bool(REGB2)) {
3820 } else {
3821 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3822 }
3823 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
3824 /* ../lib/standard/string.nit:680 */
3825 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1));
3826 if (UNTAG_Bool(REGB3)) {
3827 } else {
3828 /* ../lib/standard/kernel.nit:230 */
3829 REGB2 = TAG_Bool((REGB2)==(REGB1));
3830 /* ../lib/standard/string.nit:680 */
3831 REGB3 = REGB2;
3832 }
3833 REGB3 = TAG_Bool(!UNTAG_Bool(REGB3));
3834 if (UNTAG_Bool(REGB3)) {
3835 REGB3 = TAG_Bool(0);
3836 REGB0 = REGB3;
3837 goto label1;
3838 }
3839 /* ../lib/standard/string.nit:681 */
3840 REGB3 = TAG_Int(0);
3841 /* ../lib/standard/string.nit:682 */
3842 REGB2 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3843 if (UNTAG_Bool(REGB2)) {
3844 } else {
3845 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 682);
3846 }
3847 fra.me.REG[0] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3848 /* ../lib/standard/string.nit:683 */
3849 REGB2 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
3850 if (UNTAG_Bool(REGB2)) {
3851 } else {
3852 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 683);
3853 }
3854 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[1]);
3855 /* ../lib/standard/string.nit:684 */
3856 while(1) {
3857 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
3858 if (UNTAG_Bool(REGB2)) {
3859 } else {
3860 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3861 }
3862 /* ../lib/standard/kernel.nit:235 */
3863 REGB2 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB1));
3864 /* ../lib/standard/string.nit:684 */
3865 if (UNTAG_Bool(REGB2)) {
3866 /* ../lib/standard/string.nit:955 */
3867 REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB3)]);
3868 REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB3)]);
3869 /* ../lib/standard/string.nit:685 */
3870 REGB5 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB4));
3871 if (UNTAG_Bool(REGB5)) {
3872 } else {
3873 /* ../lib/standard/kernel.nit:381 */
3874 REGB4 = TAG_Bool((REGB2)==(REGB4));
3875 /* ../lib/standard/string.nit:685 */
3876 REGB5 = REGB4;
3877 }
3878 REGB5 = TAG_Bool(!UNTAG_Bool(REGB5));
3879 if (UNTAG_Bool(REGB5)) {
3880 REGB5 = TAG_Bool(0);
3881 REGB0 = REGB5;
3882 goto label1;
3883 }
3884 /* ../lib/standard/string.nit:686 */
3885 REGB5 = TAG_Int(1);
3886 /* ../lib/standard/kernel.nit:238 */
3887 REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB5));
3888 /* ../lib/standard/string.nit:686 */
3889 REGB3 = REGB5;
3890 } else {
3891 /* ../lib/standard/string.nit:684 */
3892 goto label2;
3893 }
3894 }
3895 label2: while(0);
3896 /* ../lib/standard/string.nit:688 */
3897 REGB3 = TAG_Bool(1);
3898 REGB0 = REGB3;
3899 goto label1;
3900 label1: while(0);
3901 stack_frame_head = fra.me.prev;
3902 return REGB0;
3903 }
3904 static const char LOCATE_standard___string___Buffer___capacity[] = "string::Buffer::capacity";
3905 val_t standard___string___Buffer___capacity(val_t p0){
3906 struct {struct stack_frame_t me;} fra;
3907 val_t REGB0;
3908 val_t tmp;
3909 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3910 fra.me.file = LOCATE_standard___string;
3911 fra.me.line = 691;
3912 fra.me.meth = LOCATE_standard___string___Buffer___capacity;
3913 fra.me.has_broke = 0;
3914 fra.me.REG_size = 1;
3915 fra.me.nitni_local_ref_head = NULL;
3916 fra.me.REG[0] = NIT_NULL;
3917 fra.me.REG[0] = p0;
3918 /* ../lib/standard/string.nit:691 */
3919 REGB0 = TAG_Bool(ATTR_standard___string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
3920 if (UNTAG_Bool(REGB0)) {
3921 } else {
3922 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___string, 691);
3923 }
3924 REGB0 = ATTR_standard___string___Buffer____capacity(fra.me.REG[0]);
3925 stack_frame_head = fra.me.prev;
3926 return REGB0;
3927 }
3928 static const char LOCATE_standard___string___Object___to_s[] = "string::Object::to_s";
3929 val_t standard___string___Object___to_s(val_t p0){
3930 struct {struct stack_frame_t me;} fra;
3931 val_t tmp;
3932 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3933 fra.me.file = LOCATE_standard___string;
3934 fra.me.line = 699;
3935 fra.me.meth = LOCATE_standard___string___Object___to_s;
3936 fra.me.has_broke = 0;
3937 fra.me.REG_size = 1;
3938 fra.me.nitni_local_ref_head = NULL;
3939 fra.me.REG[0] = NIT_NULL;
3940 fra.me.REG[0] = p0;
3941 /* ../lib/standard/string.nit:700 */
3942 fra.me.REG[0] = CALL_standard___string___Object___inspect(fra.me.REG[0])(fra.me.REG[0]);
3943 goto label1;
3944 label1: while(0);
3945 stack_frame_head = fra.me.prev;
3946 return fra.me.REG[0];
3947 }
3948 static const char LOCATE_standard___string___Object___native_class_name[] = "string::Object::native_class_name";
3949 val_t standard___string___Object___native_class_name(val_t p0){
3950 struct {struct stack_frame_t me;} fra;
3951 val_t tmp;
3952 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3953 fra.me.file = LOCATE_standard___string;
3954 fra.me.line = 702;
3955 fra.me.meth = LOCATE_standard___string___Object___native_class_name;
3956 fra.me.has_broke = 0;
3957 fra.me.REG_size = 1;
3958 fra.me.nitni_local_ref_head = NULL;
3959 fra.me.REG[0] = NIT_NULL;
3960 fra.me.REG[0] = p0;
3961 /* ../lib/standard/string.nit:702 */
3962 fra.me.REG[0] = BOX_NativeString(VAL2VFT(fra.me.REG[0])[2].cname);;
3963 stack_frame_head = fra.me.prev;
3964 return fra.me.REG[0];
3965 }
3966 static const char LOCATE_standard___string___Object___class_name[] = "string::Object::class_name";
3967 val_t standard___string___Object___class_name(val_t p0){
3968 struct {struct stack_frame_t me;} fra;
3969 val_t tmp;
3970 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3971 fra.me.file = LOCATE_standard___string;
3972 fra.me.line = 705;
3973 fra.me.meth = LOCATE_standard___string___Object___class_name;
3974 fra.me.has_broke = 0;
3975 fra.me.REG_size = 1;
3976 fra.me.nitni_local_ref_head = NULL;
3977 fra.me.REG[0] = NIT_NULL;
3978 fra.me.REG[0] = p0;
3979 /* ../lib/standard/string.nit:709 */
3980 fra.me.REG[0] = CALL_standard___string___Object___native_class_name(fra.me.REG[0])(fra.me.REG[0]);
3981 fra.me.REG[0] = NEW_String_standard___string___String___from_cstring(fra.me.REG[0]);
3982 goto label1;
3983 label1: while(0);
3984 stack_frame_head = fra.me.prev;
3985 return fra.me.REG[0];
3986 }
3987 static const char LOCATE_standard___string___Object___inspect[] = "string::Object::inspect";
3988 val_t standard___string___Object___inspect(val_t p0){
3989 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
3990 val_t REGB0;
3991 val_t tmp;
3992 static val_t once_value_1; /* Once value */
3993 static val_t once_value_2; /* Once value */
3994 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3995 fra.me.file = LOCATE_standard___string;
3996 fra.me.line = 711;
3997 fra.me.meth = LOCATE_standard___string___Object___inspect;
3998 fra.me.has_broke = 0;
3999 fra.me.REG_size = 3;
4000 fra.me.nitni_local_ref_head = NULL;
4001 fra.me.REG[0] = NIT_NULL;
4002 fra.me.REG[1] = NIT_NULL;
4003 fra.me.REG[2] = NIT_NULL;
4004 fra.me.REG[0] = p0;
4005 /* ../lib/standard/string.nit:715 */
4006 REGB0 = TAG_Int(3);
4007 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
4008 if (!once_value_1) {
4009 fra.me.REG[2] = BOX_NativeString("<");
4010 REGB0 = TAG_Int(1);
4011 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
4012 once_value_1 = fra.me.REG[2];
4013 register_static_object(&once_value_1);
4014 } else fra.me.REG[2] = once_value_1;
4015 fra.me.REG[2] = fra.me.REG[2];
4016 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
4017 fra.me.REG[0] = CALL_standard___string___Object___inspect_head(fra.me.REG[0])(fra.me.REG[0]);
4018 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
4019 if (!once_value_2) {
4020 fra.me.REG[0] = BOX_NativeString(">");
4021 REGB0 = TAG_Int(1);
4022 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
4023 once_value_2 = fra.me.REG[0];
4024 register_static_object(&once_value_2);
4025 } else fra.me.REG[0] = once_value_2;
4026 fra.me.REG[0] = fra.me.REG[0];
4027 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
4028 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
4029 goto label3;
4030 label3: while(0);
4031 stack_frame_head = fra.me.prev;
4032 return fra.me.REG[1];
4033 }
4034 static const char LOCATE_standard___string___Object___inspect_head[] = "string::Object::inspect_head";
4035 val_t standard___string___Object___inspect_head(val_t p0){
4036 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
4037 val_t REGB0;
4038 val_t tmp;
4039 static val_t once_value_1; /* Once value */
4040 static val_t once_value_2; /* Once value */
4041 static val_t once_value_3; /* Once value */
4042 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4043 fra.me.file = LOCATE_standard___string;
4044 fra.me.line = 718;
4045 fra.me.meth = LOCATE_standard___string___Object___inspect_head;
4046 fra.me.has_broke = 0;
4047 fra.me.REG_size = 3;
4048 fra.me.nitni_local_ref_head = NULL;
4049 fra.me.REG[0] = NIT_NULL;
4050 fra.me.REG[1] = NIT_NULL;
4051 fra.me.REG[2] = NIT_NULL;
4052 fra.me.REG[0] = p0;
4053 /* ../lib/standard/string.nit:722 */
4054 REGB0 = TAG_Int(5);
4055 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
4056 if (!once_value_1) {
4057 fra.me.REG[2] = BOX_NativeString("");
4058 REGB0 = TAG_Int(0);
4059 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
4060 once_value_1 = fra.me.REG[2];
4061 register_static_object(&once_value_1);
4062 } else fra.me.REG[2] = once_value_1;
4063 fra.me.REG[2] = fra.me.REG[2];
4064 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
4065 fra.me.REG[2] = CALL_standard___string___Object___class_name(fra.me.REG[0])(fra.me.REG[0]);
4066 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
4067 if (!once_value_2) {
4068 fra.me.REG[2] = BOX_NativeString(":#");
4069 REGB0 = TAG_Int(2);
4070 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
4071 once_value_2 = fra.me.REG[2];
4072 register_static_object(&once_value_2);
4073 } else fra.me.REG[2] = once_value_2;
4074 fra.me.REG[2] = fra.me.REG[2];
4075 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
4076 REGB0 = CALL_standard___kernel___Object___object_id(fra.me.REG[0])(fra.me.REG[0]);
4077 fra.me.REG[0] = CALL_standard___string___Int___to_hex(REGB0)(REGB0);
4078 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
4079 if (!once_value_3) {
4080 fra.me.REG[0] = BOX_NativeString("");
4081 REGB0 = TAG_Int(0);
4082 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
4083 once_value_3 = fra.me.REG[0];
4084 register_static_object(&once_value_3);
4085 } else fra.me.REG[0] = once_value_3;
4086 fra.me.REG[0] = fra.me.REG[0];
4087 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
4088 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
4089 goto label4;
4090 label4: while(0);
4091 stack_frame_head = fra.me.prev;
4092 return fra.me.REG[1];
4093 }
4094 static const char LOCATE_standard___string___Object___args[] = "string::Object::args";
4095 val_t standard___string___Object___args(val_t p0){
4096 struct {struct stack_frame_t me;} fra;
4097 val_t tmp;
4098 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4099 fra.me.file = LOCATE_standard___string;
4100 fra.me.line = 725;
4101 fra.me.meth = LOCATE_standard___string___Object___args;
4102 fra.me.has_broke = 0;
4103 fra.me.REG_size = 1;
4104 fra.me.nitni_local_ref_head = NULL;
4105 fra.me.REG[0] = NIT_NULL;
4106 fra.me.REG[0] = p0;
4107 /* ../lib/standard/string.nit:727 */
4108 fra.me.REG[0] = CALL_standard___kernel___Object___sys(fra.me.REG[0])(fra.me.REG[0]);
4109 fra.me.REG[0] = CALL_standard___string___Object___args(fra.me.REG[0])(fra.me.REG[0]);
4110 goto label1;
4111 label1: while(0);
4112 stack_frame_head = fra.me.prev;
4113 return fra.me.REG[0];
4114 }
4115 static const char LOCATE_standard___string___Bool___to_s[] = "string::Bool::(string::Object::to_s)";
4116 val_t standard___string___Bool___to_s(val_t p0){
4117 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
4118 val_t REGB0;
4119 val_t tmp;
4120 static val_t once_value_1; /* Once value */
4121 static val_t once_value_2; /* Once value */
4122 static val_t once_value_4; /* Once value */
4123 static val_t once_value_5; /* Once value */
4124 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4125 fra.me.file = LOCATE_standard___string;
4126 fra.me.line = 732;
4127 fra.me.meth = LOCATE_standard___string___Bool___to_s;
4128 fra.me.has_broke = 0;
4129 fra.me.REG_size = 2;
4130 fra.me.nitni_local_ref_head = NULL;
4131 fra.me.REG[0] = NIT_NULL;
4132 fra.me.REG[1] = NIT_NULL;
4133 REGB0 = p0;
4134 /* ../lib/standard/string.nit:734 */
4135 if (UNTAG_Bool(REGB0)) {
4136 /* ../lib/standard/string.nit:735 */
4137 if (!once_value_1) {
4138 if (!once_value_2) {
4139 fra.me.REG[0] = BOX_NativeString("true");
4140 REGB0 = TAG_Int(4);
4141 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
4142 once_value_2 = fra.me.REG[0];
4143 register_static_object(&once_value_2);
4144 } else fra.me.REG[0] = once_value_2;
4145 fra.me.REG[0] = fra.me.REG[0];
4146 once_value_1 = fra.me.REG[0];
4147 register_static_object(&once_value_1);
4148 } else fra.me.REG[0] = once_value_1;
4149 fra.me.REG[0] = fra.me.REG[0];
4150 goto label3;
4151 } else {
4152 /* ../lib/standard/string.nit:737 */
4153 if (!once_value_4) {
4154 if (!once_value_5) {
4155 fra.me.REG[1] = BOX_NativeString("false");
4156 REGB0 = TAG_Int(5);
4157 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB0);
4158 once_value_5 = fra.me.REG[1];
4159 register_static_object(&once_value_5);
4160 } else fra.me.REG[1] = once_value_5;
4161 fra.me.REG[1] = fra.me.REG[1];
4162 once_value_4 = fra.me.REG[1];
4163 register_static_object(&once_value_4);
4164 } else fra.me.REG[1] = once_value_4;
4165 fra.me.REG[1] = fra.me.REG[1];
4166 fra.me.REG[0] = fra.me.REG[1];
4167 goto label3;
4168 }
4169 label3: while(0);
4170 stack_frame_head = fra.me.prev;
4171 return fra.me.REG[0];
4172 }
4173 static const char LOCATE_standard___string___Int___fill_buffer[] = "string::Int::fill_buffer";
4174 void standard___string___Int___fill_buffer(val_t p0, val_t p1, val_t p2, val_t p3){
4175 struct {struct stack_frame_t me;} fra;
4176 val_t REGB0;
4177 val_t REGB1;
4178 val_t REGB2;
4179 val_t REGB3;
4180 val_t REGB4;
4181 val_t tmp;
4182 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4183 fra.me.file = LOCATE_standard___string;
4184 fra.me.line = 743;
4185 fra.me.meth = LOCATE_standard___string___Int___fill_buffer;
4186 fra.me.has_broke = 0;
4187 fra.me.REG_size = 1;
4188 fra.me.nitni_local_ref_head = NULL;
4189 fra.me.REG[0] = NIT_NULL;
4190 REGB0 = p0;
4191 fra.me.REG[0] = p1;
4192 REGB1 = p2;
4193 REGB2 = p3;
4194 /* ../lib/standard/string.nit:749 */
4195 REGB2 = TAG_Int(0);
4196 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4197 if (UNTAG_Bool(REGB3)) {
4198 } else {
4199 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4200 }
4201 /* ../lib/standard/kernel.nit:235 */
4202 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
4203 /* ../lib/standard/string.nit:749 */
4204 if (UNTAG_Bool(REGB2)) {
4205 /* ../lib/standard/kernel.nit:239 */
4206 REGB2 = TAG_Int(-UNTAG_Int(REGB0));
4207 /* ../lib/standard/string.nit:751 */
4208 REGB3 = TAG_Int(0);
4209 REGB4 = TAG_Char('-');
4210 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB3, REGB4);
4211 } else {
4212 /* ../lib/standard/string.nit:752 */
4213 REGB4 = TAG_Int(0);
4214 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB4));
4215 if (UNTAG_Bool(REGB3)) {
4216 } else {
4217 /* ../lib/standard/kernel.nit:230 */
4218 REGB4 = TAG_Bool((REGB0)==(REGB4));
4219 /* ../lib/standard/string.nit:752 */
4220 REGB3 = REGB4;
4221 }
4222 if (UNTAG_Bool(REGB3)) {
4223 /* ../lib/standard/string.nit:753 */
4224 REGB3 = TAG_Int(0);
4225 REGB4 = TAG_Char('0');
4226 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB3, REGB4);
4227 /* ../lib/standard/string.nit:754 */
4228 goto label1;
4229 } else {
4230 /* ../lib/standard/string.nit:756 */
4231 REGB2 = REGB0;
4232 }
4233 }
4234 /* ../lib/standard/string.nit:759 */
4235 REGB0 = CALL_standard___kernel___Int___digit_count(REGB0)(REGB0, REGB1);
4236 REGB4 = TAG_Int(1);
4237 /* ../lib/standard/kernel.nit:240 */
4238 REGB4 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB4));
4239 /* ../lib/standard/string.nit:760 */
4240 while(1) {
4241 REGB0 = TAG_Int(0);
4242 REGB3 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
4243 if (UNTAG_Bool(REGB3)) {
4244 } else {
4245 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4246 }
4247 /* ../lib/standard/kernel.nit:236 */
4248 REGB0 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB0));
4249 /* ../lib/standard/string.nit:760 */
4250 if (UNTAG_Bool(REGB0)) {
4251 REGB0 = TAG_Int(0);
4252 REGB3 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
4253 if (UNTAG_Bool(REGB3)) {
4254 } else {
4255 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4256 }
4257 /* ../lib/standard/kernel.nit:237 */
4258 REGB0 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB0));
4259 } else {
4260 /* ../lib/standard/string.nit:760 */
4261 REGB3 = TAG_Bool(0);
4262 REGB0 = REGB3;
4263 }
4264 if (UNTAG_Bool(REGB0)) {
4265 /* ../lib/standard/kernel.nit:243 */
4266 REGB0 = TAG_Int(UNTAG_Int(REGB2)%UNTAG_Int(REGB1));
4267 /* ../lib/standard/string.nit:761 */
4268 REGB0 = CALL_standard___kernel___Int___to_c(REGB0)(REGB0);
4269 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB4, REGB0);
4270 /* ../lib/standard/kernel.nit:242 */
4271 REGB0 = TAG_Int(UNTAG_Int(REGB2)/UNTAG_Int(REGB1));
4272 /* ../lib/standard/string.nit:762 */
4273 REGB2 = REGB0;
4274 /* ../lib/standard/string.nit:763 */
4275 REGB0 = TAG_Int(1);
4276 /* ../lib/standard/kernel.nit:240 */
4277 REGB0 = TAG_Int(UNTAG_Int(REGB4)-UNTAG_Int(REGB0));
4278 /* ../lib/standard/string.nit:763 */
4279 REGB4 = REGB0;
4280 } else {
4281 /* ../lib/standard/string.nit:760 */
4282 goto label2;
4283 }
4284 }
4285 label2: while(0);
4286 label1: while(0);
4287 stack_frame_head = fra.me.prev;
4288 return;
4289 }
4290 static const char LOCATE_standard___string___Int___to_s[] = "string::Int::(string::Object::to_s)";
4291 val_t standard___string___Int___to_s(val_t p0){
4292 struct {struct stack_frame_t me;} fra;
4293 val_t REGB0;
4294 val_t REGB1;
4295 val_t REGB2;
4296 val_t tmp;
4297 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4298 fra.me.file = LOCATE_standard___string;
4299 fra.me.line = 767;
4300 fra.me.meth = LOCATE_standard___string___Int___to_s;
4301 fra.me.has_broke = 0;
4302 fra.me.REG_size = 1;
4303 fra.me.nitni_local_ref_head = NULL;
4304 fra.me.REG[0] = NIT_NULL;
4305 REGB0 = p0;
4306 /* ../lib/standard/string.nit:768 */
4307 REGB1 = TAG_Int(10);
4308 REGB2 = TAG_Bool(1);
4309 fra.me.REG[0] = CALL_standard___string___Int___to_base(REGB0)(REGB0, REGB1, REGB2);
4310 goto label1;
4311 label1: while(0);
4312 stack_frame_head = fra.me.prev;
4313 return fra.me.REG[0];
4314 }
4315 static const char LOCATE_standard___string___Int___to_hex[] = "string::Int::to_hex";
4316 val_t standard___string___Int___to_hex(val_t p0){
4317 struct {struct stack_frame_t me;} fra;
4318 val_t REGB0;
4319 val_t REGB1;
4320 val_t REGB2;
4321 val_t tmp;
4322 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4323 fra.me.file = LOCATE_standard___string;
4324 fra.me.line = 770;
4325 fra.me.meth = LOCATE_standard___string___Int___to_hex;
4326 fra.me.has_broke = 0;
4327 fra.me.REG_size = 1;
4328 fra.me.nitni_local_ref_head = NULL;
4329 fra.me.REG[0] = NIT_NULL;
4330 REGB0 = p0;
4331 /* ../lib/standard/string.nit:771 */
4332 REGB1 = TAG_Int(16);
4333 REGB2 = TAG_Bool(0);
4334 fra.me.REG[0] = CALL_standard___string___Int___to_base(REGB0)(REGB0, REGB1, REGB2);
4335 goto label1;
4336 label1: while(0);
4337 stack_frame_head = fra.me.prev;
4338 return fra.me.REG[0];
4339 }
4340 static const char LOCATE_standard___string___Int___to_base[] = "string::Int::to_base";
4341 val_t standard___string___Int___to_base(val_t p0, val_t p1, val_t p2){
4342 struct {struct stack_frame_t me;} fra;
4343 val_t REGB0;
4344 val_t REGB1;
4345 val_t REGB2;
4346 val_t REGB3;
4347 val_t REGB4;
4348 val_t tmp;
4349 static val_t once_value_1; /* Once value */
4350 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4351 fra.me.file = LOCATE_standard___string;
4352 fra.me.line = 773;
4353 fra.me.meth = LOCATE_standard___string___Int___to_base;
4354 fra.me.has_broke = 0;
4355 fra.me.REG_size = 1;
4356 fra.me.nitni_local_ref_head = NULL;
4357 fra.me.REG[0] = NIT_NULL;
4358 REGB0 = p0;
4359 REGB1 = p1;
4360 REGB2 = p2;
4361 /* ../lib/standard/string.nit:776 */
4362 REGB3 = CALL_standard___kernel___Int___digit_count(REGB0)(REGB0, REGB1);
4363 /* ../lib/standard/string.nit:777 */
4364 if (!once_value_1) {
4365 fra.me.REG[0] = BOX_NativeString(" ");
4366 REGB4 = TAG_Int(1);
4367 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB4);
4368 once_value_1 = fra.me.REG[0];
4369 register_static_object(&once_value_1);
4370 } else fra.me.REG[0] = once_value_1;
4371 fra.me.REG[0] = fra.me.REG[0];
4372 fra.me.REG[0] = CALL_standard___string___String_____star(fra.me.REG[0])(fra.me.REG[0], REGB3);
4373 fra.me.REG[0] = NEW_Buffer_standard___string___Buffer___from(fra.me.REG[0]);
4374 /* ../lib/standard/string.nit:778 */
4375 CALL_standard___string___Int___fill_buffer(REGB0)(REGB0, fra.me.REG[0], REGB1, REGB2);
4376 /* ../lib/standard/string.nit:779 */
4377 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
4378 goto label2;
4379 label2: while(0);
4380 stack_frame_head = fra.me.prev;
4381 return fra.me.REG[0];
4382 }
4383 static const char LOCATE_standard___string___Float___to_s[] = "string::Float::(string::Object::to_s)";
4384 val_t standard___string___Float___to_s(val_t p0){
4385 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
4386 val_t REGB0;
4387 val_t REGB1;
4388 val_t REGB2;
4389 val_t REGB3;
4390 val_t REGB4;
4391 val_t REGB5;
4392 val_t REGB6;
4393 val_t tmp;
4394 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4395 fra.me.file = LOCATE_standard___string;
4396 fra.me.line = 784;
4397 fra.me.meth = LOCATE_standard___string___Float___to_s;
4398 fra.me.has_broke = 0;
4399 fra.me.REG_size = 3;
4400 fra.me.nitni_local_ref_head = NULL;
4401 fra.me.REG[0] = NIT_NULL;
4402 fra.me.REG[1] = NIT_NULL;
4403 fra.me.REG[2] = NIT_NULL;
4404 fra.me.REG[0] = p0;
4405 /* ../lib/standard/string.nit:786 */
4406 REGB0 = TAG_Int(3);
4407 fra.me.REG[0] = CALL_standard___string___Float___to_precision(fra.me.REG[0])(fra.me.REG[0], REGB0);
4408 /* ../lib/standard/collection/array.nit:24 */
4409 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
4410 if (UNTAG_Bool(REGB0)) {
4411 } else {
4412 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
4413 }
4414 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
4415 /* ../lib/standard/string.nit:788 */
4416 REGB1 = TAG_Int(0);
4417 REGB2 = TAG_Int(1);
4418 /* ../lib/standard/kernel.nit:240 */
4419 REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
4420 /* ../lib/standard/kernel.nit:344 */
4421 while(1) {
4422 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
4423 if (UNTAG_Bool(REGB3)) {
4424 } else {
4425 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4426 }
4427 /* ../lib/standard/kernel.nit:234 */
4428 REGB3 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB2));
4429 /* ../lib/standard/kernel.nit:344 */
4430 if (UNTAG_Bool(REGB3)) {
4431 /* ../lib/standard/string.nit:788 */
4432 REGB3 = REGB1;
4433 /* ../lib/standard/string.nit:789 */
4434 REGB4 = TAG_Int(1);
4435 /* ../lib/standard/kernel.nit:240 */
4436 REGB4 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB4));
4437 REGB3 = TAG_Int(UNTAG_Int(REGB4)-UNTAG_Int(REGB3));
4438 /* ../lib/standard/string.nit:790 */
4439 REGB4 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB3);
4440 /* ../lib/standard/string.nit:791 */
4441 REGB5 = TAG_Char('0');
4442 REGB6 = TAG_Bool(IS_EQUAL_OO(REGB4,REGB5));
4443 if (UNTAG_Bool(REGB6)) {
4444 } else {
4445 /* ../lib/standard/kernel.nit:381 */
4446 REGB5 = TAG_Bool((REGB4)==(REGB5));
4447 /* ../lib/standard/string.nit:791 */
4448 REGB6 = REGB5;
4449 }
4450 if (UNTAG_Bool(REGB6)) {
4451 /* ../lib/standard/string.nit:792 */
4452 goto label1;
4453 } else {
4454 /* ../lib/standard/string.nit:793 */
4455 REGB6 = TAG_Char('.');
4456 REGB5 = TAG_Bool(IS_EQUAL_OO(REGB4,REGB6));
4457 if (UNTAG_Bool(REGB5)) {
4458 } else {
4459 /* ../lib/standard/kernel.nit:381 */
4460 REGB6 = TAG_Bool((REGB4)==(REGB6));
4461 /* ../lib/standard/string.nit:793 */
4462 REGB5 = REGB6;
4463 }
4464 if (UNTAG_Bool(REGB5)) {
4465 /* ../lib/standard/string.nit:794 */
4466 REGB5 = TAG_Int(0);
4467 REGB6 = TAG_Int(2);
4468 /* ../lib/standard/kernel.nit:238 */
4469 REGB6 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB6));
4470 /* ../lib/standard/string.nit:794 */
4471 fra.me.REG[1] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB5, REGB6);
4472 goto label2;
4473 } else {
4474 /* ../lib/standard/string.nit:796 */
4475 REGB6 = TAG_Int(0);
4476 REGB5 = TAG_Int(1);
4477 /* ../lib/standard/kernel.nit:238 */
4478 REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB5));
4479 /* ../lib/standard/string.nit:796 */
4480 fra.me.REG[2] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB6, REGB5);
4481 fra.me.REG[1] = fra.me.REG[2];
4482 goto label2;
4483 }
4484 }
4485 label1: while(0);
4486 /* ../lib/standard/kernel.nit:346 */
4487 REGB5 = TAG_Int(1);
4488 /* ../lib/standard/kernel.nit:238 */
4489 REGB5 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB5));
4490 /* ../lib/standard/kernel.nit:346 */
4491 REGB1 = REGB5;
4492 } else {
4493 /* ../lib/standard/kernel.nit:344 */
4494 goto label3;
4495 }
4496 }
4497 label3: while(0);
4498 /* ../lib/standard/string.nit:799 */
4499 fra.me.REG[1] = fra.me.REG[0];
4500 goto label2;
4501 label2: while(0);
4502 stack_frame_head = fra.me.prev;
4503 return fra.me.REG[1];
4504 }
4505 static const char LOCATE_standard___string___Float___to_precision[] = "string::Float::to_precision";
4506 val_t standard___string___Float___to_precision(val_t p0, val_t p1){
4507 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
4508 val_t REGB0;
4509 val_t REGB1;
4510 val_t REGB2;
4511 val_t REGB3;
4512 val_t tmp;
4513 static val_t once_value_3; /* Once value */
4514 static val_t once_value_4; /* Once value */
4515 static val_t once_value_5; /* Once value */
4516 static val_t once_value_6; /* Once value */
4517 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4518 fra.me.file = LOCATE_standard___string;
4519 fra.me.line = 802;
4520 fra.me.meth = LOCATE_standard___string___Float___to_precision;
4521 fra.me.has_broke = 0;
4522 fra.me.REG_size = 5;
4523 fra.me.nitni_local_ref_head = NULL;
4524 fra.me.REG[0] = NIT_NULL;
4525 fra.me.REG[1] = NIT_NULL;
4526 fra.me.REG[2] = NIT_NULL;
4527 fra.me.REG[3] = NIT_NULL;
4528 fra.me.REG[4] = NIT_NULL;
4529 fra.me.REG[0] = p0;
4530 REGB0 = p1;
4531 /* ../lib/standard/string.nit:805 */
4532 REGB1 = TAG_Int(0);
4533 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
4534 if (UNTAG_Bool(REGB2)) {
4535 } else {
4536 /* ../lib/standard/kernel.nit:230 */
4537 REGB1 = TAG_Bool((REGB0)==(REGB1));
4538 /* ../lib/standard/string.nit:805 */
4539 REGB2 = REGB1;
4540 }
4541 if (UNTAG_Bool(REGB2)) {
4542 /* ../lib/standard/kernel.nit:219 */
4543 REGB2 = TAG_Int((bigint)UNBOX_Float(fra.me.REG[0]));
4544 /* ../lib/standard/string.nit:805 */
4545 fra.me.REG[1] = CALL_standard___string___Object___to_s(REGB2)(REGB2);
4546 goto label1;
4547 }
4548 /* ../lib/standard/string.nit:806 */
4549 fra.me.REG[2] = fra.me.REG[0];
4550 /* ../lib/standard/string.nit:807 */
4551 REGB2 = TAG_Int(0);
4552 /* ../lib/standard/kernel.nit:350 */
4553 REGB1 = REGB0;
4554 /* ../lib/standard/kernel.nit:355 */
4555 while(1) {
4556 REGB3 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
4557 if (UNTAG_Bool(REGB3)) {
4558 } else {
4559 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4560 }
4561 /* ../lib/standard/kernel.nit:235 */
4562 REGB3 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB1));
4563 /* ../lib/standard/kernel.nit:355 */
4564 if (UNTAG_Bool(REGB3)) {
4565 /* ../lib/standard/string.nit:807 */
4566 fra.me.REG[3] = BOX_Float(10.0);
4567 /* ../lib/standard/kernel.nit:216 */
4568 fra.me.REG[3] = BOX_Float(UNBOX_Float(fra.me.REG[2])*UNBOX_Float(fra.me.REG[3]));
4569 /* ../lib/standard/string.nit:807 */
4570 fra.me.REG[2] = fra.me.REG[3];
4571 /* ../lib/standard/kernel.nit:357 */
4572 REGB3 = TAG_Int(1);
4573 /* ../lib/standard/kernel.nit:238 */
4574 REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
4575 /* ../lib/standard/kernel.nit:357 */
4576 REGB2 = REGB3;
4577 } else {
4578 /* ../lib/standard/kernel.nit:355 */
4579 goto label2;
4580 }
4581 }
4582 label2: while(0);
4583 /* ../lib/standard/string.nit:808 */
4584 fra.me.REG[3] = BOX_Float(0.0);
4585 /* ../lib/standard/kernel.nit:212 */
4586 REGB2 = TAG_Bool(UNBOX_Float(fra.me.REG[0])>UNBOX_Float(fra.me.REG[3]));
4587 /* ../lib/standard/string.nit:808 */
4588 if (UNTAG_Bool(REGB2)) {
4589 /* ../lib/standard/string.nit:809 */
4590 fra.me.REG[3] = BOX_Float(0.5);
4591 /* ../lib/standard/kernel.nit:213 */
4592 fra.me.REG[3] = BOX_Float(UNBOX_Float(fra.me.REG[2])+UNBOX_Float(fra.me.REG[3]));
4593 /* ../lib/standard/string.nit:809 */
4594 fra.me.REG[2] = fra.me.REG[3];
4595 } else {
4596 /* ../lib/standard/string.nit:811 */
4597 fra.me.REG[3] = BOX_Float(0.5);
4598 /* ../lib/standard/kernel.nit:215 */
4599 fra.me.REG[3] = BOX_Float(UNBOX_Float(fra.me.REG[2])-UNBOX_Float(fra.me.REG[3]));
4600 /* ../lib/standard/string.nit:811 */
4601 fra.me.REG[2] = fra.me.REG[3];
4602 }
4603 /* ../lib/standard/kernel.nit:219 */
4604 REGB2 = TAG_Int((bigint)UNBOX_Float(fra.me.REG[2]));
4605 /* ../lib/standard/string.nit:814 */
4606 REGB1 = TAG_Int(0);
4607 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1));
4608 if (UNTAG_Bool(REGB3)) {
4609 } else {
4610 /* ../lib/standard/kernel.nit:230 */
4611 REGB1 = TAG_Bool((REGB2)==(REGB1));
4612 /* ../lib/standard/string.nit:814 */
4613 REGB3 = REGB1;
4614 }
4615 if (UNTAG_Bool(REGB3)) {
4616 if (!once_value_3) {
4617 fra.me.REG[2] = BOX_NativeString("0.0");
4618 REGB3 = TAG_Int(3);
4619 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB3);
4620 once_value_3 = fra.me.REG[2];
4621 register_static_object(&once_value_3);
4622 } else fra.me.REG[2] = once_value_3;
4623 fra.me.REG[2] = fra.me.REG[2];
4624 fra.me.REG[1] = fra.me.REG[2];
4625 goto label1;
4626 }
4627 /* ../lib/standard/string.nit:815 */
4628 fra.me.REG[2] = CALL_standard___string___Object___to_s(REGB2)(REGB2);
4629 /* ../lib/standard/collection/array.nit:24 */
4630 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
4631 if (UNTAG_Bool(REGB2)) {
4632 } else {
4633 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
4634 }
4635 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
4636 REGB3 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
4637 if (UNTAG_Bool(REGB3)) {
4638 } else {
4639 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4640 }
4641 /* ../lib/standard/kernel.nit:237 */
4642 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB0));
4643 /* ../lib/standard/string.nit:817 */
4644 if (UNTAG_Bool(REGB3)) {
4645 /* ../lib/standard/string.nit:818 */
4646 REGB3 = TAG_Int(0);
4647 /* ../lib/standard/collection/array.nit:24 */
4648 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
4649 if (UNTAG_Bool(REGB1)) {
4650 } else {
4651 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
4652 }
4653 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
4654 /* ../lib/standard/kernel.nit:240 */
4655 REGB1 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
4656 /* ../lib/standard/string.nit:818 */
4657 fra.me.REG[3] = CALL_standard___string___AbstractString___substring(fra.me.REG[2])(fra.me.REG[2], REGB3, REGB1);
4658 /* ../lib/standard/collection/array.nit:24 */
4659 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
4660 if (UNTAG_Bool(REGB1)) {
4661 } else {
4662 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
4663 }
4664 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
4665 /* ../lib/standard/kernel.nit:240 */
4666 REGB1 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
4667 /* ../lib/standard/string.nit:819 */
4668 fra.me.REG[0] = CALL_standard___string___AbstractString___substring(fra.me.REG[2])(fra.me.REG[2], REGB1, REGB0);
4669 /* ../lib/standard/string.nit:820 */
4670 if (!once_value_4) {
4671 fra.me.REG[4] = BOX_NativeString(".");
4672 REGB1 = TAG_Int(1);
4673 fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB1);
4674 once_value_4 = fra.me.REG[4];
4675 register_static_object(&once_value_4);
4676 } else fra.me.REG[4] = once_value_4;
4677 fra.me.REG[4] = fra.me.REG[4];
4678 fra.me.REG[4] = CALL_standard___string___String_____plus(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
4679 fra.me.REG[0] = CALL_standard___string___String_____plus(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
4680 fra.me.REG[1] = fra.me.REG[0];
4681 goto label1;
4682 } else {
4683 /* ../lib/standard/string.nit:822 */
4684 if (!once_value_5) {
4685 fra.me.REG[0] = BOX_NativeString("0.");
4686 REGB1 = TAG_Int(2);
4687 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB1);
4688 once_value_5 = fra.me.REG[0];
4689 register_static_object(&once_value_5);
4690 } else fra.me.REG[0] = once_value_5;
4691 fra.me.REG[0] = fra.me.REG[0];
4692 if (!once_value_6) {
4693 fra.me.REG[4] = BOX_NativeString("0");
4694 REGB1 = TAG_Int(1);
4695 fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB1);
4696 once_value_6 = fra.me.REG[4];
4697 register_static_object(&once_value_6);
4698 } else fra.me.REG[4] = once_value_6;
4699 fra.me.REG[4] = fra.me.REG[4];
4700 /* ../lib/standard/kernel.nit:240 */
4701 REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
4702 /* ../lib/standard/string.nit:822 */
4703 fra.me.REG[4] = CALL_standard___string___String_____star(fra.me.REG[4])(fra.me.REG[4], REGB2);
4704 fra.me.REG[4] = CALL_standard___string___String_____plus(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4]);
4705 fra.me.REG[2] = CALL_standard___string___String_____plus(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
4706 fra.me.REG[1] = fra.me.REG[2];
4707 goto label1;
4708 }
4709 label1: while(0);
4710 stack_frame_head = fra.me.prev;
4711 return fra.me.REG[1];
4712 }
4713 static const char LOCATE_standard___string___Float___to_precision_native[] = "string::Float::to_precision_native";
4714 val_t standard___string___Float___to_precision_native(val_t p0, val_t p1){
4715 struct {struct stack_frame_t me;} fra;
4716 val_t REGB0;
4717 val_t tmp;
4718 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4719 fra.me.file = LOCATE_standard___string;
4720 fra.me.line = 826;
4721 fra.me.meth = LOCATE_standard___string___Float___to_precision_native;
4722 fra.me.has_broke = 0;
4723 fra.me.REG_size = 1;
4724 fra.me.nitni_local_ref_head = NULL;
4725 fra.me.REG[0] = NIT_NULL;
4726 fra.me.REG[0] = p0;
4727 REGB0 = p1;
4728 /* ../lib/standard/string.nit:826 */
4729 fra.me.REG[0] = Float_to_precision_native___out(fra.me.REG[0], REGB0);
4730 ;
4731 stack_frame_head = fra.me.prev;
4732 return fra.me.REG[0];
4733 }
4734 static const char LOCATE_standard___string___Char___to_s[] = "string::Char::(string::Object::to_s)";
4735 val_t standard___string___Char___to_s(val_t p0){
4736 struct {struct stack_frame_t me;} fra;
4737 val_t REGB0;
4738 val_t REGB1;
4739 val_t tmp;
4740 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4741 fra.me.file = LOCATE_standard___string;
4742 fra.me.line = 839;
4743 fra.me.meth = LOCATE_standard___string___Char___to_s;
4744 fra.me.has_broke = 0;
4745 fra.me.REG_size = 1;
4746 fra.me.nitni_local_ref_head = NULL;
4747 fra.me.REG[0] = NIT_NULL;
4748 REGB0 = p0;
4749 /* ../lib/standard/string.nit:841 */
4750 REGB1 = TAG_Int(1);
4751 fra.me.REG[0] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB1);
4752 /* ../lib/standard/string.nit:842 */
4753 REGB1 = TAG_Int(0);
4754 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB1, REGB0);
4755 /* ../lib/standard/string.nit:843 */
4756 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
4757 goto label1;
4758 label1: while(0);
4759 stack_frame_head = fra.me.prev;
4760 return fra.me.REG[0];
4761 }
4762 static const char LOCATE_standard___string___Char___is_numeric[] = "string::Char::is_numeric";
4763 val_t standard___string___Char___is_numeric(val_t p0){
4764 struct {struct stack_frame_t me;} fra;
4765 val_t REGB0;
4766 val_t REGB1;
4767 val_t REGB2;
4768 val_t tmp;
4769 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4770 fra.me.file = LOCATE_standard___string;
4771 fra.me.line = 846;
4772 fra.me.meth = LOCATE_standard___string___Char___is_numeric;
4773 fra.me.has_broke = 0;
4774 fra.me.REG_size = 0;
4775 fra.me.nitni_local_ref_head = NULL;
4776 REGB0 = p0;
4777 /* ../lib/standard/string.nit:849 */
4778 REGB1 = TAG_Char('0');
4779 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4780 if (UNTAG_Bool(REGB2)) {
4781 } else {
4782 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4783 }
4784 /* ../lib/standard/kernel.nit:387 */
4785 REGB1 = TAG_Bool(UNTAG_Char(REGB0)>=UNTAG_Char(REGB1));
4786 /* ../lib/standard/string.nit:849 */
4787 if (UNTAG_Bool(REGB1)) {
4788 REGB1 = TAG_Char('9');
4789 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4790 if (UNTAG_Bool(REGB2)) {
4791 } else {
4792 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4793 }
4794 /* ../lib/standard/kernel.nit:385 */
4795 REGB1 = TAG_Bool(UNTAG_Char(REGB0)<=UNTAG_Char(REGB1));
4796 } else {
4797 /* ../lib/standard/string.nit:849 */
4798 REGB0 = TAG_Bool(0);
4799 REGB1 = REGB0;
4800 }
4801 if (UNTAG_Bool(REGB1)) {
4802 /* ../lib/standard/string.nit:851 */
4803 REGB1 = TAG_Bool(1);
4804 goto label1;
4805 }
4806 /* ../lib/standard/string.nit:853 */
4807 REGB0 = TAG_Bool(0);
4808 REGB1 = REGB0;
4809 goto label1;
4810 label1: while(0);
4811 stack_frame_head = fra.me.prev;
4812 return REGB1;
4813 }
4814 static const char LOCATE_standard___string___Char___is_alpha[] = "string::Char::is_alpha";
4815 val_t standard___string___Char___is_alpha(val_t p0){
4816 struct {struct stack_frame_t me;} fra;
4817 val_t REGB0;
4818 val_t REGB1;
4819 val_t REGB2;
4820 val_t REGB3;
4821 val_t tmp;
4822 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4823 fra.me.file = LOCATE_standard___string;
4824 fra.me.line = 856;
4825 fra.me.meth = LOCATE_standard___string___Char___is_alpha;
4826 fra.me.has_broke = 0;
4827 fra.me.REG_size = 0;
4828 fra.me.nitni_local_ref_head = NULL;
4829 REGB0 = p0;
4830 /* ../lib/standard/string.nit:859 */
4831 REGB1 = TAG_Char('a');
4832 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4833 if (UNTAG_Bool(REGB2)) {
4834 } else {
4835 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4836 }
4837 /* ../lib/standard/kernel.nit:387 */
4838 REGB1 = TAG_Bool(UNTAG_Char(REGB0)>=UNTAG_Char(REGB1));
4839 /* ../lib/standard/string.nit:859 */
4840 if (UNTAG_Bool(REGB1)) {
4841 REGB1 = TAG_Char('z');
4842 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4843 if (UNTAG_Bool(REGB2)) {
4844 } else {
4845 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4846 }
4847 /* ../lib/standard/kernel.nit:385 */
4848 REGB1 = TAG_Bool(UNTAG_Char(REGB0)<=UNTAG_Char(REGB1));
4849 } else {
4850 /* ../lib/standard/string.nit:859 */
4851 REGB2 = TAG_Bool(0);
4852 REGB1 = REGB2;
4853 }
4854 if (UNTAG_Bool(REGB1)) {
4855 REGB1 = TAG_Bool(1);
4856 } else {
4857 REGB2 = TAG_Char('A');
4858 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4859 if (UNTAG_Bool(REGB3)) {
4860 } else {
4861 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4862 }
4863 /* ../lib/standard/kernel.nit:387 */
4864 REGB2 = TAG_Bool(UNTAG_Char(REGB0)>=UNTAG_Char(REGB2));
4865 /* ../lib/standard/string.nit:859 */
4866 if (UNTAG_Bool(REGB2)) {
4867 REGB2 = TAG_Char('Z');
4868 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4869 if (UNTAG_Bool(REGB3)) {
4870 } else {
4871 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4872 }
4873 /* ../lib/standard/kernel.nit:385 */
4874 REGB2 = TAG_Bool(UNTAG_Char(REGB0)<=UNTAG_Char(REGB2));
4875 } else {
4876 /* ../lib/standard/string.nit:859 */
4877 REGB0 = TAG_Bool(0);
4878 REGB2 = REGB0;
4879 }
4880 REGB1 = REGB2;
4881 }
4882 if (UNTAG_Bool(REGB1)) {
4883 REGB1 = TAG_Bool(1);
4884 goto label1;
4885 }
4886 /* ../lib/standard/string.nit:860 */
4887 REGB2 = TAG_Bool(0);
4888 REGB1 = REGB2;
4889 goto label1;
4890 label1: while(0);
4891 stack_frame_head = fra.me.prev;
4892 return REGB1;
4893 }
4894 static const char LOCATE_standard___string___Char___is_alphanumeric[] = "string::Char::is_alphanumeric";
4895 val_t standard___string___Char___is_alphanumeric(val_t p0){
4896 struct {struct stack_frame_t me;} fra;
4897 val_t REGB0;
4898 val_t REGB1;
4899 val_t tmp;
4900 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4901 fra.me.file = LOCATE_standard___string;
4902 fra.me.line = 863;
4903 fra.me.meth = LOCATE_standard___string___Char___is_alphanumeric;
4904 fra.me.has_broke = 0;
4905 fra.me.REG_size = 0;
4906 fra.me.nitni_local_ref_head = NULL;
4907 REGB0 = p0;
4908 /* ../lib/standard/string.nit:866 */
4909 REGB1 = CALL_standard___string___Char___is_numeric(REGB0)(REGB0);
4910 if (UNTAG_Bool(REGB1)) {
4911 REGB1 = TAG_Bool(1);
4912 } else {
4913 REGB0 = CALL_standard___string___Char___is_alpha(REGB0)(REGB0);
4914 REGB1 = REGB0;
4915 }
4916 if (UNTAG_Bool(REGB1)) {
4917 REGB1 = TAG_Bool(1);
4918 goto label1;
4919 }
4920 /* ../lib/standard/string.nit:867 */
4921 REGB0 = TAG_Bool(0);
4922 REGB1 = REGB0;
4923 goto label1;
4924 label1: while(0);
4925 stack_frame_head = fra.me.prev;
4926 return REGB1;
4927 }
4928 static const char LOCATE_standard___string___Collection___to_s[] = "string::Collection::(string::Object::to_s)";
4929 val_t standard___string___Collection___to_s(val_t p0){
4930 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
4931 val_t tmp;
4932 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4933 fra.me.file = LOCATE_standard___string;
4934 fra.me.line = 872;
4935 fra.me.meth = LOCATE_standard___string___Collection___to_s;
4936 fra.me.has_broke = 0;
4937 fra.me.REG_size = 2;
4938 fra.me.nitni_local_ref_head = NULL;
4939 fra.me.REG[0] = NIT_NULL;
4940 fra.me.REG[1] = NIT_NULL;
4941 fra.me.REG[0] = p0;
4942 /* ../lib/standard/string.nit:875 */
4943 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___init();
4944 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));
4945 /* ../lib/standard/string.nit:877 */
4946 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
4947 goto label2;
4948 label2: while(0);
4949 stack_frame_head = fra.me.prev;
4950 return fra.me.REG[1];
4951 }
4952 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){
4953 struct {struct stack_frame_t me;} fra;
4954 val_t REGB0;
4955 val_t REGB1;
4956 fun_t CREG[1];
4957 val_t tmp;
4958 /* ../lib/standard/string.nit:876 */
4959 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4960 fra.me.file = LOCATE_standard___string;
4961 fra.me.line = 0;
4962 fra.me.meth = LOCATE_standard___string___Collection___to_s;
4963 fra.me.has_broke = 0;
4964 fra.me.REG_size = 1;
4965 fra.me.nitni_local_ref_head = NULL;
4966 fra.me.REG[0] = NIT_NULL;
4967 fra.me.closure_ctx = closctx_param;
4968 fra.me.closure_funs = CREG;
4969 fra.me.REG[0] = p0;
4970 CREG[0] = clos_fun0;
4971 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
4972 if (UNTAG_Bool(REGB0)) {
4973 } else {
4974 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
4975 if (UNTAG_Bool(REGB1)) {
4976 REGB1 = TAG_Bool(0);
4977 REGB0 = REGB1;
4978 } else {
4979 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
4980 REGB0 = REGB1;
4981 }
4982 }
4983 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
4984 if (UNTAG_Bool(REGB0)) {
4985 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
4986 if (UNTAG_Bool(REGB0)) {
4987 nit_abort("Reciever is null", NULL, LOCATE_standard___string, 876);
4988 }
4989 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
4990 CALL_standard___collection___abstract_collection___Sequence___append(closctx->REG[1])(closctx->REG[1], fra.me.REG[0]);
4991 }
4992 stack_frame_head = fra.me.prev;
4993 return;
4994 }
4995 static const char LOCATE_standard___string___Collection___join[] = "string::Collection::join";
4996 val_t standard___string___Collection___join(val_t p0, val_t p1){
4997 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
4998 val_t REGB0;
4999 val_t REGB1;
5000 val_t tmp;
5001 static val_t once_value_1; /* Once value */
5002 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5003 fra.me.file = LOCATE_standard___string;
5004 fra.me.line = 880;
5005 fra.me.meth = LOCATE_standard___string___Collection___join;
5006 fra.me.has_broke = 0;
5007 fra.me.REG_size = 6;
5008 fra.me.nitni_local_ref_head = NULL;
5009 fra.me.REG[0] = NIT_NULL;
5010 fra.me.REG[1] = NIT_NULL;
5011 fra.me.REG[2] = NIT_NULL;
5012 fra.me.REG[3] = NIT_NULL;
5013 fra.me.REG[4] = NIT_NULL;
5014 fra.me.REG[5] = NIT_NULL;
5015 fra.me.REG[0] = p0;
5016 fra.me.REG[1] = p1;
5017 /* ../lib/standard/string.nit:883 */
5018 REGB0 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]);
5019 if (UNTAG_Bool(REGB0)) {
5020 if (!once_value_1) {
5021 fra.me.REG[2] = BOX_NativeString("");
5022 REGB0 = TAG_Int(0);
5023 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
5024 once_value_1 = fra.me.REG[2];
5025 register_static_object(&once_value_1);
5026 } else fra.me.REG[2] = once_value_1;
5027 fra.me.REG[2] = fra.me.REG[2];
5028 goto label2;
5029 }
5030 /* ../lib/standard/string.nit:885 */
5031 fra.me.REG[3] = NEW_Buffer_standard___string___Buffer___init();
5032 /* ../lib/standard/string.nit:888 */
5033 fra.me.REG[0] = CALL_standard___collection___abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]);
5034 /* ../lib/standard/string.nit:889 */
5035 fra.me.REG[4] = CALL_standard___collection___abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]);
5036 /* ../lib/standard/string.nit:890 */
5037 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
5038 if (UNTAG_Bool(REGB0)) {
5039 } else {
5040 REGB1 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
5041 if (UNTAG_Bool(REGB1)) {
5042 REGB1 = TAG_Bool(0);
5043 REGB0 = REGB1;
5044 } else {
5045 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], NIT_NULL);
5046 REGB0 = REGB1;
5047 }
5048 }
5049 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
5050 if (UNTAG_Bool(REGB0)) {
5051 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
5052 if (UNTAG_Bool(REGB0)) {
5053 nit_abort("Reciever is null", NULL, LOCATE_standard___string, 890);
5054 }
5055 fra.me.REG[5] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
5056 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
5057 }
5058 /* ../lib/standard/string.nit:893 */
5059 CALL_standard___collection___abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
5060 /* ../lib/standard/string.nit:894 */
5061 while(1) {
5062 REGB0 = CALL_standard___collection___abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]);
5063 if (UNTAG_Bool(REGB0)) {
5064 /* ../lib/standard/string.nit:895 */
5065 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
5066 /* ../lib/standard/string.nit:896 */
5067 fra.me.REG[5] = CALL_standard___collection___abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]);
5068 fra.me.REG[4] = fra.me.REG[5];
5069 /* ../lib/standard/string.nit:897 */
5070 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
5071 if (UNTAG_Bool(REGB0)) {
5072 } else {
5073 REGB1 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
5074 if (UNTAG_Bool(REGB1)) {
5075 REGB1 = TAG_Bool(0);
5076 REGB0 = REGB1;
5077 } else {
5078 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], NIT_NULL);
5079 REGB0 = REGB1;
5080 }
5081 }
5082 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
5083 if (UNTAG_Bool(REGB0)) {
5084 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
5085 if (UNTAG_Bool(REGB0)) {
5086 nit_abort("Reciever is null", NULL, LOCATE_standard___string, 897);
5087 }
5088 fra.me.REG[5] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
5089 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
5090 }
5091 /* ../lib/standard/string.nit:898 */
5092 CALL_standard___collection___abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
5093 } else {
5094 /* ../lib/standard/string.nit:894 */
5095 goto label3;
5096 }
5097 }
5098 label3: while(0);
5099 /* ../lib/standard/string.nit:900 */
5100 fra.me.REG[3] = CALL_standard___string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
5101 fra.me.REG[2] = fra.me.REG[3];
5102 goto label2;
5103 label2: while(0);
5104 stack_frame_head = fra.me.prev;
5105 return fra.me.REG[2];
5106 }
5107 static const char LOCATE_standard___string___Array___to_s[] = "string::Array::(string::Object::to_s)";
5108 val_t standard___string___Array___to_s(val_t p0){
5109 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
5110 val_t REGB0;
5111 val_t REGB1;
5112 val_t REGB2;
5113 val_t REGB3;
5114 val_t REGB4;
5115 val_t tmp;
5116 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5117 fra.me.file = LOCATE_standard___string;
5118 fra.me.line = 905;
5119 fra.me.meth = LOCATE_standard___string___Array___to_s;
5120 fra.me.has_broke = 0;
5121 fra.me.REG_size = 3;
5122 fra.me.nitni_local_ref_head = NULL;
5123 fra.me.REG[0] = NIT_NULL;
5124 fra.me.REG[1] = NIT_NULL;
5125 fra.me.REG[2] = NIT_NULL;
5126 fra.me.REG[0] = p0;
5127 /* ../lib/standard/string.nit:908 */
5128 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___init();
5129 /* ../lib/standard/string.nit:909 */
5130 REGB0 = TAG_Int(0);
5131 /* ../lib/standard/collection/array.nit:24 */
5132 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
5133 if (UNTAG_Bool(REGB1)) {
5134 } else {
5135 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
5136 }
5137 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
5138 /* ../lib/standard/string.nit:911 */
5139 while(1) {
5140 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
5141 if (UNTAG_Bool(REGB2)) {
5142 } else {
5143 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
5144 }
5145 /* ../lib/standard/kernel.nit:235 */
5146 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
5147 /* ../lib/standard/string.nit:911 */
5148 if (UNTAG_Bool(REGB2)) {
5149 /* ../lib/standard/collection/array.nit:278 */
5150 fra.me.REG[2] = fra.me.REG[0];
5151 REGB2 = REGB0;
5152 /* ../lib/standard/collection/array.nit:280 */
5153 REGB3 = TAG_Int(0);
5154 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
5155 if (UNTAG_Bool(REGB4)) {
5156 } else {
5157 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
5158 }
5159 /* ../lib/standard/kernel.nit:236 */
5160 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB3));
5161 /* ../lib/standard/collection/array.nit:280 */
5162 if (UNTAG_Bool(REGB3)) {
5163 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
5164 if (UNTAG_Bool(REGB3)) {
5165 } else {
5166 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
5167 }
5168 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
5169 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
5170 if (UNTAG_Bool(REGB4)) {
5171 } else {
5172 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
5173 }
5174 /* ../lib/standard/kernel.nit:235 */
5175 REGB3 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB3));
5176 } else {
5177 /* ../lib/standard/collection/array.nit:280 */
5178 REGB4 = TAG_Bool(0);
5179 REGB3 = REGB4;
5180 }
5181 if (UNTAG_Bool(REGB3)) {
5182 } else {
5183 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
5184 }
5185 /* ../lib/standard/collection/array.nit:281 */
5186 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
5187 REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
5188 if (UNTAG_Bool(REGB3)) {
5189 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
5190 }
5191 /* ../lib/standard/collection/array.nit:724 */
5192 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB2)];
5193 /* ../lib/standard/collection/array.nit:281 */
5194 goto label1;
5195 label1: while(0);
5196 /* ../lib/standard/string.nit:913 */
5197 REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
5198 if (UNTAG_Bool(REGB2)) {
5199 } else {
5200 REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
5201 if (UNTAG_Bool(REGB3)) {
5202 REGB3 = TAG_Bool(0);
5203 REGB2 = REGB3;
5204 } else {
5205 REGB3 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
5206 REGB2 = REGB3;
5207 }
5208 }
5209 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
5210 if (UNTAG_Bool(REGB2)) {
5211 REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
5212 if (UNTAG_Bool(REGB2)) {
5213 nit_abort("Reciever is null", NULL, LOCATE_standard___string, 913);
5214 }
5215 fra.me.REG[2] = CALL_standard___string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
5216 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
5217 }
5218 /* ../lib/standard/string.nit:914 */
5219 REGB2 = TAG_Int(1);
5220 /* ../lib/standard/kernel.nit:238 */
5221 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
5222 /* ../lib/standard/string.nit:914 */
5223 REGB0 = REGB2;
5224 } else {
5225 /* ../lib/standard/string.nit:911 */
5226 goto label2;
5227 }
5228 }
5229 label2: while(0);
5230 /* ../lib/standard/string.nit:916 */
5231 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
5232 goto label3;
5233 label3: while(0);
5234 stack_frame_head = fra.me.prev;
5235 return fra.me.REG[1];
5236 }
5237 static const char LOCATE_standard___string___Map___join[] = "string::Map::join";
5238 val_t standard___string___Map___join(val_t p0, val_t p1, val_t p2){
5239 struct {struct stack_frame_t me; val_t MORE_REG[8];} fra;
5240 val_t REGB0;
5241 val_t REGB1;
5242 val_t tmp;
5243 static val_t once_value_1; /* Once value */
5244 static val_t once_value_3; /* Once value */
5245 static val_t once_value_4; /* Once value */
5246 static val_t once_value_5; /* Once value */
5247 static val_t once_value_6; /* Once value */
5248 static val_t once_value_7; /* Once value */
5249 static val_t once_value_8; /* Once value */
5250 static val_t once_value_9; /* Once value */
5251 static val_t once_value_10; /* Once value */
5252 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5253 fra.me.file = LOCATE_standard___string;
5254 fra.me.line = 921;
5255 fra.me.meth = LOCATE_standard___string___Map___join;
5256 fra.me.has_broke = 0;
5257 fra.me.REG_size = 9;
5258 fra.me.nitni_local_ref_head = NULL;
5259 fra.me.REG[0] = NIT_NULL;
5260 fra.me.REG[1] = NIT_NULL;
5261 fra.me.REG[2] = NIT_NULL;
5262 fra.me.REG[3] = NIT_NULL;
5263 fra.me.REG[4] = NIT_NULL;
5264 fra.me.REG[5] = NIT_NULL;
5265 fra.me.REG[6] = NIT_NULL;
5266 fra.me.REG[7] = NIT_NULL;
5267 fra.me.REG[8] = NIT_NULL;
5268 fra.me.REG[0] = p0;
5269 fra.me.REG[1] = p1;
5270 fra.me.REG[2] = p2;
5271 /* ../lib/standard/string.nit:926 */
5272 REGB0 = CALL_standard___collection___abstract_collection___MapRead___is_empty(fra.me.REG[0])(fra.me.REG[0]);
5273 if (UNTAG_Bool(REGB0)) {
5274 if (!once_value_1) {
5275 fra.me.REG[3] = BOX_NativeString("");
5276 REGB0 = TAG_Int(0);
5277 fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
5278 once_value_1 = fra.me.REG[3];
5279 register_static_object(&once_value_1);
5280 } else fra.me.REG[3] = once_value_1;
5281 fra.me.REG[3] = fra.me.REG[3];
5282 goto label2;
5283 }
5284 /* ../lib/standard/string.nit:928 */
5285 fra.me.REG[4] = NEW_Buffer_standard___string___Buffer___init();
5286 /* ../lib/standard/string.nit:931 */
5287 fra.me.REG[0] = CALL_standard___collection___abstract_collection___MapRead___iterator(fra.me.REG[0])(fra.me.REG[0]);
5288 /* ../lib/standard/string.nit:932 */
5289 fra.me.REG[5] = CALL_standard___collection___abstract_collection___MapIterator___key(fra.me.REG[0])(fra.me.REG[0]);
5290 /* ../lib/standard/string.nit:933 */
5291 fra.me.REG[6] = CALL_standard___collection___abstract_collection___MapIterator___item(fra.me.REG[0])(fra.me.REG[0]);
5292 /* ../lib/standard/string.nit:934 */
5293 REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
5294 if (UNTAG_Bool(REGB0)) {
5295 } else {
5296 REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
5297 if (UNTAG_Bool(REGB1)) {
5298 REGB1 = TAG_Bool(0);
5299 REGB0 = REGB1;
5300 } else {
5301 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], NIT_NULL);
5302 REGB0 = REGB1;
5303 }
5304 }
5305 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
5306 if (UNTAG_Bool(REGB0)) {
5307 REGB0 = TAG_Int(7);
5308 fra.me.REG[7] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
5309 if (!once_value_3) {
5310 fra.me.REG[8] = BOX_NativeString("");
5311 REGB0 = TAG_Int(0);
5312 fra.me.REG[8] = NEW_String_standard___string___String___with_native(fra.me.REG[8], REGB0);
5313 once_value_3 = fra.me.REG[8];
5314 register_static_object(&once_value_3);
5315 } else fra.me.REG[8] = once_value_3;
5316 fra.me.REG[8] = fra.me.REG[8];
5317 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5318 fra.me.REG[8] = CALL_standard___string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
5319 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5320 if (!once_value_4) {
5321 fra.me.REG[8] = BOX_NativeString("");
5322 REGB0 = TAG_Int(0);
5323 fra.me.REG[8] = NEW_String_standard___string___String___with_native(fra.me.REG[8], REGB0);
5324 once_value_4 = fra.me.REG[8];
5325 register_static_object(&once_value_4);
5326 } else fra.me.REG[8] = once_value_4;
5327 fra.me.REG[8] = fra.me.REG[8];
5328 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5329 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]);
5330 if (!once_value_5) {
5331 fra.me.REG[8] = BOX_NativeString("");
5332 REGB0 = TAG_Int(0);
5333 fra.me.REG[8] = NEW_String_standard___string___String___with_native(fra.me.REG[8], REGB0);
5334 once_value_5 = fra.me.REG[8];
5335 register_static_object(&once_value_5);
5336 } else fra.me.REG[8] = once_value_5;
5337 fra.me.REG[8] = fra.me.REG[8];
5338 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5339 fra.me.REG[8] = CALL_standard___string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
5340 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5341 if (!once_value_6) {
5342 fra.me.REG[8] = BOX_NativeString("");
5343 REGB0 = TAG_Int(0);
5344 fra.me.REG[8] = NEW_String_standard___string___String___with_native(fra.me.REG[8], REGB0);
5345 once_value_6 = fra.me.REG[8];
5346 register_static_object(&once_value_6);
5347 } else fra.me.REG[8] = once_value_6;
5348 fra.me.REG[8] = fra.me.REG[8];
5349 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5350 fra.me.REG[7] = CALL_standard___string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
5351 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[7]);
5352 }
5353 /* ../lib/standard/string.nit:937 */
5354 CALL_standard___collection___abstract_collection___MapIterator___next(fra.me.REG[0])(fra.me.REG[0]);
5355 /* ../lib/standard/string.nit:938 */
5356 while(1) {
5357 REGB0 = CALL_standard___collection___abstract_collection___MapIterator___is_ok(fra.me.REG[0])(fra.me.REG[0]);
5358 if (UNTAG_Bool(REGB0)) {
5359 /* ../lib/standard/string.nit:939 */
5360 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
5361 /* ../lib/standard/string.nit:940 */
5362 fra.me.REG[7] = CALL_standard___collection___abstract_collection___MapIterator___key(fra.me.REG[0])(fra.me.REG[0]);
5363 fra.me.REG[5] = fra.me.REG[7];
5364 /* ../lib/standard/string.nit:941 */
5365 fra.me.REG[7] = CALL_standard___collection___abstract_collection___MapIterator___item(fra.me.REG[0])(fra.me.REG[0]);
5366 fra.me.REG[6] = fra.me.REG[7];
5367 /* ../lib/standard/string.nit:942 */
5368 REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
5369 if (UNTAG_Bool(REGB0)) {
5370 } else {
5371 REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
5372 if (UNTAG_Bool(REGB1)) {
5373 REGB1 = TAG_Bool(0);
5374 REGB0 = REGB1;
5375 } else {
5376 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], NIT_NULL);
5377 REGB0 = REGB1;
5378 }
5379 }
5380 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
5381 if (UNTAG_Bool(REGB0)) {
5382 REGB0 = TAG_Int(7);
5383 fra.me.REG[7] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
5384 if (!once_value_7) {
5385 fra.me.REG[8] = BOX_NativeString("");
5386 REGB0 = TAG_Int(0);
5387 fra.me.REG[8] = NEW_String_standard___string___String___with_native(fra.me.REG[8], REGB0);
5388 once_value_7 = fra.me.REG[8];
5389 register_static_object(&once_value_7);
5390 } else fra.me.REG[8] = once_value_7;
5391 fra.me.REG[8] = fra.me.REG[8];
5392 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5393 fra.me.REG[8] = CALL_standard___string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
5394 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5395 if (!once_value_8) {
5396 fra.me.REG[8] = BOX_NativeString("");
5397 REGB0 = TAG_Int(0);
5398 fra.me.REG[8] = NEW_String_standard___string___String___with_native(fra.me.REG[8], REGB0);
5399 once_value_8 = fra.me.REG[8];
5400 register_static_object(&once_value_8);
5401 } else fra.me.REG[8] = once_value_8;
5402 fra.me.REG[8] = fra.me.REG[8];
5403 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5404 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]);
5405 if (!once_value_9) {
5406 fra.me.REG[8] = BOX_NativeString("");
5407 REGB0 = TAG_Int(0);
5408 fra.me.REG[8] = NEW_String_standard___string___String___with_native(fra.me.REG[8], REGB0);
5409 once_value_9 = fra.me.REG[8];
5410 register_static_object(&once_value_9);
5411 } else fra.me.REG[8] = once_value_9;
5412 fra.me.REG[8] = fra.me.REG[8];
5413 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5414 fra.me.REG[8] = CALL_standard___string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
5415 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5416 if (!once_value_10) {
5417 fra.me.REG[8] = BOX_NativeString("");
5418 REGB0 = TAG_Int(0);
5419 fra.me.REG[8] = NEW_String_standard___string___String___with_native(fra.me.REG[8], REGB0);
5420 once_value_10 = fra.me.REG[8];
5421 register_static_object(&once_value_10);
5422 } else fra.me.REG[8] = once_value_10;
5423 fra.me.REG[8] = fra.me.REG[8];
5424 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5425 fra.me.REG[7] = CALL_standard___string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
5426 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[7]);
5427 }
5428 /* ../lib/standard/string.nit:943 */
5429 CALL_standard___collection___abstract_collection___MapIterator___next(fra.me.REG[0])(fra.me.REG[0]);
5430 } else {
5431 /* ../lib/standard/string.nit:938 */
5432 goto label11;
5433 }
5434 }
5435 label11: while(0);
5436 /* ../lib/standard/string.nit:945 */
5437 fra.me.REG[4] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
5438 fra.me.REG[3] = fra.me.REG[4];
5439 goto label2;
5440 label2: while(0);
5441 stack_frame_head = fra.me.prev;
5442 return fra.me.REG[3];
5443 }
5444 static const char LOCATE_standard___string___NativeString_____bra[] = "string::NativeString::[]";
5445 val_t standard___string___NativeString_____bra(val_t p0, val_t p1){
5446 struct {struct stack_frame_t me;} fra;
5447 val_t REGB0;
5448 val_t tmp;
5449 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5450 fra.me.file = LOCATE_standard___string;
5451 fra.me.line = 955;
5452 fra.me.meth = LOCATE_standard___string___NativeString_____bra;
5453 fra.me.has_broke = 0;
5454 fra.me.REG_size = 1;
5455 fra.me.nitni_local_ref_head = NULL;
5456 fra.me.REG[0] = NIT_NULL;
5457 fra.me.REG[0] = p0;
5458 REGB0 = p1;
5459 /* ../lib/standard/string.nit:955 */
5460 REGB0 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]);
5461 stack_frame_head = fra.me.prev;
5462 return REGB0;
5463 }
5464 static const char LOCATE_standard___string___NativeString_____braeq[] = "string::NativeString::[]=";
5465 void standard___string___NativeString_____braeq(val_t p0, val_t p1, val_t p2){
5466 struct {struct stack_frame_t me;} fra;
5467 val_t REGB0;
5468 val_t REGB1;
5469 val_t tmp;
5470 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5471 fra.me.file = LOCATE_standard___string;
5472 fra.me.line = 956;
5473 fra.me.meth = LOCATE_standard___string___NativeString_____braeq;
5474 fra.me.has_broke = 0;
5475 fra.me.REG_size = 1;
5476 fra.me.nitni_local_ref_head = NULL;
5477 fra.me.REG[0] = NIT_NULL;
5478 fra.me.REG[0] = p0;
5479 REGB0 = p1;
5480 REGB1 = p2;
5481 /* ../lib/standard/string.nit:956 */
5482 UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB1);;
5483 stack_frame_head = fra.me.prev;
5484 return;
5485 }
5486 static const char LOCATE_standard___string___NativeString___copy_to[] = "string::NativeString::copy_to";
5487 void standard___string___NativeString___copy_to(val_t p0, val_t p1, val_t p2, val_t p3, val_t p4){
5488 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
5489 val_t REGB0;
5490 val_t REGB1;
5491 val_t REGB2;
5492 val_t tmp;
5493 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5494 fra.me.file = LOCATE_standard___string;
5495 fra.me.line = 957;
5496 fra.me.meth = LOCATE_standard___string___NativeString___copy_to;
5497 fra.me.has_broke = 0;
5498 fra.me.REG_size = 2;
5499 fra.me.nitni_local_ref_head = NULL;
5500 fra.me.REG[0] = NIT_NULL;
5501 fra.me.REG[1] = NIT_NULL;
5502 fra.me.REG[0] = p0;
5503 fra.me.REG[1] = p1;
5504 REGB0 = p2;
5505 REGB1 = p3;
5506 REGB2 = p4;
5507 /* ../lib/standard/string.nit:957 */
5508 (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[0])+UNTAG_Int(REGB1), UNTAG_Int(REGB0));;
5509 stack_frame_head = fra.me.prev;
5510 return;
5511 }
5512 static const char LOCATE_standard___string___NativeString___cstring_length[] = "string::NativeString::cstring_length";
5513 val_t standard___string___NativeString___cstring_length(val_t p0){
5514 struct {struct stack_frame_t me;} fra;
5515 val_t REGB0;
5516 val_t REGB1;
5517 val_t REGB2;
5518 val_t REGB3;
5519 val_t tmp;
5520 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5521 fra.me.file = LOCATE_standard___string;
5522 fra.me.line = 959;
5523 fra.me.meth = LOCATE_standard___string___NativeString___cstring_length;
5524 fra.me.has_broke = 0;
5525 fra.me.REG_size = 1;
5526 fra.me.nitni_local_ref_head = NULL;
5527 fra.me.REG[0] = NIT_NULL;
5528 fra.me.REG[0] = p0;
5529 /* ../lib/standard/string.nit:962 */
5530 REGB0 = TAG_Int(0);
5531 /* ../lib/standard/string.nit:963 */
5532 while(1) {
5533 /* ../lib/standard/string.nit:955 */
5534 REGB1 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]);
5535 /* ../lib/standard/string.nit:963 */
5536 REGB2 = TAG_Char('\0');
5537 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB2));
5538 if (UNTAG_Bool(REGB3)) {
5539 } else {
5540 /* ../lib/standard/kernel.nit:381 */
5541 REGB2 = TAG_Bool((REGB1)==(REGB2));
5542 /* ../lib/standard/string.nit:963 */
5543 REGB3 = REGB2;
5544 }
5545 REGB3 = TAG_Bool(!UNTAG_Bool(REGB3));
5546 if (UNTAG_Bool(REGB3)) {
5547 REGB3 = TAG_Int(1);
5548 /* ../lib/standard/kernel.nit:238 */
5549 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
5550 /* ../lib/standard/string.nit:963 */
5551 REGB0 = REGB3;
5552 } else {
5553 goto label1;
5554 }
5555 }
5556 label1: while(0);
5557 /* ../lib/standard/string.nit:964 */
5558 goto label2;
5559 label2: while(0);
5560 stack_frame_head = fra.me.prev;
5561 return REGB0;
5562 }
5563 static const char LOCATE_standard___string___NativeString___atoi[] = "string::NativeString::atoi";
5564 val_t standard___string___NativeString___atoi(val_t p0){
5565 struct {struct stack_frame_t me;} fra;
5566 val_t REGB0;
5567 val_t tmp;
5568 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5569 fra.me.file = LOCATE_standard___string;
5570 fra.me.line = 966;
5571 fra.me.meth = LOCATE_standard___string___NativeString___atoi;
5572 fra.me.has_broke = 0;
5573 fra.me.REG_size = 1;
5574 fra.me.nitni_local_ref_head = NULL;
5575 fra.me.REG[0] = NIT_NULL;
5576 fra.me.REG[0] = p0;
5577 /* ../lib/standard/string.nit:966 */
5578 REGB0 = TAG_Int(atoi(UNBOX_NativeString(fra.me.REG[0])));
5579 stack_frame_head = fra.me.prev;
5580 return REGB0;
5581 }
5582 static const char LOCATE_standard___string___NativeString___atof[] = "string::NativeString::atof";
5583 val_t standard___string___NativeString___atof(val_t p0){
5584 struct {struct stack_frame_t me;} fra;
5585 val_t tmp;
5586 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5587 fra.me.file = LOCATE_standard___string;
5588 fra.me.line = 967;
5589 fra.me.meth = LOCATE_standard___string___NativeString___atof;
5590 fra.me.has_broke = 0;
5591 fra.me.REG_size = 1;
5592 fra.me.nitni_local_ref_head = NULL;
5593 fra.me.REG[0] = NIT_NULL;
5594 fra.me.REG[0] = p0;
5595 /* ../lib/standard/string.nit:967 */
5596 fra.me.REG[0] = NativeString_atof___out(fra.me.REG[0]);
5597 stack_frame_head = fra.me.prev;
5598 return fra.me.REG[0];
5599 }
5600 static const char LOCATE_standard___string___NativeString___init[] = "string::NativeString::init";
5601 void standard___string___NativeString___init(val_t p0, int* init_table){
5602 int itpos7 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string___NativeString].i;
5603 struct {struct stack_frame_t me;} fra;
5604 val_t tmp;
5605 if (init_table[itpos7]) return;
5606 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5607 fra.me.file = LOCATE_standard___string;
5608 fra.me.line = 0;
5609 fra.me.meth = LOCATE_standard___string___NativeString___init;
5610 fra.me.has_broke = 0;
5611 fra.me.REG_size = 0;
5612 fra.me.nitni_local_ref_head = NULL;
5613 stack_frame_head = fra.me.prev;
5614 init_table[itpos7] = 1;
5615 return;
5616 }
5617 static const char LOCATE_standard___string___StringCapable___calloc_string[] = "string::StringCapable::calloc_string";
5618 val_t standard___string___StringCapable___calloc_string(val_t p0, val_t p1){
5619 struct {struct stack_frame_t me;} fra;
5620 val_t REGB0;
5621 val_t tmp;
5622 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5623 fra.me.file = LOCATE_standard___string;
5624 fra.me.line = 972;
5625 fra.me.meth = LOCATE_standard___string___StringCapable___calloc_string;
5626 fra.me.has_broke = 0;
5627 fra.me.REG_size = 1;
5628 fra.me.nitni_local_ref_head = NULL;
5629 fra.me.REG[0] = NIT_NULL;
5630 fra.me.REG[0] = p0;
5631 REGB0 = p1;
5632 /* ../lib/standard/string.nit:972 */
5633 fra.me.REG[0] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB0) * sizeof(char))));
5634 stack_frame_head = fra.me.prev;
5635 return fra.me.REG[0];
5636 }
5637 static const char LOCATE_standard___string___Sys___args[] = "string::Sys::(string::Object::args)";
5638 val_t standard___string___Sys___args(val_t p0){
5639 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
5640 val_t REGB0;
5641 val_t REGB1;
5642 val_t tmp;
5643 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5644 fra.me.file = LOCATE_standard___string;
5645 fra.me.line = 978;
5646 fra.me.meth = LOCATE_standard___string___Sys___args;
5647 fra.me.has_broke = 0;
5648 fra.me.REG_size = 3;
5649 fra.me.nitni_local_ref_head = NULL;
5650 fra.me.REG[0] = NIT_NULL;
5651 fra.me.REG[1] = NIT_NULL;
5652 fra.me.REG[2] = NIT_NULL;
5653 fra.me.REG[0] = p0;
5654 /* ../lib/standard/string.nit:978 */
5655 fra.me.REG[1] = fra.me.REG[0];
5656 /* ../lib/standard/string.nit:980 */
5657 fra.me.REG[2] = ATTR_standard___string___Sys____args_cache(fra.me.REG[1]);
5658 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
5659 if (UNTAG_Bool(REGB0)) {
5660 } else {
5661 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
5662 if (UNTAG_Bool(REGB1)) {
5663 REGB1 = TAG_Bool(0);
5664 REGB0 = REGB1;
5665 } else {
5666 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
5667 REGB0 = REGB1;
5668 }
5669 }
5670 if (UNTAG_Bool(REGB0)) {
5671 CALL_standard___string___Sys___init_args(fra.me.REG[1])(fra.me.REG[1]);
5672 }
5673 /* ../lib/standard/string.nit:981 */
5674 fra.me.REG[1] = ATTR_standard___string___Sys____args_cache(fra.me.REG[1]);
5675 REGB0 = TAG_Bool(fra.me.REG[1]!=NIT_NULL);
5676 if (UNTAG_Bool(REGB0)) {
5677 } else {
5678 nit_abort("Cast failed", NULL, LOCATE_standard___string, 981);
5679 }
5680 goto label1;
5681 label1: while(0);
5682 stack_frame_head = fra.me.prev;
5683 return fra.me.REG[1];
5684 }
5685 static const char LOCATE_standard___string___Sys___program_name[] = "string::Sys::program_name";
5686 val_t standard___string___Sys___program_name(val_t p0){
5687 struct {struct stack_frame_t me;} fra;
5688 val_t REGB0;
5689 val_t tmp;
5690 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5691 fra.me.file = LOCATE_standard___string;
5692 fra.me.line = 984;
5693 fra.me.meth = LOCATE_standard___string___Sys___program_name;
5694 fra.me.has_broke = 0;
5695 fra.me.REG_size = 1;
5696 fra.me.nitni_local_ref_head = NULL;
5697 fra.me.REG[0] = NIT_NULL;
5698 fra.me.REG[0] = p0;
5699 /* ../lib/standard/string.nit:987 */
5700 REGB0 = TAG_Int(0);
5701 fra.me.REG[0] = CALL_standard___string___Sys___native_argv(fra.me.REG[0])(fra.me.REG[0], REGB0);
5702 fra.me.REG[0] = NEW_String_standard___string___String___from_cstring(fra.me.REG[0]);
5703 goto label1;
5704 label1: while(0);
5705 stack_frame_head = fra.me.prev;
5706 return fra.me.REG[0];
5707 }
5708 static const char LOCATE_standard___string___Sys___init_args[] = "string::Sys::init_args";
5709 void standard___string___Sys___init_args(val_t p0){
5710 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
5711 val_t REGB0;
5712 val_t REGB1;
5713 val_t REGB2;
5714 val_t tmp;
5715 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5716 fra.me.file = LOCATE_standard___string;
5717 fra.me.line = 990;
5718 fra.me.meth = LOCATE_standard___string___Sys___init_args;
5719 fra.me.has_broke = 0;
5720 fra.me.REG_size = 3;
5721 fra.me.nitni_local_ref_head = NULL;
5722 fra.me.REG[0] = NIT_NULL;
5723 fra.me.REG[1] = NIT_NULL;
5724 fra.me.REG[2] = NIT_NULL;
5725 fra.me.REG[0] = p0;
5726 /* ../lib/standard/string.nit:993 */
5727 REGB0 = CALL_standard___string___Sys___native_argc(fra.me.REG[0])(fra.me.REG[0]);
5728 /* ../lib/standard/string.nit:994 */
5729 REGB1 = TAG_Int(0);
5730 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB1);
5731 /* ../lib/standard/string.nit:995 */
5732 REGB1 = TAG_Int(1);
5733 /* ../lib/standard/string.nit:996 */
5734 while(1) {
5735 REGB2 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
5736 if (UNTAG_Bool(REGB2)) {
5737 } else {
5738 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
5739 }
5740 /* ../lib/standard/kernel.nit:235 */
5741 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB0));
5742 /* ../lib/standard/string.nit:996 */
5743 if (UNTAG_Bool(REGB2)) {
5744 /* ../lib/standard/string.nit:997 */
5745 REGB2 = TAG_Int(1);
5746 /* ../lib/standard/kernel.nit:240 */
5747 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
5748 /* ../lib/standard/string.nit:997 */
5749 fra.me.REG[2] = CALL_standard___string___Sys___native_argv(fra.me.REG[0])(fra.me.REG[0], REGB1);
5750 fra.me.REG[2] = NEW_String_standard___string___String___from_cstring(fra.me.REG[2]);
5751 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB2, fra.me.REG[2]);
5752 /* ../lib/standard/string.nit:998 */
5753 REGB2 = TAG_Int(1);
5754 /* ../lib/standard/kernel.nit:238 */
5755 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
5756 /* ../lib/standard/string.nit:998 */
5757 REGB1 = REGB2;
5758 } else {
5759 /* ../lib/standard/string.nit:996 */
5760 goto label1;
5761 }
5762 }
5763 label1: while(0);
5764 /* ../lib/standard/string.nit:1000 */
5765 ATTR_standard___string___Sys____args_cache(fra.me.REG[0]) = fra.me.REG[1];
5766 stack_frame_head = fra.me.prev;
5767 return;
5768 }
5769 static const char LOCATE_standard___string___Sys___native_argc[] = "string::Sys::native_argc";
5770 val_t standard___string___Sys___native_argc(val_t p0){
5771 struct {struct stack_frame_t me;} fra;
5772 val_t REGB0;
5773 val_t tmp;
5774 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5775 fra.me.file = LOCATE_standard___string;
5776 fra.me.line = 1003;
5777 fra.me.meth = LOCATE_standard___string___Sys___native_argc;
5778 fra.me.has_broke = 0;
5779 fra.me.REG_size = 1;
5780 fra.me.nitni_local_ref_head = NULL;
5781 fra.me.REG[0] = NIT_NULL;
5782 fra.me.REG[0] = p0;
5783 /* ../lib/standard/string.nit:1003 */
5784 REGB0 = Sys_native_argc___out(fra.me.REG[0]);
5785 stack_frame_head = fra.me.prev;
5786 return REGB0;
5787 }
5788 static const char LOCATE_standard___string___Sys___native_argv[] = "string::Sys::native_argv";
5789 val_t standard___string___Sys___native_argv(val_t p0, val_t p1){
5790 struct {struct stack_frame_t me;} fra;
5791 val_t REGB0;
5792 val_t tmp;
5793 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5794 fra.me.file = LOCATE_standard___string;
5795 fra.me.line = 1005;
5796 fra.me.meth = LOCATE_standard___string___Sys___native_argv;
5797 fra.me.has_broke = 0;
5798 fra.me.REG_size = 1;
5799 fra.me.nitni_local_ref_head = NULL;
5800 fra.me.REG[0] = NIT_NULL;
5801 fra.me.REG[0] = p0;
5802 REGB0 = p1;
5803 /* ../lib/standard/string.nit:1005 */
5804 fra.me.REG[0] = Sys_native_argv___out(fra.me.REG[0], REGB0);
5805 stack_frame_head = fra.me.prev;
5806 return fra.me.REG[0];
5807 }