1 #include "list.sep.0.h"
2 /* method list#List#[] for (self: List[nullable Object], Int): nullable Object */
3 val
* list__List___91d_93d(val
* self
, long p0
) {
4 val
* var
/* : nullable Object */;
5 long var_index
/* var index: Int */;
6 val
* var1
/* : nullable ListNode[nullable Object] */;
7 val
* var2
/* : nullable Object */;
9 var1
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_list__List__get_node
]))(self
, var_index
) /* get_node on <self:List[nullable Object]>*/;
11 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
12 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 22);
15 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Container__item
]))(var1
) /* item on <var1:nullable ListNode[nullable Object]>*/;
22 /* method list#List#[] for (self: Object, Int): nullable Object */
23 val
* VIRTUAL_list__List___91d_93d(val
* self
, long p0
) {
24 val
* var
/* : nullable Object */;
25 val
* var1
/* : nullable Object */;
26 var1
= list__List___91d_93d(self
, p0
);
31 /* method list#List#[]= for (self: List[nullable Object], Int, nullable Object) */
32 void list__List___91d_93d_61d(val
* self
, long p0
, val
* p1
) {
33 short int var
/* : Bool */;
36 const struct type
* type_struct
;
37 short int is_nullable
;
38 const char* var_class_name
;
39 long var_index
/* var index: Int */;
40 val
* var_item
/* var item: nullable Object */;
41 val
* var1
/* : nullable ListNode[nullable Object] */;
42 /* Covariant cast for argument 1 (item) <p1:nullable Object> isa Sequence#0 */
43 /* <p1:nullable Object> isa Sequence#0 */
44 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
45 cltype
= type_struct
->color
;
46 idtype
= type_struct
->id
;
47 is_nullable
= type_struct
->is_nullable
;
51 if(cltype
>= p1
->type
->table_size
) {
54 var
= p1
->type
->type_table
[cltype
] == idtype
;
58 var_class_name
= p1
== NULL ?
"null" : p1
->type
->name
;
59 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
60 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 24);
65 var1
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_list__List__get_node
]))(self
, var_index
) /* get_node on <self:List[nullable Object]>*/;
67 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
68 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 24);
71 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_abstract_collection__Container__item_61d
]))(var1
, var_item
) /* item= on <var1:nullable ListNode[nullable Object]>*/;
75 /* method list#List#[]= for (self: Object, Int, nullable Object) */
76 void VIRTUAL_list__List___91d_93d_61d(val
* self
, long p0
, val
* p1
) {
77 list__List___91d_93d_61d(self
, p0
, p1
);
80 /* method list#List#first for (self: List[nullable Object]): nullable Object */
81 val
* list__List__first(val
* self
) {
82 val
* var
/* : nullable Object */;
83 val
* var1
/* : nullable ListNode[nullable Object] */;
84 val
* var2
/* : nullable Object */;
85 var1
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
87 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
88 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 27);
91 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Container__item
]))(var1
) /* item on <var1:nullable ListNode[nullable Object]>*/;
98 /* method list#List#first for (self: Object): nullable Object */
99 val
* VIRTUAL_list__List__first(val
* self
) {
100 val
* var
/* : nullable Object */;
101 val
* var1
/* : nullable Object */;
102 var1
= list__List__first(self
);
107 /* method list#List#first= for (self: List[nullable Object], nullable Object) */
108 void list__List__first_61d(val
* self
, val
* p0
) {
109 short int var
/* : Bool */;
112 const struct type
* type_struct
;
113 short int is_nullable
;
114 const char* var_class_name
;
115 val
* var_e
/* var e: nullable Object */;
116 val
* var1
/* : nullable ListNode[nullable Object] */;
117 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Sequence#0 */
118 /* <p0:nullable Object> isa Sequence#0 */
119 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
120 cltype
= type_struct
->color
;
121 idtype
= type_struct
->id
;
122 is_nullable
= type_struct
->is_nullable
;
126 if(cltype
>= p0
->type
->table_size
) {
129 var
= p0
->type
->type_table
[cltype
] == idtype
;
133 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
134 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
135 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 29);
139 var1
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
141 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
142 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 30);
145 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_abstract_collection__Container__item_61d
]))(var1
, var_e
) /* item= on <var1:nullable ListNode[nullable Object]>*/;
149 /* method list#List#first= for (self: Object, nullable Object) */
150 void VIRTUAL_list__List__first_61d(val
* self
, val
* p0
) {
151 list__List__first_61d(self
, p0
);
154 /* method list#List#last for (self: List[nullable Object]): nullable Object */
155 val
* list__List__last(val
* self
) {
156 val
* var
/* : nullable Object */;
157 val
* var1
/* : nullable ListNode[nullable Object] */;
158 val
* var2
/* : nullable Object */;
159 var1
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
161 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
162 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 33);
165 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Container__item
]))(var1
) /* item on <var1:nullable ListNode[nullable Object]>*/;
172 /* method list#List#last for (self: Object): nullable Object */
173 val
* VIRTUAL_list__List__last(val
* self
) {
174 val
* var
/* : nullable Object */;
175 val
* var1
/* : nullable Object */;
176 var1
= list__List__last(self
);
181 /* method list#List#last= for (self: List[nullable Object], nullable Object) */
182 void list__List__last_61d(val
* self
, val
* p0
) {
183 short int var
/* : Bool */;
186 const struct type
* type_struct
;
187 short int is_nullable
;
188 const char* var_class_name
;
189 val
* var_e
/* var e: nullable Object */;
190 val
* var1
/* : nullable ListNode[nullable Object] */;
191 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Sequence#0 */
192 /* <p0:nullable Object> isa Sequence#0 */
193 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
194 cltype
= type_struct
->color
;
195 idtype
= type_struct
->id
;
196 is_nullable
= type_struct
->is_nullable
;
200 if(cltype
>= p0
->type
->table_size
) {
203 var
= p0
->type
->type_table
[cltype
] == idtype
;
207 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
208 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
209 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 35);
213 var1
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
215 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
216 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 36);
219 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_abstract_collection__Container__item_61d
]))(var1
, var_e
) /* item= on <var1:nullable ListNode[nullable Object]>*/;
223 /* method list#List#last= for (self: Object, nullable Object) */
224 void VIRTUAL_list__List__last_61d(val
* self
, val
* p0
) {
225 list__List__last_61d(self
, p0
);
228 /* method list#List#is_empty for (self: List[nullable Object]): Bool */
229 short int list__List__is_empty(val
* self
) {
230 short int var
/* : Bool */;
231 val
* var1
/* : nullable ListNode[nullable Object] */;
232 val
* var2
/* : null */;
233 short int var3
/* : Bool */;
234 var1
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
237 var3
= 1; /* is null */
239 var3
= 0; /* arg is null but recv is not */
246 /* method list#List#is_empty for (self: Object): Bool */
247 short int VIRTUAL_list__List__is_empty(val
* self
) {
248 short int var
/* : Bool */;
249 short int var1
/* : Bool */;
250 var1
= list__List__is_empty(self
);
255 /* method list#List#length for (self: List[nullable Object]): Int */
256 long list__List__length(val
* self
) {
257 long var
/* : Int */;
258 long var1
/* : Int */;
259 long var_l
/* var l: Int */;
260 val
* var2
/* : nullable ListNode[nullable Object] */;
261 val
* var_t
/* var t: nullable ListNode[nullable Object] */;
262 val
* var3
/* : null */;
263 short int var4
/* : Bool */;
264 long var5
/* : Int */;
265 long var6
/* : Int */;
266 long var8
/* : Int */;
267 val
* var9
/* : nullable ListNode[nullable Object] */;
270 var2
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
275 var4
= 0; /* is null */
277 var4
= 1; /* arg is null and recv is not */
281 { /* Inline kernel#Int#+ (var_l,var5) */
288 var9
= ((val
* (*)(val
*))(var_t
->class->vft
[COLOR_list__ListNode__next
]))(var_t
) /* next on <var_t:nullable ListNode[nullable Object](ListNode[nullable Object])>*/;
290 CONTINUE_label
: (void)0;
292 BREAK_label
: (void)0;
298 /* method list#List#length for (self: Object): Int */
299 long VIRTUAL_list__List__length(val
* self
) {
300 long var
/* : Int */;
301 long var1
/* : Int */;
302 var1
= list__List__length(self
);
307 /* method list#List#has for (self: List[nullable Object], nullable Object): Bool */
308 short int list__List__has(val
* self
, val
* p0
) {
309 short int var
/* : Bool */;
310 short int var1
/* : Bool */;
313 const struct type
* type_struct
;
314 short int is_nullable
;
315 const char* var_class_name
;
316 val
* var_e
/* var e: nullable Object */;
317 val
* var2
/* : nullable ListNode[nullable Object] */;
318 val
* var3
/* : nullable ListNode[nullable Object] */;
319 val
* var4
/* : null */;
320 short int var5
/* : Bool */;
321 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Collection#0 */
322 /* <p0:nullable Object> isa Collection#0 */
323 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
324 cltype
= type_struct
->color
;
325 idtype
= type_struct
->id
;
326 is_nullable
= type_struct
->is_nullable
;
330 if(cltype
>= p0
->type
->table_size
) {
333 var1
= p0
->type
->type_table
[cltype
] == idtype
;
337 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
338 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
339 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 55);
343 var2
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
344 var3
= ((val
* (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_list__List__search_node_after
]))(self
, var_e
, var2
) /* search_node_after on <self:List[nullable Object]>*/;
347 var5
= 0; /* is null */
349 var5
= 1; /* arg is null and recv is not */
356 /* method list#List#has for (self: Object, nullable Object): Bool */
357 short int VIRTUAL_list__List__has(val
* self
, val
* p0
) {
358 short int var
/* : Bool */;
359 short int var1
/* : Bool */;
360 var1
= list__List__has(self
, p0
);
365 /* method list#List#has_only for (self: List[nullable Object], nullable Object): Bool */
366 short int list__List__has_only(val
* self
, val
* p0
) {
367 short int var
/* : Bool */;
368 short int var1
/* : Bool */;
371 const struct type
* type_struct
;
372 short int is_nullable
;
373 const char* var_class_name
;
374 val
* var_e
/* var e: nullable Object */;
375 val
* var2
/* : nullable ListNode[nullable Object] */;
376 val
* var_node
/* var node: nullable ListNode[nullable Object] */;
377 val
* var3
/* : null */;
378 short int var4
/* : Bool */;
379 val
* var5
/* : nullable Object */;
380 short int var6
/* : Bool */;
381 short int var7
/* : Bool */;
382 val
* var8
/* : nullable ListNode[nullable Object] */;
383 short int var9
/* : Bool */;
384 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Collection#0 */
385 /* <p0:nullable Object> isa Collection#0 */
386 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
387 cltype
= type_struct
->color
;
388 idtype
= type_struct
->id
;
389 is_nullable
= type_struct
->is_nullable
;
393 if(cltype
>= p0
->type
->table_size
) {
396 var1
= p0
->type
->type_table
[cltype
] == idtype
;
400 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
401 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
402 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 58);
406 var2
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
410 if (var_node
== NULL
) {
411 var4
= 0; /* is null */
413 var4
= 1; /* arg is null and recv is not */
416 var5
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_abstract_collection__Container__item
]))(var_node
) /* item on <var_node:nullable ListNode[nullable Object](ListNode[nullable Object])>*/;
418 var6
= (var_e
!= NULL
);
420 var6
= ((short int (*)(val
*, val
*))(var5
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var5
, var_e
) /* != on <var5:nullable Object>*/;
428 var8
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:nullable ListNode[nullable Object](ListNode[nullable Object])>*/;
430 CONTINUE_label
: (void)0;
432 BREAK_label
: (void)0;
439 /* method list#List#has_only for (self: Object, nullable Object): Bool */
440 short int VIRTUAL_list__List__has_only(val
* self
, val
* p0
) {
441 short int var
/* : Bool */;
442 short int var1
/* : Bool */;
443 var1
= list__List__has_only(self
, p0
);
448 /* method list#List#count for (self: List[nullable Object], nullable Object): Int */
449 long list__List__count(val
* self
, val
* p0
) {
450 long var
/* : Int */;
451 short int var1
/* : Bool */;
454 const struct type
* type_struct
;
455 short int is_nullable
;
456 const char* var_class_name
;
457 val
* var_e
/* var e: nullable Object */;
458 long var2
/* : Int */;
459 long var_nb
/* var nb: Int */;
460 val
* var3
/* : nullable ListNode[nullable Object] */;
461 val
* var_node
/* var node: nullable ListNode[nullable Object] */;
462 val
* var4
/* : null */;
463 short int var5
/* : Bool */;
464 val
* var6
/* : nullable Object */;
465 short int var7
/* : Bool */;
466 long var8
/* : Int */;
467 long var9
/* : Int */;
468 long var11
/* : Int */;
469 val
* var12
/* : nullable ListNode[nullable Object] */;
470 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Collection#0 */
471 /* <p0:nullable Object> isa Collection#0 */
472 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
473 cltype
= type_struct
->color
;
474 idtype
= type_struct
->id
;
475 is_nullable
= type_struct
->is_nullable
;
479 if(cltype
>= p0
->type
->table_size
) {
482 var1
= p0
->type
->type_table
[cltype
] == idtype
;
486 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
487 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
488 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 68);
494 var3
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
498 if (var_node
== NULL
) {
499 var5
= 0; /* is null */
501 var5
= 1; /* arg is null and recv is not */
504 var6
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_abstract_collection__Container__item
]))(var_node
) /* item on <var_node:nullable ListNode[nullable Object](ListNode[nullable Object])>*/;
506 var7
= (var_e
!= NULL
);
508 var7
= ((short int (*)(val
*, val
*))(var6
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var6
, var_e
) /* != on <var6:nullable Object>*/;
512 { /* Inline kernel#Int#+ (var_nb,var8) */
513 var11
= var_nb
+ var8
;
521 var12
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:nullable ListNode[nullable Object](ListNode[nullable Object])>*/;
523 CONTINUE_label
: (void)0;
525 BREAK_label
: (void)0;
531 /* method list#List#count for (self: Object, nullable Object): Int */
532 long VIRTUAL_list__List__count(val
* self
, val
* p0
) {
533 long var
/* : Int */;
534 long var1
/* : Int */;
535 var1
= list__List__count(self
, p0
);
540 /* method list#List#slice for (self: List[nullable Object], Int, Int): List[nullable Object] */
541 val
* list__List__slice(val
* self
, long p0
, long p1
) {
542 val
* var
/* : List[nullable Object] */;
543 long var_from
/* var from: Int */;
544 long var_to
/* var to: Int */;
545 short int var1
/* : Bool */;
546 long var2
/* : Int */;
547 short int var3
/* : Bool */;
548 short int var5
/* : Bool */;
551 const char* var_class_name
;
552 short int var6
/* : Bool */;
553 short int var_
/* var : Bool */;
554 long var7
/* : Int */;
555 short int var8
/* : Bool */;
556 short int var10
/* : Bool */;
559 const char* var_class_name13
;
560 short int var14
/* : Bool */;
561 short int var15
/* : Bool */;
562 short int var16
/* : Bool */;
563 long var17
/* : Int */;
564 short int var18
/* : Bool */;
565 short int var20
/* : Bool */;
568 const char* var_class_name23
;
569 short int var24
/* : Bool */;
570 short int var_25
/* var : Bool */;
571 long var26
/* : Int */;
572 short int var27
/* : Bool */;
573 short int var29
/* : Bool */;
576 const char* var_class_name32
;
577 short int var33
/* : Bool */;
578 short int var_34
/* var : Bool */;
579 short int var35
/* : Bool */;
580 short int var37
/* : Bool */;
583 const char* var_class_name40
;
584 short int var41
/* : Bool */;
585 val
* var42
/* : List[nullable Object] */;
586 val
* var_list
/* var list: List[nullable Object] */;
587 short int var43
/* : Bool */;
588 short int var45
/* : Bool */;
591 const char* var_class_name48
;
592 short int var49
/* : Bool */;
593 val
* var50
/* : nullable Object */;
594 long var51
/* : Int */;
595 long var52
/* : Int */;
596 long var54
/* : Int */;
600 { /* Inline kernel#Int#>= (var_from,var2) */
601 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
602 /* <var2:Int> isa OTHER */
603 var5
= 1; /* easy <var2:Int> isa OTHER*/
605 var_class_name
= type_kernel__Int
.name
;
606 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
607 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 266);
610 var6
= var_from
>= var2
;
617 var7
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:List[nullable Object]>*/;
618 { /* Inline kernel#Int#< (var_from,var7) */
619 /* Covariant cast for argument 0 (i) <var7:Int> isa OTHER */
620 /* <var7:Int> isa OTHER */
621 var10
= 1; /* easy <var7:Int> isa OTHER*/
623 var_class_name13
= type_kernel__Int
.name
;
624 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name13
);
625 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 265);
628 var14
= var_from
< var7
;
638 fprintf(stderr
, "Runtime error: %s", "Assert failed");
639 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 81);
643 { /* Inline kernel#Int#>= (var_to,var17) */
644 /* Covariant cast for argument 0 (i) <var17:Int> isa OTHER */
645 /* <var17:Int> isa OTHER */
646 var20
= 1; /* easy <var17:Int> isa OTHER*/
648 var_class_name23
= type_kernel__Int
.name
;
649 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name23
);
650 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 266);
653 var24
= var_to
>= var17
;
660 var26
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:List[nullable Object]>*/;
661 { /* Inline kernel#Int#< (var_to,var26) */
662 /* Covariant cast for argument 0 (i) <var26:Int> isa OTHER */
663 /* <var26:Int> isa OTHER */
664 var29
= 1; /* easy <var26:Int> isa OTHER*/
666 var_class_name32
= type_kernel__Int
.name
;
667 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name32
);
668 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 265);
671 var33
= var_to
< var26
;
682 { /* Inline kernel#Int#<= (var_from,var_to) */
683 /* Covariant cast for argument 0 (i) <var_to:Int> isa OTHER */
684 /* <var_to:Int> isa OTHER */
685 var37
= 1; /* easy <var_to:Int> isa OTHER*/
687 var_class_name40
= type_kernel__Int
.name
;
688 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name40
);
689 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 264);
692 var41
= var_from
<= var_to
;
702 fprintf(stderr
, "Runtime error: %s", "Assert failed");
703 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 82);
706 var42
= NEW_list__List(self
->type
->resolution_table
->types
[COLOR_list__Listlist__List_FT0
]);
707 ((void (*)(val
*))(var42
->class->vft
[COLOR_list__List__init
]))(var42
) /* init on <var42:List[nullable Object]>*/;
710 { /* Inline kernel#Int#<= (var_from,var_to) */
711 /* Covariant cast for argument 0 (i) <var_to:Int> isa OTHER */
712 /* <var_to:Int> isa OTHER */
713 var45
= 1; /* easy <var_to:Int> isa OTHER*/
715 var_class_name48
= type_kernel__Int
.name
;
716 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name48
);
717 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 264);
720 var49
= var_from
<= var_to
;
726 var50
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var_from
) /* [] on <self:List[nullable Object]>*/;
727 ((void (*)(val
*, val
*))(var_list
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var_list
, var50
) /* add on <var_list:List[nullable Object]>*/;
729 { /* Inline kernel#Int#+ (var_from,var51) */
730 var54
= var_from
+ var51
;
736 CONTINUE_label
: (void)0;
738 BREAK_label
: (void)0;
744 /* method list#List#slice for (self: Object, Int, Int): List[nullable Object] */
745 val
* VIRTUAL_list__List__slice(val
* self
, long p0
, long p1
) {
746 val
* var
/* : List[nullable Object] */;
747 val
* var1
/* : List[nullable Object] */;
748 var1
= list__List__slice(self
, p0
, p1
);
753 /* method list#List#push for (self: List[nullable Object], nullable Object) */
754 void list__List__push(val
* self
, val
* p0
) {
755 short int var
/* : Bool */;
758 const struct type
* type_struct
;
759 short int is_nullable
;
760 const char* var_class_name
;
761 val
* var_e
/* var e: nullable Object */;
762 val
* var1
/* : ListNode[nullable Object] */;
763 val
* var_node
/* var node: ListNode[nullable Object] */;
764 val
* var2
/* : nullable ListNode[nullable Object] */;
765 val
* var3
/* : null */;
766 short int var4
/* : Bool */;
767 val
* var5
/* : nullable ListNode[nullable Object] */;
768 val
* var6
/* : nullable ListNode[nullable Object] */;
769 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Sequence#0 */
770 /* <p0:nullable Object> isa Sequence#0 */
771 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
772 cltype
= type_struct
->color
;
773 idtype
= type_struct
->id
;
774 is_nullable
= type_struct
->is_nullable
;
778 if(cltype
>= p0
->type
->table_size
) {
781 var
= p0
->type
->type_table
[cltype
] == idtype
;
785 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
786 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
787 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 93);
791 var1
= NEW_list__ListNode(self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__List_FT0
]);
792 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_list__ListNode__init
]))(var1
, var_e
) /* init on <var1:ListNode[nullable Object]>*/;
794 var2
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
797 var4
= 1; /* is null */
799 var4
= 0; /* arg is null but recv is not */
802 self
->attrs
[COLOR_list__List___head
].val
= var_node
; /* _head on <self:List[nullable Object]> */
804 var5
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
806 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
807 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 100);
810 ((void (*)(val
*, val
*))(var5
->class->vft
[COLOR_list__ListNode__next_61d
]))(var5
, var_node
) /* next= on <var5:nullable ListNode[nullable Object]>*/;
812 var6
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
813 ((void (*)(val
*, val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var_node
, var6
) /* prev= on <var_node:ListNode[nullable Object]>*/;
815 self
->attrs
[COLOR_list__List___tail
].val
= var_node
; /* _tail on <self:List[nullable Object]> */
818 /* method list#List#push for (self: Object, nullable Object) */
819 void VIRTUAL_list__List__push(val
* self
, val
* p0
) {
820 list__List__push(self
, p0
);
823 /* method list#List#unshift for (self: List[nullable Object], nullable Object) */
824 void list__List__unshift(val
* self
, val
* p0
) {
825 short int var
/* : Bool */;
828 const struct type
* type_struct
;
829 short int is_nullable
;
830 const char* var_class_name
;
831 val
* var_e
/* var e: nullable Object */;
832 val
* var1
/* : ListNode[nullable Object] */;
833 val
* var_node
/* var node: ListNode[nullable Object] */;
834 val
* var2
/* : nullable ListNode[nullable Object] */;
835 val
* var3
/* : null */;
836 short int var4
/* : Bool */;
837 val
* var5
/* : nullable ListNode[nullable Object] */;
838 val
* var6
/* : nullable ListNode[nullable Object] */;
839 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Sequence#0 */
840 /* <p0:nullable Object> isa Sequence#0 */
841 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
842 cltype
= type_struct
->color
;
843 idtype
= type_struct
->id
;
844 is_nullable
= type_struct
->is_nullable
;
848 if(cltype
>= p0
->type
->table_size
) {
851 var
= p0
->type
->type_table
[cltype
] == idtype
;
855 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
856 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
857 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 106);
861 var1
= NEW_list__ListNode(self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__List_FT0
]);
862 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_list__ListNode__init
]))(var1
, var_e
) /* init on <var1:ListNode[nullable Object]>*/;
864 var2
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
867 var4
= 1; /* is null */
869 var4
= 0; /* arg is null but recv is not */
872 self
->attrs
[COLOR_list__List___tail
].val
= var_node
; /* _tail on <self:List[nullable Object]> */
874 var5
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
875 ((void (*)(val
*, val
*))(var_node
->class->vft
[COLOR_list__ListNode__next_61d
]))(var_node
, var5
) /* next= on <var_node:ListNode[nullable Object]>*/;
876 var6
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
878 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
879 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 114);
882 ((void (*)(val
*, val
*))(var6
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var6
, var_node
) /* prev= on <var6:nullable ListNode[nullable Object]>*/;
885 self
->attrs
[COLOR_list__List___head
].val
= var_node
; /* _head on <self:List[nullable Object]> */
888 /* method list#List#unshift for (self: Object, nullable Object) */
889 void VIRTUAL_list__List__unshift(val
* self
, val
* p0
) {
890 list__List__unshift(self
, p0
);
893 /* method list#List#link for (self: List[nullable Object], List[nullable Object]) */
894 void list__List__link(val
* self
, val
* p0
) {
895 short int var
/* : Bool */;
898 const struct type
* type_struct
;
899 const char* var_class_name
;
900 val
* var_l
/* var l: List[nullable Object] */;
901 val
* var1
/* : nullable ListNode[nullable Object] */;
902 val
* var2
/* : null */;
903 short int var3
/* : Bool */;
904 val
* var4
/* : nullable ListNode[nullable Object] */;
905 val
* var5
/* : nullable ListNode[nullable Object] */;
906 val
* var6
/* : null */;
907 short int var7
/* : Bool */;
908 val
* var8
/* : nullable ListNode[nullable Object] */;
909 val
* var9
/* : nullable ListNode[nullable Object] */;
910 val
* var10
/* : nullable ListNode[nullable Object] */;
911 val
* var11
/* : nullable ListNode[nullable Object] */;
912 val
* var12
/* : nullable ListNode[nullable Object] */;
913 val
* var13
/* : nullable ListNode[nullable Object] */;
914 /* Covariant cast for argument 0 (l) <p0:List[nullable Object]> isa List[List#0] */
915 /* <p0:List[nullable Object]> isa List[List#0] */
916 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__Listlist__List_FT0
];
917 cltype
= type_struct
->color
;
918 idtype
= type_struct
->id
;
919 if(cltype
>= p0
->type
->table_size
) {
922 var
= p0
->type
->type_table
[cltype
] == idtype
;
925 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
926 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "List[List#0]", var_class_name
);
927 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 119);
931 var1
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
934 var3
= 1; /* is null */
936 var3
= 0; /* arg is null but recv is not */
939 var4
= var_l
->attrs
[COLOR_list__List___head
].val
; /* _head on <var_l:List[nullable Object]> */
940 self
->attrs
[COLOR_list__List___head
].val
= var4
; /* _head on <self:List[nullable Object]> */
942 var5
= var_l
->attrs
[COLOR_list__List___head
].val
; /* _head on <var_l:List[nullable Object]> */
945 var7
= 0; /* is null */
947 var7
= 1; /* arg is null and recv is not */
950 var8
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
951 var9
= var_l
->attrs
[COLOR_list__List___head
].val
; /* _head on <var_l:List[nullable Object]> */
953 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
954 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 127);
957 ((void (*)(val
*, val
*))(var8
->class->vft
[COLOR_list__ListNode__next_61d
]))(var8
, var9
) /* next= on <var8:nullable ListNode[nullable Object]>*/;
959 var10
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
961 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
962 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 128);
965 var11
= ((val
* (*)(val
*))(var10
->class->vft
[COLOR_list__ListNode__next
]))(var10
) /* next on <var10:nullable ListNode[nullable Object]>*/;
967 var12
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
969 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
970 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 128);
973 ((void (*)(val
*, val
*))(var11
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var11
, var12
) /* prev= on <var11:nullable ListNode[nullable Object]>*/;
978 var13
= var_l
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <var_l:List[nullable Object]> */
979 self
->attrs
[COLOR_list__List___tail
].val
= var13
; /* _tail on <self:List[nullable Object]> */
980 ((void (*)(val
*))(var_l
->class->vft
[COLOR_abstract_collection__RemovableCollection__clear
]))(var_l
) /* clear on <var_l:List[nullable Object]>*/;
983 /* method list#List#link for (self: Object, List[nullable Object]) */
984 void VIRTUAL_list__List__link(val
* self
, val
* p0
) {
985 list__List__link(self
, p0
);
988 /* method list#List#pop for (self: List[nullable Object]): nullable Object */
989 val
* list__List__pop(val
* self
) {
990 val
* var
/* : nullable Object */;
991 val
* var1
/* : nullable ListNode[nullable Object] */;
992 val
* var_node
/* var node: nullable ListNode[nullable Object] */;
993 val
* var2
/* : nullable ListNode[nullable Object] */;
994 val
* var3
/* : null */;
995 val
* var4
/* : nullable ListNode[nullable Object] */;
996 val
* var5
/* : null */;
997 short int var6
/* : Bool */;
998 val
* var7
/* : null */;
999 val
* var8
/* : nullable ListNode[nullable Object] */;
1000 val
* var9
/* : null */;
1001 val
* var10
/* : nullable Object */;
1002 var1
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
1004 if (var_node
== NULL
) {
1005 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1006 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 140);
1009 var2
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:nullable ListNode[nullable Object]>*/;
1011 self
->attrs
[COLOR_list__List___tail
].val
= var2
; /* _tail on <self:List[nullable Object]> */
1013 if (var_node
== NULL
) {
1014 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1015 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 141);
1018 ((void (*)(val
*, val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var_node
, var3
) /* prev= on <var_node:nullable ListNode[nullable Object]>*/;
1020 var4
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
1023 var6
= 1; /* is null */
1025 var6
= 0; /* arg is null but recv is not */
1029 self
->attrs
[COLOR_list__List___head
].val
= var7
; /* _head on <self:List[nullable Object]> */
1031 var8
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
1034 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1035 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 145);
1038 ((void (*)(val
*, val
*))(var8
->class->vft
[COLOR_list__ListNode__next_61d
]))(var8
, var9
) /* next= on <var8:nullable ListNode[nullable Object]>*/;
1041 if (var_node
== NULL
) {
1042 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1043 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 147);
1046 var10
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_abstract_collection__Container__item
]))(var_node
) /* item on <var_node:nullable ListNode[nullable Object]>*/;
1053 /* method list#List#pop for (self: Object): nullable Object */
1054 val
* VIRTUAL_list__List__pop(val
* self
) {
1055 val
* var
/* : nullable Object */;
1056 val
* var1
/* : nullable Object */;
1057 var1
= list__List__pop(self
);
1062 /* method list#List#shift for (self: List[nullable Object]): nullable Object */
1063 val
* list__List__shift(val
* self
) {
1064 val
* var
/* : nullable Object */;
1065 val
* var1
/* : nullable ListNode[nullable Object] */;
1066 val
* var_node
/* var node: nullable ListNode[nullable Object] */;
1067 val
* var2
/* : nullable ListNode[nullable Object] */;
1068 val
* var3
/* : null */;
1069 val
* var4
/* : nullable ListNode[nullable Object] */;
1070 val
* var5
/* : null */;
1071 short int var6
/* : Bool */;
1072 val
* var7
/* : null */;
1073 val
* var8
/* : nullable ListNode[nullable Object] */;
1074 val
* var9
/* : null */;
1075 val
* var10
/* : nullable Object */;
1076 var1
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
1078 if (var_node
== NULL
) {
1079 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1080 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 154);
1083 var2
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:nullable ListNode[nullable Object]>*/;
1085 self
->attrs
[COLOR_list__List___head
].val
= var2
; /* _head on <self:List[nullable Object]> */
1087 if (var_node
== NULL
) {
1088 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1089 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 155);
1092 ((void (*)(val
*, val
*))(var_node
->class->vft
[COLOR_list__ListNode__next_61d
]))(var_node
, var3
) /* next= on <var_node:nullable ListNode[nullable Object]>*/;
1094 var4
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
1097 var6
= 1; /* is null */
1099 var6
= 0; /* arg is null but recv is not */
1103 self
->attrs
[COLOR_list__List___tail
].val
= var7
; /* _tail on <self:List[nullable Object]> */
1105 var8
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
1108 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1109 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 159);
1112 ((void (*)(val
*, val
*))(var8
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var8
, var9
) /* prev= on <var8:nullable ListNode[nullable Object]>*/;
1115 if (var_node
== NULL
) {
1116 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1117 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 161);
1120 var10
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_abstract_collection__Container__item
]))(var_node
) /* item on <var_node:nullable ListNode[nullable Object]>*/;
1127 /* method list#List#shift for (self: Object): nullable Object */
1128 val
* VIRTUAL_list__List__shift(val
* self
) {
1129 val
* var
/* : nullable Object */;
1130 val
* var1
/* : nullable Object */;
1131 var1
= list__List__shift(self
);
1136 /* method list#List#remove for (self: List[nullable Object], nullable Object) */
1137 void list__List__remove(val
* self
, val
* p0
) {
1138 short int var
/* : Bool */;
1141 const struct type
* type_struct
;
1142 short int is_nullable
;
1143 const char* var_class_name
;
1144 val
* var_e
/* var e: nullable Object */;
1145 val
* var1
/* : nullable ListNode[nullable Object] */;
1146 val
* var2
/* : nullable ListNode[nullable Object] */;
1147 val
* var_node
/* var node: nullable ListNode[nullable Object] */;
1148 val
* var3
/* : null */;
1149 short int var4
/* : Bool */;
1150 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa RemovableCollection#0 */
1151 /* <p0:nullable Object> isa RemovableCollection#0 */
1152 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
1153 cltype
= type_struct
->color
;
1154 idtype
= type_struct
->id
;
1155 is_nullable
= type_struct
->is_nullable
;
1159 if(cltype
>= p0
->type
->table_size
) {
1162 var
= p0
->type
->type_table
[cltype
] == idtype
;
1166 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1167 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
1168 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 164);
1172 var1
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
1173 var2
= ((val
* (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_list__List__search_node_after
]))(self
, var_e
, var1
) /* search_node_after on <self:List[nullable Object]>*/;
1176 if (var_node
== NULL
) {
1177 var4
= 0; /* is null */
1179 var4
= 1; /* arg is null and recv is not */
1182 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_list__List__remove_node
]))(self
, var_node
) /* remove_node on <self:List[nullable Object]>*/;
1187 /* method list#List#remove for (self: Object, nullable Object) */
1188 void VIRTUAL_list__List__remove(val
* self
, val
* p0
) {
1189 list__List__remove(self
, p0
);
1192 /* method list#List#remove_at for (self: List[nullable Object], Int) */
1193 void list__List__remove_at(val
* self
, long p0
) {
1194 long var_i
/* var i: Int */;
1195 val
* var
/* : nullable ListNode[nullable Object] */;
1196 val
* var_node
/* var node: nullable ListNode[nullable Object] */;
1197 val
* var1
/* : null */;
1198 short int var2
/* : Bool */;
1200 var
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_list__List__get_node
]))(self
, var_i
) /* get_node on <self:List[nullable Object]>*/;
1203 if (var_node
== NULL
) {
1204 var2
= 0; /* is null */
1206 var2
= 1; /* arg is null and recv is not */
1209 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_list__List__remove_node
]))(self
, var_node
) /* remove_node on <self:List[nullable Object]>*/;
1214 /* method list#List#remove_at for (self: Object, Int) */
1215 void VIRTUAL_list__List__remove_at(val
* self
, long p0
) {
1216 list__List__remove_at(self
, p0
);
1219 /* method list#List#clear for (self: List[nullable Object]) */
1220 void list__List__clear(val
* self
) {
1221 val
* var
/* : null */;
1222 val
* var1
/* : null */;
1224 self
->attrs
[COLOR_list__List___head
].val
= var
; /* _head on <self:List[nullable Object]> */
1226 self
->attrs
[COLOR_list__List___tail
].val
= var1
; /* _tail on <self:List[nullable Object]> */
1229 /* method list#List#clear for (self: Object) */
1230 void VIRTUAL_list__List__clear(val
* self
) {
1231 list__List__clear(self
);
1234 /* method list#List#iterator for (self: List[nullable Object]): ListIterator[nullable Object] */
1235 val
* list__List__iterator(val
* self
) {
1236 val
* var
/* : ListIterator[nullable Object] */;
1237 val
* var1
/* : ListIterator[nullable Object] */;
1238 var1
= NEW_list__ListIterator(self
->type
->resolution_table
->types
[COLOR_list__ListIteratorlist__List_FT0
]);
1239 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_list__ListIterator__init
]))(var1
, self
) /* init on <var1:ListIterator[nullable Object]>*/;
1245 /* method list#List#iterator for (self: Object): Iterator[nullable Object] */
1246 val
* VIRTUAL_list__List__iterator(val
* self
) {
1247 val
* var
/* : Iterator[nullable Object] */;
1248 val
* var1
/* : ListIterator[nullable Object] */;
1249 var1
= list__List__iterator(self
);
1254 /* method list#List#init for (self: List[nullable Object]) */
1255 void list__List__init(val
* self
) {
1258 /* method list#List#init for (self: Object) */
1259 void VIRTUAL_list__List__init(val
* self
) {
1260 list__List__init(self
);
1263 /* method list#List#from for (self: List[nullable Object], Collection[nullable Object]) */
1264 void list__List__from(val
* self
, val
* p0
) {
1265 short int var
/* : Bool */;
1268 const struct type
* type_struct
;
1269 const char* var_class_name
;
1270 val
* var_coll
/* var coll: Collection[nullable Object] */;
1271 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[List#0] */
1272 /* <p0:Collection[nullable Object]> isa Collection[List#0] */
1273 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionlist__List_FT0
];
1274 cltype
= type_struct
->color
;
1275 idtype
= type_struct
->id
;
1276 if(cltype
>= p0
->type
->table_size
) {
1279 var
= p0
->type
->type_table
[cltype
] == idtype
;
1282 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1283 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[List#0]", var_class_name
);
1284 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 188);
1288 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Sequence__append
]))(self
, var_coll
) /* append on <self:List[nullable Object]>*/;
1291 /* method list#List#from for (self: Object, Collection[nullable Object]) */
1292 void VIRTUAL_list__List__from(val
* self
, val
* p0
) {
1293 list__List__from(self
, p0
);
1296 /* method list#List#get_node for (self: List[nullable Object], Int): nullable ListNode[nullable Object] */
1297 val
* list__List__get_node(val
* self
, long p0
) {
1298 val
* var
/* : nullable ListNode[nullable Object] */;
1299 long var_i
/* var i: Int */;
1300 val
* var1
/* : nullable ListNode[nullable Object] */;
1301 val
* var_n
/* var n: nullable ListNode[nullable Object] */;
1302 long var2
/* : Int */;
1303 short int var3
/* : Bool */;
1304 short int var5
/* : Bool */;
1307 const char* var_class_name
;
1308 short int var6
/* : Bool */;
1309 val
* var7
/* : null */;
1310 short int var8
/* : Bool */;
1311 val
* var9
/* : null */;
1312 short int var10
/* : Bool */;
1313 short int var_
/* var : Bool */;
1314 long var11
/* : Int */;
1315 short int var12
/* : Bool */;
1316 short int var14
/* : Bool */;
1319 const char* var_class_name17
;
1320 short int var18
/* : Bool */;
1321 val
* var19
/* : nullable ListNode[nullable Object] */;
1322 long var20
/* : Int */;
1323 long var21
/* : Int */;
1324 long var23
/* : Int */;
1326 var1
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
1329 { /* Inline kernel#Int#< (var_i,var2) */
1330 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
1331 /* <var2:Int> isa OTHER */
1332 var5
= 1; /* easy <var2:Int> isa OTHER*/
1334 var_class_name
= type_kernel__Int
.name
;
1335 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1336 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 265);
1339 var6
= var_i
< var2
;
1352 if (var_n
== NULL
) {
1353 var10
= 0; /* is null */
1355 var10
= 1; /* arg is null and recv is not */
1360 { /* Inline kernel#Int#> (var_i,var11) */
1361 /* Covariant cast for argument 0 (i) <var11:Int> isa OTHER */
1362 /* <var11:Int> isa OTHER */
1363 var14
= 1; /* easy <var11:Int> isa OTHER*/
1365 var_class_name17
= type_kernel__Int
.name
;
1366 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name17
);
1367 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 267);
1370 var18
= var_i
> var11
;
1373 RET_LABEL13
:(void)0;
1380 var19
= ((val
* (*)(val
*))(var_n
->class->vft
[COLOR_list__ListNode__next
]))(var_n
) /* next on <var_n:nullable ListNode[nullable Object](ListNode[nullable Object])>*/;
1383 { /* Inline kernel#Int#- (var_i,var20) */
1384 var23
= var_i
- var20
;
1387 RET_LABEL22
:(void)0;
1390 CONTINUE_label
: (void)0;
1392 BREAK_label
: (void)0;
1398 /* method list#List#get_node for (self: Object, Int): nullable ListNode[nullable Object] */
1399 val
* VIRTUAL_list__List__get_node(val
* self
, long p0
) {
1400 val
* var
/* : nullable ListNode[nullable Object] */;
1401 val
* var1
/* : nullable ListNode[nullable Object] */;
1402 var1
= list__List__get_node(self
, p0
);
1407 /* method list#List#search_node_after for (self: List[nullable Object], nullable Object, nullable ListNode[nullable Object]): nullable ListNode[nullable Object] */
1408 val
* list__List__search_node_after(val
* self
, val
* p0
, val
* p1
) {
1409 val
* var
/* : nullable ListNode[nullable Object] */;
1410 short int var1
/* : Bool */;
1413 const struct type
* type_struct
;
1414 short int is_nullable
;
1415 const char* var_class_name
;
1416 short int var2
/* : Bool */;
1419 const struct type
* type_struct5
;
1420 const char* var_class_name6
;
1421 val
* var_e
/* var e: nullable Object */;
1422 val
* var_after
/* var after: nullable ListNode[nullable Object] */;
1423 val
* var_n
/* var n: nullable ListNode[nullable Object] */;
1424 short int var7
/* : Bool */;
1425 val
* var8
/* : null */;
1426 short int var9
/* : Bool */;
1427 short int var_
/* var : Bool */;
1428 val
* var10
/* : nullable Object */;
1429 short int var11
/* : Bool */;
1430 val
* var12
/* : nullable ListNode[nullable Object] */;
1431 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa List#0 */
1432 /* <p0:nullable Object> isa List#0 */
1433 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__List_FT0
];
1434 cltype
= type_struct
->color
;
1435 idtype
= type_struct
->id
;
1436 is_nullable
= type_struct
->is_nullable
;
1440 if(cltype
>= p0
->type
->table_size
) {
1443 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1447 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1448 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "List#0", var_class_name
);
1449 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 211);
1452 /* Covariant cast for argument 1 (after) <p1:nullable ListNode[nullable Object]> isa nullable ListNode[List#0] */
1453 /* <p1:nullable ListNode[nullable Object]> isa nullable ListNode[List#0] */
1454 type_struct5
= self
->type
->resolution_table
->types
[COLOR_nullable_list__ListNodelist__List_FT0
];
1455 cltype3
= type_struct5
->color
;
1456 idtype4
= type_struct5
->id
;
1460 if(cltype3
>= p1
->type
->table_size
) {
1463 var2
= p1
->type
->type_table
[cltype3
] == idtype4
;
1467 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
1468 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ListNode[List#0]", var_class_name6
);
1469 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 211);
1477 if (var_n
== NULL
) {
1478 var9
= 0; /* is null */
1480 var9
= 1; /* arg is null and recv is not */
1484 var10
= ((val
* (*)(val
*))(var_n
->class->vft
[COLOR_abstract_collection__Container__item
]))(var_n
) /* item on <var_n:nullable ListNode[nullable Object](ListNode[nullable Object])>*/;
1485 if (var10
== NULL
) {
1486 var11
= (var_e
!= NULL
);
1488 var11
= ((short int (*)(val
*, val
*))(var10
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var10
, var_e
) /* != on <var10:nullable Object>*/;
1495 var12
= ((val
* (*)(val
*))(var_n
->class->vft
[COLOR_list__ListNode__next
]))(var_n
) /* next on <var_n:nullable ListNode[nullable Object](ListNode[nullable Object])>*/;
1497 CONTINUE_label
: (void)0;
1499 BREAK_label
: (void)0;
1505 /* method list#List#search_node_after for (self: Object, nullable Object, nullable ListNode[nullable Object]): nullable ListNode[nullable Object] */
1506 val
* VIRTUAL_list__List__search_node_after(val
* self
, val
* p0
, val
* p1
) {
1507 val
* var
/* : nullable ListNode[nullable Object] */;
1508 val
* var1
/* : nullable ListNode[nullable Object] */;
1509 var1
= list__List__search_node_after(self
, p0
, p1
);
1514 /* method list#List#remove_node for (self: List[nullable Object], ListNode[nullable Object]) */
1515 void list__List__remove_node(val
* self
, val
* p0
) {
1516 short int var
/* : Bool */;
1519 const struct type
* type_struct
;
1520 const char* var_class_name
;
1521 val
* var_node
/* var node: ListNode[nullable Object] */;
1522 val
* var1
/* : nullable ListNode[nullable Object] */;
1523 val
* var2
/* : null */;
1524 short int var3
/* : Bool */;
1525 val
* var4
/* : nullable ListNode[nullable Object] */;
1526 val
* var5
/* : nullable ListNode[nullable Object] */;
1527 val
* var6
/* : null */;
1528 short int var7
/* : Bool */;
1529 val
* var8
/* : null */;
1530 val
* var9
/* : nullable ListNode[nullable Object] */;
1531 val
* var10
/* : null */;
1532 val
* var11
/* : nullable ListNode[nullable Object] */;
1533 val
* var12
/* : null */;
1534 short int var13
/* : Bool */;
1535 val
* var14
/* : nullable ListNode[nullable Object] */;
1536 val
* var15
/* : nullable ListNode[nullable Object] */;
1537 val
* var16
/* : null */;
1538 val
* var17
/* : nullable ListNode[nullable Object] */;
1539 val
* var18
/* : nullable ListNode[nullable Object] */;
1540 val
* var19
/* : nullable ListNode[nullable Object] */;
1541 val
* var20
/* : nullable ListNode[nullable Object] */;
1542 /* Covariant cast for argument 0 (node) <p0:ListNode[nullable Object]> isa ListNode[List#0] */
1543 /* <p0:ListNode[nullable Object]> isa ListNode[List#0] */
1544 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__List_FT0
];
1545 cltype
= type_struct
->color
;
1546 idtype
= type_struct
->id
;
1547 if(cltype
>= p0
->type
->table_size
) {
1550 var
= p0
->type
->type_table
[cltype
] == idtype
;
1553 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1554 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ListNode[List#0]", var_class_name
);
1555 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 219);
1559 var1
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:ListNode[nullable Object]>*/;
1562 var3
= 1; /* is null */
1564 var3
= 0; /* arg is null but recv is not */
1567 var4
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:ListNode[nullable Object]>*/;
1568 self
->attrs
[COLOR_list__List___head
].val
= var4
; /* _head on <self:List[nullable Object]> */
1569 var5
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:ListNode[nullable Object]>*/;
1572 var7
= 1; /* is null */
1574 var7
= 0; /* arg is null but recv is not */
1578 self
->attrs
[COLOR_list__List___tail
].val
= var8
; /* _tail on <self:List[nullable Object]> */
1580 var9
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:ListNode[nullable Object]>*/;
1583 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1584 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 227);
1587 ((void (*)(val
*, val
*))(var9
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var9
, var10
) /* prev= on <var9:nullable ListNode[nullable Object]>*/;
1591 var11
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:ListNode[nullable Object]>*/;
1593 if (var11
== NULL
) {
1594 var13
= 1; /* is null */
1596 var13
= 0; /* arg is null but recv is not */
1599 var14
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:ListNode[nullable Object]>*/;
1600 self
->attrs
[COLOR_list__List___tail
].val
= var14
; /* _tail on <self:List[nullable Object]> */
1601 var15
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:ListNode[nullable Object]>*/;
1603 if (var15
== NULL
) {
1604 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1605 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 231);
1608 ((void (*)(val
*, val
*))(var15
->class->vft
[COLOR_list__ListNode__next_61d
]))(var15
, var16
) /* next= on <var15:nullable ListNode[nullable Object]>*/;
1611 var17
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:ListNode[nullable Object]>*/;
1612 var18
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:ListNode[nullable Object]>*/;
1613 if (var17
== NULL
) {
1614 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1615 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 233);
1618 ((void (*)(val
*, val
*))(var17
->class->vft
[COLOR_list__ListNode__next_61d
]))(var17
, var18
) /* next= on <var17:nullable ListNode[nullable Object]>*/;
1620 var19
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:ListNode[nullable Object]>*/;
1621 var20
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:ListNode[nullable Object]>*/;
1622 if (var19
== NULL
) {
1623 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1624 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 234);
1627 ((void (*)(val
*, val
*))(var19
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var19
, var20
) /* prev= on <var19:nullable ListNode[nullable Object]>*/;
1633 /* method list#List#remove_node for (self: Object, ListNode[nullable Object]) */
1634 void VIRTUAL_list__List__remove_node(val
* self
, val
* p0
) {
1635 list__List__remove_node(self
, p0
);
1638 /* method list#List#insert_before for (self: List[nullable Object], nullable Object, ListNode[nullable Object]) */
1639 void list__List__insert_before(val
* self
, val
* p0
, val
* p1
) {
1640 short int var
/* : Bool */;
1643 const struct type
* type_struct
;
1644 short int is_nullable
;
1645 const char* var_class_name
;
1646 short int var1
/* : Bool */;
1649 const struct type
* type_struct4
;
1650 const char* var_class_name5
;
1651 val
* var_element
/* var element: nullable Object */;
1652 val
* var_node
/* var node: ListNode[nullable Object] */;
1653 val
* var6
/* : ListNode[nullable Object] */;
1654 val
* var_nnode
/* var nnode: ListNode[nullable Object] */;
1655 val
* var7
/* : nullable ListNode[nullable Object] */;
1656 val
* var_prev
/* var prev: nullable ListNode[nullable Object] */;
1657 val
* var8
/* : null */;
1658 short int var9
/* : Bool */;
1659 /* Covariant cast for argument 0 (element) <p0:nullable Object> isa List#0 */
1660 /* <p0:nullable Object> isa List#0 */
1661 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__List_FT0
];
1662 cltype
= type_struct
->color
;
1663 idtype
= type_struct
->id
;
1664 is_nullable
= type_struct
->is_nullable
;
1668 if(cltype
>= p0
->type
->table_size
) {
1671 var
= p0
->type
->type_table
[cltype
] == idtype
;
1675 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1676 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "List#0", var_class_name
);
1677 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 238);
1680 /* Covariant cast for argument 1 (node) <p1:ListNode[nullable Object]> isa ListNode[List#0] */
1681 /* <p1:ListNode[nullable Object]> isa ListNode[List#0] */
1682 type_struct4
= self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__List_FT0
];
1683 cltype2
= type_struct4
->color
;
1684 idtype3
= type_struct4
->id
;
1685 if(cltype2
>= p1
->type
->table_size
) {
1688 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
1691 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
1692 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ListNode[List#0]", var_class_name5
);
1693 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 238);
1698 var6
= NEW_list__ListNode(self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__List_FT0
]);
1699 ((void (*)(val
*, val
*))(var6
->class->vft
[COLOR_list__ListNode__init
]))(var6
, var_element
) /* init on <var6:ListNode[nullable Object]>*/;
1701 var7
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:ListNode[nullable Object]>*/;
1704 if (var_prev
== NULL
) {
1705 var9
= 1; /* is null */
1707 var9
= 0; /* arg is null but recv is not */
1710 self
->attrs
[COLOR_list__List___head
].val
= var_nnode
; /* _head on <self:List[nullable Object]> */
1712 ((void (*)(val
*, val
*))(var_prev
->class->vft
[COLOR_list__ListNode__next_61d
]))(var_prev
, var_nnode
) /* next= on <var_prev:nullable ListNode[nullable Object](ListNode[nullable Object])>*/;
1714 ((void (*)(val
*, val
*))(var_nnode
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var_nnode
, var_prev
) /* prev= on <var_nnode:ListNode[nullable Object]>*/;
1715 ((void (*)(val
*, val
*))(var_nnode
->class->vft
[COLOR_list__ListNode__next_61d
]))(var_nnode
, var_node
) /* next= on <var_nnode:ListNode[nullable Object]>*/;
1716 ((void (*)(val
*, val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var_node
, var_nnode
) /* prev= on <var_node:ListNode[nullable Object]>*/;
1719 /* method list#List#insert_before for (self: Object, nullable Object, ListNode[nullable Object]) */
1720 void VIRTUAL_list__List__insert_before(val
* self
, val
* p0
, val
* p1
) {
1721 list__List__insert_before(self
, p0
, p1
);
1724 /* method list#ListIterator#item for (self: ListIterator[nullable Object]): nullable Object */
1725 val
* list__ListIterator__item(val
* self
) {
1726 val
* var
/* : nullable Object */;
1727 val
* var1
/* : nullable ListNode[nullable Object] */;
1728 val
* var2
/* : nullable Object */;
1729 var1
= self
->attrs
[COLOR_list__ListIterator___node
].val
; /* _node on <self:ListIterator[nullable Object]> */
1731 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1732 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 256);
1735 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Container__item
]))(var1
) /* item on <var1:nullable ListNode[nullable Object]>*/;
1742 /* method list#ListIterator#item for (self: Object): nullable Object */
1743 val
* VIRTUAL_list__ListIterator__item(val
* self
) {
1744 val
* var
/* : nullable Object */;
1745 val
* var1
/* : nullable Object */;
1746 var1
= list__ListIterator__item(self
);
1751 /* method list#ListIterator#item= for (self: ListIterator[nullable Object], nullable Object) */
1752 void list__ListIterator__item_61d(val
* self
, val
* p0
) {
1753 short int var
/* : Bool */;
1756 const struct type
* type_struct
;
1757 short int is_nullable
;
1758 const char* var_class_name
;
1759 val
* var_e
/* var e: nullable Object */;
1760 val
* var1
/* : nullable ListNode[nullable Object] */;
1761 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa ListIterator#0 */
1762 /* <p0:nullable Object> isa ListIterator#0 */
1763 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__ListIterator_FT0
];
1764 cltype
= type_struct
->color
;
1765 idtype
= type_struct
->id
;
1766 is_nullable
= type_struct
->is_nullable
;
1770 if(cltype
>= p0
->type
->table_size
) {
1773 var
= p0
->type
->type_table
[cltype
] == idtype
;
1777 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1778 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ListIterator#0", var_class_name
);
1779 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 258);
1783 var1
= self
->attrs
[COLOR_list__ListIterator___node
].val
; /* _node on <self:ListIterator[nullable Object]> */
1785 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1786 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 258);
1789 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_abstract_collection__Container__item_61d
]))(var1
, var_e
) /* item= on <var1:nullable ListNode[nullable Object]>*/;
1793 /* method list#ListIterator#item= for (self: Object, nullable Object) */
1794 void VIRTUAL_list__ListIterator__item_61d(val
* self
, val
* p0
) {
1795 list__ListIterator__item_61d(self
, p0
);
1798 /* method list#ListIterator#is_ok for (self: ListIterator[nullable Object]): Bool */
1799 short int list__ListIterator__is_ok(val
* self
) {
1800 short int var
/* : Bool */;
1801 val
* var1
/* : nullable ListNode[nullable Object] */;
1802 val
* var2
/* : null */;
1803 short int var3
/* : Bool */;
1804 short int var4
/* : Bool */;
1805 var1
= self
->attrs
[COLOR_list__ListIterator___node
].val
; /* _node on <self:ListIterator[nullable Object]> */
1808 var3
= 1; /* is null */
1810 var3
= 0; /* arg is null but recv is not */
1818 /* method list#ListIterator#is_ok for (self: Object): Bool */
1819 short int VIRTUAL_list__ListIterator__is_ok(val
* self
) {
1820 short int var
/* : Bool */;
1821 short int var1
/* : Bool */;
1822 var1
= list__ListIterator__is_ok(self
);
1827 /* method list#ListIterator#next for (self: ListIterator[nullable Object]) */
1828 void list__ListIterator__next(val
* self
) {
1829 val
* var
/* : nullable ListNode[nullable Object] */;
1830 val
* var1
/* : nullable ListNode[nullable Object] */;
1831 val
* var_
/* var : ListIterator[nullable Object] */;
1832 long var2
/* : Int */;
1833 long var3
/* : Int */;
1834 long var4
/* : Int */;
1835 long var6
/* : Int */;
1836 var
= self
->attrs
[COLOR_list__ListIterator___node
].val
; /* _node on <self:ListIterator[nullable Object]> */
1838 fprintf(stderr
, "Runtime error: %s", "Receiver is null");
1839 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 264);
1842 var1
= ((val
* (*)(val
*))(var
->class->vft
[COLOR_list__ListNode__next
]))(var
) /* next on <var:nullable ListNode[nullable Object]>*/;
1844 self
->attrs
[COLOR_list__ListIterator___node
].val
= var1
; /* _node on <self:ListIterator[nullable Object]> */
1846 var2
= var_
->attrs
[COLOR_list__ListIterator___index
].l
; /* _index on <var_:ListIterator[nullable Object]> */
1848 { /* Inline kernel#Int#+ (var2,var3) */
1854 var_
->attrs
[COLOR_list__ListIterator___index
].l
= var4
; /* _index on <var_:ListIterator[nullable Object]> */
1857 /* method list#ListIterator#next for (self: Object) */
1858 void VIRTUAL_list__ListIterator__next(val
* self
) {
1859 list__ListIterator__next(self
);
1862 /* method list#ListIterator#init for (self: ListIterator[nullable Object], List[nullable Object]) */
1863 void list__ListIterator__init(val
* self
, val
* p0
) {
1864 short int var
/* : Bool */;
1867 const struct type
* type_struct
;
1868 const char* var_class_name
;
1869 val
* var_list
/* var list: List[nullable Object] */;
1870 val
* var1
/* : nullable ListNode[nullable Object] */;
1871 long var2
/* : Int */;
1872 /* Covariant cast for argument 0 (list) <p0:List[nullable Object]> isa List[ListIterator#0] */
1873 /* <p0:List[nullable Object]> isa List[ListIterator#0] */
1874 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__Listlist__ListIterator_FT0
];
1875 cltype
= type_struct
->color
;
1876 idtype
= type_struct
->id
;
1877 if(cltype
>= p0
->type
->table_size
) {
1880 var
= p0
->type
->type_table
[cltype
] == idtype
;
1883 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1884 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "List[ListIterator#0]", var_class_name
);
1885 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 268);
1889 self
->attrs
[COLOR_list__ListIterator___list
].val
= var_list
; /* _list on <self:ListIterator[nullable Object]> */
1890 var1
= var_list
->attrs
[COLOR_list__List___head
].val
; /* _head on <var_list:List[nullable Object]> */
1891 self
->attrs
[COLOR_list__ListIterator___node
].val
= var1
; /* _node on <self:ListIterator[nullable Object]> */
1893 self
->attrs
[COLOR_list__ListIterator___index
].l
= var2
; /* _index on <self:ListIterator[nullable Object]> */
1896 /* method list#ListIterator#init for (self: Object, List[nullable Object]) */
1897 void VIRTUAL_list__ListIterator__init(val
* self
, val
* p0
) {
1898 list__ListIterator__init(self
, p0
);
1901 /* method list#ListIterator#index for (self: ListIterator[nullable Object]): Int */
1902 long list__ListIterator__index(val
* self
) {
1903 long var
/* : Int */;
1904 long var1
/* : Int */;
1905 var1
= self
->attrs
[COLOR_list__ListIterator___index
].l
; /* _index on <self:ListIterator[nullable Object]> */
1910 /* method list#ListIterator#index for (self: Object): Int */
1911 long VIRTUAL_list__ListIterator__index(val
* self
) {
1912 long var
/* : Int */;
1913 long var1
/* : Int */;
1914 var1
= list__ListIterator__index(self
);
1919 /* method list#ListIterator#delete for (self: ListIterator[nullable Object]) */
1920 void list__ListIterator__delete(val
* self
) {
1921 val
* var
/* : List[nullable Object] */;
1922 val
* var1
/* : nullable ListNode[nullable Object] */;
1923 var
= self
->attrs
[COLOR_list__ListIterator___list
].val
; /* _list on <self:ListIterator[nullable Object]> */
1925 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _list");
1926 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 288);
1929 var1
= self
->attrs
[COLOR_list__ListIterator___node
].val
; /* _node on <self:ListIterator[nullable Object]> */
1931 fprintf(stderr
, "Runtime error: %s", "Cast failed");
1932 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 288);
1935 ((void (*)(val
*, val
*))(var
->class->vft
[COLOR_list__List__remove_node
]))(var
, var1
) /* remove_node on <var:List[nullable Object]>*/;
1938 /* method list#ListIterator#delete for (self: Object) */
1939 void VIRTUAL_list__ListIterator__delete(val
* self
) {
1940 list__ListIterator__delete(self
);
1943 /* method list#ListIterator#insert_before for (self: ListIterator[nullable Object], nullable Object) */
1944 void list__ListIterator__insert_before(val
* self
, val
* p0
) {
1945 short int var
/* : Bool */;
1948 const struct type
* type_struct
;
1949 short int is_nullable
;
1950 const char* var_class_name
;
1951 val
* var_element
/* var element: nullable Object */;
1952 val
* var1
/* : List[nullable Object] */;
1953 val
* var2
/* : nullable ListNode[nullable Object] */;
1954 /* Covariant cast for argument 0 (element) <p0:nullable Object> isa ListIterator#0 */
1955 /* <p0:nullable Object> isa ListIterator#0 */
1956 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__ListIterator_FT0
];
1957 cltype
= type_struct
->color
;
1958 idtype
= type_struct
->id
;
1959 is_nullable
= type_struct
->is_nullable
;
1963 if(cltype
>= p0
->type
->table_size
) {
1966 var
= p0
->type
->type_table
[cltype
] == idtype
;
1970 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1971 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ListIterator#0", var_class_name
);
1972 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 291);
1976 var1
= self
->attrs
[COLOR_list__ListIterator___list
].val
; /* _list on <self:ListIterator[nullable Object]> */
1978 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _list");
1979 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 294);
1982 var2
= self
->attrs
[COLOR_list__ListIterator___node
].val
; /* _node on <self:ListIterator[nullable Object]> */
1984 fprintf(stderr
, "Runtime error: %s", "Cast failed");
1985 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 294);
1988 ((void (*)(val
*, val
*, val
*))(var1
->class->vft
[COLOR_list__List__insert_before
]))(var1
, var_element
, var2
) /* insert_before on <var1:List[nullable Object]>*/;
1991 /* method list#ListIterator#insert_before for (self: Object, nullable Object) */
1992 void VIRTUAL_list__ListIterator__insert_before(val
* self
, val
* p0
) {
1993 list__ListIterator__insert_before(self
, p0
);
1996 /* method list#ListNode#init for (self: ListNode[nullable Object], nullable Object) */
1997 void list__ListNode__init(val
* self
, val
* p0
) {
1998 short int var
/* : Bool */;
2001 const struct type
* type_struct
;
2002 short int is_nullable
;
2003 const char* var_class_name
;
2004 val
* var_i
/* var i: nullable Object */;
2005 /* Covariant cast for argument 0 (i) <p0:nullable Object> isa ListNode#0 */
2006 /* <p0:nullable Object> isa ListNode#0 */
2007 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__ListNode_FT0
];
2008 cltype
= type_struct
->color
;
2009 idtype
= type_struct
->id
;
2010 is_nullable
= type_struct
->is_nullable
;
2014 if(cltype
>= p0
->type
->table_size
) {
2017 var
= p0
->type
->type_table
[cltype
] == idtype
;
2021 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2022 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ListNode#0", var_class_name
);
2023 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 301);
2027 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Container__init
]))(self
, p0
) /* init on <self:ListNode[nullable Object]>*/;
2028 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Container__item_61d
]))(self
, var_i
) /* item= on <self:ListNode[nullable Object]>*/;
2031 /* method list#ListNode#init for (self: Object, nullable Object) */
2032 void VIRTUAL_list__ListNode__init(val
* self
, val
* p0
) {
2033 list__ListNode__init(self
, p0
);
2036 /* method list#ListNode#next for (self: ListNode[nullable Object]): nullable ListNode[nullable Object] */
2037 val
* list__ListNode__next(val
* self
) {
2038 val
* var
/* : nullable ListNode[nullable Object] */;
2039 val
* var1
/* : nullable ListNode[nullable Object] */;
2040 var1
= self
->attrs
[COLOR_list__ListNode___next
].val
; /* _next on <self:ListNode[nullable Object]> */
2045 /* method list#ListNode#next for (self: Object): nullable ListNode[nullable Object] */
2046 val
* VIRTUAL_list__ListNode__next(val
* self
) {
2047 val
* var
/* : nullable ListNode[nullable Object] */;
2048 val
* var1
/* : nullable ListNode[nullable Object] */;
2049 var1
= list__ListNode__next(self
);
2054 /* method list#ListNode#next= for (self: ListNode[nullable Object], nullable ListNode[nullable Object]) */
2055 void list__ListNode__next_61d(val
* self
, val
* p0
) {
2056 short int var
/* : Bool */;
2059 const struct type
* type_struct
;
2060 const char* var_class_name
;
2061 /* Covariant cast for argument 0 (next) <p0:nullable ListNode[nullable Object]> isa nullable ListNode[ListNode#0] */
2062 /* <p0:nullable ListNode[nullable Object]> isa nullable ListNode[ListNode#0] */
2063 type_struct
= self
->type
->resolution_table
->types
[COLOR_nullable_list__ListNodelist__ListNode_FT0
];
2064 cltype
= type_struct
->color
;
2065 idtype
= type_struct
->id
;
2069 if(cltype
>= p0
->type
->table_size
) {
2072 var
= p0
->type
->type_table
[cltype
] == idtype
;
2076 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2077 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ListNode[ListNode#0]", var_class_name
);
2078 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 306);
2081 self
->attrs
[COLOR_list__ListNode___next
].val
= p0
; /* _next on <self:ListNode[nullable Object]> */
2084 /* method list#ListNode#next= for (self: Object, nullable ListNode[nullable Object]) */
2085 void VIRTUAL_list__ListNode__next_61d(val
* self
, val
* p0
) {
2086 list__ListNode__next_61d(self
, p0
);
2089 /* method list#ListNode#prev for (self: ListNode[nullable Object]): nullable ListNode[nullable Object] */
2090 val
* list__ListNode__prev(val
* self
) {
2091 val
* var
/* : nullable ListNode[nullable Object] */;
2092 val
* var1
/* : nullable ListNode[nullable Object] */;
2093 var1
= self
->attrs
[COLOR_list__ListNode___prev
].val
; /* _prev on <self:ListNode[nullable Object]> */
2098 /* method list#ListNode#prev for (self: Object): nullable ListNode[nullable Object] */
2099 val
* VIRTUAL_list__ListNode__prev(val
* self
) {
2100 val
* var
/* : nullable ListNode[nullable Object] */;
2101 val
* var1
/* : nullable ListNode[nullable Object] */;
2102 var1
= list__ListNode__prev(self
);
2107 /* method list#ListNode#prev= for (self: ListNode[nullable Object], nullable ListNode[nullable Object]) */
2108 void list__ListNode__prev_61d(val
* self
, val
* p0
) {
2109 short int var
/* : Bool */;
2112 const struct type
* type_struct
;
2113 const char* var_class_name
;
2114 /* Covariant cast for argument 0 (prev) <p0:nullable ListNode[nullable Object]> isa nullable ListNode[ListNode#0] */
2115 /* <p0:nullable ListNode[nullable Object]> isa nullable ListNode[ListNode#0] */
2116 type_struct
= self
->type
->resolution_table
->types
[COLOR_nullable_list__ListNodelist__ListNode_FT0
];
2117 cltype
= type_struct
->color
;
2118 idtype
= type_struct
->id
;
2122 if(cltype
>= p0
->type
->table_size
) {
2125 var
= p0
->type
->type_table
[cltype
] == idtype
;
2129 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2130 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ListNode[ListNode#0]", var_class_name
);
2131 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 309);
2134 self
->attrs
[COLOR_list__ListNode___prev
].val
= p0
; /* _prev on <self:ListNode[nullable Object]> */
2137 /* method list#ListNode#prev= for (self: Object, nullable ListNode[nullable Object]) */
2138 void VIRTUAL_list__ListNode__prev_61d(val
* self
, val
* p0
) {
2139 list__ListNode__prev_61d(self
, p0
);