1 #include "abstract_collection.sep.0.h"
2 /* method abstract_collection#Collection#is_empty for (self: Collection[nullable Object]): Bool */
3 short int abstract_collection__Collection__is_empty(val
* self
) {
4 short int var
/* : Bool */;
7 short int var3
/* : Bool */;
8 short int var4
/* : Bool */;
9 short int var6
/* : Bool */;
11 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Collection[nullable Object]>*/;
15 { /* Inline kernel#Int#== (var1,var2) on <var1:Int> */
28 /* method abstract_collection#Collection#is_empty for (self: Object): Bool */
29 short int VIRTUAL_abstract_collection__Collection__is_empty(val
* self
) {
30 short int var
/* : Bool */;
31 short int var1
/* : Bool */;
32 var1
= abstract_collection__Collection__is_empty(self
);
37 /* method abstract_collection#Collection#length for (self: Collection[nullable Object]): Int */
38 long abstract_collection__Collection__length(val
* self
) {
40 long var1
/* : Int */;
41 long var_nb
/* var nb: Int */;
42 val
* var_
/* var : Collection[nullable Object] */;
43 val
* var2
/* : Iterator[nullable Object] */;
44 val
* var_3
/* var : Iterator[nullable Object] */;
45 short int var4
/* : Bool */;
46 val
* var5
/* : nullable Object */;
47 val
* var_i
/* var i: nullable Object */;
48 long var6
/* : Int */;
49 long var7
/* : Int */;
50 short int var9
/* : Bool */;
53 const char* var_class_name
;
54 long var10
/* : Int */;
59 var2
= ((val
* (*)(val
*))(var_
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_
) /* iterator on <var_:Collection[nullable Object]>*/;
64 var4
= ((short int (*)(val
*))(var_3
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_3
) /* is_ok on <var_3:Iterator[nullable Object]>*/;
68 var5
= ((val
* (*)(val
*))(var_3
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_3
) /* item on <var_3:Iterator[nullable Object]>*/;
73 { /* Inline kernel#Int#+ (var_nb,var6) on <var_nb:Int> */
74 /* Covariant cast for argument 0 (i) <var6:Int> isa OTHER */
75 /* <var6:Int> isa OTHER */
76 var9
= 1; /* easy <var6:Int> isa OTHER*/
77 if (unlikely(!var9
)) {
78 var_class_name
= type_kernel__Int
.name
;
79 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
80 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
83 var10
= var_nb
+ var6
;
91 ((void (*)(val
*))(var_3
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_3
) /* next on <var_3:Iterator[nullable Object]>*/;
99 { /* Inline abstract_collection#Iterator#finish (var_3) on <var_3:Iterator[nullable Object]> */
108 /* method abstract_collection#Collection#length for (self: Object): Int */
109 long VIRTUAL_abstract_collection__Collection__length(val
* self
) {
110 long var
/* : Int */;
111 long var1
/* : Int */;
112 var1
= abstract_collection__Collection__length(self
);
117 /* method abstract_collection#Collection#has for (self: Collection[nullable Object], nullable Object): Bool */
118 short int abstract_collection__Collection__has(val
* self
, val
* p0
) {
119 short int var
/* : Bool */;
120 short int var1
/* : Bool */;
123 const struct type
* type_struct
;
124 short int is_nullable
;
125 const char* var_class_name
;
126 val
* var_item
/* var item: nullable Object */;
127 val
* var_
/* var : Collection[nullable Object] */;
128 val
* var2
/* : Iterator[nullable Object] */;
129 val
* var_3
/* var : Iterator[nullable Object] */;
130 short int var4
/* : Bool */;
131 val
* var5
/* : nullable Object */;
132 val
* var_i
/* var i: nullable Object */;
133 short int var6
/* : Bool */;
134 short int var7
/* : Bool */;
135 short int var8
/* : Bool */;
136 short int var10
/* : Bool */;
137 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
138 /* <p0:nullable Object> isa E */
139 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
140 cltype
= type_struct
->color
;
141 idtype
= type_struct
->id
;
142 is_nullable
= type_struct
->is_nullable
;
146 if(cltype
>= p0
->type
->table_size
) {
149 var1
= p0
->type
->type_table
[cltype
] == idtype
;
152 if (unlikely(!var1
)) {
153 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
154 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
155 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 76);
161 var2
= ((val
* (*)(val
*))(var_
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_
) /* iterator on <var_:Collection[nullable Object]>*/;
166 var4
= ((short int (*)(val
*))(var_3
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_3
) /* is_ok on <var_3:Iterator[nullable Object]>*/;
170 var5
= ((val
* (*)(val
*))(var_3
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_3
) /* item on <var_3:Iterator[nullable Object]>*/;
174 var6
= (var_item
== NULL
);
176 var7
= ((short int (*)(val
*, val
*))(var_i
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_i
, var_item
) /* == on <var_i:nullable Object>*/;
186 ((void (*)(val
*))(var_3
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_3
) /* next on <var_3:Iterator[nullable Object]>*/;
192 BREAK_label
: (void)0;
194 { /* Inline abstract_collection#Iterator#finish (var_3) on <var_3:Iterator[nullable Object]> */
204 /* method abstract_collection#Collection#has for (self: Object, nullable Object): Bool */
205 short int VIRTUAL_abstract_collection__Collection__has(val
* self
, val
* p0
) {
206 short int var
/* : Bool */;
207 short int var1
/* : Bool */;
208 var1
= abstract_collection__Collection__has(self
, p0
);
213 /* method abstract_collection#Collection#first for (self: Collection[nullable Object]): nullable Object */
214 val
* abstract_collection__Collection__first(val
* self
) {
215 val
* var
/* : nullable Object */;
216 long var1
/* : Int */;
217 long var2
/* : Int */;
218 short int var3
/* : Bool */;
219 short int var5
/* : Bool */;
222 const char* var_class_name
;
223 short int var6
/* : Bool */;
224 val
* var7
/* : Iterator[nullable Object] */;
225 val
* var8
/* : nullable Object */;
227 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Collection[nullable Object]>*/;
231 { /* Inline kernel#Int#> (var1,var2) on <var1:Int> */
232 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
233 /* <var2:Int> isa OTHER */
234 var5
= 1; /* easy <var2:Int> isa OTHER*/
235 if (unlikely(!var5
)) {
236 var_class_name
= type_kernel__Int
.name
;
237 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
238 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 373);
247 if (unlikely(!var3
)) {
248 PRINT_ERROR("Runtime error: %s", "Assert failed");
249 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 122);
253 var7
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:Collection[nullable Object]>*/;
256 var8
= ((val
* (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var7
) /* item on <var7:Iterator[nullable Object]>*/;
263 /* method abstract_collection#Collection#first for (self: Object): nullable Object */
264 val
* VIRTUAL_abstract_collection__Collection__first(val
* self
) {
265 val
* var
/* : nullable Object */;
266 val
* var1
/* : nullable Object */;
267 var1
= abstract_collection__Collection__first(self
);
272 /* method abstract_collection#Collection#has_all for (self: Collection[nullable Object], Collection[nullable Object]): Bool */
273 short int abstract_collection__Collection__has_all(val
* self
, val
* p0
) {
274 short int var
/* : Bool */;
275 short int var1
/* : Bool */;
278 const struct type
* type_struct
;
279 const char* var_class_name
;
280 val
* var_other
/* var other: Collection[nullable Object] */;
281 val
* var_
/* var : Collection[nullable Object] */;
282 val
* var2
/* : Iterator[nullable Object] */;
283 val
* var_3
/* var : Iterator[nullable Object] */;
284 short int var4
/* : Bool */;
285 val
* var5
/* : nullable Object */;
286 val
* var_x
/* var x: nullable Object */;
287 short int var6
/* : Bool */;
288 short int var7
/* : Bool */;
289 short int var8
/* : Bool */;
290 short int var10
/* : Bool */;
291 /* Covariant cast for argument 0 (other) <p0:Collection[nullable Object]> isa Collection[E] */
292 /* <p0:Collection[nullable Object]> isa Collection[E] */
293 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__Collection_FT0
];
294 cltype
= type_struct
->color
;
295 idtype
= type_struct
->id
;
296 if(cltype
>= p0
->type
->table_size
) {
299 var1
= p0
->type
->type_table
[cltype
] == idtype
;
301 if (unlikely(!var1
)) {
302 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
303 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name
);
304 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 126);
310 var2
= ((val
* (*)(val
*))(var_
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_
) /* iterator on <var_:Collection[nullable Object]>*/;
315 var4
= ((short int (*)(val
*))(var_3
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_3
) /* is_ok on <var_3:Iterator[nullable Object]>*/;
319 var5
= ((val
* (*)(val
*))(var_3
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_3
) /* item on <var_3:Iterator[nullable Object]>*/;
323 var6
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__has
]))(self
, var_x
) /* has on <self:Collection[nullable Object]>*/;
333 ((void (*)(val
*))(var_3
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_3
) /* next on <var_3:Iterator[nullable Object]>*/;
339 BREAK_label
: (void)0;
341 { /* Inline abstract_collection#Iterator#finish (var_3) on <var_3:Iterator[nullable Object]> */
351 /* method abstract_collection#Collection#has_all for (self: Object, Collection[nullable Object]): Bool */
352 short int VIRTUAL_abstract_collection__Collection__has_all(val
* self
, val
* p0
) {
353 short int var
/* : Bool */;
354 short int var1
/* : Bool */;
355 var1
= abstract_collection__Collection__has_all(self
, p0
);
360 /* method abstract_collection#Iterator#iterator for (self: Iterator[nullable Object]): Iterator[nullable Object] */
361 val
* abstract_collection__Iterator__iterator(val
* self
) {
362 val
* var
/* : Iterator[nullable Object] */;
368 /* method abstract_collection#Iterator#iterator for (self: Object): Iterator[nullable Object] */
369 val
* VIRTUAL_abstract_collection__Iterator__iterator(val
* self
) {
370 val
* var
/* : Iterator[nullable Object] */;
371 val
* var1
/* : Iterator[nullable Object] */;
372 var1
= abstract_collection__Iterator__iterator(self
);
377 /* method abstract_collection#Iterator#finish for (self: Iterator[nullable Object]) */
378 void abstract_collection__Iterator__finish(val
* self
) {
381 /* method abstract_collection#Iterator#finish for (self: Object) */
382 void VIRTUAL_abstract_collection__Iterator__finish(val
* self
) {
383 { /* Inline abstract_collection#Iterator#finish (self) on <self:Object(Iterator[nullable Object])> */
388 /* method abstract_collection#Container#first for (self: Container[nullable Object]): nullable Object */
389 val
* abstract_collection__Container__first(val
* self
) {
390 val
* var
/* : nullable Object */;
391 val
* var1
/* : nullable Object */;
392 val
* var3
/* : nullable Object */;
394 { /* Inline abstract_collection#Container#item (self) on <self:Container[nullable Object]> */
395 var3
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Container[nullable Object]> */
405 /* method abstract_collection#Container#first for (self: Object): nullable Object */
406 val
* VIRTUAL_abstract_collection__Container__first(val
* self
) {
407 val
* var
/* : nullable Object */;
408 val
* var1
/* : nullable Object */;
409 var1
= abstract_collection__Container__first(self
);
414 /* method abstract_collection#Container#is_empty for (self: Container[nullable Object]): Bool */
415 short int abstract_collection__Container__is_empty(val
* self
) {
416 short int var
/* : Bool */;
417 short int var1
/* : Bool */;
424 /* method abstract_collection#Container#is_empty for (self: Object): Bool */
425 short int VIRTUAL_abstract_collection__Container__is_empty(val
* self
) {
426 short int var
/* : Bool */;
427 short int var1
/* : Bool */;
428 var1
= abstract_collection__Container__is_empty(self
);
433 /* method abstract_collection#Container#length for (self: Container[nullable Object]): Int */
434 long abstract_collection__Container__length(val
* self
) {
435 long var
/* : Int */;
436 long var1
/* : Int */;
443 /* method abstract_collection#Container#length for (self: Object): Int */
444 long VIRTUAL_abstract_collection__Container__length(val
* self
) {
445 long var
/* : Int */;
446 long var1
/* : Int */;
447 var1
= abstract_collection__Container__length(self
);
452 /* method abstract_collection#Container#has for (self: Container[nullable Object], nullable Object): Bool */
453 short int abstract_collection__Container__has(val
* self
, val
* p0
) {
454 short int var
/* : Bool */;
455 short int var1
/* : Bool */;
458 const struct type
* type_struct
;
459 short int is_nullable
;
460 const char* var_class_name
;
461 val
* var_an_item
/* var an_item: nullable Object */;
462 val
* var2
/* : nullable Object */;
463 val
* var4
/* : nullable Object */;
464 short int var5
/* : Bool */;
465 short int var6
/* : Bool */;
466 /* Covariant cast for argument 0 (an_item) <p0:nullable Object> isa E */
467 /* <p0:nullable Object> isa E */
468 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
469 cltype
= type_struct
->color
;
470 idtype
= type_struct
->id
;
471 is_nullable
= type_struct
->is_nullable
;
475 if(cltype
>= p0
->type
->table_size
) {
478 var1
= p0
->type
->type_table
[cltype
] == idtype
;
481 if (unlikely(!var1
)) {
482 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
483 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
484 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 182);
489 { /* Inline abstract_collection#Container#item (self) on <self:Container[nullable Object]> */
490 var4
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Container[nullable Object]> */
496 var5
= (var_an_item
== NULL
);
498 var6
= ((short int (*)(val
*, val
*))(var2
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var2
, var_an_item
) /* == on <var2:nullable Object>*/;
506 /* method abstract_collection#Container#has for (self: Object, nullable Object): Bool */
507 short int VIRTUAL_abstract_collection__Container__has(val
* self
, val
* p0
) {
508 short int var
/* : Bool */;
509 short int var1
/* : Bool */;
510 var1
= abstract_collection__Container__has(self
, p0
);
515 /* method abstract_collection#Container#iterator for (self: Container[nullable Object]): Iterator[nullable Object] */
516 val
* abstract_collection__Container__iterator(val
* self
) {
517 val
* var
/* : Iterator[nullable Object] */;
518 val
* var1
/* : ContainerIterator[nullable Object] */;
519 var1
= NEW_abstract_collection__ContainerIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__ContainerIteratorabstract_collection__Container_FT0
]);
521 abstract_collection__ContainerIterator__init(var1
, self
); /* Direct call abstract_collection#ContainerIterator#init on <var1:ContainerIterator[nullable Object]>*/
528 /* method abstract_collection#Container#iterator for (self: Object): Iterator[nullable Object] */
529 val
* VIRTUAL_abstract_collection__Container__iterator(val
* self
) {
530 val
* var
/* : Iterator[nullable Object] */;
531 val
* var1
/* : Iterator[nullable Object] */;
532 var1
= abstract_collection__Container__iterator(self
);
537 /* method abstract_collection#Container#init for (self: Container[nullable Object], nullable Object) */
538 void abstract_collection__Container__init(val
* self
, val
* p0
) {
539 short int var
/* : Bool */;
542 const struct type
* type_struct
;
543 short int is_nullable
;
544 const char* var_class_name
;
545 val
* var_e
/* var e: nullable Object */;
546 short int var2
/* : Bool */;
549 const struct type
* type_struct5
;
550 short int is_nullable6
;
551 const char* var_class_name7
;
552 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa E */
553 /* <p0:nullable Object> isa E */
554 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Container_FT0
];
555 cltype
= type_struct
->color
;
556 idtype
= type_struct
->id
;
557 is_nullable
= type_struct
->is_nullable
;
561 if(cltype
>= p0
->type
->table_size
) {
564 var
= p0
->type
->type_table
[cltype
] == idtype
;
567 if (unlikely(!var
)) {
568 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
569 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
570 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 197);
575 { /* Inline abstract_collection#Container#item= (self,var_e) on <self:Container[nullable Object]> */
576 /* Covariant cast for argument 0 (item) <var_e:nullable Object> isa E */
577 /* <var_e:nullable Object> isa E */
578 type_struct5
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Container_FT0
];
579 cltype3
= type_struct5
->color
;
580 idtype4
= type_struct5
->id
;
581 is_nullable6
= type_struct5
->is_nullable
;
585 if(cltype3
>= var_e
->type
->table_size
) {
588 var2
= var_e
->type
->type_table
[cltype3
] == idtype4
;
591 if (unlikely(!var2
)) {
592 var_class_name7
= var_e
== NULL ?
"null" : var_e
->type
->name
;
593 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name7
);
594 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 200);
597 self
->attrs
[COLOR_abstract_collection__Container___item
].val
= var_e
; /* _item on <self:Container[nullable Object]> */
603 /* method abstract_collection#Container#init for (self: Object, nullable Object) */
604 void VIRTUAL_abstract_collection__Container__init(val
* self
, val
* p0
) {
605 abstract_collection__Container__init(self
, p0
); /* Direct call abstract_collection#Container#init on <self:Object(Container[nullable Object])>*/
608 /* method abstract_collection#Container#item for (self: Container[nullable Object]): nullable Object */
609 val
* abstract_collection__Container__item(val
* self
) {
610 val
* var
/* : nullable Object */;
611 val
* var1
/* : nullable Object */;
612 var1
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Container[nullable Object]> */
617 /* method abstract_collection#Container#item for (self: Object): nullable Object */
618 val
* VIRTUAL_abstract_collection__Container__item(val
* self
) {
619 val
* var
/* : nullable Object */;
620 val
* var1
/* : nullable Object */;
621 val
* var3
/* : nullable Object */;
622 { /* Inline abstract_collection#Container#item (self) on <self:Object(Container[nullable Object])> */
623 var3
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Object(Container[nullable Object])> */
631 /* method abstract_collection#Container#item= for (self: Container[nullable Object], nullable Object) */
632 void abstract_collection__Container__item_61d(val
* self
, val
* p0
) {
633 short int var
/* : Bool */;
636 const struct type
* type_struct
;
637 short int is_nullable
;
638 const char* var_class_name
;
639 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
640 /* <p0:nullable Object> isa E */
641 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Container_FT0
];
642 cltype
= type_struct
->color
;
643 idtype
= type_struct
->id
;
644 is_nullable
= type_struct
->is_nullable
;
648 if(cltype
>= p0
->type
->table_size
) {
651 var
= p0
->type
->type_table
[cltype
] == idtype
;
654 if (unlikely(!var
)) {
655 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
656 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
657 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 200);
660 self
->attrs
[COLOR_abstract_collection__Container___item
].val
= p0
; /* _item on <self:Container[nullable Object]> */
663 /* method abstract_collection#Container#item= for (self: Object, nullable Object) */
664 void VIRTUAL_abstract_collection__Container__item_61d(val
* self
, val
* p0
) {
665 short int var
/* : Bool */;
668 const struct type
* type_struct
;
669 short int is_nullable
;
670 const char* var_class_name
;
671 { /* Inline abstract_collection#Container#item= (self,p0) on <self:Object(Container[nullable Object])> */
672 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
673 /* <p0:nullable Object> isa E */
674 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Container_FT0
];
675 cltype
= type_struct
->color
;
676 idtype
= type_struct
->id
;
677 is_nullable
= type_struct
->is_nullable
;
681 if(cltype
>= p0
->type
->table_size
) {
684 var
= p0
->type
->type_table
[cltype
] == idtype
;
687 if (unlikely(!var
)) {
688 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
689 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
690 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 200);
693 self
->attrs
[COLOR_abstract_collection__Container___item
].val
= p0
; /* _item on <self:Object(Container[nullable Object])> */
698 /* method abstract_collection#ContainerIterator#item for (self: ContainerIterator[nullable Object]): nullable Object */
699 val
* abstract_collection__ContainerIterator__item(val
* self
) {
700 val
* var
/* : nullable Object */;
701 val
* var1
/* : Container[nullable Object] */;
702 val
* var2
/* : nullable Object */;
703 val
* var4
/* : nullable Object */;
704 var1
= self
->attrs
[COLOR_abstract_collection__ContainerIterator___container
].val
; /* _container on <self:ContainerIterator[nullable Object]> */
705 if (unlikely(var1
== NULL
)) {
706 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _container");
707 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 207);
711 { /* Inline abstract_collection#Container#item (var1) on <var1:Container[nullable Object]> */
712 var4
= var1
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <var1:Container[nullable Object]> */
722 /* method abstract_collection#ContainerIterator#item for (self: Object): nullable Object */
723 val
* VIRTUAL_abstract_collection__ContainerIterator__item(val
* self
) {
724 val
* var
/* : nullable Object */;
725 val
* var1
/* : nullable Object */;
726 var1
= abstract_collection__ContainerIterator__item(self
);
731 /* method abstract_collection#ContainerIterator#next for (self: ContainerIterator[nullable Object]) */
732 void abstract_collection__ContainerIterator__next(val
* self
) {
733 short int var
/* : Bool */;
736 { /* Inline abstract_collection#ContainerIterator#is_ok= (self,var) on <self:ContainerIterator[nullable Object]> */
737 self
->attrs
[COLOR_abstract_collection__ContainerIterator___is_ok
].s
= var
; /* _is_ok on <self:ContainerIterator[nullable Object]> */
743 /* method abstract_collection#ContainerIterator#next for (self: Object) */
744 void VIRTUAL_abstract_collection__ContainerIterator__next(val
* self
) {
745 abstract_collection__ContainerIterator__next(self
); /* Direct call abstract_collection#ContainerIterator#next on <self:Object(ContainerIterator[nullable Object])>*/
748 /* method abstract_collection#ContainerIterator#init for (self: ContainerIterator[nullable Object], Container[nullable Object]) */
749 void abstract_collection__ContainerIterator__init(val
* self
, val
* p0
) {
750 short int var
/* : Bool */;
753 const struct type
* type_struct
;
754 const char* var_class_name
;
755 val
* var_c
/* var c: Container[nullable Object] */;
756 /* Covariant cast for argument 0 (c) <p0:Container[nullable Object]> isa Container[E] */
757 /* <p0:Container[nullable Object]> isa Container[E] */
758 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Containerabstract_collection__ContainerIterator_FT0
];
759 cltype
= type_struct
->color
;
760 idtype
= type_struct
->id
;
761 if(cltype
>= p0
->type
->table_size
) {
764 var
= p0
->type
->type_table
[cltype
] == idtype
;
766 if (unlikely(!var
)) {
767 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
768 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Container[E]", var_class_name
);
769 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 211);
773 self
->attrs
[COLOR_abstract_collection__ContainerIterator___container
].val
= var_c
; /* _container on <self:ContainerIterator[nullable Object]> */
776 /* method abstract_collection#ContainerIterator#init for (self: Object, Container[nullable Object]) */
777 void VIRTUAL_abstract_collection__ContainerIterator__init(val
* self
, val
* p0
) {
778 abstract_collection__ContainerIterator__init(self
, p0
); /* Direct call abstract_collection#ContainerIterator#init on <self:Object(ContainerIterator[nullable Object])>*/
781 /* method abstract_collection#ContainerIterator#is_ok for (self: ContainerIterator[nullable Object]): Bool */
782 short int abstract_collection__ContainerIterator__is_ok(val
* self
) {
783 short int var
/* : Bool */;
784 short int var1
/* : Bool */;
785 var1
= self
->attrs
[COLOR_abstract_collection__ContainerIterator___is_ok
].s
; /* _is_ok on <self:ContainerIterator[nullable Object]> */
790 /* method abstract_collection#ContainerIterator#is_ok for (self: Object): Bool */
791 short int VIRTUAL_abstract_collection__ContainerIterator__is_ok(val
* self
) {
792 short int var
/* : Bool */;
793 short int var1
/* : Bool */;
794 short int var3
/* : Bool */;
795 { /* Inline abstract_collection#ContainerIterator#is_ok (self) on <self:Object(ContainerIterator[nullable Object])> */
796 var3
= self
->attrs
[COLOR_abstract_collection__ContainerIterator___is_ok
].s
; /* _is_ok on <self:Object(ContainerIterator[nullable Object])> */
804 /* method abstract_collection#ContainerIterator#is_ok= for (self: ContainerIterator[nullable Object], Bool) */
805 void abstract_collection__ContainerIterator__is_ok_61d(val
* self
, short int p0
) {
806 self
->attrs
[COLOR_abstract_collection__ContainerIterator___is_ok
].s
= p0
; /* _is_ok on <self:ContainerIterator[nullable Object]> */
809 /* method abstract_collection#ContainerIterator#is_ok= for (self: Object, Bool) */
810 void VIRTUAL_abstract_collection__ContainerIterator__is_ok_61d(val
* self
, short int p0
) {
811 { /* Inline abstract_collection#ContainerIterator#is_ok= (self,p0) on <self:Object(ContainerIterator[nullable Object])> */
812 self
->attrs
[COLOR_abstract_collection__ContainerIterator___is_ok
].s
= p0
; /* _is_ok on <self:Object(ContainerIterator[nullable Object])> */
817 /* method abstract_collection#RemovableCollection#clear for (self: RemovableCollection[nullable Object]) */
818 void abstract_collection__RemovableCollection__clear(val
* self
) {
819 const char* var_class_name
;
820 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
821 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "clear", var_class_name
);
822 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 222);
826 /* method abstract_collection#RemovableCollection#clear for (self: Object) */
827 void VIRTUAL_abstract_collection__RemovableCollection__clear(val
* self
) {
828 const char* var_class_name
;
829 { /* Inline abstract_collection#RemovableCollection#clear (self) on <self:Object(RemovableCollection[nullable Object])> */
830 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
831 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "clear", var_class_name
);
832 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 222);
838 /* method abstract_collection#RemovableCollection#remove for (self: RemovableCollection[nullable Object], nullable Object) */
839 void abstract_collection__RemovableCollection__remove(val
* self
, val
* p0
) {
840 short int var
/* : Bool */;
843 const struct type
* type_struct
;
844 short int is_nullable
;
845 const char* var_class_name
;
846 const char* var_class_name1
;
847 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
848 /* <p0:nullable Object> isa E */
849 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
850 cltype
= type_struct
->color
;
851 idtype
= type_struct
->id
;
852 is_nullable
= type_struct
->is_nullable
;
856 if(cltype
>= p0
->type
->table_size
) {
859 var
= p0
->type
->type_table
[cltype
] == idtype
;
862 if (unlikely(!var
)) {
863 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
864 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
865 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 231);
868 var_class_name1
= self
== NULL ?
"null" : self
->type
->name
;
869 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "remove", var_class_name1
);
870 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 231);
874 /* method abstract_collection#RemovableCollection#remove for (self: Object, nullable Object) */
875 void VIRTUAL_abstract_collection__RemovableCollection__remove(val
* self
, val
* p0
) {
876 short int var
/* : Bool */;
879 const struct type
* type_struct
;
880 short int is_nullable
;
881 const char* var_class_name
;
882 const char* var_class_name2
;
883 { /* Inline abstract_collection#RemovableCollection#remove (self,p0) on <self:Object(RemovableCollection[nullable Object])> */
884 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
885 /* <p0:nullable Object> isa E */
886 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
887 cltype
= type_struct
->color
;
888 idtype
= type_struct
->id
;
889 is_nullable
= type_struct
->is_nullable
;
893 if(cltype
>= p0
->type
->table_size
) {
896 var
= p0
->type
->type_table
[cltype
] == idtype
;
899 if (unlikely(!var
)) {
900 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
901 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
902 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 231);
905 var_class_name2
= self
== NULL ?
"null" : self
->type
->name
;
906 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "remove", var_class_name2
);
907 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 231);
913 /* method abstract_collection#SimpleCollection#add_all for (self: SimpleCollection[nullable Object], Collection[nullable Object]) */
914 void abstract_collection__SimpleCollection__add_all(val
* self
, val
* p0
) {
915 short int var
/* : Bool */;
918 const struct type
* type_struct
;
919 const char* var_class_name
;
920 val
* var_coll
/* var coll: Collection[nullable Object] */;
921 val
* var_
/* var : Collection[nullable Object] */;
922 val
* var1
/* : Iterator[nullable Object] */;
923 val
* var_2
/* var : Iterator[nullable Object] */;
924 short int var3
/* : Bool */;
925 val
* var4
/* : nullable Object */;
926 val
* var_i
/* var i: nullable Object */;
927 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[E] */
928 /* <p0:Collection[nullable Object]> isa Collection[E] */
929 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__SimpleCollection_FT0
];
930 cltype
= type_struct
->color
;
931 idtype
= type_struct
->id
;
932 if(cltype
>= p0
->type
->table_size
) {
935 var
= p0
->type
->type_table
[cltype
] == idtype
;
937 if (unlikely(!var
)) {
938 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
939 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name
);
940 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 260);
946 var1
= ((val
* (*)(val
*))(var_
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_
) /* iterator on <var_:Collection[nullable Object]>*/;
951 var3
= ((short int (*)(val
*))(var_2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_2
) /* is_ok on <var_2:Iterator[nullable Object]>*/;
955 var4
= ((val
* (*)(val
*))(var_2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_2
) /* item on <var_2:Iterator[nullable Object]>*/;
959 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(self
, var_i
) /* add on <self:SimpleCollection[nullable Object]>*/;
962 ((void (*)(val
*))(var_2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_2
) /* next on <var_2:Iterator[nullable Object]>*/;
968 BREAK_label
: (void)0;
970 { /* Inline abstract_collection#Iterator#finish (var_2) on <var_2:Iterator[nullable Object]> */
976 /* method abstract_collection#SimpleCollection#add_all for (self: Object, Collection[nullable Object]) */
977 void VIRTUAL_abstract_collection__SimpleCollection__add_all(val
* self
, val
* p0
) {
978 abstract_collection__SimpleCollection__add_all(self
, p0
); /* Direct call abstract_collection#SimpleCollection#add_all on <self:Object(SimpleCollection[nullable Object])>*/
981 /* method abstract_collection#Set#== for (self: Set[Object], nullable Object): Bool */
982 short int abstract_collection__Set___61d_61d(val
* self
, val
* p0
) {
983 short int var
/* : Bool */;
984 val
* var_other
/* var other: nullable Object */;
985 short int var1
/* : Bool */;
988 short int var2
/* : Bool */;
989 short int var3
/* : Bool */;
990 long var4
/* : Int */;
991 long var5
/* : Int */;
992 short int var6
/* : Bool */;
993 short int var7
/* : Bool */;
994 short int var9
/* : Bool */;
995 short int var10
/* : Bool */;
996 short int var11
/* : Bool */;
997 short int var12
/* : Bool */;
1000 const struct type
* type_struct
;
1001 const char* var_class_name
;
1002 short int var15
/* : Bool */;
1004 /* <var_other:nullable Object> isa Set[Object] */
1005 cltype
= type_abstract_collection__Setkernel__Object
.color
;
1006 idtype
= type_abstract_collection__Setkernel__Object
.id
;
1007 if(var_other
== NULL
) {
1010 if(cltype
>= var_other
->type
->table_size
) {
1013 var1
= var_other
->type
->type_table
[cltype
] == idtype
;
1024 var4
= ((long (*)(val
*))(var_other
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_other
) /* length on <var_other:nullable Object(Set[Object])>*/;
1027 var5
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Set[Object]>*/;
1030 { /* Inline kernel#Int#!= (var4,var5) on <var4:Int> */
1031 var9
= var4
== var5
;
1045 /* <var_other:nullable Object(Set[Object])> isa Collection[E] */
1046 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__Set_FT0
];
1047 cltype13
= type_struct
->color
;
1048 idtype14
= type_struct
->id
;
1049 if(cltype13
>= var_other
->type
->table_size
) {
1052 var12
= var_other
->type
->type_table
[cltype13
] == idtype14
;
1054 if (unlikely(!var12
)) {
1055 var_class_name
= var_other
== NULL ?
"null" : var_other
->type
->name
;
1056 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name
);
1057 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 311);
1061 var15
= abstract_collection__Collection__has_all(self
, var_other
);
1068 /* method abstract_collection#Set#== for (self: Object, nullable Object): Bool */
1069 short int VIRTUAL_abstract_collection__Set___61d_61d(val
* self
, val
* p0
) {
1070 short int var
/* : Bool */;
1071 short int var1
/* : Bool */;
1072 var1
= abstract_collection__Set___61d_61d(self
, p0
);
1077 /* method abstract_collection#Set#hash for (self: Set[Object]): Int */
1078 long abstract_collection__Set__hash(val
* self
) {
1079 long var
/* : Int */;
1080 long var1
/* : Int */;
1081 long var2
/* : Int */;
1082 long var3
/* : Int */;
1083 short int var5
/* : Bool */;
1086 const char* var_class_name
;
1087 long var6
/* : Int */;
1088 long var_res
/* var res: Int */;
1089 val
* var_
/* var : Set[Object] */;
1090 val
* var7
/* : Iterator[nullable Object] */;
1091 val
* var_8
/* var : Iterator[Object] */;
1092 short int var9
/* : Bool */;
1093 val
* var10
/* : nullable Object */;
1094 val
* var_e
/* var e: Object */;
1095 long var11
/* : Int */;
1096 long var12
/* : Int */;
1097 short int var14
/* : Bool */;
1100 const char* var_class_name17
;
1101 long var18
/* : Int */;
1104 var2
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Set[Object]>*/;
1107 { /* Inline kernel#Int#+ (var1,var2) on <var1:Int> */
1108 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
1109 /* <var2:Int> isa OTHER */
1110 var5
= 1; /* easy <var2:Int> isa OTHER*/
1111 if (unlikely(!var5
)) {
1112 var_class_name
= type_kernel__Int
.name
;
1113 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1114 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
1126 var7
= ((val
* (*)(val
*))(var_
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_
) /* iterator on <var_:Set[Object]>*/;
1131 var9
= ((short int (*)(val
*))(var_8
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_8
) /* is_ok on <var_8:Iterator[Object]>*/;
1135 var10
= ((val
* (*)(val
*))(var_8
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_8
) /* item on <var_8:Iterator[Object]>*/;
1139 var11
= ((long (*)(val
*))(var_e
->class->vft
[COLOR_kernel__Object__hash
]))(var_e
) /* hash on <var_e:Object>*/;
1142 { /* Inline kernel#Int#+ (var_res,var11) on <var_res:Int> */
1143 /* Covariant cast for argument 0 (i) <var11:Int> isa OTHER */
1144 /* <var11:Int> isa OTHER */
1145 var14
= 1; /* easy <var11:Int> isa OTHER*/
1146 if (unlikely(!var14
)) {
1147 var_class_name17
= type_kernel__Int
.name
;
1148 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name17
);
1149 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
1152 var18
= var_res
+ var11
;
1155 RET_LABEL13
:(void)0;
1160 ((void (*)(val
*))(var_8
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_8
) /* next on <var_8:Iterator[Object]>*/;
1166 BREAK_label
: (void)0;
1168 { /* Inline abstract_collection#Iterator#finish (var_8) on <var_8:Iterator[Object]> */
1169 RET_LABEL19
:(void)0;
1177 /* method abstract_collection#Set#hash for (self: Object): Int */
1178 long VIRTUAL_abstract_collection__Set__hash(val
* self
) {
1179 long var
/* : Int */;
1180 long var1
/* : Int */;
1181 var1
= abstract_collection__Set__hash(self
);
1186 /* method abstract_collection#MapRead#get_or_null for (self: MapRead[Object, nullable Object], Object): nullable Object */
1187 val
* abstract_collection__MapRead__get_or_null(val
* self
, val
* p0
) {
1188 val
* var
/* : nullable Object */;
1189 short int var1
/* : Bool */;
1192 const struct type
* type_struct
;
1193 const char* var_class_name
;
1194 val
* var_key
/* var key: Object */;
1195 short int var2
/* : Bool */;
1196 val
* var3
/* : nullable Object */;
1197 val
* var4
/* : null */;
1198 /* Covariant cast for argument 0 (key) <p0:Object> isa K */
1199 /* <p0:Object> isa K */
1200 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1201 cltype
= type_struct
->color
;
1202 idtype
= type_struct
->id
;
1203 if(cltype
>= p0
->type
->table_size
) {
1206 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1208 if (unlikely(!var1
)) {
1209 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1210 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
1211 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 358);
1216 var2
= abstract_collection__MapRead__has_key(self
, var_key
);
1220 var3
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(self
, var_key
) /* [] on <self:MapRead[Object, nullable Object]>*/;
1232 /* method abstract_collection#MapRead#get_or_null for (self: Object, Object): nullable Object */
1233 val
* VIRTUAL_abstract_collection__MapRead__get_or_null(val
* self
, val
* p0
) {
1234 val
* var
/* : nullable Object */;
1235 val
* var1
/* : nullable Object */;
1236 var1
= abstract_collection__MapRead__get_or_null(self
, p0
);
1241 /* method abstract_collection#MapRead#has_key for (self: MapRead[Object, nullable Object], Object): Bool */
1242 short int abstract_collection__MapRead__has_key(val
* self
, val
* p0
) {
1243 short int var
/* : Bool */;
1244 short int var1
/* : Bool */;
1247 const struct type
* type_struct
;
1248 const char* var_class_name
;
1249 val
* var_key
/* var key: Object */;
1250 val
* var2
/* : Collection[Object] */;
1251 short int var3
/* : Bool */;
1252 /* Covariant cast for argument 0 (key) <p0:Object> isa K */
1253 /* <p0:Object> isa K */
1254 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1255 cltype
= type_struct
->color
;
1256 idtype
= type_struct
->id
;
1257 if(cltype
>= p0
->type
->table_size
) {
1260 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1262 if (unlikely(!var1
)) {
1263 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1264 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
1265 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 385);
1270 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead__keys
]))(self
) /* keys on <self:MapRead[Object, nullable Object]>*/;
1273 var3
= ((short int (*)(val
*, val
*))(var2
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var2
, var_key
) /* has on <var2:Collection[Object]>*/;
1280 /* method abstract_collection#MapRead#has_key for (self: Object, Object): Bool */
1281 short int VIRTUAL_abstract_collection__MapRead__has_key(val
* self
, val
* p0
) {
1282 short int var
/* : Bool */;
1283 short int var1
/* : Bool */;
1284 var1
= abstract_collection__MapRead__has_key(self
, p0
);
1289 /* method abstract_collection#MapRead#provide_default_value for (self: MapRead[Object, nullable Object], Object): nullable Object */
1290 val
* abstract_collection__MapRead__provide_default_value(val
* self
, val
* p0
) {
1291 val
* var
/* : nullable Object */;
1292 short int var1
/* : Bool */;
1295 const struct type
* type_struct
;
1296 const char* var_class_name
;
1297 val
* var_key
/* var key: Object */;
1298 /* Covariant cast for argument 0 (key) <p0:Object> isa K */
1299 /* <p0:Object> isa K */
1300 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1301 cltype
= type_struct
->color
;
1302 idtype
= type_struct
->id
;
1303 if(cltype
>= p0
->type
->table_size
) {
1306 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1308 if (unlikely(!var1
)) {
1309 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1310 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
1311 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 429);
1315 PRINT_ERROR("Runtime error: %s", "Aborted");
1316 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 434);
1321 /* method abstract_collection#MapRead#provide_default_value for (self: Object, Object): nullable Object */
1322 val
* VIRTUAL_abstract_collection__MapRead__provide_default_value(val
* self
, val
* p0
) {
1323 val
* var
/* : nullable Object */;
1324 val
* var1
/* : nullable Object */;
1325 var1
= abstract_collection__MapRead__provide_default_value(self
, p0
);
1330 /* method abstract_collection#MapIterator#finish for (self: MapIterator[Object, nullable Object]) */
1331 void abstract_collection__MapIterator__finish(val
* self
) {
1334 /* method abstract_collection#MapIterator#finish for (self: Object) */
1335 void VIRTUAL_abstract_collection__MapIterator__finish(val
* self
) {
1336 { /* Inline abstract_collection#MapIterator#finish (self) on <self:Object(MapIterator[Object, nullable Object])> */
1341 /* method abstract_collection#MapKeysIterator#original_iterator for (self: MapKeysIterator[Object, nullable Object]): MapIterator[Object, nullable Object] */
1342 val
* abstract_collection__MapKeysIterator__original_iterator(val
* self
) {
1343 val
* var
/* : MapIterator[Object, nullable Object] */;
1344 val
* var1
/* : MapIterator[Object, nullable Object] */;
1345 var1
= self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
; /* _original_iterator on <self:MapKeysIterator[Object, nullable Object]> */
1346 if (unlikely(var1
== NULL
)) {
1347 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1348 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 554);
1355 /* method abstract_collection#MapKeysIterator#original_iterator for (self: Object): MapIterator[Object, nullable Object] */
1356 val
* VIRTUAL_abstract_collection__MapKeysIterator__original_iterator(val
* self
) {
1357 val
* var
/* : MapIterator[Object, nullable Object] */;
1358 val
* var1
/* : MapIterator[Object, nullable Object] */;
1359 val
* var3
/* : MapIterator[Object, nullable Object] */;
1360 { /* Inline abstract_collection#MapKeysIterator#original_iterator (self) on <self:Object(MapKeysIterator[Object, nullable Object])> */
1361 var3
= self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
; /* _original_iterator on <self:Object(MapKeysIterator[Object, nullable Object])> */
1362 if (unlikely(var3
== NULL
)) {
1363 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1364 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 554);
1374 /* method abstract_collection#MapKeysIterator#original_iterator= for (self: MapKeysIterator[Object, nullable Object], MapIterator[Object, nullable Object]) */
1375 void abstract_collection__MapKeysIterator__original_iterator_61d(val
* self
, val
* p0
) {
1376 short int var
/* : Bool */;
1379 const struct type
* type_struct
;
1380 const char* var_class_name
;
1381 /* Covariant cast for argument 0 (original_iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[K, V] */
1382 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[K, V] */
1383 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapKeysIterator_FT0abstract_collection__MapKeysIterator_FT1
];
1384 cltype
= type_struct
->color
;
1385 idtype
= type_struct
->id
;
1386 if(cltype
>= p0
->type
->table_size
) {
1389 var
= p0
->type
->type_table
[cltype
] == idtype
;
1391 if (unlikely(!var
)) {
1392 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1393 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[K, V]", var_class_name
);
1394 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 554);
1397 self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
= p0
; /* _original_iterator on <self:MapKeysIterator[Object, nullable Object]> */
1400 /* method abstract_collection#MapKeysIterator#original_iterator= for (self: Object, MapIterator[Object, nullable Object]) */
1401 void VIRTUAL_abstract_collection__MapKeysIterator__original_iterator_61d(val
* self
, val
* p0
) {
1402 short int var
/* : Bool */;
1405 const struct type
* type_struct
;
1406 const char* var_class_name
;
1407 { /* Inline abstract_collection#MapKeysIterator#original_iterator= (self,p0) on <self:Object(MapKeysIterator[Object, nullable Object])> */
1408 /* Covariant cast for argument 0 (original_iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[K, V] */
1409 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[K, V] */
1410 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapKeysIterator_FT0abstract_collection__MapKeysIterator_FT1
];
1411 cltype
= type_struct
->color
;
1412 idtype
= type_struct
->id
;
1413 if(cltype
>= p0
->type
->table_size
) {
1416 var
= p0
->type
->type_table
[cltype
] == idtype
;
1418 if (unlikely(!var
)) {
1419 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1420 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[K, V]", var_class_name
);
1421 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 554);
1424 self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
= p0
; /* _original_iterator on <self:Object(MapKeysIterator[Object, nullable Object])> */
1429 /* method abstract_collection#MapKeysIterator#is_ok for (self: MapKeysIterator[Object, nullable Object]): Bool */
1430 short int abstract_collection__MapKeysIterator__is_ok(val
* self
) {
1431 short int var
/* : Bool */;
1432 val
* var1
/* : MapIterator[Object, nullable Object] */;
1433 val
* var3
/* : MapIterator[Object, nullable Object] */;
1434 short int var4
/* : Bool */;
1436 { /* Inline abstract_collection#MapKeysIterator#original_iterator (self) on <self:MapKeysIterator[Object, nullable Object]> */
1437 var3
= self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
; /* _original_iterator on <self:MapKeysIterator[Object, nullable Object]> */
1438 if (unlikely(var3
== NULL
)) {
1439 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1440 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 554);
1448 var4
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(var1
) /* is_ok on <var1:MapIterator[Object, nullable Object]>*/;
1455 /* method abstract_collection#MapKeysIterator#is_ok for (self: Object): Bool */
1456 short int VIRTUAL_abstract_collection__MapKeysIterator__is_ok(val
* self
) {
1457 short int var
/* : Bool */;
1458 short int var1
/* : Bool */;
1459 var1
= abstract_collection__MapKeysIterator__is_ok(self
);
1464 /* method abstract_collection#MapKeysIterator#next for (self: MapKeysIterator[Object, nullable Object]) */
1465 void abstract_collection__MapKeysIterator__next(val
* self
) {
1466 val
* var
/* : MapIterator[Object, nullable Object] */;
1467 val
* var2
/* : MapIterator[Object, nullable Object] */;
1469 { /* Inline abstract_collection#MapKeysIterator#original_iterator (self) on <self:MapKeysIterator[Object, nullable Object]> */
1470 var2
= self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
; /* _original_iterator on <self:MapKeysIterator[Object, nullable Object]> */
1471 if (unlikely(var2
== NULL
)) {
1472 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1473 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 554);
1481 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__MapIterator__next
]))(var
) /* next on <var:MapIterator[Object, nullable Object]>*/;
1485 /* method abstract_collection#MapKeysIterator#next for (self: Object) */
1486 void VIRTUAL_abstract_collection__MapKeysIterator__next(val
* self
) {
1487 abstract_collection__MapKeysIterator__next(self
); /* Direct call abstract_collection#MapKeysIterator#next on <self:Object(MapKeysIterator[Object, nullable Object])>*/
1490 /* method abstract_collection#MapKeysIterator#item for (self: MapKeysIterator[Object, nullable Object]): Object */
1491 val
* abstract_collection__MapKeysIterator__item(val
* self
) {
1492 val
* var
/* : Object */;
1493 val
* var1
/* : MapIterator[Object, nullable Object] */;
1494 val
* var3
/* : MapIterator[Object, nullable Object] */;
1495 val
* var4
/* : Object */;
1497 { /* Inline abstract_collection#MapKeysIterator#original_iterator (self) on <self:MapKeysIterator[Object, nullable Object]> */
1498 var3
= self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
; /* _original_iterator on <self:MapKeysIterator[Object, nullable Object]> */
1499 if (unlikely(var3
== NULL
)) {
1500 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1501 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 554);
1509 var4
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__key
]))(var1
) /* key on <var1:MapIterator[Object, nullable Object]>*/;
1516 /* method abstract_collection#MapKeysIterator#item for (self: Object): nullable Object */
1517 val
* VIRTUAL_abstract_collection__MapKeysIterator__item(val
* self
) {
1518 val
* var
/* : nullable Object */;
1519 val
* var1
/* : Object */;
1520 var1
= abstract_collection__MapKeysIterator__item(self
);
1525 /* method abstract_collection#MapKeysIterator#init for (self: MapKeysIterator[Object, nullable Object]) */
1526 void abstract_collection__MapKeysIterator__init(val
* self
) {
1528 ((void (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapKeysIterator__init
]))(self
) /* init on <self:MapKeysIterator[Object, nullable Object]>*/;
1532 /* method abstract_collection#MapKeysIterator#init for (self: Object) */
1533 void VIRTUAL_abstract_collection__MapKeysIterator__init(val
* self
) {
1534 { /* Inline abstract_collection#MapKeysIterator#init (self) on <self:Object(MapKeysIterator[Object, nullable Object])> */
1536 ((void (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapKeysIterator__init
]))(self
) /* init on <self:Object(MapKeysIterator[Object, nullable Object])>*/;
1542 /* method abstract_collection#MapValuesIterator#original_iterator for (self: MapValuesIterator[Object, nullable Object]): MapIterator[Object, nullable Object] */
1543 val
* abstract_collection__MapValuesIterator__original_iterator(val
* self
) {
1544 val
* var
/* : MapIterator[Object, nullable Object] */;
1545 val
* var1
/* : MapIterator[Object, nullable Object] */;
1546 var1
= self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
; /* _original_iterator on <self:MapValuesIterator[Object, nullable Object]> */
1547 if (unlikely(var1
== NULL
)) {
1548 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1549 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 565);
1556 /* method abstract_collection#MapValuesIterator#original_iterator for (self: Object): MapIterator[Object, nullable Object] */
1557 val
* VIRTUAL_abstract_collection__MapValuesIterator__original_iterator(val
* self
) {
1558 val
* var
/* : MapIterator[Object, nullable Object] */;
1559 val
* var1
/* : MapIterator[Object, nullable Object] */;
1560 val
* var3
/* : MapIterator[Object, nullable Object] */;
1561 { /* Inline abstract_collection#MapValuesIterator#original_iterator (self) on <self:Object(MapValuesIterator[Object, nullable Object])> */
1562 var3
= self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
; /* _original_iterator on <self:Object(MapValuesIterator[Object, nullable Object])> */
1563 if (unlikely(var3
== NULL
)) {
1564 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1565 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 565);
1575 /* method abstract_collection#MapValuesIterator#original_iterator= for (self: MapValuesIterator[Object, nullable Object], MapIterator[Object, nullable Object]) */
1576 void abstract_collection__MapValuesIterator__original_iterator_61d(val
* self
, val
* p0
) {
1577 short int var
/* : Bool */;
1580 const struct type
* type_struct
;
1581 const char* var_class_name
;
1582 /* Covariant cast for argument 0 (original_iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[K, V] */
1583 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[K, V] */
1584 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapValuesIterator_FT0abstract_collection__MapValuesIterator_FT1
];
1585 cltype
= type_struct
->color
;
1586 idtype
= type_struct
->id
;
1587 if(cltype
>= p0
->type
->table_size
) {
1590 var
= p0
->type
->type_table
[cltype
] == idtype
;
1592 if (unlikely(!var
)) {
1593 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1594 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[K, V]", var_class_name
);
1595 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 565);
1598 self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
= p0
; /* _original_iterator on <self:MapValuesIterator[Object, nullable Object]> */
1601 /* method abstract_collection#MapValuesIterator#original_iterator= for (self: Object, MapIterator[Object, nullable Object]) */
1602 void VIRTUAL_abstract_collection__MapValuesIterator__original_iterator_61d(val
* self
, val
* p0
) {
1603 short int var
/* : Bool */;
1606 const struct type
* type_struct
;
1607 const char* var_class_name
;
1608 { /* Inline abstract_collection#MapValuesIterator#original_iterator= (self,p0) on <self:Object(MapValuesIterator[Object, nullable Object])> */
1609 /* Covariant cast for argument 0 (original_iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[K, V] */
1610 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[K, V] */
1611 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapValuesIterator_FT0abstract_collection__MapValuesIterator_FT1
];
1612 cltype
= type_struct
->color
;
1613 idtype
= type_struct
->id
;
1614 if(cltype
>= p0
->type
->table_size
) {
1617 var
= p0
->type
->type_table
[cltype
] == idtype
;
1619 if (unlikely(!var
)) {
1620 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1621 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[K, V]", var_class_name
);
1622 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 565);
1625 self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
= p0
; /* _original_iterator on <self:Object(MapValuesIterator[Object, nullable Object])> */
1630 /* method abstract_collection#MapValuesIterator#is_ok for (self: MapValuesIterator[Object, nullable Object]): Bool */
1631 short int abstract_collection__MapValuesIterator__is_ok(val
* self
) {
1632 short int var
/* : Bool */;
1633 val
* var1
/* : MapIterator[Object, nullable Object] */;
1634 val
* var3
/* : MapIterator[Object, nullable Object] */;
1635 short int var4
/* : Bool */;
1637 { /* Inline abstract_collection#MapValuesIterator#original_iterator (self) on <self:MapValuesIterator[Object, nullable Object]> */
1638 var3
= self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
; /* _original_iterator on <self:MapValuesIterator[Object, nullable Object]> */
1639 if (unlikely(var3
== NULL
)) {
1640 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1641 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 565);
1649 var4
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(var1
) /* is_ok on <var1:MapIterator[Object, nullable Object]>*/;
1656 /* method abstract_collection#MapValuesIterator#is_ok for (self: Object): Bool */
1657 short int VIRTUAL_abstract_collection__MapValuesIterator__is_ok(val
* self
) {
1658 short int var
/* : Bool */;
1659 short int var1
/* : Bool */;
1660 var1
= abstract_collection__MapValuesIterator__is_ok(self
);
1665 /* method abstract_collection#MapValuesIterator#next for (self: MapValuesIterator[Object, nullable Object]) */
1666 void abstract_collection__MapValuesIterator__next(val
* self
) {
1667 val
* var
/* : MapIterator[Object, nullable Object] */;
1668 val
* var2
/* : MapIterator[Object, nullable Object] */;
1670 { /* Inline abstract_collection#MapValuesIterator#original_iterator (self) on <self:MapValuesIterator[Object, nullable Object]> */
1671 var2
= self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
; /* _original_iterator on <self:MapValuesIterator[Object, nullable Object]> */
1672 if (unlikely(var2
== NULL
)) {
1673 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1674 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 565);
1682 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__MapIterator__next
]))(var
) /* next on <var:MapIterator[Object, nullable Object]>*/;
1686 /* method abstract_collection#MapValuesIterator#next for (self: Object) */
1687 void VIRTUAL_abstract_collection__MapValuesIterator__next(val
* self
) {
1688 abstract_collection__MapValuesIterator__next(self
); /* Direct call abstract_collection#MapValuesIterator#next on <self:Object(MapValuesIterator[Object, nullable Object])>*/
1691 /* method abstract_collection#MapValuesIterator#item for (self: MapValuesIterator[Object, nullable Object]): nullable Object */
1692 val
* abstract_collection__MapValuesIterator__item(val
* self
) {
1693 val
* var
/* : nullable Object */;
1694 val
* var1
/* : MapIterator[Object, nullable Object] */;
1695 val
* var3
/* : MapIterator[Object, nullable Object] */;
1696 val
* var4
/* : nullable Object */;
1698 { /* Inline abstract_collection#MapValuesIterator#original_iterator (self) on <self:MapValuesIterator[Object, nullable Object]> */
1699 var3
= self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
; /* _original_iterator on <self:MapValuesIterator[Object, nullable Object]> */
1700 if (unlikely(var3
== NULL
)) {
1701 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1702 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 565);
1710 var4
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__item
]))(var1
) /* item on <var1:MapIterator[Object, nullable Object]>*/;
1717 /* method abstract_collection#MapValuesIterator#item for (self: Object): nullable Object */
1718 val
* VIRTUAL_abstract_collection__MapValuesIterator__item(val
* self
) {
1719 val
* var
/* : nullable Object */;
1720 val
* var1
/* : nullable Object */;
1721 var1
= abstract_collection__MapValuesIterator__item(self
);
1726 /* method abstract_collection#MapValuesIterator#init for (self: MapValuesIterator[Object, nullable Object]) */
1727 void abstract_collection__MapValuesIterator__init(val
* self
) {
1729 ((void (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapValuesIterator__init
]))(self
) /* init on <self:MapValuesIterator[Object, nullable Object]>*/;
1733 /* method abstract_collection#MapValuesIterator#init for (self: Object) */
1734 void VIRTUAL_abstract_collection__MapValuesIterator__init(val
* self
) {
1735 { /* Inline abstract_collection#MapValuesIterator#init (self) on <self:Object(MapValuesIterator[Object, nullable Object])> */
1737 ((void (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapValuesIterator__init
]))(self
) /* init on <self:Object(MapValuesIterator[Object, nullable Object])>*/;
1743 /* method abstract_collection#SequenceRead#first for (self: SequenceRead[nullable Object]): nullable Object */
1744 val
* abstract_collection__SequenceRead__first(val
* self
) {
1745 val
* var
/* : nullable Object */;
1746 short int var1
/* : Bool */;
1747 short int var2
/* : Bool */;
1748 long var3
/* : Int */;
1749 val
* var4
/* : nullable Object */;
1751 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(self
) /* is_empty on <self:SequenceRead[nullable Object]>*/;
1754 if (unlikely(!var2
)) {
1755 PRINT_ERROR("Runtime error: %s", "Assert \'not_empty\' failed");
1756 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 590);
1761 var4
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var3
) /* [] on <self:SequenceRead[nullable Object]>*/;
1768 /* method abstract_collection#SequenceRead#first for (self: Object): nullable Object */
1769 val
* VIRTUAL_abstract_collection__SequenceRead__first(val
* self
) {
1770 val
* var
/* : nullable Object */;
1771 val
* var1
/* : nullable Object */;
1772 var1
= abstract_collection__SequenceRead__first(self
);
1777 /* method abstract_collection#SequenceRead#last for (self: SequenceRead[nullable Object]): nullable Object */
1778 val
* abstract_collection__SequenceRead__last(val
* self
) {
1779 val
* var
/* : nullable Object */;
1780 short int var1
/* : Bool */;
1781 short int var2
/* : Bool */;
1782 long var3
/* : Int */;
1783 long var4
/* : Int */;
1784 long var5
/* : Int */;
1785 short int var7
/* : Bool */;
1788 const char* var_class_name
;
1789 long var8
/* : Int */;
1790 val
* var9
/* : nullable Object */;
1792 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(self
) /* is_empty on <self:SequenceRead[nullable Object]>*/;
1795 if (unlikely(!var2
)) {
1796 PRINT_ERROR("Runtime error: %s", "Assert \'not_empty\' failed");
1797 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 615);
1801 var3
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:SequenceRead[nullable Object]>*/;
1805 { /* Inline kernel#Int#- (var3,var4) on <var3:Int> */
1806 /* Covariant cast for argument 0 (i) <var4:Int> isa OTHER */
1807 /* <var4:Int> isa OTHER */
1808 var7
= 1; /* easy <var4:Int> isa OTHER*/
1809 if (unlikely(!var7
)) {
1810 var_class_name
= type_kernel__Int
.name
;
1811 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1812 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 377);
1822 var9
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var5
) /* [] on <self:SequenceRead[nullable Object]>*/;
1829 /* method abstract_collection#SequenceRead#last for (self: Object): nullable Object */
1830 val
* VIRTUAL_abstract_collection__SequenceRead__last(val
* self
) {
1831 val
* var
/* : nullable Object */;
1832 val
* var1
/* : nullable Object */;
1833 var1
= abstract_collection__SequenceRead__last(self
);
1838 /* method abstract_collection#SequenceRead#index_of for (self: SequenceRead[nullable Object], nullable Object): Int */
1839 long abstract_collection__SequenceRead__index_of(val
* self
, val
* p0
) {
1840 long var
/* : Int */;
1841 short int var1
/* : Bool */;
1844 const struct type
* type_struct
;
1845 short int is_nullable
;
1846 const char* var_class_name
;
1847 val
* var_item
/* var item: nullable Object */;
1848 long var2
/* : Int */;
1849 long var3
/* : Int */;
1850 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
1851 /* <p0:nullable Object> isa E */
1852 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SequenceRead_FT0
];
1853 cltype
= type_struct
->color
;
1854 idtype
= type_struct
->id
;
1855 is_nullable
= type_struct
->is_nullable
;
1859 if(cltype
>= p0
->type
->table_size
) {
1862 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1865 if (unlikely(!var1
)) {
1866 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1867 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
1868 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 619);
1874 var3
= ((long (*)(val
*, val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead__index_of_from
]))(self
, var_item
, var2
) /* index_of_from on <self:SequenceRead[nullable Object]>*/;
1881 /* method abstract_collection#SequenceRead#index_of for (self: Object, nullable Object): Int */
1882 long VIRTUAL_abstract_collection__SequenceRead__index_of(val
* self
, val
* p0
) {
1883 long var
/* : Int */;
1884 long var1
/* : Int */;
1885 var1
= abstract_collection__SequenceRead__index_of(self
, p0
);
1890 /* method abstract_collection#SequenceRead#last_index_of for (self: SequenceRead[nullable Object], nullable Object): Int */
1891 long abstract_collection__SequenceRead__last_index_of(val
* self
, val
* p0
) {
1892 long var
/* : Int */;
1893 short int var1
/* : Bool */;
1896 const struct type
* type_struct
;
1897 short int is_nullable
;
1898 const char* var_class_name
;
1899 val
* var_item
/* var item: nullable Object */;
1900 long var2
/* : Int */;
1901 long var3
/* : Int */;
1902 long var4
/* : Int */;
1903 short int var6
/* : Bool */;
1906 const char* var_class_name9
;
1907 long var10
/* : Int */;
1908 long var11
/* : Int */;
1909 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
1910 /* <p0:nullable Object> isa E */
1911 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SequenceRead_FT0
];
1912 cltype
= type_struct
->color
;
1913 idtype
= type_struct
->id
;
1914 is_nullable
= type_struct
->is_nullable
;
1918 if(cltype
>= p0
->type
->table_size
) {
1921 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1924 if (unlikely(!var1
)) {
1925 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1926 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
1927 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 628);
1932 var2
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:SequenceRead[nullable Object]>*/;
1936 { /* Inline kernel#Int#- (var2,var3) on <var2:Int> */
1937 /* Covariant cast for argument 0 (i) <var3:Int> isa OTHER */
1938 /* <var3:Int> isa OTHER */
1939 var6
= 1; /* easy <var3:Int> isa OTHER*/
1940 if (unlikely(!var6
)) {
1941 var_class_name9
= type_kernel__Int
.name
;
1942 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name9
);
1943 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 377);
1946 var10
= var2
- var3
;
1953 var11
= ((long (*)(val
*, val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead__last_index_of_from
]))(self
, var_item
, var4
) /* last_index_of_from on <self:SequenceRead[nullable Object]>*/;
1960 /* method abstract_collection#SequenceRead#last_index_of for (self: Object, nullable Object): Int */
1961 long VIRTUAL_abstract_collection__SequenceRead__last_index_of(val
* self
, val
* p0
) {
1962 long var
/* : Int */;
1963 long var1
/* : Int */;
1964 var1
= abstract_collection__SequenceRead__last_index_of(self
, p0
);
1969 /* method abstract_collection#SequenceRead#index_of_from for (self: SequenceRead[nullable Object], nullable Object, Int): Int */
1970 long abstract_collection__SequenceRead__index_of_from(val
* self
, val
* p0
, long p1
) {
1971 long var
/* : Int */;
1972 short int var1
/* : Bool */;
1975 const struct type
* type_struct
;
1976 short int is_nullable
;
1977 const char* var_class_name
;
1978 val
* var_item
/* var item: nullable Object */;
1979 long var_pos
/* var pos: Int */;
1980 long var2
/* : Int */;
1981 long var_p
/* var p: Int */;
1982 val
* var3
/* : Iterator[nullable Object] */;
1983 val
* var_i
/* var i: IndexedIterator[nullable Object] */;
1984 short int var4
/* : Bool */;
1985 short int var5
/* : Bool */;
1986 short int var6
/* : Bool */;
1987 short int var8
/* : Bool */;
1990 const char* var_class_name11
;
1991 short int var12
/* : Bool */;
1992 short int var_
/* var : Bool */;
1993 val
* var13
/* : nullable Object */;
1994 short int var14
/* : Bool */;
1995 short int var15
/* : Bool */;
1996 long var16
/* : Int */;
1997 long var17
/* : Int */;
1998 long var18
/* : Int */;
1999 short int var20
/* : Bool */;
2002 const char* var_class_name23
;
2003 long var24
/* : Int */;
2004 long var25
/* : Int */;
2005 long var26
/* : Int */;
2006 long var28
/* : Int */;
2007 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
2008 /* <p0:nullable Object> isa E */
2009 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SequenceRead_FT0
];
2010 cltype
= type_struct
->color
;
2011 idtype
= type_struct
->id
;
2012 is_nullable
= type_struct
->is_nullable
;
2016 if(cltype
>= p0
->type
->table_size
) {
2019 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2022 if (unlikely(!var1
)) {
2023 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2024 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
2025 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 637);
2033 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:SequenceRead[nullable Object]>*/;
2038 var4
= ((short int (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_i
) /* is_ok on <var_i:IndexedIterator[nullable Object]>*/;
2042 { /* Inline kernel#Int#>= (var_p,var_pos) on <var_p:Int> */
2043 /* Covariant cast for argument 0 (i) <var_pos:Int> isa OTHER */
2044 /* <var_pos:Int> isa OTHER */
2045 var8
= 1; /* easy <var_pos:Int> isa OTHER*/
2046 if (unlikely(!var8
)) {
2047 var_class_name11
= type_kernel__Int
.name
;
2048 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name11
);
2049 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 372);
2052 var12
= var_p
>= var_pos
;
2061 var13
= ((val
* (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_i
) /* item on <var_i:IndexedIterator[nullable Object]>*/;
2063 if (var13
== NULL
) {
2064 var14
= (var_item
== NULL
);
2066 var15
= ((short int (*)(val
*, val
*))(var13
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var13
, var_item
) /* == on <var13:nullable Object>*/;
2075 var16
= ((long (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__IndexedIterator__index
]))(var_i
) /* index on <var_i:IndexedIterator[nullable Object]>*/;
2082 ((void (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_i
) /* next on <var_i:IndexedIterator[nullable Object]>*/;
2086 { /* Inline kernel#Int#+ (var_p,var17) on <var_p:Int> */
2087 /* Covariant cast for argument 0 (i) <var17:Int> isa OTHER */
2088 /* <var17:Int> isa OTHER */
2089 var20
= 1; /* easy <var17:Int> isa OTHER*/
2090 if (unlikely(!var20
)) {
2091 var_class_name23
= type_kernel__Int
.name
;
2092 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name23
);
2093 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
2096 var24
= var_p
+ var17
;
2099 RET_LABEL19
:(void)0;
2107 BREAK_label
: (void)0;
2110 { /* Inline kernel#Int#unary - (var25) on <var25:Int> */
2114 RET_LABEL27
:(void)0;
2122 /* method abstract_collection#SequenceRead#index_of_from for (self: Object, nullable Object, Int): Int */
2123 long VIRTUAL_abstract_collection__SequenceRead__index_of_from(val
* self
, val
* p0
, long p1
) {
2124 long var
/* : Int */;
2125 long var1
/* : Int */;
2126 var1
= abstract_collection__SequenceRead__index_of_from(self
, p0
, p1
);
2131 /* method abstract_collection#SequenceRead#last_index_of_from for (self: SequenceRead[nullable Object], nullable Object, Int): Int */
2132 long abstract_collection__SequenceRead__last_index_of_from(val
* self
, val
* p0
, long p1
) {
2133 long var
/* : Int */;
2134 short int var1
/* : Bool */;
2137 const struct type
* type_struct
;
2138 short int is_nullable
;
2139 const char* var_class_name
;
2140 val
* var_item
/* var item: nullable Object */;
2141 long var_pos
/* var pos: Int */;
2142 long var2
/* : Int */;
2143 long var3
/* : Int */;
2144 long var5
/* : Int */;
2145 long var_res
/* var res: Int */;
2146 long var6
/* : Int */;
2147 long var_p
/* var p: Int */;
2148 val
* var7
/* : Iterator[nullable Object] */;
2149 val
* var_i
/* var i: IndexedIterator[nullable Object] */;
2150 short int var8
/* : Bool */;
2151 short int var9
/* : Bool */;
2152 short int var11
/* : Bool */;
2155 const char* var_class_name14
;
2156 short int var15
/* : Bool */;
2157 val
* var16
/* : nullable Object */;
2158 short int var17
/* : Bool */;
2159 short int var18
/* : Bool */;
2160 long var19
/* : Int */;
2161 long var20
/* : Int */;
2162 short int var22
/* : Bool */;
2165 const char* var_class_name25
;
2166 long var26
/* : Int */;
2167 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
2168 /* <p0:nullable Object> isa E */
2169 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SequenceRead_FT0
];
2170 cltype
= type_struct
->color
;
2171 idtype
= type_struct
->id
;
2172 is_nullable
= type_struct
->is_nullable
;
2176 if(cltype
>= p0
->type
->table_size
) {
2179 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2182 if (unlikely(!var1
)) {
2183 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2184 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
2185 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 657);
2192 { /* Inline kernel#Int#unary - (var2) on <var2:Int> */
2203 var7
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:SequenceRead[nullable Object]>*/;
2208 var8
= ((short int (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_i
) /* is_ok on <var_i:IndexedIterator[nullable Object]>*/;
2212 { /* Inline kernel#Int#> (var_p,var_pos) on <var_p:Int> */
2213 /* Covariant cast for argument 0 (i) <var_pos:Int> isa OTHER */
2214 /* <var_pos:Int> isa OTHER */
2215 var11
= 1; /* easy <var_pos:Int> isa OTHER*/
2216 if (unlikely(!var11
)) {
2217 var_class_name14
= type_kernel__Int
.name
;
2218 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name14
);
2219 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 373);
2222 var15
= var_p
> var_pos
;
2225 RET_LABEL10
:(void)0;
2233 var16
= ((val
* (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_i
) /* item on <var_i:IndexedIterator[nullable Object]>*/;
2235 if (var16
== NULL
) {
2236 var17
= (var_item
== NULL
);
2238 var18
= ((short int (*)(val
*, val
*))(var16
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var16
, var_item
) /* == on <var16:nullable Object>*/;
2246 ((void (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_i
) /* next on <var_i:IndexedIterator[nullable Object]>*/;
2250 { /* Inline kernel#Int#+ (var_p,var19) on <var_p:Int> */
2251 /* Covariant cast for argument 0 (i) <var19:Int> isa OTHER */
2252 /* <var19:Int> isa OTHER */
2253 var22
= 1; /* easy <var19:Int> isa OTHER*/
2254 if (unlikely(!var22
)) {
2255 var_class_name25
= type_kernel__Int
.name
;
2256 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name25
);
2257 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
2260 var26
= var_p
+ var19
;
2263 RET_LABEL21
:(void)0;
2271 BREAK_label
: (void)0;
2277 /* method abstract_collection#SequenceRead#last_index_of_from for (self: Object, nullable Object, Int): Int */
2278 long VIRTUAL_abstract_collection__SequenceRead__last_index_of_from(val
* self
, val
* p0
, long p1
) {
2279 long var
/* : Int */;
2280 long var1
/* : Int */;
2281 var1
= abstract_collection__SequenceRead__last_index_of_from(self
, p0
, p1
);
2286 /* method abstract_collection#SequenceRead#== for (self: SequenceRead[nullable Object], nullable Object): Bool */
2287 short int abstract_collection__SequenceRead___61d_61d(val
* self
, val
* p0
) {
2288 short int var
/* : Bool */;
2289 val
* var_o
/* var o: nullable Object */;
2290 short int var1
/* : Bool */;
2293 short int var2
/* : Bool */;
2294 short int var3
/* : Bool */;
2295 long var4
/* : Int */;
2296 long var_l
/* var l: Int */;
2297 long var5
/* : Int */;
2298 short int var6
/* : Bool */;
2299 short int var7
/* : Bool */;
2300 short int var9
/* : Bool */;
2301 short int var10
/* : Bool */;
2302 short int var11
/* : Bool */;
2303 long var12
/* : Int */;
2304 long var_i
/* var i: Int */;
2305 short int var13
/* : Bool */;
2306 short int var15
/* : Bool */;
2309 const char* var_class_name
;
2310 short int var18
/* : Bool */;
2311 val
* var19
/* : nullable Object */;
2312 val
* var20
/* : nullable Object */;
2313 short int var21
/* : Bool */;
2314 short int var22
/* : Bool */;
2315 short int var23
/* : Bool */;
2316 long var24
/* : Int */;
2317 long var25
/* : Int */;
2318 short int var27
/* : Bool */;
2321 const char* var_class_name30
;
2322 long var31
/* : Int */;
2323 short int var32
/* : Bool */;
2325 /* <var_o:nullable Object> isa SequenceRead[nullable Object] */
2326 cltype
= type_abstract_collection__SequenceReadnullable_kernel__Object
.color
;
2327 idtype
= type_abstract_collection__SequenceReadnullable_kernel__Object
.id
;
2331 if(cltype
>= var_o
->type
->table_size
) {
2334 var1
= var_o
->type
->type_table
[cltype
] == idtype
;
2345 var4
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:SequenceRead[nullable Object]>*/;
2349 var5
= ((long (*)(val
*))(var_o
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_o
) /* length on <var_o:nullable Object(SequenceRead[nullable Object])>*/;
2352 { /* Inline kernel#Int#!= (var5,var_l) on <var5:Int> */
2353 var9
= var5
== var_l
;
2371 { /* Inline kernel#Int#< (var_i,var_l) on <var_i:Int> */
2372 /* Covariant cast for argument 0 (i) <var_l:Int> isa OTHER */
2373 /* <var_l:Int> isa OTHER */
2374 var15
= 1; /* easy <var_l:Int> isa OTHER*/
2375 if (unlikely(!var15
)) {
2376 var_class_name
= type_kernel__Int
.name
;
2377 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2378 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 371);
2381 var18
= var_i
< var_l
;
2384 RET_LABEL14
:(void)0;
2389 var19
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var_i
) /* [] on <self:SequenceRead[nullable Object]>*/;
2392 var20
= ((val
* (*)(val
*, long))(var_o
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(var_o
, var_i
) /* [] on <var_o:nullable Object(SequenceRead[nullable Object])>*/;
2394 if (var19
== NULL
) {
2395 var21
= (var20
!= NULL
);
2397 var22
= ((short int (*)(val
*, val
*))(var19
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var19
, var20
) /* != on <var19:nullable Object>*/;
2408 { /* Inline kernel#Int#+ (var_i,var24) on <var_i:Int> */
2409 /* Covariant cast for argument 0 (i) <var24:Int> isa OTHER */
2410 /* <var24:Int> isa OTHER */
2411 var27
= 1; /* easy <var24:Int> isa OTHER*/
2412 if (unlikely(!var27
)) {
2413 var_class_name30
= type_kernel__Int
.name
;
2414 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name30
);
2415 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
2418 var31
= var_i
+ var24
;
2421 RET_LABEL26
:(void)0;
2429 BREAK_label
: (void)0;
2436 /* method abstract_collection#SequenceRead#== for (self: Object, nullable Object): Bool */
2437 short int VIRTUAL_abstract_collection__SequenceRead___61d_61d(val
* self
, val
* p0
) {
2438 short int var
/* : Bool */;
2439 short int var1
/* : Bool */;
2440 var1
= abstract_collection__SequenceRead___61d_61d(self
, p0
);
2445 /* method abstract_collection#SequenceRead#hash for (self: SequenceRead[nullable Object]): Int */
2446 long abstract_collection__SequenceRead__hash(val
* self
) {
2447 long var
/* : Int */;
2448 long var1
/* : Int */;
2449 long var2
/* : Int */;
2450 long var3
/* : Int */;
2451 short int var5
/* : Bool */;
2454 const char* var_class_name
;
2455 long var6
/* : Int */;
2456 long var_res
/* var res: Int */;
2457 val
* var_
/* var : SequenceRead[nullable Object] */;
2458 val
* var7
/* : Iterator[nullable Object] */;
2459 val
* var_8
/* var : IndexedIterator[nullable Object] */;
2460 short int var9
/* : Bool */;
2461 val
* var10
/* : nullable Object */;
2462 val
* var_e
/* var e: nullable Object */;
2463 long var11
/* : Int */;
2464 long var12
/* : Int */;
2465 short int var14
/* : Bool */;
2468 const char* var_class_name17
;
2469 long var18
/* : Int */;
2470 long var19
/* : Int */;
2471 long var20
/* : Int */;
2472 short int var22
/* : Bool */;
2475 const char* var_class_name25
;
2476 long var26
/* : Int */;
2477 val
* var27
/* : null */;
2478 short int var28
/* : Bool */;
2479 short int var29
/* : Bool */;
2480 long var30
/* : Int */;
2481 long var31
/* : Int */;
2482 short int var33
/* : Bool */;
2485 const char* var_class_name36
;
2486 long var37
/* : Int */;
2489 var2
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:SequenceRead[nullable Object]>*/;
2492 { /* Inline kernel#Int#+ (var1,var2) on <var1:Int> */
2493 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
2494 /* <var2:Int> isa OTHER */
2495 var5
= 1; /* easy <var2:Int> isa OTHER*/
2496 if (unlikely(!var5
)) {
2497 var_class_name
= type_kernel__Int
.name
;
2498 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2499 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
2511 var7
= ((val
* (*)(val
*))(var_
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_
) /* iterator on <var_:SequenceRead[nullable Object]>*/;
2516 var9
= ((short int (*)(val
*))(var_8
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_8
) /* is_ok on <var_8:IndexedIterator[nullable Object]>*/;
2520 var10
= ((val
* (*)(val
*))(var_8
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_8
) /* item on <var_8:IndexedIterator[nullable Object]>*/;
2525 { /* Inline kernel#Int#* (var_res,var11) on <var_res:Int> */
2526 /* Covariant cast for argument 0 (i) <var11:Int> isa OTHER */
2527 /* <var11:Int> isa OTHER */
2528 var14
= 1; /* easy <var11:Int> isa OTHER*/
2529 if (unlikely(!var14
)) {
2530 var_class_name17
= type_kernel__Int
.name
;
2531 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name17
);
2532 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 378);
2535 var18
= var_res
* var11
;
2538 RET_LABEL13
:(void)0;
2543 { /* Inline kernel#Int#/ (var12,var19) on <var12:Int> */
2544 /* Covariant cast for argument 0 (i) <var19:Int> isa OTHER */
2545 /* <var19:Int> isa OTHER */
2546 var22
= 1; /* easy <var19:Int> isa OTHER*/
2547 if (unlikely(!var22
)) {
2548 var_class_name25
= type_kernel__Int
.name
;
2549 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name25
);
2550 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 379);
2553 var26
= var12
/ var19
;
2556 RET_LABEL21
:(void)0;
2561 if (var_e
== NULL
) {
2562 var28
= 0; /* is null */
2564 var28
= 1; /* arg is null and recv is not */
2567 var29
= ((short int (*)(val
*, val
*))(var_e
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var_e
, var27
) /* != on <var_e:nullable Object>*/;
2571 if (var_e
== NULL
) {
2572 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2573 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 709);
2576 var30
= ((long (*)(val
*))(var_e
->class->vft
[COLOR_kernel__Object__hash
]))(var_e
) /* hash on <var_e:nullable Object>*/;
2579 { /* Inline kernel#Int#+ (var_res,var30) on <var_res:Int> */
2580 /* Covariant cast for argument 0 (i) <var30:Int> isa OTHER */
2581 /* <var30:Int> isa OTHER */
2582 var33
= 1; /* easy <var30:Int> isa OTHER*/
2583 if (unlikely(!var33
)) {
2584 var_class_name36
= type_kernel__Int
.name
;
2585 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name36
);
2586 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
2589 var37
= var_res
+ var30
;
2592 RET_LABEL32
:(void)0;
2599 ((void (*)(val
*))(var_8
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_8
) /* next on <var_8:IndexedIterator[nullable Object]>*/;
2605 BREAK_label
: (void)0;
2607 { /* Inline abstract_collection#Iterator#finish (var_8) on <var_8:IndexedIterator[nullable Object]> */
2608 RET_LABEL38
:(void)0;
2616 /* method abstract_collection#SequenceRead#hash for (self: Object): Int */
2617 long VIRTUAL_abstract_collection__SequenceRead__hash(val
* self
) {
2618 long var
/* : Int */;
2619 long var1
/* : Int */;
2620 var1
= abstract_collection__SequenceRead__hash(self
);
2625 /* method abstract_collection#SequenceRead#iterator_from for (self: SequenceRead[nullable Object], Int): IndexedIterator[nullable Object] */
2626 val
* abstract_collection__SequenceRead__iterator_from(val
* self
, long p0
) {
2627 val
* var
/* : IndexedIterator[nullable Object] */;
2628 long var_pos
/* var pos: Int */;
2629 val
* var1
/* : Iterator[nullable Object] */;
2630 val
* var_res
/* var res: IndexedIterator[nullable Object] */;
2631 short int var2
/* : Bool */;
2632 long var3
/* : Int */;
2633 short int var4
/* : Bool */;
2634 short int var6
/* : Bool */;
2637 const char* var_class_name
;
2638 short int var7
/* : Bool */;
2639 short int var_
/* var : Bool */;
2640 short int var8
/* : Bool */;
2641 long var9
/* : Int */;
2642 long var10
/* : Int */;
2643 short int var12
/* : Bool */;
2646 const char* var_class_name15
;
2647 long var16
/* : Int */;
2650 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:SequenceRead[nullable Object]>*/;
2656 { /* Inline kernel#Int#> (var_pos,var3) on <var_pos:Int> */
2657 /* Covariant cast for argument 0 (i) <var3:Int> isa OTHER */
2658 /* <var3:Int> isa OTHER */
2659 var6
= 1; /* easy <var3:Int> isa OTHER*/
2660 if (unlikely(!var6
)) {
2661 var_class_name
= type_kernel__Int
.name
;
2662 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2663 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 373);
2666 var7
= var_pos
> var3
;
2675 var8
= ((short int (*)(val
*))(var_res
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_res
) /* is_ok on <var_res:IndexedIterator[nullable Object]>*/;
2683 ((void (*)(val
*))(var_res
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_res
) /* next on <var_res:IndexedIterator[nullable Object]>*/;
2687 { /* Inline kernel#Int#- (var_pos,var9) on <var_pos:Int> */
2688 /* Covariant cast for argument 0 (i) <var9:Int> isa OTHER */
2689 /* <var9:Int> isa OTHER */
2690 var12
= 1; /* easy <var9:Int> isa OTHER*/
2691 if (unlikely(!var12
)) {
2692 var_class_name15
= type_kernel__Int
.name
;
2693 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name15
);
2694 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 377);
2697 var16
= var_pos
- var9
;
2700 RET_LABEL11
:(void)0;
2708 BREAK_label
: (void)0;
2714 /* method abstract_collection#SequenceRead#iterator_from for (self: Object, Int): IndexedIterator[nullable Object] */
2715 val
* VIRTUAL_abstract_collection__SequenceRead__iterator_from(val
* self
, long p0
) {
2716 val
* var
/* : IndexedIterator[nullable Object] */;
2717 val
* var1
/* : IndexedIterator[nullable Object] */;
2718 var1
= abstract_collection__SequenceRead__iterator_from(self
, p0
);
2723 /* method abstract_collection#Sequence#first= for (self: Sequence[nullable Object], nullable Object) */
2724 void abstract_collection__Sequence__first_61d(val
* self
, val
* p0
) {
2725 short int var
/* : Bool */;
2728 const struct type
* type_struct
;
2729 short int is_nullable
;
2730 const char* var_class_name
;
2731 val
* var_item
/* var item: nullable Object */;
2732 long var1
/* : Int */;
2733 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
2734 /* <p0:nullable Object> isa E */
2735 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
2736 cltype
= type_struct
->color
;
2737 idtype
= type_struct
->id
;
2738 is_nullable
= type_struct
->is_nullable
;
2742 if(cltype
>= p0
->type
->table_size
) {
2745 var
= p0
->type
->type_table
[cltype
] == idtype
;
2748 if (unlikely(!var
)) {
2749 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2750 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
2751 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 757);
2757 ((void (*)(val
*, long, val
*))(self
->class->vft
[COLOR_abstract_collection__Sequence___91d_93d_61d
]))(self
, var1
, var_item
) /* []= on <self:Sequence[nullable Object]>*/;
2761 /* method abstract_collection#Sequence#first= for (self: Object, nullable Object) */
2762 void VIRTUAL_abstract_collection__Sequence__first_61d(val
* self
, val
* p0
) {
2763 abstract_collection__Sequence__first_61d(self
, p0
); /* Direct call abstract_collection#Sequence#first= on <self:Object(Sequence[nullable Object])>*/
2766 /* method abstract_collection#Sequence#add for (self: Sequence[nullable Object], nullable Object) */
2767 void abstract_collection__Sequence__add(val
* self
, val
* p0
) {
2768 short int var
/* : Bool */;
2771 const struct type
* type_struct
;
2772 short int is_nullable
;
2773 const char* var_class_name
;
2774 val
* var_e
/* var e: nullable Object */;
2775 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa E */
2776 /* <p0:nullable Object> isa E */
2777 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SimpleCollection_FT0
];
2778 cltype
= type_struct
->color
;
2779 idtype
= type_struct
->id
;
2780 is_nullable
= type_struct
->is_nullable
;
2784 if(cltype
>= p0
->type
->table_size
) {
2787 var
= p0
->type
->type_table
[cltype
] == idtype
;
2790 if (unlikely(!var
)) {
2791 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2792 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
2793 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 788);
2798 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(self
, var_e
) /* push on <self:Sequence[nullable Object]>*/;
2802 /* method abstract_collection#Sequence#add for (self: Object, nullable Object) */
2803 void VIRTUAL_abstract_collection__Sequence__add(val
* self
, val
* p0
) {
2804 abstract_collection__Sequence__add(self
, p0
); /* Direct call abstract_collection#Sequence#add on <self:Object(Sequence[nullable Object])>*/
2807 /* method abstract_collection#Sequence#append for (self: Sequence[nullable Object], Collection[nullable Object]) */
2808 void abstract_collection__Sequence__append(val
* self
, val
* p0
) {
2809 short int var
/* : Bool */;
2812 const struct type
* type_struct
;
2813 const char* var_class_name
;
2814 val
* var_coll
/* var coll: Collection[nullable Object] */;
2815 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[E] */
2816 /* <p0:Collection[nullable Object]> isa Collection[E] */
2817 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__Sequence_FT0
];
2818 cltype
= type_struct
->color
;
2819 idtype
= type_struct
->id
;
2820 if(cltype
>= p0
->type
->table_size
) {
2823 var
= p0
->type
->type_table
[cltype
] == idtype
;
2825 if (unlikely(!var
)) {
2826 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2827 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name
);
2828 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 799);
2833 abstract_collection__SimpleCollection__add_all(self
, var_coll
); /* Direct call abstract_collection#SimpleCollection#add_all on <self:Sequence[nullable Object]>*/
2837 /* method abstract_collection#Sequence#append for (self: Object, Collection[nullable Object]) */
2838 void VIRTUAL_abstract_collection__Sequence__append(val
* self
, val
* p0
) {
2839 abstract_collection__Sequence__append(self
, p0
); /* Direct call abstract_collection#Sequence#append on <self:Object(Sequence[nullable Object])>*/
2842 /* method abstract_collection#Sequence#pop for (self: Sequence[nullable Object]): nullable Object */
2843 val
* abstract_collection__Sequence__pop(val
* self
) {
2844 val
* var
/* : nullable Object */;
2845 const char* var_class_name
;
2846 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2847 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "pop", var_class_name
);
2848 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 808);
2853 /* method abstract_collection#Sequence#pop for (self: Object): nullable Object */
2854 val
* VIRTUAL_abstract_collection__Sequence__pop(val
* self
) {
2855 val
* var
/* : nullable Object */;
2856 val
* var1
/* : nullable Object */;
2857 const char* var_class_name
;
2858 { /* Inline abstract_collection#Sequence#pop (self) on <self:Object(Sequence[nullable Object])> */
2859 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2860 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "pop", var_class_name
);
2861 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 808);
2869 /* method abstract_collection#Sequence#unshift for (self: Sequence[nullable Object], nullable Object) */
2870 void abstract_collection__Sequence__unshift(val
* self
, val
* p0
) {
2871 short int var
/* : Bool */;
2874 const struct type
* type_struct
;
2875 short int is_nullable
;
2876 const char* var_class_name
;
2877 const char* var_class_name1
;
2878 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa E */
2879 /* <p0:nullable Object> isa E */
2880 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
2881 cltype
= type_struct
->color
;
2882 idtype
= type_struct
->id
;
2883 is_nullable
= type_struct
->is_nullable
;
2887 if(cltype
>= p0
->type
->table_size
) {
2890 var
= p0
->type
->type_table
[cltype
] == idtype
;
2893 if (unlikely(!var
)) {
2894 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2895 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
2896 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 818);
2899 var_class_name1
= self
== NULL ?
"null" : self
->type
->name
;
2900 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "unshift", var_class_name1
);
2901 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 818);
2905 /* method abstract_collection#Sequence#unshift for (self: Object, nullable Object) */
2906 void VIRTUAL_abstract_collection__Sequence__unshift(val
* self
, val
* p0
) {
2907 short int var
/* : Bool */;
2910 const struct type
* type_struct
;
2911 short int is_nullable
;
2912 const char* var_class_name
;
2913 const char* var_class_name2
;
2914 { /* Inline abstract_collection#Sequence#unshift (self,p0) on <self:Object(Sequence[nullable Object])> */
2915 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa E */
2916 /* <p0:nullable Object> isa E */
2917 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
2918 cltype
= type_struct
->color
;
2919 idtype
= type_struct
->id
;
2920 is_nullable
= type_struct
->is_nullable
;
2924 if(cltype
>= p0
->type
->table_size
) {
2927 var
= p0
->type
->type_table
[cltype
] == idtype
;
2930 if (unlikely(!var
)) {
2931 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2932 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
2933 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 818);
2936 var_class_name2
= self
== NULL ?
"null" : self
->type
->name
;
2937 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "unshift", var_class_name2
);
2938 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 818);
2944 /* method abstract_collection#Sequence#prepend for (self: Sequence[nullable Object], Collection[nullable Object]) */
2945 void abstract_collection__Sequence__prepend(val
* self
, val
* p0
) {
2946 short int var
/* : Bool */;
2949 const struct type
* type_struct
;
2950 const char* var_class_name
;
2951 val
* var_coll
/* var coll: Collection[nullable Object] */;
2952 long var1
/* : Int */;
2953 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[E] */
2954 /* <p0:Collection[nullable Object]> isa Collection[E] */
2955 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__Sequence_FT0
];
2956 cltype
= type_struct
->color
;
2957 idtype
= type_struct
->id
;
2958 if(cltype
>= p0
->type
->table_size
) {
2961 var
= p0
->type
->type_table
[cltype
] == idtype
;
2963 if (unlikely(!var
)) {
2964 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2965 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name
);
2966 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 826);
2972 ((void (*)(val
*, val
*, long))(self
->class->vft
[COLOR_abstract_collection__Sequence__insert_all
]))(self
, var_coll
, var1
) /* insert_all on <self:Sequence[nullable Object]>*/;
2976 /* method abstract_collection#Sequence#prepend for (self: Object, Collection[nullable Object]) */
2977 void VIRTUAL_abstract_collection__Sequence__prepend(val
* self
, val
* p0
) {
2978 abstract_collection__Sequence__prepend(self
, p0
); /* Direct call abstract_collection#Sequence#prepend on <self:Object(Sequence[nullable Object])>*/
2981 /* method abstract_collection#Sequence#shift for (self: Sequence[nullable Object]): nullable Object */
2982 val
* abstract_collection__Sequence__shift(val
* self
) {
2983 val
* var
/* : nullable Object */;
2984 const char* var_class_name
;
2985 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2986 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "shift", var_class_name
);
2987 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 835);
2992 /* method abstract_collection#Sequence#shift for (self: Object): nullable Object */
2993 val
* VIRTUAL_abstract_collection__Sequence__shift(val
* self
) {
2994 val
* var
/* : nullable Object */;
2995 val
* var1
/* : nullable Object */;
2996 const char* var_class_name
;
2997 { /* Inline abstract_collection#Sequence#shift (self) on <self:Object(Sequence[nullable Object])> */
2998 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2999 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "shift", var_class_name
);
3000 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 835);
3008 /* method abstract_collection#Sequence#insert for (self: Sequence[nullable Object], nullable Object, Int) */
3009 void abstract_collection__Sequence__insert(val
* self
, val
* p0
, long p1
) {
3010 short int var
/* : Bool */;
3013 const struct type
* type_struct
;
3014 short int is_nullable
;
3015 const char* var_class_name
;
3016 const char* var_class_name1
;
3017 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
3018 /* <p0:nullable Object> isa E */
3019 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
3020 cltype
= type_struct
->color
;
3021 idtype
= type_struct
->id
;
3022 is_nullable
= type_struct
->is_nullable
;
3026 if(cltype
>= p0
->type
->table_size
) {
3029 var
= p0
->type
->type_table
[cltype
] == idtype
;
3032 if (unlikely(!var
)) {
3033 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3034 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
3035 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 861);
3038 var_class_name1
= self
== NULL ?
"null" : self
->type
->name
;
3039 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "insert", var_class_name1
);
3040 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 861);
3044 /* method abstract_collection#Sequence#insert for (self: Object, nullable Object, Int) */
3045 void VIRTUAL_abstract_collection__Sequence__insert(val
* self
, val
* p0
, long p1
) {
3046 short int var
/* : Bool */;
3049 const struct type
* type_struct
;
3050 short int is_nullable
;
3051 const char* var_class_name
;
3052 const char* var_class_name2
;
3053 { /* Inline abstract_collection#Sequence#insert (self,p0,p1) on <self:Object(Sequence[nullable Object])> */
3054 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
3055 /* <p0:nullable Object> isa E */
3056 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
3057 cltype
= type_struct
->color
;
3058 idtype
= type_struct
->id
;
3059 is_nullable
= type_struct
->is_nullable
;
3063 if(cltype
>= p0
->type
->table_size
) {
3066 var
= p0
->type
->type_table
[cltype
] == idtype
;
3069 if (unlikely(!var
)) {
3070 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3071 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
3072 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 861);
3075 var_class_name2
= self
== NULL ?
"null" : self
->type
->name
;
3076 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "insert", var_class_name2
);
3077 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 861);
3083 /* method abstract_collection#Sequence#insert_all for (self: Sequence[nullable Object], Collection[nullable Object], Int) */
3084 void abstract_collection__Sequence__insert_all(val
* self
, val
* p0
, long p1
) {
3085 short int var
/* : Bool */;
3088 const struct type
* type_struct
;
3089 const char* var_class_name
;
3090 val
* var_coll
/* var coll: Collection[nullable Object] */;
3091 long var_index
/* var index: Int */;
3092 short int var1
/* : Bool */;
3093 long var2
/* : Int */;
3094 short int var3
/* : Bool */;
3095 short int var5
/* : Bool */;
3098 const char* var_class_name8
;
3099 short int var9
/* : Bool */;
3100 short int var_
/* var : Bool */;
3101 long var10
/* : Int */;
3102 short int var11
/* : Bool */;
3103 short int var13
/* : Bool */;
3106 const char* var_class_name16
;
3107 short int var17
/* : Bool */;
3108 long var18
/* : Int */;
3109 short int var19
/* : Bool */;
3110 short int var20
/* : Bool */;
3111 short int var22
/* : Bool */;
3112 val
* var_23
/* var : Collection[nullable Object] */;
3113 val
* var24
/* : Iterator[nullable Object] */;
3114 val
* var_25
/* var : Iterator[nullable Object] */;
3115 short int var26
/* : Bool */;
3116 val
* var27
/* : nullable Object */;
3117 val
* var_c
/* var c: nullable Object */;
3118 long var28
/* : Int */;
3119 long var29
/* : Int */;
3120 short int var31
/* : Bool */;
3123 const char* var_class_name34
;
3124 long var35
/* : Int */;
3125 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[E] */
3126 /* <p0:Collection[nullable Object]> isa Collection[E] */
3127 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__Sequence_FT0
];
3128 cltype
= type_struct
->color
;
3129 idtype
= type_struct
->id
;
3130 if(cltype
>= p0
->type
->table_size
) {
3133 var
= p0
->type
->type_table
[cltype
] == idtype
;
3135 if (unlikely(!var
)) {
3136 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3137 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name
);
3138 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 871);
3145 { /* Inline kernel#Int#>= (var_index,var2) on <var_index:Int> */
3146 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
3147 /* <var2:Int> isa OTHER */
3148 var5
= 1; /* easy <var2:Int> isa OTHER*/
3149 if (unlikely(!var5
)) {
3150 var_class_name8
= type_kernel__Int
.name
;
3151 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name8
);
3152 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 372);
3155 var9
= var_index
>= var2
;
3164 var10
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Sequence[nullable Object]>*/;
3167 { /* Inline kernel#Int#< (var_index,var10) on <var_index:Int> */
3168 /* Covariant cast for argument 0 (i) <var10:Int> isa OTHER */
3169 /* <var10:Int> isa OTHER */
3170 var13
= 1; /* easy <var10:Int> isa OTHER*/
3171 if (unlikely(!var13
)) {
3172 var_class_name16
= type_kernel__Int
.name
;
3173 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name16
);
3174 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 371);
3177 var17
= var_index
< var10
;
3180 RET_LABEL12
:(void)0;
3187 if (unlikely(!var1
)) {
3188 PRINT_ERROR("Runtime error: %s", "Assert failed");
3189 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 881);
3193 var18
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Sequence[nullable Object]>*/;
3196 { /* Inline kernel#Int#== (var_index,var18) on <var_index:Int> */
3197 var22
= var_index
== var18
;
3200 RET_LABEL21
:(void)0;
3206 abstract_collection__SimpleCollection__add_all(self
, var_coll
); /* Direct call abstract_collection#SimpleCollection#add_all on <self:Sequence[nullable Object]>*/
3212 var24
= ((val
* (*)(val
*))(var_23
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_23
) /* iterator on <var_23:Collection[nullable Object]>*/;
3217 var26
= ((short int (*)(val
*))(var_25
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_25
) /* is_ok on <var_25:Iterator[nullable Object]>*/;
3221 var27
= ((val
* (*)(val
*))(var_25
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_25
) /* item on <var_25:Iterator[nullable Object]>*/;
3225 ((void (*)(val
*, val
*, long))(self
->class->vft
[COLOR_abstract_collection__Sequence__insert
]))(self
, var_c
, var_index
) /* insert on <self:Sequence[nullable Object]>*/;
3229 { /* Inline kernel#Int#+ (var_index,var28) on <var_index:Int> */
3230 /* Covariant cast for argument 0 (i) <var28:Int> isa OTHER */
3231 /* <var28:Int> isa OTHER */
3232 var31
= 1; /* easy <var28:Int> isa OTHER*/
3233 if (unlikely(!var31
)) {
3234 var_class_name34
= type_kernel__Int
.name
;
3235 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name34
);
3236 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
3239 var35
= var_index
+ var28
;
3242 RET_LABEL30
:(void)0;
3247 ((void (*)(val
*))(var_25
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_25
) /* next on <var_25:Iterator[nullable Object]>*/;
3253 BREAK_label
: (void)0;
3255 { /* Inline abstract_collection#Iterator#finish (var_25) on <var_25:Iterator[nullable Object]> */
3256 RET_LABEL36
:(void)0;
3261 /* method abstract_collection#Sequence#insert_all for (self: Object, Collection[nullable Object], Int) */
3262 void VIRTUAL_abstract_collection__Sequence__insert_all(val
* self
, val
* p0
, long p1
) {
3263 abstract_collection__Sequence__insert_all(self
, p0
, p1
); /* Direct call abstract_collection#Sequence#insert_all on <self:Object(Sequence[nullable Object])>*/
3266 /* method abstract_collection#Sequence#remove_at for (self: Sequence[nullable Object], Int) */
3267 void abstract_collection__Sequence__remove_at(val
* self
, long p0
) {
3268 const char* var_class_name
;
3269 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
3270 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "remove_at", var_class_name
);
3271 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 891);
3275 /* method abstract_collection#Sequence#remove_at for (self: Object, Int) */
3276 void VIRTUAL_abstract_collection__Sequence__remove_at(val
* self
, long p0
) {
3277 const char* var_class_name
;
3278 { /* Inline abstract_collection#Sequence#remove_at (self,p0) on <self:Object(Sequence[nullable Object])> */
3279 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
3280 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "remove_at", var_class_name
);
3281 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 891);
3287 /* method abstract_collection#CoupleMap#iterator for (self: CoupleMap[Object, nullable Object]): MapIterator[Object, nullable Object] */
3288 val
* abstract_collection__CoupleMap__iterator(val
* self
) {
3289 val
* var
/* : MapIterator[Object, nullable Object] */;
3290 val
* var1
/* : CoupleMapIterator[Object, nullable Object] */;
3291 val
* var2
/* : Iterator[Couple[Object, nullable Object]] */;
3292 var1
= NEW_abstract_collection__CoupleMapIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__CoupleMapIteratorabstract_collection__CoupleMap_FT0abstract_collection__CoupleMap_FT1
]);
3294 var2
= array__ArrayMap__couple_iterator(self
);
3297 abstract_collection__CoupleMapIterator__init(var1
, var2
); /* Direct call abstract_collection#CoupleMapIterator#init on <var1:CoupleMapIterator[Object, nullable Object]>*/
3304 /* method abstract_collection#CoupleMap#iterator for (self: Object): MapIterator[Object, nullable Object] */
3305 val
* VIRTUAL_abstract_collection__CoupleMap__iterator(val
* self
) {
3306 val
* var
/* : MapIterator[Object, nullable Object] */;
3307 val
* var1
/* : MapIterator[Object, nullable Object] */;
3308 var1
= abstract_collection__CoupleMap__iterator(self
);
3313 /* method abstract_collection#CoupleMapIterator#item for (self: CoupleMapIterator[Object, nullable Object]): nullable Object */
3314 val
* abstract_collection__CoupleMapIterator__item(val
* self
) {
3315 val
* var
/* : nullable Object */;
3316 val
* var1
/* : Iterator[Couple[Object, nullable Object]] */;
3317 val
* var2
/* : nullable Object */;
3318 val
* var3
/* : nullable Object */;
3319 val
* var5
/* : nullable Object */;
3320 var1
= self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
3321 if (unlikely(var1
== NULL
)) {
3322 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _iter");
3323 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 939);
3327 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[Couple[Object, nullable Object]]>*/;
3330 { /* Inline abstract_collection#Couple#second (var2) on <var2:nullable Object(Couple[Object, nullable Object])> */
3331 var5
= var2
->attrs
[COLOR_abstract_collection__Couple___second
].val
; /* _second on <var2:nullable Object(Couple[Object, nullable Object])> */
3341 /* method abstract_collection#CoupleMapIterator#item for (self: Object): nullable Object */
3342 val
* VIRTUAL_abstract_collection__CoupleMapIterator__item(val
* self
) {
3343 val
* var
/* : nullable Object */;
3344 val
* var1
/* : nullable Object */;
3345 var1
= abstract_collection__CoupleMapIterator__item(self
);
3350 /* method abstract_collection#CoupleMapIterator#key for (self: CoupleMapIterator[Object, nullable Object]): Object */
3351 val
* abstract_collection__CoupleMapIterator__key(val
* self
) {
3352 val
* var
/* : Object */;
3353 val
* var1
/* : Iterator[Couple[Object, nullable Object]] */;
3354 val
* var2
/* : nullable Object */;
3355 val
* var3
/* : nullable Object */;
3356 val
* var5
/* : nullable Object */;
3357 var1
= self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
3358 if (unlikely(var1
== NULL
)) {
3359 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _iter");
3360 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 943);
3364 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[Couple[Object, nullable Object]]>*/;
3367 { /* Inline abstract_collection#Couple#first (var2) on <var2:nullable Object(Couple[Object, nullable Object])> */
3368 var5
= var2
->attrs
[COLOR_abstract_collection__Couple___first
].val
; /* _first on <var2:nullable Object(Couple[Object, nullable Object])> */
3378 /* method abstract_collection#CoupleMapIterator#key for (self: Object): Object */
3379 val
* VIRTUAL_abstract_collection__CoupleMapIterator__key(val
* self
) {
3380 val
* var
/* : Object */;
3381 val
* var1
/* : Object */;
3382 var1
= abstract_collection__CoupleMapIterator__key(self
);
3387 /* method abstract_collection#CoupleMapIterator#is_ok for (self: CoupleMapIterator[Object, nullable Object]): Bool */
3388 short int abstract_collection__CoupleMapIterator__is_ok(val
* self
) {
3389 short int var
/* : Bool */;
3390 val
* var1
/* : Iterator[Couple[Object, nullable Object]] */;
3391 short int var2
/* : Bool */;
3392 var1
= self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
3393 if (unlikely(var1
== NULL
)) {
3394 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _iter");
3395 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 945);
3399 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:Iterator[Couple[Object, nullable Object]]>*/;
3406 /* method abstract_collection#CoupleMapIterator#is_ok for (self: Object): Bool */
3407 short int VIRTUAL_abstract_collection__CoupleMapIterator__is_ok(val
* self
) {
3408 short int var
/* : Bool */;
3409 short int var1
/* : Bool */;
3410 var1
= abstract_collection__CoupleMapIterator__is_ok(self
);
3415 /* method abstract_collection#CoupleMapIterator#next for (self: CoupleMapIterator[Object, nullable Object]) */
3416 void abstract_collection__CoupleMapIterator__next(val
* self
) {
3417 val
* var
/* : Iterator[Couple[Object, nullable Object]] */;
3418 var
= self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
3419 if (unlikely(var
== NULL
)) {
3420 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _iter");
3421 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 949);
3425 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var
) /* next on <var:Iterator[Couple[Object, nullable Object]]>*/;
3429 /* method abstract_collection#CoupleMapIterator#next for (self: Object) */
3430 void VIRTUAL_abstract_collection__CoupleMapIterator__next(val
* self
) {
3431 abstract_collection__CoupleMapIterator__next(self
); /* Direct call abstract_collection#CoupleMapIterator#next on <self:Object(CoupleMapIterator[Object, nullable Object])>*/
3434 /* method abstract_collection#CoupleMapIterator#init for (self: CoupleMapIterator[Object, nullable Object], Iterator[Couple[Object, nullable Object]]) */
3435 void abstract_collection__CoupleMapIterator__init(val
* self
, val
* p0
) {
3436 short int var
/* : Bool */;
3439 const struct type
* type_struct
;
3440 const char* var_class_name
;
3441 val
* var_i
/* var i: Iterator[Couple[Object, nullable Object]] */;
3442 /* Covariant cast for argument 0 (i) <p0:Iterator[Couple[Object, nullable Object]]> isa Iterator[Couple[K, V]] */
3443 /* <p0:Iterator[Couple[Object, nullable Object]]> isa Iterator[Couple[K, V]] */
3444 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Iteratorabstract_collection__Coupleabstract_collection__CoupleMapIterator_FT0abstract_collection__CoupleMapIterator_FT1
];
3445 cltype
= type_struct
->color
;
3446 idtype
= type_struct
->id
;
3447 if(cltype
>= p0
->type
->table_size
) {
3450 var
= p0
->type
->type_table
[cltype
] == idtype
;
3452 if (unlikely(!var
)) {
3453 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3454 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Iterator[Couple[K, V]]", var_class_name
);
3455 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 954);
3459 self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
= var_i
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
3462 /* method abstract_collection#CoupleMapIterator#init for (self: Object, Iterator[Couple[Object, nullable Object]]) */
3463 void VIRTUAL_abstract_collection__CoupleMapIterator__init(val
* self
, val
* p0
) {
3464 abstract_collection__CoupleMapIterator__init(self
, p0
); /* Direct call abstract_collection#CoupleMapIterator#init on <self:Object(CoupleMapIterator[Object, nullable Object])>*/
3467 /* method abstract_collection#Couple#first for (self: Couple[nullable Object, nullable Object]): nullable Object */
3468 val
* abstract_collection__Couple__first(val
* self
) {
3469 val
* var
/* : nullable Object */;
3470 val
* var1
/* : nullable Object */;
3471 var1
= self
->attrs
[COLOR_abstract_collection__Couple___first
].val
; /* _first on <self:Couple[nullable Object, nullable Object]> */
3476 /* method abstract_collection#Couple#first for (self: Object): nullable Object */
3477 val
* VIRTUAL_abstract_collection__Couple__first(val
* self
) {
3478 val
* var
/* : nullable Object */;
3479 val
* var1
/* : nullable Object */;
3480 val
* var3
/* : nullable Object */;
3481 { /* Inline abstract_collection#Couple#first (self) on <self:Object(Couple[nullable Object, nullable Object])> */
3482 var3
= self
->attrs
[COLOR_abstract_collection__Couple___first
].val
; /* _first on <self:Object(Couple[nullable Object, nullable Object])> */
3490 /* method abstract_collection#Couple#first= for (self: Couple[nullable Object, nullable Object], nullable Object) */
3491 void abstract_collection__Couple__first_61d(val
* self
, val
* p0
) {
3492 short int var
/* : Bool */;
3495 const struct type
* type_struct
;
3496 short int is_nullable
;
3497 const char* var_class_name
;
3498 /* Covariant cast for argument 0 (first) <p0:nullable Object> isa F */
3499 /* <p0:nullable Object> isa F */
3500 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT0
];
3501 cltype
= type_struct
->color
;
3502 idtype
= type_struct
->id
;
3503 is_nullable
= type_struct
->is_nullable
;
3507 if(cltype
>= p0
->type
->table_size
) {
3510 var
= p0
->type
->type_table
[cltype
] == idtype
;
3513 if (unlikely(!var
)) {
3514 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3515 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "F", var_class_name
);
3516 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 962);
3519 self
->attrs
[COLOR_abstract_collection__Couple___first
].val
= p0
; /* _first on <self:Couple[nullable Object, nullable Object]> */
3522 /* method abstract_collection#Couple#first= for (self: Object, nullable Object) */
3523 void VIRTUAL_abstract_collection__Couple__first_61d(val
* self
, val
* p0
) {
3524 short int var
/* : Bool */;
3527 const struct type
* type_struct
;
3528 short int is_nullable
;
3529 const char* var_class_name
;
3530 { /* Inline abstract_collection#Couple#first= (self,p0) on <self:Object(Couple[nullable Object, nullable Object])> */
3531 /* Covariant cast for argument 0 (first) <p0:nullable Object> isa F */
3532 /* <p0:nullable Object> isa F */
3533 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT0
];
3534 cltype
= type_struct
->color
;
3535 idtype
= type_struct
->id
;
3536 is_nullable
= type_struct
->is_nullable
;
3540 if(cltype
>= p0
->type
->table_size
) {
3543 var
= p0
->type
->type_table
[cltype
] == idtype
;
3546 if (unlikely(!var
)) {
3547 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3548 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "F", var_class_name
);
3549 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 962);
3552 self
->attrs
[COLOR_abstract_collection__Couple___first
].val
= p0
; /* _first on <self:Object(Couple[nullable Object, nullable Object])> */
3557 /* method abstract_collection#Couple#second for (self: Couple[nullable Object, nullable Object]): nullable Object */
3558 val
* abstract_collection__Couple__second(val
* self
) {
3559 val
* var
/* : nullable Object */;
3560 val
* var1
/* : nullable Object */;
3561 var1
= self
->attrs
[COLOR_abstract_collection__Couple___second
].val
; /* _second on <self:Couple[nullable Object, nullable Object]> */
3566 /* method abstract_collection#Couple#second for (self: Object): nullable Object */
3567 val
* VIRTUAL_abstract_collection__Couple__second(val
* self
) {
3568 val
* var
/* : nullable Object */;
3569 val
* var1
/* : nullable Object */;
3570 val
* var3
/* : nullable Object */;
3571 { /* Inline abstract_collection#Couple#second (self) on <self:Object(Couple[nullable Object, nullable Object])> */
3572 var3
= self
->attrs
[COLOR_abstract_collection__Couple___second
].val
; /* _second on <self:Object(Couple[nullable Object, nullable Object])> */
3580 /* method abstract_collection#Couple#second= for (self: Couple[nullable Object, nullable Object], nullable Object) */
3581 void abstract_collection__Couple__second_61d(val
* self
, val
* p0
) {
3582 short int var
/* : Bool */;
3585 const struct type
* type_struct
;
3586 short int is_nullable
;
3587 const char* var_class_name
;
3588 /* Covariant cast for argument 0 (second) <p0:nullable Object> isa S */
3589 /* <p0:nullable Object> isa S */
3590 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT1
];
3591 cltype
= type_struct
->color
;
3592 idtype
= type_struct
->id
;
3593 is_nullable
= type_struct
->is_nullable
;
3597 if(cltype
>= p0
->type
->table_size
) {
3600 var
= p0
->type
->type_table
[cltype
] == idtype
;
3603 if (unlikely(!var
)) {
3604 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3605 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "S", var_class_name
);
3606 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 965);
3609 self
->attrs
[COLOR_abstract_collection__Couple___second
].val
= p0
; /* _second on <self:Couple[nullable Object, nullable Object]> */
3612 /* method abstract_collection#Couple#second= for (self: Object, nullable Object) */
3613 void VIRTUAL_abstract_collection__Couple__second_61d(val
* self
, val
* p0
) {
3614 short int var
/* : Bool */;
3617 const struct type
* type_struct
;
3618 short int is_nullable
;
3619 const char* var_class_name
;
3620 { /* Inline abstract_collection#Couple#second= (self,p0) on <self:Object(Couple[nullable Object, nullable Object])> */
3621 /* Covariant cast for argument 0 (second) <p0:nullable Object> isa S */
3622 /* <p0:nullable Object> isa S */
3623 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT1
];
3624 cltype
= type_struct
->color
;
3625 idtype
= type_struct
->id
;
3626 is_nullable
= type_struct
->is_nullable
;
3630 if(cltype
>= p0
->type
->table_size
) {
3633 var
= p0
->type
->type_table
[cltype
] == idtype
;
3636 if (unlikely(!var
)) {
3637 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3638 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "S", var_class_name
);
3639 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 965);
3642 self
->attrs
[COLOR_abstract_collection__Couple___second
].val
= p0
; /* _second on <self:Object(Couple[nullable Object, nullable Object])> */
3647 /* method abstract_collection#Couple#init for (self: Couple[nullable Object, nullable Object], nullable Object, nullable Object) */
3648 void abstract_collection__Couple__init(val
* self
, val
* p0
, val
* p1
) {
3649 short int var
/* : Bool */;
3652 const struct type
* type_struct
;
3653 short int is_nullable
;
3654 const char* var_class_name
;
3655 short int var1
/* : Bool */;
3658 const struct type
* type_struct4
;
3659 short int is_nullable5
;
3660 const char* var_class_name6
;
3661 val
* var_f
/* var f: nullable Object */;
3662 val
* var_s
/* var s: nullable Object */;
3663 short int var8
/* : Bool */;
3666 const struct type
* type_struct11
;
3667 short int is_nullable12
;
3668 const char* var_class_name13
;
3669 short int var15
/* : Bool */;
3672 const struct type
* type_struct18
;
3673 short int is_nullable19
;
3674 const char* var_class_name20
;
3675 /* Covariant cast for argument 0 (f) <p0:nullable Object> isa F */
3676 /* <p0:nullable Object> isa F */
3677 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT0
];
3678 cltype
= type_struct
->color
;
3679 idtype
= type_struct
->id
;
3680 is_nullable
= type_struct
->is_nullable
;
3684 if(cltype
>= p0
->type
->table_size
) {
3687 var
= p0
->type
->type_table
[cltype
] == idtype
;
3690 if (unlikely(!var
)) {
3691 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3692 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "F", var_class_name
);
3693 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 968);
3696 /* Covariant cast for argument 1 (s) <p1:nullable Object> isa S */
3697 /* <p1:nullable Object> isa S */
3698 type_struct4
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT1
];
3699 cltype2
= type_struct4
->color
;
3700 idtype3
= type_struct4
->id
;
3701 is_nullable5
= type_struct4
->is_nullable
;
3703 var1
= is_nullable5
;
3705 if(cltype2
>= p1
->type
->table_size
) {
3708 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
3711 if (unlikely(!var1
)) {
3712 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
3713 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "S", var_class_name6
);
3714 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 968);
3720 { /* Inline abstract_collection#Couple#first= (self,var_f) on <self:Couple[nullable Object, nullable Object]> */
3721 /* Covariant cast for argument 0 (first) <var_f:nullable Object> isa F */
3722 /* <var_f:nullable Object> isa F */
3723 type_struct11
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT0
];
3724 cltype9
= type_struct11
->color
;
3725 idtype10
= type_struct11
->id
;
3726 is_nullable12
= type_struct11
->is_nullable
;
3728 var8
= is_nullable12
;
3730 if(cltype9
>= var_f
->type
->table_size
) {
3733 var8
= var_f
->type
->type_table
[cltype9
] == idtype10
;
3736 if (unlikely(!var8
)) {
3737 var_class_name13
= var_f
== NULL ?
"null" : var_f
->type
->name
;
3738 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "F", var_class_name13
);
3739 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 962);
3742 self
->attrs
[COLOR_abstract_collection__Couple___first
].val
= var_f
; /* _first on <self:Couple[nullable Object, nullable Object]> */
3747 { /* Inline abstract_collection#Couple#second= (self,var_s) on <self:Couple[nullable Object, nullable Object]> */
3748 /* Covariant cast for argument 0 (second) <var_s:nullable Object> isa S */
3749 /* <var_s:nullable Object> isa S */
3750 type_struct18
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT1
];
3751 cltype16
= type_struct18
->color
;
3752 idtype17
= type_struct18
->id
;
3753 is_nullable19
= type_struct18
->is_nullable
;
3755 var15
= is_nullable19
;
3757 if(cltype16
>= var_s
->type
->table_size
) {
3760 var15
= var_s
->type
->type_table
[cltype16
] == idtype17
;
3763 if (unlikely(!var15
)) {
3764 var_class_name20
= var_s
== NULL ?
"null" : var_s
->type
->name
;
3765 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "S", var_class_name20
);
3766 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/abstract_collection.nit", 965);
3769 self
->attrs
[COLOR_abstract_collection__Couple___second
].val
= var_s
; /* _second on <self:Couple[nullable Object, nullable Object]> */
3770 RET_LABEL14
:(void)0;
3775 /* method abstract_collection#Couple#init for (self: Object, nullable Object, nullable Object) */
3776 void VIRTUAL_abstract_collection__Couple__init(val
* self
, val
* p0
, val
* p1
) {
3777 abstract_collection__Couple__init(self
, p0
, p1
); /* Direct call abstract_collection#Couple#init on <self:Object(Couple[nullable Object, nullable Object])>*/