misc/vim: inform the user when no results are found
[nit.git] / c_src / more_collections.sep.1.c
1 #include "more_collections.sep.0.h"
2 /* method more_collections#MultiHashMap#add_one for (self: MultiHashMap[nullable Object, nullable Object], nullable Object, nullable Object) */
3 void more_collections___more_collections__MultiHashMap___add_one(val* self, val* p0, val* p1) {
4 short int var /* : Bool */;
5 int cltype;
6 int idtype;
7 const struct type* type_struct;
8 short int is_nullable;
9 const char* var_class_name;
10 short int var1 /* : Bool */;
11 int cltype2;
12 int idtype3;
13 const struct type* type_struct4;
14 short int is_nullable5;
15 const char* var_class_name6;
16 val* var_k /* var k: nullable Object */;
17 val* var_v /* var v: nullable Object */;
18 val* var7 /* : nullable Object */;
19 val* var_x /* var x: nullable Array[nullable Object] */;
20 val* var8 /* : null */;
21 short int var9 /* : Bool */;
22 short int var10 /* : Bool */;
23 val* var_other /* var other: nullable Object */;
24 short int var12 /* : Bool */;
25 short int var13 /* : Bool */;
26 val* var14 /* : Array[nullable Object] */;
27 long var15 /* : Int */;
28 val* var_ /* var : Array[nullable Object] */;
29 /* Covariant cast for argument 0 (k) <p0:nullable Object> isa K */
30 /* <p0:nullable Object> isa K */
31 type_struct = self->type->resolution_table->types[COLOR_more_collections__MultiHashMap___35dK];
32 cltype = type_struct->color;
33 idtype = type_struct->id;
34 is_nullable = type_struct->is_nullable;
35 if(p0 == NULL) {
36 var = is_nullable;
37 } else {
38 if(cltype >= p0->type->table_size) {
39 var = 0;
40 } else {
41 var = p0->type->type_table[cltype] == idtype;
42 }
43 }
44 if (unlikely(!var)) {
45 var_class_name = p0 == NULL ? "null" : p0->type->name;
46 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name);
47 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 35);
48 show_backtrace(1);
49 }
50 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa V */
51 /* <p1:nullable Object> isa V */
52 type_struct4 = self->type->resolution_table->types[COLOR_more_collections__MultiHashMap___35dV];
53 cltype2 = type_struct4->color;
54 idtype3 = type_struct4->id;
55 is_nullable5 = type_struct4->is_nullable;
56 if(p1 == NULL) {
57 var1 = is_nullable5;
58 } else {
59 if(cltype2 >= p1->type->table_size) {
60 var1 = 0;
61 } else {
62 var1 = p1->type->type_table[cltype2] == idtype3;
63 }
64 }
65 if (unlikely(!var1)) {
66 var_class_name6 = p1 == NULL ? "null" : p1->type->name;
67 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name6);
68 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 35);
69 show_backtrace(1);
70 }
71 var_k = p0;
72 var_v = p1;
73 {
74 var7 = standard___standard__HashMap___standard__abstract_collection__MapRead__get_or_null(self, var_k);
75 }
76 var_x = var7;
77 var8 = NULL;
78 if (var_x == NULL) {
79 var9 = 0; /* is null */
80 } else {
81 var9 = 1; /* arg is null and recv is not */
82 }
83 if (0) {
84 { /* Inline kernel#Object#!= (var_x,var8) on <var_x:nullable Array[nullable Object]> */
85 var_other = var8;
86 {
87 var12 = ((short int (*)(val* self, val* p0))(var_x->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_x, var_other) /* == on <var_x:nullable Array[nullable Object](Array[nullable Object])>*/;
88 }
89 var13 = !var12;
90 var10 = var13;
91 goto RET_LABEL11;
92 RET_LABEL11:(void)0;
93 }
94 var9 = var10;
95 }
96 if (var9){
97 {
98 standard___standard__Array___standard__abstract_collection__SimpleCollection__add(var_x, var_v); /* Direct call array#Array#add on <var_x:nullable Array[nullable Object](Array[nullable Object])>*/
99 }
100 } else {
101 var14 = NEW_standard__Array(self->type->resolution_table->types[COLOR_standard__Array__more_collections__MultiHashMap___35dV]);
102 var15 = 1;
103 {
104 standard___standard__Array___with_capacity(var14, var15); /* Direct call array#Array#with_capacity on <var14:Array[nullable Object]>*/
105 }
106 var_ = var14;
107 {
108 standard___standard__AbstractArray___standard__abstract_collection__Sequence__push(var_, var_v); /* Direct call array#AbstractArray#push on <var_:Array[nullable Object]>*/
109 }
110 {
111 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(self, var_k, var_); /* Direct call hash_collection#HashMap#[]= on <self:MultiHashMap[nullable Object, nullable Object]>*/
112 }
113 }
114 RET_LABEL:;
115 }
116 /* method more_collections#MultiHashMap#provide_default_value for (self: MultiHashMap[nullable Object, nullable Object], nullable Object): Array[nullable Object] */
117 val* more_collections___more_collections__MultiHashMap___standard__abstract_collection__MapRead__provide_default_value(val* self, val* p0) {
118 val* var /* : Array[nullable Object] */;
119 short int var1 /* : Bool */;
120 int cltype;
121 int idtype;
122 const struct type* type_struct;
123 short int is_nullable;
124 const char* var_class_name;
125 val* var_key /* var key: nullable Object */;
126 val* var2 /* : Array[nullable Object] */;
127 val* var_res /* var res: Array[nullable Object] */;
128 /* Covariant cast for argument 0 (key) <p0:nullable Object> isa K */
129 /* <p0:nullable Object> isa K */
130 type_struct = self->type->resolution_table->types[COLOR_more_collections__MultiHashMap___35dK];
131 cltype = type_struct->color;
132 idtype = type_struct->id;
133 is_nullable = type_struct->is_nullable;
134 if(p0 == NULL) {
135 var1 = is_nullable;
136 } else {
137 if(cltype >= p0->type->table_size) {
138 var1 = 0;
139 } else {
140 var1 = p0->type->type_table[cltype] == idtype;
141 }
142 }
143 if (unlikely(!var1)) {
144 var_class_name = p0 == NULL ? "null" : p0->type->name;
145 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name);
146 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 47);
147 show_backtrace(1);
148 }
149 var_key = p0;
150 var2 = NEW_standard__Array(self->type->resolution_table->types[COLOR_standard__Array__more_collections__MultiHashMap___35dV]);
151 {
152 standard___standard__Array___standard__kernel__Object__init(var2); /* Direct call array#Array#init on <var2:Array[nullable Object]>*/
153 }
154 var_res = var2;
155 {
156 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(self, var_key, var_res); /* Direct call hash_collection#HashMap#[]= on <self:MultiHashMap[nullable Object, nullable Object]>*/
157 }
158 var = var_res;
159 goto RET_LABEL;
160 RET_LABEL:;
161 return var;
162 }
163 /* method more_collections#HashMap2#level1 for (self: HashMap2[nullable Object, nullable Object, nullable Object]): HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */
164 val* more_collections___more_collections__HashMap2___level1(val* self) {
165 val* var /* : HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
166 val* var1 /* : HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
167 var1 = self->attrs[COLOR_more_collections__HashMap2___level1].val; /* _level1 on <self:HashMap2[nullable Object, nullable Object, nullable Object]> */
168 if (unlikely(var1 == NULL)) {
169 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
170 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 64);
171 show_backtrace(1);
172 }
173 var = var1;
174 RET_LABEL:;
175 return var;
176 }
177 /* method more_collections#HashMap2#[] for (self: HashMap2[nullable Object, nullable Object, nullable Object], nullable Object, nullable Object): nullable Object */
178 val* more_collections___more_collections__HashMap2____91d_93d(val* self, val* p0, val* p1) {
179 val* var /* : nullable Object */;
180 short int var1 /* : Bool */;
181 int cltype;
182 int idtype;
183 const struct type* type_struct;
184 short int is_nullable;
185 const char* var_class_name;
186 short int var2 /* : Bool */;
187 int cltype3;
188 int idtype4;
189 const struct type* type_struct5;
190 short int is_nullable6;
191 const char* var_class_name7;
192 val* var_k1 /* var k1: nullable Object */;
193 val* var_k2 /* var k2: nullable Object */;
194 val* var8 /* : HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
195 val* var10 /* : HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
196 val* var_level1 /* var level1: HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
197 val* var11 /* : nullable Object */;
198 val* var_level2 /* var level2: nullable HashMap[nullable Object, nullable Object] */;
199 val* var12 /* : null */;
200 short int var13 /* : Bool */;
201 short int var14 /* : Bool */;
202 val* var_other /* var other: nullable Object */;
203 short int var16 /* : Bool */;
204 short int var18 /* : Bool */;
205 val* var19 /* : null */;
206 val* var20 /* : nullable Object */;
207 /* Covariant cast for argument 0 (k1) <p0:nullable Object> isa K1 */
208 /* <p0:nullable Object> isa K1 */
209 type_struct = self->type->resolution_table->types[COLOR_more_collections__HashMap2___35dK1];
210 cltype = type_struct->color;
211 idtype = type_struct->id;
212 is_nullable = type_struct->is_nullable;
213 if(p0 == NULL) {
214 var1 = is_nullable;
215 } else {
216 if(cltype >= p0->type->table_size) {
217 var1 = 0;
218 } else {
219 var1 = p0->type->type_table[cltype] == idtype;
220 }
221 }
222 if (unlikely(!var1)) {
223 var_class_name = p0 == NULL ? "null" : p0->type->name;
224 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K1", var_class_name);
225 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 66);
226 show_backtrace(1);
227 }
228 /* Covariant cast for argument 1 (k2) <p1:nullable Object> isa K2 */
229 /* <p1:nullable Object> isa K2 */
230 type_struct5 = self->type->resolution_table->types[COLOR_more_collections__HashMap2___35dK2];
231 cltype3 = type_struct5->color;
232 idtype4 = type_struct5->id;
233 is_nullable6 = type_struct5->is_nullable;
234 if(p1 == NULL) {
235 var2 = is_nullable6;
236 } else {
237 if(cltype3 >= p1->type->table_size) {
238 var2 = 0;
239 } else {
240 var2 = p1->type->type_table[cltype3] == idtype4;
241 }
242 }
243 if (unlikely(!var2)) {
244 var_class_name7 = p1 == NULL ? "null" : p1->type->name;
245 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K2", var_class_name7);
246 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 66);
247 show_backtrace(1);
248 }
249 var_k1 = p0;
250 var_k2 = p1;
251 {
252 { /* Inline more_collections#HashMap2#level1 (self) on <self:HashMap2[nullable Object, nullable Object, nullable Object]> */
253 var10 = self->attrs[COLOR_more_collections__HashMap2___level1].val; /* _level1 on <self:HashMap2[nullable Object, nullable Object, nullable Object]> */
254 if (unlikely(var10 == NULL)) {
255 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
256 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 64);
257 show_backtrace(1);
258 }
259 var8 = var10;
260 RET_LABEL9:(void)0;
261 }
262 }
263 var_level1 = var8;
264 {
265 var11 = standard___standard__HashMap___standard__abstract_collection__MapRead__get_or_null(var_level1, var_k1);
266 }
267 var_level2 = var11;
268 var12 = NULL;
269 if (var_level2 == NULL) {
270 var13 = 1; /* is null */
271 } else {
272 var13 = 0; /* arg is null but recv is not */
273 }
274 if (0) {
275 { /* Inline kernel#Object#== (var_level2,var12) on <var_level2:nullable HashMap[nullable Object, nullable Object]> */
276 var_other = var12;
277 {
278 { /* Inline kernel#Object#is_same_instance (var_level2,var_other) on <var_level2:nullable HashMap[nullable Object, nullable Object](HashMap[nullable Object, nullable Object])> */
279 var18 = var_level2 == var_other;
280 var16 = var18;
281 goto RET_LABEL17;
282 RET_LABEL17:(void)0;
283 }
284 }
285 var14 = var16;
286 goto RET_LABEL15;
287 RET_LABEL15:(void)0;
288 }
289 var13 = var14;
290 }
291 if (var13){
292 var19 = NULL;
293 var = var19;
294 goto RET_LABEL;
295 } else {
296 }
297 {
298 var20 = standard___standard__HashMap___standard__abstract_collection__MapRead__get_or_null(var_level2, var_k2);
299 }
300 var = var20;
301 goto RET_LABEL;
302 RET_LABEL:;
303 return var;
304 }
305 /* method more_collections#HashMap2#[]= for (self: HashMap2[nullable Object, nullable Object, nullable Object], nullable Object, nullable Object, nullable Object) */
306 void more_collections___more_collections__HashMap2____91d_93d_61d(val* self, val* p0, val* p1, val* p2) {
307 short int var /* : Bool */;
308 int cltype;
309 int idtype;
310 const struct type* type_struct;
311 short int is_nullable;
312 const char* var_class_name;
313 short int var1 /* : Bool */;
314 int cltype2;
315 int idtype3;
316 const struct type* type_struct4;
317 short int is_nullable5;
318 const char* var_class_name6;
319 short int var7 /* : Bool */;
320 int cltype8;
321 int idtype9;
322 const struct type* type_struct10;
323 short int is_nullable11;
324 const char* var_class_name12;
325 val* var_k1 /* var k1: nullable Object */;
326 val* var_k2 /* var k2: nullable Object */;
327 val* var_v /* var v: nullable Object */;
328 val* var13 /* : HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
329 val* var15 /* : HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
330 val* var_level1 /* var level1: HashMap[nullable Object, HashMap[nullable Object, nullable Object]] */;
331 val* var16 /* : nullable Object */;
332 val* var_level2 /* var level2: nullable HashMap[nullable Object, nullable Object] */;
333 val* var17 /* : null */;
334 short int var18 /* : Bool */;
335 short int var19 /* : Bool */;
336 val* var_other /* var other: nullable Object */;
337 short int var21 /* : Bool */;
338 short int var23 /* : Bool */;
339 val* var24 /* : HashMap[nullable Object, nullable Object] */;
340 /* Covariant cast for argument 0 (k1) <p0:nullable Object> isa K1 */
341 /* <p0:nullable Object> isa K1 */
342 type_struct = self->type->resolution_table->types[COLOR_more_collections__HashMap2___35dK1];
343 cltype = type_struct->color;
344 idtype = type_struct->id;
345 is_nullable = type_struct->is_nullable;
346 if(p0 == NULL) {
347 var = is_nullable;
348 } else {
349 if(cltype >= p0->type->table_size) {
350 var = 0;
351 } else {
352 var = p0->type->type_table[cltype] == idtype;
353 }
354 }
355 if (unlikely(!var)) {
356 var_class_name = p0 == NULL ? "null" : p0->type->name;
357 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K1", var_class_name);
358 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 76);
359 show_backtrace(1);
360 }
361 /* Covariant cast for argument 1 (k2) <p1:nullable Object> isa K2 */
362 /* <p1:nullable Object> isa K2 */
363 type_struct4 = self->type->resolution_table->types[COLOR_more_collections__HashMap2___35dK2];
364 cltype2 = type_struct4->color;
365 idtype3 = type_struct4->id;
366 is_nullable5 = type_struct4->is_nullable;
367 if(p1 == NULL) {
368 var1 = is_nullable5;
369 } else {
370 if(cltype2 >= p1->type->table_size) {
371 var1 = 0;
372 } else {
373 var1 = p1->type->type_table[cltype2] == idtype3;
374 }
375 }
376 if (unlikely(!var1)) {
377 var_class_name6 = p1 == NULL ? "null" : p1->type->name;
378 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K2", var_class_name6);
379 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 76);
380 show_backtrace(1);
381 }
382 /* Covariant cast for argument 2 (v) <p2:nullable Object> isa V */
383 /* <p2:nullable Object> isa V */
384 type_struct10 = self->type->resolution_table->types[COLOR_more_collections__HashMap2___35dV];
385 cltype8 = type_struct10->color;
386 idtype9 = type_struct10->id;
387 is_nullable11 = type_struct10->is_nullable;
388 if(p2 == NULL) {
389 var7 = is_nullable11;
390 } else {
391 if(cltype8 >= p2->type->table_size) {
392 var7 = 0;
393 } else {
394 var7 = p2->type->type_table[cltype8] == idtype9;
395 }
396 }
397 if (unlikely(!var7)) {
398 var_class_name12 = p2 == NULL ? "null" : p2->type->name;
399 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name12);
400 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 76);
401 show_backtrace(1);
402 }
403 var_k1 = p0;
404 var_k2 = p1;
405 var_v = p2;
406 {
407 { /* Inline more_collections#HashMap2#level1 (self) on <self:HashMap2[nullable Object, nullable Object, nullable Object]> */
408 var15 = self->attrs[COLOR_more_collections__HashMap2___level1].val; /* _level1 on <self:HashMap2[nullable Object, nullable Object, nullable Object]> */
409 if (unlikely(var15 == NULL)) {
410 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
411 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 64);
412 show_backtrace(1);
413 }
414 var13 = var15;
415 RET_LABEL14:(void)0;
416 }
417 }
418 var_level1 = var13;
419 {
420 var16 = standard___standard__HashMap___standard__abstract_collection__MapRead__get_or_null(var_level1, var_k1);
421 }
422 var_level2 = var16;
423 var17 = NULL;
424 if (var_level2 == NULL) {
425 var18 = 1; /* is null */
426 } else {
427 var18 = 0; /* arg is null but recv is not */
428 }
429 if (0) {
430 { /* Inline kernel#Object#== (var_level2,var17) on <var_level2:nullable HashMap[nullable Object, nullable Object]> */
431 var_other = var17;
432 {
433 { /* Inline kernel#Object#is_same_instance (var_level2,var_other) on <var_level2:nullable HashMap[nullable Object, nullable Object](HashMap[nullable Object, nullable Object])> */
434 var23 = var_level2 == var_other;
435 var21 = var23;
436 goto RET_LABEL22;
437 RET_LABEL22:(void)0;
438 }
439 }
440 var19 = var21;
441 goto RET_LABEL20;
442 RET_LABEL20:(void)0;
443 }
444 var18 = var19;
445 }
446 if (var18){
447 var24 = NEW_standard__HashMap(self->type->resolution_table->types[COLOR_standard__HashMap__more_collections__HashMap2___35dK2__more_collections__HashMap2___35dV]);
448 {
449 standard___standard__HashMap___standard__kernel__Object__init(var24); /* Direct call hash_collection#HashMap#init on <var24:HashMap[nullable Object, nullable Object]>*/
450 }
451 var_level2 = var24;
452 {
453 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var_level1, var_k1, var_level2); /* Direct call hash_collection#HashMap#[]= on <var_level1:HashMap[nullable Object, HashMap[nullable Object, nullable Object]]>*/
454 }
455 } else {
456 }
457 {
458 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var_level2, var_k2, var_v); /* Direct call hash_collection#HashMap#[]= on <var_level2:nullable HashMap[nullable Object, nullable Object](HashMap[nullable Object, nullable Object])>*/
459 }
460 RET_LABEL:;
461 }
462 /* method more_collections#HashMap3#level1 for (self: HashMap3[nullable Object, nullable Object, nullable Object, nullable Object]): HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */
463 val* more_collections___more_collections__HashMap3___level1(val* self) {
464 val* var /* : HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
465 val* var1 /* : HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
466 var1 = self->attrs[COLOR_more_collections__HashMap3___level1].val; /* _level1 on <self:HashMap3[nullable Object, nullable Object, nullable Object, nullable Object]> */
467 if (unlikely(var1 == NULL)) {
468 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
469 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 108);
470 show_backtrace(1);
471 }
472 var = var1;
473 RET_LABEL:;
474 return var;
475 }
476 /* method more_collections#HashMap3#[] for (self: HashMap3[nullable Object, nullable Object, nullable Object, nullable Object], nullable Object, nullable Object, nullable Object): nullable Object */
477 val* more_collections___more_collections__HashMap3____91d_93d(val* self, val* p0, val* p1, val* p2) {
478 val* var /* : nullable Object */;
479 short int var1 /* : Bool */;
480 int cltype;
481 int idtype;
482 const struct type* type_struct;
483 short int is_nullable;
484 const char* var_class_name;
485 short int var2 /* : Bool */;
486 int cltype3;
487 int idtype4;
488 const struct type* type_struct5;
489 short int is_nullable6;
490 const char* var_class_name7;
491 short int var8 /* : Bool */;
492 int cltype9;
493 int idtype10;
494 const struct type* type_struct11;
495 short int is_nullable12;
496 const char* var_class_name13;
497 val* var_k1 /* var k1: nullable Object */;
498 val* var_k2 /* var k2: nullable Object */;
499 val* var_k3 /* var k3: nullable Object */;
500 val* var14 /* : HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
501 val* var16 /* : HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
502 val* var_level1 /* var level1: HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
503 val* var17 /* : nullable Object */;
504 val* var_level2 /* var level2: nullable HashMap2[nullable Object, nullable Object, nullable Object] */;
505 val* var18 /* : null */;
506 short int var19 /* : Bool */;
507 short int var20 /* : Bool */;
508 val* var_other /* var other: nullable Object */;
509 short int var22 /* : Bool */;
510 short int var24 /* : Bool */;
511 val* var25 /* : null */;
512 val* var26 /* : nullable Object */;
513 /* Covariant cast for argument 0 (k1) <p0:nullable Object> isa K1 */
514 /* <p0:nullable Object> isa K1 */
515 type_struct = self->type->resolution_table->types[COLOR_more_collections__HashMap3___35dK1];
516 cltype = type_struct->color;
517 idtype = type_struct->id;
518 is_nullable = type_struct->is_nullable;
519 if(p0 == NULL) {
520 var1 = is_nullable;
521 } else {
522 if(cltype >= p0->type->table_size) {
523 var1 = 0;
524 } else {
525 var1 = p0->type->type_table[cltype] == idtype;
526 }
527 }
528 if (unlikely(!var1)) {
529 var_class_name = p0 == NULL ? "null" : p0->type->name;
530 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K1", var_class_name);
531 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 110);
532 show_backtrace(1);
533 }
534 /* Covariant cast for argument 1 (k2) <p1:nullable Object> isa K2 */
535 /* <p1:nullable Object> isa K2 */
536 type_struct5 = self->type->resolution_table->types[COLOR_more_collections__HashMap3___35dK2];
537 cltype3 = type_struct5->color;
538 idtype4 = type_struct5->id;
539 is_nullable6 = type_struct5->is_nullable;
540 if(p1 == NULL) {
541 var2 = is_nullable6;
542 } else {
543 if(cltype3 >= p1->type->table_size) {
544 var2 = 0;
545 } else {
546 var2 = p1->type->type_table[cltype3] == idtype4;
547 }
548 }
549 if (unlikely(!var2)) {
550 var_class_name7 = p1 == NULL ? "null" : p1->type->name;
551 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K2", var_class_name7);
552 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 110);
553 show_backtrace(1);
554 }
555 /* Covariant cast for argument 2 (k3) <p2:nullable Object> isa K3 */
556 /* <p2:nullable Object> isa K3 */
557 type_struct11 = self->type->resolution_table->types[COLOR_more_collections__HashMap3___35dK3];
558 cltype9 = type_struct11->color;
559 idtype10 = type_struct11->id;
560 is_nullable12 = type_struct11->is_nullable;
561 if(p2 == NULL) {
562 var8 = is_nullable12;
563 } else {
564 if(cltype9 >= p2->type->table_size) {
565 var8 = 0;
566 } else {
567 var8 = p2->type->type_table[cltype9] == idtype10;
568 }
569 }
570 if (unlikely(!var8)) {
571 var_class_name13 = p2 == NULL ? "null" : p2->type->name;
572 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K3", var_class_name13);
573 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 110);
574 show_backtrace(1);
575 }
576 var_k1 = p0;
577 var_k2 = p1;
578 var_k3 = p2;
579 {
580 { /* Inline more_collections#HashMap3#level1 (self) on <self:HashMap3[nullable Object, nullable Object, nullable Object, nullable Object]> */
581 var16 = self->attrs[COLOR_more_collections__HashMap3___level1].val; /* _level1 on <self:HashMap3[nullable Object, nullable Object, nullable Object, nullable Object]> */
582 if (unlikely(var16 == NULL)) {
583 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
584 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 108);
585 show_backtrace(1);
586 }
587 var14 = var16;
588 RET_LABEL15:(void)0;
589 }
590 }
591 var_level1 = var14;
592 {
593 var17 = standard___standard__HashMap___standard__abstract_collection__MapRead__get_or_null(var_level1, var_k1);
594 }
595 var_level2 = var17;
596 var18 = NULL;
597 if (var_level2 == NULL) {
598 var19 = 1; /* is null */
599 } else {
600 var19 = 0; /* arg is null but recv is not */
601 }
602 if (0) {
603 { /* Inline kernel#Object#== (var_level2,var18) on <var_level2:nullable HashMap2[nullable Object, nullable Object, nullable Object]> */
604 var_other = var18;
605 {
606 { /* Inline kernel#Object#is_same_instance (var_level2,var_other) on <var_level2:nullable HashMap2[nullable Object, nullable Object, nullable Object](HashMap2[nullable Object, nullable Object, nullable Object])> */
607 var24 = var_level2 == var_other;
608 var22 = var24;
609 goto RET_LABEL23;
610 RET_LABEL23:(void)0;
611 }
612 }
613 var20 = var22;
614 goto RET_LABEL21;
615 RET_LABEL21:(void)0;
616 }
617 var19 = var20;
618 }
619 if (var19){
620 var25 = NULL;
621 var = var25;
622 goto RET_LABEL;
623 } else {
624 }
625 {
626 var26 = more_collections___more_collections__HashMap2____91d_93d(var_level2, var_k2, var_k3);
627 }
628 var = var26;
629 goto RET_LABEL;
630 RET_LABEL:;
631 return var;
632 }
633 /* method more_collections#HashMap3#[]= for (self: HashMap3[nullable Object, nullable Object, nullable Object, nullable Object], nullable Object, nullable Object, nullable Object, nullable Object) */
634 void more_collections___more_collections__HashMap3____91d_93d_61d(val* self, val* p0, val* p1, val* p2, val* p3) {
635 short int var /* : Bool */;
636 int cltype;
637 int idtype;
638 const struct type* type_struct;
639 short int is_nullable;
640 const char* var_class_name;
641 short int var1 /* : Bool */;
642 int cltype2;
643 int idtype3;
644 const struct type* type_struct4;
645 short int is_nullable5;
646 const char* var_class_name6;
647 short int var7 /* : Bool */;
648 int cltype8;
649 int idtype9;
650 const struct type* type_struct10;
651 short int is_nullable11;
652 const char* var_class_name12;
653 short int var13 /* : Bool */;
654 int cltype14;
655 int idtype15;
656 const struct type* type_struct16;
657 short int is_nullable17;
658 const char* var_class_name18;
659 val* var_k1 /* var k1: nullable Object */;
660 val* var_k2 /* var k2: nullable Object */;
661 val* var_k3 /* var k3: nullable Object */;
662 val* var_v /* var v: nullable Object */;
663 val* var19 /* : HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
664 val* var21 /* : HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
665 val* var_level1 /* var level1: HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]] */;
666 val* var22 /* : nullable Object */;
667 val* var_level2 /* var level2: nullable HashMap2[nullable Object, nullable Object, nullable Object] */;
668 val* var23 /* : null */;
669 short int var24 /* : Bool */;
670 short int var25 /* : Bool */;
671 val* var_other /* var other: nullable Object */;
672 short int var27 /* : Bool */;
673 short int var29 /* : Bool */;
674 val* var30 /* : HashMap2[nullable Object, nullable Object, nullable Object] */;
675 /* Covariant cast for argument 0 (k1) <p0:nullable Object> isa K1 */
676 /* <p0:nullable Object> isa K1 */
677 type_struct = self->type->resolution_table->types[COLOR_more_collections__HashMap3___35dK1];
678 cltype = type_struct->color;
679 idtype = type_struct->id;
680 is_nullable = type_struct->is_nullable;
681 if(p0 == NULL) {
682 var = is_nullable;
683 } else {
684 if(cltype >= p0->type->table_size) {
685 var = 0;
686 } else {
687 var = p0->type->type_table[cltype] == idtype;
688 }
689 }
690 if (unlikely(!var)) {
691 var_class_name = p0 == NULL ? "null" : p0->type->name;
692 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K1", var_class_name);
693 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 120);
694 show_backtrace(1);
695 }
696 /* Covariant cast for argument 1 (k2) <p1:nullable Object> isa K2 */
697 /* <p1:nullable Object> isa K2 */
698 type_struct4 = self->type->resolution_table->types[COLOR_more_collections__HashMap3___35dK2];
699 cltype2 = type_struct4->color;
700 idtype3 = type_struct4->id;
701 is_nullable5 = type_struct4->is_nullable;
702 if(p1 == NULL) {
703 var1 = is_nullable5;
704 } else {
705 if(cltype2 >= p1->type->table_size) {
706 var1 = 0;
707 } else {
708 var1 = p1->type->type_table[cltype2] == idtype3;
709 }
710 }
711 if (unlikely(!var1)) {
712 var_class_name6 = p1 == NULL ? "null" : p1->type->name;
713 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K2", var_class_name6);
714 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 120);
715 show_backtrace(1);
716 }
717 /* Covariant cast for argument 2 (k3) <p2:nullable Object> isa K3 */
718 /* <p2:nullable Object> isa K3 */
719 type_struct10 = self->type->resolution_table->types[COLOR_more_collections__HashMap3___35dK3];
720 cltype8 = type_struct10->color;
721 idtype9 = type_struct10->id;
722 is_nullable11 = type_struct10->is_nullable;
723 if(p2 == NULL) {
724 var7 = is_nullable11;
725 } else {
726 if(cltype8 >= p2->type->table_size) {
727 var7 = 0;
728 } else {
729 var7 = p2->type->type_table[cltype8] == idtype9;
730 }
731 }
732 if (unlikely(!var7)) {
733 var_class_name12 = p2 == NULL ? "null" : p2->type->name;
734 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K3", var_class_name12);
735 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 120);
736 show_backtrace(1);
737 }
738 /* Covariant cast for argument 3 (v) <p3:nullable Object> isa V */
739 /* <p3:nullable Object> isa V */
740 type_struct16 = self->type->resolution_table->types[COLOR_more_collections__HashMap3___35dV];
741 cltype14 = type_struct16->color;
742 idtype15 = type_struct16->id;
743 is_nullable17 = type_struct16->is_nullable;
744 if(p3 == NULL) {
745 var13 = is_nullable17;
746 } else {
747 if(cltype14 >= p3->type->table_size) {
748 var13 = 0;
749 } else {
750 var13 = p3->type->type_table[cltype14] == idtype15;
751 }
752 }
753 if (unlikely(!var13)) {
754 var_class_name18 = p3 == NULL ? "null" : p3->type->name;
755 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name18);
756 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 120);
757 show_backtrace(1);
758 }
759 var_k1 = p0;
760 var_k2 = p1;
761 var_k3 = p2;
762 var_v = p3;
763 {
764 { /* Inline more_collections#HashMap3#level1 (self) on <self:HashMap3[nullable Object, nullable Object, nullable Object, nullable Object]> */
765 var21 = self->attrs[COLOR_more_collections__HashMap3___level1].val; /* _level1 on <self:HashMap3[nullable Object, nullable Object, nullable Object, nullable Object]> */
766 if (unlikely(var21 == NULL)) {
767 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _level1");
768 PRINT_ERROR(" (%s:%d)\n", FILE_more_collections, 108);
769 show_backtrace(1);
770 }
771 var19 = var21;
772 RET_LABEL20:(void)0;
773 }
774 }
775 var_level1 = var19;
776 {
777 var22 = standard___standard__HashMap___standard__abstract_collection__MapRead__get_or_null(var_level1, var_k1);
778 }
779 var_level2 = var22;
780 var23 = NULL;
781 if (var_level2 == NULL) {
782 var24 = 1; /* is null */
783 } else {
784 var24 = 0; /* arg is null but recv is not */
785 }
786 if (0) {
787 { /* Inline kernel#Object#== (var_level2,var23) on <var_level2:nullable HashMap2[nullable Object, nullable Object, nullable Object]> */
788 var_other = var23;
789 {
790 { /* Inline kernel#Object#is_same_instance (var_level2,var_other) on <var_level2:nullable HashMap2[nullable Object, nullable Object, nullable Object](HashMap2[nullable Object, nullable Object, nullable Object])> */
791 var29 = var_level2 == var_other;
792 var27 = var29;
793 goto RET_LABEL28;
794 RET_LABEL28:(void)0;
795 }
796 }
797 var25 = var27;
798 goto RET_LABEL26;
799 RET_LABEL26:(void)0;
800 }
801 var24 = var25;
802 }
803 if (var24){
804 var30 = NEW_more_collections__HashMap2(self->type->resolution_table->types[COLOR_more_collections__HashMap2__more_collections__HashMap3___35dK2__more_collections__HashMap3___35dK3__more_collections__HashMap3___35dV]);
805 {
806 { /* Inline kernel#Object#init (var30) on <var30:HashMap2[nullable Object, nullable Object, nullable Object]> */
807 RET_LABEL31:(void)0;
808 }
809 }
810 var_level2 = var30;
811 {
812 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var_level1, var_k1, var_level2); /* Direct call hash_collection#HashMap#[]= on <var_level1:HashMap[nullable Object, HashMap2[nullable Object, nullable Object, nullable Object]]>*/
813 }
814 } else {
815 }
816 {
817 more_collections___more_collections__HashMap2____91d_93d_61d(var_level2, var_k2, var_k3, var_v); /* Direct call more_collections#HashMap2#[]= on <var_level2:nullable HashMap2[nullable Object, nullable Object, nullable Object](HashMap2[nullable Object, nullable Object, nullable Object])>*/
818 }
819 RET_LABEL:;
820 }