update NOTICE and LICENSE
[nit.git] / c_src / list._sep.c
1 /* This C file is generated by NIT to compile module list. */
2 #include "list._sep.h"
3 val_t list___List_____bra(val_t p0, val_t p1){
4 struct {struct stack_frame_t me;} fra;
5 val_t REGB0;
6 val_t tmp;
7 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
8 fra.me.file = LOCATE_list;
9 fra.me.line = 21;
10 fra.me.meth = LOCATE_list___List_____bra;
11 fra.me.has_broke = 0;
12 fra.me.REG_size = 1;
13 fra.me.REG[0] = NIT_NULL;
14 fra.me.REG[0] = p0;
15 REGB0 = p1;
16 /* ./../lib/standard//collection//list.nit:22 */
17 fra.me.REG[0] = CALL_list___List___get_node(fra.me.REG[0])(fra.me.REG[0], REGB0);
18 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
19 if (UNTAG_Bool(REGB0)) {
20 nit_abort("Reciever is null", NULL, LOCATE_list, 22);
21 }
22 fra.me.REG[0] = CALL_abstract_collection___Container___item(fra.me.REG[0])(fra.me.REG[0]);
23 goto label1;
24 label1: while(0);
25 stack_frame_head = fra.me.prev;
26 return fra.me.REG[0];
27 }
28 void list___List_____braeq(val_t p0, val_t p1, val_t p2){
29 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
30 val_t REGB0;
31 val_t tmp;
32 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
33 fra.me.file = LOCATE_list;
34 fra.me.line = 24;
35 fra.me.meth = LOCATE_list___List_____braeq;
36 fra.me.has_broke = 0;
37 fra.me.REG_size = 2;
38 fra.me.REG[0] = NIT_NULL;
39 fra.me.REG[1] = NIT_NULL;
40 fra.me.REG[0] = p0;
41 REGB0 = p1;
42 fra.me.REG[1] = p2;
43 /* ./../lib/standard//collection//list.nit:24 */
44 fra.me.REG[0] = CALL_list___List___get_node(fra.me.REG[0])(fra.me.REG[0], REGB0);
45 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
46 if (UNTAG_Bool(REGB0)) {
47 nit_abort("Reciever is null", NULL, LOCATE_list, 24);
48 }
49 CALL_abstract_collection___Container___item__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
50 stack_frame_head = fra.me.prev;
51 return;
52 }
53 val_t list___List___first(val_t p0){
54 struct {struct stack_frame_t me;} fra;
55 val_t REGB0;
56 val_t tmp;
57 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
58 fra.me.file = LOCATE_list;
59 fra.me.line = 26;
60 fra.me.meth = LOCATE_list___List___first;
61 fra.me.has_broke = 0;
62 fra.me.REG_size = 1;
63 fra.me.REG[0] = NIT_NULL;
64 fra.me.REG[0] = p0;
65 /* ./../lib/standard//collection//list.nit:27 */
66 fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]);
67 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
68 if (UNTAG_Bool(REGB0)) {
69 nit_abort("Reciever is null", NULL, LOCATE_list, 27);
70 }
71 fra.me.REG[0] = CALL_abstract_collection___Container___item(fra.me.REG[0])(fra.me.REG[0]);
72 goto label1;
73 label1: while(0);
74 stack_frame_head = fra.me.prev;
75 return fra.me.REG[0];
76 }
77 void list___List___first__eq(val_t p0, val_t p1){
78 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
79 val_t REGB0;
80 val_t tmp;
81 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
82 fra.me.file = LOCATE_list;
83 fra.me.line = 29;
84 fra.me.meth = LOCATE_list___List___first__eq;
85 fra.me.has_broke = 0;
86 fra.me.REG_size = 2;
87 fra.me.REG[0] = NIT_NULL;
88 fra.me.REG[1] = NIT_NULL;
89 fra.me.REG[0] = p0;
90 fra.me.REG[1] = p1;
91 /* ./../lib/standard//collection//list.nit:30 */
92 fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]);
93 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
94 if (UNTAG_Bool(REGB0)) {
95 nit_abort("Reciever is null", NULL, LOCATE_list, 30);
96 }
97 CALL_abstract_collection___Container___item__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
98 stack_frame_head = fra.me.prev;
99 return;
100 }
101 val_t list___List___last(val_t p0){
102 struct {struct stack_frame_t me;} fra;
103 val_t REGB0;
104 val_t tmp;
105 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
106 fra.me.file = LOCATE_list;
107 fra.me.line = 32;
108 fra.me.meth = LOCATE_list___List___last;
109 fra.me.has_broke = 0;
110 fra.me.REG_size = 1;
111 fra.me.REG[0] = NIT_NULL;
112 fra.me.REG[0] = p0;
113 /* ./../lib/standard//collection//list.nit:33 */
114 fra.me.REG[0] = ATTR_list___List____tail(fra.me.REG[0]);
115 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
116 if (UNTAG_Bool(REGB0)) {
117 nit_abort("Reciever is null", NULL, LOCATE_list, 33);
118 }
119 fra.me.REG[0] = CALL_abstract_collection___Container___item(fra.me.REG[0])(fra.me.REG[0]);
120 goto label1;
121 label1: while(0);
122 stack_frame_head = fra.me.prev;
123 return fra.me.REG[0];
124 }
125 void list___List___last__eq(val_t p0, val_t p1){
126 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
127 val_t REGB0;
128 val_t tmp;
129 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
130 fra.me.file = LOCATE_list;
131 fra.me.line = 35;
132 fra.me.meth = LOCATE_list___List___last__eq;
133 fra.me.has_broke = 0;
134 fra.me.REG_size = 2;
135 fra.me.REG[0] = NIT_NULL;
136 fra.me.REG[1] = NIT_NULL;
137 fra.me.REG[0] = p0;
138 fra.me.REG[1] = p1;
139 /* ./../lib/standard//collection//list.nit:36 */
140 fra.me.REG[0] = ATTR_list___List____tail(fra.me.REG[0]);
141 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
142 if (UNTAG_Bool(REGB0)) {
143 nit_abort("Reciever is null", NULL, LOCATE_list, 36);
144 }
145 CALL_abstract_collection___Container___item__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
146 stack_frame_head = fra.me.prev;
147 return;
148 }
149 val_t list___List___is_empty(val_t p0){
150 struct {struct stack_frame_t me;} fra;
151 val_t REGB0;
152 val_t REGB1;
153 val_t tmp;
154 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
155 fra.me.file = LOCATE_list;
156 fra.me.line = 40;
157 fra.me.meth = LOCATE_list___List___is_empty;
158 fra.me.has_broke = 0;
159 fra.me.REG_size = 1;
160 fra.me.REG[0] = NIT_NULL;
161 fra.me.REG[0] = p0;
162 /* ./../lib/standard//collection//list.nit:41 */
163 fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]);
164 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
165 if (UNTAG_Bool(REGB0)) {
166 } else {
167 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
168 if (UNTAG_Bool(REGB1)) {
169 REGB1 = TAG_Bool(false);
170 REGB0 = REGB1;
171 } else {
172 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
173 REGB0 = REGB1;
174 }
175 }
176 goto label1;
177 label1: while(0);
178 stack_frame_head = fra.me.prev;
179 return REGB0;
180 }
181 val_t list___List___length(val_t p0){
182 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
183 val_t REGB0;
184 val_t REGB1;
185 val_t REGB2;
186 val_t tmp;
187 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
188 fra.me.file = LOCATE_list;
189 fra.me.line = 43;
190 fra.me.meth = LOCATE_list___List___length;
191 fra.me.has_broke = 0;
192 fra.me.REG_size = 2;
193 fra.me.REG[0] = NIT_NULL;
194 fra.me.REG[1] = NIT_NULL;
195 fra.me.REG[0] = p0;
196 /* ./../lib/standard//collection//list.nit:46 */
197 REGB0 = TAG_Int(0);
198 /* ./../lib/standard//collection//list.nit:47 */
199 fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]);
200 /* ./../lib/standard//collection//list.nit:48 */
201 while(1) {
202 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
203 if (UNTAG_Bool(REGB1)) {
204 } else {
205 REGB2 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
206 if (UNTAG_Bool(REGB2)) {
207 REGB2 = TAG_Bool(false);
208 REGB1 = REGB2;
209 } else {
210 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
211 REGB1 = REGB2;
212 }
213 }
214 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
215 if (UNTAG_Bool(REGB1)) {
216 /* ./../lib/standard//collection//list.nit:49 */
217 REGB1 = TAG_Int(1);
218 /* ./../lib/standard//kernel.nit:215 */
219 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
220 /* ./../lib/standard//collection//list.nit:49 */
221 REGB0 = REGB1;
222 /* ./../lib/standard//collection//list.nit:50 */
223 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
224 if (UNTAG_Bool(REGB1)) {
225 nit_abort("Reciever is null", NULL, LOCATE_list, 50);
226 }
227 fra.me.REG[1] = CALL_list___ListNode___next(fra.me.REG[0])(fra.me.REG[0]);
228 fra.me.REG[0] = fra.me.REG[1];
229 } else {
230 /* ./../lib/standard//collection//list.nit:48 */
231 goto label1;
232 }
233 }
234 label1: while(0);
235 /* ./../lib/standard//collection//list.nit:52 */
236 goto label2;
237 label2: while(0);
238 stack_frame_head = fra.me.prev;
239 return REGB0;
240 }
241 val_t list___List___has(val_t p0, val_t p1){
242 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
243 val_t REGB0;
244 val_t REGB1;
245 val_t tmp;
246 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
247 fra.me.file = LOCATE_list;
248 fra.me.line = 55;
249 fra.me.meth = LOCATE_list___List___has;
250 fra.me.has_broke = 0;
251 fra.me.REG_size = 3;
252 fra.me.REG[0] = NIT_NULL;
253 fra.me.REG[1] = NIT_NULL;
254 fra.me.REG[2] = NIT_NULL;
255 fra.me.REG[0] = p0;
256 fra.me.REG[1] = p1;
257 /* ./../lib/standard//collection//list.nit:56 */
258 fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]);
259 fra.me.REG[2] = CALL_list___List___search_node_after(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[2]);
260 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
261 if (UNTAG_Bool(REGB0)) {
262 } else {
263 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
264 if (UNTAG_Bool(REGB1)) {
265 REGB1 = TAG_Bool(false);
266 REGB0 = REGB1;
267 } else {
268 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
269 REGB0 = REGB1;
270 }
271 }
272 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
273 goto label1;
274 label1: while(0);
275 stack_frame_head = fra.me.prev;
276 return REGB0;
277 }
278 val_t list___List___has_only(val_t p0, val_t p1){
279 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
280 val_t REGB0;
281 val_t REGB1;
282 val_t tmp;
283 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
284 fra.me.file = LOCATE_list;
285 fra.me.line = 58;
286 fra.me.meth = LOCATE_list___List___has_only;
287 fra.me.has_broke = 0;
288 fra.me.REG_size = 3;
289 fra.me.REG[0] = NIT_NULL;
290 fra.me.REG[1] = NIT_NULL;
291 fra.me.REG[2] = NIT_NULL;
292 fra.me.REG[0] = p0;
293 fra.me.REG[1] = p1;
294 /* ./../lib/standard//collection//list.nit:60 */
295 fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]);
296 /* ./../lib/standard//collection//list.nit:61 */
297 while(1) {
298 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
299 if (UNTAG_Bool(REGB0)) {
300 } else {
301 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
302 if (UNTAG_Bool(REGB1)) {
303 REGB1 = TAG_Bool(false);
304 REGB0 = REGB1;
305 } else {
306 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
307 REGB0 = REGB1;
308 }
309 }
310 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
311 if (UNTAG_Bool(REGB0)) {
312 /* ./../lib/standard//collection//list.nit:62 */
313 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
314 if (UNTAG_Bool(REGB0)) {
315 nit_abort("Reciever is null", NULL, LOCATE_list, 62);
316 }
317 fra.me.REG[2] = CALL_abstract_collection___Container___item(fra.me.REG[0])(fra.me.REG[0]);
318 REGB0 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1]));
319 if (UNTAG_Bool(REGB0)) {
320 } else {
321 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
322 if (UNTAG_Bool(REGB1)) {
323 REGB1 = TAG_Bool(false);
324 REGB0 = REGB1;
325 } else {
326 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
327 REGB0 = REGB1;
328 }
329 }
330 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
331 if (UNTAG_Bool(REGB0)) {
332 REGB0 = TAG_Bool(false);
333 goto label1;
334 }
335 /* ./../lib/standard//collection//list.nit:63 */
336 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
337 if (UNTAG_Bool(REGB1)) {
338 nit_abort("Reciever is null", NULL, LOCATE_list, 63);
339 }
340 fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[0])(fra.me.REG[0]);
341 fra.me.REG[0] = fra.me.REG[2];
342 } else {
343 /* ./../lib/standard//collection//list.nit:61 */
344 goto label2;
345 }
346 }
347 label2: while(0);
348 /* ./../lib/standard//collection//list.nit:65 */
349 REGB1 = TAG_Bool(true);
350 REGB0 = REGB1;
351 goto label1;
352 label1: while(0);
353 stack_frame_head = fra.me.prev;
354 return REGB0;
355 }
356 val_t list___List___count(val_t p0, val_t p1){
357 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
358 val_t REGB0;
359 val_t REGB1;
360 val_t REGB2;
361 val_t tmp;
362 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
363 fra.me.file = LOCATE_list;
364 fra.me.line = 68;
365 fra.me.meth = LOCATE_list___List___count;
366 fra.me.has_broke = 0;
367 fra.me.REG_size = 3;
368 fra.me.REG[0] = NIT_NULL;
369 fra.me.REG[1] = NIT_NULL;
370 fra.me.REG[2] = NIT_NULL;
371 fra.me.REG[0] = p0;
372 fra.me.REG[1] = p1;
373 /* ./../lib/standard//collection//list.nit:70 */
374 REGB0 = TAG_Int(0);
375 /* ./../lib/standard//collection//list.nit:71 */
376 fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]);
377 /* ./../lib/standard//collection//list.nit:72 */
378 while(1) {
379 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
380 if (UNTAG_Bool(REGB1)) {
381 } else {
382 REGB2 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
383 if (UNTAG_Bool(REGB2)) {
384 REGB2 = TAG_Bool(false);
385 REGB1 = REGB2;
386 } else {
387 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
388 REGB1 = REGB2;
389 }
390 }
391 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
392 if (UNTAG_Bool(REGB1)) {
393 /* ./../lib/standard//collection//list.nit:73 */
394 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
395 if (UNTAG_Bool(REGB1)) {
396 nit_abort("Reciever is null", NULL, LOCATE_list, 73);
397 }
398 fra.me.REG[2] = CALL_abstract_collection___Container___item(fra.me.REG[0])(fra.me.REG[0]);
399 REGB1 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1]));
400 if (UNTAG_Bool(REGB1)) {
401 } else {
402 REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
403 if (UNTAG_Bool(REGB2)) {
404 REGB2 = TAG_Bool(false);
405 REGB1 = REGB2;
406 } else {
407 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
408 REGB1 = REGB2;
409 }
410 }
411 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
412 if (UNTAG_Bool(REGB1)) {
413 REGB1 = TAG_Int(1);
414 /* ./../lib/standard//kernel.nit:215 */
415 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
416 /* ./../lib/standard//collection//list.nit:73 */
417 REGB0 = REGB1;
418 }
419 /* ./../lib/standard//collection//list.nit:74 */
420 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
421 if (UNTAG_Bool(REGB1)) {
422 nit_abort("Reciever is null", NULL, LOCATE_list, 74);
423 }
424 fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[0])(fra.me.REG[0]);
425 fra.me.REG[0] = fra.me.REG[2];
426 } else {
427 /* ./../lib/standard//collection//list.nit:72 */
428 goto label1;
429 }
430 }
431 label1: while(0);
432 /* ./../lib/standard//collection//list.nit:76 */
433 goto label2;
434 label2: while(0);
435 stack_frame_head = fra.me.prev;
436 return REGB0;
437 }
438 val_t list___List___has_key(val_t p0, val_t p1){
439 struct {struct stack_frame_t me;} fra;
440 val_t REGB0;
441 val_t REGB1;
442 val_t tmp;
443 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
444 fra.me.file = LOCATE_list;
445 fra.me.line = 79;
446 fra.me.meth = LOCATE_list___List___has_key;
447 fra.me.has_broke = 0;
448 fra.me.REG_size = 1;
449 fra.me.REG[0] = NIT_NULL;
450 fra.me.REG[0] = p0;
451 REGB0 = p1;
452 /* ./../lib/standard//collection//list.nit:79 */
453 fra.me.REG[0] = CALL_list___List___get_node(fra.me.REG[0])(fra.me.REG[0], REGB0);
454 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
455 if (UNTAG_Bool(REGB0)) {
456 } else {
457 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
458 if (UNTAG_Bool(REGB1)) {
459 REGB1 = TAG_Bool(false);
460 REGB0 = REGB1;
461 } else {
462 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
463 REGB0 = REGB1;
464 }
465 }
466 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
467 goto label1;
468 label1: while(0);
469 stack_frame_head = fra.me.prev;
470 return REGB0;
471 }
472 void list___List___push(val_t p0, val_t p1){
473 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
474 val_t REGB0;
475 val_t REGB1;
476 val_t tmp;
477 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
478 fra.me.file = LOCATE_list;
479 fra.me.line = 83;
480 fra.me.meth = LOCATE_list___List___push;
481 fra.me.has_broke = 0;
482 fra.me.REG_size = 3;
483 fra.me.REG[0] = NIT_NULL;
484 fra.me.REG[1] = NIT_NULL;
485 fra.me.REG[2] = NIT_NULL;
486 fra.me.REG[0] = p0;
487 fra.me.REG[1] = p1;
488 /* ./../lib/standard//collection//list.nit:86 */
489 fra.me.REG[1] = NEW_ListNode_list___ListNode___init(fra.me.REG[1]);
490 /* ./../lib/standard//collection//list.nit:87 */
491 fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]);
492 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
493 if (UNTAG_Bool(REGB0)) {
494 } else {
495 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
496 if (UNTAG_Bool(REGB1)) {
497 REGB1 = TAG_Bool(false);
498 REGB0 = REGB1;
499 } else {
500 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
501 REGB0 = REGB1;
502 }
503 }
504 if (UNTAG_Bool(REGB0)) {
505 /* ./../lib/standard//collection//list.nit:88 */
506 ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[1];
507 } else {
508 /* ./../lib/standard//collection//list.nit:90 */
509 fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]);
510 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
511 if (UNTAG_Bool(REGB0)) {
512 nit_abort("Reciever is null", NULL, LOCATE_list, 90);
513 }
514 CALL_list___ListNode___next__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
515 /* ./../lib/standard//collection//list.nit:91 */
516 fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]);
517 CALL_list___ListNode___prev__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
518 }
519 /* ./../lib/standard//collection//list.nit:93 */
520 ATTR_list___List____tail(fra.me.REG[0]) = fra.me.REG[1];
521 stack_frame_head = fra.me.prev;
522 return;
523 }
524 void list___List___unshift(val_t p0, val_t p1){
525 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
526 val_t REGB0;
527 val_t REGB1;
528 val_t tmp;
529 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
530 fra.me.file = LOCATE_list;
531 fra.me.line = 96;
532 fra.me.meth = LOCATE_list___List___unshift;
533 fra.me.has_broke = 0;
534 fra.me.REG_size = 3;
535 fra.me.REG[0] = NIT_NULL;
536 fra.me.REG[1] = NIT_NULL;
537 fra.me.REG[2] = NIT_NULL;
538 fra.me.REG[0] = p0;
539 fra.me.REG[1] = p1;
540 /* ./../lib/standard//collection//list.nit:99 */
541 fra.me.REG[1] = NEW_ListNode_list___ListNode___init(fra.me.REG[1]);
542 /* ./../lib/standard//collection//list.nit:100 */
543 fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]);
544 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
545 if (UNTAG_Bool(REGB0)) {
546 } else {
547 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
548 if (UNTAG_Bool(REGB1)) {
549 REGB1 = TAG_Bool(false);
550 REGB0 = REGB1;
551 } else {
552 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
553 REGB0 = REGB1;
554 }
555 }
556 if (UNTAG_Bool(REGB0)) {
557 /* ./../lib/standard//collection//list.nit:101 */
558 ATTR_list___List____tail(fra.me.REG[0]) = fra.me.REG[1];
559 } else {
560 /* ./../lib/standard//collection//list.nit:103 */
561 fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]);
562 CALL_list___ListNode___next__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
563 /* ./../lib/standard//collection//list.nit:104 */
564 fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]);
565 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
566 if (UNTAG_Bool(REGB0)) {
567 nit_abort("Reciever is null", NULL, LOCATE_list, 104);
568 }
569 CALL_list___ListNode___prev__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
570 }
571 /* ./../lib/standard//collection//list.nit:106 */
572 ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[1];
573 stack_frame_head = fra.me.prev;
574 return;
575 }
576 void list___List___link(val_t p0, val_t p1){
577 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
578 val_t REGB0;
579 val_t REGB1;
580 val_t tmp;
581 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
582 fra.me.file = LOCATE_list;
583 fra.me.line = 109;
584 fra.me.meth = LOCATE_list___List___link;
585 fra.me.has_broke = 0;
586 fra.me.REG_size = 4;
587 fra.me.REG[0] = NIT_NULL;
588 fra.me.REG[1] = NIT_NULL;
589 fra.me.REG[2] = NIT_NULL;
590 fra.me.REG[3] = NIT_NULL;
591 fra.me.REG[0] = p0;
592 fra.me.REG[1] = p1;
593 /* ./../lib/standard//collection//list.nit:114 */
594 fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]);
595 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
596 if (UNTAG_Bool(REGB0)) {
597 } else {
598 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
599 if (UNTAG_Bool(REGB1)) {
600 REGB1 = TAG_Bool(false);
601 REGB0 = REGB1;
602 } else {
603 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
604 REGB0 = REGB1;
605 }
606 }
607 if (UNTAG_Bool(REGB0)) {
608 /* ./../lib/standard//collection//list.nit:115 */
609 fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[1]);
610 ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[2];
611 } else {
612 /* ./../lib/standard//collection//list.nit:116 */
613 fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[1]);
614 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
615 if (UNTAG_Bool(REGB0)) {
616 } else {
617 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
618 if (UNTAG_Bool(REGB1)) {
619 REGB1 = TAG_Bool(false);
620 REGB0 = REGB1;
621 } else {
622 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
623 REGB0 = REGB1;
624 }
625 }
626 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
627 if (UNTAG_Bool(REGB0)) {
628 /* ./../lib/standard//collection//list.nit:117 */
629 fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]);
630 fra.me.REG[3] = ATTR_list___List____head(fra.me.REG[1]);
631 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
632 if (UNTAG_Bool(REGB0)) {
633 nit_abort("Reciever is null", NULL, LOCATE_list, 117);
634 }
635 CALL_list___ListNode___next__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
636 /* ./../lib/standard//collection//list.nit:118 */
637 fra.me.REG[3] = ATTR_list___List____tail(fra.me.REG[0]);
638 REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
639 if (UNTAG_Bool(REGB0)) {
640 nit_abort("Reciever is null", NULL, LOCATE_list, 118);
641 }
642 fra.me.REG[3] = CALL_list___ListNode___next(fra.me.REG[3])(fra.me.REG[3]);
643 fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]);
644 REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
645 if (UNTAG_Bool(REGB0)) {
646 nit_abort("Reciever is null", NULL, LOCATE_list, 118);
647 }
648 CALL_list___ListNode___prev__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
649 }
650 }
651 /* ./../lib/standard//collection//list.nit:120 */
652 fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[1]);
653 ATTR_list___List____tail(fra.me.REG[0]) = fra.me.REG[2];
654 /* ./../lib/standard//collection//list.nit:121 */
655 CALL_abstract_collection___RemovableCollection___clear(fra.me.REG[1])(fra.me.REG[1]);
656 stack_frame_head = fra.me.prev;
657 return;
658 }
659 val_t list___List___pop(val_t p0){
660 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
661 val_t REGB0;
662 val_t REGB1;
663 val_t tmp;
664 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
665 fra.me.file = LOCATE_list;
666 fra.me.line = 126;
667 fra.me.meth = LOCATE_list___List___pop;
668 fra.me.has_broke = 0;
669 fra.me.REG_size = 3;
670 fra.me.REG[0] = NIT_NULL;
671 fra.me.REG[1] = NIT_NULL;
672 fra.me.REG[2] = NIT_NULL;
673 fra.me.REG[0] = p0;
674 /* ./../lib/standard//collection//list.nit:129 */
675 fra.me.REG[1] = ATTR_list___List____tail(fra.me.REG[0]);
676 /* ./../lib/standard//collection//list.nit:130 */
677 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
678 if (UNTAG_Bool(REGB0)) {
679 nit_abort("Reciever is null", NULL, LOCATE_list, 130);
680 }
681 fra.me.REG[2] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]);
682 ATTR_list___List____tail(fra.me.REG[0]) = fra.me.REG[2];
683 /* ./../lib/standard//collection//list.nit:131 */
684 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
685 if (UNTAG_Bool(REGB0)) {
686 nit_abort("Reciever is null", NULL, LOCATE_list, 131);
687 }
688 CALL_list___ListNode___prev__eq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
689 /* ./../lib/standard//collection//list.nit:132 */
690 fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]);
691 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
692 if (UNTAG_Bool(REGB0)) {
693 } else {
694 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
695 if (UNTAG_Bool(REGB1)) {
696 REGB1 = TAG_Bool(false);
697 REGB0 = REGB1;
698 } else {
699 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
700 REGB0 = REGB1;
701 }
702 }
703 if (UNTAG_Bool(REGB0)) {
704 /* ./../lib/standard//collection//list.nit:133 */
705 ATTR_list___List____head(fra.me.REG[0]) = NIT_NULL;
706 } else {
707 /* ./../lib/standard//collection//list.nit:135 */
708 fra.me.REG[0] = ATTR_list___List____tail(fra.me.REG[0]);
709 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
710 if (UNTAG_Bool(REGB0)) {
711 nit_abort("Reciever is null", NULL, LOCATE_list, 135);
712 }
713 CALL_list___ListNode___next__eq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
714 }
715 /* ./../lib/standard//collection//list.nit:137 */
716 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
717 if (UNTAG_Bool(REGB0)) {
718 nit_abort("Reciever is null", NULL, LOCATE_list, 137);
719 }
720 fra.me.REG[1] = CALL_abstract_collection___Container___item(fra.me.REG[1])(fra.me.REG[1]);
721 goto label1;
722 label1: while(0);
723 stack_frame_head = fra.me.prev;
724 return fra.me.REG[1];
725 }
726 val_t list___List___shift(val_t p0){
727 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
728 val_t REGB0;
729 val_t REGB1;
730 val_t tmp;
731 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
732 fra.me.file = LOCATE_list;
733 fra.me.line = 140;
734 fra.me.meth = LOCATE_list___List___shift;
735 fra.me.has_broke = 0;
736 fra.me.REG_size = 3;
737 fra.me.REG[0] = NIT_NULL;
738 fra.me.REG[1] = NIT_NULL;
739 fra.me.REG[2] = NIT_NULL;
740 fra.me.REG[0] = p0;
741 /* ./../lib/standard//collection//list.nit:143 */
742 fra.me.REG[1] = ATTR_list___List____head(fra.me.REG[0]);
743 /* ./../lib/standard//collection//list.nit:144 */
744 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
745 if (UNTAG_Bool(REGB0)) {
746 nit_abort("Reciever is null", NULL, LOCATE_list, 144);
747 }
748 fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]);
749 ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[2];
750 /* ./../lib/standard//collection//list.nit:145 */
751 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
752 if (UNTAG_Bool(REGB0)) {
753 nit_abort("Reciever is null", NULL, LOCATE_list, 145);
754 }
755 CALL_list___ListNode___next__eq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
756 /* ./../lib/standard//collection//list.nit:146 */
757 fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]);
758 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
759 if (UNTAG_Bool(REGB0)) {
760 } else {
761 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
762 if (UNTAG_Bool(REGB1)) {
763 REGB1 = TAG_Bool(false);
764 REGB0 = REGB1;
765 } else {
766 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
767 REGB0 = REGB1;
768 }
769 }
770 if (UNTAG_Bool(REGB0)) {
771 /* ./../lib/standard//collection//list.nit:147 */
772 ATTR_list___List____tail(fra.me.REG[0]) = NIT_NULL;
773 } else {
774 /* ./../lib/standard//collection//list.nit:149 */
775 fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]);
776 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
777 if (UNTAG_Bool(REGB0)) {
778 nit_abort("Reciever is null", NULL, LOCATE_list, 149);
779 }
780 CALL_list___ListNode___prev__eq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
781 }
782 /* ./../lib/standard//collection//list.nit:151 */
783 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
784 if (UNTAG_Bool(REGB0)) {
785 nit_abort("Reciever is null", NULL, LOCATE_list, 151);
786 }
787 fra.me.REG[1] = CALL_abstract_collection___Container___item(fra.me.REG[1])(fra.me.REG[1]);
788 goto label1;
789 label1: while(0);
790 stack_frame_head = fra.me.prev;
791 return fra.me.REG[1];
792 }
793 void list___List___remove(val_t p0, val_t p1){
794 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
795 val_t REGB0;
796 val_t REGB1;
797 val_t tmp;
798 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
799 fra.me.file = LOCATE_list;
800 fra.me.line = 154;
801 fra.me.meth = LOCATE_list___List___remove;
802 fra.me.has_broke = 0;
803 fra.me.REG_size = 3;
804 fra.me.REG[0] = NIT_NULL;
805 fra.me.REG[1] = NIT_NULL;
806 fra.me.REG[2] = NIT_NULL;
807 fra.me.REG[0] = p0;
808 fra.me.REG[1] = p1;
809 /* ./../lib/standard//collection//list.nit:156 */
810 fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]);
811 fra.me.REG[2] = CALL_list___List___search_node_after(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[2]);
812 /* ./../lib/standard//collection//list.nit:157 */
813 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
814 if (UNTAG_Bool(REGB0)) {
815 } else {
816 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
817 if (UNTAG_Bool(REGB1)) {
818 REGB1 = TAG_Bool(false);
819 REGB0 = REGB1;
820 } else {
821 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
822 REGB0 = REGB1;
823 }
824 }
825 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
826 if (UNTAG_Bool(REGB0)) {
827 CALL_list___List___remove_node(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
828 }
829 stack_frame_head = fra.me.prev;
830 return;
831 }
832 void list___List___remove_at(val_t p0, val_t p1){
833 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
834 val_t REGB0;
835 val_t REGB1;
836 val_t tmp;
837 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
838 fra.me.file = LOCATE_list;
839 fra.me.line = 160;
840 fra.me.meth = LOCATE_list___List___remove_at;
841 fra.me.has_broke = 0;
842 fra.me.REG_size = 2;
843 fra.me.REG[0] = NIT_NULL;
844 fra.me.REG[1] = NIT_NULL;
845 fra.me.REG[0] = p0;
846 REGB0 = p1;
847 /* ./../lib/standard//collection//list.nit:162 */
848 fra.me.REG[1] = CALL_list___List___get_node(fra.me.REG[0])(fra.me.REG[0], REGB0);
849 /* ./../lib/standard//collection//list.nit:163 */
850 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
851 if (UNTAG_Bool(REGB0)) {
852 } else {
853 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
854 if (UNTAG_Bool(REGB1)) {
855 REGB1 = TAG_Bool(false);
856 REGB0 = REGB1;
857 } else {
858 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
859 REGB0 = REGB1;
860 }
861 }
862 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
863 if (UNTAG_Bool(REGB0)) {
864 CALL_list___List___remove_node(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
865 }
866 stack_frame_head = fra.me.prev;
867 return;
868 }
869 void list___List___clear(val_t p0){
870 struct {struct stack_frame_t me;} fra;
871 val_t tmp;
872 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
873 fra.me.file = LOCATE_list;
874 fra.me.line = 166;
875 fra.me.meth = LOCATE_list___List___clear;
876 fra.me.has_broke = 0;
877 fra.me.REG_size = 1;
878 fra.me.REG[0] = NIT_NULL;
879 fra.me.REG[0] = p0;
880 /* ./../lib/standard//collection//list.nit:168 */
881 ATTR_list___List____head(fra.me.REG[0]) = NIT_NULL;
882 /* ./../lib/standard//collection//list.nit:169 */
883 ATTR_list___List____tail(fra.me.REG[0]) = NIT_NULL;
884 stack_frame_head = fra.me.prev;
885 return;
886 }
887 val_t list___List___iterator(val_t p0){
888 struct {struct stack_frame_t me;} fra;
889 val_t tmp;
890 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
891 fra.me.file = LOCATE_list;
892 fra.me.line = 173;
893 fra.me.meth = LOCATE_list___List___iterator;
894 fra.me.has_broke = 0;
895 fra.me.REG_size = 1;
896 fra.me.REG[0] = NIT_NULL;
897 fra.me.REG[0] = p0;
898 /* ./../lib/standard//collection//list.nit:173 */
899 fra.me.REG[0] = NEW_ListIterator_list___ListIterator___init(fra.me.REG[0]);
900 goto label1;
901 label1: while(0);
902 stack_frame_head = fra.me.prev;
903 return fra.me.REG[0];
904 }
905 void list___List___init(val_t p0, int* init_table){
906 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_List].i;
907 struct {struct stack_frame_t me;} fra;
908 val_t tmp;
909 if (init_table[itpos0]) return;
910 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
911 fra.me.file = LOCATE_list;
912 fra.me.line = 175;
913 fra.me.meth = LOCATE_list___List___init;
914 fra.me.has_broke = 0;
915 fra.me.REG_size = 1;
916 fra.me.REG[0] = NIT_NULL;
917 fra.me.REG[0] = p0;
918 stack_frame_head = fra.me.prev;
919 init_table[itpos0] = 1;
920 return;
921 }
922 void list___List___from(val_t p0, val_t p1, int* init_table){
923 int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_List].i;
924 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
925 val_t tmp;
926 if (init_table[itpos1]) return;
927 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
928 fra.me.file = LOCATE_list;
929 fra.me.line = 178;
930 fra.me.meth = LOCATE_list___List___from;
931 fra.me.has_broke = 0;
932 fra.me.REG_size = 2;
933 fra.me.REG[0] = NIT_NULL;
934 fra.me.REG[1] = NIT_NULL;
935 fra.me.REG[0] = p0;
936 fra.me.REG[1] = p1;
937 /* ./../lib/standard//collection//list.nit:179 */
938 CALL_abstract_collection___Sequence___append(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
939 stack_frame_head = fra.me.prev;
940 init_table[itpos1] = 1;
941 return;
942 }
943 val_t list___List___get_node(val_t p0, val_t p1){
944 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
945 val_t REGB0;
946 val_t REGB1;
947 val_t REGB2;
948 val_t tmp;
949 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
950 fra.me.file = LOCATE_list;
951 fra.me.line = 187;
952 fra.me.meth = LOCATE_list___List___get_node;
953 fra.me.has_broke = 0;
954 fra.me.REG_size = 3;
955 fra.me.REG[0] = NIT_NULL;
956 fra.me.REG[1] = NIT_NULL;
957 fra.me.REG[2] = NIT_NULL;
958 fra.me.REG[0] = p0;
959 REGB0 = p1;
960 /* ./../lib/standard//collection//list.nit:190 */
961 fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]);
962 /* ./../lib/standard//collection//list.nit:191 */
963 REGB1 = TAG_Int(0);
964 /* ./../lib/standard//kernel.nit:212 */
965 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
966 /* ./../lib/standard//collection//list.nit:191 */
967 if (UNTAG_Bool(REGB1)) {
968 /* ./../lib/standard//collection//list.nit:192 */
969 fra.me.REG[1] = NIT_NULL;
970 goto label1;
971 }
972 /* ./../lib/standard//collection//list.nit:194 */
973 while(1) {
974 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
975 if (UNTAG_Bool(REGB1)) {
976 } else {
977 REGB2 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
978 if (UNTAG_Bool(REGB2)) {
979 REGB2 = TAG_Bool(false);
980 REGB1 = REGB2;
981 } else {
982 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
983 REGB1 = REGB2;
984 }
985 }
986 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
987 if (UNTAG_Bool(REGB1)) {
988 REGB1 = TAG_Int(0);
989 /* ./../lib/standard//kernel.nit:214 */
990 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
991 } else {
992 /* ./../lib/standard//collection//list.nit:194 */
993 REGB2 = TAG_Bool(false);
994 REGB1 = REGB2;
995 }
996 if (UNTAG_Bool(REGB1)) {
997 /* ./../lib/standard//collection//list.nit:195 */
998 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
999 if (UNTAG_Bool(REGB1)) {
1000 nit_abort("Reciever is null", NULL, LOCATE_list, 195);
1001 }
1002 fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[0])(fra.me.REG[0]);
1003 fra.me.REG[0] = fra.me.REG[2];
1004 /* ./../lib/standard//collection//list.nit:196 */
1005 REGB1 = TAG_Int(1);
1006 /* ./../lib/standard//kernel.nit:217 */
1007 REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1));
1008 /* ./../lib/standard//collection//list.nit:196 */
1009 REGB0 = REGB1;
1010 } else {
1011 /* ./../lib/standard//collection//list.nit:194 */
1012 goto label2;
1013 }
1014 }
1015 label2: while(0);
1016 /* ./../lib/standard//collection//list.nit:198 */
1017 fra.me.REG[1] = fra.me.REG[0];
1018 goto label1;
1019 label1: while(0);
1020 stack_frame_head = fra.me.prev;
1021 return fra.me.REG[1];
1022 }
1023 val_t list___List___search_node_after(val_t p0, val_t p1, val_t p2){
1024 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1025 val_t REGB0;
1026 val_t REGB1;
1027 val_t tmp;
1028 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1029 fra.me.file = LOCATE_list;
1030 fra.me.line = 201;
1031 fra.me.meth = LOCATE_list___List___search_node_after;
1032 fra.me.has_broke = 0;
1033 fra.me.REG_size = 3;
1034 fra.me.REG[0] = NIT_NULL;
1035 fra.me.REG[1] = NIT_NULL;
1036 fra.me.REG[2] = NIT_NULL;
1037 fra.me.REG[0] = p0;
1038 fra.me.REG[1] = p1;
1039 fra.me.REG[2] = p2;
1040 /* ./../lib/standard//collection//list.nit:205 */
1041 while(1) {
1042 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1043 if (UNTAG_Bool(REGB0)) {
1044 } else {
1045 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1046 if (UNTAG_Bool(REGB1)) {
1047 REGB1 = TAG_Bool(false);
1048 REGB0 = REGB1;
1049 } else {
1050 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
1051 REGB0 = REGB1;
1052 }
1053 }
1054 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1055 if (UNTAG_Bool(REGB0)) {
1056 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1057 if (UNTAG_Bool(REGB0)) {
1058 nit_abort("Reciever is null", NULL, LOCATE_list, 205);
1059 }
1060 fra.me.REG[0] = CALL_abstract_collection___Container___item(fra.me.REG[2])(fra.me.REG[2]);
1061 REGB0 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[0],fra.me.REG[1]));
1062 if (UNTAG_Bool(REGB0)) {
1063 } else {
1064 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
1065 if (UNTAG_Bool(REGB1)) {
1066 REGB1 = TAG_Bool(false);
1067 REGB0 = REGB1;
1068 } else {
1069 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
1070 REGB0 = REGB1;
1071 }
1072 }
1073 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1074 } else {
1075 REGB1 = TAG_Bool(false);
1076 REGB0 = REGB1;
1077 }
1078 if (UNTAG_Bool(REGB0)) {
1079 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1080 if (UNTAG_Bool(REGB0)) {
1081 nit_abort("Reciever is null", NULL, LOCATE_list, 205);
1082 }
1083 fra.me.REG[0] = CALL_list___ListNode___next(fra.me.REG[2])(fra.me.REG[2]);
1084 fra.me.REG[2] = fra.me.REG[0];
1085 } else {
1086 goto label1;
1087 }
1088 }
1089 label1: while(0);
1090 /* ./../lib/standard//collection//list.nit:206 */
1091 goto label2;
1092 label2: while(0);
1093 stack_frame_head = fra.me.prev;
1094 return fra.me.REG[2];
1095 }
1096 void list___List___remove_node(val_t p0, val_t p1){
1097 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1098 val_t REGB0;
1099 val_t REGB1;
1100 val_t tmp;
1101 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1102 fra.me.file = LOCATE_list;
1103 fra.me.line = 209;
1104 fra.me.meth = LOCATE_list___List___remove_node;
1105 fra.me.has_broke = 0;
1106 fra.me.REG_size = 3;
1107 fra.me.REG[0] = NIT_NULL;
1108 fra.me.REG[1] = NIT_NULL;
1109 fra.me.REG[2] = NIT_NULL;
1110 fra.me.REG[0] = p0;
1111 fra.me.REG[1] = p1;
1112 /* ./../lib/standard//collection//list.nit:212 */
1113 fra.me.REG[2] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]);
1114 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1115 if (UNTAG_Bool(REGB0)) {
1116 } else {
1117 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1118 if (UNTAG_Bool(REGB1)) {
1119 REGB1 = TAG_Bool(false);
1120 REGB0 = REGB1;
1121 } else {
1122 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
1123 REGB0 = REGB1;
1124 }
1125 }
1126 if (UNTAG_Bool(REGB0)) {
1127 /* ./../lib/standard//collection//list.nit:213 */
1128 fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]);
1129 ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[2];
1130 /* ./../lib/standard//collection//list.nit:214 */
1131 fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]);
1132 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1133 if (UNTAG_Bool(REGB0)) {
1134 } else {
1135 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1136 if (UNTAG_Bool(REGB1)) {
1137 REGB1 = TAG_Bool(false);
1138 REGB0 = REGB1;
1139 } else {
1140 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
1141 REGB0 = REGB1;
1142 }
1143 }
1144 if (UNTAG_Bool(REGB0)) {
1145 /* ./../lib/standard//collection//list.nit:215 */
1146 ATTR_list___List____tail(fra.me.REG[0]) = NIT_NULL;
1147 } else {
1148 /* ./../lib/standard//collection//list.nit:217 */
1149 fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]);
1150 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1151 if (UNTAG_Bool(REGB0)) {
1152 nit_abort("Reciever is null", NULL, LOCATE_list, 217);
1153 }
1154 CALL_list___ListNode___prev__eq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
1155 }
1156 } else {
1157 /* ./../lib/standard//collection//list.nit:219 */
1158 fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]);
1159 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1160 if (UNTAG_Bool(REGB0)) {
1161 } else {
1162 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1163 if (UNTAG_Bool(REGB1)) {
1164 REGB1 = TAG_Bool(false);
1165 REGB0 = REGB1;
1166 } else {
1167 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
1168 REGB0 = REGB1;
1169 }
1170 }
1171 if (UNTAG_Bool(REGB0)) {
1172 /* ./../lib/standard//collection//list.nit:220 */
1173 fra.me.REG[2] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]);
1174 ATTR_list___List____tail(fra.me.REG[0]) = fra.me.REG[2];
1175 /* ./../lib/standard//collection//list.nit:221 */
1176 fra.me.REG[2] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]);
1177 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1178 if (UNTAG_Bool(REGB0)) {
1179 nit_abort("Reciever is null", NULL, LOCATE_list, 221);
1180 }
1181 CALL_list___ListNode___next__eq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
1182 } else {
1183 /* ./../lib/standard//collection//list.nit:223 */
1184 fra.me.REG[2] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]);
1185 fra.me.REG[0] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]);
1186 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1187 if (UNTAG_Bool(REGB0)) {
1188 nit_abort("Reciever is null", NULL, LOCATE_list, 223);
1189 }
1190 CALL_list___ListNode___next__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
1191 /* ./../lib/standard//collection//list.nit:224 */
1192 fra.me.REG[0] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]);
1193 fra.me.REG[1] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]);
1194 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
1195 if (UNTAG_Bool(REGB0)) {
1196 nit_abort("Reciever is null", NULL, LOCATE_list, 224);
1197 }
1198 CALL_list___ListNode___prev__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
1199 }
1200 }
1201 stack_frame_head = fra.me.prev;
1202 return;
1203 }
1204 void list___List___insert_before(val_t p0, val_t p1, val_t p2){
1205 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
1206 val_t REGB0;
1207 val_t REGB1;
1208 val_t tmp;
1209 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1210 fra.me.file = LOCATE_list;
1211 fra.me.line = 228;
1212 fra.me.meth = LOCATE_list___List___insert_before;
1213 fra.me.has_broke = 0;
1214 fra.me.REG_size = 4;
1215 fra.me.REG[0] = NIT_NULL;
1216 fra.me.REG[1] = NIT_NULL;
1217 fra.me.REG[2] = NIT_NULL;
1218 fra.me.REG[3] = NIT_NULL;
1219 fra.me.REG[0] = p0;
1220 fra.me.REG[1] = p1;
1221 fra.me.REG[2] = p2;
1222 /* ./../lib/standard//collection//list.nit:230 */
1223 fra.me.REG[1] = NEW_ListNode_list___ListNode___init(fra.me.REG[1]);
1224 /* ./../lib/standard//collection//list.nit:231 */
1225 fra.me.REG[3] = CALL_list___ListNode___prev(fra.me.REG[2])(fra.me.REG[2]);
1226 /* ./../lib/standard//collection//list.nit:232 */
1227 REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
1228 if (UNTAG_Bool(REGB0)) {
1229 } else {
1230 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
1231 if (UNTAG_Bool(REGB1)) {
1232 REGB1 = TAG_Bool(false);
1233 REGB0 = REGB1;
1234 } else {
1235 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], NIT_NULL);
1236 REGB0 = REGB1;
1237 }
1238 }
1239 if (UNTAG_Bool(REGB0)) {
1240 /* ./../lib/standard//collection//list.nit:233 */
1241 ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[1];
1242 } else {
1243 /* ./../lib/standard//collection//list.nit:235 */
1244 REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
1245 if (UNTAG_Bool(REGB0)) {
1246 nit_abort("Reciever is null", NULL, LOCATE_list, 235);
1247 }
1248 CALL_list___ListNode___next__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
1249 }
1250 /* ./../lib/standard//collection//list.nit:237 */
1251 CALL_list___ListNode___prev__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
1252 /* ./../lib/standard//collection//list.nit:238 */
1253 CALL_list___ListNode___next__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
1254 /* ./../lib/standard//collection//list.nit:239 */
1255 CALL_list___ListNode___prev__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
1256 stack_frame_head = fra.me.prev;
1257 return;
1258 }
1259 val_t list___ListIterator___item(val_t p0){
1260 struct {struct stack_frame_t me;} fra;
1261 val_t REGB0;
1262 val_t tmp;
1263 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1264 fra.me.file = LOCATE_list;
1265 fra.me.line = 246;
1266 fra.me.meth = LOCATE_list___ListIterator___item;
1267 fra.me.has_broke = 0;
1268 fra.me.REG_size = 1;
1269 fra.me.REG[0] = NIT_NULL;
1270 fra.me.REG[0] = p0;
1271 /* ./../lib/standard//collection//list.nit:246 */
1272 fra.me.REG[0] = ATTR_list___ListIterator____node(fra.me.REG[0]);
1273 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
1274 if (UNTAG_Bool(REGB0)) {
1275 nit_abort("Reciever is null", NULL, LOCATE_list, 246);
1276 }
1277 fra.me.REG[0] = CALL_abstract_collection___Container___item(fra.me.REG[0])(fra.me.REG[0]);
1278 goto label1;
1279 label1: while(0);
1280 stack_frame_head = fra.me.prev;
1281 return fra.me.REG[0];
1282 }
1283 void list___ListIterator___item__eq(val_t p0, val_t p1){
1284 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1285 val_t REGB0;
1286 val_t tmp;
1287 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1288 fra.me.file = LOCATE_list;
1289 fra.me.line = 248;
1290 fra.me.meth = LOCATE_list___ListIterator___item__eq;
1291 fra.me.has_broke = 0;
1292 fra.me.REG_size = 2;
1293 fra.me.REG[0] = NIT_NULL;
1294 fra.me.REG[1] = NIT_NULL;
1295 fra.me.REG[0] = p0;
1296 fra.me.REG[1] = p1;
1297 /* ./../lib/standard//collection//list.nit:248 */
1298 fra.me.REG[0] = ATTR_list___ListIterator____node(fra.me.REG[0]);
1299 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
1300 if (UNTAG_Bool(REGB0)) {
1301 nit_abort("Reciever is null", NULL, LOCATE_list, 248);
1302 }
1303 CALL_abstract_collection___Container___item__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
1304 stack_frame_head = fra.me.prev;
1305 return;
1306 }
1307 val_t list___ListIterator___is_ok(val_t p0){
1308 struct {struct stack_frame_t me;} fra;
1309 val_t REGB0;
1310 val_t REGB1;
1311 val_t tmp;
1312 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1313 fra.me.file = LOCATE_list;
1314 fra.me.line = 250;
1315 fra.me.meth = LOCATE_list___ListIterator___is_ok;
1316 fra.me.has_broke = 0;
1317 fra.me.REG_size = 1;
1318 fra.me.REG[0] = NIT_NULL;
1319 fra.me.REG[0] = p0;
1320 /* ./../lib/standard//collection//list.nit:250 */
1321 fra.me.REG[0] = ATTR_list___ListIterator____node(fra.me.REG[0]);
1322 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
1323 if (UNTAG_Bool(REGB0)) {
1324 } else {
1325 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
1326 if (UNTAG_Bool(REGB1)) {
1327 REGB1 = TAG_Bool(false);
1328 REGB0 = REGB1;
1329 } else {
1330 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
1331 REGB0 = REGB1;
1332 }
1333 }
1334 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1335 goto label1;
1336 label1: while(0);
1337 stack_frame_head = fra.me.prev;
1338 return REGB0;
1339 }
1340 void list___ListIterator___next(val_t p0){
1341 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1342 val_t REGB0;
1343 val_t REGB1;
1344 val_t tmp;
1345 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1346 fra.me.file = LOCATE_list;
1347 fra.me.line = 252;
1348 fra.me.meth = LOCATE_list___ListIterator___next;
1349 fra.me.has_broke = 0;
1350 fra.me.REG_size = 2;
1351 fra.me.REG[0] = NIT_NULL;
1352 fra.me.REG[1] = NIT_NULL;
1353 fra.me.REG[0] = p0;
1354 /* ./../lib/standard//collection//list.nit:254 */
1355 fra.me.REG[1] = ATTR_list___ListIterator____node(fra.me.REG[0]);
1356 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
1357 if (UNTAG_Bool(REGB0)) {
1358 nit_abort("Reciever is null", NULL, LOCATE_list, 254);
1359 }
1360 fra.me.REG[1] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]);
1361 ATTR_list___ListIterator____node(fra.me.REG[0]) = fra.me.REG[1];
1362 /* ./../lib/standard//collection//list.nit:255 */
1363 REGB0 = ATTR_list___ListIterator____index(fra.me.REG[0]);
1364 REGB1 = TAG_Int(1);
1365 /* ./../lib/standard//kernel.nit:215 */
1366 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1367 /* ./../lib/standard//collection//list.nit:255 */
1368 ATTR_list___ListIterator____index(fra.me.REG[0]) = REGB1;
1369 stack_frame_head = fra.me.prev;
1370 return;
1371 }
1372 void list___ListIterator___init(val_t p0, val_t p1, int* init_table){
1373 int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_ListIterator].i;
1374 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1375 val_t REGB0;
1376 val_t tmp;
1377 if (init_table[itpos2]) return;
1378 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1379 fra.me.file = LOCATE_list;
1380 fra.me.line = 258;
1381 fra.me.meth = LOCATE_list___ListIterator___init;
1382 fra.me.has_broke = 0;
1383 fra.me.REG_size = 2;
1384 fra.me.REG[0] = NIT_NULL;
1385 fra.me.REG[1] = NIT_NULL;
1386 fra.me.REG[0] = p0;
1387 fra.me.REG[1] = p1;
1388 /* ./../lib/standard//collection//list.nit:261 */
1389 ATTR_list___ListIterator____list(fra.me.REG[0]) = fra.me.REG[1];
1390 /* ./../lib/standard//collection//list.nit:262 */
1391 fra.me.REG[1] = ATTR_list___List____head(fra.me.REG[1]);
1392 ATTR_list___ListIterator____node(fra.me.REG[0]) = fra.me.REG[1];
1393 /* ./../lib/standard//collection//list.nit:263 */
1394 REGB0 = TAG_Int(0);
1395 ATTR_list___ListIterator____index(fra.me.REG[0]) = REGB0;
1396 stack_frame_head = fra.me.prev;
1397 init_table[itpos2] = 1;
1398 return;
1399 }
1400 val_t list___ListIterator___index(val_t p0){
1401 struct {struct stack_frame_t me;} fra;
1402 val_t REGB0;
1403 val_t tmp;
1404 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1405 fra.me.file = LOCATE_list;
1406 fra.me.line = 272;
1407 fra.me.meth = LOCATE_list___ListIterator___index;
1408 fra.me.has_broke = 0;
1409 fra.me.REG_size = 1;
1410 fra.me.REG[0] = NIT_NULL;
1411 fra.me.REG[0] = p0;
1412 /* ./../lib/standard//collection//list.nit:272 */
1413 REGB0 = TAG_Bool(ATTR_list___ListIterator____index(fra.me.REG[0])!=NIT_NULL);
1414 if (UNTAG_Bool(REGB0)) {
1415 } else {
1416 nit_abort("Uninitialized attribute %s", "_index", LOCATE_list, 272);
1417 }
1418 REGB0 = ATTR_list___ListIterator____index(fra.me.REG[0]);
1419 stack_frame_head = fra.me.prev;
1420 return REGB0;
1421 }
1422 void list___ListIterator___delete(val_t p0){
1423 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1424 val_t REGB0;
1425 val_t tmp;
1426 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1427 fra.me.file = LOCATE_list;
1428 fra.me.line = 275;
1429 fra.me.meth = LOCATE_list___ListIterator___delete;
1430 fra.me.has_broke = 0;
1431 fra.me.REG_size = 2;
1432 fra.me.REG[0] = NIT_NULL;
1433 fra.me.REG[1] = NIT_NULL;
1434 fra.me.REG[0] = p0;
1435 /* ./../lib/standard//collection//list.nit:278 */
1436 REGB0 = TAG_Bool(ATTR_list___ListIterator____list(fra.me.REG[0])!=NIT_NULL);
1437 if (UNTAG_Bool(REGB0)) {
1438 } else {
1439 nit_abort("Uninitialized attribute %s", "_list", LOCATE_list, 278);
1440 }
1441 fra.me.REG[1] = ATTR_list___ListIterator____list(fra.me.REG[0]);
1442 fra.me.REG[0] = ATTR_list___ListIterator____node(fra.me.REG[0]);
1443 REGB0 = TAG_Bool(fra.me.REG[0]!=NIT_NULL);
1444 if (UNTAG_Bool(REGB0)) {
1445 } else {
1446 nit_abort("Cast failed", NULL, LOCATE_list, 278);
1447 }
1448 CALL_list___List___remove_node(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
1449 stack_frame_head = fra.me.prev;
1450 return;
1451 }
1452 void list___ListIterator___insert_before(val_t p0, val_t p1){
1453 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1454 val_t REGB0;
1455 val_t tmp;
1456 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1457 fra.me.file = LOCATE_list;
1458 fra.me.line = 281;
1459 fra.me.meth = LOCATE_list___ListIterator___insert_before;
1460 fra.me.has_broke = 0;
1461 fra.me.REG_size = 3;
1462 fra.me.REG[0] = NIT_NULL;
1463 fra.me.REG[1] = NIT_NULL;
1464 fra.me.REG[2] = NIT_NULL;
1465 fra.me.REG[0] = p0;
1466 fra.me.REG[1] = p1;
1467 /* ./../lib/standard//collection//list.nit:284 */
1468 REGB0 = TAG_Bool(ATTR_list___ListIterator____list(fra.me.REG[0])!=NIT_NULL);
1469 if (UNTAG_Bool(REGB0)) {
1470 } else {
1471 nit_abort("Uninitialized attribute %s", "_list", LOCATE_list, 284);
1472 }
1473 fra.me.REG[2] = ATTR_list___ListIterator____list(fra.me.REG[0]);
1474 fra.me.REG[0] = ATTR_list___ListIterator____node(fra.me.REG[0]);
1475 REGB0 = TAG_Bool(fra.me.REG[0]!=NIT_NULL);
1476 if (UNTAG_Bool(REGB0)) {
1477 } else {
1478 nit_abort("Cast failed", NULL, LOCATE_list, 284);
1479 }
1480 CALL_list___List___insert_before(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1], fra.me.REG[0]);
1481 stack_frame_head = fra.me.prev;
1482 return;
1483 }
1484 void list___ListNode___init(val_t p0, val_t p1, int* init_table){
1485 int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_ListNode].i;
1486 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
1487 val_t tmp;
1488 if (init_table[itpos3]) return;
1489 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1490 fra.me.file = LOCATE_list;
1491 fra.me.line = 291;
1492 fra.me.meth = LOCATE_list___ListNode___init;
1493 fra.me.has_broke = 0;
1494 fra.me.REG_size = 4;
1495 fra.me.REG[0] = NIT_NULL;
1496 fra.me.REG[1] = NIT_NULL;
1497 fra.me.REG[2] = NIT_NULL;
1498 fra.me.REG[3] = NIT_NULL;
1499 fra.me.REG[0] = p0;
1500 fra.me.REG[1] = p1;
1501 /* ./../lib/standard//collection//list.nit:291 */
1502 fra.me.REG[2] = fra.me.REG[0];
1503 fra.me.REG[3] = fra.me.REG[1];
1504 CALL_abstract_collection___Container___init(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], init_table);
1505 /* ./../lib/standard//collection//list.nit:293 */
1506 CALL_abstract_collection___Container___item__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
1507 stack_frame_head = fra.me.prev;
1508 init_table[itpos3] = 1;
1509 return;
1510 }
1511 val_t list___ListNode___next(val_t p0){
1512 struct {struct stack_frame_t me;} fra;
1513 val_t tmp;
1514 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1515 fra.me.file = LOCATE_list;
1516 fra.me.line = 296;
1517 fra.me.meth = LOCATE_list___ListNode___next;
1518 fra.me.has_broke = 0;
1519 fra.me.REG_size = 1;
1520 fra.me.REG[0] = NIT_NULL;
1521 fra.me.REG[0] = p0;
1522 /* ./../lib/standard//collection//list.nit:296 */
1523 fra.me.REG[0] = ATTR_list___ListNode____next(fra.me.REG[0]);
1524 stack_frame_head = fra.me.prev;
1525 return fra.me.REG[0];
1526 }
1527 void list___ListNode___next__eq(val_t p0, val_t p1){
1528 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1529 val_t tmp;
1530 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1531 fra.me.file = LOCATE_list;
1532 fra.me.line = 296;
1533 fra.me.meth = LOCATE_list___ListNode___next__eq;
1534 fra.me.has_broke = 0;
1535 fra.me.REG_size = 2;
1536 fra.me.REG[0] = NIT_NULL;
1537 fra.me.REG[1] = NIT_NULL;
1538 fra.me.REG[0] = p0;
1539 fra.me.REG[1] = p1;
1540 /* ./../lib/standard//collection//list.nit:296 */
1541 ATTR_list___ListNode____next(fra.me.REG[0]) = fra.me.REG[1];
1542 stack_frame_head = fra.me.prev;
1543 return;
1544 }
1545 val_t list___ListNode___prev(val_t p0){
1546 struct {struct stack_frame_t me;} fra;
1547 val_t tmp;
1548 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1549 fra.me.file = LOCATE_list;
1550 fra.me.line = 299;
1551 fra.me.meth = LOCATE_list___ListNode___prev;
1552 fra.me.has_broke = 0;
1553 fra.me.REG_size = 1;
1554 fra.me.REG[0] = NIT_NULL;
1555 fra.me.REG[0] = p0;
1556 /* ./../lib/standard//collection//list.nit:299 */
1557 fra.me.REG[0] = ATTR_list___ListNode____prev(fra.me.REG[0]);
1558 stack_frame_head = fra.me.prev;
1559 return fra.me.REG[0];
1560 }
1561 void list___ListNode___prev__eq(val_t p0, val_t p1){
1562 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1563 val_t tmp;
1564 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1565 fra.me.file = LOCATE_list;
1566 fra.me.line = 299;
1567 fra.me.meth = LOCATE_list___ListNode___prev__eq;
1568 fra.me.has_broke = 0;
1569 fra.me.REG_size = 2;
1570 fra.me.REG[0] = NIT_NULL;
1571 fra.me.REG[1] = NIT_NULL;
1572 fra.me.REG[0] = p0;
1573 fra.me.REG[1] = p1;
1574 /* ./../lib/standard//collection//list.nit:299 */
1575 ATTR_list___ListNode____prev(fra.me.REG[0]) = fra.me.REG[1];
1576 stack_frame_head = fra.me.prev;
1577 return;
1578 }