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", "Reciever 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", "Reciever 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", "Reciever 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", "Reciever 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", "Reciever 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", "Reciever 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", 262);
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", 261);
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", 262);
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", 261);
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", 260);
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]>*/;
708 CHECK_NEW_list__List(var42
);
711 { /* Inline kernel#Int#<= (var_from,var_to) */
712 /* Covariant cast for argument 0 (i) <var_to:Int> isa OTHER */
713 /* <var_to:Int> isa OTHER */
714 var45
= 1; /* easy <var_to:Int> isa OTHER*/
716 var_class_name48
= type_kernel__Int
.name
;
717 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name48
);
718 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 260);
721 var49
= var_from
<= var_to
;
727 var50
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var_from
) /* [] on <self:List[nullable Object]>*/;
728 ((void (*)(val
*, val
*))(var_list
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var_list
, var50
) /* add on <var_list:List[nullable Object]>*/;
730 { /* Inline kernel#Int#+ (var_from,var51) */
731 var54
= var_from
+ var51
;
737 CONTINUE_label
: (void)0;
739 BREAK_label
: (void)0;
745 /* method list#List#slice for (self: Object, Int, Int): List[nullable Object] */
746 val
* VIRTUAL_list__List__slice(val
* self
, long p0
, long p1
) {
747 val
* var
/* : List[nullable Object] */;
748 val
* var1
/* : List[nullable Object] */;
749 var1
= list__List__slice(self
, p0
, p1
);
754 /* method list#List#push for (self: List[nullable Object], nullable Object) */
755 void list__List__push(val
* self
, val
* p0
) {
756 short int var
/* : Bool */;
759 const struct type
* type_struct
;
760 short int is_nullable
;
761 const char* var_class_name
;
762 val
* var_e
/* var e: nullable Object */;
763 val
* var1
/* : ListNode[nullable Object] */;
764 val
* var_node
/* var node: ListNode[nullable Object] */;
765 val
* var2
/* : nullable ListNode[nullable Object] */;
766 val
* var3
/* : null */;
767 short int var4
/* : Bool */;
768 val
* var5
/* : nullable ListNode[nullable Object] */;
769 val
* var6
/* : nullable ListNode[nullable Object] */;
770 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Sequence#0 */
771 /* <p0:nullable Object> isa Sequence#0 */
772 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
773 cltype
= type_struct
->color
;
774 idtype
= type_struct
->id
;
775 is_nullable
= type_struct
->is_nullable
;
779 if(cltype
>= p0
->type
->table_size
) {
782 var
= p0
->type
->type_table
[cltype
] == idtype
;
786 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
787 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
788 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 93);
792 var1
= NEW_list__ListNode(self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__List_FT0
]);
793 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_list__ListNode__init
]))(var1
, var_e
) /* init on <var1:ListNode[nullable Object]>*/;
794 CHECK_NEW_list__ListNode(var1
);
796 var2
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
799 var4
= 1; /* is null */
801 var4
= 0; /* arg is null but recv is not */
804 self
->attrs
[COLOR_list__List___head
].val
= var_node
; /* _head on <self:List[nullable Object]> */
806 var5
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
808 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
809 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 100);
812 ((void (*)(val
*, val
*))(var5
->class->vft
[COLOR_list__ListNode__next_61d
]))(var5
, var_node
) /* next= on <var5:nullable ListNode[nullable Object]>*/;
814 var6
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
815 ((void (*)(val
*, val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var_node
, var6
) /* prev= on <var_node:ListNode[nullable Object]>*/;
817 self
->attrs
[COLOR_list__List___tail
].val
= var_node
; /* _tail on <self:List[nullable Object]> */
820 /* method list#List#push for (self: Object, nullable Object) */
821 void VIRTUAL_list__List__push(val
* self
, val
* p0
) {
822 list__List__push(self
, p0
);
825 /* method list#List#unshift for (self: List[nullable Object], nullable Object) */
826 void list__List__unshift(val
* self
, val
* p0
) {
827 short int var
/* : Bool */;
830 const struct type
* type_struct
;
831 short int is_nullable
;
832 const char* var_class_name
;
833 val
* var_e
/* var e: nullable Object */;
834 val
* var1
/* : ListNode[nullable Object] */;
835 val
* var_node
/* var node: ListNode[nullable Object] */;
836 val
* var2
/* : nullable ListNode[nullable Object] */;
837 val
* var3
/* : null */;
838 short int var4
/* : Bool */;
839 val
* var5
/* : nullable ListNode[nullable Object] */;
840 val
* var6
/* : nullable ListNode[nullable Object] */;
841 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa Sequence#0 */
842 /* <p0:nullable Object> isa Sequence#0 */
843 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Sequence_FT0
];
844 cltype
= type_struct
->color
;
845 idtype
= type_struct
->id
;
846 is_nullable
= type_struct
->is_nullable
;
850 if(cltype
>= p0
->type
->table_size
) {
853 var
= p0
->type
->type_table
[cltype
] == idtype
;
857 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
858 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Sequence#0", var_class_name
);
859 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 106);
863 var1
= NEW_list__ListNode(self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__List_FT0
]);
864 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_list__ListNode__init
]))(var1
, var_e
) /* init on <var1:ListNode[nullable Object]>*/;
865 CHECK_NEW_list__ListNode(var1
);
867 var2
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
870 var4
= 1; /* is null */
872 var4
= 0; /* arg is null but recv is not */
875 self
->attrs
[COLOR_list__List___tail
].val
= var_node
; /* _tail on <self:List[nullable Object]> */
877 var5
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
878 ((void (*)(val
*, val
*))(var_node
->class->vft
[COLOR_list__ListNode__next_61d
]))(var_node
, var5
) /* next= on <var_node:ListNode[nullable Object]>*/;
879 var6
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
881 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
882 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 114);
885 ((void (*)(val
*, val
*))(var6
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var6
, var_node
) /* prev= on <var6:nullable ListNode[nullable Object]>*/;
888 self
->attrs
[COLOR_list__List___head
].val
= var_node
; /* _head on <self:List[nullable Object]> */
891 /* method list#List#unshift for (self: Object, nullable Object) */
892 void VIRTUAL_list__List__unshift(val
* self
, val
* p0
) {
893 list__List__unshift(self
, p0
);
896 /* method list#List#link for (self: List[nullable Object], List[nullable Object]) */
897 void list__List__link(val
* self
, val
* p0
) {
898 short int var
/* : Bool */;
901 const struct type
* type_struct
;
902 const char* var_class_name
;
903 val
* var_l
/* var l: List[nullable Object] */;
904 val
* var1
/* : nullable ListNode[nullable Object] */;
905 val
* var2
/* : null */;
906 short int var3
/* : Bool */;
907 val
* var4
/* : nullable ListNode[nullable Object] */;
908 val
* var5
/* : nullable ListNode[nullable Object] */;
909 val
* var6
/* : null */;
910 short int var7
/* : Bool */;
911 val
* var8
/* : nullable ListNode[nullable Object] */;
912 val
* var9
/* : nullable ListNode[nullable Object] */;
913 val
* var10
/* : nullable ListNode[nullable Object] */;
914 val
* var11
/* : nullable ListNode[nullable Object] */;
915 val
* var12
/* : nullable ListNode[nullable Object] */;
916 val
* var13
/* : nullable ListNode[nullable Object] */;
917 /* Covariant cast for argument 0 (l) <p0:List[nullable Object]> isa List[List#0] */
918 /* <p0:List[nullable Object]> isa List[List#0] */
919 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__Listlist__List_FT0
];
920 cltype
= type_struct
->color
;
921 idtype
= type_struct
->id
;
922 if(cltype
>= p0
->type
->table_size
) {
925 var
= p0
->type
->type_table
[cltype
] == idtype
;
928 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
929 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "List[List#0]", var_class_name
);
930 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 119);
934 var1
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
937 var3
= 1; /* is null */
939 var3
= 0; /* arg is null but recv is not */
942 var4
= var_l
->attrs
[COLOR_list__List___head
].val
; /* _head on <var_l:List[nullable Object]> */
943 self
->attrs
[COLOR_list__List___head
].val
= var4
; /* _head on <self:List[nullable Object]> */
945 var5
= var_l
->attrs
[COLOR_list__List___head
].val
; /* _head on <var_l:List[nullable Object]> */
948 var7
= 0; /* is null */
950 var7
= 1; /* arg is null and recv is not */
953 var8
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
954 var9
= var_l
->attrs
[COLOR_list__List___head
].val
; /* _head on <var_l:List[nullable Object]> */
956 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
957 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 127);
960 ((void (*)(val
*, val
*))(var8
->class->vft
[COLOR_list__ListNode__next_61d
]))(var8
, var9
) /* next= on <var8:nullable ListNode[nullable Object]>*/;
962 var10
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
964 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
965 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 128);
968 var11
= ((val
* (*)(val
*))(var10
->class->vft
[COLOR_list__ListNode__next
]))(var10
) /* next on <var10:nullable ListNode[nullable Object]>*/;
970 var12
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
972 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
973 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 128);
976 ((void (*)(val
*, val
*))(var11
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var11
, var12
) /* prev= on <var11:nullable ListNode[nullable Object]>*/;
981 var13
= var_l
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <var_l:List[nullable Object]> */
982 self
->attrs
[COLOR_list__List___tail
].val
= var13
; /* _tail on <self:List[nullable Object]> */
983 ((void (*)(val
*))(var_l
->class->vft
[COLOR_abstract_collection__RemovableCollection__clear
]))(var_l
) /* clear on <var_l:List[nullable Object]>*/;
986 /* method list#List#link for (self: Object, List[nullable Object]) */
987 void VIRTUAL_list__List__link(val
* self
, val
* p0
) {
988 list__List__link(self
, p0
);
991 /* method list#List#pop for (self: List[nullable Object]): nullable Object */
992 val
* list__List__pop(val
* self
) {
993 val
* var
/* : nullable Object */;
994 val
* var1
/* : nullable ListNode[nullable Object] */;
995 val
* var_node
/* var node: nullable ListNode[nullable Object] */;
996 val
* var2
/* : nullable ListNode[nullable Object] */;
997 val
* var3
/* : null */;
998 val
* var4
/* : nullable ListNode[nullable Object] */;
999 val
* var5
/* : null */;
1000 short int var6
/* : Bool */;
1001 val
* var7
/* : null */;
1002 val
* var8
/* : nullable ListNode[nullable Object] */;
1003 val
* var9
/* : null */;
1004 val
* var10
/* : nullable Object */;
1005 var1
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
1007 if (var_node
== NULL
) {
1008 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1009 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 140);
1012 var2
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:nullable ListNode[nullable Object]>*/;
1014 self
->attrs
[COLOR_list__List___tail
].val
= var2
; /* _tail on <self:List[nullable Object]> */
1016 if (var_node
== NULL
) {
1017 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1018 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 141);
1021 ((void (*)(val
*, val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var_node
, var3
) /* prev= on <var_node:nullable ListNode[nullable Object]>*/;
1023 var4
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
1026 var6
= 1; /* is null */
1028 var6
= 0; /* arg is null but recv is not */
1032 self
->attrs
[COLOR_list__List___head
].val
= var7
; /* _head on <self:List[nullable Object]> */
1034 var8
= self
->attrs
[COLOR_list__List___tail
].val
; /* _tail on <self:List[nullable Object]> */
1037 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1038 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 145);
1041 ((void (*)(val
*, val
*))(var8
->class->vft
[COLOR_list__ListNode__next_61d
]))(var8
, var9
) /* next= on <var8:nullable ListNode[nullable Object]>*/;
1044 if (var_node
== NULL
) {
1045 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1046 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 147);
1049 var10
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_abstract_collection__Container__item
]))(var_node
) /* item on <var_node:nullable ListNode[nullable Object]>*/;
1056 /* method list#List#pop for (self: Object): nullable Object */
1057 val
* VIRTUAL_list__List__pop(val
* self
) {
1058 val
* var
/* : nullable Object */;
1059 val
* var1
/* : nullable Object */;
1060 var1
= list__List__pop(self
);
1065 /* method list#List#shift for (self: List[nullable Object]): nullable Object */
1066 val
* list__List__shift(val
* self
) {
1067 val
* var
/* : nullable Object */;
1068 val
* var1
/* : nullable ListNode[nullable Object] */;
1069 val
* var_node
/* var node: nullable ListNode[nullable Object] */;
1070 val
* var2
/* : nullable ListNode[nullable Object] */;
1071 val
* var3
/* : null */;
1072 val
* var4
/* : nullable ListNode[nullable Object] */;
1073 val
* var5
/* : null */;
1074 short int var6
/* : Bool */;
1075 val
* var7
/* : null */;
1076 val
* var8
/* : nullable ListNode[nullable Object] */;
1077 val
* var9
/* : null */;
1078 val
* var10
/* : nullable Object */;
1079 var1
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
1081 if (var_node
== NULL
) {
1082 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1083 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 154);
1086 var2
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:nullable ListNode[nullable Object]>*/;
1088 self
->attrs
[COLOR_list__List___head
].val
= var2
; /* _head on <self:List[nullable Object]> */
1090 if (var_node
== NULL
) {
1091 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1092 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 155);
1095 ((void (*)(val
*, val
*))(var_node
->class->vft
[COLOR_list__ListNode__next_61d
]))(var_node
, var3
) /* next= on <var_node:nullable ListNode[nullable Object]>*/;
1097 var4
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
1100 var6
= 1; /* is null */
1102 var6
= 0; /* arg is null but recv is not */
1106 self
->attrs
[COLOR_list__List___tail
].val
= var7
; /* _tail on <self:List[nullable Object]> */
1108 var8
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
1111 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1112 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 159);
1115 ((void (*)(val
*, val
*))(var8
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var8
, var9
) /* prev= on <var8:nullable ListNode[nullable Object]>*/;
1118 if (var_node
== NULL
) {
1119 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1120 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 161);
1123 var10
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_abstract_collection__Container__item
]))(var_node
) /* item on <var_node:nullable ListNode[nullable Object]>*/;
1130 /* method list#List#shift for (self: Object): nullable Object */
1131 val
* VIRTUAL_list__List__shift(val
* self
) {
1132 val
* var
/* : nullable Object */;
1133 val
* var1
/* : nullable Object */;
1134 var1
= list__List__shift(self
);
1139 /* method list#List#remove for (self: List[nullable Object], nullable Object) */
1140 void list__List__remove(val
* self
, val
* p0
) {
1141 short int var
/* : Bool */;
1144 const struct type
* type_struct
;
1145 short int is_nullable
;
1146 const char* var_class_name
;
1147 val
* var_e
/* var e: nullable Object */;
1148 val
* var1
/* : nullable ListNode[nullable Object] */;
1149 val
* var2
/* : nullable ListNode[nullable Object] */;
1150 val
* var_node
/* var node: nullable ListNode[nullable Object] */;
1151 val
* var3
/* : null */;
1152 short int var4
/* : Bool */;
1153 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa RemovableCollection#0 */
1154 /* <p0:nullable Object> isa RemovableCollection#0 */
1155 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
1156 cltype
= type_struct
->color
;
1157 idtype
= type_struct
->id
;
1158 is_nullable
= type_struct
->is_nullable
;
1162 if(cltype
>= p0
->type
->table_size
) {
1165 var
= p0
->type
->type_table
[cltype
] == idtype
;
1169 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1170 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
1171 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 164);
1175 var1
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
1176 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]>*/;
1179 if (var_node
== NULL
) {
1180 var4
= 0; /* is null */
1182 var4
= 1; /* arg is null and recv is not */
1185 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_list__List__remove_node
]))(self
, var_node
) /* remove_node on <self:List[nullable Object]>*/;
1190 /* method list#List#remove for (self: Object, nullable Object) */
1191 void VIRTUAL_list__List__remove(val
* self
, val
* p0
) {
1192 list__List__remove(self
, p0
);
1195 /* method list#List#remove_at for (self: List[nullable Object], Int) */
1196 void list__List__remove_at(val
* self
, long p0
) {
1197 long var_i
/* var i: Int */;
1198 val
* var
/* : nullable ListNode[nullable Object] */;
1199 val
* var_node
/* var node: nullable ListNode[nullable Object] */;
1200 val
* var1
/* : null */;
1201 short int var2
/* : Bool */;
1203 var
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_list__List__get_node
]))(self
, var_i
) /* get_node on <self:List[nullable Object]>*/;
1206 if (var_node
== NULL
) {
1207 var2
= 0; /* is null */
1209 var2
= 1; /* arg is null and recv is not */
1212 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_list__List__remove_node
]))(self
, var_node
) /* remove_node on <self:List[nullable Object]>*/;
1217 /* method list#List#remove_at for (self: Object, Int) */
1218 void VIRTUAL_list__List__remove_at(val
* self
, long p0
) {
1219 list__List__remove_at(self
, p0
);
1222 /* method list#List#clear for (self: List[nullable Object]) */
1223 void list__List__clear(val
* self
) {
1224 val
* var
/* : null */;
1225 val
* var1
/* : null */;
1227 self
->attrs
[COLOR_list__List___head
].val
= var
; /* _head on <self:List[nullable Object]> */
1229 self
->attrs
[COLOR_list__List___tail
].val
= var1
; /* _tail on <self:List[nullable Object]> */
1232 /* method list#List#clear for (self: Object) */
1233 void VIRTUAL_list__List__clear(val
* self
) {
1234 list__List__clear(self
);
1237 /* method list#List#iterator for (self: List[nullable Object]): ListIterator[nullable Object] */
1238 val
* list__List__iterator(val
* self
) {
1239 val
* var
/* : ListIterator[nullable Object] */;
1240 val
* var1
/* : ListIterator[nullable Object] */;
1241 var1
= NEW_list__ListIterator(self
->type
->resolution_table
->types
[COLOR_list__ListIteratorlist__List_FT0
]);
1242 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_list__ListIterator__init
]))(var1
, self
) /* init on <var1:ListIterator[nullable Object]>*/;
1243 CHECK_NEW_list__ListIterator(var1
);
1249 /* method list#List#iterator for (self: Object): Iterator[nullable Object] */
1250 val
* VIRTUAL_list__List__iterator(val
* self
) {
1251 val
* var
/* : Iterator[nullable Object] */;
1252 val
* var1
/* : ListIterator[nullable Object] */;
1253 var1
= list__List__iterator(self
);
1258 /* method list#List#init for (self: List[nullable Object]) */
1259 void list__List__init(val
* self
) {
1262 /* method list#List#init for (self: Object) */
1263 void VIRTUAL_list__List__init(val
* self
) {
1264 list__List__init(self
);
1267 /* method list#List#from for (self: List[nullable Object], Collection[nullable Object]) */
1268 void list__List__from(val
* self
, val
* p0
) {
1269 short int var
/* : Bool */;
1272 const struct type
* type_struct
;
1273 const char* var_class_name
;
1274 val
* var_coll
/* var coll: Collection[nullable Object] */;
1275 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[List#0] */
1276 /* <p0:Collection[nullable Object]> isa Collection[List#0] */
1277 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionlist__List_FT0
];
1278 cltype
= type_struct
->color
;
1279 idtype
= type_struct
->id
;
1280 if(cltype
>= p0
->type
->table_size
) {
1283 var
= p0
->type
->type_table
[cltype
] == idtype
;
1286 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1287 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[List#0]", var_class_name
);
1288 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 188);
1292 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Sequence__append
]))(self
, var_coll
) /* append on <self:List[nullable Object]>*/;
1295 /* method list#List#from for (self: Object, Collection[nullable Object]) */
1296 void VIRTUAL_list__List__from(val
* self
, val
* p0
) {
1297 list__List__from(self
, p0
);
1300 /* method list#List#get_node for (self: List[nullable Object], Int): nullable ListNode[nullable Object] */
1301 val
* list__List__get_node(val
* self
, long p0
) {
1302 val
* var
/* : nullable ListNode[nullable Object] */;
1303 long var_i
/* var i: Int */;
1304 val
* var1
/* : nullable ListNode[nullable Object] */;
1305 val
* var_n
/* var n: nullable ListNode[nullable Object] */;
1306 long var2
/* : Int */;
1307 short int var3
/* : Bool */;
1308 short int var5
/* : Bool */;
1311 const char* var_class_name
;
1312 short int var6
/* : Bool */;
1313 val
* var7
/* : null */;
1314 short int var8
/* : Bool */;
1315 val
* var9
/* : null */;
1316 short int var10
/* : Bool */;
1317 short int var_
/* var : Bool */;
1318 long var11
/* : Int */;
1319 short int var12
/* : Bool */;
1320 short int var14
/* : Bool */;
1323 const char* var_class_name17
;
1324 short int var18
/* : Bool */;
1325 val
* var19
/* : nullable ListNode[nullable Object] */;
1326 long var20
/* : Int */;
1327 long var21
/* : Int */;
1328 long var23
/* : Int */;
1330 var1
= self
->attrs
[COLOR_list__List___head
].val
; /* _head on <self:List[nullable Object]> */
1333 { /* Inline kernel#Int#< (var_i,var2) */
1334 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
1335 /* <var2:Int> isa OTHER */
1336 var5
= 1; /* easy <var2:Int> isa OTHER*/
1338 var_class_name
= type_kernel__Int
.name
;
1339 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1340 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
1343 var6
= var_i
< var2
;
1356 if (var_n
== NULL
) {
1357 var10
= 0; /* is null */
1359 var10
= 1; /* arg is null and recv is not */
1364 { /* Inline kernel#Int#> (var_i,var11) */
1365 /* Covariant cast for argument 0 (i) <var11:Int> isa OTHER */
1366 /* <var11:Int> isa OTHER */
1367 var14
= 1; /* easy <var11:Int> isa OTHER*/
1369 var_class_name17
= type_kernel__Int
.name
;
1370 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name17
);
1371 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
1374 var18
= var_i
> var11
;
1377 RET_LABEL13
:(void)0;
1384 var19
= ((val
* (*)(val
*))(var_n
->class->vft
[COLOR_list__ListNode__next
]))(var_n
) /* next on <var_n:nullable ListNode[nullable Object](ListNode[nullable Object])>*/;
1387 { /* Inline kernel#Int#- (var_i,var20) */
1388 var23
= var_i
- var20
;
1391 RET_LABEL22
:(void)0;
1394 CONTINUE_label
: (void)0;
1396 BREAK_label
: (void)0;
1402 /* method list#List#get_node for (self: Object, Int): nullable ListNode[nullable Object] */
1403 val
* VIRTUAL_list__List__get_node(val
* self
, long p0
) {
1404 val
* var
/* : nullable ListNode[nullable Object] */;
1405 val
* var1
/* : nullable ListNode[nullable Object] */;
1406 var1
= list__List__get_node(self
, p0
);
1411 /* method list#List#search_node_after for (self: List[nullable Object], nullable Object, nullable ListNode[nullable Object]): nullable ListNode[nullable Object] */
1412 val
* list__List__search_node_after(val
* self
, val
* p0
, val
* p1
) {
1413 val
* var
/* : nullable ListNode[nullable Object] */;
1414 short int var1
/* : Bool */;
1417 const struct type
* type_struct
;
1418 short int is_nullable
;
1419 const char* var_class_name
;
1420 short int var2
/* : Bool */;
1423 const struct type
* type_struct5
;
1424 const char* var_class_name6
;
1425 val
* var_e
/* var e: nullable Object */;
1426 val
* var_after
/* var after: nullable ListNode[nullable Object] */;
1427 val
* var_n
/* var n: nullable ListNode[nullable Object] */;
1428 short int var7
/* : Bool */;
1429 val
* var8
/* : null */;
1430 short int var9
/* : Bool */;
1431 short int var_
/* var : Bool */;
1432 val
* var10
/* : nullable Object */;
1433 short int var11
/* : Bool */;
1434 val
* var12
/* : nullable ListNode[nullable Object] */;
1435 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa List#0 */
1436 /* <p0:nullable Object> isa List#0 */
1437 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__List_FT0
];
1438 cltype
= type_struct
->color
;
1439 idtype
= type_struct
->id
;
1440 is_nullable
= type_struct
->is_nullable
;
1444 if(cltype
>= p0
->type
->table_size
) {
1447 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1451 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1452 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "List#0", var_class_name
);
1453 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 211);
1456 /* Covariant cast for argument 1 (after) <p1:nullable ListNode[nullable Object]> isa nullable ListNode[List#0] */
1457 /* <p1:nullable ListNode[nullable Object]> isa nullable ListNode[List#0] */
1458 type_struct5
= self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__List_FT0
];
1459 cltype3
= type_struct5
->color
;
1460 idtype4
= type_struct5
->id
;
1464 if(cltype3
>= p1
->type
->table_size
) {
1467 var2
= p1
->type
->type_table
[cltype3
] == idtype4
;
1471 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
1472 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ListNode[List#0]", var_class_name6
);
1473 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 211);
1481 if (var_n
== NULL
) {
1482 var9
= 0; /* is null */
1484 var9
= 1; /* arg is null and recv is not */
1488 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])>*/;
1489 if (var10
== NULL
) {
1490 var11
= (var_e
!= NULL
);
1492 var11
= ((short int (*)(val
*, val
*))(var10
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var10
, var_e
) /* != on <var10:nullable Object>*/;
1499 var12
= ((val
* (*)(val
*))(var_n
->class->vft
[COLOR_list__ListNode__next
]))(var_n
) /* next on <var_n:nullable ListNode[nullable Object](ListNode[nullable Object])>*/;
1501 CONTINUE_label
: (void)0;
1503 BREAK_label
: (void)0;
1509 /* method list#List#search_node_after for (self: Object, nullable Object, nullable ListNode[nullable Object]): nullable ListNode[nullable Object] */
1510 val
* VIRTUAL_list__List__search_node_after(val
* self
, val
* p0
, val
* p1
) {
1511 val
* var
/* : nullable ListNode[nullable Object] */;
1512 val
* var1
/* : nullable ListNode[nullable Object] */;
1513 var1
= list__List__search_node_after(self
, p0
, p1
);
1518 /* method list#List#remove_node for (self: List[nullable Object], ListNode[nullable Object]) */
1519 void list__List__remove_node(val
* self
, val
* p0
) {
1520 short int var
/* : Bool */;
1523 const struct type
* type_struct
;
1524 const char* var_class_name
;
1525 val
* var_node
/* var node: ListNode[nullable Object] */;
1526 val
* var1
/* : nullable ListNode[nullable Object] */;
1527 val
* var2
/* : null */;
1528 short int var3
/* : Bool */;
1529 val
* var4
/* : nullable ListNode[nullable Object] */;
1530 val
* var5
/* : nullable ListNode[nullable Object] */;
1531 val
* var6
/* : null */;
1532 short int var7
/* : Bool */;
1533 val
* var8
/* : null */;
1534 val
* var9
/* : nullable ListNode[nullable Object] */;
1535 val
* var10
/* : null */;
1536 val
* var11
/* : nullable ListNode[nullable Object] */;
1537 val
* var12
/* : null */;
1538 short int var13
/* : Bool */;
1539 val
* var14
/* : nullable ListNode[nullable Object] */;
1540 val
* var15
/* : nullable ListNode[nullable Object] */;
1541 val
* var16
/* : null */;
1542 val
* var17
/* : nullable ListNode[nullable Object] */;
1543 val
* var18
/* : nullable ListNode[nullable Object] */;
1544 val
* var19
/* : nullable ListNode[nullable Object] */;
1545 val
* var20
/* : nullable ListNode[nullable Object] */;
1546 /* Covariant cast for argument 0 (node) <p0:ListNode[nullable Object]> isa ListNode[List#0] */
1547 /* <p0:ListNode[nullable Object]> isa ListNode[List#0] */
1548 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__List_FT0
];
1549 cltype
= type_struct
->color
;
1550 idtype
= type_struct
->id
;
1551 if(cltype
>= p0
->type
->table_size
) {
1554 var
= p0
->type
->type_table
[cltype
] == idtype
;
1557 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1558 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ListNode[List#0]", var_class_name
);
1559 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 219);
1563 var1
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:ListNode[nullable Object]>*/;
1566 var3
= 1; /* is null */
1568 var3
= 0; /* arg is null but recv is not */
1571 var4
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:ListNode[nullable Object]>*/;
1572 self
->attrs
[COLOR_list__List___head
].val
= var4
; /* _head on <self:List[nullable Object]> */
1573 var5
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:ListNode[nullable Object]>*/;
1576 var7
= 1; /* is null */
1578 var7
= 0; /* arg is null but recv is not */
1582 self
->attrs
[COLOR_list__List___tail
].val
= var8
; /* _tail on <self:List[nullable Object]> */
1584 var9
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:ListNode[nullable Object]>*/;
1587 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1588 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 227);
1591 ((void (*)(val
*, val
*))(var9
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var9
, var10
) /* prev= on <var9:nullable ListNode[nullable Object]>*/;
1595 var11
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:ListNode[nullable Object]>*/;
1597 if (var11
== NULL
) {
1598 var13
= 1; /* is null */
1600 var13
= 0; /* arg is null but recv is not */
1603 var14
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:ListNode[nullable Object]>*/;
1604 self
->attrs
[COLOR_list__List___tail
].val
= var14
; /* _tail on <self:List[nullable Object]> */
1605 var15
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:ListNode[nullable Object]>*/;
1607 if (var15
== NULL
) {
1608 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1609 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 231);
1612 ((void (*)(val
*, val
*))(var15
->class->vft
[COLOR_list__ListNode__next_61d
]))(var15
, var16
) /* next= on <var15:nullable ListNode[nullable Object]>*/;
1615 var17
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:ListNode[nullable Object]>*/;
1616 var18
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:ListNode[nullable Object]>*/;
1617 if (var17
== NULL
) {
1618 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1619 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 233);
1622 ((void (*)(val
*, val
*))(var17
->class->vft
[COLOR_list__ListNode__next_61d
]))(var17
, var18
) /* next= on <var17:nullable ListNode[nullable Object]>*/;
1624 var19
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__next
]))(var_node
) /* next on <var_node:ListNode[nullable Object]>*/;
1625 var20
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:ListNode[nullable Object]>*/;
1626 if (var19
== NULL
) {
1627 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1628 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 234);
1631 ((void (*)(val
*, val
*))(var19
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var19
, var20
) /* prev= on <var19:nullable ListNode[nullable Object]>*/;
1637 /* method list#List#remove_node for (self: Object, ListNode[nullable Object]) */
1638 void VIRTUAL_list__List__remove_node(val
* self
, val
* p0
) {
1639 list__List__remove_node(self
, p0
);
1642 /* method list#List#insert_before for (self: List[nullable Object], nullable Object, ListNode[nullable Object]) */
1643 void list__List__insert_before(val
* self
, val
* p0
, val
* p1
) {
1644 short int var
/* : Bool */;
1647 const struct type
* type_struct
;
1648 short int is_nullable
;
1649 const char* var_class_name
;
1650 short int var1
/* : Bool */;
1653 const struct type
* type_struct4
;
1654 const char* var_class_name5
;
1655 val
* var_element
/* var element: nullable Object */;
1656 val
* var_node
/* var node: ListNode[nullable Object] */;
1657 val
* var6
/* : ListNode[nullable Object] */;
1658 val
* var_nnode
/* var nnode: ListNode[nullable Object] */;
1659 val
* var7
/* : nullable ListNode[nullable Object] */;
1660 val
* var_prev
/* var prev: nullable ListNode[nullable Object] */;
1661 val
* var8
/* : null */;
1662 short int var9
/* : Bool */;
1663 /* Covariant cast for argument 0 (element) <p0:nullable Object> isa List#0 */
1664 /* <p0:nullable Object> isa List#0 */
1665 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__List_FT0
];
1666 cltype
= type_struct
->color
;
1667 idtype
= type_struct
->id
;
1668 is_nullable
= type_struct
->is_nullable
;
1672 if(cltype
>= p0
->type
->table_size
) {
1675 var
= p0
->type
->type_table
[cltype
] == idtype
;
1679 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1680 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "List#0", var_class_name
);
1681 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 238);
1684 /* Covariant cast for argument 1 (node) <p1:ListNode[nullable Object]> isa ListNode[List#0] */
1685 /* <p1:ListNode[nullable Object]> isa ListNode[List#0] */
1686 type_struct4
= self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__List_FT0
];
1687 cltype2
= type_struct4
->color
;
1688 idtype3
= type_struct4
->id
;
1689 if(cltype2
>= p1
->type
->table_size
) {
1692 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
1695 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
1696 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ListNode[List#0]", var_class_name5
);
1697 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 238);
1702 var6
= NEW_list__ListNode(self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__List_FT0
]);
1703 ((void (*)(val
*, val
*))(var6
->class->vft
[COLOR_list__ListNode__init
]))(var6
, var_element
) /* init on <var6:ListNode[nullable Object]>*/;
1704 CHECK_NEW_list__ListNode(var6
);
1706 var7
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev
]))(var_node
) /* prev on <var_node:ListNode[nullable Object]>*/;
1709 if (var_prev
== NULL
) {
1710 var9
= 1; /* is null */
1712 var9
= 0; /* arg is null but recv is not */
1715 self
->attrs
[COLOR_list__List___head
].val
= var_nnode
; /* _head on <self:List[nullable Object]> */
1717 ((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])>*/;
1719 ((void (*)(val
*, val
*))(var_nnode
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var_nnode
, var_prev
) /* prev= on <var_nnode:ListNode[nullable Object]>*/;
1720 ((void (*)(val
*, val
*))(var_nnode
->class->vft
[COLOR_list__ListNode__next_61d
]))(var_nnode
, var_node
) /* next= on <var_nnode:ListNode[nullable Object]>*/;
1721 ((void (*)(val
*, val
*))(var_node
->class->vft
[COLOR_list__ListNode__prev_61d
]))(var_node
, var_nnode
) /* prev= on <var_node:ListNode[nullable Object]>*/;
1724 /* method list#List#insert_before for (self: Object, nullable Object, ListNode[nullable Object]) */
1725 void VIRTUAL_list__List__insert_before(val
* self
, val
* p0
, val
* p1
) {
1726 list__List__insert_before(self
, p0
, p1
);
1729 /* method list#ListIterator#item for (self: ListIterator[nullable Object]): nullable Object */
1730 val
* list__ListIterator__item(val
* self
) {
1731 val
* var
/* : nullable Object */;
1732 val
* var1
/* : nullable ListNode[nullable Object] */;
1733 val
* var2
/* : nullable Object */;
1734 var1
= self
->attrs
[COLOR_list__ListIterator___node
].val
; /* _node on <self:ListIterator[nullable Object]> */
1736 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1737 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 256);
1740 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Container__item
]))(var1
) /* item on <var1:nullable ListNode[nullable Object]>*/;
1747 /* method list#ListIterator#item for (self: Object): nullable Object */
1748 val
* VIRTUAL_list__ListIterator__item(val
* self
) {
1749 val
* var
/* : nullable Object */;
1750 val
* var1
/* : nullable Object */;
1751 var1
= list__ListIterator__item(self
);
1756 /* method list#ListIterator#item= for (self: ListIterator[nullable Object], nullable Object) */
1757 void list__ListIterator__item_61d(val
* self
, val
* p0
) {
1758 short int var
/* : Bool */;
1761 const struct type
* type_struct
;
1762 short int is_nullable
;
1763 const char* var_class_name
;
1764 val
* var_e
/* var e: nullable Object */;
1765 val
* var1
/* : nullable ListNode[nullable Object] */;
1766 /* Covariant cast for argument 0 (e) <p0:nullable Object> isa ListIterator#0 */
1767 /* <p0:nullable Object> isa ListIterator#0 */
1768 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__ListIterator_FT0
];
1769 cltype
= type_struct
->color
;
1770 idtype
= type_struct
->id
;
1771 is_nullable
= type_struct
->is_nullable
;
1775 if(cltype
>= p0
->type
->table_size
) {
1778 var
= p0
->type
->type_table
[cltype
] == idtype
;
1782 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1783 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ListIterator#0", var_class_name
);
1784 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 258);
1788 var1
= self
->attrs
[COLOR_list__ListIterator___node
].val
; /* _node on <self:ListIterator[nullable Object]> */
1790 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1791 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 258);
1794 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_abstract_collection__Container__item_61d
]))(var1
, var_e
) /* item= on <var1:nullable ListNode[nullable Object]>*/;
1798 /* method list#ListIterator#item= for (self: Object, nullable Object) */
1799 void VIRTUAL_list__ListIterator__item_61d(val
* self
, val
* p0
) {
1800 list__ListIterator__item_61d(self
, p0
);
1803 /* method list#ListIterator#is_ok for (self: ListIterator[nullable Object]): Bool */
1804 short int list__ListIterator__is_ok(val
* self
) {
1805 short int var
/* : Bool */;
1806 val
* var1
/* : nullable ListNode[nullable Object] */;
1807 val
* var2
/* : null */;
1808 short int var3
/* : Bool */;
1809 short int var4
/* : Bool */;
1810 var1
= self
->attrs
[COLOR_list__ListIterator___node
].val
; /* _node on <self:ListIterator[nullable Object]> */
1813 var3
= 1; /* is null */
1815 var3
= 0; /* arg is null but recv is not */
1823 /* method list#ListIterator#is_ok for (self: Object): Bool */
1824 short int VIRTUAL_list__ListIterator__is_ok(val
* self
) {
1825 short int var
/* : Bool */;
1826 short int var1
/* : Bool */;
1827 var1
= list__ListIterator__is_ok(self
);
1832 /* method list#ListIterator#next for (self: ListIterator[nullable Object]) */
1833 void list__ListIterator__next(val
* self
) {
1834 val
* var
/* : nullable ListNode[nullable Object] */;
1835 val
* var1
/* : nullable ListNode[nullable Object] */;
1836 val
* var_
/* var : ListIterator[nullable Object] */;
1837 long var2
/* : Int */;
1838 long var3
/* : Int */;
1839 long var4
/* : Int */;
1840 long var6
/* : Int */;
1841 var
= self
->attrs
[COLOR_list__ListIterator___node
].val
; /* _node on <self:ListIterator[nullable Object]> */
1843 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1844 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 264);
1847 var1
= ((val
* (*)(val
*))(var
->class->vft
[COLOR_list__ListNode__next
]))(var
) /* next on <var:nullable ListNode[nullable Object]>*/;
1849 self
->attrs
[COLOR_list__ListIterator___node
].val
= var1
; /* _node on <self:ListIterator[nullable Object]> */
1851 var2
= var_
->attrs
[COLOR_list__ListIterator___index
].l
; /* _index on <var_:ListIterator[nullable Object]> */
1853 { /* Inline kernel#Int#+ (var2,var3) */
1859 var_
->attrs
[COLOR_list__ListIterator___index
].l
= var4
; /* _index on <var_:ListIterator[nullable Object]> */
1862 /* method list#ListIterator#next for (self: Object) */
1863 void VIRTUAL_list__ListIterator__next(val
* self
) {
1864 list__ListIterator__next(self
);
1867 /* method list#ListIterator#init for (self: ListIterator[nullable Object], List[nullable Object]) */
1868 void list__ListIterator__init(val
* self
, val
* p0
) {
1869 short int var
/* : Bool */;
1872 const struct type
* type_struct
;
1873 const char* var_class_name
;
1874 val
* var_list
/* var list: List[nullable Object] */;
1875 val
* var1
/* : nullable ListNode[nullable Object] */;
1876 long var2
/* : Int */;
1877 /* Covariant cast for argument 0 (list) <p0:List[nullable Object]> isa List[ListIterator#0] */
1878 /* <p0:List[nullable Object]> isa List[ListIterator#0] */
1879 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__Listlist__ListIterator_FT0
];
1880 cltype
= type_struct
->color
;
1881 idtype
= type_struct
->id
;
1882 if(cltype
>= p0
->type
->table_size
) {
1885 var
= p0
->type
->type_table
[cltype
] == idtype
;
1888 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1889 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "List[ListIterator#0]", var_class_name
);
1890 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 268);
1894 self
->attrs
[COLOR_list__ListIterator___list
].val
= var_list
; /* _list on <self:ListIterator[nullable Object]> */
1895 var1
= var_list
->attrs
[COLOR_list__List___head
].val
; /* _head on <var_list:List[nullable Object]> */
1896 self
->attrs
[COLOR_list__ListIterator___node
].val
= var1
; /* _node on <self:ListIterator[nullable Object]> */
1898 self
->attrs
[COLOR_list__ListIterator___index
].l
= var2
; /* _index on <self:ListIterator[nullable Object]> */
1901 /* method list#ListIterator#init for (self: Object, List[nullable Object]) */
1902 void VIRTUAL_list__ListIterator__init(val
* self
, val
* p0
) {
1903 list__ListIterator__init(self
, p0
);
1906 /* method list#ListIterator#index for (self: ListIterator[nullable Object]): Int */
1907 long list__ListIterator__index(val
* self
) {
1908 long var
/* : Int */;
1909 long var1
/* : Int */;
1910 var1
= self
->attrs
[COLOR_list__ListIterator___index
].l
; /* _index on <self:ListIterator[nullable Object]> */
1915 /* method list#ListIterator#index for (self: Object): Int */
1916 long VIRTUAL_list__ListIterator__index(val
* self
) {
1917 long var
/* : Int */;
1918 long var1
/* : Int */;
1919 var1
= list__ListIterator__index(self
);
1924 /* method list#ListIterator#delete for (self: ListIterator[nullable Object]) */
1925 void list__ListIterator__delete(val
* self
) {
1926 val
* var
/* : List[nullable Object] */;
1927 val
* var1
/* : nullable ListNode[nullable Object] */;
1928 var
= self
->attrs
[COLOR_list__ListIterator___list
].val
; /* _list on <self:ListIterator[nullable Object]> */
1930 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _list");
1931 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 288);
1934 var1
= self
->attrs
[COLOR_list__ListIterator___node
].val
; /* _node on <self:ListIterator[nullable Object]> */
1936 fprintf(stderr
, "Runtime error: %s", "Cast failed");
1937 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 288);
1940 ((void (*)(val
*, val
*))(var
->class->vft
[COLOR_list__List__remove_node
]))(var
, var1
) /* remove_node on <var:List[nullable Object]>*/;
1943 /* method list#ListIterator#delete for (self: Object) */
1944 void VIRTUAL_list__ListIterator__delete(val
* self
) {
1945 list__ListIterator__delete(self
);
1948 /* method list#ListIterator#insert_before for (self: ListIterator[nullable Object], nullable Object) */
1949 void list__ListIterator__insert_before(val
* self
, val
* p0
) {
1950 short int var
/* : Bool */;
1953 const struct type
* type_struct
;
1954 short int is_nullable
;
1955 const char* var_class_name
;
1956 val
* var_element
/* var element: nullable Object */;
1957 val
* var1
/* : List[nullable Object] */;
1958 val
* var2
/* : nullable ListNode[nullable Object] */;
1959 /* Covariant cast for argument 0 (element) <p0:nullable Object> isa ListIterator#0 */
1960 /* <p0:nullable Object> isa ListIterator#0 */
1961 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__ListIterator_FT0
];
1962 cltype
= type_struct
->color
;
1963 idtype
= type_struct
->id
;
1964 is_nullable
= type_struct
->is_nullable
;
1968 if(cltype
>= p0
->type
->table_size
) {
1971 var
= p0
->type
->type_table
[cltype
] == idtype
;
1975 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1976 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ListIterator#0", var_class_name
);
1977 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 291);
1981 var1
= self
->attrs
[COLOR_list__ListIterator___list
].val
; /* _list on <self:ListIterator[nullable Object]> */
1983 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _list");
1984 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 294);
1987 var2
= self
->attrs
[COLOR_list__ListIterator___node
].val
; /* _node on <self:ListIterator[nullable Object]> */
1989 fprintf(stderr
, "Runtime error: %s", "Cast failed");
1990 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 294);
1993 ((void (*)(val
*, val
*, val
*))(var1
->class->vft
[COLOR_list__List__insert_before
]))(var1
, var_element
, var2
) /* insert_before on <var1:List[nullable Object]>*/;
1996 /* method list#ListIterator#insert_before for (self: Object, nullable Object) */
1997 void VIRTUAL_list__ListIterator__insert_before(val
* self
, val
* p0
) {
1998 list__ListIterator__insert_before(self
, p0
);
2001 /* method list#ListNode#init for (self: ListNode[nullable Object], nullable Object) */
2002 void list__ListNode__init(val
* self
, val
* p0
) {
2003 short int var
/* : Bool */;
2006 const struct type
* type_struct
;
2007 short int is_nullable
;
2008 const char* var_class_name
;
2009 val
* var_i
/* var i: nullable Object */;
2010 /* Covariant cast for argument 0 (i) <p0:nullable Object> isa ListNode#0 */
2011 /* <p0:nullable Object> isa ListNode#0 */
2012 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__ListNode_FT0
];
2013 cltype
= type_struct
->color
;
2014 idtype
= type_struct
->id
;
2015 is_nullable
= type_struct
->is_nullable
;
2019 if(cltype
>= p0
->type
->table_size
) {
2022 var
= p0
->type
->type_table
[cltype
] == idtype
;
2026 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2027 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ListNode#0", var_class_name
);
2028 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 301);
2032 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Container__init
]))(self
, p0
) /* init on <self:ListNode[nullable Object]>*/;
2033 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Container__item_61d
]))(self
, var_i
) /* item= on <self:ListNode[nullable Object]>*/;
2036 /* method list#ListNode#init for (self: Object, nullable Object) */
2037 void VIRTUAL_list__ListNode__init(val
* self
, val
* p0
) {
2038 list__ListNode__init(self
, p0
);
2041 /* method list#ListNode#next for (self: ListNode[nullable Object]): nullable ListNode[nullable Object] */
2042 val
* list__ListNode__next(val
* self
) {
2043 val
* var
/* : nullable ListNode[nullable Object] */;
2044 val
* var1
/* : nullable ListNode[nullable Object] */;
2045 var1
= self
->attrs
[COLOR_list__ListNode___next
].val
; /* _next on <self:ListNode[nullable Object]> */
2050 /* method list#ListNode#next for (self: Object): nullable ListNode[nullable Object] */
2051 val
* VIRTUAL_list__ListNode__next(val
* self
) {
2052 val
* var
/* : nullable ListNode[nullable Object] */;
2053 val
* var1
/* : nullable ListNode[nullable Object] */;
2054 var1
= list__ListNode__next(self
);
2059 /* method list#ListNode#next= for (self: ListNode[nullable Object], nullable ListNode[nullable Object]) */
2060 void list__ListNode__next_61d(val
* self
, val
* p0
) {
2061 short int var
/* : Bool */;
2064 const struct type
* type_struct
;
2065 const char* var_class_name
;
2066 /* Covariant cast for argument 0 (next) <p0:nullable ListNode[nullable Object]> isa nullable ListNode[ListNode#0] */
2067 /* <p0:nullable ListNode[nullable Object]> isa nullable ListNode[ListNode#0] */
2068 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__ListNode_FT0
];
2069 cltype
= type_struct
->color
;
2070 idtype
= type_struct
->id
;
2074 if(cltype
>= p0
->type
->table_size
) {
2077 var
= p0
->type
->type_table
[cltype
] == idtype
;
2081 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2082 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ListNode[ListNode#0]", var_class_name
);
2083 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 306);
2086 self
->attrs
[COLOR_list__ListNode___next
].val
= p0
; /* _next on <self:ListNode[nullable Object]> */
2089 /* method list#ListNode#next= for (self: Object, nullable ListNode[nullable Object]) */
2090 void VIRTUAL_list__ListNode__next_61d(val
* self
, val
* p0
) {
2091 list__ListNode__next_61d(self
, p0
);
2094 /* method list#ListNode#prev for (self: ListNode[nullable Object]): nullable ListNode[nullable Object] */
2095 val
* list__ListNode__prev(val
* self
) {
2096 val
* var
/* : nullable ListNode[nullable Object] */;
2097 val
* var1
/* : nullable ListNode[nullable Object] */;
2098 var1
= self
->attrs
[COLOR_list__ListNode___prev
].val
; /* _prev on <self:ListNode[nullable Object]> */
2103 /* method list#ListNode#prev for (self: Object): nullable ListNode[nullable Object] */
2104 val
* VIRTUAL_list__ListNode__prev(val
* self
) {
2105 val
* var
/* : nullable ListNode[nullable Object] */;
2106 val
* var1
/* : nullable ListNode[nullable Object] */;
2107 var1
= list__ListNode__prev(self
);
2112 /* method list#ListNode#prev= for (self: ListNode[nullable Object], nullable ListNode[nullable Object]) */
2113 void list__ListNode__prev_61d(val
* self
, val
* p0
) {
2114 short int var
/* : Bool */;
2117 const struct type
* type_struct
;
2118 const char* var_class_name
;
2119 /* Covariant cast for argument 0 (prev) <p0:nullable ListNode[nullable Object]> isa nullable ListNode[ListNode#0] */
2120 /* <p0:nullable ListNode[nullable Object]> isa nullable ListNode[ListNode#0] */
2121 type_struct
= self
->type
->resolution_table
->types
[COLOR_list__ListNodelist__ListNode_FT0
];
2122 cltype
= type_struct
->color
;
2123 idtype
= type_struct
->id
;
2127 if(cltype
>= p0
->type
->table_size
) {
2130 var
= p0
->type
->type_table
[cltype
] == idtype
;
2134 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2135 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ListNode[ListNode#0]", var_class_name
);
2136 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/list.nit", 309);
2139 self
->attrs
[COLOR_list__ListNode___prev
].val
= p0
; /* _prev on <self:ListNode[nullable Object]> */
2142 /* method list#ListNode#prev= for (self: Object, nullable ListNode[nullable Object]) */
2143 void VIRTUAL_list__ListNode__prev_61d(val
* self
, val
* p0
) {
2144 list__ListNode__prev_61d(self
, p0
);