Merge: doc: fixed some typos and other misc. corrections
[nit.git] / c_src / core__hash_collection.sep.1.c
1 #include "core__hash_collection.sep.0.h"
2 /* method hash_collection$Set$new for (self: Set[nullable Object]): Set[nullable Object] */
3 val* core__hash_collection___Set___new(val* self) {
4 val* var /* : Set[nullable Object] */;
5 val* var1 /* : HashSet[nullable Object] */;
6 var1 = NEW_core__HashSet((((long)self&3)?type_info[((long)self&3)]:self->type)->resolution_table->types[COLOR_core__HashSet__core__Set___35dE]);
7 {
8 core___core__HashSet___core__kernel__Object__init(var1); /* Direct call hash_collection$HashSet$init on <var1:HashSet[nullable Object]>*/
9 }
10 var = var1;
11 goto RET_LABEL;
12 RET_LABEL:;
13 return var;
14 }
15 /* method hash_collection$HashCollection$index_at for (self: HashCollection[nullable Object], nullable Object): Int */
16 long core__hash_collection___core__hash_collection__HashCollection___index_at(val* self, val* p0) {
17 long var /* : Int */;
18 val* var_k /* var k: nullable Object */;
19 short int var1 /* : Bool */;
20 short int var2 /* : Bool */;
21 long var3 /* : Int */;
22 long var4 /* : Int */;
23 long var5 /* : Int */;
24 long var7 /* : Int */;
25 long var_i /* var i: Int */;
26 short int var8 /* : Bool */;
27 short int var10 /* : Bool */;
28 int cltype;
29 int idtype;
30 const char* var_class_name;
31 short int var11 /* : Bool */;
32 long var12 /* : Int */;
33 long var14 /* : Int */;
34 var_k = p0;
35 if (var_k == NULL) {
36 var1 = 1; /* is null */
37 } else {
38 var1 = 0; /* arg is null but recv is not */
39 }
40 if (0) {
41 var2 = ((short int(*)(val* self, val* p0))((((long)var_k&3)?class_info[((long)var_k&3)]:var_k->class)->vft[COLOR_core__kernel__Object___61d_61d]))(var_k, ((val*)NULL)); /* == on <var_k:nullable Object>*/
42 var1 = var2;
43 }
44 if (var1){
45 var = 0l;
46 goto RET_LABEL;
47 } else {
48 }
49 {
50 var3 = ((long(*)(val* self))((((long)var_k&3)?class_info[((long)var_k&3)]:var_k->class)->vft[COLOR_core__kernel__Object__hash]))(var_k); /* hash on <var_k:nullable Object(Object)>*/
51 }
52 var4 = self->attrs[COLOR_core__hash_collection__HashCollection___capacity].l; /* _capacity on <self:HashCollection[nullable Object]> */
53 {
54 { /* Inline kernel$Int$% (var3,var4) on <var3:Int> */
55 var7 = var3 % var4;
56 var5 = var7;
57 goto RET_LABEL6;
58 RET_LABEL6:(void)0;
59 }
60 }
61 var_i = var5;
62 {
63 { /* Inline kernel$Int$< (var_i,0l) on <var_i:Int> */
64 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
65 /* <0l:Int> isa OTHER */
66 var10 = 1; /* easy <0l:Int> isa OTHER*/
67 if (unlikely(!var10)) {
68 var_class_name = type_core__Int.name;
69 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name);
70 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725);
71 fatal_exit(1);
72 }
73 var11 = var_i < 0l;
74 var8 = var11;
75 goto RET_LABEL9;
76 RET_LABEL9:(void)0;
77 }
78 }
79 if (var8){
80 {
81 { /* Inline kernel$Int$unary - (var_i) on <var_i:Int> */
82 var14 = -var_i;
83 var12 = var14;
84 goto RET_LABEL13;
85 RET_LABEL13:(void)0;
86 }
87 }
88 var_i = var12;
89 } else {
90 }
91 var = var_i;
92 goto RET_LABEL;
93 RET_LABEL:;
94 return var;
95 }
96 /* method hash_collection$HashCollection$node_at for (self: HashCollection[nullable Object], nullable Object): nullable HashNode[nullable Object] */
97 val* core__hash_collection___core__hash_collection__HashCollection___node_at(val* self, val* p0) {
98 val* var /* : nullable HashNode[nullable Object] */;
99 val* var_k /* var k: nullable Object */;
100 long var1 /* : Int */;
101 short int var2 /* : Bool */;
102 short int var4 /* : Bool */;
103 val* var5 /* : nullable Object */;
104 short int var6 /* : Bool */;
105 short int var7 /* : Bool */;
106 short int var9 /* : Bool */;
107 val* var10 /* : nullable HashNode[nullable Object] */;
108 long var11 /* : Int */;
109 val* var12 /* : nullable HashNode[nullable Object] */;
110 val* var_res /* var res: nullable HashNode[nullable Object] */;
111 var_k = p0;
112 var1 = self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashCollection[nullable Object]> */
113 {
114 { /* Inline kernel$Int$== (var1,0l) on <var1:Int> */
115 var4 = var1 == 0l;
116 var2 = var4;
117 goto RET_LABEL3;
118 RET_LABEL3:(void)0;
119 }
120 }
121 if (var2){
122 var = ((val*)NULL);
123 goto RET_LABEL;
124 } else {
125 }
126 var5 = self->attrs[COLOR_core__hash_collection__HashCollection___last_accessed_key].val; /* _last_accessed_key on <self:HashCollection[nullable Object]> */
127 if (var_k == NULL) {
128 var6 = (var5 == NULL);
129 } else {
130 { /* Inline kernel$Object$is_same_instance (var_k,var5) on <var_k:nullable Object> */
131 var9 = var_k == var5 || (var_k != NULL && var5 != NULL && (!((long)var_k&3)) && (!((long)var5&3)) && var_k->class == var5->class && ((var_k->class->box_kind == 3 && ((struct instance_core__Byte*)var_k)->value == ((struct instance_core__Byte*)var5)->value) || (var_k->class->box_kind == 5 && ((struct instance_core__Float*)var_k)->value == ((struct instance_core__Float*)var5)->value) || (var_k->class->box_kind == 6 && ((struct instance_core__CString*)var_k)->value == ((struct instance_core__CString*)var5)->value) || (var_k->class->box_kind == 7 && ((struct instance_core__Pointer*)var_k)->value == ((struct instance_core__Pointer*)var5)->value) || (var_k->class->box_kind == 8 && ((struct instance_core__Int8*)var_k)->value == ((struct instance_core__Int8*)var5)->value) || (var_k->class->box_kind == 9 && ((struct instance_core__Int16*)var_k)->value == ((struct instance_core__Int16*)var5)->value) || (var_k->class->box_kind == 10 && ((struct instance_core__UInt16*)var_k)->value == ((struct instance_core__UInt16*)var5)->value) || (var_k->class->box_kind == 11 && ((struct instance_core__Int32*)var_k)->value == ((struct instance_core__Int32*)var5)->value) || (var_k->class->box_kind == 12 && ((struct instance_core__UInt32*)var_k)->value == ((struct instance_core__UInt32*)var5)->value)));
132 var7 = var9;
133 goto RET_LABEL8;
134 RET_LABEL8:(void)0;
135 }
136 var6 = var7;
137 }
138 if (var6){
139 var10 = self->attrs[COLOR_core__hash_collection__HashCollection___last_accessed_node].val; /* _last_accessed_node on <self:HashCollection[nullable Object]> */
140 var = var10;
141 goto RET_LABEL;
142 } else {
143 }
144 {
145 var11 = core__hash_collection___core__hash_collection__HashCollection___index_at(self, var_k);
146 }
147 {
148 var12 = core__hash_collection___core__hash_collection__HashCollection___node_at_idx(self, var11, var_k);
149 }
150 var_res = var12;
151 self->attrs[COLOR_core__hash_collection__HashCollection___last_accessed_key].val = var_k; /* _last_accessed_key on <self:HashCollection[nullable Object]> */
152 self->attrs[COLOR_core__hash_collection__HashCollection___last_accessed_node].val = var_res; /* _last_accessed_node on <self:HashCollection[nullable Object]> */
153 var = var_res;
154 goto RET_LABEL;
155 RET_LABEL:;
156 return var;
157 }
158 /* method hash_collection$HashCollection$node_at_idx for (self: HashCollection[nullable Object], Int, nullable Object): nullable HashNode[nullable Object] */
159 val* core__hash_collection___core__hash_collection__HashCollection___node_at_idx(val* self, long p0, val* p1) {
160 val* var /* : nullable HashNode[nullable Object] */;
161 long var_i /* var i: Int */;
162 val* var_k /* var k: nullable Object */;
163 long var1 /* : Int */;
164 short int var2 /* : Bool */;
165 short int var4 /* : Bool */;
166 val* var5 /* : NativeArray[nullable HashNode[nullable Object]] */;
167 val* var6 /* : nullable Object */;
168 val* var8 /* : Object */;
169 val* var_c /* var c: nullable HashNode[nullable Object] */;
170 short int var9 /* : Bool */;
171 short int var10 /* : Bool */;
172 val* var_other /* var other: nullable Object */;
173 short int var12 /* : Bool */;
174 short int var13 /* : Bool */;
175 val* var14 /* : nullable Object */;
176 val* var_ck /* var ck: nullable Object */;
177 short int var15 /* : Bool */;
178 short int var16 /* : Bool */;
179 short int var17 /* : Bool */;
180 short int var19 /* : Bool */;
181 short int var_ /* var : Bool */;
182 short int var20 /* : Bool */;
183 short int var21 /* : Bool */;
184 val* var22 /* : nullable HashNode[nullable Object] */;
185 short int var23 /* : Bool */;
186 int cltype;
187 int idtype;
188 const struct type* type_struct;
189 const char* var_class_name;
190 var_i = p0;
191 var_k = p1;
192 var1 = self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashCollection[nullable Object]> */
193 {
194 { /* Inline kernel$Int$== (var1,0l) on <var1:Int> */
195 var4 = var1 == 0l;
196 var2 = var4;
197 goto RET_LABEL3;
198 RET_LABEL3:(void)0;
199 }
200 }
201 if (var2){
202 var = ((val*)NULL);
203 goto RET_LABEL;
204 } else {
205 }
206 var5 = self->attrs[COLOR_core__hash_collection__HashCollection___array].val; /* _array on <self:HashCollection[nullable Object]> */
207 if (unlikely(var5 == NULL)) {
208 if(catchStack.cursor >= 0){
209 longjmp(catchStack.envs[catchStack.cursor], 1);
210 }
211 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
212 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 72);
213 fatal_exit(1);
214 }
215 {
216 { /* Inline array$NativeArray$[] (var5,var_i) on <var5:NativeArray[nullable HashNode[nullable Object]]> */
217 var8 = ((struct instance_core__NativeArray*)var5)->values[var_i];
218 var6 = var8;
219 goto RET_LABEL7;
220 RET_LABEL7:(void)0;
221 }
222 }
223 var_c = var6;
224 for(;;) {
225 if (var_c == NULL) {
226 var9 = 0; /* is null */
227 } else {
228 var9 = 1; /* arg is null and recv is not */
229 }
230 if (0) {
231 { /* Inline kernel$Object$!= (var_c,((val*)NULL)) on <var_c:nullable HashNode[nullable Object]> */
232 var_other = ((val*)NULL);
233 {
234 var12 = ((short int(*)(val* self, val* p0))(var_c->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_c, var_other); /* == on <var_c:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
235 }
236 var13 = !var12;
237 var10 = var13;
238 goto RET_LABEL11;
239 RET_LABEL11:(void)0;
240 }
241 var9 = var10;
242 }
243 if (var9){
244 var14 = var_c->attrs[COLOR_core__hash_collection__HashNode___key].val; /* _key on <var_c:nullable HashNode[nullable Object](HashNode[nullable Object])> */
245 var_ck = var14;
246 if (var_ck == NULL) {
247 var16 = (var_k == NULL);
248 } else {
249 { /* Inline kernel$Object$is_same_instance (var_ck,var_k) on <var_ck:nullable Object> */
250 var19 = var_ck == var_k || (var_ck != NULL && var_k != NULL && (!((long)var_ck&3)) && (!((long)var_k&3)) && var_ck->class == var_k->class && ((var_ck->class->box_kind == 3 && ((struct instance_core__Byte*)var_ck)->value == ((struct instance_core__Byte*)var_k)->value) || (var_ck->class->box_kind == 5 && ((struct instance_core__Float*)var_ck)->value == ((struct instance_core__Float*)var_k)->value) || (var_ck->class->box_kind == 6 && ((struct instance_core__CString*)var_ck)->value == ((struct instance_core__CString*)var_k)->value) || (var_ck->class->box_kind == 7 && ((struct instance_core__Pointer*)var_ck)->value == ((struct instance_core__Pointer*)var_k)->value) || (var_ck->class->box_kind == 8 && ((struct instance_core__Int8*)var_ck)->value == ((struct instance_core__Int8*)var_k)->value) || (var_ck->class->box_kind == 9 && ((struct instance_core__Int16*)var_ck)->value == ((struct instance_core__Int16*)var_k)->value) || (var_ck->class->box_kind == 10 && ((struct instance_core__UInt16*)var_ck)->value == ((struct instance_core__UInt16*)var_k)->value) || (var_ck->class->box_kind == 11 && ((struct instance_core__Int32*)var_ck)->value == ((struct instance_core__Int32*)var_k)->value) || (var_ck->class->box_kind == 12 && ((struct instance_core__UInt32*)var_ck)->value == ((struct instance_core__UInt32*)var_k)->value)));
251 var17 = var19;
252 goto RET_LABEL18;
253 RET_LABEL18:(void)0;
254 }
255 var16 = var17;
256 }
257 var_ = var16;
258 if (var16){
259 var15 = var_;
260 } else {
261 if (var_ck == NULL) {
262 var20 = (var_k == NULL);
263 } else {
264 var21 = ((short int(*)(val* self, val* p0))((((long)var_ck&3)?class_info[((long)var_ck&3)]:var_ck->class)->vft[COLOR_core__kernel__Object___61d_61d]))(var_ck, var_k); /* == on <var_ck:nullable Object>*/
265 var20 = var21;
266 }
267 var15 = var20;
268 }
269 if (var15){
270 goto BREAK_label;
271 } else {
272 }
273 var22 = var_c->attrs[COLOR_core__hash_collection__HashNode___next_in_bucklet].val; /* _next_in_bucklet on <var_c:nullable HashNode[nullable Object](HashNode[nullable Object])> */
274 /* <var22:nullable HashNode[nullable Object]> isa nullable N */
275 type_struct = self->type->resolution_table->types[COLOR_nullable__core__hash_collection__HashCollection__N];
276 cltype = type_struct->color;
277 idtype = type_struct->id;
278 if(var22 == NULL) {
279 var23 = 1;
280 } else {
281 if(cltype >= var22->type->table_size) {
282 var23 = 0;
283 } else {
284 var23 = var22->type->type_table[cltype] == idtype;
285 }
286 }
287 if (unlikely(!var23)) {
288 var_class_name = var22 == NULL ? "null" : var22->type->name;
289 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name);
290 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 78);
291 fatal_exit(1);
292 }
293 var_c = var22;
294 } else {
295 goto BREAK_label;
296 }
297 }
298 BREAK_label: (void)0;
299 var = var_c;
300 goto RET_LABEL;
301 RET_LABEL:;
302 return var;
303 }
304 /* method hash_collection$HashCollection$store for (self: HashCollection[nullable Object], Int, HashNode[nullable Object]) */
305 void core__hash_collection___core__hash_collection__HashCollection___store(val* self, long p0, val* p1) {
306 short int var /* : Bool */;
307 int cltype;
308 int idtype;
309 const struct type* type_struct;
310 const char* var_class_name;
311 long var_index /* var index: Int */;
312 val* var_node /* var node: HashNode[nullable Object] */;
313 val* var1 /* : nullable HashNode[nullable Object] */;
314 short int var2 /* : Bool */;
315 short int var3 /* : Bool */;
316 val* var_other /* var other: nullable Object */;
317 short int var5 /* : Bool */;
318 short int var7 /* : Bool */;
319 val* var8 /* : nullable HashNode[nullable Object] */;
320 val* var9 /* : nullable HashNode[nullable Object] */;
321 val* var10 /* : NativeArray[nullable HashNode[nullable Object]] */;
322 val* var11 /* : nullable Object */;
323 val* var13 /* : Object */;
324 val* var_next /* var next: nullable HashNode[nullable Object] */;
325 val* var14 /* : NativeArray[nullable HashNode[nullable Object]] */;
326 short int var16 /* : Bool */;
327 int cltype17;
328 int idtype18;
329 const struct type* type_struct19;
330 const char* var_class_name20;
331 short int var21 /* : Bool */;
332 short int var22 /* : Bool */;
333 val* var_other24 /* var other: nullable Object */;
334 short int var25 /* : Bool */;
335 short int var26 /* : Bool */;
336 val* var27 /* : nullable Object */;
337 long var28 /* : Int */;
338 long var_l /* var l: Int */;
339 long var29 /* : Int */;
340 short int var31 /* : Bool */;
341 int cltype32;
342 int idtype33;
343 const char* var_class_name34;
344 long var35 /* : Int */;
345 long var36 /* : Int */;
346 short int var38 /* : Bool */;
347 int cltype39;
348 int idtype40;
349 const char* var_class_name41;
350 long var42 /* : Int */;
351 long var43 /* : Int */;
352 short int var45 /* : Bool */;
353 int cltype46;
354 int idtype47;
355 const char* var_class_name48;
356 long var49 /* : Int */;
357 long var50 /* : Int */;
358 short int var52 /* : Bool */;
359 int cltype53;
360 int idtype54;
361 const char* var_class_name55;
362 long var56 /* : Int */;
363 long var57 /* : Int */;
364 short int var58 /* : Bool */;
365 short int var60 /* : Bool */;
366 int cltype61;
367 int idtype62;
368 const char* var_class_name63;
369 short int var64 /* : Bool */;
370 long var65 /* : Int */;
371 short int var67 /* : Bool */;
372 int cltype68;
373 int idtype69;
374 const char* var_class_name70;
375 long var71 /* : Int */;
376 long var72 /* : Int */;
377 short int var74 /* : Bool */;
378 int cltype75;
379 int idtype76;
380 const char* var_class_name77;
381 long var78 /* : Int */;
382 long var79 /* : Int */;
383 short int var81 /* : Bool */;
384 int cltype82;
385 int idtype83;
386 const char* var_class_name84;
387 long var85 /* : Int */;
388 /* Covariant cast for argument 1 (node) <p1:HashNode[nullable Object]> isa N */
389 /* <p1:HashNode[nullable Object]> isa N */
390 type_struct = self->type->resolution_table->types[COLOR_core__hash_collection__HashCollection__N];
391 cltype = type_struct->color;
392 idtype = type_struct->id;
393 if(cltype >= p1->type->table_size) {
394 var = 0;
395 } else {
396 var = p1->type->type_table[cltype] == idtype;
397 }
398 if (unlikely(!var)) {
399 var_class_name = p1 == NULL ? "null" : p1->type->name;
400 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "N", var_class_name);
401 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 83);
402 fatal_exit(1);
403 }
404 var_index = p0;
405 var_node = p1;
406 var1 = self->attrs[COLOR_core__hash_collection__HashCollection___first_item].val; /* _first_item on <self:HashCollection[nullable Object]> */
407 if (var1 == NULL) {
408 var2 = 1; /* is null */
409 } else {
410 var2 = 0; /* arg is null but recv is not */
411 }
412 if (0) {
413 { /* Inline kernel$Object$== (var1,((val*)NULL)) on <var1:nullable HashNode[nullable Object]> */
414 var_other = ((val*)NULL);
415 {
416 { /* Inline kernel$Object$is_same_instance (var1,var_other) on <var1:nullable HashNode[nullable Object](HashNode[nullable Object])> */
417 var7 = var1 == var_other;
418 var5 = var7;
419 goto RET_LABEL6;
420 RET_LABEL6:(void)0;
421 }
422 }
423 var3 = var5;
424 goto RET_LABEL4;
425 RET_LABEL4:(void)0;
426 }
427 var2 = var3;
428 }
429 if (var2){
430 self->attrs[COLOR_core__hash_collection__HashCollection___first_item].val = var_node; /* _first_item on <self:HashCollection[nullable Object]> */
431 } else {
432 var8 = self->attrs[COLOR_core__hash_collection__HashCollection___last_item].val; /* _last_item on <self:HashCollection[nullable Object]> */
433 if (unlikely(var8 == NULL)) {
434 if(catchStack.cursor >= 0){
435 longjmp(catchStack.envs[catchStack.cursor], 1);
436 }
437 PRINT_ERROR("Runtime error: %s", "Receiver is null");
438 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 90);
439 fatal_exit(1);
440 }
441 var8->attrs[COLOR_core__hash_collection__HashNode___next_item].val = var_node; /* _next_item on <var8:nullable HashNode[nullable Object]> */
442 }
443 var9 = self->attrs[COLOR_core__hash_collection__HashCollection___last_item].val; /* _last_item on <self:HashCollection[nullable Object]> */
444 var_node->attrs[COLOR_core__hash_collection__HashNode___prev_item].val = var9; /* _prev_item on <var_node:HashNode[nullable Object]> */
445 var_node->attrs[COLOR_core__hash_collection__HashNode___next_item].val = ((val*)NULL); /* _next_item on <var_node:HashNode[nullable Object]> */
446 self->attrs[COLOR_core__hash_collection__HashCollection___last_item].val = var_node; /* _last_item on <self:HashCollection[nullable Object]> */
447 var10 = self->attrs[COLOR_core__hash_collection__HashCollection___array].val; /* _array on <self:HashCollection[nullable Object]> */
448 if (unlikely(var10 == NULL)) {
449 if(catchStack.cursor >= 0){
450 longjmp(catchStack.envs[catchStack.cursor], 1);
451 }
452 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
453 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 97);
454 fatal_exit(1);
455 }
456 {
457 { /* Inline array$NativeArray$[] (var10,var_index) on <var10:NativeArray[nullable HashNode[nullable Object]]> */
458 var13 = ((struct instance_core__NativeArray*)var10)->values[var_index];
459 var11 = var13;
460 goto RET_LABEL12;
461 RET_LABEL12:(void)0;
462 }
463 }
464 var_next = var11;
465 var14 = self->attrs[COLOR_core__hash_collection__HashCollection___array].val; /* _array on <self:HashCollection[nullable Object]> */
466 if (unlikely(var14 == NULL)) {
467 if(catchStack.cursor >= 0){
468 longjmp(catchStack.envs[catchStack.cursor], 1);
469 }
470 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
471 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 98);
472 fatal_exit(1);
473 }
474 {
475 { /* Inline array$NativeArray$[]= (var14,var_index,var_node) on <var14:NativeArray[nullable HashNode[nullable Object]]> */
476 /* Covariant cast for argument 1 (item) <var_node:HashNode[nullable Object]> isa E */
477 /* <var_node:HashNode[nullable Object]> isa E */
478 type_struct19 = var14->type->resolution_table->types[COLOR_core__NativeArray___35dE];
479 cltype17 = type_struct19->color;
480 idtype18 = type_struct19->id;
481 if(cltype17 >= var_node->type->table_size) {
482 var16 = 0;
483 } else {
484 var16 = var_node->type->type_table[cltype17] == idtype18;
485 }
486 if (unlikely(!var16)) {
487 var_class_name20 = var_node == NULL ? "null" : var_node->type->name;
488 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name20);
489 PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 991);
490 fatal_exit(1);
491 }
492 ((struct instance_core__NativeArray*)var14)->values[var_index]=var_node;
493 RET_LABEL15:(void)0;
494 }
495 }
496 var_node->attrs[COLOR_core__hash_collection__HashNode___next_in_bucklet].val = var_next; /* _next_in_bucklet on <var_node:HashNode[nullable Object]> */
497 if (var_next == NULL) {
498 var21 = 0; /* is null */
499 } else {
500 var21 = 1; /* arg is null and recv is not */
501 }
502 if (0) {
503 { /* Inline kernel$Object$!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
504 var_other24 = ((val*)NULL);
505 {
506 var25 = ((short int(*)(val* self, val* p0))(var_next->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_next, var_other24); /* == on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
507 }
508 var26 = !var25;
509 var22 = var26;
510 goto RET_LABEL23;
511 RET_LABEL23:(void)0;
512 }
513 var21 = var22;
514 }
515 if (var21){
516 var_next->attrs[COLOR_core__hash_collection__HashNode___prev_in_bucklet].val = var_node; /* _prev_in_bucklet on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])> */
517 } else {
518 }
519 var27 = var_node->attrs[COLOR_core__hash_collection__HashNode___key].val; /* _key on <var_node:HashNode[nullable Object]> */
520 self->attrs[COLOR_core__hash_collection__HashCollection___last_accessed_key].val = var27; /* _last_accessed_key on <self:HashCollection[nullable Object]> */
521 self->attrs[COLOR_core__hash_collection__HashCollection___last_accessed_node].val = var_node; /* _last_accessed_node on <self:HashCollection[nullable Object]> */
522 var28 = self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashCollection[nullable Object]> */
523 var_l = var28;
524 {
525 { /* Inline kernel$Int$+ (var_l,1l) on <var_l:Int> */
526 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
527 /* <1l:Int> isa OTHER */
528 var31 = 1; /* easy <1l:Int> isa OTHER*/
529 if (unlikely(!var31)) {
530 var_class_name34 = type_core__Int.name;
531 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name34);
532 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728);
533 fatal_exit(1);
534 }
535 var35 = var_l + 1l;
536 var29 = var35;
537 goto RET_LABEL30;
538 RET_LABEL30:(void)0;
539 }
540 }
541 self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l = var29; /* _the_length on <self:HashCollection[nullable Object]> */
542 {
543 { /* Inline kernel$Int$+ (var_l,5l) on <var_l:Int> */
544 /* Covariant cast for argument 0 (i) <5l:Int> isa OTHER */
545 /* <5l:Int> isa OTHER */
546 var38 = 1; /* easy <5l:Int> isa OTHER*/
547 if (unlikely(!var38)) {
548 var_class_name41 = type_core__Int.name;
549 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name41);
550 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728);
551 fatal_exit(1);
552 }
553 var42 = var_l + 5l;
554 var36 = var42;
555 goto RET_LABEL37;
556 RET_LABEL37:(void)0;
557 }
558 }
559 {
560 { /* Inline kernel$Int$* (var36,2l) on <var36:Int> */
561 /* Covariant cast for argument 0 (i) <2l:Int> isa OTHER */
562 /* <2l:Int> isa OTHER */
563 var45 = 1; /* easy <2l:Int> isa OTHER*/
564 if (unlikely(!var45)) {
565 var_class_name48 = type_core__Int.name;
566 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name48);
567 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 732);
568 fatal_exit(1);
569 }
570 var49 = var36 * 2l;
571 var43 = var49;
572 goto RET_LABEL44;
573 RET_LABEL44:(void)0;
574 }
575 }
576 {
577 { /* Inline kernel$Int$+ (var43,1l) on <var43:Int> */
578 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
579 /* <1l:Int> isa OTHER */
580 var52 = 1; /* easy <1l:Int> isa OTHER*/
581 if (unlikely(!var52)) {
582 var_class_name55 = type_core__Int.name;
583 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name55);
584 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728);
585 fatal_exit(1);
586 }
587 var56 = var43 + 1l;
588 var50 = var56;
589 goto RET_LABEL51;
590 RET_LABEL51:(void)0;
591 }
592 }
593 var_l = var50;
594 var57 = self->attrs[COLOR_core__hash_collection__HashCollection___capacity].l; /* _capacity on <self:HashCollection[nullable Object]> */
595 {
596 { /* Inline kernel$Int$>= (var_l,var57) on <var_l:Int> */
597 /* Covariant cast for argument 0 (i) <var57:Int> isa OTHER */
598 /* <var57:Int> isa OTHER */
599 var60 = 1; /* easy <var57:Int> isa OTHER*/
600 if (unlikely(!var60)) {
601 var_class_name63 = type_core__Int.name;
602 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name63);
603 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726);
604 fatal_exit(1);
605 }
606 var64 = var_l >= var57;
607 var58 = var64;
608 goto RET_LABEL59;
609 RET_LABEL59:(void)0;
610 }
611 }
612 if (var58){
613 {
614 { /* Inline kernel$Int$* (var_l,3l) on <var_l:Int> */
615 /* Covariant cast for argument 0 (i) <3l:Int> isa OTHER */
616 /* <3l:Int> isa OTHER */
617 var67 = 1; /* easy <3l:Int> isa OTHER*/
618 if (unlikely(!var67)) {
619 var_class_name70 = type_core__Int.name;
620 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name70);
621 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 732);
622 fatal_exit(1);
623 }
624 var71 = var_l * 3l;
625 var65 = var71;
626 goto RET_LABEL66;
627 RET_LABEL66:(void)0;
628 }
629 }
630 {
631 { /* Inline kernel$Int$/ (var65,2l) on <var65:Int> */
632 /* Covariant cast for argument 0 (i) <2l:Int> isa OTHER */
633 /* <2l:Int> isa OTHER */
634 var74 = 1; /* easy <2l:Int> isa OTHER*/
635 if (unlikely(!var74)) {
636 var_class_name77 = type_core__Int.name;
637 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name77);
638 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 733);
639 fatal_exit(1);
640 }
641 var78 = var65 / 2l;
642 var72 = var78;
643 goto RET_LABEL73;
644 RET_LABEL73:(void)0;
645 }
646 }
647 {
648 { /* Inline kernel$Int$+ (var72,1l) on <var72:Int> */
649 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
650 /* <1l:Int> isa OTHER */
651 var81 = 1; /* easy <1l:Int> isa OTHER*/
652 if (unlikely(!var81)) {
653 var_class_name84 = type_core__Int.name;
654 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name84);
655 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728);
656 fatal_exit(1);
657 }
658 var85 = var72 + 1l;
659 var79 = var85;
660 goto RET_LABEL80;
661 RET_LABEL80:(void)0;
662 }
663 }
664 {
665 core__hash_collection___core__hash_collection__HashCollection___enlarge(self, var79); /* Direct call hash_collection$HashCollection$enlarge on <self:HashCollection[nullable Object]>*/
666 }
667 } else {
668 }
669 RET_LABEL:;
670 }
671 /* method hash_collection$HashCollection$remove_node for (self: HashCollection[nullable Object], nullable Object) */
672 void core__hash_collection___core__hash_collection__HashCollection___remove_node(val* self, val* p0) {
673 val* var_k /* var k: nullable Object */;
674 long var /* : Int */;
675 short int var1 /* : Bool */;
676 short int var3 /* : Bool */;
677 long var4 /* : Int */;
678 long var_i /* var i: Int */;
679 val* var5 /* : nullable HashNode[nullable Object] */;
680 val* var_node /* var node: nullable HashNode[nullable Object] */;
681 short int var6 /* : Bool */;
682 short int var7 /* : Bool */;
683 val* var_other /* var other: nullable Object */;
684 short int var9 /* : Bool */;
685 short int var11 /* : Bool */;
686 val* var12 /* : nullable HashNode[nullable Object] */;
687 val* var_prev /* var prev: nullable HashNode[nullable Object] */;
688 val* var13 /* : nullable HashNode[nullable Object] */;
689 val* var_next /* var next: nullable HashNode[nullable Object] */;
690 short int var14 /* : Bool */;
691 short int var15 /* : Bool */;
692 val* var_other17 /* var other: nullable Object */;
693 short int var18 /* : Bool */;
694 short int var19 /* : Bool */;
695 short int var20 /* : Bool */;
696 int cltype;
697 int idtype;
698 const struct type* type_struct;
699 const char* var_class_name;
700 short int var21 /* : Bool */;
701 short int var22 /* : Bool */;
702 short int var24 /* : Bool */;
703 short int var25 /* : Bool */;
704 short int var26 /* : Bool */;
705 int cltype27;
706 int idtype28;
707 const struct type* type_struct29;
708 const char* var_class_name30;
709 val* var_ /* var : HashCollection[nullable Object] */;
710 long var31 /* : Int */;
711 long var32 /* : Int */;
712 short int var34 /* : Bool */;
713 int cltype35;
714 int idtype36;
715 const char* var_class_name37;
716 long var38 /* : Int */;
717 val* var39 /* : nullable HashNode[nullable Object] */;
718 val* var40 /* : nullable HashNode[nullable Object] */;
719 short int var41 /* : Bool */;
720 short int var42 /* : Bool */;
721 short int var44 /* : Bool */;
722 short int var45 /* : Bool */;
723 val* var46 /* : NativeArray[nullable HashNode[nullable Object]] */;
724 short int var47 /* : Bool */;
725 int cltype48;
726 int idtype49;
727 const struct type* type_struct50;
728 const char* var_class_name51;
729 short int var53 /* : Bool */;
730 int cltype54;
731 int idtype55;
732 const struct type* type_struct56;
733 short int is_nullable;
734 const char* var_class_name57;
735 short int var58 /* : Bool */;
736 short int var59 /* : Bool */;
737 short int var61 /* : Bool */;
738 short int var62 /* : Bool */;
739 var_k = p0;
740 var = self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashCollection[nullable Object]> */
741 {
742 { /* Inline kernel$Int$== (var,0l) on <var:Int> */
743 var3 = var == 0l;
744 var1 = var3;
745 goto RET_LABEL2;
746 RET_LABEL2:(void)0;
747 }
748 }
749 if (var1){
750 goto RET_LABEL;
751 } else {
752 }
753 {
754 var4 = core__hash_collection___core__hash_collection__HashCollection___index_at(self, var_k);
755 }
756 var_i = var4;
757 {
758 var5 = core__hash_collection___core__hash_collection__HashCollection___node_at_idx(self, var_i, var_k);
759 }
760 var_node = var5;
761 if (var_node == NULL) {
762 var6 = 1; /* is null */
763 } else {
764 var6 = 0; /* arg is null but recv is not */
765 }
766 if (0) {
767 { /* Inline kernel$Object$== (var_node,((val*)NULL)) on <var_node:nullable HashNode[nullable Object]> */
768 var_other = ((val*)NULL);
769 {
770 { /* Inline kernel$Object$is_same_instance (var_node,var_other) on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
771 var11 = var_node == var_other;
772 var9 = var11;
773 goto RET_LABEL10;
774 RET_LABEL10:(void)0;
775 }
776 }
777 var7 = var9;
778 goto RET_LABEL8;
779 RET_LABEL8:(void)0;
780 }
781 var6 = var7;
782 }
783 if (var6){
784 goto RET_LABEL;
785 } else {
786 }
787 var12 = var_node->attrs[COLOR_core__hash_collection__HashNode___prev_item].val; /* _prev_item on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
788 var_prev = var12;
789 var13 = var_node->attrs[COLOR_core__hash_collection__HashNode___next_item].val; /* _next_item on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
790 var_next = var13;
791 if (var_prev == NULL) {
792 var14 = 0; /* is null */
793 } else {
794 var14 = 1; /* arg is null and recv is not */
795 }
796 if (0) {
797 { /* Inline kernel$Object$!= (var_prev,((val*)NULL)) on <var_prev:nullable HashNode[nullable Object]> */
798 var_other17 = ((val*)NULL);
799 {
800 var18 = ((short int(*)(val* self, val* p0))(var_prev->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_prev, var_other17); /* == on <var_prev:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
801 }
802 var19 = !var18;
803 var15 = var19;
804 goto RET_LABEL16;
805 RET_LABEL16:(void)0;
806 }
807 var14 = var15;
808 }
809 if (var14){
810 var_prev->attrs[COLOR_core__hash_collection__HashNode___next_item].val = var_next; /* _next_item on <var_prev:nullable HashNode[nullable Object](HashNode[nullable Object])> */
811 } else {
812 /* <var_next:nullable HashNode[nullable Object]> isa nullable N */
813 type_struct = self->type->resolution_table->types[COLOR_nullable__core__hash_collection__HashCollection__N];
814 cltype = type_struct->color;
815 idtype = type_struct->id;
816 if(var_next == NULL) {
817 var20 = 1;
818 } else {
819 if(cltype >= var_next->type->table_size) {
820 var20 = 0;
821 } else {
822 var20 = var_next->type->type_table[cltype] == idtype;
823 }
824 }
825 if (unlikely(!var20)) {
826 var_class_name = var_next == NULL ? "null" : var_next->type->name;
827 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name);
828 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 132);
829 fatal_exit(1);
830 }
831 self->attrs[COLOR_core__hash_collection__HashCollection___first_item].val = var_next; /* _first_item on <self:HashCollection[nullable Object]> */
832 }
833 if (var_next == NULL) {
834 var21 = 0; /* is null */
835 } else {
836 var21 = 1; /* arg is null and recv is not */
837 }
838 if (0) {
839 { /* Inline kernel$Object$!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
840 var_other17 = ((val*)NULL);
841 {
842 var24 = ((short int(*)(val* self, val* p0))(var_next->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_next, var_other17); /* == on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
843 }
844 var25 = !var24;
845 var22 = var25;
846 goto RET_LABEL23;
847 RET_LABEL23:(void)0;
848 }
849 var21 = var22;
850 }
851 if (var21){
852 var_next->attrs[COLOR_core__hash_collection__HashNode___prev_item].val = var_prev; /* _prev_item on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])> */
853 } else {
854 /* <var_prev:nullable HashNode[nullable Object]> isa nullable N */
855 type_struct29 = self->type->resolution_table->types[COLOR_nullable__core__hash_collection__HashCollection__N];
856 cltype27 = type_struct29->color;
857 idtype28 = type_struct29->id;
858 if(var_prev == NULL) {
859 var26 = 1;
860 } else {
861 if(cltype27 >= var_prev->type->table_size) {
862 var26 = 0;
863 } else {
864 var26 = var_prev->type->type_table[cltype27] == idtype28;
865 }
866 }
867 if (unlikely(!var26)) {
868 var_class_name30 = var_prev == NULL ? "null" : var_prev->type->name;
869 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name30);
870 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 137);
871 fatal_exit(1);
872 }
873 self->attrs[COLOR_core__hash_collection__HashCollection___last_item].val = var_prev; /* _last_item on <self:HashCollection[nullable Object]> */
874 }
875 var_ = self;
876 var31 = var_->attrs[COLOR_core__hash_collection__HashCollection___the_length].l; /* _the_length on <var_:HashCollection[nullable Object]> */
877 {
878 { /* Inline kernel$Int$- (var31,1l) on <var31:Int> */
879 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
880 /* <1l:Int> isa OTHER */
881 var34 = 1; /* easy <1l:Int> isa OTHER*/
882 if (unlikely(!var34)) {
883 var_class_name37 = type_core__Int.name;
884 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name37);
885 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731);
886 fatal_exit(1);
887 }
888 var38 = var31 - 1l;
889 var32 = var38;
890 goto RET_LABEL33;
891 RET_LABEL33:(void)0;
892 }
893 }
894 var_->attrs[COLOR_core__hash_collection__HashCollection___the_length].l = var32; /* _the_length on <var_:HashCollection[nullable Object]> */
895 var39 = var_node->attrs[COLOR_core__hash_collection__HashNode___prev_in_bucklet].val; /* _prev_in_bucklet on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
896 var_prev = var39;
897 var40 = var_node->attrs[COLOR_core__hash_collection__HashNode___next_in_bucklet].val; /* _next_in_bucklet on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
898 var_next = var40;
899 if (var_prev == NULL) {
900 var41 = 0; /* is null */
901 } else {
902 var41 = 1; /* arg is null and recv is not */
903 }
904 if (0) {
905 { /* Inline kernel$Object$!= (var_prev,((val*)NULL)) on <var_prev:nullable HashNode[nullable Object]> */
906 var_other17 = ((val*)NULL);
907 {
908 var44 = ((short int(*)(val* self, val* p0))(var_prev->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_prev, var_other17); /* == on <var_prev:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
909 }
910 var45 = !var44;
911 var42 = var45;
912 goto RET_LABEL43;
913 RET_LABEL43:(void)0;
914 }
915 var41 = var42;
916 }
917 if (var41){
918 var_prev->attrs[COLOR_core__hash_collection__HashNode___next_in_bucklet].val = var_next; /* _next_in_bucklet on <var_prev:nullable HashNode[nullable Object](HashNode[nullable Object])> */
919 } else {
920 var46 = self->attrs[COLOR_core__hash_collection__HashCollection___array].val; /* _array on <self:HashCollection[nullable Object]> */
921 if (unlikely(var46 == NULL)) {
922 if(catchStack.cursor >= 0){
923 longjmp(catchStack.envs[catchStack.cursor], 1);
924 }
925 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
926 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 147);
927 fatal_exit(1);
928 }
929 /* <var_next:nullable HashNode[nullable Object]> isa nullable N */
930 type_struct50 = self->type->resolution_table->types[COLOR_nullable__core__hash_collection__HashCollection__N];
931 cltype48 = type_struct50->color;
932 idtype49 = type_struct50->id;
933 if(var_next == NULL) {
934 var47 = 1;
935 } else {
936 if(cltype48 >= var_next->type->table_size) {
937 var47 = 0;
938 } else {
939 var47 = var_next->type->type_table[cltype48] == idtype49;
940 }
941 }
942 if (unlikely(!var47)) {
943 var_class_name51 = var_next == NULL ? "null" : var_next->type->name;
944 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name51);
945 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 147);
946 fatal_exit(1);
947 }
948 {
949 { /* Inline array$NativeArray$[]= (var46,var_i,var_next) on <var46:NativeArray[nullable HashNode[nullable Object]]> */
950 /* Covariant cast for argument 1 (item) <var_next:nullable HashNode[nullable Object]> isa E */
951 /* <var_next:nullable HashNode[nullable Object]> isa E */
952 type_struct56 = var46->type->resolution_table->types[COLOR_core__NativeArray___35dE];
953 cltype54 = type_struct56->color;
954 idtype55 = type_struct56->id;
955 is_nullable = type_struct56->is_nullable;
956 if(var_next == NULL) {
957 var53 = is_nullable;
958 } else {
959 if(cltype54 >= var_next->type->table_size) {
960 var53 = 0;
961 } else {
962 var53 = var_next->type->type_table[cltype54] == idtype55;
963 }
964 }
965 if (unlikely(!var53)) {
966 var_class_name57 = var_next == NULL ? "null" : var_next->type->name;
967 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name57);
968 PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 991);
969 fatal_exit(1);
970 }
971 ((struct instance_core__NativeArray*)var46)->values[var_i]=var_next;
972 RET_LABEL52:(void)0;
973 }
974 }
975 }
976 if (var_next == NULL) {
977 var58 = 0; /* is null */
978 } else {
979 var58 = 1; /* arg is null and recv is not */
980 }
981 if (0) {
982 { /* Inline kernel$Object$!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
983 var_other17 = ((val*)NULL);
984 {
985 var61 = ((short int(*)(val* self, val* p0))(var_next->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_next, var_other17); /* == on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
986 }
987 var62 = !var61;
988 var59 = var62;
989 goto RET_LABEL60;
990 RET_LABEL60:(void)0;
991 }
992 var58 = var59;
993 }
994 if (var58){
995 var_next->attrs[COLOR_core__hash_collection__HashNode___prev_in_bucklet].val = var_prev; /* _prev_in_bucklet on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])> */
996 } else {
997 }
998 self->attrs[COLOR_core__hash_collection__HashCollection___last_accessed_key].val = ((val*)NULL); /* _last_accessed_key on <self:HashCollection[nullable Object]> */
999 RET_LABEL:;
1000 }
1001 /* method hash_collection$HashCollection$raz for (self: HashCollection[nullable Object]) */
1002 void core__hash_collection___core__hash_collection__HashCollection___raz(val* self) {
1003 long var /* : Int */;
1004 long var1 /* : Int */;
1005 short int var3 /* : Bool */;
1006 int cltype;
1007 int idtype;
1008 const char* var_class_name;
1009 long var4 /* : Int */;
1010 long var_i /* var i: Int */;
1011 short int var5 /* : Bool */;
1012 short int var7 /* : Bool */;
1013 int cltype8;
1014 int idtype9;
1015 const char* var_class_name10;
1016 short int var11 /* : Bool */;
1017 val* var12 /* : NativeArray[nullable HashNode[nullable Object]] */;
1018 short int var14 /* : Bool */;
1019 int cltype15;
1020 int idtype16;
1021 const struct type* type_struct;
1022 short int is_nullable;
1023 const char* var_class_name17;
1024 long var18 /* : Int */;
1025 short int var20 /* : Bool */;
1026 int cltype21;
1027 int idtype22;
1028 const char* var_class_name23;
1029 long var24 /* : Int */;
1030 var = self->attrs[COLOR_core__hash_collection__HashCollection___capacity].l; /* _capacity on <self:HashCollection[nullable Object]> */
1031 {
1032 { /* Inline kernel$Int$- (var,1l) on <var:Int> */
1033 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1034 /* <1l:Int> isa OTHER */
1035 var3 = 1; /* easy <1l:Int> isa OTHER*/
1036 if (unlikely(!var3)) {
1037 var_class_name = type_core__Int.name;
1038 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name);
1039 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731);
1040 fatal_exit(1);
1041 }
1042 var4 = var - 1l;
1043 var1 = var4;
1044 goto RET_LABEL2;
1045 RET_LABEL2:(void)0;
1046 }
1047 }
1048 var_i = var1;
1049 for(;;) {
1050 {
1051 { /* Inline kernel$Int$>= (var_i,0l) on <var_i:Int> */
1052 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
1053 /* <0l:Int> isa OTHER */
1054 var7 = 1; /* easy <0l:Int> isa OTHER*/
1055 if (unlikely(!var7)) {
1056 var_class_name10 = type_core__Int.name;
1057 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name10);
1058 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726);
1059 fatal_exit(1);
1060 }
1061 var11 = var_i >= 0l;
1062 var5 = var11;
1063 goto RET_LABEL6;
1064 RET_LABEL6:(void)0;
1065 }
1066 }
1067 if (var5){
1068 var12 = self->attrs[COLOR_core__hash_collection__HashCollection___array].val; /* _array on <self:HashCollection[nullable Object]> */
1069 if (unlikely(var12 == NULL)) {
1070 if(catchStack.cursor >= 0){
1071 longjmp(catchStack.envs[catchStack.cursor], 1);
1072 }
1073 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array");
1074 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 161);
1075 fatal_exit(1);
1076 }
1077 {
1078 { /* Inline array$NativeArray$[]= (var12,var_i,((val*)NULL)) on <var12:NativeArray[nullable HashNode[nullable Object]]> */
1079 /* Covariant cast for argument 1 (item) <((val*)NULL):null> isa E */
1080 /* <((val*)NULL):null> isa E */
1081 type_struct = var12->type->resolution_table->types[COLOR_core__NativeArray___35dE];
1082 cltype15 = type_struct->color;
1083 idtype16 = type_struct->id;
1084 is_nullable = type_struct->is_nullable;
1085 if(((val*)NULL) == NULL) {
1086 var14 = is_nullable;
1087 } else {
1088 if(cltype15 >= ((val*)NULL)->type->table_size) {
1089 var14 = 0;
1090 } else {
1091 var14 = ((val*)NULL)->type->type_table[cltype15] == idtype16;
1092 }
1093 }
1094 if (unlikely(!var14)) {
1095 var_class_name17 = ((val*)NULL) == NULL ? "null" : ((val*)NULL)->type->name;
1096 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name17);
1097 PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 991);
1098 fatal_exit(1);
1099 }
1100 ((struct instance_core__NativeArray*)var12)->values[var_i]=((val*)NULL);
1101 RET_LABEL13:(void)0;
1102 }
1103 }
1104 {
1105 { /* Inline kernel$Int$- (var_i,1l) on <var_i:Int> */
1106 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1107 /* <1l:Int> isa OTHER */
1108 var20 = 1; /* easy <1l:Int> isa OTHER*/
1109 if (unlikely(!var20)) {
1110 var_class_name23 = type_core__Int.name;
1111 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name23);
1112 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731);
1113 fatal_exit(1);
1114 }
1115 var24 = var_i - 1l;
1116 var18 = var24;
1117 goto RET_LABEL19;
1118 RET_LABEL19:(void)0;
1119 }
1120 }
1121 var_i = var18;
1122 } else {
1123 goto BREAK_label;
1124 }
1125 }
1126 BREAK_label: (void)0;
1127 self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l = 0l; /* _the_length on <self:HashCollection[nullable Object]> */
1128 self->attrs[COLOR_core__hash_collection__HashCollection___first_item].val = ((val*)NULL); /* _first_item on <self:HashCollection[nullable Object]> */
1129 self->attrs[COLOR_core__hash_collection__HashCollection___last_item].val = ((val*)NULL); /* _last_item on <self:HashCollection[nullable Object]> */
1130 self->attrs[COLOR_core__hash_collection__HashCollection___last_accessed_key].val = ((val*)NULL); /* _last_accessed_key on <self:HashCollection[nullable Object]> */
1131 RET_LABEL:;
1132 }
1133 /* method hash_collection$HashCollection$enlarge for (self: HashCollection[nullable Object], Int) */
1134 void core__hash_collection___core__hash_collection__HashCollection___enlarge(val* self, long p0) {
1135 long var_cap /* var cap: Int */;
1136 long var /* : Int */;
1137 long var1 /* : Int */;
1138 short int var3 /* : Bool */;
1139 int cltype;
1140 int idtype;
1141 const char* var_class_name;
1142 long var4 /* : Int */;
1143 short int var5 /* : Bool */;
1144 short int var7 /* : Bool */;
1145 int cltype8;
1146 int idtype9;
1147 const char* var_class_name10;
1148 short int var11 /* : Bool */;
1149 long var12 /* : Int */;
1150 long var13 /* : Int */;
1151 short int var15 /* : Bool */;
1152 int cltype16;
1153 int idtype17;
1154 const char* var_class_name18;
1155 long var19 /* : Int */;
1156 long var20 /* : Int */;
1157 short int var21 /* : Bool */;
1158 short int var23 /* : Bool */;
1159 int cltype24;
1160 int idtype25;
1161 const char* var_class_name26;
1162 short int var27 /* : Bool */;
1163 val* var28 /* : NativeArray[nullable HashNode[nullable Object]] */;
1164 val* var_new_array /* var new_array: NativeArray[nullable HashNode[nullable Object]] */;
1165 val* var29 /* : nullable HashNode[nullable Object] */;
1166 val* var_node /* var node: nullable HashNode[nullable Object] */;
1167 short int var30 /* : Bool */;
1168 short int var31 /* : Bool */;
1169 val* var_other /* var other: nullable Object */;
1170 short int var33 /* : Bool */;
1171 short int var34 /* : Bool */;
1172 val* var35 /* : nullable Object */;
1173 long var36 /* : Int */;
1174 long var_index /* var index: Int */;
1175 val* var37 /* : nullable Object */;
1176 val* var39 /* : Object */;
1177 val* var_next /* var next: nullable HashNode[nullable Object] */;
1178 short int var41 /* : Bool */;
1179 int cltype42;
1180 int idtype43;
1181 const struct type* type_struct;
1182 const char* var_class_name44;
1183 short int var45 /* : Bool */;
1184 short int var46 /* : Bool */;
1185 short int var48 /* : Bool */;
1186 short int var49 /* : Bool */;
1187 val* var50 /* : nullable HashNode[nullable Object] */;
1188 short int var51 /* : Bool */;
1189 int cltype52;
1190 int idtype53;
1191 const struct type* type_struct54;
1192 const char* var_class_name55;
1193 var_cap = p0;
1194 var = self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashCollection[nullable Object]> */
1195 {
1196 { /* Inline kernel$Int$+ (var,1l) on <var:Int> */
1197 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1198 /* <1l:Int> isa OTHER */
1199 var3 = 1; /* easy <1l:Int> isa OTHER*/
1200 if (unlikely(!var3)) {
1201 var_class_name = type_core__Int.name;
1202 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name);
1203 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728);
1204 fatal_exit(1);
1205 }
1206 var4 = var + 1l;
1207 var1 = var4;
1208 goto RET_LABEL2;
1209 RET_LABEL2:(void)0;
1210 }
1211 }
1212 {
1213 { /* Inline kernel$Int$< (var_cap,var1) on <var_cap:Int> */
1214 /* Covariant cast for argument 0 (i) <var1:Int> isa OTHER */
1215 /* <var1:Int> isa OTHER */
1216 var7 = 1; /* easy <var1:Int> isa OTHER*/
1217 if (unlikely(!var7)) {
1218 var_class_name10 = type_core__Int.name;
1219 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name10);
1220 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725);
1221 fatal_exit(1);
1222 }
1223 var11 = var_cap < var1;
1224 var5 = var11;
1225 goto RET_LABEL6;
1226 RET_LABEL6:(void)0;
1227 }
1228 }
1229 if (var5){
1230 var12 = self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashCollection[nullable Object]> */
1231 {
1232 { /* Inline kernel$Int$+ (var12,1l) on <var12:Int> */
1233 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1234 /* <1l:Int> isa OTHER */
1235 var15 = 1; /* easy <1l:Int> isa OTHER*/
1236 if (unlikely(!var15)) {
1237 var_class_name18 = type_core__Int.name;
1238 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name18);
1239 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728);
1240 fatal_exit(1);
1241 }
1242 var19 = var12 + 1l;
1243 var13 = var19;
1244 goto RET_LABEL14;
1245 RET_LABEL14:(void)0;
1246 }
1247 }
1248 var_cap = var13;
1249 } else {
1250 }
1251 var20 = self->attrs[COLOR_core__hash_collection__HashCollection___capacity].l; /* _capacity on <self:HashCollection[nullable Object]> */
1252 {
1253 { /* Inline kernel$Int$<= (var_cap,var20) on <var_cap:Int> */
1254 /* Covariant cast for argument 0 (i) <var20:Int> isa OTHER */
1255 /* <var20:Int> isa OTHER */
1256 var23 = 1; /* easy <var20:Int> isa OTHER*/
1257 if (unlikely(!var23)) {
1258 var_class_name26 = type_core__Int.name;
1259 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name26);
1260 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 724);
1261 fatal_exit(1);
1262 }
1263 var27 = var_cap <= var20;
1264 var21 = var27;
1265 goto RET_LABEL22;
1266 RET_LABEL22:(void)0;
1267 }
1268 }
1269 if (var21){
1270 goto RET_LABEL;
1271 } else {
1272 }
1273 self->attrs[COLOR_core__hash_collection__HashCollection___capacity].l = var_cap; /* _capacity on <self:HashCollection[nullable Object]> */
1274 self->attrs[COLOR_core__hash_collection__HashCollection___last_accessed_key].val = ((val*)NULL); /* _last_accessed_key on <self:HashCollection[nullable Object]> */
1275 var28 = NEW_core__NativeArray((int)var_cap, self->type->resolution_table->types[COLOR_core__NativeArray__nullable__core__hash_collection__HashCollection__N]);
1276 var_new_array = var28;
1277 self->attrs[COLOR_core__hash_collection__HashCollection___array].val = var_new_array; /* _array on <self:HashCollection[nullable Object]> */
1278 var29 = self->attrs[COLOR_core__hash_collection__HashCollection___first_item].val; /* _first_item on <self:HashCollection[nullable Object]> */
1279 var_node = var29;
1280 for(;;) {
1281 if (var_node == NULL) {
1282 var30 = 0; /* is null */
1283 } else {
1284 var30 = 1; /* arg is null and recv is not */
1285 }
1286 if (0) {
1287 { /* Inline kernel$Object$!= (var_node,((val*)NULL)) on <var_node:nullable HashNode[nullable Object]> */
1288 var_other = ((val*)NULL);
1289 {
1290 var33 = ((short int(*)(val* self, val* p0))(var_node->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_node, var_other); /* == on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
1291 }
1292 var34 = !var33;
1293 var31 = var34;
1294 goto RET_LABEL32;
1295 RET_LABEL32:(void)0;
1296 }
1297 var30 = var31;
1298 }
1299 if (var30){
1300 var35 = var_node->attrs[COLOR_core__hash_collection__HashNode___key].val; /* _key on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1301 {
1302 var36 = core__hash_collection___core__hash_collection__HashCollection___index_at(self, var35);
1303 }
1304 var_index = var36;
1305 {
1306 { /* Inline array$NativeArray$[] (var_new_array,var_index) on <var_new_array:NativeArray[nullable HashNode[nullable Object]]> */
1307 var39 = ((struct instance_core__NativeArray*)var_new_array)->values[var_index];
1308 var37 = var39;
1309 goto RET_LABEL38;
1310 RET_LABEL38:(void)0;
1311 }
1312 }
1313 var_next = var37;
1314 {
1315 { /* Inline array$NativeArray$[]= (var_new_array,var_index,var_node) on <var_new_array:NativeArray[nullable HashNode[nullable Object]]> */
1316 /* Covariant cast for argument 1 (item) <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> isa E */
1317 /* <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> isa E */
1318 type_struct = var_new_array->type->resolution_table->types[COLOR_core__NativeArray___35dE];
1319 cltype42 = type_struct->color;
1320 idtype43 = type_struct->id;
1321 if(cltype42 >= var_node->type->table_size) {
1322 var41 = 0;
1323 } else {
1324 var41 = var_node->type->type_table[cltype42] == idtype43;
1325 }
1326 if (unlikely(!var41)) {
1327 var_class_name44 = var_node == NULL ? "null" : var_node->type->name;
1328 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name44);
1329 PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 991);
1330 fatal_exit(1);
1331 }
1332 ((struct instance_core__NativeArray*)var_new_array)->values[var_index]=var_node;
1333 RET_LABEL40:(void)0;
1334 }
1335 }
1336 var_node->attrs[COLOR_core__hash_collection__HashNode___prev_in_bucklet].val = ((val*)NULL); /* _prev_in_bucklet on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1337 var_node->attrs[COLOR_core__hash_collection__HashNode___next_in_bucklet].val = var_next; /* _next_in_bucklet on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1338 if (var_next == NULL) {
1339 var45 = 0; /* is null */
1340 } else {
1341 var45 = 1; /* arg is null and recv is not */
1342 }
1343 if (0) {
1344 { /* Inline kernel$Object$!= (var_next,((val*)NULL)) on <var_next:nullable HashNode[nullable Object]> */
1345 var_other = ((val*)NULL);
1346 {
1347 var48 = ((short int(*)(val* self, val* p0))(var_next->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_next, var_other); /* == on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])>*/
1348 }
1349 var49 = !var48;
1350 var46 = var49;
1351 goto RET_LABEL47;
1352 RET_LABEL47:(void)0;
1353 }
1354 var45 = var46;
1355 }
1356 if (var45){
1357 var_next->attrs[COLOR_core__hash_collection__HashNode___prev_in_bucklet].val = var_node; /* _prev_in_bucklet on <var_next:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1358 } else {
1359 }
1360 var50 = var_node->attrs[COLOR_core__hash_collection__HashNode___next_item].val; /* _next_item on <var_node:nullable HashNode[nullable Object](HashNode[nullable Object])> */
1361 /* <var50:nullable HashNode[nullable Object]> isa nullable N */
1362 type_struct54 = self->type->resolution_table->types[COLOR_nullable__core__hash_collection__HashCollection__N];
1363 cltype52 = type_struct54->color;
1364 idtype53 = type_struct54->id;
1365 if(var50 == NULL) {
1366 var51 = 1;
1367 } else {
1368 if(cltype52 >= var50->type->table_size) {
1369 var51 = 0;
1370 } else {
1371 var51 = var50->type->type_table[cltype52] == idtype53;
1372 }
1373 }
1374 if (unlikely(!var51)) {
1375 var_class_name55 = var50 == NULL ? "null" : var50->type->name;
1376 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name55);
1377 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 193);
1378 fatal_exit(1);
1379 }
1380 var_node = var50;
1381 } else {
1382 goto BREAK_label;
1383 }
1384 }
1385 BREAK_label: (void)0;
1386 RET_LABEL:;
1387 }
1388 /* method hash_collection$HashNode$key= for (self: HashNode[nullable Object], nullable Object) */
1389 void core__hash_collection___core__hash_collection__HashNode___key_61d(val* self, val* p0) {
1390 short int var /* : Bool */;
1391 int cltype;
1392 int idtype;
1393 const struct type* type_struct;
1394 short int is_nullable;
1395 const char* var_class_name;
1396 /* Covariant cast for argument 0 (key) <p0:nullable Object> isa K */
1397 /* <p0:nullable Object> isa K */
1398 type_struct = self->type->resolution_table->types[COLOR_core__hash_collection__HashNode___35dK];
1399 cltype = type_struct->color;
1400 idtype = type_struct->id;
1401 is_nullable = type_struct->is_nullable;
1402 if(p0 == NULL) {
1403 var = is_nullable;
1404 } else {
1405 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
1406 var = 0;
1407 } else {
1408 var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
1409 }
1410 }
1411 if (unlikely(!var)) {
1412 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
1413 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name);
1414 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 199);
1415 fatal_exit(1);
1416 }
1417 self->attrs[COLOR_core__hash_collection__HashNode___key].val = p0; /* _key on <self:HashNode[nullable Object]> */
1418 RET_LABEL:;
1419 }
1420 /* method hash_collection$HashNode$init for (self: HashNode[nullable Object]) */
1421 void core__hash_collection___core__hash_collection__HashNode___core__kernel__Object__init(val* self) {
1422 {
1423 ((void(*)(val* self))(self->class->vft[COLOR_core__hash_collection___core__hash_collection__HashNode___core__kernel__Object__init]))(self); /* init on <self:HashNode[nullable Object]>*/
1424 }
1425 RET_LABEL:;
1426 }
1427 /* method hash_collection$HashMap$[] for (self: HashMap[nullable Object, nullable Object], nullable Object): nullable Object */
1428 val* core___core__HashMap___core__abstract_collection__MapRead___91d_93d(val* self, val* p0) {
1429 val* var /* : nullable Object */;
1430 val* var_key /* var key: nullable Object */;
1431 val* var1 /* : nullable HashNode[nullable Object] */;
1432 val* var_c /* var c: nullable HashMapNode[nullable Object, nullable Object] */;
1433 short int var2 /* : Bool */;
1434 short int var3 /* : Bool */;
1435 val* var_other /* var other: nullable Object */;
1436 short int var5 /* : Bool */;
1437 short int var7 /* : Bool */;
1438 val* var8 /* : nullable Object */;
1439 val* var9 /* : nullable Object */;
1440 var_key = p0;
1441 {
1442 var1 = core__hash_collection___core__hash_collection__HashCollection___node_at(self, var_key);
1443 }
1444 var_c = var1;
1445 if (var_c == NULL) {
1446 var2 = 1; /* is null */
1447 } else {
1448 var2 = 0; /* arg is null but recv is not */
1449 }
1450 if (0) {
1451 { /* Inline kernel$Object$== (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
1452 var_other = ((val*)NULL);
1453 {
1454 { /* Inline kernel$Object$is_same_instance (var_c,var_other) on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1455 var7 = var_c == var_other;
1456 var5 = var7;
1457 goto RET_LABEL6;
1458 RET_LABEL6:(void)0;
1459 }
1460 }
1461 var3 = var5;
1462 goto RET_LABEL4;
1463 RET_LABEL4:(void)0;
1464 }
1465 var2 = var3;
1466 }
1467 if (var2){
1468 {
1469 var8 = ((val*(*)(val* self, val* p0))(self->class->vft[COLOR_core__abstract_collection__MapRead__provide_default_value]))(self, var_key); /* provide_default_value on <self:HashMap[nullable Object, nullable Object]>*/
1470 }
1471 var = var8;
1472 goto RET_LABEL;
1473 } else {
1474 var9 = var_c->attrs[COLOR_core__hash_collection__HashMapNode___value].val; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1475 var = var9;
1476 goto RET_LABEL;
1477 }
1478 RET_LABEL:;
1479 return var;
1480 }
1481 /* method hash_collection$HashMap$get_or_null for (self: HashMap[nullable Object, nullable Object], nullable Object): nullable Object */
1482 val* core___core__HashMap___core__abstract_collection__MapRead__get_or_null(val* self, val* p0) {
1483 val* var /* : nullable Object */;
1484 val* var_key /* var key: nullable Object */;
1485 val* var1 /* : nullable HashNode[nullable Object] */;
1486 val* var_c /* var c: nullable HashMapNode[nullable Object, nullable Object] */;
1487 short int var2 /* : Bool */;
1488 short int var3 /* : Bool */;
1489 val* var_other /* var other: nullable Object */;
1490 short int var5 /* : Bool */;
1491 short int var7 /* : Bool */;
1492 val* var8 /* : nullable Object */;
1493 var_key = p0;
1494 {
1495 var1 = core__hash_collection___core__hash_collection__HashCollection___node_at(self, var_key);
1496 }
1497 var_c = var1;
1498 if (var_c == NULL) {
1499 var2 = 1; /* is null */
1500 } else {
1501 var2 = 0; /* arg is null but recv is not */
1502 }
1503 if (0) {
1504 { /* Inline kernel$Object$== (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
1505 var_other = ((val*)NULL);
1506 {
1507 { /* Inline kernel$Object$is_same_instance (var_c,var_other) on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1508 var7 = var_c == var_other;
1509 var5 = var7;
1510 goto RET_LABEL6;
1511 RET_LABEL6:(void)0;
1512 }
1513 }
1514 var3 = var5;
1515 goto RET_LABEL4;
1516 RET_LABEL4:(void)0;
1517 }
1518 var2 = var3;
1519 }
1520 if (var2){
1521 var = ((val*)NULL);
1522 goto RET_LABEL;
1523 } else {
1524 var8 = var_c->attrs[COLOR_core__hash_collection__HashMapNode___value].val; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1525 var = var8;
1526 goto RET_LABEL;
1527 }
1528 RET_LABEL:;
1529 return var;
1530 }
1531 /* method hash_collection$HashMap$iterator for (self: HashMap[nullable Object, nullable Object]): MapIterator[nullable Object, nullable Object] */
1532 val* core___core__HashMap___core__abstract_collection__MapRead__iterator(val* self) {
1533 val* var /* : MapIterator[nullable Object, nullable Object] */;
1534 val* var1 /* : HashMapIterator[nullable Object, nullable Object] */;
1535 var1 = NEW_core__hash_collection__HashMapIterator(self->type->resolution_table->types[COLOR_core__hash_collection__HashMapIterator__core__HashMap___35dK__core__HashMap___35dV]);
1536 {
1537 ((void(*)(val* self, val* p0))(var1->class->vft[COLOR_core__hash_collection__HashMapIterator__map_61d]))(var1, self); /* map= on <var1:HashMapIterator[nullable Object, nullable Object]>*/
1538 }
1539 {
1540 ((void(*)(val* self))(var1->class->vft[COLOR_core__kernel__Object__init]))(var1); /* init on <var1:HashMapIterator[nullable Object, nullable Object]>*/
1541 }
1542 var = var1;
1543 goto RET_LABEL;
1544 RET_LABEL:;
1545 return var;
1546 }
1547 /* method hash_collection$HashMap$length for (self: HashMap[nullable Object, nullable Object]): Int */
1548 long core___core__HashMap___core__abstract_collection__MapRead__length(val* self) {
1549 long var /* : Int */;
1550 long var1 /* : Int */;
1551 var1 = self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashMap[nullable Object, nullable Object]> */
1552 var = var1;
1553 goto RET_LABEL;
1554 RET_LABEL:;
1555 return var;
1556 }
1557 /* method hash_collection$HashMap$is_empty for (self: HashMap[nullable Object, nullable Object]): Bool */
1558 short int core___core__HashMap___core__abstract_collection__MapRead__is_empty(val* self) {
1559 short int var /* : Bool */;
1560 long var1 /* : Int */;
1561 short int var2 /* : Bool */;
1562 short int var4 /* : Bool */;
1563 var1 = self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashMap[nullable Object, nullable Object]> */
1564 {
1565 { /* Inline kernel$Int$== (var1,0l) on <var1:Int> */
1566 var4 = var1 == 0l;
1567 var2 = var4;
1568 goto RET_LABEL3;
1569 RET_LABEL3:(void)0;
1570 }
1571 }
1572 var = var2;
1573 goto RET_LABEL;
1574 RET_LABEL:;
1575 return var;
1576 }
1577 /* method hash_collection$HashMap$[]= for (self: HashMap[nullable Object, nullable Object], nullable Object, nullable Object) */
1578 void core___core__HashMap___core__abstract_collection__Map___91d_93d_61d(val* self, val* p0, val* p1) {
1579 short int var /* : Bool */;
1580 int cltype;
1581 int idtype;
1582 const struct type* type_struct;
1583 short int is_nullable;
1584 const char* var_class_name;
1585 short int var1 /* : Bool */;
1586 int cltype2;
1587 int idtype3;
1588 const struct type* type_struct4;
1589 short int is_nullable5;
1590 const char* var_class_name6;
1591 val* var_key /* var key: nullable Object */;
1592 val* var_v /* var v: nullable Object */;
1593 long var7 /* : Int */;
1594 short int var8 /* : Bool */;
1595 short int var10 /* : Bool */;
1596 long var11 /* : Int */;
1597 long var_i /* var i: Int */;
1598 val* var12 /* : nullable HashNode[nullable Object] */;
1599 val* var_c /* var c: nullable HashMapNode[nullable Object, nullable Object] */;
1600 short int var13 /* : Bool */;
1601 short int var14 /* : Bool */;
1602 val* var_other /* var other: nullable Object */;
1603 short int var16 /* : Bool */;
1604 short int var17 /* : Bool */;
1605 val* var18 /* : HashMapNode[nullable Object, nullable Object] */;
1606 /* Covariant cast for argument 0 (key) <p0:nullable Object> isa K */
1607 /* <p0:nullable Object> isa K */
1608 type_struct = self->type->resolution_table->types[COLOR_core__HashMap___35dK];
1609 cltype = type_struct->color;
1610 idtype = type_struct->id;
1611 is_nullable = type_struct->is_nullable;
1612 if(p0 == NULL) {
1613 var = is_nullable;
1614 } else {
1615 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
1616 var = 0;
1617 } else {
1618 var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
1619 }
1620 }
1621 if (unlikely(!var)) {
1622 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
1623 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name);
1624 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 252);
1625 fatal_exit(1);
1626 }
1627 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa V */
1628 /* <p1:nullable Object> isa V */
1629 type_struct4 = self->type->resolution_table->types[COLOR_core__HashMap___35dV];
1630 cltype2 = type_struct4->color;
1631 idtype3 = type_struct4->id;
1632 is_nullable5 = type_struct4->is_nullable;
1633 if(p1 == NULL) {
1634 var1 = is_nullable5;
1635 } else {
1636 if(cltype2 >= (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->table_size) {
1637 var1 = 0;
1638 } else {
1639 var1 = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype2] == idtype3;
1640 }
1641 }
1642 if (unlikely(!var1)) {
1643 var_class_name6 = p1 == NULL ? "null" : (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->name;
1644 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name6);
1645 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 252);
1646 fatal_exit(1);
1647 }
1648 var_key = p0;
1649 var_v = p1;
1650 var7 = self->attrs[COLOR_core__hash_collection__HashCollection___capacity].l; /* _capacity on <self:HashMap[nullable Object, nullable Object]> */
1651 {
1652 { /* Inline kernel$Int$== (var7,0l) on <var7:Int> */
1653 var10 = var7 == 0l;
1654 var8 = var10;
1655 goto RET_LABEL9;
1656 RET_LABEL9:(void)0;
1657 }
1658 }
1659 if (var8){
1660 {
1661 core__hash_collection___core__hash_collection__HashCollection___enlarge(self, 17l); /* Direct call hash_collection$HashCollection$enlarge on <self:HashMap[nullable Object, nullable Object]>*/
1662 }
1663 } else {
1664 }
1665 {
1666 var11 = core__hash_collection___core__hash_collection__HashCollection___index_at(self, var_key);
1667 }
1668 var_i = var11;
1669 {
1670 var12 = core__hash_collection___core__hash_collection__HashCollection___node_at_idx(self, var_i, var_key);
1671 }
1672 var_c = var12;
1673 if (var_c == NULL) {
1674 var13 = 0; /* is null */
1675 } else {
1676 var13 = 1; /* arg is null and recv is not */
1677 }
1678 if (0) {
1679 { /* Inline kernel$Object$!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
1680 var_other = ((val*)NULL);
1681 {
1682 var16 = ((short int(*)(val* self, val* p0))(var_c->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_c, var_other); /* == on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
1683 }
1684 var17 = !var16;
1685 var14 = var17;
1686 goto RET_LABEL15;
1687 RET_LABEL15:(void)0;
1688 }
1689 var13 = var14;
1690 }
1691 if (var13){
1692 var_c->attrs[COLOR_core__hash_collection__HashNode___key].val = var_key; /* _key on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1693 var_c->attrs[COLOR_core__hash_collection__HashMapNode___value].val = var_v; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
1694 } else {
1695 var18 = NEW_core__hash_collection__HashMapNode(self->type->resolution_table->types[COLOR_core__hash_collection__HashMapNode__core__HashMap___35dK__core__HashMap___35dV]);
1696 {
1697 ((void(*)(val* self, val* p0))(var18->class->vft[COLOR_core__hash_collection__HashNode__key_61d]))(var18, var_key); /* key= on <var18:HashMapNode[nullable Object, nullable Object]>*/
1698 }
1699 {
1700 ((void(*)(val* self, val* p0))(var18->class->vft[COLOR_core__hash_collection__HashMapNode__value_61d]))(var18, var_v); /* value= on <var18:HashMapNode[nullable Object, nullable Object]>*/
1701 }
1702 {
1703 ((void(*)(val* self))(var18->class->vft[COLOR_core__kernel__Object__init]))(var18); /* init on <var18:HashMapNode[nullable Object, nullable Object]>*/
1704 }
1705 {
1706 core__hash_collection___core__hash_collection__HashCollection___store(self, var_i, var18); /* Direct call hash_collection$HashCollection$store on <self:HashMap[nullable Object, nullable Object]>*/
1707 }
1708 }
1709 RET_LABEL:;
1710 }
1711 /* method hash_collection$HashMap$clear for (self: HashMap[nullable Object, nullable Object]) */
1712 void core___core__HashMap___core__abstract_collection__Map__clear(val* self) {
1713 {
1714 core__hash_collection___core__hash_collection__HashCollection___raz(self); /* Direct call hash_collection$HashCollection$raz on <self:HashMap[nullable Object, nullable Object]>*/
1715 }
1716 RET_LABEL:;
1717 }
1718 /* method hash_collection$HashMap$init for (self: HashMap[nullable Object, nullable Object]) */
1719 void core___core__HashMap___core__kernel__Object__init(val* self) {
1720 {
1721 ((void(*)(val* self))(self->class->vft[COLOR_core___core__HashMap___core__kernel__Object__init]))(self); /* init on <self:HashMap[nullable Object, nullable Object]>*/
1722 }
1723 self->attrs[COLOR_core__hash_collection__HashCollection___capacity].l = 0l; /* _capacity on <self:HashMap[nullable Object, nullable Object]> */
1724 self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l = 0l; /* _the_length on <self:HashMap[nullable Object, nullable Object]> */
1725 RET_LABEL:;
1726 }
1727 /* method hash_collection$HashMap$keys for (self: HashMap[nullable Object, nullable Object]): RemovableCollection[nullable Object] */
1728 val* core___core__HashMap___core__abstract_collection__MapRead__keys(val* self) {
1729 val* var /* : RemovableCollection[nullable Object] */;
1730 short int var1 /* : Bool */;
1731 val* var2 /* : RemovableCollection[nullable Object] */;
1732 val* var3 /* : HashMapKeys[nullable Object, nullable Object] */;
1733 var1 = self->attrs[COLOR_core__hash_collection__HashMap___keys].val != NULL; /* _keys on <self:HashMap[nullable Object, nullable Object]> */
1734 if(likely(var1)) {
1735 var2 = self->attrs[COLOR_core__hash_collection__HashMap___keys].val; /* _keys on <self:HashMap[nullable Object, nullable Object]> */
1736 if (unlikely(var2 == NULL)) {
1737 if(catchStack.cursor >= 0){
1738 longjmp(catchStack.envs[catchStack.cursor], 1);
1739 }
1740 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _keys");
1741 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 279);
1742 fatal_exit(1);
1743 }
1744 } else {
1745 var3 = NEW_core__hash_collection__HashMapKeys(self->type->resolution_table->types[COLOR_core__hash_collection__HashMapKeys__core__HashMap___35dK__core__HashMap___35dV]);
1746 {
1747 ((void(*)(val* self, val* p0))(var3->class->vft[COLOR_core__hash_collection__HashMapKeys__map_61d]))(var3, self); /* map= on <var3:HashMapKeys[nullable Object, nullable Object]>*/
1748 }
1749 {
1750 ((void(*)(val* self))(var3->class->vft[COLOR_core__kernel__Object__init]))(var3); /* init on <var3:HashMapKeys[nullable Object, nullable Object]>*/
1751 }
1752 self->attrs[COLOR_core__hash_collection__HashMap___keys].val = var3; /* _keys on <self:HashMap[nullable Object, nullable Object]> */
1753 var2 = var3;
1754 }
1755 var = var2;
1756 RET_LABEL:;
1757 return var;
1758 }
1759 /* method hash_collection$HashMap$values for (self: HashMap[nullable Object, nullable Object]): RemovableCollection[nullable Object] */
1760 val* core___core__HashMap___core__abstract_collection__MapRead__values(val* self) {
1761 val* var /* : RemovableCollection[nullable Object] */;
1762 short int var1 /* : Bool */;
1763 val* var2 /* : RemovableCollection[nullable Object] */;
1764 val* var3 /* : HashMapValues[nullable Object, nullable Object] */;
1765 var1 = self->attrs[COLOR_core__hash_collection__HashMap___values].val != NULL; /* _values on <self:HashMap[nullable Object, nullable Object]> */
1766 if(likely(var1)) {
1767 var2 = self->attrs[COLOR_core__hash_collection__HashMap___values].val; /* _values on <self:HashMap[nullable Object, nullable Object]> */
1768 if (unlikely(var2 == NULL)) {
1769 if(catchStack.cursor >= 0){
1770 longjmp(catchStack.envs[catchStack.cursor], 1);
1771 }
1772 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _values");
1773 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 280);
1774 fatal_exit(1);
1775 }
1776 } else {
1777 var3 = NEW_core__hash_collection__HashMapValues(self->type->resolution_table->types[COLOR_core__hash_collection__HashMapValues__core__HashMap___35dK__core__HashMap___35dV]);
1778 {
1779 ((void(*)(val* self, val* p0))(var3->class->vft[COLOR_core__hash_collection__HashMapValues__map_61d]))(var3, self); /* map= on <var3:HashMapValues[nullable Object, nullable Object]>*/
1780 }
1781 {
1782 ((void(*)(val* self))(var3->class->vft[COLOR_core__kernel__Object__init]))(var3); /* init on <var3:HashMapValues[nullable Object, nullable Object]>*/
1783 }
1784 self->attrs[COLOR_core__hash_collection__HashMap___values].val = var3; /* _values on <self:HashMap[nullable Object, nullable Object]> */
1785 var2 = var3;
1786 }
1787 var = var2;
1788 RET_LABEL:;
1789 return var;
1790 }
1791 /* method hash_collection$HashMap$has_key for (self: HashMap[nullable Object, nullable Object], nullable Object): Bool */
1792 short int core___core__HashMap___core__abstract_collection__MapRead__has_key(val* self, val* p0) {
1793 short int var /* : Bool */;
1794 val* var_k /* var k: nullable Object */;
1795 val* var1 /* : nullable HashNode[nullable Object] */;
1796 short int var2 /* : Bool */;
1797 short int var3 /* : Bool */;
1798 val* var_other /* var other: nullable Object */;
1799 short int var5 /* : Bool */;
1800 short int var6 /* : Bool */;
1801 var_k = p0;
1802 {
1803 var1 = core__hash_collection___core__hash_collection__HashCollection___node_at(self, var_k);
1804 }
1805 if (var1 == NULL) {
1806 var2 = 0; /* is null */
1807 } else {
1808 var2 = 1; /* arg is null and recv is not */
1809 }
1810 if (0) {
1811 { /* Inline kernel$Object$!= (var1,((val*)NULL)) on <var1:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
1812 var_other = ((val*)NULL);
1813 {
1814 var5 = ((short int(*)(val* self, val* p0))(var1->class->vft[COLOR_core__kernel__Object___61d_61d]))(var1, var_other); /* == on <var1:nullable HashNode[nullable Object](HashMapNode[nullable Object, nullable Object])>*/
1815 }
1816 var6 = !var5;
1817 var3 = var6;
1818 goto RET_LABEL4;
1819 RET_LABEL4:(void)0;
1820 }
1821 var2 = var3;
1822 }
1823 var = var2;
1824 goto RET_LABEL;
1825 RET_LABEL:;
1826 return var;
1827 }
1828 /* method hash_collection$HashMapKeys$map for (self: HashMapKeys[nullable Object, nullable Object]): HashMap[nullable Object, nullable Object] */
1829 val* core__hash_collection___core__hash_collection__HashMapKeys___map(val* self) {
1830 val* var /* : HashMap[nullable Object, nullable Object] */;
1831 val* var1 /* : HashMap[nullable Object, nullable Object] */;
1832 var1 = self->attrs[COLOR_core__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1833 if (unlikely(var1 == NULL)) {
1834 if(catchStack.cursor >= 0){
1835 longjmp(catchStack.envs[catchStack.cursor], 1);
1836 }
1837 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1838 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 287);
1839 fatal_exit(1);
1840 }
1841 var = var1;
1842 RET_LABEL:;
1843 return var;
1844 }
1845 /* method hash_collection$HashMapKeys$map= for (self: HashMapKeys[nullable Object, nullable Object], HashMap[nullable Object, nullable Object]) */
1846 void core__hash_collection___core__hash_collection__HashMapKeys___map_61d(val* self, val* p0) {
1847 short int var /* : Bool */;
1848 int cltype;
1849 int idtype;
1850 const struct type* type_struct;
1851 const char* var_class_name;
1852 /* Covariant cast for argument 0 (map) <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
1853 /* <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
1854 type_struct = self->type->resolution_table->types[COLOR_core__HashMap__core__hash_collection__HashMapKeys___35dK__core__hash_collection__HashMapKeys___35dV];
1855 cltype = type_struct->color;
1856 idtype = type_struct->id;
1857 if(cltype >= p0->type->table_size) {
1858 var = 0;
1859 } else {
1860 var = p0->type->type_table[cltype] == idtype;
1861 }
1862 if (unlikely(!var)) {
1863 var_class_name = p0 == NULL ? "null" : p0->type->name;
1864 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name);
1865 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 287);
1866 fatal_exit(1);
1867 }
1868 self->attrs[COLOR_core__hash_collection__HashMapKeys___map].val = p0; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1869 RET_LABEL:;
1870 }
1871 /* method hash_collection$HashMapKeys$count for (self: HashMapKeys[nullable Object, nullable Object], nullable Object): Int */
1872 long core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__count(val* self, val* p0) {
1873 long var /* : Int */;
1874 val* var_k /* var k: nullable Object */;
1875 short int var1 /* : Bool */;
1876 var_k = p0;
1877 {
1878 var1 = core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__has(self, var_k);
1879 }
1880 if (var1){
1881 var = 1l;
1882 goto RET_LABEL;
1883 } else {
1884 var = 0l;
1885 goto RET_LABEL;
1886 }
1887 RET_LABEL:;
1888 return var;
1889 }
1890 /* method hash_collection$HashMapKeys$first for (self: HashMapKeys[nullable Object, nullable Object]): nullable Object */
1891 val* core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__first(val* self) {
1892 val* var /* : nullable Object */;
1893 val* var1 /* : HashMap[nullable Object, nullable Object] */;
1894 val* var3 /* : HashMap[nullable Object, nullable Object] */;
1895 val* var4 /* : nullable HashNode[nullable Object] */;
1896 val* var5 /* : nullable Object */;
1897 {
1898 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1899 var3 = self->attrs[COLOR_core__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1900 if (unlikely(var3 == NULL)) {
1901 if(catchStack.cursor >= 0){
1902 longjmp(catchStack.envs[catchStack.cursor], 1);
1903 }
1904 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1905 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 287);
1906 fatal_exit(1);
1907 }
1908 var1 = var3;
1909 RET_LABEL2:(void)0;
1910 }
1911 }
1912 var4 = var1->attrs[COLOR_core__hash_collection__HashCollection___first_item].val; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
1913 if (unlikely(var4 == NULL)) {
1914 if(catchStack.cursor >= 0){
1915 longjmp(catchStack.envs[catchStack.cursor], 1);
1916 }
1917 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1918 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 291);
1919 fatal_exit(1);
1920 }
1921 var5 = var4->attrs[COLOR_core__hash_collection__HashNode___key].val; /* _key on <var4:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
1922 var = var5;
1923 goto RET_LABEL;
1924 RET_LABEL:;
1925 return var;
1926 }
1927 /* method hash_collection$HashMapKeys$has for (self: HashMapKeys[nullable Object, nullable Object], nullable Object): Bool */
1928 short int core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__has(val* self, val* p0) {
1929 short int var /* : Bool */;
1930 val* var_k /* var k: nullable Object */;
1931 val* var1 /* : HashMap[nullable Object, nullable Object] */;
1932 val* var3 /* : HashMap[nullable Object, nullable Object] */;
1933 val* var4 /* : nullable HashNode[nullable Object] */;
1934 short int var5 /* : Bool */;
1935 short int var6 /* : Bool */;
1936 val* var_other /* var other: nullable Object */;
1937 short int var8 /* : Bool */;
1938 short int var9 /* : Bool */;
1939 var_k = p0;
1940 {
1941 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1942 var3 = self->attrs[COLOR_core__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1943 if (unlikely(var3 == NULL)) {
1944 if(catchStack.cursor >= 0){
1945 longjmp(catchStack.envs[catchStack.cursor], 1);
1946 }
1947 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1948 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 287);
1949 fatal_exit(1);
1950 }
1951 var1 = var3;
1952 RET_LABEL2:(void)0;
1953 }
1954 }
1955 {
1956 var4 = core__hash_collection___core__hash_collection__HashCollection___node_at(var1, var_k);
1957 }
1958 if (var4 == NULL) {
1959 var5 = 0; /* is null */
1960 } else {
1961 var5 = 1; /* arg is null and recv is not */
1962 }
1963 if (0) {
1964 { /* Inline kernel$Object$!= (var4,((val*)NULL)) on <var4:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
1965 var_other = ((val*)NULL);
1966 {
1967 var8 = ((short int(*)(val* self, val* p0))(var4->class->vft[COLOR_core__kernel__Object___61d_61d]))(var4, var_other); /* == on <var4:nullable HashNode[nullable Object](HashMapNode[nullable Object, nullable Object])>*/
1968 }
1969 var9 = !var8;
1970 var6 = var9;
1971 goto RET_LABEL7;
1972 RET_LABEL7:(void)0;
1973 }
1974 var5 = var6;
1975 }
1976 var = var5;
1977 goto RET_LABEL;
1978 RET_LABEL:;
1979 return var;
1980 }
1981 /* method hash_collection$HashMapKeys$is_empty for (self: HashMapKeys[nullable Object, nullable Object]): Bool */
1982 short int core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__is_empty(val* self) {
1983 short int var /* : Bool */;
1984 val* var1 /* : HashMap[nullable Object, nullable Object] */;
1985 val* var3 /* : HashMap[nullable Object, nullable Object] */;
1986 short int var4 /* : Bool */;
1987 {
1988 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
1989 var3 = self->attrs[COLOR_core__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
1990 if (unlikely(var3 == NULL)) {
1991 if(catchStack.cursor >= 0){
1992 longjmp(catchStack.envs[catchStack.cursor], 1);
1993 }
1994 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
1995 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 287);
1996 fatal_exit(1);
1997 }
1998 var1 = var3;
1999 RET_LABEL2:(void)0;
2000 }
2001 }
2002 {
2003 var4 = core___core__HashMap___core__abstract_collection__MapRead__is_empty(var1);
2004 }
2005 var = var4;
2006 goto RET_LABEL;
2007 RET_LABEL:;
2008 return var;
2009 }
2010 /* method hash_collection$HashMapKeys$length for (self: HashMapKeys[nullable Object, nullable Object]): Int */
2011 long core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__length(val* self) {
2012 long var /* : Int */;
2013 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2014 val* var3 /* : HashMap[nullable Object, nullable Object] */;
2015 long var4 /* : Int */;
2016 {
2017 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2018 var3 = self->attrs[COLOR_core__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2019 if (unlikely(var3 == NULL)) {
2020 if(catchStack.cursor >= 0){
2021 longjmp(catchStack.envs[catchStack.cursor], 1);
2022 }
2023 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2024 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 287);
2025 fatal_exit(1);
2026 }
2027 var1 = var3;
2028 RET_LABEL2:(void)0;
2029 }
2030 }
2031 {
2032 var4 = core___core__HashMap___core__abstract_collection__MapRead__length(var1);
2033 }
2034 var = var4;
2035 goto RET_LABEL;
2036 RET_LABEL:;
2037 return var;
2038 }
2039 /* method hash_collection$HashMapKeys$iterator for (self: HashMapKeys[nullable Object, nullable Object]): Iterator[nullable Object] */
2040 val* core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__Collection__iterator(val* self) {
2041 val* var /* : Iterator[nullable Object] */;
2042 val* var1 /* : MapKeysIterator[nullable Object, nullable Object] */;
2043 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2044 val* var4 /* : HashMap[nullable Object, nullable Object] */;
2045 val* var5 /* : MapIterator[nullable Object, nullable Object] */;
2046 var1 = NEW_core__MapKeysIterator(self->type->resolution_table->types[COLOR_core__MapKeysIterator__core__hash_collection__HashMapKeys___35dK__core__hash_collection__HashMapKeys___35dV]);
2047 {
2048 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2049 var4 = self->attrs[COLOR_core__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2050 if (unlikely(var4 == NULL)) {
2051 if(catchStack.cursor >= 0){
2052 longjmp(catchStack.envs[catchStack.cursor], 1);
2053 }
2054 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2055 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 287);
2056 fatal_exit(1);
2057 }
2058 var2 = var4;
2059 RET_LABEL3:(void)0;
2060 }
2061 }
2062 {
2063 var5 = core___core__HashMap___core__abstract_collection__MapRead__iterator(var2);
2064 }
2065 {
2066 ((void(*)(val* self, val* p0))(var1->class->vft[COLOR_core__abstract_collection__MapKeysIterator__original_iterator_61d]))(var1, var5); /* original_iterator= on <var1:MapKeysIterator[nullable Object, nullable Object]>*/
2067 }
2068 {
2069 ((void(*)(val* self))(var1->class->vft[COLOR_core__kernel__Object__init]))(var1); /* init on <var1:MapKeysIterator[nullable Object, nullable Object]>*/
2070 }
2071 var = var1;
2072 goto RET_LABEL;
2073 RET_LABEL:;
2074 return var;
2075 }
2076 /* method hash_collection$HashMapKeys$clear for (self: HashMapKeys[nullable Object, nullable Object]) */
2077 void core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__RemovableCollection__clear(val* self) {
2078 val* var /* : HashMap[nullable Object, nullable Object] */;
2079 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2080 {
2081 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2082 var2 = self->attrs[COLOR_core__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2083 if (unlikely(var2 == NULL)) {
2084 if(catchStack.cursor >= 0){
2085 longjmp(catchStack.envs[catchStack.cursor], 1);
2086 }
2087 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2088 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 287);
2089 fatal_exit(1);
2090 }
2091 var = var2;
2092 RET_LABEL1:(void)0;
2093 }
2094 }
2095 {
2096 core___core__HashMap___core__abstract_collection__Map__clear(var); /* Direct call hash_collection$HashMap$clear on <var:HashMap[nullable Object, nullable Object]>*/
2097 }
2098 RET_LABEL:;
2099 }
2100 /* method hash_collection$HashMapKeys$remove for (self: HashMapKeys[nullable Object, nullable Object], nullable Object) */
2101 void core__hash_collection___core__hash_collection__HashMapKeys___core__abstract_collection__RemovableCollection__remove(val* self, val* p0) {
2102 val* var_key /* var key: nullable Object */;
2103 val* var /* : HashMap[nullable Object, nullable Object] */;
2104 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2105 var_key = p0;
2106 {
2107 { /* Inline hash_collection$HashMapKeys$map (self) on <self:HashMapKeys[nullable Object, nullable Object]> */
2108 var2 = self->attrs[COLOR_core__hash_collection__HashMapKeys___map].val; /* _map on <self:HashMapKeys[nullable Object, nullable Object]> */
2109 if (unlikely(var2 == NULL)) {
2110 if(catchStack.cursor >= 0){
2111 longjmp(catchStack.envs[catchStack.cursor], 1);
2112 }
2113 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2114 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 287);
2115 fatal_exit(1);
2116 }
2117 var = var2;
2118 RET_LABEL1:(void)0;
2119 }
2120 }
2121 {
2122 core__hash_collection___core__hash_collection__HashCollection___remove_node(var, var_key); /* Direct call hash_collection$HashCollection$remove_node on <var:HashMap[nullable Object, nullable Object]>*/
2123 }
2124 RET_LABEL:;
2125 }
2126 /* method hash_collection$HashMapKeys$init for (self: HashMapKeys[nullable Object, nullable Object]) */
2127 void core__hash_collection___core__hash_collection__HashMapKeys___core__kernel__Object__init(val* self) {
2128 {
2129 ((void(*)(val* self))(self->class->vft[COLOR_core__hash_collection___core__hash_collection__HashMapKeys___core__kernel__Object__init]))(self); /* init on <self:HashMapKeys[nullable Object, nullable Object]>*/
2130 }
2131 RET_LABEL:;
2132 }
2133 /* method hash_collection$HashMapValues$map for (self: HashMapValues[nullable Object, nullable Object]): HashMap[nullable Object, nullable Object] */
2134 val* core__hash_collection___core__hash_collection__HashMapValues___map(val* self) {
2135 val* var /* : HashMap[nullable Object, nullable Object] */;
2136 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2137 var1 = self->attrs[COLOR_core__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2138 if (unlikely(var1 == NULL)) {
2139 if(catchStack.cursor >= 0){
2140 longjmp(catchStack.envs[catchStack.cursor], 1);
2141 }
2142 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2143 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 308);
2144 fatal_exit(1);
2145 }
2146 var = var1;
2147 RET_LABEL:;
2148 return var;
2149 }
2150 /* method hash_collection$HashMapValues$map= for (self: HashMapValues[nullable Object, nullable Object], HashMap[nullable Object, nullable Object]) */
2151 void core__hash_collection___core__hash_collection__HashMapValues___map_61d(val* self, val* p0) {
2152 short int var /* : Bool */;
2153 int cltype;
2154 int idtype;
2155 const struct type* type_struct;
2156 const char* var_class_name;
2157 /* Covariant cast for argument 0 (map) <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2158 /* <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2159 type_struct = self->type->resolution_table->types[COLOR_core__HashMap__core__hash_collection__HashMapValues___35dK__core__hash_collection__HashMapValues___35dV];
2160 cltype = type_struct->color;
2161 idtype = type_struct->id;
2162 if(cltype >= p0->type->table_size) {
2163 var = 0;
2164 } else {
2165 var = p0->type->type_table[cltype] == idtype;
2166 }
2167 if (unlikely(!var)) {
2168 var_class_name = p0 == NULL ? "null" : p0->type->name;
2169 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name);
2170 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 308);
2171 fatal_exit(1);
2172 }
2173 self->attrs[COLOR_core__hash_collection__HashMapValues___map].val = p0; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2174 RET_LABEL:;
2175 }
2176 /* method hash_collection$HashMapValues$count for (self: HashMapValues[nullable Object, nullable Object], nullable Object): Int */
2177 long core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__count(val* self, val* p0) {
2178 long var /* : Int */;
2179 val* var_item /* var item: nullable Object */;
2180 long var_nb /* var nb: Int */;
2181 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2182 val* var3 /* : HashMap[nullable Object, nullable Object] */;
2183 val* var4 /* : nullable HashNode[nullable Object] */;
2184 val* var_c /* var c: nullable HashMapNode[nullable Object, nullable Object] */;
2185 short int var5 /* : Bool */;
2186 short int var6 /* : Bool */;
2187 val* var_other /* var other: nullable Object */;
2188 short int var8 /* : Bool */;
2189 short int var9 /* : Bool */;
2190 val* var10 /* : nullable Object */;
2191 short int var11 /* : Bool */;
2192 short int var12 /* : Bool */;
2193 long var13 /* : Int */;
2194 short int var15 /* : Bool */;
2195 int cltype;
2196 int idtype;
2197 const char* var_class_name;
2198 long var16 /* : Int */;
2199 val* var17 /* : nullable HashNode[nullable Object] */;
2200 var_item = p0;
2201 var_nb = 0l;
2202 {
2203 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2204 var3 = self->attrs[COLOR_core__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2205 if (unlikely(var3 == NULL)) {
2206 if(catchStack.cursor >= 0){
2207 longjmp(catchStack.envs[catchStack.cursor], 1);
2208 }
2209 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2210 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 308);
2211 fatal_exit(1);
2212 }
2213 var1 = var3;
2214 RET_LABEL2:(void)0;
2215 }
2216 }
2217 var4 = var1->attrs[COLOR_core__hash_collection__HashCollection___first_item].val; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
2218 var_c = var4;
2219 for(;;) {
2220 if (var_c == NULL) {
2221 var5 = 0; /* is null */
2222 } else {
2223 var5 = 1; /* arg is null and recv is not */
2224 }
2225 if (0) {
2226 { /* Inline kernel$Object$!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
2227 var_other = ((val*)NULL);
2228 {
2229 var8 = ((short int(*)(val* self, val* p0))(var_c->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_c, var_other); /* == on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
2230 }
2231 var9 = !var8;
2232 var6 = var9;
2233 goto RET_LABEL7;
2234 RET_LABEL7:(void)0;
2235 }
2236 var5 = var6;
2237 }
2238 if (var5){
2239 var10 = var_c->attrs[COLOR_core__hash_collection__HashMapNode___value].val; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2240 if (var10 == NULL) {
2241 var11 = (var_item == NULL);
2242 } else {
2243 var12 = ((short int(*)(val* self, val* p0))((((long)var10&3)?class_info[((long)var10&3)]:var10->class)->vft[COLOR_core__kernel__Object___61d_61d]))(var10, var_item); /* == on <var10:nullable Object>*/
2244 var11 = var12;
2245 }
2246 if (var11){
2247 {
2248 { /* Inline kernel$Int$+ (var_nb,1l) on <var_nb:Int> */
2249 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
2250 /* <1l:Int> isa OTHER */
2251 var15 = 1; /* easy <1l:Int> isa OTHER*/
2252 if (unlikely(!var15)) {
2253 var_class_name = type_core__Int.name;
2254 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name);
2255 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728);
2256 fatal_exit(1);
2257 }
2258 var16 = var_nb + 1l;
2259 var13 = var16;
2260 goto RET_LABEL14;
2261 RET_LABEL14:(void)0;
2262 }
2263 }
2264 var_nb = var13;
2265 } else {
2266 }
2267 var17 = var_c->attrs[COLOR_core__hash_collection__HashNode___next_item].val; /* _next_item on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2268 var_c = var17;
2269 } else {
2270 goto BREAK_label;
2271 }
2272 }
2273 BREAK_label: (void)0;
2274 var = var_nb;
2275 goto RET_LABEL;
2276 RET_LABEL:;
2277 return var;
2278 }
2279 /* method hash_collection$HashMapValues$first for (self: HashMapValues[nullable Object, nullable Object]): nullable Object */
2280 val* core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__first(val* self) {
2281 val* var /* : nullable Object */;
2282 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2283 val* var3 /* : HashMap[nullable Object, nullable Object] */;
2284 val* var4 /* : nullable HashNode[nullable Object] */;
2285 val* var5 /* : nullable Object */;
2286 {
2287 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2288 var3 = self->attrs[COLOR_core__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2289 if (unlikely(var3 == NULL)) {
2290 if(catchStack.cursor >= 0){
2291 longjmp(catchStack.envs[catchStack.cursor], 1);
2292 }
2293 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2294 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 308);
2295 fatal_exit(1);
2296 }
2297 var1 = var3;
2298 RET_LABEL2:(void)0;
2299 }
2300 }
2301 var4 = var1->attrs[COLOR_core__hash_collection__HashCollection___first_item].val; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
2302 if (unlikely(var4 == NULL)) {
2303 if(catchStack.cursor >= 0){
2304 longjmp(catchStack.envs[catchStack.cursor], 1);
2305 }
2306 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2307 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 321);
2308 fatal_exit(1);
2309 }
2310 var5 = var4->attrs[COLOR_core__hash_collection__HashMapNode___value].val; /* _value on <var4:nullable HashNode[nullable Object](nullable HashMapNode[nullable Object, nullable Object])> */
2311 var = var5;
2312 goto RET_LABEL;
2313 RET_LABEL:;
2314 return var;
2315 }
2316 /* method hash_collection$HashMapValues$has for (self: HashMapValues[nullable Object, nullable Object], nullable Object): Bool */
2317 short int core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__has(val* self, val* p0) {
2318 short int var /* : Bool */;
2319 val* var_item /* var item: nullable Object */;
2320 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2321 val* var3 /* : HashMap[nullable Object, nullable Object] */;
2322 val* var4 /* : nullable HashNode[nullable Object] */;
2323 val* var_c /* var c: nullable HashMapNode[nullable Object, nullable Object] */;
2324 short int var5 /* : Bool */;
2325 short int var6 /* : Bool */;
2326 val* var_other /* var other: nullable Object */;
2327 short int var8 /* : Bool */;
2328 short int var9 /* : Bool */;
2329 val* var10 /* : nullable Object */;
2330 short int var11 /* : Bool */;
2331 short int var12 /* : Bool */;
2332 val* var13 /* : nullable HashNode[nullable Object] */;
2333 var_item = p0;
2334 {
2335 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2336 var3 = self->attrs[COLOR_core__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2337 if (unlikely(var3 == NULL)) {
2338 if(catchStack.cursor >= 0){
2339 longjmp(catchStack.envs[catchStack.cursor], 1);
2340 }
2341 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2342 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 308);
2343 fatal_exit(1);
2344 }
2345 var1 = var3;
2346 RET_LABEL2:(void)0;
2347 }
2348 }
2349 var4 = var1->attrs[COLOR_core__hash_collection__HashCollection___first_item].val; /* _first_item on <var1:HashMap[nullable Object, nullable Object]> */
2350 var_c = var4;
2351 for(;;) {
2352 if (var_c == NULL) {
2353 var5 = 0; /* is null */
2354 } else {
2355 var5 = 1; /* arg is null and recv is not */
2356 }
2357 if (0) {
2358 { /* Inline kernel$Object$!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
2359 var_other = ((val*)NULL);
2360 {
2361 var8 = ((short int(*)(val* self, val* p0))(var_c->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_c, var_other); /* == on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
2362 }
2363 var9 = !var8;
2364 var6 = var9;
2365 goto RET_LABEL7;
2366 RET_LABEL7:(void)0;
2367 }
2368 var5 = var6;
2369 }
2370 if (var5){
2371 var10 = var_c->attrs[COLOR_core__hash_collection__HashMapNode___value].val; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2372 if (var10 == NULL) {
2373 var11 = (var_item == NULL);
2374 } else {
2375 var12 = ((short int(*)(val* self, val* p0))((((long)var10&3)?class_info[((long)var10&3)]:var10->class)->vft[COLOR_core__kernel__Object___61d_61d]))(var10, var_item); /* == on <var10:nullable Object>*/
2376 var11 = var12;
2377 }
2378 if (var11){
2379 var = 1;
2380 goto RET_LABEL;
2381 } else {
2382 }
2383 var13 = var_c->attrs[COLOR_core__hash_collection__HashNode___next_item].val; /* _next_item on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2384 var_c = var13;
2385 } else {
2386 goto BREAK_label;
2387 }
2388 }
2389 BREAK_label: (void)0;
2390 var = 0;
2391 goto RET_LABEL;
2392 RET_LABEL:;
2393 return var;
2394 }
2395 /* method hash_collection$HashMapValues$is_empty for (self: HashMapValues[nullable Object, nullable Object]): Bool */
2396 short int core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__is_empty(val* self) {
2397 short int var /* : Bool */;
2398 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2399 val* var3 /* : HashMap[nullable Object, nullable Object] */;
2400 short int var4 /* : Bool */;
2401 {
2402 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2403 var3 = self->attrs[COLOR_core__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2404 if (unlikely(var3 == NULL)) {
2405 if(catchStack.cursor >= 0){
2406 longjmp(catchStack.envs[catchStack.cursor], 1);
2407 }
2408 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2409 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 308);
2410 fatal_exit(1);
2411 }
2412 var1 = var3;
2413 RET_LABEL2:(void)0;
2414 }
2415 }
2416 {
2417 var4 = core___core__HashMap___core__abstract_collection__MapRead__is_empty(var1);
2418 }
2419 var = var4;
2420 goto RET_LABEL;
2421 RET_LABEL:;
2422 return var;
2423 }
2424 /* method hash_collection$HashMapValues$length for (self: HashMapValues[nullable Object, nullable Object]): Int */
2425 long core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__length(val* self) {
2426 long var /* : Int */;
2427 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2428 val* var3 /* : HashMap[nullable Object, nullable Object] */;
2429 long var4 /* : Int */;
2430 {
2431 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2432 var3 = self->attrs[COLOR_core__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2433 if (unlikely(var3 == NULL)) {
2434 if(catchStack.cursor >= 0){
2435 longjmp(catchStack.envs[catchStack.cursor], 1);
2436 }
2437 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2438 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 308);
2439 fatal_exit(1);
2440 }
2441 var1 = var3;
2442 RET_LABEL2:(void)0;
2443 }
2444 }
2445 {
2446 var4 = core___core__HashMap___core__abstract_collection__MapRead__length(var1);
2447 }
2448 var = var4;
2449 goto RET_LABEL;
2450 RET_LABEL:;
2451 return var;
2452 }
2453 /* method hash_collection$HashMapValues$iterator for (self: HashMapValues[nullable Object, nullable Object]): Iterator[nullable Object] */
2454 val* core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__Collection__iterator(val* self) {
2455 val* var /* : Iterator[nullable Object] */;
2456 val* var1 /* : MapValuesIterator[nullable Object, nullable Object] */;
2457 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2458 val* var4 /* : HashMap[nullable Object, nullable Object] */;
2459 val* var5 /* : MapIterator[nullable Object, nullable Object] */;
2460 var1 = NEW_core__MapValuesIterator(self->type->resolution_table->types[COLOR_core__MapValuesIterator__core__hash_collection__HashMapValues___35dK__core__hash_collection__HashMapValues___35dV]);
2461 {
2462 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2463 var4 = self->attrs[COLOR_core__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2464 if (unlikely(var4 == NULL)) {
2465 if(catchStack.cursor >= 0){
2466 longjmp(catchStack.envs[catchStack.cursor], 1);
2467 }
2468 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2469 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 308);
2470 fatal_exit(1);
2471 }
2472 var2 = var4;
2473 RET_LABEL3:(void)0;
2474 }
2475 }
2476 {
2477 var5 = core___core__HashMap___core__abstract_collection__MapRead__iterator(var2);
2478 }
2479 {
2480 ((void(*)(val* self, val* p0))(var1->class->vft[COLOR_core__abstract_collection__MapValuesIterator__original_iterator_61d]))(var1, var5); /* original_iterator= on <var1:MapValuesIterator[nullable Object, nullable Object]>*/
2481 }
2482 {
2483 ((void(*)(val* self))(var1->class->vft[COLOR_core__kernel__Object__init]))(var1); /* init on <var1:MapValuesIterator[nullable Object, nullable Object]>*/
2484 }
2485 var = var1;
2486 goto RET_LABEL;
2487 RET_LABEL:;
2488 return var;
2489 }
2490 /* method hash_collection$HashMapValues$clear for (self: HashMapValues[nullable Object, nullable Object]) */
2491 void core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__RemovableCollection__clear(val* self) {
2492 val* var /* : HashMap[nullable Object, nullable Object] */;
2493 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2494 {
2495 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2496 var2 = self->attrs[COLOR_core__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2497 if (unlikely(var2 == NULL)) {
2498 if(catchStack.cursor >= 0){
2499 longjmp(catchStack.envs[catchStack.cursor], 1);
2500 }
2501 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2502 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 308);
2503 fatal_exit(1);
2504 }
2505 var = var2;
2506 RET_LABEL1:(void)0;
2507 }
2508 }
2509 {
2510 core___core__HashMap___core__abstract_collection__Map__clear(var); /* Direct call hash_collection$HashMap$clear on <var:HashMap[nullable Object, nullable Object]>*/
2511 }
2512 RET_LABEL:;
2513 }
2514 /* method hash_collection$HashMapValues$remove for (self: HashMapValues[nullable Object, nullable Object], nullable Object) */
2515 void core__hash_collection___core__hash_collection__HashMapValues___core__abstract_collection__RemovableCollection__remove(val* self, val* p0) {
2516 val* var_item /* var item: nullable Object */;
2517 val* var /* : HashMap[nullable Object, nullable Object] */;
2518 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2519 val* var_map /* var map: HashMap[nullable Object, nullable Object] */;
2520 val* var3 /* : nullable HashNode[nullable Object] */;
2521 val* var_c /* var c: nullable HashMapNode[nullable Object, nullable Object] */;
2522 short int var4 /* : Bool */;
2523 short int var5 /* : Bool */;
2524 val* var_other /* var other: nullable Object */;
2525 short int var7 /* : Bool */;
2526 short int var8 /* : Bool */;
2527 val* var9 /* : nullable Object */;
2528 short int var10 /* : Bool */;
2529 short int var11 /* : Bool */;
2530 val* var12 /* : nullable Object */;
2531 val* var13 /* : nullable HashNode[nullable Object] */;
2532 var_item = p0;
2533 {
2534 { /* Inline hash_collection$HashMapValues$map (self) on <self:HashMapValues[nullable Object, nullable Object]> */
2535 var2 = self->attrs[COLOR_core__hash_collection__HashMapValues___map].val; /* _map on <self:HashMapValues[nullable Object, nullable Object]> */
2536 if (unlikely(var2 == NULL)) {
2537 if(catchStack.cursor >= 0){
2538 longjmp(catchStack.envs[catchStack.cursor], 1);
2539 }
2540 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2541 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 308);
2542 fatal_exit(1);
2543 }
2544 var = var2;
2545 RET_LABEL1:(void)0;
2546 }
2547 }
2548 var_map = var;
2549 var3 = var_map->attrs[COLOR_core__hash_collection__HashCollection___first_item].val; /* _first_item on <var_map:HashMap[nullable Object, nullable Object]> */
2550 var_c = var3;
2551 for(;;) {
2552 if (var_c == NULL) {
2553 var4 = 0; /* is null */
2554 } else {
2555 var4 = 1; /* arg is null and recv is not */
2556 }
2557 if (0) {
2558 { /* Inline kernel$Object$!= (var_c,((val*)NULL)) on <var_c:nullable HashMapNode[nullable Object, nullable Object]> */
2559 var_other = ((val*)NULL);
2560 {
2561 var7 = ((short int(*)(val* self, val* p0))(var_c->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_c, var_other); /* == on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
2562 }
2563 var8 = !var7;
2564 var5 = var8;
2565 goto RET_LABEL6;
2566 RET_LABEL6:(void)0;
2567 }
2568 var4 = var5;
2569 }
2570 if (var4){
2571 var9 = var_c->attrs[COLOR_core__hash_collection__HashMapNode___value].val; /* _value on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2572 if (var9 == NULL) {
2573 var10 = (var_item == NULL);
2574 } else {
2575 var11 = ((short int(*)(val* self, val* p0))((((long)var9&3)?class_info[((long)var9&3)]:var9->class)->vft[COLOR_core__kernel__Object___61d_61d]))(var9, var_item); /* == on <var9:nullable Object>*/
2576 var10 = var11;
2577 }
2578 if (var10){
2579 var12 = var_c->attrs[COLOR_core__hash_collection__HashNode___key].val; /* _key on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2580 {
2581 core__hash_collection___core__hash_collection__HashCollection___remove_node(var_map, var12); /* Direct call hash_collection$HashCollection$remove_node on <var_map:HashMap[nullable Object, nullable Object]>*/
2582 }
2583 goto RET_LABEL;
2584 } else {
2585 }
2586 var13 = var_c->attrs[COLOR_core__hash_collection__HashNode___next_item].val; /* _next_item on <var_c:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])> */
2587 var_c = var13;
2588 } else {
2589 goto BREAK_label;
2590 }
2591 }
2592 BREAK_label: (void)0;
2593 RET_LABEL:;
2594 }
2595 /* method hash_collection$HashMapValues$init for (self: HashMapValues[nullable Object, nullable Object]) */
2596 void core__hash_collection___core__hash_collection__HashMapValues___core__kernel__Object__init(val* self) {
2597 {
2598 ((void(*)(val* self))(self->class->vft[COLOR_core__hash_collection___core__hash_collection__HashMapValues___core__kernel__Object__init]))(self); /* init on <self:HashMapValues[nullable Object, nullable Object]>*/
2599 }
2600 RET_LABEL:;
2601 }
2602 /* method hash_collection$HashMapNode$value= for (self: HashMapNode[nullable Object, nullable Object], nullable Object) */
2603 void core__hash_collection___core__hash_collection__HashMapNode___value_61d(val* self, val* p0) {
2604 short int var /* : Bool */;
2605 int cltype;
2606 int idtype;
2607 const struct type* type_struct;
2608 short int is_nullable;
2609 const char* var_class_name;
2610 /* Covariant cast for argument 0 (value) <p0:nullable Object> isa V */
2611 /* <p0:nullable Object> isa V */
2612 type_struct = self->type->resolution_table->types[COLOR_core__hash_collection__HashMapNode___35dV];
2613 cltype = type_struct->color;
2614 idtype = type_struct->id;
2615 is_nullable = type_struct->is_nullable;
2616 if(p0 == NULL) {
2617 var = is_nullable;
2618 } else {
2619 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
2620 var = 0;
2621 } else {
2622 var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
2623 }
2624 }
2625 if (unlikely(!var)) {
2626 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
2627 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name);
2628 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 379);
2629 fatal_exit(1);
2630 }
2631 self->attrs[COLOR_core__hash_collection__HashMapNode___value].val = p0; /* _value on <self:HashMapNode[nullable Object, nullable Object]> */
2632 RET_LABEL:;
2633 }
2634 /* method hash_collection$HashMapNode$init for (self: HashMapNode[nullable Object, nullable Object]) */
2635 void core__hash_collection___core__hash_collection__HashMapNode___core__kernel__Object__init(val* self) {
2636 {
2637 ((void(*)(val* self))(self->class->vft[COLOR_core__hash_collection___core__hash_collection__HashMapNode___core__kernel__Object__init]))(self); /* init on <self:HashMapNode[nullable Object, nullable Object]>*/
2638 }
2639 RET_LABEL:;
2640 }
2641 /* method hash_collection$HashMapIterator$is_ok for (self: HashMapIterator[nullable Object, nullable Object]): Bool */
2642 short int core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__is_ok(val* self) {
2643 short int var /* : Bool */;
2644 val* var1 /* : nullable HashMapNode[nullable Object, nullable Object] */;
2645 short int var2 /* : Bool */;
2646 short int var3 /* : Bool */;
2647 val* var_other /* var other: nullable Object */;
2648 short int var5 /* : Bool */;
2649 short int var6 /* : Bool */;
2650 var1 = self->attrs[COLOR_core__hash_collection__HashMapIterator___node].val; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2651 if (var1 == NULL) {
2652 var2 = 0; /* is null */
2653 } else {
2654 var2 = 1; /* arg is null and recv is not */
2655 }
2656 if (0) {
2657 { /* Inline kernel$Object$!= (var1,((val*)NULL)) on <var1:nullable HashMapNode[nullable Object, nullable Object]> */
2658 var_other = ((val*)NULL);
2659 {
2660 var5 = ((short int(*)(val* self, val* p0))(var1->class->vft[COLOR_core__kernel__Object___61d_61d]))(var1, var_other); /* == on <var1:nullable HashMapNode[nullable Object, nullable Object](HashMapNode[nullable Object, nullable Object])>*/
2661 }
2662 var6 = !var5;
2663 var3 = var6;
2664 goto RET_LABEL4;
2665 RET_LABEL4:(void)0;
2666 }
2667 var2 = var3;
2668 }
2669 var = var2;
2670 goto RET_LABEL;
2671 RET_LABEL:;
2672 return var;
2673 }
2674 /* method hash_collection$HashMapIterator$item for (self: HashMapIterator[nullable Object, nullable Object]): nullable Object */
2675 val* core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__item(val* self) {
2676 val* var /* : nullable Object */;
2677 short int var1 /* : Bool */;
2678 val* var2 /* : nullable HashMapNode[nullable Object, nullable Object] */;
2679 val* var3 /* : nullable Object */;
2680 {
2681 var1 = core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__is_ok(self);
2682 }
2683 if (unlikely(!var1)) {
2684 if(catchStack.cursor >= 0){
2685 longjmp(catchStack.envs[catchStack.cursor], 1);
2686 }
2687 PRINT_ERROR("Runtime error: %s", "Assert failed");
2688 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 389);
2689 fatal_exit(1);
2690 }
2691 var2 = self->attrs[COLOR_core__hash_collection__HashMapIterator___node].val; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2692 if (unlikely(var2 == NULL)) {
2693 if(catchStack.cursor >= 0){
2694 longjmp(catchStack.envs[catchStack.cursor], 1);
2695 }
2696 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2697 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 390);
2698 fatal_exit(1);
2699 }
2700 var3 = var2->attrs[COLOR_core__hash_collection__HashMapNode___value].val; /* _value on <var2:nullable HashMapNode[nullable Object, nullable Object]> */
2701 var = var3;
2702 goto RET_LABEL;
2703 RET_LABEL:;
2704 return var;
2705 }
2706 /* method hash_collection$HashMapIterator$key for (self: HashMapIterator[nullable Object, nullable Object]): nullable Object */
2707 val* core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__key(val* self) {
2708 val* var /* : nullable Object */;
2709 short int var1 /* : Bool */;
2710 val* var2 /* : nullable HashMapNode[nullable Object, nullable Object] */;
2711 val* var3 /* : nullable Object */;
2712 {
2713 var1 = core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__is_ok(self);
2714 }
2715 if (unlikely(!var1)) {
2716 if(catchStack.cursor >= 0){
2717 longjmp(catchStack.envs[catchStack.cursor], 1);
2718 }
2719 PRINT_ERROR("Runtime error: %s", "Assert failed");
2720 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 401);
2721 fatal_exit(1);
2722 }
2723 var2 = self->attrs[COLOR_core__hash_collection__HashMapIterator___node].val; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2724 if (unlikely(var2 == NULL)) {
2725 if(catchStack.cursor >= 0){
2726 longjmp(catchStack.envs[catchStack.cursor], 1);
2727 }
2728 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2729 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 402);
2730 fatal_exit(1);
2731 }
2732 var3 = var2->attrs[COLOR_core__hash_collection__HashNode___key].val; /* _key on <var2:nullable HashMapNode[nullable Object, nullable Object]> */
2733 var = var3;
2734 goto RET_LABEL;
2735 RET_LABEL:;
2736 return var;
2737 }
2738 /* method hash_collection$HashMapIterator$next for (self: HashMapIterator[nullable Object, nullable Object]) */
2739 void core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__next(val* self) {
2740 short int var /* : Bool */;
2741 val* var1 /* : nullable HashMapNode[nullable Object, nullable Object] */;
2742 val* var2 /* : nullable HashNode[nullable Object] */;
2743 {
2744 var = core__hash_collection___core__hash_collection__HashMapIterator___core__abstract_collection__MapIterator__is_ok(self);
2745 }
2746 if (unlikely(!var)) {
2747 if(catchStack.cursor >= 0){
2748 longjmp(catchStack.envs[catchStack.cursor], 1);
2749 }
2750 PRINT_ERROR("Runtime error: %s", "Assert failed");
2751 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 407);
2752 fatal_exit(1);
2753 }
2754 var1 = self->attrs[COLOR_core__hash_collection__HashMapIterator___node].val; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2755 if (unlikely(var1 == NULL)) {
2756 if(catchStack.cursor >= 0){
2757 longjmp(catchStack.envs[catchStack.cursor], 1);
2758 }
2759 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2760 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 408);
2761 fatal_exit(1);
2762 }
2763 var2 = var1->attrs[COLOR_core__hash_collection__HashNode___next_item].val; /* _next_item on <var1:nullable HashMapNode[nullable Object, nullable Object]> */
2764 self->attrs[COLOR_core__hash_collection__HashMapIterator___node].val = var2; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2765 RET_LABEL:;
2766 }
2767 /* method hash_collection$HashMapIterator$map for (self: HashMapIterator[nullable Object, nullable Object]): HashMap[nullable Object, nullable Object] */
2768 val* core__hash_collection___core__hash_collection__HashMapIterator___map(val* self) {
2769 val* var /* : HashMap[nullable Object, nullable Object] */;
2770 val* var1 /* : HashMap[nullable Object, nullable Object] */;
2771 var1 = self->attrs[COLOR_core__hash_collection__HashMapIterator___map].val; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2772 if (unlikely(var1 == NULL)) {
2773 if(catchStack.cursor >= 0){
2774 longjmp(catchStack.envs[catchStack.cursor], 1);
2775 }
2776 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2777 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 411);
2778 fatal_exit(1);
2779 }
2780 var = var1;
2781 RET_LABEL:;
2782 return var;
2783 }
2784 /* method hash_collection$HashMapIterator$map= for (self: HashMapIterator[nullable Object, nullable Object], HashMap[nullable Object, nullable Object]) */
2785 void core__hash_collection___core__hash_collection__HashMapIterator___map_61d(val* self, val* p0) {
2786 short int var /* : Bool */;
2787 int cltype;
2788 int idtype;
2789 const struct type* type_struct;
2790 const char* var_class_name;
2791 /* Covariant cast for argument 0 (map) <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2792 /* <p0:HashMap[nullable Object, nullable Object]> isa HashMap[K, V] */
2793 type_struct = self->type->resolution_table->types[COLOR_core__HashMap__core__hash_collection__HashMapIterator___35dK__core__hash_collection__HashMapIterator___35dV];
2794 cltype = type_struct->color;
2795 idtype = type_struct->id;
2796 if(cltype >= p0->type->table_size) {
2797 var = 0;
2798 } else {
2799 var = p0->type->type_table[cltype] == idtype;
2800 }
2801 if (unlikely(!var)) {
2802 var_class_name = p0 == NULL ? "null" : p0->type->name;
2803 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name);
2804 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 411);
2805 fatal_exit(1);
2806 }
2807 self->attrs[COLOR_core__hash_collection__HashMapIterator___map].val = p0; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2808 RET_LABEL:;
2809 }
2810 /* method hash_collection$HashMapIterator$init for (self: HashMapIterator[nullable Object, nullable Object]) */
2811 void core__hash_collection___core__hash_collection__HashMapIterator___core__kernel__Object__init(val* self) {
2812 val* var /* : HashMap[nullable Object, nullable Object] */;
2813 val* var2 /* : HashMap[nullable Object, nullable Object] */;
2814 val* var3 /* : HashMap[nullable Object, nullable Object] */;
2815 val* var4 /* : nullable HashNode[nullable Object] */;
2816 {
2817 ((void(*)(val* self))(self->class->vft[COLOR_core__hash_collection___core__hash_collection__HashMapIterator___core__kernel__Object__init]))(self); /* init on <self:HashMapIterator[nullable Object, nullable Object]>*/
2818 }
2819 {
2820 { /* Inline hash_collection$HashMapIterator$map (self) on <self:HashMapIterator[nullable Object, nullable Object]> */
2821 var2 = self->attrs[COLOR_core__hash_collection__HashMapIterator___map].val; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2822 if (unlikely(var2 == NULL)) {
2823 if(catchStack.cursor >= 0){
2824 longjmp(catchStack.envs[catchStack.cursor], 1);
2825 }
2826 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2827 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 411);
2828 fatal_exit(1);
2829 }
2830 var = var2;
2831 RET_LABEL1:(void)0;
2832 }
2833 }
2834 self->attrs[COLOR_core__hash_collection__HashMapIterator___map].val = var; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2835 var3 = self->attrs[COLOR_core__hash_collection__HashMapIterator___map].val; /* _map on <self:HashMapIterator[nullable Object, nullable Object]> */
2836 if (unlikely(var3 == NULL)) {
2837 if(catchStack.cursor >= 0){
2838 longjmp(catchStack.envs[catchStack.cursor], 1);
2839 }
2840 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2841 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 420);
2842 fatal_exit(1);
2843 }
2844 var4 = var3->attrs[COLOR_core__hash_collection__HashCollection___first_item].val; /* _first_item on <var3:HashMap[nullable Object, nullable Object]> */
2845 self->attrs[COLOR_core__hash_collection__HashMapIterator___node].val = var4; /* _node on <self:HashMapIterator[nullable Object, nullable Object]> */
2846 RET_LABEL:;
2847 }
2848 /* method hash_collection$HashSet$length for (self: HashSet[nullable Object]): Int */
2849 long core___core__HashSet___core__abstract_collection__Collection__length(val* self) {
2850 long var /* : Int */;
2851 long var1 /* : Int */;
2852 var1 = self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashSet[nullable Object]> */
2853 var = var1;
2854 goto RET_LABEL;
2855 RET_LABEL:;
2856 return var;
2857 }
2858 /* method hash_collection$HashSet$is_empty for (self: HashSet[nullable Object]): Bool */
2859 short int core___core__HashSet___core__abstract_collection__Collection__is_empty(val* self) {
2860 short int var /* : Bool */;
2861 long var1 /* : Int */;
2862 short int var2 /* : Bool */;
2863 short int var4 /* : Bool */;
2864 var1 = self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashSet[nullable Object]> */
2865 {
2866 { /* Inline kernel$Int$== (var1,0l) on <var1:Int> */
2867 var4 = var1 == 0l;
2868 var2 = var4;
2869 goto RET_LABEL3;
2870 RET_LABEL3:(void)0;
2871 }
2872 }
2873 var = var2;
2874 goto RET_LABEL;
2875 RET_LABEL:;
2876 return var;
2877 }
2878 /* method hash_collection$HashSet$first for (self: HashSet[nullable Object]): nullable Object */
2879 val* core___core__HashSet___core__abstract_collection__Collection__first(val* self) {
2880 val* var /* : nullable Object */;
2881 long var1 /* : Int */;
2882 short int var2 /* : Bool */;
2883 short int var4 /* : Bool */;
2884 int cltype;
2885 int idtype;
2886 const char* var_class_name;
2887 short int var5 /* : Bool */;
2888 val* var6 /* : nullable HashNode[nullable Object] */;
2889 val* var7 /* : nullable Object */;
2890 var1 = self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l; /* _the_length on <self:HashSet[nullable Object]> */
2891 {
2892 { /* Inline kernel$Int$> (var1,0l) on <var1:Int> */
2893 /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */
2894 /* <0l:Int> isa OTHER */
2895 var4 = 1; /* easy <0l:Int> isa OTHER*/
2896 if (unlikely(!var4)) {
2897 var_class_name = type_core__Int.name;
2898 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name);
2899 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 727);
2900 fatal_exit(1);
2901 }
2902 var5 = var1 > 0l;
2903 var2 = var5;
2904 goto RET_LABEL3;
2905 RET_LABEL3:(void)0;
2906 }
2907 }
2908 if (unlikely(!var2)) {
2909 if(catchStack.cursor >= 0){
2910 longjmp(catchStack.envs[catchStack.cursor], 1);
2911 }
2912 PRINT_ERROR("Runtime error: %s", "Assert failed");
2913 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 438);
2914 fatal_exit(1);
2915 }
2916 var6 = self->attrs[COLOR_core__hash_collection__HashCollection___first_item].val; /* _first_item on <self:HashSet[nullable Object]> */
2917 if (unlikely(var6 == NULL)) {
2918 if(catchStack.cursor >= 0){
2919 longjmp(catchStack.envs[catchStack.cursor], 1);
2920 }
2921 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2922 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 439);
2923 fatal_exit(1);
2924 }
2925 var7 = var6->attrs[COLOR_core__hash_collection__HashNode___key].val; /* _key on <var6:nullable HashNode[nullable Object](nullable HashSetNode[nullable Object])> */
2926 var = var7;
2927 goto RET_LABEL;
2928 RET_LABEL:;
2929 return var;
2930 }
2931 /* method hash_collection$HashSet$has for (self: HashSet[nullable Object], nullable Object): Bool */
2932 short int core___core__HashSet___core__abstract_collection__Collection__has(val* self, val* p0) {
2933 short int var /* : Bool */;
2934 val* var_item /* var item: nullable Object */;
2935 val* var1 /* : nullable HashNode[nullable Object] */;
2936 short int var2 /* : Bool */;
2937 short int var3 /* : Bool */;
2938 val* var_other /* var other: nullable Object */;
2939 short int var5 /* : Bool */;
2940 short int var6 /* : Bool */;
2941 var_item = p0;
2942 {
2943 var1 = core__hash_collection___core__hash_collection__HashCollection___node_at(self, var_item);
2944 }
2945 if (var1 == NULL) {
2946 var2 = 0; /* is null */
2947 } else {
2948 var2 = 1; /* arg is null and recv is not */
2949 }
2950 if (0) {
2951 { /* Inline kernel$Object$!= (var1,((val*)NULL)) on <var1:nullable HashNode[nullable Object](nullable HashSetNode[nullable Object])> */
2952 var_other = ((val*)NULL);
2953 {
2954 var5 = ((short int(*)(val* self, val* p0))(var1->class->vft[COLOR_core__kernel__Object___61d_61d]))(var1, var_other); /* == on <var1:nullable HashNode[nullable Object](HashSetNode[nullable Object])>*/
2955 }
2956 var6 = !var5;
2957 var3 = var6;
2958 goto RET_LABEL4;
2959 RET_LABEL4:(void)0;
2960 }
2961 var2 = var3;
2962 }
2963 var = var2;
2964 goto RET_LABEL;
2965 RET_LABEL:;
2966 return var;
2967 }
2968 /* method hash_collection$HashSet$add for (self: HashSet[nullable Object], nullable Object) */
2969 void core___core__HashSet___core__abstract_collection__SimpleCollection__add(val* self, val* p0) {
2970 short int var /* : Bool */;
2971 int cltype;
2972 int idtype;
2973 const struct type* type_struct;
2974 short int is_nullable;
2975 const char* var_class_name;
2976 val* var_item /* var item: nullable Object */;
2977 long var1 /* : Int */;
2978 short int var2 /* : Bool */;
2979 short int var4 /* : Bool */;
2980 long var5 /* : Int */;
2981 long var_i /* var i: Int */;
2982 val* var6 /* : nullable HashNode[nullable Object] */;
2983 val* var_c /* var c: nullable HashSetNode[nullable Object] */;
2984 short int var7 /* : Bool */;
2985 short int var8 /* : Bool */;
2986 val* var_other /* var other: nullable Object */;
2987 short int var10 /* : Bool */;
2988 short int var11 /* : Bool */;
2989 val* var12 /* : HashSetNode[nullable Object] */;
2990 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
2991 /* <p0:nullable Object> isa E */
2992 type_struct = self->type->resolution_table->types[COLOR_core__HashSet___35dE];
2993 cltype = type_struct->color;
2994 idtype = type_struct->id;
2995 is_nullable = type_struct->is_nullable;
2996 if(p0 == NULL) {
2997 var = is_nullable;
2998 } else {
2999 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
3000 var = 0;
3001 } else {
3002 var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
3003 }
3004 }
3005 if (unlikely(!var)) {
3006 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
3007 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name);
3008 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 447);
3009 fatal_exit(1);
3010 }
3011 var_item = p0;
3012 var1 = self->attrs[COLOR_core__hash_collection__HashCollection___capacity].l; /* _capacity on <self:HashSet[nullable Object]> */
3013 {
3014 { /* Inline kernel$Int$== (var1,0l) on <var1:Int> */
3015 var4 = var1 == 0l;
3016 var2 = var4;
3017 goto RET_LABEL3;
3018 RET_LABEL3:(void)0;
3019 }
3020 }
3021 if (var2){
3022 {
3023 core__hash_collection___core__hash_collection__HashCollection___enlarge(self, 17l); /* Direct call hash_collection$HashCollection$enlarge on <self:HashSet[nullable Object]>*/
3024 }
3025 } else {
3026 }
3027 {
3028 var5 = core__hash_collection___core__hash_collection__HashCollection___index_at(self, var_item);
3029 }
3030 var_i = var5;
3031 {
3032 var6 = core__hash_collection___core__hash_collection__HashCollection___node_at_idx(self, var_i, var_item);
3033 }
3034 var_c = var6;
3035 if (var_c == NULL) {
3036 var7 = 0; /* is null */
3037 } else {
3038 var7 = 1; /* arg is null and recv is not */
3039 }
3040 if (0) {
3041 { /* Inline kernel$Object$!= (var_c,((val*)NULL)) on <var_c:nullable HashSetNode[nullable Object]> */
3042 var_other = ((val*)NULL);
3043 {
3044 var10 = ((short int(*)(val* self, val* p0))(var_c->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_c, var_other); /* == on <var_c:nullable HashSetNode[nullable Object](HashSetNode[nullable Object])>*/
3045 }
3046 var11 = !var10;
3047 var8 = var11;
3048 goto RET_LABEL9;
3049 RET_LABEL9:(void)0;
3050 }
3051 var7 = var8;
3052 }
3053 if (var7){
3054 var_c->attrs[COLOR_core__hash_collection__HashNode___key].val = var_item; /* _key on <var_c:nullable HashSetNode[nullable Object](HashSetNode[nullable Object])> */
3055 } else {
3056 var12 = NEW_core__hash_collection__HashSetNode(self->type->resolution_table->types[COLOR_core__hash_collection__HashSetNode__core__HashSet___35dE]);
3057 {
3058 ((void(*)(val* self, val* p0))(var12->class->vft[COLOR_core__hash_collection__HashNode__key_61d]))(var12, var_item); /* key= on <var12:HashSetNode[nullable Object]>*/
3059 }
3060 {
3061 ((void(*)(val* self))(var12->class->vft[COLOR_core__kernel__Object__init]))(var12); /* init on <var12:HashSetNode[nullable Object]>*/
3062 }
3063 {
3064 core__hash_collection___core__hash_collection__HashCollection___store(self, var_i, var12); /* Direct call hash_collection$HashCollection$store on <self:HashSet[nullable Object]>*/
3065 }
3066 }
3067 RET_LABEL:;
3068 }
3069 /* method hash_collection$HashSet$remove for (self: HashSet[nullable Object], nullable Object) */
3070 void core___core__HashSet___core__abstract_collection__RemovableCollection__remove(val* self, val* p0) {
3071 val* var_item /* var item: nullable Object */;
3072 var_item = p0;
3073 {
3074 core__hash_collection___core__hash_collection__HashCollection___remove_node(self, var_item); /* Direct call hash_collection$HashCollection$remove_node on <self:HashSet[nullable Object]>*/
3075 }
3076 RET_LABEL:;
3077 }
3078 /* method hash_collection$HashSet$clear for (self: HashSet[nullable Object]) */
3079 void core___core__HashSet___core__abstract_collection__RemovableCollection__clear(val* self) {
3080 {
3081 core__hash_collection___core__hash_collection__HashCollection___raz(self); /* Direct call hash_collection$HashCollection$raz on <self:HashSet[nullable Object]>*/
3082 }
3083 RET_LABEL:;
3084 }
3085 /* method hash_collection$HashSet$iterator for (self: HashSet[nullable Object]): Iterator[nullable Object] */
3086 val* core___core__HashSet___core__abstract_collection__Collection__iterator(val* self) {
3087 val* var /* : Iterator[nullable Object] */;
3088 val* var1 /* : HashSetIterator[nullable Object] */;
3089 var1 = NEW_core__hash_collection__HashSetIterator(self->type->resolution_table->types[COLOR_core__hash_collection__HashSetIterator__core__HashSet___35dE]);
3090 {
3091 ((void(*)(val* self, val* p0))(var1->class->vft[COLOR_core__hash_collection__HashSetIterator__set_61d]))(var1, self); /* set= on <var1:HashSetIterator[nullable Object]>*/
3092 }
3093 {
3094 ((void(*)(val* self))(var1->class->vft[COLOR_core__kernel__Object__init]))(var1); /* init on <var1:HashSetIterator[nullable Object]>*/
3095 }
3096 var = var1;
3097 goto RET_LABEL;
3098 RET_LABEL:;
3099 return var;
3100 }
3101 /* method hash_collection$HashSet$init for (self: HashSet[nullable Object]) */
3102 void core___core__HashSet___core__kernel__Object__init(val* self) {
3103 {
3104 ((void(*)(val* self))(self->class->vft[COLOR_core___core__HashSet___core__kernel__Object__init]))(self); /* init on <self:HashSet[nullable Object]>*/
3105 }
3106 self->attrs[COLOR_core__hash_collection__HashCollection___capacity].l = 0l; /* _capacity on <self:HashSet[nullable Object]> */
3107 self->attrs[COLOR_core__hash_collection__HashCollection___the_length].l = 0l; /* _the_length on <self:HashSet[nullable Object]> */
3108 RET_LABEL:;
3109 }
3110 /* method hash_collection$HashSet$from for (self: HashSet[nullable Object], Collection[nullable Object]) */
3111 void core___core__HashSet___from(val* self, val* p0) {
3112 short int var /* : Bool */;
3113 int cltype;
3114 int idtype;
3115 const struct type* type_struct;
3116 const char* var_class_name;
3117 val* var_coll /* var coll: Collection[nullable Object] */;
3118 /* Covariant cast for argument 0 (coll) <p0:Collection[nullable Object]> isa Collection[E] */
3119 /* <p0:Collection[nullable Object]> isa Collection[E] */
3120 type_struct = self->type->resolution_table->types[COLOR_core__Collection__core__HashSet___35dE];
3121 cltype = type_struct->color;
3122 idtype = type_struct->id;
3123 if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) {
3124 var = 0;
3125 } else {
3126 var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype;
3127 }
3128 if (unlikely(!var)) {
3129 var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name;
3130 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name);
3131 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 471);
3132 fatal_exit(1);
3133 }
3134 var_coll = p0;
3135 {
3136 core___core__HashSet___core__kernel__Object__init(self); /* Direct call hash_collection$HashSet$init on <self:HashSet[nullable Object]>*/
3137 }
3138 {
3139 core___core__SimpleCollection___add_all(self, var_coll); /* Direct call abstract_collection$SimpleCollection$add_all on <self:HashSet[nullable Object]>*/
3140 }
3141 RET_LABEL:;
3142 }
3143 /* method hash_collection$HashSet$new_set for (self: HashSet[nullable Object]): Set[nullable Object] */
3144 val* core___core__HashSet___core__abstract_collection__Set__new_set(val* self) {
3145 val* var /* : Set[nullable Object] */;
3146 val* var1 /* : HashSet[nullable Object] */;
3147 var1 = NEW_core__HashSet(self->type->resolution_table->types[COLOR_core__HashSet__core__HashSet___35dE]);
3148 {
3149 core___core__HashSet___core__kernel__Object__init(var1); /* Direct call hash_collection$HashSet$init on <var1:HashSet[nullable Object]>*/
3150 }
3151 var = var1;
3152 goto RET_LABEL;
3153 RET_LABEL:;
3154 return var;
3155 }
3156 /* method hash_collection$HashSetIterator$is_ok for (self: HashSetIterator[nullable Object]): Bool */
3157 short int core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__is_ok(val* self) {
3158 short int var /* : Bool */;
3159 val* var1 /* : nullable HashSetNode[nullable Object] */;
3160 short int var2 /* : Bool */;
3161 short int var3 /* : Bool */;
3162 val* var_other /* var other: nullable Object */;
3163 short int var5 /* : Bool */;
3164 short int var6 /* : Bool */;
3165 var1 = self->attrs[COLOR_core__hash_collection__HashSetIterator___node].val; /* _node on <self:HashSetIterator[nullable Object]> */
3166 if (var1 == NULL) {
3167 var2 = 0; /* is null */
3168 } else {
3169 var2 = 1; /* arg is null and recv is not */
3170 }
3171 if (0) {
3172 { /* Inline kernel$Object$!= (var1,((val*)NULL)) on <var1:nullable HashSetNode[nullable Object]> */
3173 var_other = ((val*)NULL);
3174 {
3175 var5 = ((short int(*)(val* self, val* p0))(var1->class->vft[COLOR_core__kernel__Object___61d_61d]))(var1, var_other); /* == on <var1:nullable HashSetNode[nullable Object](HashSetNode[nullable Object])>*/
3176 }
3177 var6 = !var5;
3178 var3 = var6;
3179 goto RET_LABEL4;
3180 RET_LABEL4:(void)0;
3181 }
3182 var2 = var3;
3183 }
3184 var = var2;
3185 goto RET_LABEL;
3186 RET_LABEL:;
3187 return var;
3188 }
3189 /* method hash_collection$HashSetIterator$item for (self: HashSetIterator[nullable Object]): nullable Object */
3190 val* core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__item(val* self) {
3191 val* var /* : nullable Object */;
3192 short int var1 /* : Bool */;
3193 val* var2 /* : nullable HashSetNode[nullable Object] */;
3194 val* var3 /* : nullable Object */;
3195 {
3196 var1 = core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__is_ok(self);
3197 }
3198 if (unlikely(!var1)) {
3199 if(catchStack.cursor >= 0){
3200 longjmp(catchStack.envs[catchStack.cursor], 1);
3201 }
3202 PRINT_ERROR("Runtime error: %s", "Assert failed");
3203 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 491);
3204 fatal_exit(1);
3205 }
3206 var2 = self->attrs[COLOR_core__hash_collection__HashSetIterator___node].val; /* _node on <self:HashSetIterator[nullable Object]> */
3207 if (unlikely(var2 == NULL)) {
3208 if(catchStack.cursor >= 0){
3209 longjmp(catchStack.envs[catchStack.cursor], 1);
3210 }
3211 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3212 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 492);
3213 fatal_exit(1);
3214 }
3215 var3 = var2->attrs[COLOR_core__hash_collection__HashNode___key].val; /* _key on <var2:nullable HashSetNode[nullable Object]> */
3216 var = var3;
3217 goto RET_LABEL;
3218 RET_LABEL:;
3219 return var;
3220 }
3221 /* method hash_collection$HashSetIterator$next for (self: HashSetIterator[nullable Object]) */
3222 void core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__next(val* self) {
3223 short int var /* : Bool */;
3224 val* var1 /* : nullable HashSetNode[nullable Object] */;
3225 val* var2 /* : nullable HashNode[nullable Object] */;
3226 {
3227 var = core__hash_collection___core__hash_collection__HashSetIterator___core__abstract_collection__Iterator__is_ok(self);
3228 }
3229 if (unlikely(!var)) {
3230 if(catchStack.cursor >= 0){
3231 longjmp(catchStack.envs[catchStack.cursor], 1);
3232 }
3233 PRINT_ERROR("Runtime error: %s", "Assert failed");
3234 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 497);
3235 fatal_exit(1);
3236 }
3237 var1 = self->attrs[COLOR_core__hash_collection__HashSetIterator___node].val; /* _node on <self:HashSetIterator[nullable Object]> */
3238 if (unlikely(var1 == NULL)) {
3239 if(catchStack.cursor >= 0){
3240 longjmp(catchStack.envs[catchStack.cursor], 1);
3241 }
3242 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3243 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 498);
3244 fatal_exit(1);
3245 }
3246 var2 = var1->attrs[COLOR_core__hash_collection__HashNode___next_item].val; /* _next_item on <var1:nullable HashSetNode[nullable Object]> */
3247 self->attrs[COLOR_core__hash_collection__HashSetIterator___node].val = var2; /* _node on <self:HashSetIterator[nullable Object]> */
3248 RET_LABEL:;
3249 }
3250 /* method hash_collection$HashSetIterator$set= for (self: HashSetIterator[nullable Object], HashSet[nullable Object]) */
3251 void core__hash_collection___core__hash_collection__HashSetIterator___set_61d(val* self, val* p0) {
3252 short int var /* : Bool */;
3253 int cltype;
3254 int idtype;
3255 const struct type* type_struct;
3256 const char* var_class_name;
3257 /* Covariant cast for argument 0 (set) <p0:HashSet[nullable Object]> isa HashSet[E] */
3258 /* <p0:HashSet[nullable Object]> isa HashSet[E] */
3259 type_struct = self->type->resolution_table->types[COLOR_core__HashSet__core__hash_collection__HashSetIterator___35dE];
3260 cltype = type_struct->color;
3261 idtype = type_struct->id;
3262 if(cltype >= p0->type->table_size) {
3263 var = 0;
3264 } else {
3265 var = p0->type->type_table[cltype] == idtype;
3266 }
3267 if (unlikely(!var)) {
3268 var_class_name = p0 == NULL ? "null" : p0->type->name;
3269 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSet[E]", var_class_name);
3270 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 501);
3271 fatal_exit(1);
3272 }
3273 self->attrs[COLOR_core__hash_collection__HashSetIterator___set].val = p0; /* _set on <self:HashSetIterator[nullable Object]> */
3274 RET_LABEL:;
3275 }
3276 /* method hash_collection$HashSetIterator$init for (self: HashSetIterator[nullable Object]) */
3277 void core__hash_collection___core__hash_collection__HashSetIterator___core__kernel__Object__init(val* self) {
3278 val* var /* : HashSet[nullable Object] */;
3279 val* var1 /* : nullable HashNode[nullable Object] */;
3280 {
3281 ((void(*)(val* self))(self->class->vft[COLOR_core__hash_collection___core__hash_collection__HashSetIterator___core__kernel__Object__init]))(self); /* init on <self:HashSetIterator[nullable Object]>*/
3282 }
3283 var = self->attrs[COLOR_core__hash_collection__HashSetIterator___set].val; /* _set on <self:HashSetIterator[nullable Object]> */
3284 if (unlikely(var == NULL)) {
3285 if(catchStack.cursor >= 0){
3286 longjmp(catchStack.envs[catchStack.cursor], 1);
3287 }
3288 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _set");
3289 PRINT_ERROR(" (%s:%d)\n", FILE_core__hash_collection, 509);
3290 fatal_exit(1);
3291 }
3292 var1 = var->attrs[COLOR_core__hash_collection__HashCollection___first_item].val; /* _first_item on <var:HashSet[nullable Object]> */
3293 self->attrs[COLOR_core__hash_collection__HashSetIterator___node].val = var1; /* _node on <self:HashSetIterator[nullable Object]> */
3294 RET_LABEL:;
3295 }