1 #include "abstract_collection.sep.0.h"
2 /* method abstract_collection#Collection#iterator for (self: Collection[nullable Object]): Iterator[nullable Object] */
3 val
* abstract_collection__Collection__iterator(val
* self
) {
4 val
* var
/* : Iterator[nullable Object] */;
5 const char* var_class_name
;
6 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
7 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "iterator", var_class_name
);
8 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 54);
13 /* method abstract_collection#Collection#iterator for (self: Object): Iterator[nullable Object] */
14 val
* VIRTUAL_abstract_collection__Collection__iterator(val
* self
) {
15 val
* var
/* : Iterator[nullable Object] */;
16 val
* var1
/* : Iterator[nullable Object] */;
17 var1
= abstract_collection__Collection__iterator(self
);
22 /* method abstract_collection#Collection#is_empty for (self: Collection[nullable Object]): Bool */
23 short int abstract_collection__Collection__is_empty(val
* self
) {
24 short int var
/* : Bool */;
25 long var1
/* : Int */;
26 long var2
/* : Int */;
27 short int var3
/* : Bool */;
28 short int var5
/* : Bool */;
29 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Collection[nullable Object]>*/;
31 { /* Inline kernel#Int#== (var1,var2) */
42 /* method abstract_collection#Collection#is_empty for (self: Object): Bool */
43 short int VIRTUAL_abstract_collection__Collection__is_empty(val
* self
) {
44 short int var
/* : Bool */;
45 short int var1
/* : Bool */;
46 var1
= abstract_collection__Collection__is_empty(self
);
51 /* method abstract_collection#Collection#length for (self: Collection[nullable Object]): Int */
52 long abstract_collection__Collection__length(val
* self
) {
54 long var1
/* : Int */;
55 long var_nb
/* var nb: Int */;
56 val
* var2
/* : Iterator[nullable Object] */;
57 short int var3
/* : Bool */;
58 val
* var4
/* : nullable Object */;
59 val
* var_i
/* var i: nullable Object */;
60 long var5
/* : Int */;
61 long var6
/* : Int */;
62 long var8
/* : Int */;
65 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:Collection[nullable Object]>*/;
67 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
69 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
72 { /* Inline kernel#Int#+ (var_nb,var5) */
79 CONTINUE_label
: (void)0;
80 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
88 /* method abstract_collection#Collection#length for (self: Object): Int */
89 long VIRTUAL_abstract_collection__Collection__length(val
* self
) {
91 long var1
/* : Int */;
92 var1
= abstract_collection__Collection__length(self
);
97 /* method abstract_collection#Collection#has for (self: Collection[nullable Object], nullable Object): Bool */
98 short int abstract_collection__Collection__has(val
* self
, val
* p0
) {
99 short int var
/* : Bool */;
100 short int var1
/* : Bool */;
103 const struct type
* type_struct
;
104 short int is_nullable
;
105 const char* var_class_name
;
106 val
* var_item
/* var item: nullable Object */;
107 val
* var2
/* : Iterator[nullable Object] */;
108 short int var3
/* : Bool */;
109 val
* var4
/* : nullable Object */;
110 val
* var_i
/* var i: nullable Object */;
111 short int var5
/* : Bool */;
112 short int var6
/* : Bool */;
113 short int var7
/* : Bool */;
114 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
115 /* <p0:nullable Object> isa Collection#0 */
116 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
117 cltype
= type_struct
->color
;
118 idtype
= type_struct
->id
;
119 is_nullable
= type_struct
->is_nullable
;
123 if(cltype
>= p0
->type
->table_size
) {
126 var1
= p0
->type
->type_table
[cltype
] == idtype
;
130 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
131 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
132 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 75);
136 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:Collection[nullable Object]>*/;
138 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
140 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
143 var5
= (var_item
== NULL
);
145 var5
= ((short int (*)(val
*, val
*))(var_i
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_i
, var_item
) /* == on <var_i:nullable Object>*/;
153 CONTINUE_label
: (void)0;
154 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
156 BREAK_label
: (void)0;
163 /* method abstract_collection#Collection#has for (self: Object, nullable Object): Bool */
164 short int VIRTUAL_abstract_collection__Collection__has(val
* self
, val
* p0
) {
165 short int var
/* : Bool */;
166 short int var1
/* : Bool */;
167 var1
= abstract_collection__Collection__has(self
, p0
);
172 /* method abstract_collection#Collection#has_only for (self: Collection[nullable Object], nullable Object): Bool */
173 short int abstract_collection__Collection__has_only(val
* self
, val
* p0
) {
174 short int var
/* : Bool */;
175 short int var1
/* : Bool */;
178 const struct type
* type_struct
;
179 short int is_nullable
;
180 const char* var_class_name
;
181 val
* var_item
/* var item: nullable Object */;
182 val
* var2
/* : Iterator[nullable Object] */;
183 short int var3
/* : Bool */;
184 val
* var4
/* : nullable Object */;
185 val
* var_i
/* var i: nullable Object */;
186 short int var5
/* : Bool */;
187 short int var6
/* : Bool */;
188 short int var7
/* : Bool */;
189 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
190 /* <p0:nullable Object> isa Collection#0 */
191 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
192 cltype
= type_struct
->color
;
193 idtype
= type_struct
->id
;
194 is_nullable
= type_struct
->is_nullable
;
198 if(cltype
>= p0
->type
->table_size
) {
201 var1
= p0
->type
->type_table
[cltype
] == idtype
;
205 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
206 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
207 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 88);
211 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:Collection[nullable Object]>*/;
213 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
215 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
218 var5
= (var_item
!= NULL
);
220 var5
= ((short int (*)(val
*, val
*))(var_i
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var_i
, var_item
) /* != on <var_i:nullable Object>*/;
228 CONTINUE_label
: (void)0;
229 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
231 BREAK_label
: (void)0;
238 /* method abstract_collection#Collection#has_only for (self: Object, nullable Object): Bool */
239 short int VIRTUAL_abstract_collection__Collection__has_only(val
* self
, val
* p0
) {
240 short int var
/* : Bool */;
241 short int var1
/* : Bool */;
242 var1
= abstract_collection__Collection__has_only(self
, p0
);
247 /* method abstract_collection#Collection#count for (self: Collection[nullable Object], nullable Object): Int */
248 long abstract_collection__Collection__count(val
* self
, val
* p0
) {
249 long var
/* : Int */;
250 short int var1
/* : Bool */;
253 const struct type
* type_struct
;
254 short int is_nullable
;
255 const char* var_class_name
;
256 val
* var_item
/* var item: nullable Object */;
257 long var2
/* : Int */;
258 long var_nb
/* var nb: Int */;
259 val
* var3
/* : Iterator[nullable Object] */;
260 short int var4
/* : Bool */;
261 val
* var5
/* : nullable Object */;
262 val
* var_i
/* var i: nullable Object */;
263 short int var6
/* : Bool */;
264 long var7
/* : Int */;
265 long var8
/* : Int */;
266 long var10
/* : Int */;
267 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
268 /* <p0:nullable Object> isa Collection#0 */
269 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
270 cltype
= type_struct
->color
;
271 idtype
= type_struct
->id
;
272 is_nullable
= type_struct
->is_nullable
;
276 if(cltype
>= p0
->type
->table_size
) {
279 var1
= p0
->type
->type_table
[cltype
] == idtype
;
283 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
284 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
285 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 105);
291 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:Collection[nullable Object]>*/;
293 var4
= ((short int (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var3
) /* is_ok on <var3:Iterator[nullable Object]>*/;
295 var5
= ((val
* (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var3
) /* item on <var3:Iterator[nullable Object]>*/;
298 var6
= (var_item
== NULL
);
300 var6
= ((short int (*)(val
*, val
*))(var_i
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_i
, var_item
) /* == on <var_i:nullable Object>*/;
304 { /* Inline kernel#Int#+ (var_nb,var7) */
305 var10
= var_nb
+ var7
;
313 CONTINUE_label
: (void)0;
314 ((void (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var3
) /* next on <var3:Iterator[nullable Object]>*/;
316 BREAK_label
: (void)0;
322 /* method abstract_collection#Collection#count for (self: Object, nullable Object): Int */
323 long VIRTUAL_abstract_collection__Collection__count(val
* self
, val
* p0
) {
324 long var
/* : Int */;
325 long var1
/* : Int */;
326 var1
= abstract_collection__Collection__count(self
, p0
);
331 /* method abstract_collection#Collection#first for (self: Collection[nullable Object]): nullable Object */
332 val
* abstract_collection__Collection__first(val
* self
) {
333 val
* var
/* : nullable Object */;
334 long var1
/* : Int */;
335 long var2
/* : Int */;
336 short int var3
/* : Bool */;
337 short int var5
/* : Bool */;
340 const char* var_class_name
;
341 short int var6
/* : Bool */;
342 val
* var7
/* : Iterator[nullable Object] */;
343 val
* var8
/* : nullable Object */;
344 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Collection[nullable Object]>*/;
346 { /* Inline kernel#Int#> (var1,var2) */
347 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
348 /* <var2:Int> isa OTHER */
349 var5
= 1; /* easy <var2:Int> isa OTHER*/
351 var_class_name
= type_kernel__Int
.name
;
352 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
353 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 267);
362 fprintf(stderr
, "Runtime error: %s", "Assert failed");
363 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 121);
366 var7
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:Collection[nullable Object]>*/;
367 var8
= ((val
* (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var7
) /* item on <var7:Iterator[nullable Object]>*/;
373 /* method abstract_collection#Collection#first for (self: Object): nullable Object */
374 val
* VIRTUAL_abstract_collection__Collection__first(val
* self
) {
375 val
* var
/* : nullable Object */;
376 val
* var1
/* : nullable Object */;
377 var1
= abstract_collection__Collection__first(self
);
382 /* method abstract_collection#Collection#has_all for (self: Collection[nullable Object], Collection[nullable Object]): Bool */
383 short int abstract_collection__Collection__has_all(val
* self
, val
* p0
) {
384 short int var
/* : Bool */;
385 short int var1
/* : Bool */;
388 const struct type
* type_struct
;
389 const char* var_class_name
;
390 val
* var_other
/* var other: Collection[nullable Object] */;
391 val
* var2
/* : Iterator[nullable Object] */;
392 short int var3
/* : Bool */;
393 val
* var4
/* : nullable Object */;
394 val
* var_x
/* var x: nullable Object */;
395 short int var5
/* : Bool */;
396 short int var6
/* : Bool */;
397 short int var7
/* : Bool */;
398 short int var8
/* : Bool */;
399 /* Covariant cast for argument 0 (other) <p0:Collection[nullable Object]> isa Collection[Collection#0] */
400 /* <p0:Collection[nullable Object]> isa Collection[Collection#0] */
401 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__Collection_FT0
];
402 cltype
= type_struct
->color
;
403 idtype
= type_struct
->id
;
404 if(cltype
>= p0
->type
->table_size
) {
407 var1
= p0
->type
->type_table
[cltype
] == idtype
;
410 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
411 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[Collection#0]", var_class_name
);
412 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 125);
416 var2
= ((val
* (*)(val
*))(var_other
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_other
) /* iterator on <var_other:Collection[nullable Object]>*/;
418 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
420 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
422 var5
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__has
]))(self
, var_x
) /* has on <self:Collection[nullable Object]>*/;
430 CONTINUE_label
: (void)0;
431 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
433 BREAK_label
: (void)0;
440 /* method abstract_collection#Collection#has_all for (self: Object, Collection[nullable Object]): Bool */
441 short int VIRTUAL_abstract_collection__Collection__has_all(val
* self
, val
* p0
) {
442 short int var
/* : Bool */;
443 short int var1
/* : Bool */;
444 var1
= abstract_collection__Collection__has_all(self
, p0
);
449 /* method abstract_collection#Iterator#item for (self: Iterator[nullable Object]): nullable Object */
450 val
* abstract_collection__Iterator__item(val
* self
) {
451 val
* var
/* : nullable Object */;
452 const char* var_class_name
;
453 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
454 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "item", var_class_name
);
455 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 141);
460 /* method abstract_collection#Iterator#item for (self: Object): nullable Object */
461 val
* VIRTUAL_abstract_collection__Iterator__item(val
* self
) {
462 val
* var
/* : nullable Object */;
463 val
* var1
/* : nullable Object */;
464 var1
= abstract_collection__Iterator__item(self
);
469 /* method abstract_collection#Iterator#next for (self: Iterator[nullable Object]) */
470 void abstract_collection__Iterator__next(val
* self
) {
471 const char* var_class_name
;
472 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
473 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "next", var_class_name
);
474 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 145);
478 /* method abstract_collection#Iterator#next for (self: Object) */
479 void VIRTUAL_abstract_collection__Iterator__next(val
* self
) {
480 abstract_collection__Iterator__next(self
);
483 /* method abstract_collection#Iterator#is_ok for (self: Iterator[nullable Object]): Bool */
484 short int abstract_collection__Iterator__is_ok(val
* self
) {
485 short int var
/* : Bool */;
486 const char* var_class_name
;
487 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
488 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "is_ok", var_class_name
);
489 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 149);
494 /* method abstract_collection#Iterator#is_ok for (self: Object): Bool */
495 short int VIRTUAL_abstract_collection__Iterator__is_ok(val
* self
) {
496 short int var
/* : Bool */;
497 short int var1
/* : Bool */;
498 var1
= abstract_collection__Iterator__is_ok(self
);
503 /* method abstract_collection#Container#first for (self: Container[nullable Object]): nullable Object */
504 val
* abstract_collection__Container__first(val
* self
) {
505 val
* var
/* : nullable Object */;
506 val
* var1
/* : nullable Object */;
507 var1
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Container[nullable Object]> */
513 /* method abstract_collection#Container#first for (self: Object): nullable Object */
514 val
* VIRTUAL_abstract_collection__Container__first(val
* self
) {
515 val
* var
/* : nullable Object */;
516 val
* var1
/* : nullable Object */;
517 var1
= abstract_collection__Container__first(self
);
522 /* method abstract_collection#Container#is_empty for (self: Container[nullable Object]): Bool */
523 short int abstract_collection__Container__is_empty(val
* self
) {
524 short int var
/* : Bool */;
525 short int var1
/* : Bool */;
532 /* method abstract_collection#Container#is_empty for (self: Object): Bool */
533 short int VIRTUAL_abstract_collection__Container__is_empty(val
* self
) {
534 short int var
/* : Bool */;
535 short int var1
/* : Bool */;
536 var1
= abstract_collection__Container__is_empty(self
);
541 /* method abstract_collection#Container#length for (self: Container[nullable Object]): Int */
542 long abstract_collection__Container__length(val
* self
) {
543 long var
/* : Int */;
544 long var1
/* : Int */;
551 /* method abstract_collection#Container#length for (self: Object): Int */
552 long VIRTUAL_abstract_collection__Container__length(val
* self
) {
553 long var
/* : Int */;
554 long var1
/* : Int */;
555 var1
= abstract_collection__Container__length(self
);
560 /* method abstract_collection#Container#has for (self: Container[nullable Object], nullable Object): Bool */
561 short int abstract_collection__Container__has(val
* self
, val
* p0
) {
562 short int var
/* : Bool */;
563 short int var1
/* : Bool */;
566 const struct type
* type_struct
;
567 short int is_nullable
;
568 const char* var_class_name
;
569 val
* var_an_item
/* var an_item: nullable Object */;
570 val
* var2
/* : nullable Object */;
571 short int var3
/* : Bool */;
572 /* Covariant cast for argument 0 (an_item) <p0:nullable Object> isa Collection#0 */
573 /* <p0:nullable Object> isa Collection#0 */
574 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
575 cltype
= type_struct
->color
;
576 idtype
= type_struct
->id
;
577 is_nullable
= type_struct
->is_nullable
;
581 if(cltype
>= p0
->type
->table_size
) {
584 var1
= p0
->type
->type_table
[cltype
] == idtype
;
588 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
589 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
590 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 164);
594 var2
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Container[nullable Object]> */
596 var3
= (var_an_item
== NULL
);
598 var3
= ((short int (*)(val
*, val
*))(var2
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var2
, var_an_item
) /* == on <var2:nullable Object>*/;
605 /* method abstract_collection#Container#has for (self: Object, nullable Object): Bool */
606 short int VIRTUAL_abstract_collection__Container__has(val
* self
, val
* p0
) {
607 short int var
/* : Bool */;
608 short int var1
/* : Bool */;
609 var1
= abstract_collection__Container__has(self
, p0
);
614 /* method abstract_collection#Container#has_only for (self: Container[nullable Object], nullable Object): Bool */
615 short int abstract_collection__Container__has_only(val
* self
, val
* p0
) {
616 short int var
/* : Bool */;
617 short int var1
/* : Bool */;
620 const struct type
* type_struct
;
621 short int is_nullable
;
622 const char* var_class_name
;
623 val
* var_an_item
/* var an_item: nullable Object */;
624 val
* var2
/* : nullable Object */;
625 short int var3
/* : Bool */;
626 /* Covariant cast for argument 0 (an_item) <p0:nullable Object> isa Collection#0 */
627 /* <p0:nullable Object> isa Collection#0 */
628 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
629 cltype
= type_struct
->color
;
630 idtype
= type_struct
->id
;
631 is_nullable
= type_struct
->is_nullable
;
635 if(cltype
>= p0
->type
->table_size
) {
638 var1
= p0
->type
->type_table
[cltype
] == idtype
;
642 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
643 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
644 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 166);
648 var2
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Container[nullable Object]> */
650 var3
= (var_an_item
== NULL
);
652 var3
= ((short int (*)(val
*, val
*))(var2
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var2
, var_an_item
) /* == on <var2:nullable Object>*/;
659 /* method abstract_collection#Container#has_only for (self: Object, nullable Object): Bool */
660 short int VIRTUAL_abstract_collection__Container__has_only(val
* self
, val
* p0
) {
661 short int var
/* : Bool */;
662 short int var1
/* : Bool */;
663 var1
= abstract_collection__Container__has_only(self
, p0
);
668 /* method abstract_collection#Container#count for (self: Container[nullable Object], nullable Object): Int */
669 long abstract_collection__Container__count(val
* self
, val
* p0
) {
670 long var
/* : Int */;
671 short int var1
/* : Bool */;
674 const struct type
* type_struct
;
675 short int is_nullable
;
676 const char* var_class_name
;
677 val
* var_an_item
/* var an_item: nullable Object */;
678 val
* var2
/* : nullable Object */;
679 short int var3
/* : Bool */;
680 long var4
/* : Int */;
681 long var5
/* : Int */;
682 /* Covariant cast for argument 0 (an_item) <p0:nullable Object> isa Collection#0 */
683 /* <p0:nullable Object> isa Collection#0 */
684 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
685 cltype
= type_struct
->color
;
686 idtype
= type_struct
->id
;
687 is_nullable
= type_struct
->is_nullable
;
691 if(cltype
>= p0
->type
->table_size
) {
694 var1
= p0
->type
->type_table
[cltype
] == idtype
;
698 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
699 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
700 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 168);
704 var2
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Container[nullable Object]> */
706 var3
= (var_an_item
== NULL
);
708 var3
= ((short int (*)(val
*, val
*))(var2
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var2
, var_an_item
) /* == on <var2:nullable Object>*/;
722 /* method abstract_collection#Container#count for (self: Object, nullable Object): Int */
723 long VIRTUAL_abstract_collection__Container__count(val
* self
, val
* p0
) {
724 long var
/* : Int */;
725 long var1
/* : Int */;
726 var1
= abstract_collection__Container__count(self
, p0
);
731 /* method abstract_collection#Container#iterator for (self: Container[nullable Object]): Iterator[nullable Object] */
732 val
* abstract_collection__Container__iterator(val
* self
) {
733 val
* var
/* : Iterator[nullable Object] */;
734 val
* var1
/* : ContainerIterator[nullable Object] */;
735 var1
= NEW_abstract_collection__ContainerIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__ContainerIteratorabstract_collection__Container_FT0
]);
736 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_abstract_collection__ContainerIterator__init
]))(var1
, self
) /* init on <var1:ContainerIterator[nullable Object]>*/;
742 /* method abstract_collection#Container#iterator for (self: Object): Iterator[nullable Object] */
743 val
* VIRTUAL_abstract_collection__Container__iterator(val
* self
) {
744 val
* var
/* : Iterator[nullable Object] */;
745 val
* var1
/* : Iterator[nullable Object] */;
746 var1
= abstract_collection__Container__iterator(self
);
751 /* method abstract_collection#Container#init for (self: Container[nullable Object], nullable Object) */
752 void abstract_collection__Container__init(val
* self
, val
* p0
) {
753 short int var
/* : Bool */;
756 const struct type
* type_struct
;
757 short int is_nullable
;
758 const char* var_class_name
;
759 val
* var_e
/* var e: nullable Object */;
760 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Container#0 */
761 /* <p0:nullable Object> isa Container#0 */
762 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Container_FT0
];
763 cltype
= type_struct
->color
;
764 idtype
= type_struct
->id
;
765 is_nullable
= type_struct
->is_nullable
;
769 if(cltype
>= p0
->type
->table_size
) {
772 var
= p0
->type
->type_table
[cltype
] == idtype
;
776 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
777 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Container#0", var_class_name
);
778 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 179);
782 self
->attrs
[COLOR_abstract_collection__Container___item
].val
= var_e
; /* _item on <self:Container[nullable Object]> */
785 /* method abstract_collection#Container#init for (self: Object, nullable Object) */
786 void VIRTUAL_abstract_collection__Container__init(val
* self
, val
* p0
) {
787 abstract_collection__Container__init(self
, p0
);
790 /* method abstract_collection#Container#item for (self: Container[nullable Object]): nullable Object */
791 val
* abstract_collection__Container__item(val
* self
) {
792 val
* var
/* : nullable Object */;
793 val
* var1
/* : nullable Object */;
794 var1
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Container[nullable Object]> */
799 /* method abstract_collection#Container#item for (self: Object): nullable Object */
800 val
* VIRTUAL_abstract_collection__Container__item(val
* self
) {
801 val
* var
/* : nullable Object */;
802 val
* var1
/* : nullable Object */;
803 var1
= abstract_collection__Container__item(self
);
808 /* method abstract_collection#Container#item= for (self: Container[nullable Object], nullable Object) */
809 void abstract_collection__Container__item_61d(val
* self
, val
* p0
) {
810 short int var
/* : Bool */;
813 const struct type
* type_struct
;
814 short int is_nullable
;
815 const char* var_class_name
;
816 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Container#0 */
817 /* <p0:nullable Object> isa Container#0 */
818 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Container_FT0
];
819 cltype
= type_struct
->color
;
820 idtype
= type_struct
->id
;
821 is_nullable
= type_struct
->is_nullable
;
825 if(cltype
>= p0
->type
->table_size
) {
828 var
= p0
->type
->type_table
[cltype
] == idtype
;
832 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
833 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Container#0", var_class_name
);
834 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 182);
837 self
->attrs
[COLOR_abstract_collection__Container___item
].val
= p0
; /* _item on <self:Container[nullable Object]> */
840 /* method abstract_collection#Container#item= for (self: Object, nullable Object) */
841 void VIRTUAL_abstract_collection__Container__item_61d(val
* self
, val
* p0
) {
842 abstract_collection__Container__item_61d(self
, p0
);
845 /* method abstract_collection#ContainerIterator#item for (self: ContainerIterator[nullable Object]): nullable Object */
846 val
* abstract_collection__ContainerIterator__item(val
* self
) {
847 val
* var
/* : nullable Object */;
848 val
* var1
/* : Container[nullable Object] */;
849 val
* var2
/* : nullable Object */;
850 var1
= self
->attrs
[COLOR_abstract_collection__ContainerIterator___container
].val
; /* _container on <self:ContainerIterator[nullable Object]> */
852 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _container");
853 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 189);
856 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Container__item
]))(var1
) /* item on <var1:Container[nullable Object]>*/;
862 /* method abstract_collection#ContainerIterator#item for (self: Object): nullable Object */
863 val
* VIRTUAL_abstract_collection__ContainerIterator__item(val
* self
) {
864 val
* var
/* : nullable Object */;
865 val
* var1
/* : nullable Object */;
866 var1
= abstract_collection__ContainerIterator__item(self
);
871 /* method abstract_collection#ContainerIterator#next for (self: ContainerIterator[nullable Object]) */
872 void abstract_collection__ContainerIterator__next(val
* self
) {
873 short int var
/* : Bool */;
875 self
->attrs
[COLOR_abstract_collection__ContainerIterator___is_ok
].s
= var
; /* _is_ok on <self:ContainerIterator[nullable Object]> */
878 /* method abstract_collection#ContainerIterator#next for (self: Object) */
879 void VIRTUAL_abstract_collection__ContainerIterator__next(val
* self
) {
880 abstract_collection__ContainerIterator__next(self
);
883 /* method abstract_collection#ContainerIterator#init for (self: ContainerIterator[nullable Object], Container[nullable Object]) */
884 void abstract_collection__ContainerIterator__init(val
* self
, val
* p0
) {
885 short int var
/* : Bool */;
888 const struct type
* type_struct
;
889 const char* var_class_name
;
890 val
* var_c
/* var c: Container[nullable Object] */;
891 /* Covariant cast for argument 0 (c) <p0:Container[nullable Object]> isa Container[ContainerIterator#0] */
892 /* <p0:Container[nullable Object]> isa Container[ContainerIterator#0] */
893 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Containerabstract_collection__ContainerIterator_FT0
];
894 cltype
= type_struct
->color
;
895 idtype
= type_struct
->id
;
896 if(cltype
>= p0
->type
->table_size
) {
899 var
= p0
->type
->type_table
[cltype
] == idtype
;
902 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
903 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Container[ContainerIterator#0]", var_class_name
);
904 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 193);
908 self
->attrs
[COLOR_abstract_collection__ContainerIterator___container
].val
= var_c
; /* _container on <self:ContainerIterator[nullable Object]> */
911 /* method abstract_collection#ContainerIterator#init for (self: Object, Container[nullable Object]) */
912 void VIRTUAL_abstract_collection__ContainerIterator__init(val
* self
, val
* p0
) {
913 abstract_collection__ContainerIterator__init(self
, p0
);
916 /* method abstract_collection#ContainerIterator#is_ok for (self: ContainerIterator[nullable Object]): Bool */
917 short int abstract_collection__ContainerIterator__is_ok(val
* self
) {
918 short int var
/* : Bool */;
919 short int var1
/* : Bool */;
920 var1
= self
->attrs
[COLOR_abstract_collection__ContainerIterator___is_ok
].s
; /* _is_ok on <self:ContainerIterator[nullable Object]> */
925 /* method abstract_collection#ContainerIterator#is_ok for (self: Object): Bool */
926 short int VIRTUAL_abstract_collection__ContainerIterator__is_ok(val
* self
) {
927 short int var
/* : Bool */;
928 short int var1
/* : Bool */;
929 var1
= abstract_collection__ContainerIterator__is_ok(self
);
934 /* method abstract_collection#RemovableCollection#clear for (self: RemovableCollection[nullable Object]) */
935 void abstract_collection__RemovableCollection__clear(val
* self
) {
936 const char* var_class_name
;
937 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
938 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "clear", var_class_name
);
939 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 203);
943 /* method abstract_collection#RemovableCollection#clear for (self: Object) */
944 void VIRTUAL_abstract_collection__RemovableCollection__clear(val
* self
) {
945 abstract_collection__RemovableCollection__clear(self
);
948 /* method abstract_collection#RemovableCollection#remove for (self: RemovableCollection[nullable Object], nullable Object) */
949 void abstract_collection__RemovableCollection__remove(val
* self
, val
* p0
) {
950 short int var
/* : Bool */;
953 const struct type
* type_struct
;
954 short int is_nullable
;
955 const char* var_class_name
;
956 const char* var_class_name1
;
957 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa RemovableCollection#0 */
958 /* <p0:nullable Object> isa RemovableCollection#0 */
959 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
960 cltype
= type_struct
->color
;
961 idtype
= type_struct
->id
;
962 is_nullable
= type_struct
->is_nullable
;
966 if(cltype
>= p0
->type
->table_size
) {
969 var
= p0
->type
->type_table
[cltype
] == idtype
;
973 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
974 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
975 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 206);
978 var_class_name1
= self
== NULL ?
"null" : self
->type
->name
;
979 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "remove", var_class_name1
);
980 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 206);
984 /* method abstract_collection#RemovableCollection#remove for (self: Object, nullable Object) */
985 void VIRTUAL_abstract_collection__RemovableCollection__remove(val
* self
, val
* p0
) {
986 abstract_collection__RemovableCollection__remove(self
, p0
);
989 /* method abstract_collection#RemovableCollection#remove_all for (self: RemovableCollection[nullable Object], nullable Object) */
990 void abstract_collection__RemovableCollection__remove_all(val
* self
, val
* p0
) {
991 short int var
/* : Bool */;
994 const struct type
* type_struct
;
995 short int is_nullable
;
996 const char* var_class_name
;
997 val
* var_item
/* var item: nullable Object */;
998 short int var1
/* : Bool */;
999 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa RemovableCollection#0 */
1000 /* <p0:nullable Object> isa RemovableCollection#0 */
1001 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
1002 cltype
= type_struct
->color
;
1003 idtype
= type_struct
->id
;
1004 is_nullable
= type_struct
->is_nullable
;
1008 if(cltype
>= p0
->type
->table_size
) {
1011 var
= p0
->type
->type_table
[cltype
] == idtype
;
1015 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1016 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
1017 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 209);
1022 var1
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__has
]))(self
, var_item
) /* has on <self:RemovableCollection[nullable Object]>*/;
1024 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__RemovableCollection__remove
]))(self
, var_item
) /* remove on <self:RemovableCollection[nullable Object]>*/;
1025 CONTINUE_label
: (void)0;
1027 BREAK_label
: (void)0;
1030 /* method abstract_collection#RemovableCollection#remove_all for (self: Object, nullable Object) */
1031 void VIRTUAL_abstract_collection__RemovableCollection__remove_all(val
* self
, val
* p0
) {
1032 abstract_collection__RemovableCollection__remove_all(self
, p0
);
1035 /* method abstract_collection#SimpleCollection#add for (self: SimpleCollection[nullable Object], nullable Object) */
1036 void abstract_collection__SimpleCollection__add(val
* self
, val
* p0
) {
1037 short int var
/* : Bool */;
1040 const struct type
* type_struct
;
1041 short int is_nullable
;
1042 const char* var_class_name
;
1043 const char* var_class_name1
;
1044 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa SimpleCollection#0 */
1045 /* <p0:nullable Object> isa SimpleCollection#0 */
1046 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SimpleCollection_FT0
];
1047 cltype
= type_struct
->color
;
1048 idtype
= type_struct
->id
;
1049 is_nullable
= type_struct
->is_nullable
;
1053 if(cltype
>= p0
->type
->table_size
) {
1056 var
= p0
->type
->type_table
[cltype
] == idtype
;
1060 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1061 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "SimpleCollection#0", var_class_name
);
1062 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 216);
1065 var_class_name1
= self
== NULL ?
"null" : self
->type
->name
;
1066 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "add", var_class_name1
);
1067 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 216);
1071 /* method abstract_collection#SimpleCollection#add for (self: Object, nullable Object) */
1072 void VIRTUAL_abstract_collection__SimpleCollection__add(val
* self
, val
* p0
) {
1073 abstract_collection__SimpleCollection__add(self
, p0
);
1076 /* method abstract_collection#SimpleCollection#add_all for (self: SimpleCollection[nullable Object], Collection[nullable Object]) */
1077 void abstract_collection__SimpleCollection__add_all(val
* self
, val
* p0
) {
1078 short int var
/* : Bool */;
1081 const struct type
* type_struct
;
1082 const char* var_class_name
;
1083 val
* var_coll
/* var coll: Collection[nullable Object] */;
1084 val
* var1
/* : Iterator[nullable Object] */;
1085 short int var2
/* : Bool */;
1086 val
* var3
/* : nullable Object */;
1087 val
* var_i
/* var i: nullable Object */;
1088 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[SimpleCollection#0] */
1089 /* <p0:Collection[nullable Object]> isa Collection[SimpleCollection#0] */
1090 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__SimpleCollection_FT0
];
1091 cltype
= type_struct
->color
;
1092 idtype
= type_struct
->id
;
1093 if(cltype
>= p0
->type
->table_size
) {
1096 var
= p0
->type
->type_table
[cltype
] == idtype
;
1099 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1100 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[SimpleCollection#0]", var_class_name
);
1101 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 220);
1105 var1
= ((val
* (*)(val
*))(var_coll
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_coll
) /* iterator on <var_coll:Collection[nullable Object]>*/;
1107 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:Iterator[nullable Object]>*/;
1109 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[nullable Object]>*/;
1111 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(self
, var_i
) /* add on <self:SimpleCollection[nullable Object]>*/;
1112 CONTINUE_label
: (void)0;
1113 ((void (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var1
) /* next on <var1:Iterator[nullable Object]>*/;
1115 BREAK_label
: (void)0;
1118 /* method abstract_collection#SimpleCollection#add_all for (self: Object, Collection[nullable Object]) */
1119 void VIRTUAL_abstract_collection__SimpleCollection__add_all(val
* self
, val
* p0
) {
1120 abstract_collection__SimpleCollection__add_all(self
, p0
);
1123 /* method abstract_collection#Set#has_only for (self: Set[Object], Object): Bool */
1124 short int abstract_collection__Set__has_only(val
* self
, val
* p0
) {
1125 short int var
/* : Bool */;
1126 short int var1
/* : Bool */;
1129 const struct type
* type_struct
;
1130 const char* var_class_name
;
1131 val
* var_item
/* var item: Object */;
1132 long var2
/* : Int */;
1133 long var_l
/* var l: Int */;
1134 long var3
/* : Int */;
1135 short int var4
/* : Bool */;
1136 short int var6
/* : Bool */;
1137 short int var7
/* : Bool */;
1138 long var8
/* : Int */;
1139 short int var9
/* : Bool */;
1140 short int var11
/* : Bool */;
1141 short int var12
/* : Bool */;
1142 short int var13
/* : Bool */;
1143 /* Covariant cast for argument 0 (item) <p0:Object> isa Collection#0 */
1144 /* <p0:Object> isa Collection#0 */
1145 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
1146 cltype
= type_struct
->color
;
1147 idtype
= type_struct
->id
;
1148 if(cltype
>= p0
->type
->table_size
) {
1151 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1154 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1155 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
1156 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 236);
1160 var2
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Set[Object]>*/;
1163 { /* Inline kernel#Int#== (var_l,var3) */
1164 var6
= var_l
== var3
;
1170 var7
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__has
]))(self
, var_item
) /* has on <self:Set[Object]>*/;
1175 { /* Inline kernel#Int#== (var_l,var8) */
1176 var11
= var_l
== var8
;
1179 RET_LABEL10
:(void)0;
1194 /* method abstract_collection#Set#has_only for (self: Object, nullable Object): Bool */
1195 short int VIRTUAL_abstract_collection__Set__has_only(val
* self
, val
* p0
) {
1196 short int var
/* : Bool */;
1197 short int var1
/* : Bool */;
1198 var1
= abstract_collection__Set__has_only(self
, p0
);
1203 /* method abstract_collection#Set#count for (self: Set[Object], Object): Int */
1204 long abstract_collection__Set__count(val
* self
, val
* p0
) {
1205 long var
/* : Int */;
1206 short int var1
/* : Bool */;
1209 const struct type
* type_struct
;
1210 const char* var_class_name
;
1211 val
* var_item
/* var item: Object */;
1212 short int var2
/* : Bool */;
1213 long var3
/* : Int */;
1214 long var4
/* : Int */;
1215 /* Covariant cast for argument 0 (item) <p0:Object> isa Collection#0 */
1216 /* <p0:Object> isa Collection#0 */
1217 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
1218 cltype
= type_struct
->color
;
1219 idtype
= type_struct
->id
;
1220 if(cltype
>= p0
->type
->table_size
) {
1223 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1226 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1227 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
1228 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 248);
1232 var2
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__has
]))(self
, var_item
) /* has on <self:Set[Object]>*/;
1245 /* method abstract_collection#Set#count for (self: Object, nullable Object): Int */
1246 long VIRTUAL_abstract_collection__Set__count(val
* self
, val
* p0
) {
1247 long var
/* : Int */;
1248 long var1
/* : Int */;
1249 var1
= abstract_collection__Set__count(self
, p0
);
1254 /* method abstract_collection#Set#remove_all for (self: Set[Object], Object) */
1255 void abstract_collection__Set__remove_all(val
* self
, val
* p0
) {
1256 short int var
/* : Bool */;
1259 const struct type
* type_struct
;
1260 const char* var_class_name
;
1261 val
* var_item
/* var item: Object */;
1262 /* Covariant cast for argument 0 (item) <p0:Object> isa RemovableCollection#0 */
1263 /* <p0:Object> isa RemovableCollection#0 */
1264 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
1265 cltype
= type_struct
->color
;
1266 idtype
= type_struct
->id
;
1267 if(cltype
>= p0
->type
->table_size
) {
1270 var
= p0
->type
->type_table
[cltype
] == idtype
;
1273 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1274 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
1275 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 258);
1279 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__RemovableCollection__remove
]))(self
, var_item
) /* remove on <self:Set[Object]>*/;
1282 /* method abstract_collection#Set#remove_all for (self: Object, nullable Object) */
1283 void VIRTUAL_abstract_collection__Set__remove_all(val
* self
, val
* p0
) {
1284 abstract_collection__Set__remove_all(self
, p0
);
1287 /* method abstract_collection#Set#== for (self: Set[Object], nullable Object): Bool */
1288 short int abstract_collection__Set___61d_61d(val
* self
, val
* p0
) {
1289 short int var
/* : Bool */;
1290 val
* var_other
/* var other: nullable Object */;
1291 short int var1
/* : Bool */;
1294 short int var2
/* : Bool */;
1295 short int var3
/* : Bool */;
1296 long var4
/* : Int */;
1297 long var5
/* : Int */;
1298 short int var6
/* : Bool */;
1299 short int var8
/* : Bool */;
1300 short int var9
/* : Bool */;
1301 short int var10
/* : Bool */;
1302 short int var11
/* : Bool */;
1305 const struct type
* type_struct
;
1306 const char* var_class_name
;
1307 short int var14
/* : Bool */;
1309 /* <var_other:nullable Object> isa Set[Object] */
1310 cltype
= type_abstract_collection__Setkernel__Object
.color
;
1311 idtype
= type_abstract_collection__Setkernel__Object
.id
;
1312 if(var_other
== NULL
) {
1315 if(cltype
>= var_other
->type
->table_size
) {
1318 var1
= var_other
->type
->type_table
[cltype
] == idtype
;
1328 var4
= ((long (*)(val
*))(var_other
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_other
) /* length on <var_other:nullable Object(Set[Object])>*/;
1329 var5
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Set[Object]>*/;
1330 { /* Inline kernel#Int#!= (var4,var5) */
1331 var8
= var4
== var5
;
1343 /* <var_other:nullable Object(Set[Object])> isa Collection[Set#0] */
1344 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__Set_FT0
];
1345 cltype12
= type_struct
->color
;
1346 idtype13
= type_struct
->id
;
1347 if(cltype12
>= var_other
->type
->table_size
) {
1350 var11
= var_other
->type
->type_table
[cltype12
] == idtype13
;
1353 var_class_name
= var_other
== NULL ?
"null" : var_other
->type
->name
;
1354 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[Set#0]", var_class_name
);
1355 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 266);
1358 var14
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__has_all
]))(self
, var_other
) /* has_all on <self:Set[Object]>*/;
1364 /* method abstract_collection#Set#== for (self: Object, nullable Object): Bool */
1365 short int VIRTUAL_abstract_collection__Set___61d_61d(val
* self
, val
* p0
) {
1366 short int var
/* : Bool */;
1367 short int var1
/* : Bool */;
1368 var1
= abstract_collection__Set___61d_61d(self
, p0
);
1373 /* method abstract_collection#Set#hash for (self: Set[Object]): Int */
1374 long abstract_collection__Set__hash(val
* self
) {
1375 long var
/* : Int */;
1376 long var1
/* : Int */;
1377 long var_res
/* var res: Int */;
1378 val
* var2
/* : Iterator[nullable Object] */;
1379 short int var3
/* : Bool */;
1380 val
* var4
/* : nullable Object */;
1381 val
* var_e
/* var e: Object */;
1382 long var5
/* : Int */;
1383 long var6
/* : Int */;
1384 long var8
/* : Int */;
1387 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:Set[Object]>*/;
1389 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
1391 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
1393 var5
= kernel__Int__hash(var_res
);
1394 { /* Inline kernel#Int#+ (var_res,var5) */
1395 var8
= var_res
+ var5
;
1401 CONTINUE_label
: (void)0;
1402 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
1404 BREAK_label
: (void)0;
1410 /* method abstract_collection#Set#hash for (self: Object): Int */
1411 long VIRTUAL_abstract_collection__Set__hash(val
* self
) {
1412 long var
/* : Int */;
1413 long var1
/* : Int */;
1414 var1
= abstract_collection__Set__hash(self
);
1419 /* method abstract_collection#MapRead#[] for (self: MapRead[Object, nullable Object], Object): nullable Object */
1420 val
* abstract_collection__MapRead___91d_93d(val
* self
, val
* p0
) {
1421 val
* var
/* : nullable Object */;
1422 short int var1
/* : Bool */;
1425 const struct type
* type_struct
;
1426 const char* var_class_name
;
1427 const char* var_class_name2
;
1428 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1429 /* <p0:Object> isa MapRead#0 */
1430 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1431 cltype
= type_struct
->color
;
1432 idtype
= type_struct
->id
;
1433 if(cltype
>= p0
->type
->table_size
) {
1436 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1439 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1440 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MapRead#0", var_class_name
);
1441 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 280);
1444 var_class_name2
= self
== NULL ?
"null" : self
->type
->name
;
1445 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "[]", var_class_name2
);
1446 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 280);
1451 /* method abstract_collection#MapRead#[] for (self: Object, Object): nullable Object */
1452 val
* VIRTUAL_abstract_collection__MapRead___91d_93d(val
* self
, val
* p0
) {
1453 val
* var
/* : nullable Object */;
1454 val
* var1
/* : nullable Object */;
1455 var1
= abstract_collection__MapRead___91d_93d(self
, p0
);
1460 /* method abstract_collection#MapRead#get_or_null for (self: MapRead[Object, nullable Object], Object): nullable Object */
1461 val
* abstract_collection__MapRead__get_or_null(val
* self
, val
* p0
) {
1462 val
* var
/* : nullable Object */;
1463 short int var1
/* : Bool */;
1466 const struct type
* type_struct
;
1467 const char* var_class_name
;
1468 val
* var_key
/* var key: Object */;
1469 short int var2
/* : Bool */;
1470 val
* var3
/* : nullable Object */;
1471 val
* var4
/* : null */;
1472 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1473 /* <p0:Object> isa MapRead#0 */
1474 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1475 cltype
= type_struct
->color
;
1476 idtype
= type_struct
->id
;
1477 if(cltype
>= p0
->type
->table_size
) {
1480 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1483 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1484 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MapRead#0", var_class_name
);
1485 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 283);
1489 var2
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead__has_key
]))(self
, var_key
) /* has_key on <self:MapRead[Object, nullable Object]>*/;
1491 var3
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(self
, var_key
) /* [] on <self:MapRead[Object, nullable Object]>*/;
1502 /* method abstract_collection#MapRead#get_or_null for (self: Object, Object): nullable Object */
1503 val
* VIRTUAL_abstract_collection__MapRead__get_or_null(val
* self
, val
* p0
) {
1504 val
* var
/* : nullable Object */;
1505 val
* var1
/* : nullable Object */;
1506 var1
= abstract_collection__MapRead__get_or_null(self
, p0
);
1511 /* method abstract_collection#MapRead#get_or_default for (self: MapRead[Object, nullable Object], Object, nullable Object): nullable Object */
1512 val
* abstract_collection__MapRead__get_or_default(val
* self
, val
* p0
, val
* p1
) {
1513 val
* var
/* : nullable Object */;
1514 short int var1
/* : Bool */;
1517 const struct type
* type_struct
;
1518 const char* var_class_name
;
1519 short int var2
/* : Bool */;
1522 const struct type
* type_struct5
;
1523 short int is_nullable
;
1524 const char* var_class_name6
;
1525 val
* var_key
/* var key: Object */;
1526 val
* var_default
/* var default: nullable Object */;
1527 short int var7
/* : Bool */;
1528 val
* var8
/* : nullable Object */;
1529 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1530 /* <p0:Object> isa MapRead#0 */
1531 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1532 cltype
= type_struct
->color
;
1533 idtype
= type_struct
->id
;
1534 if(cltype
>= p0
->type
->table_size
) {
1537 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1540 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1541 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MapRead#0", var_class_name
);
1542 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 297);
1545 /* Covariant cast for argument 1 (default) <p1:nullable Object> isa MapRead#1 */
1546 /* <p1:nullable Object> isa MapRead#1 */
1547 type_struct5
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT1
];
1548 cltype3
= type_struct5
->color
;
1549 idtype4
= type_struct5
->id
;
1550 is_nullable
= type_struct5
->is_nullable
;
1554 if(cltype3
>= p1
->type
->table_size
) {
1557 var2
= p1
->type
->type_table
[cltype3
] == idtype4
;
1561 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
1562 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MapRead#1", var_class_name6
);
1563 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 297);
1568 var7
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead__has_key
]))(self
, var_key
) /* has_key on <self:MapRead[Object, nullable Object]>*/;
1570 var8
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(self
, var_key
) /* [] on <self:MapRead[Object, nullable Object]>*/;
1580 /* method abstract_collection#MapRead#get_or_default for (self: Object, Object, nullable Object): nullable Object */
1581 val
* VIRTUAL_abstract_collection__MapRead__get_or_default(val
* self
, val
* p0
, val
* p1
) {
1582 val
* var
/* : nullable Object */;
1583 val
* var1
/* : nullable Object */;
1584 var1
= abstract_collection__MapRead__get_or_default(self
, p0
, p1
);
1589 /* method abstract_collection#MapRead#has_key for (self: MapRead[Object, nullable Object], Object): Bool */
1590 short int abstract_collection__MapRead__has_key(val
* self
, val
* p0
) {
1591 short int var
/* : Bool */;
1592 short int var1
/* : Bool */;
1595 const struct type
* type_struct
;
1596 const char* var_class_name
;
1597 val
* var_key
/* var key: Object */;
1598 val
* var2
/* : Collection[Object] */;
1599 short int var3
/* : Bool */;
1600 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1601 /* <p0:Object> isa MapRead#0 */
1602 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1603 cltype
= type_struct
->color
;
1604 idtype
= type_struct
->id
;
1605 if(cltype
>= p0
->type
->table_size
) {
1608 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1611 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1612 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MapRead#0", var_class_name
);
1613 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 304);
1617 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead__keys
]))(self
) /* keys on <self:MapRead[Object, nullable Object]>*/;
1618 var3
= ((short int (*)(val
*, val
*))(var2
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var2
, var_key
) /* has on <var2:Collection[Object]>*/;
1624 /* method abstract_collection#MapRead#has_key for (self: Object, Object): Bool */
1625 short int VIRTUAL_abstract_collection__MapRead__has_key(val
* self
, val
* p0
) {
1626 short int var
/* : Bool */;
1627 short int var1
/* : Bool */;
1628 var1
= abstract_collection__MapRead__has_key(self
, p0
);
1633 /* method abstract_collection#MapRead#iterator for (self: MapRead[Object, nullable Object]): MapIterator[Object, nullable Object] */
1634 val
* abstract_collection__MapRead__iterator(val
* self
) {
1635 val
* var
/* : MapIterator[Object, nullable Object] */;
1636 const char* var_class_name
;
1637 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
1638 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "iterator", var_class_name
);
1639 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 307);
1644 /* method abstract_collection#MapRead#iterator for (self: Object): MapIterator[Object, nullable Object] */
1645 val
* VIRTUAL_abstract_collection__MapRead__iterator(val
* self
) {
1646 val
* var
/* : MapIterator[Object, nullable Object] */;
1647 val
* var1
/* : MapIterator[Object, nullable Object] */;
1648 var1
= abstract_collection__MapRead__iterator(self
);
1653 /* method abstract_collection#MapRead#values for (self: MapRead[Object, nullable Object]): Collection[nullable Object] */
1654 val
* abstract_collection__MapRead__values(val
* self
) {
1655 val
* var
/* : Collection[nullable Object] */;
1656 const char* var_class_name
;
1657 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
1658 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "values", var_class_name
);
1659 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 310);
1664 /* method abstract_collection#MapRead#values for (self: Object): Collection[nullable Object] */
1665 val
* VIRTUAL_abstract_collection__MapRead__values(val
* self
) {
1666 val
* var
/* : Collection[nullable Object] */;
1667 val
* var1
/* : Collection[nullable Object] */;
1668 var1
= abstract_collection__MapRead__values(self
);
1673 /* method abstract_collection#MapRead#keys for (self: MapRead[Object, nullable Object]): Collection[Object] */
1674 val
* abstract_collection__MapRead__keys(val
* self
) {
1675 val
* var
/* : Collection[Object] */;
1676 const char* var_class_name
;
1677 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
1678 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "keys", var_class_name
);
1679 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 315);
1684 /* method abstract_collection#MapRead#keys for (self: Object): Collection[Object] */
1685 val
* VIRTUAL_abstract_collection__MapRead__keys(val
* self
) {
1686 val
* var
/* : Collection[Object] */;
1687 val
* var1
/* : Collection[Object] */;
1688 var1
= abstract_collection__MapRead__keys(self
);
1693 /* method abstract_collection#MapRead#is_empty for (self: MapRead[Object, nullable Object]): Bool */
1694 short int abstract_collection__MapRead__is_empty(val
* self
) {
1695 short int var
/* : Bool */;
1696 const char* var_class_name
;
1697 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
1698 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "is_empty", var_class_name
);
1699 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 320);
1704 /* method abstract_collection#MapRead#is_empty for (self: Object): Bool */
1705 short int VIRTUAL_abstract_collection__MapRead__is_empty(val
* self
) {
1706 short int var
/* : Bool */;
1707 short int var1
/* : Bool */;
1708 var1
= abstract_collection__MapRead__is_empty(self
);
1713 /* method abstract_collection#MapRead#length for (self: MapRead[Object, nullable Object]): Int */
1714 long abstract_collection__MapRead__length(val
* self
) {
1715 long var
/* : Int */;
1716 const char* var_class_name
;
1717 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
1718 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "length", var_class_name
);
1719 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 323);
1724 /* method abstract_collection#MapRead#length for (self: Object): Int */
1725 long VIRTUAL_abstract_collection__MapRead__length(val
* self
) {
1726 long var
/* : Int */;
1727 long var1
/* : Int */;
1728 var1
= abstract_collection__MapRead__length(self
);
1733 /* method abstract_collection#MapRead#provide_default_value for (self: MapRead[Object, nullable Object], Object): nullable Object */
1734 val
* abstract_collection__MapRead__provide_default_value(val
* self
, val
* p0
) {
1735 val
* var
/* : nullable Object */;
1736 short int var1
/* : Bool */;
1739 const struct type
* type_struct
;
1740 const char* var_class_name
;
1741 val
* var_key
/* var key: Object */;
1742 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1743 /* <p0:Object> isa MapRead#0 */
1744 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1745 cltype
= type_struct
->color
;
1746 idtype
= type_struct
->id
;
1747 if(cltype
>= p0
->type
->table_size
) {
1750 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1753 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1754 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MapRead#0", var_class_name
);
1755 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 326);
1759 fprintf(stderr
, "Runtime error: %s", "Aborted");
1760 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 331);
1765 /* method abstract_collection#MapRead#provide_default_value for (self: Object, Object): nullable Object */
1766 val
* VIRTUAL_abstract_collection__MapRead__provide_default_value(val
* self
, val
* p0
) {
1767 val
* var
/* : nullable Object */;
1768 val
* var1
/* : nullable Object */;
1769 var1
= abstract_collection__MapRead__provide_default_value(self
, p0
);
1774 /* method abstract_collection#Map#[]= for (self: Map[Object, nullable Object], Object, nullable Object) */
1775 void abstract_collection__Map___91d_93d_61d(val
* self
, val
* p0
, val
* p1
) {
1776 short int var
/* : Bool */;
1779 const struct type
* type_struct
;
1780 const char* var_class_name
;
1781 short int var1
/* : Bool */;
1784 const struct type
* type_struct4
;
1785 short int is_nullable
;
1786 const char* var_class_name5
;
1787 const char* var_class_name6
;
1788 /* Covariant cast for argument 0 (key) <p0:Object> isa Map#0 */
1789 /* <p0:Object> isa Map#0 */
1790 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Map_FT0
];
1791 cltype
= type_struct
->color
;
1792 idtype
= type_struct
->id
;
1793 if(cltype
>= p0
->type
->table_size
) {
1796 var
= p0
->type
->type_table
[cltype
] == idtype
;
1799 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1800 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Map#0", var_class_name
);
1801 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 360);
1804 /* Covariant cast for argument 1 (item) <p1:nullable Object> isa Map#1 */
1805 /* <p1:nullable Object> isa Map#1 */
1806 type_struct4
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Map_FT1
];
1807 cltype2
= type_struct4
->color
;
1808 idtype3
= type_struct4
->id
;
1809 is_nullable
= type_struct4
->is_nullable
;
1813 if(cltype2
>= p1
->type
->table_size
) {
1816 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
1820 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
1821 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Map#1", var_class_name5
);
1822 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 360);
1825 var_class_name6
= self
== NULL ?
"null" : self
->type
->name
;
1826 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "[]=", var_class_name6
);
1827 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 360);
1831 /* method abstract_collection#Map#[]= for (self: Object, Object, nullable Object) */
1832 void VIRTUAL_abstract_collection__Map___91d_93d_61d(val
* self
, val
* p0
, val
* p1
) {
1833 abstract_collection__Map___91d_93d_61d(self
, p0
, p1
);
1836 /* method abstract_collection#Map#recover_with for (self: Map[Object, nullable Object], Map[Object, nullable Object]) */
1837 void abstract_collection__Map__recover_with(val
* self
, val
* p0
) {
1838 short int var
/* : Bool */;
1841 const struct type
* type_struct
;
1842 const char* var_class_name
;
1843 val
* var_map
/* var map: Map[Object, nullable Object] */;
1844 val
* var1
/* : MapIterator[Object, nullable Object] */;
1845 val
* var_i
/* var i: MapIterator[Object, nullable Object] */;
1846 short int var2
/* : Bool */;
1847 val
* var3
/* : Object */;
1848 val
* var4
/* : nullable Object */;
1849 /* Covariant cast for argument 0 (map) <p0:Map[Object, nullable Object]> isa Map[Map#0, Map#1] */
1850 /* <p0:Map[Object, nullable Object]> isa Map[Map#0, Map#1] */
1851 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Mapabstract_collection__Map_FT0abstract_collection__Map_FT1
];
1852 cltype
= type_struct
->color
;
1853 idtype
= type_struct
->id
;
1854 if(cltype
>= p0
->type
->table_size
) {
1857 var
= p0
->type
->type_table
[cltype
] == idtype
;
1860 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1861 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Map[Map#0, Map#1]", var_class_name
);
1862 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 363);
1866 var1
= ((val
* (*)(val
*))(var_map
->class->vft
[COLOR_abstract_collection__MapRead__iterator
]))(var_map
) /* iterator on <var_map:Map[Object, nullable Object]>*/;
1869 var2
= ((short int (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(var_i
) /* is_ok on <var_i:MapIterator[Object, nullable Object]>*/;
1871 var3
= ((val
* (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__MapIterator__key
]))(var_i
) /* key on <var_i:MapIterator[Object, nullable Object]>*/;
1872 var4
= ((val
* (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__MapIterator__item
]))(var_i
) /* item on <var_i:MapIterator[Object, nullable Object]>*/;
1873 ((void (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Map___91d_93d_61d
]))(self
, var3
, var4
) /* []= on <self:Map[Object, nullable Object]>*/;
1874 ((void (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__MapIterator__next
]))(var_i
) /* next on <var_i:MapIterator[Object, nullable Object]>*/;
1875 CONTINUE_label
: (void)0;
1877 BREAK_label
: (void)0;
1880 /* method abstract_collection#Map#recover_with for (self: Object, Map[Object, nullable Object]) */
1881 void VIRTUAL_abstract_collection__Map__recover_with(val
* self
, val
* p0
) {
1882 abstract_collection__Map__recover_with(self
, p0
);
1885 /* method abstract_collection#Map#clear for (self: Map[Object, nullable Object]) */
1886 void abstract_collection__Map__clear(val
* self
) {
1887 const char* var_class_name
;
1888 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
1889 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "clear", var_class_name
);
1890 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 374);
1894 /* method abstract_collection#Map#clear for (self: Object) */
1895 void VIRTUAL_abstract_collection__Map__clear(val
* self
) {
1896 abstract_collection__Map__clear(self
);
1899 /* method abstract_collection#Map#values for (self: Map[Object, nullable Object]): RemovableCollection[nullable Object] */
1900 val
* abstract_collection__Map__values(val
* self
) {
1901 val
* var
/* : RemovableCollection[nullable Object] */;
1902 const char* var_class_name
;
1903 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
1904 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "values", var_class_name
);
1905 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 377);
1910 /* method abstract_collection#Map#values for (self: Object): Collection[nullable Object] */
1911 val
* VIRTUAL_abstract_collection__Map__values(val
* self
) {
1912 val
* var
/* : Collection[nullable Object] */;
1913 val
* var1
/* : RemovableCollection[nullable Object] */;
1914 var1
= abstract_collection__Map__values(self
);
1919 /* method abstract_collection#Map#keys for (self: Map[Object, nullable Object]): RemovableCollection[Object] */
1920 val
* abstract_collection__Map__keys(val
* self
) {
1921 val
* var
/* : RemovableCollection[Object] */;
1922 const char* var_class_name
;
1923 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
1924 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "keys", var_class_name
);
1925 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 379);
1930 /* method abstract_collection#Map#keys for (self: Object): Collection[Object] */
1931 val
* VIRTUAL_abstract_collection__Map__keys(val
* self
) {
1932 val
* var
/* : Collection[Object] */;
1933 val
* var1
/* : RemovableCollection[Object] */;
1934 var1
= abstract_collection__Map__keys(self
);
1939 /* method abstract_collection#MapIterator#item for (self: MapIterator[Object, nullable Object]): nullable Object */
1940 val
* abstract_collection__MapIterator__item(val
* self
) {
1941 val
* var
/* : nullable Object */;
1942 const char* var_class_name
;
1943 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
1944 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "item", var_class_name
);
1945 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 384);
1950 /* method abstract_collection#MapIterator#item for (self: Object): nullable Object */
1951 val
* VIRTUAL_abstract_collection__MapIterator__item(val
* self
) {
1952 val
* var
/* : nullable Object */;
1953 val
* var1
/* : nullable Object */;
1954 var1
= abstract_collection__MapIterator__item(self
);
1959 /* method abstract_collection#MapIterator#key for (self: MapIterator[Object, nullable Object]): Object */
1960 val
* abstract_collection__MapIterator__key(val
* self
) {
1961 val
* var
/* : Object */;
1962 const char* var_class_name
;
1963 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
1964 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "key", var_class_name
);
1965 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 388);
1970 /* method abstract_collection#MapIterator#key for (self: Object): Object */
1971 val
* VIRTUAL_abstract_collection__MapIterator__key(val
* self
) {
1972 val
* var
/* : Object */;
1973 val
* var1
/* : Object */;
1974 var1
= abstract_collection__MapIterator__key(self
);
1979 /* method abstract_collection#MapIterator#next for (self: MapIterator[Object, nullable Object]) */
1980 void abstract_collection__MapIterator__next(val
* self
) {
1981 const char* var_class_name
;
1982 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
1983 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "next", var_class_name
);
1984 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 392);
1988 /* method abstract_collection#MapIterator#next for (self: Object) */
1989 void VIRTUAL_abstract_collection__MapIterator__next(val
* self
) {
1990 abstract_collection__MapIterator__next(self
);
1993 /* method abstract_collection#MapIterator#is_ok for (self: MapIterator[Object, nullable Object]): Bool */
1994 short int abstract_collection__MapIterator__is_ok(val
* self
) {
1995 short int var
/* : Bool */;
1996 const char* var_class_name
;
1997 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
1998 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "is_ok", var_class_name
);
1999 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 396);
2004 /* method abstract_collection#MapIterator#is_ok for (self: Object): Bool */
2005 short int VIRTUAL_abstract_collection__MapIterator__is_ok(val
* self
) {
2006 short int var
/* : Bool */;
2007 short int var1
/* : Bool */;
2008 var1
= abstract_collection__MapIterator__is_ok(self
);
2013 /* method abstract_collection#MapKeysIterator#iterator for (self: MapKeysIterator[Object, nullable Object]): MapIterator[Object, nullable Object] */
2014 val
* abstract_collection__MapKeysIterator__iterator(val
* self
) {
2015 val
* var
/* : MapIterator[Object, nullable Object] */;
2016 val
* var1
/* : MapIterator[Object, nullable Object] */;
2017 var1
= self
->attrs
[COLOR_abstract_collection__MapKeysIterator___64diterator
].val
; /* @iterator on <self:MapKeysIterator[Object, nullable Object]> */
2019 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @iterator");
2020 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 406);
2027 /* method abstract_collection#MapKeysIterator#iterator for (self: Object): MapIterator[Object, nullable Object] */
2028 val
* VIRTUAL_abstract_collection__MapKeysIterator__iterator(val
* self
) {
2029 val
* var
/* : MapIterator[Object, nullable Object] */;
2030 val
* var1
/* : MapIterator[Object, nullable Object] */;
2031 var1
= abstract_collection__MapKeysIterator__iterator(self
);
2036 /* method abstract_collection#MapKeysIterator#iterator= for (self: MapKeysIterator[Object, nullable Object], MapIterator[Object, nullable Object]) */
2037 void abstract_collection__MapKeysIterator__iterator_61d(val
* self
, val
* p0
) {
2038 short int var
/* : Bool */;
2041 const struct type
* type_struct
;
2042 const char* var_class_name
;
2043 /* Covariant cast for argument 0 (iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
2044 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
2045 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapKeysIterator_FT0abstract_collection__MapKeysIterator_FT1
];
2046 cltype
= type_struct
->color
;
2047 idtype
= type_struct
->id
;
2048 if(cltype
>= p0
->type
->table_size
) {
2051 var
= p0
->type
->type_table
[cltype
] == idtype
;
2054 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2055 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[MapKeysIterator#0, MapKeysIterator#1]", var_class_name
);
2056 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 406);
2059 self
->attrs
[COLOR_abstract_collection__MapKeysIterator___64diterator
].val
= p0
; /* @iterator on <self:MapKeysIterator[Object, nullable Object]> */
2062 /* method abstract_collection#MapKeysIterator#iterator= for (self: Object, MapIterator[Object, nullable Object]) */
2063 void VIRTUAL_abstract_collection__MapKeysIterator__iterator_61d(val
* self
, val
* p0
) {
2064 abstract_collection__MapKeysIterator__iterator_61d(self
, p0
);
2067 /* method abstract_collection#MapKeysIterator#is_ok for (self: MapKeysIterator[Object, nullable Object]): Bool */
2068 short int abstract_collection__MapKeysIterator__is_ok(val
* self
) {
2069 short int var
/* : Bool */;
2070 val
* var1
/* : MapIterator[Object, nullable Object] */;
2071 short int var2
/* : Bool */;
2072 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapKeysIterator__iterator
]))(self
) /* iterator on <self:MapKeysIterator[Object, nullable Object]>*/;
2073 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(var1
) /* is_ok on <var1:MapIterator[Object, nullable Object]>*/;
2079 /* method abstract_collection#MapKeysIterator#is_ok for (self: Object): Bool */
2080 short int VIRTUAL_abstract_collection__MapKeysIterator__is_ok(val
* self
) {
2081 short int var
/* : Bool */;
2082 short int var1
/* : Bool */;
2083 var1
= abstract_collection__MapKeysIterator__is_ok(self
);
2088 /* method abstract_collection#MapKeysIterator#next for (self: MapKeysIterator[Object, nullable Object]) */
2089 void abstract_collection__MapKeysIterator__next(val
* self
) {
2090 val
* var
/* : MapIterator[Object, nullable Object] */;
2091 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapKeysIterator__iterator
]))(self
) /* iterator on <self:MapKeysIterator[Object, nullable Object]>*/;
2092 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__MapIterator__next
]))(var
) /* next on <var:MapIterator[Object, nullable Object]>*/;
2095 /* method abstract_collection#MapKeysIterator#next for (self: Object) */
2096 void VIRTUAL_abstract_collection__MapKeysIterator__next(val
* self
) {
2097 abstract_collection__MapKeysIterator__next(self
);
2100 /* method abstract_collection#MapKeysIterator#item for (self: MapKeysIterator[Object, nullable Object]): Object */
2101 val
* abstract_collection__MapKeysIterator__item(val
* self
) {
2102 val
* var
/* : Object */;
2103 val
* var1
/* : MapIterator[Object, nullable Object] */;
2104 val
* var2
/* : Object */;
2105 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapKeysIterator__iterator
]))(self
) /* iterator on <self:MapKeysIterator[Object, nullable Object]>*/;
2106 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__key
]))(var1
) /* key on <var1:MapIterator[Object, nullable Object]>*/;
2112 /* method abstract_collection#MapKeysIterator#item for (self: Object): nullable Object */
2113 val
* VIRTUAL_abstract_collection__MapKeysIterator__item(val
* self
) {
2114 val
* var
/* : nullable Object */;
2115 val
* var1
/* : Object */;
2116 var1
= abstract_collection__MapKeysIterator__item(self
);
2121 /* method abstract_collection#MapKeysIterator#init for (self: MapKeysIterator[Object, nullable Object], MapIterator[Object, nullable Object]) */
2122 void abstract_collection__MapKeysIterator__init(val
* self
, val
* p0
) {
2123 short int var
/* : Bool */;
2126 const struct type
* type_struct
;
2127 const char* var_class_name
;
2128 /* Covariant cast for argument 0 (iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
2129 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
2130 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapKeysIterator_FT0abstract_collection__MapKeysIterator_FT1
];
2131 cltype
= type_struct
->color
;
2132 idtype
= type_struct
->id
;
2133 if(cltype
>= p0
->type
->table_size
) {
2136 var
= p0
->type
->type_table
[cltype
] == idtype
;
2139 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2140 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[MapKeysIterator#0, MapKeysIterator#1]", var_class_name
);
2141 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 403);
2144 self
->attrs
[COLOR_abstract_collection__MapKeysIterator___64diterator
].val
= p0
; /* @iterator on <self:MapKeysIterator[Object, nullable Object]> */
2147 /* method abstract_collection#MapKeysIterator#init for (self: Object, MapIterator[Object, nullable Object]) */
2148 void VIRTUAL_abstract_collection__MapKeysIterator__init(val
* self
, val
* p0
) {
2149 abstract_collection__MapKeysIterator__init(self
, p0
);
2152 /* method abstract_collection#MapValuesIterator#iterator for (self: MapValuesIterator[Object, nullable Object]): MapIterator[Object, nullable Object] */
2153 val
* abstract_collection__MapValuesIterator__iterator(val
* self
) {
2154 val
* var
/* : MapIterator[Object, nullable Object] */;
2155 val
* var1
/* : MapIterator[Object, nullable Object] */;
2156 var1
= self
->attrs
[COLOR_abstract_collection__MapValuesIterator___64diterator
].val
; /* @iterator on <self:MapValuesIterator[Object, nullable Object]> */
2158 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @iterator");
2159 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 417);
2166 /* method abstract_collection#MapValuesIterator#iterator for (self: Object): MapIterator[Object, nullable Object] */
2167 val
* VIRTUAL_abstract_collection__MapValuesIterator__iterator(val
* self
) {
2168 val
* var
/* : MapIterator[Object, nullable Object] */;
2169 val
* var1
/* : MapIterator[Object, nullable Object] */;
2170 var1
= abstract_collection__MapValuesIterator__iterator(self
);
2175 /* method abstract_collection#MapValuesIterator#iterator= for (self: MapValuesIterator[Object, nullable Object], MapIterator[Object, nullable Object]) */
2176 void abstract_collection__MapValuesIterator__iterator_61d(val
* self
, val
* p0
) {
2177 short int var
/* : Bool */;
2180 const struct type
* type_struct
;
2181 const char* var_class_name
;
2182 /* Covariant cast for argument 0 (iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
2183 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
2184 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapValuesIterator_FT0abstract_collection__MapValuesIterator_FT1
];
2185 cltype
= type_struct
->color
;
2186 idtype
= type_struct
->id
;
2187 if(cltype
>= p0
->type
->table_size
) {
2190 var
= p0
->type
->type_table
[cltype
] == idtype
;
2193 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2194 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[MapValuesIterator#0, MapValuesIterator#1]", var_class_name
);
2195 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 417);
2198 self
->attrs
[COLOR_abstract_collection__MapValuesIterator___64diterator
].val
= p0
; /* @iterator on <self:MapValuesIterator[Object, nullable Object]> */
2201 /* method abstract_collection#MapValuesIterator#iterator= for (self: Object, MapIterator[Object, nullable Object]) */
2202 void VIRTUAL_abstract_collection__MapValuesIterator__iterator_61d(val
* self
, val
* p0
) {
2203 abstract_collection__MapValuesIterator__iterator_61d(self
, p0
);
2206 /* method abstract_collection#MapValuesIterator#is_ok for (self: MapValuesIterator[Object, nullable Object]): Bool */
2207 short int abstract_collection__MapValuesIterator__is_ok(val
* self
) {
2208 short int var
/* : Bool */;
2209 val
* var1
/* : MapIterator[Object, nullable Object] */;
2210 short int var2
/* : Bool */;
2211 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapValuesIterator__iterator
]))(self
) /* iterator on <self:MapValuesIterator[Object, nullable Object]>*/;
2212 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(var1
) /* is_ok on <var1:MapIterator[Object, nullable Object]>*/;
2218 /* method abstract_collection#MapValuesIterator#is_ok for (self: Object): Bool */
2219 short int VIRTUAL_abstract_collection__MapValuesIterator__is_ok(val
* self
) {
2220 short int var
/* : Bool */;
2221 short int var1
/* : Bool */;
2222 var1
= abstract_collection__MapValuesIterator__is_ok(self
);
2227 /* method abstract_collection#MapValuesIterator#next for (self: MapValuesIterator[Object, nullable Object]) */
2228 void abstract_collection__MapValuesIterator__next(val
* self
) {
2229 val
* var
/* : MapIterator[Object, nullable Object] */;
2230 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapValuesIterator__iterator
]))(self
) /* iterator on <self:MapValuesIterator[Object, nullable Object]>*/;
2231 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__MapIterator__next
]))(var
) /* next on <var:MapIterator[Object, nullable Object]>*/;
2234 /* method abstract_collection#MapValuesIterator#next for (self: Object) */
2235 void VIRTUAL_abstract_collection__MapValuesIterator__next(val
* self
) {
2236 abstract_collection__MapValuesIterator__next(self
);
2239 /* method abstract_collection#MapValuesIterator#item for (self: MapValuesIterator[Object, nullable Object]): nullable Object */
2240 val
* abstract_collection__MapValuesIterator__item(val
* self
) {
2241 val
* var
/* : nullable Object */;
2242 val
* var1
/* : MapIterator[Object, nullable Object] */;
2243 val
* var2
/* : nullable Object */;
2244 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapValuesIterator__iterator
]))(self
) /* iterator on <self:MapValuesIterator[Object, nullable Object]>*/;
2245 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__item
]))(var1
) /* item on <var1:MapIterator[Object, nullable Object]>*/;
2251 /* method abstract_collection#MapValuesIterator#item for (self: Object): nullable Object */
2252 val
* VIRTUAL_abstract_collection__MapValuesIterator__item(val
* self
) {
2253 val
* var
/* : nullable Object */;
2254 val
* var1
/* : nullable Object */;
2255 var1
= abstract_collection__MapValuesIterator__item(self
);
2260 /* method abstract_collection#MapValuesIterator#init for (self: MapValuesIterator[Object, nullable Object], MapIterator[Object, nullable Object]) */
2261 void abstract_collection__MapValuesIterator__init(val
* self
, val
* p0
) {
2262 short int var
/* : Bool */;
2265 const struct type
* type_struct
;
2266 const char* var_class_name
;
2267 /* Covariant cast for argument 0 (iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
2268 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
2269 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapValuesIterator_FT0abstract_collection__MapValuesIterator_FT1
];
2270 cltype
= type_struct
->color
;
2271 idtype
= type_struct
->id
;
2272 if(cltype
>= p0
->type
->table_size
) {
2275 var
= p0
->type
->type_table
[cltype
] == idtype
;
2278 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2279 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[MapValuesIterator#0, MapValuesIterator#1]", var_class_name
);
2280 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 414);
2283 self
->attrs
[COLOR_abstract_collection__MapValuesIterator___64diterator
].val
= p0
; /* @iterator on <self:MapValuesIterator[Object, nullable Object]> */
2286 /* method abstract_collection#MapValuesIterator#init for (self: Object, MapIterator[Object, nullable Object]) */
2287 void VIRTUAL_abstract_collection__MapValuesIterator__init(val
* self
, val
* p0
) {
2288 abstract_collection__MapValuesIterator__init(self
, p0
);
2291 /* method abstract_collection#SequenceRead#first for (self: SequenceRead[nullable Object]): nullable Object */
2292 val
* abstract_collection__SequenceRead__first(val
* self
) {
2293 val
* var
/* : nullable Object */;
2294 short int var1
/* : Bool */;
2295 short int var2
/* : Bool */;
2296 long var3
/* : Int */;
2297 val
* var4
/* : nullable Object */;
2298 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(self
) /* is_empty on <self:SequenceRead[nullable Object]>*/;
2301 fprintf(stderr
, "Runtime error: %s", "Assert \'not_empty\' failed");
2302 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 433);
2306 var4
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var3
) /* [] on <self:SequenceRead[nullable Object]>*/;
2312 /* method abstract_collection#SequenceRead#first for (self: Object): nullable Object */
2313 val
* VIRTUAL_abstract_collection__SequenceRead__first(val
* self
) {
2314 val
* var
/* : nullable Object */;
2315 val
* var1
/* : nullable Object */;
2316 var1
= abstract_collection__SequenceRead__first(self
);
2321 /* method abstract_collection#SequenceRead#[] for (self: SequenceRead[nullable Object], Int): nullable Object */
2322 val
* abstract_collection__SequenceRead___91d_93d(val
* self
, long p0
) {
2323 val
* var
/* : nullable Object */;
2324 const char* var_class_name
;
2325 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2326 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "[]", var_class_name
);
2327 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 437);
2332 /* method abstract_collection#SequenceRead#[] for (self: Object, Int): nullable Object */
2333 val
* VIRTUAL_abstract_collection__SequenceRead___91d_93d(val
* self
, long p0
) {
2334 val
* var
/* : nullable Object */;
2335 val
* var1
/* : nullable Object */;
2336 var1
= abstract_collection__SequenceRead___91d_93d(self
, p0
);
2341 /* method abstract_collection#SequenceRead#last for (self: SequenceRead[nullable Object]): nullable Object */
2342 val
* abstract_collection__SequenceRead__last(val
* self
) {
2343 val
* var
/* : nullable Object */;
2344 short int var1
/* : Bool */;
2345 short int var2
/* : Bool */;
2346 long var3
/* : Int */;
2347 long var4
/* : Int */;
2348 long var5
/* : Int */;
2349 long var7
/* : Int */;
2350 val
* var8
/* : nullable Object */;
2351 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(self
) /* is_empty on <self:SequenceRead[nullable Object]>*/;
2354 fprintf(stderr
, "Runtime error: %s", "Assert \'not_empty\' failed");
2355 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 446);
2358 var3
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:SequenceRead[nullable Object]>*/;
2360 { /* Inline kernel#Int#- (var3,var4) */
2366 var8
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var5
) /* [] on <self:SequenceRead[nullable Object]>*/;
2372 /* method abstract_collection#SequenceRead#last for (self: Object): nullable Object */
2373 val
* VIRTUAL_abstract_collection__SequenceRead__last(val
* self
) {
2374 val
* var
/* : nullable Object */;
2375 val
* var1
/* : nullable Object */;
2376 var1
= abstract_collection__SequenceRead__last(self
);
2381 /* method abstract_collection#SequenceRead#index_of for (self: SequenceRead[nullable Object], nullable Object): Int */
2382 long abstract_collection__SequenceRead__index_of(val
* self
, val
* p0
) {
2383 long var
/* : Int */;
2384 short int var1
/* : Bool */;
2387 const struct type
* type_struct
;
2388 short int is_nullable
;
2389 const char* var_class_name
;
2390 val
* var_item
/* var item: nullable Object */;
2391 val
* var2
/* : Iterator[nullable Object] */;
2392 val
* var_i
/* var i: IndexedIterator[nullable Object] */;
2393 short int var3
/* : Bool */;
2394 val
* var4
/* : nullable Object */;
2395 short int var5
/* : Bool */;
2396 long var6
/* : Int */;
2397 long var7
/* : Int */;
2398 long var8
/* : Int */;
2399 long var10
/* : Int */;
2400 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa SequenceRead#0 */
2401 /* <p0:nullable Object> isa SequenceRead#0 */
2402 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SequenceRead_FT0
];
2403 cltype
= type_struct
->color
;
2404 idtype
= type_struct
->id
;
2405 is_nullable
= type_struct
->is_nullable
;
2409 if(cltype
>= p0
->type
->table_size
) {
2412 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2416 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2417 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "SequenceRead#0", var_class_name
);
2418 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 450);
2422 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:SequenceRead[nullable Object]>*/;
2425 var3
= ((short int (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_i
) /* is_ok on <var_i:IndexedIterator[nullable Object]>*/;
2427 var4
= ((val
* (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_i
) /* item on <var_i:IndexedIterator[nullable Object]>*/;
2429 var5
= (var_item
== NULL
);
2431 var5
= ((short int (*)(val
*, val
*))(var4
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var4
, var_item
) /* == on <var4:nullable Object>*/;
2434 var6
= ((long (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__IndexedIterator__index
]))(var_i
) /* index on <var_i:IndexedIterator[nullable Object]>*/;
2439 ((void (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_i
) /* next on <var_i:IndexedIterator[nullable Object]>*/;
2440 CONTINUE_label
: (void)0;
2442 BREAK_label
: (void)0;
2444 { /* Inline kernel#Int#unary - (var7) */
2455 /* method abstract_collection#SequenceRead#index_of for (self: Object, nullable Object): Int */
2456 long VIRTUAL_abstract_collection__SequenceRead__index_of(val
* self
, val
* p0
) {
2457 long var
/* : Int */;
2458 long var1
/* : Int */;
2459 var1
= abstract_collection__SequenceRead__index_of(self
, p0
);
2464 /* method abstract_collection#SequenceRead#iterator for (self: SequenceRead[nullable Object]): IndexedIterator[nullable Object] */
2465 val
* abstract_collection__SequenceRead__iterator(val
* self
) {
2466 val
* var
/* : IndexedIterator[nullable Object] */;
2467 const char* var_class_name
;
2468 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2469 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "iterator", var_class_name
);
2470 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 463);
2475 /* method abstract_collection#SequenceRead#iterator for (self: Object): Iterator[nullable Object] */
2476 val
* VIRTUAL_abstract_collection__SequenceRead__iterator(val
* self
) {
2477 val
* var
/* : Iterator[nullable Object] */;
2478 val
* var1
/* : IndexedIterator[nullable Object] */;
2479 var1
= abstract_collection__SequenceRead__iterator(self
);
2484 /* method abstract_collection#SequenceRead#== for (self: SequenceRead[nullable Object], nullable Object): Bool */
2485 short int abstract_collection__SequenceRead___61d_61d(val
* self
, val
* p0
) {
2486 short int var
/* : Bool */;
2487 val
* var_o
/* var o: nullable Object */;
2488 short int var1
/* : Bool */;
2491 short int var2
/* : Bool */;
2492 short int var3
/* : Bool */;
2493 long var4
/* : Int */;
2494 long var_l
/* var l: Int */;
2495 long var5
/* : Int */;
2496 short int var6
/* : Bool */;
2497 short int var8
/* : Bool */;
2498 short int var9
/* : Bool */;
2499 short int var10
/* : Bool */;
2500 long var11
/* : Int */;
2501 long var_i
/* var i: Int */;
2502 short int var12
/* : Bool */;
2503 short int var14
/* : Bool */;
2506 const char* var_class_name
;
2507 short int var17
/* : Bool */;
2508 val
* var18
/* : nullable Object */;
2509 val
* var19
/* : nullable Object */;
2510 short int var20
/* : Bool */;
2511 short int var21
/* : Bool */;
2512 long var22
/* : Int */;
2513 long var23
/* : Int */;
2514 long var25
/* : Int */;
2515 short int var26
/* : Bool */;
2517 /* <var_o:nullable Object> isa SequenceRead[nullable Object] */
2518 cltype
= type_abstract_collection__SequenceReadnullable_kernel__Object
.color
;
2519 idtype
= type_abstract_collection__SequenceReadnullable_kernel__Object
.id
;
2523 if(cltype
>= var_o
->type
->table_size
) {
2526 var1
= var_o
->type
->type_table
[cltype
] == idtype
;
2536 var4
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:SequenceRead[nullable Object]>*/;
2538 var5
= ((long (*)(val
*))(var_o
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_o
) /* length on <var_o:nullable Object(SequenceRead[nullable Object])>*/;
2539 { /* Inline kernel#Int#!= (var5,var_l) */
2540 var8
= var5
== var_l
;
2555 { /* Inline kernel#Int#< (var_i,var_l) */
2556 /* Covariant cast for argument 0 (i) <var_l:Int> isa OTHER */
2557 /* <var_l:Int> isa OTHER */
2558 var14
= 1; /* easy <var_l:Int> isa OTHER*/
2560 var_class_name
= type_kernel__Int
.name
;
2561 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2562 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 265);
2565 var17
= var_i
< var_l
;
2568 RET_LABEL13
:(void)0;
2571 var18
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var_i
) /* [] on <self:SequenceRead[nullable Object]>*/;
2572 var19
= ((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])>*/;
2573 if (var18
== NULL
) {
2574 var20
= (var19
!= NULL
);
2576 var20
= ((short int (*)(val
*, val
*))(var18
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var18
, var19
) /* != on <var18:nullable Object>*/;
2585 { /* Inline kernel#Int#+ (var_i,var22) */
2586 var25
= var_i
+ var22
;
2589 RET_LABEL24
:(void)0;
2592 CONTINUE_label
: (void)0;
2594 BREAK_label
: (void)0;
2601 /* method abstract_collection#SequenceRead#== for (self: Object, nullable Object): Bool */
2602 short int VIRTUAL_abstract_collection__SequenceRead___61d_61d(val
* self
, val
* p0
) {
2603 short int var
/* : Bool */;
2604 short int var1
/* : Bool */;
2605 var1
= abstract_collection__SequenceRead___61d_61d(self
, p0
);
2610 /* method abstract_collection#SequenceRead#hash for (self: SequenceRead[nullable Object]): Int */
2611 long abstract_collection__SequenceRead__hash(val
* self
) {
2612 long var
/* : Int */;
2613 long var1
/* : Int */;
2614 long var_res
/* var res: Int */;
2615 val
* var2
/* : Iterator[nullable Object] */;
2616 short int var3
/* : Bool */;
2617 val
* var4
/* : nullable Object */;
2618 val
* var_e
/* var e: nullable Object */;
2619 long var5
/* : Int */;
2620 long var6
/* : Int */;
2621 long var8
/* : Int */;
2624 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:SequenceRead[nullable Object]>*/;
2626 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
2628 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
2630 var5
= kernel__Int__hash(var_res
);
2631 { /* Inline kernel#Int#+ (var_res,var5) */
2632 var8
= var_res
+ var5
;
2638 CONTINUE_label
: (void)0;
2639 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
2641 BREAK_label
: (void)0;
2647 /* method abstract_collection#SequenceRead#hash for (self: Object): Int */
2648 long VIRTUAL_abstract_collection__SequenceRead__hash(val
* self
) {
2649 long var
/* : Int */;
2650 long var1
/* : Int */;
2651 var1
= abstract_collection__SequenceRead__hash(self
);
2656 /* method abstract_collection#Sequence#first= for (self: Sequence[nullable Object], nullable Object) */
2657 void abstract_collection__Sequence__first_61d(val
* self
, val
* p0
) {
2658 short int var
/* : Bool */;
2661 const struct type
* type_struct
;
2662 short int is_nullable
;
2663 const char* var_class_name
;
2664 val
* var_item
/* var item: nullable Object */;
2665 long var1
/* : Int */;
2666 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Sequence#0 */
2667 /* <p0:nullable Object> isa Sequence#0 */
2668 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
2669 cltype
= type_struct
->color
;
2670 idtype
= type_struct
->id
;
2671 is_nullable
= type_struct
->is_nullable
;
2675 if(cltype
>= p0
->type
->table_size
) {
2678 var
= p0
->type
->type_table
[cltype
] == idtype
;
2682 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2683 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
2684 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 494);
2689 ((void (*)(val
*, long, val
*))(self
->class->vft
[COLOR_abstract_collection__Sequence___91d_93d_61d
]))(self
, var1
, var_item
) /* []= on <self:Sequence[nullable Object]>*/;
2692 /* method abstract_collection#Sequence#first= for (self: Object, nullable Object) */
2693 void VIRTUAL_abstract_collection__Sequence__first_61d(val
* self
, val
* p0
) {
2694 abstract_collection__Sequence__first_61d(self
, p0
);
2697 /* method abstract_collection#Sequence#last= for (self: Sequence[nullable Object], nullable Object) */
2698 void abstract_collection__Sequence__last_61d(val
* self
, val
* p0
) {
2699 short int var
/* : Bool */;
2702 const struct type
* type_struct
;
2703 short int is_nullable
;
2704 const char* var_class_name
;
2705 val
* var_item
/* var item: nullable Object */;
2706 long var1
/* : Int */;
2707 long var_l
/* var l: Int */;
2708 long var2
/* : Int */;
2709 short int var3
/* : Bool */;
2710 short int var5
/* : Bool */;
2713 const char* var_class_name8
;
2714 short int var9
/* : Bool */;
2715 long var10
/* : Int */;
2716 long var11
/* : Int */;
2717 long var13
/* : Int */;
2718 long var14
/* : Int */;
2719 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Sequence#0 */
2720 /* <p0:nullable Object> isa Sequence#0 */
2721 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
2722 cltype
= type_struct
->color
;
2723 idtype
= type_struct
->id
;
2724 is_nullable
= type_struct
->is_nullable
;
2728 if(cltype
>= p0
->type
->table_size
) {
2731 var
= p0
->type
->type_table
[cltype
] == idtype
;
2735 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2736 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
2737 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 499);
2741 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Sequence[nullable Object]>*/;
2744 { /* Inline kernel#Int#> (var_l,var2) */
2745 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
2746 /* <var2:Int> isa OTHER */
2747 var5
= 1; /* easy <var2:Int> isa OTHER*/
2749 var_class_name8
= type_kernel__Int
.name
;
2750 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name8
);
2751 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 267);
2754 var9
= var_l
> var2
;
2761 { /* Inline kernel#Int#- (var_l,var10) */
2762 var13
= var_l
- var10
;
2765 RET_LABEL12
:(void)0;
2767 ((void (*)(val
*, long, val
*))(self
->class->vft
[COLOR_abstract_collection__Sequence___91d_93d_61d
]))(self
, var11
, var_item
) /* []= on <self:Sequence[nullable Object]>*/;
2770 ((void (*)(val
*, long, val
*))(self
->class->vft
[COLOR_abstract_collection__Sequence___91d_93d_61d
]))(self
, var14
, var_item
) /* []= on <self:Sequence[nullable Object]>*/;
2774 /* method abstract_collection#Sequence#last= for (self: Object, nullable Object) */
2775 void VIRTUAL_abstract_collection__Sequence__last_61d(val
* self
, val
* p0
) {
2776 abstract_collection__Sequence__last_61d(self
, p0
);
2779 /* method abstract_collection#Sequence#add for (self: Sequence[nullable Object], nullable Object) */
2780 void abstract_collection__Sequence__add(val
* self
, val
* p0
) {
2781 short int var
/* : Bool */;
2784 const struct type
* type_struct
;
2785 short int is_nullable
;
2786 const char* var_class_name
;
2787 val
* var_e
/* var e: nullable Object */;
2788 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa SimpleCollection#0 */
2789 /* <p0:nullable Object> isa SimpleCollection#0 */
2790 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SimpleCollection_FT0
];
2791 cltype
= type_struct
->color
;
2792 idtype
= type_struct
->id
;
2793 is_nullable
= type_struct
->is_nullable
;
2797 if(cltype
>= p0
->type
->table_size
) {
2800 var
= p0
->type
->type_table
[cltype
] == idtype
;
2804 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2805 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "SimpleCollection#0", var_class_name
);
2806 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 511);
2810 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(self
, var_e
) /* push on <self:Sequence[nullable Object]>*/;
2813 /* method abstract_collection#Sequence#add for (self: Object, nullable Object) */
2814 void VIRTUAL_abstract_collection__Sequence__add(val
* self
, val
* p0
) {
2815 abstract_collection__Sequence__add(self
, p0
);
2818 /* method abstract_collection#Sequence#push for (self: Sequence[nullable Object], nullable Object) */
2819 void abstract_collection__Sequence__push(val
* self
, val
* p0
) {
2820 short int var
/* : Bool */;
2823 const struct type
* type_struct
;
2824 short int is_nullable
;
2825 const char* var_class_name
;
2826 const char* var_class_name1
;
2827 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Sequence#0 */
2828 /* <p0:nullable Object> isa Sequence#0 */
2829 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
2830 cltype
= type_struct
->color
;
2831 idtype
= type_struct
->id
;
2832 is_nullable
= type_struct
->is_nullable
;
2836 if(cltype
>= p0
->type
->table_size
) {
2839 var
= p0
->type
->type_table
[cltype
] == idtype
;
2843 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2844 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
2845 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 514);
2848 var_class_name1
= self
== NULL ?
"null" : self
->type
->name
;
2849 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "push", var_class_name1
);
2850 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 514);
2854 /* method abstract_collection#Sequence#push for (self: Object, nullable Object) */
2855 void VIRTUAL_abstract_collection__Sequence__push(val
* self
, val
* p0
) {
2856 abstract_collection__Sequence__push(self
, p0
);
2859 /* method abstract_collection#Sequence#append for (self: Sequence[nullable Object], Collection[nullable Object]) */
2860 void abstract_collection__Sequence__append(val
* self
, val
* p0
) {
2861 short int var
/* : Bool */;
2864 const struct type
* type_struct
;
2865 const char* var_class_name
;
2866 val
* var_coll
/* var coll: Collection[nullable Object] */;
2867 val
* var1
/* : Iterator[nullable Object] */;
2868 short int var2
/* : Bool */;
2869 val
* var3
/* : nullable Object */;
2870 val
* var_i
/* var i: nullable Object */;
2871 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[Sequence#0] */
2872 /* <p0:Collection[nullable Object]> isa Collection[Sequence#0] */
2873 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__Sequence_FT0
];
2874 cltype
= type_struct
->color
;
2875 idtype
= type_struct
->id
;
2876 if(cltype
>= p0
->type
->table_size
) {
2879 var
= p0
->type
->type_table
[cltype
] == idtype
;
2882 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2883 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[Sequence#0]", var_class_name
);
2884 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 517);
2888 var1
= ((val
* (*)(val
*))(var_coll
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_coll
) /* iterator on <var_coll:Collection[nullable Object]>*/;
2890 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:Iterator[nullable Object]>*/;
2892 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[nullable Object]>*/;
2894 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(self
, var_i
) /* push on <self:Sequence[nullable Object]>*/;
2895 CONTINUE_label
: (void)0;
2896 ((void (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var1
) /* next on <var1:Iterator[nullable Object]>*/;
2898 BREAK_label
: (void)0;
2901 /* method abstract_collection#Sequence#append for (self: Object, Collection[nullable Object]) */
2902 void VIRTUAL_abstract_collection__Sequence__append(val
* self
, val
* p0
) {
2903 abstract_collection__Sequence__append(self
, p0
);
2906 /* method abstract_collection#Sequence#pop for (self: Sequence[nullable Object]): nullable Object */
2907 val
* abstract_collection__Sequence__pop(val
* self
) {
2908 val
* var
/* : nullable Object */;
2909 const char* var_class_name
;
2910 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2911 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "pop", var_class_name
);
2912 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 520);
2917 /* method abstract_collection#Sequence#pop for (self: Object): nullable Object */
2918 val
* VIRTUAL_abstract_collection__Sequence__pop(val
* self
) {
2919 val
* var
/* : nullable Object */;
2920 val
* var1
/* : nullable Object */;
2921 var1
= abstract_collection__Sequence__pop(self
);
2926 /* method abstract_collection#Sequence#unshift for (self: Sequence[nullable Object], nullable Object) */
2927 void abstract_collection__Sequence__unshift(val
* self
, val
* p0
) {
2928 short int var
/* : Bool */;
2931 const struct type
* type_struct
;
2932 short int is_nullable
;
2933 const char* var_class_name
;
2934 const char* var_class_name1
;
2935 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Sequence#0 */
2936 /* <p0:nullable Object> isa Sequence#0 */
2937 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
2938 cltype
= type_struct
->color
;
2939 idtype
= type_struct
->id
;
2940 is_nullable
= type_struct
->is_nullable
;
2944 if(cltype
>= p0
->type
->table_size
) {
2947 var
= p0
->type
->type_table
[cltype
] == idtype
;
2951 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2952 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
2953 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 523);
2956 var_class_name1
= self
== NULL ?
"null" : self
->type
->name
;
2957 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "unshift", var_class_name1
);
2958 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 523);
2962 /* method abstract_collection#Sequence#unshift for (self: Object, nullable Object) */
2963 void VIRTUAL_abstract_collection__Sequence__unshift(val
* self
, val
* p0
) {
2964 abstract_collection__Sequence__unshift(self
, p0
);
2967 /* method abstract_collection#Sequence#shift for (self: Sequence[nullable Object]): nullable Object */
2968 val
* abstract_collection__Sequence__shift(val
* self
) {
2969 val
* var
/* : nullable Object */;
2970 const char* var_class_name
;
2971 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2972 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "shift", var_class_name
);
2973 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 526);
2978 /* method abstract_collection#Sequence#shift for (self: Object): nullable Object */
2979 val
* VIRTUAL_abstract_collection__Sequence__shift(val
* self
) {
2980 val
* var
/* : nullable Object */;
2981 val
* var1
/* : nullable Object */;
2982 var1
= abstract_collection__Sequence__shift(self
);
2987 /* method abstract_collection#Sequence#[]= for (self: Sequence[nullable Object], Int, nullable Object) */
2988 void abstract_collection__Sequence___91d_93d_61d(val
* self
, long p0
, val
* p1
) {
2989 short int var
/* : Bool */;
2992 const struct type
* type_struct
;
2993 short int is_nullable
;
2994 const char* var_class_name
;
2995 const char* var_class_name1
;
2996 /* Covariant cast for argument 1 (item) <p1:nullable Object> isa Sequence#0 */
2997 /* <p1:nullable Object> isa Sequence#0 */
2998 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
2999 cltype
= type_struct
->color
;
3000 idtype
= type_struct
->id
;
3001 is_nullable
= type_struct
->is_nullable
;
3005 if(cltype
>= p1
->type
->table_size
) {
3008 var
= p1
->type
->type_table
[cltype
] == idtype
;
3012 var_class_name
= p1
== NULL ?
"null" : p1
->type
->name
;
3013 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
3014 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 530);
3017 var_class_name1
= self
== NULL ?
"null" : self
->type
->name
;
3018 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "[]=", var_class_name1
);
3019 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 530);
3023 /* method abstract_collection#Sequence#[]= for (self: Object, Int, nullable Object) */
3024 void VIRTUAL_abstract_collection__Sequence___91d_93d_61d(val
* self
, long p0
, val
* p1
) {
3025 abstract_collection__Sequence___91d_93d_61d(self
, p0
, p1
);
3028 /* method abstract_collection#Sequence#remove_at for (self: Sequence[nullable Object], Int) */
3029 void abstract_collection__Sequence__remove_at(val
* self
, long p0
) {
3030 const char* var_class_name
;
3031 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
3032 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "remove_at", var_class_name
);
3033 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 533);
3037 /* method abstract_collection#Sequence#remove_at for (self: Object, Int) */
3038 void VIRTUAL_abstract_collection__Sequence__remove_at(val
* self
, long p0
) {
3039 abstract_collection__Sequence__remove_at(self
, p0
);
3042 /* method abstract_collection#IndexedIterator#index for (self: IndexedIterator[nullable Object]): Int */
3043 long abstract_collection__IndexedIterator__index(val
* self
) {
3044 long var
/* : Int */;
3045 const char* var_class_name
;
3046 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
3047 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "index", var_class_name
);
3048 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 540);
3053 /* method abstract_collection#IndexedIterator#index for (self: Object): Int */
3054 long VIRTUAL_abstract_collection__IndexedIterator__index(val
* self
) {
3055 long var
/* : Int */;
3056 long var1
/* : Int */;
3057 var1
= abstract_collection__IndexedIterator__index(self
);
3062 /* method abstract_collection#CoupleMap#couple_at for (self: CoupleMap[Object, nullable Object], Object): nullable Couple[Object, nullable Object] */
3063 val
* abstract_collection__CoupleMap__couple_at(val
* self
, val
* p0
) {
3064 val
* var
/* : nullable Couple[Object, nullable Object] */;
3065 short int var1
/* : Bool */;
3068 const struct type
* type_struct
;
3069 const char* var_class_name
;
3070 const char* var_class_name2
;
3071 /* Covariant cast for argument 0 (key) <p0:Object> isa CoupleMap#0 */
3072 /* <p0:Object> isa CoupleMap#0 */
3073 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__CoupleMap_FT0
];
3074 cltype
= type_struct
->color
;
3075 idtype
= type_struct
->id
;
3076 if(cltype
>= p0
->type
->table_size
) {
3079 var1
= p0
->type
->type_table
[cltype
] == idtype
;
3082 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3083 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "CoupleMap#0", var_class_name
);
3084 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 547);
3087 var_class_name2
= self
== NULL ?
"null" : self
->type
->name
;
3088 fprintf(stderr
, "Runtime error: Abstract method `%s` called on `%s`", "couple_at", var_class_name2
);
3089 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 547);
3094 /* method abstract_collection#CoupleMap#couple_at for (self: Object, Object): nullable Couple[Object, nullable Object] */
3095 val
* VIRTUAL_abstract_collection__CoupleMap__couple_at(val
* self
, val
* p0
) {
3096 val
* var
/* : nullable Couple[Object, nullable Object] */;
3097 val
* var1
/* : nullable Couple[Object, nullable Object] */;
3098 var1
= abstract_collection__CoupleMap__couple_at(self
, p0
);
3103 /* method abstract_collection#CoupleMap#[] for (self: CoupleMap[Object, nullable Object], Object): nullable Object */
3104 val
* abstract_collection__CoupleMap___91d_93d(val
* self
, val
* p0
) {
3105 val
* var
/* : nullable Object */;
3106 short int var1
/* : Bool */;
3109 const struct type
* type_struct
;
3110 const char* var_class_name
;
3111 val
* var_key
/* var key: Object */;
3112 val
* var2
/* : nullable Couple[Object, nullable Object] */;
3113 val
* var_c
/* var c: nullable Couple[Object, nullable Object] */;
3114 val
* var3
/* : null */;
3115 short int var4
/* : Bool */;
3116 val
* var5
/* : nullable Object */;
3117 val
* var6
/* : nullable Object */;
3118 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
3119 /* <p0:Object> isa MapRead#0 */
3120 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
3121 cltype
= type_struct
->color
;
3122 idtype
= type_struct
->id
;
3123 if(cltype
>= p0
->type
->table_size
) {
3126 var1
= p0
->type
->type_table
[cltype
] == idtype
;
3129 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3130 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MapRead#0", var_class_name
);
3131 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 551);
3135 var2
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__CoupleMap__couple_at
]))(self
, var_key
) /* couple_at on <self:CoupleMap[Object, nullable Object]>*/;
3138 if (var_c
== NULL
) {
3139 var4
= 1; /* is null */
3141 var4
= 0; /* arg is null but recv is not */
3144 var5
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead__provide_default_value
]))(self
, var_key
) /* provide_default_value on <self:CoupleMap[Object, nullable Object]>*/;
3148 var6
= ((val
* (*)(val
*))(var_c
->class->vft
[COLOR_abstract_collection__Couple__second
]))(var_c
) /* second on <var_c:nullable Couple[Object, nullable Object](Couple[Object, nullable Object])>*/;
3155 /* method abstract_collection#CoupleMap#[] for (self: Object, Object): nullable Object */
3156 val
* VIRTUAL_abstract_collection__CoupleMap___91d_93d(val
* self
, val
* p0
) {
3157 val
* var
/* : nullable Object */;
3158 val
* var1
/* : nullable Object */;
3159 var1
= abstract_collection__CoupleMap___91d_93d(self
, p0
);
3164 /* method abstract_collection#CoupleMapIterator#item for (self: CoupleMapIterator[Object, nullable Object]): nullable Object */
3165 val
* abstract_collection__CoupleMapIterator__item(val
* self
) {
3166 val
* var
/* : nullable Object */;
3167 val
* var1
/* : Iterator[Couple[Object, nullable Object]] */;
3168 val
* var2
/* : nullable Object */;
3169 val
* var3
/* : nullable Object */;
3170 var1
= self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
3172 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _iter");
3173 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 567);
3176 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[Couple[Object, nullable Object]]>*/;
3177 var3
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Couple__second
]))(var2
) /* second on <var2:nullable Object(Couple[Object, nullable Object])>*/;
3183 /* method abstract_collection#CoupleMapIterator#item for (self: Object): nullable Object */
3184 val
* VIRTUAL_abstract_collection__CoupleMapIterator__item(val
* self
) {
3185 val
* var
/* : nullable Object */;
3186 val
* var1
/* : nullable Object */;
3187 var1
= abstract_collection__CoupleMapIterator__item(self
);
3192 /* method abstract_collection#CoupleMapIterator#key for (self: CoupleMapIterator[Object, nullable Object]): Object */
3193 val
* abstract_collection__CoupleMapIterator__key(val
* self
) {
3194 val
* var
/* : Object */;
3195 val
* var1
/* : Iterator[Couple[Object, nullable Object]] */;
3196 val
* var2
/* : nullable Object */;
3197 val
* var3
/* : nullable Object */;
3198 var1
= self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
3200 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _iter");
3201 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 571);
3204 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[Couple[Object, nullable Object]]>*/;
3205 var3
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Couple__first
]))(var2
) /* first on <var2:nullable Object(Couple[Object, nullable Object])>*/;
3211 /* method abstract_collection#CoupleMapIterator#key for (self: Object): Object */
3212 val
* VIRTUAL_abstract_collection__CoupleMapIterator__key(val
* self
) {
3213 val
* var
/* : Object */;
3214 val
* var1
/* : Object */;
3215 var1
= abstract_collection__CoupleMapIterator__key(self
);
3220 /* method abstract_collection#CoupleMapIterator#is_ok for (self: CoupleMapIterator[Object, nullable Object]): Bool */
3221 short int abstract_collection__CoupleMapIterator__is_ok(val
* self
) {
3222 short int var
/* : Bool */;
3223 val
* var1
/* : Iterator[Couple[Object, nullable Object]] */;
3224 short int var2
/* : Bool */;
3225 var1
= self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
3227 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _iter");
3228 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 573);
3231 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:Iterator[Couple[Object, nullable Object]]>*/;
3237 /* method abstract_collection#CoupleMapIterator#is_ok for (self: Object): Bool */
3238 short int VIRTUAL_abstract_collection__CoupleMapIterator__is_ok(val
* self
) {
3239 short int var
/* : Bool */;
3240 short int var1
/* : Bool */;
3241 var1
= abstract_collection__CoupleMapIterator__is_ok(self
);
3246 /* method abstract_collection#CoupleMapIterator#next for (self: CoupleMapIterator[Object, nullable Object]) */
3247 void abstract_collection__CoupleMapIterator__next(val
* self
) {
3248 val
* var
/* : Iterator[Couple[Object, nullable Object]] */;
3249 var
= self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
3251 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _iter");
3252 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 577);
3255 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var
) /* next on <var:Iterator[Couple[Object, nullable Object]]>*/;
3258 /* method abstract_collection#CoupleMapIterator#next for (self: Object) */
3259 void VIRTUAL_abstract_collection__CoupleMapIterator__next(val
* self
) {
3260 abstract_collection__CoupleMapIterator__next(self
);
3263 /* method abstract_collection#CoupleMapIterator#init for (self: CoupleMapIterator[Object, nullable Object], Iterator[Couple[Object, nullable Object]]) */
3264 void abstract_collection__CoupleMapIterator__init(val
* self
, val
* p0
) {
3265 short int var
/* : Bool */;
3268 const struct type
* type_struct
;
3269 const char* var_class_name
;
3270 val
* var_i
/* var i: Iterator[Couple[Object, nullable Object]] */;
3271 /* Covariant cast for argument 0 (i) <p0:Iterator[Couple[Object, nullable Object]]> isa Iterator[Couple[CoupleMapIterator#0, CoupleMapIterator#1]] */
3272 /* <p0:Iterator[Couple[Object, nullable Object]]> isa Iterator[Couple[CoupleMapIterator#0, CoupleMapIterator#1]] */
3273 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Iteratorabstract_collection__Coupleabstract_collection__CoupleMapIterator_FT0abstract_collection__CoupleMapIterator_FT1
];
3274 cltype
= type_struct
->color
;
3275 idtype
= type_struct
->id
;
3276 if(cltype
>= p0
->type
->table_size
) {
3279 var
= p0
->type
->type_table
[cltype
] == idtype
;
3282 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3283 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Iterator[Couple[CoupleMapIterator#0, CoupleMapIterator#1]]", var_class_name
);
3284 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 582);
3288 self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
= var_i
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
3291 /* method abstract_collection#CoupleMapIterator#init for (self: Object, Iterator[Couple[Object, nullable Object]]) */
3292 void VIRTUAL_abstract_collection__CoupleMapIterator__init(val
* self
, val
* p0
) {
3293 abstract_collection__CoupleMapIterator__init(self
, p0
);
3296 /* method abstract_collection#Couple#first for (self: Couple[nullable Object, nullable Object]): nullable Object */
3297 val
* abstract_collection__Couple__first(val
* self
) {
3298 val
* var
/* : nullable Object */;
3299 val
* var1
/* : nullable Object */;
3300 var1
= self
->attrs
[COLOR_abstract_collection__Couple___first
].val
; /* _first on <self:Couple[nullable Object, nullable Object]> */
3305 /* method abstract_collection#Couple#first for (self: Object): nullable Object */
3306 val
* VIRTUAL_abstract_collection__Couple__first(val
* self
) {
3307 val
* var
/* : nullable Object */;
3308 val
* var1
/* : nullable Object */;
3309 var1
= abstract_collection__Couple__first(self
);
3314 /* method abstract_collection#Couple#first= for (self: Couple[nullable Object, nullable Object], nullable Object) */
3315 void abstract_collection__Couple__first_61d(val
* self
, val
* p0
) {
3316 short int var
/* : Bool */;
3319 const struct type
* type_struct
;
3320 short int is_nullable
;
3321 const char* var_class_name
;
3322 /* Covariant cast for argument 0 (first) <p0:nullable Object> isa Couple#0 */
3323 /* <p0:nullable Object> isa Couple#0 */
3324 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT0
];
3325 cltype
= type_struct
->color
;
3326 idtype
= type_struct
->id
;
3327 is_nullable
= type_struct
->is_nullable
;
3331 if(cltype
>= p0
->type
->table_size
) {
3334 var
= p0
->type
->type_table
[cltype
] == idtype
;
3338 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3339 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Couple#0", var_class_name
);
3340 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 590);
3343 self
->attrs
[COLOR_abstract_collection__Couple___first
].val
= p0
; /* _first on <self:Couple[nullable Object, nullable Object]> */
3346 /* method abstract_collection#Couple#first= for (self: Object, nullable Object) */
3347 void VIRTUAL_abstract_collection__Couple__first_61d(val
* self
, val
* p0
) {
3348 abstract_collection__Couple__first_61d(self
, p0
);
3351 /* method abstract_collection#Couple#second for (self: Couple[nullable Object, nullable Object]): nullable Object */
3352 val
* abstract_collection__Couple__second(val
* self
) {
3353 val
* var
/* : nullable Object */;
3354 val
* var1
/* : nullable Object */;
3355 var1
= self
->attrs
[COLOR_abstract_collection__Couple___second
].val
; /* _second on <self:Couple[nullable Object, nullable Object]> */
3360 /* method abstract_collection#Couple#second for (self: Object): nullable Object */
3361 val
* VIRTUAL_abstract_collection__Couple__second(val
* self
) {
3362 val
* var
/* : nullable Object */;
3363 val
* var1
/* : nullable Object */;
3364 var1
= abstract_collection__Couple__second(self
);
3369 /* method abstract_collection#Couple#second= for (self: Couple[nullable Object, nullable Object], nullable Object) */
3370 void abstract_collection__Couple__second_61d(val
* self
, val
* p0
) {
3371 short int var
/* : Bool */;
3374 const struct type
* type_struct
;
3375 short int is_nullable
;
3376 const char* var_class_name
;
3377 /* Covariant cast for argument 0 (second) <p0:nullable Object> isa Couple#1 */
3378 /* <p0:nullable Object> isa Couple#1 */
3379 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT1
];
3380 cltype
= type_struct
->color
;
3381 idtype
= type_struct
->id
;
3382 is_nullable
= type_struct
->is_nullable
;
3386 if(cltype
>= p0
->type
->table_size
) {
3389 var
= p0
->type
->type_table
[cltype
] == idtype
;
3393 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3394 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Couple#1", var_class_name
);
3395 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 593);
3398 self
->attrs
[COLOR_abstract_collection__Couple___second
].val
= p0
; /* _second on <self:Couple[nullable Object, nullable Object]> */
3401 /* method abstract_collection#Couple#second= for (self: Object, nullable Object) */
3402 void VIRTUAL_abstract_collection__Couple__second_61d(val
* self
, val
* p0
) {
3403 abstract_collection__Couple__second_61d(self
, p0
);
3406 /* method abstract_collection#Couple#init for (self: Couple[nullable Object, nullable Object], nullable Object, nullable Object) */
3407 void abstract_collection__Couple__init(val
* self
, val
* p0
, val
* p1
) {
3408 short int var
/* : Bool */;
3411 const struct type
* type_struct
;
3412 short int is_nullable
;
3413 const char* var_class_name
;
3414 short int var1
/* : Bool */;
3417 const struct type
* type_struct4
;
3418 short int is_nullable5
;
3419 const char* var_class_name6
;
3420 val
* var_f
/* var f: nullable Object */;
3421 val
* var_s
/* var s: nullable Object */;
3422 /* Covariant cast for argument 0 (f) <p0:nullable Object> isa Couple#0 */
3423 /* <p0:nullable Object> isa Couple#0 */
3424 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT0
];
3425 cltype
= type_struct
->color
;
3426 idtype
= type_struct
->id
;
3427 is_nullable
= type_struct
->is_nullable
;
3431 if(cltype
>= p0
->type
->table_size
) {
3434 var
= p0
->type
->type_table
[cltype
] == idtype
;
3438 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3439 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Couple#0", var_class_name
);
3440 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 596);
3443 /* Covariant cast for argument 1 (s) <p1:nullable Object> isa Couple#1 */
3444 /* <p1:nullable Object> isa Couple#1 */
3445 type_struct4
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT1
];
3446 cltype2
= type_struct4
->color
;
3447 idtype3
= type_struct4
->id
;
3448 is_nullable5
= type_struct4
->is_nullable
;
3450 var1
= is_nullable5
;
3452 if(cltype2
>= p1
->type
->table_size
) {
3455 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
3459 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
3460 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Couple#1", var_class_name6
);
3461 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 596);
3466 self
->attrs
[COLOR_abstract_collection__Couple___first
].val
= var_f
; /* _first on <self:Couple[nullable Object, nullable Object]> */
3467 self
->attrs
[COLOR_abstract_collection__Couple___second
].val
= var_s
; /* _second on <self:Couple[nullable Object, nullable Object]> */
3470 /* method abstract_collection#Couple#init for (self: Object, nullable Object, nullable Object) */
3471 void VIRTUAL_abstract_collection__Couple__init(val
* self
, val
* p0
, val
* p1
) {
3472 abstract_collection__Couple__init(self
, p0
, p1
);