use nitg to bootstrap; drop bootstrap of nitc
[nit.git] / c_src / abstract_collection.sep.1.c
1 #include "abstract_collection.sep.0.h"
2 /* method abstract_collection#Collection#iterator for (self: Collection[nullable Object]): Iterator[nullable Object] */
3 val* abstract_collection__Collection__iterator(val* self) {
4 val* var /* : Iterator[nullable Object] */;
5 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 54);
6 exit(1);
7 RET_LABEL:;
8 return var;
9 }
10 /* method abstract_collection#Collection#iterator for (self: Object): Iterator[nullable Object] */
11 val* VIRTUAL_abstract_collection__Collection__iterator(val* self) {
12 val* var /* : Iterator[nullable Object] */;
13 val* var1 /* : Iterator[nullable Object] */;
14 var1 = abstract_collection__Collection__iterator(self);
15 var = var1;
16 RET_LABEL:;
17 return var;
18 }
19 /* method abstract_collection#Collection#iterate for (self: Collection[nullable Object]) */
20 void abstract_collection__Collection__iterate(val* self) {
21 val* var /* : Iterator[nullable Object] */;
22 val* var_i /* var i: Iterator[nullable Object] */;
23 short int var1 /* : Bool */;
24 var = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__iterator]))(self) /* iterator on <self:Collection[nullable Object]>*/;
25 var_i = var;
26 for(;;) {
27 var1 = ((short int (*)(val*))(var_i->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var_i) /* is_ok on <var_i:Iterator[nullable Object]>*/;
28 if (!var1) break;
29 printf("NOT YET IMPLEMENTED AClosureCallExpr:lib/standard/collection/abstract_collection.nit:63,4--15\n");
30 ((void (*)(val*))(var_i->class->vft[COLOR_abstract_collection__Iterator__next]))(var_i) /* next on <var_i:Iterator[nullable Object]>*/;
31 CONTINUE_label: (void)0;
32 }
33 BREAK_label: (void)0;
34 RET_LABEL:;
35 }
36 /* method abstract_collection#Collection#iterate for (self: Object) */
37 void VIRTUAL_abstract_collection__Collection__iterate(val* self) {
38 abstract_collection__Collection__iterate(self);
39 RET_LABEL:;
40 }
41 /* method abstract_collection#Collection#is_empty for (self: Collection[nullable Object]): Bool */
42 short int abstract_collection__Collection__is_empty(val* self) {
43 short int var /* : Bool */;
44 long var1 /* : Int */;
45 long var2 /* : Int */;
46 short int var3 /* : Bool */;
47 short int var5 /* : Bool */;
48 var1 = ((long (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__length]))(self) /* length on <self:Collection[nullable Object]>*/;
49 var2 = 0;
50 { /* Inline kernel#Int#== (var1,var2) */
51 var5 = var1 == var2;
52 var3 = var5;
53 goto RET_LABEL4;
54 RET_LABEL4:(void)0;
55 }
56 var = var3;
57 goto RET_LABEL;
58 RET_LABEL:;
59 return var;
60 }
61 /* method abstract_collection#Collection#is_empty for (self: Object): Bool */
62 short int VIRTUAL_abstract_collection__Collection__is_empty(val* self) {
63 short int var /* : Bool */;
64 short int var1 /* : Bool */;
65 var1 = abstract_collection__Collection__is_empty(self);
66 var = var1;
67 RET_LABEL:;
68 return var;
69 }
70 /* method abstract_collection#Collection#length for (self: Collection[nullable Object]): Int */
71 long abstract_collection__Collection__length(val* self) {
72 long var /* : Int */;
73 long var1 /* : Int */;
74 long var_nb /* var nb: Int */;
75 val* var2 /* : Iterator[nullable Object] */;
76 short int var3 /* : Bool */;
77 val* var4 /* : nullable Object */;
78 val* var_i /* var i: nullable Object */;
79 long var5 /* : Int */;
80 long var6 /* : Int */;
81 long var8 /* : Int */;
82 var1 = 0;
83 var_nb = var1;
84 var2 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__iterator]))(self) /* iterator on <self:Collection[nullable Object]>*/;
85 for(;;) {
86 var3 = ((short int (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var2) /* is_ok on <var2:Iterator[nullable Object]>*/;
87 if(!var3) break;
88 var4 = ((val* (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__item]))(var2) /* item on <var2:Iterator[nullable Object]>*/;
89 var_i = var4;
90 var5 = 1;
91 { /* Inline kernel#Int#+ (var_nb,var5) */
92 var8 = var_nb + var5;
93 var6 = var8;
94 goto RET_LABEL7;
95 RET_LABEL7:(void)0;
96 }
97 var_nb = var6;
98 CONTINUE_label: (void)0;
99 ((void (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__next]))(var2) /* next on <var2:Iterator[nullable Object]>*/;
100 }
101 BREAK_label: (void)0;
102 var = var_nb;
103 goto RET_LABEL;
104 RET_LABEL:;
105 return var;
106 }
107 /* method abstract_collection#Collection#length for (self: Object): Int */
108 long VIRTUAL_abstract_collection__Collection__length(val* self) {
109 long var /* : Int */;
110 long var1 /* : Int */;
111 var1 = abstract_collection__Collection__length(self);
112 var = var1;
113 RET_LABEL:;
114 return var;
115 }
116 /* method abstract_collection#Collection#has for (self: Collection[nullable Object], nullable Object): Bool */
117 short int abstract_collection__Collection__has(val* self, val* p0) {
118 short int var /* : Bool */;
119 short int var1 /* : Bool */;
120 int cltype;
121 int idtype;
122 const struct type* type_struct;
123 short int is_nullable;
124 val* var_item /* var item: nullable Object */;
125 val* var2 /* : Iterator[nullable Object] */;
126 short int var3 /* : Bool */;
127 val* var4 /* : nullable Object */;
128 val* var_i /* var i: nullable Object */;
129 short int var5 /* : Bool */;
130 short int var6 /* : Bool */;
131 short int var7 /* : Bool */;
132 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
133 /* <p0:nullable Object> isa Collection#0 */
134 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collection_FT0];
135 cltype = type_struct->color;
136 idtype = type_struct->id;
137 is_nullable = type_struct->is_nullable;
138 if(p0 == NULL) {
139 var1 = is_nullable;
140 } else {
141 if(cltype >= p0->type->table_size) {
142 var1 = 0;
143 } else {
144 var1 = p0->type->type_table[cltype] == idtype;
145 }
146 }
147 if (!var1) {
148 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 86);
149 exit(1);
150 }
151 var_item = p0;
152 var2 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__iterator]))(self) /* iterator on <self:Collection[nullable Object]>*/;
153 for(;;) {
154 var3 = ((short int (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var2) /* is_ok on <var2:Iterator[nullable Object]>*/;
155 if(!var3) break;
156 var4 = ((val* (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__item]))(var2) /* item on <var2:Iterator[nullable Object]>*/;
157 var_i = var4;
158 if (var_i == NULL) {
159 var5 = (var_item == NULL);
160 } else {
161 var5 = ((short int (*)(val*, val*))(var_i->class->vft[COLOR_kernel__Object___61d_61d]))(var_i, var_item) /* == on <var_i:nullable Object>*/;
162 }
163 if (var5){
164 var6 = 1;
165 var = var6;
166 goto RET_LABEL;
167 } else {
168 }
169 CONTINUE_label: (void)0;
170 ((void (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__next]))(var2) /* next on <var2:Iterator[nullable Object]>*/;
171 }
172 BREAK_label: (void)0;
173 var7 = 0;
174 var = var7;
175 goto RET_LABEL;
176 RET_LABEL:;
177 return var;
178 }
179 /* method abstract_collection#Collection#has for (self: Object, nullable Object): Bool */
180 short int VIRTUAL_abstract_collection__Collection__has(val* self, val* p0) {
181 short int var /* : Bool */;
182 short int var1 /* : Bool */;
183 var1 = abstract_collection__Collection__has(self, p0);
184 var = var1;
185 RET_LABEL:;
186 return var;
187 }
188 /* method abstract_collection#Collection#has_only for (self: Collection[nullable Object], nullable Object): Bool */
189 short int abstract_collection__Collection__has_only(val* self, val* p0) {
190 short int var /* : Bool */;
191 short int var1 /* : Bool */;
192 int cltype;
193 int idtype;
194 const struct type* type_struct;
195 short int is_nullable;
196 val* var_item /* var item: nullable Object */;
197 val* var2 /* : Iterator[nullable Object] */;
198 short int var3 /* : Bool */;
199 val* var4 /* : nullable Object */;
200 val* var_i /* var i: nullable Object */;
201 short int var5 /* : Bool */;
202 short int var6 /* : Bool */;
203 short int var7 /* : Bool */;
204 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
205 /* <p0:nullable Object> isa Collection#0 */
206 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collection_FT0];
207 cltype = type_struct->color;
208 idtype = type_struct->id;
209 is_nullable = type_struct->is_nullable;
210 if(p0 == NULL) {
211 var1 = is_nullable;
212 } else {
213 if(cltype >= p0->type->table_size) {
214 var1 = 0;
215 } else {
216 var1 = p0->type->type_table[cltype] == idtype;
217 }
218 }
219 if (!var1) {
220 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 99);
221 exit(1);
222 }
223 var_item = p0;
224 var2 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__iterator]))(self) /* iterator on <self:Collection[nullable Object]>*/;
225 for(;;) {
226 var3 = ((short int (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var2) /* is_ok on <var2:Iterator[nullable Object]>*/;
227 if(!var3) break;
228 var4 = ((val* (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__item]))(var2) /* item on <var2:Iterator[nullable Object]>*/;
229 var_i = var4;
230 if (var_i == NULL) {
231 var5 = (var_item != NULL);
232 } else {
233 var5 = ((short int (*)(val*, val*))(var_i->class->vft[COLOR_kernel__Object___33d_61d]))(var_i, var_item) /* != on <var_i:nullable Object>*/;
234 }
235 if (var5){
236 var6 = 0;
237 var = var6;
238 goto RET_LABEL;
239 } else {
240 }
241 CONTINUE_label: (void)0;
242 ((void (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__next]))(var2) /* next on <var2:Iterator[nullable Object]>*/;
243 }
244 BREAK_label: (void)0;
245 var7 = 1;
246 var = var7;
247 goto RET_LABEL;
248 RET_LABEL:;
249 return var;
250 }
251 /* method abstract_collection#Collection#has_only for (self: Object, nullable Object): Bool */
252 short int VIRTUAL_abstract_collection__Collection__has_only(val* self, val* p0) {
253 short int var /* : Bool */;
254 short int var1 /* : Bool */;
255 var1 = abstract_collection__Collection__has_only(self, p0);
256 var = var1;
257 RET_LABEL:;
258 return var;
259 }
260 /* method abstract_collection#Collection#count for (self: Collection[nullable Object], nullable Object): Int */
261 long abstract_collection__Collection__count(val* self, val* p0) {
262 long var /* : Int */;
263 short int var1 /* : Bool */;
264 int cltype;
265 int idtype;
266 const struct type* type_struct;
267 short int is_nullable;
268 val* var_item /* var item: nullable Object */;
269 long var2 /* : Int */;
270 long var_nb /* var nb: Int */;
271 val* var3 /* : Iterator[nullable Object] */;
272 short int var4 /* : Bool */;
273 val* var5 /* : nullable Object */;
274 val* var_i /* var i: nullable Object */;
275 short int var6 /* : Bool */;
276 long var7 /* : Int */;
277 long var8 /* : Int */;
278 long var10 /* : Int */;
279 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
280 /* <p0:nullable Object> isa Collection#0 */
281 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collection_FT0];
282 cltype = type_struct->color;
283 idtype = type_struct->id;
284 is_nullable = type_struct->is_nullable;
285 if(p0 == NULL) {
286 var1 = is_nullable;
287 } else {
288 if(cltype >= p0->type->table_size) {
289 var1 = 0;
290 } else {
291 var1 = p0->type->type_table[cltype] == idtype;
292 }
293 }
294 if (!var1) {
295 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 116);
296 exit(1);
297 }
298 var_item = p0;
299 var2 = 0;
300 var_nb = var2;
301 var3 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__iterator]))(self) /* iterator on <self:Collection[nullable Object]>*/;
302 for(;;) {
303 var4 = ((short int (*)(val*))(var3->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var3) /* is_ok on <var3:Iterator[nullable Object]>*/;
304 if(!var4) break;
305 var5 = ((val* (*)(val*))(var3->class->vft[COLOR_abstract_collection__Iterator__item]))(var3) /* item on <var3:Iterator[nullable Object]>*/;
306 var_i = var5;
307 if (var_i == NULL) {
308 var6 = (var_item == NULL);
309 } else {
310 var6 = ((short int (*)(val*, val*))(var_i->class->vft[COLOR_kernel__Object___61d_61d]))(var_i, var_item) /* == on <var_i:nullable Object>*/;
311 }
312 if (var6){
313 var7 = 1;
314 { /* Inline kernel#Int#+ (var_nb,var7) */
315 var10 = var_nb + var7;
316 var8 = var10;
317 goto RET_LABEL9;
318 RET_LABEL9:(void)0;
319 }
320 var_nb = var8;
321 } else {
322 }
323 CONTINUE_label: (void)0;
324 ((void (*)(val*))(var3->class->vft[COLOR_abstract_collection__Iterator__next]))(var3) /* next on <var3:Iterator[nullable Object]>*/;
325 }
326 BREAK_label: (void)0;
327 var = var_nb;
328 goto RET_LABEL;
329 RET_LABEL:;
330 return var;
331 }
332 /* method abstract_collection#Collection#count for (self: Object, nullable Object): Int */
333 long VIRTUAL_abstract_collection__Collection__count(val* self, val* p0) {
334 long var /* : Int */;
335 long var1 /* : Int */;
336 var1 = abstract_collection__Collection__count(self, p0);
337 var = var1;
338 RET_LABEL:;
339 return var;
340 }
341 /* method abstract_collection#Collection#first for (self: Collection[nullable Object]): nullable Object */
342 val* abstract_collection__Collection__first(val* self) {
343 val* var /* : nullable Object */;
344 long var1 /* : Int */;
345 long var2 /* : Int */;
346 short int var3 /* : Bool */;
347 short int var5 /* : Bool */;
348 int cltype;
349 int idtype;
350 short int var6 /* : Bool */;
351 val* var7 /* : Iterator[nullable Object] */;
352 val* var8 /* : nullable Object */;
353 var1 = ((long (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__length]))(self) /* length on <self:Collection[nullable Object]>*/;
354 var2 = 0;
355 { /* Inline kernel#Int#> (var1,var2) */
356 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
357 /* <var2:Int> isa OTHER */
358 var5 = 1; /* easy <var2:Int> isa OTHER*/
359 if (!var5) {
360 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/kernel.nit", 259);
361 exit(1);
362 }
363 var6 = var1 > var2;
364 var3 = var6;
365 goto RET_LABEL4;
366 RET_LABEL4:(void)0;
367 }
368 if (!var3) {
369 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Assert failed", "lib/standard/collection/abstract_collection.nit", 132);
370 exit(1);
371 }
372 var7 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__iterator]))(self) /* iterator on <self:Collection[nullable Object]>*/;
373 var8 = ((val* (*)(val*))(var7->class->vft[COLOR_abstract_collection__Iterator__item]))(var7) /* item on <var7:Iterator[nullable Object]>*/;
374 var = var8;
375 goto RET_LABEL;
376 RET_LABEL:;
377 return var;
378 }
379 /* method abstract_collection#Collection#first for (self: Object): nullable Object */
380 val* VIRTUAL_abstract_collection__Collection__first(val* self) {
381 val* var /* : nullable Object */;
382 val* var1 /* : nullable Object */;
383 var1 = abstract_collection__Collection__first(self);
384 var = var1;
385 RET_LABEL:;
386 return var;
387 }
388 /* method abstract_collection#Collection#has_all for (self: Collection[nullable Object], Collection[nullable Object]): Bool */
389 short int abstract_collection__Collection__has_all(val* self, val* p0) {
390 short int var /* : Bool */;
391 short int var1 /* : Bool */;
392 int cltype;
393 int idtype;
394 const struct type* type_struct;
395 val* var_other /* var other: Collection[nullable Object] */;
396 val* var2 /* : Iterator[nullable Object] */;
397 short int var3 /* : Bool */;
398 val* var4 /* : nullable Object */;
399 val* var_x /* var x: nullable Object */;
400 short int var5 /* : Bool */;
401 short int var6 /* : Bool */;
402 short int var7 /* : Bool */;
403 short int var8 /* : Bool */;
404 /* Covariant cast for argument 0 (other) <p0:Collection[nullable Object]> isa Collection[Collection#0] */
405 /* <p0:Collection[nullable Object]> isa Collection[Collection#0] */
406 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collectionabstract_collection__Collection_FT0];
407 cltype = type_struct->color;
408 idtype = type_struct->id;
409 if(cltype >= p0->type->table_size) {
410 var1 = 0;
411 } else {
412 var1 = p0->type->type_table[cltype] == idtype;
413 }
414 if (!var1) {
415 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 136);
416 exit(1);
417 }
418 var_other = p0;
419 var2 = ((val* (*)(val*))(var_other->class->vft[COLOR_abstract_collection__Collection__iterator]))(var_other) /* iterator on <var_other:Collection[nullable Object]>*/;
420 for(;;) {
421 var3 = ((short int (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var2) /* is_ok on <var2:Iterator[nullable Object]>*/;
422 if(!var3) break;
423 var4 = ((val* (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__item]))(var2) /* item on <var2:Iterator[nullable Object]>*/;
424 var_x = var4;
425 var5 = ((short int (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__Collection__has]))(self, var_x) /* has on <self:Collection[nullable Object]>*/;
426 var6 = !var5;
427 if (var6){
428 var7 = 0;
429 var = var7;
430 goto RET_LABEL;
431 } else {
432 }
433 CONTINUE_label: (void)0;
434 ((void (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__next]))(var2) /* next on <var2:Iterator[nullable Object]>*/;
435 }
436 BREAK_label: (void)0;
437 var8 = 1;
438 var = var8;
439 goto RET_LABEL;
440 RET_LABEL:;
441 return var;
442 }
443 /* method abstract_collection#Collection#has_all for (self: Object, Collection[nullable Object]): Bool */
444 short int VIRTUAL_abstract_collection__Collection__has_all(val* self, val* p0) {
445 short int var /* : Bool */;
446 short int var1 /* : Bool */;
447 var1 = abstract_collection__Collection__has_all(self, p0);
448 var = var1;
449 RET_LABEL:;
450 return var;
451 }
452 /* method abstract_collection#Iterator#item for (self: Iterator[nullable Object]): nullable Object */
453 val* abstract_collection__Iterator__item(val* self) {
454 val* var /* : nullable Object */;
455 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 152);
456 exit(1);
457 RET_LABEL:;
458 return var;
459 }
460 /* method abstract_collection#Iterator#item for (self: Object): nullable Object */
461 val* VIRTUAL_abstract_collection__Iterator__item(val* self) {
462 val* var /* : nullable Object */;
463 val* var1 /* : nullable Object */;
464 var1 = abstract_collection__Iterator__item(self);
465 var = var1;
466 RET_LABEL:;
467 return var;
468 }
469 /* method abstract_collection#Iterator#next for (self: Iterator[nullable Object]) */
470 void abstract_collection__Iterator__next(val* self) {
471 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 156);
472 exit(1);
473 RET_LABEL:;
474 }
475 /* method abstract_collection#Iterator#next for (self: Object) */
476 void VIRTUAL_abstract_collection__Iterator__next(val* self) {
477 abstract_collection__Iterator__next(self);
478 RET_LABEL:;
479 }
480 /* method abstract_collection#Iterator#is_ok for (self: Iterator[nullable Object]): Bool */
481 short int abstract_collection__Iterator__is_ok(val* self) {
482 short int var /* : Bool */;
483 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 160);
484 exit(1);
485 RET_LABEL:;
486 return var;
487 }
488 /* method abstract_collection#Iterator#is_ok for (self: Object): Bool */
489 short int VIRTUAL_abstract_collection__Iterator__is_ok(val* self) {
490 short int var /* : Bool */;
491 short int var1 /* : Bool */;
492 var1 = abstract_collection__Iterator__is_ok(self);
493 var = var1;
494 RET_LABEL:;
495 return var;
496 }
497 /* method abstract_collection#Container#first for (self: Container[nullable Object]): nullable Object */
498 val* abstract_collection__Container__first(val* self) {
499 val* var /* : nullable Object */;
500 val* var1 /* : nullable Object */;
501 var1 = self->attrs[COLOR_abstract_collection__Container___item].val; /* _item on <self:Container[nullable Object]> */
502 var = var1;
503 goto RET_LABEL;
504 RET_LABEL:;
505 return var;
506 }
507 /* method abstract_collection#Container#first for (self: Object): nullable Object */
508 val* VIRTUAL_abstract_collection__Container__first(val* self) {
509 val* var /* : nullable Object */;
510 val* var1 /* : nullable Object */;
511 var1 = abstract_collection__Container__first(self);
512 var = var1;
513 RET_LABEL:;
514 return var;
515 }
516 /* method abstract_collection#Container#is_empty for (self: Container[nullable Object]): Bool */
517 short int abstract_collection__Container__is_empty(val* self) {
518 short int var /* : Bool */;
519 short int var1 /* : Bool */;
520 var1 = 0;
521 var = var1;
522 goto RET_LABEL;
523 RET_LABEL:;
524 return var;
525 }
526 /* method abstract_collection#Container#is_empty for (self: Object): Bool */
527 short int VIRTUAL_abstract_collection__Container__is_empty(val* self) {
528 short int var /* : Bool */;
529 short int var1 /* : Bool */;
530 var1 = abstract_collection__Container__is_empty(self);
531 var = var1;
532 RET_LABEL:;
533 return var;
534 }
535 /* method abstract_collection#Container#length for (self: Container[nullable Object]): Int */
536 long abstract_collection__Container__length(val* self) {
537 long var /* : Int */;
538 long var1 /* : Int */;
539 var1 = 1;
540 var = var1;
541 goto RET_LABEL;
542 RET_LABEL:;
543 return var;
544 }
545 /* method abstract_collection#Container#length for (self: Object): Int */
546 long VIRTUAL_abstract_collection__Container__length(val* self) {
547 long var /* : Int */;
548 long var1 /* : Int */;
549 var1 = abstract_collection__Container__length(self);
550 var = var1;
551 RET_LABEL:;
552 return var;
553 }
554 /* method abstract_collection#Container#has for (self: Container[nullable Object], nullable Object): Bool */
555 short int abstract_collection__Container__has(val* self, val* p0) {
556 short int var /* : Bool */;
557 short int var1 /* : Bool */;
558 int cltype;
559 int idtype;
560 const struct type* type_struct;
561 short int is_nullable;
562 val* var_an_item /* var an_item: nullable Object */;
563 val* var2 /* : nullable Object */;
564 short int var3 /* : Bool */;
565 /* Covariant cast for argument 0 (an_item) <p0:nullable Object> isa Collection#0 */
566 /* <p0:nullable Object> isa Collection#0 */
567 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collection_FT0];
568 cltype = type_struct->color;
569 idtype = type_struct->id;
570 is_nullable = type_struct->is_nullable;
571 if(p0 == NULL) {
572 var1 = is_nullable;
573 } else {
574 if(cltype >= p0->type->table_size) {
575 var1 = 0;
576 } else {
577 var1 = p0->type->type_table[cltype] == idtype;
578 }
579 }
580 if (!var1) {
581 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 174);
582 exit(1);
583 }
584 var_an_item = p0;
585 var2 = self->attrs[COLOR_abstract_collection__Container___item].val; /* _item on <self:Container[nullable Object]> */
586 if (var2 == NULL) {
587 var3 = (var_an_item == NULL);
588 } else {
589 var3 = ((short int (*)(val*, val*))(var2->class->vft[COLOR_kernel__Object___61d_61d]))(var2, var_an_item) /* == on <var2:nullable Object>*/;
590 }
591 var = var3;
592 goto RET_LABEL;
593 RET_LABEL:;
594 return var;
595 }
596 /* method abstract_collection#Container#has for (self: Object, nullable Object): Bool */
597 short int VIRTUAL_abstract_collection__Container__has(val* self, val* p0) {
598 short int var /* : Bool */;
599 short int var1 /* : Bool */;
600 var1 = abstract_collection__Container__has(self, p0);
601 var = var1;
602 RET_LABEL:;
603 return var;
604 }
605 /* method abstract_collection#Container#has_only for (self: Container[nullable Object], nullable Object): Bool */
606 short int abstract_collection__Container__has_only(val* self, val* p0) {
607 short int var /* : Bool */;
608 short int var1 /* : Bool */;
609 int cltype;
610 int idtype;
611 const struct type* type_struct;
612 short int is_nullable;
613 val* var_an_item /* var an_item: nullable Object */;
614 val* var2 /* : nullable Object */;
615 short int var3 /* : Bool */;
616 /* Covariant cast for argument 0 (an_item) <p0:nullable Object> isa Collection#0 */
617 /* <p0:nullable Object> isa Collection#0 */
618 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collection_FT0];
619 cltype = type_struct->color;
620 idtype = type_struct->id;
621 is_nullable = type_struct->is_nullable;
622 if(p0 == NULL) {
623 var1 = is_nullable;
624 } else {
625 if(cltype >= p0->type->table_size) {
626 var1 = 0;
627 } else {
628 var1 = p0->type->type_table[cltype] == idtype;
629 }
630 }
631 if (!var1) {
632 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 176);
633 exit(1);
634 }
635 var_an_item = p0;
636 var2 = self->attrs[COLOR_abstract_collection__Container___item].val; /* _item on <self:Container[nullable Object]> */
637 if (var2 == NULL) {
638 var3 = (var_an_item == NULL);
639 } else {
640 var3 = ((short int (*)(val*, val*))(var2->class->vft[COLOR_kernel__Object___61d_61d]))(var2, var_an_item) /* == on <var2:nullable Object>*/;
641 }
642 var = var3;
643 goto RET_LABEL;
644 RET_LABEL:;
645 return var;
646 }
647 /* method abstract_collection#Container#has_only for (self: Object, nullable Object): Bool */
648 short int VIRTUAL_abstract_collection__Container__has_only(val* self, val* p0) {
649 short int var /* : Bool */;
650 short int var1 /* : Bool */;
651 var1 = abstract_collection__Container__has_only(self, p0);
652 var = var1;
653 RET_LABEL:;
654 return var;
655 }
656 /* method abstract_collection#Container#count for (self: Container[nullable Object], nullable Object): Int */
657 long abstract_collection__Container__count(val* self, val* p0) {
658 long var /* : Int */;
659 short int var1 /* : Bool */;
660 int cltype;
661 int idtype;
662 const struct type* type_struct;
663 short int is_nullable;
664 val* var_an_item /* var an_item: nullable Object */;
665 val* var2 /* : nullable Object */;
666 short int var3 /* : Bool */;
667 long var4 /* : Int */;
668 long var5 /* : Int */;
669 /* Covariant cast for argument 0 (an_item) <p0:nullable Object> isa Collection#0 */
670 /* <p0:nullable Object> isa Collection#0 */
671 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collection_FT0];
672 cltype = type_struct->color;
673 idtype = type_struct->id;
674 is_nullable = type_struct->is_nullable;
675 if(p0 == NULL) {
676 var1 = is_nullable;
677 } else {
678 if(cltype >= p0->type->table_size) {
679 var1 = 0;
680 } else {
681 var1 = p0->type->type_table[cltype] == idtype;
682 }
683 }
684 if (!var1) {
685 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 178);
686 exit(1);
687 }
688 var_an_item = p0;
689 var2 = self->attrs[COLOR_abstract_collection__Container___item].val; /* _item on <self:Container[nullable Object]> */
690 if (var2 == NULL) {
691 var3 = (var_an_item == NULL);
692 } else {
693 var3 = ((short int (*)(val*, val*))(var2->class->vft[COLOR_kernel__Object___61d_61d]))(var2, var_an_item) /* == on <var2:nullable Object>*/;
694 }
695 if (var3){
696 var4 = 1;
697 var = var4;
698 goto RET_LABEL;
699 } else {
700 var5 = 0;
701 var = var5;
702 goto RET_LABEL;
703 }
704 RET_LABEL:;
705 return var;
706 }
707 /* method abstract_collection#Container#count for (self: Object, nullable Object): Int */
708 long VIRTUAL_abstract_collection__Container__count(val* self, val* p0) {
709 long var /* : Int */;
710 long var1 /* : Int */;
711 var1 = abstract_collection__Container__count(self, p0);
712 var = var1;
713 RET_LABEL:;
714 return var;
715 }
716 /* method abstract_collection#Container#iterator for (self: Container[nullable Object]): Iterator[nullable Object] */
717 val* abstract_collection__Container__iterator(val* self) {
718 val* var /* : Iterator[nullable Object] */;
719 val* var1 /* : ContainerIterator[nullable Object] */;
720 var1 = NEW_abstract_collection__ContainerIterator(self->type->resolution_table->types[COLOR_abstract_collection__ContainerIteratorabstract_collection__Container_FT0]);
721 ((void (*)(val*, val*))(var1->class->vft[COLOR_abstract_collection__ContainerIterator__init]))(var1, self) /* init on <var1:ContainerIterator[nullable Object]>*/;
722 CHECK_NEW_abstract_collection__ContainerIterator(var1);
723 var = var1;
724 goto RET_LABEL;
725 RET_LABEL:;
726 return var;
727 }
728 /* method abstract_collection#Container#iterator for (self: Object): Iterator[nullable Object] */
729 val* VIRTUAL_abstract_collection__Container__iterator(val* self) {
730 val* var /* : Iterator[nullable Object] */;
731 val* var1 /* : Iterator[nullable Object] */;
732 var1 = abstract_collection__Container__iterator(self);
733 var = var1;
734 RET_LABEL:;
735 return var;
736 }
737 /* method abstract_collection#Container#init for (self: Container[nullable Object], nullable Object) */
738 void abstract_collection__Container__init(val* self, val* p0) {
739 short int var /* : Bool */;
740 int cltype;
741 int idtype;
742 const struct type* type_struct;
743 short int is_nullable;
744 val* var_e /* var e: nullable Object */;
745 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Container#0 */
746 /* <p0:nullable Object> isa Container#0 */
747 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Container_FT0];
748 cltype = type_struct->color;
749 idtype = type_struct->id;
750 is_nullable = type_struct->is_nullable;
751 if(p0 == NULL) {
752 var = is_nullable;
753 } else {
754 if(cltype >= p0->type->table_size) {
755 var = 0;
756 } else {
757 var = p0->type->type_table[cltype] == idtype;
758 }
759 }
760 if (!var) {
761 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 189);
762 exit(1);
763 }
764 var_e = p0;
765 self->attrs[COLOR_abstract_collection__Container___item].val = var_e; /* _item on <self:Container[nullable Object]> */
766 RET_LABEL:;
767 }
768 /* method abstract_collection#Container#init for (self: Object, nullable Object) */
769 void VIRTUAL_abstract_collection__Container__init(val* self, val* p0) {
770 abstract_collection__Container__init(self, p0);
771 RET_LABEL:;
772 }
773 /* method abstract_collection#Container#item for (self: Container[nullable Object]): nullable Object */
774 val* abstract_collection__Container__item(val* self) {
775 val* var /* : nullable Object */;
776 val* var1 /* : nullable Object */;
777 var1 = self->attrs[COLOR_abstract_collection__Container___item].val; /* _item on <self:Container[nullable Object]> */
778 var = var1;
779 RET_LABEL:;
780 return var;
781 }
782 /* method abstract_collection#Container#item for (self: Object): nullable Object */
783 val* VIRTUAL_abstract_collection__Container__item(val* self) {
784 val* var /* : nullable Object */;
785 val* var1 /* : nullable Object */;
786 var1 = abstract_collection__Container__item(self);
787 var = var1;
788 RET_LABEL:;
789 return var;
790 }
791 /* method abstract_collection#Container#item= for (self: Container[nullable Object], nullable Object) */
792 void abstract_collection__Container__item_61d(val* self, val* p0) {
793 short int var /* : Bool */;
794 int cltype;
795 int idtype;
796 const struct type* type_struct;
797 short int is_nullable;
798 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Container#0 */
799 /* <p0:nullable Object> isa Container#0 */
800 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Container_FT0];
801 cltype = type_struct->color;
802 idtype = type_struct->id;
803 is_nullable = type_struct->is_nullable;
804 if(p0 == NULL) {
805 var = is_nullable;
806 } else {
807 if(cltype >= p0->type->table_size) {
808 var = 0;
809 } else {
810 var = p0->type->type_table[cltype] == idtype;
811 }
812 }
813 if (!var) {
814 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 192);
815 exit(1);
816 }
817 self->attrs[COLOR_abstract_collection__Container___item].val = p0; /* _item on <self:Container[nullable Object]> */
818 RET_LABEL:;
819 }
820 /* method abstract_collection#Container#item= for (self: Object, nullable Object) */
821 void VIRTUAL_abstract_collection__Container__item_61d(val* self, val* p0) {
822 abstract_collection__Container__item_61d(self, p0);
823 RET_LABEL:;
824 }
825 /* method abstract_collection#ContainerIterator#item for (self: ContainerIterator[nullable Object]): nullable Object */
826 val* abstract_collection__ContainerIterator__item(val* self) {
827 val* var /* : nullable Object */;
828 val* var1 /* : Container[nullable Object] */;
829 val* var2 /* : nullable Object */;
830 var1 = self->attrs[COLOR_abstract_collection__ContainerIterator___container].val; /* _container on <self:ContainerIterator[nullable Object]> */
831 if (var1 == NULL) {
832 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Uninitialized attribute _container", "lib/standard/collection/abstract_collection.nit", 199);
833 exit(1);
834 }
835 var2 = ((val* (*)(val*))(var1->class->vft[COLOR_abstract_collection__Container__item]))(var1) /* item on <var1:Container[nullable Object]>*/;
836 var = var2;
837 goto RET_LABEL;
838 RET_LABEL:;
839 return var;
840 }
841 /* method abstract_collection#ContainerIterator#item for (self: Object): nullable Object */
842 val* VIRTUAL_abstract_collection__ContainerIterator__item(val* self) {
843 val* var /* : nullable Object */;
844 val* var1 /* : nullable Object */;
845 var1 = abstract_collection__ContainerIterator__item(self);
846 var = var1;
847 RET_LABEL:;
848 return var;
849 }
850 /* method abstract_collection#ContainerIterator#next for (self: ContainerIterator[nullable Object]) */
851 void abstract_collection__ContainerIterator__next(val* self) {
852 short int var /* : Bool */;
853 var = 0;
854 self->attrs[COLOR_abstract_collection__ContainerIterator___is_ok].s = var; /* _is_ok on <self:ContainerIterator[nullable Object]> */
855 RET_LABEL:;
856 }
857 /* method abstract_collection#ContainerIterator#next for (self: Object) */
858 void VIRTUAL_abstract_collection__ContainerIterator__next(val* self) {
859 abstract_collection__ContainerIterator__next(self);
860 RET_LABEL:;
861 }
862 /* method abstract_collection#ContainerIterator#init for (self: ContainerIterator[nullable Object], Container[nullable Object]) */
863 void abstract_collection__ContainerIterator__init(val* self, val* p0) {
864 short int var /* : Bool */;
865 int cltype;
866 int idtype;
867 const struct type* type_struct;
868 val* var_c /* var c: Container[nullable Object] */;
869 /* Covariant cast for argument 0 (c) <p0:Container[nullable Object]> isa Container[ContainerIterator#0] */
870 /* <p0:Container[nullable Object]> isa Container[ContainerIterator#0] */
871 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Containerabstract_collection__ContainerIterator_FT0];
872 cltype = type_struct->color;
873 idtype = type_struct->id;
874 if(cltype >= p0->type->table_size) {
875 var = 0;
876 } else {
877 var = p0->type->type_table[cltype] == idtype;
878 }
879 if (!var) {
880 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 203);
881 exit(1);
882 }
883 var_c = p0;
884 self->attrs[COLOR_abstract_collection__ContainerIterator___container].val = var_c; /* _container on <self:ContainerIterator[nullable Object]> */
885 RET_LABEL:;
886 }
887 /* method abstract_collection#ContainerIterator#init for (self: Object, Container[nullable Object]) */
888 void VIRTUAL_abstract_collection__ContainerIterator__init(val* self, val* p0) {
889 abstract_collection__ContainerIterator__init(self, p0);
890 RET_LABEL:;
891 }
892 /* method abstract_collection#ContainerIterator#is_ok for (self: ContainerIterator[nullable Object]): Bool */
893 short int abstract_collection__ContainerIterator__is_ok(val* self) {
894 short int var /* : Bool */;
895 short int var1 /* : Bool */;
896 var1 = self->attrs[COLOR_abstract_collection__ContainerIterator___is_ok].s; /* _is_ok on <self:ContainerIterator[nullable Object]> */
897 var = var1;
898 RET_LABEL:;
899 return var;
900 }
901 /* method abstract_collection#ContainerIterator#is_ok for (self: Object): Bool */
902 short int VIRTUAL_abstract_collection__ContainerIterator__is_ok(val* self) {
903 short int var /* : Bool */;
904 short int var1 /* : Bool */;
905 var1 = abstract_collection__ContainerIterator__is_ok(self);
906 var = var1;
907 RET_LABEL:;
908 return var;
909 }
910 /* method abstract_collection#RemovableCollection#clear for (self: RemovableCollection[nullable Object]) */
911 void abstract_collection__RemovableCollection__clear(val* self) {
912 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 213);
913 exit(1);
914 RET_LABEL:;
915 }
916 /* method abstract_collection#RemovableCollection#clear for (self: Object) */
917 void VIRTUAL_abstract_collection__RemovableCollection__clear(val* self) {
918 abstract_collection__RemovableCollection__clear(self);
919 RET_LABEL:;
920 }
921 /* method abstract_collection#RemovableCollection#remove for (self: RemovableCollection[nullable Object], nullable Object) */
922 void abstract_collection__RemovableCollection__remove(val* self, val* p0) {
923 short int var /* : Bool */;
924 int cltype;
925 int idtype;
926 const struct type* type_struct;
927 short int is_nullable;
928 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa RemovableCollection#0 */
929 /* <p0:nullable Object> isa RemovableCollection#0 */
930 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__RemovableCollection_FT0];
931 cltype = type_struct->color;
932 idtype = type_struct->id;
933 is_nullable = type_struct->is_nullable;
934 if(p0 == NULL) {
935 var = is_nullable;
936 } else {
937 if(cltype >= p0->type->table_size) {
938 var = 0;
939 } else {
940 var = p0->type->type_table[cltype] == idtype;
941 }
942 }
943 if (!var) {
944 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 216);
945 exit(1);
946 }
947 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 216);
948 exit(1);
949 RET_LABEL:;
950 }
951 /* method abstract_collection#RemovableCollection#remove for (self: Object, nullable Object) */
952 void VIRTUAL_abstract_collection__RemovableCollection__remove(val* self, val* p0) {
953 abstract_collection__RemovableCollection__remove(self, p0);
954 RET_LABEL:;
955 }
956 /* method abstract_collection#RemovableCollection#remove_all for (self: RemovableCollection[nullable Object], nullable Object) */
957 void abstract_collection__RemovableCollection__remove_all(val* self, val* p0) {
958 short int var /* : Bool */;
959 int cltype;
960 int idtype;
961 const struct type* type_struct;
962 short int is_nullable;
963 val* var_item /* var item: nullable Object */;
964 short int var1 /* : Bool */;
965 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa RemovableCollection#0 */
966 /* <p0:nullable Object> isa RemovableCollection#0 */
967 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__RemovableCollection_FT0];
968 cltype = type_struct->color;
969 idtype = type_struct->id;
970 is_nullable = type_struct->is_nullable;
971 if(p0 == NULL) {
972 var = is_nullable;
973 } else {
974 if(cltype >= p0->type->table_size) {
975 var = 0;
976 } else {
977 var = p0->type->type_table[cltype] == idtype;
978 }
979 }
980 if (!var) {
981 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 219);
982 exit(1);
983 }
984 var_item = p0;
985 for(;;) {
986 var1 = ((short int (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__Collection__has]))(self, var_item) /* has on <self:RemovableCollection[nullable Object]>*/;
987 if (!var1) break;
988 ((void (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__RemovableCollection__remove]))(self, var_item) /* remove on <self:RemovableCollection[nullable Object]>*/;
989 CONTINUE_label: (void)0;
990 }
991 BREAK_label: (void)0;
992 RET_LABEL:;
993 }
994 /* method abstract_collection#RemovableCollection#remove_all for (self: Object, nullable Object) */
995 void VIRTUAL_abstract_collection__RemovableCollection__remove_all(val* self, val* p0) {
996 abstract_collection__RemovableCollection__remove_all(self, p0);
997 RET_LABEL:;
998 }
999 /* method abstract_collection#SimpleCollection#add for (self: SimpleCollection[nullable Object], nullable Object) */
1000 void abstract_collection__SimpleCollection__add(val* self, val* p0) {
1001 short int var /* : Bool */;
1002 int cltype;
1003 int idtype;
1004 const struct type* type_struct;
1005 short int is_nullable;
1006 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa SimpleCollection#0 */
1007 /* <p0:nullable Object> isa SimpleCollection#0 */
1008 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__SimpleCollection_FT0];
1009 cltype = type_struct->color;
1010 idtype = type_struct->id;
1011 is_nullable = type_struct->is_nullable;
1012 if(p0 == NULL) {
1013 var = is_nullable;
1014 } else {
1015 if(cltype >= p0->type->table_size) {
1016 var = 0;
1017 } else {
1018 var = p0->type->type_table[cltype] == idtype;
1019 }
1020 }
1021 if (!var) {
1022 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 226);
1023 exit(1);
1024 }
1025 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 226);
1026 exit(1);
1027 RET_LABEL:;
1028 }
1029 /* method abstract_collection#SimpleCollection#add for (self: Object, nullable Object) */
1030 void VIRTUAL_abstract_collection__SimpleCollection__add(val* self, val* p0) {
1031 abstract_collection__SimpleCollection__add(self, p0);
1032 RET_LABEL:;
1033 }
1034 /* method abstract_collection#SimpleCollection#add_all for (self: SimpleCollection[nullable Object], Collection[nullable Object]) */
1035 void abstract_collection__SimpleCollection__add_all(val* self, val* p0) {
1036 short int var /* : Bool */;
1037 int cltype;
1038 int idtype;
1039 const struct type* type_struct;
1040 val* var_coll /* var coll: Collection[nullable Object] */;
1041 val* var1 /* : Iterator[nullable Object] */;
1042 short int var2 /* : Bool */;
1043 val* var3 /* : nullable Object */;
1044 val* var_i /* var i: nullable Object */;
1045 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[SimpleCollection#0] */
1046 /* <p0:Collection[nullable Object]> isa Collection[SimpleCollection#0] */
1047 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collectionabstract_collection__SimpleCollection_FT0];
1048 cltype = type_struct->color;
1049 idtype = type_struct->id;
1050 if(cltype >= p0->type->table_size) {
1051 var = 0;
1052 } else {
1053 var = p0->type->type_table[cltype] == idtype;
1054 }
1055 if (!var) {
1056 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 230);
1057 exit(1);
1058 }
1059 var_coll = p0;
1060 var1 = ((val* (*)(val*))(var_coll->class->vft[COLOR_abstract_collection__Collection__iterator]))(var_coll) /* iterator on <var_coll:Collection[nullable Object]>*/;
1061 for(;;) {
1062 var2 = ((short int (*)(val*))(var1->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var1) /* is_ok on <var1:Iterator[nullable Object]>*/;
1063 if(!var2) break;
1064 var3 = ((val* (*)(val*))(var1->class->vft[COLOR_abstract_collection__Iterator__item]))(var1) /* item on <var1:Iterator[nullable Object]>*/;
1065 var_i = var3;
1066 ((void (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__SimpleCollection__add]))(self, var_i) /* add on <self:SimpleCollection[nullable Object]>*/;
1067 CONTINUE_label: (void)0;
1068 ((void (*)(val*))(var1->class->vft[COLOR_abstract_collection__Iterator__next]))(var1) /* next on <var1:Iterator[nullable Object]>*/;
1069 }
1070 BREAK_label: (void)0;
1071 RET_LABEL:;
1072 }
1073 /* method abstract_collection#SimpleCollection#add_all for (self: Object, Collection[nullable Object]) */
1074 void VIRTUAL_abstract_collection__SimpleCollection__add_all(val* self, val* p0) {
1075 abstract_collection__SimpleCollection__add_all(self, p0);
1076 RET_LABEL:;
1077 }
1078 /* method abstract_collection#Set#has_only for (self: Set[Object], Object): Bool */
1079 short int abstract_collection__Set__has_only(val* self, val* p0) {
1080 short int var /* : Bool */;
1081 short int var1 /* : Bool */;
1082 int cltype;
1083 int idtype;
1084 const struct type* type_struct;
1085 val* var_item /* var item: Object */;
1086 long var2 /* : Int */;
1087 long var_l /* var l: Int */;
1088 long var3 /* : Int */;
1089 short int var4 /* : Bool */;
1090 short int var6 /* : Bool */;
1091 short int var7 /* : Bool */;
1092 long var8 /* : Int */;
1093 short int var9 /* : Bool */;
1094 short int var11 /* : Bool */;
1095 short int var12 /* : Bool */;
1096 short int var13 /* : Bool */;
1097 /* Covariant cast for argument 0 (item) <p0:Object> isa Collection#0 */
1098 /* <p0:Object> isa Collection#0 */
1099 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collection_FT0];
1100 cltype = type_struct->color;
1101 idtype = type_struct->id;
1102 if(cltype >= p0->type->table_size) {
1103 var1 = 0;
1104 } else {
1105 var1 = p0->type->type_table[cltype] == idtype;
1106 }
1107 if (!var1) {
1108 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 246);
1109 exit(1);
1110 }
1111 var_item = p0;
1112 var2 = ((long (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__length]))(self) /* length on <self:Set[Object]>*/;
1113 var_l = var2;
1114 var3 = 1;
1115 { /* Inline kernel#Int#== (var_l,var3) */
1116 var6 = var_l == var3;
1117 var4 = var6;
1118 goto RET_LABEL5;
1119 RET_LABEL5:(void)0;
1120 }
1121 if (var4){
1122 var7 = ((short int (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__Collection__has]))(self, var_item) /* has on <self:Set[Object]>*/;
1123 var = var7;
1124 goto RET_LABEL;
1125 } else {
1126 var8 = 0;
1127 { /* Inline kernel#Int#== (var_l,var8) */
1128 var11 = var_l == var8;
1129 var9 = var11;
1130 goto RET_LABEL10;
1131 RET_LABEL10:(void)0;
1132 }
1133 if (var9){
1134 var12 = 1;
1135 var = var12;
1136 goto RET_LABEL;
1137 } else {
1138 var13 = 0;
1139 var = var13;
1140 goto RET_LABEL;
1141 }
1142 }
1143 RET_LABEL:;
1144 return var;
1145 }
1146 /* method abstract_collection#Set#has_only for (self: Object, nullable Object): Bool */
1147 short int VIRTUAL_abstract_collection__Set__has_only(val* self, val* p0) {
1148 short int var /* : Bool */;
1149 short int var1 /* : Bool */;
1150 var1 = abstract_collection__Set__has_only(self, p0);
1151 var = var1;
1152 RET_LABEL:;
1153 return var;
1154 }
1155 /* method abstract_collection#Set#count for (self: Set[Object], Object): Int */
1156 long abstract_collection__Set__count(val* self, val* p0) {
1157 long var /* : Int */;
1158 short int var1 /* : Bool */;
1159 int cltype;
1160 int idtype;
1161 const struct type* type_struct;
1162 val* var_item /* var item: Object */;
1163 short int var2 /* : Bool */;
1164 long var3 /* : Int */;
1165 long var4 /* : Int */;
1166 /* Covariant cast for argument 0 (item) <p0:Object> isa Collection#0 */
1167 /* <p0:Object> isa Collection#0 */
1168 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collection_FT0];
1169 cltype = type_struct->color;
1170 idtype = type_struct->id;
1171 if(cltype >= p0->type->table_size) {
1172 var1 = 0;
1173 } else {
1174 var1 = p0->type->type_table[cltype] == idtype;
1175 }
1176 if (!var1) {
1177 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 258);
1178 exit(1);
1179 }
1180 var_item = p0;
1181 var2 = ((short int (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__Collection__has]))(self, var_item) /* has on <self:Set[Object]>*/;
1182 if (var2){
1183 var3 = 1;
1184 var = var3;
1185 goto RET_LABEL;
1186 } else {
1187 var4 = 0;
1188 var = var4;
1189 goto RET_LABEL;
1190 }
1191 RET_LABEL:;
1192 return var;
1193 }
1194 /* method abstract_collection#Set#count for (self: Object, nullable Object): Int */
1195 long VIRTUAL_abstract_collection__Set__count(val* self, val* p0) {
1196 long var /* : Int */;
1197 long var1 /* : Int */;
1198 var1 = abstract_collection__Set__count(self, p0);
1199 var = var1;
1200 RET_LABEL:;
1201 return var;
1202 }
1203 /* method abstract_collection#Set#remove_all for (self: Set[Object], Object) */
1204 void abstract_collection__Set__remove_all(val* self, val* p0) {
1205 short int var /* : Bool */;
1206 int cltype;
1207 int idtype;
1208 const struct type* type_struct;
1209 val* var_item /* var item: Object */;
1210 /* Covariant cast for argument 0 (item) <p0:Object> isa RemovableCollection#0 */
1211 /* <p0:Object> isa RemovableCollection#0 */
1212 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__RemovableCollection_FT0];
1213 cltype = type_struct->color;
1214 idtype = type_struct->id;
1215 if(cltype >= p0->type->table_size) {
1216 var = 0;
1217 } else {
1218 var = p0->type->type_table[cltype] == idtype;
1219 }
1220 if (!var) {
1221 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 268);
1222 exit(1);
1223 }
1224 var_item = p0;
1225 ((void (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__RemovableCollection__remove]))(self, var_item) /* remove on <self:Set[Object]>*/;
1226 RET_LABEL:;
1227 }
1228 /* method abstract_collection#Set#remove_all for (self: Object, nullable Object) */
1229 void VIRTUAL_abstract_collection__Set__remove_all(val* self, val* p0) {
1230 abstract_collection__Set__remove_all(self, p0);
1231 RET_LABEL:;
1232 }
1233 /* method abstract_collection#Set#== for (self: Set[Object], nullable Object): Bool */
1234 short int abstract_collection__Set___61d_61d(val* self, val* p0) {
1235 short int var /* : Bool */;
1236 val* var_other /* var other: nullable Object */;
1237 short int var1 /* : Bool */;
1238 int cltype;
1239 int idtype;
1240 short int var2 /* : Bool */;
1241 short int var3 /* : Bool */;
1242 long var4 /* : Int */;
1243 long var5 /* : Int */;
1244 short int var6 /* : Bool */;
1245 short int var8 /* : Bool */;
1246 short int var9 /* : Bool */;
1247 short int var10 /* : Bool */;
1248 short int var11 /* : Bool */;
1249 int cltype12;
1250 int idtype13;
1251 const struct type* type_struct;
1252 short int var14 /* : Bool */;
1253 var_other = p0;
1254 /* <var_other:nullable Object> isa Set[Object] */
1255 cltype = type_abstract_collection__Setkernel__Object.color;
1256 idtype = type_abstract_collection__Setkernel__Object.id;
1257 if(var_other == NULL) {
1258 var1 = 0;
1259 } else {
1260 if(cltype >= var_other->type->table_size) {
1261 var1 = 0;
1262 } else {
1263 var1 = var_other->type->type_table[cltype] == idtype;
1264 }
1265 }
1266 var2 = !var1;
1267 if (var2){
1268 var3 = 0;
1269 var = var3;
1270 goto RET_LABEL;
1271 } else {
1272 }
1273 var4 = ((long (*)(val*))(var_other->class->vft[COLOR_abstract_collection__Collection__length]))(var_other) /* length on <var_other:nullable Object(Set[Object])>*/;
1274 var5 = ((long (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__length]))(self) /* length on <self:Set[Object]>*/;
1275 { /* Inline kernel#Int#!= (var4,var5) */
1276 var8 = var4 == var5;
1277 var9 = !var8;
1278 var6 = var9;
1279 goto RET_LABEL7;
1280 RET_LABEL7:(void)0;
1281 }
1282 if (var6){
1283 var10 = 0;
1284 var = var10;
1285 goto RET_LABEL;
1286 } else {
1287 }
1288 /* <var_other:nullable Object(Set[Object])> isa Collection[Set#0] */
1289 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collectionabstract_collection__Set_FT0];
1290 cltype12 = type_struct->color;
1291 idtype13 = type_struct->id;
1292 if(cltype12 >= var_other->type->table_size) {
1293 var11 = 0;
1294 } else {
1295 var11 = var_other->type->type_table[cltype12] == idtype13;
1296 }
1297 if (!var11) {
1298 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 276);
1299 exit(1);
1300 }
1301 var14 = ((short int (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__Collection__has_all]))(self, var_other) /* has_all on <self:Set[Object]>*/;
1302 var = var14;
1303 goto RET_LABEL;
1304 RET_LABEL:;
1305 return var;
1306 }
1307 /* method abstract_collection#Set#== for (self: Object, nullable Object): Bool */
1308 short int VIRTUAL_abstract_collection__Set___61d_61d(val* self, val* p0) {
1309 short int var /* : Bool */;
1310 short int var1 /* : Bool */;
1311 var1 = abstract_collection__Set___61d_61d(self, p0);
1312 var = var1;
1313 RET_LABEL:;
1314 return var;
1315 }
1316 /* method abstract_collection#Set#hash for (self: Set[Object]): Int */
1317 long abstract_collection__Set__hash(val* self) {
1318 long var /* : Int */;
1319 long var1 /* : Int */;
1320 long var_res /* var res: Int */;
1321 val* var2 /* : Iterator[nullable Object] */;
1322 short int var3 /* : Bool */;
1323 val* var4 /* : nullable Object */;
1324 val* var_e /* var e: Object */;
1325 long var5 /* : Int */;
1326 long var6 /* : Int */;
1327 long var8 /* : Int */;
1328 var1 = 0;
1329 var_res = var1;
1330 var2 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__iterator]))(self) /* iterator on <self:Set[Object]>*/;
1331 for(;;) {
1332 var3 = ((short int (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var2) /* is_ok on <var2:Iterator[nullable Object]>*/;
1333 if(!var3) break;
1334 var4 = ((val* (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__item]))(var2) /* item on <var2:Iterator[nullable Object]>*/;
1335 var_e = var4;
1336 var5 = kernel__Int__hash(var_res);
1337 { /* Inline kernel#Int#+ (var_res,var5) */
1338 var8 = var_res + var5;
1339 var6 = var8;
1340 goto RET_LABEL7;
1341 RET_LABEL7:(void)0;
1342 }
1343 var_res = var6;
1344 CONTINUE_label: (void)0;
1345 ((void (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__next]))(var2) /* next on <var2:Iterator[nullable Object]>*/;
1346 }
1347 BREAK_label: (void)0;
1348 var = var_res;
1349 goto RET_LABEL;
1350 RET_LABEL:;
1351 return var;
1352 }
1353 /* method abstract_collection#Set#hash for (self: Object): Int */
1354 long VIRTUAL_abstract_collection__Set__hash(val* self) {
1355 long var /* : Int */;
1356 long var1 /* : Int */;
1357 var1 = abstract_collection__Set__hash(self);
1358 var = var1;
1359 RET_LABEL:;
1360 return var;
1361 }
1362 /* method abstract_collection#MapRead#[] for (self: MapRead[Object, nullable Object], Object): nullable Object */
1363 val* abstract_collection__MapRead___91d_93d(val* self, val* p0) {
1364 val* var /* : nullable Object */;
1365 short int var1 /* : Bool */;
1366 int cltype;
1367 int idtype;
1368 const struct type* type_struct;
1369 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1370 /* <p0:Object> isa MapRead#0 */
1371 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__MapRead_FT0];
1372 cltype = type_struct->color;
1373 idtype = type_struct->id;
1374 if(cltype >= p0->type->table_size) {
1375 var1 = 0;
1376 } else {
1377 var1 = p0->type->type_table[cltype] == idtype;
1378 }
1379 if (!var1) {
1380 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 290);
1381 exit(1);
1382 }
1383 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 290);
1384 exit(1);
1385 RET_LABEL:;
1386 return var;
1387 }
1388 /* method abstract_collection#MapRead#[] for (self: Object, Object): nullable Object */
1389 val* VIRTUAL_abstract_collection__MapRead___91d_93d(val* self, val* p0) {
1390 val* var /* : nullable Object */;
1391 val* var1 /* : nullable Object */;
1392 var1 = abstract_collection__MapRead___91d_93d(self, p0);
1393 var = var1;
1394 RET_LABEL:;
1395 return var;
1396 }
1397 /* method abstract_collection#MapRead#get_or_default for (self: MapRead[Object, nullable Object], Object, nullable Object): nullable Object */
1398 val* abstract_collection__MapRead__get_or_default(val* self, val* p0, val* p1) {
1399 val* var /* : nullable Object */;
1400 short int var1 /* : Bool */;
1401 int cltype;
1402 int idtype;
1403 const struct type* type_struct;
1404 short int var2 /* : Bool */;
1405 int cltype3;
1406 int idtype4;
1407 const struct type* type_struct5;
1408 short int is_nullable;
1409 val* var_key /* var key: Object */;
1410 val* var_default /* var default: nullable Object */;
1411 short int var6 /* : Bool */;
1412 val* var7 /* : nullable Object */;
1413 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1414 /* <p0:Object> isa MapRead#0 */
1415 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__MapRead_FT0];
1416 cltype = type_struct->color;
1417 idtype = type_struct->id;
1418 if(cltype >= p0->type->table_size) {
1419 var1 = 0;
1420 } else {
1421 var1 = p0->type->type_table[cltype] == idtype;
1422 }
1423 if (!var1) {
1424 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 293);
1425 exit(1);
1426 }
1427 /* Covariant cast for argument 1 (default) <p1:nullable Object> isa MapRead#1 */
1428 /* <p1:nullable Object> isa MapRead#1 */
1429 type_struct5 = self->type->resolution_table->types[COLOR_abstract_collection__MapRead_FT1];
1430 cltype3 = type_struct5->color;
1431 idtype4 = type_struct5->id;
1432 is_nullable = type_struct5->is_nullable;
1433 if(p1 == NULL) {
1434 var2 = is_nullable;
1435 } else {
1436 if(cltype3 >= p1->type->table_size) {
1437 var2 = 0;
1438 } else {
1439 var2 = p1->type->type_table[cltype3] == idtype4;
1440 }
1441 }
1442 if (!var2) {
1443 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 293);
1444 exit(1);
1445 }
1446 var_key = p0;
1447 var_default = p1;
1448 var6 = ((short int (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__MapRead__has_key]))(self, var_key) /* has_key on <self:MapRead[Object, nullable Object]>*/;
1449 if (var6){
1450 var7 = ((val* (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(self, var_key) /* [] on <self:MapRead[Object, nullable Object]>*/;
1451 var = var7;
1452 goto RET_LABEL;
1453 } else {
1454 }
1455 var = var_default;
1456 goto RET_LABEL;
1457 RET_LABEL:;
1458 return var;
1459 }
1460 /* method abstract_collection#MapRead#get_or_default for (self: Object, Object, nullable Object): nullable Object */
1461 val* VIRTUAL_abstract_collection__MapRead__get_or_default(val* self, val* p0, val* p1) {
1462 val* var /* : nullable Object */;
1463 val* var1 /* : nullable Object */;
1464 var1 = abstract_collection__MapRead__get_or_default(self, p0, p1);
1465 var = var1;
1466 RET_LABEL:;
1467 return var;
1468 }
1469 /* method abstract_collection#MapRead#has_key for (self: MapRead[Object, nullable Object], Object): Bool */
1470 short int abstract_collection__MapRead__has_key(val* self, val* p0) {
1471 short int var /* : Bool */;
1472 short int var1 /* : Bool */;
1473 int cltype;
1474 int idtype;
1475 const struct type* type_struct;
1476 val* var_key /* var key: Object */;
1477 val* var2 /* : Collection[Object] */;
1478 short int var3 /* : Bool */;
1479 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1480 /* <p0:Object> isa MapRead#0 */
1481 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__MapRead_FT0];
1482 cltype = type_struct->color;
1483 idtype = type_struct->id;
1484 if(cltype >= p0->type->table_size) {
1485 var1 = 0;
1486 } else {
1487 var1 = p0->type->type_table[cltype] == idtype;
1488 }
1489 if (!var1) {
1490 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 300);
1491 exit(1);
1492 }
1493 var_key = p0;
1494 var2 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__MapRead__keys]))(self) /* keys on <self:MapRead[Object, nullable Object]>*/;
1495 var3 = ((short int (*)(val*, val*))(var2->class->vft[COLOR_abstract_collection__Collection__has]))(var2, var_key) /* has on <var2:Collection[Object]>*/;
1496 var = var3;
1497 goto RET_LABEL;
1498 RET_LABEL:;
1499 return var;
1500 }
1501 /* method abstract_collection#MapRead#has_key for (self: Object, Object): Bool */
1502 short int VIRTUAL_abstract_collection__MapRead__has_key(val* self, val* p0) {
1503 short int var /* : Bool */;
1504 short int var1 /* : Bool */;
1505 var1 = abstract_collection__MapRead__has_key(self, p0);
1506 var = var1;
1507 RET_LABEL:;
1508 return var;
1509 }
1510 /* method abstract_collection#MapRead#iterator for (self: MapRead[Object, nullable Object]): MapIterator[Object, nullable Object] */
1511 val* abstract_collection__MapRead__iterator(val* self) {
1512 val* var /* : MapIterator[Object, nullable Object] */;
1513 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 303);
1514 exit(1);
1515 RET_LABEL:;
1516 return var;
1517 }
1518 /* method abstract_collection#MapRead#iterator for (self: Object): MapIterator[Object, nullable Object] */
1519 val* VIRTUAL_abstract_collection__MapRead__iterator(val* self) {
1520 val* var /* : MapIterator[Object, nullable Object] */;
1521 val* var1 /* : MapIterator[Object, nullable Object] */;
1522 var1 = abstract_collection__MapRead__iterator(self);
1523 var = var1;
1524 RET_LABEL:;
1525 return var;
1526 }
1527 /* method abstract_collection#MapRead#iterate for (self: MapRead[Object, nullable Object]) */
1528 void abstract_collection__MapRead__iterate(val* self) {
1529 val* var /* : MapIterator[Object, nullable Object] */;
1530 val* var_i /* var i: MapIterator[Object, nullable Object] */;
1531 short int var1 /* : Bool */;
1532 var = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__MapRead__iterator]))(self) /* iterator on <self:MapRead[Object, nullable Object]>*/;
1533 var_i = var;
1534 for(;;) {
1535 var1 = ((short int (*)(val*))(var_i->class->vft[COLOR_abstract_collection__MapIterator__is_ok]))(var_i) /* is_ok on <var_i:MapIterator[Object, nullable Object]>*/;
1536 if (!var1) break;
1537 printf("NOT YET IMPLEMENTED AClosureCallExpr:lib/standard/collection/abstract_collection.nit:312,4--22\n");
1538 ((void (*)(val*))(var_i->class->vft[COLOR_abstract_collection__MapIterator__next]))(var_i) /* next on <var_i:MapIterator[Object, nullable Object]>*/;
1539 CONTINUE_label: (void)0;
1540 }
1541 BREAK_label: (void)0;
1542 RET_LABEL:;
1543 }
1544 /* method abstract_collection#MapRead#iterate for (self: Object) */
1545 void VIRTUAL_abstract_collection__MapRead__iterate(val* self) {
1546 abstract_collection__MapRead__iterate(self);
1547 RET_LABEL:;
1548 }
1549 /* method abstract_collection#MapRead#values for (self: MapRead[Object, nullable Object]): Collection[nullable Object] */
1550 val* abstract_collection__MapRead__values(val* self) {
1551 val* var /* : Collection[nullable Object] */;
1552 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 317);
1553 exit(1);
1554 RET_LABEL:;
1555 return var;
1556 }
1557 /* method abstract_collection#MapRead#values for (self: Object): Collection[nullable Object] */
1558 val* VIRTUAL_abstract_collection__MapRead__values(val* self) {
1559 val* var /* : Collection[nullable Object] */;
1560 val* var1 /* : Collection[nullable Object] */;
1561 var1 = abstract_collection__MapRead__values(self);
1562 var = var1;
1563 RET_LABEL:;
1564 return var;
1565 }
1566 /* method abstract_collection#MapRead#keys for (self: MapRead[Object, nullable Object]): Collection[Object] */
1567 val* abstract_collection__MapRead__keys(val* self) {
1568 val* var /* : Collection[Object] */;
1569 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 322);
1570 exit(1);
1571 RET_LABEL:;
1572 return var;
1573 }
1574 /* method abstract_collection#MapRead#keys for (self: Object): Collection[Object] */
1575 val* VIRTUAL_abstract_collection__MapRead__keys(val* self) {
1576 val* var /* : Collection[Object] */;
1577 val* var1 /* : Collection[Object] */;
1578 var1 = abstract_collection__MapRead__keys(self);
1579 var = var1;
1580 RET_LABEL:;
1581 return var;
1582 }
1583 /* method abstract_collection#MapRead#is_empty for (self: MapRead[Object, nullable Object]): Bool */
1584 short int abstract_collection__MapRead__is_empty(val* self) {
1585 short int var /* : Bool */;
1586 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 327);
1587 exit(1);
1588 RET_LABEL:;
1589 return var;
1590 }
1591 /* method abstract_collection#MapRead#is_empty for (self: Object): Bool */
1592 short int VIRTUAL_abstract_collection__MapRead__is_empty(val* self) {
1593 short int var /* : Bool */;
1594 short int var1 /* : Bool */;
1595 var1 = abstract_collection__MapRead__is_empty(self);
1596 var = var1;
1597 RET_LABEL:;
1598 return var;
1599 }
1600 /* method abstract_collection#MapRead#length for (self: MapRead[Object, nullable Object]): Int */
1601 long abstract_collection__MapRead__length(val* self) {
1602 long var /* : Int */;
1603 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 330);
1604 exit(1);
1605 RET_LABEL:;
1606 return var;
1607 }
1608 /* method abstract_collection#MapRead#length for (self: Object): Int */
1609 long VIRTUAL_abstract_collection__MapRead__length(val* self) {
1610 long var /* : Int */;
1611 long var1 /* : Int */;
1612 var1 = abstract_collection__MapRead__length(self);
1613 var = var1;
1614 RET_LABEL:;
1615 return var;
1616 }
1617 /* method abstract_collection#Map#[]= for (self: Map[Object, nullable Object], Object, nullable Object) */
1618 void abstract_collection__Map___91d_93d_61d(val* self, val* p0, val* p1) {
1619 short int var /* : Bool */;
1620 int cltype;
1621 int idtype;
1622 const struct type* type_struct;
1623 short int var1 /* : Bool */;
1624 int cltype2;
1625 int idtype3;
1626 const struct type* type_struct4;
1627 short int is_nullable;
1628 /* Covariant cast for argument 0 (key) <p0:Object> isa Map#0 */
1629 /* <p0:Object> isa Map#0 */
1630 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Map_FT0];
1631 cltype = type_struct->color;
1632 idtype = type_struct->id;
1633 if(cltype >= p0->type->table_size) {
1634 var = 0;
1635 } else {
1636 var = p0->type->type_table[cltype] == idtype;
1637 }
1638 if (!var) {
1639 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 360);
1640 exit(1);
1641 }
1642 /* Covariant cast for argument 1 (item) <p1:nullable Object> isa Map#1 */
1643 /* <p1:nullable Object> isa Map#1 */
1644 type_struct4 = self->type->resolution_table->types[COLOR_abstract_collection__Map_FT1];
1645 cltype2 = type_struct4->color;
1646 idtype3 = type_struct4->id;
1647 is_nullable = type_struct4->is_nullable;
1648 if(p1 == NULL) {
1649 var1 = is_nullable;
1650 } else {
1651 if(cltype2 >= p1->type->table_size) {
1652 var1 = 0;
1653 } else {
1654 var1 = p1->type->type_table[cltype2] == idtype3;
1655 }
1656 }
1657 if (!var1) {
1658 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 360);
1659 exit(1);
1660 }
1661 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 360);
1662 exit(1);
1663 RET_LABEL:;
1664 }
1665 /* method abstract_collection#Map#[]= for (self: Object, Object, nullable Object) */
1666 void VIRTUAL_abstract_collection__Map___91d_93d_61d(val* self, val* p0, val* p1) {
1667 abstract_collection__Map___91d_93d_61d(self, p0, p1);
1668 RET_LABEL:;
1669 }
1670 /* method abstract_collection#Map#recover_with for (self: Map[Object, nullable Object], Map[Object, nullable Object]) */
1671 void abstract_collection__Map__recover_with(val* self, val* p0) {
1672 short int var /* : Bool */;
1673 int cltype;
1674 int idtype;
1675 const struct type* type_struct;
1676 val* var_map /* var map: Map[Object, nullable Object] */;
1677 val* var1 /* : MapIterator[Object, nullable Object] */;
1678 val* var_i /* var i: MapIterator[Object, nullable Object] */;
1679 short int var2 /* : Bool */;
1680 val* var3 /* : Object */;
1681 val* var4 /* : nullable Object */;
1682 /* Covariant cast for argument 0 (map) <p0:Map[Object, nullable Object]> isa Map[Map#0, Map#1] */
1683 /* <p0:Map[Object, nullable Object]> isa Map[Map#0, Map#1] */
1684 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Mapabstract_collection__Map_FT0abstract_collection__Map_FT1];
1685 cltype = type_struct->color;
1686 idtype = type_struct->id;
1687 if(cltype >= p0->type->table_size) {
1688 var = 0;
1689 } else {
1690 var = p0->type->type_table[cltype] == idtype;
1691 }
1692 if (!var) {
1693 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 363);
1694 exit(1);
1695 }
1696 var_map = p0;
1697 var1 = ((val* (*)(val*))(var_map->class->vft[COLOR_abstract_collection__MapRead__iterator]))(var_map) /* iterator on <var_map:Map[Object, nullable Object]>*/;
1698 var_i = var1;
1699 for(;;) {
1700 var2 = ((short int (*)(val*))(var_i->class->vft[COLOR_abstract_collection__MapIterator__is_ok]))(var_i) /* is_ok on <var_i:MapIterator[Object, nullable Object]>*/;
1701 if (!var2) break;
1702 var3 = ((val* (*)(val*))(var_i->class->vft[COLOR_abstract_collection__MapIterator__key]))(var_i) /* key on <var_i:MapIterator[Object, nullable Object]>*/;
1703 var4 = ((val* (*)(val*))(var_i->class->vft[COLOR_abstract_collection__MapIterator__item]))(var_i) /* item on <var_i:MapIterator[Object, nullable Object]>*/;
1704 ((void (*)(val*, val*, val*))(self->class->vft[COLOR_abstract_collection__Map___91d_93d_61d]))(self, var3, var4) /* []= on <self:Map[Object, nullable Object]>*/;
1705 ((void (*)(val*))(var_i->class->vft[COLOR_abstract_collection__MapIterator__next]))(var_i) /* next on <var_i:MapIterator[Object, nullable Object]>*/;
1706 CONTINUE_label: (void)0;
1707 }
1708 BREAK_label: (void)0;
1709 RET_LABEL:;
1710 }
1711 /* method abstract_collection#Map#recover_with for (self: Object, Map[Object, nullable Object]) */
1712 void VIRTUAL_abstract_collection__Map__recover_with(val* self, val* p0) {
1713 abstract_collection__Map__recover_with(self, p0);
1714 RET_LABEL:;
1715 }
1716 /* method abstract_collection#Map#clear for (self: Map[Object, nullable Object]) */
1717 void abstract_collection__Map__clear(val* self) {
1718 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 374);
1719 exit(1);
1720 RET_LABEL:;
1721 }
1722 /* method abstract_collection#Map#clear for (self: Object) */
1723 void VIRTUAL_abstract_collection__Map__clear(val* self) {
1724 abstract_collection__Map__clear(self);
1725 RET_LABEL:;
1726 }
1727 /* method abstract_collection#Map#values for (self: Map[Object, nullable Object]): RemovableCollection[nullable Object] */
1728 val* abstract_collection__Map__values(val* self) {
1729 val* var /* : RemovableCollection[nullable Object] */;
1730 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 377);
1731 exit(1);
1732 RET_LABEL:;
1733 return var;
1734 }
1735 /* method abstract_collection#Map#values for (self: Object): Collection[nullable Object] */
1736 val* VIRTUAL_abstract_collection__Map__values(val* self) {
1737 val* var /* : Collection[nullable Object] */;
1738 val* var1 /* : RemovableCollection[nullable Object] */;
1739 var1 = abstract_collection__Map__values(self);
1740 var = var1;
1741 RET_LABEL:;
1742 return var;
1743 }
1744 /* method abstract_collection#Map#keys for (self: Map[Object, nullable Object]): RemovableCollection[Object] */
1745 val* abstract_collection__Map__keys(val* self) {
1746 val* var /* : RemovableCollection[Object] */;
1747 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 379);
1748 exit(1);
1749 RET_LABEL:;
1750 return var;
1751 }
1752 /* method abstract_collection#Map#keys for (self: Object): Collection[Object] */
1753 val* VIRTUAL_abstract_collection__Map__keys(val* self) {
1754 val* var /* : Collection[Object] */;
1755 val* var1 /* : RemovableCollection[Object] */;
1756 var1 = abstract_collection__Map__keys(self);
1757 var = var1;
1758 RET_LABEL:;
1759 return var;
1760 }
1761 /* method abstract_collection#MapIterator#item for (self: MapIterator[Object, nullable Object]): nullable Object */
1762 val* abstract_collection__MapIterator__item(val* self) {
1763 val* var /* : nullable Object */;
1764 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 384);
1765 exit(1);
1766 RET_LABEL:;
1767 return var;
1768 }
1769 /* method abstract_collection#MapIterator#item for (self: Object): nullable Object */
1770 val* VIRTUAL_abstract_collection__MapIterator__item(val* self) {
1771 val* var /* : nullable Object */;
1772 val* var1 /* : nullable Object */;
1773 var1 = abstract_collection__MapIterator__item(self);
1774 var = var1;
1775 RET_LABEL:;
1776 return var;
1777 }
1778 /* method abstract_collection#MapIterator#key for (self: MapIterator[Object, nullable Object]): Object */
1779 val* abstract_collection__MapIterator__key(val* self) {
1780 val* var /* : Object */;
1781 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 388);
1782 exit(1);
1783 RET_LABEL:;
1784 return var;
1785 }
1786 /* method abstract_collection#MapIterator#key for (self: Object): Object */
1787 val* VIRTUAL_abstract_collection__MapIterator__key(val* self) {
1788 val* var /* : Object */;
1789 val* var1 /* : Object */;
1790 var1 = abstract_collection__MapIterator__key(self);
1791 var = var1;
1792 RET_LABEL:;
1793 return var;
1794 }
1795 /* method abstract_collection#MapIterator#next for (self: MapIterator[Object, nullable Object]) */
1796 void abstract_collection__MapIterator__next(val* self) {
1797 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 392);
1798 exit(1);
1799 RET_LABEL:;
1800 }
1801 /* method abstract_collection#MapIterator#next for (self: Object) */
1802 void VIRTUAL_abstract_collection__MapIterator__next(val* self) {
1803 abstract_collection__MapIterator__next(self);
1804 RET_LABEL:;
1805 }
1806 /* method abstract_collection#MapIterator#is_ok for (self: MapIterator[Object, nullable Object]): Bool */
1807 short int abstract_collection__MapIterator__is_ok(val* self) {
1808 short int var /* : Bool */;
1809 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 396);
1810 exit(1);
1811 RET_LABEL:;
1812 return var;
1813 }
1814 /* method abstract_collection#MapIterator#is_ok for (self: Object): Bool */
1815 short int VIRTUAL_abstract_collection__MapIterator__is_ok(val* self) {
1816 short int var /* : Bool */;
1817 short int var1 /* : Bool */;
1818 var1 = abstract_collection__MapIterator__is_ok(self);
1819 var = var1;
1820 RET_LABEL:;
1821 return var;
1822 }
1823 /* method abstract_collection#MapKeysIterator#iterator for (self: MapKeysIterator[Object, nullable Object]): MapIterator[Object, nullable Object] */
1824 val* abstract_collection__MapKeysIterator__iterator(val* self) {
1825 val* var /* : MapIterator[Object, nullable Object] */;
1826 val* var1 /* : MapIterator[Object, nullable Object] */;
1827 var1 = self->attrs[COLOR_abstract_collection__MapKeysIterator___64diterator].val; /* @iterator on <self:MapKeysIterator[Object, nullable Object]> */
1828 if (var1 == NULL) {
1829 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Uninitialized attribute @iterator", "lib/standard/collection/abstract_collection.nit", 406);
1830 exit(1);
1831 }
1832 var = var1;
1833 RET_LABEL:;
1834 return var;
1835 }
1836 /* method abstract_collection#MapKeysIterator#iterator for (self: Object): MapIterator[Object, nullable Object] */
1837 val* VIRTUAL_abstract_collection__MapKeysIterator__iterator(val* self) {
1838 val* var /* : MapIterator[Object, nullable Object] */;
1839 val* var1 /* : MapIterator[Object, nullable Object] */;
1840 var1 = abstract_collection__MapKeysIterator__iterator(self);
1841 var = var1;
1842 RET_LABEL:;
1843 return var;
1844 }
1845 /* method abstract_collection#MapKeysIterator#iterator= for (self: MapKeysIterator[Object, nullable Object], MapIterator[Object, nullable Object]) */
1846 void abstract_collection__MapKeysIterator__iterator_61d(val* self, val* p0) {
1847 short int var /* : Bool */;
1848 int cltype;
1849 int idtype;
1850 const struct type* type_struct;
1851 /* Covariant cast for argument 0 (iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
1852 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
1853 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__MapIteratorabstract_collection__MapKeysIterator_FT0abstract_collection__MapKeysIterator_FT1];
1854 cltype = type_struct->color;
1855 idtype = type_struct->id;
1856 if(cltype >= p0->type->table_size) {
1857 var = 0;
1858 } else {
1859 var = p0->type->type_table[cltype] == idtype;
1860 }
1861 if (!var) {
1862 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 406);
1863 exit(1);
1864 }
1865 self->attrs[COLOR_abstract_collection__MapKeysIterator___64diterator].val = p0; /* @iterator on <self:MapKeysIterator[Object, nullable Object]> */
1866 RET_LABEL:;
1867 }
1868 /* method abstract_collection#MapKeysIterator#iterator= for (self: Object, MapIterator[Object, nullable Object]) */
1869 void VIRTUAL_abstract_collection__MapKeysIterator__iterator_61d(val* self, val* p0) {
1870 abstract_collection__MapKeysIterator__iterator_61d(self, p0);
1871 RET_LABEL:;
1872 }
1873 /* method abstract_collection#MapKeysIterator#is_ok for (self: MapKeysIterator[Object, nullable Object]): Bool */
1874 short int abstract_collection__MapKeysIterator__is_ok(val* self) {
1875 short int var /* : Bool */;
1876 val* var1 /* : MapIterator[Object, nullable Object] */;
1877 short int var2 /* : Bool */;
1878 var1 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__MapKeysIterator__iterator]))(self) /* iterator on <self:MapKeysIterator[Object, nullable Object]>*/;
1879 var2 = ((short int (*)(val*))(var1->class->vft[COLOR_abstract_collection__MapIterator__is_ok]))(var1) /* is_ok on <var1:MapIterator[Object, nullable Object]>*/;
1880 var = var2;
1881 goto RET_LABEL;
1882 RET_LABEL:;
1883 return var;
1884 }
1885 /* method abstract_collection#MapKeysIterator#is_ok for (self: Object): Bool */
1886 short int VIRTUAL_abstract_collection__MapKeysIterator__is_ok(val* self) {
1887 short int var /* : Bool */;
1888 short int var1 /* : Bool */;
1889 var1 = abstract_collection__MapKeysIterator__is_ok(self);
1890 var = var1;
1891 RET_LABEL:;
1892 return var;
1893 }
1894 /* method abstract_collection#MapKeysIterator#next for (self: MapKeysIterator[Object, nullable Object]) */
1895 void abstract_collection__MapKeysIterator__next(val* self) {
1896 val* var /* : MapIterator[Object, nullable Object] */;
1897 var = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__MapKeysIterator__iterator]))(self) /* iterator on <self:MapKeysIterator[Object, nullable Object]>*/;
1898 ((void (*)(val*))(var->class->vft[COLOR_abstract_collection__MapIterator__next]))(var) /* next on <var:MapIterator[Object, nullable Object]>*/;
1899 RET_LABEL:;
1900 }
1901 /* method abstract_collection#MapKeysIterator#next for (self: Object) */
1902 void VIRTUAL_abstract_collection__MapKeysIterator__next(val* self) {
1903 abstract_collection__MapKeysIterator__next(self);
1904 RET_LABEL:;
1905 }
1906 /* method abstract_collection#MapKeysIterator#item for (self: MapKeysIterator[Object, nullable Object]): Object */
1907 val* abstract_collection__MapKeysIterator__item(val* self) {
1908 val* var /* : Object */;
1909 val* var1 /* : MapIterator[Object, nullable Object] */;
1910 val* var2 /* : Object */;
1911 var1 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__MapKeysIterator__iterator]))(self) /* iterator on <self:MapKeysIterator[Object, nullable Object]>*/;
1912 var2 = ((val* (*)(val*))(var1->class->vft[COLOR_abstract_collection__MapIterator__key]))(var1) /* key on <var1:MapIterator[Object, nullable Object]>*/;
1913 var = var2;
1914 goto RET_LABEL;
1915 RET_LABEL:;
1916 return var;
1917 }
1918 /* method abstract_collection#MapKeysIterator#item for (self: Object): nullable Object */
1919 val* VIRTUAL_abstract_collection__MapKeysIterator__item(val* self) {
1920 val* var /* : nullable Object */;
1921 val* var1 /* : Object */;
1922 var1 = abstract_collection__MapKeysIterator__item(self);
1923 var = var1;
1924 RET_LABEL:;
1925 return var;
1926 }
1927 /* method abstract_collection#MapKeysIterator#init for (self: MapKeysIterator[Object, nullable Object], MapIterator[Object, nullable Object]) */
1928 void abstract_collection__MapKeysIterator__init(val* self, val* p0) {
1929 short int var /* : Bool */;
1930 int cltype;
1931 int idtype;
1932 const struct type* type_struct;
1933 /* Covariant cast for argument 0 (iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
1934 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
1935 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__MapIteratorabstract_collection__MapKeysIterator_FT0abstract_collection__MapKeysIterator_FT1];
1936 cltype = type_struct->color;
1937 idtype = type_struct->id;
1938 if(cltype >= p0->type->table_size) {
1939 var = 0;
1940 } else {
1941 var = p0->type->type_table[cltype] == idtype;
1942 }
1943 if (!var) {
1944 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 403);
1945 exit(1);
1946 }
1947 self->attrs[COLOR_abstract_collection__MapKeysIterator___64diterator].val = p0; /* @iterator on <self:MapKeysIterator[Object, nullable Object]> */
1948 RET_LABEL:;
1949 }
1950 /* method abstract_collection#MapKeysIterator#init for (self: Object, MapIterator[Object, nullable Object]) */
1951 void VIRTUAL_abstract_collection__MapKeysIterator__init(val* self, val* p0) {
1952 abstract_collection__MapKeysIterator__init(self, p0);
1953 RET_LABEL:;
1954 }
1955 /* method abstract_collection#MapValuesIterator#iterator for (self: MapValuesIterator[Object, nullable Object]): MapIterator[Object, nullable Object] */
1956 val* abstract_collection__MapValuesIterator__iterator(val* self) {
1957 val* var /* : MapIterator[Object, nullable Object] */;
1958 val* var1 /* : MapIterator[Object, nullable Object] */;
1959 var1 = self->attrs[COLOR_abstract_collection__MapValuesIterator___64diterator].val; /* @iterator on <self:MapValuesIterator[Object, nullable Object]> */
1960 if (var1 == NULL) {
1961 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Uninitialized attribute @iterator", "lib/standard/collection/abstract_collection.nit", 417);
1962 exit(1);
1963 }
1964 var = var1;
1965 RET_LABEL:;
1966 return var;
1967 }
1968 /* method abstract_collection#MapValuesIterator#iterator for (self: Object): MapIterator[Object, nullable Object] */
1969 val* VIRTUAL_abstract_collection__MapValuesIterator__iterator(val* self) {
1970 val* var /* : MapIterator[Object, nullable Object] */;
1971 val* var1 /* : MapIterator[Object, nullable Object] */;
1972 var1 = abstract_collection__MapValuesIterator__iterator(self);
1973 var = var1;
1974 RET_LABEL:;
1975 return var;
1976 }
1977 /* method abstract_collection#MapValuesIterator#iterator= for (self: MapValuesIterator[Object, nullable Object], MapIterator[Object, nullable Object]) */
1978 void abstract_collection__MapValuesIterator__iterator_61d(val* self, val* p0) {
1979 short int var /* : Bool */;
1980 int cltype;
1981 int idtype;
1982 const struct type* type_struct;
1983 /* Covariant cast for argument 0 (iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
1984 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
1985 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__MapIteratorabstract_collection__MapValuesIterator_FT0abstract_collection__MapValuesIterator_FT1];
1986 cltype = type_struct->color;
1987 idtype = type_struct->id;
1988 if(cltype >= p0->type->table_size) {
1989 var = 0;
1990 } else {
1991 var = p0->type->type_table[cltype] == idtype;
1992 }
1993 if (!var) {
1994 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 417);
1995 exit(1);
1996 }
1997 self->attrs[COLOR_abstract_collection__MapValuesIterator___64diterator].val = p0; /* @iterator on <self:MapValuesIterator[Object, nullable Object]> */
1998 RET_LABEL:;
1999 }
2000 /* method abstract_collection#MapValuesIterator#iterator= for (self: Object, MapIterator[Object, nullable Object]) */
2001 void VIRTUAL_abstract_collection__MapValuesIterator__iterator_61d(val* self, val* p0) {
2002 abstract_collection__MapValuesIterator__iterator_61d(self, p0);
2003 RET_LABEL:;
2004 }
2005 /* method abstract_collection#MapValuesIterator#is_ok for (self: MapValuesIterator[Object, nullable Object]): Bool */
2006 short int abstract_collection__MapValuesIterator__is_ok(val* self) {
2007 short int var /* : Bool */;
2008 val* var1 /* : MapIterator[Object, nullable Object] */;
2009 short int var2 /* : Bool */;
2010 var1 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__MapValuesIterator__iterator]))(self) /* iterator on <self:MapValuesIterator[Object, nullable Object]>*/;
2011 var2 = ((short int (*)(val*))(var1->class->vft[COLOR_abstract_collection__MapIterator__is_ok]))(var1) /* is_ok on <var1:MapIterator[Object, nullable Object]>*/;
2012 var = var2;
2013 goto RET_LABEL;
2014 RET_LABEL:;
2015 return var;
2016 }
2017 /* method abstract_collection#MapValuesIterator#is_ok for (self: Object): Bool */
2018 short int VIRTUAL_abstract_collection__MapValuesIterator__is_ok(val* self) {
2019 short int var /* : Bool */;
2020 short int var1 /* : Bool */;
2021 var1 = abstract_collection__MapValuesIterator__is_ok(self);
2022 var = var1;
2023 RET_LABEL:;
2024 return var;
2025 }
2026 /* method abstract_collection#MapValuesIterator#next for (self: MapValuesIterator[Object, nullable Object]) */
2027 void abstract_collection__MapValuesIterator__next(val* self) {
2028 val* var /* : MapIterator[Object, nullable Object] */;
2029 var = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__MapValuesIterator__iterator]))(self) /* iterator on <self:MapValuesIterator[Object, nullable Object]>*/;
2030 ((void (*)(val*))(var->class->vft[COLOR_abstract_collection__MapIterator__next]))(var) /* next on <var:MapIterator[Object, nullable Object]>*/;
2031 RET_LABEL:;
2032 }
2033 /* method abstract_collection#MapValuesIterator#next for (self: Object) */
2034 void VIRTUAL_abstract_collection__MapValuesIterator__next(val* self) {
2035 abstract_collection__MapValuesIterator__next(self);
2036 RET_LABEL:;
2037 }
2038 /* method abstract_collection#MapValuesIterator#item for (self: MapValuesIterator[Object, nullable Object]): nullable Object */
2039 val* abstract_collection__MapValuesIterator__item(val* self) {
2040 val* var /* : nullable Object */;
2041 val* var1 /* : MapIterator[Object, nullable Object] */;
2042 val* var2 /* : nullable Object */;
2043 var1 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__MapValuesIterator__iterator]))(self) /* iterator on <self:MapValuesIterator[Object, nullable Object]>*/;
2044 var2 = ((val* (*)(val*))(var1->class->vft[COLOR_abstract_collection__MapIterator__item]))(var1) /* item on <var1:MapIterator[Object, nullable Object]>*/;
2045 var = var2;
2046 goto RET_LABEL;
2047 RET_LABEL:;
2048 return var;
2049 }
2050 /* method abstract_collection#MapValuesIterator#item for (self: Object): nullable Object */
2051 val* VIRTUAL_abstract_collection__MapValuesIterator__item(val* self) {
2052 val* var /* : nullable Object */;
2053 val* var1 /* : nullable Object */;
2054 var1 = abstract_collection__MapValuesIterator__item(self);
2055 var = var1;
2056 RET_LABEL:;
2057 return var;
2058 }
2059 /* method abstract_collection#MapValuesIterator#init for (self: MapValuesIterator[Object, nullable Object], MapIterator[Object, nullable Object]) */
2060 void abstract_collection__MapValuesIterator__init(val* self, val* p0) {
2061 short int var /* : Bool */;
2062 int cltype;
2063 int idtype;
2064 const struct type* type_struct;
2065 /* Covariant cast for argument 0 (iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
2066 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
2067 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__MapIteratorabstract_collection__MapValuesIterator_FT0abstract_collection__MapValuesIterator_FT1];
2068 cltype = type_struct->color;
2069 idtype = type_struct->id;
2070 if(cltype >= p0->type->table_size) {
2071 var = 0;
2072 } else {
2073 var = p0->type->type_table[cltype] == idtype;
2074 }
2075 if (!var) {
2076 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 414);
2077 exit(1);
2078 }
2079 self->attrs[COLOR_abstract_collection__MapValuesIterator___64diterator].val = p0; /* @iterator on <self:MapValuesIterator[Object, nullable Object]> */
2080 RET_LABEL:;
2081 }
2082 /* method abstract_collection#MapValuesIterator#init for (self: Object, MapIterator[Object, nullable Object]) */
2083 void VIRTUAL_abstract_collection__MapValuesIterator__init(val* self, val* p0) {
2084 abstract_collection__MapValuesIterator__init(self, p0);
2085 RET_LABEL:;
2086 }
2087 /* method abstract_collection#SequenceRead#first for (self: SequenceRead[nullable Object]): nullable Object */
2088 val* abstract_collection__SequenceRead__first(val* self) {
2089 val* var /* : nullable Object */;
2090 short int var1 /* : Bool */;
2091 short int var2 /* : Bool */;
2092 long var3 /* : Int */;
2093 val* var4 /* : nullable Object */;
2094 var1 = ((short int (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__is_empty]))(self) /* is_empty on <self:SequenceRead[nullable Object]>*/;
2095 var2 = !var1;
2096 if (!var2) {
2097 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Assert \'not_empty\' failed", "lib/standard/collection/abstract_collection.nit", 433);
2098 exit(1);
2099 }
2100 var3 = 0;
2101 var4 = ((val* (*)(val*, long))(self->class->vft[COLOR_abstract_collection__SequenceRead___91d_93d]))(self, var3) /* [] on <self:SequenceRead[nullable Object]>*/;
2102 var = var4;
2103 goto RET_LABEL;
2104 RET_LABEL:;
2105 return var;
2106 }
2107 /* method abstract_collection#SequenceRead#first for (self: Object): nullable Object */
2108 val* VIRTUAL_abstract_collection__SequenceRead__first(val* self) {
2109 val* var /* : nullable Object */;
2110 val* var1 /* : nullable Object */;
2111 var1 = abstract_collection__SequenceRead__first(self);
2112 var = var1;
2113 RET_LABEL:;
2114 return var;
2115 }
2116 /* method abstract_collection#SequenceRead#[] for (self: SequenceRead[nullable Object], Int): nullable Object */
2117 val* abstract_collection__SequenceRead___91d_93d(val* self, long p0) {
2118 val* var /* : nullable Object */;
2119 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 437);
2120 exit(1);
2121 RET_LABEL:;
2122 return var;
2123 }
2124 /* method abstract_collection#SequenceRead#[] for (self: Object, Int): nullable Object */
2125 val* VIRTUAL_abstract_collection__SequenceRead___91d_93d(val* self, long p0) {
2126 val* var /* : nullable Object */;
2127 val* var1 /* : nullable Object */;
2128 var1 = abstract_collection__SequenceRead___91d_93d(self, p0);
2129 var = var1;
2130 RET_LABEL:;
2131 return var;
2132 }
2133 /* method abstract_collection#SequenceRead#last for (self: SequenceRead[nullable Object]): nullable Object */
2134 val* abstract_collection__SequenceRead__last(val* self) {
2135 val* var /* : nullable Object */;
2136 short int var1 /* : Bool */;
2137 short int var2 /* : Bool */;
2138 long var3 /* : Int */;
2139 long var4 /* : Int */;
2140 long var5 /* : Int */;
2141 long var7 /* : Int */;
2142 val* var8 /* : nullable Object */;
2143 var1 = ((short int (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__is_empty]))(self) /* is_empty on <self:SequenceRead[nullable Object]>*/;
2144 var2 = !var1;
2145 if (!var2) {
2146 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Assert \'not_empty\' failed", "lib/standard/collection/abstract_collection.nit", 446);
2147 exit(1);
2148 }
2149 var3 = ((long (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__length]))(self) /* length on <self:SequenceRead[nullable Object]>*/;
2150 var4 = 1;
2151 { /* Inline kernel#Int#- (var3,var4) */
2152 var7 = var3 - var4;
2153 var5 = var7;
2154 goto RET_LABEL6;
2155 RET_LABEL6:(void)0;
2156 }
2157 var8 = ((val* (*)(val*, long))(self->class->vft[COLOR_abstract_collection__SequenceRead___91d_93d]))(self, var5) /* [] on <self:SequenceRead[nullable Object]>*/;
2158 var = var8;
2159 goto RET_LABEL;
2160 RET_LABEL:;
2161 return var;
2162 }
2163 /* method abstract_collection#SequenceRead#last for (self: Object): nullable Object */
2164 val* VIRTUAL_abstract_collection__SequenceRead__last(val* self) {
2165 val* var /* : nullable Object */;
2166 val* var1 /* : nullable Object */;
2167 var1 = abstract_collection__SequenceRead__last(self);
2168 var = var1;
2169 RET_LABEL:;
2170 return var;
2171 }
2172 /* method abstract_collection#SequenceRead#index_of for (self: SequenceRead[nullable Object], nullable Object): Int */
2173 long abstract_collection__SequenceRead__index_of(val* self, val* p0) {
2174 long var /* : Int */;
2175 short int var1 /* : Bool */;
2176 int cltype;
2177 int idtype;
2178 const struct type* type_struct;
2179 short int is_nullable;
2180 val* var_item /* var item: nullable Object */;
2181 val* var2 /* : Iterator[nullable Object] */;
2182 val* var_i /* var i: IndexedIterator[nullable Object] */;
2183 short int var3 /* : Bool */;
2184 val* var4 /* : nullable Object */;
2185 short int var5 /* : Bool */;
2186 long var6 /* : Int */;
2187 long var7 /* : Int */;
2188 long var8 /* : Int */;
2189 long var10 /* : Int */;
2190 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa SequenceRead#0 */
2191 /* <p0:nullable Object> isa SequenceRead#0 */
2192 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__SequenceRead_FT0];
2193 cltype = type_struct->color;
2194 idtype = type_struct->id;
2195 is_nullable = type_struct->is_nullable;
2196 if(p0 == NULL) {
2197 var1 = is_nullable;
2198 } else {
2199 if(cltype >= p0->type->table_size) {
2200 var1 = 0;
2201 } else {
2202 var1 = p0->type->type_table[cltype] == idtype;
2203 }
2204 }
2205 if (!var1) {
2206 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 450);
2207 exit(1);
2208 }
2209 var_item = p0;
2210 var2 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__iterator]))(self) /* iterator on <self:SequenceRead[nullable Object]>*/;
2211 var_i = var2;
2212 for(;;) {
2213 var3 = ((short int (*)(val*))(var_i->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var_i) /* is_ok on <var_i:IndexedIterator[nullable Object]>*/;
2214 if (!var3) break;
2215 var4 = ((val* (*)(val*))(var_i->class->vft[COLOR_abstract_collection__Iterator__item]))(var_i) /* item on <var_i:IndexedIterator[nullable Object]>*/;
2216 if (var4 == NULL) {
2217 var5 = (var_item == NULL);
2218 } else {
2219 var5 = ((short int (*)(val*, val*))(var4->class->vft[COLOR_kernel__Object___61d_61d]))(var4, var_item) /* == on <var4:nullable Object>*/;
2220 }
2221 if (var5){
2222 var6 = ((long (*)(val*))(var_i->class->vft[COLOR_abstract_collection__IndexedIterator__index]))(var_i) /* index on <var_i:IndexedIterator[nullable Object]>*/;
2223 var = var6;
2224 goto RET_LABEL;
2225 } else {
2226 }
2227 ((void (*)(val*))(var_i->class->vft[COLOR_abstract_collection__Iterator__next]))(var_i) /* next on <var_i:IndexedIterator[nullable Object]>*/;
2228 CONTINUE_label: (void)0;
2229 }
2230 BREAK_label: (void)0;
2231 var7 = 1;
2232 { /* Inline kernel#Int#unary - (var7) */
2233 var10 = -var7;
2234 var8 = var10;
2235 goto RET_LABEL9;
2236 RET_LABEL9:(void)0;
2237 }
2238 var = var8;
2239 goto RET_LABEL;
2240 RET_LABEL:;
2241 return var;
2242 }
2243 /* method abstract_collection#SequenceRead#index_of for (self: Object, nullable Object): Int */
2244 long VIRTUAL_abstract_collection__SequenceRead__index_of(val* self, val* p0) {
2245 long var /* : Int */;
2246 long var1 /* : Int */;
2247 var1 = abstract_collection__SequenceRead__index_of(self, p0);
2248 var = var1;
2249 RET_LABEL:;
2250 return var;
2251 }
2252 /* method abstract_collection#SequenceRead#iterator for (self: SequenceRead[nullable Object]): IndexedIterator[nullable Object] */
2253 val* abstract_collection__SequenceRead__iterator(val* self) {
2254 val* var /* : IndexedIterator[nullable Object] */;
2255 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 463);
2256 exit(1);
2257 RET_LABEL:;
2258 return var;
2259 }
2260 /* method abstract_collection#SequenceRead#iterator for (self: Object): Iterator[nullable Object] */
2261 val* VIRTUAL_abstract_collection__SequenceRead__iterator(val* self) {
2262 val* var /* : Iterator[nullable Object] */;
2263 val* var1 /* : IndexedIterator[nullable Object] */;
2264 var1 = abstract_collection__SequenceRead__iterator(self);
2265 var = var1;
2266 RET_LABEL:;
2267 return var;
2268 }
2269 /* method abstract_collection#SequenceRead#== for (self: SequenceRead[nullable Object], nullable Object): Bool */
2270 short int abstract_collection__SequenceRead___61d_61d(val* self, val* p0) {
2271 short int var /* : Bool */;
2272 val* var_o /* var o: nullable Object */;
2273 short int var1 /* : Bool */;
2274 short int var2 /* : Bool */;
2275 int cltype;
2276 int idtype;
2277 short int var3 /* : Bool */;
2278 short int var_ /* var : Bool */;
2279 val* var4 /* : null */;
2280 short int var5 /* : Bool */;
2281 short int var6 /* : Bool */;
2282 long var7 /* : Int */;
2283 long var_l /* var l: Int */;
2284 long var8 /* : Int */;
2285 short int var9 /* : Bool */;
2286 short int var11 /* : Bool */;
2287 short int var12 /* : Bool */;
2288 short int var13 /* : Bool */;
2289 long var14 /* : Int */;
2290 long var_i /* var i: Int */;
2291 short int var15 /* : Bool */;
2292 short int var17 /* : Bool */;
2293 int cltype18;
2294 int idtype19;
2295 short int var20 /* : Bool */;
2296 val* var21 /* : nullable Object */;
2297 val* var22 /* : nullable Object */;
2298 short int var23 /* : Bool */;
2299 short int var24 /* : Bool */;
2300 long var25 /* : Int */;
2301 long var26 /* : Int */;
2302 long var28 /* : Int */;
2303 short int var29 /* : Bool */;
2304 var_o = p0;
2305 /* <var_o:nullable Object> isa SequenceRead[nullable Object] */
2306 cltype = type_abstract_collection__SequenceReadnullable_kernel__Object.color;
2307 idtype = type_abstract_collection__SequenceReadnullable_kernel__Object.id;
2308 if(var_o == NULL) {
2309 var2 = 0;
2310 } else {
2311 if(cltype >= var_o->type->table_size) {
2312 var2 = 0;
2313 } else {
2314 var2 = var_o->type->type_table[cltype] == idtype;
2315 }
2316 }
2317 var3 = !var2;
2318 var_ = var3;
2319 if (var3){
2320 var1 = var_;
2321 } else {
2322 var4 = NULL;
2323 var5 = var_o == var4;
2324 var1 = var5;
2325 }
2326 if (var1){
2327 var6 = 0;
2328 var = var6;
2329 goto RET_LABEL;
2330 } else {
2331 }
2332 var7 = ((long (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__length]))(self) /* length on <self:SequenceRead[nullable Object]>*/;
2333 var_l = var7;
2334 var8 = ((long (*)(val*))(var_o->class->vft[COLOR_abstract_collection__Collection__length]))(var_o) /* length on <var_o:nullable Object(SequenceRead[nullable Object])>*/;
2335 { /* Inline kernel#Int#!= (var8,var_l) */
2336 var11 = var8 == var_l;
2337 var12 = !var11;
2338 var9 = var12;
2339 goto RET_LABEL10;
2340 RET_LABEL10:(void)0;
2341 }
2342 if (var9){
2343 var13 = 0;
2344 var = var13;
2345 goto RET_LABEL;
2346 } else {
2347 }
2348 var14 = 0;
2349 var_i = var14;
2350 for(;;) {
2351 { /* Inline kernel#Int#< (var_i,var_l) */
2352 /* Covariant cast for argument 0 (i) <var_l:Int> isa OTHER */
2353 /* <var_l:Int> isa OTHER */
2354 var17 = 1; /* easy <var_l:Int> isa OTHER*/
2355 if (!var17) {
2356 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/kernel.nit", 257);
2357 exit(1);
2358 }
2359 var20 = var_i < var_l;
2360 var15 = var20;
2361 goto RET_LABEL16;
2362 RET_LABEL16:(void)0;
2363 }
2364 if (!var15) break;
2365 var21 = ((val* (*)(val*, long))(self->class->vft[COLOR_abstract_collection__SequenceRead___91d_93d]))(self, var_i) /* [] on <self:SequenceRead[nullable Object]>*/;
2366 var22 = ((val* (*)(val*, long))(var_o->class->vft[COLOR_abstract_collection__SequenceRead___91d_93d]))(var_o, var_i) /* [] on <var_o:nullable Object(SequenceRead[nullable Object])>*/;
2367 if (var21 == NULL) {
2368 var23 = (var22 != NULL);
2369 } else {
2370 var23 = ((short int (*)(val*, val*))(var21->class->vft[COLOR_kernel__Object___33d_61d]))(var21, var22) /* != on <var21:nullable Object>*/;
2371 }
2372 if (var23){
2373 var24 = 0;
2374 var = var24;
2375 goto RET_LABEL;
2376 } else {
2377 }
2378 var25 = 1;
2379 { /* Inline kernel#Int#+ (var_i,var25) */
2380 var28 = var_i + var25;
2381 var26 = var28;
2382 goto RET_LABEL27;
2383 RET_LABEL27:(void)0;
2384 }
2385 var_i = var26;
2386 CONTINUE_label: (void)0;
2387 }
2388 BREAK_label: (void)0;
2389 var29 = 1;
2390 var = var29;
2391 goto RET_LABEL;
2392 RET_LABEL:;
2393 return var;
2394 }
2395 /* method abstract_collection#SequenceRead#== for (self: Object, nullable Object): Bool */
2396 short int VIRTUAL_abstract_collection__SequenceRead___61d_61d(val* self, val* p0) {
2397 short int var /* : Bool */;
2398 short int var1 /* : Bool */;
2399 var1 = abstract_collection__SequenceRead___61d_61d(self, p0);
2400 var = var1;
2401 RET_LABEL:;
2402 return var;
2403 }
2404 /* method abstract_collection#SequenceRead#hash for (self: SequenceRead[nullable Object]): Int */
2405 long abstract_collection__SequenceRead__hash(val* self) {
2406 long var /* : Int */;
2407 long var1 /* : Int */;
2408 long var_res /* var res: Int */;
2409 val* var2 /* : Iterator[nullable Object] */;
2410 short int var3 /* : Bool */;
2411 val* var4 /* : nullable Object */;
2412 val* var_e /* var e: nullable Object */;
2413 long var5 /* : Int */;
2414 long var6 /* : Int */;
2415 long var8 /* : Int */;
2416 var1 = 0;
2417 var_res = var1;
2418 var2 = ((val* (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__iterator]))(self) /* iterator on <self:SequenceRead[nullable Object]>*/;
2419 for(;;) {
2420 var3 = ((short int (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var2) /* is_ok on <var2:Iterator[nullable Object]>*/;
2421 if(!var3) break;
2422 var4 = ((val* (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__item]))(var2) /* item on <var2:Iterator[nullable Object]>*/;
2423 var_e = var4;
2424 var5 = kernel__Int__hash(var_res);
2425 { /* Inline kernel#Int#+ (var_res,var5) */
2426 var8 = var_res + var5;
2427 var6 = var8;
2428 goto RET_LABEL7;
2429 RET_LABEL7:(void)0;
2430 }
2431 var_res = var6;
2432 CONTINUE_label: (void)0;
2433 ((void (*)(val*))(var2->class->vft[COLOR_abstract_collection__Iterator__next]))(var2) /* next on <var2:Iterator[nullable Object]>*/;
2434 }
2435 BREAK_label: (void)0;
2436 var = var_res;
2437 goto RET_LABEL;
2438 RET_LABEL:;
2439 return var;
2440 }
2441 /* method abstract_collection#SequenceRead#hash for (self: Object): Int */
2442 long VIRTUAL_abstract_collection__SequenceRead__hash(val* self) {
2443 long var /* : Int */;
2444 long var1 /* : Int */;
2445 var1 = abstract_collection__SequenceRead__hash(self);
2446 var = var1;
2447 RET_LABEL:;
2448 return var;
2449 }
2450 /* method abstract_collection#Sequence#first= for (self: Sequence[nullable Object], nullable Object) */
2451 void abstract_collection__Sequence__first_61d(val* self, val* p0) {
2452 short int var /* : Bool */;
2453 int cltype;
2454 int idtype;
2455 const struct type* type_struct;
2456 short int is_nullable;
2457 val* var_item /* var item: nullable Object */;
2458 long var1 /* : Int */;
2459 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Sequence#0 */
2460 /* <p0:nullable Object> isa Sequence#0 */
2461 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Sequence_FT0];
2462 cltype = type_struct->color;
2463 idtype = type_struct->id;
2464 is_nullable = type_struct->is_nullable;
2465 if(p0 == NULL) {
2466 var = is_nullable;
2467 } else {
2468 if(cltype >= p0->type->table_size) {
2469 var = 0;
2470 } else {
2471 var = p0->type->type_table[cltype] == idtype;
2472 }
2473 }
2474 if (!var) {
2475 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 494);
2476 exit(1);
2477 }
2478 var_item = p0;
2479 var1 = 0;
2480 ((void (*)(val*, long, val*))(self->class->vft[COLOR_abstract_collection__Sequence___91d_93d_61d]))(self, var1, var_item) /* []= on <self:Sequence[nullable Object]>*/;
2481 RET_LABEL:;
2482 }
2483 /* method abstract_collection#Sequence#first= for (self: Object, nullable Object) */
2484 void VIRTUAL_abstract_collection__Sequence__first_61d(val* self, val* p0) {
2485 abstract_collection__Sequence__first_61d(self, p0);
2486 RET_LABEL:;
2487 }
2488 /* method abstract_collection#Sequence#last= for (self: Sequence[nullable Object], nullable Object) */
2489 void abstract_collection__Sequence__last_61d(val* self, val* p0) {
2490 short int var /* : Bool */;
2491 int cltype;
2492 int idtype;
2493 const struct type* type_struct;
2494 short int is_nullable;
2495 val* var_item /* var item: nullable Object */;
2496 long var1 /* : Int */;
2497 long var_l /* var l: Int */;
2498 long var2 /* : Int */;
2499 short int var3 /* : Bool */;
2500 short int var5 /* : Bool */;
2501 int cltype6;
2502 int idtype7;
2503 short int var8 /* : Bool */;
2504 long var9 /* : Int */;
2505 long var10 /* : Int */;
2506 long var12 /* : Int */;
2507 long var13 /* : Int */;
2508 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Sequence#0 */
2509 /* <p0:nullable Object> isa Sequence#0 */
2510 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Sequence_FT0];
2511 cltype = type_struct->color;
2512 idtype = type_struct->id;
2513 is_nullable = type_struct->is_nullable;
2514 if(p0 == NULL) {
2515 var = is_nullable;
2516 } else {
2517 if(cltype >= p0->type->table_size) {
2518 var = 0;
2519 } else {
2520 var = p0->type->type_table[cltype] == idtype;
2521 }
2522 }
2523 if (!var) {
2524 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 499);
2525 exit(1);
2526 }
2527 var_item = p0;
2528 var1 = ((long (*)(val*))(self->class->vft[COLOR_abstract_collection__Collection__length]))(self) /* length on <self:Sequence[nullable Object]>*/;
2529 var_l = var1;
2530 var2 = 0;
2531 { /* Inline kernel#Int#> (var_l,var2) */
2532 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
2533 /* <var2:Int> isa OTHER */
2534 var5 = 1; /* easy <var2:Int> isa OTHER*/
2535 if (!var5) {
2536 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/kernel.nit", 259);
2537 exit(1);
2538 }
2539 var8 = var_l > var2;
2540 var3 = var8;
2541 goto RET_LABEL4;
2542 RET_LABEL4:(void)0;
2543 }
2544 if (var3){
2545 var9 = 1;
2546 { /* Inline kernel#Int#- (var_l,var9) */
2547 var12 = var_l - var9;
2548 var10 = var12;
2549 goto RET_LABEL11;
2550 RET_LABEL11:(void)0;
2551 }
2552 ((void (*)(val*, long, val*))(self->class->vft[COLOR_abstract_collection__Sequence___91d_93d_61d]))(self, var10, var_item) /* []= on <self:Sequence[nullable Object]>*/;
2553 } else {
2554 var13 = 0;
2555 ((void (*)(val*, long, val*))(self->class->vft[COLOR_abstract_collection__Sequence___91d_93d_61d]))(self, var13, var_item) /* []= on <self:Sequence[nullable Object]>*/;
2556 }
2557 RET_LABEL:;
2558 }
2559 /* method abstract_collection#Sequence#last= for (self: Object, nullable Object) */
2560 void VIRTUAL_abstract_collection__Sequence__last_61d(val* self, val* p0) {
2561 abstract_collection__Sequence__last_61d(self, p0);
2562 RET_LABEL:;
2563 }
2564 /* method abstract_collection#Sequence#add for (self: Sequence[nullable Object], nullable Object) */
2565 void abstract_collection__Sequence__add(val* self, val* p0) {
2566 short int var /* : Bool */;
2567 int cltype;
2568 int idtype;
2569 const struct type* type_struct;
2570 short int is_nullable;
2571 val* var_e /* var e: nullable Object */;
2572 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa SimpleCollection#0 */
2573 /* <p0:nullable Object> isa SimpleCollection#0 */
2574 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__SimpleCollection_FT0];
2575 cltype = type_struct->color;
2576 idtype = type_struct->id;
2577 is_nullable = type_struct->is_nullable;
2578 if(p0 == NULL) {
2579 var = is_nullable;
2580 } else {
2581 if(cltype >= p0->type->table_size) {
2582 var = 0;
2583 } else {
2584 var = p0->type->type_table[cltype] == idtype;
2585 }
2586 }
2587 if (!var) {
2588 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 511);
2589 exit(1);
2590 }
2591 var_e = p0;
2592 ((void (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__Sequence__push]))(self, var_e) /* push on <self:Sequence[nullable Object]>*/;
2593 RET_LABEL:;
2594 }
2595 /* method abstract_collection#Sequence#add for (self: Object, nullable Object) */
2596 void VIRTUAL_abstract_collection__Sequence__add(val* self, val* p0) {
2597 abstract_collection__Sequence__add(self, p0);
2598 RET_LABEL:;
2599 }
2600 /* method abstract_collection#Sequence#push for (self: Sequence[nullable Object], nullable Object) */
2601 void abstract_collection__Sequence__push(val* self, val* p0) {
2602 short int var /* : Bool */;
2603 int cltype;
2604 int idtype;
2605 const struct type* type_struct;
2606 short int is_nullable;
2607 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Sequence#0 */
2608 /* <p0:nullable Object> isa Sequence#0 */
2609 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Sequence_FT0];
2610 cltype = type_struct->color;
2611 idtype = type_struct->id;
2612 is_nullable = type_struct->is_nullable;
2613 if(p0 == NULL) {
2614 var = is_nullable;
2615 } else {
2616 if(cltype >= p0->type->table_size) {
2617 var = 0;
2618 } else {
2619 var = p0->type->type_table[cltype] == idtype;
2620 }
2621 }
2622 if (!var) {
2623 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 514);
2624 exit(1);
2625 }
2626 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 514);
2627 exit(1);
2628 RET_LABEL:;
2629 }
2630 /* method abstract_collection#Sequence#push for (self: Object, nullable Object) */
2631 void VIRTUAL_abstract_collection__Sequence__push(val* self, val* p0) {
2632 abstract_collection__Sequence__push(self, p0);
2633 RET_LABEL:;
2634 }
2635 /* method abstract_collection#Sequence#append for (self: Sequence[nullable Object], Collection[nullable Object]) */
2636 void abstract_collection__Sequence__append(val* self, val* p0) {
2637 short int var /* : Bool */;
2638 int cltype;
2639 int idtype;
2640 const struct type* type_struct;
2641 val* var_coll /* var coll: Collection[nullable Object] */;
2642 val* var1 /* : Iterator[nullable Object] */;
2643 short int var2 /* : Bool */;
2644 val* var3 /* : nullable Object */;
2645 val* var_i /* var i: nullable Object */;
2646 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[Sequence#0] */
2647 /* <p0:Collection[nullable Object]> isa Collection[Sequence#0] */
2648 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collectionabstract_collection__Sequence_FT0];
2649 cltype = type_struct->color;
2650 idtype = type_struct->id;
2651 if(cltype >= p0->type->table_size) {
2652 var = 0;
2653 } else {
2654 var = p0->type->type_table[cltype] == idtype;
2655 }
2656 if (!var) {
2657 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 517);
2658 exit(1);
2659 }
2660 var_coll = p0;
2661 var1 = ((val* (*)(val*))(var_coll->class->vft[COLOR_abstract_collection__Collection__iterator]))(var_coll) /* iterator on <var_coll:Collection[nullable Object]>*/;
2662 for(;;) {
2663 var2 = ((short int (*)(val*))(var1->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var1) /* is_ok on <var1:Iterator[nullable Object]>*/;
2664 if(!var2) break;
2665 var3 = ((val* (*)(val*))(var1->class->vft[COLOR_abstract_collection__Iterator__item]))(var1) /* item on <var1:Iterator[nullable Object]>*/;
2666 var_i = var3;
2667 ((void (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__Sequence__push]))(self, var_i) /* push on <self:Sequence[nullable Object]>*/;
2668 CONTINUE_label: (void)0;
2669 ((void (*)(val*))(var1->class->vft[COLOR_abstract_collection__Iterator__next]))(var1) /* next on <var1:Iterator[nullable Object]>*/;
2670 }
2671 BREAK_label: (void)0;
2672 RET_LABEL:;
2673 }
2674 /* method abstract_collection#Sequence#append for (self: Object, Collection[nullable Object]) */
2675 void VIRTUAL_abstract_collection__Sequence__append(val* self, val* p0) {
2676 abstract_collection__Sequence__append(self, p0);
2677 RET_LABEL:;
2678 }
2679 /* method abstract_collection#Sequence#pop for (self: Sequence[nullable Object]): nullable Object */
2680 val* abstract_collection__Sequence__pop(val* self) {
2681 val* var /* : nullable Object */;
2682 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 520);
2683 exit(1);
2684 RET_LABEL:;
2685 return var;
2686 }
2687 /* method abstract_collection#Sequence#pop for (self: Object): nullable Object */
2688 val* VIRTUAL_abstract_collection__Sequence__pop(val* self) {
2689 val* var /* : nullable Object */;
2690 val* var1 /* : nullable Object */;
2691 var1 = abstract_collection__Sequence__pop(self);
2692 var = var1;
2693 RET_LABEL:;
2694 return var;
2695 }
2696 /* method abstract_collection#Sequence#unshift for (self: Sequence[nullable Object], nullable Object) */
2697 void abstract_collection__Sequence__unshift(val* self, val* p0) {
2698 short int var /* : Bool */;
2699 int cltype;
2700 int idtype;
2701 const struct type* type_struct;
2702 short int is_nullable;
2703 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Sequence#0 */
2704 /* <p0:nullable Object> isa Sequence#0 */
2705 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Sequence_FT0];
2706 cltype = type_struct->color;
2707 idtype = type_struct->id;
2708 is_nullable = type_struct->is_nullable;
2709 if(p0 == NULL) {
2710 var = is_nullable;
2711 } else {
2712 if(cltype >= p0->type->table_size) {
2713 var = 0;
2714 } else {
2715 var = p0->type->type_table[cltype] == idtype;
2716 }
2717 }
2718 if (!var) {
2719 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 523);
2720 exit(1);
2721 }
2722 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 523);
2723 exit(1);
2724 RET_LABEL:;
2725 }
2726 /* method abstract_collection#Sequence#unshift for (self: Object, nullable Object) */
2727 void VIRTUAL_abstract_collection__Sequence__unshift(val* self, val* p0) {
2728 abstract_collection__Sequence__unshift(self, p0);
2729 RET_LABEL:;
2730 }
2731 /* method abstract_collection#Sequence#shift for (self: Sequence[nullable Object]): nullable Object */
2732 val* abstract_collection__Sequence__shift(val* self) {
2733 val* var /* : nullable Object */;
2734 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 526);
2735 exit(1);
2736 RET_LABEL:;
2737 return var;
2738 }
2739 /* method abstract_collection#Sequence#shift for (self: Object): nullable Object */
2740 val* VIRTUAL_abstract_collection__Sequence__shift(val* self) {
2741 val* var /* : nullable Object */;
2742 val* var1 /* : nullable Object */;
2743 var1 = abstract_collection__Sequence__shift(self);
2744 var = var1;
2745 RET_LABEL:;
2746 return var;
2747 }
2748 /* method abstract_collection#Sequence#[]= for (self: Sequence[nullable Object], Int, nullable Object) */
2749 void abstract_collection__Sequence___91d_93d_61d(val* self, long p0, val* p1) {
2750 short int var /* : Bool */;
2751 int cltype;
2752 int idtype;
2753 const struct type* type_struct;
2754 short int is_nullable;
2755 /* Covariant cast for argument 1 (item) <p1:nullable Object> isa Sequence#0 */
2756 /* <p1:nullable Object> isa Sequence#0 */
2757 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Sequence_FT0];
2758 cltype = type_struct->color;
2759 idtype = type_struct->id;
2760 is_nullable = type_struct->is_nullable;
2761 if(p1 == NULL) {
2762 var = is_nullable;
2763 } else {
2764 if(cltype >= p1->type->table_size) {
2765 var = 0;
2766 } else {
2767 var = p1->type->type_table[cltype] == idtype;
2768 }
2769 }
2770 if (!var) {
2771 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 530);
2772 exit(1);
2773 }
2774 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 530);
2775 exit(1);
2776 RET_LABEL:;
2777 }
2778 /* method abstract_collection#Sequence#[]= for (self: Object, Int, nullable Object) */
2779 void VIRTUAL_abstract_collection__Sequence___91d_93d_61d(val* self, long p0, val* p1) {
2780 abstract_collection__Sequence___91d_93d_61d(self, p0, p1);
2781 RET_LABEL:;
2782 }
2783 /* method abstract_collection#Sequence#remove_at for (self: Sequence[nullable Object], Int) */
2784 void abstract_collection__Sequence__remove_at(val* self, long p0) {
2785 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 533);
2786 exit(1);
2787 RET_LABEL:;
2788 }
2789 /* method abstract_collection#Sequence#remove_at for (self: Object, Int) */
2790 void VIRTUAL_abstract_collection__Sequence__remove_at(val* self, long p0) {
2791 abstract_collection__Sequence__remove_at(self, p0);
2792 RET_LABEL:;
2793 }
2794 /* method abstract_collection#IndexedIterator#index for (self: IndexedIterator[nullable Object]): Int */
2795 long abstract_collection__IndexedIterator__index(val* self) {
2796 long var /* : Int */;
2797 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 540);
2798 exit(1);
2799 RET_LABEL:;
2800 return var;
2801 }
2802 /* method abstract_collection#IndexedIterator#index for (self: Object): Int */
2803 long VIRTUAL_abstract_collection__IndexedIterator__index(val* self) {
2804 long var /* : Int */;
2805 long var1 /* : Int */;
2806 var1 = abstract_collection__IndexedIterator__index(self);
2807 var = var1;
2808 RET_LABEL:;
2809 return var;
2810 }
2811 /* method abstract_collection#CoupleMap#couple_at for (self: CoupleMap[Object, nullable Object], Object): nullable Couple[Object, nullable Object] */
2812 val* abstract_collection__CoupleMap__couple_at(val* self, val* p0) {
2813 val* var /* : nullable Couple[Object, nullable Object] */;
2814 short int var1 /* : Bool */;
2815 int cltype;
2816 int idtype;
2817 const struct type* type_struct;
2818 /* Covariant cast for argument 0 (key) <p0:Object> isa CoupleMap#0 */
2819 /* <p0:Object> isa CoupleMap#0 */
2820 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__CoupleMap_FT0];
2821 cltype = type_struct->color;
2822 idtype = type_struct->id;
2823 if(cltype >= p0->type->table_size) {
2824 var1 = 0;
2825 } else {
2826 var1 = p0->type->type_table[cltype] == idtype;
2827 }
2828 if (!var1) {
2829 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 547);
2830 exit(1);
2831 }
2832 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Deferred method called", "lib/standard/collection/abstract_collection.nit", 547);
2833 exit(1);
2834 RET_LABEL:;
2835 return var;
2836 }
2837 /* method abstract_collection#CoupleMap#couple_at for (self: Object, Object): nullable Couple[Object, nullable Object] */
2838 val* VIRTUAL_abstract_collection__CoupleMap__couple_at(val* self, val* p0) {
2839 val* var /* : nullable Couple[Object, nullable Object] */;
2840 val* var1 /* : nullable Couple[Object, nullable Object] */;
2841 var1 = abstract_collection__CoupleMap__couple_at(self, p0);
2842 var = var1;
2843 RET_LABEL:;
2844 return var;
2845 }
2846 /* method abstract_collection#CoupleMap#[] for (self: CoupleMap[Object, nullable Object], Object): nullable Object */
2847 val* abstract_collection__CoupleMap___91d_93d(val* self, val* p0) {
2848 val* var /* : nullable Object */;
2849 short int var1 /* : Bool */;
2850 int cltype;
2851 int idtype;
2852 const struct type* type_struct;
2853 val* var_key /* var key: Object */;
2854 val* var2 /* : nullable Couple[Object, nullable Object] */;
2855 val* var_c /* var c: nullable Couple[Object, nullable Object] */;
2856 val* var3 /* : null */;
2857 short int var4 /* : Bool */;
2858 val* var5 /* : nullable Object */;
2859 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
2860 /* <p0:Object> isa MapRead#0 */
2861 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__MapRead_FT0];
2862 cltype = type_struct->color;
2863 idtype = type_struct->id;
2864 if(cltype >= p0->type->table_size) {
2865 var1 = 0;
2866 } else {
2867 var1 = p0->type->type_table[cltype] == idtype;
2868 }
2869 if (!var1) {
2870 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 551);
2871 exit(1);
2872 }
2873 var_key = p0;
2874 var2 = ((val* (*)(val*, val*))(self->class->vft[COLOR_abstract_collection__CoupleMap__couple_at]))(self, var_key) /* couple_at on <self:CoupleMap[Object, nullable Object]>*/;
2875 var_c = var2;
2876 var3 = NULL;
2877 if (var_c == NULL) {
2878 var4 = 1; /* is null */
2879 } else {
2880 var4 = 0; /* arg is null but recv is not */
2881 }
2882 if (var4){
2883 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Aborted", "lib/standard/collection/abstract_collection.nit", 555);
2884 exit(1);
2885 } else {
2886 var5 = ((val* (*)(val*))(var_c->class->vft[COLOR_abstract_collection__Couple__second]))(var_c) /* second on <var_c:nullable Couple[Object, nullable Object](Couple[Object, nullable Object])>*/;
2887 var = var5;
2888 goto RET_LABEL;
2889 }
2890 RET_LABEL:;
2891 return var;
2892 }
2893 /* method abstract_collection#CoupleMap#[] for (self: Object, Object): nullable Object */
2894 val* VIRTUAL_abstract_collection__CoupleMap___91d_93d(val* self, val* p0) {
2895 val* var /* : nullable Object */;
2896 val* var1 /* : nullable Object */;
2897 var1 = abstract_collection__CoupleMap___91d_93d(self, p0);
2898 var = var1;
2899 RET_LABEL:;
2900 return var;
2901 }
2902 /* method abstract_collection#CoupleMapIterator#item for (self: CoupleMapIterator[Object, nullable Object]): nullable Object */
2903 val* abstract_collection__CoupleMapIterator__item(val* self) {
2904 val* var /* : nullable Object */;
2905 val* var1 /* : Iterator[Couple[Object, nullable Object]] */;
2906 val* var2 /* : nullable Object */;
2907 val* var3 /* : nullable Object */;
2908 var1 = self->attrs[COLOR_abstract_collection__CoupleMapIterator___iter].val; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
2909 if (var1 == NULL) {
2910 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Uninitialized attribute _iter", "lib/standard/collection/abstract_collection.nit", 567);
2911 exit(1);
2912 }
2913 var2 = ((val* (*)(val*))(var1->class->vft[COLOR_abstract_collection__Iterator__item]))(var1) /* item on <var1:Iterator[Couple[Object, nullable Object]]>*/;
2914 var3 = ((val* (*)(val*))(var2->class->vft[COLOR_abstract_collection__Couple__second]))(var2) /* second on <var2:nullable Object(Couple[Object, nullable Object])>*/;
2915 var = var3;
2916 goto RET_LABEL;
2917 RET_LABEL:;
2918 return var;
2919 }
2920 /* method abstract_collection#CoupleMapIterator#item for (self: Object): nullable Object */
2921 val* VIRTUAL_abstract_collection__CoupleMapIterator__item(val* self) {
2922 val* var /* : nullable Object */;
2923 val* var1 /* : nullable Object */;
2924 var1 = abstract_collection__CoupleMapIterator__item(self);
2925 var = var1;
2926 RET_LABEL:;
2927 return var;
2928 }
2929 /* method abstract_collection#CoupleMapIterator#key for (self: CoupleMapIterator[Object, nullable Object]): Object */
2930 val* abstract_collection__CoupleMapIterator__key(val* self) {
2931 val* var /* : Object */;
2932 val* var1 /* : Iterator[Couple[Object, nullable Object]] */;
2933 val* var2 /* : nullable Object */;
2934 val* var3 /* : nullable Object */;
2935 var1 = self->attrs[COLOR_abstract_collection__CoupleMapIterator___iter].val; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
2936 if (var1 == NULL) {
2937 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Uninitialized attribute _iter", "lib/standard/collection/abstract_collection.nit", 571);
2938 exit(1);
2939 }
2940 var2 = ((val* (*)(val*))(var1->class->vft[COLOR_abstract_collection__Iterator__item]))(var1) /* item on <var1:Iterator[Couple[Object, nullable Object]]>*/;
2941 var3 = ((val* (*)(val*))(var2->class->vft[COLOR_abstract_collection__Couple__first]))(var2) /* first on <var2:nullable Object(Couple[Object, nullable Object])>*/;
2942 var = var3;
2943 goto RET_LABEL;
2944 RET_LABEL:;
2945 return var;
2946 }
2947 /* method abstract_collection#CoupleMapIterator#key for (self: Object): Object */
2948 val* VIRTUAL_abstract_collection__CoupleMapIterator__key(val* self) {
2949 val* var /* : Object */;
2950 val* var1 /* : Object */;
2951 var1 = abstract_collection__CoupleMapIterator__key(self);
2952 var = var1;
2953 RET_LABEL:;
2954 return var;
2955 }
2956 /* method abstract_collection#CoupleMapIterator#is_ok for (self: CoupleMapIterator[Object, nullable Object]): Bool */
2957 short int abstract_collection__CoupleMapIterator__is_ok(val* self) {
2958 short int var /* : Bool */;
2959 val* var1 /* : Iterator[Couple[Object, nullable Object]] */;
2960 short int var2 /* : Bool */;
2961 var1 = self->attrs[COLOR_abstract_collection__CoupleMapIterator___iter].val; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
2962 if (var1 == NULL) {
2963 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Uninitialized attribute _iter", "lib/standard/collection/abstract_collection.nit", 573);
2964 exit(1);
2965 }
2966 var2 = ((short int (*)(val*))(var1->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var1) /* is_ok on <var1:Iterator[Couple[Object, nullable Object]]>*/;
2967 var = var2;
2968 goto RET_LABEL;
2969 RET_LABEL:;
2970 return var;
2971 }
2972 /* method abstract_collection#CoupleMapIterator#is_ok for (self: Object): Bool */
2973 short int VIRTUAL_abstract_collection__CoupleMapIterator__is_ok(val* self) {
2974 short int var /* : Bool */;
2975 short int var1 /* : Bool */;
2976 var1 = abstract_collection__CoupleMapIterator__is_ok(self);
2977 var = var1;
2978 RET_LABEL:;
2979 return var;
2980 }
2981 /* method abstract_collection#CoupleMapIterator#next for (self: CoupleMapIterator[Object, nullable Object]) */
2982 void abstract_collection__CoupleMapIterator__next(val* self) {
2983 val* var /* : Iterator[Couple[Object, nullable Object]] */;
2984 var = self->attrs[COLOR_abstract_collection__CoupleMapIterator___iter].val; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
2985 if (var == NULL) {
2986 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Uninitialized attribute _iter", "lib/standard/collection/abstract_collection.nit", 577);
2987 exit(1);
2988 }
2989 ((void (*)(val*))(var->class->vft[COLOR_abstract_collection__Iterator__next]))(var) /* next on <var:Iterator[Couple[Object, nullable Object]]>*/;
2990 RET_LABEL:;
2991 }
2992 /* method abstract_collection#CoupleMapIterator#next for (self: Object) */
2993 void VIRTUAL_abstract_collection__CoupleMapIterator__next(val* self) {
2994 abstract_collection__CoupleMapIterator__next(self);
2995 RET_LABEL:;
2996 }
2997 /* method abstract_collection#CoupleMapIterator#init for (self: CoupleMapIterator[Object, nullable Object], Iterator[Couple[Object, nullable Object]]) */
2998 void abstract_collection__CoupleMapIterator__init(val* self, val* p0) {
2999 short int var /* : Bool */;
3000 int cltype;
3001 int idtype;
3002 const struct type* type_struct;
3003 val* var_i /* var i: Iterator[Couple[Object, nullable Object]] */;
3004 /* Covariant cast for argument 0 (i) <p0:Iterator[Couple[Object, nullable Object]]> isa Iterator[Couple[CoupleMapIterator#0, CoupleMapIterator#1]] */
3005 /* <p0:Iterator[Couple[Object, nullable Object]]> isa Iterator[Couple[CoupleMapIterator#0, CoupleMapIterator#1]] */
3006 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Iteratorabstract_collection__Coupleabstract_collection__CoupleMapIterator_FT0abstract_collection__CoupleMapIterator_FT1];
3007 cltype = type_struct->color;
3008 idtype = type_struct->id;
3009 if(cltype >= p0->type->table_size) {
3010 var = 0;
3011 } else {
3012 var = p0->type->type_table[cltype] == idtype;
3013 }
3014 if (!var) {
3015 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 582);
3016 exit(1);
3017 }
3018 var_i = p0;
3019 self->attrs[COLOR_abstract_collection__CoupleMapIterator___iter].val = var_i; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
3020 RET_LABEL:;
3021 }
3022 /* method abstract_collection#CoupleMapIterator#init for (self: Object, Iterator[Couple[Object, nullable Object]]) */
3023 void VIRTUAL_abstract_collection__CoupleMapIterator__init(val* self, val* p0) {
3024 abstract_collection__CoupleMapIterator__init(self, p0);
3025 RET_LABEL:;
3026 }
3027 /* method abstract_collection#Couple#first for (self: Couple[nullable Object, nullable Object]): nullable Object */
3028 val* abstract_collection__Couple__first(val* self) {
3029 val* var /* : nullable Object */;
3030 val* var1 /* : nullable Object */;
3031 var1 = self->attrs[COLOR_abstract_collection__Couple___first].val; /* _first on <self:Couple[nullable Object, nullable Object]> */
3032 var = var1;
3033 RET_LABEL:;
3034 return var;
3035 }
3036 /* method abstract_collection#Couple#first for (self: Object): nullable Object */
3037 val* VIRTUAL_abstract_collection__Couple__first(val* self) {
3038 val* var /* : nullable Object */;
3039 val* var1 /* : nullable Object */;
3040 var1 = abstract_collection__Couple__first(self);
3041 var = var1;
3042 RET_LABEL:;
3043 return var;
3044 }
3045 /* method abstract_collection#Couple#first= for (self: Couple[nullable Object, nullable Object], nullable Object) */
3046 void abstract_collection__Couple__first_61d(val* self, val* p0) {
3047 short int var /* : Bool */;
3048 int cltype;
3049 int idtype;
3050 const struct type* type_struct;
3051 short int is_nullable;
3052 /* Covariant cast for argument 0 (first) <p0:nullable Object> isa Couple#0 */
3053 /* <p0:nullable Object> isa Couple#0 */
3054 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Couple_FT0];
3055 cltype = type_struct->color;
3056 idtype = type_struct->id;
3057 is_nullable = type_struct->is_nullable;
3058 if(p0 == NULL) {
3059 var = is_nullable;
3060 } else {
3061 if(cltype >= p0->type->table_size) {
3062 var = 0;
3063 } else {
3064 var = p0->type->type_table[cltype] == idtype;
3065 }
3066 }
3067 if (!var) {
3068 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 590);
3069 exit(1);
3070 }
3071 self->attrs[COLOR_abstract_collection__Couple___first].val = p0; /* _first on <self:Couple[nullable Object, nullable Object]> */
3072 RET_LABEL:;
3073 }
3074 /* method abstract_collection#Couple#first= for (self: Object, nullable Object) */
3075 void VIRTUAL_abstract_collection__Couple__first_61d(val* self, val* p0) {
3076 abstract_collection__Couple__first_61d(self, p0);
3077 RET_LABEL:;
3078 }
3079 /* method abstract_collection#Couple#second for (self: Couple[nullable Object, nullable Object]): nullable Object */
3080 val* abstract_collection__Couple__second(val* self) {
3081 val* var /* : nullable Object */;
3082 val* var1 /* : nullable Object */;
3083 var1 = self->attrs[COLOR_abstract_collection__Couple___second].val; /* _second on <self:Couple[nullable Object, nullable Object]> */
3084 var = var1;
3085 RET_LABEL:;
3086 return var;
3087 }
3088 /* method abstract_collection#Couple#second for (self: Object): nullable Object */
3089 val* VIRTUAL_abstract_collection__Couple__second(val* self) {
3090 val* var /* : nullable Object */;
3091 val* var1 /* : nullable Object */;
3092 var1 = abstract_collection__Couple__second(self);
3093 var = var1;
3094 RET_LABEL:;
3095 return var;
3096 }
3097 /* method abstract_collection#Couple#second= for (self: Couple[nullable Object, nullable Object], nullable Object) */
3098 void abstract_collection__Couple__second_61d(val* self, val* p0) {
3099 short int var /* : Bool */;
3100 int cltype;
3101 int idtype;
3102 const struct type* type_struct;
3103 short int is_nullable;
3104 /* Covariant cast for argument 0 (second) <p0:nullable Object> isa Couple#1 */
3105 /* <p0:nullable Object> isa Couple#1 */
3106 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Couple_FT1];
3107 cltype = type_struct->color;
3108 idtype = type_struct->id;
3109 is_nullable = type_struct->is_nullable;
3110 if(p0 == NULL) {
3111 var = is_nullable;
3112 } else {
3113 if(cltype >= p0->type->table_size) {
3114 var = 0;
3115 } else {
3116 var = p0->type->type_table[cltype] == idtype;
3117 }
3118 }
3119 if (!var) {
3120 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 593);
3121 exit(1);
3122 }
3123 self->attrs[COLOR_abstract_collection__Couple___second].val = p0; /* _second on <self:Couple[nullable Object, nullable Object]> */
3124 RET_LABEL:;
3125 }
3126 /* method abstract_collection#Couple#second= for (self: Object, nullable Object) */
3127 void VIRTUAL_abstract_collection__Couple__second_61d(val* self, val* p0) {
3128 abstract_collection__Couple__second_61d(self, p0);
3129 RET_LABEL:;
3130 }
3131 /* method abstract_collection#Couple#init for (self: Couple[nullable Object, nullable Object], nullable Object, nullable Object) */
3132 void abstract_collection__Couple__init(val* self, val* p0, val* p1) {
3133 short int var /* : Bool */;
3134 int cltype;
3135 int idtype;
3136 const struct type* type_struct;
3137 short int is_nullable;
3138 short int var1 /* : Bool */;
3139 int cltype2;
3140 int idtype3;
3141 const struct type* type_struct4;
3142 short int is_nullable5;
3143 val* var_f /* var f: nullable Object */;
3144 val* var_s /* var s: nullable Object */;
3145 /* Covariant cast for argument 0 (f) <p0:nullable Object> isa Couple#0 */
3146 /* <p0:nullable Object> isa Couple#0 */
3147 type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Couple_FT0];
3148 cltype = type_struct->color;
3149 idtype = type_struct->id;
3150 is_nullable = type_struct->is_nullable;
3151 if(p0 == NULL) {
3152 var = is_nullable;
3153 } else {
3154 if(cltype >= p0->type->table_size) {
3155 var = 0;
3156 } else {
3157 var = p0->type->type_table[cltype] == idtype;
3158 }
3159 }
3160 if (!var) {
3161 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 596);
3162 exit(1);
3163 }
3164 /* Covariant cast for argument 1 (s) <p1:nullable Object> isa Couple#1 */
3165 /* <p1:nullable Object> isa Couple#1 */
3166 type_struct4 = self->type->resolution_table->types[COLOR_abstract_collection__Couple_FT1];
3167 cltype2 = type_struct4->color;
3168 idtype3 = type_struct4->id;
3169 is_nullable5 = type_struct4->is_nullable;
3170 if(p1 == NULL) {
3171 var1 = is_nullable5;
3172 } else {
3173 if(cltype2 >= p1->type->table_size) {
3174 var1 = 0;
3175 } else {
3176 var1 = p1->type->type_table[cltype2] == idtype3;
3177 }
3178 }
3179 if (!var1) {
3180 fprintf(stderr, "Runtime error: %s (%s:%d)\n", "Cast failed", "lib/standard/collection/abstract_collection.nit", 596);
3181 exit(1);
3182 }
3183 var_f = p0;
3184 var_s = p1;
3185 self->attrs[COLOR_abstract_collection__Couple___first].val = var_f; /* _first on <self:Couple[nullable Object, nullable Object]> */
3186 self->attrs[COLOR_abstract_collection__Couple___second].val = var_s; /* _second on <self:Couple[nullable Object, nullable Object]> */
3187 RET_LABEL:;
3188 }
3189 /* method abstract_collection#Couple#init for (self: Object, nullable Object, nullable Object) */
3190 void VIRTUAL_abstract_collection__Couple__init(val* self, val* p0, val* p1) {
3191 abstract_collection__Couple__init(self, p0, p1);
3192 RET_LABEL:;
3193 }