1 #include "core__hash_collection.sep.0.h"
2 /* method hash_collection#HashCollection#index_at for (self: HashCollection[nullable Object], nullable Object): Int */
3 long core__hash_collection___core__hash_collection__HashCollection___index_at(val
* self
, val
* p0
) {
5 val
* var_k
/* var k: nullable Object */;
6 short int var1
/* : Bool */;
7 short int var2
/* : Bool */;
10 long var5
/* : Int */;
11 long var7
/* : Int */;
12 long var_i
/* var i: Int */;
13 short int var8
/* : Bool */;
14 short int var10
/* : Bool */;
17 const char* var_class_name
;
18 short int var11
/* : Bool */;
19 long var12
/* : Int */;
20 long var14
/* : Int */;
23 var1
= 1; /* is null */
25 var1
= 0; /* arg is null but recv is not */
28 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>*/
37 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)>*/
39 var4
= self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[nullable Object]> */
41 { /* Inline kernel#Int#% (var3,var4) on <var3:Int> */
50 { /* Inline kernel#Int#< (var_i,0l) on <var_i:Int> */
51 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
52 /* <0l:Int> isa OTHER */
53 var10
= 1; /* easy <0l:Int> isa OTHER*/
54 if (unlikely(!var10
)) {
55 var_class_name
= type_core__Int
.name
;
56 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
57 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 728);
68 { /* Inline kernel#Int#unary - (var_i) on <var_i:Int> */
83 /* method hash_collection#HashCollection#node_at for (self: HashCollection[nullable Object], nullable Object): nullable HashNode[nullable Object] */
84 val
* core__hash_collection___core__hash_collection__HashCollection___node_at(val
* self
, val
* p0
) {
85 val
* var
/* : nullable HashNode[nullable Object] */;
86 val
* var_k
/* var k: nullable Object */;
87 long var1
/* : Int */;
88 short int var2
/* : Bool */;
89 short int var4
/* : Bool */;
90 val
* var5
/* : nullable Object */;
91 short int var6
/* : Bool */;
92 short int var7
/* : Bool */;
93 short int var9
/* : Bool */;
94 val
* var10
/* : nullable HashNode[nullable Object] */;
95 long var11
/* : Int */;
96 val
* var12
/* : nullable HashNode[nullable Object] */;
97 val
* var_res
/* var res: nullable HashNode[nullable Object] */;
99 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[nullable Object]> */
101 { /* Inline kernel#Int#== (var1,0l) on <var1:Int> */
113 var5
= self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_key
].val
; /* _last_accessed_key on <self:HashCollection[nullable Object]> */
115 var6
= (var5
== NULL
);
117 { /* Inline kernel#Object#is_same_instance (var_k,var5) on <var_k:nullable Object> */
118 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__NativeString
*)var_k
)->value
== ((struct instance_core__NativeString
*)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
)));
126 var10
= self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_node
].val
; /* _last_accessed_node on <self:HashCollection[nullable Object]> */
132 var11
= core__hash_collection___core__hash_collection__HashCollection___index_at(self
, var_k
);
135 var12
= core__hash_collection___core__hash_collection__HashCollection___node_at_idx(self
, var11
, var_k
);
138 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_key
].val
= var_k
; /* _last_accessed_key on <self:HashCollection[nullable Object]> */
139 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_node
].val
= var_res
; /* _last_accessed_node on <self:HashCollection[nullable Object]> */
145 /* method hash_collection#HashCollection#node_at_idx for (self: HashCollection[nullable Object], Int, nullable Object): nullable HashNode[nullable Object] */
146 val
* core__hash_collection___core__hash_collection__HashCollection___node_at_idx(val
* self
, long p0
, val
* p1
) {
147 val
* var
/* : nullable HashNode[nullable Object] */;
148 long var_i
/* var i: Int */;
149 val
* var_k
/* var k: nullable Object */;
150 long var1
/* : Int */;
151 short int var2
/* : Bool */;
152 short int var4
/* : Bool */;
153 val
* var5
/* : NativeArray[nullable HashNode[nullable Object]] */;
154 val
* var6
/* : nullable Object */;
155 val
* var8
/* : Object */;
156 val
* var_c
/* var c: nullable HashNode[nullable Object] */;
157 short int var9
/* : Bool */;
158 short int var10
/* : Bool */;
159 val
* var_other
/* var other: nullable Object */;
160 short int var12
/* : Bool */;
161 short int var13
/* : Bool */;
162 val
* var14
/* : nullable Object */;
163 val
* var_ck
/* var ck: nullable Object */;
164 short int var15
/* : Bool */;
165 short int var16
/* : Bool */;
166 short int var17
/* : Bool */;
167 short int var19
/* : Bool */;
168 short int var_
/* var : Bool */;
169 short int var20
/* : Bool */;
170 short int var21
/* : Bool */;
171 val
* var22
/* : nullable HashNode[nullable Object] */;
172 short int var23
/* : Bool */;
175 const struct type
* type_struct
;
176 const char* var_class_name
;
179 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[nullable Object]> */
181 { /* Inline kernel#Int#== (var1,0l) on <var1:Int> */
193 var5
= self
->attrs
[COLOR_core__hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[nullable Object]> */
194 if (unlikely(var5
== NULL
)) {
195 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
196 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 72);
200 { /* Inline array#NativeArray#[] (var5,var_i) on <var5:NativeArray[nullable HashNode[nullable Object]]> */
201 var8
= ((struct instance_core__NativeArray
*)var5
)->values
[var_i
];
210 var9
= 0; /* is null */
212 var9
= 1; /* arg is null and recv is not */
215 { /* Inline kernel#Object#!= (var_c,((val*)NULL)) on <var_c:nullable HashNode[nullable Object]> */
216 var_other
= ((val
*)NULL
);
218 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])>*/
228 var14
= var_c
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var_c:nullable HashNode[nullable Object](HashNode[nullable Object])> */
230 if (var_ck
== NULL
) {
231 var16
= (var_k
== NULL
);
233 { /* Inline kernel#Object#is_same_instance (var_ck,var_k) on <var_ck:nullable Object> */
234 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__NativeString
*)var_ck
)->value
== ((struct instance_core__NativeString
*)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
)));
245 if (var_ck
== NULL
) {
246 var20
= (var_k
== NULL
);
248 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>*/
257 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])> */
258 /* <var22:nullable HashNode[nullable Object]> isa nullable N */
259 type_struct
= self
->type
->resolution_table
->types
[COLOR_nullable__core__hash_collection__HashCollection__N
];
260 cltype
= type_struct
->color
;
261 idtype
= type_struct
->id
;
265 if(cltype
>= var22
->type
->table_size
) {
268 var23
= var22
->type
->type_table
[cltype
] == idtype
;
271 if (unlikely(!var23
)) {
272 var_class_name
= var22
== NULL ?
"null" : var22
->type
->name
;
273 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name
);
274 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 78);
282 BREAK_label
: (void)0;
288 /* method hash_collection#HashCollection#store for (self: HashCollection[nullable Object], Int, HashNode[nullable Object]) */
289 void core__hash_collection___core__hash_collection__HashCollection___store(val
* self
, long p0
, val
* p1
) {
290 short int var
/* : Bool */;
293 const struct type
* type_struct
;
294 const char* var_class_name
;
295 long var_index
/* var index: Int */;
296 val
* var_node
/* var node: HashNode[nullable Object] */;
297 val
* var1
/* : nullable HashNode[nullable Object] */;
298 short int var2
/* : Bool */;
299 short int var3
/* : Bool */;
300 val
* var_other
/* var other: nullable Object */;
301 short int var5
/* : Bool */;
302 short int var7
/* : Bool */;
303 val
* var8
/* : nullable HashNode[nullable Object] */;
304 val
* var9
/* : nullable HashNode[nullable Object] */;
305 val
* var10
/* : NativeArray[nullable HashNode[nullable Object]] */;
306 val
* var11
/* : nullable Object */;
307 val
* var13
/* : Object */;
308 val
* var_next
/* var next: nullable HashNode[nullable Object] */;
309 val
* var14
/* : NativeArray[nullable HashNode[nullable Object]] */;
310 short int var16
/* : Bool */;
313 const struct type
* type_struct19
;
314 const char* var_class_name20
;
315 short int var21
/* : Bool */;
316 short int var22
/* : Bool */;
317 val
* var_other24
/* var other: nullable Object */;
318 short int var25
/* : Bool */;
319 short int var26
/* : Bool */;
320 val
* var27
/* : nullable Object */;
321 long var28
/* : Int */;
322 long var_l
/* var l: Int */;
323 long var29
/* : Int */;
324 short int var31
/* : Bool */;
327 const char* var_class_name34
;
328 long var35
/* : Int */;
329 long var36
/* : Int */;
330 short int var38
/* : Bool */;
333 const char* var_class_name41
;
334 long var42
/* : Int */;
335 long var43
/* : Int */;
336 short int var45
/* : Bool */;
339 const char* var_class_name48
;
340 long var49
/* : Int */;
341 long var50
/* : Int */;
342 short int var52
/* : Bool */;
345 const char* var_class_name55
;
346 long var56
/* : Int */;
347 long var57
/* : Int */;
348 short int var58
/* : Bool */;
349 short int var60
/* : Bool */;
352 const char* var_class_name63
;
353 short int var64
/* : Bool */;
354 long var65
/* : Int */;
355 short int var67
/* : Bool */;
358 const char* var_class_name70
;
359 long var71
/* : Int */;
360 long var72
/* : Int */;
361 short int var74
/* : Bool */;
364 const char* var_class_name77
;
365 long var78
/* : Int */;
366 long var79
/* : Int */;
367 short int var81
/* : Bool */;
370 const char* var_class_name84
;
371 long var85
/* : Int */;
372 /* Covariant cast for argument 1 (node) <p1:HashNode[nullable Object]> isa N */
373 /* <p1:HashNode[nullable Object]> isa N */
374 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashCollection__N
];
375 cltype
= type_struct
->color
;
376 idtype
= type_struct
->id
;
377 if(cltype
>= p1
->type
->table_size
) {
380 var
= p1
->type
->type_table
[cltype
] == idtype
;
382 if (unlikely(!var
)) {
383 var_class_name
= p1
== NULL ?
"null" : p1
->type
->name
;
384 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "N", var_class_name
);
385 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 83);
390 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashCollection[nullable Object]> */
392 var2
= 1; /* is null */
394 var2
= 0; /* arg is null but recv is not */
397 { /* Inline kernel#Object#== (var1,((val*)NULL)) on <var1:nullable HashNode[nullable Object]> */
398 var_other
= ((val
*)NULL
);
400 { /* Inline kernel#Object#is_same_instance (var1,var_other) on <var1:nullable HashNode[nullable Object](HashNode[nullable Object])> */
401 var7
= var1
== var_other
;
414 self
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
= var_node
; /* _first_item on <self:HashCollection[nullable Object]> */
416 var8
= self
->attrs
[COLOR_core__hash_collection__HashCollection___last_item
].val
; /* _last_item on <self:HashCollection[nullable Object]> */
417 if (unlikely(var8
== NULL
)) {
418 PRINT_ERROR("Runtime error: %s", "Receiver is null");
419 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 90);
422 var8
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
= var_node
; /* _next_item on <var8:nullable HashNode[nullable Object]> */
424 var9
= self
->attrs
[COLOR_core__hash_collection__HashCollection___last_item
].val
; /* _last_item on <self:HashCollection[nullable Object]> */
425 var_node
->attrs
[COLOR_core__hash_collection__HashNode___prev_item
].val
= var9
; /* _prev_item on <var_node:HashNode[nullable Object]> */
426 var_node
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
= ((val
*)NULL
); /* _next_item on <var_node:HashNode[nullable Object]> */
427 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_item
].val
= var_node
; /* _last_item on <self:HashCollection[nullable Object]> */
428 var10
= self
->attrs
[COLOR_core__hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[nullable Object]> */
429 if (unlikely(var10
== NULL
)) {
430 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
431 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 97);
435 { /* Inline array#NativeArray#[] (var10,var_index) on <var10:NativeArray[nullable HashNode[nullable Object]]> */
436 var13
= ((struct instance_core__NativeArray
*)var10
)->values
[var_index
];
443 var14
= self
->attrs
[COLOR_core__hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[nullable Object]> */
444 if (unlikely(var14
== NULL
)) {
445 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
446 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 98);
450 { /* Inline array#NativeArray#[]= (var14,var_index,var_node) on <var14:NativeArray[nullable HashNode[nullable Object]]> */
451 /* Covariant cast for argument 1 (item) <var_node:HashNode[nullable Object]> isa E */
452 /* <var_node:HashNode[nullable Object]> isa E */
453 type_struct19
= var14
->type
->resolution_table
->types
[COLOR_core__NativeArray___35dE
];
454 cltype17
= type_struct19
->color
;
455 idtype18
= type_struct19
->id
;
456 if(cltype17
>= var_node
->type
->table_size
) {
459 var16
= var_node
->type
->type_table
[cltype17
] == idtype18
;
461 if (unlikely(!var16
)) {
462 var_class_name20
= var_node
== NULL ?
"null" : var_node
->type
->name
;
463 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name20
);
464 PRINT_ERROR(" (%s:%d)\n", FILE_core__array
, 988);
467 ((struct instance_core__NativeArray
*)var14
)->values
[var_index
]=var_node
;
471 var_node
->attrs
[COLOR_core__hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_node:HashNode[nullable Object]> */
472 if (var_next
== NULL
) {
473 var21
= 0; /* is null */
475 var21
= 1; /* arg is null and recv is not */
478 { /* Inline kernel#Object#!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
479 var_other24
= ((val
*)NULL
);
481 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])>*/
491 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])> */
494 var27
= var_node
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var_node:HashNode[nullable Object]> */
495 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_key
].val
= var27
; /* _last_accessed_key on <self:HashCollection[nullable Object]> */
496 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_node
].val
= var_node
; /* _last_accessed_node on <self:HashCollection[nullable Object]> */
497 var28
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[nullable Object]> */
500 { /* Inline kernel#Int#+ (var_l,1l) on <var_l:Int> */
501 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
502 /* <1l:Int> isa OTHER */
503 var31
= 1; /* easy <1l:Int> isa OTHER*/
504 if (unlikely(!var31
)) {
505 var_class_name34
= type_core__Int
.name
;
506 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name34
);
507 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 731);
516 self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
= var29
; /* _the_length on <self:HashCollection[nullable Object]> */
518 { /* Inline kernel#Int#+ (var_l,5l) on <var_l:Int> */
519 /* Covariant cast for argument 0 (i) <5l:Int> isa OTHER */
520 /* <5l:Int> isa OTHER */
521 var38
= 1; /* easy <5l:Int> isa OTHER*/
522 if (unlikely(!var38
)) {
523 var_class_name41
= type_core__Int
.name
;
524 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name41
);
525 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 731);
535 { /* Inline kernel#Int#* (var36,2l) on <var36:Int> */
536 /* Covariant cast for argument 0 (i) <2l:Int> isa OTHER */
537 /* <2l:Int> isa OTHER */
538 var45
= 1; /* easy <2l:Int> isa OTHER*/
539 if (unlikely(!var45
)) {
540 var_class_name48
= type_core__Int
.name
;
541 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name48
);
542 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 735);
552 { /* Inline kernel#Int#+ (var43,1l) on <var43:Int> */
553 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
554 /* <1l:Int> isa OTHER */
555 var52
= 1; /* easy <1l:Int> isa OTHER*/
556 if (unlikely(!var52
)) {
557 var_class_name55
= type_core__Int
.name
;
558 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name55
);
559 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 731);
569 var57
= self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[nullable Object]> */
571 { /* Inline kernel#Int#>= (var_l,var57) on <var_l:Int> */
572 /* Covariant cast for argument 0 (i) <var57:Int> isa OTHER */
573 /* <var57:Int> isa OTHER */
574 var60
= 1; /* easy <var57:Int> isa OTHER*/
575 if (unlikely(!var60
)) {
576 var_class_name63
= type_core__Int
.name
;
577 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name63
);
578 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 729);
581 var64
= var_l
>= var57
;
589 { /* Inline kernel#Int#* (var_l,3l) on <var_l:Int> */
590 /* Covariant cast for argument 0 (i) <3l:Int> isa OTHER */
591 /* <3l:Int> isa OTHER */
592 var67
= 1; /* easy <3l:Int> isa OTHER*/
593 if (unlikely(!var67
)) {
594 var_class_name70
= type_core__Int
.name
;
595 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name70
);
596 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 735);
606 { /* Inline kernel#Int#/ (var65,2l) on <var65:Int> */
607 /* Covariant cast for argument 0 (i) <2l:Int> isa OTHER */
608 /* <2l:Int> isa OTHER */
609 var74
= 1; /* easy <2l:Int> isa OTHER*/
610 if (unlikely(!var74
)) {
611 var_class_name77
= type_core__Int
.name
;
612 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name77
);
613 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 736);
623 { /* Inline kernel#Int#+ (var72,1l) on <var72:Int> */
624 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
625 /* <1l:Int> isa OTHER */
626 var81
= 1; /* easy <1l:Int> isa OTHER*/
627 if (unlikely(!var81
)) {
628 var_class_name84
= type_core__Int
.name
;
629 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name84
);
630 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 731);
640 core__hash_collection___core__hash_collection__HashCollection___enlarge(self
, var79
); /* Direct call hash_collection#HashCollection#enlarge on <self:HashCollection[nullable Object]>*/
646 /* method hash_collection#HashCollection#remove_node for (self: HashCollection[nullable Object], nullable Object) */
647 void core__hash_collection___core__hash_collection__HashCollection___remove_node(val
* self
, val
* p0
) {
648 val
* var_k
/* var k: nullable Object */;
649 long var
/* : Int */;
650 short int var1
/* : Bool */;
651 short int var3
/* : Bool */;
652 long var4
/* : Int */;
653 long var_i
/* var i: Int */;
654 val
* var5
/* : nullable HashNode[nullable Object] */;
655 val
* var_node
/* var node: nullable HashNode[nullable Object] */;
656 short int var6
/* : Bool */;
657 short int var7
/* : Bool */;
658 val
* var_other
/* var other: nullable Object */;
659 short int var9
/* : Bool */;
660 short int var11
/* : Bool */;
661 val
* var12
/* : nullable HashNode[nullable Object] */;
662 val
* var_prev
/* var prev: nullable HashNode[nullable Object] */;
663 val
* var13
/* : nullable HashNode[nullable Object] */;
664 val
* var_next
/* var next: nullable HashNode[nullable Object] */;
665 short int var14
/* : Bool */;
666 short int var15
/* : Bool */;
667 val
* var_other17
/* var other: nullable Object */;
668 short int var18
/* : Bool */;
669 short int var19
/* : Bool */;
670 short int var20
/* : Bool */;
673 const struct type
* type_struct
;
674 const char* var_class_name
;
675 short int var21
/* : Bool */;
676 short int var22
/* : Bool */;
677 short int var24
/* : Bool */;
678 short int var25
/* : Bool */;
679 short int var26
/* : Bool */;
682 const struct type
* type_struct29
;
683 const char* var_class_name30
;
684 val
* var_
/* var : HashCollection[nullable Object] */;
685 long var31
/* : Int */;
686 long var32
/* : Int */;
687 short int var34
/* : Bool */;
690 const char* var_class_name37
;
691 long var38
/* : Int */;
692 val
* var39
/* : nullable HashNode[nullable Object] */;
693 val
* var40
/* : nullable HashNode[nullable Object] */;
694 short int var41
/* : Bool */;
695 short int var42
/* : Bool */;
696 short int var44
/* : Bool */;
697 short int var45
/* : Bool */;
698 val
* var46
/* : NativeArray[nullable HashNode[nullable Object]] */;
699 short int var47
/* : Bool */;
702 const struct type
* type_struct50
;
703 const char* var_class_name51
;
704 short int var53
/* : Bool */;
707 const struct type
* type_struct56
;
708 short int is_nullable
;
709 const char* var_class_name57
;
710 short int var58
/* : Bool */;
711 short int var59
/* : Bool */;
712 short int var61
/* : Bool */;
713 short int var62
/* : Bool */;
715 var
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[nullable Object]> */
717 { /* Inline kernel#Int#== (var,0l) on <var:Int> */
729 var4
= core__hash_collection___core__hash_collection__HashCollection___index_at(self
, var_k
);
733 var5
= core__hash_collection___core__hash_collection__HashCollection___node_at_idx(self
, var_i
, var_k
);
736 if (var_node
== NULL
) {
737 var6
= 1; /* is null */
739 var6
= 0; /* arg is null but recv is not */
742 { /* Inline kernel#Object#== (var_node,((val*)NULL)) on <var_node:nullable HashNode[nullable Object]> */
743 var_other
= ((val
*)NULL
);
745 { /* Inline kernel#Object#is_same_instance (var_node,var_other) on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
746 var11
= var_node
== var_other
;
762 var12
= var_node
->attrs
[COLOR_core__hash_collection__HashNode___prev_item
].val
; /* _prev_item on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
764 var13
= var_node
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
; /* _next_item on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
766 if (var_prev
== NULL
) {
767 var14
= 0; /* is null */
769 var14
= 1; /* arg is null and recv is not */
772 { /* Inline kernel#Object#!= (var_prev,((val*)NULL)) on <var_prev:nullable HashNode[nullable Object]> */
773 var_other17
= ((val
*)NULL
);
775 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])>*/
785 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])> */
787 /* <var_next:nullable HashNode[nullable Object]> isa nullable N */
788 type_struct
= self
->type
->resolution_table
->types
[COLOR_nullable__core__hash_collection__HashCollection__N
];
789 cltype
= type_struct
->color
;
790 idtype
= type_struct
->id
;
791 if(var_next
== NULL
) {
794 if(cltype
>= var_next
->type
->table_size
) {
797 var20
= var_next
->type
->type_table
[cltype
] == idtype
;
800 if (unlikely(!var20
)) {
801 var_class_name
= var_next
== NULL ?
"null" : var_next
->type
->name
;
802 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name
);
803 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 132);
806 self
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
= var_next
; /* _first_item on <self:HashCollection[nullable Object]> */
808 if (var_next
== NULL
) {
809 var21
= 0; /* is null */
811 var21
= 1; /* arg is null and recv is not */
814 { /* Inline kernel#Object#!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
815 var_other17
= ((val
*)NULL
);
817 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])>*/
827 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])> */
829 /* <var_prev:nullable HashNode[nullable Object]> isa nullable N */
830 type_struct29
= self
->type
->resolution_table
->types
[COLOR_nullable__core__hash_collection__HashCollection__N
];
831 cltype27
= type_struct29
->color
;
832 idtype28
= type_struct29
->id
;
833 if(var_prev
== NULL
) {
836 if(cltype27
>= var_prev
->type
->table_size
) {
839 var26
= var_prev
->type
->type_table
[cltype27
] == idtype28
;
842 if (unlikely(!var26
)) {
843 var_class_name30
= var_prev
== NULL ?
"null" : var_prev
->type
->name
;
844 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name30
);
845 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 137);
848 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_item
].val
= var_prev
; /* _last_item on <self:HashCollection[nullable Object]> */
851 var31
= var_
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <var_:HashCollection[nullable Object]> */
853 { /* Inline kernel#Int#- (var31,1l) on <var31:Int> */
854 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
855 /* <1l:Int> isa OTHER */
856 var34
= 1; /* easy <1l:Int> isa OTHER*/
857 if (unlikely(!var34
)) {
858 var_class_name37
= type_core__Int
.name
;
859 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name37
);
860 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 734);
869 var_
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
= var32
; /* _the_length on <var_:HashCollection[nullable Object]> */
870 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])> */
872 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])> */
874 if (var_prev
== NULL
) {
875 var41
= 0; /* is null */
877 var41
= 1; /* arg is null and recv is not */
880 { /* Inline kernel#Object#!= (var_prev,((val*)NULL)) on <var_prev:nullable HashNode[nullable Object]> */
881 var_other17
= ((val
*)NULL
);
883 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])>*/
893 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])> */
895 var46
= self
->attrs
[COLOR_core__hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[nullable Object]> */
896 if (unlikely(var46
== NULL
)) {
897 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
898 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 147);
901 /* <var_next:nullable HashNode[nullable Object]> isa nullable N */
902 type_struct50
= self
->type
->resolution_table
->types
[COLOR_nullable__core__hash_collection__HashCollection__N
];
903 cltype48
= type_struct50
->color
;
904 idtype49
= type_struct50
->id
;
905 if(var_next
== NULL
) {
908 if(cltype48
>= var_next
->type
->table_size
) {
911 var47
= var_next
->type
->type_table
[cltype48
] == idtype49
;
914 if (unlikely(!var47
)) {
915 var_class_name51
= var_next
== NULL ?
"null" : var_next
->type
->name
;
916 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name51
);
917 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 147);
921 { /* Inline array#NativeArray#[]= (var46,var_i,var_next) on <var46:NativeArray[nullable HashNode[nullable Object]]> */
922 /* Covariant cast for argument 1 (item) <var_next:nullable HashNode[nullable Object]> isa E */
923 /* <var_next:nullable HashNode[nullable Object]> isa E */
924 type_struct56
= var46
->type
->resolution_table
->types
[COLOR_core__NativeArray___35dE
];
925 cltype54
= type_struct56
->color
;
926 idtype55
= type_struct56
->id
;
927 is_nullable
= type_struct56
->is_nullable
;
928 if(var_next
== NULL
) {
931 if(cltype54
>= var_next
->type
->table_size
) {
934 var53
= var_next
->type
->type_table
[cltype54
] == idtype55
;
937 if (unlikely(!var53
)) {
938 var_class_name57
= var_next
== NULL ?
"null" : var_next
->type
->name
;
939 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name57
);
940 PRINT_ERROR(" (%s:%d)\n", FILE_core__array
, 988);
943 ((struct instance_core__NativeArray
*)var46
)->values
[var_i
]=var_next
;
948 if (var_next
== NULL
) {
949 var58
= 0; /* is null */
951 var58
= 1; /* arg is null and recv is not */
954 { /* Inline kernel#Object#!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
955 var_other17
= ((val
*)NULL
);
957 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])>*/
967 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])> */
970 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_key
].val
= ((val
*)NULL
); /* _last_accessed_key on <self:HashCollection[nullable Object]> */
973 /* method hash_collection#HashCollection#raz for (self: HashCollection[nullable Object]) */
974 void core__hash_collection___core__hash_collection__HashCollection___raz(val
* self
) {
975 long var
/* : Int */;
976 long var1
/* : Int */;
977 short int var3
/* : Bool */;
980 const char* var_class_name
;
981 long var4
/* : Int */;
982 long var_i
/* var i: Int */;
983 short int var5
/* : Bool */;
984 short int var7
/* : Bool */;
987 const char* var_class_name10
;
988 short int var11
/* : Bool */;
989 val
* var12
/* : NativeArray[nullable HashNode[nullable Object]] */;
990 short int var14
/* : Bool */;
993 const struct type
* type_struct
;
994 short int is_nullable
;
995 const char* var_class_name17
;
996 long var18
/* : Int */;
997 short int var20
/* : Bool */;
1000 const char* var_class_name23
;
1001 long var24
/* : Int */;
1002 var
= self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[nullable Object]> */
1004 { /* Inline kernel#Int#- (var,1l) on <var:Int> */
1005 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1006 /* <1l:Int> isa OTHER */
1007 var3
= 1; /* easy <1l:Int> isa OTHER*/
1008 if (unlikely(!var3
)) {
1009 var_class_name
= type_core__Int
.name
;
1010 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1011 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 734);
1023 { /* Inline kernel#Int#>= (var_i,0l) on <var_i:Int> */
1024 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
1025 /* <0l:Int> isa OTHER */
1026 var7
= 1; /* easy <0l:Int> isa OTHER*/
1027 if (unlikely(!var7
)) {
1028 var_class_name10
= type_core__Int
.name
;
1029 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name10
);
1030 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 729);
1033 var11
= var_i
>= 0l;
1040 var12
= self
->attrs
[COLOR_core__hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[nullable Object]> */
1041 if (unlikely(var12
== NULL
)) {
1042 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
1043 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 161);
1047 { /* Inline array#NativeArray#[]= (var12,var_i,((val*)NULL)) on <var12:NativeArray[nullable HashNode[nullable Object]]> */
1048 /* Covariant cast for argument 1 (item) <((val*)NULL):null> isa E */
1049 /* <((val*)NULL):null> isa E */
1050 type_struct
= var12
->type
->resolution_table
->types
[COLOR_core__NativeArray___35dE
];
1051 cltype15
= type_struct
->color
;
1052 idtype16
= type_struct
->id
;
1053 is_nullable
= type_struct
->is_nullable
;
1054 if(((val
*)NULL
) == NULL
) {
1055 var14
= is_nullable
;
1057 if(cltype15
>= ((val
*)NULL
)->type
->table_size
) {
1060 var14
= ((val
*)NULL
)->type
->type_table
[cltype15
] == idtype16
;
1063 if (unlikely(!var14
)) {
1064 var_class_name17
= ((val
*)NULL
) == NULL ?
"null" : ((val
*)NULL
)->type
->name
;
1065 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name17
);
1066 PRINT_ERROR(" (%s:%d)\n", FILE_core__array
, 988);
1069 ((struct instance_core__NativeArray
*)var12
)->values
[var_i
]=((val
*)NULL
);
1070 RET_LABEL13
:(void)0;
1074 { /* Inline kernel#Int#- (var_i,1l) on <var_i:Int> */
1075 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1076 /* <1l:Int> isa OTHER */
1077 var20
= 1; /* easy <1l:Int> isa OTHER*/
1078 if (unlikely(!var20
)) {
1079 var_class_name23
= type_core__Int
.name
;
1080 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name23
);
1081 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 734);
1087 RET_LABEL19
:(void)0;
1095 BREAK_label
: (void)0;
1096 self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
= 0l; /* _the_length on <self:HashCollection[nullable Object]> */
1097 self
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
= ((val
*)NULL
); /* _first_item on <self:HashCollection[nullable Object]> */
1098 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_item
].val
= ((val
*)NULL
); /* _last_item on <self:HashCollection[nullable Object]> */
1099 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_key
].val
= ((val
*)NULL
); /* _last_accessed_key on <self:HashCollection[nullable Object]> */
1102 /* method hash_collection#HashCollection#enlarge for (self: HashCollection[nullable Object], Int) */
1103 void core__hash_collection___core__hash_collection__HashCollection___enlarge(val
* self
, long p0
) {
1104 long var_cap
/* var cap: Int */;
1105 long var
/* : Int */;
1106 long var1
/* : Int */;
1107 short int var3
/* : Bool */;
1110 const char* var_class_name
;
1111 long var4
/* : Int */;
1112 short int var5
/* : Bool */;
1113 short int var7
/* : Bool */;
1116 const char* var_class_name10
;
1117 short int var11
/* : Bool */;
1118 long var12
/* : Int */;
1119 long var13
/* : Int */;
1120 short int var15
/* : Bool */;
1123 const char* var_class_name18
;
1124 long var19
/* : Int */;
1125 long var20
/* : Int */;
1126 short int var21
/* : Bool */;
1127 short int var23
/* : Bool */;
1130 const char* var_class_name26
;
1131 short int var27
/* : Bool */;
1132 val
* var28
/* : NativeArray[nullable HashNode[nullable Object]] */;
1133 val
* var_new_array
/* var new_array: NativeArray[nullable HashNode[nullable Object]] */;
1134 val
* var29
/* : nullable HashNode[nullable Object] */;
1135 val
* var_node
/* var node: nullable HashNode[nullable Object] */;
1136 short int var30
/* : Bool */;
1137 short int var31
/* : Bool */;
1138 val
* var_other
/* var other: nullable Object */;
1139 short int var33
/* : Bool */;
1140 short int var34
/* : Bool */;
1141 val
* var35
/* : nullable Object */;
1142 long var36
/* : Int */;
1143 long var_index
/* var index: Int */;
1144 val
* var37
/* : nullable Object */;
1145 val
* var39
/* : Object */;
1146 val
* var_next
/* var next: nullable HashNode[nullable Object] */;
1147 short int var41
/* : Bool */;
1150 const struct type
* type_struct
;
1151 const char* var_class_name44
;
1152 short int var45
/* : Bool */;
1153 short int var46
/* : Bool */;
1154 short int var48
/* : Bool */;
1155 short int var49
/* : Bool */;
1156 val
* var50
/* : nullable HashNode[nullable Object] */;
1157 short int var51
/* : Bool */;
1160 const struct type
* type_struct54
;
1161 const char* var_class_name55
;
1163 var
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[nullable Object]> */
1165 { /* Inline kernel#Int#+ (var,1l) on <var:Int> */
1166 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1167 /* <1l:Int> isa OTHER */
1168 var3
= 1; /* easy <1l:Int> isa OTHER*/
1169 if (unlikely(!var3
)) {
1170 var_class_name
= type_core__Int
.name
;
1171 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1172 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 731);
1182 { /* Inline kernel#Int#< (var_cap,var1) on <var_cap:Int> */
1183 /* Covariant cast for argument 0 (i) <var1:Int> isa OTHER */
1184 /* <var1:Int> isa OTHER */
1185 var7
= 1; /* easy <var1:Int> isa OTHER*/
1186 if (unlikely(!var7
)) {
1187 var_class_name10
= type_core__Int
.name
;
1188 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name10
);
1189 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 728);
1192 var11
= var_cap
< var1
;
1199 var12
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[nullable Object]> */
1201 { /* Inline kernel#Int#+ (var12,1l) on <var12:Int> */
1202 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1203 /* <1l:Int> isa OTHER */
1204 var15
= 1; /* easy <1l:Int> isa OTHER*/
1205 if (unlikely(!var15
)) {
1206 var_class_name18
= type_core__Int
.name
;
1207 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name18
);
1208 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 731);
1214 RET_LABEL14
:(void)0;
1220 var20
= self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[nullable Object]> */
1222 { /* Inline kernel#Int#<= (var_cap,var20) on <var_cap:Int> */
1223 /* Covariant cast for argument 0 (i) <var20:Int> isa OTHER */
1224 /* <var20:Int> isa OTHER */
1225 var23
= 1; /* easy <var20:Int> isa OTHER*/
1226 if (unlikely(!var23
)) {
1227 var_class_name26
= type_core__Int
.name
;
1228 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name26
);
1229 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 727);
1232 var27
= var_cap
<= var20
;
1235 RET_LABEL22
:(void)0;
1242 self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
= var_cap
; /* _capacity on <self:HashCollection[nullable Object]> */
1243 self
->attrs
[COLOR_core__hash_collection__HashCollection___last_accessed_key
].val
= ((val
*)NULL
); /* _last_accessed_key on <self:HashCollection[nullable Object]> */
1244 var28
= NEW_core__NativeArray(var_cap
, self
->type
->resolution_table
->types
[COLOR_core__NativeArray__nullable__core__hash_collection__HashCollection__N
]);
1245 var_new_array
= var28
;
1246 self
->attrs
[COLOR_core__hash_collection__HashCollection___array
].val
= var_new_array
; /* _array on <self:HashCollection[nullable Object]> */
1247 var29
= self
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashCollection[nullable Object]> */
1250 if (var_node
== NULL
) {
1251 var30
= 0; /* is null */
1253 var30
= 1; /* arg is null and recv is not */
1256 { /* Inline kernel#Object#!= (var_node,((val*)NULL)) on <var_node:nullable HashNode[nullable Object]> */
1257 var_other
= ((val
*)NULL
);
1259 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])>*/
1264 RET_LABEL32
:(void)0;
1269 var35
= var_node
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1271 var36
= core__hash_collection___core__hash_collection__HashCollection___index_at(self
, var35
);
1275 { /* Inline array#NativeArray#[] (var_new_array,var_index) on <var_new_array:NativeArray[nullable HashNode[nullable Object]]> */
1276 var39
= ((struct instance_core__NativeArray
*)var_new_array
)->values
[var_index
];
1279 RET_LABEL38
:(void)0;
1284 { /* Inline array#NativeArray#[]= (var_new_array,var_index,var_node) on <var_new_array:NativeArray[nullable HashNode[nullable Object]]> */
1285 /* Covariant cast for argument 1 (item) <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> isa E */
1286 /* <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> isa E */
1287 type_struct
= var_new_array
->type
->resolution_table
->types
[COLOR_core__NativeArray___35dE
];
1288 cltype42
= type_struct
->color
;
1289 idtype43
= type_struct
->id
;
1290 if(cltype42
>= var_node
->type
->table_size
) {
1293 var41
= var_node
->type
->type_table
[cltype42
] == idtype43
;
1295 if (unlikely(!var41
)) {
1296 var_class_name44
= var_node
== NULL ?
"null" : var_node
->type
->name
;
1297 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name44
);
1298 PRINT_ERROR(" (%s:%d)\n", FILE_core__array
, 988);
1301 ((struct instance_core__NativeArray
*)var_new_array
)->values
[var_index
]=var_node
;
1302 RET_LABEL40
:(void)0;
1305 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])> */
1306 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])> */
1307 if (var_next
== NULL
) {
1308 var45
= 0; /* is null */
1310 var45
= 1; /* arg is null and recv is not */
1313 { /* Inline kernel#Object#!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
1314 var_other
= ((val
*)NULL
);
1316 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])>*/
1321 RET_LABEL47
:(void)0;
1326 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])> */
1329 var50
= var_node
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
; /* _next_item on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1330 /* <var50:nullable HashNode[nullable Object]> isa nullable N */
1331 type_struct54
= self
->type
->resolution_table
->types
[COLOR_nullable__core__hash_collection__HashCollection__N
];
1332 cltype52
= type_struct54
->color
;
1333 idtype53
= type_struct54
->id
;
1337 if(cltype52
>= var50
->type
->table_size
) {
1340 var51
= var50
->type
->type_table
[cltype52
] == idtype53
;
1343 if (unlikely(!var51
)) {
1344 var_class_name55
= var50
== NULL ?
"null" : var50
->type
->name
;
1345 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name55
);
1346 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 193);
1354 BREAK_label
: (void)0;
1357 /* method hash_collection#HashNode#key= for (self: HashNode[nullable Object], nullable Object) */
1358 void core__hash_collection___core__hash_collection__HashNode___key_61d(val
* self
, val
* p0
) {
1359 short int var
/* : Bool */;
1362 const struct type
* type_struct
;
1363 short int is_nullable
;
1364 const char* var_class_name
;
1365 /* Covariant cast for argument 0 (key) <p0:nullable Object> isa K */
1366 /* <p0:nullable Object> isa K */
1367 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashNode___35dK
];
1368 cltype
= type_struct
->color
;
1369 idtype
= type_struct
->id
;
1370 is_nullable
= type_struct
->is_nullable
;
1374 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
1377 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
1380 if (unlikely(!var
)) {
1381 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
1382 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
1383 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 199);
1386 self
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
= p0
; /* _key on <self:HashNode[nullable Object]> */
1389 /* method hash_collection#HashNode#init for (self: HashNode[nullable Object]) */
1390 void core__hash_collection___core__hash_collection__HashNode___core__kernel__Object__init(val
* self
) {
1392 ((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]>*/
1396 /* method hash_collection#HashMap#[] for (self: HashMap[nullable Object, nullable Object], nullable Object): nullable Object */
1397 val
* core___core__HashMap___core__abstract_collection__MapRead___91d_93d(val
* self
, val
* p0
) {
1398 val
* var
/* : nullable Object */;
1399 val
* var_key
/* var key: nullable Object */;
1400 val
* var1
/* : nullable HashNode[nullable Object] */;
1401 val
* var_c
/* var c: nullable HashMapNode[nullable Object, nullable Object] */;
1402 short int var2
/* : Bool */;
1403 short int var3
/* : Bool */;
1404 val
* var_other
/* var other: nullable Object */;
1405 short int var5
/* : Bool */;
1406 short int var7
/* : Bool */;
1407 val
* var8
/* : nullable Object */;
1408 val
* var9
/* : nullable Object */;
1411 var1
= core__hash_collection___core__hash_collection__HashCollection___node_at(self
, var_key
);
1414 if (var_c
== NULL
) {
1415 var2
= 1; /* is null */
1417 var2
= 0; /* arg is null but recv is not */
1420 { /* Inline kernel#Object#== (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
1421 var_other
= ((val
*)NULL
);
1423 { /* Inline kernel#Object#is_same_instance (var_c,var_other) on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1424 var7
= var_c
== var_other
;
1438 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]>*/
1443 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])> */
1450 /* method hash_collection#HashMap#get_or_null for (self: HashMap[nullable Object, nullable Object], nullable Object): nullable Object */
1451 val
* core___core__HashMap___core__abstract_collection__MapRead__get_or_null(val
* self
, val
* p0
) {
1452 val
* var
/* : nullable Object */;
1453 val
* var_key
/* var key: nullable Object */;
1454 val
* var1
/* : nullable HashNode[nullable Object] */;
1455 val
* var_c
/* var c: nullable HashMapNode[nullable Object, nullable Object] */;
1456 short int var2
/* : Bool */;
1457 short int var3
/* : Bool */;
1458 val
* var_other
/* var other: nullable Object */;
1459 short int var5
/* : Bool */;
1460 short int var7
/* : Bool */;
1461 val
* var8
/* : nullable Object */;
1464 var1
= core__hash_collection___core__hash_collection__HashCollection___node_at(self
, var_key
);
1467 if (var_c
== NULL
) {
1468 var2
= 1; /* is null */
1470 var2
= 0; /* arg is null but recv is not */
1473 { /* Inline kernel#Object#== (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
1474 var_other
= ((val
*)NULL
);
1476 { /* Inline kernel#Object#is_same_instance (var_c,var_other) on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1477 var7
= var_c
== var_other
;
1493 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])> */
1500 /* method hash_collection#HashMap#iterator for (self: HashMap[nullable Object, nullable Object]): MapIterator[nullable Object, nullable Object] */
1501 val
* core___core__HashMap___core__abstract_collection__MapRead__iterator(val
* self
) {
1502 val
* var
/* : MapIterator[nullable Object, nullable Object] */;
1503 val
* var1
/* : HashMapIterator[nullable Object, nullable Object] */;
1504 var1
= NEW_core__hash_collection__HashMapIterator(self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashMapIterator__core__HashMap___35dK__core__HashMap___35dV
]);
1506 ((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]>*/
1509 ((void(*)(val
* self
))(var1
->class->vft
[COLOR_core__kernel__Object__init
]))(var1
); /* init on <var1:HashMapIterator[nullable Object, nullable Object]>*/
1516 /* method hash_collection#HashMap#length for (self: HashMap[nullable Object, nullable Object]): Int */
1517 long core___core__HashMap___core__abstract_collection__MapRead__length(val
* self
) {
1518 long var
/* : Int */;
1519 long var1
/* : Int */;
1520 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashMap[nullable Object, nullable Object]> */
1526 /* method hash_collection#HashMap#is_empty for (self: HashMap[nullable Object, nullable Object]): Bool */
1527 short int core___core__HashMap___core__abstract_collection__MapRead__is_empty(val
* self
) {
1528 short int var
/* : Bool */;
1529 long var1
/* : Int */;
1530 short int var2
/* : Bool */;
1531 short int var4
/* : Bool */;
1532 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashMap[nullable Object, nullable Object]> */
1534 { /* Inline kernel#Int#== (var1,0l) on <var1:Int> */
1546 /* method hash_collection#HashMap#[]= for (self: HashMap[nullable Object, nullable Object], nullable Object, nullable Object) */
1547 void core___core__HashMap___core__abstract_collection__Map___91d_93d_61d(val
* self
, val
* p0
, val
* p1
) {
1548 short int var
/* : Bool */;
1551 const struct type
* type_struct
;
1552 short int is_nullable
;
1553 const char* var_class_name
;
1554 short int var1
/* : Bool */;
1557 const struct type
* type_struct4
;
1558 short int is_nullable5
;
1559 const char* var_class_name6
;
1560 val
* var_key
/* var key: nullable Object */;
1561 val
* var_v
/* var v: nullable Object */;
1562 long var7
/* : Int */;
1563 short int var8
/* : Bool */;
1564 short int var10
/* : Bool */;
1565 long var11
/* : Int */;
1566 long var_i
/* var i: Int */;
1567 val
* var12
/* : nullable HashNode[nullable Object] */;
1568 val
* var_c
/* var c: nullable HashMapNode[nullable Object, nullable Object] */;
1569 short int var13
/* : Bool */;
1570 short int var14
/* : Bool */;
1571 val
* var_other
/* var other: nullable Object */;
1572 short int var16
/* : Bool */;
1573 short int var17
/* : Bool */;
1574 val
* var18
/* : HashMapNode[nullable Object, nullable Object] */;
1575 /* Covariant cast for argument 0 (key) <p0:nullable Object> isa K */
1576 /* <p0:nullable Object> isa K */
1577 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__HashMap___35dK
];
1578 cltype
= type_struct
->color
;
1579 idtype
= type_struct
->id
;
1580 is_nullable
= type_struct
->is_nullable
;
1584 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
1587 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
1590 if (unlikely(!var
)) {
1591 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
1592 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
1593 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 252);
1596 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa V */
1597 /* <p1:nullable Object> isa V */
1598 type_struct4
= self
->type
->resolution_table
->types
[COLOR_core__HashMap___35dV
];
1599 cltype2
= type_struct4
->color
;
1600 idtype3
= type_struct4
->id
;
1601 is_nullable5
= type_struct4
->is_nullable
;
1603 var1
= is_nullable5
;
1605 if(cltype2
>= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->table_size
) {
1608 var1
= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->type_table
[cltype2
] == idtype3
;
1611 if (unlikely(!var1
)) {
1612 var_class_name6
= p1
== NULL ?
"null" : (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->name
;
1613 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name6
);
1614 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 252);
1619 var7
= self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashMap[nullable Object, nullable Object]> */
1621 { /* Inline kernel#Int#== (var7,0l) on <var7:Int> */
1630 core__hash_collection___core__hash_collection__HashCollection___enlarge(self
, 17l); /* Direct call hash_collection#HashCollection#enlarge on <self:HashMap[nullable Object, nullable Object]>*/
1635 var11
= core__hash_collection___core__hash_collection__HashCollection___index_at(self
, var_key
);
1639 var12
= core__hash_collection___core__hash_collection__HashCollection___node_at_idx(self
, var_i
, var_key
);
1642 if (var_c
== NULL
) {
1643 var13
= 0; /* is null */
1645 var13
= 1; /* arg is null and recv is not */
1648 { /* Inline kernel#Object#!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
1649 var_other
= ((val
*)NULL
);
1651 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])>*/
1656 RET_LABEL15
:(void)0;
1661 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])> */
1662 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])> */
1664 var18
= NEW_core__hash_collection__HashMapNode(self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashMapNode__core__HashMap___35dK__core__HashMap___35dV
]);
1666 ((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]>*/
1669 ((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]>*/
1672 ((void(*)(val
* self
))(var18
->class->vft
[COLOR_core__kernel__Object__init
]))(var18
); /* init on <var18:HashMapNode[nullable Object, nullable Object]>*/
1675 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]>*/
1680 /* method hash_collection#HashMap#clear for (self: HashMap[nullable Object, nullable Object]) */
1681 void core___core__HashMap___core__abstract_collection__Map__clear(val
* self
) {
1683 core__hash_collection___core__hash_collection__HashCollection___raz(self
); /* Direct call hash_collection#HashCollection#raz on <self:HashMap[nullable Object, nullable Object]>*/
1687 /* method hash_collection#HashMap#init for (self: HashMap[nullable Object, nullable Object]) */
1688 void core___core__HashMap___core__kernel__Object__init(val
* self
) {
1690 ((void(*)(val
* self
))(self
->class->vft
[COLOR_core___core__HashMap___core__kernel__Object__init
]))(self
); /* init on <self:HashMap[nullable Object, nullable Object]>*/
1692 self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
= 0l; /* _capacity on <self:HashMap[nullable Object, nullable Object]> */
1693 self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
= 0l; /* _the_length on <self:HashMap[nullable Object, nullable Object]> */
1696 /* method hash_collection#HashMap#keys for (self: HashMap[nullable Object, nullable Object]): RemovableCollection[nullable Object] */
1697 val
* core___core__HashMap___core__abstract_collection__MapRead__keys(val
* self
) {
1698 val
* var
/* : RemovableCollection[nullable Object] */;
1699 short int var1
/* : Bool */;
1700 val
* var2
/* : RemovableCollection[nullable Object] */;
1701 val
* var3
/* : HashMapKeys[nullable Object, nullable Object] */;
1702 var1
= self
->attrs
[COLOR_core__hash_collection__HashMap___keys
].val
!= NULL
; /* _keys on <self:HashMap[nullable Object, nullable Object]> */
1704 var2
= self
->attrs
[COLOR_core__hash_collection__HashMap___keys
].val
; /* _keys on <self:HashMap[nullable Object, nullable Object]> */
1705 if (unlikely(var2
== NULL
)) {
1706 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _keys");
1707 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 279);
1711 var3
= NEW_core__hash_collection__HashMapKeys(self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashMapKeys__core__HashMap___35dK__core__HashMap___35dV
]);
1713 ((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]>*/
1716 ((void(*)(val
* self
))(var3
->class->vft
[COLOR_core__kernel__Object__init
]))(var3
); /* init on <var3:HashMapKeys[nullable Object, nullable Object]>*/
1718 self
->attrs
[COLOR_core__hash_collection__HashMap___keys
].val
= var3
; /* _keys on <self:HashMap[nullable Object, nullable Object]> */
1725 /* method hash_collection#HashMap#values for (self: HashMap[nullable Object, nullable Object]): RemovableCollection[nullable Object] */
1726 val
* core___core__HashMap___core__abstract_collection__MapRead__values(val
* self
) {
1727 val
* var
/* : RemovableCollection[nullable Object] */;
1728 short int var1
/* : Bool */;
1729 val
* var2
/* : RemovableCollection[nullable Object] */;
1730 val
* var3
/* : HashMapValues[nullable Object, nullable Object] */;
1731 var1
= self
->attrs
[COLOR_core__hash_collection__HashMap___values
].val
!= NULL
; /* _values on <self:HashMap[nullable Object, nullable Object]> */
1733 var2
= self
->attrs
[COLOR_core__hash_collection__HashMap___values
].val
; /* _values on <self:HashMap[nullable Object, nullable Object]> */
1734 if (unlikely(var2
== NULL
)) {
1735 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _values");
1736 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 280);
1740 var3
= NEW_core__hash_collection__HashMapValues(self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashMapValues__core__HashMap___35dK__core__HashMap___35dV
]);
1742 ((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]>*/
1745 ((void(*)(val
* self
))(var3
->class->vft
[COLOR_core__kernel__Object__init
]))(var3
); /* init on <var3:HashMapValues[nullable Object, nullable Object]>*/
1747 self
->attrs
[COLOR_core__hash_collection__HashMap___values
].val
= var3
; /* _values on <self:HashMap[nullable Object, nullable Object]> */
1754 /* method hash_collection#HashMap#has_key for (self: HashMap[nullable Object, nullable Object], nullable Object): Bool */
1755 short int core___core__HashMap___core__abstract_collection__MapRead__has_key(val
* self
, val
* p0
) {
1756 short int var
/* : Bool */;
1757 val
* var_k
/* var k: nullable Object */;
1758 val
* var1
/* : nullable HashNode[nullable Object] */;
1759 short int var2
/* : Bool */;
1760 short int var3
/* : Bool */;
1761 val
* var_other
/* var other: nullable Object */;
1762 short int var5
/* : Bool */;
1763 short int var6
/* : Bool */;
1766 var1
= core__hash_collection___core__hash_collection__HashCollection___node_at(self
, var_k
);
1769 var2
= 0; /* is null */
1771 var2
= 1; /* arg is null and recv is not */
1774 { /* Inline kernel#Object#!= (var1,((val*)NULL)) on <var1:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
1775 var_other
= ((val
*)NULL
);
1777 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])>*/
1791 /* method hash_collection#HashMapKeys#map for (self: HashMapKeys[nullable Object, nullable Object]): HashMap[nullable Object, nullable Object] */
1792 val
* core__hash_collection___core__hash_collection__HashMapKeys___map(val
* self
) {
1793 val
* var
/* : HashMap[nullable Object, nullable Object] */;
1794 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
1795 var1
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1796 if (unlikely(var1
== NULL
)) {
1797 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1798 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
1805 /* method hash_collection#HashMapKeys#map= for (self: HashMapKeys[nullable Object, nullable Object], HashMap[nullable Object, nullable Object]) */
1806 void core__hash_collection___core__hash_collection__HashMapKeys___map_61d(val
* self
, val
* p0
) {
1807 short int var
/* : Bool */;
1810 const struct type
* type_struct
;
1811 const char* var_class_name
;
1812 /* Covariant cast for argument 0 (map) <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
1813 /* <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
1814 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__HashMap__core__hash_collection__HashMapKeys___35dK__core__hash_collection__HashMapKeys___35dV
];
1815 cltype
= type_struct
->color
;
1816 idtype
= type_struct
->id
;
1817 if(cltype
>= p0
->type
->table_size
) {
1820 var
= p0
->type
->type_table
[cltype
] == idtype
;
1822 if (unlikely(!var
)) {
1823 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1824 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name
);
1825 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
1828 self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
= p0
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1831 /* method hash_collection#HashMapKeys#first for (self: HashMapKeys[nullable Object, nullable Object]): nullable Object */
1832 val
* core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__first(val
* self
) {
1833 val
* var
/* : nullable Object */;
1834 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
1835 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
1836 val
* var4
/* : nullable HashNode[nullable Object] */;
1837 val
* var5
/* : nullable Object */;
1839 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1840 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1841 if (unlikely(var3
== NULL
)) {
1842 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1843 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
1850 var4
= var1
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
1851 if (unlikely(var4
== NULL
)) {
1852 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1853 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 291);
1856 var5
= var4
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var4:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
1862 /* method hash_collection#HashMapKeys#has for (self: HashMapKeys[nullable Object, nullable Object], nullable Object): Bool */
1863 short int core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__has(val
* self
, val
* p0
) {
1864 short int var
/* : Bool */;
1865 val
* var_k
/* var k: nullable Object */;
1866 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
1867 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
1868 val
* var4
/* : nullable HashNode[nullable Object] */;
1869 short int var5
/* : Bool */;
1870 short int var6
/* : Bool */;
1871 val
* var_other
/* var other: nullable Object */;
1872 short int var8
/* : Bool */;
1873 short int var9
/* : Bool */;
1876 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1877 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1878 if (unlikely(var3
== NULL
)) {
1879 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1880 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
1888 var4
= core__hash_collection___core__hash_collection__HashCollection___node_at(var1
, var_k
);
1891 var5
= 0; /* is null */
1893 var5
= 1; /* arg is null and recv is not */
1896 { /* Inline kernel#Object#!= (var4,((val*)NULL)) on <var4:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
1897 var_other
= ((val
*)NULL
);
1899 var8
= ((short int(*)(val
* self
, val
* p0
))(var4
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var4
, var_other
); /* == on <var4:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
1913 /* method hash_collection#HashMapKeys#is_empty for (self: HashMapKeys[nullable Object, nullable Object]): Bool */
1914 short int core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__is_empty(val
* self
) {
1915 short int var
/* : Bool */;
1916 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
1917 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
1918 short int var4
/* : Bool */;
1920 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1921 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1922 if (unlikely(var3
== NULL
)) {
1923 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1924 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
1932 var4
= core___core__HashMap___core__abstract_collection__MapRead__is_empty(var1
);
1939 /* method hash_collection#HashMapKeys#length for (self: HashMapKeys[nullable Object, nullable Object]): Int */
1940 long core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__length(val
* self
) {
1941 long var
/* : Int */;
1942 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
1943 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
1944 long var4
/* : Int */;
1946 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1947 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1948 if (unlikely(var3
== NULL
)) {
1949 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1950 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
1958 var4
= core___core__HashMap___core__abstract_collection__MapRead__length(var1
);
1965 /* method hash_collection#HashMapKeys#iterator for (self: HashMapKeys[nullable Object, nullable Object]): Iterator[nullable Object] */
1966 val
* core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__iterator(val
* self
) {
1967 val
* var
/* : Iterator[nullable Object] */;
1968 val
* var1
/* : MapKeysIterator[nullable Object, nullable Object] */;
1969 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
1970 val
* var4
/* : HashMap[nullable Object, nullable Object] */;
1971 val
* var5
/* : MapIterator[nullable Object, nullable Object] */;
1972 var1
= NEW_core__MapKeysIterator(self
->type
->resolution_table
->types
[COLOR_core__MapKeysIterator__core__hash_collection__HashMapKeys___35dK__core__hash_collection__HashMapKeys___35dV
]);
1974 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1975 var4
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1976 if (unlikely(var4
== NULL
)) {
1977 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1978 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
1986 var5
= core___core__HashMap___core__abstract_collection__MapRead__iterator(var2
);
1989 ((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]>*/
1992 ((void(*)(val
* self
))(var1
->class->vft
[COLOR_core__kernel__Object__init
]))(var1
); /* init on <var1:MapKeysIterator[nullable Object, nullable Object]>*/
1999 /* method hash_collection#HashMapKeys#clear for (self: HashMapKeys[nullable Object, nullable Object]) */
2000 void core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__RemovableCollection__clear(val
* self
) {
2001 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2002 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2004 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2005 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2006 if (unlikely(var2
== NULL
)) {
2007 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2008 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
2016 core___core__HashMap___core__abstract_collection__Map__clear(var
); /* Direct call hash_collection#HashMap#clear on <var:HashMap[nullable Object, nullable Object]>*/
2020 /* method hash_collection#HashMapKeys#remove for (self: HashMapKeys[nullable Object, nullable Object], nullable Object) */
2021 void core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__RemovableCollection__remove(val
* self
, val
* p0
) {
2022 val
* var_key
/* var key: nullable Object */;
2023 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2024 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2027 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2028 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2029 if (unlikely(var2
== NULL
)) {
2030 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2031 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 287);
2039 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]>*/
2043 /* method hash_collection#HashMapKeys#init for (self: HashMapKeys[nullable Object, nullable Object]) */
2044 void core__hash_collection___core__hash_collection__HashMapKeys___core__kernel__Object__init(val
* self
) {
2046 ((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]>*/
2050 /* method hash_collection#HashMapValues#map for (self: HashMapValues[nullable Object, nullable Object]): HashMap[nullable Object, nullable Object] */
2051 val
* core__hash_collection___core__hash_collection__HashMapValues___map(val
* self
) {
2052 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2053 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2054 var1
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2055 if (unlikely(var1
== NULL
)) {
2056 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2057 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2064 /* method hash_collection#HashMapValues#map= for (self: HashMapValues[nullable Object, nullable Object], HashMap[nullable Object, nullable Object]) */
2065 void core__hash_collection___core__hash_collection__HashMapValues___map_61d(val
* self
, val
* p0
) {
2066 short int var
/* : Bool */;
2069 const struct type
* type_struct
;
2070 const char* var_class_name
;
2071 /* Covariant cast for argument 0 (map) <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2072 /* <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2073 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__HashMap__core__hash_collection__HashMapValues___35dK__core__hash_collection__HashMapValues___35dV
];
2074 cltype
= type_struct
->color
;
2075 idtype
= type_struct
->id
;
2076 if(cltype
>= p0
->type
->table_size
) {
2079 var
= p0
->type
->type_table
[cltype
] == idtype
;
2081 if (unlikely(!var
)) {
2082 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2083 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name
);
2084 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2087 self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
= p0
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2090 /* method hash_collection#HashMapValues#first for (self: HashMapValues[nullable Object, nullable Object]): nullable Object */
2091 val
* core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__first(val
* self
) {
2092 val
* var
/* : nullable Object */;
2093 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2094 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
2095 val
* var4
/* : nullable HashNode[nullable Object] */;
2096 val
* var5
/* : nullable Object */;
2098 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2099 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2100 if (unlikely(var3
== NULL
)) {
2101 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2102 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2109 var4
= var1
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
2110 if (unlikely(var4
== NULL
)) {
2111 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2112 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 321);
2115 var5
= var4
->attrs
[COLOR_core__hash_collection__HashMapNode___value
].val
; /* _value on <var4:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
2121 /* method hash_collection#HashMapValues#has for (self: HashMapValues[nullable Object, nullable Object], nullable Object): Bool */
2122 short int core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__has(val
* self
, val
* p0
) {
2123 short int var
/* : Bool */;
2124 val
* var_item
/* var item: nullable Object */;
2125 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2126 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
2127 val
* var4
/* : nullable HashNode[nullable Object] */;
2128 val
* var_c
/* var c: nullable HashMapNode[nullable Object, nullable Object] */;
2129 short int var5
/* : Bool */;
2130 short int var6
/* : Bool */;
2131 val
* var_other
/* var other: nullable Object */;
2132 short int var8
/* : Bool */;
2133 short int var9
/* : Bool */;
2134 val
* var10
/* : nullable Object */;
2135 short int var11
/* : Bool */;
2136 short int var12
/* : Bool */;
2137 val
* var13
/* : nullable HashNode[nullable Object] */;
2140 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2141 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2142 if (unlikely(var3
== NULL
)) {
2143 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2144 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2151 var4
= var1
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
2154 if (var_c
== NULL
) {
2155 var5
= 0; /* is null */
2157 var5
= 1; /* arg is null and recv is not */
2160 { /* Inline kernel#Object#!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
2161 var_other
= ((val
*)NULL
);
2163 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])>*/
2173 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])> */
2174 if (var10
== NULL
) {
2175 var11
= (var_item
== NULL
);
2177 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>*/
2185 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])> */
2191 BREAK_label
: (void)0;
2197 /* method hash_collection#HashMapValues#is_empty for (self: HashMapValues[nullable Object, nullable Object]): Bool */
2198 short int core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__is_empty(val
* self
) {
2199 short int var
/* : Bool */;
2200 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2201 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
2202 short int var4
/* : Bool */;
2204 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2205 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2206 if (unlikely(var3
== NULL
)) {
2207 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2208 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2216 var4
= core___core__HashMap___core__abstract_collection__MapRead__is_empty(var1
);
2223 /* method hash_collection#HashMapValues#length for (self: HashMapValues[nullable Object, nullable Object]): Int */
2224 long core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__length(val
* self
) {
2225 long var
/* : Int */;
2226 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2227 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
2228 long var4
/* : Int */;
2230 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2231 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2232 if (unlikely(var3
== NULL
)) {
2233 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2234 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2242 var4
= core___core__HashMap___core__abstract_collection__MapRead__length(var1
);
2249 /* method hash_collection#HashMapValues#iterator for (self: HashMapValues[nullable Object, nullable Object]): Iterator[nullable Object] */
2250 val
* core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__iterator(val
* self
) {
2251 val
* var
/* : Iterator[nullable Object] */;
2252 val
* var1
/* : MapValuesIterator[nullable Object, nullable Object] */;
2253 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2254 val
* var4
/* : HashMap[nullable Object, nullable Object] */;
2255 val
* var5
/* : MapIterator[nullable Object, nullable Object] */;
2256 var1
= NEW_core__MapValuesIterator(self
->type
->resolution_table
->types
[COLOR_core__MapValuesIterator__core__hash_collection__HashMapValues___35dK__core__hash_collection__HashMapValues___35dV
]);
2258 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2259 var4
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2260 if (unlikely(var4
== NULL
)) {
2261 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2262 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2270 var5
= core___core__HashMap___core__abstract_collection__MapRead__iterator(var2
);
2273 ((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]>*/
2276 ((void(*)(val
* self
))(var1
->class->vft
[COLOR_core__kernel__Object__init
]))(var1
); /* init on <var1:MapValuesIterator[nullable Object, nullable Object]>*/
2283 /* method hash_collection#HashMapValues#clear for (self: HashMapValues[nullable Object, nullable Object]) */
2284 void core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__RemovableCollection__clear(val
* self
) {
2285 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2286 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2288 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2289 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2290 if (unlikely(var2
== NULL
)) {
2291 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2292 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2300 core___core__HashMap___core__abstract_collection__Map__clear(var
); /* Direct call hash_collection#HashMap#clear on <var:HashMap[nullable Object, nullable Object]>*/
2304 /* method hash_collection#HashMapValues#remove for (self: HashMapValues[nullable Object, nullable Object], nullable Object) */
2305 void core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__RemovableCollection__remove(val
* self
, val
* p0
) {
2306 val
* var_item
/* var item: nullable Object */;
2307 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2308 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2309 val
* var_map
/* var map: HashMap[nullable Object, nullable Object] */;
2310 val
* var3
/* : nullable HashNode[nullable Object] */;
2311 val
* var_c
/* var c: nullable HashMapNode[nullable Object, nullable Object] */;
2312 short int var4
/* : Bool */;
2313 short int var5
/* : Bool */;
2314 val
* var_other
/* var other: nullable Object */;
2315 short int var7
/* : Bool */;
2316 short int var8
/* : Bool */;
2317 val
* var9
/* : nullable Object */;
2318 short int var10
/* : Bool */;
2319 short int var11
/* : Bool */;
2320 val
* var12
/* : nullable Object */;
2321 val
* var13
/* : nullable HashNode[nullable Object] */;
2324 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2325 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2326 if (unlikely(var2
== NULL
)) {
2327 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2328 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 308);
2336 var3
= var_map
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_map:HashMap[nullable Object, nullable Object]> */
2339 if (var_c
== NULL
) {
2340 var4
= 0; /* is null */
2342 var4
= 1; /* arg is null and recv is not */
2345 { /* Inline kernel#Object#!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
2346 var_other
= ((val
*)NULL
);
2348 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])>*/
2358 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])> */
2360 var10
= (var_item
== NULL
);
2362 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>*/
2366 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])> */
2368 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]>*/
2373 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])> */
2379 BREAK_label
: (void)0;
2382 /* method hash_collection#HashMapValues#init for (self: HashMapValues[nullable Object, nullable Object]) */
2383 void core__hash_collection___core__hash_collection__HashMapValues___core__kernel__Object__init(val
* self
) {
2385 ((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]>*/
2389 /* method hash_collection#HashMapNode#value= for (self: HashMapNode[nullable Object, nullable Object], nullable Object) */
2390 void core__hash_collection___core__hash_collection__HashMapNode___value_61d(val
* self
, val
* p0
) {
2391 short int var
/* : Bool */;
2394 const struct type
* type_struct
;
2395 short int is_nullable
;
2396 const char* var_class_name
;
2397 /* Covariant cast for argument 0 (value) <p0:nullable Object> isa V */
2398 /* <p0:nullable Object> isa V */
2399 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashMapNode___35dV
];
2400 cltype
= type_struct
->color
;
2401 idtype
= type_struct
->id
;
2402 is_nullable
= type_struct
->is_nullable
;
2406 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
2409 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
2412 if (unlikely(!var
)) {
2413 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
2414 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name
);
2415 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 379);
2418 self
->attrs
[COLOR_core__hash_collection__HashMapNode___value
].val
= p0
; /* _value on <self:HashMapNode[nullable Object, nullable Object]> */
2421 /* method hash_collection#HashMapNode#init for (self: HashMapNode[nullable Object, nullable Object]) */
2422 void core__hash_collection___core__hash_collection__HashMapNode___core__kernel__Object__init(val
* self
) {
2424 ((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]>*/
2428 /* method hash_collection#HashMapIterator#is_ok for (self: HashMapIterator[nullable Object, nullable Object]): Bool */
2429 short int core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__is_ok(val
* self
) {
2430 short int var
/* : Bool */;
2431 val
* var1
/* : nullable HashMapNode[nullable Object, nullable Object] */;
2432 short int var2
/* : Bool */;
2433 short int var3
/* : Bool */;
2434 val
* var_other
/* var other: nullable Object */;
2435 short int var5
/* : Bool */;
2436 short int var6
/* : Bool */;
2437 var1
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2439 var2
= 0; /* is null */
2441 var2
= 1; /* arg is null and recv is not */
2444 { /* Inline kernel#Object#!= (var1,((val*)NULL)) on <var1:nullable HashMapNode[nullable Object, nullable Object]> */
2445 var_other
= ((val
*)NULL
);
2447 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])>*/
2461 /* method hash_collection#HashMapIterator#item for (self: HashMapIterator[nullable Object, nullable Object]): nullable Object */
2462 val
* core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__item(val
* self
) {
2463 val
* var
/* : nullable Object */;
2464 short int var1
/* : Bool */;
2465 val
* var2
/* : nullable HashMapNode[nullable Object, nullable Object] */;
2466 val
* var3
/* : nullable Object */;
2468 var1
= core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__is_ok(self
);
2470 if (unlikely(!var1
)) {
2471 PRINT_ERROR("Runtime error: %s", "Assert failed");
2472 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 389);
2475 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2476 if (unlikely(var2
== NULL
)) {
2477 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2478 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 390);
2481 var3
= var2
->attrs
[COLOR_core__hash_collection__HashMapNode___value
].val
; /* _value on <var2:nullable HashMapNode[nullable Object, nullable Object]> */
2487 /* method hash_collection#HashMapIterator#key for (self: HashMapIterator[nullable Object, nullable Object]): nullable Object */
2488 val
* core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__key(val
* self
) {
2489 val
* var
/* : nullable Object */;
2490 short int var1
/* : Bool */;
2491 val
* var2
/* : nullable HashMapNode[nullable Object, nullable Object] */;
2492 val
* var3
/* : nullable Object */;
2494 var1
= core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__is_ok(self
);
2496 if (unlikely(!var1
)) {
2497 PRINT_ERROR("Runtime error: %s", "Assert failed");
2498 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 401);
2501 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2502 if (unlikely(var2
== NULL
)) {
2503 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2504 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 402);
2507 var3
= var2
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashMapNode[nullable Object, nullable Object]> */
2513 /* method hash_collection#HashMapIterator#next for (self: HashMapIterator[nullable Object, nullable Object]) */
2514 void core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__next(val
* self
) {
2515 short int var
/* : Bool */;
2516 val
* var1
/* : nullable HashMapNode[nullable Object, nullable Object] */;
2517 val
* var2
/* : nullable HashNode[nullable Object] */;
2519 var
= core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__is_ok(self
);
2521 if (unlikely(!var
)) {
2522 PRINT_ERROR("Runtime error: %s", "Assert failed");
2523 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 407);
2526 var1
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2527 if (unlikely(var1
== NULL
)) {
2528 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2529 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 408);
2532 var2
= var1
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
; /* _next_item on <var1:nullable HashMapNode[nullable Object, nullable Object]> */
2533 self
->attrs
[COLOR_core__hash_collection__HashMapIterator___node
].val
= var2
; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2536 /* method hash_collection#HashMapIterator#map for (self: HashMapIterator[nullable Object, nullable Object]): HashMap[nullable Object, nullable Object] */
2537 val
* core__hash_collection___core__hash_collection__HashMapIterator___map(val
* self
) {
2538 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2539 val
* var1
/* : HashMap[nullable Object, nullable Object] */;
2540 var1
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___map
].val
; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2541 if (unlikely(var1
== NULL
)) {
2542 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2543 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 411);
2550 /* method hash_collection#HashMapIterator#map= for (self: HashMapIterator[nullable Object, nullable Object], HashMap[nullable Object, nullable Object]) */
2551 void core__hash_collection___core__hash_collection__HashMapIterator___map_61d(val
* self
, val
* p0
) {
2552 short int var
/* : Bool */;
2555 const struct type
* type_struct
;
2556 const char* var_class_name
;
2557 /* Covariant cast for argument 0 (map) <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2558 /* <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2559 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__HashMap__core__hash_collection__HashMapIterator___35dK__core__hash_collection__HashMapIterator___35dV
];
2560 cltype
= type_struct
->color
;
2561 idtype
= type_struct
->id
;
2562 if(cltype
>= p0
->type
->table_size
) {
2565 var
= p0
->type
->type_table
[cltype
] == idtype
;
2567 if (unlikely(!var
)) {
2568 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2569 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name
);
2570 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 411);
2573 self
->attrs
[COLOR_core__hash_collection__HashMapIterator___map
].val
= p0
; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2576 /* method hash_collection#HashMapIterator#init for (self: HashMapIterator[nullable Object, nullable Object]) */
2577 void core__hash_collection___core__hash_collection__HashMapIterator___core__kernel__Object__init(val
* self
) {
2578 val
* var
/* : HashMap[nullable Object, nullable Object] */;
2579 val
* var2
/* : HashMap[nullable Object, nullable Object] */;
2580 val
* var3
/* : HashMap[nullable Object, nullable Object] */;
2581 val
* var4
/* : nullable HashNode[nullable Object] */;
2583 ((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]>*/
2586 { /* Inline hash_collection#HashMapIterator#map (self) on <self:HashMapIterator[nullable Object, nullable Object]> */
2587 var2
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___map
].val
; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2588 if (unlikely(var2
== NULL
)) {
2589 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2590 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 411);
2597 self
->attrs
[COLOR_core__hash_collection__HashMapIterator___map
].val
= var
; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2598 var3
= self
->attrs
[COLOR_core__hash_collection__HashMapIterator___map
].val
; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2599 if (unlikely(var3
== NULL
)) {
2600 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2601 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 420);
2604 var4
= var3
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var3:HashMap[nullable Object, nullable Object]> */
2605 self
->attrs
[COLOR_core__hash_collection__HashMapIterator___node
].val
= var4
; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2608 /* method hash_collection#HashSet#length for (self: HashSet[nullable Object]): Int */
2609 long core___core__HashSet___core__abstract_collection__Collection__length(val
* self
) {
2610 long var
/* : Int */;
2611 long var1
/* : Int */;
2612 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashSet[nullable Object]> */
2618 /* method hash_collection#HashSet#is_empty for (self: HashSet[nullable Object]): Bool */
2619 short int core___core__HashSet___core__abstract_collection__Collection__is_empty(val
* self
) {
2620 short int var
/* : Bool */;
2621 long var1
/* : Int */;
2622 short int var2
/* : Bool */;
2623 short int var4
/* : Bool */;
2624 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashSet[nullable Object]> */
2626 { /* Inline kernel#Int#== (var1,0l) on <var1:Int> */
2638 /* method hash_collection#HashSet#first for (self: HashSet[nullable Object]): nullable Object */
2639 val
* core___core__HashSet___core__abstract_collection__Collection__first(val
* self
) {
2640 val
* var
/* : nullable Object */;
2641 long var1
/* : Int */;
2642 short int var2
/* : Bool */;
2643 short int var4
/* : Bool */;
2646 const char* var_class_name
;
2647 short int var5
/* : Bool */;
2648 val
* var6
/* : nullable HashNode[nullable Object] */;
2649 val
* var7
/* : nullable Object */;
2650 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashSet[nullable Object]> */
2652 { /* Inline kernel#Int#> (var1,0l) on <var1:Int> */
2653 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
2654 /* <0l:Int> isa OTHER */
2655 var4
= 1; /* easy <0l:Int> isa OTHER*/
2656 if (unlikely(!var4
)) {
2657 var_class_name
= type_core__Int
.name
;
2658 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2659 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 730);
2668 if (unlikely(!var2
)) {
2669 PRINT_ERROR("Runtime error: %s", "Assert failed");
2670 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 438);
2673 var6
= self
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashSet[nullable Object]> */
2674 if (unlikely(var6
== NULL
)) {
2675 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2676 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 439);
2679 var7
= var6
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var6:nullable HashNode[nullable Object](nullable HashSetNode[nullable Object])> */
2685 /* method hash_collection#HashSet#has for (self: HashSet[nullable Object], nullable Object): Bool */
2686 short int core___core__HashSet___core__abstract_collection__Collection__has(val
* self
, val
* p0
) {
2687 short int var
/* : Bool */;
2688 val
* var_item
/* var item: nullable Object */;
2689 val
* var1
/* : nullable HashNode[nullable Object] */;
2690 short int var2
/* : Bool */;
2691 short int var3
/* : Bool */;
2692 val
* var_other
/* var other: nullable Object */;
2693 short int var5
/* : Bool */;
2694 short int var6
/* : Bool */;
2697 var1
= core__hash_collection___core__hash_collection__HashCollection___node_at(self
, var_item
);
2700 var2
= 0; /* is null */
2702 var2
= 1; /* arg is null and recv is not */
2705 { /* Inline kernel#Object#!= (var1,((val*)NULL)) on <var1:nullable HashNode[nullable Object](nullable HashSetNode[nullable Object])> */
2706 var_other
= ((val
*)NULL
);
2708 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])>*/
2722 /* method hash_collection#HashSet#add for (self: HashSet[nullable Object], nullable Object) */
2723 void core___core__HashSet___core__abstract_collection__SimpleCollection__add(val
* self
, val
* p0
) {
2724 short int var
/* : Bool */;
2727 const struct type
* type_struct
;
2728 short int is_nullable
;
2729 const char* var_class_name
;
2730 val
* var_item
/* var item: nullable Object */;
2731 long var1
/* : Int */;
2732 short int var2
/* : Bool */;
2733 short int var4
/* : Bool */;
2734 long var5
/* : Int */;
2735 long var_i
/* var i: Int */;
2736 val
* var6
/* : nullable HashNode[nullable Object] */;
2737 val
* var_c
/* var c: nullable HashSetNode[nullable Object] */;
2738 short int var7
/* : Bool */;
2739 short int var8
/* : Bool */;
2740 val
* var_other
/* var other: nullable Object */;
2741 short int var10
/* : Bool */;
2742 short int var11
/* : Bool */;
2743 val
* var12
/* : HashSetNode[nullable Object] */;
2744 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
2745 /* <p0:nullable Object> isa E */
2746 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__HashSet___35dE
];
2747 cltype
= type_struct
->color
;
2748 idtype
= type_struct
->id
;
2749 is_nullable
= type_struct
->is_nullable
;
2753 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
2756 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
2759 if (unlikely(!var
)) {
2760 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
2761 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
2762 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 447);
2766 var1
= self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashSet[nullable Object]> */
2768 { /* Inline kernel#Int#== (var1,0l) on <var1:Int> */
2777 core__hash_collection___core__hash_collection__HashCollection___enlarge(self
, 17l); /* Direct call hash_collection#HashCollection#enlarge on <self:HashSet[nullable Object]>*/
2782 var5
= core__hash_collection___core__hash_collection__HashCollection___index_at(self
, var_item
);
2786 var6
= core__hash_collection___core__hash_collection__HashCollection___node_at_idx(self
, var_i
, var_item
);
2789 if (var_c
== NULL
) {
2790 var7
= 0; /* is null */
2792 var7
= 1; /* arg is null and recv is not */
2795 { /* Inline kernel#Object#!= (var_c,((val*)NULL)) on <var_c:nullable HashSetNode[nullable Object]> */
2796 var_other
= ((val
*)NULL
);
2798 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])>*/
2808 var_c
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
= var_item
; /* _key on <var_c:nullable HashSetNode[nullable Object](HashSetNode[nullable Object])> */
2810 var12
= NEW_core__hash_collection__HashSetNode(self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashSetNode__core__HashSet___35dE
]);
2812 ((void(*)(val
* self
, val
* p0
))(var12
->class->vft
[COLOR_core__hash_collection__HashNode__key_61d
]))(var12
, var_item
); /* key= on <var12:HashSetNode[nullable Object]>*/
2815 ((void(*)(val
* self
))(var12
->class->vft
[COLOR_core__kernel__Object__init
]))(var12
); /* init on <var12:HashSetNode[nullable Object]>*/
2818 core__hash_collection___core__hash_collection__HashCollection___store(self
, var_i
, var12
); /* Direct call hash_collection#HashCollection#store on <self:HashSet[nullable Object]>*/
2823 /* method hash_collection#HashSet#remove for (self: HashSet[nullable Object], nullable Object) */
2824 void core___core__HashSet___core__abstract_collection__RemovableCollection__remove(val
* self
, val
* p0
) {
2825 val
* var_item
/* var item: nullable Object */;
2828 core__hash_collection___core__hash_collection__HashCollection___remove_node(self
, var_item
); /* Direct call hash_collection#HashCollection#remove_node on <self:HashSet[nullable Object]>*/
2832 /* method hash_collection#HashSet#clear for (self: HashSet[nullable Object]) */
2833 void core___core__HashSet___core__abstract_collection__RemovableCollection__clear(val
* self
) {
2835 core__hash_collection___core__hash_collection__HashCollection___raz(self
); /* Direct call hash_collection#HashCollection#raz on <self:HashSet[nullable Object]>*/
2839 /* method hash_collection#HashSet#iterator for (self: HashSet[nullable Object]): Iterator[nullable Object] */
2840 val
* core___core__HashSet___core__abstract_collection__Collection__iterator(val
* self
) {
2841 val
* var
/* : Iterator[nullable Object] */;
2842 val
* var1
/* : HashSetIterator[nullable Object] */;
2843 var1
= NEW_core__hash_collection__HashSetIterator(self
->type
->resolution_table
->types
[COLOR_core__hash_collection__HashSetIterator__core__HashSet___35dE
]);
2845 ((void(*)(val
* self
, val
* p0
))(var1
->class->vft
[COLOR_core__hash_collection__HashSetIterator__set_61d
]))(var1
, self
); /* set= on <var1:HashSetIterator[nullable Object]>*/
2848 ((void(*)(val
* self
))(var1
->class->vft
[COLOR_core__kernel__Object__init
]))(var1
); /* init on <var1:HashSetIterator[nullable Object]>*/
2855 /* method hash_collection#HashSet#init for (self: HashSet[nullable Object]) */
2856 void core___core__HashSet___core__kernel__Object__init(val
* self
) {
2858 ((void(*)(val
* self
))(self
->class->vft
[COLOR_core___core__HashSet___core__kernel__Object__init
]))(self
); /* init on <self:HashSet[nullable Object]>*/
2860 self
->attrs
[COLOR_core__hash_collection__HashCollection___capacity
].l
= 0l; /* _capacity on <self:HashSet[nullable Object]> */
2861 self
->attrs
[COLOR_core__hash_collection__HashCollection___the_length
].l
= 0l; /* _the_length on <self:HashSet[nullable Object]> */
2864 /* method hash_collection#HashSet#from for (self: HashSet[nullable Object], Collection[nullable Object]) */
2865 void core___core__HashSet___from(val
* self
, val
* p0
) {
2866 short int var
/* : Bool */;
2869 const struct type
* type_struct
;
2870 const char* var_class_name
;
2871 val
* var_coll
/* var coll: Collection[nullable Object] */;
2872 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[E] */
2873 /* <p0:Collection[nullable Object]> isa Collection[E] */
2874 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__Collection__core__HashSet___35dE
];
2875 cltype
= type_struct
->color
;
2876 idtype
= type_struct
->id
;
2877 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
2880 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
2882 if (unlikely(!var
)) {
2883 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
2884 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name
);
2885 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 471);
2890 core___core__HashSet___core__kernel__Object__init(self
); /* Direct call hash_collection#HashSet#init on <self:HashSet[nullable Object]>*/
2893 core___core__SimpleCollection___add_all(self
, var_coll
); /* Direct call abstract_collection#SimpleCollection#add_all on <self:HashSet[nullable Object]>*/
2897 /* method hash_collection#HashSetIterator#is_ok for (self: HashSetIterator[nullable Object]): Bool */
2898 short int core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__is_ok(val
* self
) {
2899 short int var
/* : Bool */;
2900 val
* var1
/* : nullable HashSetNode[nullable Object] */;
2901 short int var2
/* : Bool */;
2902 short int var3
/* : Bool */;
2903 val
* var_other
/* var other: nullable Object */;
2904 short int var5
/* : Bool */;
2905 short int var6
/* : Bool */;
2906 var1
= self
->attrs
[COLOR_core__hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[nullable Object]> */
2908 var2
= 0; /* is null */
2910 var2
= 1; /* arg is null and recv is not */
2913 { /* Inline kernel#Object#!= (var1,((val*)NULL)) on <var1:nullable HashSetNode[nullable Object]> */
2914 var_other
= ((val
*)NULL
);
2916 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])>*/
2930 /* method hash_collection#HashSetIterator#item for (self: HashSetIterator[nullable Object]): nullable Object */
2931 val
* core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__item(val
* self
) {
2932 val
* var
/* : nullable Object */;
2933 short int var1
/* : Bool */;
2934 val
* var2
/* : nullable HashSetNode[nullable Object] */;
2935 val
* var3
/* : nullable Object */;
2937 var1
= core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__is_ok(self
);
2939 if (unlikely(!var1
)) {
2940 PRINT_ERROR("Runtime error: %s", "Assert failed");
2941 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 491);
2944 var2
= self
->attrs
[COLOR_core__hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[nullable Object]> */
2945 if (unlikely(var2
== NULL
)) {
2946 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2947 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 492);
2950 var3
= var2
->attrs
[COLOR_core__hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashSetNode[nullable Object]> */
2956 /* method hash_collection#HashSetIterator#next for (self: HashSetIterator[nullable Object]) */
2957 void core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__next(val
* self
) {
2958 short int var
/* : Bool */;
2959 val
* var1
/* : nullable HashSetNode[nullable Object] */;
2960 val
* var2
/* : nullable HashNode[nullable Object] */;
2962 var
= core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__is_ok(self
);
2964 if (unlikely(!var
)) {
2965 PRINT_ERROR("Runtime error: %s", "Assert failed");
2966 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 497);
2969 var1
= self
->attrs
[COLOR_core__hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[nullable Object]> */
2970 if (unlikely(var1
== NULL
)) {
2971 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2972 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 498);
2975 var2
= var1
->attrs
[COLOR_core__hash_collection__HashNode___next_item
].val
; /* _next_item on <var1:nullable HashSetNode[nullable Object]> */
2976 self
->attrs
[COLOR_core__hash_collection__HashSetIterator___node
].val
= var2
; /* _node on <self:HashSetIterator[nullable Object]> */
2979 /* method hash_collection#HashSetIterator#set= for (self: HashSetIterator[nullable Object], HashSet[nullable Object]) */
2980 void core__hash_collection___core__hash_collection__HashSetIterator___set_61d(val
* self
, val
* p0
) {
2981 short int var
/* : Bool */;
2984 const struct type
* type_struct
;
2985 const char* var_class_name
;
2986 /* Covariant cast for argument 0 (set) <p0:HashSet[nullable Object]> isa HashSet[E] */
2987 /* <p0:HashSet[nullable Object]> isa HashSet[E] */
2988 type_struct
= self
->type
->resolution_table
->types
[COLOR_core__HashSet__core__hash_collection__HashSetIterator___35dE
];
2989 cltype
= type_struct
->color
;
2990 idtype
= type_struct
->id
;
2991 if(cltype
>= p0
->type
->table_size
) {
2994 var
= p0
->type
->type_table
[cltype
] == idtype
;
2996 if (unlikely(!var
)) {
2997 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2998 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSet[E]", var_class_name
);
2999 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 501);
3002 self
->attrs
[COLOR_core__hash_collection__HashSetIterator___set
].val
= p0
; /* _set on <self:HashSetIterator[nullable Object]> */
3005 /* method hash_collection#HashSetIterator#init for (self: HashSetIterator[nullable Object]) */
3006 void core__hash_collection___core__hash_collection__HashSetIterator___core__kernel__Object__init(val
* self
) {
3007 val
* var
/* : HashSet[nullable Object] */;
3008 val
* var1
/* : nullable HashNode[nullable Object] */;
3010 ((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]>*/
3012 var
= self
->attrs
[COLOR_core__hash_collection__HashSetIterator___set
].val
; /* _set on <self:HashSetIterator[nullable Object]> */
3013 if (unlikely(var
== NULL
)) {
3014 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _set");
3015 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection
, 509);
3018 var1
= var
->attrs
[COLOR_core__hash_collection__HashCollection___first_item
].val
; /* _first_item on <var:HashSet[nullable Object]> */
3019 self
->attrs
[COLOR_core__hash_collection__HashSetIterator___node
].val
= var1
; /* _node on <self:HashSetIterator[nullable Object]> */