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 MultiHashMap#0 */
23 /* <p0:Object> isa MultiHashMap#0 */
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`", "MultiHashMap#0", 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 MultiHashMap#1 */
39 /* <p1:nullable Object> isa MultiHashMap#1 */
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`", "MultiHashMap#1", 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 MapRead#0 */
104 /* <p0:Object> isa MapRead#0 */
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`", "MapRead#0", 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 array__Array__init(var2
); /* Direct call array#Array#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 hash_collection__HashMap__init(self
); /* Direct call hash_collection#HashMap#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 more_collections__MultiHashMap__init(self
); /* Direct call more_collections#MultiHashMap#init on <self:Object(MultiHashMap[Object, nullable Object])>*/
154 /* method more_collections#HashMap2#level1 for (self: HashMap2[Object, Object, nullable Object]): HashMap[Object, HashMap[Object, nullable Object]] */
155 val
* more_collections__HashMap2__level1(val
* self
) {
156 val
* var
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
157 val
* var1
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
158 var1
= self
->attrs
[COLOR_more_collections__HashMap2___level1
].val
; /* _level1 on <self:HashMap2[Object, Object, nullable Object]> */
159 if (unlikely(var1
== NULL
)) {
160 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
161 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 57);
168 /* method more_collections#HashMap2#level1 for (self: Object): HashMap[Object, HashMap[Object, nullable Object]] */
169 val
* VIRTUAL_more_collections__HashMap2__level1(val
* self
) {
170 val
* var
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
171 val
* var1
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
172 val
* var3
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
173 { /* Inline more_collections#HashMap2#level1 (self) on <self:Object(HashMap2[Object, Object, nullable Object])> */
174 var3
= self
->attrs
[COLOR_more_collections__HashMap2___level1
].val
; /* _level1 on <self:Object(HashMap2[Object, Object, nullable Object])> */
175 if (unlikely(var3
== NULL
)) {
176 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
177 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 57);
187 /* method more_collections#HashMap2#[] for (self: HashMap2[Object, Object, nullable Object], Object, Object): nullable Object */
188 val
* more_collections__HashMap2___91d_93d(val
* self
, val
* p0
, val
* p1
) {
189 val
* var
/* : nullable Object */;
190 short int var1
/* : Bool */;
193 const struct type
* type_struct
;
194 const char* var_class_name
;
195 short int var2
/* : Bool */;
198 const struct type
* type_struct5
;
199 const char* var_class_name6
;
200 val
* var_k1
/* var k1: Object */;
201 val
* var_k2
/* var k2: Object */;
202 val
* var7
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
203 val
* var9
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
204 val
* var_level1
/* var level1: HashMap[Object, HashMap[Object, nullable Object]] */;
205 short int var10
/* : Bool */;
206 short int var11
/* : Bool */;
207 val
* var12
/* : null */;
208 val
* var13
/* : nullable Object */;
209 val
* var_level2
/* var level2: HashMap[Object, nullable Object] */;
210 short int var14
/* : Bool */;
211 short int var15
/* : Bool */;
212 val
* var16
/* : null */;
213 val
* var17
/* : nullable Object */;
214 /* Covariant cast for argument 0 (k1) <p0:Object> isa HashMap2#0 */
215 /* <p0:Object> isa HashMap2#0 */
216 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT0
];
217 cltype
= type_struct
->color
;
218 idtype
= type_struct
->id
;
219 if(cltype
>= p0
->type
->table_size
) {
222 var1
= p0
->type
->type_table
[cltype
] == idtype
;
224 if (unlikely(!var1
)) {
225 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
226 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#0", var_class_name
);
227 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 59);
230 /* Covariant cast for argument 1 (k2) <p1:Object> isa HashMap2#1 */
231 /* <p1:Object> isa HashMap2#1 */
232 type_struct5
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT1
];
233 cltype3
= type_struct5
->color
;
234 idtype4
= type_struct5
->id
;
235 if(cltype3
>= p1
->type
->table_size
) {
238 var2
= p1
->type
->type_table
[cltype3
] == idtype4
;
240 if (unlikely(!var2
)) {
241 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
242 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#1", var_class_name6
);
243 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 59);
249 { /* Inline more_collections#HashMap2#level1 (self) on <self:HashMap2[Object, Object, nullable Object]> */
250 var9
= self
->attrs
[COLOR_more_collections__HashMap2___level1
].val
; /* _level1 on <self:HashMap2[Object, Object, nullable Object]> */
251 if (unlikely(var9
== NULL
)) {
252 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
253 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 57);
262 var10
= abstract_collection__MapRead__has_key(var_level1
, var_k1
);
272 var13
= hash_collection__HashMap___91d_93d(var_level1
, var_k1
);
276 var14
= abstract_collection__MapRead__has_key(var_level2
, var_k2
);
286 var17
= hash_collection__HashMap___91d_93d(var_level2
, var_k2
);
293 /* method more_collections#HashMap2#[] for (self: Object, Object, Object): nullable Object */
294 val
* VIRTUAL_more_collections__HashMap2___91d_93d(val
* self
, val
* p0
, val
* p1
) {
295 val
* var
/* : nullable Object */;
296 val
* var1
/* : nullable Object */;
297 var1
= more_collections__HashMap2___91d_93d(self
, p0
, p1
);
302 /* method more_collections#HashMap2#[]= for (self: HashMap2[Object, Object, nullable Object], Object, Object, nullable Object) */
303 void more_collections__HashMap2___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
304 short int var
/* : Bool */;
307 const struct type
* type_struct
;
308 const char* var_class_name
;
309 short int var1
/* : Bool */;
312 const struct type
* type_struct4
;
313 const char* var_class_name5
;
314 short int var6
/* : Bool */;
317 const struct type
* type_struct9
;
318 short int is_nullable
;
319 const char* var_class_name10
;
320 val
* var_k1
/* var k1: Object */;
321 val
* var_k2
/* var k2: Object */;
322 val
* var_v
/* var v: nullable Object */;
323 val
* var11
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
324 val
* var13
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
325 val
* var_level1
/* var level1: HashMap[Object, HashMap[Object, nullable Object]] */;
326 short int var14
/* : Bool */;
327 short int var15
/* : Bool */;
328 val
* var16
/* : HashMap[Object, nullable Object] */;
329 val
* var_level2
/* var level2: HashMap[Object, nullable Object] */;
330 val
* var17
/* : nullable Object */;
331 /* Covariant cast for argument 0 (k1) <p0:Object> isa HashMap2#0 */
332 /* <p0:Object> isa HashMap2#0 */
333 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT0
];
334 cltype
= type_struct
->color
;
335 idtype
= type_struct
->id
;
336 if(cltype
>= p0
->type
->table_size
) {
339 var
= p0
->type
->type_table
[cltype
] == idtype
;
341 if (unlikely(!var
)) {
342 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
343 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#0", var_class_name
);
344 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 70);
347 /* Covariant cast for argument 1 (k2) <p1:Object> isa HashMap2#1 */
348 /* <p1:Object> isa HashMap2#1 */
349 type_struct4
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT1
];
350 cltype2
= type_struct4
->color
;
351 idtype3
= type_struct4
->id
;
352 if(cltype2
>= p1
->type
->table_size
) {
355 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
357 if (unlikely(!var1
)) {
358 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
359 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#1", var_class_name5
);
360 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 70);
363 /* Covariant cast for argument 2 (v) <p2:nullable Object> isa HashMap2#2 */
364 /* <p2:nullable Object> isa HashMap2#2 */
365 type_struct9
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT2
];
366 cltype7
= type_struct9
->color
;
367 idtype8
= type_struct9
->id
;
368 is_nullable
= type_struct9
->is_nullable
;
372 if(cltype7
>= p2
->type
->table_size
) {
375 var6
= p2
->type
->type_table
[cltype7
] == idtype8
;
378 if (unlikely(!var6
)) {
379 var_class_name10
= p2
== NULL ?
"null" : p2
->type
->name
;
380 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#2", var_class_name10
);
381 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 70);
388 { /* Inline more_collections#HashMap2#level1 (self) on <self:HashMap2[Object, Object, nullable Object]> */
389 var13
= self
->attrs
[COLOR_more_collections__HashMap2___level1
].val
; /* _level1 on <self:HashMap2[Object, Object, nullable Object]> */
390 if (unlikely(var13
== NULL
)) {
391 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
392 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 57);
401 var14
= abstract_collection__MapRead__has_key(var_level1
, var_k1
);
405 var16
= NEW_hash_collection__HashMap(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapmore_collections__HashMap2_FT1more_collections__HashMap2_FT2
]);
407 hash_collection__HashMap__init(var16
); /* Direct call hash_collection#HashMap#init on <var16:HashMap[Object, nullable Object]>*/
411 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]]>*/
415 var17
= hash_collection__HashMap___91d_93d(var_level1
, var_k1
);
420 hash_collection__HashMap___91d_93d_61d(var_level2
, var_k2
, var_v
); /* Direct call hash_collection#HashMap#[]= on <var_level2:HashMap[Object, nullable Object]>*/
424 /* method more_collections#HashMap2#[]= for (self: Object, Object, Object, nullable Object) */
425 void VIRTUAL_more_collections__HashMap2___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
426 more_collections__HashMap2___91d_93d_61d(self
, p0
, p1
, p2
); /* Direct call more_collections#HashMap2#[]= on <self:Object(HashMap2[Object, Object, nullable Object])>*/
429 /* method more_collections#HashMap2#init for (self: HashMap2[Object, Object, nullable Object]) */
430 void more_collections__HashMap2__init(val
* self
) {
433 /* method more_collections#HashMap2#init for (self: Object) */
434 void VIRTUAL_more_collections__HashMap2__init(val
* self
) {
435 { /* Inline more_collections#HashMap2#init (self) on <self:Object(HashMap2[Object, Object, nullable Object])> */
440 /* method more_collections#HashMap3#level1 for (self: HashMap3[Object, Object, Object, nullable Object]): HashMap[Object, HashMap2[Object, Object, nullable Object]] */
441 val
* more_collections__HashMap3__level1(val
* self
) {
442 val
* var
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
443 val
* var1
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
444 var1
= self
->attrs
[COLOR_more_collections__HashMap3___level1
].val
; /* _level1 on <self:HashMap3[Object, Object, Object, nullable Object]> */
445 if (unlikely(var1
== NULL
)) {
446 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
447 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 87);
454 /* method more_collections#HashMap3#level1 for (self: Object): HashMap[Object, HashMap2[Object, Object, nullable Object]] */
455 val
* VIRTUAL_more_collections__HashMap3__level1(val
* self
) {
456 val
* var
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
457 val
* var1
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
458 val
* var3
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
459 { /* Inline more_collections#HashMap3#level1 (self) on <self:Object(HashMap3[Object, Object, Object, nullable Object])> */
460 var3
= self
->attrs
[COLOR_more_collections__HashMap3___level1
].val
; /* _level1 on <self:Object(HashMap3[Object, Object, Object, nullable Object])> */
461 if (unlikely(var3
== NULL
)) {
462 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
463 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 87);
473 /* method more_collections#HashMap3#[] for (self: HashMap3[Object, Object, Object, nullable Object], Object, Object, Object): nullable Object */
474 val
* more_collections__HashMap3___91d_93d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
475 val
* var
/* : nullable Object */;
476 short int var1
/* : Bool */;
479 const struct type
* type_struct
;
480 const char* var_class_name
;
481 short int var2
/* : Bool */;
484 const struct type
* type_struct5
;
485 const char* var_class_name6
;
486 short int var7
/* : Bool */;
489 const struct type
* type_struct10
;
490 const char* var_class_name11
;
491 val
* var_k1
/* var k1: Object */;
492 val
* var_k2
/* var k2: Object */;
493 val
* var_k3
/* var k3: Object */;
494 val
* var12
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
495 val
* var14
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
496 val
* var_level1
/* var level1: HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
497 short int var15
/* : Bool */;
498 short int var16
/* : Bool */;
499 val
* var17
/* : null */;
500 val
* var18
/* : nullable Object */;
501 val
* var_level2
/* var level2: HashMap2[Object, Object, nullable Object] */;
502 val
* var19
/* : nullable Object */;
503 /* Covariant cast for argument 0 (k1) <p0:Object> isa HashMap3#0 */
504 /* <p0:Object> isa HashMap3#0 */
505 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT0
];
506 cltype
= type_struct
->color
;
507 idtype
= type_struct
->id
;
508 if(cltype
>= p0
->type
->table_size
) {
511 var1
= p0
->type
->type_table
[cltype
] == idtype
;
513 if (unlikely(!var1
)) {
514 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
515 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#0", var_class_name
);
516 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 89);
519 /* Covariant cast for argument 1 (k2) <p1:Object> isa HashMap3#1 */
520 /* <p1:Object> isa HashMap3#1 */
521 type_struct5
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT1
];
522 cltype3
= type_struct5
->color
;
523 idtype4
= type_struct5
->id
;
524 if(cltype3
>= p1
->type
->table_size
) {
527 var2
= p1
->type
->type_table
[cltype3
] == idtype4
;
529 if (unlikely(!var2
)) {
530 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
531 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#1", var_class_name6
);
532 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 89);
535 /* Covariant cast for argument 2 (k3) <p2:Object> isa HashMap3#2 */
536 /* <p2:Object> isa HashMap3#2 */
537 type_struct10
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT2
];
538 cltype8
= type_struct10
->color
;
539 idtype9
= type_struct10
->id
;
540 if(cltype8
>= p2
->type
->table_size
) {
543 var7
= p2
->type
->type_table
[cltype8
] == idtype9
;
545 if (unlikely(!var7
)) {
546 var_class_name11
= p2
== NULL ?
"null" : p2
->type
->name
;
547 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#2", var_class_name11
);
548 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 89);
555 { /* Inline more_collections#HashMap3#level1 (self) on <self:HashMap3[Object, Object, Object, nullable Object]> */
556 var14
= self
->attrs
[COLOR_more_collections__HashMap3___level1
].val
; /* _level1 on <self:HashMap3[Object, Object, Object, nullable Object]> */
557 if (unlikely(var14
== NULL
)) {
558 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
559 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 87);
568 var15
= abstract_collection__MapRead__has_key(var_level1
, var_k1
);
578 var18
= hash_collection__HashMap___91d_93d(var_level1
, var_k1
);
582 var19
= more_collections__HashMap2___91d_93d(var_level2
, var_k2
, var_k3
);
589 /* method more_collections#HashMap3#[] for (self: Object, Object, Object, Object): nullable Object */
590 val
* VIRTUAL_more_collections__HashMap3___91d_93d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
591 val
* var
/* : nullable Object */;
592 val
* var1
/* : nullable Object */;
593 var1
= more_collections__HashMap3___91d_93d(self
, p0
, p1
, p2
);
598 /* method more_collections#HashMap3#[]= for (self: HashMap3[Object, Object, Object, nullable Object], Object, Object, Object, nullable Object) */
599 void more_collections__HashMap3___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
600 short int var
/* : Bool */;
603 const struct type
* type_struct
;
604 const char* var_class_name
;
605 short int var1
/* : Bool */;
608 const struct type
* type_struct4
;
609 const char* var_class_name5
;
610 short int var6
/* : Bool */;
613 const struct type
* type_struct9
;
614 const char* var_class_name10
;
615 short int var11
/* : Bool */;
618 const struct type
* type_struct14
;
619 short int is_nullable
;
620 const char* var_class_name15
;
621 val
* var_k1
/* var k1: Object */;
622 val
* var_k2
/* var k2: Object */;
623 val
* var_k3
/* var k3: Object */;
624 val
* var_v
/* var v: nullable Object */;
625 val
* var16
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
626 val
* var18
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
627 val
* var_level1
/* var level1: HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
628 short int var19
/* : Bool */;
629 short int var20
/* : Bool */;
630 val
* var21
/* : HashMap2[Object, Object, nullable Object] */;
631 val
* var_level2
/* var level2: HashMap2[Object, Object, nullable Object] */;
632 val
* var23
/* : nullable Object */;
633 /* Covariant cast for argument 0 (k1) <p0:Object> isa HashMap3#0 */
634 /* <p0:Object> isa HashMap3#0 */
635 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT0
];
636 cltype
= type_struct
->color
;
637 idtype
= type_struct
->id
;
638 if(cltype
>= p0
->type
->table_size
) {
641 var
= p0
->type
->type_table
[cltype
] == idtype
;
643 if (unlikely(!var
)) {
644 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
645 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#0", var_class_name
);
646 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 99);
649 /* Covariant cast for argument 1 (k2) <p1:Object> isa HashMap3#1 */
650 /* <p1:Object> isa HashMap3#1 */
651 type_struct4
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT1
];
652 cltype2
= type_struct4
->color
;
653 idtype3
= type_struct4
->id
;
654 if(cltype2
>= p1
->type
->table_size
) {
657 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
659 if (unlikely(!var1
)) {
660 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
661 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#1", var_class_name5
);
662 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 99);
665 /* Covariant cast for argument 2 (k3) <p2:Object> isa HashMap3#2 */
666 /* <p2:Object> isa HashMap3#2 */
667 type_struct9
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT2
];
668 cltype7
= type_struct9
->color
;
669 idtype8
= type_struct9
->id
;
670 if(cltype7
>= p2
->type
->table_size
) {
673 var6
= p2
->type
->type_table
[cltype7
] == idtype8
;
675 if (unlikely(!var6
)) {
676 var_class_name10
= p2
== NULL ?
"null" : p2
->type
->name
;
677 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#2", var_class_name10
);
678 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 99);
681 /* Covariant cast for argument 3 (v) <p3:nullable Object> isa HashMap3#3 */
682 /* <p3:nullable Object> isa HashMap3#3 */
683 type_struct14
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT3
];
684 cltype12
= type_struct14
->color
;
685 idtype13
= type_struct14
->id
;
686 is_nullable
= type_struct14
->is_nullable
;
690 if(cltype12
>= p3
->type
->table_size
) {
693 var11
= p3
->type
->type_table
[cltype12
] == idtype13
;
696 if (unlikely(!var11
)) {
697 var_class_name15
= p3
== NULL ?
"null" : p3
->type
->name
;
698 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#3", var_class_name15
);
699 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 99);
707 { /* Inline more_collections#HashMap3#level1 (self) on <self:HashMap3[Object, Object, Object, nullable Object]> */
708 var18
= self
->attrs
[COLOR_more_collections__HashMap3___level1
].val
; /* _level1 on <self:HashMap3[Object, Object, Object, nullable Object]> */
709 if (unlikely(var18
== NULL
)) {
710 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
711 PRINT_ERROR(" (%s:%d)\n", "lib/more_collections.nit", 87);
720 var19
= abstract_collection__MapRead__has_key(var_level1
, var_k1
);
724 var21
= NEW_more_collections__HashMap2(self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2more_collections__HashMap3_FT1more_collections__HashMap3_FT2more_collections__HashMap3_FT3
]);
726 { /* Inline more_collections#HashMap2#init (var21) on <var21:HashMap2[Object, Object, nullable Object]> */
732 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]]>*/
736 var23
= hash_collection__HashMap___91d_93d(var_level1
, var_k1
);
741 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]>*/
745 /* method more_collections#HashMap3#[]= for (self: Object, Object, Object, Object, nullable Object) */
746 void VIRTUAL_more_collections__HashMap3___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
747 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])>*/
750 /* method more_collections#HashMap3#init for (self: HashMap3[Object, Object, Object, nullable Object]) */
751 void more_collections__HashMap3__init(val
* self
) {
754 /* method more_collections#HashMap3#init for (self: Object) */
755 void VIRTUAL_more_collections__HashMap3__init(val
* self
) {
756 { /* Inline more_collections#HashMap3#init (self) on <self:Object(HashMap3[Object, Object, Object, nullable Object])> */