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]>*/;
72 CHECK_NEW_array__Array(var8
);
74 ((void (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Map___91d_93d_61d
]))(self
, var_k
, var8
) /* []= on <self:MultiHashMap[Object, nullable Object]>*/;
78 /* method more_collections#MultiHashMap#add_one for (self: Object, Object, nullable Object) */
79 void VIRTUAL_more_collections__MultiHashMap__add_one(val
* self
, val
* p0
, val
* p1
) {
80 more_collections__MultiHashMap__add_one(self
, p0
, p1
);
83 /* method more_collections#MultiHashMap#init for (self: MultiHashMap[Object, nullable Object]) */
84 void more_collections__MultiHashMap__init(val
* self
) {
85 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMap__init
]))(self
) /* init on <self:MultiHashMap[Object, nullable Object]>*/;
88 /* method more_collections#MultiHashMap#init for (self: Object) */
89 void VIRTUAL_more_collections__MultiHashMap__init(val
* self
) {
90 more_collections__MultiHashMap__init(self
);
93 /* method more_collections#HashMap2#level1 for (self: HashMap2[Object, Object, nullable Object]): HashMap[Object, HashMap[Object, nullable Object]] */
94 val
* more_collections__HashMap2__level1(val
* self
) {
95 val
* var
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
96 val
* var1
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
97 var1
= self
->attrs
[COLOR_more_collections__HashMap2___64dlevel1
].val
; /* @level1 on <self:HashMap2[Object, Object, nullable Object]> */
99 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @level1");
100 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 38);
107 /* method more_collections#HashMap2#level1 for (self: Object): HashMap[Object, HashMap[Object, nullable Object]] */
108 val
* VIRTUAL_more_collections__HashMap2__level1(val
* self
) {
109 val
* var
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
110 val
* var1
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
111 var1
= more_collections__HashMap2__level1(self
);
116 /* method more_collections#HashMap2#level1= for (self: HashMap2[Object, Object, nullable Object], HashMap[Object, HashMap[Object, nullable Object]]) */
117 void more_collections__HashMap2__level1_61d(val
* self
, val
* p0
) {
118 short int var
/* : Bool */;
121 const struct type
* type_struct
;
122 const char* var_class_name
;
123 /* Covariant cast for argument 0 (level1) <p0:HashMap[Object, HashMap[Object, nullable Object]]> isa HashMap[HashMap2#0, HashMap[HashMap2#1, HashMap2#2]] */
124 /* <p0:HashMap[Object, HashMap[Object, nullable Object]]> isa HashMap[HashMap2#0, HashMap[HashMap2#1, HashMap2#2]] */
125 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapmore_collections__HashMap2_FT0hash_collection__HashMapmore_collections__HashMap2_FT1more_collections__HashMap2_FT2
];
126 cltype
= type_struct
->color
;
127 idtype
= type_struct
->id
;
128 if(cltype
>= p0
->type
->table_size
) {
131 var
= p0
->type
->type_table
[cltype
] == idtype
;
134 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
135 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMap2#0, HashMap[HashMap2#1, HashMap2#2]]", var_class_name
);
136 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 38);
139 self
->attrs
[COLOR_more_collections__HashMap2___64dlevel1
].val
= p0
; /* @level1 on <self:HashMap2[Object, Object, nullable Object]> */
142 /* method more_collections#HashMap2#level1= for (self: Object, HashMap[Object, HashMap[Object, nullable Object]]) */
143 void VIRTUAL_more_collections__HashMap2__level1_61d(val
* self
, val
* p0
) {
144 more_collections__HashMap2__level1_61d(self
, p0
);
147 /* method more_collections#HashMap2#[] for (self: HashMap2[Object, Object, nullable Object], Object, Object): nullable Object */
148 val
* more_collections__HashMap2___91d_93d(val
* self
, val
* p0
, val
* p1
) {
149 val
* var
/* : nullable Object */;
150 short int var1
/* : Bool */;
153 const struct type
* type_struct
;
154 const char* var_class_name
;
155 short int var2
/* : Bool */;
158 const struct type
* type_struct5
;
159 const char* var_class_name6
;
160 val
* var_k1
/* var k1: Object */;
161 val
* var_k2
/* var k2: Object */;
162 val
* var7
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
163 val
* var_level1
/* var level1: HashMap[Object, HashMap[Object, nullable Object]] */;
164 short int var8
/* : Bool */;
165 short int var9
/* : Bool */;
166 val
* var10
/* : null */;
167 val
* var11
/* : nullable Object */;
168 val
* var_level2
/* var level2: HashMap[Object, nullable Object] */;
169 short int var12
/* : Bool */;
170 short int var13
/* : Bool */;
171 val
* var14
/* : null */;
172 val
* var15
/* : nullable Object */;
173 /* Covariant cast for argument 0 (k1) <p0:Object> isa HashMap2#0 */
174 /* <p0:Object> isa HashMap2#0 */
175 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT0
];
176 cltype
= type_struct
->color
;
177 idtype
= type_struct
->id
;
178 if(cltype
>= p0
->type
->table_size
) {
181 var1
= p0
->type
->type_table
[cltype
] == idtype
;
184 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
185 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#0", var_class_name
);
186 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 40);
189 /* Covariant cast for argument 1 (k2) <p1:Object> isa HashMap2#1 */
190 /* <p1:Object> isa HashMap2#1 */
191 type_struct5
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT1
];
192 cltype3
= type_struct5
->color
;
193 idtype4
= type_struct5
->id
;
194 if(cltype3
>= p1
->type
->table_size
) {
197 var2
= p1
->type
->type_table
[cltype3
] == idtype4
;
200 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
201 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#1", var_class_name6
);
202 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 40);
207 var7
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_more_collections__HashMap2__level1
]))(self
) /* level1 on <self:HashMap2[Object, Object, nullable Object]>*/;
209 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]]>*/;
217 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]]>*/;
219 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]>*/;
227 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]>*/;
233 /* method more_collections#HashMap2#[] for (self: Object, Object, Object): nullable Object */
234 val
* VIRTUAL_more_collections__HashMap2___91d_93d(val
* self
, val
* p0
, val
* p1
) {
235 val
* var
/* : nullable Object */;
236 val
* var1
/* : nullable Object */;
237 var1
= more_collections__HashMap2___91d_93d(self
, p0
, p1
);
242 /* method more_collections#HashMap2#[]= for (self: HashMap2[Object, Object, nullable Object], Object, Object, nullable Object) */
243 void more_collections__HashMap2___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
244 short int var
/* : Bool */;
247 const struct type
* type_struct
;
248 const char* var_class_name
;
249 short int var1
/* : Bool */;
252 const struct type
* type_struct4
;
253 const char* var_class_name5
;
254 short int var6
/* : Bool */;
257 const struct type
* type_struct9
;
258 short int is_nullable
;
259 const char* var_class_name10
;
260 val
* var_k1
/* var k1: Object */;
261 val
* var_k2
/* var k2: Object */;
262 val
* var_v
/* var v: nullable Object */;
263 val
* var11
/* : HashMap[Object, HashMap[Object, nullable Object]] */;
264 val
* var_level1
/* var level1: HashMap[Object, HashMap[Object, nullable Object]] */;
265 short int var12
/* : Bool */;
266 short int var13
/* : Bool */;
267 val
* var14
/* : HashMap[Object, nullable Object] */;
268 val
* var_level2
/* var level2: HashMap[Object, nullable Object] */;
269 val
* var15
/* : nullable Object */;
270 /* Covariant cast for argument 0 (k1) <p0:Object> isa HashMap2#0 */
271 /* <p0:Object> isa HashMap2#0 */
272 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT0
];
273 cltype
= type_struct
->color
;
274 idtype
= type_struct
->id
;
275 if(cltype
>= p0
->type
->table_size
) {
278 var
= p0
->type
->type_table
[cltype
] == idtype
;
281 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
282 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#0", var_class_name
);
283 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 51);
286 /* Covariant cast for argument 1 (k2) <p1:Object> isa HashMap2#1 */
287 /* <p1:Object> isa HashMap2#1 */
288 type_struct4
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT1
];
289 cltype2
= type_struct4
->color
;
290 idtype3
= type_struct4
->id
;
291 if(cltype2
>= p1
->type
->table_size
) {
294 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
297 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
298 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#1", var_class_name5
);
299 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 51);
302 /* Covariant cast for argument 2 (v) <p2:nullable Object> isa HashMap2#2 */
303 /* <p2:nullable Object> isa HashMap2#2 */
304 type_struct9
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2_FT2
];
305 cltype7
= type_struct9
->color
;
306 idtype8
= type_struct9
->id
;
307 is_nullable
= type_struct9
->is_nullable
;
311 if(cltype7
>= p2
->type
->table_size
) {
314 var6
= p2
->type
->type_table
[cltype7
] == idtype8
;
318 var_class_name10
= p2
== NULL ?
"null" : p2
->type
->name
;
319 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap2#2", var_class_name10
);
320 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 51);
326 var11
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_more_collections__HashMap2__level1
]))(self
) /* level1 on <self:HashMap2[Object, Object, nullable Object]>*/;
328 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]]>*/;
331 var14
= NEW_hash_collection__HashMap(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapmore_collections__HashMap2_FT1more_collections__HashMap2_FT2
]);
332 ((void (*)(val
*))(var14
->class->vft
[COLOR_hash_collection__HashMap__init
]))(var14
) /* init on <var14:HashMap[Object, nullable Object]>*/;
333 CHECK_NEW_hash_collection__HashMap(var14
);
335 ((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]]>*/;
337 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]]>*/;
340 ((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]>*/;
343 /* method more_collections#HashMap2#[]= for (self: Object, Object, Object, nullable Object) */
344 void VIRTUAL_more_collections__HashMap2___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
345 more_collections__HashMap2___91d_93d_61d(self
, p0
, p1
, p2
);
348 /* method more_collections#HashMap2#init for (self: HashMap2[Object, Object, nullable Object]) */
349 void more_collections__HashMap2__init(val
* self
) {
352 /* method more_collections#HashMap2#init for (self: Object) */
353 void VIRTUAL_more_collections__HashMap2__init(val
* self
) {
354 more_collections__HashMap2__init(self
);
357 /* method more_collections#HashMap3#level1 for (self: HashMap3[Object, Object, Object, nullable Object]): HashMap[Object, HashMap2[Object, Object, nullable Object]] */
358 val
* more_collections__HashMap3__level1(val
* self
) {
359 val
* var
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
360 val
* var1
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
361 var1
= self
->attrs
[COLOR_more_collections__HashMap3___64dlevel1
].val
; /* @level1 on <self:HashMap3[Object, Object, Object, nullable Object]> */
363 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @level1");
364 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 68);
371 /* method more_collections#HashMap3#level1 for (self: Object): HashMap[Object, HashMap2[Object, Object, nullable Object]] */
372 val
* VIRTUAL_more_collections__HashMap3__level1(val
* self
) {
373 val
* var
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
374 val
* var1
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
375 var1
= more_collections__HashMap3__level1(self
);
380 /* method more_collections#HashMap3#level1= for (self: HashMap3[Object, Object, Object, nullable Object], HashMap[Object, HashMap2[Object, Object, nullable Object]]) */
381 void more_collections__HashMap3__level1_61d(val
* self
, val
* p0
) {
382 short int var
/* : Bool */;
385 const struct type
* type_struct
;
386 const char* var_class_name
;
387 /* 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]] */
388 /* <p0:HashMap[Object, HashMap2[Object, Object, nullable Object]]> isa HashMap[HashMap3#0, HashMap2[HashMap3#1, HashMap3#2, HashMap3#3]] */
389 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
];
390 cltype
= type_struct
->color
;
391 idtype
= type_struct
->id
;
392 if(cltype
>= p0
->type
->table_size
) {
395 var
= p0
->type
->type_table
[cltype
] == idtype
;
398 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
399 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMap3#0, HashMap2[HashMap3#1, HashMap3#2, HashMap3#3]]", var_class_name
);
400 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 68);
403 self
->attrs
[COLOR_more_collections__HashMap3___64dlevel1
].val
= p0
; /* @level1 on <self:HashMap3[Object, Object, Object, nullable Object]> */
406 /* method more_collections#HashMap3#level1= for (self: Object, HashMap[Object, HashMap2[Object, Object, nullable Object]]) */
407 void VIRTUAL_more_collections__HashMap3__level1_61d(val
* self
, val
* p0
) {
408 more_collections__HashMap3__level1_61d(self
, p0
);
411 /* method more_collections#HashMap3#[] for (self: HashMap3[Object, Object, Object, nullable Object], Object, Object, Object): nullable Object */
412 val
* more_collections__HashMap3___91d_93d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
413 val
* var
/* : nullable Object */;
414 short int var1
/* : Bool */;
417 const struct type
* type_struct
;
418 const char* var_class_name
;
419 short int var2
/* : Bool */;
422 const struct type
* type_struct5
;
423 const char* var_class_name6
;
424 short int var7
/* : Bool */;
427 const struct type
* type_struct10
;
428 const char* var_class_name11
;
429 val
* var_k1
/* var k1: Object */;
430 val
* var_k2
/* var k2: Object */;
431 val
* var_k3
/* var k3: Object */;
432 val
* var12
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
433 val
* var_level1
/* var level1: HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
434 short int var13
/* : Bool */;
435 short int var14
/* : Bool */;
436 val
* var15
/* : null */;
437 val
* var16
/* : nullable Object */;
438 val
* var_level2
/* var level2: HashMap2[Object, Object, nullable Object] */;
439 val
* var17
/* : nullable Object */;
440 /* Covariant cast for argument 0 (k1) <p0:Object> isa HashMap3#0 */
441 /* <p0:Object> isa HashMap3#0 */
442 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT0
];
443 cltype
= type_struct
->color
;
444 idtype
= type_struct
->id
;
445 if(cltype
>= p0
->type
->table_size
) {
448 var1
= p0
->type
->type_table
[cltype
] == idtype
;
451 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
452 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#0", var_class_name
);
453 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 70);
456 /* Covariant cast for argument 1 (k2) <p1:Object> isa HashMap3#1 */
457 /* <p1:Object> isa HashMap3#1 */
458 type_struct5
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT1
];
459 cltype3
= type_struct5
->color
;
460 idtype4
= type_struct5
->id
;
461 if(cltype3
>= p1
->type
->table_size
) {
464 var2
= p1
->type
->type_table
[cltype3
] == idtype4
;
467 var_class_name6
= p1
== NULL ?
"null" : p1
->type
->name
;
468 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#1", var_class_name6
);
469 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 70);
472 /* Covariant cast for argument 2 (k3) <p2:Object> isa HashMap3#2 */
473 /* <p2:Object> isa HashMap3#2 */
474 type_struct10
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT2
];
475 cltype8
= type_struct10
->color
;
476 idtype9
= type_struct10
->id
;
477 if(cltype8
>= p2
->type
->table_size
) {
480 var7
= p2
->type
->type_table
[cltype8
] == idtype9
;
483 var_class_name11
= p2
== NULL ?
"null" : p2
->type
->name
;
484 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#2", var_class_name11
);
485 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 70);
491 var12
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_more_collections__HashMap3__level1
]))(self
) /* level1 on <self:HashMap3[Object, Object, Object, nullable Object]>*/;
493 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]]>*/;
501 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]]>*/;
503 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]>*/;
509 /* method more_collections#HashMap3#[] for (self: Object, Object, Object, Object): nullable Object */
510 val
* VIRTUAL_more_collections__HashMap3___91d_93d(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
511 val
* var
/* : nullable Object */;
512 val
* var1
/* : nullable Object */;
513 var1
= more_collections__HashMap3___91d_93d(self
, p0
, p1
, p2
);
518 /* method more_collections#HashMap3#[]= for (self: HashMap3[Object, Object, Object, nullable Object], Object, Object, Object, nullable Object) */
519 void more_collections__HashMap3___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
520 short int var
/* : Bool */;
523 const struct type
* type_struct
;
524 const char* var_class_name
;
525 short int var1
/* : Bool */;
528 const struct type
* type_struct4
;
529 const char* var_class_name5
;
530 short int var6
/* : Bool */;
533 const struct type
* type_struct9
;
534 const char* var_class_name10
;
535 short int var11
/* : Bool */;
538 const struct type
* type_struct14
;
539 short int is_nullable
;
540 const char* var_class_name15
;
541 val
* var_k1
/* var k1: Object */;
542 val
* var_k2
/* var k2: Object */;
543 val
* var_k3
/* var k3: Object */;
544 val
* var_v
/* var v: nullable Object */;
545 val
* var16
/* : HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
546 val
* var_level1
/* var level1: HashMap[Object, HashMap2[Object, Object, nullable Object]] */;
547 short int var17
/* : Bool */;
548 short int var18
/* : Bool */;
549 val
* var19
/* : HashMap2[Object, Object, nullable Object] */;
550 val
* var_level2
/* var level2: HashMap2[Object, Object, nullable Object] */;
551 val
* var20
/* : nullable Object */;
552 /* Covariant cast for argument 0 (k1) <p0:Object> isa HashMap3#0 */
553 /* <p0:Object> isa HashMap3#0 */
554 type_struct
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT0
];
555 cltype
= type_struct
->color
;
556 idtype
= type_struct
->id
;
557 if(cltype
>= p0
->type
->table_size
) {
560 var
= p0
->type
->type_table
[cltype
] == idtype
;
563 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
564 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#0", var_class_name
);
565 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 80);
568 /* Covariant cast for argument 1 (k2) <p1:Object> isa HashMap3#1 */
569 /* <p1:Object> isa HashMap3#1 */
570 type_struct4
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT1
];
571 cltype2
= type_struct4
->color
;
572 idtype3
= type_struct4
->id
;
573 if(cltype2
>= p1
->type
->table_size
) {
576 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
579 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
580 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#1", var_class_name5
);
581 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 80);
584 /* Covariant cast for argument 2 (k3) <p2:Object> isa HashMap3#2 */
585 /* <p2:Object> isa HashMap3#2 */
586 type_struct9
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT2
];
587 cltype7
= type_struct9
->color
;
588 idtype8
= type_struct9
->id
;
589 if(cltype7
>= p2
->type
->table_size
) {
592 var6
= p2
->type
->type_table
[cltype7
] == idtype8
;
595 var_class_name10
= p2
== NULL ?
"null" : p2
->type
->name
;
596 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#2", var_class_name10
);
597 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 80);
600 /* Covariant cast for argument 3 (v) <p3:nullable Object> isa HashMap3#3 */
601 /* <p3:nullable Object> isa HashMap3#3 */
602 type_struct14
= self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap3_FT3
];
603 cltype12
= type_struct14
->color
;
604 idtype13
= type_struct14
->id
;
605 is_nullable
= type_struct14
->is_nullable
;
609 if(cltype12
>= p3
->type
->table_size
) {
612 var11
= p3
->type
->type_table
[cltype12
] == idtype13
;
616 var_class_name15
= p3
== NULL ?
"null" : p3
->type
->name
;
617 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap3#3", var_class_name15
);
618 fprintf(stderr
, " (%s:%d)\n", "lib/more_collections.nit", 80);
625 var16
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_more_collections__HashMap3__level1
]))(self
) /* level1 on <self:HashMap3[Object, Object, Object, nullable Object]>*/;
627 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]]>*/;
630 var19
= NEW_more_collections__HashMap2(self
->type
->resolution_table
->types
[COLOR_more_collections__HashMap2more_collections__HashMap3_FT1more_collections__HashMap3_FT2more_collections__HashMap3_FT3
]);
631 ((void (*)(val
*))(var19
->class->vft
[COLOR_more_collections__HashMap2__init
]))(var19
) /* init on <var19:HashMap2[Object, Object, nullable Object]>*/;
632 CHECK_NEW_more_collections__HashMap2(var19
);
634 ((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]]>*/;
636 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]]>*/;
639 ((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]>*/;
642 /* method more_collections#HashMap3#[]= for (self: Object, Object, Object, Object, nullable Object) */
643 void VIRTUAL_more_collections__HashMap3___91d_93d_61d(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
644 more_collections__HashMap3___91d_93d_61d(self
, p0
, p1
, p2
, p3
);
647 /* method more_collections#HashMap3#init for (self: HashMap3[Object, Object, Object, nullable Object]) */
648 void more_collections__HashMap3__init(val
* self
) {
651 /* method more_collections#HashMap3#init for (self: Object) */
652 void VIRTUAL_more_collections__HashMap3__init(val
* self
) {
653 more_collections__HashMap3__init(self
);