1 #include "more_collections.sep.0.h"
2 /* method more_collections$MultiHashMap$add_one for (self: MultiHashMap[nullable Object, nullable Object], nullable Object, nullable Object) */
3 void more_collections___more_collections__MultiHashMap___add_one(val
* self
, val
* p0
, val
* p1
) {
4 short int var
/* : Bool */;
7 const struct type
* type_struct
;
9 const char* var_class_name
;
10 short int var1
/* : Bool */;
13 const struct type
* type_struct4
;
14 short int is_nullable5
;
15 const char* var_class_name6
;
16 val
* var_k
/* var k: nullable Object */;
17 val
* var_v
/* var v: nullable Object */;
18 val
* var7
/* : nullable Object */;
19 val
* var_x
/* var x: nullable Array[nullable Object] */;
20 short int var8
/* : Bool */;
21 short int var9
/* : Bool */;
22 val
* var_other
/* var other: nullable Object */;
23 short int var11
/* : Bool */;
24 short int var12
/* : Bool */;
25 val
* var13
/* : Array[nullable Object] */;
26 val
* var_
/* var : Array[nullable Object] */;
27 /* Covariant cast for argument 0 (k) <p0:nullable Object> isa K */
28 /* <p0:nullable Object> isa K */
29 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__MultiHashMap___35dK
];
30 cltype
= type_struct
->color
;
31 idtype
= type_struct
->id
;
32 is_nullable
= type_struct
->is_nullable
;
36 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
39 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
43 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
44 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
45 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 37);
48 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa V */
49 /* <p1:nullable Object> isa V */
50 type_struct4
= self
->type
->resolution_table
->types
[COLOR_more_collections__MultiHashMap___35dV
];
51 cltype2
= type_struct4
->color
;
52 idtype3
= type_struct4
->id
;
53 is_nullable5
= type_struct4
->is_nullable
;
57 if(cltype2
>= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->table_size
) {
60 var1
= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->type_table
[cltype2
] == idtype3
;
63 if (unlikely(!var1
)) {
64 var_class_name6
= p1
== NULL ?
"null" : (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->name
;
65 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name6
);
66 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 37);
72 var7
= core___core__HashMap___core__abstract_collection__MapRead__get_or_null(self
, var_k
);
76 var8
= 0; /* is null */
78 var8
= 1; /* arg is null and recv is not */
81 { /* Inline kernel$Object$!= (var_x,((val*)NULL)) on <var_x:nullable Array[nullable Object]> */
82 var_other
= ((val
*)NULL
);
84 var11
= ((short int(*)(val
* self
, val
* p0
))(var_x
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_x
, var_other
); /* == on <var_x:nullable Array[nullable Object](Array[nullable Object])>*/
95 core___core__Array___core__abstract_collection__SimpleCollection__add(var_x
, var_v
); /* Direct call array$Array$add on <var_x:nullable Array[nullable Object](Array[nullable Object])>*/
98 var13
= NEW_core__Array(self
->type
->resolution_table
->types
[COLOR_core__Array__more_collections__MultiHashMap___35dV
]);
100 core___core__Array___with_capacity(var13
, 1l); /* Direct call array$Array$with_capacity on <var13:Array[nullable Object]>*/
104 core___core__AbstractArray___core__abstract_collection__Sequence__push(var_
, var_v
); /* Direct call array$AbstractArray$push on <var_:Array[nullable Object]>*/
107 core___core__HashMap___core__abstract_collection__Map___91d_93d_61d(self
, var_k
, var_
); /* Direct call hash_collection$HashMap$[]= on <self:MultiHashMap[nullable Object, nullable Object]>*/
112 /* method more_collections$MultiHashMap$provide_default_value for (self: MultiHashMap[nullable Object, nullable Object], nullable Object): Array[nullable Object] */
113 val
* more_collections___more_collections__MultiHashMap___core__abstract_collection__MapRead__provide_default_value(val
* self
, val
* p0
) {
114 val
* var
/* : Array[nullable Object] */;
115 val
* var_key
/* var key: nullable Object */;
116 val
* var1
/* : Array[nullable Object] */;
117 val
* var_res
/* var res: Array[nullable Object] */;
118 short int var2
/* : Bool */;
121 const struct type
* type_struct
;
122 short int is_nullable
;
123 const char* var_class_name
;
125 var1
= NEW_core__Array(self
->type
->resolution_table
->types
[COLOR_core__Array__more_collections__MultiHashMap___35dV
]);
127 core___core__Array___core__kernel__Object__init(var1
); /* Direct call array$Array$init on <var1:Array[nullable Object]>*/
130 /* <var_key:nullable Object> isa K */
131 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__MultiHashMap___35dK
];
132 cltype
= type_struct
->color
;
133 idtype
= type_struct
->id
;
134 is_nullable
= type_struct
->is_nullable
;
135 if(var_key
== NULL
) {
138 if(cltype
>= (((long)var_key
&3)?type_info
[((long)var_key
&3)]:var_key
->type
)->table_size
) {
141 var2
= (((long)var_key
&3)?type_info
[((long)var_key
&3)]:var_key
->type
)->type_table
[cltype
] == idtype
;
144 if (unlikely(!var2
)) {
145 var_class_name
= var_key
== NULL ?
"null" : (((long)var_key
&3)?type_info
[((long)var_key
&3)]:var_key
->type
)->name
;
146 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
147 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 51);
151 core___core__HashMap___core__abstract_collection__Map___91d_93d_61d(self
, var_key
, var_res
); /* Direct call hash_collection$HashMap$[]= on <self:MultiHashMap[nullable Object, nullable Object]>*/
158 /* method more_collections$HashMap2$level1 for (self: HashMap2[nullable Object, nullable Object, nullable Object]): HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */
159 val
* more_collections___more_collections__HashMap2___level1(val
* self
) {
160 val
* var
/* : HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
161 val
* var1
/* : HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
162 var1
= self
->attrs
[COLOR_more_collections__HashMap2___level1
].val
; /* _level1 on <self:HashMap2[nullable Object, nullable Object, nullable Object]> */
163 if (unlikely(var1
== NULL
)) {
164 if(catchStack
.cursor
>= 0){
165 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
167 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
168 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 67);
175 /* method more_collections$HashMap2$[] for (self: HashMap2[nullable Object, nullable Object, nullable Object], nullable Object, nullable Object): nullable Object */
176 val
* more_collections___more_collections__HashMap2____91d_93d(val
* self
, val
* p0
, val
* p1
) {
177 val
* var
/* : nullable Object */;
178 short int var1
/* : Bool */;
181 const struct type
* type_struct
;
182 short int is_nullable
;
183 const char* var_class_name
;
184 short int var2
/* : Bool */;
187 const struct type
* type_struct5
;
188 short int is_nullable6
;
189 const char* var_class_name7
;
190 val
* var_k1
/* var k1: nullable Object */;
191 val
* var_k2
/* var k2: nullable Object */;
192 val
* var8
/* : HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
193 val
* var10
/* : HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
194 val
* var_level1
/* var level1: HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
195 val
* var11
/* : nullable Object */;
196 val
* var_level2
/* var level2: nullable HashMap[nullable Object, nullable Object] */;
197 short int var12
/* : Bool */;
198 short int var13
/* : Bool */;
199 val
* var14
/* : nullable Object */;
200 /* Covariant cast for argument 0 (k1) <p0:nullable Object> isa K1 */
201 /* <p0:nullable Object> isa K1 */
202 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2___35dK1
];
203 cltype
= type_struct
->color
;
204 idtype
= type_struct
->id
;
205 is_nullable
= type_struct
->is_nullable
;
209 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
212 var1
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
215 if (unlikely(!var1
)) {
216 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
217 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K1", var_class_name
);
218 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 69);
221 /* Covariant cast for argument 1 (k2) <p1:nullable Object> isa K2 */
222 /* <p1:nullable Object> isa K2 */
223 type_struct5
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2___35dK2
];
224 cltype3
= type_struct5
->color
;
225 idtype4
= type_struct5
->id
;
226 is_nullable6
= type_struct5
->is_nullable
;
230 if(cltype3
>= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->table_size
) {
233 var2
= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->type_table
[cltype3
] == idtype4
;
236 if (unlikely(!var2
)) {
237 var_class_name7
= p1
== NULL ?
"null" : (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->name
;
238 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K2", var_class_name7
);
239 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 69);
245 { /* Inline more_collections$HashMap2$level1 (self) on <self:HashMap2[nullable Object, nullable Object, nullable Object]> */
246 var10
= self
->attrs
[COLOR_more_collections__HashMap2___level1
].val
; /* _level1 on <self:HashMap2[nullable Object, nullable Object, nullable Object]> */
247 if (unlikely(var10
== NULL
)) {
248 if(catchStack
.cursor
>= 0){
249 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
251 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
252 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 67);
261 var11
= core___core__HashMap___core__abstract_collection__MapRead__get_or_null(var_level1
, var_k1
);
264 if (var_level2
== NULL
) {
265 var12
= 1; /* is null */
267 var12
= 0; /* arg is null but recv is not */
270 var13
= core___core__MapRead___core__kernel__Object___61d_61d(var_level2
, ((val
*)NULL
));
279 var14
= core___core__HashMap___core__abstract_collection__MapRead__get_or_null(var_level2
, var_k2
);
286 /* method more_collections$HashMap2$[]= for (self: HashMap2[nullable Object, nullable Object, nullable Object], nullable Object, nullable Object, nullable Object) */
287 void more_collections___more_collections__HashMap2____91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
288 short int var
/* : Bool */;
291 const struct type
* type_struct
;
292 short int is_nullable
;
293 const char* var_class_name
;
294 short int var1
/* : Bool */;
297 const struct type
* type_struct4
;
298 short int is_nullable5
;
299 const char* var_class_name6
;
300 short int var7
/* : Bool */;
303 const struct type
* type_struct10
;
304 short int is_nullable11
;
305 const char* var_class_name12
;
306 val
* var_k1
/* var k1: nullable Object */;
307 val
* var_k2
/* var k2: nullable Object */;
308 val
* var_v
/* var v: nullable Object */;
309 val
* var13
/* : HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
310 val
* var15
/* : HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
311 val
* var_level1
/* var level1: HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
312 val
* var16
/* : nullable Object */;
313 val
* var_level2
/* var level2: nullable HashMap[nullable Object, nullable Object] */;
314 short int var17
/* : Bool */;
315 short int var18
/* : Bool */;
316 val
* var19
/* : HashMap[nullable Object, nullable Object] */;
317 /* Covariant cast for argument 0 (k1) <p0:nullable Object> isa K1 */
318 /* <p0:nullable Object> isa K1 */
319 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2___35dK1
];
320 cltype
= type_struct
->color
;
321 idtype
= type_struct
->id
;
322 is_nullable
= type_struct
->is_nullable
;
326 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
329 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
332 if (unlikely(!var
)) {
333 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
334 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K1", var_class_name
);
335 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 79);
338 /* Covariant cast for argument 1 (k2) <p1:nullable Object> isa K2 */
339 /* <p1:nullable Object> isa K2 */
340 type_struct4
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2___35dK2
];
341 cltype2
= type_struct4
->color
;
342 idtype3
= type_struct4
->id
;
343 is_nullable5
= type_struct4
->is_nullable
;
347 if(cltype2
>= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->table_size
) {
350 var1
= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->type_table
[cltype2
] == idtype3
;
353 if (unlikely(!var1
)) {
354 var_class_name6
= p1
== NULL ?
"null" : (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->name
;
355 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K2", var_class_name6
);
356 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 79);
359 /* Covariant cast for argument 2 (v) <p2:nullable Object> isa V */
360 /* <p2:nullable Object> isa V */
361 type_struct10
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2___35dV
];
362 cltype8
= type_struct10
->color
;
363 idtype9
= type_struct10
->id
;
364 is_nullable11
= type_struct10
->is_nullable
;
366 var7
= is_nullable11
;
368 if(cltype8
>= (((long)p2
&3)?type_info
[((long)p2
&3)]:p2
->type
)->table_size
) {
371 var7
= (((long)p2
&3)?type_info
[((long)p2
&3)]:p2
->type
)->type_table
[cltype8
] == idtype9
;
374 if (unlikely(!var7
)) {
375 var_class_name12
= p2
== NULL ?
"null" : (((long)p2
&3)?type_info
[((long)p2
&3)]:p2
->type
)->name
;
376 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name12
);
377 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 79);
384 { /* Inline more_collections$HashMap2$level1 (self) on <self:HashMap2[nullable Object, nullable Object, nullable Object]> */
385 var15
= self
->attrs
[COLOR_more_collections__HashMap2___level1
].val
; /* _level1 on <self:HashMap2[nullable Object, nullable Object, nullable Object]> */
386 if (unlikely(var15
== NULL
)) {
387 if(catchStack
.cursor
>= 0){
388 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
390 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
391 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 67);
400 var16
= core___core__HashMap___core__abstract_collection__MapRead__get_or_null(var_level1
, var_k1
);
403 if (var_level2
== NULL
) {
404 var17
= 1; /* is null */
406 var17
= 0; /* arg is null but recv is not */
409 var18
= core___core__MapRead___core__kernel__Object___61d_61d(var_level2
, ((val
*)NULL
));
413 var19
= NEW_core__HashMap(self
->type
->resolution_table
->types
[COLOR_core__HashMap__more_collections__HashMap2___35dK2__more_collections__HashMap2___35dV
]);
415 core___core__HashMap___core__kernel__Object__init(var19
); /* Direct call hash_collection$HashMap$init on <var19:HashMap[nullable Object, nullable Object]>*/
419 core___core__HashMap___core__abstract_collection__Map___91d_93d_61d(var_level1
, var_k1
, var_level2
); /* Direct call hash_collection$HashMap$[]= on <var_level1:HashMap[nullable Object, HashMap[nullable Object, nullable Object]]>*/
424 core___core__HashMap___core__abstract_collection__Map___91d_93d_61d(var_level2
, var_k2
, var_v
); /* Direct call hash_collection$HashMap$[]= on <var_level2:nullable HashMap[nullable Object, nullable Object](HashMap[nullable Object, nullable Object])>*/
428 /* method more_collections$HashMap3$level1 for (self: HashMap3[nullable Object, nullable Object, nullable Object, nullable Object]): HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */
429 val
* more_collections___more_collections__HashMap3___level1(val
* self
) {
430 val
* var
/* : HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
431 val
* var1
/* : HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
432 var1
= self
->attrs
[COLOR_more_collections__HashMap3___level1
].val
; /* _level1 on <self:HashMap3[nullable Object, nullable Object, nullable Object, nullable Object]> */
433 if (unlikely(var1
== NULL
)) {
434 if(catchStack
.cursor
>= 0){
435 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
437 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
438 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 122);
445 /* method more_collections$HashMap3$[] for (self: HashMap3[nullable Object, nullable Object, nullable Object, nullable Object], nullable Object, nullable Object, nullable Object): nullable Object */
446 val
* more_collections___more_collections__HashMap3____91d_93d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
447 val
* var
/* : nullable Object */;
448 short int var1
/* : Bool */;
451 const struct type
* type_struct
;
452 short int is_nullable
;
453 const char* var_class_name
;
454 short int var2
/* : Bool */;
457 const struct type
* type_struct5
;
458 short int is_nullable6
;
459 const char* var_class_name7
;
460 short int var8
/* : Bool */;
463 const struct type
* type_struct11
;
464 short int is_nullable12
;
465 const char* var_class_name13
;
466 val
* var_k1
/* var k1: nullable Object */;
467 val
* var_k2
/* var k2: nullable Object */;
468 val
* var_k3
/* var k3: nullable Object */;
469 val
* var14
/* : HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
470 val
* var16
/* : HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
471 val
* var_level1
/* var level1: HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
472 val
* var17
/* : nullable Object */;
473 val
* var_level2
/* var level2: nullable HashMap2[nullable Object, nullable Object, nullable Object] */;
474 short int var18
/* : Bool */;
475 short int var19
/* : Bool */;
476 val
* var_other
/* var other: nullable Object */;
477 short int var21
/* : Bool */;
478 short int var23
/* : Bool */;
479 val
* var24
/* : nullable Object */;
480 /* Covariant cast for argument 0 (k1) <p0:nullable Object> isa K1 */
481 /* <p0:nullable Object> isa K1 */
482 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3___35dK1
];
483 cltype
= type_struct
->color
;
484 idtype
= type_struct
->id
;
485 is_nullable
= type_struct
->is_nullable
;
489 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
492 var1
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
495 if (unlikely(!var1
)) {
496 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
497 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K1", var_class_name
);
498 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 124);
501 /* Covariant cast for argument 1 (k2) <p1:nullable Object> isa K2 */
502 /* <p1:nullable Object> isa K2 */
503 type_struct5
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3___35dK2
];
504 cltype3
= type_struct5
->color
;
505 idtype4
= type_struct5
->id
;
506 is_nullable6
= type_struct5
->is_nullable
;
510 if(cltype3
>= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->table_size
) {
513 var2
= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->type_table
[cltype3
] == idtype4
;
516 if (unlikely(!var2
)) {
517 var_class_name7
= p1
== NULL ?
"null" : (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->name
;
518 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K2", var_class_name7
);
519 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 124);
522 /* Covariant cast for argument 2 (k3) <p2:nullable Object> isa K3 */
523 /* <p2:nullable Object> isa K3 */
524 type_struct11
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3___35dK3
];
525 cltype9
= type_struct11
->color
;
526 idtype10
= type_struct11
->id
;
527 is_nullable12
= type_struct11
->is_nullable
;
529 var8
= is_nullable12
;
531 if(cltype9
>= (((long)p2
&3)?type_info
[((long)p2
&3)]:p2
->type
)->table_size
) {
534 var8
= (((long)p2
&3)?type_info
[((long)p2
&3)]:p2
->type
)->type_table
[cltype9
] == idtype10
;
537 if (unlikely(!var8
)) {
538 var_class_name13
= p2
== NULL ?
"null" : (((long)p2
&3)?type_info
[((long)p2
&3)]:p2
->type
)->name
;
539 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K3", var_class_name13
);
540 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 124);
547 { /* Inline more_collections$HashMap3$level1 (self) on <self:HashMap3[nullable Object, nullable Object, nullable Object, nullable Object]> */
548 var16
= self
->attrs
[COLOR_more_collections__HashMap3___level1
].val
; /* _level1 on <self:HashMap3[nullable Object, nullable Object, nullable Object, nullable Object]> */
549 if (unlikely(var16
== NULL
)) {
550 if(catchStack
.cursor
>= 0){
551 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
553 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
554 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 122);
563 var17
= core___core__HashMap___core__abstract_collection__MapRead__get_or_null(var_level1
, var_k1
);
566 if (var_level2
== NULL
) {
567 var18
= 1; /* is null */
569 var18
= 0; /* arg is null but recv is not */
572 { /* Inline kernel$Object$== (var_level2,((val*)NULL)) on <var_level2:nullable HashMap2[nullable Object, nullable Object, nullable Object]> */
573 var_other
= ((val
*)NULL
);
575 { /* Inline kernel$Object$is_same_instance (var_level2,var_other) on <var_level2:nullable HashMap2[nullable Object, nullable Object, nullable Object](HashMap2[nullable Object, nullable Object, nullable Object])> */
576 var23
= var_level2
== var_other
;
594 var24
= more_collections___more_collections__HashMap2____91d_93d(var_level2
, var_k2
, var_k3
);
601 /* method more_collections$HashMap3$[]= for (self: HashMap3[nullable Object, nullable Object, nullable Object, nullable Object], nullable Object, nullable Object, nullable Object, nullable Object) */
602 void more_collections___more_collections__HashMap3____91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
603 short int var
/* : Bool */;
606 const struct type
* type_struct
;
607 short int is_nullable
;
608 const char* var_class_name
;
609 short int var1
/* : Bool */;
612 const struct type
* type_struct4
;
613 short int is_nullable5
;
614 const char* var_class_name6
;
615 short int var7
/* : Bool */;
618 const struct type
* type_struct10
;
619 short int is_nullable11
;
620 const char* var_class_name12
;
621 short int var13
/* : Bool */;
624 const struct type
* type_struct16
;
625 short int is_nullable17
;
626 const char* var_class_name18
;
627 val
* var_k1
/* var k1: nullable Object */;
628 val
* var_k2
/* var k2: nullable Object */;
629 val
* var_k3
/* var k3: nullable Object */;
630 val
* var_v
/* var v: nullable Object */;
631 val
* var19
/* : HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
632 val
* var21
/* : HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
633 val
* var_level1
/* var level1: HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
634 val
* var22
/* : nullable Object */;
635 val
* var_level2
/* var level2: nullable HashMap2[nullable Object, nullable Object, nullable Object] */;
636 short int var23
/* : Bool */;
637 short int var24
/* : Bool */;
638 val
* var_other
/* var other: nullable Object */;
639 short int var26
/* : Bool */;
640 short int var28
/* : Bool */;
641 val
* var29
/* : HashMap2[nullable Object, nullable Object, nullable Object] */;
642 /* Covariant cast for argument 0 (k1) <p0:nullable Object> isa K1 */
643 /* <p0:nullable Object> isa K1 */
644 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3___35dK1
];
645 cltype
= type_struct
->color
;
646 idtype
= type_struct
->id
;
647 is_nullable
= type_struct
->is_nullable
;
651 if(cltype
>= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->table_size
) {
654 var
= (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->type_table
[cltype
] == idtype
;
657 if (unlikely(!var
)) {
658 var_class_name
= p0
== NULL ?
"null" : (((long)p0
&3)?type_info
[((long)p0
&3)]:p0
->type
)->name
;
659 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K1", var_class_name
);
660 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 134);
663 /* Covariant cast for argument 1 (k2) <p1:nullable Object> isa K2 */
664 /* <p1:nullable Object> isa K2 */
665 type_struct4
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3___35dK2
];
666 cltype2
= type_struct4
->color
;
667 idtype3
= type_struct4
->id
;
668 is_nullable5
= type_struct4
->is_nullable
;
672 if(cltype2
>= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->table_size
) {
675 var1
= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->type_table
[cltype2
] == idtype3
;
678 if (unlikely(!var1
)) {
679 var_class_name6
= p1
== NULL ?
"null" : (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->name
;
680 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K2", var_class_name6
);
681 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 134);
684 /* Covariant cast for argument 2 (k3) <p2:nullable Object> isa K3 */
685 /* <p2:nullable Object> isa K3 */
686 type_struct10
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3___35dK3
];
687 cltype8
= type_struct10
->color
;
688 idtype9
= type_struct10
->id
;
689 is_nullable11
= type_struct10
->is_nullable
;
691 var7
= is_nullable11
;
693 if(cltype8
>= (((long)p2
&3)?type_info
[((long)p2
&3)]:p2
->type
)->table_size
) {
696 var7
= (((long)p2
&3)?type_info
[((long)p2
&3)]:p2
->type
)->type_table
[cltype8
] == idtype9
;
699 if (unlikely(!var7
)) {
700 var_class_name12
= p2
== NULL ?
"null" : (((long)p2
&3)?type_info
[((long)p2
&3)]:p2
->type
)->name
;
701 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K3", var_class_name12
);
702 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 134);
705 /* Covariant cast for argument 3 (v) <p3:nullable Object> isa V */
706 /* <p3:nullable Object> isa V */
707 type_struct16
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3___35dV
];
708 cltype14
= type_struct16
->color
;
709 idtype15
= type_struct16
->id
;
710 is_nullable17
= type_struct16
->is_nullable
;
712 var13
= is_nullable17
;
714 if(cltype14
>= (((long)p3
&3)?type_info
[((long)p3
&3)]:p3
->type
)->table_size
) {
717 var13
= (((long)p3
&3)?type_info
[((long)p3
&3)]:p3
->type
)->type_table
[cltype14
] == idtype15
;
720 if (unlikely(!var13
)) {
721 var_class_name18
= p3
== NULL ?
"null" : (((long)p3
&3)?type_info
[((long)p3
&3)]:p3
->type
)->name
;
722 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name18
);
723 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 134);
731 { /* Inline more_collections$HashMap3$level1 (self) on <self:HashMap3[nullable Object, nullable Object, nullable Object, nullable Object]> */
732 var21
= self
->attrs
[COLOR_more_collections__HashMap3___level1
].val
; /* _level1 on <self:HashMap3[nullable Object, nullable Object, nullable Object, nullable Object]> */
733 if (unlikely(var21
== NULL
)) {
734 if(catchStack
.cursor
>= 0){
735 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
737 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
738 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 122);
747 var22
= core___core__HashMap___core__abstract_collection__MapRead__get_or_null(var_level1
, var_k1
);
750 if (var_level2
== NULL
) {
751 var23
= 1; /* is null */
753 var23
= 0; /* arg is null but recv is not */
756 { /* Inline kernel$Object$== (var_level2,((val*)NULL)) on <var_level2:nullable HashMap2[nullable Object, nullable Object, nullable Object]> */
757 var_other
= ((val
*)NULL
);
759 { /* Inline kernel$Object$is_same_instance (var_level2,var_other) on <var_level2:nullable HashMap2[nullable Object, nullable Object, nullable Object](HashMap2[nullable Object, nullable Object, nullable Object])> */
760 var28
= var_level2
== var_other
;
773 var29
= NEW_more_collections__HashMap2(self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2__more_collections__HashMap3___35dK2__more_collections__HashMap3___35dK3__more_collections__HashMap3___35dV
]);
775 { /* Inline kernel$Object$init (var29) on <var29:HashMap2[nullable Object, nullable Object, nullable Object]> */
781 core___core__HashMap___core__abstract_collection__Map___91d_93d_61d(var_level1
, var_k1
, var_level2
); /* Direct call hash_collection$HashMap$[]= on <var_level1:HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]]>*/
786 more_collections___more_collections__HashMap2____91d_93d_61d(var_level2
, var_k2
, var_k3
, var_v
); /* Direct call more_collections$HashMap2$[]= on <var_level2:nullable HashMap2[nullable Object, nullable Object, nullable Object](HashMap2[nullable Object, nullable Object, nullable Object])>*/
790 /* method more_collections$BestDistance$best_distance for (self: BestDistance[nullable Object]): Int */
791 long more_collections___more_collections__BestDistance___best_distance(val
* self
) {
792 long var
/* : Int */;
793 long var1
/* : Int */;
794 var1
= self
->attrs
[COLOR_more_collections__BestDistance___best_distance
].l
; /* _best_distance on <self:BestDistance[nullable Object]> */
799 /* method more_collections$BestDistance$best_distance= for (self: BestDistance[nullable Object], Int) */
800 void more_collections___more_collections__BestDistance___best_distance_61d(val
* self
, long p0
) {
801 self
->attrs
[COLOR_more_collections__BestDistance___best_distance
].l
= p0
; /* _best_distance on <self:BestDistance[nullable Object]> */
804 /* method more_collections$BestDistance$best_items for (self: BestDistance[nullable Object]): Set[nullable Object] */
805 val
* more_collections___more_collections__BestDistance___best_items(val
* self
) {
806 val
* var
/* : Set[nullable Object] */;
807 val
* var1
/* : Set[nullable Object] */;
808 var1
= self
->attrs
[COLOR_more_collections__BestDistance___best_items
].val
; /* _best_items on <self:BestDistance[nullable Object]> */
809 if (unlikely(var1
== NULL
)) {
810 if(catchStack
.cursor
>= 0){
811 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
813 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _best_items");
814 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 562);
821 /* method more_collections$BestDistance$update for (self: BestDistance[nullable Object], Int, nullable Object): Bool */
822 short int more_collections___more_collections__BestDistance___update(val
* self
, long p0
, val
* p1
) {
823 short int var
/* : Bool */;
824 short int var1
/* : Bool */;
827 const struct type
* type_struct
;
828 short int is_nullable
;
829 const char* var_class_name
;
830 long var_distance
/* var distance: Int */;
831 val
* var_candidate
/* var candidate: nullable Object */;
832 long var2
/* : Int */;
833 long var4
/* : Int */;
834 short int var5
/* : Bool */;
835 short int var7
/* : Bool */;
838 const char* var_class_name10
;
839 short int var11
/* : Bool */;
840 long var12
/* : Int */;
841 long var14
/* : Int */;
842 short int var15
/* : Bool */;
843 short int var17
/* : Bool */;
846 const char* var_class_name20
;
847 short int var21
/* : Bool */;
848 val
* var23
/* : Set[nullable Object] */;
849 val
* var25
/* : Set[nullable Object] */;
850 val
* var26
/* : Set[nullable Object] */;
851 val
* var28
/* : Set[nullable Object] */;
852 /* Covariant cast for argument 1 (candidate) <p1:nullable Object> isa E */
853 /* <p1:nullable Object> isa E */
854 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__BestDistance___35dE
];
855 cltype
= type_struct
->color
;
856 idtype
= type_struct
->id
;
857 is_nullable
= type_struct
->is_nullable
;
861 if(cltype
>= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->table_size
) {
864 var1
= (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->type_table
[cltype
] == idtype
;
867 if (unlikely(!var1
)) {
868 var_class_name
= p1
== NULL ?
"null" : (((long)p1
&3)?type_info
[((long)p1
&3)]:p1
->type
)->name
;
869 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
870 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 565);
876 { /* Inline more_collections$BestDistance$best_distance (self) on <self:BestDistance[nullable Object]> */
877 var4
= self
->attrs
[COLOR_more_collections__BestDistance___best_distance
].l
; /* _best_distance on <self:BestDistance[nullable Object]> */
883 { /* Inline kernel$Int$> (var_distance,var2) on <var_distance:Int> */
884 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
885 /* <var2:Int> isa OTHER */
886 var7
= 1; /* easy <var2:Int> isa OTHER*/
887 if (unlikely(!var7
)) {
888 var_class_name10
= type_core__Int
.name
;
889 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name10
);
890 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 727);
893 var11
= var_distance
> var2
;
905 { /* Inline more_collections$BestDistance$best_distance (self) on <self:BestDistance[nullable Object]> */
906 var14
= self
->attrs
[COLOR_more_collections__BestDistance___best_distance
].l
; /* _best_distance on <self:BestDistance[nullable Object]> */
912 { /* Inline kernel$Int$< (var_distance,var12) on <var_distance:Int> */
913 /* Covariant cast for argument 0 (i) <var12:Int> isa OTHER */
914 /* <var12:Int> isa OTHER */
915 var17
= 1; /* easy <var12:Int> isa OTHER*/
916 if (unlikely(!var17
)) {
917 var_class_name20
= type_core__Int
.name
;
918 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name20
);
919 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 725);
922 var21
= var_distance
< var12
;
930 { /* Inline more_collections$BestDistance$best_distance= (self,var_distance) on <self:BestDistance[nullable Object]> */
931 self
->attrs
[COLOR_more_collections__BestDistance___best_distance
].l
= var_distance
; /* _best_distance on <self:BestDistance[nullable Object]> */
936 { /* Inline more_collections$BestDistance$best_items (self) on <self:BestDistance[nullable Object]> */
937 var25
= self
->attrs
[COLOR_more_collections__BestDistance___best_items
].val
; /* _best_items on <self:BestDistance[nullable Object]> */
938 if (unlikely(var25
== NULL
)) {
939 if(catchStack
.cursor
>= 0){
940 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
942 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _best_items");
943 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 562);
951 ((void(*)(val
* self
))((((long)var23
&3)?class_info
[((long)var23
&3)]:var23
->class)->vft
[COLOR_core__abstract_collection__RemovableCollection__clear
]))(var23
); /* clear on <var23:Set[nullable Object]>*/
956 { /* Inline more_collections$BestDistance$best_items (self) on <self:BestDistance[nullable Object]> */
957 var28
= self
->attrs
[COLOR_more_collections__BestDistance___best_items
].val
; /* _best_items on <self:BestDistance[nullable Object]> */
958 if (unlikely(var28
== NULL
)) {
959 if(catchStack
.cursor
>= 0){
960 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
962 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _best_items");
963 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections
, 562);
971 ((void(*)(val
* self
, val
* p0
))((((long)var26
&3)?class_info
[((long)var26
&3)]:var26
->class)->vft
[COLOR_core__abstract_collection__SimpleCollection__add
]))(var26
, var_candidate
); /* add on <var26:Set[nullable Object]>*/
978 /* method more_collections$BestDistance$init for (self: BestDistance[nullable Object]) */
979 void more_collections___more_collections__BestDistance___core__kernel__Object__init(val
* self
) {
981 ((void(*)(val
* self
))(self
->class->vft
[COLOR_more_collections___more_collections__BestDistance___core__kernel__Object__init
]))(self
); /* init on <self:BestDistance[nullable Object]>*/