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
* var10
/* : NativeArray[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 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MultiHashMap#0", var_class_name
);
35 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 22);
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
;
54 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
55 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MultiHashMap#1", var_class_name5
);
56 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 22);
61 var6
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead__has_key
]))(self
, var_k
) /* has_key on <self:MultiHashMap[Object, nullable Object]>*/;
63 var7
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(self
, var_k
) /* [] on <self:MultiHashMap[Object, nullable Object]>*/;
64 ((void (*)(val
*, val
*))(var7
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var7
, var_v
) /* add on <var7:nullable Object(Array[nullable Object])>*/;
66 var8
= NEW_array__Array(self
->type
->resolution_table
->types
[COLOR_array__Arraymore_collections__MultiHashMap_FT1
]);
67 { /* var8 = array_instance Array[MultiHashMap#1] */
69 var10
= NEW_array__NativeArray(var9
, self
->type
->resolution_table
->types
[COLOR_array__NativeArraymore_collections__MultiHashMap_FT1
]);
70 ((struct instance_array__NativeArray
*)var10
)->values
[0] = (val
*) var_v
;
71 ((void (*)(val
*, val
*, long))(var8
->class->vft
[COLOR_array__Array__with_native
]))(var8
, var10
, var9
) /* with_native on <var8:Array[nullable Object]>*/;
73 ((void (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Map___91d_93d_61d
]))(self
, var_k
, var8
) /* []= on <self:MultiHashMap[Object, nullable Object]>*/;
77 /* method more_collections#MultiHashMap#add_one for (self: Object, Object, nullable Object) */
78 void VIRTUAL_more_collections__MultiHashMap__add_one(val
* self
, val
* p0
, val
* p1
) {
79 more_collections__MultiHashMap__add_one(self
, p0
, p1
);
82 /* method more_collections#MultiHashMap#init for (self: MultiHashMap[Object, nullable Object]) */
83 void more_collections__MultiHashMap__init(val
* self
) {
84 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMap__init
]))(self
) /* init on <self:MultiHashMap[Object, nullable Object]>*/;
87 /* method more_collections#MultiHashMap#init for (self: Object) */
88 void VIRTUAL_more_collections__MultiHashMap__init(val
* self
) {
89 more_collections__MultiHashMap__init(self
);
92 /* method more_collections#HashMap2#level1 for (self: HashMap2[Object, Object, nullable Object]): HashMap[Object, HashMap[Object, nullable Object]] */
93 val
* more_collections__HashMap2__level1(val
* self
) {
94 val
* var
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
95 val
* var1
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
96 var1
= self
->attrs
[COLOR_more_collections__HashMap2___64dlevel1
].val
; /* @level1 on <self:HashMap2[Object, Object, nullable Object]> */
98 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @level1");
99 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 38);
106 /* method more_collections#HashMap2#level1 for (self: Object): HashMap[Object, HashMap[Object, nullable Object]] */
107 val
* VIRTUAL_more_collections__HashMap2__level1(val
* self
) {
108 val
* var
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
109 val
* var1
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
110 var1
= more_collections__HashMap2__level1(self
);
115 /* method more_collections#HashMap2#level1= for (self: HashMap2[Object, Object, nullable Object], HashMap[Object, HashMap[Object, nullable Object]]) */
116 void more_collections__HashMap2__level1_61d(val
* self
, val
* p0
) {
117 short int var
/* : Bool */;
120 const struct type
* type_struct
;
121 const char* var_class_name
;
122 /* Covariant cast for argument 0 (level1) <p0:HashMap[Object, HashMap[Object, nullable Object]]> isa HashMap[HashMap2#0, HashMap[HashMap2#1, HashMap2#2]] */
123 /* <p0:HashMap[Object, HashMap[Object, nullable Object]]> isa HashMap[HashMap2#0, HashMap[HashMap2#1, HashMap2#2]] */
124 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapmore_collections__HashMap2_FT0hash_collection__HashMapmore_collections__HashMap2_FT1more_collections__HashMap2_FT2
];
125 cltype
= type_struct
->color
;
126 idtype
= type_struct
->id
;
127 if(cltype
>= p0
->type
->table_size
) {
130 var
= p0
->type
->type_table
[cltype
] == idtype
;
133 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
134 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMap2#0, HashMap[HashMap2#1, HashMap2#2]]", var_class_name
);
135 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 38);
138 self
->attrs
[COLOR_more_collections__HashMap2___64dlevel1
].val
= p0
; /* @level1 on <self:HashMap2[Object, Object, nullable Object]> */
141 /* method more_collections#HashMap2#level1= for (self: Object, HashMap[Object, HashMap[Object, nullable Object]]) */
142 void VIRTUAL_more_collections__HashMap2__level1_61d(val
* self
, val
* p0
) {
143 more_collections__HashMap2__level1_61d(self
, p0
);
146 /* method more_collections#HashMap2#[] for (self: HashMap2[Object, Object, nullable Object], Object, Object): nullable Object */
147 val
* more_collections__HashMap2___91d_93d(val
* self
, val
* p0
, val
* p1
) {
148 val
* var
/* : nullable Object */;
149 short int var1
/* : Bool */;
152 const struct type
* type_struct
;
153 const char* var_class_name
;
154 short int var2
/* : Bool */;
157 const struct type
* type_struct5
;
158 const char* var_class_name6
;
159 val
* var_k1
/* var k1: Object */;
160 val
* var_k2
/* var k2: Object */;
161 val
* var7
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
162 val
* var_level1
/* var level1: HashMap[Object, HashMap[Object, nullable Object]] */;
163 short int var8
/* : Bool */;
164 short int var9
/* : Bool */;
165 val
* var10
/* : null */;
166 val
* var11
/* : nullable Object */;
167 val
* var_level2
/* var level2: HashMap[Object, nullable Object] */;
168 short int var12
/* : Bool */;
169 short int var13
/* : Bool */;
170 val
* var14
/* : null */;
171 val
* var15
/* : nullable Object */;
172 /* Covariant cast for argument 0 (k1) <p0:Object> isa HashMap2#0 */
173 /* <p0:Object> isa HashMap2#0 */
174 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT0
];
175 cltype
= type_struct
->color
;
176 idtype
= type_struct
->id
;
177 if(cltype
>= p0
->type
->table_size
) {
180 var1
= p0
->type
->type_table
[cltype
] == idtype
;
183 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
184 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#0", var_class_name
);
185 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 40);
188 /* Covariant cast for argument 1 (k2) <p1:Object> isa HashMap2#1 */
189 /* <p1:Object> isa HashMap2#1 */
190 type_struct5
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT1
];
191 cltype3
= type_struct5
->color
;
192 idtype4
= type_struct5
->id
;
193 if(cltype3
>= p1
->type
->table_size
) {
196 var2
= p1
->type
->type_table
[cltype3
] == idtype4
;
199 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
200 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#1", var_class_name6
);
201 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 40);
206 var7
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_more_collections__HashMap2__level1
]))(self
) /* level1 on <self:HashMap2[Object, Object, nullable Object]>*/;
208 var8
= ((short int (*)(val
*, val
*))(var_level1
->class->vft
[COLOR_abstract_collection__MapRead__has_key
]))(var_level1
, var_k1
) /* has_key on <var_level1:HashMap[Object, HashMap[Object, nullable Object]]>*/;
216 var11
= ((val
* (*)(val
*, val
*))(var_level1
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var_level1
, var_k1
) /* [] on <var_level1:HashMap[Object, HashMap[Object, nullable Object]]>*/;
218 var12
= ((short int (*)(val
*, val
*))(var_level2
->class->vft
[COLOR_abstract_collection__MapRead__has_key
]))(var_level2
, var_k2
) /* has_key on <var_level2:HashMap[Object, nullable Object]>*/;
226 var15
= ((val
* (*)(val
*, val
*))(var_level2
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var_level2
, var_k2
) /* [] on <var_level2:HashMap[Object, nullable Object]>*/;
232 /* method more_collections#HashMap2#[] for (self: Object, Object, Object): nullable Object */
233 val
* VIRTUAL_more_collections__HashMap2___91d_93d(val
* self
, val
* p0
, val
* p1
) {
234 val
* var
/* : nullable Object */;
235 val
* var1
/* : nullable Object */;
236 var1
= more_collections__HashMap2___91d_93d(self
, p0
, p1
);
241 /* method more_collections#HashMap2#[]= for (self: HashMap2[Object, Object, nullable Object], Object, Object, nullable Object) */
242 void more_collections__HashMap2___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
243 short int var
/* : Bool */;
246 const struct type
* type_struct
;
247 const char* var_class_name
;
248 short int var1
/* : Bool */;
251 const struct type
* type_struct4
;
252 const char* var_class_name5
;
253 short int var6
/* : Bool */;
256 const struct type
* type_struct9
;
257 short int is_nullable
;
258 const char* var_class_name10
;
259 val
* var_k1
/* var k1: Object */;
260 val
* var_k2
/* var k2: Object */;
261 val
* var_v
/* var v: nullable Object */;
262 val
* var11
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
263 val
* var_level1
/* var level1: HashMap[Object, HashMap[Object, nullable Object]] */;
264 short int var12
/* : Bool */;
265 short int var13
/* : Bool */;
266 val
* var14
/* : HashMap[Object, nullable Object] */;
267 val
* var_level2
/* var level2: HashMap[Object, nullable Object] */;
268 val
* var15
/* : nullable Object */;
269 /* Covariant cast for argument 0 (k1) <p0:Object> isa HashMap2#0 */
270 /* <p0:Object> isa HashMap2#0 */
271 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT0
];
272 cltype
= type_struct
->color
;
273 idtype
= type_struct
->id
;
274 if(cltype
>= p0
->type
->table_size
) {
277 var
= p0
->type
->type_table
[cltype
] == idtype
;
280 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
281 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#0", var_class_name
);
282 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 51);
285 /* Covariant cast for argument 1 (k2) <p1:Object> isa HashMap2#1 */
286 /* <p1:Object> isa HashMap2#1 */
287 type_struct4
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT1
];
288 cltype2
= type_struct4
->color
;
289 idtype3
= type_struct4
->id
;
290 if(cltype2
>= p1
->type
->table_size
) {
293 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
296 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
297 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#1", var_class_name5
);
298 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 51);
301 /* Covariant cast for argument 2 (v) <p2:nullable Object> isa HashMap2#2 */
302 /* <p2:nullable Object> isa HashMap2#2 */
303 type_struct9
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT2
];
304 cltype7
= type_struct9
->color
;
305 idtype8
= type_struct9
->id
;
306 is_nullable
= type_struct9
->is_nullable
;
310 if(cltype7
>= p2
->type
->table_size
) {
313 var6
= p2
->type
->type_table
[cltype7
] == idtype8
;
317 var_class_name10
= p2
== NULL ?
"null" : p2
->type
->name
;
318 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#2", var_class_name10
);
319 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 51);
325 var11
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_more_collections__HashMap2__level1
]))(self
) /* level1 on <self:HashMap2[Object, Object, nullable Object]>*/;
327 var12
= ((short int (*)(val
*, val
*))(var_level1
->class->vft
[COLOR_abstract_collection__MapRead__has_key
]))(var_level1
, var_k1
) /* has_key on <var_level1:HashMap[Object, HashMap[Object, nullable Object]]>*/;
330 var14
= NEW_hash_collection__HashMap(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapmore_collections__HashMap2_FT1more_collections__HashMap2_FT2
]);
331 ((void (*)(val
*))(var14
->class->vft
[COLOR_hash_collection__HashMap__init
]))(var14
) /* init on <var14:HashMap[Object, nullable Object]>*/;
333 ((void (*)(val
*, val
*, val
*))(var_level1
->class->vft
[COLOR_abstract_collection__Map___91d_93d_61d
]))(var_level1
, var_k1
, var_level2
) /* []= on <var_level1:HashMap[Object, HashMap[Object, nullable Object]]>*/;
335 var15
= ((val
* (*)(val
*, val
*))(var_level1
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var_level1
, var_k1
) /* [] on <var_level1:HashMap[Object, HashMap[Object, nullable Object]]>*/;
338 ((void (*)(val
*, val
*, val
*))(var_level2
->class->vft
[COLOR_abstract_collection__Map___91d_93d_61d
]))(var_level2
, var_k2
, var_v
) /* []= on <var_level2:HashMap[Object, nullable Object]>*/;
341 /* method more_collections#HashMap2#[]= for (self: Object, Object, Object, nullable Object) */
342 void VIRTUAL_more_collections__HashMap2___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
343 more_collections__HashMap2___91d_93d_61d(self
, p0
, p1
, p2
);
346 /* method more_collections#HashMap2#init for (self: HashMap2[Object, Object, nullable Object]) */
347 void more_collections__HashMap2__init(val
* self
) {
350 /* method more_collections#HashMap2#init for (self: Object) */
351 void VIRTUAL_more_collections__HashMap2__init(val
* self
) {
352 more_collections__HashMap2__init(self
);
355 /* method more_collections#HashMap3#level1 for (self: HashMap3[Object, Object, Object, nullable Object]): HashMap[Object, HashMap2[Object, Object, nullable Object]] */
356 val
* more_collections__HashMap3__level1(val
* self
) {
357 val
* var
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
358 val
* var1
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
359 var1
= self
->attrs
[COLOR_more_collections__HashMap3___64dlevel1
].val
; /* @level1 on <self:HashMap3[Object, Object, Object, nullable Object]> */
361 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @level1");
362 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 68);
369 /* method more_collections#HashMap3#level1 for (self: Object): HashMap[Object, HashMap2[Object, Object, nullable Object]] */
370 val
* VIRTUAL_more_collections__HashMap3__level1(val
* self
) {
371 val
* var
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
372 val
* var1
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
373 var1
= more_collections__HashMap3__level1(self
);
378 /* method more_collections#HashMap3#level1= for (self: HashMap3[Object, Object, Object, nullable Object], HashMap[Object, HashMap2[Object, Object, nullable Object]]) */
379 void more_collections__HashMap3__level1_61d(val
* self
, val
* p0
) {
380 short int var
/* : Bool */;
383 const struct type
* type_struct
;
384 const char* var_class_name
;
385 /* Covariant cast for argument 0 (level1) <p0:HashMap[Object, HashMap2[Object, Object, nullable Object]]> isa HashMap[HashMap3#0, HashMap2[HashMap3#1, HashMap3#2, HashMap3#3]] */
386 /* <p0:HashMap[Object, HashMap2[Object, Object, nullable Object]]> isa HashMap[HashMap3#0, HashMap2[HashMap3#1, HashMap3#2, HashMap3#3]] */
387 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapmore_collections__HashMap3_FT0more_collections__HashMap2more_collections__HashMap3_FT1more_collections__HashMap3_FT2more_collections__HashMap3_FT3
];
388 cltype
= type_struct
->color
;
389 idtype
= type_struct
->id
;
390 if(cltype
>= p0
->type
->table_size
) {
393 var
= p0
->type
->type_table
[cltype
] == idtype
;
396 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
397 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMap3#0, HashMap2[HashMap3#1, HashMap3#2, HashMap3#3]]", var_class_name
);
398 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 68);
401 self
->attrs
[COLOR_more_collections__HashMap3___64dlevel1
].val
= p0
; /* @level1 on <self:HashMap3[Object, Object, Object, nullable Object]> */
404 /* method more_collections#HashMap3#level1= for (self: Object, HashMap[Object, HashMap2[Object, Object, nullable Object]]) */
405 void VIRTUAL_more_collections__HashMap3__level1_61d(val
* self
, val
* p0
) {
406 more_collections__HashMap3__level1_61d(self
, p0
);
409 /* method more_collections#HashMap3#[] for (self: HashMap3[Object, Object, Object, nullable Object], Object, Object, Object): nullable Object */
410 val
* more_collections__HashMap3___91d_93d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
411 val
* var
/* : nullable Object */;
412 short int var1
/* : Bool */;
415 const struct type
* type_struct
;
416 const char* var_class_name
;
417 short int var2
/* : Bool */;
420 const struct type
* type_struct5
;
421 const char* var_class_name6
;
422 short int var7
/* : Bool */;
425 const struct type
* type_struct10
;
426 const char* var_class_name11
;
427 val
* var_k1
/* var k1: Object */;
428 val
* var_k2
/* var k2: Object */;
429 val
* var_k3
/* var k3: Object */;
430 val
* var12
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
431 val
* var_level1
/* var level1: HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
432 short int var13
/* : Bool */;
433 short int var14
/* : Bool */;
434 val
* var15
/* : null */;
435 val
* var16
/* : nullable Object */;
436 val
* var_level2
/* var level2: HashMap2[Object, Object, nullable Object] */;
437 val
* var17
/* : nullable Object */;
438 /* Covariant cast for argument 0 (k1) <p0:Object> isa HashMap3#0 */
439 /* <p0:Object> isa HashMap3#0 */
440 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT0
];
441 cltype
= type_struct
->color
;
442 idtype
= type_struct
->id
;
443 if(cltype
>= p0
->type
->table_size
) {
446 var1
= p0
->type
->type_table
[cltype
] == idtype
;
449 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
450 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#0", var_class_name
);
451 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 70);
454 /* Covariant cast for argument 1 (k2) <p1:Object> isa HashMap3#1 */
455 /* <p1:Object> isa HashMap3#1 */
456 type_struct5
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT1
];
457 cltype3
= type_struct5
->color
;
458 idtype4
= type_struct5
->id
;
459 if(cltype3
>= p1
->type
->table_size
) {
462 var2
= p1
->type
->type_table
[cltype3
] == idtype4
;
465 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
466 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#1", var_class_name6
);
467 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 70);
470 /* Covariant cast for argument 2 (k3) <p2:Object> isa HashMap3#2 */
471 /* <p2:Object> isa HashMap3#2 */
472 type_struct10
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT2
];
473 cltype8
= type_struct10
->color
;
474 idtype9
= type_struct10
->id
;
475 if(cltype8
>= p2
->type
->table_size
) {
478 var7
= p2
->type
->type_table
[cltype8
] == idtype9
;
481 var_class_name11
= p2
== NULL ?
"null" : p2
->type
->name
;
482 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#2", var_class_name11
);
483 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 70);
489 var12
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_more_collections__HashMap3__level1
]))(self
) /* level1 on <self:HashMap3[Object, Object, Object, nullable Object]>*/;
491 var13
= ((short int (*)(val
*, val
*))(var_level1
->class->vft
[COLOR_abstract_collection__MapRead__has_key
]))(var_level1
, var_k1
) /* has_key on <var_level1:HashMap[Object, HashMap2[Object, Object, nullable Object]]>*/;
499 var16
= ((val
* (*)(val
*, val
*))(var_level1
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var_level1
, var_k1
) /* [] on <var_level1:HashMap[Object, HashMap2[Object, Object, nullable Object]]>*/;
501 var17
= ((val
* (*)(val
*, val
*, val
*))(var_level2
->class->vft
[COLOR_more_collections__HashMap2___91d_93d
]))(var_level2
, var_k2
, var_k3
) /* [] on <var_level2:HashMap2[Object, Object, nullable Object]>*/;
507 /* method more_collections#HashMap3#[] for (self: Object, Object, Object, Object): nullable Object */
508 val
* VIRTUAL_more_collections__HashMap3___91d_93d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
509 val
* var
/* : nullable Object */;
510 val
* var1
/* : nullable Object */;
511 var1
= more_collections__HashMap3___91d_93d(self
, p0
, p1
, p2
);
516 /* method more_collections#HashMap3#[]= for (self: HashMap3[Object, Object, Object, nullable Object], Object, Object, Object, nullable Object) */
517 void more_collections__HashMap3___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
518 short int var
/* : Bool */;
521 const struct type
* type_struct
;
522 const char* var_class_name
;
523 short int var1
/* : Bool */;
526 const struct type
* type_struct4
;
527 const char* var_class_name5
;
528 short int var6
/* : Bool */;
531 const struct type
* type_struct9
;
532 const char* var_class_name10
;
533 short int var11
/* : Bool */;
536 const struct type
* type_struct14
;
537 short int is_nullable
;
538 const char* var_class_name15
;
539 val
* var_k1
/* var k1: Object */;
540 val
* var_k2
/* var k2: Object */;
541 val
* var_k3
/* var k3: Object */;
542 val
* var_v
/* var v: nullable Object */;
543 val
* var16
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
544 val
* var_level1
/* var level1: HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
545 short int var17
/* : Bool */;
546 short int var18
/* : Bool */;
547 val
* var19
/* : HashMap2[Object, Object, nullable Object] */;
548 val
* var_level2
/* var level2: HashMap2[Object, Object, nullable Object] */;
549 val
* var20
/* : nullable Object */;
550 /* Covariant cast for argument 0 (k1) <p0:Object> isa HashMap3#0 */
551 /* <p0:Object> isa HashMap3#0 */
552 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT0
];
553 cltype
= type_struct
->color
;
554 idtype
= type_struct
->id
;
555 if(cltype
>= p0
->type
->table_size
) {
558 var
= p0
->type
->type_table
[cltype
] == idtype
;
561 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
562 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#0", var_class_name
);
563 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 80);
566 /* Covariant cast for argument 1 (k2) <p1:Object> isa HashMap3#1 */
567 /* <p1:Object> isa HashMap3#1 */
568 type_struct4
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT1
];
569 cltype2
= type_struct4
->color
;
570 idtype3
= type_struct4
->id
;
571 if(cltype2
>= p1
->type
->table_size
) {
574 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
577 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
578 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#1", var_class_name5
);
579 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 80);
582 /* Covariant cast for argument 2 (k3) <p2:Object> isa HashMap3#2 */
583 /* <p2:Object> isa HashMap3#2 */
584 type_struct9
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT2
];
585 cltype7
= type_struct9
->color
;
586 idtype8
= type_struct9
->id
;
587 if(cltype7
>= p2
->type
->table_size
) {
590 var6
= p2
->type
->type_table
[cltype7
] == idtype8
;
593 var_class_name10
= p2
== NULL ?
"null" : p2
->type
->name
;
594 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#2", var_class_name10
);
595 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 80);
598 /* Covariant cast for argument 3 (v) <p3:nullable Object> isa HashMap3#3 */
599 /* <p3:nullable Object> isa HashMap3#3 */
600 type_struct14
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT3
];
601 cltype12
= type_struct14
->color
;
602 idtype13
= type_struct14
->id
;
603 is_nullable
= type_struct14
->is_nullable
;
607 if(cltype12
>= p3
->type
->table_size
) {
610 var11
= p3
->type
->type_table
[cltype12
] == idtype13
;
614 var_class_name15
= p3
== NULL ?
"null" : p3
->type
->name
;
615 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#3", var_class_name15
);
616 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 80);
623 var16
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_more_collections__HashMap3__level1
]))(self
) /* level1 on <self:HashMap3[Object, Object, Object, nullable Object]>*/;
625 var17
= ((short int (*)(val
*, val
*))(var_level1
->class->vft
[COLOR_abstract_collection__MapRead__has_key
]))(var_level1
, var_k1
) /* has_key on <var_level1:HashMap[Object, HashMap2[Object, Object, nullable Object]]>*/;
628 var19
= NEW_more_collections__HashMap2(self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2more_collections__HashMap3_FT1more_collections__HashMap3_FT2more_collections__HashMap3_FT3
]);
629 ((void (*)(val
*))(var19
->class->vft
[COLOR_more_collections__HashMap2__init
]))(var19
) /* init on <var19:HashMap2[Object, Object, nullable Object]>*/;
631 ((void (*)(val
*, val
*, val
*))(var_level1
->class->vft
[COLOR_abstract_collection__Map___91d_93d_61d
]))(var_level1
, var_k1
, var_level2
) /* []= on <var_level1:HashMap[Object, HashMap2[Object, Object, nullable Object]]>*/;
633 var20
= ((val
* (*)(val
*, val
*))(var_level1
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var_level1
, var_k1
) /* [] on <var_level1:HashMap[Object, HashMap2[Object, Object, nullable Object]]>*/;
636 ((void (*)(val
*, val
*, val
*, val
*))(var_level2
->class->vft
[COLOR_more_collections__HashMap2___91d_93d_61d
]))(var_level2
, var_k2
, var_k3
, var_v
) /* []= on <var_level2:HashMap2[Object, Object, nullable Object]>*/;
639 /* method more_collections#HashMap3#[]= for (self: Object, Object, Object, Object, nullable Object) */
640 void VIRTUAL_more_collections__HashMap3___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
641 more_collections__HashMap3___91d_93d_61d(self
, p0
, p1
, p2
, p3
);
644 /* method more_collections#HashMap3#init for (self: HashMap3[Object, Object, Object, nullable Object]) */
645 void more_collections__HashMap3__init(val
* self
) {
648 /* method more_collections#HashMap3#init for (self: Object) */
649 void VIRTUAL_more_collections__HashMap3__init(val
* self
) {
650 more_collections__HashMap3__init(self
);