ni_nitdoc: fixed <li> tags style in formatted comments
[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 = 32;
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:32 */
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, 32);
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 = 34;
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:37 */
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, 37);
48 }
49 fra.me.REG[0] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
50 /* ../lib/standard/string.nit:970 */
51 REGB0 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]);
52 /* ../lib/standard/string.nit:37 */
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 = 39;
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:51 */
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:243 */
88 REGB2 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB2));
89 /* ../lib/standard/string.nit:51 */
90 if (UNTAG_Bool(REGB2)) {
91 } else {
92 nit_abort("Assert failed", NULL, LOCATE_standard___string, 51);
93 }
94 /* ../lib/standard/kernel.nit:245 */
95 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
96 /* ../lib/standard/string.nit:52 */
97 REGB1 = REGB2;
98 /* ../lib/standard/string.nit:53 */
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:242 */
106 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
107 /* ../lib/standard/string.nit:53 */
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:244 */
125 REGB2 = TAG_Bool(UNTAG_Int(REGB1)>UNTAG_Int(REGB2));
126 /* ../lib/standard/string.nit:54 */
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:54 */
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:242 */
144 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
145 /* ../lib/standard/string.nit:55 */
146 if (UNTAG_Bool(REGB2)) {
147 /* ../lib/standard/kernel.nit:247 */
148 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
149 /* ../lib/standard/string.nit:56 */
150 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB2);
151 /* ../lib/standard/string.nit:57 */
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:242 */
159 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
160 /* ../lib/standard/string.nit:57 */
161 if (UNTAG_Bool(REGB2)) {
162 /* ../lib/standard/string.nit:58 */
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, 58);
167 }
168 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
169 /* ../lib/standard/string.nit:970 */
170 REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
171 /* ../lib/standard/string.nit:58 */
172 CALL_standard___collection___abstract_collection___Sequence___push(fra.me.REG[1])(fra.me.REG[1], REGB2);
173 /* ../lib/standard/string.nit:59 */
174 REGB2 = TAG_Int(1);
175 /* ../lib/standard/kernel.nit:245 */
176 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
177 /* ../lib/standard/string.nit:59 */
178 REGB0 = REGB2;
179 } else {
180 /* ../lib/standard/string.nit:57 */
181 goto label1;
182 }
183 }
184 label1: while(0);
185 /* ../lib/standard/string.nit:61 */
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:63 */
190 if (!once_value_3) {
191 fra.me.REG[0] = BOX_NativeString("");
192 REGB0 = TAG_Int(0);
193 fra.me.REG[0] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[0])(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 = 67;
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:242 */
235 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
236 /* ../lib/standard/string.nit:76 */
237 if (UNTAG_Bool(REGB1)) {
238 } else {
239 nit_abort("Assert failed", NULL, LOCATE_standard___string, 76);
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:247 */
249 REGB1 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
250 /* ../lib/standard/string.nit:77 */
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 = 80;
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:86 */
290 REGB2 = TAG_Int(1);
291 /* ../lib/standard/kernel.nit:247 */
292 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
293 /* ../lib/standard/kernel.nit:245 */
294 REGB0 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
295 /* ../lib/standard/string.nit:88 */
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, 88);
300 }
301 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
302 /* ../lib/standard/string.nit:89 */
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, 89);
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:244 */
322 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
323 /* ../lib/standard/string.nit:90 */
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:244 */
333 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB0));
334 /* ../lib/standard/string.nit:90 */
335 REGB1 = REGB3;
336 }
337 if (UNTAG_Bool(REGB1)) {
338 REGB1 = TAG_Bool(0);
339 goto label1;
340 }
341 /* ../lib/standard/string.nit:91 */
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, 91);
346 }
347 REGB3 = ATTR_standard___string___String____index_from(fra.me.REG[1]);
348 /* ../lib/standard/kernel.nit:245 */
349 REGB4 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
350 /* ../lib/standard/string.nit:92 */
351 REGB2 = REGB4;
352 /* ../lib/standard/string.nit:93 */
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:243 */
360 REGB4 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB3));
361 /* ../lib/standard/string.nit:93 */
362 if (UNTAG_Bool(REGB4)) {
363 /* ../lib/standard/string.nit:970 */
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:94 */
367 REGB6 = TAG_Bool(IS_EQUAL_OO(REGB4,REGB5));
368 if (UNTAG_Bool(REGB6)) {
369 } else {
370 /* ../lib/standard/kernel.nit:434 */
371 REGB5 = TAG_Bool((REGB4)==(REGB5));
372 /* ../lib/standard/string.nit:94 */
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:95 */
382 REGB6 = TAG_Int(1);
383 /* ../lib/standard/kernel.nit:247 */
384 REGB6 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB6));
385 /* ../lib/standard/string.nit:95 */
386 REGB0 = REGB6;
387 /* ../lib/standard/string.nit:96 */
388 REGB6 = TAG_Int(1);
389 /* ../lib/standard/kernel.nit:247 */
390 REGB6 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB6));
391 /* ../lib/standard/string.nit:96 */
392 REGB2 = REGB6;
393 } else {
394 /* ../lib/standard/string.nit:93 */
395 goto label2;
396 }
397 }
398 label2: while(0);
399 /* ../lib/standard/string.nit:98 */
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 = 101;
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:105 */
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 = 107;
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:247 */
462 REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1));
463 /* ../lib/standard/string.nit:111 */
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 = 113;
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:120 */
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:981 */
488 REGB0 = TAG_Int(atoi(UNBOX_NativeString(fra.me.REG[0])));
489 /* ../lib/standard/string.nit:120 */
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 = 123;
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:131 */
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 = 134;
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:135 */
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 = 137;
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:137 */
558 fra.me.REG[1] = REGB0;
559 /* ../lib/standard/string.nit:142 */
560 REGB0 = TAG_Int(0);
561 fra.me.REG[2] = REGB0;
562 /* ../lib/standard/string.nit:143 */
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:160 */
571 if (UNTAG_Bool(fra.me.REG[3])) {
572 /* ../lib/standard/kernel.nit:246 */
573 REGB0 = TAG_Int(-UNTAG_Int(fra.me.REG[2]));
574 /* ../lib/standard/string.nit:161 */
575 fra.me.REG[0] = REGB0;
576 goto label3;
577 } else {
578 /* ../lib/standard/string.nit:163 */
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:145 */
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:147 */
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:244 */
615 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(closctx->REG[1]));
616 /* ../lib/standard/string.nit:148 */
617 if (UNTAG_Bool(REGB1)) {
618 /* ../lib/standard/string.nit:149 */
619 if (UNTAG_Bool(closctx->REG[3])) {
620 /* ../lib/standard/kernel.nit:246 */
621 REGB1 = TAG_Int(-UNTAG_Int(closctx->REG[2]));
622 /* ../lib/standard/string.nit:150 */
623 closctx->REG[0] = REGB1;
624 closctx->has_broke = 1;
625 goto label2;
626 } else {
627 /* ../lib/standard/string.nit:152 */
628 closctx->REG[0] = closctx->REG[2];
629 closctx->has_broke = 1;
630 goto label2;
631 }
632 } else {
633 /* ../lib/standard/string.nit:154 */
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:242 */
641 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
642 /* ../lib/standard/string.nit:154 */
643 if (UNTAG_Bool(REGB1)) {
644 /* ../lib/standard/string.nit:155 */
645 REGB1 = TAG_Bool(1);
646 closctx->REG[3] = REGB1;
647 } else {
648 /* ../lib/standard/kernel.nit:248 */
649 REGB1 = TAG_Int(UNTAG_Int(closctx->REG[2])*UNTAG_Int(closctx->REG[1]));
650 /* ../lib/standard/kernel.nit:245 */
651 REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
652 /* ../lib/standard/string.nit:157 */
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 = 167;
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:175 */
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:188 */
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:176 */
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:178 */
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:180 */
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:434 */
723 REGB1 = TAG_Bool((REGB0)==(REGB1));
724 /* ../lib/standard/string.nit:180 */
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:434 */
735 REGB1 = TAG_Bool((REGB0)==(REGB1));
736 /* ../lib/standard/string.nit:180 */
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:182 */
749 REGB2 = TAG_Bool(1);
750 closctx->REG[1] = REGB2;
751 } else {
752 /* ../lib/standard/string.nit:184 */
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 = 191;
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:196 */
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:198 */
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:197 */
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 = 201;
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:206 */
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:208 */
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:207 */
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 = 211;
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:218 */
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, 218);
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:237 */
908 REGB1 = TAG_Bool((REGB0)==(REGB1));
909 /* ../lib/standard/string.nit:218 */
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:220 */
917 REGB2 = TAG_Int(0);
918 /* ../lib/standard/string.nit:221 */
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:471 */
922 REGB1 = TAG_Int((unsigned char)UNTAG_Char(REGB1));
923 /* ../lib/standard/string.nit:221 */
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:241 */
931 REGB0 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB0));
932 /* ../lib/standard/string.nit:221 */
933 if (UNTAG_Bool(REGB0)) {
934 /* ../lib/standard/string.nit:222 */
935 REGB0 = TAG_Int(1);
936 /* ../lib/standard/kernel.nit:245 */
937 REGB0 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
938 /* ../lib/standard/string.nit:222 */
939 REGB2 = REGB0;
940 /* ../lib/standard/string.nit:223 */
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, 223);
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:237 */
951 REGB0 = TAG_Bool((REGB2)==(REGB0));
952 /* ../lib/standard/string.nit:223 */
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] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[2])(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:221 */
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:226 */
981 REGB0 = TAG_Int(1);
982 /* ../lib/standard/kernel.nit:247 */
983 REGB0 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
984 /* ../lib/standard/string.nit:227 */
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:471 */
988 REGB1 = TAG_Int((unsigned char)UNTAG_Char(REGB1));
989 /* ../lib/standard/string.nit:227 */
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:241 */
997 REGB3 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB3));
998 /* ../lib/standard/string.nit:227 */
999 if (UNTAG_Bool(REGB3)) {
1000 /* ../lib/standard/string.nit:228 */
1001 REGB3 = TAG_Int(1);
1002 /* ../lib/standard/kernel.nit:247 */
1003 REGB3 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB3));
1004 /* ../lib/standard/string.nit:228 */
1005 REGB0 = REGB3;
1006 /* ../lib/standard/string.nit:229 */
1007 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB2));
1008 if (UNTAG_Bool(REGB3)) {
1009 } else {
1010 /* ../lib/standard/kernel.nit:237 */
1011 REGB1 = TAG_Bool((REGB0)==(REGB2));
1012 /* ../lib/standard/string.nit:229 */
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:227 */
1023 goto label4;
1024 }
1025 }
1026 label4: while(0);
1027 /* ../lib/standard/kernel.nit:247 */
1028 REGB0 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
1029 /* ../lib/standard/string.nit:231 */
1030 REGB3 = TAG_Int(1);
1031 /* ../lib/standard/kernel.nit:245 */
1032 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
1033 /* ../lib/standard/string.nit:231 */
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 = 234;
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:236 */
1059 REGB0 = TAG_Int(0);
1060 /* ../lib/standard/string.nit:237 */
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:242 */
1075 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1076 /* ../lib/standard/string.nit:237 */
1077 if (UNTAG_Bool(REGB1)) {
1078 /* ../lib/standard/string.nit:238 */
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, 238);
1083 }
1084 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1085 /* ../lib/standard/string.nit:970 */
1086 REGB1 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB0)]);
1087 /* ../lib/standard/kernel.nit:436 */
1088 printf("%c", (unsigned char)UNTAG_Char(REGB1));;
1089 /* ../lib/standard/string.nit:239 */
1090 REGB1 = TAG_Int(1);
1091 /* ../lib/standard/kernel.nit:245 */
1092 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1093 /* ../lib/standard/string.nit:239 */
1094 REGB0 = REGB1;
1095 } else {
1096 /* ../lib/standard/string.nit:237 */
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 = 252;
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:252 */
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, 252);
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 = 255;
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:255 */
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, 255);
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 = 262;
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:263 */
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:243 */
1179 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
1180 /* ../lib/standard/string.nit:263 */
1181 if (UNTAG_Bool(REGB1)) {
1182 } else {
1183 nit_abort("Assert failed", NULL, LOCATE_standard___string, 263);
1184 }
1185 /* ../lib/standard/string.nit:266 */
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, 266);
1190 }
1191 REGB1 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1192 /* ../lib/standard/kernel.nit:245 */
1193 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1194 /* ../lib/standard/string.nit:266 */
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, 266);
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:241 */
1207 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB2));
1208 /* ../lib/standard/string.nit:266 */
1209 if (UNTAG_Bool(REGB2)) {
1210 } else {
1211 nit_abort("Assert failed", NULL, LOCATE_standard___string, 266);
1212 }
1213 /* ../lib/standard/string.nit:267 */
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, 267);
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, 267);
1224 }
1225 REGB2 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1226 /* ../lib/standard/kernel.nit:245 */
1227 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
1228 /* ../lib/standard/string.nit:970 */
1229 REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB2)]);
1230 /* ../lib/standard/string.nit:267 */
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 = 270;
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:272 */
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:243 */
1267 REGB2 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB2));
1268 /* ../lib/standard/string.nit:272 */
1269 if (UNTAG_Bool(REGB2)) {
1270 } else {
1271 nit_abort("Assert failed", NULL, LOCATE_standard___string, 272);
1272 }
1273 /* ../lib/standard/string.nit:274 */
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:242 */
1281 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
1282 /* ../lib/standard/string.nit:274 */
1283 if (UNTAG_Bool(REGB2)) {
1284 /* ../lib/standard/kernel.nit:245 */
1285 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
1286 /* ../lib/standard/string.nit:275 */
1287 REGB1 = REGB2;
1288 /* ../lib/standard/string.nit:276 */
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:242 */
1296 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
1297 /* ../lib/standard/string.nit:276 */
1298 if (UNTAG_Bool(REGB2)) {
1299 REGB2 = TAG_Int(0);
1300 REGB1 = REGB2;
1301 }
1302 /* ../lib/standard/string.nit:277 */
1303 REGB2 = TAG_Int(0);
1304 REGB0 = REGB2;
1305 }
1306 /* ../lib/standard/string.nit:280 */
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, 280);
1311 }
1312 REGB2 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1313 /* ../lib/standard/kernel.nit:245 */
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:282 */
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, 282);
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:244 */
1329 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB3));
1330 /* ../lib/standard/string.nit:282 */
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, 282);
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, 282);
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:284 */
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:237 */
1353 REGB3 = TAG_Bool((REGB1)==(REGB3));
1354 /* ../lib/standard/string.nit:284 */
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] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[2])(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:245 */
1370 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1371 /* ../lib/standard/string.nit:286 */
1372 REGB2 = TAG_Int(1);
1373 /* ../lib/standard/kernel.nit:247 */
1374 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
1375 /* ../lib/standard/string.nit:286 */
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, 286);
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 = 289;
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:291 */
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, 291);
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:244 */
1421 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
1422 /* ../lib/standard/string.nit:291 */
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] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[1])(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:292 */
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:242 */
1442 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1443 /* ../lib/standard/string.nit:292 */
1444 if (UNTAG_Bool(REGB1)) {
1445 REGB1 = TAG_Int(0);
1446 REGB0 = REGB1;
1447 }
1448 /* ../lib/standard/string.nit:293 */
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, 293);
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 = 296;
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:298 */
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, 298);
1492 }
1493 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1494 REGB2 = TAG_Int(1);
1495 /* ../lib/standard/kernel.nit:247 */
1496 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
1497 /* ../lib/standard/kernel.nit:245 */
1498 REGB0 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
1499 /* ../lib/standard/string.nit:301 */
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, 301);
1504 }
1505 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1506 /* ../lib/standard/string.nit:303 */
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, 303);
1511 }
1512 fra.me.REG[3] = ATTR_standard___string___AbstractString____items(fra.me.REG[1]);
1513 /* ../lib/standard/string.nit:305 */
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, 305);
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:244 */
1526 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
1527 /* ../lib/standard/string.nit:305 */
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:244 */
1537 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB0));
1538 /* ../lib/standard/string.nit:305 */
1539 REGB1 = REGB3;
1540 }
1541 if (UNTAG_Bool(REGB1)) {
1542 REGB1 = TAG_Bool(0);
1543 goto label1;
1544 }
1545 /* ../lib/standard/string.nit:307 */
1546 REGB3 = CALL_standard___string___String___index_from(fra.me.REG[1])(fra.me.REG[1]);
1547 /* ../lib/standard/kernel.nit:245 */
1548 REGB4 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
1549 /* ../lib/standard/string.nit:308 */
1550 REGB2 = REGB4;
1551 /* ../lib/standard/string.nit:309 */
1552 REGB4 = CALL_standard___string___String___index_from(fra.me.REG[0])(fra.me.REG[0]);
1553 /* ../lib/standard/kernel.nit:245 */
1554 REGB4 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB4));
1555 /* ../lib/standard/string.nit:309 */
1556 REGB0 = REGB4;
1557 /* ../lib/standard/string.nit:311 */
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:243 */
1565 REGB4 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB3));
1566 /* ../lib/standard/string.nit:311 */
1567 if (UNTAG_Bool(REGB4)) {
1568 /* ../lib/standard/string.nit:970 */
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:312 */
1572 REGB6 = TAG_Bool(IS_EQUAL_OO(REGB4,REGB5));
1573 if (UNTAG_Bool(REGB6)) {
1574 } else {
1575 /* ../lib/standard/kernel.nit:434 */
1576 REGB5 = TAG_Bool((REGB4)==(REGB5));
1577 /* ../lib/standard/string.nit:312 */
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:313 */
1587 REGB6 = TAG_Int(1);
1588 /* ../lib/standard/kernel.nit:247 */
1589 REGB6 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB6));
1590 /* ../lib/standard/string.nit:313 */
1591 REGB0 = REGB6;
1592 /* ../lib/standard/string.nit:314 */
1593 REGB6 = TAG_Int(1);
1594 /* ../lib/standard/kernel.nit:247 */
1595 REGB6 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB6));
1596 /* ../lib/standard/string.nit:314 */
1597 REGB2 = REGB6;
1598 } else {
1599 /* ../lib/standard/string.nit:311 */
1600 goto label2;
1601 }
1602 }
1603 label2: while(0);
1604 /* ../lib/standard/string.nit:317 */
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 = 320;
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:322 */
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, 322);
1636 }
1637 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1638 REGB1 = TAG_Int(1);
1639 /* ../lib/standard/kernel.nit:245 */
1640 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1641 /* ../lib/standard/string.nit:1007 */
1642 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
1643 /* ../lib/standard/string.nit:323 */
1644 REGB1 = TAG_Int(0);
1645 /* ../lib/standard/string.nit:325 */
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, 325);
1650 }
1651 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1652 /* ../lib/standard/string.nit:326 */
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, 326);
1657 }
1658 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1659 /* ../lib/standard/string.nit:327 */
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, 327);
1664 }
1665 REGB2 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
1666 /* ../lib/standard/string.nit:329 */
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:241 */
1674 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB2));
1675 /* ../lib/standard/string.nit:329 */
1676 if (UNTAG_Bool(REGB3)) {
1677 /* ../lib/standard/string.nit:970 */
1678 REGB3 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
1679 /* ../lib/standard/string.nit:330 */
1680 REGB3 = CALL_standard___kernel___Char___to_upper(REGB3)(REGB3);
1681 /* ../lib/standard/string.nit:971 */
1682 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB1)]=UNTAG_Char(REGB3);;
1683 /* ../lib/standard/string.nit:331 */
1684 REGB3 = TAG_Int(1);
1685 /* ../lib/standard/kernel.nit:245 */
1686 REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
1687 /* ../lib/standard/string.nit:331 */
1688 REGB1 = REGB3;
1689 /* ../lib/standard/string.nit:332 */
1690 REGB3 = TAG_Int(1);
1691 /* ../lib/standard/kernel.nit:245 */
1692 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
1693 /* ../lib/standard/string.nit:332 */
1694 REGB0 = REGB3;
1695 } else {
1696 /* ../lib/standard/string.nit:329 */
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:335 */
1709 REGB1 = TAG_Char('\0');
1710 /* ../lib/standard/string.nit:971 */
1711 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB1);;
1712 /* ../lib/standard/string.nit:337 */
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, 337);
1717 }
1718 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1719 fra.me.REG[1] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[1])(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 = 340;
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:342 */
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, 342);
1749 }
1750 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1751 REGB1 = TAG_Int(1);
1752 /* ../lib/standard/kernel.nit:245 */
1753 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1754 /* ../lib/standard/string.nit:1007 */
1755 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
1756 /* ../lib/standard/string.nit:343 */
1757 REGB1 = TAG_Int(0);
1758 /* ../lib/standard/string.nit:345 */
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, 345);
1763 }
1764 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1765 /* ../lib/standard/string.nit:346 */
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, 346);
1770 }
1771 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1772 /* ../lib/standard/string.nit:347 */
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, 347);
1777 }
1778 REGB2 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
1779 /* ../lib/standard/string.nit:349 */
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:241 */
1787 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB2));
1788 /* ../lib/standard/string.nit:349 */
1789 if (UNTAG_Bool(REGB3)) {
1790 /* ../lib/standard/string.nit:970 */
1791 REGB3 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
1792 /* ../lib/standard/string.nit:350 */
1793 REGB3 = CALL_standard___kernel___Char___to_lower(REGB3)(REGB3);
1794 /* ../lib/standard/string.nit:971 */
1795 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB1)]=UNTAG_Char(REGB3);;
1796 /* ../lib/standard/string.nit:351 */
1797 REGB3 = TAG_Int(1);
1798 /* ../lib/standard/kernel.nit:245 */
1799 REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
1800 /* ../lib/standard/string.nit:351 */
1801 REGB1 = REGB3;
1802 /* ../lib/standard/string.nit:352 */
1803 REGB3 = TAG_Int(1);
1804 /* ../lib/standard/kernel.nit:245 */
1805 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
1806 /* ../lib/standard/string.nit:352 */
1807 REGB0 = REGB3;
1808 } else {
1809 /* ../lib/standard/string.nit:349 */
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:355 */
1822 REGB1 = TAG_Char('\0');
1823 /* ../lib/standard/string.nit:971 */
1824 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB1);;
1825 /* ../lib/standard/string.nit:357 */
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, 357);
1830 }
1831 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1832 fra.me.REG[1] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[1])(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 = 360;
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:362 */
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, 362);
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:237 */
1871 REGB1 = TAG_Bool((REGB0)==(REGB1));
1872 /* ../lib/standard/string.nit:362 */
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:364 */
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, 364);
1884 }
1885 REGB2 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
1886 /* ../lib/standard/string.nit:365 */
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, 365);
1892 }
1893 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1894 /* ../lib/standard/string.nit:970 */
1895 REGB1 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB2)]);
1896 /* ../lib/standard/kernel.nit:471 */
1897 REGB1 = TAG_Int((unsigned char)UNTAG_Char(REGB1));
1898 /* ../lib/standard/string.nit:365 */
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:241 */
1906 REGB0 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB0));
1907 /* ../lib/standard/string.nit:365 */
1908 if (UNTAG_Bool(REGB0)) {
1909 /* ../lib/standard/string.nit:366 */
1910 REGB0 = TAG_Int(1);
1911 /* ../lib/standard/kernel.nit:245 */
1912 REGB0 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
1913 /* ../lib/standard/string.nit:366 */
1914 REGB2 = REGB0;
1915 /* ../lib/standard/string.nit:367 */
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, 367);
1920 }
1921 REGB0 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
1922 REGB1 = TAG_Int(1);
1923 /* ../lib/standard/kernel.nit:245 */
1924 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1925 /* ../lib/standard/string.nit:367 */
1926 REGB0 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1));
1927 if (UNTAG_Bool(REGB0)) {
1928 } else {
1929 /* ../lib/standard/kernel.nit:237 */
1930 REGB1 = TAG_Bool((REGB2)==(REGB1));
1931 /* ../lib/standard/string.nit:367 */
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] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[2])(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:365 */
1948 goto label3;
1949 }
1950 }
1951 label3: while(0);
1952 /* ../lib/standard/string.nit:370 */
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, 370);
1957 }
1958 REGB0 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
1959 /* ../lib/standard/string.nit:371 */
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, 371);
1965 }
1966 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
1967 /* ../lib/standard/string.nit:970 */
1968 REGB1 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
1969 /* ../lib/standard/kernel.nit:471 */
1970 REGB1 = TAG_Int((unsigned char)UNTAG_Char(REGB1));
1971 /* ../lib/standard/string.nit:371 */
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:241 */
1979 REGB3 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB3));
1980 /* ../lib/standard/string.nit:371 */
1981 if (UNTAG_Bool(REGB3)) {
1982 /* ../lib/standard/string.nit:372 */
1983 REGB3 = TAG_Int(1);
1984 /* ../lib/standard/kernel.nit:247 */
1985 REGB3 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB3));
1986 /* ../lib/standard/string.nit:372 */
1987 REGB0 = REGB3;
1988 /* ../lib/standard/string.nit:373 */
1989 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB2));
1990 if (UNTAG_Bool(REGB3)) {
1991 } else {
1992 /* ../lib/standard/kernel.nit:237 */
1993 REGB1 = TAG_Bool((REGB0)==(REGB2));
1994 /* ../lib/standard/string.nit:373 */
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, 373);
2002 }
2003 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2004 /* ../lib/standard/string.nit:970 */
2005 REGB3 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB2)]);
2006 /* ../lib/standard/string.nit:373 */
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:371 */
2013 goto label4;
2014 }
2015 }
2016 label4: while(0);
2017 /* ../lib/standard/string.nit:375 */
2018 REGB3 = CALL_standard___string___String___index_from(fra.me.REG[0])(fra.me.REG[0]);
2019 /* ../lib/standard/kernel.nit:247 */
2020 REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
2021 /* ../lib/standard/string.nit:375 */
2022 REGB2 = REGB3;
2023 /* ../lib/standard/string.nit:376 */
2024 REGB3 = CALL_standard___string___String___index_from(fra.me.REG[0])(fra.me.REG[0]);
2025 /* ../lib/standard/kernel.nit:247 */
2026 REGB3 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB3));
2027 /* ../lib/standard/string.nit:376 */
2028 REGB0 = REGB3;
2029 /* ../lib/standard/kernel.nit:247 */
2030 REGB0 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
2031 /* ../lib/standard/string.nit:377 */
2032 REGB3 = TAG_Int(1);
2033 /* ../lib/standard/kernel.nit:245 */
2034 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
2035 /* ../lib/standard/string.nit:377 */
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 = 380;
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:382 */
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, 382);
2065 }
2066 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2067 /* ../lib/standard/string.nit:383 */
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, 383);
2072 }
2073 REGB1 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
2074 /* ../lib/standard/string.nit:384 */
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:241 */
2082 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB1));
2083 /* ../lib/standard/string.nit:384 */
2084 if (UNTAG_Bool(REGB2)) {
2085 /* ../lib/standard/string.nit:385 */
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, 385);
2090 }
2091 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2092 /* ../lib/standard/string.nit:970 */
2093 REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB0)]);
2094 /* ../lib/standard/kernel.nit:436 */
2095 printf("%c", (unsigned char)UNTAG_Char(REGB2));;
2096 /* ../lib/standard/string.nit:386 */
2097 REGB2 = TAG_Int(1);
2098 /* ../lib/standard/kernel.nit:245 */
2099 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
2100 /* ../lib/standard/string.nit:386 */
2101 REGB0 = REGB2;
2102 } else {
2103 /* ../lib/standard/string.nit:384 */
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 = 394;
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:402 */
2133 ATTR_standard___string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1];
2134 /* ../lib/standard/string.nit:403 */
2135 ATTR_standard___string___String____index_from(fra.me.REG[0]) = REGB0;
2136 /* ../lib/standard/string.nit:404 */
2137 ATTR_standard___string___String____index_to(fra.me.REG[0]) = REGB1;
2138 /* ../lib/standard/kernel.nit:247 */
2139 REGB0 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
2140 /* ../lib/standard/string.nit:405 */
2141 REGB1 = TAG_Int(1);
2142 /* ../lib/standard/kernel.nit:245 */
2143 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2144 /* ../lib/standard/string.nit:405 */
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_infos[] = "string::String::with_infos";
2151 void standard___string___String___with_infos(val_t p0, val_t p1, val_t p2, val_t p3, val_t p4, 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 = 408;
2162 fra.me.meth = LOCATE_standard___string___String___with_infos;
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 REGB1 = p3;
2172 REGB2 = p4;
2173 /* ../lib/standard/string.nit:410 */
2174 ATTR_standard___string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1];
2175 /* ../lib/standard/string.nit:411 */
2176 ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0;
2177 /* ../lib/standard/string.nit:412 */
2178 ATTR_standard___string___String____index_from(fra.me.REG[0]) = REGB1;
2179 /* ../lib/standard/string.nit:413 */
2180 ATTR_standard___string___String____index_to(fra.me.REG[0]) = REGB2;
2181 stack_frame_head = fra.me.prev;
2182 init_table[itpos1] = 1;
2183 return;
2184 }
2185 static const char LOCATE_standard___string___String___to_cstring[] = "string::String::to_cstring";
2186 val_t standard___string___String___to_cstring(val_t p0){
2187 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
2188 val_t REGB0;
2189 val_t REGB1;
2190 val_t REGB2;
2191 val_t REGB3;
2192 val_t tmp;
2193 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2194 fra.me.file = LOCATE_standard___string;
2195 fra.me.line = 416;
2196 fra.me.meth = LOCATE_standard___string___String___to_cstring;
2197 fra.me.has_broke = 0;
2198 fra.me.REG_size = 3;
2199 fra.me.nitni_local_ref_head = NULL;
2200 fra.me.REG[0] = NIT_NULL;
2201 fra.me.REG[1] = NIT_NULL;
2202 fra.me.REG[2] = NIT_NULL;
2203 fra.me.REG[0] = p0;
2204 /* ../lib/standard/string.nit:419 */
2205 REGB0 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2206 if (UNTAG_Bool(REGB0)) {
2207 } else {
2208 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 419);
2209 }
2210 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2211 REGB1 = TAG_Int(0);
2212 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2213 if (UNTAG_Bool(REGB2)) {
2214 } else {
2215 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2216 }
2217 /* ../lib/standard/kernel.nit:244 */
2218 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
2219 /* ../lib/standard/string.nit:419 */
2220 if (UNTAG_Bool(REGB1)) {
2221 REGB1 = TAG_Bool(1);
2222 } else {
2223 REGB0 = TAG_Bool(ATTR_standard___string___String____index_to(fra.me.REG[0])!=NIT_NULL);
2224 if (UNTAG_Bool(REGB0)) {
2225 } else {
2226 nit_abort("Uninitialized attribute %s", "_index_to", LOCATE_standard___string, 419);
2227 }
2228 REGB0 = ATTR_standard___string___String____index_to(fra.me.REG[0]);
2229 fra.me.REG[1] = CALL_standard___string___AbstractString___items(fra.me.REG[0])(fra.me.REG[0]);
2230 REGB2 = CALL_standard___string___NativeString___cstring_length(fra.me.REG[1])(fra.me.REG[1]);
2231 REGB3 = TAG_Int(1);
2232 /* ../lib/standard/kernel.nit:247 */
2233 REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
2234 /* ../lib/standard/string.nit:419 */
2235 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB3));
2236 if (UNTAG_Bool(REGB2)) {
2237 } else {
2238 /* ../lib/standard/kernel.nit:237 */
2239 REGB3 = TAG_Bool((REGB0)==(REGB3));
2240 /* ../lib/standard/string.nit:419 */
2241 REGB2 = REGB3;
2242 }
2243 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
2244 REGB1 = REGB2;
2245 }
2246 if (UNTAG_Bool(REGB1)) {
2247 /* ../lib/standard/string.nit:420 */
2248 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2249 if (UNTAG_Bool(REGB1)) {
2250 } else {
2251 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 420);
2252 }
2253 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2254 REGB2 = TAG_Int(1);
2255 /* ../lib/standard/kernel.nit:245 */
2256 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
2257 /* ../lib/standard/string.nit:1007 */
2258 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB2) * sizeof(char))));
2259 /* ../lib/standard/string.nit:421 */
2260 fra.me.REG[2] = CALL_standard___string___AbstractString___items(fra.me.REG[0])(fra.me.REG[0]);
2261 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2262 if (UNTAG_Bool(REGB2)) {
2263 } else {
2264 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 421);
2265 }
2266 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2267 REGB1 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2268 if (UNTAG_Bool(REGB1)) {
2269 } else {
2270 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 421);
2271 }
2272 REGB1 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2273 REGB3 = TAG_Int(0);
2274 /* ../lib/standard/string.nit:972 */
2275 (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB3), UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB1), UNTAG_Int(REGB2));;
2276 /* ../lib/standard/collection/array.nit:24 */
2277 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2278 if (UNTAG_Bool(REGB3)) {
2279 } else {
2280 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2281 }
2282 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2283 /* ../lib/standard/string.nit:422 */
2284 REGB1 = TAG_Char('\0');
2285 /* ../lib/standard/string.nit:971 */
2286 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB3)]=UNTAG_Char(REGB1);;
2287 /* ../lib/standard/string.nit:423 */
2288 goto label1;
2289 }
2290 /* ../lib/standard/string.nit:425 */
2291 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2292 if (UNTAG_Bool(REGB1)) {
2293 } else {
2294 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 425);
2295 }
2296 fra.me.REG[0] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2297 fra.me.REG[1] = fra.me.REG[0];
2298 goto label1;
2299 label1: while(0);
2300 stack_frame_head = fra.me.prev;
2301 return fra.me.REG[1];
2302 }
2303 static const char LOCATE_standard___string___String_____eqeq[] = "string::String::(kernel::Object::==)";
2304 val_t standard___string___String_____eqeq(val_t p0, val_t p1){
2305 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2306 val_t REGB0;
2307 val_t REGB1;
2308 val_t REGB2;
2309 val_t REGB3;
2310 val_t REGB4;
2311 val_t REGB5;
2312 val_t REGB6;
2313 val_t tmp;
2314 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2315 fra.me.file = LOCATE_standard___string;
2316 fra.me.line = 428;
2317 fra.me.meth = LOCATE_standard___string___String_____eqeq;
2318 fra.me.has_broke = 0;
2319 fra.me.REG_size = 2;
2320 fra.me.nitni_local_ref_head = NULL;
2321 fra.me.REG[0] = NIT_NULL;
2322 fra.me.REG[1] = NIT_NULL;
2323 fra.me.REG[0] = p0;
2324 fra.me.REG[1] = p1;
2325 /* ../lib/standard/string.nit:430 */
2326 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*/;
2327 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
2328 if (UNTAG_Bool(REGB0)) {
2329 REGB0 = TAG_Bool(1);
2330 } else {
2331 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
2332 REGB0 = REGB1;
2333 }
2334 if (UNTAG_Bool(REGB0)) {
2335 REGB0 = TAG_Bool(0);
2336 goto label1;
2337 }
2338 /* ../lib/standard/string.nit:432 */
2339 REGB1 = CALL_standard___kernel___Object___object_id(fra.me.REG[0])(fra.me.REG[0]);
2340 REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
2341 if (UNTAG_Bool(REGB2)) {
2342 nit_abort("Reciever is null", NULL, LOCATE_standard___string, 432);
2343 }
2344 REGB2 = CALL_standard___kernel___Object___object_id(fra.me.REG[1])(fra.me.REG[1]);
2345 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB2));
2346 if (UNTAG_Bool(REGB3)) {
2347 } else {
2348 /* ../lib/standard/kernel.nit:237 */
2349 REGB2 = TAG_Bool((REGB1)==(REGB2));
2350 /* ../lib/standard/string.nit:432 */
2351 REGB3 = REGB2;
2352 }
2353 if (UNTAG_Bool(REGB3)) {
2354 REGB3 = TAG_Bool(1);
2355 REGB0 = REGB3;
2356 goto label1;
2357 }
2358 /* ../lib/standard/string.nit:434 */
2359 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2360 if (UNTAG_Bool(REGB3)) {
2361 } else {
2362 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 434);
2363 }
2364 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2365 /* ../lib/standard/string.nit:436 */
2366 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
2367 if (UNTAG_Bool(REGB2)) {
2368 } else {
2369 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 436);
2370 }
2371 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
2372 REGB1 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB3));
2373 if (UNTAG_Bool(REGB1)) {
2374 } else {
2375 /* ../lib/standard/kernel.nit:237 */
2376 REGB2 = TAG_Bool((REGB2)==(REGB3));
2377 /* ../lib/standard/string.nit:436 */
2378 REGB1 = REGB2;
2379 }
2380 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
2381 if (UNTAG_Bool(REGB1)) {
2382 REGB1 = TAG_Bool(0);
2383 REGB0 = REGB1;
2384 goto label1;
2385 }
2386 /* ../lib/standard/string.nit:438 */
2387 REGB1 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2388 if (UNTAG_Bool(REGB1)) {
2389 } else {
2390 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 438);
2391 }
2392 REGB1 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2393 /* ../lib/standard/string.nit:439 */
2394 REGB2 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[1])!=NIT_NULL);
2395 if (UNTAG_Bool(REGB2)) {
2396 } else {
2397 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 439);
2398 }
2399 REGB2 = ATTR_standard___string___String____index_from(fra.me.REG[1]);
2400 /* ../lib/standard/kernel.nit:245 */
2401 REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
2402 /* ../lib/standard/string.nit:443 */
2403 REGB4 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
2404 if (UNTAG_Bool(REGB4)) {
2405 } else {
2406 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 443);
2407 }
2408 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[1]);
2409 /* ../lib/standard/string.nit:444 */
2410 REGB4 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2411 if (UNTAG_Bool(REGB4)) {
2412 } else {
2413 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 444);
2414 }
2415 fra.me.REG[0] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2416 /* ../lib/standard/string.nit:446 */
2417 while(1) {
2418 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
2419 if (UNTAG_Bool(REGB4)) {
2420 } else {
2421 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2422 }
2423 /* ../lib/standard/kernel.nit:242 */
2424 REGB4 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB3));
2425 /* ../lib/standard/string.nit:446 */
2426 if (UNTAG_Bool(REGB4)) {
2427 /* ../lib/standard/string.nit:970 */
2428 REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB1)]);
2429 REGB5 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB2)]);
2430 /* ../lib/standard/string.nit:447 */
2431 REGB6 = TAG_Bool(IS_EQUAL_OO(REGB4,REGB5));
2432 if (UNTAG_Bool(REGB6)) {
2433 } else {
2434 /* ../lib/standard/kernel.nit:434 */
2435 REGB5 = TAG_Bool((REGB4)==(REGB5));
2436 /* ../lib/standard/string.nit:447 */
2437 REGB6 = REGB5;
2438 }
2439 REGB6 = TAG_Bool(!UNTAG_Bool(REGB6));
2440 if (UNTAG_Bool(REGB6)) {
2441 REGB6 = TAG_Bool(0);
2442 REGB0 = REGB6;
2443 goto label1;
2444 }
2445 /* ../lib/standard/string.nit:448 */
2446 REGB6 = TAG_Int(1);
2447 /* ../lib/standard/kernel.nit:245 */
2448 REGB6 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB6));
2449 /* ../lib/standard/string.nit:448 */
2450 REGB1 = REGB6;
2451 /* ../lib/standard/string.nit:449 */
2452 REGB6 = TAG_Int(1);
2453 /* ../lib/standard/kernel.nit:245 */
2454 REGB6 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB6));
2455 /* ../lib/standard/string.nit:449 */
2456 REGB2 = REGB6;
2457 } else {
2458 /* ../lib/standard/string.nit:446 */
2459 goto label2;
2460 }
2461 }
2462 label2: while(0);
2463 /* ../lib/standard/string.nit:452 */
2464 REGB2 = TAG_Bool(1);
2465 REGB0 = REGB2;
2466 goto label1;
2467 label1: while(0);
2468 stack_frame_head = fra.me.prev;
2469 return REGB0;
2470 }
2471 static const char LOCATE_standard___string___String_____l[] = "string::String::(kernel::Comparable::<)";
2472 val_t standard___string___String_____l(val_t p0, val_t p1){
2473 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2474 val_t REGB0;
2475 val_t REGB1;
2476 val_t REGB2;
2477 val_t REGB3;
2478 val_t REGB4;
2479 val_t REGB5;
2480 val_t REGB6;
2481 val_t REGB7;
2482 val_t REGB8;
2483 val_t REGB9;
2484 val_t tmp;
2485 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2486 fra.me.file = LOCATE_standard___string;
2487 fra.me.line = 455;
2488 fra.me.meth = LOCATE_standard___string___String_____l;
2489 fra.me.has_broke = 0;
2490 fra.me.REG_size = 4;
2491 fra.me.nitni_local_ref_head = NULL;
2492 fra.me.REG[0] = NIT_NULL;
2493 fra.me.REG[1] = NIT_NULL;
2494 fra.me.REG[2] = NIT_NULL;
2495 fra.me.REG[3] = NIT_NULL;
2496 fra.me.REG[0] = p0;
2497 fra.me.REG[1] = p1;
2498 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*/;
2499 if (UNTAG_Bool(REGB0)) {
2500 } else {
2501 nit_abort("Cast failed", NULL, LOCATE_standard___string, 0);
2502 }
2503 /* ../lib/standard/string.nit:460 */
2504 REGB0 = CALL_standard___kernel___Object___object_id(fra.me.REG[0])(fra.me.REG[0]);
2505 REGB1 = CALL_standard___kernel___Object___object_id(fra.me.REG[1])(fra.me.REG[1]);
2506 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
2507 if (UNTAG_Bool(REGB2)) {
2508 } else {
2509 /* ../lib/standard/kernel.nit:237 */
2510 REGB1 = TAG_Bool((REGB0)==(REGB1));
2511 /* ../lib/standard/string.nit:460 */
2512 REGB2 = REGB1;
2513 }
2514 if (UNTAG_Bool(REGB2)) {
2515 REGB2 = TAG_Bool(0);
2516 goto label1;
2517 }
2518 /* ../lib/standard/string.nit:465 */
2519 REGB1 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2520 if (UNTAG_Bool(REGB1)) {
2521 } else {
2522 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 465);
2523 }
2524 REGB1 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2525 /* ../lib/standard/string.nit:466 */
2526 REGB0 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[1])!=NIT_NULL);
2527 if (UNTAG_Bool(REGB0)) {
2528 } else {
2529 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 466);
2530 }
2531 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[1]);
2532 /* ../lib/standard/string.nit:468 */
2533 REGB3 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2534 if (UNTAG_Bool(REGB3)) {
2535 } else {
2536 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 468);
2537 }
2538 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2539 /* ../lib/standard/string.nit:469 */
2540 REGB3 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
2541 if (UNTAG_Bool(REGB3)) {
2542 } else {
2543 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 469);
2544 }
2545 fra.me.REG[3] = ATTR_standard___string___AbstractString____items(fra.me.REG[1]);
2546 /* ../lib/standard/string.nit:471 */
2547 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2548 if (UNTAG_Bool(REGB3)) {
2549 } else {
2550 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 471);
2551 }
2552 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2553 /* ../lib/standard/string.nit:472 */
2554 REGB4 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
2555 if (UNTAG_Bool(REGB4)) {
2556 } else {
2557 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 472);
2558 }
2559 REGB4 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
2560 /* ../lib/standard/kernel.nit:245 */
2561 REGB5 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
2562 /* ../lib/standard/string.nit:476 */
2563 while(1) {
2564 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
2565 if (UNTAG_Bool(REGB6)) {
2566 } else {
2567 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2568 }
2569 /* ../lib/standard/kernel.nit:242 */
2570 REGB6 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB5));
2571 /* ../lib/standard/string.nit:476 */
2572 if (UNTAG_Bool(REGB6)) {
2573 /* ../lib/standard/string.nit:970 */
2574 REGB6 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB1)]);
2575 REGB7 = TAG_Char(UNBOX_NativeString(fra.me.REG[3])[UNTAG_Int(REGB0)]);
2576 /* ../lib/standard/string.nit:480 */
2577 REGB8 = TAG_Bool(IS_EQUAL_OO(REGB6,REGB7));
2578 if (UNTAG_Bool(REGB8)) {
2579 } else {
2580 /* ../lib/standard/kernel.nit:434 */
2581 REGB9 = TAG_Bool((REGB6)==(REGB7));
2582 /* ../lib/standard/string.nit:480 */
2583 REGB8 = REGB9;
2584 }
2585 REGB8 = TAG_Bool(!UNTAG_Bool(REGB8));
2586 if (UNTAG_Bool(REGB8)) {
2587 REGB8 = TAG_Bool(VAL_ISA(REGB7, VTCOLOR_standard___kernel___Comparable___OTHER(REGB6), VTID_standard___kernel___Comparable___OTHER(REGB6))) /*cast OTHER*/;
2588 if (UNTAG_Bool(REGB8)) {
2589 } else {
2590 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2591 }
2592 /* ../lib/standard/kernel.nit:439 */
2593 REGB7 = TAG_Bool(UNTAG_Char(REGB6)<UNTAG_Char(REGB7));
2594 /* ../lib/standard/string.nit:481 */
2595 if (UNTAG_Bool(REGB7)) {
2596 REGB7 = TAG_Bool(1);
2597 REGB2 = REGB7;
2598 goto label1;
2599 }
2600 /* ../lib/standard/string.nit:482 */
2601 REGB7 = TAG_Bool(0);
2602 REGB2 = REGB7;
2603 goto label1;
2604 }
2605 /* ../lib/standard/string.nit:485 */
2606 REGB7 = TAG_Int(1);
2607 /* ../lib/standard/kernel.nit:245 */
2608 REGB7 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB7));
2609 /* ../lib/standard/string.nit:485 */
2610 REGB1 = REGB7;
2611 /* ../lib/standard/string.nit:486 */
2612 REGB7 = TAG_Int(1);
2613 /* ../lib/standard/kernel.nit:245 */
2614 REGB7 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB7));
2615 /* ../lib/standard/string.nit:486 */
2616 REGB0 = REGB7;
2617 } else {
2618 /* ../lib/standard/string.nit:476 */
2619 goto label2;
2620 }
2621 }
2622 label2: while(0);
2623 REGB0 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
2624 if (UNTAG_Bool(REGB0)) {
2625 } else {
2626 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2627 }
2628 /* ../lib/standard/kernel.nit:242 */
2629 REGB4 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
2630 /* ../lib/standard/string.nit:489 */
2631 REGB2 = REGB4;
2632 goto label1;
2633 label1: while(0);
2634 stack_frame_head = fra.me.prev;
2635 return REGB2;
2636 }
2637 static const char LOCATE_standard___string___String_____plus[] = "string::String::+";
2638 val_t standard___string___String_____plus(val_t p0, val_t p1){
2639 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2640 val_t REGB0;
2641 val_t REGB1;
2642 val_t REGB2;
2643 val_t REGB3;
2644 val_t REGB4;
2645 val_t tmp;
2646 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2647 fra.me.file = LOCATE_standard___string;
2648 fra.me.line = 492;
2649 fra.me.meth = LOCATE_standard___string___String_____plus;
2650 fra.me.has_broke = 0;
2651 fra.me.REG_size = 4;
2652 fra.me.nitni_local_ref_head = NULL;
2653 fra.me.REG[0] = NIT_NULL;
2654 fra.me.REG[1] = NIT_NULL;
2655 fra.me.REG[2] = NIT_NULL;
2656 fra.me.REG[3] = NIT_NULL;
2657 fra.me.REG[0] = p0;
2658 fra.me.REG[1] = p1;
2659 /* ../lib/standard/string.nit:497 */
2660 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2661 if (UNTAG_Bool(REGB0)) {
2662 } else {
2663 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 497);
2664 }
2665 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2666 /* ../lib/standard/string.nit:498 */
2667 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
2668 if (UNTAG_Bool(REGB1)) {
2669 } else {
2670 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 498);
2671 }
2672 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
2673 /* ../lib/standard/kernel.nit:245 */
2674 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2675 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2676 /* ../lib/standard/string.nit:502 */
2677 REGB4 = TAG_Int(1);
2678 /* ../lib/standard/kernel.nit:245 */
2679 REGB4 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB4));
2680 /* ../lib/standard/string.nit:1007 */
2681 fra.me.REG[2] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB4) * sizeof(char))));
2682 /* ../lib/standard/string.nit:504 */
2683 REGB4 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2684 if (UNTAG_Bool(REGB4)) {
2685 } else {
2686 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 504);
2687 }
2688 fra.me.REG[3] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2689 REGB4 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2690 if (UNTAG_Bool(REGB4)) {
2691 } else {
2692 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 504);
2693 }
2694 REGB4 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2695 REGB3 = TAG_Int(0);
2696 /* ../lib/standard/string.nit:972 */
2697 (void)memcpy(UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB3), UNBOX_NativeString(fra.me.REG[3])+UNTAG_Int(REGB4), UNTAG_Int(REGB0));;
2698 /* ../lib/standard/string.nit:505 */
2699 REGB3 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
2700 if (UNTAG_Bool(REGB3)) {
2701 } else {
2702 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 505);
2703 }
2704 fra.me.REG[3] = ATTR_standard___string___AbstractString____items(fra.me.REG[1]);
2705 REGB3 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[1])!=NIT_NULL);
2706 if (UNTAG_Bool(REGB3)) {
2707 } else {
2708 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 505);
2709 }
2710 REGB3 = ATTR_standard___string___String____index_from(fra.me.REG[1]);
2711 /* ../lib/standard/string.nit:972 */
2712 (void)memcpy(UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB0), UNBOX_NativeString(fra.me.REG[3])+UNTAG_Int(REGB3), UNTAG_Int(REGB1));;
2713 /* ../lib/standard/string.nit:507 */
2714 REGB0 = TAG_Char('\0');
2715 /* ../lib/standard/string.nit:971 */
2716 UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB2)]=UNTAG_Char(REGB0);;
2717 /* ../lib/standard/string.nit:509 */
2718 fra.me.REG[2] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[2])(fra.me.REG[2], REGB2);
2719 goto label1;
2720 label1: while(0);
2721 stack_frame_head = fra.me.prev;
2722 return fra.me.REG[2];
2723 }
2724 static const char LOCATE_standard___string___String_____star[] = "string::String::*";
2725 val_t standard___string___String_____star(val_t p0, val_t p1){
2726 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2727 val_t REGB0;
2728 val_t REGB1;
2729 val_t REGB2;
2730 val_t REGB3;
2731 val_t REGB4;
2732 val_t REGB5;
2733 val_t tmp;
2734 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2735 fra.me.file = LOCATE_standard___string;
2736 fra.me.line = 512;
2737 fra.me.meth = LOCATE_standard___string___String_____star;
2738 fra.me.has_broke = 0;
2739 fra.me.REG_size = 2;
2740 fra.me.nitni_local_ref_head = NULL;
2741 fra.me.REG[0] = NIT_NULL;
2742 fra.me.REG[1] = NIT_NULL;
2743 fra.me.REG[0] = p0;
2744 REGB0 = p1;
2745 /* ../lib/standard/string.nit:519 */
2746 REGB1 = TAG_Int(0);
2747 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2748 if (UNTAG_Bool(REGB2)) {
2749 } else {
2750 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2751 }
2752 /* ../lib/standard/kernel.nit:243 */
2753 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
2754 /* ../lib/standard/string.nit:519 */
2755 if (UNTAG_Bool(REGB1)) {
2756 } else {
2757 nit_abort("Assert failed", NULL, LOCATE_standard___string, 519);
2758 }
2759 /* ../lib/standard/string.nit:521 */
2760 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2761 if (UNTAG_Bool(REGB1)) {
2762 } else {
2763 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 521);
2764 }
2765 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2766 /* ../lib/standard/kernel.nit:248 */
2767 REGB2 = TAG_Int(UNTAG_Int(REGB1)*UNTAG_Int(REGB0));
2768 /* ../lib/standard/string.nit:525 */
2769 REGB3 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2770 if (UNTAG_Bool(REGB3)) {
2771 } else {
2772 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 525);
2773 }
2774 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2775 /* ../lib/standard/string.nit:527 */
2776 REGB3 = TAG_Int(1);
2777 /* ../lib/standard/kernel.nit:245 */
2778 REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
2779 /* ../lib/standard/string.nit:1007 */
2780 fra.me.REG[0] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB3) * sizeof(char))));
2781 /* ../lib/standard/string.nit:529 */
2782 REGB3 = TAG_Char('\0');
2783 /* ../lib/standard/string.nit:971 */
2784 UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB2)]=UNTAG_Char(REGB3);;
2785 /* ../lib/standard/string.nit:531 */
2786 REGB3 = TAG_Int(0);
2787 /* ../lib/standard/string.nit:533 */
2788 REGB4 = TAG_Int(1);
2789 /* ../lib/standard/kernel.nit:393 */
2790 while(1) {
2791 REGB5 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
2792 if (UNTAG_Bool(REGB5)) {
2793 } else {
2794 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2795 }
2796 /* ../lib/standard/kernel.nit:241 */
2797 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<=UNTAG_Int(REGB0));
2798 /* ../lib/standard/kernel.nit:393 */
2799 if (UNTAG_Bool(REGB5)) {
2800 /* ../lib/standard/string.nit:534 */
2801 REGB5 = TAG_Int(0);
2802 /* ../lib/standard/string.nit:972 */
2803 (void)memcpy(UNBOX_NativeString(fra.me.REG[0])+UNTAG_Int(REGB3), UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB5), UNTAG_Int(REGB1));;
2804 /* ../lib/standard/kernel.nit:245 */
2805 REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB1));
2806 /* ../lib/standard/string.nit:535 */
2807 REGB3 = REGB5;
2808 /* ../lib/standard/kernel.nit:395 */
2809 REGB5 = TAG_Int(1);
2810 /* ../lib/standard/kernel.nit:245 */
2811 REGB5 = TAG_Int(UNTAG_Int(REGB4)+UNTAG_Int(REGB5));
2812 /* ../lib/standard/kernel.nit:395 */
2813 REGB4 = REGB5;
2814 } else {
2815 /* ../lib/standard/kernel.nit:393 */
2816 goto label1;
2817 }
2818 }
2819 label1: while(0);
2820 /* ../lib/standard/string.nit:538 */
2821 fra.me.REG[0] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[0])(fra.me.REG[0], REGB2);
2822 goto label2;
2823 label2: while(0);
2824 stack_frame_head = fra.me.prev;
2825 return fra.me.REG[0];
2826 }
2827 static const char LOCATE_standard___string___String___to_s[] = "string::String::(string::Object::to_s)";
2828 val_t standard___string___String___to_s(val_t p0){
2829 struct {struct stack_frame_t me;} fra;
2830 val_t tmp;
2831 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2832 fra.me.file = LOCATE_standard___string;
2833 fra.me.line = 541;
2834 fra.me.meth = LOCATE_standard___string___String___to_s;
2835 fra.me.has_broke = 0;
2836 fra.me.REG_size = 1;
2837 fra.me.nitni_local_ref_head = NULL;
2838 fra.me.REG[0] = NIT_NULL;
2839 fra.me.REG[0] = p0;
2840 /* ../lib/standard/string.nit:541 */
2841 goto label1;
2842 label1: while(0);
2843 stack_frame_head = fra.me.prev;
2844 return fra.me.REG[0];
2845 }
2846 static const char LOCATE_standard___string___String___hash[] = "string::String::(hash::Object::hash)";
2847 val_t standard___string___String___hash(val_t p0){
2848 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2849 val_t REGB0;
2850 val_t REGB1;
2851 val_t REGB2;
2852 val_t REGB3;
2853 val_t REGB4;
2854 val_t tmp;
2855 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2856 fra.me.file = LOCATE_standard___string;
2857 fra.me.line = 543;
2858 fra.me.meth = LOCATE_standard___string___String___hash;
2859 fra.me.has_broke = 0;
2860 fra.me.REG_size = 2;
2861 fra.me.nitni_local_ref_head = NULL;
2862 fra.me.REG[0] = NIT_NULL;
2863 fra.me.REG[1] = NIT_NULL;
2864 fra.me.REG[0] = p0;
2865 /* ../lib/standard/string.nit:546 */
2866 REGB0 = TAG_Int(5381);
2867 /* ../lib/standard/string.nit:547 */
2868 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2869 if (UNTAG_Bool(REGB1)) {
2870 } else {
2871 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 547);
2872 }
2873 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2874 REGB2 = TAG_Int(1);
2875 /* ../lib/standard/kernel.nit:247 */
2876 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
2877 /* ../lib/standard/string.nit:549 */
2878 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2879 if (UNTAG_Bool(REGB1)) {
2880 } else {
2881 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 549);
2882 }
2883 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2884 /* ../lib/standard/string.nit:550 */
2885 REGB1 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[0])!=NIT_NULL);
2886 if (UNTAG_Bool(REGB1)) {
2887 } else {
2888 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 550);
2889 }
2890 REGB1 = ATTR_standard___string___String____index_from(fra.me.REG[0]);
2891 /* ../lib/standard/kernel.nit:245 */
2892 REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1));
2893 /* ../lib/standard/string.nit:552 */
2894 REGB2 = REGB3;
2895 /* ../lib/standard/string.nit:554 */
2896 while(1) {
2897 REGB3 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
2898 if (UNTAG_Bool(REGB3)) {
2899 } else {
2900 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2901 }
2902 /* ../lib/standard/kernel.nit:243 */
2903 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB1));
2904 /* ../lib/standard/string.nit:554 */
2905 if (UNTAG_Bool(REGB3)) {
2906 /* ../lib/standard/string.nit:555 */
2907 REGB3 = TAG_Int(32);
2908 /* ../lib/standard/kernel.nit:248 */
2909 REGB3 = TAG_Int(UNTAG_Int(REGB0)*UNTAG_Int(REGB3));
2910 /* ../lib/standard/kernel.nit:245 */
2911 REGB3 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB0));
2912 /* ../lib/standard/string.nit:555 */
2913 REGB4 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
2914 if (UNTAG_Bool(REGB4)) {
2915 } else {
2916 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 555);
2917 }
2918 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
2919 /* ../lib/standard/string.nit:970 */
2920 REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB2)]);
2921 /* ../lib/standard/kernel.nit:471 */
2922 REGB4 = TAG_Int((unsigned char)UNTAG_Char(REGB4));
2923 /* ../lib/standard/kernel.nit:245 */
2924 REGB4 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB4));
2925 /* ../lib/standard/string.nit:555 */
2926 REGB0 = REGB4;
2927 /* ../lib/standard/string.nit:556 */
2928 REGB4 = TAG_Int(1);
2929 /* ../lib/standard/kernel.nit:247 */
2930 REGB4 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB4));
2931 /* ../lib/standard/string.nit:556 */
2932 REGB2 = REGB4;
2933 } else {
2934 /* ../lib/standard/string.nit:554 */
2935 goto label1;
2936 }
2937 }
2938 label1: while(0);
2939 /* ../lib/standard/string.nit:559 */
2940 goto label2;
2941 label2: while(0);
2942 stack_frame_head = fra.me.prev;
2943 return REGB0;
2944 }
2945 static const char LOCATE_standard___string___Buffer_____braeq[] = "string::Buffer::(abstract_collection::Sequence::[]=)";
2946 void standard___string___Buffer_____braeq(val_t p0, val_t p1, val_t p2){
2947 struct {struct stack_frame_t me;} fra;
2948 val_t REGB0;
2949 val_t REGB1;
2950 val_t REGB2;
2951 val_t REGB3;
2952 val_t tmp;
2953 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2954 fra.me.file = LOCATE_standard___string;
2955 fra.me.line = 572;
2956 fra.me.meth = LOCATE_standard___string___Buffer_____braeq;
2957 fra.me.has_broke = 0;
2958 fra.me.REG_size = 1;
2959 fra.me.nitni_local_ref_head = NULL;
2960 fra.me.REG[0] = NIT_NULL;
2961 fra.me.REG[0] = p0;
2962 REGB0 = p1;
2963 REGB1 = p2;
2964 /* ../lib/standard/collection/array.nit:24 */
2965 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2966 if (UNTAG_Bool(REGB2)) {
2967 } else {
2968 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2969 }
2970 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2971 /* ../lib/standard/string.nit:574 */
2972 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB2));
2973 if (UNTAG_Bool(REGB3)) {
2974 } else {
2975 /* ../lib/standard/kernel.nit:237 */
2976 REGB2 = TAG_Bool((REGB0)==(REGB2));
2977 /* ../lib/standard/string.nit:574 */
2978 REGB3 = REGB2;
2979 }
2980 if (UNTAG_Bool(REGB3)) {
2981 /* ../lib/standard/string.nit:575 */
2982 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB1);
2983 /* ../lib/standard/string.nit:576 */
2984 goto label1;
2985 }
2986 /* ../lib/standard/string.nit:578 */
2987 REGB3 = TAG_Int(0);
2988 REGB2 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2989 if (UNTAG_Bool(REGB2)) {
2990 } else {
2991 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2992 }
2993 /* ../lib/standard/kernel.nit:243 */
2994 REGB3 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB3));
2995 /* ../lib/standard/string.nit:578 */
2996 if (UNTAG_Bool(REGB3)) {
2997 /* ../lib/standard/collection/array.nit:24 */
2998 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2999 if (UNTAG_Bool(REGB3)) {
3000 } else {
3001 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3002 }
3003 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3004 REGB2 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
3005 if (UNTAG_Bool(REGB2)) {
3006 } else {
3007 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3008 }
3009 /* ../lib/standard/kernel.nit:242 */
3010 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB3));
3011 } else {
3012 /* ../lib/standard/string.nit:578 */
3013 REGB2 = TAG_Bool(0);
3014 REGB3 = REGB2;
3015 }
3016 if (UNTAG_Bool(REGB3)) {
3017 } else {
3018 nit_abort("Assert failed", NULL, LOCATE_standard___string, 578);
3019 }
3020 /* ../lib/standard/string.nit:579 */
3021 REGB3 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3022 if (UNTAG_Bool(REGB3)) {
3023 } else {
3024 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 579);
3025 }
3026 fra.me.REG[0] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3027 /* ../lib/standard/string.nit:971 */
3028 UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB1);;
3029 label1: while(0);
3030 stack_frame_head = fra.me.prev;
3031 return;
3032 }
3033 static const char LOCATE_standard___string___Buffer___add[] = "string::Buffer::(abstract_collection::SimpleCollection::add)";
3034 void standard___string___Buffer___add(val_t p0, val_t p1){
3035 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
3036 val_t REGB0;
3037 val_t REGB1;
3038 val_t REGB2;
3039 val_t REGB3;
3040 val_t tmp;
3041 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3042 fra.me.file = LOCATE_standard___string;
3043 fra.me.line = 582;
3044 fra.me.meth = LOCATE_standard___string___Buffer___add;
3045 fra.me.has_broke = 0;
3046 fra.me.REG_size = 2;
3047 fra.me.nitni_local_ref_head = NULL;
3048 fra.me.REG[0] = NIT_NULL;
3049 fra.me.REG[1] = NIT_NULL;
3050 fra.me.REG[0] = p0;
3051 REGB0 = p1;
3052 /* ../lib/standard/string.nit:584 */
3053 REGB1 = TAG_Bool(ATTR_standard___string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
3054 if (UNTAG_Bool(REGB1)) {
3055 } else {
3056 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___string, 584);
3057 }
3058 REGB1 = ATTR_standard___string___Buffer____capacity(fra.me.REG[0]);
3059 /* ../lib/standard/collection/array.nit:24 */
3060 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3061 if (UNTAG_Bool(REGB2)) {
3062 } else {
3063 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3064 }
3065 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3066 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
3067 if (UNTAG_Bool(REGB3)) {
3068 } else {
3069 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3070 }
3071 /* ../lib/standard/kernel.nit:241 */
3072 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB2));
3073 /* ../lib/standard/string.nit:584 */
3074 if (UNTAG_Bool(REGB2)) {
3075 /* ../lib/standard/collection/array.nit:24 */
3076 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3077 if (UNTAG_Bool(REGB2)) {
3078 } else {
3079 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3080 }
3081 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3082 /* ../lib/standard/string.nit:584 */
3083 REGB1 = TAG_Int(5);
3084 /* ../lib/standard/kernel.nit:245 */
3085 REGB1 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1));
3086 /* ../lib/standard/string.nit:584 */
3087 CALL_standard___collection___array___AbstractArray___enlarge(fra.me.REG[0])(fra.me.REG[0], REGB1);
3088 }
3089 /* ../lib/standard/string.nit:585 */
3090 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3091 if (UNTAG_Bool(REGB1)) {
3092 } else {
3093 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 585);
3094 }
3095 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3096 /* ../lib/standard/collection/array.nit:24 */
3097 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3098 if (UNTAG_Bool(REGB1)) {
3099 } else {
3100 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3101 }
3102 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3103 /* ../lib/standard/string.nit:971 */
3104 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB1)]=UNTAG_Char(REGB0);;
3105 /* ../lib/standard/string.nit:586 */
3106 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3107 REGB1 = TAG_Int(1);
3108 /* ../lib/standard/kernel.nit:245 */
3109 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
3110 /* ../lib/standard/string.nit:586 */
3111 ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]) = REGB1;
3112 stack_frame_head = fra.me.prev;
3113 return;
3114 }
3115 static const char LOCATE_standard___string___Buffer___enlarge[] = "string::Buffer::(array::AbstractArray::enlarge)";
3116 void standard___string___Buffer___enlarge(val_t p0, val_t p1){
3117 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
3118 val_t REGB0;
3119 val_t REGB1;
3120 val_t REGB2;
3121 val_t REGB3;
3122 val_t tmp;
3123 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3124 fra.me.file = LOCATE_standard___string;
3125 fra.me.line = 589;
3126 fra.me.meth = LOCATE_standard___string___Buffer___enlarge;
3127 fra.me.has_broke = 0;
3128 fra.me.REG_size = 3;
3129 fra.me.nitni_local_ref_head = NULL;
3130 fra.me.REG[0] = NIT_NULL;
3131 fra.me.REG[1] = NIT_NULL;
3132 fra.me.REG[2] = NIT_NULL;
3133 fra.me.REG[0] = p0;
3134 REGB0 = p1;
3135 /* ../lib/standard/string.nit:591 */
3136 REGB1 = TAG_Bool(ATTR_standard___string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
3137 if (UNTAG_Bool(REGB1)) {
3138 } else {
3139 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___string, 591);
3140 }
3141 REGB1 = ATTR_standard___string___Buffer____capacity(fra.me.REG[0]);
3142 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
3143 if (UNTAG_Bool(REGB2)) {
3144 } else {
3145 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3146 }
3147 /* ../lib/standard/kernel.nit:241 */
3148 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB1));
3149 /* ../lib/standard/string.nit:592 */
3150 if (UNTAG_Bool(REGB2)) {
3151 goto label1;
3152 }
3153 /* ../lib/standard/string.nit:593 */
3154 while(1) {
3155 REGB2 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
3156 if (UNTAG_Bool(REGB2)) {
3157 } else {
3158 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3159 }
3160 /* ../lib/standard/kernel.nit:241 */
3161 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB0));
3162 /* ../lib/standard/string.nit:593 */
3163 if (UNTAG_Bool(REGB2)) {
3164 REGB2 = TAG_Int(2);
3165 /* ../lib/standard/kernel.nit:248 */
3166 REGB2 = TAG_Int(UNTAG_Int(REGB1)*UNTAG_Int(REGB2));
3167 /* ../lib/standard/string.nit:593 */
3168 REGB3 = TAG_Int(2);
3169 /* ../lib/standard/kernel.nit:245 */
3170 REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
3171 /* ../lib/standard/string.nit:593 */
3172 REGB1 = REGB3;
3173 } else {
3174 goto label2;
3175 }
3176 }
3177 label2: while(0);
3178 /* ../lib/standard/string.nit:594 */
3179 REGB0 = TAG_Int(1);
3180 /* ../lib/standard/kernel.nit:245 */
3181 REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
3182 /* ../lib/standard/string.nit:1007 */
3183 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB0) * sizeof(char))));
3184 /* ../lib/standard/string.nit:595 */
3185 REGB0 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3186 if (UNTAG_Bool(REGB0)) {
3187 } else {
3188 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 595);
3189 }
3190 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3191 /* ../lib/standard/collection/array.nit:24 */
3192 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3193 if (UNTAG_Bool(REGB0)) {
3194 } else {
3195 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3196 }
3197 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3198 /* ../lib/standard/string.nit:595 */
3199 REGB3 = TAG_Int(0);
3200 REGB2 = TAG_Int(0);
3201 /* ../lib/standard/string.nit:972 */
3202 (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB3), UNTAG_Int(REGB0));;
3203 /* ../lib/standard/string.nit:596 */
3204 ATTR_standard___string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1];
3205 /* ../lib/standard/string.nit:597 */
3206 ATTR_standard___string___Buffer____capacity(fra.me.REG[0]) = REGB1;
3207 label1: while(0);
3208 stack_frame_head = fra.me.prev;
3209 return;
3210 }
3211 static const char LOCATE_standard___string___Buffer___append[] = "string::Buffer::(abstract_collection::Sequence::append)";
3212 void standard___string___Buffer___append(val_t p0, val_t p1){
3213 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
3214 val_t REGB0;
3215 val_t REGB1;
3216 val_t REGB2;
3217 val_t REGB3;
3218 val_t tmp;
3219 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3220 fra.me.file = LOCATE_standard___string;
3221 fra.me.line = 600;
3222 fra.me.meth = LOCATE_standard___string___Buffer___append;
3223 fra.me.has_broke = 0;
3224 fra.me.REG_size = 6;
3225 fra.me.nitni_local_ref_head = NULL;
3226 fra.me.REG[0] = NIT_NULL;
3227 fra.me.REG[1] = NIT_NULL;
3228 fra.me.REG[2] = NIT_NULL;
3229 fra.me.REG[3] = NIT_NULL;
3230 fra.me.REG[4] = NIT_NULL;
3231 fra.me.REG[5] = NIT_NULL;
3232 fra.me.REG[0] = p0;
3233 fra.me.REG[1] = p1;
3234 /* ../lib/standard/string.nit:600 */
3235 fra.me.REG[2] = fra.me.REG[0];
3236 fra.me.REG[3] = fra.me.REG[1];
3237 /* ../lib/standard/string.nit:602 */
3238 REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[3], COLOR_standard___string___String, ID_standard___string___String)) /*cast String*/;
3239 if (UNTAG_Bool(REGB0)) {
3240 /* ../lib/standard/collection/array.nit:24 */
3241 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
3242 if (UNTAG_Bool(REGB0)) {
3243 } else {
3244 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3245 }
3246 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
3247 /* ../lib/standard/string.nit:604 */
3248 REGB1 = TAG_Bool(ATTR_standard___string___Buffer____capacity(fra.me.REG[2])!=NIT_NULL);
3249 if (UNTAG_Bool(REGB1)) {
3250 } else {
3251 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___string, 604);
3252 }
3253 REGB1 = ATTR_standard___string___Buffer____capacity(fra.me.REG[2]);
3254 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
3255 if (UNTAG_Bool(REGB2)) {
3256 } else {
3257 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 604);
3258 }
3259 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
3260 /* ../lib/standard/kernel.nit:245 */
3261 REGB2 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
3262 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
3263 if (UNTAG_Bool(REGB3)) {
3264 } else {
3265 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3266 }
3267 /* ../lib/standard/kernel.nit:242 */
3268 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
3269 /* ../lib/standard/string.nit:604 */
3270 if (UNTAG_Bool(REGB2)) {
3271 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
3272 if (UNTAG_Bool(REGB2)) {
3273 } else {
3274 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 604);
3275 }
3276 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
3277 /* ../lib/standard/kernel.nit:245 */
3278 REGB2 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
3279 /* ../lib/standard/string.nit:604 */
3280 CALL_standard___collection___array___AbstractArray___enlarge(fra.me.REG[2])(fra.me.REG[2], REGB2);
3281 }
3282 /* ../lib/standard/string.nit:605 */
3283 fra.me.REG[4] = CALL_standard___string___AbstractString___items(fra.me.REG[3])(fra.me.REG[3]);
3284 REGB2 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[2])!=NIT_NULL);
3285 if (UNTAG_Bool(REGB2)) {
3286 } else {
3287 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 605);
3288 }
3289 fra.me.REG[5] = ATTR_standard___string___AbstractString____items(fra.me.REG[2]);
3290 REGB2 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[3])!=NIT_NULL);
3291 if (UNTAG_Bool(REGB2)) {
3292 } else {
3293 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 605);
3294 }
3295 REGB2 = ATTR_standard___string___String____index_from(fra.me.REG[3]);
3296 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
3297 if (UNTAG_Bool(REGB1)) {
3298 } else {
3299 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 605);
3300 }
3301 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
3302 /* ../lib/standard/string.nit:972 */
3303 (void)memcpy(UNBOX_NativeString(fra.me.REG[5])+UNTAG_Int(REGB1), UNBOX_NativeString(fra.me.REG[4])+UNTAG_Int(REGB2), UNTAG_Int(REGB0));;
3304 /* ../lib/standard/string.nit:606 */
3305 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
3306 /* ../lib/standard/kernel.nit:245 */
3307 REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
3308 /* ../lib/standard/string.nit:606 */
3309 ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]) = REGB0;
3310 } else {
3311 /* ../lib/standard/string.nit:608 */
3312 CALL_SUPER_standard___string___Buffer___append(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
3313 }
3314 stack_frame_head = fra.me.prev;
3315 return;
3316 }
3317 static const char LOCATE_standard___string___Buffer___to_s[] = "string::Buffer::(string::Object::to_s)";
3318 val_t standard___string___Buffer___to_s(val_t p0){
3319 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
3320 val_t REGB0;
3321 val_t REGB1;
3322 val_t REGB2;
3323 val_t tmp;
3324 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3325 fra.me.file = LOCATE_standard___string;
3326 fra.me.line = 612;
3327 fra.me.meth = LOCATE_standard___string___Buffer___to_s;
3328 fra.me.has_broke = 0;
3329 fra.me.REG_size = 3;
3330 fra.me.nitni_local_ref_head = NULL;
3331 fra.me.REG[0] = NIT_NULL;
3332 fra.me.REG[1] = NIT_NULL;
3333 fra.me.REG[2] = NIT_NULL;
3334 fra.me.REG[0] = p0;
3335 /* ../lib/standard/collection/array.nit:24 */
3336 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3337 if (UNTAG_Bool(REGB0)) {
3338 } else {
3339 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3340 }
3341 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3342 /* ../lib/standard/string.nit:615 */
3343 REGB1 = TAG_Int(1);
3344 /* ../lib/standard/kernel.nit:245 */
3345 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
3346 /* ../lib/standard/string.nit:1007 */
3347 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
3348 /* ../lib/standard/string.nit:616 */
3349 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3350 if (UNTAG_Bool(REGB1)) {
3351 } else {
3352 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 616);
3353 }
3354 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3355 REGB1 = TAG_Int(0);
3356 REGB2 = TAG_Int(0);
3357 /* ../lib/standard/string.nit:972 */
3358 (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB1), UNTAG_Int(REGB0));;
3359 /* ../lib/standard/collection/array.nit:24 */
3360 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3361 if (UNTAG_Bool(REGB2)) {
3362 } else {
3363 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3364 }
3365 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3366 /* ../lib/standard/string.nit:619 */
3367 REGB1 = TAG_Char('\0');
3368 /* ../lib/standard/string.nit:971 */
3369 UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB2)]=UNTAG_Char(REGB1);;
3370 /* ../lib/standard/collection/array.nit:24 */
3371 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3372 if (UNTAG_Bool(REGB1)) {
3373 } else {
3374 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3375 }
3376 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3377 /* ../lib/standard/string.nit:621 */
3378 fra.me.REG[1] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[1])(fra.me.REG[1], REGB1);
3379 goto label1;
3380 label1: while(0);
3381 stack_frame_head = fra.me.prev;
3382 return fra.me.REG[1];
3383 }
3384 static const char LOCATE_standard___string___Buffer_____l[] = "string::Buffer::(kernel::Comparable::<)";
3385 val_t standard___string___Buffer_____l(val_t p0, val_t p1){
3386 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
3387 val_t REGB0;
3388 val_t REGB1;
3389 val_t REGB2;
3390 val_t REGB3;
3391 val_t REGB4;
3392 val_t REGB5;
3393 val_t REGB6;
3394 val_t tmp;
3395 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3396 fra.me.file = LOCATE_standard___string;
3397 fra.me.line = 624;
3398 fra.me.meth = LOCATE_standard___string___Buffer_____l;
3399 fra.me.has_broke = 0;
3400 fra.me.REG_size = 2;
3401 fra.me.nitni_local_ref_head = NULL;
3402 fra.me.REG[0] = NIT_NULL;
3403 fra.me.REG[1] = NIT_NULL;
3404 fra.me.REG[0] = p0;
3405 fra.me.REG[1] = p1;
3406 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*/;
3407 if (UNTAG_Bool(REGB0)) {
3408 } else {
3409 nit_abort("Cast failed", NULL, LOCATE_standard___string, 0);
3410 }
3411 /* ../lib/standard/string.nit:626 */
3412 REGB0 = TAG_Int(0);
3413 /* ../lib/standard/collection/array.nit:24 */
3414 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3415 if (UNTAG_Bool(REGB1)) {
3416 } else {
3417 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3418 }
3419 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3420 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
3421 if (UNTAG_Bool(REGB2)) {
3422 } else {
3423 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3424 }
3425 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
3426 /* ../lib/standard/string.nit:629 */
3427 while(1) {
3428 REGB3 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
3429 if (UNTAG_Bool(REGB3)) {
3430 } else {
3431 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3432 }
3433 /* ../lib/standard/kernel.nit:242 */
3434 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
3435 /* ../lib/standard/string.nit:629 */
3436 if (UNTAG_Bool(REGB3)) {
3437 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
3438 if (UNTAG_Bool(REGB3)) {
3439 } else {
3440 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3441 }
3442 /* ../lib/standard/kernel.nit:242 */
3443 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
3444 } else {
3445 /* ../lib/standard/string.nit:629 */
3446 REGB4 = TAG_Bool(0);
3447 REGB3 = REGB4;
3448 }
3449 if (UNTAG_Bool(REGB3)) {
3450 /* ../lib/standard/string.nit:630 */
3451 REGB3 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB0);
3452 /* ../lib/standard/kernel.nit:471 */
3453 REGB3 = TAG_Int((unsigned char)UNTAG_Char(REGB3));
3454 /* ../lib/standard/string.nit:631 */
3455 REGB4 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB0);
3456 /* ../lib/standard/kernel.nit:471 */
3457 REGB4 = TAG_Int((unsigned char)UNTAG_Char(REGB4));
3458 REGB5 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
3459 if (UNTAG_Bool(REGB5)) {
3460 } else {
3461 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3462 }
3463 /* ../lib/standard/kernel.nit:242 */
3464 REGB5 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
3465 /* ../lib/standard/string.nit:632 */
3466 if (UNTAG_Bool(REGB5)) {
3467 /* ../lib/standard/string.nit:633 */
3468 REGB5 = TAG_Bool(1);
3469 goto label1;
3470 } else {
3471 REGB6 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
3472 if (UNTAG_Bool(REGB6)) {
3473 } else {
3474 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3475 }
3476 /* ../lib/standard/kernel.nit:242 */
3477 REGB3 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB3));
3478 /* ../lib/standard/string.nit:634 */
3479 if (UNTAG_Bool(REGB3)) {
3480 /* ../lib/standard/string.nit:635 */
3481 REGB3 = TAG_Bool(0);
3482 REGB5 = REGB3;
3483 goto label1;
3484 }
3485 }
3486 /* ../lib/standard/string.nit:637 */
3487 REGB3 = TAG_Int(1);
3488 /* ../lib/standard/kernel.nit:245 */
3489 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
3490 /* ../lib/standard/string.nit:637 */
3491 REGB0 = REGB3;
3492 } else {
3493 /* ../lib/standard/string.nit:629 */
3494 goto label2;
3495 }
3496 }
3497 label2: while(0);
3498 REGB0 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
3499 if (UNTAG_Bool(REGB0)) {
3500 } else {
3501 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3502 }
3503 /* ../lib/standard/kernel.nit:242 */
3504 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
3505 /* ../lib/standard/string.nit:639 */
3506 if (UNTAG_Bool(REGB2)) {
3507 /* ../lib/standard/string.nit:640 */
3508 REGB2 = TAG_Bool(1);
3509 REGB5 = REGB2;
3510 goto label1;
3511 } else {
3512 /* ../lib/standard/string.nit:642 */
3513 REGB2 = TAG_Bool(0);
3514 REGB5 = REGB2;
3515 goto label1;
3516 }
3517 label1: while(0);
3518 stack_frame_head = fra.me.prev;
3519 return REGB5;
3520 }
3521 static const char LOCATE_standard___string___Buffer___init[] = "string::Buffer::init";
3522 void standard___string___Buffer___init(val_t p0, int* init_table){
3523 int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string___Buffer].i;
3524 struct {struct stack_frame_t me;} fra;
3525 val_t REGB0;
3526 val_t tmp;
3527 if (init_table[itpos2]) return;
3528 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3529 fra.me.file = LOCATE_standard___string;
3530 fra.me.line = 646;
3531 fra.me.meth = LOCATE_standard___string___Buffer___init;
3532 fra.me.has_broke = 0;
3533 fra.me.REG_size = 1;
3534 fra.me.nitni_local_ref_head = NULL;
3535 fra.me.REG[0] = NIT_NULL;
3536 fra.me.REG[0] = p0;
3537 /* ../lib/standard/string.nit:649 */
3538 REGB0 = TAG_Int(5);
3539 CALL_standard___string___Buffer___with_capacity(fra.me.REG[0])(fra.me.REG[0], REGB0, init_table);
3540 stack_frame_head = fra.me.prev;
3541 init_table[itpos2] = 1;
3542 return;
3543 }
3544 static const char LOCATE_standard___string___Buffer___from[] = "string::Buffer::from";
3545 void standard___string___Buffer___from(val_t p0, val_t p1, int* init_table){
3546 int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string___Buffer].i;
3547 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
3548 val_t REGB0;
3549 val_t REGB1;
3550 val_t REGB2;
3551 val_t tmp;
3552 if (init_table[itpos3]) return;
3553 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3554 fra.me.file = LOCATE_standard___string;
3555 fra.me.line = 652;
3556 fra.me.meth = LOCATE_standard___string___Buffer___from;
3557 fra.me.has_broke = 0;
3558 fra.me.REG_size = 4;
3559 fra.me.nitni_local_ref_head = NULL;
3560 fra.me.REG[0] = NIT_NULL;
3561 fra.me.REG[1] = NIT_NULL;
3562 fra.me.REG[2] = NIT_NULL;
3563 fra.me.REG[3] = NIT_NULL;
3564 fra.me.REG[0] = p0;
3565 fra.me.REG[1] = p1;
3566 /* ../lib/standard/collection/array.nit:24 */
3567 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
3568 if (UNTAG_Bool(REGB0)) {
3569 } else {
3570 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3571 }
3572 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
3573 /* ../lib/standard/string.nit:654 */
3574 REGB1 = TAG_Int(1);
3575 /* ../lib/standard/kernel.nit:245 */
3576 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
3577 /* ../lib/standard/string.nit:654 */
3578 ATTR_standard___string___Buffer____capacity(fra.me.REG[0]) = REGB1;
3579 /* ../lib/standard/collection/array.nit:24 */
3580 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
3581 if (UNTAG_Bool(REGB1)) {
3582 } else {
3583 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3584 }
3585 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
3586 /* ../lib/standard/string.nit:655 */
3587 ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]) = REGB1;
3588 /* ../lib/standard/string.nit:656 */
3589 REGB1 = TAG_Bool(ATTR_standard___string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
3590 if (UNTAG_Bool(REGB1)) {
3591 } else {
3592 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___string, 656);
3593 }
3594 REGB1 = ATTR_standard___string___Buffer____capacity(fra.me.REG[0]);
3595 /* ../lib/standard/string.nit:1007 */
3596 fra.me.REG[2] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
3597 /* ../lib/standard/string.nit:656 */
3598 ATTR_standard___string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[2];
3599 /* ../lib/standard/string.nit:657 */
3600 fra.me.REG[2] = CALL_standard___string___AbstractString___items(fra.me.REG[1])(fra.me.REG[1]);
3601 REGB1 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3602 if (UNTAG_Bool(REGB1)) {
3603 } else {
3604 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 657);
3605 }
3606 fra.me.REG[3] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3607 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3608 if (UNTAG_Bool(REGB1)) {
3609 } else {
3610 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string, 657);
3611 }
3612 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3613 REGB0 = TAG_Bool(ATTR_standard___string___String____index_from(fra.me.REG[1])!=NIT_NULL);
3614 if (UNTAG_Bool(REGB0)) {
3615 } else {
3616 nit_abort("Uninitialized attribute %s", "_index_from", LOCATE_standard___string, 657);
3617 }
3618 REGB0 = ATTR_standard___string___String____index_from(fra.me.REG[1]);
3619 REGB2 = TAG_Int(0);
3620 /* ../lib/standard/string.nit:972 */
3621 (void)memcpy(UNBOX_NativeString(fra.me.REG[3])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB0), UNTAG_Int(REGB1));;
3622 stack_frame_head = fra.me.prev;
3623 init_table[itpos3] = 1;
3624 return;
3625 }
3626 static const char LOCATE_standard___string___Buffer___with_capacity[] = "string::Buffer::with_capacity";
3627 void standard___string___Buffer___with_capacity(val_t p0, val_t p1, int* init_table){
3628 int itpos4 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string___Buffer].i;
3629 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
3630 val_t REGB0;
3631 val_t REGB1;
3632 val_t REGB2;
3633 val_t tmp;
3634 if (init_table[itpos4]) return;
3635 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3636 fra.me.file = LOCATE_standard___string;
3637 fra.me.line = 660;
3638 fra.me.meth = LOCATE_standard___string___Buffer___with_capacity;
3639 fra.me.has_broke = 0;
3640 fra.me.REG_size = 2;
3641 fra.me.nitni_local_ref_head = NULL;
3642 fra.me.REG[0] = NIT_NULL;
3643 fra.me.REG[1] = NIT_NULL;
3644 fra.me.REG[0] = p0;
3645 REGB0 = p1;
3646 /* ../lib/standard/string.nit:663 */
3647 REGB1 = TAG_Int(0);
3648 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
3649 if (UNTAG_Bool(REGB2)) {
3650 } else {
3651 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3652 }
3653 /* ../lib/standard/kernel.nit:243 */
3654 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
3655 /* ../lib/standard/string.nit:663 */
3656 if (UNTAG_Bool(REGB1)) {
3657 } else {
3658 nit_abort("Assert failed", NULL, LOCATE_standard___string, 663);
3659 }
3660 /* ../lib/standard/string.nit:665 */
3661 REGB1 = TAG_Int(1);
3662 /* ../lib/standard/kernel.nit:245 */
3663 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
3664 /* ../lib/standard/string.nit:1007 */
3665 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
3666 /* ../lib/standard/string.nit:665 */
3667 ATTR_standard___string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1];
3668 /* ../lib/standard/string.nit:666 */
3669 ATTR_standard___string___Buffer____capacity(fra.me.REG[0]) = REGB0;
3670 /* ../lib/standard/string.nit:667 */
3671 REGB0 = TAG_Int(0);
3672 ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0;
3673 stack_frame_head = fra.me.prev;
3674 init_table[itpos4] = 1;
3675 return;
3676 }
3677 static const char LOCATE_standard___string___Buffer_____eqeq[] = "string::Buffer::(kernel::Object::==)";
3678 val_t standard___string___Buffer_____eqeq(val_t p0, val_t p1){
3679 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
3680 val_t REGB0;
3681 val_t REGB1;
3682 val_t REGB2;
3683 val_t REGB3;
3684 val_t REGB4;
3685 val_t REGB5;
3686 val_t tmp;
3687 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3688 fra.me.file = LOCATE_standard___string;
3689 fra.me.line = 670;
3690 fra.me.meth = LOCATE_standard___string___Buffer_____eqeq;
3691 fra.me.has_broke = 0;
3692 fra.me.REG_size = 2;
3693 fra.me.nitni_local_ref_head = NULL;
3694 fra.me.REG[0] = NIT_NULL;
3695 fra.me.REG[1] = NIT_NULL;
3696 fra.me.REG[0] = p0;
3697 fra.me.REG[1] = p1;
3698 /* ../lib/standard/string.nit:672 */
3699 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*/;
3700 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
3701 if (UNTAG_Bool(REGB0)) {
3702 REGB0 = TAG_Bool(1);
3703 } else {
3704 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
3705 REGB0 = REGB1;
3706 }
3707 if (UNTAG_Bool(REGB0)) {
3708 REGB0 = TAG_Bool(0);
3709 goto label1;
3710 }
3711 /* ../lib/standard/collection/array.nit:24 */
3712 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
3713 if (UNTAG_Bool(REGB1)) {
3714 } else {
3715 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3716 }
3717 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
3718 /* ../lib/standard/string.nit:674 */
3719 REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
3720 if (UNTAG_Bool(REGB2)) {
3721 nit_abort("Reciever is null", NULL, LOCATE_standard___string, 674);
3722 }
3723 /* ../lib/standard/collection/array.nit:24 */
3724 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
3725 if (UNTAG_Bool(REGB2)) {
3726 } else {
3727 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
3728 }
3729 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
3730 /* ../lib/standard/string.nit:674 */
3731 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1));
3732 if (UNTAG_Bool(REGB3)) {
3733 } else {
3734 /* ../lib/standard/kernel.nit:237 */
3735 REGB2 = TAG_Bool((REGB2)==(REGB1));
3736 /* ../lib/standard/string.nit:674 */
3737 REGB3 = REGB2;
3738 }
3739 REGB3 = TAG_Bool(!UNTAG_Bool(REGB3));
3740 if (UNTAG_Bool(REGB3)) {
3741 REGB3 = TAG_Bool(0);
3742 REGB0 = REGB3;
3743 goto label1;
3744 }
3745 /* ../lib/standard/string.nit:675 */
3746 REGB3 = TAG_Int(0);
3747 /* ../lib/standard/string.nit:676 */
3748 REGB2 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
3749 if (UNTAG_Bool(REGB2)) {
3750 } else {
3751 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 676);
3752 }
3753 fra.me.REG[0] = ATTR_standard___string___AbstractString____items(fra.me.REG[0]);
3754 /* ../lib/standard/string.nit:677 */
3755 REGB2 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
3756 if (UNTAG_Bool(REGB2)) {
3757 } else {
3758 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___string, 677);
3759 }
3760 fra.me.REG[1] = ATTR_standard___string___AbstractString____items(fra.me.REG[1]);
3761 /* ../lib/standard/string.nit:678 */
3762 while(1) {
3763 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
3764 if (UNTAG_Bool(REGB2)) {
3765 } else {
3766 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
3767 }
3768 /* ../lib/standard/kernel.nit:242 */
3769 REGB2 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB1));
3770 /* ../lib/standard/string.nit:678 */
3771 if (UNTAG_Bool(REGB2)) {
3772 /* ../lib/standard/string.nit:970 */
3773 REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB3)]);
3774 REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB3)]);
3775 /* ../lib/standard/string.nit:679 */
3776 REGB5 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB4));
3777 if (UNTAG_Bool(REGB5)) {
3778 } else {
3779 /* ../lib/standard/kernel.nit:434 */
3780 REGB4 = TAG_Bool((REGB2)==(REGB4));
3781 /* ../lib/standard/string.nit:679 */
3782 REGB5 = REGB4;
3783 }
3784 REGB5 = TAG_Bool(!UNTAG_Bool(REGB5));
3785 if (UNTAG_Bool(REGB5)) {
3786 REGB5 = TAG_Bool(0);
3787 REGB0 = REGB5;
3788 goto label1;
3789 }
3790 /* ../lib/standard/string.nit:680 */
3791 REGB5 = TAG_Int(1);
3792 /* ../lib/standard/kernel.nit:245 */
3793 REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB5));
3794 /* ../lib/standard/string.nit:680 */
3795 REGB3 = REGB5;
3796 } else {
3797 /* ../lib/standard/string.nit:678 */
3798 goto label2;
3799 }
3800 }
3801 label2: while(0);
3802 /* ../lib/standard/string.nit:682 */
3803 REGB3 = TAG_Bool(1);
3804 REGB0 = REGB3;
3805 goto label1;
3806 label1: while(0);
3807 stack_frame_head = fra.me.prev;
3808 return REGB0;
3809 }
3810 static const char LOCATE_standard___string___Buffer___capacity[] = "string::Buffer::capacity";
3811 val_t standard___string___Buffer___capacity(val_t p0){
3812 struct {struct stack_frame_t me;} fra;
3813 val_t REGB0;
3814 val_t tmp;
3815 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3816 fra.me.file = LOCATE_standard___string;
3817 fra.me.line = 685;
3818 fra.me.meth = LOCATE_standard___string___Buffer___capacity;
3819 fra.me.has_broke = 0;
3820 fra.me.REG_size = 1;
3821 fra.me.nitni_local_ref_head = NULL;
3822 fra.me.REG[0] = NIT_NULL;
3823 fra.me.REG[0] = p0;
3824 /* ../lib/standard/string.nit:685 */
3825 REGB0 = TAG_Bool(ATTR_standard___string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
3826 if (UNTAG_Bool(REGB0)) {
3827 } else {
3828 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___string, 685);
3829 }
3830 REGB0 = ATTR_standard___string___Buffer____capacity(fra.me.REG[0]);
3831 stack_frame_head = fra.me.prev;
3832 return REGB0;
3833 }
3834 static const char LOCATE_standard___string___Object___to_s[] = "string::Object::to_s";
3835 val_t standard___string___Object___to_s(val_t p0){
3836 struct {struct stack_frame_t me;} fra;
3837 val_t tmp;
3838 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3839 fra.me.file = LOCATE_standard___string;
3840 fra.me.line = 693;
3841 fra.me.meth = LOCATE_standard___string___Object___to_s;
3842 fra.me.has_broke = 0;
3843 fra.me.REG_size = 1;
3844 fra.me.nitni_local_ref_head = NULL;
3845 fra.me.REG[0] = NIT_NULL;
3846 fra.me.REG[0] = p0;
3847 /* ../lib/standard/string.nit:694 */
3848 fra.me.REG[0] = CALL_standard___string___Object___inspect(fra.me.REG[0])(fra.me.REG[0]);
3849 goto label1;
3850 label1: while(0);
3851 stack_frame_head = fra.me.prev;
3852 return fra.me.REG[0];
3853 }
3854 static const char LOCATE_standard___string___Object___native_class_name[] = "string::Object::native_class_name";
3855 val_t standard___string___Object___native_class_name(val_t p0){
3856 struct {struct stack_frame_t me;} fra;
3857 val_t tmp;
3858 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3859 fra.me.file = LOCATE_standard___string;
3860 fra.me.line = 696;
3861 fra.me.meth = LOCATE_standard___string___Object___native_class_name;
3862 fra.me.has_broke = 0;
3863 fra.me.REG_size = 1;
3864 fra.me.nitni_local_ref_head = NULL;
3865 fra.me.REG[0] = NIT_NULL;
3866 fra.me.REG[0] = p0;
3867 /* ../lib/standard/string.nit:696 */
3868 fra.me.REG[0] = BOX_NativeString(VAL2VFT(fra.me.REG[0])[2].cname);;
3869 stack_frame_head = fra.me.prev;
3870 return fra.me.REG[0];
3871 }
3872 static const char LOCATE_standard___string___Object___class_name[] = "string::Object::class_name";
3873 val_t standard___string___Object___class_name(val_t p0){
3874 struct {struct stack_frame_t me;} fra;
3875 val_t tmp;
3876 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3877 fra.me.file = LOCATE_standard___string;
3878 fra.me.line = 699;
3879 fra.me.meth = LOCATE_standard___string___Object___class_name;
3880 fra.me.has_broke = 0;
3881 fra.me.REG_size = 1;
3882 fra.me.nitni_local_ref_head = NULL;
3883 fra.me.REG[0] = NIT_NULL;
3884 fra.me.REG[0] = p0;
3885 /* ../lib/standard/string.nit:702 */
3886 fra.me.REG[0] = CALL_standard___string___Object___native_class_name(fra.me.REG[0])(fra.me.REG[0]);
3887 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
3888 goto label1;
3889 label1: while(0);
3890 stack_frame_head = fra.me.prev;
3891 return fra.me.REG[0];
3892 }
3893 static const char LOCATE_standard___string___Object___inspect[] = "string::Object::inspect";
3894 val_t standard___string___Object___inspect(val_t p0){
3895 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
3896 val_t REGB0;
3897 val_t tmp;
3898 static val_t once_value_1; /* Once value */
3899 static val_t once_value_2; /* Once value */
3900 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3901 fra.me.file = LOCATE_standard___string;
3902 fra.me.line = 704;
3903 fra.me.meth = LOCATE_standard___string___Object___inspect;
3904 fra.me.has_broke = 0;
3905 fra.me.REG_size = 3;
3906 fra.me.nitni_local_ref_head = NULL;
3907 fra.me.REG[0] = NIT_NULL;
3908 fra.me.REG[1] = NIT_NULL;
3909 fra.me.REG[2] = NIT_NULL;
3910 fra.me.REG[0] = p0;
3911 /* ../lib/standard/string.nit:708 */
3912 REGB0 = TAG_Int(3);
3913 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
3914 if (!once_value_1) {
3915 fra.me.REG[2] = BOX_NativeString("<");
3916 REGB0 = TAG_Int(1);
3917 fra.me.REG[2] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[2])(fra.me.REG[2], REGB0);
3918 once_value_1 = fra.me.REG[2];
3919 register_static_object(&once_value_1);
3920 } else fra.me.REG[2] = once_value_1;
3921 fra.me.REG[2] = fra.me.REG[2];
3922 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
3923 fra.me.REG[0] = CALL_standard___string___Object___inspect_head(fra.me.REG[0])(fra.me.REG[0]);
3924 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
3925 if (!once_value_2) {
3926 fra.me.REG[0] = BOX_NativeString(">");
3927 REGB0 = TAG_Int(1);
3928 fra.me.REG[0] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[0])(fra.me.REG[0], REGB0);
3929 once_value_2 = fra.me.REG[0];
3930 register_static_object(&once_value_2);
3931 } else fra.me.REG[0] = once_value_2;
3932 fra.me.REG[0] = fra.me.REG[0];
3933 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
3934 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
3935 goto label3;
3936 label3: while(0);
3937 stack_frame_head = fra.me.prev;
3938 return fra.me.REG[1];
3939 }
3940 static const char LOCATE_standard___string___Object___inspect_head[] = "string::Object::inspect_head";
3941 val_t standard___string___Object___inspect_head(val_t p0){
3942 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
3943 val_t REGB0;
3944 val_t tmp;
3945 static val_t once_value_1; /* Once value */
3946 static val_t once_value_2; /* Once value */
3947 static val_t once_value_3; /* Once value */
3948 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
3949 fra.me.file = LOCATE_standard___string;
3950 fra.me.line = 711;
3951 fra.me.meth = LOCATE_standard___string___Object___inspect_head;
3952 fra.me.has_broke = 0;
3953 fra.me.REG_size = 3;
3954 fra.me.nitni_local_ref_head = NULL;
3955 fra.me.REG[0] = NIT_NULL;
3956 fra.me.REG[1] = NIT_NULL;
3957 fra.me.REG[2] = NIT_NULL;
3958 fra.me.REG[0] = p0;
3959 /* ../lib/standard/string.nit:715 */
3960 REGB0 = TAG_Int(5);
3961 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
3962 if (!once_value_1) {
3963 fra.me.REG[2] = BOX_NativeString("");
3964 REGB0 = TAG_Int(0);
3965 fra.me.REG[2] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[2])(fra.me.REG[2], REGB0);
3966 once_value_1 = fra.me.REG[2];
3967 register_static_object(&once_value_1);
3968 } else fra.me.REG[2] = once_value_1;
3969 fra.me.REG[2] = fra.me.REG[2];
3970 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
3971 fra.me.REG[2] = CALL_standard___string___Object___class_name(fra.me.REG[0])(fra.me.REG[0]);
3972 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
3973 if (!once_value_2) {
3974 fra.me.REG[2] = BOX_NativeString(":#");
3975 REGB0 = TAG_Int(2);
3976 fra.me.REG[2] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[2])(fra.me.REG[2], REGB0);
3977 once_value_2 = fra.me.REG[2];
3978 register_static_object(&once_value_2);
3979 } else fra.me.REG[2] = once_value_2;
3980 fra.me.REG[2] = fra.me.REG[2];
3981 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
3982 REGB0 = CALL_standard___kernel___Object___object_id(fra.me.REG[0])(fra.me.REG[0]);
3983 fra.me.REG[0] = CALL_standard___string___Int___to_hex(REGB0)(REGB0);
3984 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
3985 if (!once_value_3) {
3986 fra.me.REG[0] = BOX_NativeString("");
3987 REGB0 = TAG_Int(0);
3988 fra.me.REG[0] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[0])(fra.me.REG[0], REGB0);
3989 once_value_3 = fra.me.REG[0];
3990 register_static_object(&once_value_3);
3991 } else fra.me.REG[0] = once_value_3;
3992 fra.me.REG[0] = fra.me.REG[0];
3993 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
3994 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
3995 goto label4;
3996 label4: while(0);
3997 stack_frame_head = fra.me.prev;
3998 return fra.me.REG[1];
3999 }
4000 static const char LOCATE_standard___string___Object___args[] = "string::Object::args";
4001 val_t standard___string___Object___args(val_t p0){
4002 struct {struct stack_frame_t me;} fra;
4003 val_t tmp;
4004 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4005 fra.me.file = LOCATE_standard___string;
4006 fra.me.line = 718;
4007 fra.me.meth = LOCATE_standard___string___Object___args;
4008 fra.me.has_broke = 0;
4009 fra.me.REG_size = 1;
4010 fra.me.nitni_local_ref_head = NULL;
4011 fra.me.REG[0] = NIT_NULL;
4012 fra.me.REG[0] = p0;
4013 /* ../lib/standard/string.nit:720 */
4014 fra.me.REG[0] = CALL_standard___kernel___Object___sys(fra.me.REG[0])(fra.me.REG[0]);
4015 fra.me.REG[0] = CALL_standard___string___Object___args(fra.me.REG[0])(fra.me.REG[0]);
4016 goto label1;
4017 label1: while(0);
4018 stack_frame_head = fra.me.prev;
4019 return fra.me.REG[0];
4020 }
4021 static const char LOCATE_standard___string___Bool___to_s[] = "string::Bool::(string::Object::to_s)";
4022 val_t standard___string___Bool___to_s(val_t p0){
4023 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
4024 val_t REGB0;
4025 val_t tmp;
4026 static val_t once_value_1; /* Once value */
4027 static val_t once_value_2; /* Once value */
4028 static val_t once_value_4; /* Once value */
4029 static val_t once_value_5; /* Once value */
4030 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4031 fra.me.file = LOCATE_standard___string;
4032 fra.me.line = 725;
4033 fra.me.meth = LOCATE_standard___string___Bool___to_s;
4034 fra.me.has_broke = 0;
4035 fra.me.REG_size = 2;
4036 fra.me.nitni_local_ref_head = NULL;
4037 fra.me.REG[0] = NIT_NULL;
4038 fra.me.REG[1] = NIT_NULL;
4039 REGB0 = p0;
4040 /* ../lib/standard/string.nit:729 */
4041 if (UNTAG_Bool(REGB0)) {
4042 /* ../lib/standard/string.nit:730 */
4043 if (!once_value_1) {
4044 if (!once_value_2) {
4045 fra.me.REG[0] = BOX_NativeString("true");
4046 REGB0 = TAG_Int(4);
4047 fra.me.REG[0] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[0])(fra.me.REG[0], REGB0);
4048 once_value_2 = fra.me.REG[0];
4049 register_static_object(&once_value_2);
4050 } else fra.me.REG[0] = once_value_2;
4051 fra.me.REG[0] = fra.me.REG[0];
4052 once_value_1 = fra.me.REG[0];
4053 register_static_object(&once_value_1);
4054 } else fra.me.REG[0] = once_value_1;
4055 fra.me.REG[0] = fra.me.REG[0];
4056 goto label3;
4057 } else {
4058 /* ../lib/standard/string.nit:732 */
4059 if (!once_value_4) {
4060 if (!once_value_5) {
4061 fra.me.REG[1] = BOX_NativeString("false");
4062 REGB0 = TAG_Int(5);
4063 fra.me.REG[1] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[1])(fra.me.REG[1], REGB0);
4064 once_value_5 = fra.me.REG[1];
4065 register_static_object(&once_value_5);
4066 } else fra.me.REG[1] = once_value_5;
4067 fra.me.REG[1] = fra.me.REG[1];
4068 once_value_4 = fra.me.REG[1];
4069 register_static_object(&once_value_4);
4070 } else fra.me.REG[1] = once_value_4;
4071 fra.me.REG[1] = fra.me.REG[1];
4072 fra.me.REG[0] = fra.me.REG[1];
4073 goto label3;
4074 }
4075 label3: while(0);
4076 stack_frame_head = fra.me.prev;
4077 return fra.me.REG[0];
4078 }
4079 static const char LOCATE_standard___string___Int___fill_buffer[] = "string::Int::fill_buffer";
4080 void standard___string___Int___fill_buffer(val_t p0, val_t p1, val_t p2, val_t p3){
4081 struct {struct stack_frame_t me;} fra;
4082 val_t REGB0;
4083 val_t REGB1;
4084 val_t REGB2;
4085 val_t REGB3;
4086 val_t REGB4;
4087 val_t tmp;
4088 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4089 fra.me.file = LOCATE_standard___string;
4090 fra.me.line = 738;
4091 fra.me.meth = LOCATE_standard___string___Int___fill_buffer;
4092 fra.me.has_broke = 0;
4093 fra.me.REG_size = 1;
4094 fra.me.nitni_local_ref_head = NULL;
4095 fra.me.REG[0] = NIT_NULL;
4096 REGB0 = p0;
4097 fra.me.REG[0] = p1;
4098 REGB1 = p2;
4099 REGB2 = p3;
4100 /* ../lib/standard/string.nit:744 */
4101 REGB2 = TAG_Int(0);
4102 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4103 if (UNTAG_Bool(REGB3)) {
4104 } else {
4105 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4106 }
4107 /* ../lib/standard/kernel.nit:242 */
4108 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
4109 /* ../lib/standard/string.nit:744 */
4110 if (UNTAG_Bool(REGB2)) {
4111 /* ../lib/standard/kernel.nit:246 */
4112 REGB2 = TAG_Int(-UNTAG_Int(REGB0));
4113 /* ../lib/standard/string.nit:746 */
4114 REGB3 = TAG_Int(0);
4115 REGB4 = TAG_Char('-');
4116 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB3, REGB4);
4117 } else {
4118 /* ../lib/standard/string.nit:747 */
4119 REGB4 = TAG_Int(0);
4120 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB4));
4121 if (UNTAG_Bool(REGB3)) {
4122 } else {
4123 /* ../lib/standard/kernel.nit:237 */
4124 REGB4 = TAG_Bool((REGB0)==(REGB4));
4125 /* ../lib/standard/string.nit:747 */
4126 REGB3 = REGB4;
4127 }
4128 if (UNTAG_Bool(REGB3)) {
4129 /* ../lib/standard/string.nit:748 */
4130 REGB3 = TAG_Int(0);
4131 REGB4 = TAG_Char('0');
4132 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB3, REGB4);
4133 /* ../lib/standard/string.nit:749 */
4134 goto label1;
4135 } else {
4136 /* ../lib/standard/string.nit:751 */
4137 REGB2 = REGB0;
4138 }
4139 }
4140 /* ../lib/standard/string.nit:754 */
4141 REGB0 = CALL_standard___kernel___Int___digit_count(REGB0)(REGB0, REGB1);
4142 REGB4 = TAG_Int(1);
4143 /* ../lib/standard/kernel.nit:247 */
4144 REGB4 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB4));
4145 /* ../lib/standard/string.nit:755 */
4146 while(1) {
4147 REGB0 = TAG_Int(0);
4148 REGB3 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
4149 if (UNTAG_Bool(REGB3)) {
4150 } else {
4151 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4152 }
4153 /* ../lib/standard/kernel.nit:243 */
4154 REGB0 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB0));
4155 /* ../lib/standard/string.nit:755 */
4156 if (UNTAG_Bool(REGB0)) {
4157 REGB0 = TAG_Int(0);
4158 REGB3 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
4159 if (UNTAG_Bool(REGB3)) {
4160 } else {
4161 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4162 }
4163 /* ../lib/standard/kernel.nit:244 */
4164 REGB0 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB0));
4165 } else {
4166 /* ../lib/standard/string.nit:755 */
4167 REGB3 = TAG_Bool(0);
4168 REGB0 = REGB3;
4169 }
4170 if (UNTAG_Bool(REGB0)) {
4171 /* ../lib/standard/kernel.nit:250 */
4172 REGB0 = TAG_Int(UNTAG_Int(REGB2)%UNTAG_Int(REGB1));
4173 /* ../lib/standard/string.nit:756 */
4174 REGB0 = CALL_standard___kernel___Int___to_c(REGB0)(REGB0);
4175 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB4, REGB0);
4176 /* ../lib/standard/kernel.nit:249 */
4177 REGB0 = TAG_Int(UNTAG_Int(REGB2)/UNTAG_Int(REGB1));
4178 /* ../lib/standard/string.nit:757 */
4179 REGB2 = REGB0;
4180 /* ../lib/standard/string.nit:758 */
4181 REGB0 = TAG_Int(1);
4182 /* ../lib/standard/kernel.nit:247 */
4183 REGB0 = TAG_Int(UNTAG_Int(REGB4)-UNTAG_Int(REGB0));
4184 /* ../lib/standard/string.nit:758 */
4185 REGB4 = REGB0;
4186 } else {
4187 /* ../lib/standard/string.nit:755 */
4188 goto label2;
4189 }
4190 }
4191 label2: while(0);
4192 label1: while(0);
4193 stack_frame_head = fra.me.prev;
4194 return;
4195 }
4196 static const char LOCATE_standard___string___Int___native_int_to_s[] = "string::Int::native_int_to_s";
4197 val_t standard___string___Int___native_int_to_s(val_t p0, val_t p1){
4198 struct {struct stack_frame_t me;} fra;
4199 val_t REGB0;
4200 val_t REGB1;
4201 val_t tmp;
4202 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4203 fra.me.file = LOCATE_standard___string;
4204 fra.me.line = 762;
4205 fra.me.meth = LOCATE_standard___string___Int___native_int_to_s;
4206 fra.me.has_broke = 0;
4207 fra.me.REG_size = 1;
4208 fra.me.nitni_local_ref_head = NULL;
4209 fra.me.REG[0] = NIT_NULL;
4210 REGB0 = p0;
4211 REGB1 = p1;
4212 /* ../lib/standard/string.nit:762 */
4213 fra.me.REG[0] = Int_native_int_to_s___out(REGB0, REGB1);
4214 stack_frame_head = fra.me.prev;
4215 return fra.me.REG[0];
4216 }
4217 static const char LOCATE_standard___string___Int___to_s[] = "string::Int::(string::Object::to_s)";
4218 val_t standard___string___Int___to_s(val_t p0){
4219 struct {struct stack_frame_t me;} fra;
4220 val_t REGB0;
4221 val_t REGB1;
4222 val_t tmp;
4223 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4224 fra.me.file = LOCATE_standard___string;
4225 fra.me.line = 765;
4226 fra.me.meth = LOCATE_standard___string___Int___to_s;
4227 fra.me.has_broke = 0;
4228 fra.me.REG_size = 1;
4229 fra.me.nitni_local_ref_head = NULL;
4230 fra.me.REG[0] = NIT_NULL;
4231 REGB0 = p0;
4232 /* ../lib/standard/string.nit:770 */
4233 REGB1 = TAG_Int(10);
4234 REGB1 = CALL_standard___kernel___Int___digit_count(REGB0)(REGB0, REGB1);
4235 /* ../lib/standard/string.nit:771 */
4236 fra.me.REG[0] = CALL_standard___string___Int___native_int_to_s(REGB0)(REGB0, REGB1);
4237 fra.me.REG[0] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[0])(fra.me.REG[0], REGB1);
4238 goto label1;
4239 label1: while(0);
4240 stack_frame_head = fra.me.prev;
4241 return fra.me.REG[0];
4242 }
4243 static const char LOCATE_standard___string___Int___to_hex[] = "string::Int::to_hex";
4244 val_t standard___string___Int___to_hex(val_t p0){
4245 struct {struct stack_frame_t me;} fra;
4246 val_t REGB0;
4247 val_t REGB1;
4248 val_t REGB2;
4249 val_t tmp;
4250 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4251 fra.me.file = LOCATE_standard___string;
4252 fra.me.line = 774;
4253 fra.me.meth = LOCATE_standard___string___Int___to_hex;
4254 fra.me.has_broke = 0;
4255 fra.me.REG_size = 1;
4256 fra.me.nitni_local_ref_head = NULL;
4257 fra.me.REG[0] = NIT_NULL;
4258 REGB0 = p0;
4259 /* ../lib/standard/string.nit:775 */
4260 REGB1 = TAG_Int(16);
4261 REGB2 = TAG_Bool(0);
4262 fra.me.REG[0] = CALL_standard___string___Int___to_base(REGB0)(REGB0, REGB1, REGB2);
4263 goto label1;
4264 label1: while(0);
4265 stack_frame_head = fra.me.prev;
4266 return fra.me.REG[0];
4267 }
4268 static const char LOCATE_standard___string___Int___to_base[] = "string::Int::to_base";
4269 val_t standard___string___Int___to_base(val_t p0, val_t p1, val_t p2){
4270 struct {struct stack_frame_t me;} fra;
4271 val_t REGB0;
4272 val_t REGB1;
4273 val_t REGB2;
4274 val_t REGB3;
4275 val_t REGB4;
4276 val_t tmp;
4277 static val_t once_value_1; /* Once value */
4278 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4279 fra.me.file = LOCATE_standard___string;
4280 fra.me.line = 777;
4281 fra.me.meth = LOCATE_standard___string___Int___to_base;
4282 fra.me.has_broke = 0;
4283 fra.me.REG_size = 1;
4284 fra.me.nitni_local_ref_head = NULL;
4285 fra.me.REG[0] = NIT_NULL;
4286 REGB0 = p0;
4287 REGB1 = p1;
4288 REGB2 = p2;
4289 /* ../lib/standard/string.nit:780 */
4290 REGB3 = CALL_standard___kernel___Int___digit_count(REGB0)(REGB0, REGB1);
4291 /* ../lib/standard/string.nit:781 */
4292 if (!once_value_1) {
4293 fra.me.REG[0] = BOX_NativeString(" ");
4294 REGB4 = TAG_Int(1);
4295 fra.me.REG[0] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[0])(fra.me.REG[0], REGB4);
4296 once_value_1 = fra.me.REG[0];
4297 register_static_object(&once_value_1);
4298 } else fra.me.REG[0] = once_value_1;
4299 fra.me.REG[0] = fra.me.REG[0];
4300 fra.me.REG[0] = CALL_standard___string___String_____star(fra.me.REG[0])(fra.me.REG[0], REGB3);
4301 fra.me.REG[0] = NEW_Buffer_standard___string___Buffer___from(fra.me.REG[0]);
4302 /* ../lib/standard/string.nit:782 */
4303 CALL_standard___string___Int___fill_buffer(REGB0)(REGB0, fra.me.REG[0], REGB1, REGB2);
4304 /* ../lib/standard/string.nit:783 */
4305 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
4306 goto label2;
4307 label2: while(0);
4308 stack_frame_head = fra.me.prev;
4309 return fra.me.REG[0];
4310 }
4311 static const char LOCATE_standard___string___Float___to_s[] = "string::Float::(string::Object::to_s)";
4312 val_t standard___string___Float___to_s(val_t p0){
4313 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
4314 val_t REGB0;
4315 val_t REGB1;
4316 val_t REGB2;
4317 val_t REGB3;
4318 val_t REGB4;
4319 val_t REGB5;
4320 val_t REGB6;
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 = 788;
4325 fra.me.meth = LOCATE_standard___string___Float___to_s;
4326 fra.me.has_broke = 0;
4327 fra.me.REG_size = 3;
4328 fra.me.nitni_local_ref_head = NULL;
4329 fra.me.REG[0] = NIT_NULL;
4330 fra.me.REG[1] = NIT_NULL;
4331 fra.me.REG[2] = NIT_NULL;
4332 fra.me.REG[0] = p0;
4333 /* ../lib/standard/string.nit:790 */
4334 REGB0 = TAG_Int(3);
4335 fra.me.REG[0] = CALL_standard___string___Float___to_precision(fra.me.REG[0])(fra.me.REG[0], REGB0);
4336 /* ../lib/standard/collection/array.nit:24 */
4337 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
4338 if (UNTAG_Bool(REGB0)) {
4339 } else {
4340 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
4341 }
4342 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
4343 /* ../lib/standard/string.nit:792 */
4344 REGB1 = TAG_Int(0);
4345 REGB2 = TAG_Int(1);
4346 /* ../lib/standard/kernel.nit:247 */
4347 REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
4348 /* ../lib/standard/kernel.nit:393 */
4349 while(1) {
4350 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
4351 if (UNTAG_Bool(REGB3)) {
4352 } else {
4353 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4354 }
4355 /* ../lib/standard/kernel.nit:241 */
4356 REGB3 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB2));
4357 /* ../lib/standard/kernel.nit:393 */
4358 if (UNTAG_Bool(REGB3)) {
4359 /* ../lib/standard/string.nit:792 */
4360 REGB3 = REGB1;
4361 /* ../lib/standard/string.nit:793 */
4362 REGB4 = TAG_Int(1);
4363 /* ../lib/standard/kernel.nit:247 */
4364 REGB4 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB4));
4365 REGB3 = TAG_Int(UNTAG_Int(REGB4)-UNTAG_Int(REGB3));
4366 /* ../lib/standard/string.nit:794 */
4367 REGB4 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB3);
4368 /* ../lib/standard/string.nit:795 */
4369 REGB5 = TAG_Char('0');
4370 REGB6 = TAG_Bool(IS_EQUAL_OO(REGB4,REGB5));
4371 if (UNTAG_Bool(REGB6)) {
4372 } else {
4373 /* ../lib/standard/kernel.nit:434 */
4374 REGB5 = TAG_Bool((REGB4)==(REGB5));
4375 /* ../lib/standard/string.nit:795 */
4376 REGB6 = REGB5;
4377 }
4378 if (UNTAG_Bool(REGB6)) {
4379 /* ../lib/standard/string.nit:796 */
4380 goto label1;
4381 } else {
4382 /* ../lib/standard/string.nit:797 */
4383 REGB6 = TAG_Char('.');
4384 REGB5 = TAG_Bool(IS_EQUAL_OO(REGB4,REGB6));
4385 if (UNTAG_Bool(REGB5)) {
4386 } else {
4387 /* ../lib/standard/kernel.nit:434 */
4388 REGB6 = TAG_Bool((REGB4)==(REGB6));
4389 /* ../lib/standard/string.nit:797 */
4390 REGB5 = REGB6;
4391 }
4392 if (UNTAG_Bool(REGB5)) {
4393 /* ../lib/standard/string.nit:798 */
4394 REGB5 = TAG_Int(0);
4395 REGB6 = TAG_Int(2);
4396 /* ../lib/standard/kernel.nit:245 */
4397 REGB6 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB6));
4398 /* ../lib/standard/string.nit:798 */
4399 fra.me.REG[1] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB5, REGB6);
4400 goto label2;
4401 } else {
4402 /* ../lib/standard/string.nit:800 */
4403 REGB6 = TAG_Int(0);
4404 REGB5 = TAG_Int(1);
4405 /* ../lib/standard/kernel.nit:245 */
4406 REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB5));
4407 /* ../lib/standard/string.nit:800 */
4408 fra.me.REG[2] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB6, REGB5);
4409 fra.me.REG[1] = fra.me.REG[2];
4410 goto label2;
4411 }
4412 }
4413 label1: while(0);
4414 /* ../lib/standard/kernel.nit:395 */
4415 REGB5 = TAG_Int(1);
4416 /* ../lib/standard/kernel.nit:245 */
4417 REGB5 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB5));
4418 /* ../lib/standard/kernel.nit:395 */
4419 REGB1 = REGB5;
4420 } else {
4421 /* ../lib/standard/kernel.nit:393 */
4422 goto label3;
4423 }
4424 }
4425 label3: while(0);
4426 /* ../lib/standard/string.nit:803 */
4427 fra.me.REG[1] = fra.me.REG[0];
4428 goto label2;
4429 label2: while(0);
4430 stack_frame_head = fra.me.prev;
4431 return fra.me.REG[1];
4432 }
4433 static const char LOCATE_standard___string___Float___to_precision[] = "string::Float::to_precision";
4434 val_t standard___string___Float___to_precision(val_t p0, val_t p1){
4435 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
4436 val_t REGB0;
4437 val_t REGB1;
4438 val_t REGB2;
4439 val_t REGB3;
4440 val_t tmp;
4441 static val_t once_value_3; /* Once value */
4442 static val_t once_value_4; /* Once value */
4443 static val_t once_value_5; /* Once value */
4444 static val_t once_value_6; /* Once value */
4445 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4446 fra.me.file = LOCATE_standard___string;
4447 fra.me.line = 806;
4448 fra.me.meth = LOCATE_standard___string___Float___to_precision;
4449 fra.me.has_broke = 0;
4450 fra.me.REG_size = 5;
4451 fra.me.nitni_local_ref_head = NULL;
4452 fra.me.REG[0] = NIT_NULL;
4453 fra.me.REG[1] = NIT_NULL;
4454 fra.me.REG[2] = NIT_NULL;
4455 fra.me.REG[3] = NIT_NULL;
4456 fra.me.REG[4] = NIT_NULL;
4457 fra.me.REG[0] = p0;
4458 REGB0 = p1;
4459 /* ../lib/standard/string.nit:809 */
4460 REGB1 = TAG_Int(0);
4461 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
4462 if (UNTAG_Bool(REGB2)) {
4463 } else {
4464 /* ../lib/standard/kernel.nit:237 */
4465 REGB1 = TAG_Bool((REGB0)==(REGB1));
4466 /* ../lib/standard/string.nit:809 */
4467 REGB2 = REGB1;
4468 }
4469 if (UNTAG_Bool(REGB2)) {
4470 /* ../lib/standard/kernel.nit:220 */
4471 REGB2 = TAG_Int((bigint)UNBOX_Float(fra.me.REG[0]));
4472 /* ../lib/standard/string.nit:809 */
4473 fra.me.REG[1] = CALL_standard___string___Object___to_s(REGB2)(REGB2);
4474 goto label1;
4475 }
4476 /* ../lib/standard/string.nit:810 */
4477 fra.me.REG[2] = fra.me.REG[0];
4478 /* ../lib/standard/string.nit:811 */
4479 REGB2 = TAG_Int(0);
4480 /* ../lib/standard/kernel.nit:399 */
4481 REGB1 = REGB0;
4482 /* ../lib/standard/kernel.nit:404 */
4483 while(1) {
4484 REGB3 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
4485 if (UNTAG_Bool(REGB3)) {
4486 } else {
4487 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4488 }
4489 /* ../lib/standard/kernel.nit:242 */
4490 REGB3 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB1));
4491 /* ../lib/standard/kernel.nit:404 */
4492 if (UNTAG_Bool(REGB3)) {
4493 /* ../lib/standard/string.nit:811 */
4494 fra.me.REG[3] = BOX_Float(10.0);
4495 /* ../lib/standard/kernel.nit:217 */
4496 fra.me.REG[3] = BOX_Float(UNBOX_Float(fra.me.REG[2])*UNBOX_Float(fra.me.REG[3]));
4497 /* ../lib/standard/string.nit:811 */
4498 fra.me.REG[2] = fra.me.REG[3];
4499 /* ../lib/standard/kernel.nit:406 */
4500 REGB3 = TAG_Int(1);
4501 /* ../lib/standard/kernel.nit:245 */
4502 REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
4503 /* ../lib/standard/kernel.nit:406 */
4504 REGB2 = REGB3;
4505 } else {
4506 /* ../lib/standard/kernel.nit:404 */
4507 goto label2;
4508 }
4509 }
4510 label2: while(0);
4511 /* ../lib/standard/string.nit:812 */
4512 fra.me.REG[3] = BOX_Float(0.0);
4513 /* ../lib/standard/kernel.nit:213 */
4514 REGB2 = TAG_Bool(UNBOX_Float(fra.me.REG[0])>UNBOX_Float(fra.me.REG[3]));
4515 /* ../lib/standard/string.nit:812 */
4516 if (UNTAG_Bool(REGB2)) {
4517 /* ../lib/standard/string.nit:813 */
4518 fra.me.REG[3] = BOX_Float(0.5);
4519 /* ../lib/standard/kernel.nit:214 */
4520 fra.me.REG[3] = BOX_Float(UNBOX_Float(fra.me.REG[2])+UNBOX_Float(fra.me.REG[3]));
4521 /* ../lib/standard/string.nit:813 */
4522 fra.me.REG[2] = fra.me.REG[3];
4523 } else {
4524 /* ../lib/standard/string.nit:815 */
4525 fra.me.REG[3] = BOX_Float(0.5);
4526 /* ../lib/standard/kernel.nit:216 */
4527 fra.me.REG[3] = BOX_Float(UNBOX_Float(fra.me.REG[2])-UNBOX_Float(fra.me.REG[3]));
4528 /* ../lib/standard/string.nit:815 */
4529 fra.me.REG[2] = fra.me.REG[3];
4530 }
4531 /* ../lib/standard/kernel.nit:220 */
4532 REGB2 = TAG_Int((bigint)UNBOX_Float(fra.me.REG[2]));
4533 /* ../lib/standard/string.nit:818 */
4534 REGB1 = TAG_Int(0);
4535 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1));
4536 if (UNTAG_Bool(REGB3)) {
4537 } else {
4538 /* ../lib/standard/kernel.nit:237 */
4539 REGB1 = TAG_Bool((REGB2)==(REGB1));
4540 /* ../lib/standard/string.nit:818 */
4541 REGB3 = REGB1;
4542 }
4543 if (UNTAG_Bool(REGB3)) {
4544 if (!once_value_3) {
4545 fra.me.REG[2] = BOX_NativeString("0.0");
4546 REGB3 = TAG_Int(3);
4547 fra.me.REG[2] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[2])(fra.me.REG[2], REGB3);
4548 once_value_3 = fra.me.REG[2];
4549 register_static_object(&once_value_3);
4550 } else fra.me.REG[2] = once_value_3;
4551 fra.me.REG[2] = fra.me.REG[2];
4552 fra.me.REG[1] = fra.me.REG[2];
4553 goto label1;
4554 }
4555 /* ../lib/standard/string.nit:819 */
4556 fra.me.REG[2] = CALL_standard___string___Object___to_s(REGB2)(REGB2);
4557 /* ../lib/standard/collection/array.nit:24 */
4558 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
4559 if (UNTAG_Bool(REGB2)) {
4560 } else {
4561 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
4562 }
4563 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
4564 REGB3 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
4565 if (UNTAG_Bool(REGB3)) {
4566 } else {
4567 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4568 }
4569 /* ../lib/standard/kernel.nit:244 */
4570 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB0));
4571 /* ../lib/standard/string.nit:821 */
4572 if (UNTAG_Bool(REGB3)) {
4573 /* ../lib/standard/string.nit:822 */
4574 REGB3 = TAG_Int(0);
4575 /* ../lib/standard/collection/array.nit:24 */
4576 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
4577 if (UNTAG_Bool(REGB1)) {
4578 } else {
4579 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
4580 }
4581 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
4582 /* ../lib/standard/kernel.nit:247 */
4583 REGB1 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
4584 /* ../lib/standard/string.nit:822 */
4585 fra.me.REG[3] = CALL_standard___string___AbstractString___substring(fra.me.REG[2])(fra.me.REG[2], REGB3, REGB1);
4586 /* ../lib/standard/collection/array.nit:24 */
4587 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
4588 if (UNTAG_Bool(REGB1)) {
4589 } else {
4590 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
4591 }
4592 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
4593 /* ../lib/standard/kernel.nit:247 */
4594 REGB1 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
4595 /* ../lib/standard/string.nit:823 */
4596 fra.me.REG[0] = CALL_standard___string___AbstractString___substring(fra.me.REG[2])(fra.me.REG[2], REGB1, REGB0);
4597 /* ../lib/standard/string.nit:824 */
4598 if (!once_value_4) {
4599 fra.me.REG[4] = BOX_NativeString(".");
4600 REGB1 = TAG_Int(1);
4601 fra.me.REG[4] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[4])(fra.me.REG[4], REGB1);
4602 once_value_4 = fra.me.REG[4];
4603 register_static_object(&once_value_4);
4604 } else fra.me.REG[4] = once_value_4;
4605 fra.me.REG[4] = fra.me.REG[4];
4606 fra.me.REG[4] = CALL_standard___string___String_____plus(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
4607 fra.me.REG[0] = CALL_standard___string___String_____plus(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
4608 fra.me.REG[1] = fra.me.REG[0];
4609 goto label1;
4610 } else {
4611 /* ../lib/standard/string.nit:826 */
4612 if (!once_value_5) {
4613 fra.me.REG[0] = BOX_NativeString("0.");
4614 REGB1 = TAG_Int(2);
4615 fra.me.REG[0] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[0])(fra.me.REG[0], REGB1);
4616 once_value_5 = fra.me.REG[0];
4617 register_static_object(&once_value_5);
4618 } else fra.me.REG[0] = once_value_5;
4619 fra.me.REG[0] = fra.me.REG[0];
4620 if (!once_value_6) {
4621 fra.me.REG[4] = BOX_NativeString("0");
4622 REGB1 = TAG_Int(1);
4623 fra.me.REG[4] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[4])(fra.me.REG[4], REGB1);
4624 once_value_6 = fra.me.REG[4];
4625 register_static_object(&once_value_6);
4626 } else fra.me.REG[4] = once_value_6;
4627 fra.me.REG[4] = fra.me.REG[4];
4628 /* ../lib/standard/kernel.nit:247 */
4629 REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
4630 /* ../lib/standard/string.nit:826 */
4631 fra.me.REG[4] = CALL_standard___string___String_____star(fra.me.REG[4])(fra.me.REG[4], REGB2);
4632 fra.me.REG[4] = CALL_standard___string___String_____plus(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4]);
4633 fra.me.REG[2] = CALL_standard___string___String_____plus(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
4634 fra.me.REG[1] = fra.me.REG[2];
4635 goto label1;
4636 }
4637 label1: while(0);
4638 stack_frame_head = fra.me.prev;
4639 return fra.me.REG[1];
4640 }
4641 static const char LOCATE_standard___string___Float___to_precision_native[] = "string::Float::to_precision_native";
4642 val_t standard___string___Float___to_precision_native(val_t p0, val_t p1){
4643 struct {struct stack_frame_t me;} fra;
4644 val_t REGB0;
4645 val_t tmp;
4646 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4647 fra.me.file = LOCATE_standard___string;
4648 fra.me.line = 830;
4649 fra.me.meth = LOCATE_standard___string___Float___to_precision_native;
4650 fra.me.has_broke = 0;
4651 fra.me.REG_size = 1;
4652 fra.me.nitni_local_ref_head = NULL;
4653 fra.me.REG[0] = NIT_NULL;
4654 fra.me.REG[0] = p0;
4655 REGB0 = p1;
4656 /* ../lib/standard/string.nit:830 */
4657 fra.me.REG[0] = Float_to_precision_native___out(fra.me.REG[0], REGB0);
4658 ;
4659 stack_frame_head = fra.me.prev;
4660 return fra.me.REG[0];
4661 }
4662 static const char LOCATE_standard___string___Char___to_s[] = "string::Char::(string::Object::to_s)";
4663 val_t standard___string___Char___to_s(val_t p0){
4664 struct {struct stack_frame_t me;} fra;
4665 val_t REGB0;
4666 val_t REGB1;
4667 val_t tmp;
4668 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4669 fra.me.file = LOCATE_standard___string;
4670 fra.me.line = 843;
4671 fra.me.meth = LOCATE_standard___string___Char___to_s;
4672 fra.me.has_broke = 0;
4673 fra.me.REG_size = 1;
4674 fra.me.nitni_local_ref_head = NULL;
4675 fra.me.REG[0] = NIT_NULL;
4676 REGB0 = p0;
4677 /* ../lib/standard/string.nit:846 */
4678 REGB1 = TAG_Int(1);
4679 fra.me.REG[0] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB1);
4680 /* ../lib/standard/string.nit:847 */
4681 REGB1 = TAG_Int(0);
4682 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB1, REGB0);
4683 /* ../lib/standard/string.nit:848 */
4684 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
4685 goto label1;
4686 label1: while(0);
4687 stack_frame_head = fra.me.prev;
4688 return fra.me.REG[0];
4689 }
4690 static const char LOCATE_standard___string___Char___is_numeric[] = "string::Char::is_numeric";
4691 val_t standard___string___Char___is_numeric(val_t p0){
4692 struct {struct stack_frame_t me;} fra;
4693 val_t REGB0;
4694 val_t REGB1;
4695 val_t REGB2;
4696 val_t tmp;
4697 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4698 fra.me.file = LOCATE_standard___string;
4699 fra.me.line = 851;
4700 fra.me.meth = LOCATE_standard___string___Char___is_numeric;
4701 fra.me.has_broke = 0;
4702 fra.me.REG_size = 0;
4703 fra.me.nitni_local_ref_head = NULL;
4704 REGB0 = p0;
4705 /* ../lib/standard/string.nit:854 */
4706 REGB1 = TAG_Char('0');
4707 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4708 if (UNTAG_Bool(REGB2)) {
4709 } else {
4710 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4711 }
4712 /* ../lib/standard/kernel.nit:440 */
4713 REGB1 = TAG_Bool(UNTAG_Char(REGB0)>=UNTAG_Char(REGB1));
4714 /* ../lib/standard/string.nit:854 */
4715 if (UNTAG_Bool(REGB1)) {
4716 REGB1 = TAG_Char('9');
4717 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4718 if (UNTAG_Bool(REGB2)) {
4719 } else {
4720 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4721 }
4722 /* ../lib/standard/kernel.nit:438 */
4723 REGB1 = TAG_Bool(UNTAG_Char(REGB0)<=UNTAG_Char(REGB1));
4724 } else {
4725 /* ../lib/standard/string.nit:854 */
4726 REGB0 = TAG_Bool(0);
4727 REGB1 = REGB0;
4728 }
4729 if (UNTAG_Bool(REGB1)) {
4730 /* ../lib/standard/string.nit:856 */
4731 REGB1 = TAG_Bool(1);
4732 goto label1;
4733 }
4734 /* ../lib/standard/string.nit:858 */
4735 REGB0 = TAG_Bool(0);
4736 REGB1 = REGB0;
4737 goto label1;
4738 label1: while(0);
4739 stack_frame_head = fra.me.prev;
4740 return REGB1;
4741 }
4742 static const char LOCATE_standard___string___Char___is_alpha[] = "string::Char::is_alpha";
4743 val_t standard___string___Char___is_alpha(val_t p0){
4744 struct {struct stack_frame_t me;} fra;
4745 val_t REGB0;
4746 val_t REGB1;
4747 val_t REGB2;
4748 val_t REGB3;
4749 val_t tmp;
4750 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4751 fra.me.file = LOCATE_standard___string;
4752 fra.me.line = 861;
4753 fra.me.meth = LOCATE_standard___string___Char___is_alpha;
4754 fra.me.has_broke = 0;
4755 fra.me.REG_size = 0;
4756 fra.me.nitni_local_ref_head = NULL;
4757 REGB0 = p0;
4758 /* ../lib/standard/string.nit:864 */
4759 REGB1 = TAG_Char('a');
4760 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4761 if (UNTAG_Bool(REGB2)) {
4762 } else {
4763 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4764 }
4765 /* ../lib/standard/kernel.nit:440 */
4766 REGB1 = TAG_Bool(UNTAG_Char(REGB0)>=UNTAG_Char(REGB1));
4767 /* ../lib/standard/string.nit:864 */
4768 if (UNTAG_Bool(REGB1)) {
4769 REGB1 = TAG_Char('z');
4770 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4771 if (UNTAG_Bool(REGB2)) {
4772 } else {
4773 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4774 }
4775 /* ../lib/standard/kernel.nit:438 */
4776 REGB1 = TAG_Bool(UNTAG_Char(REGB0)<=UNTAG_Char(REGB1));
4777 } else {
4778 /* ../lib/standard/string.nit:864 */
4779 REGB2 = TAG_Bool(0);
4780 REGB1 = REGB2;
4781 }
4782 if (UNTAG_Bool(REGB1)) {
4783 REGB1 = TAG_Bool(1);
4784 } else {
4785 REGB2 = TAG_Char('A');
4786 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4787 if (UNTAG_Bool(REGB3)) {
4788 } else {
4789 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4790 }
4791 /* ../lib/standard/kernel.nit:440 */
4792 REGB2 = TAG_Bool(UNTAG_Char(REGB0)>=UNTAG_Char(REGB2));
4793 /* ../lib/standard/string.nit:864 */
4794 if (UNTAG_Bool(REGB2)) {
4795 REGB2 = TAG_Char('Z');
4796 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
4797 if (UNTAG_Bool(REGB3)) {
4798 } else {
4799 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
4800 }
4801 /* ../lib/standard/kernel.nit:438 */
4802 REGB2 = TAG_Bool(UNTAG_Char(REGB0)<=UNTAG_Char(REGB2));
4803 } else {
4804 /* ../lib/standard/string.nit:864 */
4805 REGB0 = TAG_Bool(0);
4806 REGB2 = REGB0;
4807 }
4808 REGB1 = REGB2;
4809 }
4810 if (UNTAG_Bool(REGB1)) {
4811 REGB1 = TAG_Bool(1);
4812 goto label1;
4813 }
4814 /* ../lib/standard/string.nit:865 */
4815 REGB2 = TAG_Bool(0);
4816 REGB1 = REGB2;
4817 goto label1;
4818 label1: while(0);
4819 stack_frame_head = fra.me.prev;
4820 return REGB1;
4821 }
4822 static const char LOCATE_standard___string___Char___is_alphanumeric[] = "string::Char::is_alphanumeric";
4823 val_t standard___string___Char___is_alphanumeric(val_t p0){
4824 struct {struct stack_frame_t me;} fra;
4825 val_t REGB0;
4826 val_t REGB1;
4827 val_t tmp;
4828 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4829 fra.me.file = LOCATE_standard___string;
4830 fra.me.line = 868;
4831 fra.me.meth = LOCATE_standard___string___Char___is_alphanumeric;
4832 fra.me.has_broke = 0;
4833 fra.me.REG_size = 0;
4834 fra.me.nitni_local_ref_head = NULL;
4835 REGB0 = p0;
4836 /* ../lib/standard/string.nit:871 */
4837 REGB1 = CALL_standard___string___Char___is_numeric(REGB0)(REGB0);
4838 if (UNTAG_Bool(REGB1)) {
4839 REGB1 = TAG_Bool(1);
4840 } else {
4841 REGB0 = CALL_standard___string___Char___is_alpha(REGB0)(REGB0);
4842 REGB1 = REGB0;
4843 }
4844 if (UNTAG_Bool(REGB1)) {
4845 REGB1 = TAG_Bool(1);
4846 goto label1;
4847 }
4848 /* ../lib/standard/string.nit:872 */
4849 REGB0 = TAG_Bool(0);
4850 REGB1 = REGB0;
4851 goto label1;
4852 label1: while(0);
4853 stack_frame_head = fra.me.prev;
4854 return REGB1;
4855 }
4856 static const char LOCATE_standard___string___Collection___to_s[] = "string::Collection::(string::Object::to_s)";
4857 val_t standard___string___Collection___to_s(val_t p0){
4858 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
4859 val_t tmp;
4860 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4861 fra.me.file = LOCATE_standard___string;
4862 fra.me.line = 877;
4863 fra.me.meth = LOCATE_standard___string___Collection___to_s;
4864 fra.me.has_broke = 0;
4865 fra.me.REG_size = 2;
4866 fra.me.nitni_local_ref_head = NULL;
4867 fra.me.REG[0] = NIT_NULL;
4868 fra.me.REG[1] = NIT_NULL;
4869 fra.me.REG[0] = p0;
4870 /* ../lib/standard/string.nit:880 */
4871 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___init();
4872 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));
4873 /* ../lib/standard/string.nit:882 */
4874 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
4875 goto label2;
4876 label2: while(0);
4877 stack_frame_head = fra.me.prev;
4878 return fra.me.REG[1];
4879 }
4880 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){
4881 struct {struct stack_frame_t me;} fra;
4882 val_t REGB0;
4883 val_t REGB1;
4884 fun_t CREG[1];
4885 val_t tmp;
4886 /* ../lib/standard/string.nit:881 */
4887 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4888 fra.me.file = LOCATE_standard___string;
4889 fra.me.line = 0;
4890 fra.me.meth = LOCATE_standard___string___Collection___to_s;
4891 fra.me.has_broke = 0;
4892 fra.me.REG_size = 1;
4893 fra.me.nitni_local_ref_head = NULL;
4894 fra.me.REG[0] = NIT_NULL;
4895 fra.me.closure_ctx = closctx_param;
4896 fra.me.closure_funs = CREG;
4897 fra.me.REG[0] = p0;
4898 CREG[0] = clos_fun0;
4899 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
4900 if (UNTAG_Bool(REGB0)) {
4901 } else {
4902 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
4903 if (UNTAG_Bool(REGB1)) {
4904 REGB1 = TAG_Bool(0);
4905 REGB0 = REGB1;
4906 } else {
4907 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
4908 REGB0 = REGB1;
4909 }
4910 }
4911 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
4912 if (UNTAG_Bool(REGB0)) {
4913 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
4914 if (UNTAG_Bool(REGB0)) {
4915 nit_abort("Reciever is null", NULL, LOCATE_standard___string, 881);
4916 }
4917 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
4918 CALL_standard___collection___abstract_collection___Sequence___append(closctx->REG[1])(closctx->REG[1], fra.me.REG[0]);
4919 }
4920 stack_frame_head = fra.me.prev;
4921 return;
4922 }
4923 static const char LOCATE_standard___string___Collection___join[] = "string::Collection::join";
4924 val_t standard___string___Collection___join(val_t p0, val_t p1){
4925 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
4926 val_t REGB0;
4927 val_t REGB1;
4928 val_t tmp;
4929 static val_t once_value_1; /* Once value */
4930 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
4931 fra.me.file = LOCATE_standard___string;
4932 fra.me.line = 885;
4933 fra.me.meth = LOCATE_standard___string___Collection___join;
4934 fra.me.has_broke = 0;
4935 fra.me.REG_size = 6;
4936 fra.me.nitni_local_ref_head = NULL;
4937 fra.me.REG[0] = NIT_NULL;
4938 fra.me.REG[1] = NIT_NULL;
4939 fra.me.REG[2] = NIT_NULL;
4940 fra.me.REG[3] = NIT_NULL;
4941 fra.me.REG[4] = NIT_NULL;
4942 fra.me.REG[5] = NIT_NULL;
4943 fra.me.REG[0] = p0;
4944 fra.me.REG[1] = p1;
4945 /* ../lib/standard/string.nit:891 */
4946 REGB0 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]);
4947 if (UNTAG_Bool(REGB0)) {
4948 if (!once_value_1) {
4949 fra.me.REG[2] = BOX_NativeString("");
4950 REGB0 = TAG_Int(0);
4951 fra.me.REG[2] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[2])(fra.me.REG[2], REGB0);
4952 once_value_1 = fra.me.REG[2];
4953 register_static_object(&once_value_1);
4954 } else fra.me.REG[2] = once_value_1;
4955 fra.me.REG[2] = fra.me.REG[2];
4956 goto label2;
4957 }
4958 /* ../lib/standard/string.nit:893 */
4959 fra.me.REG[3] = NEW_Buffer_standard___string___Buffer___init();
4960 /* ../lib/standard/string.nit:896 */
4961 fra.me.REG[0] = CALL_standard___collection___abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]);
4962 /* ../lib/standard/string.nit:897 */
4963 fra.me.REG[4] = CALL_standard___collection___abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]);
4964 /* ../lib/standard/string.nit:898 */
4965 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
4966 if (UNTAG_Bool(REGB0)) {
4967 } else {
4968 REGB1 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
4969 if (UNTAG_Bool(REGB1)) {
4970 REGB1 = TAG_Bool(0);
4971 REGB0 = REGB1;
4972 } else {
4973 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], NIT_NULL);
4974 REGB0 = REGB1;
4975 }
4976 }
4977 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
4978 if (UNTAG_Bool(REGB0)) {
4979 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
4980 if (UNTAG_Bool(REGB0)) {
4981 nit_abort("Reciever is null", NULL, LOCATE_standard___string, 898);
4982 }
4983 fra.me.REG[5] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
4984 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
4985 }
4986 /* ../lib/standard/string.nit:901 */
4987 CALL_standard___collection___abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
4988 /* ../lib/standard/string.nit:902 */
4989 while(1) {
4990 REGB0 = CALL_standard___collection___abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]);
4991 if (UNTAG_Bool(REGB0)) {
4992 /* ../lib/standard/string.nit:903 */
4993 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
4994 /* ../lib/standard/string.nit:904 */
4995 fra.me.REG[5] = CALL_standard___collection___abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]);
4996 fra.me.REG[4] = fra.me.REG[5];
4997 /* ../lib/standard/string.nit:905 */
4998 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
4999 if (UNTAG_Bool(REGB0)) {
5000 } else {
5001 REGB1 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
5002 if (UNTAG_Bool(REGB1)) {
5003 REGB1 = TAG_Bool(0);
5004 REGB0 = REGB1;
5005 } else {
5006 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], NIT_NULL);
5007 REGB0 = REGB1;
5008 }
5009 }
5010 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
5011 if (UNTAG_Bool(REGB0)) {
5012 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
5013 if (UNTAG_Bool(REGB0)) {
5014 nit_abort("Reciever is null", NULL, LOCATE_standard___string, 905);
5015 }
5016 fra.me.REG[5] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
5017 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
5018 }
5019 /* ../lib/standard/string.nit:906 */
5020 CALL_standard___collection___abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
5021 } else {
5022 /* ../lib/standard/string.nit:902 */
5023 goto label3;
5024 }
5025 }
5026 label3: while(0);
5027 /* ../lib/standard/string.nit:908 */
5028 fra.me.REG[3] = CALL_standard___string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
5029 fra.me.REG[2] = fra.me.REG[3];
5030 goto label2;
5031 label2: while(0);
5032 stack_frame_head = fra.me.prev;
5033 return fra.me.REG[2];
5034 }
5035 static const char LOCATE_standard___string___Array___to_s[] = "string::Array::(string::Object::to_s)";
5036 val_t standard___string___Array___to_s(val_t p0){
5037 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
5038 val_t REGB0;
5039 val_t REGB1;
5040 val_t REGB2;
5041 val_t REGB3;
5042 val_t REGB4;
5043 val_t tmp;
5044 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5045 fra.me.file = LOCATE_standard___string;
5046 fra.me.line = 913;
5047 fra.me.meth = LOCATE_standard___string___Array___to_s;
5048 fra.me.has_broke = 0;
5049 fra.me.REG_size = 3;
5050 fra.me.nitni_local_ref_head = NULL;
5051 fra.me.REG[0] = NIT_NULL;
5052 fra.me.REG[1] = NIT_NULL;
5053 fra.me.REG[2] = NIT_NULL;
5054 fra.me.REG[0] = p0;
5055 /* ../lib/standard/string.nit:916 */
5056 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___init();
5057 /* ../lib/standard/string.nit:917 */
5058 REGB0 = TAG_Int(0);
5059 /* ../lib/standard/collection/array.nit:24 */
5060 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
5061 if (UNTAG_Bool(REGB1)) {
5062 } else {
5063 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
5064 }
5065 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
5066 /* ../lib/standard/string.nit:919 */
5067 while(1) {
5068 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
5069 if (UNTAG_Bool(REGB2)) {
5070 } else {
5071 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
5072 }
5073 /* ../lib/standard/kernel.nit:242 */
5074 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
5075 /* ../lib/standard/string.nit:919 */
5076 if (UNTAG_Bool(REGB2)) {
5077 /* ../lib/standard/collection/array.nit:279 */
5078 fra.me.REG[2] = fra.me.REG[0];
5079 REGB2 = REGB0;
5080 /* ../lib/standard/collection/array.nit:281 */
5081 REGB3 = TAG_Int(0);
5082 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
5083 if (UNTAG_Bool(REGB4)) {
5084 } else {
5085 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
5086 }
5087 /* ../lib/standard/kernel.nit:243 */
5088 REGB3 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB3));
5089 /* ../lib/standard/collection/array.nit:281 */
5090 if (UNTAG_Bool(REGB3)) {
5091 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
5092 if (UNTAG_Bool(REGB3)) {
5093 } else {
5094 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 281);
5095 }
5096 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
5097 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
5098 if (UNTAG_Bool(REGB4)) {
5099 } else {
5100 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
5101 }
5102 /* ../lib/standard/kernel.nit:242 */
5103 REGB3 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB3));
5104 } else {
5105 /* ../lib/standard/collection/array.nit:281 */
5106 REGB4 = TAG_Bool(0);
5107 REGB3 = REGB4;
5108 }
5109 if (UNTAG_Bool(REGB3)) {
5110 } else {
5111 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 281);
5112 }
5113 /* ../lib/standard/collection/array.nit:282 */
5114 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
5115 REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
5116 if (UNTAG_Bool(REGB3)) {
5117 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 282);
5118 }
5119 /* ../lib/standard/collection/array.nit:725 */
5120 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB2)];
5121 /* ../lib/standard/collection/array.nit:282 */
5122 goto label1;
5123 label1: while(0);
5124 /* ../lib/standard/string.nit:921 */
5125 REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
5126 if (UNTAG_Bool(REGB2)) {
5127 } else {
5128 REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
5129 if (UNTAG_Bool(REGB3)) {
5130 REGB3 = TAG_Bool(0);
5131 REGB2 = REGB3;
5132 } else {
5133 REGB3 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
5134 REGB2 = REGB3;
5135 }
5136 }
5137 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
5138 if (UNTAG_Bool(REGB2)) {
5139 REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
5140 if (UNTAG_Bool(REGB2)) {
5141 nit_abort("Reciever is null", NULL, LOCATE_standard___string, 921);
5142 }
5143 fra.me.REG[2] = CALL_standard___string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
5144 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
5145 }
5146 /* ../lib/standard/string.nit:922 */
5147 REGB2 = TAG_Int(1);
5148 /* ../lib/standard/kernel.nit:245 */
5149 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
5150 /* ../lib/standard/string.nit:922 */
5151 REGB0 = REGB2;
5152 } else {
5153 /* ../lib/standard/string.nit:919 */
5154 goto label2;
5155 }
5156 }
5157 label2: while(0);
5158 /* ../lib/standard/string.nit:924 */
5159 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
5160 goto label3;
5161 label3: while(0);
5162 stack_frame_head = fra.me.prev;
5163 return fra.me.REG[1];
5164 }
5165 static const char LOCATE_standard___string___Map___join[] = "string::Map::join";
5166 val_t standard___string___Map___join(val_t p0, val_t p1, val_t p2){
5167 struct {struct stack_frame_t me; val_t MORE_REG[8];} fra;
5168 val_t REGB0;
5169 val_t REGB1;
5170 val_t tmp;
5171 static val_t once_value_1; /* Once value */
5172 static val_t once_value_3; /* Once value */
5173 static val_t once_value_4; /* Once value */
5174 static val_t once_value_5; /* Once value */
5175 static val_t once_value_6; /* Once value */
5176 static val_t once_value_7; /* Once value */
5177 static val_t once_value_8; /* Once value */
5178 static val_t once_value_9; /* Once value */
5179 static val_t once_value_10; /* Once value */
5180 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5181 fra.me.file = LOCATE_standard___string;
5182 fra.me.line = 929;
5183 fra.me.meth = LOCATE_standard___string___Map___join;
5184 fra.me.has_broke = 0;
5185 fra.me.REG_size = 9;
5186 fra.me.nitni_local_ref_head = NULL;
5187 fra.me.REG[0] = NIT_NULL;
5188 fra.me.REG[1] = NIT_NULL;
5189 fra.me.REG[2] = NIT_NULL;
5190 fra.me.REG[3] = NIT_NULL;
5191 fra.me.REG[4] = NIT_NULL;
5192 fra.me.REG[5] = NIT_NULL;
5193 fra.me.REG[6] = NIT_NULL;
5194 fra.me.REG[7] = NIT_NULL;
5195 fra.me.REG[8] = NIT_NULL;
5196 fra.me.REG[0] = p0;
5197 fra.me.REG[1] = p1;
5198 fra.me.REG[2] = p2;
5199 /* ../lib/standard/string.nit:939 */
5200 REGB0 = CALL_standard___collection___abstract_collection___MapRead___is_empty(fra.me.REG[0])(fra.me.REG[0]);
5201 if (UNTAG_Bool(REGB0)) {
5202 if (!once_value_1) {
5203 fra.me.REG[3] = BOX_NativeString("");
5204 REGB0 = TAG_Int(0);
5205 fra.me.REG[3] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[3])(fra.me.REG[3], REGB0);
5206 once_value_1 = fra.me.REG[3];
5207 register_static_object(&once_value_1);
5208 } else fra.me.REG[3] = once_value_1;
5209 fra.me.REG[3] = fra.me.REG[3];
5210 goto label2;
5211 }
5212 /* ../lib/standard/string.nit:941 */
5213 fra.me.REG[4] = NEW_Buffer_standard___string___Buffer___init();
5214 /* ../lib/standard/string.nit:944 */
5215 fra.me.REG[0] = CALL_standard___collection___abstract_collection___MapRead___iterator(fra.me.REG[0])(fra.me.REG[0]);
5216 /* ../lib/standard/string.nit:945 */
5217 fra.me.REG[5] = CALL_standard___collection___abstract_collection___MapIterator___key(fra.me.REG[0])(fra.me.REG[0]);
5218 /* ../lib/standard/string.nit:946 */
5219 fra.me.REG[6] = CALL_standard___collection___abstract_collection___MapIterator___item(fra.me.REG[0])(fra.me.REG[0]);
5220 /* ../lib/standard/string.nit:947 */
5221 REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
5222 if (UNTAG_Bool(REGB0)) {
5223 } else {
5224 REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
5225 if (UNTAG_Bool(REGB1)) {
5226 REGB1 = TAG_Bool(0);
5227 REGB0 = REGB1;
5228 } else {
5229 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], NIT_NULL);
5230 REGB0 = REGB1;
5231 }
5232 }
5233 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
5234 if (UNTAG_Bool(REGB0)) {
5235 REGB0 = TAG_Int(7);
5236 fra.me.REG[7] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
5237 if (!once_value_3) {
5238 fra.me.REG[8] = BOX_NativeString("");
5239 REGB0 = TAG_Int(0);
5240 fra.me.REG[8] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[8])(fra.me.REG[8], REGB0);
5241 once_value_3 = fra.me.REG[8];
5242 register_static_object(&once_value_3);
5243 } else fra.me.REG[8] = once_value_3;
5244 fra.me.REG[8] = fra.me.REG[8];
5245 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5246 fra.me.REG[8] = CALL_standard___string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
5247 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5248 if (!once_value_4) {
5249 fra.me.REG[8] = BOX_NativeString("");
5250 REGB0 = TAG_Int(0);
5251 fra.me.REG[8] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[8])(fra.me.REG[8], REGB0);
5252 once_value_4 = fra.me.REG[8];
5253 register_static_object(&once_value_4);
5254 } else fra.me.REG[8] = once_value_4;
5255 fra.me.REG[8] = fra.me.REG[8];
5256 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5257 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]);
5258 if (!once_value_5) {
5259 fra.me.REG[8] = BOX_NativeString("");
5260 REGB0 = TAG_Int(0);
5261 fra.me.REG[8] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[8])(fra.me.REG[8], REGB0);
5262 once_value_5 = fra.me.REG[8];
5263 register_static_object(&once_value_5);
5264 } else fra.me.REG[8] = once_value_5;
5265 fra.me.REG[8] = fra.me.REG[8];
5266 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5267 fra.me.REG[8] = CALL_standard___string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
5268 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5269 if (!once_value_6) {
5270 fra.me.REG[8] = BOX_NativeString("");
5271 REGB0 = TAG_Int(0);
5272 fra.me.REG[8] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[8])(fra.me.REG[8], REGB0);
5273 once_value_6 = fra.me.REG[8];
5274 register_static_object(&once_value_6);
5275 } else fra.me.REG[8] = once_value_6;
5276 fra.me.REG[8] = fra.me.REG[8];
5277 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5278 fra.me.REG[7] = CALL_standard___string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
5279 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[7]);
5280 }
5281 /* ../lib/standard/string.nit:950 */
5282 CALL_standard___collection___abstract_collection___MapIterator___next(fra.me.REG[0])(fra.me.REG[0]);
5283 /* ../lib/standard/string.nit:951 */
5284 while(1) {
5285 REGB0 = CALL_standard___collection___abstract_collection___MapIterator___is_ok(fra.me.REG[0])(fra.me.REG[0]);
5286 if (UNTAG_Bool(REGB0)) {
5287 /* ../lib/standard/string.nit:952 */
5288 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
5289 /* ../lib/standard/string.nit:953 */
5290 fra.me.REG[7] = CALL_standard___collection___abstract_collection___MapIterator___key(fra.me.REG[0])(fra.me.REG[0]);
5291 fra.me.REG[5] = fra.me.REG[7];
5292 /* ../lib/standard/string.nit:954 */
5293 fra.me.REG[7] = CALL_standard___collection___abstract_collection___MapIterator___item(fra.me.REG[0])(fra.me.REG[0]);
5294 fra.me.REG[6] = fra.me.REG[7];
5295 /* ../lib/standard/string.nit:955 */
5296 REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
5297 if (UNTAG_Bool(REGB0)) {
5298 } else {
5299 REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
5300 if (UNTAG_Bool(REGB1)) {
5301 REGB1 = TAG_Bool(0);
5302 REGB0 = REGB1;
5303 } else {
5304 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], NIT_NULL);
5305 REGB0 = REGB1;
5306 }
5307 }
5308 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
5309 if (UNTAG_Bool(REGB0)) {
5310 REGB0 = TAG_Int(7);
5311 fra.me.REG[7] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
5312 if (!once_value_7) {
5313 fra.me.REG[8] = BOX_NativeString("");
5314 REGB0 = TAG_Int(0);
5315 fra.me.REG[8] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[8])(fra.me.REG[8], REGB0);
5316 once_value_7 = fra.me.REG[8];
5317 register_static_object(&once_value_7);
5318 } else fra.me.REG[8] = once_value_7;
5319 fra.me.REG[8] = fra.me.REG[8];
5320 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5321 fra.me.REG[8] = CALL_standard___string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
5322 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5323 if (!once_value_8) {
5324 fra.me.REG[8] = BOX_NativeString("");
5325 REGB0 = TAG_Int(0);
5326 fra.me.REG[8] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[8])(fra.me.REG[8], REGB0);
5327 once_value_8 = fra.me.REG[8];
5328 register_static_object(&once_value_8);
5329 } else fra.me.REG[8] = once_value_8;
5330 fra.me.REG[8] = fra.me.REG[8];
5331 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5332 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]);
5333 if (!once_value_9) {
5334 fra.me.REG[8] = BOX_NativeString("");
5335 REGB0 = TAG_Int(0);
5336 fra.me.REG[8] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[8])(fra.me.REG[8], REGB0);
5337 once_value_9 = fra.me.REG[8];
5338 register_static_object(&once_value_9);
5339 } else fra.me.REG[8] = once_value_9;
5340 fra.me.REG[8] = fra.me.REG[8];
5341 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5342 fra.me.REG[8] = CALL_standard___string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
5343 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5344 if (!once_value_10) {
5345 fra.me.REG[8] = BOX_NativeString("");
5346 REGB0 = TAG_Int(0);
5347 fra.me.REG[8] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[8])(fra.me.REG[8], REGB0);
5348 once_value_10 = fra.me.REG[8];
5349 register_static_object(&once_value_10);
5350 } else fra.me.REG[8] = once_value_10;
5351 fra.me.REG[8] = fra.me.REG[8];
5352 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
5353 fra.me.REG[7] = CALL_standard___string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
5354 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[7]);
5355 }
5356 /* ../lib/standard/string.nit:956 */
5357 CALL_standard___collection___abstract_collection___MapIterator___next(fra.me.REG[0])(fra.me.REG[0]);
5358 } else {
5359 /* ../lib/standard/string.nit:951 */
5360 goto label11;
5361 }
5362 }
5363 label11: while(0);
5364 /* ../lib/standard/string.nit:958 */
5365 fra.me.REG[4] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
5366 fra.me.REG[3] = fra.me.REG[4];
5367 goto label2;
5368 label2: while(0);
5369 stack_frame_head = fra.me.prev;
5370 return fra.me.REG[3];
5371 }
5372 static const char LOCATE_standard___string___NativeString_____bra[] = "string::NativeString::[]";
5373 val_t standard___string___NativeString_____bra(val_t p0, val_t p1){
5374 struct {struct stack_frame_t me;} fra;
5375 val_t REGB0;
5376 val_t tmp;
5377 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5378 fra.me.file = LOCATE_standard___string;
5379 fra.me.line = 970;
5380 fra.me.meth = LOCATE_standard___string___NativeString_____bra;
5381 fra.me.has_broke = 0;
5382 fra.me.REG_size = 1;
5383 fra.me.nitni_local_ref_head = NULL;
5384 fra.me.REG[0] = NIT_NULL;
5385 fra.me.REG[0] = p0;
5386 REGB0 = p1;
5387 /* ../lib/standard/string.nit:970 */
5388 REGB0 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]);
5389 stack_frame_head = fra.me.prev;
5390 return REGB0;
5391 }
5392 static const char LOCATE_standard___string___NativeString_____braeq[] = "string::NativeString::[]=";
5393 void standard___string___NativeString_____braeq(val_t p0, val_t p1, val_t p2){
5394 struct {struct stack_frame_t me;} fra;
5395 val_t REGB0;
5396 val_t REGB1;
5397 val_t tmp;
5398 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5399 fra.me.file = LOCATE_standard___string;
5400 fra.me.line = 971;
5401 fra.me.meth = LOCATE_standard___string___NativeString_____braeq;
5402 fra.me.has_broke = 0;
5403 fra.me.REG_size = 1;
5404 fra.me.nitni_local_ref_head = NULL;
5405 fra.me.REG[0] = NIT_NULL;
5406 fra.me.REG[0] = p0;
5407 REGB0 = p1;
5408 REGB1 = p2;
5409 /* ../lib/standard/string.nit:971 */
5410 UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB1);;
5411 stack_frame_head = fra.me.prev;
5412 return;
5413 }
5414 static const char LOCATE_standard___string___NativeString___copy_to[] = "string::NativeString::copy_to";
5415 void standard___string___NativeString___copy_to(val_t p0, val_t p1, val_t p2, val_t p3, val_t p4){
5416 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
5417 val_t REGB0;
5418 val_t REGB1;
5419 val_t REGB2;
5420 val_t tmp;
5421 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5422 fra.me.file = LOCATE_standard___string;
5423 fra.me.line = 972;
5424 fra.me.meth = LOCATE_standard___string___NativeString___copy_to;
5425 fra.me.has_broke = 0;
5426 fra.me.REG_size = 2;
5427 fra.me.nitni_local_ref_head = NULL;
5428 fra.me.REG[0] = NIT_NULL;
5429 fra.me.REG[1] = NIT_NULL;
5430 fra.me.REG[0] = p0;
5431 fra.me.REG[1] = p1;
5432 REGB0 = p2;
5433 REGB1 = p3;
5434 REGB2 = p4;
5435 /* ../lib/standard/string.nit:972 */
5436 (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[0])+UNTAG_Int(REGB1), UNTAG_Int(REGB0));;
5437 stack_frame_head = fra.me.prev;
5438 return;
5439 }
5440 static const char LOCATE_standard___string___NativeString___cstring_length[] = "string::NativeString::cstring_length";
5441 val_t standard___string___NativeString___cstring_length(val_t p0){
5442 struct {struct stack_frame_t me;} fra;
5443 val_t REGB0;
5444 val_t REGB1;
5445 val_t REGB2;
5446 val_t REGB3;
5447 val_t tmp;
5448 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5449 fra.me.file = LOCATE_standard___string;
5450 fra.me.line = 974;
5451 fra.me.meth = LOCATE_standard___string___NativeString___cstring_length;
5452 fra.me.has_broke = 0;
5453 fra.me.REG_size = 1;
5454 fra.me.nitni_local_ref_head = NULL;
5455 fra.me.REG[0] = NIT_NULL;
5456 fra.me.REG[0] = p0;
5457 /* ../lib/standard/string.nit:977 */
5458 REGB0 = TAG_Int(0);
5459 /* ../lib/standard/string.nit:978 */
5460 while(1) {
5461 /* ../lib/standard/string.nit:970 */
5462 REGB1 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]);
5463 /* ../lib/standard/string.nit:978 */
5464 REGB2 = TAG_Char('\0');
5465 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB2));
5466 if (UNTAG_Bool(REGB3)) {
5467 } else {
5468 /* ../lib/standard/kernel.nit:434 */
5469 REGB2 = TAG_Bool((REGB1)==(REGB2));
5470 /* ../lib/standard/string.nit:978 */
5471 REGB3 = REGB2;
5472 }
5473 REGB3 = TAG_Bool(!UNTAG_Bool(REGB3));
5474 if (UNTAG_Bool(REGB3)) {
5475 REGB3 = TAG_Int(1);
5476 /* ../lib/standard/kernel.nit:245 */
5477 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
5478 /* ../lib/standard/string.nit:978 */
5479 REGB0 = REGB3;
5480 } else {
5481 goto label1;
5482 }
5483 }
5484 label1: while(0);
5485 /* ../lib/standard/string.nit:979 */
5486 goto label2;
5487 label2: while(0);
5488 stack_frame_head = fra.me.prev;
5489 return REGB0;
5490 }
5491 static const char LOCATE_standard___string___NativeString___atoi[] = "string::NativeString::atoi";
5492 val_t standard___string___NativeString___atoi(val_t p0){
5493 struct {struct stack_frame_t me;} fra;
5494 val_t REGB0;
5495 val_t tmp;
5496 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5497 fra.me.file = LOCATE_standard___string;
5498 fra.me.line = 981;
5499 fra.me.meth = LOCATE_standard___string___NativeString___atoi;
5500 fra.me.has_broke = 0;
5501 fra.me.REG_size = 1;
5502 fra.me.nitni_local_ref_head = NULL;
5503 fra.me.REG[0] = NIT_NULL;
5504 fra.me.REG[0] = p0;
5505 /* ../lib/standard/string.nit:981 */
5506 REGB0 = TAG_Int(atoi(UNBOX_NativeString(fra.me.REG[0])));
5507 stack_frame_head = fra.me.prev;
5508 return REGB0;
5509 }
5510 static const char LOCATE_standard___string___NativeString___atof[] = "string::NativeString::atof";
5511 val_t standard___string___NativeString___atof(val_t p0){
5512 struct {struct stack_frame_t me;} fra;
5513 val_t tmp;
5514 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5515 fra.me.file = LOCATE_standard___string;
5516 fra.me.line = 982;
5517 fra.me.meth = LOCATE_standard___string___NativeString___atof;
5518 fra.me.has_broke = 0;
5519 fra.me.REG_size = 1;
5520 fra.me.nitni_local_ref_head = NULL;
5521 fra.me.REG[0] = NIT_NULL;
5522 fra.me.REG[0] = p0;
5523 /* ../lib/standard/string.nit:982 */
5524 fra.me.REG[0] = NativeString_atof___out(fra.me.REG[0]);
5525 stack_frame_head = fra.me.prev;
5526 return fra.me.REG[0];
5527 }
5528 static const char LOCATE_standard___string___NativeString___to_s[] = "string::NativeString::(string::Object::to_s)";
5529 val_t standard___string___NativeString___to_s(val_t p0){
5530 struct {struct stack_frame_t me;} fra;
5531 val_t REGB0;
5532 val_t tmp;
5533 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5534 fra.me.file = LOCATE_standard___string;
5535 fra.me.line = 984;
5536 fra.me.meth = LOCATE_standard___string___NativeString___to_s;
5537 fra.me.has_broke = 0;
5538 fra.me.REG_size = 1;
5539 fra.me.nitni_local_ref_head = NULL;
5540 fra.me.REG[0] = NIT_NULL;
5541 fra.me.REG[0] = p0;
5542 /* ../lib/standard/string.nit:986 */
5543 REGB0 = CALL_standard___string___NativeString___cstring_length(fra.me.REG[0])(fra.me.REG[0]);
5544 fra.me.REG[0] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[0])(fra.me.REG[0], REGB0);
5545 goto label1;
5546 label1: while(0);
5547 stack_frame_head = fra.me.prev;
5548 return fra.me.REG[0];
5549 }
5550 static const char LOCATE_standard___string___NativeString___to_s_with_length[] = "string::NativeString::to_s_with_length";
5551 val_t standard___string___NativeString___to_s_with_length(val_t p0, val_t p1){
5552 struct {struct stack_frame_t me;} fra;
5553 val_t REGB0;
5554 val_t REGB1;
5555 val_t REGB2;
5556 val_t tmp;
5557 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5558 fra.me.file = LOCATE_standard___string;
5559 fra.me.line = 989;
5560 fra.me.meth = LOCATE_standard___string___NativeString___to_s_with_length;
5561 fra.me.has_broke = 0;
5562 fra.me.REG_size = 1;
5563 fra.me.nitni_local_ref_head = NULL;
5564 fra.me.REG[0] = NIT_NULL;
5565 fra.me.REG[0] = p0;
5566 REGB0 = p1;
5567 /* ../lib/standard/string.nit:991 */
5568 REGB1 = TAG_Int(0);
5569 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
5570 if (UNTAG_Bool(REGB2)) {
5571 } else {
5572 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
5573 }
5574 /* ../lib/standard/kernel.nit:243 */
5575 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
5576 /* ../lib/standard/string.nit:991 */
5577 if (UNTAG_Bool(REGB1)) {
5578 } else {
5579 nit_abort("Assert failed", NULL, LOCATE_standard___string, 991);
5580 }
5581 /* ../lib/standard/string.nit:992 */
5582 REGB1 = TAG_Int(0);
5583 REGB2 = TAG_Int(1);
5584 /* ../lib/standard/kernel.nit:247 */
5585 REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
5586 /* ../lib/standard/string.nit:992 */
5587 fra.me.REG[0] = NEW_String_standard___string___String___with_infos(fra.me.REG[0], REGB0, REGB1, REGB2);
5588 goto label1;
5589 label1: while(0);
5590 stack_frame_head = fra.me.prev;
5591 return fra.me.REG[0];
5592 }
5593 static const char LOCATE_standard___string___NativeString___to_s_with_copy[] = "string::NativeString::to_s_with_copy";
5594 val_t standard___string___NativeString___to_s_with_copy(val_t p0){
5595 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
5596 val_t REGB0;
5597 val_t REGB1;
5598 val_t REGB2;
5599 val_t tmp;
5600 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5601 fra.me.file = LOCATE_standard___string;
5602 fra.me.line = 995;
5603 fra.me.meth = LOCATE_standard___string___NativeString___to_s_with_copy;
5604 fra.me.has_broke = 0;
5605 fra.me.REG_size = 2;
5606 fra.me.nitni_local_ref_head = NULL;
5607 fra.me.REG[0] = NIT_NULL;
5608 fra.me.REG[1] = NIT_NULL;
5609 fra.me.REG[0] = p0;
5610 /* ../lib/standard/string.nit:997 */
5611 REGB0 = CALL_standard___string___NativeString___cstring_length(fra.me.REG[0])(fra.me.REG[0]);
5612 /* ../lib/standard/string.nit:998 */
5613 REGB1 = TAG_Int(1);
5614 /* ../lib/standard/kernel.nit:245 */
5615 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
5616 /* ../lib/standard/string.nit:1007 */
5617 fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
5618 /* ../lib/standard/string.nit:999 */
5619 REGB1 = TAG_Int(0);
5620 REGB2 = TAG_Int(0);
5621 /* ../lib/standard/string.nit:972 */
5622 (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[0])+UNTAG_Int(REGB1), UNTAG_Int(REGB0));;
5623 /* ../lib/standard/string.nit:1000 */
5624 REGB2 = TAG_Int(0);
5625 REGB1 = TAG_Int(1);
5626 /* ../lib/standard/kernel.nit:247 */
5627 REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1));
5628 /* ../lib/standard/string.nit:1000 */
5629 fra.me.REG[1] = NEW_String_standard___string___String___with_infos(fra.me.REG[1], REGB0, REGB2, REGB1);
5630 goto label1;
5631 label1: while(0);
5632 stack_frame_head = fra.me.prev;
5633 return fra.me.REG[1];
5634 }
5635 static const char LOCATE_standard___string___NativeString___init[] = "string::NativeString::init";
5636 void standard___string___NativeString___init(val_t p0, int* init_table){
5637 int itpos5 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string___NativeString].i;
5638 struct {struct stack_frame_t me;} fra;
5639 val_t tmp;
5640 if (init_table[itpos5]) return;
5641 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5642 fra.me.file = LOCATE_standard___string;
5643 fra.me.line = 0;
5644 fra.me.meth = LOCATE_standard___string___NativeString___init;
5645 fra.me.has_broke = 0;
5646 fra.me.REG_size = 0;
5647 fra.me.nitni_local_ref_head = NULL;
5648 stack_frame_head = fra.me.prev;
5649 init_table[itpos5] = 1;
5650 return;
5651 }
5652 static const char LOCATE_standard___string___StringCapable___calloc_string[] = "string::StringCapable::calloc_string";
5653 val_t standard___string___StringCapable___calloc_string(val_t p0, val_t p1){
5654 struct {struct stack_frame_t me;} fra;
5655 val_t REGB0;
5656 val_t tmp;
5657 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5658 fra.me.file = LOCATE_standard___string;
5659 fra.me.line = 1007;
5660 fra.me.meth = LOCATE_standard___string___StringCapable___calloc_string;
5661 fra.me.has_broke = 0;
5662 fra.me.REG_size = 1;
5663 fra.me.nitni_local_ref_head = NULL;
5664 fra.me.REG[0] = NIT_NULL;
5665 fra.me.REG[0] = p0;
5666 REGB0 = p1;
5667 /* ../lib/standard/string.nit:1007 */
5668 fra.me.REG[0] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB0) * sizeof(char))));
5669 stack_frame_head = fra.me.prev;
5670 return fra.me.REG[0];
5671 }
5672 static const char LOCATE_standard___string___Sys___args[] = "string::Sys::(string::Object::args)";
5673 val_t standard___string___Sys___args(val_t p0){
5674 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
5675 val_t REGB0;
5676 val_t REGB1;
5677 val_t tmp;
5678 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5679 fra.me.file = LOCATE_standard___string;
5680 fra.me.line = 1013;
5681 fra.me.meth = LOCATE_standard___string___Sys___args;
5682 fra.me.has_broke = 0;
5683 fra.me.REG_size = 3;
5684 fra.me.nitni_local_ref_head = NULL;
5685 fra.me.REG[0] = NIT_NULL;
5686 fra.me.REG[1] = NIT_NULL;
5687 fra.me.REG[2] = NIT_NULL;
5688 fra.me.REG[0] = p0;
5689 /* ../lib/standard/string.nit:1013 */
5690 fra.me.REG[1] = fra.me.REG[0];
5691 /* ../lib/standard/string.nit:1015 */
5692 fra.me.REG[2] = ATTR_standard___string___Sys____args_cache(fra.me.REG[1]);
5693 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
5694 if (UNTAG_Bool(REGB0)) {
5695 } else {
5696 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
5697 if (UNTAG_Bool(REGB1)) {
5698 REGB1 = TAG_Bool(0);
5699 REGB0 = REGB1;
5700 } else {
5701 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
5702 REGB0 = REGB1;
5703 }
5704 }
5705 if (UNTAG_Bool(REGB0)) {
5706 CALL_standard___string___Sys___init_args(fra.me.REG[1])(fra.me.REG[1]);
5707 }
5708 /* ../lib/standard/string.nit:1016 */
5709 fra.me.REG[1] = ATTR_standard___string___Sys____args_cache(fra.me.REG[1]);
5710 REGB0 = TAG_Bool(fra.me.REG[1]!=NIT_NULL);
5711 if (UNTAG_Bool(REGB0)) {
5712 } else {
5713 nit_abort("Cast failed", NULL, LOCATE_standard___string, 1016);
5714 }
5715 goto label1;
5716 label1: while(0);
5717 stack_frame_head = fra.me.prev;
5718 return fra.me.REG[1];
5719 }
5720 static const char LOCATE_standard___string___Sys___program_name[] = "string::Sys::program_name";
5721 val_t standard___string___Sys___program_name(val_t p0){
5722 struct {struct stack_frame_t me;} fra;
5723 val_t REGB0;
5724 val_t tmp;
5725 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5726 fra.me.file = LOCATE_standard___string;
5727 fra.me.line = 1019;
5728 fra.me.meth = LOCATE_standard___string___Sys___program_name;
5729 fra.me.has_broke = 0;
5730 fra.me.REG_size = 1;
5731 fra.me.nitni_local_ref_head = NULL;
5732 fra.me.REG[0] = NIT_NULL;
5733 fra.me.REG[0] = p0;
5734 /* ../lib/standard/string.nit:1022 */
5735 REGB0 = TAG_Int(0);
5736 /* ../lib/standard/string.nit:1041 */
5737 fra.me.REG[0] = BOX_NativeString(glob_argv[UNTAG_Int(REGB0)]);
5738 /* ../lib/standard/string.nit:1022 */
5739 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
5740 goto label1;
5741 label1: while(0);
5742 stack_frame_head = fra.me.prev;
5743 return fra.me.REG[0];
5744 }
5745 static const char LOCATE_standard___string___Sys___init_args[] = "string::Sys::init_args";
5746 void standard___string___Sys___init_args(val_t p0){
5747 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
5748 val_t REGB0;
5749 val_t REGB1;
5750 val_t REGB2;
5751 val_t tmp;
5752 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5753 fra.me.file = LOCATE_standard___string;
5754 fra.me.line = 1025;
5755 fra.me.meth = LOCATE_standard___string___Sys___init_args;
5756 fra.me.has_broke = 0;
5757 fra.me.REG_size = 3;
5758 fra.me.nitni_local_ref_head = NULL;
5759 fra.me.REG[0] = NIT_NULL;
5760 fra.me.REG[1] = NIT_NULL;
5761 fra.me.REG[2] = NIT_NULL;
5762 fra.me.REG[0] = p0;
5763 /* ../lib/standard/string.nit:1038 */
5764 REGB0 = TAG_Int(glob_argc);
5765 /* ../lib/standard/string.nit:1029 */
5766 REGB1 = TAG_Int(0);
5767 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB1);
5768 /* ../lib/standard/string.nit:1030 */
5769 REGB1 = TAG_Int(1);
5770 /* ../lib/standard/string.nit:1031 */
5771 while(1) {
5772 REGB2 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
5773 if (UNTAG_Bool(REGB2)) {
5774 } else {
5775 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
5776 }
5777 /* ../lib/standard/kernel.nit:242 */
5778 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB0));
5779 /* ../lib/standard/string.nit:1031 */
5780 if (UNTAG_Bool(REGB2)) {
5781 /* ../lib/standard/string.nit:1032 */
5782 REGB2 = TAG_Int(1);
5783 /* ../lib/standard/kernel.nit:247 */
5784 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
5785 /* ../lib/standard/string.nit:1041 */
5786 fra.me.REG[2] = BOX_NativeString(glob_argv[UNTAG_Int(REGB1)]);
5787 /* ../lib/standard/string.nit:1032 */
5788 fra.me.REG[2] = CALL_standard___string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
5789 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB2, fra.me.REG[2]);
5790 /* ../lib/standard/string.nit:1033 */
5791 REGB2 = TAG_Int(1);
5792 /* ../lib/standard/kernel.nit:245 */
5793 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
5794 /* ../lib/standard/string.nit:1033 */
5795 REGB1 = REGB2;
5796 } else {
5797 /* ../lib/standard/string.nit:1031 */
5798 goto label1;
5799 }
5800 }
5801 label1: while(0);
5802 /* ../lib/standard/string.nit:1035 */
5803 ATTR_standard___string___Sys____args_cache(fra.me.REG[0]) = fra.me.REG[1];
5804 stack_frame_head = fra.me.prev;
5805 return;
5806 }
5807 static const char LOCATE_standard___string___Sys___native_argc[] = "string::Sys::native_argc";
5808 val_t standard___string___Sys___native_argc(val_t p0){
5809 struct {struct stack_frame_t me;} fra;
5810 val_t REGB0;
5811 val_t tmp;
5812 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5813 fra.me.file = LOCATE_standard___string;
5814 fra.me.line = 1038;
5815 fra.me.meth = LOCATE_standard___string___Sys___native_argc;
5816 fra.me.has_broke = 0;
5817 fra.me.REG_size = 1;
5818 fra.me.nitni_local_ref_head = NULL;
5819 fra.me.REG[0] = NIT_NULL;
5820 fra.me.REG[0] = p0;
5821 /* ../lib/standard/string.nit:1038 */
5822 REGB0 = TAG_Int(glob_argc);
5823 stack_frame_head = fra.me.prev;
5824 return REGB0;
5825 }
5826 static const char LOCATE_standard___string___Sys___native_argv[] = "string::Sys::native_argv";
5827 val_t standard___string___Sys___native_argv(val_t p0, val_t p1){
5828 struct {struct stack_frame_t me;} fra;
5829 val_t REGB0;
5830 val_t tmp;
5831 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
5832 fra.me.file = LOCATE_standard___string;
5833 fra.me.line = 1041;
5834 fra.me.meth = LOCATE_standard___string___Sys___native_argv;
5835 fra.me.has_broke = 0;
5836 fra.me.REG_size = 1;
5837 fra.me.nitni_local_ref_head = NULL;
5838 fra.me.REG[0] = NIT_NULL;
5839 fra.me.REG[0] = p0;
5840 REGB0 = p1;
5841 /* ../lib/standard/string.nit:1041 */
5842 fra.me.REG[0] = BOX_NativeString(glob_argv[UNTAG_Int(REGB0)]);
5843 stack_frame_head = fra.me.prev;
5844 return fra.me.REG[0];
5845 }