1 #include "hash_collection.sep.0.h"
2 /* method hash_collection#HashCollection#index_at for (self: HashCollection[Object, HashNode[Object]], Object): Int */
3 long hash_collection__HashCollection__index_at(val
* self
, val
* p0
) {
5 short int var1
/* : Bool */;
8 const struct type
* type_struct
;
9 const char* var_class_name
;
10 val
* var_k
/* var k: Object */;
11 long var2
/* : Int */;
12 long var3
/* : Int */;
13 long var4
/* : Int */;
14 long var6
/* : Int */;
15 long var_i
/* var i: Int */;
16 long var7
/* : Int */;
17 short int var8
/* : Bool */;
18 short int var10
/* : Bool */;
21 const char* var_class_name13
;
22 short int var14
/* : Bool */;
23 long var15
/* : Int */;
24 long var17
/* : Int */;
25 /* Covariant cast for argument 0 (k) <p0:Object> isa K */
26 /* <p0:Object> isa K */
27 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
28 cltype
= type_struct
->color
;
29 idtype
= type_struct
->id
;
30 if(cltype
>= p0
->type
->table_size
) {
33 var1
= p0
->type
->type_table
[cltype
] == idtype
;
35 if (unlikely(!var1
)) {
36 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
37 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
38 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 35);
43 var2
= ((long (*)(val
*))(var_k
->class->vft
[COLOR_kernel__Object__hash
]))(var_k
) /* hash on <var_k:Object>*/;
45 var3
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
47 { /* Inline kernel#Int#% (var2,var3) on <var2:Int> */
57 { /* Inline kernel#Int#< (var_i,var7) on <var_i:Int> */
58 /* Covariant cast for argument 0 (i) <var7:Int> isa OTHER */
59 /* <var7:Int> isa OTHER */
60 var10
= 1; /* easy <var7:Int> isa OTHER*/
61 if (unlikely(!var10
)) {
62 var_class_name13
= type_kernel__Int
.name
;
63 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name13
);
64 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 371);
75 { /* Inline kernel#Int#unary - (var_i) on <var_i:Int> */
90 /* method hash_collection#HashCollection#index_at for (self: Object, Object): Int */
91 long VIRTUAL_hash_collection__HashCollection__index_at(val
* self
, val
* p0
) {
93 long var1
/* : Int */;
94 var1
= hash_collection__HashCollection__index_at(self
, p0
);
99 /* method hash_collection#HashCollection#node_at for (self: HashCollection[Object, HashNode[Object]], Object): nullable HashNode[Object] */
100 val
* hash_collection__HashCollection__node_at(val
* self
, val
* p0
) {
101 val
* var
/* : nullable HashNode[Object] */;
102 short int var1
/* : Bool */;
105 const struct type
* type_struct
;
106 const char* var_class_name
;
107 val
* var_k
/* var k: Object */;
108 val
* var2
/* : nullable Object */;
109 short int var3
/* : Bool */;
110 short int var5
/* : Bool */;
111 val
* var6
/* : nullable HashNode[Object] */;
112 long var7
/* : Int */;
113 val
* var8
/* : nullable HashNode[Object] */;
114 val
* var_res
/* var res: nullable HashNode[Object] */;
115 /* Covariant cast for argument 0 (k) <p0:Object> isa K */
116 /* <p0:Object> isa K */
117 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
118 cltype
= type_struct
->color
;
119 idtype
= type_struct
->id
;
120 if(cltype
>= p0
->type
->table_size
) {
123 var1
= p0
->type
->type_table
[cltype
] == idtype
;
125 if (unlikely(!var1
)) {
126 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
127 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
128 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 43);
132 var2
= self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
134 { /* Inline kernel#Object#is_same_instance (var_k,var2) on <var_k:Object> */
135 var5
= var_k
== var2
|| (var2
!= NULL
&& var_k
->class == var2
->class && ((var_k
->class->box_kind
== 1 && ((struct instance_kernel__Int
*)var_k
)->value
== ((struct instance_kernel__Int
*)var2
)->value
) || (var_k
->class->box_kind
== 2 && ((struct instance_kernel__Bool
*)var_k
)->value
== ((struct instance_kernel__Bool
*)var2
)->value
) || (var_k
->class->box_kind
== 3 && ((struct instance_kernel__Char
*)var_k
)->value
== ((struct instance_kernel__Char
*)var2
)->value
) || (var_k
->class->box_kind
== 4 && ((struct instance_kernel__Float
*)var_k
)->value
== ((struct instance_kernel__Float
*)var2
)->value
) || (var_k
->class->box_kind
== 5 && ((struct instance_string__NativeString
*)var_k
)->value
== ((struct instance_string__NativeString
*)var2
)->value
) || (var_k
->class->box_kind
== 6 && ((struct instance_kernel__Pointer
*)var_k
)->value
== ((struct instance_kernel__Pointer
*)var2
)->value
)));
142 var6
= self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_node
].val
; /* _last_accessed_node on <self:HashCollection[Object, HashNode[Object]]> */
148 var7
= hash_collection__HashCollection__index_at(self
, var_k
);
151 var8
= hash_collection__HashCollection__node_at_idx(self
, var7
, var_k
);
154 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var_k
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
155 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_node
].val
= var_res
; /* _last_accessed_node on <self:HashCollection[Object, HashNode[Object]]> */
161 /* method hash_collection#HashCollection#node_at for (self: Object, Object): nullable HashNode[Object] */
162 val
* VIRTUAL_hash_collection__HashCollection__node_at(val
* self
, val
* p0
) {
163 val
* var
/* : nullable HashNode[Object] */;
164 val
* var1
/* : nullable HashNode[Object] */;
165 var1
= hash_collection__HashCollection__node_at(self
, p0
);
170 /* method hash_collection#HashCollection#node_at_idx for (self: HashCollection[Object, HashNode[Object]], Int, Object): nullable HashNode[Object] */
171 val
* hash_collection__HashCollection__node_at_idx(val
* self
, long p0
, val
* p1
) {
172 val
* var
/* : nullable HashNode[Object] */;
173 short int var1
/* : Bool */;
176 const struct type
* type_struct
;
177 const char* var_class_name
;
178 long var_i
/* var i: Int */;
179 val
* var_k
/* var k: Object */;
180 val
* var2
/* : nullable NativeArray[nullable HashNode[Object]] */;
181 val
* var3
/* : nullable Object */;
182 val
* var5
/* : nullable HashNode[Object] */;
183 val
* var_c
/* var c: nullable HashNode[Object] */;
184 val
* var6
/* : null */;
185 short int var7
/* : Bool */;
186 short int var8
/* : Bool */;
187 val
* var_other
/* var other: nullable Object */;
188 short int var10
/* : Bool */;
189 short int var11
/* : Bool */;
190 short int var12
/* : Bool */;
191 val
* var13
/* : Object */;
192 val
* var_ck
/* var ck: Object */;
193 short int var14
/* : Bool */;
194 short int var15
/* : Bool */;
195 short int var17
/* : Bool */;
196 short int var_
/* var : Bool */;
197 short int var18
/* : Bool */;
198 short int var19
/* : Bool */;
199 val
* var20
/* : nullable HashNode[Object] */;
200 short int var21
/* : Bool */;
203 const struct type
* type_struct24
;
204 const char* var_class_name25
;
205 /* Covariant cast for argument 1 (k) <p1:Object> isa K */
206 /* <p1:Object> isa K */
207 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
208 cltype
= type_struct
->color
;
209 idtype
= type_struct
->id
;
210 if(cltype
>= p1
->type
->table_size
) {
213 var1
= p1
->type
->type_table
[cltype
] == idtype
;
215 if (unlikely(!var1
)) {
216 var_class_name
= p1
== NULL ?
"null" : p1
->type
->name
;
217 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
218 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 55);
223 var2
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
225 PRINT_ERROR("Runtime error: %s", "Receiver is null");
226 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 58);
229 { /* Inline array#NativeArray#[] (var2,var_i) on <var2:nullable NativeArray[nullable HashNode[Object]]> */
230 var5
= ((struct instance_array__NativeArray
*)var2
)->values
[var_i
];
240 var7
= 0; /* is null */
242 var7
= 1; /* arg is null and recv is not */
245 { /* Inline kernel#Object#!= (var_c,var6) on <var_c:nullable HashNode[Object]> */
248 var11
= ((short int (*)(val
*, val
*))(var_c
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_c
, var_other
) /* == on <var_c:nullable HashNode[Object](HashNode[Object])>*/;
259 var13
= var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_c:nullable HashNode[Object](HashNode[Object])> */
260 if (unlikely(var13
== NULL
)) {
261 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
262 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 60);
267 { /* Inline kernel#Object#is_same_instance (var_ck,var_k) on <var_ck:Object> */
268 var17
= var_ck
== var_k
|| (var_ck
->class == var_k
->class && ((var_ck
->class->box_kind
== 1 && ((struct instance_kernel__Int
*)var_ck
)->value
== ((struct instance_kernel__Int
*)var_k
)->value
) || (var_ck
->class->box_kind
== 2 && ((struct instance_kernel__Bool
*)var_ck
)->value
== ((struct instance_kernel__Bool
*)var_k
)->value
) || (var_ck
->class->box_kind
== 3 && ((struct instance_kernel__Char
*)var_ck
)->value
== ((struct instance_kernel__Char
*)var_k
)->value
) || (var_ck
->class->box_kind
== 4 && ((struct instance_kernel__Float
*)var_ck
)->value
== ((struct instance_kernel__Float
*)var_k
)->value
) || (var_ck
->class->box_kind
== 5 && ((struct instance_string__NativeString
*)var_ck
)->value
== ((struct instance_string__NativeString
*)var_k
)->value
) || (var_ck
->class->box_kind
== 6 && ((struct instance_kernel__Pointer
*)var_ck
)->value
== ((struct instance_kernel__Pointer
*)var_k
)->value
)));
279 var19
= ((short int (*)(val
*, val
*))(var_ck
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_ck
, var_k
) /* == on <var_ck:Object>*/;
288 var20
= var_c
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
; /* _next_in_bucklet on <var_c:nullable HashNode[Object](HashNode[Object])> */
289 /* <var20:nullable HashNode[Object]> isa nullable N */
290 type_struct24
= self
->type
->resolution_table
->types
[COLOR_nullable_hash_collection__HashCollection_FT1
];
291 cltype22
= type_struct24
->color
;
292 idtype23
= type_struct24
->id
;
296 if(cltype22
>= var20
->type
->table_size
) {
299 var21
= var20
->type
->type_table
[cltype22
] == idtype23
;
302 if (unlikely(!var21
)) {
303 var_class_name25
= var20
== NULL ?
"null" : var20
->type
->name
;
304 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name25
);
305 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 64);
313 BREAK_label
: (void)0;
319 /* method hash_collection#HashCollection#node_at_idx for (self: Object, Int, Object): nullable HashNode[Object] */
320 val
* VIRTUAL_hash_collection__HashCollection__node_at_idx(val
* self
, long p0
, val
* p1
) {
321 val
* var
/* : nullable HashNode[Object] */;
322 val
* var1
/* : nullable HashNode[Object] */;
323 var1
= hash_collection__HashCollection__node_at_idx(self
, p0
, p1
);
328 /* method hash_collection#HashCollection#store for (self: HashCollection[Object, HashNode[Object]], Int, HashNode[Object]) */
329 void hash_collection__HashCollection__store(val
* self
, long p0
, val
* p1
) {
330 short int var
/* : Bool */;
333 const struct type
* type_struct
;
334 const char* var_class_name
;
335 long var_index
/* var index: Int */;
336 val
* var_node
/* var node: HashNode[Object] */;
337 val
* var1
/* : nullable HashNode[Object] */;
338 val
* var2
/* : null */;
339 short int var3
/* : Bool */;
340 short int var4
/* : Bool */;
341 val
* var_other
/* var other: nullable Object */;
342 short int var6
/* : Bool */;
343 short int var8
/* : Bool */;
344 val
* var9
/* : nullable HashNode[Object] */;
345 val
* var10
/* : nullable HashNode[Object] */;
346 val
* var11
/* : null */;
347 val
* var12
/* : nullable NativeArray[nullable HashNode[Object]] */;
348 val
* var13
/* : nullable Object */;
349 val
* var15
/* : nullable HashNode[Object] */;
350 val
* var_next
/* var next: nullable HashNode[Object] */;
351 val
* var16
/* : nullable NativeArray[nullable HashNode[Object]] */;
352 short int var18
/* : Bool */;
355 const struct type
* type_struct21
;
356 const char* var_class_name22
;
357 val
* var23
/* : null */;
358 short int var24
/* : Bool */;
359 short int var25
/* : Bool */;
360 val
* var_other27
/* var other: nullable Object */;
361 short int var28
/* : Bool */;
362 short int var29
/* : Bool */;
363 short int var30
/* : Bool */;
364 val
* var31
/* : Object */;
365 short int var32
/* : Bool */;
368 const struct type
* type_struct35
;
369 const char* var_class_name36
;
370 long var37
/* : Int */;
371 long var_l
/* var l: Int */;
372 long var38
/* : Int */;
373 long var39
/* : Int */;
374 short int var41
/* : Bool */;
377 const char* var_class_name44
;
378 long var45
/* : Int */;
379 long var46
/* : Int */;
380 long var47
/* : Int */;
381 short int var49
/* : Bool */;
384 const char* var_class_name52
;
385 long var53
/* : Int */;
386 long var54
/* : Int */;
387 long var55
/* : Int */;
388 short int var57
/* : Bool */;
391 const char* var_class_name60
;
392 long var61
/* : Int */;
393 long var62
/* : Int */;
394 long var63
/* : Int */;
395 short int var65
/* : Bool */;
398 const char* var_class_name68
;
399 long var69
/* : Int */;
400 long var70
/* : Int */;
401 short int var71
/* : Bool */;
402 short int var73
/* : Bool */;
405 const char* var_class_name76
;
406 short int var77
/* : Bool */;
407 long var78
/* : Int */;
408 long var79
/* : Int */;
409 short int var81
/* : Bool */;
412 const char* var_class_name84
;
413 long var85
/* : Int */;
414 long var86
/* : Int */;
415 long var87
/* : Int */;
416 short int var89
/* : Bool */;
419 const char* var_class_name92
;
420 long var93
/* : Int */;
421 long var94
/* : Int */;
422 long var95
/* : Int */;
423 short int var97
/* : Bool */;
426 const char* var_class_name100
;
427 long var101
/* : Int */;
428 /* Covariant cast for argument 1 (node) <p1:HashNode[Object]> isa N */
429 /* <p1:HashNode[Object]> isa N */
430 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT1
];
431 cltype
= type_struct
->color
;
432 idtype
= type_struct
->id
;
433 if(cltype
>= p1
->type
->table_size
) {
436 var
= p1
->type
->type_table
[cltype
] == idtype
;
438 if (unlikely(!var
)) {
439 var_class_name
= p1
== NULL ?
"null" : p1
->type
->name
;
440 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "N", var_class_name
);
441 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 69);
446 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
449 var3
= 1; /* is null */
451 var3
= 0; /* arg is null but recv is not */
454 { /* Inline kernel#Object#== (var1,var2) on <var1:nullable HashNode[Object]> */
457 { /* Inline kernel#Object#is_same_instance (var1,var_other) on <var1:nullable HashNode[Object](HashNode[Object])> */
458 var8
= var1
== var_other
;
471 self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
= var_node
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
473 var9
= self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
474 if (unlikely(var9
== NULL
)) {
475 PRINT_ERROR("Runtime error: %s", "Receiver is null");
476 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 76);
479 var9
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
= var_node
; /* _next_item on <var9:nullable HashNode[Object]> */
481 var10
= self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
482 var_node
->attrs
[COLOR_hash_collection__HashNode___prev_item
].val
= var10
; /* _prev_item on <var_node:HashNode[Object]> */
484 var_node
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
= var11
; /* _next_item on <var_node:HashNode[Object]> */
485 self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
= var_node
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
486 var12
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
488 PRINT_ERROR("Runtime error: %s", "Receiver is null");
489 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 83);
492 { /* Inline array#NativeArray#[] (var12,var_index) on <var12:nullable NativeArray[nullable HashNode[Object]]> */
493 var15
= ((struct instance_array__NativeArray
*)var12
)->values
[var_index
];
500 var16
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
502 PRINT_ERROR("Runtime error: %s", "Receiver is null");
503 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 84);
506 { /* Inline array#NativeArray#[]= (var16,var_index,var_node) on <var16:nullable NativeArray[nullable HashNode[Object]]> */
507 /* Covariant cast for argument 1 (item) <var_node:HashNode[Object]> isa E */
508 /* <var_node:HashNode[Object]> isa E */
509 type_struct21
= var16
->type
->resolution_table
->types
[COLOR_array__NativeArray_FT0
];
510 cltype19
= type_struct21
->color
;
511 idtype20
= type_struct21
->id
;
512 if(cltype19
>= var_node
->type
->table_size
) {
515 var18
= var_node
->type
->type_table
[cltype19
] == idtype20
;
517 if (unlikely(!var18
)) {
518 var_class_name22
= var_node
== NULL ?
"null" : var_node
->type
->name
;
519 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name22
);
520 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/array.nit", 778);
523 ((struct instance_array__NativeArray
*)var16
)->values
[var_index
]=var_node
;
527 var_node
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_node:HashNode[Object]> */
529 if (var_next
== NULL
) {
530 var24
= 0; /* is null */
532 var24
= 1; /* arg is null and recv is not */
535 { /* Inline kernel#Object#!= (var_next,var23) on <var_next:nullable HashNode[Object]> */
538 var29
= ((short int (*)(val
*, val
*))(var_next
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_next
, var_other27
) /* == on <var_next:nullable HashNode[Object](HashNode[Object])>*/;
549 var_next
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
= var_node
; /* _prev_in_bucklet on <var_next:nullable HashNode[Object](HashNode[Object])> */
552 var31
= var_node
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_node:HashNode[Object]> */
553 if (unlikely(var31
== NULL
)) {
554 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
555 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 88);
558 /* <var31:Object> isa nullable K */
559 type_struct35
= self
->type
->resolution_table
->types
[COLOR_nullable_hash_collection__HashCollection_FT0
];
560 cltype33
= type_struct35
->color
;
561 idtype34
= type_struct35
->id
;
562 if(cltype33
>= var31
->type
->table_size
) {
565 var32
= var31
->type
->type_table
[cltype33
] == idtype34
;
567 if (unlikely(!var32
)) {
568 var_class_name36
= var31
== NULL ?
"null" : var31
->type
->name
;
569 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable K", var_class_name36
);
570 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 88);
573 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var31
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
574 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_node
].val
= var_node
; /* _last_accessed_node on <self:HashCollection[Object, HashNode[Object]]> */
575 var37
= self
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[Object, HashNode[Object]]> */
579 { /* Inline kernel#Int#+ (var_l,var38) on <var_l:Int> */
580 /* Covariant cast for argument 0 (i) <var38:Int> isa OTHER */
581 /* <var38:Int> isa OTHER */
582 var41
= 1; /* easy <var38:Int> isa OTHER*/
583 if (unlikely(!var41
)) {
584 var_class_name44
= type_kernel__Int
.name
;
585 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name44
);
586 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
589 var45
= var_l
+ var38
;
595 self
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
= var39
; /* _the_length on <self:HashCollection[Object, HashNode[Object]]> */
598 { /* Inline kernel#Int#+ (var_l,var46) on <var_l:Int> */
599 /* Covariant cast for argument 0 (i) <var46:Int> isa OTHER */
600 /* <var46:Int> isa OTHER */
601 var49
= 1; /* easy <var46:Int> isa OTHER*/
602 if (unlikely(!var49
)) {
603 var_class_name52
= type_kernel__Int
.name
;
604 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name52
);
605 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
608 var53
= var_l
+ var46
;
616 { /* Inline kernel#Int#* (var47,var54) on <var47:Int> */
617 /* Covariant cast for argument 0 (i) <var54:Int> isa OTHER */
618 /* <var54:Int> isa OTHER */
619 var57
= 1; /* easy <var54:Int> isa OTHER*/
620 if (unlikely(!var57
)) {
621 var_class_name60
= type_kernel__Int
.name
;
622 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name60
);
623 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 378);
626 var61
= var47
* var54
;
634 { /* Inline kernel#Int#+ (var55,var62) on <var55:Int> */
635 /* Covariant cast for argument 0 (i) <var62:Int> isa OTHER */
636 /* <var62:Int> isa OTHER */
637 var65
= 1; /* easy <var62:Int> isa OTHER*/
638 if (unlikely(!var65
)) {
639 var_class_name68
= type_kernel__Int
.name
;
640 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name68
);
641 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
644 var69
= var55
+ var62
;
651 var70
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
653 { /* Inline kernel#Int#>= (var_l,var70) on <var_l:Int> */
654 /* Covariant cast for argument 0 (i) <var70:Int> isa OTHER */
655 /* <var70:Int> isa OTHER */
656 var73
= 1; /* easy <var70:Int> isa OTHER*/
657 if (unlikely(!var73
)) {
658 var_class_name76
= type_kernel__Int
.name
;
659 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name76
);
660 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 372);
663 var77
= var_l
>= var70
;
672 { /* Inline kernel#Int#* (var_l,var78) on <var_l:Int> */
673 /* Covariant cast for argument 0 (i) <var78:Int> isa OTHER */
674 /* <var78:Int> isa OTHER */
675 var81
= 1; /* easy <var78:Int> isa OTHER*/
676 if (unlikely(!var81
)) {
677 var_class_name84
= type_kernel__Int
.name
;
678 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name84
);
679 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 378);
682 var85
= var_l
* var78
;
690 { /* Inline kernel#Int#/ (var79,var86) on <var79:Int> */
691 /* Covariant cast for argument 0 (i) <var86:Int> isa OTHER */
692 /* <var86:Int> isa OTHER */
693 var89
= 1; /* easy <var86:Int> isa OTHER*/
694 if (unlikely(!var89
)) {
695 var_class_name92
= type_kernel__Int
.name
;
696 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name92
);
697 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 379);
700 var93
= var79
/ var86
;
708 { /* Inline kernel#Int#+ (var87,var94) on <var87:Int> */
709 /* Covariant cast for argument 0 (i) <var94:Int> isa OTHER */
710 /* <var94:Int> isa OTHER */
711 var97
= 1; /* easy <var94:Int> isa OTHER*/
712 if (unlikely(!var97
)) {
713 var_class_name100
= type_kernel__Int
.name
;
714 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name100
);
715 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
718 var101
= var87
+ var94
;
725 hash_collection__HashCollection__enlarge(self
, var95
); /* Direct call hash_collection#HashCollection#enlarge on <self:HashCollection[Object, HashNode[Object]]>*/
731 /* method hash_collection#HashCollection#store for (self: Object, Int, HashNode[Object]) */
732 void VIRTUAL_hash_collection__HashCollection__store(val
* self
, long p0
, val
* p1
) {
733 hash_collection__HashCollection__store(self
, p0
, p1
); /* Direct call hash_collection#HashCollection#store on <self:Object(HashCollection[Object, HashNode[Object]])>*/
736 /* method hash_collection#HashCollection#remove_node for (self: HashCollection[Object, HashNode[Object]], Object) */
737 void hash_collection__HashCollection__remove_node(val
* self
, val
* p0
) {
738 short int var
/* : Bool */;
741 const struct type
* type_struct
;
742 const char* var_class_name
;
743 val
* var_k
/* var k: Object */;
744 long var1
/* : Int */;
745 long var_i
/* var i: Int */;
746 val
* var2
/* : nullable HashNode[Object] */;
747 val
* var_node
/* var node: nullable HashNode[Object] */;
748 val
* var3
/* : null */;
749 short int var4
/* : Bool */;
750 short int var5
/* : Bool */;
751 val
* var_other
/* var other: nullable Object */;
752 short int var7
/* : Bool */;
753 short int var9
/* : Bool */;
754 val
* var10
/* : nullable HashNode[Object] */;
755 val
* var_prev
/* var prev: nullable HashNode[Object] */;
756 val
* var11
/* : nullable HashNode[Object] */;
757 val
* var_next
/* var next: nullable HashNode[Object] */;
758 val
* var12
/* : null */;
759 short int var13
/* : Bool */;
760 short int var14
/* : Bool */;
761 val
* var_other16
/* var other: nullable Object */;
762 short int var17
/* : Bool */;
763 short int var18
/* : Bool */;
764 short int var19
/* : Bool */;
765 short int var20
/* : Bool */;
768 const struct type
* type_struct23
;
769 const char* var_class_name24
;
770 val
* var25
/* : null */;
771 short int var26
/* : Bool */;
772 short int var27
/* : Bool */;
773 short int var29
/* : Bool */;
774 short int var30
/* : Bool */;
775 short int var31
/* : Bool */;
776 short int var32
/* : Bool */;
779 const struct type
* type_struct35
;
780 const char* var_class_name36
;
781 val
* var_
/* var : HashCollection[Object, HashNode[Object]] */;
782 long var37
/* : Int */;
783 long var38
/* : Int */;
784 long var39
/* : Int */;
785 short int var41
/* : Bool */;
788 const char* var_class_name44
;
789 long var45
/* : Int */;
790 val
* var46
/* : nullable HashNode[Object] */;
791 val
* var47
/* : nullable HashNode[Object] */;
792 val
* var48
/* : null */;
793 short int var49
/* : Bool */;
794 short int var50
/* : Bool */;
795 short int var52
/* : Bool */;
796 short int var53
/* : Bool */;
797 short int var54
/* : Bool */;
798 val
* var55
/* : nullable NativeArray[nullable HashNode[Object]] */;
799 short int var56
/* : Bool */;
802 const struct type
* type_struct59
;
803 const char* var_class_name60
;
804 short int var62
/* : Bool */;
807 const struct type
* type_struct65
;
808 short int is_nullable
;
809 const char* var_class_name66
;
810 val
* var67
/* : null */;
811 short int var68
/* : Bool */;
812 short int var69
/* : Bool */;
813 short int var71
/* : Bool */;
814 short int var72
/* : Bool */;
815 short int var73
/* : Bool */;
816 val
* var74
/* : null */;
817 /* Covariant cast for argument 0 (k) <p0:Object> isa K */
818 /* <p0:Object> isa K */
819 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
820 cltype
= type_struct
->color
;
821 idtype
= type_struct
->id
;
822 if(cltype
>= p0
->type
->table_size
) {
825 var
= p0
->type
->type_table
[cltype
] == idtype
;
827 if (unlikely(!var
)) {
828 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
829 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
830 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 104);
835 var1
= hash_collection__HashCollection__index_at(self
, var_k
);
839 var2
= hash_collection__HashCollection__node_at_idx(self
, var_i
, var_k
);
843 if (var_node
== NULL
) {
844 var4
= 1; /* is null */
846 var4
= 0; /* arg is null but recv is not */
849 { /* Inline kernel#Object#== (var_node,var3) on <var_node:nullable HashNode[Object]> */
852 { /* Inline kernel#Object#is_same_instance (var_node,var_other) on <var_node:nullable HashNode[Object](HashNode[Object])> */
853 var9
= var_node
== var_other
;
869 var10
= var_node
->attrs
[COLOR_hash_collection__HashNode___prev_item
].val
; /* _prev_item on <var_node:nullable HashNode[Object](HashNode[Object])> */
871 var11
= var_node
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_node:nullable HashNode[Object](HashNode[Object])> */
874 if (var_prev
== NULL
) {
875 var13
= 0; /* is null */
877 var13
= 1; /* arg is null and recv is not */
880 { /* Inline kernel#Object#!= (var_prev,var12) on <var_prev:nullable HashNode[Object]> */
883 var18
= ((short int (*)(val
*, val
*))(var_prev
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_prev
, var_other16
) /* == on <var_prev:nullable HashNode[Object](HashNode[Object])>*/;
894 var_prev
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
= var_next
; /* _next_item on <var_prev:nullable HashNode[Object](HashNode[Object])> */
896 /* <var_next:nullable HashNode[Object]> isa nullable N */
897 type_struct23
= self
->type
->resolution_table
->types
[COLOR_nullable_hash_collection__HashCollection_FT1
];
898 cltype21
= type_struct23
->color
;
899 idtype22
= type_struct23
->id
;
900 if(var_next
== NULL
) {
903 if(cltype21
>= var_next
->type
->table_size
) {
906 var20
= var_next
->type
->type_table
[cltype21
] == idtype22
;
909 if (unlikely(!var20
)) {
910 var_class_name24
= var_next
== NULL ?
"null" : var_next
->type
->name
;
911 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name24
);
912 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 117);
915 self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
= var_next
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
918 if (var_next
== NULL
) {
919 var26
= 0; /* is null */
921 var26
= 1; /* arg is null and recv is not */
924 { /* Inline kernel#Object#!= (var_next,var25) on <var_next:nullable HashNode[Object]> */
927 var30
= ((short int (*)(val
*, val
*))(var_next
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_next
, var_other16
) /* == on <var_next:nullable HashNode[Object](HashNode[Object])>*/;
938 var_next
->attrs
[COLOR_hash_collection__HashNode___prev_item
].val
= var_prev
; /* _prev_item on <var_next:nullable HashNode[Object](HashNode[Object])> */
940 /* <var_prev:nullable HashNode[Object]> isa nullable N */
941 type_struct35
= self
->type
->resolution_table
->types
[COLOR_nullable_hash_collection__HashCollection_FT1
];
942 cltype33
= type_struct35
->color
;
943 idtype34
= type_struct35
->id
;
944 if(var_prev
== NULL
) {
947 if(cltype33
>= var_prev
->type
->table_size
) {
950 var32
= var_prev
->type
->type_table
[cltype33
] == idtype34
;
953 if (unlikely(!var32
)) {
954 var_class_name36
= var_prev
== NULL ?
"null" : var_prev
->type
->name
;
955 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name36
);
956 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 122);
959 self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
= var_prev
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
962 var37
= var_
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
; /* _the_length on <var_:HashCollection[Object, HashNode[Object]]> */
965 { /* Inline kernel#Int#- (var37,var38) on <var37:Int> */
966 /* Covariant cast for argument 0 (i) <var38:Int> isa OTHER */
967 /* <var38:Int> isa OTHER */
968 var41
= 1; /* easy <var38:Int> isa OTHER*/
969 if (unlikely(!var41
)) {
970 var_class_name44
= type_kernel__Int
.name
;
971 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name44
);
972 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 377);
975 var45
= var37
- var38
;
981 var_
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
= var39
; /* _the_length on <var_:HashCollection[Object, HashNode[Object]]> */
982 var46
= var_node
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
; /* _prev_in_bucklet on <var_node:nullable HashNode[Object](HashNode[Object])> */
984 var47
= var_node
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
; /* _next_in_bucklet on <var_node:nullable HashNode[Object](HashNode[Object])> */
987 if (var_prev
== NULL
) {
988 var49
= 0; /* is null */
990 var49
= 1; /* arg is null and recv is not */
993 { /* Inline kernel#Object#!= (var_prev,var48) on <var_prev:nullable HashNode[Object]> */
996 var53
= ((short int (*)(val
*, val
*))(var_prev
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_prev
, var_other16
) /* == on <var_prev:nullable HashNode[Object](HashNode[Object])>*/;
1002 RET_LABEL51
:(void)0;
1007 var_prev
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_prev:nullable HashNode[Object](HashNode[Object])> */
1009 var55
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
1010 /* <var_next:nullable HashNode[Object]> isa nullable N */
1011 type_struct59
= self
->type
->resolution_table
->types
[COLOR_nullable_hash_collection__HashCollection_FT1
];
1012 cltype57
= type_struct59
->color
;
1013 idtype58
= type_struct59
->id
;
1014 if(var_next
== NULL
) {
1017 if(cltype57
>= var_next
->type
->table_size
) {
1020 var56
= var_next
->type
->type_table
[cltype57
] == idtype58
;
1023 if (unlikely(!var56
)) {
1024 var_class_name60
= var_next
== NULL ?
"null" : var_next
->type
->name
;
1025 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name60
);
1026 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 132);
1029 if (var55
== NULL
) {
1030 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1031 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 132);
1034 { /* Inline array#NativeArray#[]= (var55,var_i,var_next) on <var55:nullable NativeArray[nullable HashNode[Object]]> */
1035 /* Covariant cast for argument 1 (item) <var_next:nullable HashNode[Object]> isa E */
1036 /* <var_next:nullable HashNode[Object]> isa E */
1037 type_struct65
= var55
->type
->resolution_table
->types
[COLOR_array__NativeArray_FT0
];
1038 cltype63
= type_struct65
->color
;
1039 idtype64
= type_struct65
->id
;
1040 is_nullable
= type_struct65
->is_nullable
;
1041 if(var_next
== NULL
) {
1042 var62
= is_nullable
;
1044 if(cltype63
>= var_next
->type
->table_size
) {
1047 var62
= var_next
->type
->type_table
[cltype63
] == idtype64
;
1050 if (unlikely(!var62
)) {
1051 var_class_name66
= var_next
== NULL ?
"null" : var_next
->type
->name
;
1052 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name66
);
1053 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/array.nit", 778);
1056 ((struct instance_array__NativeArray
*)var55
)->values
[var_i
]=var_next
;
1057 RET_LABEL61
:(void)0;
1062 if (var_next
== NULL
) {
1063 var68
= 0; /* is null */
1065 var68
= 1; /* arg is null and recv is not */
1068 { /* Inline kernel#Object#!= (var_next,var67) on <var_next:nullable HashNode[Object]> */
1069 var_other16
= var67
;
1071 var72
= ((short int (*)(val
*, val
*))(var_next
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_next
, var_other16
) /* == on <var_next:nullable HashNode[Object](HashNode[Object])>*/;
1077 RET_LABEL70
:(void)0;
1082 var_next
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
= var_prev
; /* _prev_in_bucklet on <var_next:nullable HashNode[Object](HashNode[Object])> */
1086 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var74
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
1089 /* method hash_collection#HashCollection#remove_node for (self: Object, Object) */
1090 void VIRTUAL_hash_collection__HashCollection__remove_node(val
* self
, val
* p0
) {
1091 hash_collection__HashCollection__remove_node(self
, p0
); /* Direct call hash_collection#HashCollection#remove_node on <self:Object(HashCollection[Object, HashNode[Object]])>*/
1094 /* method hash_collection#HashCollection#raz for (self: HashCollection[Object, HashNode[Object]]) */
1095 void hash_collection__HashCollection__raz(val
* self
) {
1096 long var
/* : Int */;
1097 long var1
/* : Int */;
1098 long var2
/* : Int */;
1099 short int var4
/* : Bool */;
1102 const char* var_class_name
;
1103 long var5
/* : Int */;
1104 long var_i
/* var i: Int */;
1105 long var6
/* : Int */;
1106 short int var7
/* : Bool */;
1107 short int var9
/* : Bool */;
1110 const char* var_class_name12
;
1111 short int var13
/* : Bool */;
1112 val
* var14
/* : nullable NativeArray[nullable HashNode[Object]] */;
1113 val
* var15
/* : null */;
1114 short int var17
/* : Bool */;
1117 const struct type
* type_struct
;
1118 short int is_nullable
;
1119 const char* var_class_name20
;
1120 long var21
/* : Int */;
1121 long var22
/* : Int */;
1122 short int var24
/* : Bool */;
1125 const char* var_class_name27
;
1126 long var28
/* : Int */;
1127 long var29
/* : Int */;
1128 val
* var30
/* : null */;
1129 val
* var31
/* : null */;
1130 val
* var32
/* : null */;
1131 var
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
1134 { /* Inline kernel#Int#- (var,var1) on <var:Int> */
1135 /* Covariant cast for argument 0 (i) <var1:Int> isa OTHER */
1136 /* <var1:Int> isa OTHER */
1137 var4
= 1; /* easy <var1:Int> isa OTHER*/
1138 if (unlikely(!var4
)) {
1139 var_class_name
= type_kernel__Int
.name
;
1140 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1141 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 377);
1154 { /* Inline kernel#Int#>= (var_i,var6) on <var_i:Int> */
1155 /* Covariant cast for argument 0 (i) <var6:Int> isa OTHER */
1156 /* <var6:Int> isa OTHER */
1157 var9
= 1; /* easy <var6:Int> isa OTHER*/
1158 if (unlikely(!var9
)) {
1159 var_class_name12
= type_kernel__Int
.name
;
1160 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name12
);
1161 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 372);
1164 var13
= var_i
>= var6
;
1171 var14
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
1173 if (var14
== NULL
) {
1174 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1175 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 146);
1178 { /* Inline array#NativeArray#[]= (var14,var_i,var15) on <var14:nullable NativeArray[nullable HashNode[Object]]> */
1179 /* Covariant cast for argument 1 (item) <var15:null> isa E */
1180 /* <var15:null> isa E */
1181 type_struct
= var14
->type
->resolution_table
->types
[COLOR_array__NativeArray_FT0
];
1182 cltype18
= type_struct
->color
;
1183 idtype19
= type_struct
->id
;
1184 is_nullable
= type_struct
->is_nullable
;
1186 var17
= is_nullable
;
1188 if(cltype18
>= var15
->type
->table_size
) {
1191 var17
= var15
->type
->type_table
[cltype18
] == idtype19
;
1194 if (unlikely(!var17
)) {
1195 var_class_name20
= var15
== NULL ?
"null" : var15
->type
->name
;
1196 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name20
);
1197 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/array.nit", 778);
1200 ((struct instance_array__NativeArray
*)var14
)->values
[var_i
]=var15
;
1201 RET_LABEL16
:(void)0;
1206 { /* Inline kernel#Int#- (var_i,var21) on <var_i:Int> */
1207 /* Covariant cast for argument 0 (i) <var21:Int> isa OTHER */
1208 /* <var21:Int> isa OTHER */
1209 var24
= 1; /* easy <var21:Int> isa OTHER*/
1210 if (unlikely(!var24
)) {
1211 var_class_name27
= type_kernel__Int
.name
;
1212 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name27
);
1213 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 377);
1216 var28
= var_i
- var21
;
1219 RET_LABEL23
:(void)0;
1227 BREAK_label
: (void)0;
1229 self
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
= var29
; /* _the_length on <self:HashCollection[Object, HashNode[Object]]> */
1231 self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
= var30
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
1233 self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
= var31
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
1235 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var32
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
1238 /* method hash_collection#HashCollection#raz for (self: Object) */
1239 void VIRTUAL_hash_collection__HashCollection__raz(val
* self
) {
1240 hash_collection__HashCollection__raz(self
); /* Direct call hash_collection#HashCollection#raz on <self:Object(HashCollection[Object, HashNode[Object]])>*/
1243 /* method hash_collection#HashCollection#enlarge for (self: HashCollection[Object, HashNode[Object]], Int) */
1244 void hash_collection__HashCollection__enlarge(val
* self
, long p0
) {
1245 long var_cap
/* var cap: Int */;
1246 long var
/* : Int */;
1247 long var_old_cap
/* var old_cap: Int */;
1248 long var1
/* : Int */;
1249 long var2
/* : Int */;
1250 long var3
/* : Int */;
1251 short int var5
/* : Bool */;
1254 const char* var_class_name
;
1255 long var6
/* : Int */;
1256 short int var7
/* : Bool */;
1257 short int var9
/* : Bool */;
1260 const char* var_class_name12
;
1261 short int var13
/* : Bool */;
1262 long var14
/* : Int */;
1263 long var15
/* : Int */;
1264 long var16
/* : Int */;
1265 short int var18
/* : Bool */;
1268 const char* var_class_name21
;
1269 long var22
/* : Int */;
1270 long var23
/* : Int */;
1271 short int var24
/* : Bool */;
1272 short int var26
/* : Bool */;
1275 const char* var_class_name29
;
1276 short int var30
/* : Bool */;
1277 val
* var31
/* : null */;
1278 val
* var32
/* : NativeArray[nullable Object] */;
1279 val
* var34
/* : NativeArray[nullable Object] */;
1280 val
* var_new_array
/* var new_array: NativeArray[nullable HashNode[Object]] */;
1281 long var35
/* : Int */;
1282 long var36
/* : Int */;
1283 short int var38
/* : Bool */;
1286 const char* var_class_name41
;
1287 long var42
/* : Int */;
1288 long var_i
/* var i: Int */;
1289 long var43
/* : Int */;
1290 short int var44
/* : Bool */;
1291 short int var46
/* : Bool */;
1294 const char* var_class_name49
;
1295 short int var50
/* : Bool */;
1296 val
* var51
/* : null */;
1297 short int var53
/* : Bool */;
1300 const struct type
* type_struct
;
1301 short int is_nullable
;
1302 const char* var_class_name56
;
1303 long var57
/* : Int */;
1304 long var58
/* : Int */;
1305 short int var60
/* : Bool */;
1308 const char* var_class_name63
;
1309 long var64
/* : Int */;
1310 long var65
/* : Int */;
1311 short int var66
/* : Bool */;
1312 short int var68
/* : Bool */;
1315 const char* var_class_name71
;
1316 short int var72
/* : Bool */;
1317 val
* var73
/* : nullable HashNode[Object] */;
1318 val
* var_node
/* var node: nullable HashNode[Object] */;
1319 val
* var74
/* : null */;
1320 short int var75
/* : Bool */;
1321 short int var76
/* : Bool */;
1322 val
* var_other
/* var other: nullable Object */;
1323 short int var78
/* : Bool */;
1324 short int var79
/* : Bool */;
1325 short int var80
/* : Bool */;
1326 val
* var81
/* : Object */;
1327 short int var82
/* : Bool */;
1330 const struct type
* type_struct85
;
1331 const char* var_class_name86
;
1332 long var87
/* : Int */;
1333 long var_index
/* var index: Int */;
1334 val
* var88
/* : nullable Object */;
1335 val
* var90
/* : nullable HashNode[Object] */;
1336 val
* var_next
/* var next: nullable HashNode[Object] */;
1337 short int var92
/* : Bool */;
1340 const struct type
* type_struct95
;
1341 const char* var_class_name96
;
1342 val
* var97
/* : null */;
1343 val
* var98
/* : null */;
1344 short int var99
/* : Bool */;
1345 short int var100
/* : Bool */;
1346 short int var102
/* : Bool */;
1347 short int var103
/* : Bool */;
1348 short int var104
/* : Bool */;
1349 val
* var105
/* : nullable HashNode[Object] */;
1350 short int var106
/* : Bool */;
1353 const struct type
* type_struct109
;
1354 const char* var_class_name110
;
1356 var
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
1358 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[Object, HashNode[Object]]> */
1361 { /* Inline kernel#Int#+ (var1,var2) on <var1:Int> */
1362 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
1363 /* <var2:Int> isa OTHER */
1364 var5
= 1; /* easy <var2:Int> isa OTHER*/
1365 if (unlikely(!var5
)) {
1366 var_class_name
= type_kernel__Int
.name
;
1367 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1368 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
1378 { /* Inline kernel#Int#< (var_cap,var3) on <var_cap:Int> */
1379 /* Covariant cast for argument 0 (i) <var3:Int> isa OTHER */
1380 /* <var3:Int> isa OTHER */
1381 var9
= 1; /* easy <var3:Int> isa OTHER*/
1382 if (unlikely(!var9
)) {
1383 var_class_name12
= type_kernel__Int
.name
;
1384 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name12
);
1385 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 371);
1388 var13
= var_cap
< var3
;
1395 var14
= self
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashCollection[Object, HashNode[Object]]> */
1398 { /* Inline kernel#Int#+ (var14,var15) on <var14:Int> */
1399 /* Covariant cast for argument 0 (i) <var15:Int> isa OTHER */
1400 /* <var15:Int> isa OTHER */
1401 var18
= 1; /* easy <var15:Int> isa OTHER*/
1402 if (unlikely(!var18
)) {
1403 var_class_name21
= type_kernel__Int
.name
;
1404 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name21
);
1405 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 374);
1408 var22
= var14
+ var15
;
1411 RET_LABEL17
:(void)0;
1417 var23
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
1419 { /* Inline kernel#Int#<= (var_cap,var23) on <var_cap:Int> */
1420 /* Covariant cast for argument 0 (i) <var23:Int> isa OTHER */
1421 /* <var23:Int> isa OTHER */
1422 var26
= 1; /* easy <var23:Int> isa OTHER*/
1423 if (unlikely(!var26
)) {
1424 var_class_name29
= type_kernel__Int
.name
;
1425 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name29
);
1426 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 370);
1429 var30
= var_cap
<= var23
;
1432 RET_LABEL25
:(void)0;
1439 self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
= var_cap
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
1441 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var31
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
1443 { /* Inline array#ArrayCapable#calloc_array (self,var_cap) on <self:HashCollection[Object, HashNode[Object]]> */
1444 var34
= NEW_array__NativeArray(var_cap
, self
->type
->resolution_table
->types
[COLOR_array__NativeArrayarray__ArrayCapable_FT0
]);
1447 RET_LABEL33
:(void)0;
1450 var_new_array
= var32
;
1451 self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
= var_new_array
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
1454 { /* Inline kernel#Int#- (var_cap,var35) on <var_cap:Int> */
1455 /* Covariant cast for argument 0 (i) <var35:Int> isa OTHER */
1456 /* <var35:Int> isa OTHER */
1457 var38
= 1; /* easy <var35:Int> isa OTHER*/
1458 if (unlikely(!var38
)) {
1459 var_class_name41
= type_kernel__Int
.name
;
1460 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name41
);
1461 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 377);
1464 var42
= var_cap
- var35
;
1467 RET_LABEL37
:(void)0;
1474 { /* Inline kernel#Int#>= (var_i,var43) on <var_i:Int> */
1475 /* Covariant cast for argument 0 (i) <var43:Int> isa OTHER */
1476 /* <var43:Int> isa OTHER */
1477 var46
= 1; /* easy <var43:Int> isa OTHER*/
1478 if (unlikely(!var46
)) {
1479 var_class_name49
= type_kernel__Int
.name
;
1480 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name49
);
1481 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 372);
1484 var50
= var_i
>= var43
;
1487 RET_LABEL45
:(void)0;
1493 { /* Inline array#NativeArray#[]= (var_new_array,var_i,var51) on <var_new_array:NativeArray[nullable HashNode[Object]]> */
1494 /* Covariant cast for argument 1 (item) <var51:null> isa E */
1495 /* <var51:null> isa E */
1496 type_struct
= var_new_array
->type
->resolution_table
->types
[COLOR_array__NativeArray_FT0
];
1497 cltype54
= type_struct
->color
;
1498 idtype55
= type_struct
->id
;
1499 is_nullable
= type_struct
->is_nullable
;
1501 var53
= is_nullable
;
1503 if(cltype54
>= var51
->type
->table_size
) {
1506 var53
= var51
->type
->type_table
[cltype54
] == idtype55
;
1509 if (unlikely(!var53
)) {
1510 var_class_name56
= var51
== NULL ?
"null" : var51
->type
->name
;
1511 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name56
);
1512 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/array.nit", 778);
1515 ((struct instance_array__NativeArray
*)var_new_array
)->values
[var_i
]=var51
;
1516 RET_LABEL52
:(void)0;
1521 { /* Inline kernel#Int#- (var_i,var57) on <var_i:Int> */
1522 /* Covariant cast for argument 0 (i) <var57:Int> isa OTHER */
1523 /* <var57:Int> isa OTHER */
1524 var60
= 1; /* easy <var57:Int> isa OTHER*/
1525 if (unlikely(!var60
)) {
1526 var_class_name63
= type_kernel__Int
.name
;
1527 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name63
);
1528 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 377);
1531 var64
= var_i
- var57
;
1534 RET_LABEL59
:(void)0;
1542 BREAK_label
: (void)0;
1543 var65
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
1545 { /* Inline kernel#Int#<= (var65,var_old_cap) on <var65:Int> */
1546 /* Covariant cast for argument 0 (i) <var_old_cap:Int> isa OTHER */
1547 /* <var_old_cap:Int> isa OTHER */
1548 var68
= 1; /* easy <var_old_cap:Int> isa OTHER*/
1549 if (unlikely(!var68
)) {
1550 var_class_name71
= type_kernel__Int
.name
;
1551 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name71
);
1552 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 370);
1555 var72
= var65
<= var_old_cap
;
1558 RET_LABEL67
:(void)0;
1565 var73
= self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
1569 if (var_node
== NULL
) {
1570 var75
= 0; /* is null */
1572 var75
= 1; /* arg is null and recv is not */
1575 { /* Inline kernel#Object#!= (var_node,var74) on <var_node:nullable HashNode[Object]> */
1578 var79
= ((short int (*)(val
*, val
*))(var_node
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable HashNode[Object](HashNode[Object])>*/;
1584 RET_LABEL77
:(void)0;
1589 var81
= var_node
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_node:nullable HashNode[Object](HashNode[Object])> */
1590 if (unlikely(var81
== NULL
)) {
1591 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
1592 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 181);
1595 /* <var81:Object> isa K */
1596 type_struct85
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
1597 cltype83
= type_struct85
->color
;
1598 idtype84
= type_struct85
->id
;
1599 if(cltype83
>= var81
->type
->table_size
) {
1602 var82
= var81
->type
->type_table
[cltype83
] == idtype84
;
1604 if (unlikely(!var82
)) {
1605 var_class_name86
= var81
== NULL ?
"null" : var81
->type
->name
;
1606 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name86
);
1607 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 181);
1611 var87
= hash_collection__HashCollection__index_at(self
, var81
);
1615 { /* Inline array#NativeArray#[] (var_new_array,var_index) on <var_new_array:NativeArray[nullable HashNode[Object]]> */
1616 var90
= ((struct instance_array__NativeArray
*)var_new_array
)->values
[var_index
];
1619 RET_LABEL89
:(void)0;
1624 { /* Inline array#NativeArray#[]= (var_new_array,var_index,var_node) on <var_new_array:NativeArray[nullable HashNode[Object]]> */
1625 /* Covariant cast for argument 1 (item) <var_node:nullable HashNode[Object](HashNode[Object])> isa E */
1626 /* <var_node:nullable HashNode[Object](HashNode[Object])> isa E */
1627 type_struct95
= var_new_array
->type
->resolution_table
->types
[COLOR_array__NativeArray_FT0
];
1628 cltype93
= type_struct95
->color
;
1629 idtype94
= type_struct95
->id
;
1630 if(cltype93
>= var_node
->type
->table_size
) {
1633 var92
= var_node
->type
->type_table
[cltype93
] == idtype94
;
1635 if (unlikely(!var92
)) {
1636 var_class_name96
= var_node
== NULL ?
"null" : var_node
->type
->name
;
1637 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name96
);
1638 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/array.nit", 778);
1641 ((struct instance_array__NativeArray
*)var_new_array
)->values
[var_index
]=var_node
;
1642 RET_LABEL91
:(void)0;
1646 var_node
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
= var97
; /* _prev_in_bucklet on <var_node:nullable HashNode[Object](HashNode[Object])> */
1647 var_node
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_node:nullable HashNode[Object](HashNode[Object])> */
1649 if (var_next
== NULL
) {
1650 var99
= 0; /* is null */
1652 var99
= 1; /* arg is null and recv is not */
1655 { /* Inline kernel#Object#!= (var_next,var98) on <var_next:nullable HashNode[Object]> */
1658 var103
= ((short int (*)(val
*, val
*))(var_next
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_next
, var_other
) /* == on <var_next:nullable HashNode[Object](HashNode[Object])>*/;
1664 RET_LABEL101
:(void)0;
1669 var_next
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
= var_node
; /* _prev_in_bucklet on <var_next:nullable HashNode[Object](HashNode[Object])> */
1672 var105
= var_node
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_node:nullable HashNode[Object](HashNode[Object])> */
1673 /* <var105:nullable HashNode[Object]> isa nullable N */
1674 type_struct109
= self
->type
->resolution_table
->types
[COLOR_nullable_hash_collection__HashCollection_FT1
];
1675 cltype107
= type_struct109
->color
;
1676 idtype108
= type_struct109
->id
;
1677 if(var105
== NULL
) {
1680 if(cltype107
>= var105
->type
->table_size
) {
1683 var106
= var105
->type
->type_table
[cltype107
] == idtype108
;
1686 if (unlikely(!var106
)) {
1687 var_class_name110
= var105
== NULL ?
"null" : var105
->type
->name
;
1688 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name110
);
1689 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 188);
1694 goto BREAK_label111
;
1697 BREAK_label111
: (void)0;
1700 /* method hash_collection#HashCollection#enlarge for (self: Object, Int) */
1701 void VIRTUAL_hash_collection__HashCollection__enlarge(val
* self
, long p0
) {
1702 hash_collection__HashCollection__enlarge(self
, p0
); /* Direct call hash_collection#HashCollection#enlarge on <self:Object(HashCollection[Object, HashNode[Object]])>*/
1705 /* method hash_collection#HashNode#init for (self: HashNode[Object], Object) */
1706 void hash_collection__HashNode__init(val
* self
, val
* p0
) {
1707 short int var
/* : Bool */;
1710 const struct type
* type_struct
;
1711 const char* var_class_name
;
1712 val
* var_k
/* var k: Object */;
1713 /* Covariant cast for argument 0 (k) <p0:Object> isa K */
1714 /* <p0:Object> isa K */
1715 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashNode_FT0
];
1716 cltype
= type_struct
->color
;
1717 idtype
= type_struct
->id
;
1718 if(cltype
>= p0
->type
->table_size
) {
1721 var
= p0
->type
->type_table
[cltype
] == idtype
;
1723 if (unlikely(!var
)) {
1724 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1725 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
1726 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 200);
1730 self
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_k
; /* _key on <self:HashNode[Object]> */
1733 /* method hash_collection#HashNode#init for (self: Object, Object) */
1734 void VIRTUAL_hash_collection__HashNode__init(val
* self
, val
* p0
) {
1735 hash_collection__HashNode__init(self
, p0
); /* Direct call hash_collection#HashNode#init on <self:Object(HashNode[Object])>*/
1738 /* method hash_collection#HashMap#[] for (self: HashMap[Object, nullable Object], Object): nullable Object */
1739 val
* hash_collection__HashMap___91d_93d(val
* self
, val
* p0
) {
1740 val
* var
/* : nullable Object */;
1741 short int var1
/* : Bool */;
1744 const struct type
* type_struct
;
1745 const char* var_class_name
;
1746 val
* var_key
/* var key: Object */;
1747 val
* var2
/* : nullable HashNode[Object] */;
1748 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
1749 val
* var3
/* : null */;
1750 short int var4
/* : Bool */;
1751 short int var5
/* : Bool */;
1752 val
* var_other
/* var other: nullable Object */;
1753 short int var7
/* : Bool */;
1754 short int var9
/* : Bool */;
1755 val
* var10
/* : nullable Object */;
1756 val
* var11
/* : nullable Object */;
1757 /* Covariant cast for argument 0 (key) <p0:Object> isa K */
1758 /* <p0:Object> isa K */
1759 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1760 cltype
= type_struct
->color
;
1761 idtype
= type_struct
->id
;
1762 if(cltype
>= p0
->type
->table_size
) {
1765 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1767 if (unlikely(!var1
)) {
1768 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1769 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
1770 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 212);
1775 var2
= hash_collection__HashCollection__node_at(self
, var_key
);
1779 if (var_c
== NULL
) {
1780 var4
= 1; /* is null */
1782 var4
= 0; /* arg is null but recv is not */
1785 { /* Inline kernel#Object#== (var_c,var3) on <var_c:nullable HashMapNode[Object, nullable Object]> */
1788 { /* Inline kernel#Object#is_same_instance (var_c,var_other) on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1789 var9
= var_c
== var_other
;
1803 var10
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__MapRead__provide_default_value
]))(self
, var_key
) /* provide_default_value on <self:HashMap[Object, nullable Object]>*/;
1808 var11
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1815 /* method hash_collection#HashMap#[] for (self: Object, Object): nullable Object */
1816 val
* VIRTUAL_hash_collection__HashMap___91d_93d(val
* self
, val
* p0
) {
1817 val
* var
/* : nullable Object */;
1818 val
* var1
/* : nullable Object */;
1819 var1
= hash_collection__HashMap___91d_93d(self
, p0
);
1824 /* method hash_collection#HashMap#iterator for (self: HashMap[Object, nullable Object]): HashMapIterator[Object, nullable Object] */
1825 val
* hash_collection__HashMap__iterator(val
* self
) {
1826 val
* var
/* : HashMapIterator[Object, nullable Object] */;
1827 val
* var1
/* : HashMapIterator[Object, nullable Object] */;
1828 var1
= NEW_hash_collection__HashMapIterator(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapIteratorhash_collection__HashMap_FT0hash_collection__HashMap_FT1
]);
1830 hash_collection__HashMapIterator__init(var1
, self
); /* Direct call hash_collection#HashMapIterator#init on <var1:HashMapIterator[Object, nullable Object]>*/
1837 /* method hash_collection#HashMap#iterator for (self: Object): MapIterator[Object, nullable Object] */
1838 val
* VIRTUAL_hash_collection__HashMap__iterator(val
* self
) {
1839 val
* var
/* : MapIterator[Object, nullable Object] */;
1840 val
* var1
/* : HashMapIterator[Object, nullable Object] */;
1841 var1
= hash_collection__HashMap__iterator(self
);
1846 /* method hash_collection#HashMap#length for (self: HashMap[Object, nullable Object]): Int */
1847 long hash_collection__HashMap__length(val
* self
) {
1848 long var
/* : Int */;
1849 long var1
/* : Int */;
1850 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashMap[Object, nullable Object]> */
1856 /* method hash_collection#HashMap#length for (self: Object): Int */
1857 long VIRTUAL_hash_collection__HashMap__length(val
* self
) {
1858 long var
/* : Int */;
1859 long var1
/* : Int */;
1860 var1
= hash_collection__HashMap__length(self
);
1865 /* method hash_collection#HashMap#is_empty for (self: HashMap[Object, nullable Object]): Bool */
1866 short int hash_collection__HashMap__is_empty(val
* self
) {
1867 short int var
/* : Bool */;
1868 long var1
/* : Int */;
1869 long var2
/* : Int */;
1870 short int var3
/* : Bool */;
1871 short int var4
/* : Bool */;
1872 short int var6
/* : Bool */;
1873 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashMap[Object, nullable Object]> */
1876 { /* Inline kernel#Int#== (var1,var2) on <var1:Int> */
1877 var6
= var1
== var2
;
1889 /* method hash_collection#HashMap#is_empty for (self: Object): Bool */
1890 short int VIRTUAL_hash_collection__HashMap__is_empty(val
* self
) {
1891 short int var
/* : Bool */;
1892 short int var1
/* : Bool */;
1893 var1
= hash_collection__HashMap__is_empty(self
);
1898 /* method hash_collection#HashMap#[]= for (self: HashMap[Object, nullable Object], Object, nullable Object) */
1899 void hash_collection__HashMap___91d_93d_61d(val
* self
, val
* p0
, val
* p1
) {
1900 short int var
/* : Bool */;
1903 const struct type
* type_struct
;
1904 const char* var_class_name
;
1905 short int var1
/* : Bool */;
1908 const struct type
* type_struct4
;
1909 short int is_nullable
;
1910 const char* var_class_name5
;
1911 val
* var_key
/* var key: Object */;
1912 val
* var_v
/* var v: nullable Object */;
1913 long var6
/* : Int */;
1914 long var_i
/* var i: Int */;
1915 val
* var7
/* : nullable HashNode[Object] */;
1916 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
1917 val
* var8
/* : null */;
1918 short int var9
/* : Bool */;
1919 short int var10
/* : Bool */;
1920 val
* var_other
/* var other: nullable Object */;
1921 short int var12
/* : Bool */;
1922 short int var13
/* : Bool */;
1923 short int var14
/* : Bool */;
1924 val
* var15
/* : HashMapNode[Object, nullable Object] */;
1925 /* Covariant cast for argument 0 (key) <p0:Object> isa K */
1926 /* <p0:Object> isa K */
1927 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Map_FT0
];
1928 cltype
= type_struct
->color
;
1929 idtype
= type_struct
->id
;
1930 if(cltype
>= p0
->type
->table_size
) {
1933 var
= p0
->type
->type_table
[cltype
] == idtype
;
1935 if (unlikely(!var
)) {
1936 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1937 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
1938 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 228);
1941 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa V */
1942 /* <p1:nullable Object> isa V */
1943 type_struct4
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Map_FT1
];
1944 cltype2
= type_struct4
->color
;
1945 idtype3
= type_struct4
->id
;
1946 is_nullable
= type_struct4
->is_nullable
;
1950 if(cltype2
>= p1
->type
->table_size
) {
1953 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
1956 if (unlikely(!var1
)) {
1957 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
1958 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name5
);
1959 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 228);
1965 var6
= hash_collection__HashCollection__index_at(self
, var_key
);
1969 var7
= hash_collection__HashCollection__node_at_idx(self
, var_i
, var_key
);
1973 if (var_c
== NULL
) {
1974 var9
= 0; /* is null */
1976 var9
= 1; /* arg is null and recv is not */
1979 { /* Inline kernel#Object#!= (var_c,var8) on <var_c:nullable HashMapNode[Object, nullable Object]> */
1982 var13
= ((short int (*)(val
*, val
*))(var_c
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_c
, var_other
) /* == on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])>*/;
1988 RET_LABEL11
:(void)0;
1993 var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_key
; /* _key on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1994 var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
= var_v
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1996 var15
= NEW_hash_collection__HashMapNode(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapNodehash_collection__HashMap_FT0hash_collection__HashMap_FT1
]);
1998 hash_collection__HashMapNode__init(var15
, var_key
, var_v
); /* Direct call hash_collection#HashMapNode#init on <var15:HashMapNode[Object, nullable Object]>*/
2001 hash_collection__HashCollection__store(self
, var_i
, var15
); /* Direct call hash_collection#HashCollection#store on <self:HashMap[Object, nullable Object]>*/
2006 /* method hash_collection#HashMap#[]= for (self: Object, Object, nullable Object) */
2007 void VIRTUAL_hash_collection__HashMap___91d_93d_61d(val
* self
, val
* p0
, val
* p1
) {
2008 hash_collection__HashMap___91d_93d_61d(self
, p0
, p1
); /* Direct call hash_collection#HashMap#[]= on <self:Object(HashMap[Object, nullable Object])>*/
2011 /* method hash_collection#HashMap#clear for (self: HashMap[Object, nullable Object]) */
2012 void hash_collection__HashMap__clear(val
* self
) {
2014 hash_collection__HashCollection__raz(self
); /* Direct call hash_collection#HashCollection#raz on <self:HashMap[Object, nullable Object]>*/
2018 /* method hash_collection#HashMap#clear for (self: Object) */
2019 void VIRTUAL_hash_collection__HashMap__clear(val
* self
) {
2020 hash_collection__HashMap__clear(self
); /* Direct call hash_collection#HashMap#clear on <self:Object(HashMap[Object, nullable Object])>*/
2023 /* method hash_collection#HashMap#init for (self: HashMap[Object, nullable Object]) */
2024 void hash_collection__HashMap__init(val
* self
) {
2025 long var
/* : Int */;
2026 long var1
/* : Int */;
2027 long var2
/* : Int */;
2029 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMap__init
]))(self
) /* init on <self:HashMap[Object, nullable Object]>*/;
2032 self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
= var
; /* _capacity on <self:HashMap[Object, nullable Object]> */
2034 self
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
= var1
; /* _the_length on <self:HashMap[Object, nullable Object]> */
2037 hash_collection__HashCollection__enlarge(self
, var2
); /* Direct call hash_collection#HashCollection#enlarge on <self:HashMap[Object, nullable Object]>*/
2041 /* method hash_collection#HashMap#init for (self: Object) */
2042 void VIRTUAL_hash_collection__HashMap__init(val
* self
) {
2043 hash_collection__HashMap__init(self
); /* Direct call hash_collection#HashMap#init on <self:Object(HashMap[Object, nullable Object])>*/
2046 /* method hash_collection#HashMap#keys for (self: HashMap[Object, nullable Object]): RemovableCollection[Object] */
2047 val
* hash_collection__HashMap__keys(val
* self
) {
2048 val
* var
/* : RemovableCollection[Object] */;
2049 val
* var1
/* : RemovableCollection[Object] */;
2050 var1
= self
->attrs
[COLOR_hash_collection__HashMap___keys
].val
; /* _keys on <self:HashMap[Object, nullable Object]> */
2051 if (unlikely(var1
== NULL
)) {
2052 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _keys");
2053 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 249);
2060 /* method hash_collection#HashMap#keys for (self: Object): Collection[Object] */
2061 val
* VIRTUAL_hash_collection__HashMap__keys(val
* self
) {
2062 val
* var
/* : Collection[Object] */;
2063 val
* var1
/* : RemovableCollection[Object] */;
2064 val
* var3
/* : RemovableCollection[Object] */;
2065 { /* Inline hash_collection#HashMap#keys (self) on <self:Object(HashMap[Object, nullable Object])> */
2066 var3
= self
->attrs
[COLOR_hash_collection__HashMap___keys
].val
; /* _keys on <self:Object(HashMap[Object, nullable Object])> */
2067 if (unlikely(var3
== NULL
)) {
2068 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _keys");
2069 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 249);
2079 /* method hash_collection#HashMap#values for (self: HashMap[Object, nullable Object]): RemovableCollection[nullable Object] */
2080 val
* hash_collection__HashMap__values(val
* self
) {
2081 val
* var
/* : RemovableCollection[nullable Object] */;
2082 val
* var1
/* : RemovableCollection[nullable Object] */;
2083 var1
= self
->attrs
[COLOR_hash_collection__HashMap___values
].val
; /* _values on <self:HashMap[Object, nullable Object]> */
2084 if (unlikely(var1
== NULL
)) {
2085 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _values");
2086 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 250);
2093 /* method hash_collection#HashMap#values for (self: Object): Collection[nullable Object] */
2094 val
* VIRTUAL_hash_collection__HashMap__values(val
* self
) {
2095 val
* var
/* : Collection[nullable Object] */;
2096 val
* var1
/* : RemovableCollection[nullable Object] */;
2097 val
* var3
/* : RemovableCollection[nullable Object] */;
2098 { /* Inline hash_collection#HashMap#values (self) on <self:Object(HashMap[Object, nullable Object])> */
2099 var3
= self
->attrs
[COLOR_hash_collection__HashMap___values
].val
; /* _values on <self:Object(HashMap[Object, nullable Object])> */
2100 if (unlikely(var3
== NULL
)) {
2101 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _values");
2102 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 250);
2112 /* method hash_collection#HashMapKeys#map for (self: HashMapKeys[Object, nullable Object]): HashMap[Object, nullable Object] */
2113 val
* hash_collection__HashMapKeys__map(val
* self
) {
2114 val
* var
/* : HashMap[Object, nullable Object] */;
2115 val
* var1
/* : HashMap[Object, nullable Object] */;
2116 var1
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2117 if (unlikely(var1
== NULL
)) {
2118 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2119 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 256);
2126 /* method hash_collection#HashMapKeys#map for (self: Object): HashMap[Object, nullable Object] */
2127 val
* VIRTUAL_hash_collection__HashMapKeys__map(val
* self
) {
2128 val
* var
/* : HashMap[Object, nullable Object] */;
2129 val
* var1
/* : HashMap[Object, nullable Object] */;
2130 val
* var3
/* : HashMap[Object, nullable Object] */;
2131 { /* Inline hash_collection#HashMapKeys#map (self) on <self:Object(HashMapKeys[Object, nullable Object])> */
2132 var3
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:Object(HashMapKeys[Object, nullable Object])> */
2133 if (unlikely(var3
== NULL
)) {
2134 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2135 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 256);
2145 /* method hash_collection#HashMapKeys#map= for (self: HashMapKeys[Object, nullable Object], HashMap[Object, nullable Object]) */
2146 void hash_collection__HashMapKeys__map_61d(val
* self
, val
* p0
) {
2147 short int var
/* : Bool */;
2150 const struct type
* type_struct
;
2151 const char* var_class_name
;
2152 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[K, V] */
2153 /* <p0:HashMap[Object, nullable Object]> isa HashMap[K, V] */
2154 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapKeys_FT0hash_collection__HashMapKeys_FT1
];
2155 cltype
= type_struct
->color
;
2156 idtype
= type_struct
->id
;
2157 if(cltype
>= p0
->type
->table_size
) {
2160 var
= p0
->type
->type_table
[cltype
] == idtype
;
2162 if (unlikely(!var
)) {
2163 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2164 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name
);
2165 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 256);
2168 self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
= p0
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2171 /* method hash_collection#HashMapKeys#map= for (self: Object, HashMap[Object, nullable Object]) */
2172 void VIRTUAL_hash_collection__HashMapKeys__map_61d(val
* self
, val
* p0
) {
2173 short int var
/* : Bool */;
2176 const struct type
* type_struct
;
2177 const char* var_class_name
;
2178 { /* Inline hash_collection#HashMapKeys#map= (self,p0) on <self:Object(HashMapKeys[Object, nullable Object])> */
2179 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[K, V] */
2180 /* <p0:HashMap[Object, nullable Object]> isa HashMap[K, V] */
2181 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapKeys_FT0hash_collection__HashMapKeys_FT1
];
2182 cltype
= type_struct
->color
;
2183 idtype
= type_struct
->id
;
2184 if(cltype
>= p0
->type
->table_size
) {
2187 var
= p0
->type
->type_table
[cltype
] == idtype
;
2189 if (unlikely(!var
)) {
2190 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2191 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name
);
2192 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 256);
2195 self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
= p0
; /* _map on <self:Object(HashMapKeys[Object, nullable Object])> */
2200 /* method hash_collection#HashMapKeys#first for (self: HashMapKeys[Object, nullable Object]): Object */
2201 val
* hash_collection__HashMapKeys__first(val
* self
) {
2202 val
* var
/* : Object */;
2203 val
* var1
/* : HashMap[Object, nullable Object] */;
2204 val
* var3
/* : HashMap[Object, nullable Object] */;
2205 val
* var4
/* : nullable HashNode[Object] */;
2206 val
* var5
/* : Object */;
2208 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2209 var3
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2210 if (unlikely(var3
== NULL
)) {
2211 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2212 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 256);
2219 var4
= var1
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[Object, nullable Object]> */
2220 if (unlikely(var4
== NULL
)) {
2221 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2222 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 260);
2225 var5
= var4
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var4:nullable HashNode[Object](nullable HashMapNode[Object, nullable Object])> */
2226 if (unlikely(var5
== NULL
)) {
2227 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
2228 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 260);
2236 /* method hash_collection#HashMapKeys#first for (self: Object): nullable Object */
2237 val
* VIRTUAL_hash_collection__HashMapKeys__first(val
* self
) {
2238 val
* var
/* : nullable Object */;
2239 val
* var1
/* : Object */;
2240 var1
= hash_collection__HashMapKeys__first(self
);
2245 /* method hash_collection#HashMapKeys#has for (self: HashMapKeys[Object, nullable Object], Object): Bool */
2246 short int hash_collection__HashMapKeys__has(val
* self
, val
* p0
) {
2247 short int var
/* : Bool */;
2248 short int var1
/* : Bool */;
2251 const struct type
* type_struct
;
2252 const char* var_class_name
;
2253 val
* var_k
/* var k: Object */;
2254 val
* var2
/* : HashMap[Object, nullable Object] */;
2255 val
* var4
/* : HashMap[Object, nullable Object] */;
2256 val
* var5
/* : nullable HashNode[Object] */;
2257 val
* var6
/* : null */;
2258 short int var7
/* : Bool */;
2259 short int var8
/* : Bool */;
2260 val
* var_other
/* var other: nullable Object */;
2261 short int var10
/* : Bool */;
2262 short int var11
/* : Bool */;
2263 short int var12
/* : Bool */;
2264 /* Covariant cast for argument 0 (k) <p0:Object> isa E */
2265 /* <p0:Object> isa E */
2266 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
2267 cltype
= type_struct
->color
;
2268 idtype
= type_struct
->id
;
2269 if(cltype
>= p0
->type
->table_size
) {
2272 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2274 if (unlikely(!var1
)) {
2275 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2276 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
2277 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 261);
2282 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2283 var4
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2284 if (unlikely(var4
== NULL
)) {
2285 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2286 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 256);
2294 var5
= hash_collection__HashCollection__node_at(var2
, var_k
);
2298 var7
= 0; /* is null */
2300 var7
= 1; /* arg is null and recv is not */
2303 { /* Inline kernel#Object#!= (var5,var6) on <var5:nullable HashNode[Object](nullable HashMapNode[Object, nullable Object])> */
2306 var11
= ((short int (*)(val
*, val
*))(var5
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var5
, var_other
) /* == on <var5:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])>*/;
2321 /* method hash_collection#HashMapKeys#has for (self: Object, nullable Object): Bool */
2322 short int VIRTUAL_hash_collection__HashMapKeys__has(val
* self
, val
* p0
) {
2323 short int var
/* : Bool */;
2324 short int var1
/* : Bool */;
2325 var1
= hash_collection__HashMapKeys__has(self
, p0
);
2330 /* method hash_collection#HashMapKeys#is_empty for (self: HashMapKeys[Object, nullable Object]): Bool */
2331 short int hash_collection__HashMapKeys__is_empty(val
* self
) {
2332 short int var
/* : Bool */;
2333 val
* var1
/* : HashMap[Object, nullable Object] */;
2334 val
* var3
/* : HashMap[Object, nullable Object] */;
2335 short int var4
/* : Bool */;
2337 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2338 var3
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2339 if (unlikely(var3
== NULL
)) {
2340 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2341 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 256);
2349 var4
= hash_collection__HashMap__is_empty(var1
);
2356 /* method hash_collection#HashMapKeys#is_empty for (self: Object): Bool */
2357 short int VIRTUAL_hash_collection__HashMapKeys__is_empty(val
* self
) {
2358 short int var
/* : Bool */;
2359 short int var1
/* : Bool */;
2360 var1
= hash_collection__HashMapKeys__is_empty(self
);
2365 /* method hash_collection#HashMapKeys#length for (self: HashMapKeys[Object, nullable Object]): Int */
2366 long hash_collection__HashMapKeys__length(val
* self
) {
2367 long var
/* : Int */;
2368 val
* var1
/* : HashMap[Object, nullable Object] */;
2369 val
* var3
/* : HashMap[Object, nullable Object] */;
2370 long var4
/* : Int */;
2372 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2373 var3
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2374 if (unlikely(var3
== NULL
)) {
2375 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2376 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 256);
2384 var4
= hash_collection__HashMap__length(var1
);
2391 /* method hash_collection#HashMapKeys#length for (self: Object): Int */
2392 long VIRTUAL_hash_collection__HashMapKeys__length(val
* self
) {
2393 long var
/* : Int */;
2394 long var1
/* : Int */;
2395 var1
= hash_collection__HashMapKeys__length(self
);
2400 /* method hash_collection#HashMapKeys#iterator for (self: HashMapKeys[Object, nullable Object]): Iterator[Object] */
2401 val
* hash_collection__HashMapKeys__iterator(val
* self
) {
2402 val
* var
/* : Iterator[Object] */;
2403 val
* var1
/* : MapKeysIterator[Object, nullable Object] */;
2404 val
* var2
/* : HashMap[Object, nullable Object] */;
2405 val
* var4
/* : HashMap[Object, nullable Object] */;
2406 val
* var5
/* : HashMapIterator[Object, nullable Object] */;
2407 var1
= NEW_abstract_collection__MapKeysIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapKeysIteratorhash_collection__HashMapKeys_FT0hash_collection__HashMapKeys_FT1
]);
2409 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2410 var4
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2411 if (unlikely(var4
== NULL
)) {
2412 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2413 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 256);
2421 var5
= hash_collection__HashMap__iterator(var2
);
2424 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_abstract_collection__MapKeysIterator__original_iterator_61d
]))(var1
, var5
) /* original_iterator= on <var1:MapKeysIterator[Object, nullable Object]>*/;
2427 ((void (*)(val
*))(var1
->class->vft
[COLOR_kernel__Object__init
]))(var1
) /* init on <var1:MapKeysIterator[Object, nullable Object]>*/;
2434 /* method hash_collection#HashMapKeys#iterator for (self: Object): Iterator[nullable Object] */
2435 val
* VIRTUAL_hash_collection__HashMapKeys__iterator(val
* self
) {
2436 val
* var
/* : Iterator[nullable Object] */;
2437 val
* var1
/* : Iterator[Object] */;
2438 var1
= hash_collection__HashMapKeys__iterator(self
);
2443 /* method hash_collection#HashMapKeys#clear for (self: HashMapKeys[Object, nullable Object]) */
2444 void hash_collection__HashMapKeys__clear(val
* self
) {
2445 val
* var
/* : HashMap[Object, nullable Object] */;
2446 val
* var2
/* : HashMap[Object, nullable Object] */;
2448 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2449 var2
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2450 if (unlikely(var2
== NULL
)) {
2451 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2452 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 256);
2460 hash_collection__HashMap__clear(var
); /* Direct call hash_collection#HashMap#clear on <var:HashMap[Object, nullable Object]>*/
2464 /* method hash_collection#HashMapKeys#clear for (self: Object) */
2465 void VIRTUAL_hash_collection__HashMapKeys__clear(val
* self
) {
2466 hash_collection__HashMapKeys__clear(self
); /* Direct call hash_collection#HashMapKeys#clear on <self:Object(HashMapKeys[Object, nullable Object])>*/
2469 /* method hash_collection#HashMapKeys#remove for (self: HashMapKeys[Object, nullable Object], Object) */
2470 void hash_collection__HashMapKeys__remove(val
* self
, val
* p0
) {
2471 short int var
/* : Bool */;
2474 const struct type
* type_struct
;
2475 const char* var_class_name
;
2476 val
* var_key
/* var key: Object */;
2477 val
* var1
/* : HashMap[Object, nullable Object] */;
2478 val
* var3
/* : HashMap[Object, nullable Object] */;
2479 /* Covariant cast for argument 0 (key) <p0:Object> isa E */
2480 /* <p0:Object> isa E */
2481 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
2482 cltype
= type_struct
->color
;
2483 idtype
= type_struct
->id
;
2484 if(cltype
>= p0
->type
->table_size
) {
2487 var
= p0
->type
->type_table
[cltype
] == idtype
;
2489 if (unlikely(!var
)) {
2490 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2491 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
2492 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 270);
2497 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2498 var3
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2499 if (unlikely(var3
== NULL
)) {
2500 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2501 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 256);
2509 hash_collection__HashCollection__remove_node(var1
, var_key
); /* Direct call hash_collection#HashCollection#remove_node on <var1:HashMap[Object, nullable Object]>*/
2513 /* method hash_collection#HashMapKeys#remove for (self: Object, nullable Object) */
2514 void VIRTUAL_hash_collection__HashMapKeys__remove(val
* self
, val
* p0
) {
2515 hash_collection__HashMapKeys__remove(self
, p0
); /* Direct call hash_collection#HashMapKeys#remove on <self:Object(HashMapKeys[Object, nullable Object])>*/
2518 /* method hash_collection#HashMapKeys#init for (self: HashMapKeys[Object, nullable Object]) */
2519 void hash_collection__HashMapKeys__init(val
* self
) {
2521 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__init
]))(self
) /* init on <self:HashMapKeys[Object, nullable Object]>*/;
2525 /* method hash_collection#HashMapKeys#init for (self: Object) */
2526 void VIRTUAL_hash_collection__HashMapKeys__init(val
* self
) {
2527 { /* Inline hash_collection#HashMapKeys#init (self) on <self:Object(HashMapKeys[Object, nullable Object])> */
2529 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__init
]))(self
) /* init on <self:Object(HashMapKeys[Object, nullable Object])>*/;
2535 /* method hash_collection#HashMapValues#map for (self: HashMapValues[Object, nullable Object]): HashMap[Object, nullable Object] */
2536 val
* hash_collection__HashMapValues__map(val
* self
) {
2537 val
* var
/* : HashMap[Object, nullable Object] */;
2538 val
* var1
/* : HashMap[Object, nullable Object] */;
2539 var1
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2540 if (unlikely(var1
== NULL
)) {
2541 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2542 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 277);
2549 /* method hash_collection#HashMapValues#map for (self: Object): HashMap[Object, nullable Object] */
2550 val
* VIRTUAL_hash_collection__HashMapValues__map(val
* self
) {
2551 val
* var
/* : HashMap[Object, nullable Object] */;
2552 val
* var1
/* : HashMap[Object, nullable Object] */;
2553 val
* var3
/* : HashMap[Object, nullable Object] */;
2554 { /* Inline hash_collection#HashMapValues#map (self) on <self:Object(HashMapValues[Object, nullable Object])> */
2555 var3
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:Object(HashMapValues[Object, nullable Object])> */
2556 if (unlikely(var3
== NULL
)) {
2557 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2558 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 277);
2568 /* method hash_collection#HashMapValues#map= for (self: HashMapValues[Object, nullable Object], HashMap[Object, nullable Object]) */
2569 void hash_collection__HashMapValues__map_61d(val
* self
, val
* p0
) {
2570 short int var
/* : Bool */;
2573 const struct type
* type_struct
;
2574 const char* var_class_name
;
2575 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[K, V] */
2576 /* <p0:HashMap[Object, nullable Object]> isa HashMap[K, V] */
2577 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapValues_FT0hash_collection__HashMapValues_FT1
];
2578 cltype
= type_struct
->color
;
2579 idtype
= type_struct
->id
;
2580 if(cltype
>= p0
->type
->table_size
) {
2583 var
= p0
->type
->type_table
[cltype
] == idtype
;
2585 if (unlikely(!var
)) {
2586 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2587 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name
);
2588 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 277);
2591 self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
= p0
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2594 /* method hash_collection#HashMapValues#map= for (self: Object, HashMap[Object, nullable Object]) */
2595 void VIRTUAL_hash_collection__HashMapValues__map_61d(val
* self
, val
* p0
) {
2596 short int var
/* : Bool */;
2599 const struct type
* type_struct
;
2600 const char* var_class_name
;
2601 { /* Inline hash_collection#HashMapValues#map= (self,p0) on <self:Object(HashMapValues[Object, nullable Object])> */
2602 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[K, V] */
2603 /* <p0:HashMap[Object, nullable Object]> isa HashMap[K, V] */
2604 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapValues_FT0hash_collection__HashMapValues_FT1
];
2605 cltype
= type_struct
->color
;
2606 idtype
= type_struct
->id
;
2607 if(cltype
>= p0
->type
->table_size
) {
2610 var
= p0
->type
->type_table
[cltype
] == idtype
;
2612 if (unlikely(!var
)) {
2613 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2614 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name
);
2615 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 277);
2618 self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
= p0
; /* _map on <self:Object(HashMapValues[Object, nullable Object])> */
2623 /* method hash_collection#HashMapValues#first for (self: HashMapValues[Object, nullable Object]): nullable Object */
2624 val
* hash_collection__HashMapValues__first(val
* self
) {
2625 val
* var
/* : nullable Object */;
2626 val
* var1
/* : HashMap[Object, nullable Object] */;
2627 val
* var3
/* : HashMap[Object, nullable Object] */;
2628 val
* var4
/* : nullable HashNode[Object] */;
2629 val
* var5
/* : nullable Object */;
2631 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2632 var3
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2633 if (unlikely(var3
== NULL
)) {
2634 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2635 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 277);
2642 var4
= var1
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[Object, nullable Object]> */
2643 if (unlikely(var4
== NULL
)) {
2644 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2645 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 290);
2648 var5
= var4
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var4:nullable HashNode[Object](nullable HashMapNode[Object, nullable Object])> */
2654 /* method hash_collection#HashMapValues#first for (self: Object): nullable Object */
2655 val
* VIRTUAL_hash_collection__HashMapValues__first(val
* self
) {
2656 val
* var
/* : nullable Object */;
2657 val
* var1
/* : nullable Object */;
2658 var1
= hash_collection__HashMapValues__first(self
);
2663 /* method hash_collection#HashMapValues#has for (self: HashMapValues[Object, nullable Object], nullable Object): Bool */
2664 short int hash_collection__HashMapValues__has(val
* self
, val
* p0
) {
2665 short int var
/* : Bool */;
2666 short int var1
/* : Bool */;
2669 const struct type
* type_struct
;
2670 short int is_nullable
;
2671 const char* var_class_name
;
2672 val
* var_item
/* var item: nullable Object */;
2673 val
* var2
/* : HashMap[Object, nullable Object] */;
2674 val
* var4
/* : HashMap[Object, nullable Object] */;
2675 val
* var5
/* : nullable HashNode[Object] */;
2676 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2677 val
* var6
/* : null */;
2678 short int var7
/* : Bool */;
2679 short int var8
/* : Bool */;
2680 val
* var_other
/* var other: nullable Object */;
2681 short int var10
/* : Bool */;
2682 short int var11
/* : Bool */;
2683 short int var12
/* : Bool */;
2684 val
* var13
/* : nullable Object */;
2685 short int var14
/* : Bool */;
2686 short int var15
/* : Bool */;
2687 short int var16
/* : Bool */;
2688 val
* var17
/* : nullable HashNode[Object] */;
2689 short int var18
/* : Bool */;
2690 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
2691 /* <p0:nullable Object> isa E */
2692 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
2693 cltype
= type_struct
->color
;
2694 idtype
= type_struct
->id
;
2695 is_nullable
= type_struct
->is_nullable
;
2699 if(cltype
>= p0
->type
->table_size
) {
2702 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2705 if (unlikely(!var1
)) {
2706 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2707 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
2708 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 292);
2713 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2714 var4
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2715 if (unlikely(var4
== NULL
)) {
2716 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2717 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 277);
2724 var5
= var2
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var2:HashMap[Object, nullable Object]> */
2728 if (var_c
== NULL
) {
2729 var7
= 0; /* is null */
2731 var7
= 1; /* arg is null and recv is not */
2734 { /* Inline kernel#Object#!= (var_c,var6) on <var_c:nullable HashMapNode[Object, nullable Object]> */
2737 var11
= ((short int (*)(val
*, val
*))(var_c
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_c
, var_other
) /* == on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])>*/;
2748 var13
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2749 if (var13
== NULL
) {
2750 var14
= (var_item
== NULL
);
2752 var15
= ((short int (*)(val
*, val
*))(var13
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var13
, var_item
) /* == on <var13:nullable Object>*/;
2761 var17
= var_c
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2767 BREAK_label
: (void)0;
2774 /* method hash_collection#HashMapValues#has for (self: Object, nullable Object): Bool */
2775 short int VIRTUAL_hash_collection__HashMapValues__has(val
* self
, val
* p0
) {
2776 short int var
/* : Bool */;
2777 short int var1
/* : Bool */;
2778 var1
= hash_collection__HashMapValues__has(self
, p0
);
2783 /* method hash_collection#HashMapValues#is_empty for (self: HashMapValues[Object, nullable Object]): Bool */
2784 short int hash_collection__HashMapValues__is_empty(val
* self
) {
2785 short int var
/* : Bool */;
2786 val
* var1
/* : HashMap[Object, nullable Object] */;
2787 val
* var3
/* : HashMap[Object, nullable Object] */;
2788 short int var4
/* : Bool */;
2790 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2791 var3
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2792 if (unlikely(var3
== NULL
)) {
2793 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2794 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 277);
2802 var4
= hash_collection__HashMap__is_empty(var1
);
2809 /* method hash_collection#HashMapValues#is_empty for (self: Object): Bool */
2810 short int VIRTUAL_hash_collection__HashMapValues__is_empty(val
* self
) {
2811 short int var
/* : Bool */;
2812 short int var1
/* : Bool */;
2813 var1
= hash_collection__HashMapValues__is_empty(self
);
2818 /* method hash_collection#HashMapValues#length for (self: HashMapValues[Object, nullable Object]): Int */
2819 long hash_collection__HashMapValues__length(val
* self
) {
2820 long var
/* : Int */;
2821 val
* var1
/* : HashMap[Object, nullable Object] */;
2822 val
* var3
/* : HashMap[Object, nullable Object] */;
2823 long var4
/* : Int */;
2825 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2826 var3
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2827 if (unlikely(var3
== NULL
)) {
2828 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2829 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 277);
2837 var4
= hash_collection__HashMap__length(var1
);
2844 /* method hash_collection#HashMapValues#length for (self: Object): Int */
2845 long VIRTUAL_hash_collection__HashMapValues__length(val
* self
) {
2846 long var
/* : Int */;
2847 long var1
/* : Int */;
2848 var1
= hash_collection__HashMapValues__length(self
);
2853 /* method hash_collection#HashMapValues#iterator for (self: HashMapValues[Object, nullable Object]): Iterator[nullable Object] */
2854 val
* hash_collection__HashMapValues__iterator(val
* self
) {
2855 val
* var
/* : Iterator[nullable Object] */;
2856 val
* var1
/* : MapValuesIterator[Object, nullable Object] */;
2857 val
* var2
/* : HashMap[Object, nullable Object] */;
2858 val
* var4
/* : HashMap[Object, nullable Object] */;
2859 val
* var5
/* : HashMapIterator[Object, nullable Object] */;
2860 var1
= NEW_abstract_collection__MapValuesIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapValuesIteratorhash_collection__HashMapValues_FT0hash_collection__HashMapValues_FT1
]);
2862 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2863 var4
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2864 if (unlikely(var4
== NULL
)) {
2865 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2866 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 277);
2874 var5
= hash_collection__HashMap__iterator(var2
);
2877 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_abstract_collection__MapValuesIterator__original_iterator_61d
]))(var1
, var5
) /* original_iterator= on <var1:MapValuesIterator[Object, nullable Object]>*/;
2880 ((void (*)(val
*))(var1
->class->vft
[COLOR_kernel__Object__init
]))(var1
) /* init on <var1:MapValuesIterator[Object, nullable Object]>*/;
2887 /* method hash_collection#HashMapValues#iterator for (self: Object): Iterator[nullable Object] */
2888 val
* VIRTUAL_hash_collection__HashMapValues__iterator(val
* self
) {
2889 val
* var
/* : Iterator[nullable Object] */;
2890 val
* var1
/* : Iterator[nullable Object] */;
2891 var1
= hash_collection__HashMapValues__iterator(self
);
2896 /* method hash_collection#HashMapValues#clear for (self: HashMapValues[Object, nullable Object]) */
2897 void hash_collection__HashMapValues__clear(val
* self
) {
2898 val
* var
/* : HashMap[Object, nullable Object] */;
2899 val
* var2
/* : HashMap[Object, nullable Object] */;
2901 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2902 var2
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2903 if (unlikely(var2
== NULL
)) {
2904 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2905 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 277);
2913 hash_collection__HashMap__clear(var
); /* Direct call hash_collection#HashMap#clear on <var:HashMap[Object, nullable Object]>*/
2917 /* method hash_collection#HashMapValues#clear for (self: Object) */
2918 void VIRTUAL_hash_collection__HashMapValues__clear(val
* self
) {
2919 hash_collection__HashMapValues__clear(self
); /* Direct call hash_collection#HashMapValues#clear on <self:Object(HashMapValues[Object, nullable Object])>*/
2922 /* method hash_collection#HashMapValues#remove for (self: HashMapValues[Object, nullable Object], nullable Object) */
2923 void hash_collection__HashMapValues__remove(val
* self
, val
* p0
) {
2924 short int var
/* : Bool */;
2927 const struct type
* type_struct
;
2928 short int is_nullable
;
2929 const char* var_class_name
;
2930 val
* var_item
/* var item: nullable Object */;
2931 val
* var1
/* : HashMap[Object, nullable Object] */;
2932 val
* var3
/* : HashMap[Object, nullable Object] */;
2933 val
* var_map
/* var map: HashMap[Object, nullable Object] */;
2934 val
* var4
/* : nullable HashNode[Object] */;
2935 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2936 val
* var5
/* : null */;
2937 short int var6
/* : Bool */;
2938 short int var7
/* : Bool */;
2939 val
* var_other
/* var other: nullable Object */;
2940 short int var9
/* : Bool */;
2941 short int var10
/* : Bool */;
2942 short int var11
/* : Bool */;
2943 val
* var12
/* : nullable Object */;
2944 short int var13
/* : Bool */;
2945 short int var14
/* : Bool */;
2946 val
* var15
/* : Object */;
2947 val
* var16
/* : nullable HashNode[Object] */;
2948 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa E */
2949 /* <p0:nullable Object> isa E */
2950 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
2951 cltype
= type_struct
->color
;
2952 idtype
= type_struct
->id
;
2953 is_nullable
= type_struct
->is_nullable
;
2957 if(cltype
>= p0
->type
->table_size
) {
2960 var
= p0
->type
->type_table
[cltype
] == idtype
;
2963 if (unlikely(!var
)) {
2964 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2965 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
2966 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 319);
2971 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2972 var3
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2973 if (unlikely(var3
== NULL
)) {
2974 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2975 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 277);
2983 var4
= var_map
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_map:HashMap[Object, nullable Object]> */
2987 if (var_c
== NULL
) {
2988 var6
= 0; /* is null */
2990 var6
= 1; /* arg is null and recv is not */
2993 { /* Inline kernel#Object#!= (var_c,var5) on <var_c:nullable HashMapNode[Object, nullable Object]> */
2996 var10
= ((short int (*)(val
*, val
*))(var_c
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_c
, var_other
) /* == on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])>*/;
3007 var12
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
3008 if (var12
== NULL
) {
3009 var13
= (var_item
== NULL
);
3011 var14
= ((short int (*)(val
*, val
*))(var12
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var12
, var_item
) /* == on <var12:nullable Object>*/;
3015 var15
= var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
3016 if (unlikely(var15
== NULL
)) {
3017 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
3018 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 325);
3022 hash_collection__HashCollection__remove_node(var_map
, var15
); /* Direct call hash_collection#HashCollection#remove_node on <var_map:HashMap[Object, nullable Object]>*/
3027 var16
= var_c
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
3033 BREAK_label
: (void)0;
3036 /* method hash_collection#HashMapValues#remove for (self: Object, nullable Object) */
3037 void VIRTUAL_hash_collection__HashMapValues__remove(val
* self
, val
* p0
) {
3038 hash_collection__HashMapValues__remove(self
, p0
); /* Direct call hash_collection#HashMapValues#remove on <self:Object(HashMapValues[Object, nullable Object])>*/
3041 /* method hash_collection#HashMapValues#init for (self: HashMapValues[Object, nullable Object]) */
3042 void hash_collection__HashMapValues__init(val
* self
) {
3044 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__init
]))(self
) /* init on <self:HashMapValues[Object, nullable Object]>*/;
3048 /* method hash_collection#HashMapValues#init for (self: Object) */
3049 void VIRTUAL_hash_collection__HashMapValues__init(val
* self
) {
3050 { /* Inline hash_collection#HashMapValues#init (self) on <self:Object(HashMapValues[Object, nullable Object])> */
3052 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__init
]))(self
) /* init on <self:Object(HashMapValues[Object, nullable Object])>*/;
3058 /* method hash_collection#HashMapNode#init for (self: HashMapNode[Object, nullable Object], Object, nullable Object) */
3059 void hash_collection__HashMapNode__init(val
* self
, val
* p0
, val
* p1
) {
3060 short int var
/* : Bool */;
3063 const struct type
* type_struct
;
3064 const char* var_class_name
;
3065 short int var1
/* : Bool */;
3068 const struct type
* type_struct4
;
3069 short int is_nullable
;
3070 const char* var_class_name5
;
3071 val
* var_k
/* var k: Object */;
3072 val
* var_v
/* var v: nullable Object */;
3073 /* Covariant cast for argument 0 (k) <p0:Object> isa K */
3074 /* <p0:Object> isa K */
3075 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapNode_FT0
];
3076 cltype
= type_struct
->color
;
3077 idtype
= type_struct
->id
;
3078 if(cltype
>= p0
->type
->table_size
) {
3081 var
= p0
->type
->type_table
[cltype
] == idtype
;
3083 if (unlikely(!var
)) {
3084 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3085 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name
);
3086 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 350);
3089 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa V */
3090 /* <p1:nullable Object> isa V */
3091 type_struct4
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapNode_FT1
];
3092 cltype2
= type_struct4
->color
;
3093 idtype3
= type_struct4
->id
;
3094 is_nullable
= type_struct4
->is_nullable
;
3098 if(cltype2
>= p1
->type
->table_size
) {
3101 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
3104 if (unlikely(!var1
)) {
3105 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
3106 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "V", var_class_name5
);
3107 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 350);
3113 hash_collection__HashNode__init(self
, var_k
); /* Direct call hash_collection#HashNode#init on <self:HashMapNode[Object, nullable Object]>*/
3115 self
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
= var_v
; /* _value on <self:HashMapNode[Object, nullable Object]> */
3118 /* method hash_collection#HashMapNode#init for (self: Object, Object, nullable Object) */
3119 void VIRTUAL_hash_collection__HashMapNode__init(val
* self
, val
* p0
, val
* p1
) {
3120 hash_collection__HashMapNode__init(self
, p0
, p1
); /* Direct call hash_collection#HashMapNode#init on <self:Object(HashMapNode[Object, nullable Object])>*/
3123 /* method hash_collection#HashMapIterator#is_ok for (self: HashMapIterator[Object, nullable Object]): Bool */
3124 short int hash_collection__HashMapIterator__is_ok(val
* self
) {
3125 short int var
/* : Bool */;
3126 val
* var1
/* : nullable HashMapNode[Object, nullable Object] */;
3127 val
* var2
/* : null */;
3128 short int var3
/* : Bool */;
3129 short int var4
/* : Bool */;
3130 val
* var_other
/* var other: nullable Object */;
3131 short int var6
/* : Bool */;
3132 short int var7
/* : Bool */;
3133 short int var8
/* : Bool */;
3134 var1
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
3137 var3
= 0; /* is null */
3139 var3
= 1; /* arg is null and recv is not */
3142 { /* Inline kernel#Object#!= (var1,var2) on <var1:nullable HashMapNode[Object, nullable Object]> */
3145 var7
= ((short int (*)(val
*, val
*))(var1
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var1
, var_other
) /* == on <var1:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])>*/;
3160 /* method hash_collection#HashMapIterator#is_ok for (self: Object): Bool */
3161 short int VIRTUAL_hash_collection__HashMapIterator__is_ok(val
* self
) {
3162 short int var
/* : Bool */;
3163 short int var1
/* : Bool */;
3164 var1
= hash_collection__HashMapIterator__is_ok(self
);
3169 /* method hash_collection#HashMapIterator#item for (self: HashMapIterator[Object, nullable Object]): nullable Object */
3170 val
* hash_collection__HashMapIterator__item(val
* self
) {
3171 val
* var
/* : nullable Object */;
3172 short int var1
/* : Bool */;
3173 val
* var2
/* : nullable HashMapNode[Object, nullable Object] */;
3174 val
* var3
/* : nullable Object */;
3176 var1
= hash_collection__HashMapIterator__is_ok(self
);
3178 if (unlikely(!var1
)) {
3179 PRINT_ERROR("Runtime error: %s", "Assert failed");
3180 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 363);
3183 var2
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
3184 if (unlikely(var2
== NULL
)) {
3185 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3186 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 364);
3189 var3
= var2
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var2:nullable HashMapNode[Object, nullable Object]> */
3195 /* method hash_collection#HashMapIterator#item for (self: Object): nullable Object */
3196 val
* VIRTUAL_hash_collection__HashMapIterator__item(val
* self
) {
3197 val
* var
/* : nullable Object */;
3198 val
* var1
/* : nullable Object */;
3199 var1
= hash_collection__HashMapIterator__item(self
);
3204 /* method hash_collection#HashMapIterator#key for (self: HashMapIterator[Object, nullable Object]): Object */
3205 val
* hash_collection__HashMapIterator__key(val
* self
) {
3206 val
* var
/* : Object */;
3207 short int var1
/* : Bool */;
3208 val
* var2
/* : nullable HashMapNode[Object, nullable Object] */;
3209 val
* var3
/* : Object */;
3211 var1
= hash_collection__HashMapIterator__is_ok(self
);
3213 if (unlikely(!var1
)) {
3214 PRINT_ERROR("Runtime error: %s", "Assert failed");
3215 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 375);
3218 var2
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
3219 if (unlikely(var2
== NULL
)) {
3220 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3221 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 376);
3224 var3
= var2
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashMapNode[Object, nullable Object]> */
3225 if (unlikely(var3
== NULL
)) {
3226 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
3227 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 376);
3235 /* method hash_collection#HashMapIterator#key for (self: Object): Object */
3236 val
* VIRTUAL_hash_collection__HashMapIterator__key(val
* self
) {
3237 val
* var
/* : Object */;
3238 val
* var1
/* : Object */;
3239 var1
= hash_collection__HashMapIterator__key(self
);
3244 /* method hash_collection#HashMapIterator#next for (self: HashMapIterator[Object, nullable Object]) */
3245 void hash_collection__HashMapIterator__next(val
* self
) {
3246 short int var
/* : Bool */;
3247 val
* var1
/* : nullable HashMapNode[Object, nullable Object] */;
3248 val
* var2
/* : nullable HashNode[Object] */;
3250 var
= hash_collection__HashMapIterator__is_ok(self
);
3252 if (unlikely(!var
)) {
3253 PRINT_ERROR("Runtime error: %s", "Assert failed");
3254 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 381);
3257 var1
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
3258 if (unlikely(var1
== NULL
)) {
3259 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3260 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 382);
3263 var2
= var1
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var1:nullable HashMapNode[Object, nullable Object]> */
3264 self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
= var2
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
3267 /* method hash_collection#HashMapIterator#next for (self: Object) */
3268 void VIRTUAL_hash_collection__HashMapIterator__next(val
* self
) {
3269 hash_collection__HashMapIterator__next(self
); /* Direct call hash_collection#HashMapIterator#next on <self:Object(HashMapIterator[Object, nullable Object])>*/
3272 /* method hash_collection#HashMapIterator#init for (self: HashMapIterator[Object, nullable Object], HashMap[Object, nullable Object]) */
3273 void hash_collection__HashMapIterator__init(val
* self
, val
* p0
) {
3274 short int var
/* : Bool */;
3277 const struct type
* type_struct
;
3278 const char* var_class_name
;
3279 val
* var_map
/* var map: HashMap[Object, nullable Object] */;
3280 val
* var1
/* : nullable HashNode[Object] */;
3281 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[K, V] */
3282 /* <p0:HashMap[Object, nullable Object]> isa HashMap[K, V] */
3283 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapIterator_FT0hash_collection__HashMapIterator_FT1
];
3284 cltype
= type_struct
->color
;
3285 idtype
= type_struct
->id
;
3286 if(cltype
>= p0
->type
->table_size
) {
3289 var
= p0
->type
->type_table
[cltype
] == idtype
;
3291 if (unlikely(!var
)) {
3292 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3293 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[K, V]", var_class_name
);
3294 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 391);
3298 self
->attrs
[COLOR_hash_collection__HashMapIterator___map
].val
= var_map
; /* _map on <self:HashMapIterator[Object, nullable Object]> */
3299 var1
= var_map
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_map:HashMap[Object, nullable Object]> */
3300 self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
= var1
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
3303 /* method hash_collection#HashMapIterator#init for (self: Object, HashMap[Object, nullable Object]) */
3304 void VIRTUAL_hash_collection__HashMapIterator__init(val
* self
, val
* p0
) {
3305 hash_collection__HashMapIterator__init(self
, p0
); /* Direct call hash_collection#HashMapIterator#init on <self:Object(HashMapIterator[Object, nullable Object])>*/
3308 /* method hash_collection#HashSet#length for (self: HashSet[Object]): Int */
3309 long hash_collection__HashSet__length(val
* self
) {
3310 long var
/* : Int */;
3311 long var1
/* : Int */;
3312 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashSet[Object]> */
3318 /* method hash_collection#HashSet#length for (self: Object): Int */
3319 long VIRTUAL_hash_collection__HashSet__length(val
* self
) {
3320 long var
/* : Int */;
3321 long var1
/* : Int */;
3322 var1
= hash_collection__HashSet__length(self
);
3327 /* method hash_collection#HashSet#is_empty for (self: HashSet[Object]): Bool */
3328 short int hash_collection__HashSet__is_empty(val
* self
) {
3329 short int var
/* : Bool */;
3330 long var1
/* : Int */;
3331 long var2
/* : Int */;
3332 short int var3
/* : Bool */;
3333 short int var4
/* : Bool */;
3334 short int var6
/* : Bool */;
3335 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashSet[Object]> */
3338 { /* Inline kernel#Int#== (var1,var2) on <var1:Int> */
3339 var6
= var1
== var2
;
3351 /* method hash_collection#HashSet#is_empty for (self: Object): Bool */
3352 short int VIRTUAL_hash_collection__HashSet__is_empty(val
* self
) {
3353 short int var
/* : Bool */;
3354 short int var1
/* : Bool */;
3355 var1
= hash_collection__HashSet__is_empty(self
);
3360 /* method hash_collection#HashSet#first for (self: HashSet[Object]): Object */
3361 val
* hash_collection__HashSet__first(val
* self
) {
3362 val
* var
/* : Object */;
3363 long var1
/* : Int */;
3364 long var2
/* : Int */;
3365 short int var3
/* : Bool */;
3366 short int var5
/* : Bool */;
3369 const char* var_class_name
;
3370 short int var6
/* : Bool */;
3371 val
* var7
/* : nullable HashNode[Object] */;
3372 val
* var8
/* : Object */;
3373 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
; /* _the_length on <self:HashSet[Object]> */
3376 { /* Inline kernel#Int#> (var1,var2) on <var1:Int> */
3377 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
3378 /* <var2:Int> isa OTHER */
3379 var5
= 1; /* easy <var2:Int> isa OTHER*/
3380 if (unlikely(!var5
)) {
3381 var_class_name
= type_kernel__Int
.name
;
3382 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
3383 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/kernel.nit", 373);
3392 if (unlikely(!var3
)) {
3393 PRINT_ERROR("Runtime error: %s", "Assert failed");
3394 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 410);
3397 var7
= self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashSet[Object]> */
3398 if (unlikely(var7
== NULL
)) {
3399 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3400 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 411);
3403 var8
= var7
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var7:nullable HashNode[Object](nullable HashSetNode[Object])> */
3404 if (unlikely(var8
== NULL
)) {
3405 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
3406 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 411);
3414 /* method hash_collection#HashSet#first for (self: Object): nullable Object */
3415 val
* VIRTUAL_hash_collection__HashSet__first(val
* self
) {
3416 val
* var
/* : nullable Object */;
3417 val
* var1
/* : Object */;
3418 var1
= hash_collection__HashSet__first(self
);
3423 /* method hash_collection#HashSet#has for (self: HashSet[Object], Object): Bool */
3424 short int hash_collection__HashSet__has(val
* self
, val
* p0
) {
3425 short int var
/* : Bool */;
3426 short int var1
/* : Bool */;
3429 const struct type
* type_struct
;
3430 const char* var_class_name
;
3431 val
* var_item
/* var item: Object */;
3432 val
* var2
/* : nullable HashNode[Object] */;
3433 val
* var3
/* : null */;
3434 short int var4
/* : Bool */;
3435 short int var5
/* : Bool */;
3436 val
* var_other
/* var other: nullable Object */;
3437 short int var7
/* : Bool */;
3438 short int var8
/* : Bool */;
3439 short int var9
/* : Bool */;
3440 /* Covariant cast for argument 0 (item) <p0:Object> isa E */
3441 /* <p0:Object> isa E */
3442 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
3443 cltype
= type_struct
->color
;
3444 idtype
= type_struct
->id
;
3445 if(cltype
>= p0
->type
->table_size
) {
3448 var1
= p0
->type
->type_table
[cltype
] == idtype
;
3450 if (unlikely(!var1
)) {
3451 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3452 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
3453 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 414);
3458 var2
= hash_collection__HashCollection__node_at(self
, var_item
);
3462 var4
= 0; /* is null */
3464 var4
= 1; /* arg is null and recv is not */
3467 { /* Inline kernel#Object#!= (var2,var3) on <var2:nullable HashNode[Object](nullable HashSetNode[Object])> */
3470 var8
= ((short int (*)(val
*, val
*))(var2
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var2
, var_other
) /* == on <var2:nullable HashSetNode[Object](HashSetNode[Object])>*/;
3485 /* method hash_collection#HashSet#has for (self: Object, nullable Object): Bool */
3486 short int VIRTUAL_hash_collection__HashSet__has(val
* self
, val
* p0
) {
3487 short int var
/* : Bool */;
3488 short int var1
/* : Bool */;
3489 var1
= hash_collection__HashSet__has(self
, p0
);
3494 /* method hash_collection#HashSet#add for (self: HashSet[Object], Object) */
3495 void hash_collection__HashSet__add(val
* self
, val
* p0
) {
3496 short int var
/* : Bool */;
3499 const struct type
* type_struct
;
3500 const char* var_class_name
;
3501 val
* var_item
/* var item: Object */;
3502 long var1
/* : Int */;
3503 long var_i
/* var i: Int */;
3504 val
* var2
/* : nullable HashNode[Object] */;
3505 val
* var_c
/* var c: nullable HashSetNode[Object] */;
3506 val
* var3
/* : null */;
3507 short int var4
/* : Bool */;
3508 short int var5
/* : Bool */;
3509 val
* var_other
/* var other: nullable Object */;
3510 short int var7
/* : Bool */;
3511 short int var8
/* : Bool */;
3512 short int var9
/* : Bool */;
3513 val
* var10
/* : HashSetNode[Object] */;
3514 /* Covariant cast for argument 0 (item) <p0:Object> isa E */
3515 /* <p0:Object> isa E */
3516 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SimpleCollection_FT0
];
3517 cltype
= type_struct
->color
;
3518 idtype
= type_struct
->id
;
3519 if(cltype
>= p0
->type
->table_size
) {
3522 var
= p0
->type
->type_table
[cltype
] == idtype
;
3524 if (unlikely(!var
)) {
3525 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3526 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
3527 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 419);
3532 var1
= hash_collection__HashCollection__index_at(self
, var_item
);
3536 var2
= hash_collection__HashCollection__node_at_idx(self
, var_i
, var_item
);
3540 if (var_c
== NULL
) {
3541 var4
= 0; /* is null */
3543 var4
= 1; /* arg is null and recv is not */
3546 { /* Inline kernel#Object#!= (var_c,var3) on <var_c:nullable HashSetNode[Object]> */
3549 var8
= ((short int (*)(val
*, val
*))(var_c
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_c
, var_other
) /* == on <var_c:nullable HashSetNode[Object](HashSetNode[Object])>*/;
3560 var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_item
; /* _key on <var_c:nullable HashSetNode[Object](HashSetNode[Object])> */
3562 var10
= NEW_hash_collection__HashSetNode(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSetNodehash_collection__HashSet_FT0
]);
3564 hash_collection__HashSetNode__init(var10
, var_item
); /* Direct call hash_collection#HashSetNode#init on <var10:HashSetNode[Object]>*/
3567 hash_collection__HashCollection__store(self
, var_i
, var10
); /* Direct call hash_collection#HashCollection#store on <self:HashSet[Object]>*/
3572 /* method hash_collection#HashSet#add for (self: Object, nullable Object) */
3573 void VIRTUAL_hash_collection__HashSet__add(val
* self
, val
* p0
) {
3574 hash_collection__HashSet__add(self
, p0
); /* Direct call hash_collection#HashSet#add on <self:Object(HashSet[Object])>*/
3577 /* method hash_collection#HashSet#remove for (self: HashSet[Object], Object) */
3578 void hash_collection__HashSet__remove(val
* self
, val
* p0
) {
3579 short int var
/* : Bool */;
3582 const struct type
* type_struct
;
3583 const char* var_class_name
;
3584 val
* var_item
/* var item: Object */;
3585 /* Covariant cast for argument 0 (item) <p0:Object> isa E */
3586 /* <p0:Object> isa E */
3587 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
3588 cltype
= type_struct
->color
;
3589 idtype
= type_struct
->id
;
3590 if(cltype
>= p0
->type
->table_size
) {
3593 var
= p0
->type
->type_table
[cltype
] == idtype
;
3595 if (unlikely(!var
)) {
3596 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3597 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
3598 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 430);
3603 hash_collection__HashCollection__remove_node(self
, var_item
); /* Direct call hash_collection#HashCollection#remove_node on <self:HashSet[Object]>*/
3607 /* method hash_collection#HashSet#remove for (self: Object, nullable Object) */
3608 void VIRTUAL_hash_collection__HashSet__remove(val
* self
, val
* p0
) {
3609 hash_collection__HashSet__remove(self
, p0
); /* Direct call hash_collection#HashSet#remove on <self:Object(HashSet[Object])>*/
3612 /* method hash_collection#HashSet#clear for (self: HashSet[Object]) */
3613 void hash_collection__HashSet__clear(val
* self
) {
3615 hash_collection__HashCollection__raz(self
); /* Direct call hash_collection#HashCollection#raz on <self:HashSet[Object]>*/
3619 /* method hash_collection#HashSet#clear for (self: Object) */
3620 void VIRTUAL_hash_collection__HashSet__clear(val
* self
) {
3621 hash_collection__HashSet__clear(self
); /* Direct call hash_collection#HashSet#clear on <self:Object(HashSet[Object])>*/
3624 /* method hash_collection#HashSet#iterator for (self: HashSet[Object]): Iterator[Object] */
3625 val
* hash_collection__HashSet__iterator(val
* self
) {
3626 val
* var
/* : Iterator[Object] */;
3627 val
* var1
/* : HashSetIterator[Object] */;
3628 var1
= NEW_hash_collection__HashSetIterator(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSetIteratorhash_collection__HashSet_FT0
]);
3630 hash_collection__HashSetIterator__init(var1
, self
); /* Direct call hash_collection#HashSetIterator#init on <var1:HashSetIterator[Object]>*/
3637 /* method hash_collection#HashSet#iterator for (self: Object): Iterator[nullable Object] */
3638 val
* VIRTUAL_hash_collection__HashSet__iterator(val
* self
) {
3639 val
* var
/* : Iterator[nullable Object] */;
3640 val
* var1
/* : Iterator[Object] */;
3641 var1
= hash_collection__HashSet__iterator(self
);
3646 /* method hash_collection#HashSet#init for (self: HashSet[Object]) */
3647 void hash_collection__HashSet__init(val
* self
) {
3648 long var
/* : Int */;
3649 long var1
/* : Int */;
3650 long var2
/* : Int */;
3652 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashSet__init
]))(self
) /* init on <self:HashSet[Object]>*/;
3655 self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
= var
; /* _capacity on <self:HashSet[Object]> */
3657 self
->attrs
[COLOR_hash_collection__HashCollection___the_length
].l
= var1
; /* _the_length on <self:HashSet[Object]> */
3660 hash_collection__HashCollection__enlarge(self
, var2
); /* Direct call hash_collection#HashCollection#enlarge on <self:HashSet[Object]>*/
3664 /* method hash_collection#HashSet#init for (self: Object) */
3665 void VIRTUAL_hash_collection__HashSet__init(val
* self
) {
3666 hash_collection__HashSet__init(self
); /* Direct call hash_collection#HashSet#init on <self:Object(HashSet[Object])>*/
3669 /* method hash_collection#HashSet#from for (self: HashSet[Object], Collection[Object]) */
3670 void hash_collection__HashSet__from(val
* self
, val
* p0
) {
3671 short int var
/* : Bool */;
3674 const struct type
* type_struct
;
3675 const char* var_class_name
;
3676 val
* var_coll
/* var coll: Collection[Object] */;
3677 /* Covariant cast for argument 0 (coll) <p0:Collection[Object]> isa Collection[E] */
3678 /* <p0:Collection[Object]> isa Collection[E] */
3679 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionhash_collection__HashSet_FT0
];
3680 cltype
= type_struct
->color
;
3681 idtype
= type_struct
->id
;
3682 if(cltype
>= p0
->type
->table_size
) {
3685 var
= p0
->type
->type_table
[cltype
] == idtype
;
3687 if (unlikely(!var
)) {
3688 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3689 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name
);
3690 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 443);
3695 ((void (*)(val
*))(self
->class->vft
[COLOR_kernel__Object__init
]))(self
) /* init on <self:HashSet[Object]>*/;
3698 abstract_collection__SimpleCollection__add_all(self
, var_coll
); /* Direct call abstract_collection#SimpleCollection#add_all on <self:HashSet[Object]>*/
3702 /* method hash_collection#HashSet#from for (self: Object, Collection[Object]) */
3703 void VIRTUAL_hash_collection__HashSet__from(val
* self
, val
* p0
) {
3704 hash_collection__HashSet__from(self
, p0
); /* Direct call hash_collection#HashSet#from on <self:Object(HashSet[Object])>*/
3707 /* method hash_collection#HashSetNode#init for (self: HashSetNode[Object], Object) */
3708 void hash_collection__HashSetNode__init(val
* self
, val
* p0
) {
3709 short int var
/* : Bool */;
3712 const struct type
* type_struct
;
3713 const char* var_class_name
;
3714 val
* var_e
/* var e: Object */;
3715 /* Covariant cast for argument 0 (e) <p0:Object> isa E */
3716 /* <p0:Object> isa E */
3717 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSetNode_FT0
];
3718 cltype
= type_struct
->color
;
3719 idtype
= type_struct
->id
;
3720 if(cltype
>= p0
->type
->table_size
) {
3723 var
= p0
->type
->type_table
[cltype
] == idtype
;
3725 if (unlikely(!var
)) {
3726 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3727 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name
);
3728 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 456);
3732 hash_collection__HashNode__init(self
, p0
); /* Direct call hash_collection#HashNode#init on <self:HashSetNode[Object]>*/
3735 self
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_e
; /* _key on <self:HashSetNode[Object]> */
3738 /* method hash_collection#HashSetNode#init for (self: Object, Object) */
3739 void VIRTUAL_hash_collection__HashSetNode__init(val
* self
, val
* p0
) {
3740 hash_collection__HashSetNode__init(self
, p0
); /* Direct call hash_collection#HashSetNode#init on <self:Object(HashSetNode[Object])>*/
3743 /* method hash_collection#HashSetIterator#is_ok for (self: HashSetIterator[Object]): Bool */
3744 short int hash_collection__HashSetIterator__is_ok(val
* self
) {
3745 short int var
/* : Bool */;
3746 val
* var1
/* : nullable HashSetNode[Object] */;
3747 val
* var2
/* : null */;
3748 short int var3
/* : Bool */;
3749 short int var4
/* : Bool */;
3750 val
* var_other
/* var other: nullable Object */;
3751 short int var6
/* : Bool */;
3752 short int var7
/* : Bool */;
3753 short int var8
/* : Bool */;
3754 var1
= self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[Object]> */
3757 var3
= 0; /* is null */
3759 var3
= 1; /* arg is null and recv is not */
3762 { /* Inline kernel#Object#!= (var1,var2) on <var1:nullable HashSetNode[Object]> */
3765 var7
= ((short int (*)(val
*, val
*))(var1
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var1
, var_other
) /* == on <var1:nullable HashSetNode[Object](HashSetNode[Object])>*/;
3780 /* method hash_collection#HashSetIterator#is_ok for (self: Object): Bool */
3781 short int VIRTUAL_hash_collection__HashSetIterator__is_ok(val
* self
) {
3782 short int var
/* : Bool */;
3783 short int var1
/* : Bool */;
3784 var1
= hash_collection__HashSetIterator__is_ok(self
);
3789 /* method hash_collection#HashSetIterator#item for (self: HashSetIterator[Object]): Object */
3790 val
* hash_collection__HashSetIterator__item(val
* self
) {
3791 val
* var
/* : Object */;
3792 short int var1
/* : Bool */;
3793 val
* var2
/* : nullable HashSetNode[Object] */;
3794 val
* var3
/* : Object */;
3796 var1
= hash_collection__HashSetIterator__is_ok(self
);
3798 if (unlikely(!var1
)) {
3799 PRINT_ERROR("Runtime error: %s", "Assert failed");
3800 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 468);
3803 var2
= self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[Object]> */
3804 if (unlikely(var2
== NULL
)) {
3805 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3806 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 469);
3809 var3
= var2
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashSetNode[Object]> */
3810 if (unlikely(var3
== NULL
)) {
3811 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
3812 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 469);
3820 /* method hash_collection#HashSetIterator#item for (self: Object): nullable Object */
3821 val
* VIRTUAL_hash_collection__HashSetIterator__item(val
* self
) {
3822 val
* var
/* : nullable Object */;
3823 val
* var1
/* : Object */;
3824 var1
= hash_collection__HashSetIterator__item(self
);
3829 /* method hash_collection#HashSetIterator#next for (self: HashSetIterator[Object]) */
3830 void hash_collection__HashSetIterator__next(val
* self
) {
3831 short int var
/* : Bool */;
3832 val
* var1
/* : nullable HashSetNode[Object] */;
3833 val
* var2
/* : nullable HashNode[Object] */;
3835 var
= hash_collection__HashSetIterator__is_ok(self
);
3837 if (unlikely(!var
)) {
3838 PRINT_ERROR("Runtime error: %s", "Assert failed");
3839 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 474);
3842 var1
= self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[Object]> */
3843 if (unlikely(var1
== NULL
)) {
3844 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3845 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 475);
3848 var2
= var1
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var1:nullable HashSetNode[Object]> */
3849 self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
= var2
; /* _node on <self:HashSetIterator[Object]> */
3852 /* method hash_collection#HashSetIterator#next for (self: Object) */
3853 void VIRTUAL_hash_collection__HashSetIterator__next(val
* self
) {
3854 hash_collection__HashSetIterator__next(self
); /* Direct call hash_collection#HashSetIterator#next on <self:Object(HashSetIterator[Object])>*/
3857 /* method hash_collection#HashSetIterator#init for (self: HashSetIterator[Object], HashSet[Object]) */
3858 void hash_collection__HashSetIterator__init(val
* self
, val
* p0
) {
3859 short int var
/* : Bool */;
3862 const struct type
* type_struct
;
3863 const char* var_class_name
;
3864 val
* var_set
/* var set: HashSet[Object] */;
3865 val
* var1
/* : nullable HashNode[Object] */;
3866 /* Covariant cast for argument 0 (set) <p0:HashSet[Object]> isa HashSet[E] */
3867 /* <p0:HashSet[Object]> isa HashSet[E] */
3868 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSethash_collection__HashSetIterator_FT0
];
3869 cltype
= type_struct
->color
;
3870 idtype
= type_struct
->id
;
3871 if(cltype
>= p0
->type
->table_size
) {
3874 var
= p0
->type
->type_table
[cltype
] == idtype
;
3876 if (unlikely(!var
)) {
3877 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3878 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSet[E]", var_class_name
);
3879 PRINT_ERROR(" (%s:%d)\n", "../lib/standard/collection/hash_collection.nit", 484);
3883 self
->attrs
[COLOR_hash_collection__HashSetIterator___set
].val
= var_set
; /* _set on <self:HashSetIterator[Object]> */
3884 var1
= var_set
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_set:HashSet[Object]> */
3885 self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
= var1
; /* _node on <self:HashSetIterator[Object]> */
3888 /* method hash_collection#HashSetIterator#init for (self: Object, HashSet[Object]) */
3889 void VIRTUAL_hash_collection__HashSetIterator__init(val
* self
, val
* p0
) {
3890 hash_collection__HashSetIterator__init(self
, p0
); /* Direct call hash_collection#HashSetIterator#init on <self:Object(HashSetIterator[Object])>*/