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