1 #include "more_collections.sep.0.h"
2 /* method more_collections#MultiHashMap#add_one for (self: MultiHashMap[Object, nullable Object], Object, nullable Object) */
3 void more_collections__MultiHashMap__add_one(val
* self
, val
* p0
, val
* p1
) {
4 short int var
/* : Bool */;
7 const struct type
* type_struct
;
8 const char* var_class_name
;
9 short int var1
/* : Bool */;
12 const struct type
* type_struct4
;
13 short int is_nullable
;
14 const char* var_class_name5
;
15 val
* var_k
/* var k: Object */;
16 val
* var_v
/* var v: nullable Object */;
17 short int var6
/* : Bool */;
18 val
* var7
/* : nullable Object */;
19 val
* var8
/* : Array[nullable Object] */;
20 long var9
/* : Int */;
21 val
* var_
/* var : Array[nullable Object] */;
22 /* Covariant cast for argument 0 (k) <p0:Object> isa K */
23 /* <p0:Object> isa K */
24 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__MultiHashMap_FT0
];
25 cltype
= type_struct
->color
;
26 idtype
= type_struct
->id
;
27 if(cltype
>= p0
->type
->table_size
) {
30 var
= p0
->type
->type_table
[cltype
] == idtype
;
33 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
34 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
35 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 35);
38 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa V */
39 /* <p1:nullable Object> isa V */
40 type_struct4
= self
->type
->resolution_table
->types
[COLOR_more_collections__MultiHashMap_FT1
];
41 cltype2
= type_struct4
->color
;
42 idtype3
= type_struct4
->id
;
43 is_nullable
= type_struct4
->is_nullable
;
47 if(cltype2
>= p1
->type
->table_size
) {
50 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
53 if (unlikely(!var1
)) {
54 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
55 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name5
);
56 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 35);
62 var6
= abstract_collection__MapRead__has_key(self
, var_k
);
66 var7
= hash_collection__HashMap___91d_93d(self
, var_k
);
69 array__Array__add(var7
, var_v
); /* Direct call array#Array#add on <var7:nullable Object(Array[nullable Object])>*/
72 var8
= NEW_array__Array(self
->type
->resolution_table
->types
[COLOR_array__Arraymore_collections__MultiHashMap_FT1
]);
75 array__Array__with_capacity(var8
, var9
); /* Direct call array#Array#with_capacity on <var8:Array[nullable Object]>*/
79 array__AbstractArray__push(var_
, var_v
); /* Direct call array#AbstractArray#push on <var_:Array[nullable Object]>*/
82 hash_collection__HashMap___91d_93d_61d(self
, var_k
, var_
); /* Direct call hash_collection#HashMap#[]= on <self:MultiHashMap[Object, nullable Object]>*/
87 /* method more_collections#MultiHashMap#add_one for (self: Object, Object, nullable Object) */
88 void VIRTUAL_more_collections__MultiHashMap__add_one(val
* self
, val
* p0
, val
* p1
) {
89 more_collections__MultiHashMap__add_one(self
, p0
, p1
); /* Direct call more_collections#MultiHashMap#add_one on <self:Object(MultiHashMap[Object, nullable Object])>*/
92 /* method more_collections#MultiHashMap#provide_default_value for (self: MultiHashMap[Object, nullable Object], Object): Array[nullable Object] */
93 val
* more_collections__MultiHashMap__provide_default_value(val
* self
, val
* p0
) {
94 val
* var
/* : Array[nullable Object] */;
95 short int var1
/* : Bool */;
98 const struct type
* type_struct
;
99 const char* var_class_name
;
100 val
* var_key
/* var key: Object */;
101 val
* var2
/* : Array[nullable Object] */;
102 val
* var_res
/* var res: Array[nullable Object] */;
103 /* Covariant cast for argument 0 (key) <p0:Object> isa K */
104 /* <p0:Object> isa K */
105 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
106 cltype
= type_struct
->color
;
107 idtype
= type_struct
->id
;
108 if(cltype
>= p0
->type
->table_size
) {
111 var1
= p0
->type
->type_table
[cltype
] == idtype
;
113 if (unlikely(!var1
)) {
114 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
115 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
116 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 46);
120 var2
= NEW_array__Array(self
->type
->resolution_table
->types
[COLOR_array__Arraymore_collections__MultiHashMap_FT1
]);
122 ((void (*)(val
*))(var2
->class->vft
[COLOR_kernel__Object__init
]))(var2
) /* init on <var2:Array[nullable Object]>*/;
126 hash_collection__HashMap___91d_93d_61d(self
, var_key
, var_res
); /* Direct call hash_collection#HashMap#[]= on <self:MultiHashMap[Object, nullable Object]>*/
133 /* method more_collections#MultiHashMap#provide_default_value for (self: Object, Object): nullable Object */
134 val
* VIRTUAL_more_collections__MultiHashMap__provide_default_value(val
* self
, val
* p0
) {
135 val
* var
/* : nullable Object */;
136 val
* var1
/* : Array[nullable Object] */;
137 var1
= more_collections__MultiHashMap__provide_default_value(self
, p0
);
142 /* method more_collections#MultiHashMap#init for (self: MultiHashMap[Object, nullable Object]) */
143 void more_collections__MultiHashMap__init(val
* self
) {
145 ((void (*)(val
*))(self
->class->vft
[COLOR_more_collections__MultiHashMap__init
]))(self
) /* init on <self:MultiHashMap[Object, nullable Object]>*/;
149 /* method more_collections#MultiHashMap#init for (self: Object) */
150 void VIRTUAL_more_collections__MultiHashMap__init(val
* self
) {
151 { /* Inline more_collections#MultiHashMap#init (self) on <self:Object(MultiHashMap[Object, nullable Object])> */
153 ((void (*)(val
*))(self
->class->vft
[COLOR_more_collections__MultiHashMap__init
]))(self
) /* init on <self:Object(MultiHashMap[Object, nullable Object])>*/;
159 /* method more_collections#HashMap2#level1 for (self: HashMap2[Object, Object, nullable Object]): HashMap[Object, HashMap[Object, nullable Object]] */
160 val
* more_collections__HashMap2__level1(val
* self
) {
161 val
* var
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
162 val
* var1
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
163 var1
= self
->attrs
[COLOR_more_collections__HashMap2___level1
].val
; /* _level1 on <self:HashMap2[Object, Object, nullable Object]> */
164 if (unlikely(var1
== NULL
)) {
165 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
166 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 57);
173 /* method more_collections#HashMap2#level1 for (self: Object): HashMap[Object, HashMap[Object, nullable Object]] */
174 val
* VIRTUAL_more_collections__HashMap2__level1(val
* self
) {
175 val
* var
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
176 val
* var1
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
177 val
* var3
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
178 { /* Inline more_collections#HashMap2#level1 (self) on <self:Object(HashMap2[Object, Object, nullable Object])> */
179 var3
= self
->attrs
[COLOR_more_collections__HashMap2___level1
].val
; /* _level1 on <self:Object(HashMap2[Object, Object, nullable Object])> */
180 if (unlikely(var3
== NULL
)) {
181 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
182 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 57);
192 /* method more_collections#HashMap2#[] for (self: HashMap2[Object, Object, nullable Object], Object, Object): nullable Object */
193 val
* more_collections__HashMap2___91d_93d(val
* self
, val
* p0
, val
* p1
) {
194 val
* var
/* : nullable Object */;
195 short int var1
/* : Bool */;
198 const struct type
* type_struct
;
199 const char* var_class_name
;
200 short int var2
/* : Bool */;
203 const struct type
* type_struct5
;
204 const char* var_class_name6
;
205 val
* var_k1
/* var k1: Object */;
206 val
* var_k2
/* var k2: Object */;
207 val
* var7
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
208 val
* var9
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
209 val
* var_level1
/* var level1: HashMap[Object, HashMap[Object, nullable Object]] */;
210 short int var10
/* : Bool */;
211 short int var11
/* : Bool */;
212 val
* var12
/* : null */;
213 val
* var13
/* : nullable Object */;
214 val
* var_level2
/* var level2: HashMap[Object, nullable Object] */;
215 short int var14
/* : Bool */;
216 short int var15
/* : Bool */;
217 val
* var16
/* : null */;
218 val
* var17
/* : nullable Object */;
219 /* Covariant cast for argument 0 (k1) <p0:Object> isa K1 */
220 /* <p0:Object> isa K1 */
221 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT0
];
222 cltype
= type_struct
->color
;
223 idtype
= type_struct
->id
;
224 if(cltype
>= p0
->type
->table_size
) {
227 var1
= p0
->type
->type_table
[cltype
] == idtype
;
229 if (unlikely(!var1
)) {
230 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
231 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K1", var_class_name
);
232 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 59);
235 /* Covariant cast for argument 1 (k2) <p1:Object> isa K2 */
236 /* <p1:Object> isa K2 */
237 type_struct5
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT1
];
238 cltype3
= type_struct5
->color
;
239 idtype4
= type_struct5
->id
;
240 if(cltype3
>= p1
->type
->table_size
) {
243 var2
= p1
->type
->type_table
[cltype3
] == idtype4
;
245 if (unlikely(!var2
)) {
246 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
247 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K2", var_class_name6
);
248 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 59);
254 { /* Inline more_collections#HashMap2#level1 (self) on <self:HashMap2[Object, Object, nullable Object]> */
255 var9
= self
->attrs
[COLOR_more_collections__HashMap2___level1
].val
; /* _level1 on <self:HashMap2[Object, Object, nullable Object]> */
256 if (unlikely(var9
== NULL
)) {
257 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
258 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 57);
267 var10
= abstract_collection__MapRead__has_key(var_level1
, var_k1
);
277 var13
= hash_collection__HashMap___91d_93d(var_level1
, var_k1
);
281 var14
= abstract_collection__MapRead__has_key(var_level2
, var_k2
);
291 var17
= hash_collection__HashMap___91d_93d(var_level2
, var_k2
);
298 /* method more_collections#HashMap2#[] for (self: Object, Object, Object): nullable Object */
299 val
* VIRTUAL_more_collections__HashMap2___91d_93d(val
* self
, val
* p0
, val
* p1
) {
300 val
* var
/* : nullable Object */;
301 val
* var1
/* : nullable Object */;
302 var1
= more_collections__HashMap2___91d_93d(self
, p0
, p1
);
307 /* method more_collections#HashMap2#[]= for (self: HashMap2[Object, Object, nullable Object], Object, Object, nullable Object) */
308 void more_collections__HashMap2___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
309 short int var
/* : Bool */;
312 const struct type
* type_struct
;
313 const char* var_class_name
;
314 short int var1
/* : Bool */;
317 const struct type
* type_struct4
;
318 const char* var_class_name5
;
319 short int var6
/* : Bool */;
322 const struct type
* type_struct9
;
323 short int is_nullable
;
324 const char* var_class_name10
;
325 val
* var_k1
/* var k1: Object */;
326 val
* var_k2
/* var k2: Object */;
327 val
* var_v
/* var v: nullable Object */;
328 val
* var11
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
329 val
* var13
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
330 val
* var_level1
/* var level1: HashMap[Object, HashMap[Object, nullable Object]] */;
331 short int var14
/* : Bool */;
332 short int var15
/* : Bool */;
333 val
* var16
/* : HashMap[Object, nullable Object] */;
334 val
* var_level2
/* var level2: HashMap[Object, nullable Object] */;
335 val
* var17
/* : nullable Object */;
336 /* Covariant cast for argument 0 (k1) <p0:Object> isa K1 */
337 /* <p0:Object> isa K1 */
338 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT0
];
339 cltype
= type_struct
->color
;
340 idtype
= type_struct
->id
;
341 if(cltype
>= p0
->type
->table_size
) {
344 var
= p0
->type
->type_table
[cltype
] == idtype
;
346 if (unlikely(!var
)) {
347 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
348 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K1", var_class_name
);
349 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 70);
352 /* Covariant cast for argument 1 (k2) <p1:Object> isa K2 */
353 /* <p1:Object> isa K2 */
354 type_struct4
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT1
];
355 cltype2
= type_struct4
->color
;
356 idtype3
= type_struct4
->id
;
357 if(cltype2
>= p1
->type
->table_size
) {
360 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
362 if (unlikely(!var1
)) {
363 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
364 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K2", var_class_name5
);
365 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 70);
368 /* Covariant cast for argument 2 (v) <p2:nullable Object> isa V */
369 /* <p2:nullable Object> isa V */
370 type_struct9
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT2
];
371 cltype7
= type_struct9
->color
;
372 idtype8
= type_struct9
->id
;
373 is_nullable
= type_struct9
->is_nullable
;
377 if(cltype7
>= p2
->type
->table_size
) {
380 var6
= p2
->type
->type_table
[cltype7
] == idtype8
;
383 if (unlikely(!var6
)) {
384 var_class_name10
= p2
== NULL ?
"null" : p2
->type
->name
;
385 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name10
);
386 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 70);
393 { /* Inline more_collections#HashMap2#level1 (self) on <self:HashMap2[Object, Object, nullable Object]> */
394 var13
= self
->attrs
[COLOR_more_collections__HashMap2___level1
].val
; /* _level1 on <self:HashMap2[Object, Object, nullable Object]> */
395 if (unlikely(var13
== NULL
)) {
396 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
397 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 57);
406 var14
= abstract_collection__MapRead__has_key(var_level1
, var_k1
);
410 var16
= NEW_hash_collection__HashMap(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapmore_collections__HashMap2_FT1more_collections__HashMap2_FT2
]);
412 ((void (*)(val
*))(var16
->class->vft
[COLOR_kernel__Object__init
]))(var16
) /* init on <var16:HashMap[Object, nullable Object]>*/;
416 hash_collection__HashMap___91d_93d_61d(var_level1
, var_k1
, var_level2
); /* Direct call hash_collection#HashMap#[]= on <var_level1:HashMap[Object, HashMap[Object, nullable Object]]>*/
420 var17
= hash_collection__HashMap___91d_93d(var_level1
, var_k1
);
425 hash_collection__HashMap___91d_93d_61d(var_level2
, var_k2
, var_v
); /* Direct call hash_collection#HashMap#[]= on <var_level2:HashMap[Object, nullable Object]>*/
429 /* method more_collections#HashMap2#[]= for (self: Object, Object, Object, nullable Object) */
430 void VIRTUAL_more_collections__HashMap2___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
431 more_collections__HashMap2___91d_93d_61d(self
, p0
, p1
, p2
); /* Direct call more_collections#HashMap2#[]= on <self:Object(HashMap2[Object, Object, nullable Object])>*/
434 /* method more_collections#HashMap3#level1 for (self: HashMap3[Object, Object, Object, nullable Object]): HashMap[Object, HashMap2[Object, Object, nullable Object]] */
435 val
* more_collections__HashMap3__level1(val
* self
) {
436 val
* var
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
437 val
* var1
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
438 var1
= self
->attrs
[COLOR_more_collections__HashMap3___level1
].val
; /* _level1 on <self:HashMap3[Object, Object, Object, nullable Object]> */
439 if (unlikely(var1
== NULL
)) {
440 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
441 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 87);
448 /* method more_collections#HashMap3#level1 for (self: Object): HashMap[Object, HashMap2[Object, Object, nullable Object]] */
449 val
* VIRTUAL_more_collections__HashMap3__level1(val
* self
) {
450 val
* var
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
451 val
* var1
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
452 val
* var3
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
453 { /* Inline more_collections#HashMap3#level1 (self) on <self:Object(HashMap3[Object, Object, Object, nullable Object])> */
454 var3
= self
->attrs
[COLOR_more_collections__HashMap3___level1
].val
; /* _level1 on <self:Object(HashMap3[Object, Object, Object, nullable Object])> */
455 if (unlikely(var3
== NULL
)) {
456 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
457 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 87);
467 /* method more_collections#HashMap3#[] for (self: HashMap3[Object, Object, Object, nullable Object], Object, Object, Object): nullable Object */
468 val
* more_collections__HashMap3___91d_93d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
469 val
* var
/* : nullable Object */;
470 short int var1
/* : Bool */;
473 const struct type
* type_struct
;
474 const char* var_class_name
;
475 short int var2
/* : Bool */;
478 const struct type
* type_struct5
;
479 const char* var_class_name6
;
480 short int var7
/* : Bool */;
483 const struct type
* type_struct10
;
484 const char* var_class_name11
;
485 val
* var_k1
/* var k1: Object */;
486 val
* var_k2
/* var k2: Object */;
487 val
* var_k3
/* var k3: Object */;
488 val
* var12
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
489 val
* var14
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
490 val
* var_level1
/* var level1: HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
491 short int var15
/* : Bool */;
492 short int var16
/* : Bool */;
493 val
* var17
/* : null */;
494 val
* var18
/* : nullable Object */;
495 val
* var_level2
/* var level2: HashMap2[Object, Object, nullable Object] */;
496 val
* var19
/* : nullable Object */;
497 /* Covariant cast for argument 0 (k1) <p0:Object> isa K1 */
498 /* <p0:Object> isa K1 */
499 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT0
];
500 cltype
= type_struct
->color
;
501 idtype
= type_struct
->id
;
502 if(cltype
>= p0
->type
->table_size
) {
505 var1
= p0
->type
->type_table
[cltype
] == idtype
;
507 if (unlikely(!var1
)) {
508 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
509 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K1", var_class_name
);
510 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 89);
513 /* Covariant cast for argument 1 (k2) <p1:Object> isa K2 */
514 /* <p1:Object> isa K2 */
515 type_struct5
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT1
];
516 cltype3
= type_struct5
->color
;
517 idtype4
= type_struct5
->id
;
518 if(cltype3
>= p1
->type
->table_size
) {
521 var2
= p1
->type
->type_table
[cltype3
] == idtype4
;
523 if (unlikely(!var2
)) {
524 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
525 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K2", var_class_name6
);
526 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 89);
529 /* Covariant cast for argument 2 (k3) <p2:Object> isa K3 */
530 /* <p2:Object> isa K3 */
531 type_struct10
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT2
];
532 cltype8
= type_struct10
->color
;
533 idtype9
= type_struct10
->id
;
534 if(cltype8
>= p2
->type
->table_size
) {
537 var7
= p2
->type
->type_table
[cltype8
] == idtype9
;
539 if (unlikely(!var7
)) {
540 var_class_name11
= p2
== NULL ?
"null" : p2
->type
->name
;
541 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K3", var_class_name11
);
542 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 89);
549 { /* Inline more_collections#HashMap3#level1 (self) on <self:HashMap3[Object, Object, Object, nullable Object]> */
550 var14
= self
->attrs
[COLOR_more_collections__HashMap3___level1
].val
; /* _level1 on <self:HashMap3[Object, Object, Object, nullable Object]> */
551 if (unlikely(var14
== NULL
)) {
552 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
553 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 87);
562 var15
= abstract_collection__MapRead__has_key(var_level1
, var_k1
);
572 var18
= hash_collection__HashMap___91d_93d(var_level1
, var_k1
);
576 var19
= more_collections__HashMap2___91d_93d(var_level2
, var_k2
, var_k3
);
583 /* method more_collections#HashMap3#[] for (self: Object, Object, Object, Object): nullable Object */
584 val
* VIRTUAL_more_collections__HashMap3___91d_93d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
585 val
* var
/* : nullable Object */;
586 val
* var1
/* : nullable Object */;
587 var1
= more_collections__HashMap3___91d_93d(self
, p0
, p1
, p2
);
592 /* method more_collections#HashMap3#[]= for (self: HashMap3[Object, Object, Object, nullable Object], Object, Object, Object, nullable Object) */
593 void more_collections__HashMap3___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
594 short int var
/* : Bool */;
597 const struct type
* type_struct
;
598 const char* var_class_name
;
599 short int var1
/* : Bool */;
602 const struct type
* type_struct4
;
603 const char* var_class_name5
;
604 short int var6
/* : Bool */;
607 const struct type
* type_struct9
;
608 const char* var_class_name10
;
609 short int var11
/* : Bool */;
612 const struct type
* type_struct14
;
613 short int is_nullable
;
614 const char* var_class_name15
;
615 val
* var_k1
/* var k1: Object */;
616 val
* var_k2
/* var k2: Object */;
617 val
* var_k3
/* var k3: Object */;
618 val
* var_v
/* var v: nullable Object */;
619 val
* var16
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
620 val
* var18
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
621 val
* var_level1
/* var level1: HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
622 short int var19
/* : Bool */;
623 short int var20
/* : Bool */;
624 val
* var21
/* : HashMap2[Object, Object, nullable Object] */;
625 val
* var_level2
/* var level2: HashMap2[Object, Object, nullable Object] */;
626 val
* var22
/* : nullable Object */;
627 /* Covariant cast for argument 0 (k1) <p0:Object> isa K1 */
628 /* <p0:Object> isa K1 */
629 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT0
];
630 cltype
= type_struct
->color
;
631 idtype
= type_struct
->id
;
632 if(cltype
>= p0
->type
->table_size
) {
635 var
= p0
->type
->type_table
[cltype
] == idtype
;
637 if (unlikely(!var
)) {
638 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
639 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K1", var_class_name
);
640 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 99);
643 /* Covariant cast for argument 1 (k2) <p1:Object> isa K2 */
644 /* <p1:Object> isa K2 */
645 type_struct4
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT1
];
646 cltype2
= type_struct4
->color
;
647 idtype3
= type_struct4
->id
;
648 if(cltype2
>= p1
->type
->table_size
) {
651 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
653 if (unlikely(!var1
)) {
654 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
655 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K2", var_class_name5
);
656 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 99);
659 /* Covariant cast for argument 2 (k3) <p2:Object> isa K3 */
660 /* <p2:Object> isa K3 */
661 type_struct9
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT2
];
662 cltype7
= type_struct9
->color
;
663 idtype8
= type_struct9
->id
;
664 if(cltype7
>= p2
->type
->table_size
) {
667 var6
= p2
->type
->type_table
[cltype7
] == idtype8
;
669 if (unlikely(!var6
)) {
670 var_class_name10
= p2
== NULL ?
"null" : p2
->type
->name
;
671 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K3", var_class_name10
);
672 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 99);
675 /* Covariant cast for argument 3 (v) <p3:nullable Object> isa V */
676 /* <p3:nullable Object> isa V */
677 type_struct14
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT3
];
678 cltype12
= type_struct14
->color
;
679 idtype13
= type_struct14
->id
;
680 is_nullable
= type_struct14
->is_nullable
;
684 if(cltype12
>= p3
->type
->table_size
) {
687 var11
= p3
->type
->type_table
[cltype12
] == idtype13
;
690 if (unlikely(!var11
)) {
691 var_class_name15
= p3
== NULL ?
"null" : p3
->type
->name
;
692 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name15
);
693 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 99);
701 { /* Inline more_collections#HashMap3#level1 (self) on <self:HashMap3[Object, Object, Object, nullable Object]> */
702 var18
= self
->attrs
[COLOR_more_collections__HashMap3___level1
].val
; /* _level1 on <self:HashMap3[Object, Object, Object, nullable Object]> */
703 if (unlikely(var18
== NULL
)) {
704 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
705 PRINT_ERROR(" (%s:%d)\n", "../lib/more_collections.nit", 87);
714 var19
= abstract_collection__MapRead__has_key(var_level1
, var_k1
);
718 var21
= NEW_more_collections__HashMap2(self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2more_collections__HashMap3_FT1more_collections__HashMap3_FT2more_collections__HashMap3_FT3
]);
720 ((void (*)(val
*))(var21
->class->vft
[COLOR_kernel__Object__init
]))(var21
) /* init on <var21:HashMap2[Object, Object, nullable Object]>*/;
724 hash_collection__HashMap___91d_93d_61d(var_level1
, var_k1
, var_level2
); /* Direct call hash_collection#HashMap#[]= on <var_level1:HashMap[Object, HashMap2[Object, Object, nullable Object]]>*/
728 var22
= hash_collection__HashMap___91d_93d(var_level1
, var_k1
);
733 more_collections__HashMap2___91d_93d_61d(var_level2
, var_k2
, var_k3
, var_v
); /* Direct call more_collections#HashMap2#[]= on <var_level2:HashMap2[Object, Object, nullable Object]>*/
737 /* method more_collections#HashMap3#[]= for (self: Object, Object, Object, Object, nullable Object) */
738 void VIRTUAL_more_collections__HashMap3___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
739 more_collections__HashMap3___91d_93d_61d(self
, p0
, p1
, p2
, p3
); /* Direct call more_collections#HashMap3#[]= on <self:Object(HashMap3[Object, Object, Object, nullable Object])>*/