1 #include "core__hash_collection.sep.0.h"
2 /* method hash_collection$Set$new for (self: Set[nullable Object]): Set[nullable Object] */
3 val
* core__hash_collection___Set___new(val
* self
) {
4 val
* var
/* : Set[nullable Object] */;
5 val
* var1
/* : HashSet[nullable Object] */;
6 var1
= NEW_core__HashSet((((long)self
&3)?type_info
[((long)self
&3)]:self
->type
)->resolution_table
->types
[COLOR_core__HashSet__core__Set___35dE
]);
8 core___core__HashSet___core__kernel__Object__init(var1
); /* Direct call hash_collection$HashSet$init on <var1:HashSet[nullable Object]>*/
15 /* method hash_collection$HashCollection$index_at for (self: HashCollection[nullable Object], nullable Object): Int */
16 long core__hash_collection___core__hash_collection__HashCollection___index_at(val
* self
, val
* p0
) {
18 val
* var_k
/* var k: nullable Object */;
19 short int var1
/* : Bool */;
20 short int var2
/* : Bool */;
21 long var3
/* : Int */;
22 long var4
/* : Int */;
23 long var5
/* : Int */;
24 long var7
/* : Int */;
25 long var_i
/* var i: Int */;
26 short int var8
/* : Bool */;
27 short int var10
/* : Bool */;
30 const char* var_class_name
;
31 short int var11
/* : Bool */;
32 long var12
/* : Int */;
33 long var14
/* : Int */;
36 var1
= 1; /* is null */
38 var1
= 0; /* arg is null but recv is not */
41 var2
= ((short int(*)(val
* self
, val
* p0
))((((long)var_k
&3)?class_info
[((long)var_k
&3)]:var_k
->class)->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_k
, ((val
*)NULL
)); /* == on <var_k:nullable Object>*/
50 var3
= ((long(*)(val
* self
))((((long)var_k
&3)?class_info
[((long)var_k
&3)]:var_k
->class)->vft
[COLOR_core__kernel__Object__hash
]))(var_k
); /* hash on <var_k:nullable Object(Object)>*/
52 var4
= self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[nullable Object]> */
54 { /* Inline kernel$Int$% (var3,var4) on <var3:Int> */
63 { /* Inline kernel$Int$< (var_i,0l) on <var_i:Int> */
64 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
65 /* <0l:Int> isa OTHER */
66 var10
= 1; /* easy <0l:Int> isa OTHER*/
67 if (unlikely(!var10
)) {
68 var_class_name
= type_core__Int
.name
;
69 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
70 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 725);
81 { /* Inline kernel$Int$unary - (var_i) on <var_i:Int> */
96 /* method hash_collection$HashCollection$node_at for (self: HashCollection[nullable Object], nullable Object): nullable HashNode[nullable Object] */
97 val
* core__hash_collection___core__hash_collection__HashCollection___node_at(val
* self
, val
* p0
) {
98 val
* var
/* : nullable HashNode[nullable Object] */;
99 val
* var_k
/* var k: nullable Object */;
100 long var1
/* : Int */;
101 short int var2
/* : Bool */;
102 short int var4
/* : Bool */;
103 val
* var5
/* : nullable Object */;
104 short int var6
/* : Bool */;
105 short int var7
/* : Bool */;
106 short int var9
/* : Bool */;
107 val
* var10
/* : nullable HashNode[nullable Object] */;
108 long var11
/* : Int */;
109 val
* var12
/* : nullable HashNode[nullable Object] */;
110 val
* var_res
/* var res: nullable HashNode[nullable Object] */;
112 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[nullable Object]> */
114 { /* Inline kernel$Int$== (var1,0l) on <var1:Int> */
126 var5
= self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_key
].val
; /* _last_accessed_key on <self:HashCollection[nullable Object]> */
128 var6
= (var5
== NULL
);
130 { /* Inline kernel$Object$is_same_instance (var_k,var5) on <var_k:nullable Object> */
131 var9
= var_k
== var5
|| (var_k
!= NULL
&& var5
!= NULL
&& (!((long)var_k
&3)) && (!((long)var5
&3)) && var_k
->class == var5
->class && ((var_k
->class->box_kind
== 3 && ((struct instance_core__Byte
*)var_k
)->value
== ((struct instance_core__Byte
*)var5
)->value
) || (var_k
->class->box_kind
== 5 && ((struct instance_core__Float
*)var_k
)->value
== ((struct instance_core__Float
*)var5
)->value
) || (var_k
->class->box_kind
== 6 && ((struct instance_core__CString
*)var_k
)->value
== ((struct instance_core__CString
*)var5
)->value
) || (var_k
->class->box_kind
== 7 && ((struct instance_core__Pointer
*)var_k
)->value
== ((struct instance_core__Pointer
*)var5
)->value
) || (var_k
->class->box_kind
== 8 && ((struct instance_core__Int8
*)var_k
)->value
== ((struct instance_core__Int8
*)var5
)->value
) || (var_k
->class->box_kind
== 9 && ((struct instance_core__Int16
*)var_k
)->value
== ((struct instance_core__Int16
*)var5
)->value
) || (var_k
->class->box_kind
== 10 && ((struct instance_core__UInt16
*)var_k
)->value
== ((struct instance_core__UInt16
*)var5
)->value
) || (var_k
->class->box_kind
== 11 && ((struct instance_core__Int32
*)var_k
)->value
== ((struct instance_core__Int32
*)var5
)->value
) || (var_k
->class->box_kind
== 12 && ((struct instance_core__UInt32
*)var_k
)->value
== ((struct instance_core__UInt32
*)var5
)->value
)));
139 var10
= self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_node
].val
; /* _last_accessed_node on <self:HashCollection[nullable Object]> */
145 var11
= core__hash_collection___core__hash_collection__HashCollection___index_at(self
, var_k
);
148 var12
= core__hash_collection___core__hash_collection__HashCollection___node_at_idx(self
, var11
, var_k
);
151 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_key
].val
= var_k
; /* _last_accessed_key on <self:HashCollection[nullable Object]> */
152 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_node
].val
= var_res
; /* _last_accessed_node on <self:HashCollection[nullable Object]> */
158 /* method hash_collection$HashCollection$node_at_idx for (self: HashCollection[nullable Object], Int, nullable Object): nullable HashNode[nullable Object] */
159 val
* core__hash_collection___core__hash_collection__HashCollection___node_at_idx(val
* self
, long p0
, val
* p1
) {
160 val
* var
/* : nullable HashNode[nullable Object] */;
161 long var_i
/* var i: Int */;
162 val
* var_k
/* var k: nullable Object */;
163 long var1
/* : Int */;
164 short int var2
/* : Bool */;
165 short int var4
/* : Bool */;
166 val
* var5
/* : NativeArray[nullable HashNode[nullable Object]] */;
167 val
* var6
/* : nullable Object */;
168 val
* var8
/* : Object */;
169 val
* var_c
/* var c: nullable HashNode[nullable Object] */;
170 short int var9
/* : Bool */;
171 short int var10
/* : Bool */;
172 val
* var_other
/* var other: nullable Object */;
173 short int var12
/* : Bool */;
174 short int var13
/* : Bool */;
175 val
* var14
/* : nullable Object */;
176 val
* var_ck
/* var ck: nullable Object */;
177 short int var15
/* : Bool */;
178 short int var16
/* : Bool */;
179 short int var17
/* : Bool */;
180 short int var19
/* : Bool */;
181 short int var_
/* var : Bool */;
182 short int var20
/* : Bool */;
183 short int var21
/* : Bool */;
184 val
* var22
/* : nullable HashNode[nullable Object] */;
185 short int var23
/* : Bool */;
188 const struct type
* type_struct
;
189 const char* var_class_name
;
192 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[nullable Object]> */
194 { /* Inline kernel$Int$== (var1,0l) on <var1:Int> */
206 var5
= self
->attrs
[COLOR_core__hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[nullable Object]> */
207 if (unlikely(var5
== NULL
)) {
208 if(catchStack
.cursor
>= 0){
209 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
211 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
212 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 72);
216 { /* Inline array$NativeArray$[] (var5,var_i) on <var5:NativeArray[nullable HashNode[nullable Object]]> */
217 var8
= ((struct instance_core__NativeArray
*)var5
)->values
[var_i
];
226 var9
= 0; /* is null */
228 var9
= 1; /* arg is null and recv is not */
231 { /* Inline kernel$Object$!= (var_c,((val*)NULL)) on <var_c:nullable HashNode[nullable Object]> */
232 var_other
= ((val
*)NULL
);
234 var12
= ((short int(*)(val
* self
, val
* p0
))(var_c
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_c
, var_other
); /* == on <var_c:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
244 var14
= var_c
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var_c:nullable HashNode[nullable Object](HashNode[nullable Object])> */
246 if (var_ck
== NULL
) {
247 var16
= (var_k
== NULL
);
249 { /* Inline kernel$Object$is_same_instance (var_ck,var_k) on <var_ck:nullable Object> */
250 var19
= var_ck
== var_k
|| (var_ck
!= NULL
&& var_k
!= NULL
&& (!((long)var_ck
&3)) && (!((long)var_k
&3)) && var_ck
->class == var_k
->class && ((var_ck
->class->box_kind
== 3 && ((struct instance_core__Byte
*)var_ck
)->value
== ((struct instance_core__Byte
*)var_k
)->value
) || (var_ck
->class->box_kind
== 5 && ((struct instance_core__Float
*)var_ck
)->value
== ((struct instance_core__Float
*)var_k
)->value
) || (var_ck
->class->box_kind
== 6 && ((struct instance_core__CString
*)var_ck
)->value
== ((struct instance_core__CString
*)var_k
)->value
) || (var_ck
->class->box_kind
== 7 && ((struct instance_core__Pointer
*)var_ck
)->value
== ((struct instance_core__Pointer
*)var_k
)->value
) || (var_ck
->class->box_kind
== 8 && ((struct instance_core__Int8
*)var_ck
)->value
== ((struct instance_core__Int8
*)var_k
)->value
) || (var_ck
->class->box_kind
== 9 && ((struct instance_core__Int16
*)var_ck
)->value
== ((struct instance_core__Int16
*)var_k
)->value
) || (var_ck
->class->box_kind
== 10 && ((struct instance_core__UInt16
*)var_ck
)->value
== ((struct instance_core__UInt16
*)var_k
)->value
) || (var_ck
->class->box_kind
== 11 && ((struct instance_core__Int32
*)var_ck
)->value
== ((struct instance_core__Int32
*)var_k
)->value
) || (var_ck
->class->box_kind
== 12 && ((struct instance_core__UInt32
*)var_ck
)->value
== ((struct instance_core__UInt32
*)var_k
)->value
)));
261 if (var_ck
== NULL
) {
262 var20
= (var_k
== NULL
);
264 var21
= ((short int(*)(val
* self
, val
* p0
))((((long)var_ck
&3)?class_info
[((long)var_ck
&3)]:var_ck
->class)->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_ck
, var_k
); /* == on <var_ck:nullable Object>*/
273 var22
= var_c
->attrs
[COLOR_core__hash_collection__HashNode___next_in_bucklet
].val
; /* _next_in_bucklet on <var_c:nullable HashNode[nullable Object](HashNode[nullable Object])> */
274 /* <var22:nullable HashNode[nullable Object]> isa nullable N */
275 type_struct
= self
->type
->resolution_table
->types
[COLOR_nullable__core__hash_collection__HashCollection__N
];
276 cltype
= type_struct
->color
;
277 idtype
= type_struct
->id
;
281 if(cltype
>= var22
->type
->table_size
) {
284 var23
= var22
->type
->type_table
[cltype
] == idtype
;
287 if (unlikely(!var23
)) {
288 var_class_name
= var22
== NULL ?
"null" : var22
->type
->name
;
289 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name
);
290 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 78);
298 BREAK_label
: (void)0;
304 /* method hash_collection$HashCollection$store for (self: HashCollection[nullable Object], Int, HashNode[nullable Object]) */
305 void core__hash_collection___core__hash_collection__HashCollection___store(val
* self
, long p0
, val
* p1
) {
306 short int var
/* : Bool */;
309 const struct type
* type_struct
;
310 const char* var_class_name
;
311 long var_index
/* var index: Int */;
312 val
* var_node
/* var node: HashNode[nullable Object] */;
313 val
* var1
/* : nullable HashNode[nullable Object] */;
314 short int var2
/* : Bool */;
315 short int var3
/* : Bool */;
316 val
* var_other
/* var other: nullable Object */;
317 short int var5
/* : Bool */;
318 short int var7
/* : Bool */;
319 val
* var8
/* : nullable HashNode[nullable Object] */;
320 val
* var9
/* : nullable HashNode[nullable Object] */;
321 val
* var10
/* : NativeArray[nullable HashNode[nullable Object]] */;
322 val
* var11
/* : nullable Object */;
323 val
* var13
/* : Object */;
324 val
* var_next
/* var next: nullable HashNode[nullable Object] */;
325 val
* var14
/* : NativeArray[nullable HashNode[nullable Object]] */;
326 short int var16
/* : Bool */;
329 const struct type
* type_struct19
;
330 const char* var_class_name20
;
331 short int var21
/* : Bool */;
332 short int var22
/* : Bool */;
333 val
* var_other24
/* var other: nullable Object */;
334 short int var25
/* : Bool */;
335 short int var26
/* : Bool */;
336 val
* var27
/* : nullable Object */;
337 long var28
/* : Int */;
338 long var_l
/* var l: Int */;
339 long var29
/* : Int */;
340 short int var31
/* : Bool */;
343 const char* var_class_name34
;
344 long var35
/* : Int */;
345 long var36
/* : Int */;
346 short int var38
/* : Bool */;
349 const char* var_class_name41
;
350 long var42
/* : Int */;
351 long var43
/* : Int */;
352 short int var45
/* : Bool */;
355 const char* var_class_name48
;
356 long var49
/* : Int */;
357 long var50
/* : Int */;
358 short int var52
/* : Bool */;
361 const char* var_class_name55
;
362 long var56
/* : Int */;
363 long var57
/* : Int */;
364 short int var58
/* : Bool */;
365 short int var60
/* : Bool */;
368 const char* var_class_name63
;
369 short int var64
/* : Bool */;
370 long var65
/* : Int */;
371 short int var67
/* : Bool */;
374 const char* var_class_name70
;
375 long var71
/* : Int */;
376 long var72
/* : Int */;
377 short int var74
/* : Bool */;
380 const char* var_class_name77
;
381 long var78
/* : Int */;
382 long var79
/* : Int */;
383 short int var81
/* : Bool */;
386 const char* var_class_name84
;
387 long var85
/* : Int */;
388 /* Covariant cast for argument 1 (node) <p1:HashNode[nullable Object]> isa N */
389 /* <p1:HashNode[nullable Object]> isa N */
390 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashCollection__N
];
391 cltype
= type_struct
->color
;
392 idtype
= type_struct
->id
;
393 if(cltype
>= p1
->type
->table_size
) {
396 var
= p1
->type
->type_table
[cltype
] == idtype
;
398 if (unlikely(!var
)) {
399 var_class_name
= p1
== NULL ?
"null" : p1
->type
->name
;
400 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "N", var_class_name
);
401 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 83);
406 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashCollection[nullable Object]> */
408 var2
= 1; /* is null */
410 var2
= 0; /* arg is null but recv is not */
413 { /* Inline kernel$Object$== (var1,((val*)NULL)) on <var1:nullable HashNode[nullable Object]> */
414 var_other
= ((val
*)NULL
);
416 { /* Inline kernel$Object$is_same_instance (var1,var_other) on <var1:nullable HashNode[nullable Object](HashNode[nullable Object])> */
417 var7
= var1
== var_other
;
430 self
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
= var_node
; /* _first_item on <self:HashCollection[nullable Object]> */
432 var8
= self
->attrs
[COLOR_core__hash_collection__HashCollection___last_item
].val
; /* _last_item on <self:HashCollection[nullable Object]> */
433 if (unlikely(var8
== NULL
)) {
434 if(catchStack
.cursor
>= 0){
435 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
437 PRINT_ERROR("Runtime error: %s", "Receiver is null");
438 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 90);
441 var8
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
= var_node
; /* _next_item on <var8:nullable HashNode[nullable Object]> */
443 var9
= self
->attrs
[COLOR_core__hash_collection__HashCollection___last_item
].val
; /* _last_item on <self:HashCollection[nullable Object]> */
444 var_node
->attrs
[COLOR_core__hash_collection__HashNode___prev_item
].val
= var9
; /* _prev_item on <var_node:HashNode[nullable Object]> */
445 var_node
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
= ((val
*)NULL
); /* _next_item on <var_node:HashNode[nullable Object]> */
446 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_item
].val
= var_node
; /* _last_item on <self:HashCollection[nullable Object]> */
447 var10
= self
->attrs
[COLOR_core__hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[nullable Object]> */
448 if (unlikely(var10
== NULL
)) {
449 if(catchStack
.cursor
>= 0){
450 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
452 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
453 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 97);
457 { /* Inline array$NativeArray$[] (var10,var_index) on <var10:NativeArray[nullable HashNode[nullable Object]]> */
458 var13
= ((struct instance_core__NativeArray
*)var10
)->values
[var_index
];
465 var14
= self
->attrs
[COLOR_core__hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[nullable Object]> */
466 if (unlikely(var14
== NULL
)) {
467 if(catchStack
.cursor
>= 0){
468 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
470 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
471 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 98);
475 { /* Inline array$NativeArray$[]= (var14,var_index,var_node) on <var14:NativeArray[nullable HashNode[nullable Object]]> */
476 /* Covariant cast for argument 1 (item) <var_node:HashNode[nullable Object]> isa E */
477 /* <var_node:HashNode[nullable Object]> isa E */
478 type_struct19
= var14
->type
->resolution_table
->types
[COLOR_core__NativeArray___35dE
];
479 cltype17
= type_struct19
->color
;
480 idtype18
= type_struct19
->id
;
481 if(cltype17
>= var_node
->type
->table_size
) {
484 var16
= var_node
->type
->type_table
[cltype17
] == idtype18
;
486 if (unlikely(!var16
)) {
487 var_class_name20
= var_node
== NULL ?
"null" : var_node
->type
->name
;
488 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name20
);
489 PRINT_ERROR(" (%s:%d)\n", FILE_core__array
, 991);
492 ((struct instance_core__NativeArray
*)var14
)->values
[var_index
]=var_node
;
496 var_node
->attrs
[COLOR_core__hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_node:HashNode[nullable Object]> */
497 if (var_next
== NULL
) {
498 var21
= 0; /* is null */
500 var21
= 1; /* arg is null and recv is not */
503 { /* Inline kernel$Object$!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
504 var_other24
= ((val
*)NULL
);
506 var25
= ((short int(*)(val
* self
, val
* p0
))(var_next
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_next
, var_other24
); /* == on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
516 var_next
->attrs
[COLOR_core__hash_collection__HashNode___prev_in_bucklet
].val
= var_node
; /* _prev_in_bucklet on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])> */
519 var27
= var_node
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var_node:HashNode[nullable Object]> */
520 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_key
].val
= var27
; /* _last_accessed_key on <self:HashCollection[nullable Object]> */
521 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_node
].val
= var_node
; /* _last_accessed_node on <self:HashCollection[nullable Object]> */
522 var28
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[nullable Object]> */
525 { /* Inline kernel$Int$+ (var_l,1l) on <var_l:Int> */
526 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
527 /* <1l:Int> isa OTHER */
528 var31
= 1; /* easy <1l:Int> isa OTHER*/
529 if (unlikely(!var31
)) {
530 var_class_name34
= type_core__Int
.name
;
531 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name34
);
532 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 728);
541 self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
= var29
; /* _the_length on <self:HashCollection[nullable Object]> */
543 { /* Inline kernel$Int$+ (var_l,5l) on <var_l:Int> */
544 /* Covariant cast for argument 0 (i) <5l:Int> isa OTHER */
545 /* <5l:Int> isa OTHER */
546 var38
= 1; /* easy <5l:Int> isa OTHER*/
547 if (unlikely(!var38
)) {
548 var_class_name41
= type_core__Int
.name
;
549 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name41
);
550 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 728);
560 { /* Inline kernel$Int$* (var36,2l) on <var36:Int> */
561 /* Covariant cast for argument 0 (i) <2l:Int> isa OTHER */
562 /* <2l:Int> isa OTHER */
563 var45
= 1; /* easy <2l:Int> isa OTHER*/
564 if (unlikely(!var45
)) {
565 var_class_name48
= type_core__Int
.name
;
566 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name48
);
567 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 732);
577 { /* Inline kernel$Int$+ (var43,1l) on <var43:Int> */
578 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
579 /* <1l:Int> isa OTHER */
580 var52
= 1; /* easy <1l:Int> isa OTHER*/
581 if (unlikely(!var52
)) {
582 var_class_name55
= type_core__Int
.name
;
583 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name55
);
584 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 728);
594 var57
= self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[nullable Object]> */
596 { /* Inline kernel$Int$>= (var_l,var57) on <var_l:Int> */
597 /* Covariant cast for argument 0 (i) <var57:Int> isa OTHER */
598 /* <var57:Int> isa OTHER */
599 var60
= 1; /* easy <var57:Int> isa OTHER*/
600 if (unlikely(!var60
)) {
601 var_class_name63
= type_core__Int
.name
;
602 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name63
);
603 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 726);
606 var64
= var_l
>= var57
;
614 { /* Inline kernel$Int$* (var_l,3l) on <var_l:Int> */
615 /* Covariant cast for argument 0 (i) <3l:Int> isa OTHER */
616 /* <3l:Int> isa OTHER */
617 var67
= 1; /* easy <3l:Int> isa OTHER*/
618 if (unlikely(!var67
)) {
619 var_class_name70
= type_core__Int
.name
;
620 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name70
);
621 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 732);
631 { /* Inline kernel$Int$/ (var65,2l) on <var65:Int> */
632 /* Covariant cast for argument 0 (i) <2l:Int> isa OTHER */
633 /* <2l:Int> isa OTHER */
634 var74
= 1; /* easy <2l:Int> isa OTHER*/
635 if (unlikely(!var74
)) {
636 var_class_name77
= type_core__Int
.name
;
637 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name77
);
638 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 733);
648 { /* Inline kernel$Int$+ (var72,1l) on <var72:Int> */
649 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
650 /* <1l:Int> isa OTHER */
651 var81
= 1; /* easy <1l:Int> isa OTHER*/
652 if (unlikely(!var81
)) {
653 var_class_name84
= type_core__Int
.name
;
654 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name84
);
655 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 728);
665 core__hash_collection___core__hash_collection__HashCollection___enlarge(self
, var79
); /* Direct call hash_collection$HashCollection$enlarge on <self:HashCollection[nullable Object]>*/
671 /* method hash_collection$HashCollection$remove_node for (self: HashCollection[nullable Object], nullable Object) */
672 void core__hash_collection___core__hash_collection__HashCollection___remove_node(val
* self
, val
* p0
) {
673 val
* var_k
/* var k: nullable Object */;
674 long var
/* : Int */;
675 short int var1
/* : Bool */;
676 short int var3
/* : Bool */;
677 long var4
/* : Int */;
678 long var_i
/* var i: Int */;
679 val
* var5
/* : nullable HashNode[nullable Object] */;
680 val
* var_node
/* var node: nullable HashNode[nullable Object] */;
681 short int var6
/* : Bool */;
682 short int var7
/* : Bool */;
683 val
* var_other
/* var other: nullable Object */;
684 short int var9
/* : Bool */;
685 short int var11
/* : Bool */;
686 val
* var12
/* : nullable HashNode[nullable Object] */;
687 val
* var_prev
/* var prev: nullable HashNode[nullable Object] */;
688 val
* var13
/* : nullable HashNode[nullable Object] */;
689 val
* var_next
/* var next: nullable HashNode[nullable Object] */;
690 short int var14
/* : Bool */;
691 short int var15
/* : Bool */;
692 val
* var_other17
/* var other: nullable Object */;
693 short int var18
/* : Bool */;
694 short int var19
/* : Bool */;
695 short int var20
/* : Bool */;
698 const struct type
* type_struct
;
699 const char* var_class_name
;
700 short int var21
/* : Bool */;
701 short int var22
/* : Bool */;
702 short int var24
/* : Bool */;
703 short int var25
/* : Bool */;
704 short int var26
/* : Bool */;
707 const struct type
* type_struct29
;
708 const char* var_class_name30
;
709 val
* var_
/* var : HashCollection[nullable Object] */;
710 long var31
/* : Int */;
711 long var32
/* : Int */;
712 short int var34
/* : Bool */;
715 const char* var_class_name37
;
716 long var38
/* : Int */;
717 val
* var39
/* : nullable HashNode[nullable Object] */;
718 val
* var40
/* : nullable HashNode[nullable Object] */;
719 short int var41
/* : Bool */;
720 short int var42
/* : Bool */;
721 short int var44
/* : Bool */;
722 short int var45
/* : Bool */;
723 val
* var46
/* : NativeArray[nullable HashNode[nullable Object]] */;
724 short int var47
/* : Bool */;
727 const struct type
* type_struct50
;
728 const char* var_class_name51
;
729 short int var53
/* : Bool */;
732 const struct type
* type_struct56
;
733 short int is_nullable
;
734 const char* var_class_name57
;
735 short int var58
/* : Bool */;
736 short int var59
/* : Bool */;
737 short int var61
/* : Bool */;
738 short int var62
/* : Bool */;
740 var
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[nullable Object]> */
742 { /* Inline kernel$Int$== (var,0l) on <var:Int> */
754 var4
= core__hash_collection___core__hash_collection__HashCollection___index_at(self
, var_k
);
758 var5
= core__hash_collection___core__hash_collection__HashCollection___node_at_idx(self
, var_i
, var_k
);
761 if (var_node
== NULL
) {
762 var6
= 1; /* is null */
764 var6
= 0; /* arg is null but recv is not */
767 { /* Inline kernel$Object$== (var_node,((val*)NULL)) on <var_node:nullable HashNode[nullable Object]> */
768 var_other
= ((val
*)NULL
);
770 { /* Inline kernel$Object$is_same_instance (var_node,var_other) on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
771 var11
= var_node
== var_other
;
787 var12
= var_node
->attrs
[COLOR_core__hash_collection__HashNode___prev_item
].val
; /* _prev_item on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
789 var13
= var_node
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
; /* _next_item on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
791 if (var_prev
== NULL
) {
792 var14
= 0; /* is null */
794 var14
= 1; /* arg is null and recv is not */
797 { /* Inline kernel$Object$!= (var_prev,((val*)NULL)) on <var_prev:nullable HashNode[nullable Object]> */
798 var_other17
= ((val
*)NULL
);
800 var18
= ((short int(*)(val
* self
, val
* p0
))(var_prev
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_prev
, var_other17
); /* == on <var_prev:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
810 var_prev
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
= var_next
; /* _next_item on <var_prev:nullable HashNode[nullable Object](HashNode[nullable Object])> */
812 /* <var_next:nullable HashNode[nullable Object]> isa nullable N */
813 type_struct
= self
->type
->resolution_table
->types
[COLOR_nullable__core__hash_collection__HashCollection__N
];
814 cltype
= type_struct
->color
;
815 idtype
= type_struct
->id
;
816 if(var_next
== NULL
) {
819 if(cltype
>= var_next
->type
->table_size
) {
822 var20
= var_next
->type
->type_table
[cltype
] == idtype
;
825 if (unlikely(!var20
)) {
826 var_class_name
= var_next
== NULL ?
"null" : var_next
->type
->name
;
827 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name
);
828 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 132);
831 self
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
= var_next
; /* _first_item on <self:HashCollection[nullable Object]> */
833 if (var_next
== NULL
) {
834 var21
= 0; /* is null */
836 var21
= 1; /* arg is null and recv is not */
839 { /* Inline kernel$Object$!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
840 var_other17
= ((val
*)NULL
);
842 var24
= ((short int(*)(val
* self
, val
* p0
))(var_next
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_next
, var_other17
); /* == on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
852 var_next
->attrs
[COLOR_core__hash_collection__HashNode___prev_item
].val
= var_prev
; /* _prev_item on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])> */
854 /* <var_prev:nullable HashNode[nullable Object]> isa nullable N */
855 type_struct29
= self
->type
->resolution_table
->types
[COLOR_nullable__core__hash_collection__HashCollection__N
];
856 cltype27
= type_struct29
->color
;
857 idtype28
= type_struct29
->id
;
858 if(var_prev
== NULL
) {
861 if(cltype27
>= var_prev
->type
->table_size
) {
864 var26
= var_prev
->type
->type_table
[cltype27
] == idtype28
;
867 if (unlikely(!var26
)) {
868 var_class_name30
= var_prev
== NULL ?
"null" : var_prev
->type
->name
;
869 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name30
);
870 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 137);
873 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_item
].val
= var_prev
; /* _last_item on <self:HashCollection[nullable Object]> */
876 var31
= var_
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <var_:HashCollection[nullable Object]> */
878 { /* Inline kernel$Int$- (var31,1l) on <var31:Int> */
879 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
880 /* <1l:Int> isa OTHER */
881 var34
= 1; /* easy <1l:Int> isa OTHER*/
882 if (unlikely(!var34
)) {
883 var_class_name37
= type_core__Int
.name
;
884 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name37
);
885 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 731);
894 var_
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
= var32
; /* _the_length on <var_:HashCollection[nullable Object]> */
895 var39
= var_node
->attrs
[COLOR_core__hash_collection__HashNode___prev_in_bucklet
].val
; /* _prev_in_bucklet on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
897 var40
= var_node
->attrs
[COLOR_core__hash_collection__HashNode___next_in_bucklet
].val
; /* _next_in_bucklet on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
899 if (var_prev
== NULL
) {
900 var41
= 0; /* is null */
902 var41
= 1; /* arg is null and recv is not */
905 { /* Inline kernel$Object$!= (var_prev,((val*)NULL)) on <var_prev:nullable HashNode[nullable Object]> */
906 var_other17
= ((val
*)NULL
);
908 var44
= ((short int(*)(val
* self
, val
* p0
))(var_prev
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_prev
, var_other17
); /* == on <var_prev:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
918 var_prev
->attrs
[COLOR_core__hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_prev:nullable HashNode[nullable Object](HashNode[nullable Object])> */
920 var46
= self
->attrs
[COLOR_core__hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[nullable Object]> */
921 if (unlikely(var46
== NULL
)) {
922 if(catchStack
.cursor
>= 0){
923 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
925 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
926 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 147);
929 /* <var_next:nullable HashNode[nullable Object]> isa nullable N */
930 type_struct50
= self
->type
->resolution_table
->types
[COLOR_nullable__core__hash_collection__HashCollection__N
];
931 cltype48
= type_struct50
->color
;
932 idtype49
= type_struct50
->id
;
933 if(var_next
== NULL
) {
936 if(cltype48
>= var_next
->type
->table_size
) {
939 var47
= var_next
->type
->type_table
[cltype48
] == idtype49
;
942 if (unlikely(!var47
)) {
943 var_class_name51
= var_next
== NULL ?
"null" : var_next
->type
->name
;
944 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name51
);
945 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 147);
949 { /* Inline array$NativeArray$[]= (var46,var_i,var_next) on <var46:NativeArray[nullable HashNode[nullable Object]]> */
950 /* Covariant cast for argument 1 (item) <var_next:nullable HashNode[nullable Object]> isa E */
951 /* <var_next:nullable HashNode[nullable Object]> isa E */
952 type_struct56
= var46
->type
->resolution_table
->types
[COLOR_core__NativeArray___35dE
];
953 cltype54
= type_struct56
->color
;
954 idtype55
= type_struct56
->id
;
955 is_nullable
= type_struct56
->is_nullable
;
956 if(var_next
== NULL
) {
959 if(cltype54
>= var_next
->type
->table_size
) {
962 var53
= var_next
->type
->type_table
[cltype54
] == idtype55
;
965 if (unlikely(!var53
)) {
966 var_class_name57
= var_next
== NULL ?
"null" : var_next
->type
->name
;
967 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name57
);
968 PRINT_ERROR(" (%s:%d)\n", FILE_core__array
, 991);
971 ((struct instance_core__NativeArray
*)var46
)->values
[var_i
]=var_next
;
976 if (var_next
== NULL
) {
977 var58
= 0; /* is null */
979 var58
= 1; /* arg is null and recv is not */
982 { /* Inline kernel$Object$!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
983 var_other17
= ((val
*)NULL
);
985 var61
= ((short int(*)(val
* self
, val
* p0
))(var_next
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_next
, var_other17
); /* == on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
995 var_next
->attrs
[COLOR_core__hash_collection__HashNode___prev_in_bucklet
].val
= var_prev
; /* _prev_in_bucklet on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])> */
998 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_key
].val
= ((val
*)NULL
); /* _last_accessed_key on <self:HashCollection[nullable Object]> */
1001 /* method hash_collection$HashCollection$raz for (self: HashCollection[nullable Object]) */
1002 void core__hash_collection___core__hash_collection__HashCollection___raz(val
* self
) {
1003 long var
/* : Int */;
1004 long var1
/* : Int */;
1005 short int var3
/* : Bool */;
1008 const char* var_class_name
;
1009 long var4
/* : Int */;
1010 long var_i
/* var i: Int */;
1011 short int var5
/* : Bool */;
1012 short int var7
/* : Bool */;
1015 const char* var_class_name10
;
1016 short int var11
/* : Bool */;
1017 val
* var12
/* : NativeArray[nullable HashNode[nullable Object]] */;
1018 short int var14
/* : Bool */;
1021 const struct type
* type_struct
;
1022 short int is_nullable
;
1023 const char* var_class_name17
;
1024 long var18
/* : Int */;
1025 short int var20
/* : Bool */;
1028 const char* var_class_name23
;
1029 long var24
/* : Int */;
1030 var
= self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[nullable Object]> */
1032 { /* Inline kernel$Int$- (var,1l) on <var:Int> */
1033 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1034 /* <1l:Int> isa OTHER */
1035 var3
= 1; /* easy <1l:Int> isa OTHER*/
1036 if (unlikely(!var3
)) {
1037 var_class_name
= type_core__Int
.name
;
1038 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1039 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 731);
1051 { /* Inline kernel$Int$>= (var_i,0l) on <var_i:Int> */
1052 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
1053 /* <0l:Int> isa OTHER */
1054 var7
= 1; /* easy <0l:Int> isa OTHER*/
1055 if (unlikely(!var7
)) {
1056 var_class_name10
= type_core__Int
.name
;
1057 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name10
);
1058 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 726);
1061 var11
= var_i
>= 0l;
1068 var12
= self
->attrs
[COLOR_core__hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[nullable Object]> */
1069 if (unlikely(var12
== NULL
)) {
1070 if(catchStack
.cursor
>= 0){
1071 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1073 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
1074 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 161);
1078 { /* Inline array$NativeArray$[]= (var12,var_i,((val*)NULL)) on <var12:NativeArray[nullable HashNode[nullable Object]]> */
1079 /* Covariant cast for argument 1 (item) <((val*)NULL):null> isa E */
1080 /* <((val*)NULL):null> isa E */
1081 type_struct
= var12
->type
->resolution_table
->types
[COLOR_core__NativeArray___35dE
];
1082 cltype15
= type_struct
->color
;
1083 idtype16
= type_struct
->id
;
1084 is_nullable
= type_struct
->is_nullable
;
1085 if(((val
*)NULL
) == NULL
) {
1086 var14
= is_nullable
;
1088 if(cltype15
>= ((val
*)NULL
)->type
->table_size
) {
1091 var14
= ((val
*)NULL
)->type
->type_table
[cltype15
] == idtype16
;
1094 if (unlikely(!var14
)) {
1095 var_class_name17
= ((val
*)NULL
) == NULL ?
"null" : ((val
*)NULL
)->type
->name
;
1096 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name17
);
1097 PRINT_ERROR(" (%s:%d)\n", FILE_core__array
, 991);
1100 ((struct instance_core__NativeArray
*)var12
)->values
[var_i
]=((val
*)NULL
);
1101 RET_LABEL13
:(void)0;
1105 { /* Inline kernel$Int$- (var_i,1l) on <var_i:Int> */
1106 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1107 /* <1l:Int> isa OTHER */
1108 var20
= 1; /* easy <1l:Int> isa OTHER*/
1109 if (unlikely(!var20
)) {
1110 var_class_name23
= type_core__Int
.name
;
1111 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name23
);
1112 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 731);
1118 RET_LABEL19
:(void)0;
1126 BREAK_label
: (void)0;
1127 self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
= 0l; /* _the_length on <self:HashCollection[nullable Object]> */
1128 self
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
= ((val
*)NULL
); /* _first_item on <self:HashCollection[nullable Object]> */
1129 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_item
].val
= ((val
*)NULL
); /* _last_item on <self:HashCollection[nullable Object]> */
1130 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_key
].val
= ((val
*)NULL
); /* _last_accessed_key on <self:HashCollection[nullable Object]> */
1133 /* method hash_collection$HashCollection$enlarge for (self: HashCollection[nullable Object], Int) */
1134 void core__hash_collection___core__hash_collection__HashCollection___enlarge(val
* self
, long p0
) {
1135 long var_cap
/* var cap: Int */;
1136 long var
/* : Int */;
1137 long var1
/* : Int */;
1138 short int var3
/* : Bool */;
1141 const char* var_class_name
;
1142 long var4
/* : Int */;
1143 short int var5
/* : Bool */;
1144 short int var7
/* : Bool */;
1147 const char* var_class_name10
;
1148 short int var11
/* : Bool */;
1149 long var12
/* : Int */;
1150 long var13
/* : Int */;
1151 short int var15
/* : Bool */;
1154 const char* var_class_name18
;
1155 long var19
/* : Int */;
1156 long var20
/* : Int */;
1157 short int var21
/* : Bool */;
1158 short int var23
/* : Bool */;
1161 const char* var_class_name26
;
1162 short int var27
/* : Bool */;
1163 val
* var28
/* : NativeArray[nullable HashNode[nullable Object]] */;
1164 val
* var_new_array
/* var new_array: NativeArray[nullable HashNode[nullable Object]] */;
1165 val
* var29
/* : nullable HashNode[nullable Object] */;
1166 val
* var_node
/* var node: nullable HashNode[nullable Object] */;
1167 short int var30
/* : Bool */;
1168 short int var31
/* : Bool */;
1169 val
* var_other
/* var other: nullable Object */;
1170 short int var33
/* : Bool */;
1171 short int var34
/* : Bool */;
1172 val
* var35
/* : nullable Object */;
1173 long var36
/* : Int */;
1174 long var_index
/* var index: Int */;
1175 val
* var37
/* : nullable Object */;
1176 val
* var39
/* : Object */;
1177 val
* var_next
/* var next: nullable HashNode[nullable Object] */;
1178 short int var41
/* : Bool */;
1181 const struct type
* type_struct
;
1182 const char* var_class_name44
;
1183 short int var45
/* : Bool */;
1184 short int var46
/* : Bool */;
1185 short int var48
/* : Bool */;
1186 short int var49
/* : Bool */;
1187 val
* var50
/* : nullable HashNode[nullable Object] */;
1188 short int var51
/* : Bool */;
1191 const struct type
* type_struct54
;
1192 const char* var_class_name55
;
1194 var
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[nullable Object]> */
1196 { /* Inline kernel$Int$+ (var,1l) on <var:Int> */
1197 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1198 /* <1l:Int> isa OTHER */
1199 var3
= 1; /* easy <1l:Int> isa OTHER*/
1200 if (unlikely(!var3
)) {
1201 var_class_name
= type_core__Int
.name
;
1202 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1203 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 728);
1213 { /* Inline kernel$Int$< (var_cap,var1) on <var_cap:Int> */
1214 /* Covariant cast for argument 0 (i) <var1:Int> isa OTHER */
1215 /* <var1:Int> isa OTHER */
1216 var7
= 1; /* easy <var1:Int> isa OTHER*/
1217 if (unlikely(!var7
)) {
1218 var_class_name10
= type_core__Int
.name
;
1219 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name10
);
1220 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 725);
1223 var11
= var_cap
< var1
;
1230 var12
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[nullable Object]> */
1232 { /* Inline kernel$Int$+ (var12,1l) on <var12:Int> */
1233 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1234 /* <1l:Int> isa OTHER */
1235 var15
= 1; /* easy <1l:Int> isa OTHER*/
1236 if (unlikely(!var15
)) {
1237 var_class_name18
= type_core__Int
.name
;
1238 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name18
);
1239 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 728);
1245 RET_LABEL14
:(void)0;
1251 var20
= self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[nullable Object]> */
1253 { /* Inline kernel$Int$<= (var_cap,var20) on <var_cap:Int> */
1254 /* Covariant cast for argument 0 (i) <var20:Int> isa OTHER */
1255 /* <var20:Int> isa OTHER */
1256 var23
= 1; /* easy <var20:Int> isa OTHER*/
1257 if (unlikely(!var23
)) {
1258 var_class_name26
= type_core__Int
.name
;
1259 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name26
);
1260 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 724);
1263 var27
= var_cap
<= var20
;
1266 RET_LABEL22
:(void)0;
1273 self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
= var_cap
; /* _capacity on <self:HashCollection[nullable Object]> */
1274 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_key
].val
= ((val
*)NULL
); /* _last_accessed_key on <self:HashCollection[nullable Object]> */
1275 var28
= NEW_core__NativeArray((int)var_cap
, self
->type
->resolution_table
->types
[COLOR_core__NativeArray__nullable__core__hash_collection__HashCollection__N
]);
1276 var_new_array
= var28
;
1277 self
->attrs
[COLOR_core__hash_collection__HashCollection___array
].val
= var_new_array
; /* _array on <self:HashCollection[nullable Object]> */
1278 var29
= self
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashCollection[nullable Object]> */
1281 if (var_node
== NULL
) {
1282 var30
= 0; /* is null */
1284 var30
= 1; /* arg is null and recv is not */
1287 { /* Inline kernel$Object$!= (var_node,((val*)NULL)) on <var_node:nullable HashNode[nullable Object]> */
1288 var_other
= ((val
*)NULL
);
1290 var33
= ((short int(*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_node
, var_other
); /* == on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
1295 RET_LABEL32
:(void)0;
1300 var35
= var_node
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1302 var36
= core__hash_collection___core__hash_collection__HashCollection___index_at(self
, var35
);
1306 { /* Inline array$NativeArray$[] (var_new_array,var_index) on <var_new_array:NativeArray[nullable HashNode[nullable Object]]> */
1307 var39
= ((struct instance_core__NativeArray
*)var_new_array
)->values
[var_index
];
1310 RET_LABEL38
:(void)0;
1315 { /* Inline array$NativeArray$[]= (var_new_array,var_index,var_node) on <var_new_array:NativeArray[nullable HashNode[nullable Object]]> */
1316 /* Covariant cast for argument 1 (item) <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> isa E */
1317 /* <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> isa E */
1318 type_struct
= var_new_array
->type
->resolution_table
->types
[COLOR_core__NativeArray___35dE
];
1319 cltype42
= type_struct
->color
;
1320 idtype43
= type_struct
->id
;
1321 if(cltype42
>= var_node
->type
->table_size
) {
1324 var41
= var_node
->type
->type_table
[cltype42
] == idtype43
;
1326 if (unlikely(!var41
)) {
1327 var_class_name44
= var_node
== NULL ?
"null" : var_node
->type
->name
;
1328 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name44
);
1329 PRINT_ERROR(" (%s:%d)\n", FILE_core__array
, 991);
1332 ((struct instance_core__NativeArray
*)var_new_array
)->values
[var_index
]=var_node
;
1333 RET_LABEL40
:(void)0;
1336 var_node
->attrs
[COLOR_core__hash_collection__HashNode___prev_in_bucklet
].val
= ((val
*)NULL
); /* _prev_in_bucklet on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1337 var_node
->attrs
[COLOR_core__hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1338 if (var_next
== NULL
) {
1339 var45
= 0; /* is null */
1341 var45
= 1; /* arg is null and recv is not */
1344 { /* Inline kernel$Object$!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
1345 var_other
= ((val
*)NULL
);
1347 var48
= ((short int(*)(val
* self
, val
* p0
))(var_next
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_next
, var_other
); /* == on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
1352 RET_LABEL47
:(void)0;
1357 var_next
->attrs
[COLOR_core__hash_collection__HashNode___prev_in_bucklet
].val
= var_node
; /* _prev_in_bucklet on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1360 var50
= var_node
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
; /* _next_item on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1361 /* <var50:nullable HashNode[nullable Object]> isa nullable N */
1362 type_struct54
= self
->type
->resolution_table
->types
[COLOR_nullable__core__hash_collection__HashCollection__N
];
1363 cltype52
= type_struct54
->color
;
1364 idtype53
= type_struct54
->id
;
1368 if(cltype52
>= var50
->type
->table_size
) {
1371 var51
= var50
->type
->type_table
[cltype52
] == idtype53
;
1374 if (unlikely(!var51
)) {
1375 var_class_name55
= var50
== NULL ?
"null" : var50
->type
->name
;
1376 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name55
);
1377 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 193);
1385 BREAK_label
: (void)0;
1388 /* method hash_collection$HashNode$key= for (self: HashNode[nullable Object], nullable Object) */
1389 void core__hash_collection___core__hash_collection__HashNode___key_61d(val
* self
, val
* p0
) {
1390 short int var
/* : Bool */;
1393 const struct type
* type_struct
;
1394 short int is_nullable
;
1395 const char* var_class_name
;
1396 /* Covariant cast for argument 0 (key) <p0:nullable Object> isa K */
1397 /* <p0:nullable Object> isa K */
1398 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashNode___35dK
];
1399 cltype
= type_struct
->color
;
1400 idtype
= type_struct
->id
;
1401 is_nullable
= type_struct
->is_nullable
;
1405 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
1408 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
1411 if (unlikely(!var
)) {
1412 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
1413 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
1414 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 199);
1417 self
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
= p0
; /* _key on <self:HashNode[nullable Object]> */
1420 /* method hash_collection$HashNode$init for (self: HashNode[nullable Object]) */
1421 void core__hash_collection___core__hash_collection__HashNode___core__kernel__Object__init(val
* self
) {
1423 ((void(*)(val
* self
))(self
->class->vft
[COLOR_core__hash_collection___core__hash_collection__HashNode___core__kernel__Object__init
]))(self
); /* init on <self:HashNode[nullable Object]>*/
1427 /* method hash_collection$HashMap$[] for (self: HashMap[nullable Object, nullable Object], nullable Object): nullable Object */
1428 val
* core___core__HashMap___core__abstract_collection__MapRead___91d_93d(val
* self
, val
* p0
) {
1429 val
* var
/* : nullable Object */;
1430 val
* var_key
/* var key: nullable Object */;
1431 val
* var1
/* : nullable HashNode[nullable Object] */;
1432 val
* var_c
/* var c: nullable HashMapNode[nullable Object, nullable Object] */;
1433 short int var2
/* : Bool */;
1434 short int var3
/* : Bool */;
1435 val
* var_other
/* var other: nullable Object */;
1436 short int var5
/* : Bool */;
1437 short int var7
/* : Bool */;
1438 val
* var8
/* : nullable Object */;
1439 val
* var9
/* : nullable Object */;
1442 var1
= core__hash_collection___core__hash_collection__HashCollection___node_at(self
, var_key
);
1445 if (var_c
== NULL
) {
1446 var2
= 1; /* is null */
1448 var2
= 0; /* arg is null but recv is not */
1451 { /* Inline kernel$Object$== (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
1452 var_other
= ((val
*)NULL
);
1454 { /* Inline kernel$Object$is_same_instance (var_c,var_other) on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1455 var7
= var_c
== var_other
;
1469 var8
= ((val
*(*)(val
* self
, val
* p0
))(self
->class->vft
[COLOR_core__abstract_collection__MapRead__provide_default_value
]))(self
, var_key
); /* provide_default_value on <self:HashMap[nullable Object, nullable Object]>*/
1474 var9
= var_c
->attrs
[COLOR_core__hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1481 /* method hash_collection$HashMap$get_or_null for (self: HashMap[nullable Object, nullable Object], nullable Object): nullable Object */
1482 val
* core___core__HashMap___core__abstract_collection__MapRead__get_or_null(val
* self
, val
* p0
) {
1483 val
* var
/* : nullable Object */;
1484 val
* var_key
/* var key: nullable Object */;
1485 val
* var1
/* : nullable HashNode[nullable Object] */;
1486 val
* var_c
/* var c: nullable HashMapNode[nullable Object, nullable Object] */;
1487 short int var2
/* : Bool */;
1488 short int var3
/* : Bool */;
1489 val
* var_other
/* var other: nullable Object */;
1490 short int var5
/* : Bool */;
1491 short int var7
/* : Bool */;
1492 val
* var8
/* : nullable Object */;
1495 var1
= core__hash_collection___core__hash_collection__HashCollection___node_at(self
, var_key
);
1498 if (var_c
== NULL
) {
1499 var2
= 1; /* is null */
1501 var2
= 0; /* arg is null but recv is not */
1504 { /* Inline kernel$Object$== (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
1505 var_other
= ((val
*)NULL
);
1507 { /* Inline kernel$Object$is_same_instance (var_c,var_other) on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1508 var7
= var_c
== var_other
;
1524 var8
= var_c
->attrs
[COLOR_core__hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1531 /* method hash_collection$HashMap$iterator for (self: HashMap[nullable Object, nullable Object]): MapIterator[nullable Object, nullable Object] */
1532 val
* core___core__HashMap___core__abstract_collection__MapRead__iterator(val
* self
) {
1533 val
* var
/* : MapIterator[nullable Object, nullable Object] */;
1534 val
* var1
/* : HashMapIterator[nullable Object, nullable Object] */;
1535 var1
= NEW_core__hash_collection__HashMapIterator(self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashMapIterator__core__HashMap___35dK__core__HashMap___35dV
]);
1537 ((void(*)(val
* self
, val
* p0
))(var1
->class->vft
[COLOR_core__hash_collection__HashMapIterator__map_61d
]))(var1
, self
); /* map= on <var1:HashMapIterator[nullable Object, nullable Object]>*/
1540 ((void(*)(val
* self
))(var1
->class->vft
[COLOR_core__kernel__Object__init
]))(var1
); /* init on <var1:HashMapIterator[nullable Object, nullable Object]>*/
1547 /* method hash_collection$HashMap$length for (self: HashMap[nullable Object, nullable Object]): Int */
1548 long core___core__HashMap___core__abstract_collection__MapRead__length(val
* self
) {
1549 long var
/* : Int */;
1550 long var1
/* : Int */;
1551 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashMap[nullable Object, nullable Object]> */
1557 /* method hash_collection$HashMap$is_empty for (self: HashMap[nullable Object, nullable Object]): Bool */
1558 short int core___core__HashMap___core__abstract_collection__MapRead__is_empty(val
* self
) {
1559 short int var
/* : Bool */;
1560 long var1
/* : Int */;
1561 short int var2
/* : Bool */;
1562 short int var4
/* : Bool */;
1563 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashMap[nullable Object, nullable Object]> */
1565 { /* Inline kernel$Int$== (var1,0l) on <var1:Int> */
1577 /* method hash_collection$HashMap$[]= for (self: HashMap[nullable Object, nullable Object], nullable Object, nullable Object) */
1578 void core___core__HashMap___core__abstract_collection__Map___91d_93d_61d(val
* self
, val
* p0
, val
* p1
) {
1579 short int var
/* : Bool */;
1582 const struct type
* type_struct
;
1583 short int is_nullable
;
1584 const char* var_class_name
;
1585 short int var1
/* : Bool */;
1588 const struct type
* type_struct4
;
1589 short int is_nullable5
;
1590 const char* var_class_name6
;
1591 val
* var_key
/* var key: nullable Object */;
1592 val
* var_v
/* var v: nullable Object */;
1593 long var7
/* : Int */;
1594 short int var8
/* : Bool */;
1595 short int var10
/* : Bool */;
1596 long var11
/* : Int */;
1597 long var_i
/* var i: Int */;
1598 val
* var12
/* : nullable HashNode[nullable Object] */;
1599 val
* var_c
/* var c: nullable HashMapNode[nullable Object, nullable Object] */;
1600 short int var13
/* : Bool */;
1601 short int var14
/* : Bool */;
1602 val
* var_other
/* var other: nullable Object */;
1603 short int var16
/* : Bool */;
1604 short int var17
/* : Bool */;
1605 val
* var18
/* : HashMapNode[nullable Object, nullable Object] */;
1606 /* Covariant cast for argument 0 (key) <p0:nullable Object> isa K */
1607 /* <p0:nullable Object> isa K */
1608 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__HashMap___35dK
];
1609 cltype
= type_struct
->color
;
1610 idtype
= type_struct
->id
;
1611 is_nullable
= type_struct
->is_nullable
;
1615 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
1618 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
1621 if (unlikely(!var
)) {
1622 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
1623 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
1624 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 252);
1627 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa V */
1628 /* <p1:nullable Object> isa V */
1629 type_struct4
= self
->type
->resolution_table
->types
[COLOR_core__HashMap___35dV
];
1630 cltype2
= type_struct4
->color
;
1631 idtype3
= type_struct4
->id
;
1632 is_nullable5
= type_struct4
->is_nullable
;
1634 var1
= is_nullable5
;
1636 if(cltype2
>= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->table_size
) {
1639 var1
= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->type_table
[cltype2
] == idtype3
;
1642 if (unlikely(!var1
)) {
1643 var_class_name6
= p1
== NULL ?
"null" : (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->name
;
1644 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name6
);
1645 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 252);
1650 var7
= self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashMap[nullable Object, nullable Object]> */
1652 { /* Inline kernel$Int$== (var7,0l) on <var7:Int> */
1661 core__hash_collection___core__hash_collection__HashCollection___enlarge(self
, 17l); /* Direct call hash_collection$HashCollection$enlarge on <self:HashMap[nullable Object, nullable Object]>*/
1666 var11
= core__hash_collection___core__hash_collection__HashCollection___index_at(self
, var_key
);
1670 var12
= core__hash_collection___core__hash_collection__HashCollection___node_at_idx(self
, var_i
, var_key
);
1673 if (var_c
== NULL
) {
1674 var13
= 0; /* is null */
1676 var13
= 1; /* arg is null and recv is not */
1679 { /* Inline kernel$Object$!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
1680 var_other
= ((val
*)NULL
);
1682 var16
= ((short int(*)(val
* self
, val
* p0
))(var_c
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_c
, var_other
); /* == on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
1687 RET_LABEL15
:(void)0;
1692 var_c
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
= var_key
; /* _key on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1693 var_c
->attrs
[COLOR_core__hash_collection__HashMapNode___value
].val
= var_v
; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1695 var18
= NEW_core__hash_collection__HashMapNode(self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashMapNode__core__HashMap___35dK__core__HashMap___35dV
]);
1697 ((void(*)(val
* self
, val
* p0
))(var18
->class->vft
[COLOR_core__hash_collection__HashNode__key_61d
]))(var18
, var_key
); /* key= on <var18:HashMapNode[nullable Object, nullable Object]>*/
1700 ((void(*)(val
* self
, val
* p0
))(var18
->class->vft
[COLOR_core__hash_collection__HashMapNode__value_61d
]))(var18
, var_v
); /* value= on <var18:HashMapNode[nullable Object, nullable Object]>*/
1703 ((void(*)(val
* self
))(var18
->class->vft
[COLOR_core__kernel__Object__init
]))(var18
); /* init on <var18:HashMapNode[nullable Object, nullable Object]>*/
1706 core__hash_collection___core__hash_collection__HashCollection___store(self
, var_i
, var18
); /* Direct call hash_collection$HashCollection$store on <self:HashMap[nullable Object, nullable Object]>*/
1711 /* method hash_collection$HashMap$clear for (self: HashMap[nullable Object, nullable Object]) */
1712 void core___core__HashMap___core__abstract_collection__Map__clear(val
* self
) {
1714 core__hash_collection___core__hash_collection__HashCollection___raz(self
); /* Direct call hash_collection$HashCollection$raz on <self:HashMap[nullable Object, nullable Object]>*/
1718 /* method hash_collection$HashMap$init for (self: HashMap[nullable Object, nullable Object]) */
1719 void core___core__HashMap___core__kernel__Object__init(val
* self
) {
1721 ((void(*)(val
* self
))(self
->class->vft
[COLOR_core___core__HashMap___core__kernel__Object__init
]))(self
); /* init on <self:HashMap[nullable Object, nullable Object]>*/
1723 self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
= 0l; /* _capacity on <self:HashMap[nullable Object, nullable Object]> */
1724 self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
= 0l; /* _the_length on <self:HashMap[nullable Object, nullable Object]> */
1727 /* method hash_collection$HashMap$keys for (self: HashMap[nullable Object, nullable Object]): RemovableCollection[nullable Object] */
1728 val
* core___core__HashMap___core__abstract_collection__MapRead__keys(val
* self
) {
1729 val
* var
/* : RemovableCollection[nullable Object] */;
1730 short int var1
/* : Bool */;
1731 val
* var2
/* : RemovableCollection[nullable Object] */;
1732 val
* var3
/* : HashMapKeys[nullable Object, nullable Object] */;
1733 var1
= self
->attrs
[COLOR_core__hash_collection__HashMap___keys
].val
!= NULL
; /* _keys on <self:HashMap[nullable Object, nullable Object]> */
1735 var2
= self
->attrs
[COLOR_core__hash_collection__HashMap___keys
].val
; /* _keys on <self:HashMap[nullable Object, nullable Object]> */
1736 if (unlikely(var2
== NULL
)) {
1737 if(catchStack
.cursor
>= 0){
1738 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1740 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _keys");
1741 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 279);
1745 var3
= NEW_core__hash_collection__HashMapKeys(self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashMapKeys__core__HashMap___35dK__core__HashMap___35dV
]);
1747 ((void(*)(val
* self
, val
* p0
))(var3
->class->vft
[COLOR_core__hash_collection__HashMapKeys__map_61d
]))(var3
, self
); /* map= on <var3:HashMapKeys[nullable Object, nullable Object]>*/
1750 ((void(*)(val
* self
))(var3
->class->vft
[COLOR_core__kernel__Object__init
]))(var3
); /* init on <var3:HashMapKeys[nullable Object, nullable Object]>*/
1752 self
->attrs
[COLOR_core__hash_collection__HashMap___keys
].val
= var3
; /* _keys on <self:HashMap[nullable Object, nullable Object]> */
1759 /* method hash_collection$HashMap$values for (self: HashMap[nullable Object, nullable Object]): RemovableCollection[nullable Object] */
1760 val
* core___core__HashMap___core__abstract_collection__MapRead__values(val
* self
) {
1761 val
* var
/* : RemovableCollection[nullable Object] */;
1762 short int var1
/* : Bool */;
1763 val
* var2
/* : RemovableCollection[nullable Object] */;
1764 val
* var3
/* : HashMapValues[nullable Object, nullable Object] */;
1765 var1
= self
->attrs
[COLOR_core__hash_collection__HashMap___values
].val
!= NULL
; /* _values on <self:HashMap[nullable Object, nullable Object]> */
1767 var2
= self
->attrs
[COLOR_core__hash_collection__HashMap___values
].val
; /* _values on <self:HashMap[nullable Object, nullable Object]> */
1768 if (unlikely(var2
== NULL
)) {
1769 if(catchStack
.cursor
>= 0){
1770 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1772 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _values");
1773 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 280);
1777 var3
= NEW_core__hash_collection__HashMapValues(self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashMapValues__core__HashMap___35dK__core__HashMap___35dV
]);
1779 ((void(*)(val
* self
, val
* p0
))(var3
->class->vft
[COLOR_core__hash_collection__HashMapValues__map_61d
]))(var3
, self
); /* map= on <var3:HashMapValues[nullable Object, nullable Object]>*/
1782 ((void(*)(val
* self
))(var3
->class->vft
[COLOR_core__kernel__Object__init
]))(var3
); /* init on <var3:HashMapValues[nullable Object, nullable Object]>*/
1784 self
->attrs
[COLOR_core__hash_collection__HashMap___values
].val
= var3
; /* _values on <self:HashMap[nullable Object, nullable Object]> */
1791 /* method hash_collection$HashMap$has_key for (self: HashMap[nullable Object, nullable Object], nullable Object): Bool */
1792 short int core___core__HashMap___core__abstract_collection__MapRead__has_key(val
* self
, val
* p0
) {
1793 short int var
/* : Bool */;
1794 val
* var_k
/* var k: nullable Object */;
1795 val
* var1
/* : nullable HashNode[nullable Object] */;
1796 short int var2
/* : Bool */;
1797 short int var3
/* : Bool */;
1798 val
* var_other
/* var other: nullable Object */;
1799 short int var5
/* : Bool */;
1800 short int var6
/* : Bool */;
1803 var1
= core__hash_collection___core__hash_collection__HashCollection___node_at(self
, var_k
);
1806 var2
= 0; /* is null */
1808 var2
= 1; /* arg is null and recv is not */
1811 { /* Inline kernel$Object$!= (var1,((val*)NULL)) on <var1:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
1812 var_other
= ((val
*)NULL
);
1814 var5
= ((short int(*)(val
* self
, val
* p0
))(var1
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var1
, var_other
); /* == on <var1:nullable HashNode[nullable Object](HashMapNode[nullable Object, nullable Object])>*/
1828 /* method hash_collection$HashMapKeys$map for (self: HashMapKeys[nullable Object, nullable Object]): HashMap[nullable Object, nullable Object] */
1829 val
* core__hash_collection___core__hash_collection__HashMapKeys___map(val
* self
) {
1830 val
* var
/* : HashMap[nullable Object, nullable Object] */;
1831 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
1832 var1
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1833 if (unlikely(var1
== NULL
)) {
1834 if(catchStack
.cursor
>= 0){
1835 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1837 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1838 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
1845 /* method hash_collection$HashMapKeys$map= for (self: HashMapKeys[nullable Object, nullable Object], HashMap[nullable Object, nullable Object]) */
1846 void core__hash_collection___core__hash_collection__HashMapKeys___map_61d(val
* self
, val
* p0
) {
1847 short int var
/* : Bool */;
1850 const struct type
* type_struct
;
1851 const char* var_class_name
;
1852 /* Covariant cast for argument 0 (map) <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
1853 /* <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
1854 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__HashMap__core__hash_collection__HashMapKeys___35dK__core__hash_collection__HashMapKeys___35dV
];
1855 cltype
= type_struct
->color
;
1856 idtype
= type_struct
->id
;
1857 if(cltype
>= p0
->type
->table_size
) {
1860 var
= p0
->type
->type_table
[cltype
] == idtype
;
1862 if (unlikely(!var
)) {
1863 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1864 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name
);
1865 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
1868 self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
= p0
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1871 /* method hash_collection$HashMapKeys$count for (self: HashMapKeys[nullable Object, nullable Object], nullable Object): Int */
1872 long core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__count(val
* self
, val
* p0
) {
1873 long var
/* : Int */;
1874 val
* var_k
/* var k: nullable Object */;
1875 short int var1
/* : Bool */;
1878 var1
= core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__has(self
, var_k
);
1890 /* method hash_collection$HashMapKeys$first for (self: HashMapKeys[nullable Object, nullable Object]): nullable Object */
1891 val
* core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__first(val
* self
) {
1892 val
* var
/* : nullable Object */;
1893 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
1894 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
1895 val
* var4
/* : nullable HashNode[nullable Object] */;
1896 val
* var5
/* : nullable Object */;
1898 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1899 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1900 if (unlikely(var3
== NULL
)) {
1901 if(catchStack
.cursor
>= 0){
1902 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1904 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1905 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
1912 var4
= var1
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
1913 if (unlikely(var4
== NULL
)) {
1914 if(catchStack
.cursor
>= 0){
1915 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1917 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1918 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 291);
1921 var5
= var4
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var4:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
1927 /* method hash_collection$HashMapKeys$has for (self: HashMapKeys[nullable Object, nullable Object], nullable Object): Bool */
1928 short int core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__has(val
* self
, val
* p0
) {
1929 short int var
/* : Bool */;
1930 val
* var_k
/* var k: nullable Object */;
1931 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
1932 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
1933 val
* var4
/* : nullable HashNode[nullable Object] */;
1934 short int var5
/* : Bool */;
1935 short int var6
/* : Bool */;
1936 val
* var_other
/* var other: nullable Object */;
1937 short int var8
/* : Bool */;
1938 short int var9
/* : Bool */;
1941 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1942 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1943 if (unlikely(var3
== NULL
)) {
1944 if(catchStack
.cursor
>= 0){
1945 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1947 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1948 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
1956 var4
= core__hash_collection___core__hash_collection__HashCollection___node_at(var1
, var_k
);
1959 var5
= 0; /* is null */
1961 var5
= 1; /* arg is null and recv is not */
1964 { /* Inline kernel$Object$!= (var4,((val*)NULL)) on <var4:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
1965 var_other
= ((val
*)NULL
);
1967 var8
= ((short int(*)(val
* self
, val
* p0
))(var4
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var4
, var_other
); /* == on <var4:nullable HashNode[nullable Object](HashMapNode[nullable Object, nullable Object])>*/
1981 /* method hash_collection$HashMapKeys$is_empty for (self: HashMapKeys[nullable Object, nullable Object]): Bool */
1982 short int core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__is_empty(val
* self
) {
1983 short int var
/* : Bool */;
1984 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
1985 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
1986 short int var4
/* : Bool */;
1988 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1989 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1990 if (unlikely(var3
== NULL
)) {
1991 if(catchStack
.cursor
>= 0){
1992 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1994 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1995 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
2003 var4
= core___core__HashMap___core__abstract_collection__MapRead__is_empty(var1
);
2010 /* method hash_collection$HashMapKeys$length for (self: HashMapKeys[nullable Object, nullable Object]): Int */
2011 long core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__length(val
* self
) {
2012 long var
/* : Int */;
2013 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2014 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
2015 long var4
/* : Int */;
2017 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2018 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2019 if (unlikely(var3
== NULL
)) {
2020 if(catchStack
.cursor
>= 0){
2021 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2023 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2024 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
2032 var4
= core___core__HashMap___core__abstract_collection__MapRead__length(var1
);
2039 /* method hash_collection$HashMapKeys$iterator for (self: HashMapKeys[nullable Object, nullable Object]): Iterator[nullable Object] */
2040 val
* core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__iterator(val
* self
) {
2041 val
* var
/* : Iterator[nullable Object] */;
2042 val
* var1
/* : MapKeysIterator[nullable Object, nullable Object] */;
2043 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2044 val
* var4
/* : HashMap[nullable Object, nullable Object] */;
2045 val
* var5
/* : MapIterator[nullable Object, nullable Object] */;
2046 var1
= NEW_core__MapKeysIterator(self
->type
->resolution_table
->types
[COLOR_core__MapKeysIterator__core__hash_collection__HashMapKeys___35dK__core__hash_collection__HashMapKeys___35dV
]);
2048 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2049 var4
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2050 if (unlikely(var4
== NULL
)) {
2051 if(catchStack
.cursor
>= 0){
2052 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2054 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2055 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
2063 var5
= core___core__HashMap___core__abstract_collection__MapRead__iterator(var2
);
2066 ((void(*)(val
* self
, val
* p0
))(var1
->class->vft
[COLOR_core__abstract_collection__MapKeysIterator__original_iterator_61d
]))(var1
, var5
); /* original_iterator= on <var1:MapKeysIterator[nullable Object, nullable Object]>*/
2069 ((void(*)(val
* self
))(var1
->class->vft
[COLOR_core__kernel__Object__init
]))(var1
); /* init on <var1:MapKeysIterator[nullable Object, nullable Object]>*/
2076 /* method hash_collection$HashMapKeys$clear for (self: HashMapKeys[nullable Object, nullable Object]) */
2077 void core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__RemovableCollection__clear(val
* self
) {
2078 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2079 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2081 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2082 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2083 if (unlikely(var2
== NULL
)) {
2084 if(catchStack
.cursor
>= 0){
2085 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2087 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2088 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
2096 core___core__HashMap___core__abstract_collection__Map__clear(var
); /* Direct call hash_collection$HashMap$clear on <var:HashMap[nullable Object, nullable Object]>*/
2100 /* method hash_collection$HashMapKeys$remove for (self: HashMapKeys[nullable Object, nullable Object], nullable Object) */
2101 void core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__RemovableCollection__remove(val
* self
, val
* p0
) {
2102 val
* var_key
/* var key: nullable Object */;
2103 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2104 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2107 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2108 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2109 if (unlikely(var2
== NULL
)) {
2110 if(catchStack
.cursor
>= 0){
2111 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2113 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2114 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
2122 core__hash_collection___core__hash_collection__HashCollection___remove_node(var
, var_key
); /* Direct call hash_collection$HashCollection$remove_node on <var:HashMap[nullable Object, nullable Object]>*/
2126 /* method hash_collection$HashMapKeys$init for (self: HashMapKeys[nullable Object, nullable Object]) */
2127 void core__hash_collection___core__hash_collection__HashMapKeys___core__kernel__Object__init(val
* self
) {
2129 ((void(*)(val
* self
))(self
->class->vft
[COLOR_core__hash_collection___core__hash_collection__HashMapKeys___core__kernel__Object__init
]))(self
); /* init on <self:HashMapKeys[nullable Object, nullable Object]>*/
2133 /* method hash_collection$HashMapValues$map for (self: HashMapValues[nullable Object, nullable Object]): HashMap[nullable Object, nullable Object] */
2134 val
* core__hash_collection___core__hash_collection__HashMapValues___map(val
* self
) {
2135 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2136 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2137 var1
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2138 if (unlikely(var1
== NULL
)) {
2139 if(catchStack
.cursor
>= 0){
2140 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2142 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2143 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2150 /* method hash_collection$HashMapValues$map= for (self: HashMapValues[nullable Object, nullable Object], HashMap[nullable Object, nullable Object]) */
2151 void core__hash_collection___core__hash_collection__HashMapValues___map_61d(val
* self
, val
* p0
) {
2152 short int var
/* : Bool */;
2155 const struct type
* type_struct
;
2156 const char* var_class_name
;
2157 /* Covariant cast for argument 0 (map) <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2158 /* <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2159 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__HashMap__core__hash_collection__HashMapValues___35dK__core__hash_collection__HashMapValues___35dV
];
2160 cltype
= type_struct
->color
;
2161 idtype
= type_struct
->id
;
2162 if(cltype
>= p0
->type
->table_size
) {
2165 var
= p0
->type
->type_table
[cltype
] == idtype
;
2167 if (unlikely(!var
)) {
2168 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2169 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name
);
2170 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2173 self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
= p0
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2176 /* method hash_collection$HashMapValues$count for (self: HashMapValues[nullable Object, nullable Object], nullable Object): Int */
2177 long core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__count(val
* self
, val
* p0
) {
2178 long var
/* : Int */;
2179 val
* var_item
/* var item: nullable Object */;
2180 long var_nb
/* var nb: Int */;
2181 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2182 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
2183 val
* var4
/* : nullable HashNode[nullable Object] */;
2184 val
* var_c
/* var c: nullable HashMapNode[nullable Object, nullable Object] */;
2185 short int var5
/* : Bool */;
2186 short int var6
/* : Bool */;
2187 val
* var_other
/* var other: nullable Object */;
2188 short int var8
/* : Bool */;
2189 short int var9
/* : Bool */;
2190 val
* var10
/* : nullable Object */;
2191 short int var11
/* : Bool */;
2192 short int var12
/* : Bool */;
2193 long var13
/* : Int */;
2194 short int var15
/* : Bool */;
2197 const char* var_class_name
;
2198 long var16
/* : Int */;
2199 val
* var17
/* : nullable HashNode[nullable Object] */;
2203 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2204 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2205 if (unlikely(var3
== NULL
)) {
2206 if(catchStack
.cursor
>= 0){
2207 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2209 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2210 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2217 var4
= var1
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
2220 if (var_c
== NULL
) {
2221 var5
= 0; /* is null */
2223 var5
= 1; /* arg is null and recv is not */
2226 { /* Inline kernel$Object$!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
2227 var_other
= ((val
*)NULL
);
2229 var8
= ((short int(*)(val
* self
, val
* p0
))(var_c
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_c
, var_other
); /* == on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
2239 var10
= var_c
->attrs
[COLOR_core__hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2240 if (var10
== NULL
) {
2241 var11
= (var_item
== NULL
);
2243 var12
= ((short int(*)(val
* self
, val
* p0
))((((long)var10
&3)?class_info
[((long)var10
&3)]:var10
->class)->vft
[COLOR_core__kernel__Object___61d_61d
]))(var10
, var_item
); /* == on <var10:nullable Object>*/
2248 { /* Inline kernel$Int$+ (var_nb,1l) on <var_nb:Int> */
2249 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
2250 /* <1l:Int> isa OTHER */
2251 var15
= 1; /* easy <1l:Int> isa OTHER*/
2252 if (unlikely(!var15
)) {
2253 var_class_name
= type_core__Int
.name
;
2254 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2255 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 728);
2258 var16
= var_nb
+ 1l;
2261 RET_LABEL14
:(void)0;
2267 var17
= var_c
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
; /* _next_item on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2273 BREAK_label
: (void)0;
2279 /* method hash_collection$HashMapValues$first for (self: HashMapValues[nullable Object, nullable Object]): nullable Object */
2280 val
* core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__first(val
* self
) {
2281 val
* var
/* : nullable Object */;
2282 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2283 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
2284 val
* var4
/* : nullable HashNode[nullable Object] */;
2285 val
* var5
/* : nullable Object */;
2287 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2288 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2289 if (unlikely(var3
== NULL
)) {
2290 if(catchStack
.cursor
>= 0){
2291 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2293 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2294 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2301 var4
= var1
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
2302 if (unlikely(var4
== NULL
)) {
2303 if(catchStack
.cursor
>= 0){
2304 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2306 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2307 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 321);
2310 var5
= var4
->attrs
[COLOR_core__hash_collection__HashMapNode___value
].val
; /* _value on <var4:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
2316 /* method hash_collection$HashMapValues$has for (self: HashMapValues[nullable Object, nullable Object], nullable Object): Bool */
2317 short int core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__has(val
* self
, val
* p0
) {
2318 short int var
/* : Bool */;
2319 val
* var_item
/* var item: nullable Object */;
2320 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2321 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
2322 val
* var4
/* : nullable HashNode[nullable Object] */;
2323 val
* var_c
/* var c: nullable HashMapNode[nullable Object, nullable Object] */;
2324 short int var5
/* : Bool */;
2325 short int var6
/* : Bool */;
2326 val
* var_other
/* var other: nullable Object */;
2327 short int var8
/* : Bool */;
2328 short int var9
/* : Bool */;
2329 val
* var10
/* : nullable Object */;
2330 short int var11
/* : Bool */;
2331 short int var12
/* : Bool */;
2332 val
* var13
/* : nullable HashNode[nullable Object] */;
2335 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2336 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2337 if (unlikely(var3
== NULL
)) {
2338 if(catchStack
.cursor
>= 0){
2339 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2341 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2342 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2349 var4
= var1
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
2352 if (var_c
== NULL
) {
2353 var5
= 0; /* is null */
2355 var5
= 1; /* arg is null and recv is not */
2358 { /* Inline kernel$Object$!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
2359 var_other
= ((val
*)NULL
);
2361 var8
= ((short int(*)(val
* self
, val
* p0
))(var_c
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_c
, var_other
); /* == on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
2371 var10
= var_c
->attrs
[COLOR_core__hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2372 if (var10
== NULL
) {
2373 var11
= (var_item
== NULL
);
2375 var12
= ((short int(*)(val
* self
, val
* p0
))((((long)var10
&3)?class_info
[((long)var10
&3)]:var10
->class)->vft
[COLOR_core__kernel__Object___61d_61d
]))(var10
, var_item
); /* == on <var10:nullable Object>*/
2383 var13
= var_c
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
; /* _next_item on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2389 BREAK_label
: (void)0;
2395 /* method hash_collection$HashMapValues$is_empty for (self: HashMapValues[nullable Object, nullable Object]): Bool */
2396 short int core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__is_empty(val
* self
) {
2397 short int var
/* : Bool */;
2398 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2399 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
2400 short int var4
/* : Bool */;
2402 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2403 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2404 if (unlikely(var3
== NULL
)) {
2405 if(catchStack
.cursor
>= 0){
2406 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2408 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2409 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2417 var4
= core___core__HashMap___core__abstract_collection__MapRead__is_empty(var1
);
2424 /* method hash_collection$HashMapValues$length for (self: HashMapValues[nullable Object, nullable Object]): Int */
2425 long core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__length(val
* self
) {
2426 long var
/* : Int */;
2427 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2428 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
2429 long var4
/* : Int */;
2431 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2432 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2433 if (unlikely(var3
== NULL
)) {
2434 if(catchStack
.cursor
>= 0){
2435 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2437 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2438 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2446 var4
= core___core__HashMap___core__abstract_collection__MapRead__length(var1
);
2453 /* method hash_collection$HashMapValues$iterator for (self: HashMapValues[nullable Object, nullable Object]): Iterator[nullable Object] */
2454 val
* core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__iterator(val
* self
) {
2455 val
* var
/* : Iterator[nullable Object] */;
2456 val
* var1
/* : MapValuesIterator[nullable Object, nullable Object] */;
2457 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2458 val
* var4
/* : HashMap[nullable Object, nullable Object] */;
2459 val
* var5
/* : MapIterator[nullable Object, nullable Object] */;
2460 var1
= NEW_core__MapValuesIterator(self
->type
->resolution_table
->types
[COLOR_core__MapValuesIterator__core__hash_collection__HashMapValues___35dK__core__hash_collection__HashMapValues___35dV
]);
2462 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2463 var4
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2464 if (unlikely(var4
== NULL
)) {
2465 if(catchStack
.cursor
>= 0){
2466 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2468 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2469 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2477 var5
= core___core__HashMap___core__abstract_collection__MapRead__iterator(var2
);
2480 ((void(*)(val
* self
, val
* p0
))(var1
->class->vft
[COLOR_core__abstract_collection__MapValuesIterator__original_iterator_61d
]))(var1
, var5
); /* original_iterator= on <var1:MapValuesIterator[nullable Object, nullable Object]>*/
2483 ((void(*)(val
* self
))(var1
->class->vft
[COLOR_core__kernel__Object__init
]))(var1
); /* init on <var1:MapValuesIterator[nullable Object, nullable Object]>*/
2490 /* method hash_collection$HashMapValues$clear for (self: HashMapValues[nullable Object, nullable Object]) */
2491 void core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__RemovableCollection__clear(val
* self
) {
2492 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2493 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2495 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2496 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2497 if (unlikely(var2
== NULL
)) {
2498 if(catchStack
.cursor
>= 0){
2499 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2501 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2502 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2510 core___core__HashMap___core__abstract_collection__Map__clear(var
); /* Direct call hash_collection$HashMap$clear on <var:HashMap[nullable Object, nullable Object]>*/
2514 /* method hash_collection$HashMapValues$remove for (self: HashMapValues[nullable Object, nullable Object], nullable Object) */
2515 void core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__RemovableCollection__remove(val
* self
, val
* p0
) {
2516 val
* var_item
/* var item: nullable Object */;
2517 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2518 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2519 val
* var_map
/* var map: HashMap[nullable Object, nullable Object] */;
2520 val
* var3
/* : nullable HashNode[nullable Object] */;
2521 val
* var_c
/* var c: nullable HashMapNode[nullable Object, nullable Object] */;
2522 short int var4
/* : Bool */;
2523 short int var5
/* : Bool */;
2524 val
* var_other
/* var other: nullable Object */;
2525 short int var7
/* : Bool */;
2526 short int var8
/* : Bool */;
2527 val
* var9
/* : nullable Object */;
2528 short int var10
/* : Bool */;
2529 short int var11
/* : Bool */;
2530 val
* var12
/* : nullable Object */;
2531 val
* var13
/* : nullable HashNode[nullable Object] */;
2534 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2535 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2536 if (unlikely(var2
== NULL
)) {
2537 if(catchStack
.cursor
>= 0){
2538 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2540 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2541 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2549 var3
= var_map
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_map:HashMap[nullable Object, nullable Object]> */
2552 if (var_c
== NULL
) {
2553 var4
= 0; /* is null */
2555 var4
= 1; /* arg is null and recv is not */
2558 { /* Inline kernel$Object$!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
2559 var_other
= ((val
*)NULL
);
2561 var7
= ((short int(*)(val
* self
, val
* p0
))(var_c
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_c
, var_other
); /* == on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
2571 var9
= var_c
->attrs
[COLOR_core__hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2573 var10
= (var_item
== NULL
);
2575 var11
= ((short int(*)(val
* self
, val
* p0
))((((long)var9
&3)?class_info
[((long)var9
&3)]:var9
->class)->vft
[COLOR_core__kernel__Object___61d_61d
]))(var9
, var_item
); /* == on <var9:nullable Object>*/
2579 var12
= var_c
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2581 core__hash_collection___core__hash_collection__HashCollection___remove_node(var_map
, var12
); /* Direct call hash_collection$HashCollection$remove_node on <var_map:HashMap[nullable Object, nullable Object]>*/
2586 var13
= var_c
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
; /* _next_item on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2592 BREAK_label
: (void)0;
2595 /* method hash_collection$HashMapValues$init for (self: HashMapValues[nullable Object, nullable Object]) */
2596 void core__hash_collection___core__hash_collection__HashMapValues___core__kernel__Object__init(val
* self
) {
2598 ((void(*)(val
* self
))(self
->class->vft
[COLOR_core__hash_collection___core__hash_collection__HashMapValues___core__kernel__Object__init
]))(self
); /* init on <self:HashMapValues[nullable Object, nullable Object]>*/
2602 /* method hash_collection$HashMapNode$value= for (self: HashMapNode[nullable Object, nullable Object], nullable Object) */
2603 void core__hash_collection___core__hash_collection__HashMapNode___value_61d(val
* self
, val
* p0
) {
2604 short int var
/* : Bool */;
2607 const struct type
* type_struct
;
2608 short int is_nullable
;
2609 const char* var_class_name
;
2610 /* Covariant cast for argument 0 (value) <p0:nullable Object> isa V */
2611 /* <p0:nullable Object> isa V */
2612 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashMapNode___35dV
];
2613 cltype
= type_struct
->color
;
2614 idtype
= type_struct
->id
;
2615 is_nullable
= type_struct
->is_nullable
;
2619 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
2622 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
2625 if (unlikely(!var
)) {
2626 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
2627 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name
);
2628 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 379);
2631 self
->attrs
[COLOR_core__hash_collection__HashMapNode___value
].val
= p0
; /* _value on <self:HashMapNode[nullable Object, nullable Object]> */
2634 /* method hash_collection$HashMapNode$init for (self: HashMapNode[nullable Object, nullable Object]) */
2635 void core__hash_collection___core__hash_collection__HashMapNode___core__kernel__Object__init(val
* self
) {
2637 ((void(*)(val
* self
))(self
->class->vft
[COLOR_core__hash_collection___core__hash_collection__HashMapNode___core__kernel__Object__init
]))(self
); /* init on <self:HashMapNode[nullable Object, nullable Object]>*/
2641 /* method hash_collection$HashMapIterator$is_ok for (self: HashMapIterator[nullable Object, nullable Object]): Bool */
2642 short int core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__is_ok(val
* self
) {
2643 short int var
/* : Bool */;
2644 val
* var1
/* : nullable HashMapNode[nullable Object, nullable Object] */;
2645 short int var2
/* : Bool */;
2646 short int var3
/* : Bool */;
2647 val
* var_other
/* var other: nullable Object */;
2648 short int var5
/* : Bool */;
2649 short int var6
/* : Bool */;
2650 var1
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2652 var2
= 0; /* is null */
2654 var2
= 1; /* arg is null and recv is not */
2657 { /* Inline kernel$Object$!= (var1,((val*)NULL)) on <var1:nullable HashMapNode[nullable Object, nullable Object]> */
2658 var_other
= ((val
*)NULL
);
2660 var5
= ((short int(*)(val
* self
, val
* p0
))(var1
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var1
, var_other
); /* == on <var1:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
2674 /* method hash_collection$HashMapIterator$item for (self: HashMapIterator[nullable Object, nullable Object]): nullable Object */
2675 val
* core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__item(val
* self
) {
2676 val
* var
/* : nullable Object */;
2677 short int var1
/* : Bool */;
2678 val
* var2
/* : nullable HashMapNode[nullable Object, nullable Object] */;
2679 val
* var3
/* : nullable Object */;
2681 var1
= core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__is_ok(self
);
2683 if (unlikely(!var1
)) {
2684 if(catchStack
.cursor
>= 0){
2685 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2687 PRINT_ERROR("Runtime error: %s", "Assert failed");
2688 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 389);
2691 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2692 if (unlikely(var2
== NULL
)) {
2693 if(catchStack
.cursor
>= 0){
2694 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2696 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2697 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 390);
2700 var3
= var2
->attrs
[COLOR_core__hash_collection__HashMapNode___value
].val
; /* _value on <var2:nullable HashMapNode[nullable Object, nullable Object]> */
2706 /* method hash_collection$HashMapIterator$key for (self: HashMapIterator[nullable Object, nullable Object]): nullable Object */
2707 val
* core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__key(val
* self
) {
2708 val
* var
/* : nullable Object */;
2709 short int var1
/* : Bool */;
2710 val
* var2
/* : nullable HashMapNode[nullable Object, nullable Object] */;
2711 val
* var3
/* : nullable Object */;
2713 var1
= core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__is_ok(self
);
2715 if (unlikely(!var1
)) {
2716 if(catchStack
.cursor
>= 0){
2717 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2719 PRINT_ERROR("Runtime error: %s", "Assert failed");
2720 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 401);
2723 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2724 if (unlikely(var2
== NULL
)) {
2725 if(catchStack
.cursor
>= 0){
2726 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2728 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2729 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 402);
2732 var3
= var2
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashMapNode[nullable Object, nullable Object]> */
2738 /* method hash_collection$HashMapIterator$next for (self: HashMapIterator[nullable Object, nullable Object]) */
2739 void core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__next(val
* self
) {
2740 short int var
/* : Bool */;
2741 val
* var1
/* : nullable HashMapNode[nullable Object, nullable Object] */;
2742 val
* var2
/* : nullable HashNode[nullable Object] */;
2744 var
= core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__is_ok(self
);
2746 if (unlikely(!var
)) {
2747 if(catchStack
.cursor
>= 0){
2748 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2750 PRINT_ERROR("Runtime error: %s", "Assert failed");
2751 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 407);
2754 var1
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2755 if (unlikely(var1
== NULL
)) {
2756 if(catchStack
.cursor
>= 0){
2757 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2759 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2760 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 408);
2763 var2
= var1
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
; /* _next_item on <var1:nullable HashMapNode[nullable Object, nullable Object]> */
2764 self
->attrs
[COLOR_core__hash_collection__HashMapIterator___node
].val
= var2
; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2767 /* method hash_collection$HashMapIterator$map for (self: HashMapIterator[nullable Object, nullable Object]): HashMap[nullable Object, nullable Object] */
2768 val
* core__hash_collection___core__hash_collection__HashMapIterator___map(val
* self
) {
2769 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2770 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2771 var1
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___map
].val
; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2772 if (unlikely(var1
== NULL
)) {
2773 if(catchStack
.cursor
>= 0){
2774 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2776 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2777 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 411);
2784 /* method hash_collection$HashMapIterator$map= for (self: HashMapIterator[nullable Object, nullable Object], HashMap[nullable Object, nullable Object]) */
2785 void core__hash_collection___core__hash_collection__HashMapIterator___map_61d(val
* self
, val
* p0
) {
2786 short int var
/* : Bool */;
2789 const struct type
* type_struct
;
2790 const char* var_class_name
;
2791 /* Covariant cast for argument 0 (map) <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2792 /* <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2793 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__HashMap__core__hash_collection__HashMapIterator___35dK__core__hash_collection__HashMapIterator___35dV
];
2794 cltype
= type_struct
->color
;
2795 idtype
= type_struct
->id
;
2796 if(cltype
>= p0
->type
->table_size
) {
2799 var
= p0
->type
->type_table
[cltype
] == idtype
;
2801 if (unlikely(!var
)) {
2802 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2803 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name
);
2804 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 411);
2807 self
->attrs
[COLOR_core__hash_collection__HashMapIterator___map
].val
= p0
; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2810 /* method hash_collection$HashMapIterator$init for (self: HashMapIterator[nullable Object, nullable Object]) */
2811 void core__hash_collection___core__hash_collection__HashMapIterator___core__kernel__Object__init(val
* self
) {
2812 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2813 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2814 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
2815 val
* var4
/* : nullable HashNode[nullable Object] */;
2817 ((void(*)(val
* self
))(self
->class->vft
[COLOR_core__hash_collection___core__hash_collection__HashMapIterator___core__kernel__Object__init
]))(self
); /* init on <self:HashMapIterator[nullable Object, nullable Object]>*/
2820 { /* Inline hash_collection$HashMapIterator$map (self) on <self:HashMapIterator[nullable Object, nullable Object]> */
2821 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___map
].val
; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2822 if (unlikely(var2
== NULL
)) {
2823 if(catchStack
.cursor
>= 0){
2824 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2826 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2827 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 411);
2834 self
->attrs
[COLOR_core__hash_collection__HashMapIterator___map
].val
= var
; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2835 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___map
].val
; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2836 if (unlikely(var3
== NULL
)) {
2837 if(catchStack
.cursor
>= 0){
2838 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2840 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2841 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 420);
2844 var4
= var3
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var3:HashMap[nullable Object, nullable Object]> */
2845 self
->attrs
[COLOR_core__hash_collection__HashMapIterator___node
].val
= var4
; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2848 /* method hash_collection$HashSet$length for (self: HashSet[nullable Object]): Int */
2849 long core___core__HashSet___core__abstract_collection__Collection__length(val
* self
) {
2850 long var
/* : Int */;
2851 long var1
/* : Int */;
2852 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashSet[nullable Object]> */
2858 /* method hash_collection$HashSet$is_empty for (self: HashSet[nullable Object]): Bool */
2859 short int core___core__HashSet___core__abstract_collection__Collection__is_empty(val
* self
) {
2860 short int var
/* : Bool */;
2861 long var1
/* : Int */;
2862 short int var2
/* : Bool */;
2863 short int var4
/* : Bool */;
2864 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashSet[nullable Object]> */
2866 { /* Inline kernel$Int$== (var1,0l) on <var1:Int> */
2878 /* method hash_collection$HashSet$first for (self: HashSet[nullable Object]): nullable Object */
2879 val
* core___core__HashSet___core__abstract_collection__Collection__first(val
* self
) {
2880 val
* var
/* : nullable Object */;
2881 long var1
/* : Int */;
2882 short int var2
/* : Bool */;
2883 short int var4
/* : Bool */;
2886 const char* var_class_name
;
2887 short int var5
/* : Bool */;
2888 val
* var6
/* : nullable HashNode[nullable Object] */;
2889 val
* var7
/* : nullable Object */;
2890 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashSet[nullable Object]> */
2892 { /* Inline kernel$Int$> (var1,0l) on <var1:Int> */
2893 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
2894 /* <0l:Int> isa OTHER */
2895 var4
= 1; /* easy <0l:Int> isa OTHER*/
2896 if (unlikely(!var4
)) {
2897 var_class_name
= type_core__Int
.name
;
2898 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2899 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 727);
2908 if (unlikely(!var2
)) {
2909 if(catchStack
.cursor
>= 0){
2910 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2912 PRINT_ERROR("Runtime error: %s", "Assert failed");
2913 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 438);
2916 var6
= self
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashSet[nullable Object]> */
2917 if (unlikely(var6
== NULL
)) {
2918 if(catchStack
.cursor
>= 0){
2919 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2921 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2922 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 439);
2925 var7
= var6
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var6:nullable HashNode[nullable Object](nullable HashSetNode[nullable Object])> */
2931 /* method hash_collection$HashSet$has for (self: HashSet[nullable Object], nullable Object): Bool */
2932 short int core___core__HashSet___core__abstract_collection__Collection__has(val
* self
, val
* p0
) {
2933 short int var
/* : Bool */;
2934 val
* var_item
/* var item: nullable Object */;
2935 val
* var1
/* : nullable HashNode[nullable Object] */;
2936 short int var2
/* : Bool */;
2937 short int var3
/* : Bool */;
2938 val
* var_other
/* var other: nullable Object */;
2939 short int var5
/* : Bool */;
2940 short int var6
/* : Bool */;
2943 var1
= core__hash_collection___core__hash_collection__HashCollection___node_at(self
, var_item
);
2946 var2
= 0; /* is null */
2948 var2
= 1; /* arg is null and recv is not */
2951 { /* Inline kernel$Object$!= (var1,((val*)NULL)) on <var1:nullable HashNode[nullable Object](nullable HashSetNode[nullable Object])> */
2952 var_other
= ((val
*)NULL
);
2954 var5
= ((short int(*)(val
* self
, val
* p0
))(var1
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var1
, var_other
); /* == on <var1:nullable HashNode[nullable Object](HashSetNode[nullable Object])>*/
2968 /* method hash_collection$HashSet$add for (self: HashSet[nullable Object], nullable Object) */
2969 void core___core__HashSet___core__abstract_collection__SimpleCollection__add(val
* self
, val
* p0
) {
2970 short int var
/* : Bool */;
2973 const struct type
* type_struct
;
2974 short int is_nullable
;
2975 const char* var_class_name
;
2976 val
* var_item
/* var item: nullable Object */;
2977 long var1
/* : Int */;
2978 short int var2
/* : Bool */;
2979 short int var4
/* : Bool */;
2980 long var5
/* : Int */;
2981 long var_i
/* var i: Int */;
2982 val
* var6
/* : nullable HashNode[nullable Object] */;
2983 val
* var_c
/* var c: nullable HashSetNode[nullable Object] */;
2984 short int var7
/* : Bool */;
2985 short int var8
/* : Bool */;
2986 val
* var_other
/* var other: nullable Object */;
2987 short int var10
/* : Bool */;
2988 short int var11
/* : Bool */;
2989 val
* var12
/* : HashSetNode[nullable Object] */;
2990 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
2991 /* <p0:nullable Object> isa E */
2992 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__HashSet___35dE
];
2993 cltype
= type_struct
->color
;
2994 idtype
= type_struct
->id
;
2995 is_nullable
= type_struct
->is_nullable
;
2999 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
3002 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
3005 if (unlikely(!var
)) {
3006 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
3007 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
3008 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 447);
3012 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashSet[nullable Object]> */
3014 { /* Inline kernel$Int$== (var1,0l) on <var1:Int> */
3023 core__hash_collection___core__hash_collection__HashCollection___enlarge(self
, 17l); /* Direct call hash_collection$HashCollection$enlarge on <self:HashSet[nullable Object]>*/
3028 var5
= core__hash_collection___core__hash_collection__HashCollection___index_at(self
, var_item
);
3032 var6
= core__hash_collection___core__hash_collection__HashCollection___node_at_idx(self
, var_i
, var_item
);
3035 if (var_c
== NULL
) {
3036 var7
= 0; /* is null */
3038 var7
= 1; /* arg is null and recv is not */
3041 { /* Inline kernel$Object$!= (var_c,((val*)NULL)) on <var_c:nullable HashSetNode[nullable Object]> */
3042 var_other
= ((val
*)NULL
);
3044 var10
= ((short int(*)(val
* self
, val
* p0
))(var_c
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_c
, var_other
); /* == on <var_c:nullable HashSetNode[nullable Object](HashSetNode[nullable Object])>*/
3054 var_c
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
= var_item
; /* _key on <var_c:nullable HashSetNode[nullable Object](HashSetNode[nullable Object])> */
3056 var12
= NEW_core__hash_collection__HashSetNode(self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashSetNode__core__HashSet___35dE
]);
3058 ((void(*)(val
* self
, val
* p0
))(var12
->class->vft
[COLOR_core__hash_collection__HashNode__key_61d
]))(var12
, var_item
); /* key= on <var12:HashSetNode[nullable Object]>*/
3061 ((void(*)(val
* self
))(var12
->class->vft
[COLOR_core__kernel__Object__init
]))(var12
); /* init on <var12:HashSetNode[nullable Object]>*/
3064 core__hash_collection___core__hash_collection__HashCollection___store(self
, var_i
, var12
); /* Direct call hash_collection$HashCollection$store on <self:HashSet[nullable Object]>*/
3069 /* method hash_collection$HashSet$remove for (self: HashSet[nullable Object], nullable Object) */
3070 void core___core__HashSet___core__abstract_collection__RemovableCollection__remove(val
* self
, val
* p0
) {
3071 val
* var_item
/* var item: nullable Object */;
3074 core__hash_collection___core__hash_collection__HashCollection___remove_node(self
, var_item
); /* Direct call hash_collection$HashCollection$remove_node on <self:HashSet[nullable Object]>*/
3078 /* method hash_collection$HashSet$clear for (self: HashSet[nullable Object]) */
3079 void core___core__HashSet___core__abstract_collection__RemovableCollection__clear(val
* self
) {
3081 core__hash_collection___core__hash_collection__HashCollection___raz(self
); /* Direct call hash_collection$HashCollection$raz on <self:HashSet[nullable Object]>*/
3085 /* method hash_collection$HashSet$iterator for (self: HashSet[nullable Object]): Iterator[nullable Object] */
3086 val
* core___core__HashSet___core__abstract_collection__Collection__iterator(val
* self
) {
3087 val
* var
/* : Iterator[nullable Object] */;
3088 val
* var1
/* : HashSetIterator[nullable Object] */;
3089 var1
= NEW_core__hash_collection__HashSetIterator(self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashSetIterator__core__HashSet___35dE
]);
3091 ((void(*)(val
* self
, val
* p0
))(var1
->class->vft
[COLOR_core__hash_collection__HashSetIterator__set_61d
]))(var1
, self
); /* set= on <var1:HashSetIterator[nullable Object]>*/
3094 ((void(*)(val
* self
))(var1
->class->vft
[COLOR_core__kernel__Object__init
]))(var1
); /* init on <var1:HashSetIterator[nullable Object]>*/
3101 /* method hash_collection$HashSet$init for (self: HashSet[nullable Object]) */
3102 void core___core__HashSet___core__kernel__Object__init(val
* self
) {
3104 ((void(*)(val
* self
))(self
->class->vft
[COLOR_core___core__HashSet___core__kernel__Object__init
]))(self
); /* init on <self:HashSet[nullable Object]>*/
3106 self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
= 0l; /* _capacity on <self:HashSet[nullable Object]> */
3107 self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
= 0l; /* _the_length on <self:HashSet[nullable Object]> */
3110 /* method hash_collection$HashSet$from for (self: HashSet[nullable Object], Collection[nullable Object]) */
3111 void core___core__HashSet___from(val
* self
, val
* p0
) {
3112 short int var
/* : Bool */;
3115 const struct type
* type_struct
;
3116 const char* var_class_name
;
3117 val
* var_coll
/* var coll: Collection[nullable Object] */;
3118 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[E] */
3119 /* <p0:Collection[nullable Object]> isa Collection[E] */
3120 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__Collection__core__HashSet___35dE
];
3121 cltype
= type_struct
->color
;
3122 idtype
= type_struct
->id
;
3123 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
3126 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
3128 if (unlikely(!var
)) {
3129 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
3130 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name
);
3131 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 471);
3136 core___core__HashSet___core__kernel__Object__init(self
); /* Direct call hash_collection$HashSet$init on <self:HashSet[nullable Object]>*/
3139 core___core__SimpleCollection___add_all(self
, var_coll
); /* Direct call abstract_collection$SimpleCollection$add_all on <self:HashSet[nullable Object]>*/
3143 /* method hash_collection$HashSet$new_set for (self: HashSet[nullable Object]): Set[nullable Object] */
3144 val
* core___core__HashSet___core__abstract_collection__Set__new_set(val
* self
) {
3145 val
* var
/* : Set[nullable Object] */;
3146 val
* var1
/* : HashSet[nullable Object] */;
3147 var1
= NEW_core__HashSet(self
->type
->resolution_table
->types
[COLOR_core__HashSet__core__HashSet___35dE
]);
3149 core___core__HashSet___core__kernel__Object__init(var1
); /* Direct call hash_collection$HashSet$init on <var1:HashSet[nullable Object]>*/
3156 /* method hash_collection$HashSetIterator$is_ok for (self: HashSetIterator[nullable Object]): Bool */
3157 short int core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__is_ok(val
* self
) {
3158 short int var
/* : Bool */;
3159 val
* var1
/* : nullable HashSetNode[nullable Object] */;
3160 short int var2
/* : Bool */;
3161 short int var3
/* : Bool */;
3162 val
* var_other
/* var other: nullable Object */;
3163 short int var5
/* : Bool */;
3164 short int var6
/* : Bool */;
3165 var1
= self
->attrs
[COLOR_core__hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[nullable Object]> */
3167 var2
= 0; /* is null */
3169 var2
= 1; /* arg is null and recv is not */
3172 { /* Inline kernel$Object$!= (var1,((val*)NULL)) on <var1:nullable HashSetNode[nullable Object]> */
3173 var_other
= ((val
*)NULL
);
3175 var5
= ((short int(*)(val
* self
, val
* p0
))(var1
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var1
, var_other
); /* == on <var1:nullable HashSetNode[nullable Object](HashSetNode[nullable Object])>*/
3189 /* method hash_collection$HashSetIterator$item for (self: HashSetIterator[nullable Object]): nullable Object */
3190 val
* core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__item(val
* self
) {
3191 val
* var
/* : nullable Object */;
3192 short int var1
/* : Bool */;
3193 val
* var2
/* : nullable HashSetNode[nullable Object] */;
3194 val
* var3
/* : nullable Object */;
3196 var1
= core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__is_ok(self
);
3198 if (unlikely(!var1
)) {
3199 if(catchStack
.cursor
>= 0){
3200 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
3202 PRINT_ERROR("Runtime error: %s", "Assert failed");
3203 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 491);
3206 var2
= self
->attrs
[COLOR_core__hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[nullable Object]> */
3207 if (unlikely(var2
== NULL
)) {
3208 if(catchStack
.cursor
>= 0){
3209 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
3211 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3212 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 492);
3215 var3
= var2
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashSetNode[nullable Object]> */
3221 /* method hash_collection$HashSetIterator$next for (self: HashSetIterator[nullable Object]) */
3222 void core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__next(val
* self
) {
3223 short int var
/* : Bool */;
3224 val
* var1
/* : nullable HashSetNode[nullable Object] */;
3225 val
* var2
/* : nullable HashNode[nullable Object] */;
3227 var
= core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__is_ok(self
);
3229 if (unlikely(!var
)) {
3230 if(catchStack
.cursor
>= 0){
3231 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
3233 PRINT_ERROR("Runtime error: %s", "Assert failed");
3234 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 497);
3237 var1
= self
->attrs
[COLOR_core__hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[nullable Object]> */
3238 if (unlikely(var1
== NULL
)) {
3239 if(catchStack
.cursor
>= 0){
3240 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
3242 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3243 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 498);
3246 var2
= var1
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
; /* _next_item on <var1:nullable HashSetNode[nullable Object]> */
3247 self
->attrs
[COLOR_core__hash_collection__HashSetIterator___node
].val
= var2
; /* _node on <self:HashSetIterator[nullable Object]> */
3250 /* method hash_collection$HashSetIterator$set= for (self: HashSetIterator[nullable Object], HashSet[nullable Object]) */
3251 void core__hash_collection___core__hash_collection__HashSetIterator___set_61d(val
* self
, val
* p0
) {
3252 short int var
/* : Bool */;
3255 const struct type
* type_struct
;
3256 const char* var_class_name
;
3257 /* Covariant cast for argument 0 (set) <p0:HashSet[nullable Object]> isa HashSet[E] */
3258 /* <p0:HashSet[nullable Object]> isa HashSet[E] */
3259 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__HashSet__core__hash_collection__HashSetIterator___35dE
];
3260 cltype
= type_struct
->color
;
3261 idtype
= type_struct
->id
;
3262 if(cltype
>= p0
->type
->table_size
) {
3265 var
= p0
->type
->type_table
[cltype
] == idtype
;
3267 if (unlikely(!var
)) {
3268 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3269 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSet[E]", var_class_name
);
3270 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 501);
3273 self
->attrs
[COLOR_core__hash_collection__HashSetIterator___set
].val
= p0
; /* _set on <self:HashSetIterator[nullable Object]> */
3276 /* method hash_collection$HashSetIterator$init for (self: HashSetIterator[nullable Object]) */
3277 void core__hash_collection___core__hash_collection__HashSetIterator___core__kernel__Object__init(val
* self
) {
3278 val
* var
/* : HashSet[nullable Object] */;
3279 val
* var1
/* : nullable HashNode[nullable Object] */;
3281 ((void(*)(val
* self
))(self
->class->vft
[COLOR_core__hash_collection___core__hash_collection__HashSetIterator___core__kernel__Object__init
]))(self
); /* init on <self:HashSetIterator[nullable Object]>*/
3283 var
= self
->attrs
[COLOR_core__hash_collection__HashSetIterator___set
].val
; /* _set on <self:HashSetIterator[nullable Object]> */
3284 if (unlikely(var
== NULL
)) {
3285 if(catchStack
.cursor
>= 0){
3286 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
3288 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _set");
3289 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 509);
3292 var1
= var
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var:HashSet[nullable Object]> */
3293 self
->attrs
[COLOR_core__hash_collection__HashSetIterator___node
].val
= var1
; /* _node on <self:HashSetIterator[nullable Object]> */