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 HashCollection#0 */
26 /* <p0:Object> isa HashCollection#0 */
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`", "HashCollection#0", 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", 325);
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 HashCollection#0 */
116 /* <p0:Object> isa HashCollection#0 */
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`", "HashCollection#0", 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_kernel__Pointer
*)var_k
)->value
== ((struct instance_kernel__Pointer
*)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 HashCollection#0 */
206 /* <p1:Object> isa HashCollection#0 */
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`", "HashCollection#0", 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_kernel__Pointer
*)var_ck
)->value
== ((struct instance_kernel__Pointer
*)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 HashCollection#1 */
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 HashCollection#1", var_class_name25
);
305 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 64);
309 CONTINUE_label
: (void)0;
311 BREAK_label
: (void)0;
317 /* method hash_collection#HashCollection#node_at_idx for (self: Object, Int, Object): nullable HashNode[Object] */
318 val
* VIRTUAL_hash_collection__HashCollection__node_at_idx(val
* self
, long p0
, val
* p1
) {
319 val
* var
/* : nullable HashNode[Object] */;
320 val
* var1
/* : nullable HashNode[Object] */;
321 var1
= hash_collection__HashCollection__node_at_idx(self
, p0
, p1
);
326 /* method hash_collection#HashCollection#store for (self: HashCollection[Object, HashNode[Object]], Int, HashNode[Object]) */
327 void hash_collection__HashCollection__store(val
* self
, long p0
, val
* p1
) {
328 short int var
/* : Bool */;
331 const struct type
* type_struct
;
332 const char* var_class_name
;
333 long var_index
/* var index: Int */;
334 val
* var_node
/* var node: HashNode[Object] */;
335 val
* var1
/* : nullable HashNode[Object] */;
336 val
* var2
/* : null */;
337 short int var3
/* : Bool */;
338 short int var4
/* : Bool */;
339 val
* var_other
/* var other: nullable Object */;
340 short int var6
/* : Bool */;
341 short int var8
/* : Bool */;
342 val
* var9
/* : nullable HashNode[Object] */;
343 val
* var10
/* : nullable HashNode[Object] */;
344 val
* var11
/* : null */;
345 val
* var12
/* : nullable NativeArray[nullable HashNode[Object]] */;
346 val
* var13
/* : nullable Object */;
347 val
* var15
/* : nullable HashNode[Object] */;
348 val
* var_next
/* var next: nullable HashNode[Object] */;
349 val
* var16
/* : nullable NativeArray[nullable HashNode[Object]] */;
350 short int var18
/* : Bool */;
353 const struct type
* type_struct21
;
354 const char* var_class_name22
;
355 val
* var23
/* : null */;
356 short int var24
/* : Bool */;
357 short int var25
/* : Bool */;
358 val
* var_other27
/* var other: nullable Object */;
359 short int var28
/* : Bool */;
360 short int var29
/* : Bool */;
361 short int var30
/* : Bool */;
362 val
* var31
/* : Object */;
363 short int var32
/* : Bool */;
366 const struct type
* type_struct35
;
367 const char* var_class_name36
;
368 long var37
/* : Int */;
369 long var_l
/* var l: Int */;
370 long var38
/* : Int */;
371 long var39
/* : Int */;
372 short int var41
/* : Bool */;
375 const char* var_class_name44
;
376 long var45
/* : Int */;
377 long var46
/* : Int */;
378 long var47
/* : Int */;
379 short int var49
/* : Bool */;
382 const char* var_class_name52
;
383 long var53
/* : Int */;
384 long var54
/* : Int */;
385 long var55
/* : Int */;
386 short int var57
/* : Bool */;
389 const char* var_class_name60
;
390 long var61
/* : Int */;
391 long var62
/* : Int */;
392 long var63
/* : Int */;
393 short int var65
/* : Bool */;
396 const char* var_class_name68
;
397 long var69
/* : Int */;
398 long var70
/* : Int */;
399 short int var71
/* : Bool */;
400 short int var73
/* : Bool */;
403 const char* var_class_name76
;
404 short int var77
/* : Bool */;
405 long var78
/* : Int */;
406 long var79
/* : Int */;
407 short int var81
/* : Bool */;
410 const char* var_class_name84
;
411 long var85
/* : Int */;
412 /* Covariant cast for argument 1 (node) <p1:HashNode[Object]> isa HashCollection#1 */
413 /* <p1:HashNode[Object]> isa HashCollection#1 */
414 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT1
];
415 cltype
= type_struct
->color
;
416 idtype
= type_struct
->id
;
417 if(cltype
>= p1
->type
->table_size
) {
420 var
= p1
->type
->type_table
[cltype
] == idtype
;
422 if (unlikely(!var
)) {
423 var_class_name
= p1
== NULL ?
"null" : p1
->type
->name
;
424 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashCollection#1", var_class_name
);
425 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 69);
430 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
433 var3
= 1; /* is null */
435 var3
= 0; /* arg is null but recv is not */
438 { /* Inline kernel#Object#== (var1,var2) on <var1:nullable HashNode[Object]> */
441 { /* Inline kernel#Object#is_same_instance (var1,var_other) on <var1:nullable HashNode[Object](HashNode[Object])> */
442 var8
= var1
== var_other
;
455 self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
= var_node
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
457 var9
= self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
458 if (unlikely(var9
== NULL
)) {
459 PRINT_ERROR("Runtime error: %s", "Receiver is null");
460 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 76);
463 var9
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
= var_node
; /* _next_item on <var9:nullable HashNode[Object]> */
465 var10
= self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
466 var_node
->attrs
[COLOR_hash_collection__HashNode___prev_item
].val
= var10
; /* _prev_item on <var_node:HashNode[Object]> */
468 var_node
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
= var11
; /* _next_item on <var_node:HashNode[Object]> */
469 self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
= var_node
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
470 var12
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
472 PRINT_ERROR("Runtime error: %s", "Receiver is null");
473 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 83);
476 { /* Inline array#NativeArray#[] (var12,var_index) on <var12:nullable NativeArray[nullable HashNode[Object]]> */
477 var15
= ((struct instance_array__NativeArray
*)var12
)->values
[var_index
];
484 var16
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
486 PRINT_ERROR("Runtime error: %s", "Receiver is null");
487 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 84);
490 { /* Inline array#NativeArray#[]= (var16,var_index,var_node) on <var16:nullable NativeArray[nullable HashNode[Object]]> */
491 /* Covariant cast for argument 1 (item) <var_node:HashNode[Object]> isa NativeArray#0 */
492 /* <var_node:HashNode[Object]> isa NativeArray#0 */
493 type_struct21
= var16
->type
->resolution_table
->types
[COLOR_array__NativeArray_FT0
];
494 cltype19
= type_struct21
->color
;
495 idtype20
= type_struct21
->id
;
496 if(cltype19
>= var_node
->type
->table_size
) {
499 var18
= var_node
->type
->type_table
[cltype19
] == idtype20
;
501 if (unlikely(!var18
)) {
502 var_class_name22
= var_node
== NULL ?
"null" : var_node
->type
->name
;
503 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "NativeArray#0", var_class_name22
);
504 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/array.nit", 662);
507 ((struct instance_array__NativeArray
*)var16
)->values
[var_index
]=var_node
;
511 var_node
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_node:HashNode[Object]> */
513 if (var_next
== NULL
) {
514 var24
= 0; /* is null */
516 var24
= 1; /* arg is null and recv is not */
519 { /* Inline kernel#Object#!= (var_next,var23) on <var_next:nullable HashNode[Object]> */
522 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])>*/;
533 var_next
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
= var_node
; /* _prev_in_bucklet on <var_next:nullable HashNode[Object](HashNode[Object])> */
536 var31
= var_node
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_node:HashNode[Object]> */
537 if (unlikely(var31
== NULL
)) {
538 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
539 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 88);
542 /* <var31:Object> isa nullable HashCollection#0 */
543 type_struct35
= self
->type
->resolution_table
->types
[COLOR_nullable_hash_collection__HashCollection_FT0
];
544 cltype33
= type_struct35
->color
;
545 idtype34
= type_struct35
->id
;
546 if(cltype33
>= var31
->type
->table_size
) {
549 var32
= var31
->type
->type_table
[cltype33
] == idtype34
;
551 if (unlikely(!var32
)) {
552 var_class_name36
= var31
== NULL ?
"null" : var31
->type
->name
;
553 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable HashCollection#0", var_class_name36
);
554 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 88);
557 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var31
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
558 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_node
].val
= var_node
; /* _last_accessed_node on <self:HashCollection[Object, HashNode[Object]]> */
559 var37
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashCollection[Object, HashNode[Object]]> */
563 { /* Inline kernel#Int#+ (var_l,var38) on <var_l:Int> */
564 /* Covariant cast for argument 0 (i) <var38:Int> isa OTHER */
565 /* <var38:Int> isa OTHER */
566 var41
= 1; /* easy <var38:Int> isa OTHER*/
567 if (unlikely(!var41
)) {
568 var_class_name44
= type_kernel__Int
.name
;
569 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name44
);
570 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
573 var45
= var_l
+ var38
;
579 self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
= var39
; /* _length on <self:HashCollection[Object, HashNode[Object]]> */
582 { /* Inline kernel#Int#+ (var_l,var46) on <var_l:Int> */
583 /* Covariant cast for argument 0 (i) <var46:Int> isa OTHER */
584 /* <var46:Int> isa OTHER */
585 var49
= 1; /* easy <var46:Int> isa OTHER*/
586 if (unlikely(!var49
)) {
587 var_class_name52
= type_kernel__Int
.name
;
588 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name52
);
589 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
592 var53
= var_l
+ var46
;
600 { /* Inline kernel#Int#* (var47,var54) on <var47:Int> */
601 /* Covariant cast for argument 0 (i) <var54:Int> isa OTHER */
602 /* <var54:Int> isa OTHER */
603 var57
= 1; /* easy <var54:Int> isa OTHER*/
604 if (unlikely(!var57
)) {
605 var_class_name60
= type_kernel__Int
.name
;
606 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name60
);
607 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 332);
610 var61
= var47
* var54
;
618 { /* Inline kernel#Int#/ (var55,var62) on <var55:Int> */
619 /* Covariant cast for argument 0 (i) <var62:Int> isa OTHER */
620 /* <var62:Int> isa OTHER */
621 var65
= 1; /* easy <var62:Int> isa OTHER*/
622 if (unlikely(!var65
)) {
623 var_class_name68
= type_kernel__Int
.name
;
624 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name68
);
625 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 333);
628 var69
= var55
/ var62
;
635 var70
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
637 { /* Inline kernel#Int#>= (var_l,var70) on <var_l:Int> */
638 /* Covariant cast for argument 0 (i) <var70:Int> isa OTHER */
639 /* <var70:Int> isa OTHER */
640 var73
= 1; /* easy <var70:Int> isa OTHER*/
641 if (unlikely(!var73
)) {
642 var_class_name76
= type_kernel__Int
.name
;
643 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name76
);
644 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 326);
647 var77
= var_l
>= var70
;
656 { /* Inline kernel#Int#* (var_l,var78) on <var_l:Int> */
657 /* Covariant cast for argument 0 (i) <var78:Int> isa OTHER */
658 /* <var78:Int> isa OTHER */
659 var81
= 1; /* easy <var78:Int> isa OTHER*/
660 if (unlikely(!var81
)) {
661 var_class_name84
= type_kernel__Int
.name
;
662 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name84
);
663 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 332);
666 var85
= var_l
* var78
;
673 hash_collection__HashCollection__enlarge(self
, var79
); /* Direct call hash_collection#HashCollection#enlarge on <self:HashCollection[Object, HashNode[Object]]>*/
679 /* method hash_collection#HashCollection#store for (self: Object, Int, HashNode[Object]) */
680 void VIRTUAL_hash_collection__HashCollection__store(val
* self
, long p0
, val
* p1
) {
681 hash_collection__HashCollection__store(self
, p0
, p1
); /* Direct call hash_collection#HashCollection#store on <self:Object(HashCollection[Object, HashNode[Object]])>*/
684 /* method hash_collection#HashCollection#remove_node for (self: HashCollection[Object, HashNode[Object]], Object) */
685 void hash_collection__HashCollection__remove_node(val
* self
, val
* p0
) {
686 short int var
/* : Bool */;
689 const struct type
* type_struct
;
690 const char* var_class_name
;
691 val
* var_k
/* var k: Object */;
692 long var1
/* : Int */;
693 long var_i
/* var i: Int */;
694 val
* var2
/* : nullable HashNode[Object] */;
695 val
* var_node
/* var node: nullable HashNode[Object] */;
696 val
* var3
/* : null */;
697 short int var4
/* : Bool */;
698 short int var5
/* : Bool */;
699 val
* var_other
/* var other: nullable Object */;
700 short int var7
/* : Bool */;
701 short int var9
/* : Bool */;
702 val
* var10
/* : nullable HashNode[Object] */;
703 val
* var_prev
/* var prev: nullable HashNode[Object] */;
704 val
* var11
/* : nullable HashNode[Object] */;
705 val
* var_next
/* var next: nullable HashNode[Object] */;
706 val
* var12
/* : null */;
707 short int var13
/* : Bool */;
708 short int var14
/* : Bool */;
709 val
* var_other16
/* var other: nullable Object */;
710 short int var17
/* : Bool */;
711 short int var18
/* : Bool */;
712 short int var19
/* : Bool */;
713 short int var20
/* : Bool */;
716 const struct type
* type_struct23
;
717 const char* var_class_name24
;
718 val
* var25
/* : null */;
719 short int var26
/* : Bool */;
720 short int var27
/* : Bool */;
721 short int var29
/* : Bool */;
722 short int var30
/* : Bool */;
723 short int var31
/* : Bool */;
724 short int var32
/* : Bool */;
727 const struct type
* type_struct35
;
728 const char* var_class_name36
;
729 val
* var_
/* var : HashCollection[Object, HashNode[Object]] */;
730 long var37
/* : Int */;
731 long var38
/* : Int */;
732 long var39
/* : Int */;
733 short int var41
/* : Bool */;
736 const char* var_class_name44
;
737 long var45
/* : Int */;
738 val
* var46
/* : nullable HashNode[Object] */;
739 val
* var47
/* : nullable HashNode[Object] */;
740 val
* var48
/* : null */;
741 short int var49
/* : Bool */;
742 short int var50
/* : Bool */;
743 short int var52
/* : Bool */;
744 short int var53
/* : Bool */;
745 short int var54
/* : Bool */;
746 val
* var55
/* : nullable NativeArray[nullable HashNode[Object]] */;
747 short int var56
/* : Bool */;
750 const struct type
* type_struct59
;
751 const char* var_class_name60
;
752 short int var62
/* : Bool */;
755 const struct type
* type_struct65
;
756 short int is_nullable
;
757 const char* var_class_name66
;
758 val
* var67
/* : null */;
759 short int var68
/* : Bool */;
760 short int var69
/* : Bool */;
761 short int var71
/* : Bool */;
762 short int var72
/* : Bool */;
763 short int var73
/* : Bool */;
764 val
* var74
/* : null */;
765 /* Covariant cast for argument 0 (k) <p0:Object> isa HashCollection#0 */
766 /* <p0:Object> isa HashCollection#0 */
767 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
768 cltype
= type_struct
->color
;
769 idtype
= type_struct
->id
;
770 if(cltype
>= p0
->type
->table_size
) {
773 var
= p0
->type
->type_table
[cltype
] == idtype
;
775 if (unlikely(!var
)) {
776 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
777 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashCollection#0", var_class_name
);
778 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 100);
783 var1
= hash_collection__HashCollection__index_at(self
, var_k
);
787 var2
= hash_collection__HashCollection__node_at_idx(self
, var_i
, var_k
);
791 if (var_node
== NULL
) {
792 var4
= 1; /* is null */
794 var4
= 0; /* arg is null but recv is not */
797 { /* Inline kernel#Object#== (var_node,var3) on <var_node:nullable HashNode[Object]> */
800 { /* Inline kernel#Object#is_same_instance (var_node,var_other) on <var_node:nullable HashNode[Object](HashNode[Object])> */
801 var9
= var_node
== var_other
;
817 var10
= var_node
->attrs
[COLOR_hash_collection__HashNode___prev_item
].val
; /* _prev_item on <var_node:nullable HashNode[Object](HashNode[Object])> */
819 var11
= var_node
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_node:nullable HashNode[Object](HashNode[Object])> */
822 if (var_prev
== NULL
) {
823 var13
= 0; /* is null */
825 var13
= 1; /* arg is null and recv is not */
828 { /* Inline kernel#Object#!= (var_prev,var12) on <var_prev:nullable HashNode[Object]> */
831 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])>*/;
842 var_prev
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
= var_next
; /* _next_item on <var_prev:nullable HashNode[Object](HashNode[Object])> */
844 /* <var_next:nullable HashNode[Object]> isa nullable HashCollection#1 */
845 type_struct23
= self
->type
->resolution_table
->types
[COLOR_nullable_hash_collection__HashCollection_FT1
];
846 cltype21
= type_struct23
->color
;
847 idtype22
= type_struct23
->id
;
848 if(var_next
== NULL
) {
851 if(cltype21
>= var_next
->type
->table_size
) {
854 var20
= var_next
->type
->type_table
[cltype21
] == idtype22
;
857 if (unlikely(!var20
)) {
858 var_class_name24
= var_next
== NULL ?
"null" : var_next
->type
->name
;
859 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable HashCollection#1", var_class_name24
);
860 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 113);
863 self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
= var_next
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
866 if (var_next
== NULL
) {
867 var26
= 0; /* is null */
869 var26
= 1; /* arg is null and recv is not */
872 { /* Inline kernel#Object#!= (var_next,var25) on <var_next:nullable HashNode[Object]> */
875 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])>*/;
886 var_next
->attrs
[COLOR_hash_collection__HashNode___prev_item
].val
= var_prev
; /* _prev_item on <var_next:nullable HashNode[Object](HashNode[Object])> */
888 /* <var_prev:nullable HashNode[Object]> isa nullable HashCollection#1 */
889 type_struct35
= self
->type
->resolution_table
->types
[COLOR_nullable_hash_collection__HashCollection_FT1
];
890 cltype33
= type_struct35
->color
;
891 idtype34
= type_struct35
->id
;
892 if(var_prev
== NULL
) {
895 if(cltype33
>= var_prev
->type
->table_size
) {
898 var32
= var_prev
->type
->type_table
[cltype33
] == idtype34
;
901 if (unlikely(!var32
)) {
902 var_class_name36
= var_prev
== NULL ?
"null" : var_prev
->type
->name
;
903 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable HashCollection#1", var_class_name36
);
904 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 118);
907 self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
= var_prev
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
910 var37
= var_
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <var_:HashCollection[Object, HashNode[Object]]> */
913 { /* Inline kernel#Int#- (var37,var38) on <var37:Int> */
914 /* Covariant cast for argument 0 (i) <var38:Int> isa OTHER */
915 /* <var38:Int> isa OTHER */
916 var41
= 1; /* easy <var38:Int> isa OTHER*/
917 if (unlikely(!var41
)) {
918 var_class_name44
= type_kernel__Int
.name
;
919 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name44
);
920 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 331);
923 var45
= var37
- var38
;
929 var_
->attrs
[COLOR_hash_collection__HashCollection___length
].l
= var39
; /* _length on <var_:HashCollection[Object, HashNode[Object]]> */
930 var46
= var_node
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
; /* _prev_in_bucklet on <var_node:nullable HashNode[Object](HashNode[Object])> */
932 var47
= var_node
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
; /* _next_in_bucklet on <var_node:nullable HashNode[Object](HashNode[Object])> */
935 if (var_prev
== NULL
) {
936 var49
= 0; /* is null */
938 var49
= 1; /* arg is null and recv is not */
941 { /* Inline kernel#Object#!= (var_prev,var48) on <var_prev:nullable HashNode[Object]> */
944 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])>*/;
955 var_prev
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_prev:nullable HashNode[Object](HashNode[Object])> */
957 var55
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
958 /* <var_next:nullable HashNode[Object]> isa nullable HashCollection#1 */
959 type_struct59
= self
->type
->resolution_table
->types
[COLOR_nullable_hash_collection__HashCollection_FT1
];
960 cltype57
= type_struct59
->color
;
961 idtype58
= type_struct59
->id
;
962 if(var_next
== NULL
) {
965 if(cltype57
>= var_next
->type
->table_size
) {
968 var56
= var_next
->type
->type_table
[cltype57
] == idtype58
;
971 if (unlikely(!var56
)) {
972 var_class_name60
= var_next
== NULL ?
"null" : var_next
->type
->name
;
973 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable HashCollection#1", var_class_name60
);
974 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 128);
978 PRINT_ERROR("Runtime error: %s", "Receiver is null");
979 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 128);
982 { /* Inline array#NativeArray#[]= (var55,var_i,var_next) on <var55:nullable NativeArray[nullable HashNode[Object]]> */
983 /* Covariant cast for argument 1 (item) <var_next:nullable HashNode[Object]> isa NativeArray#0 */
984 /* <var_next:nullable HashNode[Object]> isa NativeArray#0 */
985 type_struct65
= var55
->type
->resolution_table
->types
[COLOR_array__NativeArray_FT0
];
986 cltype63
= type_struct65
->color
;
987 idtype64
= type_struct65
->id
;
988 is_nullable
= type_struct65
->is_nullable
;
989 if(var_next
== NULL
) {
992 if(cltype63
>= var_next
->type
->table_size
) {
995 var62
= var_next
->type
->type_table
[cltype63
] == idtype64
;
998 if (unlikely(!var62
)) {
999 var_class_name66
= var_next
== NULL ?
"null" : var_next
->type
->name
;
1000 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "NativeArray#0", var_class_name66
);
1001 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/array.nit", 662);
1004 ((struct instance_array__NativeArray
*)var55
)->values
[var_i
]=var_next
;
1005 RET_LABEL61
:(void)0;
1010 if (var_next
== NULL
) {
1011 var68
= 0; /* is null */
1013 var68
= 1; /* arg is null and recv is not */
1016 { /* Inline kernel#Object#!= (var_next,var67) on <var_next:nullable HashNode[Object]> */
1017 var_other16
= var67
;
1019 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])>*/;
1025 RET_LABEL70
:(void)0;
1030 var_next
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
= var_prev
; /* _prev_in_bucklet on <var_next:nullable HashNode[Object](HashNode[Object])> */
1034 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var74
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
1037 /* method hash_collection#HashCollection#remove_node for (self: Object, Object) */
1038 void VIRTUAL_hash_collection__HashCollection__remove_node(val
* self
, val
* p0
) {
1039 hash_collection__HashCollection__remove_node(self
, p0
); /* Direct call hash_collection#HashCollection#remove_node on <self:Object(HashCollection[Object, HashNode[Object]])>*/
1042 /* method hash_collection#HashCollection#raz for (self: HashCollection[Object, HashNode[Object]]) */
1043 void hash_collection__HashCollection__raz(val
* self
) {
1044 long var
/* : Int */;
1045 long var1
/* : Int */;
1046 long var2
/* : Int */;
1047 short int var4
/* : Bool */;
1050 const char* var_class_name
;
1051 long var5
/* : Int */;
1052 long var_i
/* var i: Int */;
1053 long var6
/* : Int */;
1054 short int var7
/* : Bool */;
1055 short int var9
/* : Bool */;
1058 const char* var_class_name12
;
1059 short int var13
/* : Bool */;
1060 val
* var14
/* : nullable NativeArray[nullable HashNode[Object]] */;
1061 val
* var15
/* : null */;
1062 short int var17
/* : Bool */;
1065 const struct type
* type_struct
;
1066 short int is_nullable
;
1067 const char* var_class_name20
;
1068 long var21
/* : Int */;
1069 long var22
/* : Int */;
1070 short int var24
/* : Bool */;
1073 const char* var_class_name27
;
1074 long var28
/* : Int */;
1075 long var29
/* : Int */;
1076 val
* var30
/* : null */;
1077 val
* var31
/* : null */;
1078 val
* var32
/* : null */;
1079 var
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
1082 { /* Inline kernel#Int#- (var,var1) on <var:Int> */
1083 /* Covariant cast for argument 0 (i) <var1:Int> isa OTHER */
1084 /* <var1:Int> isa OTHER */
1085 var4
= 1; /* easy <var1:Int> isa OTHER*/
1086 if (unlikely(!var4
)) {
1087 var_class_name
= type_kernel__Int
.name
;
1088 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1089 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 331);
1102 { /* Inline kernel#Int#>= (var_i,var6) on <var_i:Int> */
1103 /* Covariant cast for argument 0 (i) <var6:Int> isa OTHER */
1104 /* <var6:Int> isa OTHER */
1105 var9
= 1; /* easy <var6:Int> isa OTHER*/
1106 if (unlikely(!var9
)) {
1107 var_class_name12
= type_kernel__Int
.name
;
1108 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name12
);
1109 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 326);
1112 var13
= var_i
>= var6
;
1119 var14
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
1121 if (var14
== NULL
) {
1122 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1123 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 142);
1126 { /* Inline array#NativeArray#[]= (var14,var_i,var15) on <var14:nullable NativeArray[nullable HashNode[Object]]> */
1127 /* Covariant cast for argument 1 (item) <var15:null> isa NativeArray#0 */
1128 /* <var15:null> isa NativeArray#0 */
1129 type_struct
= var14
->type
->resolution_table
->types
[COLOR_array__NativeArray_FT0
];
1130 cltype18
= type_struct
->color
;
1131 idtype19
= type_struct
->id
;
1132 is_nullable
= type_struct
->is_nullable
;
1134 var17
= is_nullable
;
1136 if(cltype18
>= var15
->type
->table_size
) {
1139 var17
= var15
->type
->type_table
[cltype18
] == idtype19
;
1142 if (unlikely(!var17
)) {
1143 var_class_name20
= var15
== NULL ?
"null" : var15
->type
->name
;
1144 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "NativeArray#0", var_class_name20
);
1145 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/array.nit", 662);
1148 ((struct instance_array__NativeArray
*)var14
)->values
[var_i
]=var15
;
1149 RET_LABEL16
:(void)0;
1154 { /* Inline kernel#Int#- (var_i,var21) on <var_i:Int> */
1155 /* Covariant cast for argument 0 (i) <var21:Int> isa OTHER */
1156 /* <var21:Int> isa OTHER */
1157 var24
= 1; /* easy <var21:Int> isa OTHER*/
1158 if (unlikely(!var24
)) {
1159 var_class_name27
= type_kernel__Int
.name
;
1160 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name27
);
1161 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 331);
1164 var28
= var_i
- var21
;
1167 RET_LABEL23
:(void)0;
1171 CONTINUE_label
: (void)0;
1173 BREAK_label
: (void)0;
1175 self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
= var29
; /* _length on <self:HashCollection[Object, HashNode[Object]]> */
1177 self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
= var30
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
1179 self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
= var31
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
1181 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var32
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
1184 /* method hash_collection#HashCollection#raz for (self: Object) */
1185 void VIRTUAL_hash_collection__HashCollection__raz(val
* self
) {
1186 hash_collection__HashCollection__raz(self
); /* Direct call hash_collection#HashCollection#raz on <self:Object(HashCollection[Object, HashNode[Object]])>*/
1189 /* method hash_collection#HashCollection#enlarge for (self: HashCollection[Object, HashNode[Object]], Int) */
1190 void hash_collection__HashCollection__enlarge(val
* self
, long p0
) {
1191 long var_cap
/* var cap: Int */;
1192 long var
/* : Int */;
1193 long var_old_cap
/* var old_cap: Int */;
1194 long var1
/* : Int */;
1195 long var2
/* : Int */;
1196 long var3
/* : Int */;
1197 short int var5
/* : Bool */;
1200 const char* var_class_name
;
1201 long var6
/* : Int */;
1202 short int var7
/* : Bool */;
1203 short int var9
/* : Bool */;
1206 const char* var_class_name12
;
1207 short int var13
/* : Bool */;
1208 long var14
/* : Int */;
1209 long var15
/* : Int */;
1210 long var16
/* : Int */;
1211 short int var18
/* : Bool */;
1214 const char* var_class_name21
;
1215 long var22
/* : Int */;
1216 long var23
/* : Int */;
1217 short int var24
/* : Bool */;
1218 short int var26
/* : Bool */;
1221 const char* var_class_name29
;
1222 short int var30
/* : Bool */;
1223 val
* var31
/* : null */;
1224 val
* var32
/* : NativeArray[nullable Object] */;
1225 val
* var34
/* : NativeArray[nullable Object] */;
1226 val
* var_new_array
/* var new_array: NativeArray[nullable HashNode[Object]] */;
1227 long var35
/* : Int */;
1228 long var36
/* : Int */;
1229 short int var38
/* : Bool */;
1232 const char* var_class_name41
;
1233 long var42
/* : Int */;
1234 long var_i
/* var i: Int */;
1235 long var43
/* : Int */;
1236 short int var44
/* : Bool */;
1237 short int var46
/* : Bool */;
1240 const char* var_class_name49
;
1241 short int var50
/* : Bool */;
1242 val
* var51
/* : null */;
1243 short int var53
/* : Bool */;
1246 const struct type
* type_struct
;
1247 short int is_nullable
;
1248 const char* var_class_name56
;
1249 long var57
/* : Int */;
1250 long var58
/* : Int */;
1251 short int var60
/* : Bool */;
1254 const char* var_class_name63
;
1255 long var64
/* : Int */;
1256 long var65
/* : Int */;
1257 short int var66
/* : Bool */;
1258 short int var68
/* : Bool */;
1261 const char* var_class_name71
;
1262 short int var72
/* : Bool */;
1263 val
* var73
/* : nullable HashNode[Object] */;
1264 val
* var_node
/* var node: nullable HashNode[Object] */;
1265 val
* var74
/* : null */;
1266 short int var75
/* : Bool */;
1267 short int var76
/* : Bool */;
1268 val
* var_other
/* var other: nullable Object */;
1269 short int var78
/* : Bool */;
1270 short int var79
/* : Bool */;
1271 short int var80
/* : Bool */;
1272 val
* var81
/* : Object */;
1273 short int var82
/* : Bool */;
1276 const struct type
* type_struct85
;
1277 const char* var_class_name86
;
1278 long var87
/* : Int */;
1279 long var_index
/* var index: Int */;
1280 val
* var88
/* : nullable Object */;
1281 val
* var90
/* : nullable HashNode[Object] */;
1282 val
* var_next
/* var next: nullable HashNode[Object] */;
1283 short int var92
/* : Bool */;
1286 const struct type
* type_struct95
;
1287 const char* var_class_name96
;
1288 val
* var97
/* : null */;
1289 val
* var98
/* : null */;
1290 short int var99
/* : Bool */;
1291 short int var100
/* : Bool */;
1292 short int var102
/* : Bool */;
1293 short int var103
/* : Bool */;
1294 short int var104
/* : Bool */;
1295 val
* var105
/* : nullable HashNode[Object] */;
1296 short int var106
/* : Bool */;
1299 const struct type
* type_struct109
;
1300 const char* var_class_name110
;
1302 var
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
1304 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashCollection[Object, HashNode[Object]]> */
1307 { /* Inline kernel#Int#+ (var1,var2) on <var1:Int> */
1308 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
1309 /* <var2:Int> isa OTHER */
1310 var5
= 1; /* easy <var2:Int> isa OTHER*/
1311 if (unlikely(!var5
)) {
1312 var_class_name
= type_kernel__Int
.name
;
1313 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1314 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
1324 { /* Inline kernel#Int#< (var_cap,var3) on <var_cap:Int> */
1325 /* Covariant cast for argument 0 (i) <var3:Int> isa OTHER */
1326 /* <var3:Int> isa OTHER */
1327 var9
= 1; /* easy <var3:Int> isa OTHER*/
1328 if (unlikely(!var9
)) {
1329 var_class_name12
= type_kernel__Int
.name
;
1330 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name12
);
1331 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 325);
1334 var13
= var_cap
< var3
;
1341 var14
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashCollection[Object, HashNode[Object]]> */
1344 { /* Inline kernel#Int#+ (var14,var15) on <var14:Int> */
1345 /* Covariant cast for argument 0 (i) <var15:Int> isa OTHER */
1346 /* <var15:Int> isa OTHER */
1347 var18
= 1; /* easy <var15:Int> isa OTHER*/
1348 if (unlikely(!var18
)) {
1349 var_class_name21
= type_kernel__Int
.name
;
1350 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name21
);
1351 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
1354 var22
= var14
+ var15
;
1357 RET_LABEL17
:(void)0;
1363 var23
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
1365 { /* Inline kernel#Int#<= (var_cap,var23) on <var_cap:Int> */
1366 /* Covariant cast for argument 0 (i) <var23:Int> isa OTHER */
1367 /* <var23:Int> isa OTHER */
1368 var26
= 1; /* easy <var23:Int> isa OTHER*/
1369 if (unlikely(!var26
)) {
1370 var_class_name29
= type_kernel__Int
.name
;
1371 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name29
);
1372 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 324);
1375 var30
= var_cap
<= var23
;
1378 RET_LABEL25
:(void)0;
1385 self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
= var_cap
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
1387 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var31
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
1389 { /* Inline array#ArrayCapable#calloc_array (self,var_cap) on <self:HashCollection[Object, HashNode[Object]]> */
1390 var34
= NEW_array__NativeArray(var_cap
, self
->type
->resolution_table
->types
[COLOR_array__NativeArrayarray__ArrayCapable_FT0
]);
1393 RET_LABEL33
:(void)0;
1396 var_new_array
= var32
;
1397 self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
= var_new_array
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
1400 { /* Inline kernel#Int#- (var_cap,var35) on <var_cap:Int> */
1401 /* Covariant cast for argument 0 (i) <var35:Int> isa OTHER */
1402 /* <var35:Int> isa OTHER */
1403 var38
= 1; /* easy <var35:Int> isa OTHER*/
1404 if (unlikely(!var38
)) {
1405 var_class_name41
= type_kernel__Int
.name
;
1406 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name41
);
1407 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 331);
1410 var42
= var_cap
- var35
;
1413 RET_LABEL37
:(void)0;
1420 { /* Inline kernel#Int#>= (var_i,var43) on <var_i:Int> */
1421 /* Covariant cast for argument 0 (i) <var43:Int> isa OTHER */
1422 /* <var43:Int> isa OTHER */
1423 var46
= 1; /* easy <var43:Int> isa OTHER*/
1424 if (unlikely(!var46
)) {
1425 var_class_name49
= type_kernel__Int
.name
;
1426 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name49
);
1427 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 326);
1430 var50
= var_i
>= var43
;
1433 RET_LABEL45
:(void)0;
1439 { /* Inline array#NativeArray#[]= (var_new_array,var_i,var51) on <var_new_array:NativeArray[nullable HashNode[Object]]> */
1440 /* Covariant cast for argument 1 (item) <var51:null> isa NativeArray#0 */
1441 /* <var51:null> isa NativeArray#0 */
1442 type_struct
= var_new_array
->type
->resolution_table
->types
[COLOR_array__NativeArray_FT0
];
1443 cltype54
= type_struct
->color
;
1444 idtype55
= type_struct
->id
;
1445 is_nullable
= type_struct
->is_nullable
;
1447 var53
= is_nullable
;
1449 if(cltype54
>= var51
->type
->table_size
) {
1452 var53
= var51
->type
->type_table
[cltype54
] == idtype55
;
1455 if (unlikely(!var53
)) {
1456 var_class_name56
= var51
== NULL ?
"null" : var51
->type
->name
;
1457 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "NativeArray#0", var_class_name56
);
1458 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/array.nit", 662);
1461 ((struct instance_array__NativeArray
*)var_new_array
)->values
[var_i
]=var51
;
1462 RET_LABEL52
:(void)0;
1467 { /* Inline kernel#Int#- (var_i,var57) on <var_i:Int> */
1468 /* Covariant cast for argument 0 (i) <var57:Int> isa OTHER */
1469 /* <var57:Int> isa OTHER */
1470 var60
= 1; /* easy <var57:Int> isa OTHER*/
1471 if (unlikely(!var60
)) {
1472 var_class_name63
= type_kernel__Int
.name
;
1473 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name63
);
1474 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 331);
1477 var64
= var_i
- var57
;
1480 RET_LABEL59
:(void)0;
1484 CONTINUE_label
: (void)0;
1486 BREAK_label
: (void)0;
1487 var65
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
1489 { /* Inline kernel#Int#<= (var65,var_old_cap) on <var65:Int> */
1490 /* Covariant cast for argument 0 (i) <var_old_cap:Int> isa OTHER */
1491 /* <var_old_cap:Int> isa OTHER */
1492 var68
= 1; /* easy <var_old_cap:Int> isa OTHER*/
1493 if (unlikely(!var68
)) {
1494 var_class_name71
= type_kernel__Int
.name
;
1495 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name71
);
1496 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 324);
1499 var72
= var65
<= var_old_cap
;
1502 RET_LABEL67
:(void)0;
1509 var73
= self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
1513 if (var_node
== NULL
) {
1514 var75
= 0; /* is null */
1516 var75
= 1; /* arg is null and recv is not */
1519 { /* Inline kernel#Object#!= (var_node,var74) on <var_node:nullable HashNode[Object]> */
1522 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])>*/;
1528 RET_LABEL77
:(void)0;
1533 var81
= var_node
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_node:nullable HashNode[Object](HashNode[Object])> */
1534 if (unlikely(var81
== NULL
)) {
1535 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
1536 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 177);
1539 /* <var81:Object> isa HashCollection#0 */
1540 type_struct85
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
1541 cltype83
= type_struct85
->color
;
1542 idtype84
= type_struct85
->id
;
1543 if(cltype83
>= var81
->type
->table_size
) {
1546 var82
= var81
->type
->type_table
[cltype83
] == idtype84
;
1548 if (unlikely(!var82
)) {
1549 var_class_name86
= var81
== NULL ?
"null" : var81
->type
->name
;
1550 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashCollection#0", var_class_name86
);
1551 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 177);
1555 var87
= hash_collection__HashCollection__index_at(self
, var81
);
1559 { /* Inline array#NativeArray#[] (var_new_array,var_index) on <var_new_array:NativeArray[nullable HashNode[Object]]> */
1560 var90
= ((struct instance_array__NativeArray
*)var_new_array
)->values
[var_index
];
1563 RET_LABEL89
:(void)0;
1568 { /* Inline array#NativeArray#[]= (var_new_array,var_index,var_node) on <var_new_array:NativeArray[nullable HashNode[Object]]> */
1569 /* Covariant cast for argument 1 (item) <var_node:nullable HashNode[Object](HashNode[Object])> isa NativeArray#0 */
1570 /* <var_node:nullable HashNode[Object](HashNode[Object])> isa NativeArray#0 */
1571 type_struct95
= var_new_array
->type
->resolution_table
->types
[COLOR_array__NativeArray_FT0
];
1572 cltype93
= type_struct95
->color
;
1573 idtype94
= type_struct95
->id
;
1574 if(cltype93
>= var_node
->type
->table_size
) {
1577 var92
= var_node
->type
->type_table
[cltype93
] == idtype94
;
1579 if (unlikely(!var92
)) {
1580 var_class_name96
= var_node
== NULL ?
"null" : var_node
->type
->name
;
1581 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "NativeArray#0", var_class_name96
);
1582 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/array.nit", 662);
1585 ((struct instance_array__NativeArray
*)var_new_array
)->values
[var_index
]=var_node
;
1586 RET_LABEL91
:(void)0;
1590 var_node
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
= var97
; /* _prev_in_bucklet on <var_node:nullable HashNode[Object](HashNode[Object])> */
1591 var_node
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_node:nullable HashNode[Object](HashNode[Object])> */
1593 if (var_next
== NULL
) {
1594 var99
= 0; /* is null */
1596 var99
= 1; /* arg is null and recv is not */
1599 { /* Inline kernel#Object#!= (var_next,var98) on <var_next:nullable HashNode[Object]> */
1602 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])>*/;
1608 RET_LABEL101
:(void)0;
1613 var_next
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
= var_node
; /* _prev_in_bucklet on <var_next:nullable HashNode[Object](HashNode[Object])> */
1616 var105
= var_node
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_node:nullable HashNode[Object](HashNode[Object])> */
1617 /* <var105:nullable HashNode[Object]> isa nullable HashCollection#1 */
1618 type_struct109
= self
->type
->resolution_table
->types
[COLOR_nullable_hash_collection__HashCollection_FT1
];
1619 cltype107
= type_struct109
->color
;
1620 idtype108
= type_struct109
->id
;
1621 if(var105
== NULL
) {
1624 if(cltype107
>= var105
->type
->table_size
) {
1627 var106
= var105
->type
->type_table
[cltype107
] == idtype108
;
1630 if (unlikely(!var106
)) {
1631 var_class_name110
= var105
== NULL ?
"null" : var105
->type
->name
;
1632 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable HashCollection#1", var_class_name110
);
1633 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 184);
1637 CONTINUE_label111
: (void)0;
1639 BREAK_label111
: (void)0;
1642 /* method hash_collection#HashCollection#enlarge for (self: Object, Int) */
1643 void VIRTUAL_hash_collection__HashCollection__enlarge(val
* self
, long p0
) {
1644 hash_collection__HashCollection__enlarge(self
, p0
); /* Direct call hash_collection#HashCollection#enlarge on <self:Object(HashCollection[Object, HashNode[Object]])>*/
1647 /* method hash_collection#HashCollection#init for (self: HashCollection[Object, HashNode[Object]]) */
1648 void hash_collection__HashCollection__init(val
* self
) {
1651 /* method hash_collection#HashCollection#init for (self: Object) */
1652 void VIRTUAL_hash_collection__HashCollection__init(val
* self
) {
1653 { /* Inline hash_collection#HashCollection#init (self) on <self:Object(HashCollection[Object, HashNode[Object]])> */
1658 /* method hash_collection#HashNode#init for (self: HashNode[Object], Object) */
1659 void hash_collection__HashNode__init(val
* self
, val
* p0
) {
1660 short int var
/* : Bool */;
1663 const struct type
* type_struct
;
1664 const char* var_class_name
;
1665 val
* var_k
/* var k: Object */;
1666 /* Covariant cast for argument 0 (k) <p0:Object> isa HashNode#0 */
1667 /* <p0:Object> isa HashNode#0 */
1668 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashNode_FT0
];
1669 cltype
= type_struct
->color
;
1670 idtype
= type_struct
->id
;
1671 if(cltype
>= p0
->type
->table_size
) {
1674 var
= p0
->type
->type_table
[cltype
] == idtype
;
1676 if (unlikely(!var
)) {
1677 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1678 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashNode#0", var_class_name
);
1679 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 196);
1683 self
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_k
; /* _key on <self:HashNode[Object]> */
1686 /* method hash_collection#HashNode#init for (self: Object, Object) */
1687 void VIRTUAL_hash_collection__HashNode__init(val
* self
, val
* p0
) {
1688 hash_collection__HashNode__init(self
, p0
); /* Direct call hash_collection#HashNode#init on <self:Object(HashNode[Object])>*/
1691 /* method hash_collection#HashMap#[] for (self: HashMap[Object, nullable Object], Object): nullable Object */
1692 val
* hash_collection__HashMap___91d_93d(val
* self
, val
* p0
) {
1693 val
* var
/* : nullable Object */;
1694 short int var1
/* : Bool */;
1697 const struct type
* type_struct
;
1698 const char* var_class_name
;
1699 val
* var_key
/* var key: Object */;
1700 val
* var2
/* : nullable HashNode[Object] */;
1701 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
1702 val
* var3
/* : null */;
1703 short int var4
/* : Bool */;
1704 short int var5
/* : Bool */;
1705 val
* var_other
/* var other: nullable Object */;
1706 short int var7
/* : Bool */;
1707 short int var9
/* : Bool */;
1708 val
* var10
/* : nullable Object */;
1709 val
* var11
/* : nullable Object */;
1710 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1711 /* <p0:Object> isa MapRead#0 */
1712 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1713 cltype
= type_struct
->color
;
1714 idtype
= type_struct
->id
;
1715 if(cltype
>= p0
->type
->table_size
) {
1718 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1720 if (unlikely(!var1
)) {
1721 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1722 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapRead#0", var_class_name
);
1723 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 208);
1728 var2
= hash_collection__HashCollection__node_at(self
, var_key
);
1732 if (var_c
== NULL
) {
1733 var4
= 1; /* is null */
1735 var4
= 0; /* arg is null but recv is not */
1738 { /* Inline kernel#Object#== (var_c,var3) on <var_c:nullable HashMapNode[Object, nullable Object]> */
1741 { /* Inline kernel#Object#is_same_instance (var_c,var_other) on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1742 var9
= var_c
== var_other
;
1756 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]>*/;
1761 var11
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1768 /* method hash_collection#HashMap#[] for (self: Object, Object): nullable Object */
1769 val
* VIRTUAL_hash_collection__HashMap___91d_93d(val
* self
, val
* p0
) {
1770 val
* var
/* : nullable Object */;
1771 val
* var1
/* : nullable Object */;
1772 var1
= hash_collection__HashMap___91d_93d(self
, p0
);
1777 /* method hash_collection#HashMap#iterator for (self: HashMap[Object, nullable Object]): HashMapIterator[Object, nullable Object] */
1778 val
* hash_collection__HashMap__iterator(val
* self
) {
1779 val
* var
/* : HashMapIterator[Object, nullable Object] */;
1780 val
* var1
/* : HashMapIterator[Object, nullable Object] */;
1781 var1
= NEW_hash_collection__HashMapIterator(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapIteratorhash_collection__HashMap_FT0hash_collection__HashMap_FT1
]);
1783 hash_collection__HashMapIterator__init(var1
, self
); /* Direct call hash_collection#HashMapIterator#init on <var1:HashMapIterator[Object, nullable Object]>*/
1790 /* method hash_collection#HashMap#iterator for (self: Object): MapIterator[Object, nullable Object] */
1791 val
* VIRTUAL_hash_collection__HashMap__iterator(val
* self
) {
1792 val
* var
/* : MapIterator[Object, nullable Object] */;
1793 val
* var1
/* : HashMapIterator[Object, nullable Object] */;
1794 var1
= hash_collection__HashMap__iterator(self
);
1799 /* method hash_collection#HashMap#length for (self: HashMap[Object, nullable Object]): Int */
1800 long hash_collection__HashMap__length(val
* self
) {
1801 long var
/* : Int */;
1802 long var1
/* : Int */;
1803 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashMap[Object, nullable Object]> */
1809 /* method hash_collection#HashMap#length for (self: Object): Int */
1810 long VIRTUAL_hash_collection__HashMap__length(val
* self
) {
1811 long var
/* : Int */;
1812 long var1
/* : Int */;
1813 var1
= hash_collection__HashMap__length(self
);
1818 /* method hash_collection#HashMap#is_empty for (self: HashMap[Object, nullable Object]): Bool */
1819 short int hash_collection__HashMap__is_empty(val
* self
) {
1820 short int var
/* : Bool */;
1821 long var1
/* : Int */;
1822 long var2
/* : Int */;
1823 short int var3
/* : Bool */;
1824 short int var4
/* : Bool */;
1825 short int var6
/* : Bool */;
1826 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashMap[Object, nullable Object]> */
1829 { /* Inline kernel#Int#== (var1,var2) on <var1:Int> */
1830 var6
= var1
== var2
;
1842 /* method hash_collection#HashMap#is_empty for (self: Object): Bool */
1843 short int VIRTUAL_hash_collection__HashMap__is_empty(val
* self
) {
1844 short int var
/* : Bool */;
1845 short int var1
/* : Bool */;
1846 var1
= hash_collection__HashMap__is_empty(self
);
1851 /* method hash_collection#HashMap#[]= for (self: HashMap[Object, nullable Object], Object, nullable Object) */
1852 void hash_collection__HashMap___91d_93d_61d(val
* self
, val
* p0
, val
* p1
) {
1853 short int var
/* : Bool */;
1856 const struct type
* type_struct
;
1857 const char* var_class_name
;
1858 short int var1
/* : Bool */;
1861 const struct type
* type_struct4
;
1862 short int is_nullable
;
1863 const char* var_class_name5
;
1864 val
* var_key
/* var key: Object */;
1865 val
* var_v
/* var v: nullable Object */;
1866 long var6
/* : Int */;
1867 long var_i
/* var i: Int */;
1868 val
* var7
/* : nullable HashNode[Object] */;
1869 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
1870 val
* var8
/* : null */;
1871 short int var9
/* : Bool */;
1872 short int var10
/* : Bool */;
1873 val
* var_other
/* var other: nullable Object */;
1874 short int var12
/* : Bool */;
1875 short int var13
/* : Bool */;
1876 short int var14
/* : Bool */;
1877 val
* var15
/* : HashMapNode[Object, nullable Object] */;
1878 /* Covariant cast for argument 0 (key) <p0:Object> isa Map#0 */
1879 /* <p0:Object> isa Map#0 */
1880 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Map_FT0
];
1881 cltype
= type_struct
->color
;
1882 idtype
= type_struct
->id
;
1883 if(cltype
>= p0
->type
->table_size
) {
1886 var
= p0
->type
->type_table
[cltype
] == idtype
;
1888 if (unlikely(!var
)) {
1889 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1890 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Map#0", var_class_name
);
1891 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 224);
1894 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa Map#1 */
1895 /* <p1:nullable Object> isa Map#1 */
1896 type_struct4
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Map_FT1
];
1897 cltype2
= type_struct4
->color
;
1898 idtype3
= type_struct4
->id
;
1899 is_nullable
= type_struct4
->is_nullable
;
1903 if(cltype2
>= p1
->type
->table_size
) {
1906 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
1909 if (unlikely(!var1
)) {
1910 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
1911 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Map#1", var_class_name5
);
1912 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 224);
1918 var6
= hash_collection__HashCollection__index_at(self
, var_key
);
1922 var7
= hash_collection__HashCollection__node_at_idx(self
, var_i
, var_key
);
1926 if (var_c
== NULL
) {
1927 var9
= 0; /* is null */
1929 var9
= 1; /* arg is null and recv is not */
1932 { /* Inline kernel#Object#!= (var_c,var8) on <var_c:nullable HashMapNode[Object, nullable Object]> */
1935 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])>*/;
1941 RET_LABEL11
:(void)0;
1946 var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_key
; /* _key on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1947 var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
= var_v
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1949 var15
= NEW_hash_collection__HashMapNode(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapNodehash_collection__HashMap_FT0hash_collection__HashMap_FT1
]);
1951 hash_collection__HashMapNode__init(var15
, var_key
, var_v
); /* Direct call hash_collection#HashMapNode#init on <var15:HashMapNode[Object, nullable Object]>*/
1954 hash_collection__HashCollection__store(self
, var_i
, var15
); /* Direct call hash_collection#HashCollection#store on <self:HashMap[Object, nullable Object]>*/
1959 /* method hash_collection#HashMap#[]= for (self: Object, Object, nullable Object) */
1960 void VIRTUAL_hash_collection__HashMap___91d_93d_61d(val
* self
, val
* p0
, val
* p1
) {
1961 hash_collection__HashMap___91d_93d_61d(self
, p0
, p1
); /* Direct call hash_collection#HashMap#[]= on <self:Object(HashMap[Object, nullable Object])>*/
1964 /* method hash_collection#HashMap#clear for (self: HashMap[Object, nullable Object]) */
1965 void hash_collection__HashMap__clear(val
* self
) {
1967 hash_collection__HashCollection__raz(self
); /* Direct call hash_collection#HashCollection#raz on <self:HashMap[Object, nullable Object]>*/
1971 /* method hash_collection#HashMap#clear for (self: Object) */
1972 void VIRTUAL_hash_collection__HashMap__clear(val
* self
) {
1973 hash_collection__HashMap__clear(self
); /* Direct call hash_collection#HashMap#clear on <self:Object(HashMap[Object, nullable Object])>*/
1976 /* method hash_collection#HashMap#init for (self: HashMap[Object, nullable Object]) */
1977 void hash_collection__HashMap__init(val
* self
) {
1978 long var
/* : Int */;
1979 long var2
/* : Int */;
1980 long var3
/* : Int */;
1982 { /* Inline hash_collection#HashCollection#init (self) on <self:HashMap[Object, nullable Object]> */
1987 self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
= var
; /* _capacity on <self:HashMap[Object, nullable Object]> */
1989 self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
= var2
; /* _length on <self:HashMap[Object, nullable Object]> */
1992 hash_collection__HashCollection__enlarge(self
, var3
); /* Direct call hash_collection#HashCollection#enlarge on <self:HashMap[Object, nullable Object]>*/
1996 /* method hash_collection#HashMap#init for (self: Object) */
1997 void VIRTUAL_hash_collection__HashMap__init(val
* self
) {
1998 hash_collection__HashMap__init(self
); /* Direct call hash_collection#HashMap#init on <self:Object(HashMap[Object, nullable Object])>*/
2001 /* method hash_collection#HashMap#keys for (self: HashMap[Object, nullable Object]): RemovableCollection[Object] */
2002 val
* hash_collection__HashMap__keys(val
* self
) {
2003 val
* var
/* : RemovableCollection[Object] */;
2004 val
* var1
/* : RemovableCollection[Object] */;
2005 var1
= self
->attrs
[COLOR_hash_collection__HashMap___keys
].val
; /* _keys on <self:HashMap[Object, nullable Object]> */
2006 if (unlikely(var1
== NULL
)) {
2007 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _keys");
2008 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 245);
2015 /* method hash_collection#HashMap#keys for (self: Object): Collection[Object] */
2016 val
* VIRTUAL_hash_collection__HashMap__keys(val
* self
) {
2017 val
* var
/* : Collection[Object] */;
2018 val
* var1
/* : RemovableCollection[Object] */;
2019 val
* var3
/* : RemovableCollection[Object] */;
2020 { /* Inline hash_collection#HashMap#keys (self) on <self:Object(HashMap[Object, nullable Object])> */
2021 var3
= self
->attrs
[COLOR_hash_collection__HashMap___keys
].val
; /* _keys on <self:Object(HashMap[Object, nullable Object])> */
2022 if (unlikely(var3
== NULL
)) {
2023 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _keys");
2024 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 245);
2034 /* method hash_collection#HashMap#values for (self: HashMap[Object, nullable Object]): RemovableCollection[nullable Object] */
2035 val
* hash_collection__HashMap__values(val
* self
) {
2036 val
* var
/* : RemovableCollection[nullable Object] */;
2037 val
* var1
/* : RemovableCollection[nullable Object] */;
2038 var1
= self
->attrs
[COLOR_hash_collection__HashMap___values
].val
; /* _values on <self:HashMap[Object, nullable Object]> */
2039 if (unlikely(var1
== NULL
)) {
2040 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _values");
2041 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 246);
2048 /* method hash_collection#HashMap#values for (self: Object): Collection[nullable Object] */
2049 val
* VIRTUAL_hash_collection__HashMap__values(val
* self
) {
2050 val
* var
/* : Collection[nullable Object] */;
2051 val
* var1
/* : RemovableCollection[nullable Object] */;
2052 val
* var3
/* : RemovableCollection[nullable Object] */;
2053 { /* Inline hash_collection#HashMap#values (self) on <self:Object(HashMap[Object, nullable Object])> */
2054 var3
= self
->attrs
[COLOR_hash_collection__HashMap___values
].val
; /* _values on <self:Object(HashMap[Object, nullable Object])> */
2055 if (unlikely(var3
== NULL
)) {
2056 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _values");
2057 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 246);
2067 /* method hash_collection#HashMapKeys#map for (self: HashMapKeys[Object, nullable Object]): HashMap[Object, nullable Object] */
2068 val
* hash_collection__HashMapKeys__map(val
* self
) {
2069 val
* var
/* : HashMap[Object, nullable Object] */;
2070 val
* var1
/* : HashMap[Object, nullable Object] */;
2071 var1
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2072 if (unlikely(var1
== NULL
)) {
2073 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2074 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 252);
2081 /* method hash_collection#HashMapKeys#map for (self: Object): HashMap[Object, nullable Object] */
2082 val
* VIRTUAL_hash_collection__HashMapKeys__map(val
* self
) {
2083 val
* var
/* : HashMap[Object, nullable Object] */;
2084 val
* var1
/* : HashMap[Object, nullable Object] */;
2085 val
* var3
/* : HashMap[Object, nullable Object] */;
2086 { /* Inline hash_collection#HashMapKeys#map (self) on <self:Object(HashMapKeys[Object, nullable Object])> */
2087 var3
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:Object(HashMapKeys[Object, nullable Object])> */
2088 if (unlikely(var3
== NULL
)) {
2089 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2090 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 252);
2100 /* method hash_collection#HashMapKeys#first for (self: HashMapKeys[Object, nullable Object]): Object */
2101 val
* hash_collection__HashMapKeys__first(val
* self
) {
2102 val
* var
/* : Object */;
2103 val
* var1
/* : HashMap[Object, nullable Object] */;
2104 val
* var3
/* : HashMap[Object, nullable Object] */;
2105 val
* var4
/* : nullable HashNode[Object] */;
2106 val
* var5
/* : Object */;
2108 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2109 var3
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2110 if (unlikely(var3
== NULL
)) {
2111 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2112 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 252);
2119 var4
= var1
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[Object, nullable Object]> */
2120 if (unlikely(var4
== NULL
)) {
2121 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2122 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 256);
2125 var5
= var4
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var4:nullable HashNode[Object](nullable HashMapNode[Object, nullable Object])> */
2126 if (unlikely(var5
== NULL
)) {
2127 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
2128 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 256);
2136 /* method hash_collection#HashMapKeys#first for (self: Object): nullable Object */
2137 val
* VIRTUAL_hash_collection__HashMapKeys__first(val
* self
) {
2138 val
* var
/* : nullable Object */;
2139 val
* var1
/* : Object */;
2140 var1
= hash_collection__HashMapKeys__first(self
);
2145 /* method hash_collection#HashMapKeys#has for (self: HashMapKeys[Object, nullable Object], Object): Bool */
2146 short int hash_collection__HashMapKeys__has(val
* self
, val
* p0
) {
2147 short int var
/* : Bool */;
2148 short int var1
/* : Bool */;
2151 const struct type
* type_struct
;
2152 const char* var_class_name
;
2153 val
* var_k
/* var k: Object */;
2154 val
* var2
/* : HashMap[Object, nullable Object] */;
2155 val
* var4
/* : HashMap[Object, nullable Object] */;
2156 val
* var5
/* : nullable HashNode[Object] */;
2157 val
* var6
/* : null */;
2158 short int var7
/* : Bool */;
2159 short int var8
/* : Bool */;
2160 val
* var_other
/* var other: nullable Object */;
2161 short int var10
/* : Bool */;
2162 short int var11
/* : Bool */;
2163 short int var12
/* : Bool */;
2164 /* Covariant cast for argument 0 (k) <p0:Object> isa Collection#0 */
2165 /* <p0:Object> isa Collection#0 */
2166 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
2167 cltype
= type_struct
->color
;
2168 idtype
= type_struct
->id
;
2169 if(cltype
>= p0
->type
->table_size
) {
2172 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2174 if (unlikely(!var1
)) {
2175 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2176 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
2177 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 257);
2182 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2183 var4
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2184 if (unlikely(var4
== NULL
)) {
2185 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2186 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 252);
2194 var5
= hash_collection__HashCollection__node_at(var2
, var_k
);
2198 var7
= 0; /* is null */
2200 var7
= 1; /* arg is null and recv is not */
2203 { /* Inline kernel#Object#!= (var5,var6) on <var5:nullable HashNode[Object](nullable HashMapNode[Object, nullable Object])> */
2206 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])>*/;
2221 /* method hash_collection#HashMapKeys#has for (self: Object, nullable Object): Bool */
2222 short int VIRTUAL_hash_collection__HashMapKeys__has(val
* self
, val
* p0
) {
2223 short int var
/* : Bool */;
2224 short int var1
/* : Bool */;
2225 var1
= hash_collection__HashMapKeys__has(self
, p0
);
2230 /* method hash_collection#HashMapKeys#is_empty for (self: HashMapKeys[Object, nullable Object]): Bool */
2231 short int hash_collection__HashMapKeys__is_empty(val
* self
) {
2232 short int var
/* : Bool */;
2233 val
* var1
/* : HashMap[Object, nullable Object] */;
2234 val
* var3
/* : HashMap[Object, nullable Object] */;
2235 short int var4
/* : Bool */;
2237 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2238 var3
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2239 if (unlikely(var3
== NULL
)) {
2240 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2241 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 252);
2249 var4
= hash_collection__HashMap__is_empty(var1
);
2256 /* method hash_collection#HashMapKeys#is_empty for (self: Object): Bool */
2257 short int VIRTUAL_hash_collection__HashMapKeys__is_empty(val
* self
) {
2258 short int var
/* : Bool */;
2259 short int var1
/* : Bool */;
2260 var1
= hash_collection__HashMapKeys__is_empty(self
);
2265 /* method hash_collection#HashMapKeys#length for (self: HashMapKeys[Object, nullable Object]): Int */
2266 long hash_collection__HashMapKeys__length(val
* self
) {
2267 long var
/* : Int */;
2268 val
* var1
/* : HashMap[Object, nullable Object] */;
2269 val
* var3
/* : HashMap[Object, nullable Object] */;
2270 long var4
/* : Int */;
2272 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2273 var3
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2274 if (unlikely(var3
== NULL
)) {
2275 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2276 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 252);
2284 var4
= hash_collection__HashMap__length(var1
);
2291 /* method hash_collection#HashMapKeys#length for (self: Object): Int */
2292 long VIRTUAL_hash_collection__HashMapKeys__length(val
* self
) {
2293 long var
/* : Int */;
2294 long var1
/* : Int */;
2295 var1
= hash_collection__HashMapKeys__length(self
);
2300 /* method hash_collection#HashMapKeys#iterator for (self: HashMapKeys[Object, nullable Object]): Iterator[Object] */
2301 val
* hash_collection__HashMapKeys__iterator(val
* self
) {
2302 val
* var
/* : Iterator[Object] */;
2303 val
* var1
/* : MapKeysIterator[Object, nullable Object] */;
2304 val
* var2
/* : HashMap[Object, nullable Object] */;
2305 val
* var4
/* : HashMap[Object, nullable Object] */;
2306 val
* var5
/* : HashMapIterator[Object, nullable Object] */;
2307 short int var7
/* : Bool */;
2310 const struct type
* type_struct
;
2311 const char* var_class_name
;
2312 var1
= NEW_abstract_collection__MapKeysIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapKeysIteratorhash_collection__HashMapKeys_FT0hash_collection__HashMapKeys_FT1
]);
2314 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2315 var4
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2316 if (unlikely(var4
== NULL
)) {
2317 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2318 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 252);
2326 var5
= hash_collection__HashMap__iterator(var2
);
2329 { /* Inline abstract_collection#MapKeysIterator#init (var1,var5) on <var1:MapKeysIterator[Object, nullable Object]> */
2330 /* Covariant cast for argument 0 (original_iterator) <var5:HashMapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
2331 /* <var5:HashMapIterator[Object, nullable Object]> isa MapIterator[MapKeysIterator#0, MapKeysIterator#1] */
2332 type_struct
= var1
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapKeysIterator_FT0abstract_collection__MapKeysIterator_FT1
];
2333 cltype
= type_struct
->color
;
2334 idtype
= type_struct
->id
;
2335 if(cltype
>= var5
->type
->table_size
) {
2338 var7
= var5
->type
->type_table
[cltype
] == idtype
;
2340 if (unlikely(!var7
)) {
2341 var_class_name
= var5
== NULL ?
"null" : var5
->type
->name
;
2342 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[MapKeysIterator#0, MapKeysIterator#1]", var_class_name
);
2343 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 528);
2346 var1
->attrs
[COLOR_abstract_collection__MapKeysIterator___original_iterator
].val
= var5
; /* _original_iterator on <var1:MapKeysIterator[Object, nullable Object]> */
2355 /* method hash_collection#HashMapKeys#iterator for (self: Object): Iterator[nullable Object] */
2356 val
* VIRTUAL_hash_collection__HashMapKeys__iterator(val
* self
) {
2357 val
* var
/* : Iterator[nullable Object] */;
2358 val
* var1
/* : Iterator[Object] */;
2359 var1
= hash_collection__HashMapKeys__iterator(self
);
2364 /* method hash_collection#HashMapKeys#clear for (self: HashMapKeys[Object, nullable Object]) */
2365 void hash_collection__HashMapKeys__clear(val
* self
) {
2366 val
* var
/* : HashMap[Object, nullable Object] */;
2367 val
* var2
/* : HashMap[Object, nullable Object] */;
2369 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2370 var2
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2371 if (unlikely(var2
== NULL
)) {
2372 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2373 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 252);
2381 hash_collection__HashMap__clear(var
); /* Direct call hash_collection#HashMap#clear on <var:HashMap[Object, nullable Object]>*/
2385 /* method hash_collection#HashMapKeys#clear for (self: Object) */
2386 void VIRTUAL_hash_collection__HashMapKeys__clear(val
* self
) {
2387 hash_collection__HashMapKeys__clear(self
); /* Direct call hash_collection#HashMapKeys#clear on <self:Object(HashMapKeys[Object, nullable Object])>*/
2390 /* method hash_collection#HashMapKeys#remove for (self: HashMapKeys[Object, nullable Object], Object) */
2391 void hash_collection__HashMapKeys__remove(val
* self
, val
* p0
) {
2392 short int var
/* : Bool */;
2395 const struct type
* type_struct
;
2396 const char* var_class_name
;
2397 val
* var_key
/* var key: Object */;
2398 val
* var1
/* : HashMap[Object, nullable Object] */;
2399 val
* var3
/* : HashMap[Object, nullable Object] */;
2400 /* Covariant cast for argument 0 (key) <p0:Object> isa RemovableCollection#0 */
2401 /* <p0:Object> isa RemovableCollection#0 */
2402 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
2403 cltype
= type_struct
->color
;
2404 idtype
= type_struct
->id
;
2405 if(cltype
>= p0
->type
->table_size
) {
2408 var
= p0
->type
->type_table
[cltype
] == idtype
;
2410 if (unlikely(!var
)) {
2411 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2412 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
2413 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 266);
2418 { /* Inline hash_collection#HashMapKeys#map (self) on <self:HashMapKeys[Object, nullable Object]> */
2419 var3
= self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2420 if (unlikely(var3
== NULL
)) {
2421 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2422 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 252);
2430 hash_collection__HashCollection__remove_node(var1
, var_key
); /* Direct call hash_collection#HashCollection#remove_node on <var1:HashMap[Object, nullable Object]>*/
2434 /* method hash_collection#HashMapKeys#remove for (self: Object, nullable Object) */
2435 void VIRTUAL_hash_collection__HashMapKeys__remove(val
* self
, val
* p0
) {
2436 hash_collection__HashMapKeys__remove(self
, p0
); /* Direct call hash_collection#HashMapKeys#remove on <self:Object(HashMapKeys[Object, nullable Object])>*/
2439 /* method hash_collection#HashMapKeys#init for (self: HashMapKeys[Object, nullable Object], HashMap[Object, nullable Object]) */
2440 void hash_collection__HashMapKeys__init(val
* self
, val
* p0
) {
2441 short int var
/* : Bool */;
2444 const struct type
* type_struct
;
2445 const char* var_class_name
;
2446 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapKeys#0, HashMapKeys#1] */
2447 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapKeys#0, HashMapKeys#1] */
2448 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapKeys_FT0hash_collection__HashMapKeys_FT1
];
2449 cltype
= type_struct
->color
;
2450 idtype
= type_struct
->id
;
2451 if(cltype
>= p0
->type
->table_size
) {
2454 var
= p0
->type
->type_table
[cltype
] == idtype
;
2456 if (unlikely(!var
)) {
2457 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2458 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapKeys#0, HashMapKeys#1]", var_class_name
);
2459 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 249);
2462 self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
= p0
; /* _map on <self:HashMapKeys[Object, nullable Object]> */
2465 /* method hash_collection#HashMapKeys#init for (self: Object, HashMap[Object, nullable Object]) */
2466 void VIRTUAL_hash_collection__HashMapKeys__init(val
* self
, val
* p0
) {
2467 short int var
/* : Bool */;
2470 const struct type
* type_struct
;
2471 const char* var_class_name
;
2472 { /* Inline hash_collection#HashMapKeys#init (self,p0) on <self:Object(HashMapKeys[Object, nullable Object])> */
2473 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapKeys#0, HashMapKeys#1] */
2474 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapKeys#0, HashMapKeys#1] */
2475 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapKeys_FT0hash_collection__HashMapKeys_FT1
];
2476 cltype
= type_struct
->color
;
2477 idtype
= type_struct
->id
;
2478 if(cltype
>= p0
->type
->table_size
) {
2481 var
= p0
->type
->type_table
[cltype
] == idtype
;
2483 if (unlikely(!var
)) {
2484 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2485 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapKeys#0, HashMapKeys#1]", var_class_name
);
2486 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 249);
2489 self
->attrs
[COLOR_hash_collection__HashMapKeys___map
].val
= p0
; /* _map on <self:Object(HashMapKeys[Object, nullable Object])> */
2494 /* method hash_collection#HashMapValues#map for (self: HashMapValues[Object, nullable Object]): HashMap[Object, nullable Object] */
2495 val
* hash_collection__HashMapValues__map(val
* self
) {
2496 val
* var
/* : HashMap[Object, nullable Object] */;
2497 val
* var1
/* : HashMap[Object, nullable Object] */;
2498 var1
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2499 if (unlikely(var1
== NULL
)) {
2500 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2501 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 273);
2508 /* method hash_collection#HashMapValues#map for (self: Object): HashMap[Object, nullable Object] */
2509 val
* VIRTUAL_hash_collection__HashMapValues__map(val
* self
) {
2510 val
* var
/* : HashMap[Object, nullable Object] */;
2511 val
* var1
/* : HashMap[Object, nullable Object] */;
2512 val
* var3
/* : HashMap[Object, nullable Object] */;
2513 { /* Inline hash_collection#HashMapValues#map (self) on <self:Object(HashMapValues[Object, nullable Object])> */
2514 var3
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:Object(HashMapValues[Object, nullable Object])> */
2515 if (unlikely(var3
== NULL
)) {
2516 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2517 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 273);
2527 /* method hash_collection#HashMapValues#first for (self: HashMapValues[Object, nullable Object]): nullable Object */
2528 val
* hash_collection__HashMapValues__first(val
* self
) {
2529 val
* var
/* : nullable Object */;
2530 val
* var1
/* : HashMap[Object, nullable Object] */;
2531 val
* var3
/* : HashMap[Object, nullable Object] */;
2532 val
* var4
/* : nullable HashNode[Object] */;
2533 val
* var5
/* : nullable Object */;
2535 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2536 var3
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2537 if (unlikely(var3
== NULL
)) {
2538 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2539 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 273);
2546 var4
= var1
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[Object, nullable Object]> */
2547 if (unlikely(var4
== NULL
)) {
2548 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2549 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 286);
2552 var5
= var4
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var4:nullable HashNode[Object](nullable HashMapNode[Object, nullable Object])> */
2558 /* method hash_collection#HashMapValues#first for (self: Object): nullable Object */
2559 val
* VIRTUAL_hash_collection__HashMapValues__first(val
* self
) {
2560 val
* var
/* : nullable Object */;
2561 val
* var1
/* : nullable Object */;
2562 var1
= hash_collection__HashMapValues__first(self
);
2567 /* method hash_collection#HashMapValues#has for (self: HashMapValues[Object, nullable Object], nullable Object): Bool */
2568 short int hash_collection__HashMapValues__has(val
* self
, val
* p0
) {
2569 short int var
/* : Bool */;
2570 short int var1
/* : Bool */;
2573 const struct type
* type_struct
;
2574 short int is_nullable
;
2575 const char* var_class_name
;
2576 val
* var_item
/* var item: nullable Object */;
2577 val
* var2
/* : HashMap[Object, nullable Object] */;
2578 val
* var4
/* : HashMap[Object, nullable Object] */;
2579 val
* var5
/* : nullable HashNode[Object] */;
2580 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2581 val
* var6
/* : null */;
2582 short int var7
/* : Bool */;
2583 short int var8
/* : Bool */;
2584 val
* var_other
/* var other: nullable Object */;
2585 short int var10
/* : Bool */;
2586 short int var11
/* : Bool */;
2587 short int var12
/* : Bool */;
2588 val
* var13
/* : nullable Object */;
2589 short int var14
/* : Bool */;
2590 short int var15
/* : Bool */;
2591 short int var16
/* : Bool */;
2592 val
* var17
/* : nullable HashNode[Object] */;
2593 short int var18
/* : Bool */;
2594 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
2595 /* <p0:nullable Object> isa Collection#0 */
2596 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
2597 cltype
= type_struct
->color
;
2598 idtype
= type_struct
->id
;
2599 is_nullable
= type_struct
->is_nullable
;
2603 if(cltype
>= p0
->type
->table_size
) {
2606 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2609 if (unlikely(!var1
)) {
2610 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2611 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
2612 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 288);
2617 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2618 var4
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2619 if (unlikely(var4
== NULL
)) {
2620 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2621 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 273);
2628 var5
= var2
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var2:HashMap[Object, nullable Object]> */
2632 if (var_c
== NULL
) {
2633 var7
= 0; /* is null */
2635 var7
= 1; /* arg is null and recv is not */
2638 { /* Inline kernel#Object#!= (var_c,var6) on <var_c:nullable HashMapNode[Object, nullable Object]> */
2641 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])>*/;
2652 var13
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2653 if (var13
== NULL
) {
2654 var14
= (var_item
== NULL
);
2656 var15
= ((short int (*)(val
*, val
*))(var13
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var13
, var_item
) /* == on <var13:nullable Object>*/;
2665 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])> */
2667 CONTINUE_label
: (void)0;
2669 BREAK_label
: (void)0;
2676 /* method hash_collection#HashMapValues#has for (self: Object, nullable Object): Bool */
2677 short int VIRTUAL_hash_collection__HashMapValues__has(val
* self
, val
* p0
) {
2678 short int var
/* : Bool */;
2679 short int var1
/* : Bool */;
2680 var1
= hash_collection__HashMapValues__has(self
, p0
);
2685 /* method hash_collection#HashMapValues#is_empty for (self: HashMapValues[Object, nullable Object]): Bool */
2686 short int hash_collection__HashMapValues__is_empty(val
* self
) {
2687 short int var
/* : Bool */;
2688 val
* var1
/* : HashMap[Object, nullable Object] */;
2689 val
* var3
/* : HashMap[Object, nullable Object] */;
2690 short int var4
/* : Bool */;
2692 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2693 var3
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2694 if (unlikely(var3
== NULL
)) {
2695 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2696 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 273);
2704 var4
= hash_collection__HashMap__is_empty(var1
);
2711 /* method hash_collection#HashMapValues#is_empty for (self: Object): Bool */
2712 short int VIRTUAL_hash_collection__HashMapValues__is_empty(val
* self
) {
2713 short int var
/* : Bool */;
2714 short int var1
/* : Bool */;
2715 var1
= hash_collection__HashMapValues__is_empty(self
);
2720 /* method hash_collection#HashMapValues#length for (self: HashMapValues[Object, nullable Object]): Int */
2721 long hash_collection__HashMapValues__length(val
* self
) {
2722 long var
/* : Int */;
2723 val
* var1
/* : HashMap[Object, nullable Object] */;
2724 val
* var3
/* : HashMap[Object, nullable Object] */;
2725 long var4
/* : Int */;
2727 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2728 var3
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2729 if (unlikely(var3
== NULL
)) {
2730 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2731 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 273);
2739 var4
= hash_collection__HashMap__length(var1
);
2746 /* method hash_collection#HashMapValues#length for (self: Object): Int */
2747 long VIRTUAL_hash_collection__HashMapValues__length(val
* self
) {
2748 long var
/* : Int */;
2749 long var1
/* : Int */;
2750 var1
= hash_collection__HashMapValues__length(self
);
2755 /* method hash_collection#HashMapValues#iterator for (self: HashMapValues[Object, nullable Object]): Iterator[nullable Object] */
2756 val
* hash_collection__HashMapValues__iterator(val
* self
) {
2757 val
* var
/* : Iterator[nullable Object] */;
2758 val
* var1
/* : MapValuesIterator[Object, nullable Object] */;
2759 val
* var2
/* : HashMap[Object, nullable Object] */;
2760 val
* var4
/* : HashMap[Object, nullable Object] */;
2761 val
* var5
/* : HashMapIterator[Object, nullable Object] */;
2762 short int var7
/* : Bool */;
2765 const struct type
* type_struct
;
2766 const char* var_class_name
;
2767 var1
= NEW_abstract_collection__MapValuesIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapValuesIteratorhash_collection__HashMapValues_FT0hash_collection__HashMapValues_FT1
]);
2769 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2770 var4
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2771 if (unlikely(var4
== NULL
)) {
2772 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2773 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 273);
2781 var5
= hash_collection__HashMap__iterator(var2
);
2784 { /* Inline abstract_collection#MapValuesIterator#init (var1,var5) on <var1:MapValuesIterator[Object, nullable Object]> */
2785 /* Covariant cast for argument 0 (original_iterator) <var5:HashMapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
2786 /* <var5:HashMapIterator[Object, nullable Object]> isa MapIterator[MapValuesIterator#0, MapValuesIterator#1] */
2787 type_struct
= var1
->type
->resolution_table
->types
[COLOR_abstract_collection__MapIteratorabstract_collection__MapValuesIterator_FT0abstract_collection__MapValuesIterator_FT1
];
2788 cltype
= type_struct
->color
;
2789 idtype
= type_struct
->id
;
2790 if(cltype
>= var5
->type
->table_size
) {
2793 var7
= var5
->type
->type_table
[cltype
] == idtype
;
2795 if (unlikely(!var7
)) {
2796 var_class_name
= var5
== NULL ?
"null" : var5
->type
->name
;
2797 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MapIterator[MapValuesIterator#0, MapValuesIterator#1]", var_class_name
);
2798 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/abstract_collection.nit", 539);
2801 var1
->attrs
[COLOR_abstract_collection__MapValuesIterator___original_iterator
].val
= var5
; /* _original_iterator on <var1:MapValuesIterator[Object, nullable Object]> */
2810 /* method hash_collection#HashMapValues#iterator for (self: Object): Iterator[nullable Object] */
2811 val
* VIRTUAL_hash_collection__HashMapValues__iterator(val
* self
) {
2812 val
* var
/* : Iterator[nullable Object] */;
2813 val
* var1
/* : Iterator[nullable Object] */;
2814 var1
= hash_collection__HashMapValues__iterator(self
);
2819 /* method hash_collection#HashMapValues#clear for (self: HashMapValues[Object, nullable Object]) */
2820 void hash_collection__HashMapValues__clear(val
* self
) {
2821 val
* var
/* : HashMap[Object, nullable Object] */;
2822 val
* var2
/* : HashMap[Object, nullable Object] */;
2824 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2825 var2
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2826 if (unlikely(var2
== NULL
)) {
2827 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2828 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 273);
2836 hash_collection__HashMap__clear(var
); /* Direct call hash_collection#HashMap#clear on <var:HashMap[Object, nullable Object]>*/
2840 /* method hash_collection#HashMapValues#clear for (self: Object) */
2841 void VIRTUAL_hash_collection__HashMapValues__clear(val
* self
) {
2842 hash_collection__HashMapValues__clear(self
); /* Direct call hash_collection#HashMapValues#clear on <self:Object(HashMapValues[Object, nullable Object])>*/
2845 /* method hash_collection#HashMapValues#remove for (self: HashMapValues[Object, nullable Object], nullable Object) */
2846 void hash_collection__HashMapValues__remove(val
* self
, val
* p0
) {
2847 short int var
/* : Bool */;
2850 const struct type
* type_struct
;
2851 short int is_nullable
;
2852 const char* var_class_name
;
2853 val
* var_item
/* var item: nullable Object */;
2854 val
* var1
/* : HashMap[Object, nullable Object] */;
2855 val
* var3
/* : HashMap[Object, nullable Object] */;
2856 val
* var_map
/* var map: HashMap[Object, nullable Object] */;
2857 val
* var4
/* : nullable HashNode[Object] */;
2858 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2859 val
* var5
/* : null */;
2860 short int var6
/* : Bool */;
2861 short int var7
/* : Bool */;
2862 val
* var_other
/* var other: nullable Object */;
2863 short int var9
/* : Bool */;
2864 short int var10
/* : Bool */;
2865 short int var11
/* : Bool */;
2866 val
* var12
/* : nullable Object */;
2867 short int var13
/* : Bool */;
2868 short int var14
/* : Bool */;
2869 val
* var15
/* : Object */;
2870 val
* var16
/* : nullable HashNode[Object] */;
2871 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa RemovableCollection#0 */
2872 /* <p0:nullable Object> isa RemovableCollection#0 */
2873 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
2874 cltype
= type_struct
->color
;
2875 idtype
= type_struct
->id
;
2876 is_nullable
= type_struct
->is_nullable
;
2880 if(cltype
>= p0
->type
->table_size
) {
2883 var
= p0
->type
->type_table
[cltype
] == idtype
;
2886 if (unlikely(!var
)) {
2887 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2888 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
2889 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 315);
2894 { /* Inline hash_collection#HashMapValues#map (self) on <self:HashMapValues[Object, nullable Object]> */
2895 var3
= self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2896 if (unlikely(var3
== NULL
)) {
2897 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map");
2898 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 273);
2906 var4
= var_map
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_map:HashMap[Object, nullable Object]> */
2910 if (var_c
== NULL
) {
2911 var6
= 0; /* is null */
2913 var6
= 1; /* arg is null and recv is not */
2916 { /* Inline kernel#Object#!= (var_c,var5) on <var_c:nullable HashMapNode[Object, nullable Object]> */
2919 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])>*/;
2930 var12
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2931 if (var12
== NULL
) {
2932 var13
= (var_item
== NULL
);
2934 var14
= ((short int (*)(val
*, val
*))(var12
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var12
, var_item
) /* == on <var12:nullable Object>*/;
2938 var15
= var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2939 if (unlikely(var15
== NULL
)) {
2940 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
2941 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 321);
2945 hash_collection__HashCollection__remove_node(var_map
, var15
); /* Direct call hash_collection#HashCollection#remove_node on <var_map:HashMap[Object, nullable Object]>*/
2950 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])> */
2952 CONTINUE_label
: (void)0;
2954 BREAK_label
: (void)0;
2957 /* method hash_collection#HashMapValues#remove for (self: Object, nullable Object) */
2958 void VIRTUAL_hash_collection__HashMapValues__remove(val
* self
, val
* p0
) {
2959 hash_collection__HashMapValues__remove(self
, p0
); /* Direct call hash_collection#HashMapValues#remove on <self:Object(HashMapValues[Object, nullable Object])>*/
2962 /* method hash_collection#HashMapValues#init for (self: HashMapValues[Object, nullable Object], HashMap[Object, nullable Object]) */
2963 void hash_collection__HashMapValues__init(val
* self
, val
* p0
) {
2964 short int var
/* : Bool */;
2967 const struct type
* type_struct
;
2968 const char* var_class_name
;
2969 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapValues#0, HashMapValues#1] */
2970 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapValues#0, HashMapValues#1] */
2971 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapValues_FT0hash_collection__HashMapValues_FT1
];
2972 cltype
= type_struct
->color
;
2973 idtype
= type_struct
->id
;
2974 if(cltype
>= p0
->type
->table_size
) {
2977 var
= p0
->type
->type_table
[cltype
] == idtype
;
2979 if (unlikely(!var
)) {
2980 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2981 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapValues#0, HashMapValues#1]", var_class_name
);
2982 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 270);
2985 self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
= p0
; /* _map on <self:HashMapValues[Object, nullable Object]> */
2988 /* method hash_collection#HashMapValues#init for (self: Object, HashMap[Object, nullable Object]) */
2989 void VIRTUAL_hash_collection__HashMapValues__init(val
* self
, val
* p0
) {
2990 short int var
/* : Bool */;
2993 const struct type
* type_struct
;
2994 const char* var_class_name
;
2995 { /* Inline hash_collection#HashMapValues#init (self,p0) on <self:Object(HashMapValues[Object, nullable Object])> */
2996 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapValues#0, HashMapValues#1] */
2997 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapValues#0, HashMapValues#1] */
2998 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapValues_FT0hash_collection__HashMapValues_FT1
];
2999 cltype
= type_struct
->color
;
3000 idtype
= type_struct
->id
;
3001 if(cltype
>= p0
->type
->table_size
) {
3004 var
= p0
->type
->type_table
[cltype
] == idtype
;
3006 if (unlikely(!var
)) {
3007 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3008 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapValues#0, HashMapValues#1]", var_class_name
);
3009 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 270);
3012 self
->attrs
[COLOR_hash_collection__HashMapValues___map
].val
= p0
; /* _map on <self:Object(HashMapValues[Object, nullable Object])> */
3017 /* method hash_collection#HashMapNode#init for (self: HashMapNode[Object, nullable Object], Object, nullable Object) */
3018 void hash_collection__HashMapNode__init(val
* self
, val
* p0
, val
* p1
) {
3019 short int var
/* : Bool */;
3022 const struct type
* type_struct
;
3023 const char* var_class_name
;
3024 short int var1
/* : Bool */;
3027 const struct type
* type_struct4
;
3028 short int is_nullable
;
3029 const char* var_class_name5
;
3030 val
* var_k
/* var k: Object */;
3031 val
* var_v
/* var v: nullable Object */;
3032 /* Covariant cast for argument 0 (k) <p0:Object> isa HashMapNode#0 */
3033 /* <p0:Object> isa HashMapNode#0 */
3034 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapNode_FT0
];
3035 cltype
= type_struct
->color
;
3036 idtype
= type_struct
->id
;
3037 if(cltype
>= p0
->type
->table_size
) {
3040 var
= p0
->type
->type_table
[cltype
] == idtype
;
3042 if (unlikely(!var
)) {
3043 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3044 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMapNode#0", var_class_name
);
3045 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 346);
3048 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa HashMapNode#1 */
3049 /* <p1:nullable Object> isa HashMapNode#1 */
3050 type_struct4
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapNode_FT1
];
3051 cltype2
= type_struct4
->color
;
3052 idtype3
= type_struct4
->id
;
3053 is_nullable
= type_struct4
->is_nullable
;
3057 if(cltype2
>= p1
->type
->table_size
) {
3060 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
3063 if (unlikely(!var1
)) {
3064 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
3065 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMapNode#1", var_class_name5
);
3066 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 346);
3072 hash_collection__HashNode__init(self
, var_k
); /* Direct call hash_collection#HashNode#init on <self:HashMapNode[Object, nullable Object]>*/
3074 self
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
= var_v
; /* _value on <self:HashMapNode[Object, nullable Object]> */
3077 /* method hash_collection#HashMapNode#init for (self: Object, Object, nullable Object) */
3078 void VIRTUAL_hash_collection__HashMapNode__init(val
* self
, val
* p0
, val
* p1
) {
3079 hash_collection__HashMapNode__init(self
, p0
, p1
); /* Direct call hash_collection#HashMapNode#init on <self:Object(HashMapNode[Object, nullable Object])>*/
3082 /* method hash_collection#HashMapIterator#is_ok for (self: HashMapIterator[Object, nullable Object]): Bool */
3083 short int hash_collection__HashMapIterator__is_ok(val
* self
) {
3084 short int var
/* : Bool */;
3085 val
* var1
/* : nullable HashMapNode[Object, nullable Object] */;
3086 val
* var2
/* : null */;
3087 short int var3
/* : Bool */;
3088 short int var4
/* : Bool */;
3089 val
* var_other
/* var other: nullable Object */;
3090 short int var6
/* : Bool */;
3091 short int var7
/* : Bool */;
3092 short int var8
/* : Bool */;
3093 var1
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
3096 var3
= 0; /* is null */
3098 var3
= 1; /* arg is null and recv is not */
3101 { /* Inline kernel#Object#!= (var1,var2) on <var1:nullable HashMapNode[Object, nullable Object]> */
3104 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])>*/;
3119 /* method hash_collection#HashMapIterator#is_ok for (self: Object): Bool */
3120 short int VIRTUAL_hash_collection__HashMapIterator__is_ok(val
* self
) {
3121 short int var
/* : Bool */;
3122 short int var1
/* : Bool */;
3123 var1
= hash_collection__HashMapIterator__is_ok(self
);
3128 /* method hash_collection#HashMapIterator#item for (self: HashMapIterator[Object, nullable Object]): nullable Object */
3129 val
* hash_collection__HashMapIterator__item(val
* self
) {
3130 val
* var
/* : nullable Object */;
3131 short int var1
/* : Bool */;
3132 val
* var2
/* : nullable HashMapNode[Object, nullable Object] */;
3133 val
* var3
/* : nullable Object */;
3135 var1
= hash_collection__HashMapIterator__is_ok(self
);
3137 if (unlikely(!var1
)) {
3138 PRINT_ERROR("Runtime error: %s", "Assert failed");
3139 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 359);
3142 var2
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
3143 if (unlikely(var2
== NULL
)) {
3144 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3145 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 360);
3148 var3
= var2
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var2:nullable HashMapNode[Object, nullable Object]> */
3154 /* method hash_collection#HashMapIterator#item for (self: Object): nullable Object */
3155 val
* VIRTUAL_hash_collection__HashMapIterator__item(val
* self
) {
3156 val
* var
/* : nullable Object */;
3157 val
* var1
/* : nullable Object */;
3158 var1
= hash_collection__HashMapIterator__item(self
);
3163 /* method hash_collection#HashMapIterator#key for (self: HashMapIterator[Object, nullable Object]): Object */
3164 val
* hash_collection__HashMapIterator__key(val
* self
) {
3165 val
* var
/* : Object */;
3166 short int var1
/* : Bool */;
3167 val
* var2
/* : nullable HashMapNode[Object, nullable Object] */;
3168 val
* var3
/* : Object */;
3170 var1
= hash_collection__HashMapIterator__is_ok(self
);
3172 if (unlikely(!var1
)) {
3173 PRINT_ERROR("Runtime error: %s", "Assert failed");
3174 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 371);
3177 var2
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
3178 if (unlikely(var2
== NULL
)) {
3179 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3180 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 372);
3183 var3
= var2
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashMapNode[Object, nullable Object]> */
3184 if (unlikely(var3
== NULL
)) {
3185 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
3186 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 372);
3194 /* method hash_collection#HashMapIterator#key for (self: Object): Object */
3195 val
* VIRTUAL_hash_collection__HashMapIterator__key(val
* self
) {
3196 val
* var
/* : Object */;
3197 val
* var1
/* : Object */;
3198 var1
= hash_collection__HashMapIterator__key(self
);
3203 /* method hash_collection#HashMapIterator#next for (self: HashMapIterator[Object, nullable Object]) */
3204 void hash_collection__HashMapIterator__next(val
* self
) {
3205 short int var
/* : Bool */;
3206 val
* var1
/* : nullable HashMapNode[Object, nullable Object] */;
3207 val
* var2
/* : nullable HashNode[Object] */;
3209 var
= hash_collection__HashMapIterator__is_ok(self
);
3211 if (unlikely(!var
)) {
3212 PRINT_ERROR("Runtime error: %s", "Assert failed");
3213 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 377);
3216 var1
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
3217 if (unlikely(var1
== NULL
)) {
3218 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3219 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 378);
3222 var2
= var1
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var1:nullable HashMapNode[Object, nullable Object]> */
3223 self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
= var2
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
3226 /* method hash_collection#HashMapIterator#next for (self: Object) */
3227 void VIRTUAL_hash_collection__HashMapIterator__next(val
* self
) {
3228 hash_collection__HashMapIterator__next(self
); /* Direct call hash_collection#HashMapIterator#next on <self:Object(HashMapIterator[Object, nullable Object])>*/
3231 /* method hash_collection#HashMapIterator#init for (self: HashMapIterator[Object, nullable Object], HashMap[Object, nullable Object]) */
3232 void hash_collection__HashMapIterator__init(val
* self
, val
* p0
) {
3233 short int var
/* : Bool */;
3236 const struct type
* type_struct
;
3237 const char* var_class_name
;
3238 val
* var_map
/* var map: HashMap[Object, nullable Object] */;
3239 val
* var1
/* : nullable HashNode[Object] */;
3240 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapIterator#0, HashMapIterator#1] */
3241 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapIterator#0, HashMapIterator#1] */
3242 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapIterator_FT0hash_collection__HashMapIterator_FT1
];
3243 cltype
= type_struct
->color
;
3244 idtype
= type_struct
->id
;
3245 if(cltype
>= p0
->type
->table_size
) {
3248 var
= p0
->type
->type_table
[cltype
] == idtype
;
3250 if (unlikely(!var
)) {
3251 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3252 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapIterator#0, HashMapIterator#1]", var_class_name
);
3253 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 387);
3257 self
->attrs
[COLOR_hash_collection__HashMapIterator___map
].val
= var_map
; /* _map on <self:HashMapIterator[Object, nullable Object]> */
3258 var1
= var_map
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_map:HashMap[Object, nullable Object]> */
3259 self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
= var1
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
3262 /* method hash_collection#HashMapIterator#init for (self: Object, HashMap[Object, nullable Object]) */
3263 void VIRTUAL_hash_collection__HashMapIterator__init(val
* self
, val
* p0
) {
3264 hash_collection__HashMapIterator__init(self
, p0
); /* Direct call hash_collection#HashMapIterator#init on <self:Object(HashMapIterator[Object, nullable Object])>*/
3267 /* method hash_collection#HashSet#length for (self: HashSet[Object]): Int */
3268 long hash_collection__HashSet__length(val
* self
) {
3269 long var
/* : Int */;
3270 long var1
/* : Int */;
3271 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashSet[Object]> */
3277 /* method hash_collection#HashSet#length for (self: Object): Int */
3278 long VIRTUAL_hash_collection__HashSet__length(val
* self
) {
3279 long var
/* : Int */;
3280 long var1
/* : Int */;
3281 var1
= hash_collection__HashSet__length(self
);
3286 /* method hash_collection#HashSet#is_empty for (self: HashSet[Object]): Bool */
3287 short int hash_collection__HashSet__is_empty(val
* self
) {
3288 short int var
/* : Bool */;
3289 long var1
/* : Int */;
3290 long var2
/* : Int */;
3291 short int var3
/* : Bool */;
3292 short int var4
/* : Bool */;
3293 short int var6
/* : Bool */;
3294 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashSet[Object]> */
3297 { /* Inline kernel#Int#== (var1,var2) on <var1:Int> */
3298 var6
= var1
== var2
;
3310 /* method hash_collection#HashSet#is_empty for (self: Object): Bool */
3311 short int VIRTUAL_hash_collection__HashSet__is_empty(val
* self
) {
3312 short int var
/* : Bool */;
3313 short int var1
/* : Bool */;
3314 var1
= hash_collection__HashSet__is_empty(self
);
3319 /* method hash_collection#HashSet#first for (self: HashSet[Object]): Object */
3320 val
* hash_collection__HashSet__first(val
* self
) {
3321 val
* var
/* : Object */;
3322 long var1
/* : Int */;
3323 long var2
/* : Int */;
3324 short int var3
/* : Bool */;
3325 short int var5
/* : Bool */;
3328 const char* var_class_name
;
3329 short int var6
/* : Bool */;
3330 val
* var7
/* : nullable HashNode[Object] */;
3331 val
* var8
/* : Object */;
3332 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashSet[Object]> */
3335 { /* Inline kernel#Int#> (var1,var2) on <var1:Int> */
3336 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
3337 /* <var2:Int> isa OTHER */
3338 var5
= 1; /* easy <var2:Int> isa OTHER*/
3339 if (unlikely(!var5
)) {
3340 var_class_name
= type_kernel__Int
.name
;
3341 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
3342 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 327);
3351 if (unlikely(!var3
)) {
3352 PRINT_ERROR("Runtime error: %s", "Assert failed");
3353 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 406);
3356 var7
= self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashSet[Object]> */
3357 if (unlikely(var7
== NULL
)) {
3358 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3359 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 407);
3362 var8
= var7
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var7:nullable HashNode[Object](nullable HashSetNode[Object])> */
3363 if (unlikely(var8
== NULL
)) {
3364 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
3365 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 407);
3373 /* method hash_collection#HashSet#first for (self: Object): nullable Object */
3374 val
* VIRTUAL_hash_collection__HashSet__first(val
* self
) {
3375 val
* var
/* : nullable Object */;
3376 val
* var1
/* : Object */;
3377 var1
= hash_collection__HashSet__first(self
);
3382 /* method hash_collection#HashSet#has for (self: HashSet[Object], Object): Bool */
3383 short int hash_collection__HashSet__has(val
* self
, val
* p0
) {
3384 short int var
/* : Bool */;
3385 short int var1
/* : Bool */;
3388 const struct type
* type_struct
;
3389 const char* var_class_name
;
3390 val
* var_item
/* var item: Object */;
3391 val
* var2
/* : nullable HashNode[Object] */;
3392 val
* var3
/* : null */;
3393 short int var4
/* : Bool */;
3394 short int var5
/* : Bool */;
3395 val
* var_other
/* var other: nullable Object */;
3396 short int var7
/* : Bool */;
3397 short int var8
/* : Bool */;
3398 short int var9
/* : Bool */;
3399 /* Covariant cast for argument 0 (item) <p0:Object> isa Collection#0 */
3400 /* <p0:Object> isa Collection#0 */
3401 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
3402 cltype
= type_struct
->color
;
3403 idtype
= type_struct
->id
;
3404 if(cltype
>= p0
->type
->table_size
) {
3407 var1
= p0
->type
->type_table
[cltype
] == idtype
;
3409 if (unlikely(!var1
)) {
3410 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3411 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
3412 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 410);
3417 var2
= hash_collection__HashCollection__node_at(self
, var_item
);
3421 var4
= 0; /* is null */
3423 var4
= 1; /* arg is null and recv is not */
3426 { /* Inline kernel#Object#!= (var2,var3) on <var2:nullable HashNode[Object](nullable HashSetNode[Object])> */
3429 var8
= ((short int (*)(val
*, val
*))(var2
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var2
, var_other
) /* == on <var2:nullable HashSetNode[Object](HashSetNode[Object])>*/;
3444 /* method hash_collection#HashSet#has for (self: Object, nullable Object): Bool */
3445 short int VIRTUAL_hash_collection__HashSet__has(val
* self
, val
* p0
) {
3446 short int var
/* : Bool */;
3447 short int var1
/* : Bool */;
3448 var1
= hash_collection__HashSet__has(self
, p0
);
3453 /* method hash_collection#HashSet#add for (self: HashSet[Object], Object) */
3454 void hash_collection__HashSet__add(val
* self
, val
* p0
) {
3455 short int var
/* : Bool */;
3458 const struct type
* type_struct
;
3459 const char* var_class_name
;
3460 val
* var_item
/* var item: Object */;
3461 long var1
/* : Int */;
3462 long var_i
/* var i: Int */;
3463 val
* var2
/* : nullable HashNode[Object] */;
3464 val
* var_c
/* var c: nullable HashSetNode[Object] */;
3465 val
* var3
/* : null */;
3466 short int var4
/* : Bool */;
3467 short int var5
/* : Bool */;
3468 val
* var_other
/* var other: nullable Object */;
3469 short int var7
/* : Bool */;
3470 short int var8
/* : Bool */;
3471 short int var9
/* : Bool */;
3472 val
* var10
/* : HashSetNode[Object] */;
3473 /* Covariant cast for argument 0 (item) <p0:Object> isa SimpleCollection#0 */
3474 /* <p0:Object> isa SimpleCollection#0 */
3475 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SimpleCollection_FT0
];
3476 cltype
= type_struct
->color
;
3477 idtype
= type_struct
->id
;
3478 if(cltype
>= p0
->type
->table_size
) {
3481 var
= p0
->type
->type_table
[cltype
] == idtype
;
3483 if (unlikely(!var
)) {
3484 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3485 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "SimpleCollection#0", var_class_name
);
3486 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 415);
3491 var1
= hash_collection__HashCollection__index_at(self
, var_item
);
3495 var2
= hash_collection__HashCollection__node_at_idx(self
, var_i
, var_item
);
3499 if (var_c
== NULL
) {
3500 var4
= 0; /* is null */
3502 var4
= 1; /* arg is null and recv is not */
3505 { /* Inline kernel#Object#!= (var_c,var3) on <var_c:nullable HashSetNode[Object]> */
3508 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])>*/;
3519 var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_item
; /* _key on <var_c:nullable HashSetNode[Object](HashSetNode[Object])> */
3521 var10
= NEW_hash_collection__HashSetNode(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSetNodehash_collection__HashSet_FT0
]);
3523 hash_collection__HashSetNode__init(var10
, var_item
); /* Direct call hash_collection#HashSetNode#init on <var10:HashSetNode[Object]>*/
3526 hash_collection__HashCollection__store(self
, var_i
, var10
); /* Direct call hash_collection#HashCollection#store on <self:HashSet[Object]>*/
3531 /* method hash_collection#HashSet#add for (self: Object, nullable Object) */
3532 void VIRTUAL_hash_collection__HashSet__add(val
* self
, val
* p0
) {
3533 hash_collection__HashSet__add(self
, p0
); /* Direct call hash_collection#HashSet#add on <self:Object(HashSet[Object])>*/
3536 /* method hash_collection#HashSet#remove for (self: HashSet[Object], Object) */
3537 void hash_collection__HashSet__remove(val
* self
, val
* p0
) {
3538 short int var
/* : Bool */;
3541 const struct type
* type_struct
;
3542 const char* var_class_name
;
3543 val
* var_item
/* var item: Object */;
3544 /* Covariant cast for argument 0 (item) <p0:Object> isa RemovableCollection#0 */
3545 /* <p0:Object> isa RemovableCollection#0 */
3546 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
3547 cltype
= type_struct
->color
;
3548 idtype
= type_struct
->id
;
3549 if(cltype
>= p0
->type
->table_size
) {
3552 var
= p0
->type
->type_table
[cltype
] == idtype
;
3554 if (unlikely(!var
)) {
3555 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3556 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
3557 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 426);
3562 hash_collection__HashCollection__remove_node(self
, var_item
); /* Direct call hash_collection#HashCollection#remove_node on <self:HashSet[Object]>*/
3566 /* method hash_collection#HashSet#remove for (self: Object, nullable Object) */
3567 void VIRTUAL_hash_collection__HashSet__remove(val
* self
, val
* p0
) {
3568 hash_collection__HashSet__remove(self
, p0
); /* Direct call hash_collection#HashSet#remove on <self:Object(HashSet[Object])>*/
3571 /* method hash_collection#HashSet#clear for (self: HashSet[Object]) */
3572 void hash_collection__HashSet__clear(val
* self
) {
3574 hash_collection__HashCollection__raz(self
); /* Direct call hash_collection#HashCollection#raz on <self:HashSet[Object]>*/
3578 /* method hash_collection#HashSet#clear for (self: Object) */
3579 void VIRTUAL_hash_collection__HashSet__clear(val
* self
) {
3580 hash_collection__HashSet__clear(self
); /* Direct call hash_collection#HashSet#clear on <self:Object(HashSet[Object])>*/
3583 /* method hash_collection#HashSet#iterator for (self: HashSet[Object]): Iterator[Object] */
3584 val
* hash_collection__HashSet__iterator(val
* self
) {
3585 val
* var
/* : Iterator[Object] */;
3586 val
* var1
/* : HashSetIterator[Object] */;
3587 var1
= NEW_hash_collection__HashSetIterator(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSetIteratorhash_collection__HashSet_FT0
]);
3589 hash_collection__HashSetIterator__init(var1
, self
); /* Direct call hash_collection#HashSetIterator#init on <var1:HashSetIterator[Object]>*/
3596 /* method hash_collection#HashSet#iterator for (self: Object): Iterator[nullable Object] */
3597 val
* VIRTUAL_hash_collection__HashSet__iterator(val
* self
) {
3598 val
* var
/* : Iterator[nullable Object] */;
3599 val
* var1
/* : Iterator[Object] */;
3600 var1
= hash_collection__HashSet__iterator(self
);
3605 /* method hash_collection#HashSet#init for (self: HashSet[Object]) */
3606 void hash_collection__HashSet__init(val
* self
) {
3607 long var
/* : Int */;
3608 long var2
/* : Int */;
3609 long var3
/* : Int */;
3611 { /* Inline hash_collection#HashCollection#init (self) on <self:HashSet[Object]> */
3616 self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
= var
; /* _capacity on <self:HashSet[Object]> */
3618 self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
= var2
; /* _length on <self:HashSet[Object]> */
3621 hash_collection__HashCollection__enlarge(self
, var3
); /* Direct call hash_collection#HashCollection#enlarge on <self:HashSet[Object]>*/
3625 /* method hash_collection#HashSet#init for (self: Object) */
3626 void VIRTUAL_hash_collection__HashSet__init(val
* self
) {
3627 hash_collection__HashSet__init(self
); /* Direct call hash_collection#HashSet#init on <self:Object(HashSet[Object])>*/
3630 /* method hash_collection#HashSet#from for (self: HashSet[Object], Collection[Object]) */
3631 void hash_collection__HashSet__from(val
* self
, val
* p0
) {
3632 short int var
/* : Bool */;
3635 const struct type
* type_struct
;
3636 const char* var_class_name
;
3637 val
* var_coll
/* var coll: Collection[Object] */;
3638 /* Covariant cast for argument 0 (coll) <p0:Collection[Object]> isa Collection[HashSet#0] */
3639 /* <p0:Collection[Object]> isa Collection[HashSet#0] */
3640 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionhash_collection__HashSet_FT0
];
3641 cltype
= type_struct
->color
;
3642 idtype
= type_struct
->id
;
3643 if(cltype
>= p0
->type
->table_size
) {
3646 var
= p0
->type
->type_table
[cltype
] == idtype
;
3648 if (unlikely(!var
)) {
3649 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3650 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[HashSet#0]", var_class_name
);
3651 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 439);
3656 hash_collection__HashSet__init(self
); /* Direct call hash_collection#HashSet#init on <self:HashSet[Object]>*/
3659 abstract_collection__SimpleCollection__add_all(self
, var_coll
); /* Direct call abstract_collection#SimpleCollection#add_all on <self:HashSet[Object]>*/
3663 /* method hash_collection#HashSet#from for (self: Object, Collection[Object]) */
3664 void VIRTUAL_hash_collection__HashSet__from(val
* self
, val
* p0
) {
3665 hash_collection__HashSet__from(self
, p0
); /* Direct call hash_collection#HashSet#from on <self:Object(HashSet[Object])>*/
3668 /* method hash_collection#HashSetNode#init for (self: HashSetNode[Object], Object) */
3669 void hash_collection__HashSetNode__init(val
* self
, val
* p0
) {
3670 short int var
/* : Bool */;
3673 const struct type
* type_struct
;
3674 const char* var_class_name
;
3675 val
* var_e
/* var e: Object */;
3676 /* Covariant cast for argument 0 (e) <p0:Object> isa HashSetNode#0 */
3677 /* <p0:Object> isa HashSetNode#0 */
3678 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSetNode_FT0
];
3679 cltype
= type_struct
->color
;
3680 idtype
= type_struct
->id
;
3681 if(cltype
>= p0
->type
->table_size
) {
3684 var
= p0
->type
->type_table
[cltype
] == idtype
;
3686 if (unlikely(!var
)) {
3687 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3688 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSetNode#0", var_class_name
);
3689 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 452);
3693 hash_collection__HashNode__init(self
, p0
); /* Direct call hash_collection#HashNode#init on <self:HashSetNode[Object]>*/
3696 self
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_e
; /* _key on <self:HashSetNode[Object]> */
3699 /* method hash_collection#HashSetNode#init for (self: Object, Object) */
3700 void VIRTUAL_hash_collection__HashSetNode__init(val
* self
, val
* p0
) {
3701 hash_collection__HashSetNode__init(self
, p0
); /* Direct call hash_collection#HashSetNode#init on <self:Object(HashSetNode[Object])>*/
3704 /* method hash_collection#HashSetIterator#is_ok for (self: HashSetIterator[Object]): Bool */
3705 short int hash_collection__HashSetIterator__is_ok(val
* self
) {
3706 short int var
/* : Bool */;
3707 val
* var1
/* : nullable HashSetNode[Object] */;
3708 val
* var2
/* : null */;
3709 short int var3
/* : Bool */;
3710 short int var4
/* : Bool */;
3711 val
* var_other
/* var other: nullable Object */;
3712 short int var6
/* : Bool */;
3713 short int var7
/* : Bool */;
3714 short int var8
/* : Bool */;
3715 var1
= self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[Object]> */
3718 var3
= 0; /* is null */
3720 var3
= 1; /* arg is null and recv is not */
3723 { /* Inline kernel#Object#!= (var1,var2) on <var1:nullable HashSetNode[Object]> */
3726 var7
= ((short int (*)(val
*, val
*))(var1
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var1
, var_other
) /* == on <var1:nullable HashSetNode[Object](HashSetNode[Object])>*/;
3741 /* method hash_collection#HashSetIterator#is_ok for (self: Object): Bool */
3742 short int VIRTUAL_hash_collection__HashSetIterator__is_ok(val
* self
) {
3743 short int var
/* : Bool */;
3744 short int var1
/* : Bool */;
3745 var1
= hash_collection__HashSetIterator__is_ok(self
);
3750 /* method hash_collection#HashSetIterator#item for (self: HashSetIterator[Object]): Object */
3751 val
* hash_collection__HashSetIterator__item(val
* self
) {
3752 val
* var
/* : Object */;
3753 short int var1
/* : Bool */;
3754 val
* var2
/* : nullable HashSetNode[Object] */;
3755 val
* var3
/* : Object */;
3757 var1
= hash_collection__HashSetIterator__is_ok(self
);
3759 if (unlikely(!var1
)) {
3760 PRINT_ERROR("Runtime error: %s", "Assert failed");
3761 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 464);
3764 var2
= self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[Object]> */
3765 if (unlikely(var2
== NULL
)) {
3766 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3767 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 465);
3770 var3
= var2
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashSetNode[Object]> */
3771 if (unlikely(var3
== NULL
)) {
3772 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _key");
3773 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 465);
3781 /* method hash_collection#HashSetIterator#item for (self: Object): nullable Object */
3782 val
* VIRTUAL_hash_collection__HashSetIterator__item(val
* self
) {
3783 val
* var
/* : nullable Object */;
3784 val
* var1
/* : Object */;
3785 var1
= hash_collection__HashSetIterator__item(self
);
3790 /* method hash_collection#HashSetIterator#next for (self: HashSetIterator[Object]) */
3791 void hash_collection__HashSetIterator__next(val
* self
) {
3792 short int var
/* : Bool */;
3793 val
* var1
/* : nullable HashSetNode[Object] */;
3794 val
* var2
/* : nullable HashNode[Object] */;
3796 var
= hash_collection__HashSetIterator__is_ok(self
);
3798 if (unlikely(!var
)) {
3799 PRINT_ERROR("Runtime error: %s", "Assert failed");
3800 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 470);
3803 var1
= self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[Object]> */
3804 if (unlikely(var1
== NULL
)) {
3805 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3806 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 471);
3809 var2
= var1
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var1:nullable HashSetNode[Object]> */
3810 self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
= var2
; /* _node on <self:HashSetIterator[Object]> */
3813 /* method hash_collection#HashSetIterator#next for (self: Object) */
3814 void VIRTUAL_hash_collection__HashSetIterator__next(val
* self
) {
3815 hash_collection__HashSetIterator__next(self
); /* Direct call hash_collection#HashSetIterator#next on <self:Object(HashSetIterator[Object])>*/
3818 /* method hash_collection#HashSetIterator#init for (self: HashSetIterator[Object], HashSet[Object]) */
3819 void hash_collection__HashSetIterator__init(val
* self
, val
* p0
) {
3820 short int var
/* : Bool */;
3823 const struct type
* type_struct
;
3824 const char* var_class_name
;
3825 val
* var_set
/* var set: HashSet[Object] */;
3826 val
* var1
/* : nullable HashNode[Object] */;
3827 /* Covariant cast for argument 0 (set) <p0:HashSet[Object]> isa HashSet[HashSetIterator#0] */
3828 /* <p0:HashSet[Object]> isa HashSet[HashSetIterator#0] */
3829 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSethash_collection__HashSetIterator_FT0
];
3830 cltype
= type_struct
->color
;
3831 idtype
= type_struct
->id
;
3832 if(cltype
>= p0
->type
->table_size
) {
3835 var
= p0
->type
->type_table
[cltype
] == idtype
;
3837 if (unlikely(!var
)) {
3838 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3839 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSet[HashSetIterator#0]", var_class_name
);
3840 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 480);
3844 self
->attrs
[COLOR_hash_collection__HashSetIterator___set
].val
= var_set
; /* _set on <self:HashSetIterator[Object]> */
3845 var1
= var_set
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_set:HashSet[Object]> */
3846 self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
= var1
; /* _node on <self:HashSetIterator[Object]> */
3849 /* method hash_collection#HashSetIterator#init for (self: Object, HashSet[Object]) */
3850 void VIRTUAL_hash_collection__HashSetIterator__init(val
* self
, val
* p0
) {
3851 hash_collection__HashSetIterator__init(self
, p0
); /* Direct call hash_collection#HashSetIterator#init on <self:Object(HashSetIterator[Object])>*/