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
* var2
/* : Iterator[nullable Object] */;
43 short int var3
/* : Bool */;
44 val
* var4
/* : nullable Object */;
45 val
* var_i
/* var i: nullable Object */;
46 long var5
/* : Int */;
47 long var6
/* : Int */;
48 short int var8
/* : Bool */;
51 const char* var_class_name
;
52 long var9
/* : Int */;
56 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:Collection[nullable Object]>*/;
60 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
64 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
69 { /* Inline kernel#Int#+ (var_nb,var5) on <var_nb:Int> */
70 /* Covariant cast for argument 0 (i) <var5:Int> isa OTHER */
71 /* <var5:Int> isa OTHER */
72 var8
= 1; /* easy <var5:Int> isa OTHER*/
73 if (unlikely(!var8
)) {
74 var_class_name
= type_kernel__Int
.name
;
75 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
76 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
86 CONTINUE_label
: (void)0;
88 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
97 /* method abstract_collection#Collection#length for (self: Object): Int */
98 long VIRTUAL_abstract_collection__Collection__length(val
* self
) {
100 long var1
/* : Int */;
101 var1
= abstract_collection__Collection__length(self
);
106 /* method abstract_collection#Collection#has for (self: Collection[nullable Object], nullable Object): Bool */
107 short int abstract_collection__Collection__has(val
* self
, val
* p0
) {
108 short int var
/* : Bool */;
109 short int var1
/* : Bool */;
112 const struct type
* type_struct
;
113 short int is_nullable
;
114 const char* var_class_name
;
115 val
* var_item
/* var item: nullable Object */;
116 val
* var2
/* : Iterator[nullable Object] */;
117 short int var3
/* : Bool */;
118 val
* var4
/* : nullable Object */;
119 val
* var_i
/* var i: nullable Object */;
120 short int var5
/* : Bool */;
121 short int var6
/* : Bool */;
122 short int var7
/* : Bool */;
123 short int var8
/* : Bool */;
124 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
125 /* <p0:nullable Object> isa Collection#0 */
126 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
127 cltype
= type_struct
->color
;
128 idtype
= type_struct
->id
;
129 is_nullable
= type_struct
->is_nullable
;
133 if(cltype
>= p0
->type
->table_size
) {
136 var1
= p0
->type
->type_table
[cltype
] == idtype
;
139 if (unlikely(!var1
)) {
140 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
141 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
142 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 76);
147 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:Collection[nullable Object]>*/;
151 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
155 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
159 var5
= (var_item
== NULL
);
161 var6
= ((short int (*)(val
*, val
*))(var_i
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_i
, var_item
) /* == on <var_i:nullable Object>*/;
170 CONTINUE_label
: (void)0;
172 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
175 BREAK_label
: (void)0;
182 /* method abstract_collection#Collection#has for (self: Object, nullable Object): Bool */
183 short int VIRTUAL_abstract_collection__Collection__has(val
* self
, val
* p0
) {
184 short int var
/* : Bool */;
185 short int var1
/* : Bool */;
186 var1
= abstract_collection__Collection__has(self
, p0
);
191 /* method abstract_collection#Collection#first for (self: Collection[nullable Object]): nullable Object */
192 val
* abstract_collection__Collection__first(val
* self
) {
193 val
* var
/* : nullable Object */;
194 long var1
/* : Int */;
195 long var2
/* : Int */;
196 short int var3
/* : Bool */;
197 short int var5
/* : Bool */;
200 const char* var_class_name
;
201 short int var6
/* : Bool */;
202 val
* var7
/* : Iterator[nullable Object] */;
203 val
* var8
/* : nullable Object */;
205 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Collection[nullable Object]>*/;
209 { /* Inline kernel#Int#> (var1,var2) on <var1:Int> */
210 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
211 /* <var2:Int> isa OTHER */
212 var5
= 1; /* easy <var2:Int> isa OTHER*/
213 if (unlikely(!var5
)) {
214 var_class_name
= type_kernel__Int
.name
;
215 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
216 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 327);
225 if (unlikely(!var3
)) {
226 PRINT_ERROR("Runtime error: %s", "Assert failed");
227 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 122);
231 var7
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:Collection[nullable Object]>*/;
234 var8
= ((val
* (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var7
) /* item on <var7:Iterator[nullable Object]>*/;
241 /* method abstract_collection#Collection#first for (self: Object): nullable Object */
242 val
* VIRTUAL_abstract_collection__Collection__first(val
* self
) {
243 val
* var
/* : nullable Object */;
244 val
* var1
/* : nullable Object */;
245 var1
= abstract_collection__Collection__first(self
);
250 /* method abstract_collection#Collection#has_all for (self: Collection[nullable Object], Collection[nullable Object]): Bool */
251 short int abstract_collection__Collection__has_all(val
* self
, val
* p0
) {
252 short int var
/* : Bool */;
253 short int var1
/* : Bool */;
256 const struct type
* type_struct
;
257 const char* var_class_name
;
258 val
* var_other
/* var other: Collection[nullable Object] */;
259 val
* var2
/* : Iterator[nullable Object] */;
260 short int var3
/* : Bool */;
261 val
* var4
/* : nullable Object */;
262 val
* var_x
/* var x: nullable Object */;
263 short int var5
/* : Bool */;
264 short int var6
/* : Bool */;
265 short int var7
/* : Bool */;
266 short int var8
/* : Bool */;
267 /* Covariant cast for argument 0 (other) <p0:Collection[nullable Object]> isa Collection[Collection#0] */
268 /* <p0:Collection[nullable Object]> isa Collection[Collection#0] */
269 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__Collection_FT0
];
270 cltype
= type_struct
->color
;
271 idtype
= type_struct
->id
;
272 if(cltype
>= p0
->type
->table_size
) {
275 var1
= p0
->type
->type_table
[cltype
] == idtype
;
277 if (unlikely(!var1
)) {
278 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
279 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[Collection#0]", var_class_name
);
280 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 126);
285 var2
= ((val
* (*)(val
*))(var_other
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_other
) /* iterator on <var_other:Collection[nullable Object]>*/;
289 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
293 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
297 var5
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__has
]))(self
, var_x
) /* has on <self:Collection[nullable Object]>*/;
306 CONTINUE_label
: (void)0;
308 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
311 BREAK_label
: (void)0;
318 /* method abstract_collection#Collection#has_all for (self: Object, Collection[nullable Object]): Bool */
319 short int VIRTUAL_abstract_collection__Collection__has_all(val
* self
, val
* p0
) {
320 short int var
/* : Bool */;
321 short int var1
/* : Bool */;
322 var1
= abstract_collection__Collection__has_all(self
, p0
);
327 /* method abstract_collection#Iterator#iterator for (self: Iterator[nullable Object]): Iterator[nullable Object] */
328 val
* abstract_collection__Iterator__iterator(val
* self
) {
329 val
* var
/* : Iterator[nullable Object] */;
335 /* method abstract_collection#Iterator#iterator for (self: Object): Iterator[nullable Object] */
336 val
* VIRTUAL_abstract_collection__Iterator__iterator(val
* self
) {
337 val
* var
/* : Iterator[nullable Object] */;
338 val
* var1
/* : Iterator[nullable Object] */;
339 var1
= abstract_collection__Iterator__iterator(self
);
344 /* method abstract_collection#Container#first for (self: Container[nullable Object]): nullable Object */
345 val
* abstract_collection__Container__first(val
* self
) {
346 val
* var
/* : nullable Object */;
347 val
* var1
/* : nullable Object */;
348 val
* var3
/* : nullable Object */;
350 { /* Inline abstract_collection#Container#item (self) on <self:Container[nullable Object]> */
351 var3
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Container[nullable Object]> */
361 /* method abstract_collection#Container#first for (self: Object): nullable Object */
362 val
* VIRTUAL_abstract_collection__Container__first(val
* self
) {
363 val
* var
/* : nullable Object */;
364 val
* var1
/* : nullable Object */;
365 var1
= abstract_collection__Container__first(self
);
370 /* method abstract_collection#Container#is_empty for (self: Container[nullable Object]): Bool */
371 short int abstract_collection__Container__is_empty(val
* self
) {
372 short int var
/* : Bool */;
373 short int var1
/* : Bool */;
380 /* method abstract_collection#Container#is_empty for (self: Object): Bool */
381 short int VIRTUAL_abstract_collection__Container__is_empty(val
* self
) {
382 short int var
/* : Bool */;
383 short int var1
/* : Bool */;
384 var1
= abstract_collection__Container__is_empty(self
);
389 /* method abstract_collection#Container#length for (self: Container[nullable Object]): Int */
390 long abstract_collection__Container__length(val
* self
) {
391 long var
/* : Int */;
392 long var1
/* : Int */;
399 /* method abstract_collection#Container#length for (self: Object): Int */
400 long VIRTUAL_abstract_collection__Container__length(val
* self
) {
401 long var
/* : Int */;
402 long var1
/* : Int */;
403 var1
= abstract_collection__Container__length(self
);
408 /* method abstract_collection#Container#has for (self: Container[nullable Object], nullable Object): Bool */
409 short int abstract_collection__Container__has(val
* self
, val
* p0
) {
410 short int var
/* : Bool */;
411 short int var1
/* : Bool */;
414 const struct type
* type_struct
;
415 short int is_nullable
;
416 const char* var_class_name
;
417 val
* var_an_item
/* var an_item: nullable Object */;
418 val
* var2
/* : nullable Object */;
419 val
* var4
/* : nullable Object */;
420 short int var5
/* : Bool */;
421 short int var6
/* : Bool */;
422 /* Covariant cast for argument 0 (an_item) <p0:nullable Object> isa Collection#0 */
423 /* <p0:nullable Object> isa Collection#0 */
424 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
425 cltype
= type_struct
->color
;
426 idtype
= type_struct
->id
;
427 is_nullable
= type_struct
->is_nullable
;
431 if(cltype
>= p0
->type
->table_size
) {
434 var1
= p0
->type
->type_table
[cltype
] == idtype
;
437 if (unlikely(!var1
)) {
438 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
439 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
440 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 172);
445 { /* Inline abstract_collection#Container#item (self) on <self:Container[nullable Object]> */
446 var4
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Container[nullable Object]> */
452 var5
= (var_an_item
== NULL
);
454 var6
= ((short int (*)(val
*, val
*))(var2
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var2
, var_an_item
) /* == on <var2:nullable Object>*/;
462 /* method abstract_collection#Container#has for (self: Object, nullable Object): Bool */
463 short int VIRTUAL_abstract_collection__Container__has(val
* self
, val
* p0
) {
464 short int var
/* : Bool */;
465 short int var1
/* : Bool */;
466 var1
= abstract_collection__Container__has(self
, p0
);
471 /* method abstract_collection#Container#iterator for (self: Container[nullable Object]): Iterator[nullable Object] */
472 val
* abstract_collection__Container__iterator(val
* self
) {
473 val
* var
/* : Iterator[nullable Object] */;
474 val
* var1
/* : ContainerIterator[nullable Object] */;
475 var1
= NEW_abstract_collection__ContainerIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__ContainerIteratorabstract_collection__Container_FT0
]);
477 abstract_collection__ContainerIterator__init(var1
, self
); /* Direct call abstract_collection#ContainerIterator#init on <var1:ContainerIterator[nullable Object]>*/
484 /* method abstract_collection#Container#iterator for (self: Object): Iterator[nullable Object] */
485 val
* VIRTUAL_abstract_collection__Container__iterator(val
* self
) {
486 val
* var
/* : Iterator[nullable Object] */;
487 val
* var1
/* : Iterator[nullable Object] */;
488 var1
= abstract_collection__Container__iterator(self
);
493 /* method abstract_collection#Container#init for (self: Container[nullable Object], nullable Object) */
494 void abstract_collection__Container__init(val
* self
, val
* p0
) {
495 short int var
/* : Bool */;
498 const struct type
* type_struct
;
499 short int is_nullable
;
500 const char* var_class_name
;
501 val
* var_e
/* var e: nullable Object */;
502 short int var2
/* : Bool */;
505 const struct type
* type_struct5
;
506 short int is_nullable6
;
507 const char* var_class_name7
;
508 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Container#0 */
509 /* <p0:nullable Object> isa Container#0 */
510 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Container_FT0
];
511 cltype
= type_struct
->color
;
512 idtype
= type_struct
->id
;
513 is_nullable
= type_struct
->is_nullable
;
517 if(cltype
>= p0
->type
->table_size
) {
520 var
= p0
->type
->type_table
[cltype
] == idtype
;
523 if (unlikely(!var
)) {
524 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
525 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Container#0", var_class_name
);
526 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 187);
531 { /* Inline abstract_collection#Container#item= (self,var_e) on <self:Container[nullable Object]> */
532 /* Covariant cast for argument 0 (item) <var_e:nullable Object> isa Container#0 */
533 /* <var_e:nullable Object> isa Container#0 */
534 type_struct5
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Container_FT0
];
535 cltype3
= type_struct5
->color
;
536 idtype4
= type_struct5
->id
;
537 is_nullable6
= type_struct5
->is_nullable
;
541 if(cltype3
>= var_e
->type
->table_size
) {
544 var2
= var_e
->type
->type_table
[cltype3
] == idtype4
;
547 if (unlikely(!var2
)) {
548 var_class_name7
= var_e
== NULL ?
"null" : var_e
->type
->name
;
549 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Container#0", var_class_name7
);
550 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 190);
553 self
->attrs
[COLOR_abstract_collection__Container___item
].val
= var_e
; /* _item on <self:Container[nullable Object]> */
559 /* method abstract_collection#Container#init for (self: Object, nullable Object) */
560 void VIRTUAL_abstract_collection__Container__init(val
* self
, val
* p0
) {
561 abstract_collection__Container__init(self
, p0
); /* Direct call abstract_collection#Container#init on <self:Object(Container[nullable Object])>*/
564 /* method abstract_collection#Container#item for (self: Container[nullable Object]): nullable Object */
565 val
* abstract_collection__Container__item(val
* self
) {
566 val
* var
/* : nullable Object */;
567 val
* var1
/* : nullable Object */;
568 var1
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Container[nullable Object]> */
573 /* method abstract_collection#Container#item for (self: Object): nullable Object */
574 val
* VIRTUAL_abstract_collection__Container__item(val
* self
) {
575 val
* var
/* : nullable Object */;
576 val
* var1
/* : nullable Object */;
577 val
* var3
/* : nullable Object */;
578 { /* Inline abstract_collection#Container#item (self) on <self:Object(Container[nullable Object])> */
579 var3
= self
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <self:Object(Container[nullable Object])> */
587 /* method abstract_collection#Container#item= for (self: Container[nullable Object], nullable Object) */
588 void abstract_collection__Container__item_61d(val
* self
, val
* p0
) {
589 short int var
/* : Bool */;
592 const struct type
* type_struct
;
593 short int is_nullable
;
594 const char* var_class_name
;
595 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Container#0 */
596 /* <p0:nullable Object> isa Container#0 */
597 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Container_FT0
];
598 cltype
= type_struct
->color
;
599 idtype
= type_struct
->id
;
600 is_nullable
= type_struct
->is_nullable
;
604 if(cltype
>= p0
->type
->table_size
) {
607 var
= p0
->type
->type_table
[cltype
] == idtype
;
610 if (unlikely(!var
)) {
611 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
612 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Container#0", var_class_name
);
613 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 190);
616 self
->attrs
[COLOR_abstract_collection__Container___item
].val
= p0
; /* _item on <self:Container[nullable Object]> */
619 /* method abstract_collection#Container#item= for (self: Object, nullable Object) */
620 void VIRTUAL_abstract_collection__Container__item_61d(val
* self
, val
* p0
) {
621 short int var
/* : Bool */;
624 const struct type
* type_struct
;
625 short int is_nullable
;
626 const char* var_class_name
;
627 { /* Inline abstract_collection#Container#item= (self,p0) on <self:Object(Container[nullable Object])> */
628 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Container#0 */
629 /* <p0:nullable Object> isa Container#0 */
630 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Container_FT0
];
631 cltype
= type_struct
->color
;
632 idtype
= type_struct
->id
;
633 is_nullable
= type_struct
->is_nullable
;
637 if(cltype
>= p0
->type
->table_size
) {
640 var
= p0
->type
->type_table
[cltype
] == idtype
;
643 if (unlikely(!var
)) {
644 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
645 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Container#0", var_class_name
);
646 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 190);
649 self
->attrs
[COLOR_abstract_collection__Container___item
].val
= p0
; /* _item on <self:Object(Container[nullable Object])> */
654 /* method abstract_collection#ContainerIterator#item for (self: ContainerIterator[nullable Object]): nullable Object */
655 val
* abstract_collection__ContainerIterator__item(val
* self
) {
656 val
* var
/* : nullable Object */;
657 val
* var1
/* : Container[nullable Object] */;
658 val
* var2
/* : nullable Object */;
659 val
* var4
/* : nullable Object */;
660 var1
= self
->attrs
[COLOR_abstract_collection__ContainerIterator___container
].val
; /* _container on <self:ContainerIterator[nullable Object]> */
661 if (unlikely(var1
== NULL
)) {
662 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _container");
663 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 197);
667 { /* Inline abstract_collection#Container#item (var1) on <var1:Container[nullable Object]> */
668 var4
= var1
->attrs
[COLOR_abstract_collection__Container___item
].val
; /* _item on <var1:Container[nullable Object]> */
678 /* method abstract_collection#ContainerIterator#item for (self: Object): nullable Object */
679 val
* VIRTUAL_abstract_collection__ContainerIterator__item(val
* self
) {
680 val
* var
/* : nullable Object */;
681 val
* var1
/* : nullable Object */;
682 var1
= abstract_collection__ContainerIterator__item(self
);
687 /* method abstract_collection#ContainerIterator#next for (self: ContainerIterator[nullable Object]) */
688 void abstract_collection__ContainerIterator__next(val
* self
) {
689 short int var
/* : Bool */;
692 { /* Inline abstract_collection#ContainerIterator#is_ok= (self,var) on <self:ContainerIterator[nullable Object]> */
693 self
->attrs
[COLOR_abstract_collection__ContainerIterator___is_ok
].s
= var
; /* _is_ok on <self:ContainerIterator[nullable Object]> */
699 /* method abstract_collection#ContainerIterator#next for (self: Object) */
700 void VIRTUAL_abstract_collection__ContainerIterator__next(val
* self
) {
701 abstract_collection__ContainerIterator__next(self
); /* Direct call abstract_collection#ContainerIterator#next on <self:Object(ContainerIterator[nullable Object])>*/
704 /* method abstract_collection#ContainerIterator#init for (self: ContainerIterator[nullable Object], Container[nullable Object]) */
705 void abstract_collection__ContainerIterator__init(val
* self
, val
* p0
) {
706 short int var
/* : Bool */;
709 const struct type
* type_struct
;
710 const char* var_class_name
;
711 val
* var_c
/* var c: Container[nullable Object] */;
712 /* Covariant cast for argument 0 (c) <p0:Container[nullable Object]> isa Container[ContainerIterator#0] */
713 /* <p0:Container[nullable Object]> isa Container[ContainerIterator#0] */
714 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Containerabstract_collection__ContainerIterator_FT0
];
715 cltype
= type_struct
->color
;
716 idtype
= type_struct
->id
;
717 if(cltype
>= p0
->type
->table_size
) {
720 var
= p0
->type
->type_table
[cltype
] == idtype
;
722 if (unlikely(!var
)) {
723 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
724 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Container[ContainerIterator#0]", var_class_name
);
725 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 201);
729 self
->attrs
[COLOR_abstract_collection__ContainerIterator___container
].val
= var_c
; /* _container on <self:ContainerIterator[nullable Object]> */
732 /* method abstract_collection#ContainerIterator#init for (self: Object, Container[nullable Object]) */
733 void VIRTUAL_abstract_collection__ContainerIterator__init(val
* self
, val
* p0
) {
734 abstract_collection__ContainerIterator__init(self
, p0
); /* Direct call abstract_collection#ContainerIterator#init on <self:Object(ContainerIterator[nullable Object])>*/
737 /* method abstract_collection#ContainerIterator#is_ok for (self: ContainerIterator[nullable Object]): Bool */
738 short int abstract_collection__ContainerIterator__is_ok(val
* self
) {
739 short int var
/* : Bool */;
740 short int var1
/* : Bool */;
741 var1
= self
->attrs
[COLOR_abstract_collection__ContainerIterator___is_ok
].s
; /* _is_ok on <self:ContainerIterator[nullable Object]> */
746 /* method abstract_collection#ContainerIterator#is_ok for (self: Object): Bool */
747 short int VIRTUAL_abstract_collection__ContainerIterator__is_ok(val
* self
) {
748 short int var
/* : Bool */;
749 short int var1
/* : Bool */;
750 short int var3
/* : Bool */;
751 { /* Inline abstract_collection#ContainerIterator#is_ok (self) on <self:Object(ContainerIterator[nullable Object])> */
752 var3
= self
->attrs
[COLOR_abstract_collection__ContainerIterator___is_ok
].s
; /* _is_ok on <self:Object(ContainerIterator[nullable Object])> */
760 /* method abstract_collection#ContainerIterator#is_ok= for (self: ContainerIterator[nullable Object], Bool) */
761 void abstract_collection__ContainerIterator__is_ok_61d(val
* self
, short int p0
) {
762 self
->attrs
[COLOR_abstract_collection__ContainerIterator___is_ok
].s
= p0
; /* _is_ok on <self:ContainerIterator[nullable Object]> */
765 /* method abstract_collection#ContainerIterator#is_ok= for (self: Object, Bool) */
766 void VIRTUAL_abstract_collection__ContainerIterator__is_ok_61d(val
* self
, short int p0
) {
767 { /* Inline abstract_collection#ContainerIterator#is_ok= (self,p0) on <self:Object(ContainerIterator[nullable Object])> */
768 self
->attrs
[COLOR_abstract_collection__ContainerIterator___is_ok
].s
= p0
; /* _is_ok on <self:Object(ContainerIterator[nullable Object])> */
773 /* method abstract_collection#RemovableCollection#clear for (self: RemovableCollection[nullable Object]) */
774 void abstract_collection__RemovableCollection__clear(val
* self
) {
775 const char* var_class_name
;
776 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
777 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "clear", var_class_name
);
778 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 212);
782 /* method abstract_collection#RemovableCollection#clear for (self: Object) */
783 void VIRTUAL_abstract_collection__RemovableCollection__clear(val
* self
) {
784 const char* var_class_name
;
785 { /* Inline abstract_collection#RemovableCollection#clear (self) on <self:Object(RemovableCollection[nullable Object])> */
786 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
787 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "clear", var_class_name
);
788 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 212);
794 /* method abstract_collection#RemovableCollection#remove for (self: RemovableCollection[nullable Object], nullable Object) */
795 void abstract_collection__RemovableCollection__remove(val
* self
, val
* p0
) {
796 short int var
/* : Bool */;
799 const struct type
* type_struct
;
800 short int is_nullable
;
801 const char* var_class_name
;
802 const char* var_class_name1
;
803 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa RemovableCollection#0 */
804 /* <p0:nullable Object> isa RemovableCollection#0 */
805 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
806 cltype
= type_struct
->color
;
807 idtype
= type_struct
->id
;
808 is_nullable
= type_struct
->is_nullable
;
812 if(cltype
>= p0
->type
->table_size
) {
815 var
= p0
->type
->type_table
[cltype
] == idtype
;
818 if (unlikely(!var
)) {
819 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
820 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
821 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 221);
824 var_class_name1
= self
== NULL ?
"null" : self
->type
->name
;
825 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "remove", var_class_name1
);
826 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 221);
830 /* method abstract_collection#RemovableCollection#remove for (self: Object, nullable Object) */
831 void VIRTUAL_abstract_collection__RemovableCollection__remove(val
* self
, val
* p0
) {
832 short int var
/* : Bool */;
835 const struct type
* type_struct
;
836 short int is_nullable
;
837 const char* var_class_name
;
838 const char* var_class_name2
;
839 { /* Inline abstract_collection#RemovableCollection#remove (self,p0) on <self:Object(RemovableCollection[nullable Object])> */
840 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa RemovableCollection#0 */
841 /* <p0:nullable Object> isa RemovableCollection#0 */
842 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
843 cltype
= type_struct
->color
;
844 idtype
= type_struct
->id
;
845 is_nullable
= type_struct
->is_nullable
;
849 if(cltype
>= p0
->type
->table_size
) {
852 var
= p0
->type
->type_table
[cltype
] == idtype
;
855 if (unlikely(!var
)) {
856 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
857 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
858 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 221);
861 var_class_name2
= self
== NULL ?
"null" : self
->type
->name
;
862 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "remove", var_class_name2
);
863 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 221);
869 /* method abstract_collection#SimpleCollection#add_all for (self: SimpleCollection[nullable Object], Collection[nullable Object]) */
870 void abstract_collection__SimpleCollection__add_all(val
* self
, val
* p0
) {
871 short int var
/* : Bool */;
874 const struct type
* type_struct
;
875 const char* var_class_name
;
876 val
* var_coll
/* var coll: Collection[nullable Object] */;
877 val
* var1
/* : Iterator[nullable Object] */;
878 short int var2
/* : Bool */;
879 val
* var3
/* : nullable Object */;
880 val
* var_i
/* var i: nullable Object */;
881 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[SimpleCollection#0] */
882 /* <p0:Collection[nullable Object]> isa Collection[SimpleCollection#0] */
883 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__SimpleCollection_FT0
];
884 cltype
= type_struct
->color
;
885 idtype
= type_struct
->id
;
886 if(cltype
>= p0
->type
->table_size
) {
889 var
= p0
->type
->type_table
[cltype
] == idtype
;
891 if (unlikely(!var
)) {
892 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
893 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[SimpleCollection#0]", var_class_name
);
894 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 250);
899 var1
= ((val
* (*)(val
*))(var_coll
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_coll
) /* iterator on <var_coll:Collection[nullable Object]>*/;
903 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:Iterator[nullable Object]>*/;
907 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[nullable Object]>*/;
911 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(self
, var_i
) /* add on <self:SimpleCollection[nullable Object]>*/;
913 CONTINUE_label
: (void)0;
915 ((void (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var1
) /* next on <var1:Iterator[nullable Object]>*/;
918 BREAK_label
: (void)0;
921 /* method abstract_collection#SimpleCollection#add_all for (self: Object, Collection[nullable Object]) */
922 void VIRTUAL_abstract_collection__SimpleCollection__add_all(val
* self
, val
* p0
) {
923 abstract_collection__SimpleCollection__add_all(self
, p0
); /* Direct call abstract_collection#SimpleCollection#add_all on <self:Object(SimpleCollection[nullable Object])>*/
926 /* method abstract_collection#Set#== for (self: Set[Object], nullable Object): Bool */
927 short int abstract_collection__Set___61d_61d(val
* self
, val
* p0
) {
928 short int var
/* : Bool */;
929 val
* var_other
/* var other: nullable Object */;
930 short int var1
/* : Bool */;
933 short int var2
/* : Bool */;
934 short int var3
/* : Bool */;
935 long var4
/* : Int */;
936 long var5
/* : Int */;
937 short int var6
/* : Bool */;
938 short int var7
/* : Bool */;
939 short int var9
/* : Bool */;
940 short int var10
/* : Bool */;
941 short int var11
/* : Bool */;
942 short int var12
/* : Bool */;
945 const struct type
* type_struct
;
946 const char* var_class_name
;
947 short int var15
/* : Bool */;
949 /* <var_other:nullable Object> isa Set[Object] */
950 cltype
= type_abstract_collection__Setkernel__Object
.color
;
951 idtype
= type_abstract_collection__Setkernel__Object
.id
;
952 if(var_other
== NULL
) {
955 if(cltype
>= var_other
->type
->table_size
) {
958 var1
= var_other
->type
->type_table
[cltype
] == idtype
;
969 var4
= ((long (*)(val
*))(var_other
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_other
) /* length on <var_other:nullable Object(Set[Object])>*/;
972 var5
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:Set[Object]>*/;
975 { /* Inline kernel#Int#!= (var4,var5) on <var4:Int> */
990 /* <var_other:nullable Object(Set[Object])> isa Collection[Set#0] */
991 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__Set_FT0
];
992 cltype13
= type_struct
->color
;
993 idtype14
= type_struct
->id
;
994 if(cltype13
>= var_other
->type
->table_size
) {
997 var12
= var_other
->type
->type_table
[cltype13
] == idtype14
;
999 if (unlikely(!var12
)) {
1000 var_class_name
= var_other
== NULL ?
"null" : var_other
->type
->name
;
1001 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[Set#0]", var_class_name
);
1002 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 301);
1006 var15
= abstract_collection__Collection__has_all(self
, var_other
);
1013 /* method abstract_collection#Set#== for (self: Object, nullable Object): Bool */
1014 short int VIRTUAL_abstract_collection__Set___61d_61d(val
* self
, val
* p0
) {
1015 short int var
/* : Bool */;
1016 short int var1
/* : Bool */;
1017 var1
= abstract_collection__Set___61d_61d(self
, p0
);
1022 /* method abstract_collection#Set#hash for (self: Set[Object]): Int */
1023 long abstract_collection__Set__hash(val
* self
) {
1024 long var
/* : Int */;
1025 long var1
/* : Int */;
1026 long var_res
/* var res: Int */;
1027 val
* var2
/* : Iterator[nullable Object] */;
1028 short int var3
/* : Bool */;
1029 val
* var4
/* : nullable Object */;
1030 val
* var_e
/* var e: Object */;
1031 long var5
/* : Int */;
1032 long var6
/* : Int */;
1033 short int var8
/* : Bool */;
1036 const char* var_class_name
;
1037 long var9
/* : Int */;
1041 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:Set[Object]>*/;
1045 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
1049 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
1053 var5
= kernel__Int__hash(var_res
);
1056 { /* Inline kernel#Int#+ (var_res,var5) on <var_res:Int> */
1057 /* Covariant cast for argument 0 (i) <var5:Int> isa OTHER */
1058 /* <var5:Int> isa OTHER */
1059 var8
= 1; /* easy <var5:Int> isa OTHER*/
1060 if (unlikely(!var8
)) {
1061 var_class_name
= type_kernel__Int
.name
;
1062 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1063 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
1066 var9
= var_res
+ var5
;
1073 CONTINUE_label
: (void)0;
1075 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
1078 BREAK_label
: (void)0;
1084 /* method abstract_collection#Set#hash for (self: Object): Int */
1085 long VIRTUAL_abstract_collection__Set__hash(val
* self
) {
1086 long var
/* : Int */;
1087 long var1
/* : Int */;
1088 var1
= abstract_collection__Set__hash(self
);
1093 /* method abstract_collection#MapRead#get_or_null for (self: MapRead[Object, nullable Object], Object): nullable Object */
1094 val
* abstract_collection__MapRead__get_or_null(val
* self
, val
* p0
) {
1095 val
* var
/* : nullable Object */;
1096 short int var1
/* : Bool */;
1099 const struct type
* type_struct
;
1100 const char* var_class_name
;
1101 val
* var_key
/* var key: Object */;
1102 short int var2
/* : Bool */;
1103 val
* var3
/* : nullable Object */;
1104 val
* var4
/* : null */;
1105 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1106 /* <p0:Object> isa MapRead#0 */
1107 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1108 cltype
= type_struct
->color
;
1109 idtype
= type_struct
->id
;
1110 if(cltype
>= p0
->type
->table_size
) {
1113 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1115 if (unlikely(!var1
)) {
1116 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1117 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapRead#0", var_class_name
);
1118 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 345);
1123 var2
= abstract_collection__MapRead__has_key(self
, var_key
);
1127 var3
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(self
, var_key
) /* [] on <self:MapRead[Object, nullable Object]>*/;
1139 /* method abstract_collection#MapRead#get_or_null for (self: Object, Object): nullable Object */
1140 val
* VIRTUAL_abstract_collection__MapRead__get_or_null(val
* self
, val
* p0
) {
1141 val
* var
/* : nullable Object */;
1142 val
* var1
/* : nullable Object */;
1143 var1
= abstract_collection__MapRead__get_or_null(self
, p0
);
1148 /* method abstract_collection#MapRead#has_key for (self: MapRead[Object, nullable Object], Object): Bool */
1149 short int abstract_collection__MapRead__has_key(val
* self
, val
* p0
) {
1150 short int var
/* : Bool */;
1151 short int var1
/* : Bool */;
1154 const struct type
* type_struct
;
1155 const char* var_class_name
;
1156 val
* var_key
/* var key: Object */;
1157 val
* var2
/* : Collection[Object] */;
1158 short int var3
/* : Bool */;
1159 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1160 /* <p0:Object> isa MapRead#0 */
1161 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1162 cltype
= type_struct
->color
;
1163 idtype
= type_struct
->id
;
1164 if(cltype
>= p0
->type
->table_size
) {
1167 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1169 if (unlikely(!var1
)) {
1170 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1171 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapRead#0", var_class_name
);
1172 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 372);
1177 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead__keys
]))(self
) /* keys on <self:MapRead[Object, nullable Object]>*/;
1180 var3
= ((short int (*)(val
*, val
*))(var2
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var2
, var_key
) /* has on <var2:Collection[Object]>*/;
1187 /* method abstract_collection#MapRead#has_key for (self: Object, Object): Bool */
1188 short int VIRTUAL_abstract_collection__MapRead__has_key(val
* self
, val
* p0
) {
1189 short int var
/* : Bool */;
1190 short int var1
/* : Bool */;
1191 var1
= abstract_collection__MapRead__has_key(self
, p0
);
1196 /* method abstract_collection#MapRead#provide_default_value for (self: MapRead[Object, nullable Object], Object): nullable Object */
1197 val
* abstract_collection__MapRead__provide_default_value(val
* self
, val
* p0
) {
1198 val
* var
/* : nullable Object */;
1199 short int var1
/* : Bool */;
1202 const struct type
* type_struct
;
1203 const char* var_class_name
;
1204 val
* var_key
/* var key: Object */;
1205 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1206 /* <p0:Object> isa MapRead#0 */
1207 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1208 cltype
= type_struct
->color
;
1209 idtype
= type_struct
->id
;
1210 if(cltype
>= p0
->type
->table_size
) {
1213 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1215 if (unlikely(!var1
)) {
1216 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1217 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapRead#0", var_class_name
);
1218 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 416);
1222 PRINT_ERROR("Runtime error: %s", "Aborted");
1223 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 421);
1228 /* method abstract_collection#MapRead#provide_default_value for (self: Object, Object): nullable Object */
1229 val
* VIRTUAL_abstract_collection__MapRead__provide_default_value(val
* self
, val
* p0
) {
1230 val
* var
/* : nullable Object */;
1231 val
* var1
/* : nullable Object */;
1232 var1
= abstract_collection__MapRead__provide_default_value(self
, p0
);
1237 /* method abstract_collection#MapKeysIterator#original_iterator for (self: MapKeysIterator[Object, nullable Object]): MapIterator[Object, nullable Object] */
1238 val
* abstract_collection__MapKeysIterator__original_iterator(val
* self
) {
1239 val
* var
/* : MapIterator[Object, nullable Object] */;
1240 val
* var1
/* : MapIterator[Object, nullable Object] */;
1241 var1
= self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
; /* _original_iterator on <self:MapKeysIterator[Object, nullable Object]> */
1242 if (unlikely(var1
== NULL
)) {
1243 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1244 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 531);
1251 /* method abstract_collection#MapKeysIterator#original_iterator for (self: Object): MapIterator[Object, nullable Object] */
1252 val
* VIRTUAL_abstract_collection__MapKeysIterator__original_iterator(val
* self
) {
1253 val
* var
/* : MapIterator[Object, nullable Object] */;
1254 val
* var1
/* : MapIterator[Object, nullable Object] */;
1255 val
* var3
/* : MapIterator[Object, nullable Object] */;
1256 { /* Inline abstract_collection#MapKeysIterator#original_iterator (self) on <self:Object(MapKeysIterator[Object, nullable Object])> */
1257 var3
= self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
; /* _original_iterator on <self:Object(MapKeysIterator[Object, nullable Object])> */
1258 if (unlikely(var3
== NULL
)) {
1259 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1260 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 531);
1270 /* method abstract_collection#MapKeysIterator#is_ok for (self: MapKeysIterator[Object, nullable Object]): Bool */
1271 short int abstract_collection__MapKeysIterator__is_ok(val
* self
) {
1272 short int var
/* : Bool */;
1273 val
* var1
/* : MapIterator[Object, nullable Object] */;
1274 val
* var3
/* : MapIterator[Object, nullable Object] */;
1275 short int var4
/* : Bool */;
1277 { /* Inline abstract_collection#MapKeysIterator#original_iterator (self) on <self:MapKeysIterator[Object, nullable Object]> */
1278 var3
= self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
; /* _original_iterator on <self:MapKeysIterator[Object, nullable Object]> */
1279 if (unlikely(var3
== NULL
)) {
1280 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1281 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 531);
1289 var4
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(var1
) /* is_ok on <var1:MapIterator[Object, nullable Object]>*/;
1296 /* method abstract_collection#MapKeysIterator#is_ok for (self: Object): Bool */
1297 short int VIRTUAL_abstract_collection__MapKeysIterator__is_ok(val
* self
) {
1298 short int var
/* : Bool */;
1299 short int var1
/* : Bool */;
1300 var1
= abstract_collection__MapKeysIterator__is_ok(self
);
1305 /* method abstract_collection#MapKeysIterator#next for (self: MapKeysIterator[Object, nullable Object]) */
1306 void abstract_collection__MapKeysIterator__next(val
* self
) {
1307 val
* var
/* : MapIterator[Object, nullable Object] */;
1308 val
* var2
/* : MapIterator[Object, nullable Object] */;
1310 { /* Inline abstract_collection#MapKeysIterator#original_iterator (self) on <self:MapKeysIterator[Object, nullable Object]> */
1311 var2
= self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
; /* _original_iterator on <self:MapKeysIterator[Object, nullable Object]> */
1312 if (unlikely(var2
== NULL
)) {
1313 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1314 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 531);
1322 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__MapIterator__next
]))(var
) /* next on <var:MapIterator[Object, nullable Object]>*/;
1326 /* method abstract_collection#MapKeysIterator#next for (self: Object) */
1327 void VIRTUAL_abstract_collection__MapKeysIterator__next(val
* self
) {
1328 abstract_collection__MapKeysIterator__next(self
); /* Direct call abstract_collection#MapKeysIterator#next on <self:Object(MapKeysIterator[Object, nullable Object])>*/
1331 /* method abstract_collection#MapKeysIterator#item for (self: MapKeysIterator[Object, nullable Object]): Object */
1332 val
* abstract_collection__MapKeysIterator__item(val
* self
) {
1333 val
* var
/* : Object */;
1334 val
* var1
/* : MapIterator[Object, nullable Object] */;
1335 val
* var3
/* : MapIterator[Object, nullable Object] */;
1336 val
* var4
/* : Object */;
1338 { /* Inline abstract_collection#MapKeysIterator#original_iterator (self) on <self:MapKeysIterator[Object, nullable Object]> */
1339 var3
= self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
; /* _original_iterator on <self:MapKeysIterator[Object, nullable Object]> */
1340 if (unlikely(var3
== NULL
)) {
1341 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1342 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 531);
1350 var4
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__key
]))(var1
) /* key on <var1:MapIterator[Object, nullable Object]>*/;
1357 /* method abstract_collection#MapKeysIterator#item for (self: Object): nullable Object */
1358 val
* VIRTUAL_abstract_collection__MapKeysIterator__item(val
* self
) {
1359 val
* var
/* : nullable Object */;
1360 val
* var1
/* : Object */;
1361 var1
= abstract_collection__MapKeysIterator__item(self
);
1366 /* method abstract_collection#MapKeysIterator#init for (self: MapKeysIterator[Object, nullable Object], MapIterator[Object, nullable Object]) */
1367 void abstract_collection__MapKeysIterator__init(val
* self
, val
* p0
) {
1368 short int var
/* : Bool */;
1371 const struct type
* type_struct
;
1372 const char* var_class_name
;
1373 /* Covariant cast for argument 0 (original_iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
1374 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
1375 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapKeysIterator_FT0abstract_collection__MapKeysIterator_FT1
];
1376 cltype
= type_struct
->color
;
1377 idtype
= type_struct
->id
;
1378 if(cltype
>= p0
->type
->table_size
) {
1381 var
= p0
->type
->type_table
[cltype
] == idtype
;
1383 if (unlikely(!var
)) {
1384 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1385 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[MapKeysIterator#0, MapKeysIterator#1]", var_class_name
);
1386 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 528);
1389 self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
= p0
; /* _original_iterator on <self:MapKeysIterator[Object, nullable Object]> */
1392 /* method abstract_collection#MapKeysIterator#init for (self: Object, MapIterator[Object, nullable Object]) */
1393 void VIRTUAL_abstract_collection__MapKeysIterator__init(val
* self
, val
* p0
) {
1394 short int var
/* : Bool */;
1397 const struct type
* type_struct
;
1398 const char* var_class_name
;
1399 { /* Inline abstract_collection#MapKeysIterator#init (self,p0) on <self:Object(MapKeysIterator[Object, nullable Object])> */
1400 /* Covariant cast for argument 0 (original_iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
1401 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
1402 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapKeysIterator_FT0abstract_collection__MapKeysIterator_FT1
];
1403 cltype
= type_struct
->color
;
1404 idtype
= type_struct
->id
;
1405 if(cltype
>= p0
->type
->table_size
) {
1408 var
= p0
->type
->type_table
[cltype
] == idtype
;
1410 if (unlikely(!var
)) {
1411 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1412 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[MapKeysIterator#0, MapKeysIterator#1]", var_class_name
);
1413 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 528);
1416 self
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
= p0
; /* _original_iterator on <self:Object(MapKeysIterator[Object, nullable Object])> */
1421 /* method abstract_collection#MapValuesIterator#original_iterator for (self: MapValuesIterator[Object, nullable Object]): MapIterator[Object, nullable Object] */
1422 val
* abstract_collection__MapValuesIterator__original_iterator(val
* self
) {
1423 val
* var
/* : MapIterator[Object, nullable Object] */;
1424 val
* var1
/* : MapIterator[Object, nullable Object] */;
1425 var1
= self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
; /* _original_iterator on <self:MapValuesIterator[Object, nullable Object]> */
1426 if (unlikely(var1
== NULL
)) {
1427 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1428 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 542);
1435 /* method abstract_collection#MapValuesIterator#original_iterator for (self: Object): MapIterator[Object, nullable Object] */
1436 val
* VIRTUAL_abstract_collection__MapValuesIterator__original_iterator(val
* self
) {
1437 val
* var
/* : MapIterator[Object, nullable Object] */;
1438 val
* var1
/* : MapIterator[Object, nullable Object] */;
1439 val
* var3
/* : MapIterator[Object, nullable Object] */;
1440 { /* Inline abstract_collection#MapValuesIterator#original_iterator (self) on <self:Object(MapValuesIterator[Object, nullable Object])> */
1441 var3
= self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
; /* _original_iterator on <self:Object(MapValuesIterator[Object, nullable Object])> */
1442 if (unlikely(var3
== NULL
)) {
1443 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1444 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 542);
1454 /* method abstract_collection#MapValuesIterator#is_ok for (self: MapValuesIterator[Object, nullable Object]): Bool */
1455 short int abstract_collection__MapValuesIterator__is_ok(val
* self
) {
1456 short int var
/* : Bool */;
1457 val
* var1
/* : MapIterator[Object, nullable Object] */;
1458 val
* var3
/* : MapIterator[Object, nullable Object] */;
1459 short int var4
/* : Bool */;
1461 { /* Inline abstract_collection#MapValuesIterator#original_iterator (self) on <self:MapValuesIterator[Object, nullable Object]> */
1462 var3
= self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
; /* _original_iterator on <self:MapValuesIterator[Object, nullable Object]> */
1463 if (unlikely(var3
== NULL
)) {
1464 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1465 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 542);
1473 var4
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(var1
) /* is_ok on <var1:MapIterator[Object, nullable Object]>*/;
1480 /* method abstract_collection#MapValuesIterator#is_ok for (self: Object): Bool */
1481 short int VIRTUAL_abstract_collection__MapValuesIterator__is_ok(val
* self
) {
1482 short int var
/* : Bool */;
1483 short int var1
/* : Bool */;
1484 var1
= abstract_collection__MapValuesIterator__is_ok(self
);
1489 /* method abstract_collection#MapValuesIterator#next for (self: MapValuesIterator[Object, nullable Object]) */
1490 void abstract_collection__MapValuesIterator__next(val
* self
) {
1491 val
* var
/* : MapIterator[Object, nullable Object] */;
1492 val
* var2
/* : MapIterator[Object, nullable Object] */;
1494 { /* Inline abstract_collection#MapValuesIterator#original_iterator (self) on <self:MapValuesIterator[Object, nullable Object]> */
1495 var2
= self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
; /* _original_iterator on <self:MapValuesIterator[Object, nullable Object]> */
1496 if (unlikely(var2
== NULL
)) {
1497 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1498 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 542);
1506 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__MapIterator__next
]))(var
) /* next on <var:MapIterator[Object, nullable Object]>*/;
1510 /* method abstract_collection#MapValuesIterator#next for (self: Object) */
1511 void VIRTUAL_abstract_collection__MapValuesIterator__next(val
* self
) {
1512 abstract_collection__MapValuesIterator__next(self
); /* Direct call abstract_collection#MapValuesIterator#next on <self:Object(MapValuesIterator[Object, nullable Object])>*/
1515 /* method abstract_collection#MapValuesIterator#item for (self: MapValuesIterator[Object, nullable Object]): nullable Object */
1516 val
* abstract_collection__MapValuesIterator__item(val
* self
) {
1517 val
* var
/* : nullable Object */;
1518 val
* var1
/* : MapIterator[Object, nullable Object] */;
1519 val
* var3
/* : MapIterator[Object, nullable Object] */;
1520 val
* var4
/* : nullable Object */;
1522 { /* Inline abstract_collection#MapValuesIterator#original_iterator (self) on <self:MapValuesIterator[Object, nullable Object]> */
1523 var3
= self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
; /* _original_iterator on <self:MapValuesIterator[Object, nullable Object]> */
1524 if (unlikely(var3
== NULL
)) {
1525 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _original_iterator");
1526 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 542);
1534 var4
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__item
]))(var1
) /* item on <var1:MapIterator[Object, nullable Object]>*/;
1541 /* method abstract_collection#MapValuesIterator#item for (self: Object): nullable Object */
1542 val
* VIRTUAL_abstract_collection__MapValuesIterator__item(val
* self
) {
1543 val
* var
/* : nullable Object */;
1544 val
* var1
/* : nullable Object */;
1545 var1
= abstract_collection__MapValuesIterator__item(self
);
1550 /* method abstract_collection#MapValuesIterator#init for (self: MapValuesIterator[Object, nullable Object], MapIterator[Object, nullable Object]) */
1551 void abstract_collection__MapValuesIterator__init(val
* self
, val
* p0
) {
1552 short int var
/* : Bool */;
1555 const struct type
* type_struct
;
1556 const char* var_class_name
;
1557 /* Covariant cast for argument 0 (original_iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
1558 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
1559 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapValuesIterator_FT0abstract_collection__MapValuesIterator_FT1
];
1560 cltype
= type_struct
->color
;
1561 idtype
= type_struct
->id
;
1562 if(cltype
>= p0
->type
->table_size
) {
1565 var
= p0
->type
->type_table
[cltype
] == idtype
;
1567 if (unlikely(!var
)) {
1568 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1569 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[MapValuesIterator#0, MapValuesIterator#1]", var_class_name
);
1570 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 539);
1573 self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
= p0
; /* _original_iterator on <self:MapValuesIterator[Object, nullable Object]> */
1576 /* method abstract_collection#MapValuesIterator#init for (self: Object, MapIterator[Object, nullable Object]) */
1577 void VIRTUAL_abstract_collection__MapValuesIterator__init(val
* self
, val
* p0
) {
1578 short int var
/* : Bool */;
1581 const struct type
* type_struct
;
1582 const char* var_class_name
;
1583 { /* Inline abstract_collection#MapValuesIterator#init (self,p0) on <self:Object(MapValuesIterator[Object, nullable Object])> */
1584 /* Covariant cast for argument 0 (original_iterator) <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
1585 /* <p0:MapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
1586 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapValuesIterator_FT0abstract_collection__MapValuesIterator_FT1
];
1587 cltype
= type_struct
->color
;
1588 idtype
= type_struct
->id
;
1589 if(cltype
>= p0
->type
->table_size
) {
1592 var
= p0
->type
->type_table
[cltype
] == idtype
;
1594 if (unlikely(!var
)) {
1595 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1596 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[MapValuesIterator#0, MapValuesIterator#1]", var_class_name
);
1597 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 539);
1600 self
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
= p0
; /* _original_iterator on <self:Object(MapValuesIterator[Object, nullable Object])> */
1605 /* method abstract_collection#SequenceRead#first for (self: SequenceRead[nullable Object]): nullable Object */
1606 val
* abstract_collection__SequenceRead__first(val
* self
) {
1607 val
* var
/* : nullable Object */;
1608 short int var1
/* : Bool */;
1609 short int var2
/* : Bool */;
1610 long var3
/* : Int */;
1611 val
* var4
/* : nullable Object */;
1613 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(self
) /* is_empty on <self:SequenceRead[nullable Object]>*/;
1616 if (unlikely(!var2
)) {
1617 PRINT_ERROR("Runtime error: %s", "Assert \'not_empty\' failed");
1618 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 567);
1623 var4
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var3
) /* [] on <self:SequenceRead[nullable Object]>*/;
1630 /* method abstract_collection#SequenceRead#first for (self: Object): nullable Object */
1631 val
* VIRTUAL_abstract_collection__SequenceRead__first(val
* self
) {
1632 val
* var
/* : nullable Object */;
1633 val
* var1
/* : nullable Object */;
1634 var1
= abstract_collection__SequenceRead__first(self
);
1639 /* method abstract_collection#SequenceRead#last for (self: SequenceRead[nullable Object]): nullable Object */
1640 val
* abstract_collection__SequenceRead__last(val
* self
) {
1641 val
* var
/* : nullable Object */;
1642 short int var1
/* : Bool */;
1643 short int var2
/* : Bool */;
1644 long var3
/* : Int */;
1645 long var4
/* : Int */;
1646 long var5
/* : Int */;
1647 short int var7
/* : Bool */;
1650 const char* var_class_name
;
1651 long var8
/* : Int */;
1652 val
* var9
/* : nullable Object */;
1654 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(self
) /* is_empty on <self:SequenceRead[nullable Object]>*/;
1657 if (unlikely(!var2
)) {
1658 PRINT_ERROR("Runtime error: %s", "Assert \'not_empty\' failed");
1659 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 592);
1663 var3
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:SequenceRead[nullable Object]>*/;
1667 { /* Inline kernel#Int#- (var3,var4) on <var3:Int> */
1668 /* Covariant cast for argument 0 (i) <var4:Int> isa OTHER */
1669 /* <var4:Int> isa OTHER */
1670 var7
= 1; /* easy <var4:Int> isa OTHER*/
1671 if (unlikely(!var7
)) {
1672 var_class_name
= type_kernel__Int
.name
;
1673 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1674 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 331);
1684 var9
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var5
) /* [] on <self:SequenceRead[nullable Object]>*/;
1691 /* method abstract_collection#SequenceRead#last for (self: Object): nullable Object */
1692 val
* VIRTUAL_abstract_collection__SequenceRead__last(val
* self
) {
1693 val
* var
/* : nullable Object */;
1694 val
* var1
/* : nullable Object */;
1695 var1
= abstract_collection__SequenceRead__last(self
);
1700 /* method abstract_collection#SequenceRead#index_of for (self: SequenceRead[nullable Object], nullable Object): Int */
1701 long abstract_collection__SequenceRead__index_of(val
* self
, val
* p0
) {
1702 long var
/* : Int */;
1703 short int var1
/* : Bool */;
1706 const struct type
* type_struct
;
1707 short int is_nullable
;
1708 const char* var_class_name
;
1709 val
* var_item
/* var item: nullable Object */;
1710 long var2
/* : Int */;
1711 long var3
/* : Int */;
1712 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa SequenceRead#0 */
1713 /* <p0:nullable Object> isa SequenceRead#0 */
1714 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SequenceRead_FT0
];
1715 cltype
= type_struct
->color
;
1716 idtype
= type_struct
->id
;
1717 is_nullable
= type_struct
->is_nullable
;
1721 if(cltype
>= p0
->type
->table_size
) {
1724 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1727 if (unlikely(!var1
)) {
1728 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1729 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "SequenceRead#0", var_class_name
);
1730 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 596);
1736 var3
= ((long (*)(val
*, val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead__index_of_from
]))(self
, var_item
, var2
) /* index_of_from on <self:SequenceRead[nullable Object]>*/;
1743 /* method abstract_collection#SequenceRead#index_of for (self: Object, nullable Object): Int */
1744 long VIRTUAL_abstract_collection__SequenceRead__index_of(val
* self
, val
* p0
) {
1745 long var
/* : Int */;
1746 long var1
/* : Int */;
1747 var1
= abstract_collection__SequenceRead__index_of(self
, p0
);
1752 /* method abstract_collection#SequenceRead#last_index_of for (self: SequenceRead[nullable Object], nullable Object): Int */
1753 long abstract_collection__SequenceRead__last_index_of(val
* self
, val
* p0
) {
1754 long var
/* : Int */;
1755 short int var1
/* : Bool */;
1758 const struct type
* type_struct
;
1759 short int is_nullable
;
1760 const char* var_class_name
;
1761 val
* var_item
/* var item: nullable Object */;
1762 long var2
/* : Int */;
1763 long var3
/* : Int */;
1764 long var4
/* : Int */;
1765 short int var6
/* : Bool */;
1768 const char* var_class_name9
;
1769 long var10
/* : Int */;
1770 long var11
/* : Int */;
1771 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa SequenceRead#0 */
1772 /* <p0:nullable Object> isa SequenceRead#0 */
1773 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SequenceRead_FT0
];
1774 cltype
= type_struct
->color
;
1775 idtype
= type_struct
->id
;
1776 is_nullable
= type_struct
->is_nullable
;
1780 if(cltype
>= p0
->type
->table_size
) {
1783 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1786 if (unlikely(!var1
)) {
1787 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1788 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "SequenceRead#0", var_class_name
);
1789 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 605);
1794 var2
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:SequenceRead[nullable Object]>*/;
1798 { /* Inline kernel#Int#- (var2,var3) on <var2:Int> */
1799 /* Covariant cast for argument 0 (i) <var3:Int> isa OTHER */
1800 /* <var3:Int> isa OTHER */
1801 var6
= 1; /* easy <var3:Int> isa OTHER*/
1802 if (unlikely(!var6
)) {
1803 var_class_name9
= type_kernel__Int
.name
;
1804 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name9
);
1805 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 331);
1808 var10
= var2
- var3
;
1815 var11
= ((long (*)(val
*, val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead__last_index_of_from
]))(self
, var_item
, var4
) /* last_index_of_from on <self:SequenceRead[nullable Object]>*/;
1822 /* method abstract_collection#SequenceRead#last_index_of for (self: Object, nullable Object): Int */
1823 long VIRTUAL_abstract_collection__SequenceRead__last_index_of(val
* self
, val
* p0
) {
1824 long var
/* : Int */;
1825 long var1
/* : Int */;
1826 var1
= abstract_collection__SequenceRead__last_index_of(self
, p0
);
1831 /* method abstract_collection#SequenceRead#index_of_from for (self: SequenceRead[nullable Object], nullable Object, Int): Int */
1832 long abstract_collection__SequenceRead__index_of_from(val
* self
, val
* p0
, long p1
) {
1833 long var
/* : Int */;
1834 short int var1
/* : Bool */;
1837 const struct type
* type_struct
;
1838 short int is_nullable
;
1839 const char* var_class_name
;
1840 val
* var_item
/* var item: nullable Object */;
1841 long var_pos
/* var pos: Int */;
1842 long var2
/* : Int */;
1843 long var_p
/* var p: Int */;
1844 val
* var3
/* : Iterator[nullable Object] */;
1845 val
* var_i
/* var i: IndexedIterator[nullable Object] */;
1846 short int var4
/* : Bool */;
1847 short int var5
/* : Bool */;
1848 short int var6
/* : Bool */;
1849 short int var8
/* : Bool */;
1852 const char* var_class_name11
;
1853 short int var12
/* : Bool */;
1854 short int var_
/* var : Bool */;
1855 val
* var13
/* : nullable Object */;
1856 short int var14
/* : Bool */;
1857 short int var15
/* : Bool */;
1858 long var16
/* : Int */;
1859 long var17
/* : Int */;
1860 long var18
/* : Int */;
1861 short int var20
/* : Bool */;
1864 const char* var_class_name23
;
1865 long var24
/* : Int */;
1866 long var25
/* : Int */;
1867 long var26
/* : Int */;
1868 long var28
/* : Int */;
1869 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa SequenceRead#0 */
1870 /* <p0:nullable Object> isa SequenceRead#0 */
1871 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SequenceRead_FT0
];
1872 cltype
= type_struct
->color
;
1873 idtype
= type_struct
->id
;
1874 is_nullable
= type_struct
->is_nullable
;
1878 if(cltype
>= p0
->type
->table_size
) {
1881 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1884 if (unlikely(!var1
)) {
1885 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1886 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "SequenceRead#0", var_class_name
);
1887 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 614);
1895 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:SequenceRead[nullable Object]>*/;
1900 var4
= ((short int (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_i
) /* is_ok on <var_i:IndexedIterator[nullable Object]>*/;
1904 { /* Inline kernel#Int#>= (var_p,var_pos) on <var_p:Int> */
1905 /* Covariant cast for argument 0 (i) <var_pos:Int> isa OTHER */
1906 /* <var_pos:Int> isa OTHER */
1907 var8
= 1; /* easy <var_pos:Int> isa OTHER*/
1908 if (unlikely(!var8
)) {
1909 var_class_name11
= type_kernel__Int
.name
;
1910 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name11
);
1911 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 326);
1914 var12
= var_p
>= var_pos
;
1923 var13
= ((val
* (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_i
) /* item on <var_i:IndexedIterator[nullable Object]>*/;
1925 if (var13
== NULL
) {
1926 var14
= (var_item
== NULL
);
1928 var15
= ((short int (*)(val
*, val
*))(var13
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var13
, var_item
) /* == on <var13:nullable Object>*/;
1937 var16
= ((long (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__IndexedIterator__index
]))(var_i
) /* index on <var_i:IndexedIterator[nullable Object]>*/;
1944 ((void (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_i
) /* next on <var_i:IndexedIterator[nullable Object]>*/;
1948 { /* Inline kernel#Int#+ (var_p,var17) on <var_p:Int> */
1949 /* Covariant cast for argument 0 (i) <var17:Int> isa OTHER */
1950 /* <var17:Int> isa OTHER */
1951 var20
= 1; /* easy <var17:Int> isa OTHER*/
1952 if (unlikely(!var20
)) {
1953 var_class_name23
= type_kernel__Int
.name
;
1954 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name23
);
1955 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
1958 var24
= var_p
+ var17
;
1961 RET_LABEL19
:(void)0;
1965 CONTINUE_label
: (void)0;
1967 BREAK_label
: (void)0;
1970 { /* Inline kernel#Int#unary - (var25) on <var25:Int> */
1974 RET_LABEL27
:(void)0;
1982 /* method abstract_collection#SequenceRead#index_of_from for (self: Object, nullable Object, Int): Int */
1983 long VIRTUAL_abstract_collection__SequenceRead__index_of_from(val
* self
, val
* p0
, long p1
) {
1984 long var
/* : Int */;
1985 long var1
/* : Int */;
1986 var1
= abstract_collection__SequenceRead__index_of_from(self
, p0
, p1
);
1991 /* method abstract_collection#SequenceRead#last_index_of_from for (self: SequenceRead[nullable Object], nullable Object, Int): Int */
1992 long abstract_collection__SequenceRead__last_index_of_from(val
* self
, val
* p0
, long p1
) {
1993 long var
/* : Int */;
1994 short int var1
/* : Bool */;
1997 const struct type
* type_struct
;
1998 short int is_nullable
;
1999 const char* var_class_name
;
2000 val
* var_item
/* var item: nullable Object */;
2001 long var_pos
/* var pos: Int */;
2002 long var2
/* : Int */;
2003 long var3
/* : Int */;
2004 long var5
/* : Int */;
2005 long var_res
/* var res: Int */;
2006 long var6
/* : Int */;
2007 long var_p
/* var p: Int */;
2008 val
* var7
/* : Iterator[nullable Object] */;
2009 val
* var_i
/* var i: IndexedIterator[nullable Object] */;
2010 short int var8
/* : Bool */;
2011 short int var9
/* : Bool */;
2012 short int var11
/* : Bool */;
2015 const char* var_class_name14
;
2016 short int var15
/* : Bool */;
2017 val
* var16
/* : nullable Object */;
2018 short int var17
/* : Bool */;
2019 short int var18
/* : Bool */;
2020 long var19
/* : Int */;
2021 long var20
/* : Int */;
2022 short int var22
/* : Bool */;
2025 const char* var_class_name25
;
2026 long var26
/* : Int */;
2027 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa SequenceRead#0 */
2028 /* <p0:nullable Object> isa SequenceRead#0 */
2029 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SequenceRead_FT0
];
2030 cltype
= type_struct
->color
;
2031 idtype
= type_struct
->id
;
2032 is_nullable
= type_struct
->is_nullable
;
2036 if(cltype
>= p0
->type
->table_size
) {
2039 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2042 if (unlikely(!var1
)) {
2043 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2044 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "SequenceRead#0", var_class_name
);
2045 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 634);
2052 { /* Inline kernel#Int#unary - (var2) on <var2:Int> */
2063 var7
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:SequenceRead[nullable Object]>*/;
2068 var8
= ((short int (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_i
) /* is_ok on <var_i:IndexedIterator[nullable Object]>*/;
2072 { /* Inline kernel#Int#> (var_p,var_pos) on <var_p:Int> */
2073 /* Covariant cast for argument 0 (i) <var_pos:Int> isa OTHER */
2074 /* <var_pos:Int> isa OTHER */
2075 var11
= 1; /* easy <var_pos:Int> isa OTHER*/
2076 if (unlikely(!var11
)) {
2077 var_class_name14
= type_kernel__Int
.name
;
2078 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name14
);
2079 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 327);
2082 var15
= var_p
> var_pos
;
2085 RET_LABEL10
:(void)0;
2093 var16
= ((val
* (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_i
) /* item on <var_i:IndexedIterator[nullable Object]>*/;
2095 if (var16
== NULL
) {
2096 var17
= (var_item
== NULL
);
2098 var18
= ((short int (*)(val
*, val
*))(var16
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var16
, var_item
) /* == on <var16:nullable Object>*/;
2106 ((void (*)(val
*))(var_i
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_i
) /* next on <var_i:IndexedIterator[nullable Object]>*/;
2110 { /* Inline kernel#Int#+ (var_p,var19) on <var_p:Int> */
2111 /* Covariant cast for argument 0 (i) <var19:Int> isa OTHER */
2112 /* <var19:Int> isa OTHER */
2113 var22
= 1; /* easy <var19:Int> isa OTHER*/
2114 if (unlikely(!var22
)) {
2115 var_class_name25
= type_kernel__Int
.name
;
2116 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name25
);
2117 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
2120 var26
= var_p
+ var19
;
2123 RET_LABEL21
:(void)0;
2127 CONTINUE_label
: (void)0;
2129 BREAK_label
: (void)0;
2135 /* method abstract_collection#SequenceRead#last_index_of_from for (self: Object, nullable Object, Int): Int */
2136 long VIRTUAL_abstract_collection__SequenceRead__last_index_of_from(val
* self
, val
* p0
, long p1
) {
2137 long var
/* : Int */;
2138 long var1
/* : Int */;
2139 var1
= abstract_collection__SequenceRead__last_index_of_from(self
, p0
, p1
);
2144 /* method abstract_collection#SequenceRead#== for (self: SequenceRead[nullable Object], nullable Object): Bool */
2145 short int abstract_collection__SequenceRead___61d_61d(val
* self
, val
* p0
) {
2146 short int var
/* : Bool */;
2147 val
* var_o
/* var o: nullable Object */;
2148 short int var1
/* : Bool */;
2151 short int var2
/* : Bool */;
2152 short int var3
/* : Bool */;
2153 long var4
/* : Int */;
2154 long var_l
/* var l: Int */;
2155 long var5
/* : Int */;
2156 short int var6
/* : Bool */;
2157 short int var7
/* : Bool */;
2158 short int var9
/* : Bool */;
2159 short int var10
/* : Bool */;
2160 short int var11
/* : Bool */;
2161 long var12
/* : Int */;
2162 long var_i
/* var i: Int */;
2163 short int var13
/* : Bool */;
2164 short int var15
/* : Bool */;
2167 const char* var_class_name
;
2168 short int var18
/* : Bool */;
2169 val
* var19
/* : nullable Object */;
2170 val
* var20
/* : nullable Object */;
2171 short int var21
/* : Bool */;
2172 short int var22
/* : Bool */;
2173 short int var23
/* : Bool */;
2174 long var24
/* : Int */;
2175 long var25
/* : Int */;
2176 short int var27
/* : Bool */;
2179 const char* var_class_name30
;
2180 long var31
/* : Int */;
2181 short int var32
/* : Bool */;
2183 /* <var_o:nullable Object> isa SequenceRead[nullable Object] */
2184 cltype
= type_abstract_collection__SequenceReadnullable_kernel__Object
.color
;
2185 idtype
= type_abstract_collection__SequenceReadnullable_kernel__Object
.id
;
2189 if(cltype
>= var_o
->type
->table_size
) {
2192 var1
= var_o
->type
->type_table
[cltype
] == idtype
;
2203 var4
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:SequenceRead[nullable Object]>*/;
2207 var5
= ((long (*)(val
*))(var_o
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_o
) /* length on <var_o:nullable Object(SequenceRead[nullable Object])>*/;
2210 { /* Inline kernel#Int#!= (var5,var_l) on <var5:Int> */
2211 var9
= var5
== var_l
;
2229 { /* Inline kernel#Int#< (var_i,var_l) on <var_i:Int> */
2230 /* Covariant cast for argument 0 (i) <var_l:Int> isa OTHER */
2231 /* <var_l:Int> isa OTHER */
2232 var15
= 1; /* easy <var_l:Int> isa OTHER*/
2233 if (unlikely(!var15
)) {
2234 var_class_name
= type_kernel__Int
.name
;
2235 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2236 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 325);
2239 var18
= var_i
< var_l
;
2242 RET_LABEL14
:(void)0;
2247 var19
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var_i
) /* [] on <self:SequenceRead[nullable Object]>*/;
2250 var20
= ((val
* (*)(val
*, long))(var_o
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(var_o
, var_i
) /* [] on <var_o:nullable Object(SequenceRead[nullable Object])>*/;
2252 if (var19
== NULL
) {
2253 var21
= (var20
!= NULL
);
2255 var22
= ((short int (*)(val
*, val
*))(var19
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var19
, var20
) /* != on <var19:nullable Object>*/;
2266 { /* Inline kernel#Int#+ (var_i,var24) on <var_i:Int> */
2267 /* Covariant cast for argument 0 (i) <var24:Int> isa OTHER */
2268 /* <var24:Int> isa OTHER */
2269 var27
= 1; /* easy <var24:Int> isa OTHER*/
2270 if (unlikely(!var27
)) {
2271 var_class_name30
= type_kernel__Int
.name
;
2272 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name30
);
2273 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
2276 var31
= var_i
+ var24
;
2279 RET_LABEL26
:(void)0;
2283 CONTINUE_label
: (void)0;
2285 BREAK_label
: (void)0;
2292 /* method abstract_collection#SequenceRead#== for (self: Object, nullable Object): Bool */
2293 short int VIRTUAL_abstract_collection__SequenceRead___61d_61d(val
* self
, val
* p0
) {
2294 short int var
/* : Bool */;
2295 short int var1
/* : Bool */;
2296 var1
= abstract_collection__SequenceRead___61d_61d(self
, p0
);
2301 /* method abstract_collection#SequenceRead#hash for (self: SequenceRead[nullable Object]): Int */
2302 long abstract_collection__SequenceRead__hash(val
* self
) {
2303 long var
/* : Int */;
2304 long var1
/* : Int */;
2305 long var_res
/* var res: Int */;
2306 val
* var2
/* : Iterator[nullable Object] */;
2307 short int var3
/* : Bool */;
2308 val
* var4
/* : nullable Object */;
2309 val
* var_e
/* var e: nullable Object */;
2310 long var5
/* : Int */;
2311 long var6
/* : Int */;
2312 short int var8
/* : Bool */;
2315 const char* var_class_name
;
2316 long var9
/* : Int */;
2320 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:SequenceRead[nullable Object]>*/;
2324 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
2328 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
2332 var5
= kernel__Int__hash(var_res
);
2335 { /* Inline kernel#Int#+ (var_res,var5) on <var_res:Int> */
2336 /* Covariant cast for argument 0 (i) <var5:Int> isa OTHER */
2337 /* <var5:Int> isa OTHER */
2338 var8
= 1; /* easy <var5:Int> isa OTHER*/
2339 if (unlikely(!var8
)) {
2340 var_class_name
= type_kernel__Int
.name
;
2341 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2342 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
2345 var9
= var_res
+ var5
;
2352 CONTINUE_label
: (void)0;
2354 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
2357 BREAK_label
: (void)0;
2363 /* method abstract_collection#SequenceRead#hash for (self: Object): Int */
2364 long VIRTUAL_abstract_collection__SequenceRead__hash(val
* self
) {
2365 long var
/* : Int */;
2366 long var1
/* : Int */;
2367 var1
= abstract_collection__SequenceRead__hash(self
);
2372 /* method abstract_collection#SequenceRead#iterator_from for (self: SequenceRead[nullable Object], Int): IndexedIterator[nullable Object] */
2373 val
* abstract_collection__SequenceRead__iterator_from(val
* self
, long p0
) {
2374 val
* var
/* : IndexedIterator[nullable Object] */;
2375 long var_pos
/* var pos: Int */;
2376 val
* var1
/* : Iterator[nullable Object] */;
2377 val
* var_res
/* var res: IndexedIterator[nullable Object] */;
2378 short int var2
/* : Bool */;
2379 long var3
/* : Int */;
2380 short int var4
/* : Bool */;
2381 short int var6
/* : Bool */;
2384 const char* var_class_name
;
2385 short int var7
/* : Bool */;
2386 short int var_
/* var : Bool */;
2387 short int var8
/* : Bool */;
2388 long var9
/* : Int */;
2389 long var10
/* : Int */;
2390 short int var12
/* : Bool */;
2393 const char* var_class_name15
;
2394 long var16
/* : Int */;
2397 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:SequenceRead[nullable Object]>*/;
2403 { /* Inline kernel#Int#> (var_pos,var3) on <var_pos:Int> */
2404 /* Covariant cast for argument 0 (i) <var3:Int> isa OTHER */
2405 /* <var3:Int> isa OTHER */
2406 var6
= 1; /* easy <var3:Int> isa OTHER*/
2407 if (unlikely(!var6
)) {
2408 var_class_name
= type_kernel__Int
.name
;
2409 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2410 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 327);
2413 var7
= var_pos
> var3
;
2422 var8
= ((short int (*)(val
*))(var_res
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_res
) /* is_ok on <var_res:IndexedIterator[nullable Object]>*/;
2430 ((void (*)(val
*))(var_res
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_res
) /* next on <var_res:IndexedIterator[nullable Object]>*/;
2434 { /* Inline kernel#Int#- (var_pos,var9) on <var_pos:Int> */
2435 /* Covariant cast for argument 0 (i) <var9:Int> isa OTHER */
2436 /* <var9:Int> isa OTHER */
2437 var12
= 1; /* easy <var9:Int> isa OTHER*/
2438 if (unlikely(!var12
)) {
2439 var_class_name15
= type_kernel__Int
.name
;
2440 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name15
);
2441 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 331);
2444 var16
= var_pos
- var9
;
2447 RET_LABEL11
:(void)0;
2451 CONTINUE_label
: (void)0;
2453 BREAK_label
: (void)0;
2459 /* method abstract_collection#SequenceRead#iterator_from for (self: Object, Int): IndexedIterator[nullable Object] */
2460 val
* VIRTUAL_abstract_collection__SequenceRead__iterator_from(val
* self
, long p0
) {
2461 val
* var
/* : IndexedIterator[nullable Object] */;
2462 val
* var1
/* : IndexedIterator[nullable Object] */;
2463 var1
= abstract_collection__SequenceRead__iterator_from(self
, p0
);
2468 /* method abstract_collection#Sequence#first= for (self: Sequence[nullable Object], nullable Object) */
2469 void abstract_collection__Sequence__first_61d(val
* self
, val
* p0
) {
2470 short int var
/* : Bool */;
2473 const struct type
* type_struct
;
2474 short int is_nullable
;
2475 const char* var_class_name
;
2476 val
* var_item
/* var item: nullable Object */;
2477 long var1
/* : Int */;
2478 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Sequence#0 */
2479 /* <p0:nullable Object> isa Sequence#0 */
2480 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
2481 cltype
= type_struct
->color
;
2482 idtype
= type_struct
->id
;
2483 is_nullable
= type_struct
->is_nullable
;
2487 if(cltype
>= p0
->type
->table_size
) {
2490 var
= p0
->type
->type_table
[cltype
] == idtype
;
2493 if (unlikely(!var
)) {
2494 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2495 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
2496 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 728);
2502 ((void (*)(val
*, long, val
*))(self
->class->vft
[COLOR_abstract_collection__Sequence___91d_93d_61d
]))(self
, var1
, var_item
) /* []= on <self:Sequence[nullable Object]>*/;
2506 /* method abstract_collection#Sequence#first= for (self: Object, nullable Object) */
2507 void VIRTUAL_abstract_collection__Sequence__first_61d(val
* self
, val
* p0
) {
2508 abstract_collection__Sequence__first_61d(self
, p0
); /* Direct call abstract_collection#Sequence#first= on <self:Object(Sequence[nullable Object])>*/
2511 /* method abstract_collection#Sequence#add for (self: Sequence[nullable Object], nullable Object) */
2512 void abstract_collection__Sequence__add(val
* self
, val
* p0
) {
2513 short int var
/* : Bool */;
2516 const struct type
* type_struct
;
2517 short int is_nullable
;
2518 const char* var_class_name
;
2519 val
* var_e
/* var e: nullable Object */;
2520 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa SimpleCollection#0 */
2521 /* <p0:nullable Object> isa SimpleCollection#0 */
2522 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SimpleCollection_FT0
];
2523 cltype
= type_struct
->color
;
2524 idtype
= type_struct
->id
;
2525 is_nullable
= type_struct
->is_nullable
;
2529 if(cltype
>= p0
->type
->table_size
) {
2532 var
= p0
->type
->type_table
[cltype
] == idtype
;
2535 if (unlikely(!var
)) {
2536 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2537 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "SimpleCollection#0", var_class_name
);
2538 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 759);
2543 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(self
, var_e
) /* push on <self:Sequence[nullable Object]>*/;
2547 /* method abstract_collection#Sequence#add for (self: Object, nullable Object) */
2548 void VIRTUAL_abstract_collection__Sequence__add(val
* self
, val
* p0
) {
2549 abstract_collection__Sequence__add(self
, p0
); /* Direct call abstract_collection#Sequence#add on <self:Object(Sequence[nullable Object])>*/
2552 /* method abstract_collection#Sequence#append for (self: Sequence[nullable Object], Collection[nullable Object]) */
2553 void abstract_collection__Sequence__append(val
* self
, val
* p0
) {
2554 short int var
/* : Bool */;
2557 const struct type
* type_struct
;
2558 const char* var_class_name
;
2559 val
* var_coll
/* var coll: Collection[nullable Object] */;
2560 val
* var1
/* : Iterator[nullable Object] */;
2561 short int var2
/* : Bool */;
2562 val
* var3
/* : nullable Object */;
2563 val
* var_i
/* var i: nullable Object */;
2564 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[Sequence#0] */
2565 /* <p0:Collection[nullable Object]> isa Collection[Sequence#0] */
2566 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionabstract_collection__Sequence_FT0
];
2567 cltype
= type_struct
->color
;
2568 idtype
= type_struct
->id
;
2569 if(cltype
>= p0
->type
->table_size
) {
2572 var
= p0
->type
->type_table
[cltype
] == idtype
;
2574 if (unlikely(!var
)) {
2575 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2576 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[Sequence#0]", var_class_name
);
2577 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 770);
2582 var1
= ((val
* (*)(val
*))(var_coll
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_coll
) /* iterator on <var_coll:Collection[nullable Object]>*/;
2586 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:Iterator[nullable Object]>*/;
2590 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[nullable Object]>*/;
2594 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(self
, var_i
) /* push on <self:Sequence[nullable Object]>*/;
2596 CONTINUE_label
: (void)0;
2598 ((void (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var1
) /* next on <var1:Iterator[nullable Object]>*/;
2601 BREAK_label
: (void)0;
2604 /* method abstract_collection#Sequence#append for (self: Object, Collection[nullable Object]) */
2605 void VIRTUAL_abstract_collection__Sequence__append(val
* self
, val
* p0
) {
2606 abstract_collection__Sequence__append(self
, p0
); /* Direct call abstract_collection#Sequence#append on <self:Object(Sequence[nullable Object])>*/
2609 /* method abstract_collection#Sequence#pop for (self: Sequence[nullable Object]): nullable Object */
2610 val
* abstract_collection__Sequence__pop(val
* self
) {
2611 val
* var
/* : nullable Object */;
2612 const char* var_class_name
;
2613 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2614 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "pop", var_class_name
);
2615 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 777);
2620 /* method abstract_collection#Sequence#pop for (self: Object): nullable Object */
2621 val
* VIRTUAL_abstract_collection__Sequence__pop(val
* self
) {
2622 val
* var
/* : nullable Object */;
2623 val
* var1
/* : nullable Object */;
2624 const char* var_class_name
;
2625 { /* Inline abstract_collection#Sequence#pop (self) on <self:Object(Sequence[nullable Object])> */
2626 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2627 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "pop", var_class_name
);
2628 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 777);
2636 /* method abstract_collection#Sequence#unshift for (self: Sequence[nullable Object], nullable Object) */
2637 void abstract_collection__Sequence__unshift(val
* self
, val
* p0
) {
2638 short int var
/* : Bool */;
2641 const struct type
* type_struct
;
2642 short int is_nullable
;
2643 const char* var_class_name
;
2644 const char* var_class_name1
;
2645 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Sequence#0 */
2646 /* <p0:nullable Object> isa Sequence#0 */
2647 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
2648 cltype
= type_struct
->color
;
2649 idtype
= type_struct
->id
;
2650 is_nullable
= type_struct
->is_nullable
;
2654 if(cltype
>= p0
->type
->table_size
) {
2657 var
= p0
->type
->type_table
[cltype
] == idtype
;
2660 if (unlikely(!var
)) {
2661 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2662 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
2663 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 787);
2666 var_class_name1
= self
== NULL ?
"null" : self
->type
->name
;
2667 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "unshift", var_class_name1
);
2668 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 787);
2672 /* method abstract_collection#Sequence#unshift for (self: Object, nullable Object) */
2673 void VIRTUAL_abstract_collection__Sequence__unshift(val
* self
, val
* p0
) {
2674 short int var
/* : Bool */;
2677 const struct type
* type_struct
;
2678 short int is_nullable
;
2679 const char* var_class_name
;
2680 const char* var_class_name2
;
2681 { /* Inline abstract_collection#Sequence#unshift (self,p0) on <self:Object(Sequence[nullable Object])> */
2682 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Sequence#0 */
2683 /* <p0:nullable Object> isa Sequence#0 */
2684 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
2685 cltype
= type_struct
->color
;
2686 idtype
= type_struct
->id
;
2687 is_nullable
= type_struct
->is_nullable
;
2691 if(cltype
>= p0
->type
->table_size
) {
2694 var
= p0
->type
->type_table
[cltype
] == idtype
;
2697 if (unlikely(!var
)) {
2698 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2699 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
2700 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 787);
2703 var_class_name2
= self
== NULL ?
"null" : self
->type
->name
;
2704 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "unshift", var_class_name2
);
2705 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 787);
2711 /* method abstract_collection#Sequence#shift for (self: Sequence[nullable Object]): nullable Object */
2712 val
* abstract_collection__Sequence__shift(val
* self
) {
2713 val
* var
/* : nullable Object */;
2714 const char* var_class_name
;
2715 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2716 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "shift", var_class_name
);
2717 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 795);
2722 /* method abstract_collection#Sequence#shift for (self: Object): nullable Object */
2723 val
* VIRTUAL_abstract_collection__Sequence__shift(val
* self
) {
2724 val
* var
/* : nullable Object */;
2725 val
* var1
/* : nullable Object */;
2726 const char* var_class_name
;
2727 { /* Inline abstract_collection#Sequence#shift (self) on <self:Object(Sequence[nullable Object])> */
2728 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2729 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "shift", var_class_name
);
2730 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 795);
2738 /* method abstract_collection#Sequence#remove_at for (self: Sequence[nullable Object], Int) */
2739 void abstract_collection__Sequence__remove_at(val
* self
, long p0
) {
2740 const char* var_class_name
;
2741 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2742 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "remove_at", var_class_name
);
2743 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 831);
2747 /* method abstract_collection#Sequence#remove_at for (self: Object, Int) */
2748 void VIRTUAL_abstract_collection__Sequence__remove_at(val
* self
, long p0
) {
2749 const char* var_class_name
;
2750 { /* Inline abstract_collection#Sequence#remove_at (self,p0) on <self:Object(Sequence[nullable Object])> */
2751 var_class_name
= self
== NULL ?
"null" : self
->type
->name
;
2752 PRINT_ERROR("Runtime error: Abstract method `%s` called on `%s`", "remove_at", var_class_name
);
2753 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 831);
2759 /* method abstract_collection#CoupleMap#iterator for (self: CoupleMap[Object, nullable Object]): MapIterator[Object, nullable Object] */
2760 val
* abstract_collection__CoupleMap__iterator(val
* self
) {
2761 val
* var
/* : MapIterator[Object, nullable Object] */;
2762 val
* var1
/* : CoupleMapIterator[Object, nullable Object] */;
2763 val
* var2
/* : Iterator[Couple[Object, nullable Object]] */;
2764 var1
= NEW_abstract_collection__CoupleMapIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__CoupleMapIteratorabstract_collection__CoupleMap_FT0abstract_collection__CoupleMap_FT1
]);
2766 var2
= array__ArrayMap__couple_iterator(self
);
2769 abstract_collection__CoupleMapIterator__init(var1
, var2
); /* Direct call abstract_collection#CoupleMapIterator#init on <var1:CoupleMapIterator[Object, nullable Object]>*/
2776 /* method abstract_collection#CoupleMap#iterator for (self: Object): MapIterator[Object, nullable Object] */
2777 val
* VIRTUAL_abstract_collection__CoupleMap__iterator(val
* self
) {
2778 val
* var
/* : MapIterator[Object, nullable Object] */;
2779 val
* var1
/* : MapIterator[Object, nullable Object] */;
2780 var1
= abstract_collection__CoupleMap__iterator(self
);
2785 /* method abstract_collection#CoupleMapIterator#item for (self: CoupleMapIterator[Object, nullable Object]): nullable Object */
2786 val
* abstract_collection__CoupleMapIterator__item(val
* self
) {
2787 val
* var
/* : nullable Object */;
2788 val
* var1
/* : Iterator[Couple[Object, nullable Object]] */;
2789 val
* var2
/* : nullable Object */;
2790 val
* var3
/* : nullable Object */;
2791 val
* var5
/* : nullable Object */;
2792 var1
= self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
2793 if (unlikely(var1
== NULL
)) {
2794 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _iter");
2795 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 879);
2799 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[Couple[Object, nullable Object]]>*/;
2802 { /* Inline abstract_collection#Couple#second (var2) on <var2:nullable Object(Couple[Object, nullable Object])> */
2803 var5
= var2
->attrs
[COLOR_abstract_collection__Couple___second
].val
; /* _second on <var2:nullable Object(Couple[Object, nullable Object])> */
2813 /* method abstract_collection#CoupleMapIterator#item for (self: Object): nullable Object */
2814 val
* VIRTUAL_abstract_collection__CoupleMapIterator__item(val
* self
) {
2815 val
* var
/* : nullable Object */;
2816 val
* var1
/* : nullable Object */;
2817 var1
= abstract_collection__CoupleMapIterator__item(self
);
2822 /* method abstract_collection#CoupleMapIterator#key for (self: CoupleMapIterator[Object, nullable Object]): Object */
2823 val
* abstract_collection__CoupleMapIterator__key(val
* self
) {
2824 val
* var
/* : Object */;
2825 val
* var1
/* : Iterator[Couple[Object, nullable Object]] */;
2826 val
* var2
/* : nullable Object */;
2827 val
* var3
/* : nullable Object */;
2828 val
* var5
/* : nullable Object */;
2829 var1
= self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
2830 if (unlikely(var1
== NULL
)) {
2831 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _iter");
2832 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 883);
2836 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[Couple[Object, nullable Object]]>*/;
2839 { /* Inline abstract_collection#Couple#first (var2) on <var2:nullable Object(Couple[Object, nullable Object])> */
2840 var5
= var2
->attrs
[COLOR_abstract_collection__Couple___first
].val
; /* _first on <var2:nullable Object(Couple[Object, nullable Object])> */
2850 /* method abstract_collection#CoupleMapIterator#key for (self: Object): Object */
2851 val
* VIRTUAL_abstract_collection__CoupleMapIterator__key(val
* self
) {
2852 val
* var
/* : Object */;
2853 val
* var1
/* : Object */;
2854 var1
= abstract_collection__CoupleMapIterator__key(self
);
2859 /* method abstract_collection#CoupleMapIterator#is_ok for (self: CoupleMapIterator[Object, nullable Object]): Bool */
2860 short int abstract_collection__CoupleMapIterator__is_ok(val
* self
) {
2861 short int var
/* : Bool */;
2862 val
* var1
/* : Iterator[Couple[Object, nullable Object]] */;
2863 short int var2
/* : Bool */;
2864 var1
= self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
2865 if (unlikely(var1
== NULL
)) {
2866 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _iter");
2867 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 885);
2871 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:Iterator[Couple[Object, nullable Object]]>*/;
2878 /* method abstract_collection#CoupleMapIterator#is_ok for (self: Object): Bool */
2879 short int VIRTUAL_abstract_collection__CoupleMapIterator__is_ok(val
* self
) {
2880 short int var
/* : Bool */;
2881 short int var1
/* : Bool */;
2882 var1
= abstract_collection__CoupleMapIterator__is_ok(self
);
2887 /* method abstract_collection#CoupleMapIterator#next for (self: CoupleMapIterator[Object, nullable Object]) */
2888 void abstract_collection__CoupleMapIterator__next(val
* self
) {
2889 val
* var
/* : Iterator[Couple[Object, nullable Object]] */;
2890 var
= self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
2891 if (unlikely(var
== NULL
)) {
2892 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _iter");
2893 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 889);
2897 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var
) /* next on <var:Iterator[Couple[Object, nullable Object]]>*/;
2901 /* method abstract_collection#CoupleMapIterator#next for (self: Object) */
2902 void VIRTUAL_abstract_collection__CoupleMapIterator__next(val
* self
) {
2903 abstract_collection__CoupleMapIterator__next(self
); /* Direct call abstract_collection#CoupleMapIterator#next on <self:Object(CoupleMapIterator[Object, nullable Object])>*/
2906 /* method abstract_collection#CoupleMapIterator#init for (self: CoupleMapIterator[Object, nullable Object], Iterator[Couple[Object, nullable Object]]) */
2907 void abstract_collection__CoupleMapIterator__init(val
* self
, val
* p0
) {
2908 short int var
/* : Bool */;
2911 const struct type
* type_struct
;
2912 const char* var_class_name
;
2913 val
* var_i
/* var i: Iterator[Couple[Object, nullable Object]] */;
2914 /* Covariant cast for argument 0 (i) <p0:Iterator[Couple[Object, nullable Object]]> isa Iterator[Couple[CoupleMapIterator#0, CoupleMapIterator#1]] */
2915 /* <p0:Iterator[Couple[Object, nullable Object]]> isa Iterator[Couple[CoupleMapIterator#0, CoupleMapIterator#1]] */
2916 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Iteratorabstract_collection__Coupleabstract_collection__CoupleMapIterator_FT0abstract_collection__CoupleMapIterator_FT1
];
2917 cltype
= type_struct
->color
;
2918 idtype
= type_struct
->id
;
2919 if(cltype
>= p0
->type
->table_size
) {
2922 var
= p0
->type
->type_table
[cltype
] == idtype
;
2924 if (unlikely(!var
)) {
2925 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2926 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Iterator[Couple[CoupleMapIterator#0, CoupleMapIterator#1]]", var_class_name
);
2927 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 894);
2931 self
->attrs
[COLOR_abstract_collection__CoupleMapIterator___iter
].val
= var_i
; /* _iter on <self:CoupleMapIterator[Object, nullable Object]> */
2934 /* method abstract_collection#CoupleMapIterator#init for (self: Object, Iterator[Couple[Object, nullable Object]]) */
2935 void VIRTUAL_abstract_collection__CoupleMapIterator__init(val
* self
, val
* p0
) {
2936 abstract_collection__CoupleMapIterator__init(self
, p0
); /* Direct call abstract_collection#CoupleMapIterator#init on <self:Object(CoupleMapIterator[Object, nullable Object])>*/
2939 /* method abstract_collection#Couple#first for (self: Couple[nullable Object, nullable Object]): nullable Object */
2940 val
* abstract_collection__Couple__first(val
* self
) {
2941 val
* var
/* : nullable Object */;
2942 val
* var1
/* : nullable Object */;
2943 var1
= self
->attrs
[COLOR_abstract_collection__Couple___first
].val
; /* _first on <self:Couple[nullable Object, nullable Object]> */
2948 /* method abstract_collection#Couple#first for (self: Object): nullable Object */
2949 val
* VIRTUAL_abstract_collection__Couple__first(val
* self
) {
2950 val
* var
/* : nullable Object */;
2951 val
* var1
/* : nullable Object */;
2952 val
* var3
/* : nullable Object */;
2953 { /* Inline abstract_collection#Couple#first (self) on <self:Object(Couple[nullable Object, nullable Object])> */
2954 var3
= self
->attrs
[COLOR_abstract_collection__Couple___first
].val
; /* _first on <self:Object(Couple[nullable Object, nullable Object])> */
2962 /* method abstract_collection#Couple#first= for (self: Couple[nullable Object, nullable Object], nullable Object) */
2963 void abstract_collection__Couple__first_61d(val
* self
, val
* p0
) {
2964 short int var
/* : Bool */;
2967 const struct type
* type_struct
;
2968 short int is_nullable
;
2969 const char* var_class_name
;
2970 /* Covariant cast for argument 0 (first) <p0:nullable Object> isa Couple#0 */
2971 /* <p0:nullable Object> isa Couple#0 */
2972 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT0
];
2973 cltype
= type_struct
->color
;
2974 idtype
= type_struct
->id
;
2975 is_nullable
= type_struct
->is_nullable
;
2979 if(cltype
>= p0
->type
->table_size
) {
2982 var
= p0
->type
->type_table
[cltype
] == idtype
;
2985 if (unlikely(!var
)) {
2986 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2987 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Couple#0", var_class_name
);
2988 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 902);
2991 self
->attrs
[COLOR_abstract_collection__Couple___first
].val
= p0
; /* _first on <self:Couple[nullable Object, nullable Object]> */
2994 /* method abstract_collection#Couple#first= for (self: Object, nullable Object) */
2995 void VIRTUAL_abstract_collection__Couple__first_61d(val
* self
, val
* p0
) {
2996 short int var
/* : Bool */;
2999 const struct type
* type_struct
;
3000 short int is_nullable
;
3001 const char* var_class_name
;
3002 { /* Inline abstract_collection#Couple#first= (self,p0) on <self:Object(Couple[nullable Object, nullable Object])> */
3003 /* Covariant cast for argument 0 (first) <p0:nullable Object> isa Couple#0 */
3004 /* <p0:nullable Object> isa Couple#0 */
3005 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT0
];
3006 cltype
= type_struct
->color
;
3007 idtype
= type_struct
->id
;
3008 is_nullable
= type_struct
->is_nullable
;
3012 if(cltype
>= p0
->type
->table_size
) {
3015 var
= p0
->type
->type_table
[cltype
] == idtype
;
3018 if (unlikely(!var
)) {
3019 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3020 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Couple#0", var_class_name
);
3021 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 902);
3024 self
->attrs
[COLOR_abstract_collection__Couple___first
].val
= p0
; /* _first on <self:Object(Couple[nullable Object, nullable Object])> */
3029 /* method abstract_collection#Couple#second for (self: Couple[nullable Object, nullable Object]): nullable Object */
3030 val
* abstract_collection__Couple__second(val
* self
) {
3031 val
* var
/* : nullable Object */;
3032 val
* var1
/* : nullable Object */;
3033 var1
= self
->attrs
[COLOR_abstract_collection__Couple___second
].val
; /* _second on <self:Couple[nullable Object, nullable Object]> */
3038 /* method abstract_collection#Couple#second for (self: Object): nullable Object */
3039 val
* VIRTUAL_abstract_collection__Couple__second(val
* self
) {
3040 val
* var
/* : nullable Object */;
3041 val
* var1
/* : nullable Object */;
3042 val
* var3
/* : nullable Object */;
3043 { /* Inline abstract_collection#Couple#second (self) on <self:Object(Couple[nullable Object, nullable Object])> */
3044 var3
= self
->attrs
[COLOR_abstract_collection__Couple___second
].val
; /* _second on <self:Object(Couple[nullable Object, nullable Object])> */
3052 /* method abstract_collection#Couple#second= for (self: Couple[nullable Object, nullable Object], nullable Object) */
3053 void abstract_collection__Couple__second_61d(val
* self
, val
* p0
) {
3054 short int var
/* : Bool */;
3057 const struct type
* type_struct
;
3058 short int is_nullable
;
3059 const char* var_class_name
;
3060 /* Covariant cast for argument 0 (second) <p0:nullable Object> isa Couple#1 */
3061 /* <p0:nullable Object> isa Couple#1 */
3062 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT1
];
3063 cltype
= type_struct
->color
;
3064 idtype
= type_struct
->id
;
3065 is_nullable
= type_struct
->is_nullable
;
3069 if(cltype
>= p0
->type
->table_size
) {
3072 var
= p0
->type
->type_table
[cltype
] == idtype
;
3075 if (unlikely(!var
)) {
3076 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3077 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Couple#1", var_class_name
);
3078 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 905);
3081 self
->attrs
[COLOR_abstract_collection__Couple___second
].val
= p0
; /* _second on <self:Couple[nullable Object, nullable Object]> */
3084 /* method abstract_collection#Couple#second= for (self: Object, nullable Object) */
3085 void VIRTUAL_abstract_collection__Couple__second_61d(val
* self
, val
* p0
) {
3086 short int var
/* : Bool */;
3089 const struct type
* type_struct
;
3090 short int is_nullable
;
3091 const char* var_class_name
;
3092 { /* Inline abstract_collection#Couple#second= (self,p0) on <self:Object(Couple[nullable Object, nullable Object])> */
3093 /* Covariant cast for argument 0 (second) <p0:nullable Object> isa Couple#1 */
3094 /* <p0:nullable Object> isa Couple#1 */
3095 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT1
];
3096 cltype
= type_struct
->color
;
3097 idtype
= type_struct
->id
;
3098 is_nullable
= type_struct
->is_nullable
;
3102 if(cltype
>= p0
->type
->table_size
) {
3105 var
= p0
->type
->type_table
[cltype
] == idtype
;
3108 if (unlikely(!var
)) {
3109 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3110 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Couple#1", var_class_name
);
3111 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 905);
3114 self
->attrs
[COLOR_abstract_collection__Couple___second
].val
= p0
; /* _second on <self:Object(Couple[nullable Object, nullable Object])> */
3119 /* method abstract_collection#Couple#init for (self: Couple[nullable Object, nullable Object], nullable Object, nullable Object) */
3120 void abstract_collection__Couple__init(val
* self
, val
* p0
, val
* p1
) {
3121 short int var
/* : Bool */;
3124 const struct type
* type_struct
;
3125 short int is_nullable
;
3126 const char* var_class_name
;
3127 short int var1
/* : Bool */;
3130 const struct type
* type_struct4
;
3131 short int is_nullable5
;
3132 const char* var_class_name6
;
3133 val
* var_f
/* var f: nullable Object */;
3134 val
* var_s
/* var s: nullable Object */;
3135 short int var8
/* : Bool */;
3138 const struct type
* type_struct11
;
3139 short int is_nullable12
;
3140 const char* var_class_name13
;
3141 short int var15
/* : Bool */;
3144 const struct type
* type_struct18
;
3145 short int is_nullable19
;
3146 const char* var_class_name20
;
3147 /* Covariant cast for argument 0 (f) <p0:nullable Object> isa Couple#0 */
3148 /* <p0:nullable Object> isa Couple#0 */
3149 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT0
];
3150 cltype
= type_struct
->color
;
3151 idtype
= type_struct
->id
;
3152 is_nullable
= type_struct
->is_nullable
;
3156 if(cltype
>= p0
->type
->table_size
) {
3159 var
= p0
->type
->type_table
[cltype
] == idtype
;
3162 if (unlikely(!var
)) {
3163 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3164 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Couple#0", var_class_name
);
3165 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 908);
3168 /* Covariant cast for argument 1 (s) <p1:nullable Object> isa Couple#1 */
3169 /* <p1:nullable Object> isa Couple#1 */
3170 type_struct4
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT1
];
3171 cltype2
= type_struct4
->color
;
3172 idtype3
= type_struct4
->id
;
3173 is_nullable5
= type_struct4
->is_nullable
;
3175 var1
= is_nullable5
;
3177 if(cltype2
>= p1
->type
->table_size
) {
3180 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
3183 if (unlikely(!var1
)) {
3184 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
3185 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Couple#1", var_class_name6
);
3186 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 908);
3192 { /* Inline abstract_collection#Couple#first= (self,var_f) on <self:Couple[nullable Object, nullable Object]> */
3193 /* Covariant cast for argument 0 (first) <var_f:nullable Object> isa Couple#0 */
3194 /* <var_f:nullable Object> isa Couple#0 */
3195 type_struct11
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT0
];
3196 cltype9
= type_struct11
->color
;
3197 idtype10
= type_struct11
->id
;
3198 is_nullable12
= type_struct11
->is_nullable
;
3200 var8
= is_nullable12
;
3202 if(cltype9
>= var_f
->type
->table_size
) {
3205 var8
= var_f
->type
->type_table
[cltype9
] == idtype10
;
3208 if (unlikely(!var8
)) {
3209 var_class_name13
= var_f
== NULL ?
"null" : var_f
->type
->name
;
3210 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Couple#0", var_class_name13
);
3211 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 902);
3214 self
->attrs
[COLOR_abstract_collection__Couple___first
].val
= var_f
; /* _first on <self:Couple[nullable Object, nullable Object]> */
3219 { /* Inline abstract_collection#Couple#second= (self,var_s) on <self:Couple[nullable Object, nullable Object]> */
3220 /* Covariant cast for argument 0 (second) <var_s:nullable Object> isa Couple#1 */
3221 /* <var_s:nullable Object> isa Couple#1 */
3222 type_struct18
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Couple_FT1
];
3223 cltype16
= type_struct18
->color
;
3224 idtype17
= type_struct18
->id
;
3225 is_nullable19
= type_struct18
->is_nullable
;
3227 var15
= is_nullable19
;
3229 if(cltype16
>= var_s
->type
->table_size
) {
3232 var15
= var_s
->type
->type_table
[cltype16
] == idtype17
;
3235 if (unlikely(!var15
)) {
3236 var_class_name20
= var_s
== NULL ?
"null" : var_s
->type
->name
;
3237 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Couple#1", var_class_name20
);
3238 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 905);
3241 self
->attrs
[COLOR_abstract_collection__Couple___second
].val
= var_s
; /* _second on <self:Couple[nullable Object, nullable Object]> */
3242 RET_LABEL14
:(void)0;
3247 /* method abstract_collection#Couple#init for (self: Object, nullable Object, nullable Object) */
3248 void VIRTUAL_abstract_collection__Couple__init(val
* self
, val
* p0
, val
* p1
) {
3249 abstract_collection__Couple__init(self
, p0
, p1
); /* Direct call abstract_collection#Couple#init on <self:Object(Couple[nullable Object, nullable Object])>*/