1 #include "hash_collection.sep.0.h"
2 /* method hash_collection#HashCollection#first_item for (self: HashCollection[Object, HashNode[Object]]): nullable HashNode[Object] */
3 val
* hash_collection__HashCollection__first_item(val
* self
) {
4 val
* var
/* : nullable HashNode[Object] */;
5 val
* var1
/* : nullable HashNode[Object] */;
6 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
11 /* method hash_collection#HashCollection#first_item for (self: Object): nullable HashNode[Object] */
12 val
* VIRTUAL_hash_collection__HashCollection__first_item(val
* self
) {
13 val
* var
/* : nullable HashNode[Object] */;
14 val
* var1
/* : nullable HashNode[Object] */;
15 var1
= hash_collection__HashCollection__first_item(self
);
20 /* method hash_collection#HashCollection#index_at for (self: HashCollection[Object, HashNode[Object]], Object): Int */
21 long hash_collection__HashCollection__index_at(val
* self
, val
* p0
) {
23 short int var1
/* : Bool */;
26 const struct type
* type_struct
;
27 const char* var_class_name
;
28 val
* var_k
/* var k: Object */;
29 long var2
/* : Int */;
30 long var3
/* : Int */;
31 long var4
/* : Int */;
32 long var6
/* : Int */;
33 long var_i
/* var i: Int */;
34 long var7
/* : Int */;
35 short int var8
/* : Bool */;
36 short int var10
/* : Bool */;
39 const char* var_class_name13
;
40 short int var14
/* : Bool */;
41 long var15
/* : Int */;
42 long var17
/* : Int */;
43 /* Covariant cast for argument 0 (k) <p0:Object> isa HashCollection#0 */
44 /* <p0:Object> isa HashCollection#0 */
45 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
46 cltype
= type_struct
->color
;
47 idtype
= type_struct
->id
;
48 if(cltype
>= p0
->type
->table_size
) {
51 var1
= p0
->type
->type_table
[cltype
] == idtype
;
54 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
55 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashCollection#0", var_class_name
);
56 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 35);
60 var2
= ((long (*)(val
*))(var_k
->class->vft
[COLOR_kernel__Object__hash
]))(var_k
) /* hash on <var_k:Object>*/;
61 var3
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
62 { /* Inline kernel#Int#% (var2,var3) */
70 { /* Inline kernel#Int#< (var_i,var7) */
71 /* Covariant cast for argument 0 (i) <var7:Int> isa OTHER */
72 /* <var7:Int> isa OTHER */
73 var10
= 1; /* easy <var7:Int> isa OTHER*/
75 var_class_name13
= type_kernel__Int
.name
;
76 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name13
);
77 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
86 { /* Inline kernel#Int#unary - (var_i) */
100 /* method hash_collection#HashCollection#index_at for (self: Object, Object): Int */
101 long VIRTUAL_hash_collection__HashCollection__index_at(val
* self
, val
* p0
) {
102 long var
/* : Int */;
103 long var1
/* : Int */;
104 var1
= hash_collection__HashCollection__index_at(self
, p0
);
109 /* method hash_collection#HashCollection#node_at for (self: HashCollection[Object, HashNode[Object]], Object): nullable HashNode[Object] */
110 val
* hash_collection__HashCollection__node_at(val
* self
, val
* p0
) {
111 val
* var
/* : nullable HashNode[Object] */;
112 short int var1
/* : Bool */;
115 const struct type
* type_struct
;
116 const char* var_class_name
;
117 val
* var_k
/* var k: Object */;
118 val
* var2
/* : nullable Object */;
119 short int var3
/* : Bool */;
120 val
* var4
/* : nullable HashNode[Object] */;
121 long var5
/* : Int */;
122 val
* var6
/* : nullable HashNode[Object] */;
123 val
* var_res
/* var res: nullable HashNode[Object] */;
124 /* Covariant cast for argument 0 (k) <p0:Object> isa HashCollection#0 */
125 /* <p0:Object> isa HashCollection#0 */
126 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
127 cltype
= type_struct
->color
;
128 idtype
= type_struct
->id
;
129 if(cltype
>= p0
->type
->table_size
) {
132 var1
= p0
->type
->type_table
[cltype
] == idtype
;
135 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
136 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashCollection#0", var_class_name
);
137 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 43);
141 var2
= self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
142 var3
= ((short int (*)(val
*, val
*))(var_k
->class->vft
[COLOR_kernel__Object__is_same_instance
]))(var_k
, var2
) /* is_same_instance on <var_k:Object>*/;
144 var4
= self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_node
].val
; /* _last_accessed_node on <self:HashCollection[Object, HashNode[Object]]> */
149 var5
= ((long (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__index_at
]))(self
, var_k
) /* index_at on <self:HashCollection[Object, HashNode[Object]]>*/;
150 var6
= ((val
* (*)(val
*, long, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__node_at_idx
]))(self
, var5
, var_k
) /* node_at_idx on <self:HashCollection[Object, HashNode[Object]]>*/;
152 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var_k
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
153 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_node
].val
= var_res
; /* _last_accessed_node on <self:HashCollection[Object, HashNode[Object]]> */
159 /* method hash_collection#HashCollection#node_at for (self: Object, Object): nullable HashNode[Object] */
160 val
* VIRTUAL_hash_collection__HashCollection__node_at(val
* self
, val
* p0
) {
161 val
* var
/* : nullable HashNode[Object] */;
162 val
* var1
/* : nullable HashNode[Object] */;
163 var1
= hash_collection__HashCollection__node_at(self
, p0
);
168 /* method hash_collection#HashCollection#node_at_idx for (self: HashCollection[Object, HashNode[Object]], Int, Object): nullable HashNode[Object] */
169 val
* hash_collection__HashCollection__node_at_idx(val
* self
, long p0
, val
* p1
) {
170 val
* var
/* : nullable HashNode[Object] */;
171 short int var1
/* : Bool */;
174 const struct type
* type_struct
;
175 const char* var_class_name
;
176 long var_i
/* var i: Int */;
177 val
* var_k
/* var k: Object */;
178 val
* var2
/* : nullable NativeArray[nullable HashNode[Object]] */;
179 val
* var3
/* : nullable Object */;
180 val
* var_c
/* var c: nullable HashNode[Object] */;
181 val
* var4
/* : null */;
182 short int var5
/* : Bool */;
183 val
* var6
/* : Object */;
184 val
* var_ck
/* var ck: Object */;
185 short int var7
/* : Bool */;
186 short int var8
/* : Bool */;
187 short int var_
/* var : Bool */;
188 short int var9
/* : Bool */;
189 val
* var10
/* : nullable HashNode[Object] */;
190 short int var11
/* : Bool */;
193 const struct type
* type_struct14
;
194 const char* var_class_name15
;
195 /* Covariant cast for argument 1 (k) <p1:Object> isa HashCollection#0 */
196 /* <p1:Object> isa HashCollection#0 */
197 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
198 cltype
= type_struct
->color
;
199 idtype
= type_struct
->id
;
200 if(cltype
>= p1
->type
->table_size
) {
203 var1
= p1
->type
->type_table
[cltype
] == idtype
;
206 var_class_name
= p1
== NULL ?
"null" : p1
->type
->name
;
207 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashCollection#0", var_class_name
);
208 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 55);
213 var2
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
215 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
216 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 58);
219 var3
= ((val
* (*)(val
*, long))(var2
->class->vft
[COLOR_array__NativeArray___91d_93d
]))(var2
, var_i
) /* [] on <var2:nullable NativeArray[nullable HashNode[Object]]>*/;
225 var5
= 0; /* is null */
227 var5
= 1; /* arg is null and recv is not */
230 var6
= var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_c:nullable HashNode[Object](HashNode[Object])> */
232 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
233 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 60);
237 var8
= ((short int (*)(val
*, val
*))(var_ck
->class->vft
[COLOR_kernel__Object__is_same_instance
]))(var_ck
, var_k
) /* is_same_instance on <var_ck:Object>*/;
242 var9
= ((short int (*)(val
*, val
*))(var_ck
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_ck
, var_k
) /* == on <var_ck:Object>*/;
249 var10
= var_c
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
; /* _next_in_bucklet on <var_c:nullable HashNode[Object](HashNode[Object])> */
250 /* <var10:nullable HashNode[Object]> isa nullable HashCollection#1 */
251 type_struct14
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT1
];
252 cltype12
= type_struct14
->color
;
253 idtype13
= type_struct14
->id
;
257 if(cltype12
>= var10
->type
->table_size
) {
260 var11
= var10
->type
->type_table
[cltype12
] == idtype13
;
264 var_class_name15
= var10
== NULL ?
"null" : var10
->type
->name
;
265 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable HashCollection#1", var_class_name15
);
266 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 64);
270 CONTINUE_label
: (void)0;
272 BREAK_label
: (void)0;
278 /* method hash_collection#HashCollection#node_at_idx for (self: Object, Int, Object): nullable HashNode[Object] */
279 val
* VIRTUAL_hash_collection__HashCollection__node_at_idx(val
* self
, long p0
, val
* p1
) {
280 val
* var
/* : nullable HashNode[Object] */;
281 val
* var1
/* : nullable HashNode[Object] */;
282 var1
= hash_collection__HashCollection__node_at_idx(self
, p0
, p1
);
287 /* method hash_collection#HashCollection#store for (self: HashCollection[Object, HashNode[Object]], Int, HashNode[Object]) */
288 void hash_collection__HashCollection__store(val
* self
, long p0
, val
* p1
) {
289 short int var
/* : Bool */;
292 const struct type
* type_struct
;
293 const char* var_class_name
;
294 long var_index
/* var index: Int */;
295 val
* var_node
/* var node: HashNode[Object] */;
296 val
* var1
/* : nullable HashNode[Object] */;
297 val
* var2
/* : null */;
298 short int var3
/* : Bool */;
299 val
* var4
/* : nullable HashNode[Object] */;
300 val
* var5
/* : nullable HashNode[Object] */;
301 val
* var6
/* : null */;
302 val
* var7
/* : nullable NativeArray[nullable HashNode[Object]] */;
303 val
* var8
/* : nullable Object */;
304 val
* var_next
/* var next: nullable HashNode[Object] */;
305 val
* var9
/* : nullable NativeArray[nullable HashNode[Object]] */;
306 val
* var10
/* : null */;
307 short int var11
/* : Bool */;
308 val
* var12
/* : Object */;
309 short int var13
/* : Bool */;
312 const struct type
* type_struct16
;
313 const char* var_class_name17
;
314 long var18
/* : Int */;
315 long var_l
/* var l: Int */;
316 long var19
/* : Int */;
317 long var20
/* : Int */;
318 long var22
/* : Int */;
319 long var23
/* : Int */;
320 long var24
/* : Int */;
321 long var26
/* : Int */;
322 long var27
/* : Int */;
323 long var28
/* : Int */;
324 long var30
/* : Int */;
325 long var31
/* : Int */;
326 long var32
/* : Int */;
327 long var34
/* : Int */;
328 long var35
/* : Int */;
329 short int var36
/* : Bool */;
330 short int var38
/* : Bool */;
333 const char* var_class_name41
;
334 short int var42
/* : Bool */;
335 long var43
/* : Int */;
336 long var44
/* : Int */;
337 long var46
/* : Int */;
338 /* Covariant cast for argument 1 (node) <p1:HashNode[Object]> isa HashCollection#1 */
339 /* <p1:HashNode[Object]> isa HashCollection#1 */
340 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT1
];
341 cltype
= type_struct
->color
;
342 idtype
= type_struct
->id
;
343 if(cltype
>= p1
->type
->table_size
) {
346 var
= p1
->type
->type_table
[cltype
] == idtype
;
349 var_class_name
= p1
== NULL ?
"null" : p1
->type
->name
;
350 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashCollection#1", var_class_name
);
351 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 69);
356 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
359 var3
= 1; /* is null */
361 var3
= 0; /* arg is null but recv is not */
364 self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
= var_node
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
366 var4
= self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
368 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
369 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 76);
372 var4
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
= var_node
; /* _next_item on <var4:nullable HashNode[Object]> */
374 var5
= self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
375 var_node
->attrs
[COLOR_hash_collection__HashNode___prev_item
].val
= var5
; /* _prev_item on <var_node:HashNode[Object]> */
377 var_node
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
= var6
; /* _next_item on <var_node:HashNode[Object]> */
378 self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
= var_node
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
379 var7
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
381 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
382 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 83);
385 var8
= ((val
* (*)(val
*, long))(var7
->class->vft
[COLOR_array__NativeArray___91d_93d
]))(var7
, var_index
) /* [] on <var7:nullable NativeArray[nullable HashNode[Object]]>*/;
388 var9
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
390 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
391 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 84);
394 ((void (*)(val
*, long, val
*))(var9
->class->vft
[COLOR_array__NativeArray___91d_93d_61d
]))(var9
, var_index
, var_node
) /* []= on <var9:nullable NativeArray[nullable HashNode[Object]]>*/;
396 var_node
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_node:HashNode[Object]> */
398 if (var_next
== NULL
) {
399 var11
= 0; /* is null */
401 var11
= 1; /* arg is null and recv is not */
404 var_next
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
= var_node
; /* _prev_in_bucklet on <var_next:nullable HashNode[Object](HashNode[Object])> */
407 var12
= var_node
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_node:HashNode[Object]> */
409 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
410 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 88);
413 /* <var12:Object> isa nullable HashCollection#0 */
414 type_struct16
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
415 cltype14
= type_struct16
->color
;
416 idtype15
= type_struct16
->id
;
417 if(cltype14
>= var12
->type
->table_size
) {
420 var13
= var12
->type
->type_table
[cltype14
] == idtype15
;
423 var_class_name17
= var12
== NULL ?
"null" : var12
->type
->name
;
424 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable HashCollection#0", var_class_name17
);
425 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 88);
428 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var12
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
429 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_node
].val
= var_node
; /* _last_accessed_node on <self:HashCollection[Object, HashNode[Object]]> */
430 var18
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashCollection[Object, HashNode[Object]]> */
433 { /* Inline kernel#Int#+ (var_l,var19) */
434 var22
= var_l
+ var19
;
439 self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
= var20
; /* _length on <self:HashCollection[Object, HashNode[Object]]> */
441 { /* Inline kernel#Int#+ (var_l,var23) */
442 var26
= var_l
+ var23
;
448 { /* Inline kernel#Int#* (var24,var27) */
449 var30
= var24
* var27
;
455 { /* Inline kernel#Int#/ (var28,var31) */
456 var34
= var28
/ var31
;
462 var35
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
463 { /* Inline kernel#Int#>= (var_l,var35) */
464 /* Covariant cast for argument 0 (i) <var35:Int> isa OTHER */
465 /* <var35:Int> isa OTHER */
466 var38
= 1; /* easy <var35:Int> isa OTHER*/
468 var_class_name41
= type_kernel__Int
.name
;
469 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name41
);
470 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
473 var42
= var_l
>= var35
;
480 { /* Inline kernel#Int#* (var_l,var43) */
481 var46
= var_l
* var43
;
486 ((void (*)(val
*, long))(self
->class->vft
[COLOR_hash_collection__HashCollection__enlarge
]))(self
, var44
) /* enlarge on <self:HashCollection[Object, HashNode[Object]]>*/;
491 /* method hash_collection#HashCollection#store for (self: Object, Int, HashNode[Object]) */
492 void VIRTUAL_hash_collection__HashCollection__store(val
* self
, long p0
, val
* p1
) {
493 hash_collection__HashCollection__store(self
, p0
, p1
);
496 /* method hash_collection#HashCollection#remove_node for (self: HashCollection[Object, HashNode[Object]], Object) */
497 void hash_collection__HashCollection__remove_node(val
* self
, val
* p0
) {
498 short int var
/* : Bool */;
501 const struct type
* type_struct
;
502 const char* var_class_name
;
503 val
* var_k
/* var k: Object */;
504 long var1
/* : Int */;
505 long var_i
/* var i: Int */;
506 val
* var2
/* : nullable HashNode[Object] */;
507 val
* var_node
/* var node: nullable HashNode[Object] */;
508 val
* var3
/* : null */;
509 short int var4
/* : Bool */;
510 val
* var5
/* : nullable HashNode[Object] */;
511 val
* var_prev
/* var prev: nullable HashNode[Object] */;
512 val
* var6
/* : nullable HashNode[Object] */;
513 val
* var_next
/* var next: nullable HashNode[Object] */;
514 val
* var7
/* : null */;
515 short int var8
/* : Bool */;
516 short int var9
/* : Bool */;
519 const struct type
* type_struct12
;
520 const char* var_class_name13
;
521 val
* var14
/* : null */;
522 short int var15
/* : Bool */;
523 short int var16
/* : Bool */;
526 const struct type
* type_struct19
;
527 const char* var_class_name20
;
528 val
* var_
/* var : HashCollection[Object, HashNode[Object]] */;
529 long var21
/* : Int */;
530 long var22
/* : Int */;
531 long var23
/* : Int */;
532 long var25
/* : Int */;
533 val
* var26
/* : nullable HashNode[Object] */;
534 val
* var27
/* : nullable HashNode[Object] */;
535 val
* var28
/* : null */;
536 short int var29
/* : Bool */;
537 val
* var30
/* : nullable NativeArray[nullable HashNode[Object]] */;
538 short int var31
/* : Bool */;
541 const struct type
* type_struct34
;
542 const char* var_class_name35
;
543 val
* var36
/* : null */;
544 short int var37
/* : Bool */;
545 val
* var38
/* : null */;
546 /* Covariant cast for argument 0 (k) <p0:Object> isa HashCollection#0 */
547 /* <p0:Object> isa HashCollection#0 */
548 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
549 cltype
= type_struct
->color
;
550 idtype
= type_struct
->id
;
551 if(cltype
>= p0
->type
->table_size
) {
554 var
= p0
->type
->type_table
[cltype
] == idtype
;
557 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
558 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashCollection#0", var_class_name
);
559 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 100);
563 var1
= ((long (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__index_at
]))(self
, var_k
) /* index_at on <self:HashCollection[Object, HashNode[Object]]>*/;
565 var2
= ((val
* (*)(val
*, long, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__node_at_idx
]))(self
, var_i
, var_k
) /* node_at_idx on <self:HashCollection[Object, HashNode[Object]]>*/;
568 if (var_node
== NULL
) {
569 var4
= 1; /* is null */
571 var4
= 0; /* arg is null but recv is not */
577 var5
= var_node
->attrs
[COLOR_hash_collection__HashNode___prev_item
].val
; /* _prev_item on <var_node:nullable HashNode[Object](HashNode[Object])> */
579 var6
= var_node
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_node:nullable HashNode[Object](HashNode[Object])> */
582 if (var_prev
== NULL
) {
583 var8
= 0; /* is null */
585 var8
= 1; /* arg is null and recv is not */
588 var_prev
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
= var_next
; /* _next_item on <var_prev:nullable HashNode[Object](HashNode[Object])> */
590 /* <var_next:nullable HashNode[Object]> isa nullable HashCollection#1 */
591 type_struct12
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT1
];
592 cltype10
= type_struct12
->color
;
593 idtype11
= type_struct12
->id
;
594 if(var_next
== NULL
) {
597 if(cltype10
>= var_next
->type
->table_size
) {
600 var9
= var_next
->type
->type_table
[cltype10
] == idtype11
;
604 var_class_name13
= var_next
== NULL ?
"null" : var_next
->type
->name
;
605 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable HashCollection#1", var_class_name13
);
606 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 113);
609 self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
= var_next
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
612 if (var_next
== NULL
) {
613 var15
= 0; /* is null */
615 var15
= 1; /* arg is null and recv is not */
618 var_next
->attrs
[COLOR_hash_collection__HashNode___prev_item
].val
= var_prev
; /* _prev_item on <var_next:nullable HashNode[Object](HashNode[Object])> */
620 /* <var_prev:nullable HashNode[Object]> isa nullable HashCollection#1 */
621 type_struct19
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT1
];
622 cltype17
= type_struct19
->color
;
623 idtype18
= type_struct19
->id
;
624 if(var_prev
== NULL
) {
627 if(cltype17
>= var_prev
->type
->table_size
) {
630 var16
= var_prev
->type
->type_table
[cltype17
] == idtype18
;
634 var_class_name20
= var_prev
== NULL ?
"null" : var_prev
->type
->name
;
635 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable HashCollection#1", var_class_name20
);
636 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 118);
639 self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
= var_prev
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
642 var21
= var_
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <var_:HashCollection[Object, HashNode[Object]]> */
644 { /* Inline kernel#Int#- (var21,var22) */
645 var25
= var21
- var22
;
650 var_
->attrs
[COLOR_hash_collection__HashCollection___length
].l
= var23
; /* _length on <var_:HashCollection[Object, HashNode[Object]]> */
651 var26
= var_node
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
; /* _prev_in_bucklet on <var_node:nullable HashNode[Object](HashNode[Object])> */
653 var27
= var_node
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
; /* _next_in_bucklet on <var_node:nullable HashNode[Object](HashNode[Object])> */
656 if (var_prev
== NULL
) {
657 var29
= 0; /* is null */
659 var29
= 1; /* arg is null and recv is not */
662 var_prev
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_prev:nullable HashNode[Object](HashNode[Object])> */
664 var30
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
665 /* <var_next:nullable HashNode[Object]> isa nullable HashCollection#1 */
666 type_struct34
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT1
];
667 cltype32
= type_struct34
->color
;
668 idtype33
= type_struct34
->id
;
669 if(var_next
== NULL
) {
672 if(cltype32
>= var_next
->type
->table_size
) {
675 var31
= var_next
->type
->type_table
[cltype32
] == idtype33
;
679 var_class_name35
= var_next
== NULL ?
"null" : var_next
->type
->name
;
680 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable HashCollection#1", var_class_name35
);
681 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 128);
685 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
686 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 128);
689 ((void (*)(val
*, long, val
*))(var30
->class->vft
[COLOR_array__NativeArray___91d_93d_61d
]))(var30
, var_i
, var_next
) /* []= on <var30:nullable NativeArray[nullable HashNode[Object]]>*/;
693 if (var_next
== NULL
) {
694 var37
= 0; /* is null */
696 var37
= 1; /* arg is null and recv is not */
699 var_next
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
= var_prev
; /* _prev_in_bucklet on <var_next:nullable HashNode[Object](HashNode[Object])> */
703 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var38
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
706 /* method hash_collection#HashCollection#remove_node for (self: Object, Object) */
707 void VIRTUAL_hash_collection__HashCollection__remove_node(val
* self
, val
* p0
) {
708 hash_collection__HashCollection__remove_node(self
, p0
);
711 /* method hash_collection#HashCollection#raz for (self: HashCollection[Object, HashNode[Object]]) */
712 void hash_collection__HashCollection__raz(val
* self
) {
713 long var
/* : Int */;
714 long var1
/* : Int */;
715 long var2
/* : Int */;
716 long var4
/* : Int */;
717 long var_i
/* var i: Int */;
718 long var5
/* : Int */;
719 short int var6
/* : Bool */;
720 short int var8
/* : Bool */;
723 const char* var_class_name
;
724 short int var9
/* : Bool */;
725 val
* var10
/* : nullable NativeArray[nullable HashNode[Object]] */;
726 val
* var11
/* : null */;
727 long var12
/* : Int */;
728 long var13
/* : Int */;
729 long var15
/* : Int */;
730 long var16
/* : Int */;
731 val
* var17
/* : null */;
732 val
* var18
/* : null */;
733 val
* var19
/* : null */;
734 var
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
736 { /* Inline kernel#Int#- (var,var1) */
745 { /* Inline kernel#Int#>= (var_i,var5) */
746 /* Covariant cast for argument 0 (i) <var5:Int> isa OTHER */
747 /* <var5:Int> isa OTHER */
748 var8
= 1; /* easy <var5:Int> isa OTHER*/
750 var_class_name
= type_kernel__Int
.name
;
751 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
752 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
755 var9
= var_i
>= var5
;
761 var10
= self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
764 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
765 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 142);
768 ((void (*)(val
*, long, val
*))(var10
->class->vft
[COLOR_array__NativeArray___91d_93d_61d
]))(var10
, var_i
, var11
) /* []= on <var10:nullable NativeArray[nullable HashNode[Object]]>*/;
771 { /* Inline kernel#Int#- (var_i,var12) */
772 var15
= var_i
- var12
;
778 CONTINUE_label
: (void)0;
780 BREAK_label
: (void)0;
782 self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
= var16
; /* _length on <self:HashCollection[Object, HashNode[Object]]> */
784 self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
= var17
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
786 self
->attrs
[COLOR_hash_collection__HashCollection___last_item
].val
= var18
; /* _last_item on <self:HashCollection[Object, HashNode[Object]]> */
788 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var19
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
791 /* method hash_collection#HashCollection#raz for (self: Object) */
792 void VIRTUAL_hash_collection__HashCollection__raz(val
* self
) {
793 hash_collection__HashCollection__raz(self
);
796 /* method hash_collection#HashCollection#enlarge for (self: HashCollection[Object, HashNode[Object]], Int) */
797 void hash_collection__HashCollection__enlarge(val
* self
, long p0
) {
798 long var_cap
/* var cap: Int */;
799 long var
/* : Int */;
800 long var_old_cap
/* var old_cap: Int */;
801 long var1
/* : Int */;
802 long var2
/* : Int */;
803 long var3
/* : Int */;
804 long var5
/* : Int */;
805 short int var6
/* : Bool */;
806 short int var8
/* : Bool */;
809 const char* var_class_name
;
810 short int var9
/* : Bool */;
811 long var10
/* : Int */;
812 long var11
/* : Int */;
813 long var12
/* : Int */;
814 long var14
/* : Int */;
815 long var15
/* : Int */;
816 short int var16
/* : Bool */;
817 short int var18
/* : Bool */;
820 const char* var_class_name21
;
821 short int var22
/* : Bool */;
822 val
* var23
/* : null */;
823 val
* var24
/* : NativeArray[nullable Object] */;
824 val
* var_new_array
/* var new_array: NativeArray[nullable HashNode[Object]] */;
825 long var25
/* : Int */;
826 long var26
/* : Int */;
827 long var28
/* : Int */;
828 long var_i
/* var i: Int */;
829 long var29
/* : Int */;
830 short int var30
/* : Bool */;
831 short int var32
/* : Bool */;
834 const char* var_class_name35
;
835 short int var36
/* : Bool */;
836 val
* var37
/* : null */;
837 long var38
/* : Int */;
838 long var39
/* : Int */;
839 long var41
/* : Int */;
840 long var42
/* : Int */;
841 short int var43
/* : Bool */;
842 short int var45
/* : Bool */;
845 const char* var_class_name48
;
846 short int var49
/* : Bool */;
847 val
* var50
/* : nullable HashNode[Object] */;
848 val
* var_node
/* var node: nullable HashNode[Object] */;
849 val
* var51
/* : null */;
850 short int var52
/* : Bool */;
851 val
* var53
/* : Object */;
852 short int var54
/* : Bool */;
855 const struct type
* type_struct
;
856 const char* var_class_name57
;
857 long var58
/* : Int */;
858 long var_index
/* var index: Int */;
859 val
* var59
/* : nullable Object */;
860 val
* var_next
/* var next: nullable HashNode[Object] */;
861 val
* var60
/* : null */;
862 short int var61
/* : Bool */;
863 val
* var62
/* : nullable HashNode[Object] */;
864 short int var63
/* : Bool */;
867 const struct type
* type_struct66
;
868 const char* var_class_name67
;
870 var
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
872 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashCollection[Object, HashNode[Object]]> */
874 { /* Inline kernel#Int#+ (var1,var2) */
880 { /* Inline kernel#Int#< (var_cap,var3) */
881 /* Covariant cast for argument 0 (i) <var3:Int> isa OTHER */
882 /* <var3:Int> isa OTHER */
883 var8
= 1; /* easy <var3:Int> isa OTHER*/
885 var_class_name
= type_kernel__Int
.name
;
886 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
887 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
890 var9
= var_cap
< var3
;
896 var10
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashCollection[Object, HashNode[Object]]> */
898 { /* Inline kernel#Int#+ (var10,var11) */
899 var14
= var10
+ var11
;
907 var15
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
908 { /* Inline kernel#Int#<= (var_cap,var15) */
909 /* Covariant cast for argument 0 (i) <var15:Int> isa OTHER */
910 /* <var15:Int> isa OTHER */
911 var18
= 1; /* easy <var15:Int> isa OTHER*/
913 var_class_name21
= type_kernel__Int
.name
;
914 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name21
);
915 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 260);
918 var22
= var_cap
<= var15
;
927 self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
= var_cap
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
929 self
->attrs
[COLOR_hash_collection__HashCollection___last_accessed_key
].val
= var23
; /* _last_accessed_key on <self:HashCollection[Object, HashNode[Object]]> */
930 var24
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_array__ArrayCapable__calloc_array
]))(self
, var_cap
) /* calloc_array on <self:HashCollection[Object, HashNode[Object]]>*/;
931 var_new_array
= var24
;
932 self
->attrs
[COLOR_hash_collection__HashCollection___array
].val
= var_new_array
; /* _array on <self:HashCollection[Object, HashNode[Object]]> */
934 { /* Inline kernel#Int#- (var_cap,var25) */
935 var28
= var_cap
- var25
;
943 { /* Inline kernel#Int#>= (var_i,var29) */
944 /* Covariant cast for argument 0 (i) <var29:Int> isa OTHER */
945 /* <var29:Int> isa OTHER */
946 var32
= 1; /* easy <var29:Int> isa OTHER*/
948 var_class_name35
= type_kernel__Int
.name
;
949 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name35
);
950 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
953 var36
= var_i
>= var29
;
960 ((void (*)(val
*, long, val
*))(var_new_array
->class->vft
[COLOR_array__NativeArray___91d_93d_61d
]))(var_new_array
, var_i
, var37
) /* []= on <var_new_array:NativeArray[nullable HashNode[Object]]>*/;
962 { /* Inline kernel#Int#- (var_i,var38) */
963 var41
= var_i
- var38
;
969 CONTINUE_label
: (void)0;
971 BREAK_label
: (void)0;
972 var42
= self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
; /* _capacity on <self:HashCollection[Object, HashNode[Object]]> */
973 { /* Inline kernel#Int#<= (var42,var_old_cap) */
974 /* Covariant cast for argument 0 (i) <var_old_cap:Int> isa OTHER */
975 /* <var_old_cap:Int> isa OTHER */
976 var45
= 1; /* easy <var_old_cap:Int> isa OTHER*/
978 var_class_name48
= type_kernel__Int
.name
;
979 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name48
);
980 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 260);
983 var49
= var42
<= var_old_cap
;
992 var50
= self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashCollection[Object, HashNode[Object]]> */
996 if (var_node
== NULL
) {
997 var52
= 0; /* is null */
999 var52
= 1; /* arg is null and recv is not */
1002 var53
= var_node
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_node:nullable HashNode[Object](HashNode[Object])> */
1003 if (var53
== NULL
) {
1004 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
1005 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 177);
1008 /* <var53:Object> isa HashCollection#0 */
1009 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT0
];
1010 cltype55
= type_struct
->color
;
1011 idtype56
= type_struct
->id
;
1012 if(cltype55
>= var53
->type
->table_size
) {
1015 var54
= var53
->type
->type_table
[cltype55
] == idtype56
;
1018 var_class_name57
= var53
== NULL ?
"null" : var53
->type
->name
;
1019 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashCollection#0", var_class_name57
);
1020 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 177);
1023 var58
= ((long (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__index_at
]))(self
, var53
) /* index_at on <self:HashCollection[Object, HashNode[Object]]>*/;
1025 var59
= ((val
* (*)(val
*, long))(var_new_array
->class->vft
[COLOR_array__NativeArray___91d_93d
]))(var_new_array
, var_index
) /* [] on <var_new_array:NativeArray[nullable HashNode[Object]]>*/;
1027 ((void (*)(val
*, long, val
*))(var_new_array
->class->vft
[COLOR_array__NativeArray___91d_93d_61d
]))(var_new_array
, var_index
, var_node
) /* []= on <var_new_array:NativeArray[nullable HashNode[Object]]>*/;
1028 var_node
->attrs
[COLOR_hash_collection__HashNode___next_in_bucklet
].val
= var_next
; /* _next_in_bucklet on <var_node:nullable HashNode[Object](HashNode[Object])> */
1030 if (var_next
== NULL
) {
1031 var61
= 0; /* is null */
1033 var61
= 1; /* arg is null and recv is not */
1036 var_next
->attrs
[COLOR_hash_collection__HashNode___prev_in_bucklet
].val
= var_node
; /* _prev_in_bucklet on <var_next:nullable HashNode[Object](HashNode[Object])> */
1039 var62
= var_node
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_node:nullable HashNode[Object](HashNode[Object])> */
1040 /* <var62:nullable HashNode[Object]> isa nullable HashCollection#1 */
1041 type_struct66
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashCollection_FT1
];
1042 cltype64
= type_struct66
->color
;
1043 idtype65
= type_struct66
->id
;
1047 if(cltype64
>= var62
->type
->table_size
) {
1050 var63
= var62
->type
->type_table
[cltype64
] == idtype65
;
1054 var_class_name67
= var62
== NULL ?
"null" : var62
->type
->name
;
1055 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable HashCollection#1", var_class_name67
);
1056 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 183);
1060 CONTINUE_label68
: (void)0;
1062 BREAK_label68
: (void)0;
1065 /* method hash_collection#HashCollection#enlarge for (self: Object, Int) */
1066 void VIRTUAL_hash_collection__HashCollection__enlarge(val
* self
, long p0
) {
1067 hash_collection__HashCollection__enlarge(self
, p0
);
1070 /* method hash_collection#HashCollection#init for (self: HashCollection[Object, HashNode[Object]]) */
1071 void hash_collection__HashCollection__init(val
* self
) {
1074 /* method hash_collection#HashCollection#init for (self: Object) */
1075 void VIRTUAL_hash_collection__HashCollection__init(val
* self
) {
1076 hash_collection__HashCollection__init(self
);
1079 /* method hash_collection#HashNode#next_item for (self: HashNode[Object]): nullable HashNode[Object] */
1080 val
* hash_collection__HashNode__next_item(val
* self
) {
1081 val
* var
/* : nullable HashNode[Object] */;
1082 val
* var1
/* : nullable HashNode[Object] */;
1083 var1
= self
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <self:HashNode[Object]> */
1088 /* method hash_collection#HashNode#next_item for (self: Object): nullable HashNode[Object] */
1089 val
* VIRTUAL_hash_collection__HashNode__next_item(val
* self
) {
1090 val
* var
/* : nullable HashNode[Object] */;
1091 val
* var1
/* : nullable HashNode[Object] */;
1092 var1
= hash_collection__HashNode__next_item(self
);
1097 /* method hash_collection#HashNode#next_item= for (self: HashNode[Object], nullable HashNode[Object]) */
1098 void hash_collection__HashNode__next_item_61d(val
* self
, val
* p0
) {
1099 short int var
/* : Bool */;
1102 const struct type
* type_struct
;
1103 const char* var_class_name
;
1104 /* Covariant cast for argument 0 (next_item) <p0:nullable HashNode[Object]> isa nullable N */
1105 /* <p0:nullable HashNode[Object]> isa nullable N */
1106 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashNode_VTN
];
1107 cltype
= type_struct
->color
;
1108 idtype
= type_struct
->id
;
1112 if(cltype
>= p0
->type
->table_size
) {
1115 var
= p0
->type
->type_table
[cltype
] == idtype
;
1119 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1120 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name
);
1121 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 191);
1124 self
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
= p0
; /* _next_item on <self:HashNode[Object]> */
1127 /* method hash_collection#HashNode#next_item= for (self: Object, nullable HashNode[Object]) */
1128 void VIRTUAL_hash_collection__HashNode__next_item_61d(val
* self
, val
* p0
) {
1129 hash_collection__HashNode__next_item_61d(self
, p0
);
1132 /* method hash_collection#HashNode#prev_item for (self: HashNode[Object]): nullable HashNode[Object] */
1133 val
* hash_collection__HashNode__prev_item(val
* self
) {
1134 val
* var
/* : nullable HashNode[Object] */;
1135 val
* var1
/* : nullable HashNode[Object] */;
1136 var1
= self
->attrs
[COLOR_hash_collection__HashNode___prev_item
].val
; /* _prev_item on <self:HashNode[Object]> */
1141 /* method hash_collection#HashNode#prev_item for (self: Object): nullable HashNode[Object] */
1142 val
* VIRTUAL_hash_collection__HashNode__prev_item(val
* self
) {
1143 val
* var
/* : nullable HashNode[Object] */;
1144 val
* var1
/* : nullable HashNode[Object] */;
1145 var1
= hash_collection__HashNode__prev_item(self
);
1150 /* method hash_collection#HashNode#prev_item= for (self: HashNode[Object], nullable HashNode[Object]) */
1151 void hash_collection__HashNode__prev_item_61d(val
* self
, val
* p0
) {
1152 short int var
/* : Bool */;
1155 const struct type
* type_struct
;
1156 const char* var_class_name
;
1157 /* Covariant cast for argument 0 (prev_item) <p0:nullable HashNode[Object]> isa nullable N */
1158 /* <p0:nullable HashNode[Object]> isa nullable N */
1159 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashNode_VTN
];
1160 cltype
= type_struct
->color
;
1161 idtype
= type_struct
->id
;
1165 if(cltype
>= p0
->type
->table_size
) {
1168 var
= p0
->type
->type_table
[cltype
] == idtype
;
1172 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1173 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable N", var_class_name
);
1174 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 192);
1177 self
->attrs
[COLOR_hash_collection__HashNode___prev_item
].val
= p0
; /* _prev_item on <self:HashNode[Object]> */
1180 /* method hash_collection#HashNode#prev_item= for (self: Object, nullable HashNode[Object]) */
1181 void VIRTUAL_hash_collection__HashNode__prev_item_61d(val
* self
, val
* p0
) {
1182 hash_collection__HashNode__prev_item_61d(self
, p0
);
1185 /* method hash_collection#HashNode#init for (self: HashNode[Object], Object) */
1186 void hash_collection__HashNode__init(val
* self
, val
* p0
) {
1187 short int var
/* : Bool */;
1190 const struct type
* type_struct
;
1191 const char* var_class_name
;
1192 val
* var_k
/* var k: Object */;
1193 /* Covariant cast for argument 0 (k) <p0:Object> isa HashNode#0 */
1194 /* <p0:Object> isa HashNode#0 */
1195 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashNode_FT0
];
1196 cltype
= type_struct
->color
;
1197 idtype
= type_struct
->id
;
1198 if(cltype
>= p0
->type
->table_size
) {
1201 var
= p0
->type
->type_table
[cltype
] == idtype
;
1204 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1205 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashNode#0", var_class_name
);
1206 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 195);
1210 self
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_k
; /* _key on <self:HashNode[Object]> */
1213 /* method hash_collection#HashNode#init for (self: Object, Object) */
1214 void VIRTUAL_hash_collection__HashNode__init(val
* self
, val
* p0
) {
1215 hash_collection__HashNode__init(self
, p0
);
1218 /* method hash_collection#HashMap#[] for (self: HashMap[Object, nullable Object], Object): nullable Object */
1219 val
* hash_collection__HashMap___91d_93d(val
* self
, val
* p0
) {
1220 val
* var
/* : nullable Object */;
1221 short int var1
/* : Bool */;
1224 const struct type
* type_struct
;
1225 const char* var_class_name
;
1226 val
* var_key
/* var key: Object */;
1227 val
* var2
/* : nullable HashNode[Object] */;
1228 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
1229 val
* var3
/* : null */;
1230 short int var4
/* : Bool */;
1231 val
* var5
/* : nullable Object */;
1232 /* Covariant cast for argument 0 (key) <p0:Object> isa MapRead#0 */
1233 /* <p0:Object> isa MapRead#0 */
1234 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapRead_FT0
];
1235 cltype
= type_struct
->color
;
1236 idtype
= type_struct
->id
;
1237 if(cltype
>= p0
->type
->table_size
) {
1240 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1243 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1244 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MapRead#0", var_class_name
);
1245 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 207);
1249 var2
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__node_at
]))(self
, var_key
) /* node_at on <self:HashMap[Object, nullable Object]>*/;
1252 if (var_c
== NULL
) {
1253 var4
= 1; /* is null */
1255 var4
= 0; /* arg is null but recv is not */
1258 fprintf(stderr
, "Runtime error: %s", "Aborted");
1259 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 211);
1262 var5
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1269 /* method hash_collection#HashMap#[] for (self: Object, Object): nullable Object */
1270 val
* VIRTUAL_hash_collection__HashMap___91d_93d(val
* self
, val
* p0
) {
1271 val
* var
/* : nullable Object */;
1272 val
* var1
/* : nullable Object */;
1273 var1
= hash_collection__HashMap___91d_93d(self
, p0
);
1278 /* method hash_collection#HashMap#iterator for (self: HashMap[Object, nullable Object]): HashMapIterator[Object, nullable Object] */
1279 val
* hash_collection__HashMap__iterator(val
* self
) {
1280 val
* var
/* : HashMapIterator[Object, nullable Object] */;
1281 val
* var1
/* : HashMapIterator[Object, nullable Object] */;
1282 var1
= NEW_hash_collection__HashMapIterator(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapIteratorhash_collection__HashMap_FT0hash_collection__HashMap_FT1
]);
1283 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_hash_collection__HashMapIterator__init
]))(var1
, self
) /* init on <var1:HashMapIterator[Object, nullable Object]>*/;
1284 CHECK_NEW_hash_collection__HashMapIterator(var1
);
1290 /* method hash_collection#HashMap#iterator for (self: Object): MapIterator[Object, nullable Object] */
1291 val
* VIRTUAL_hash_collection__HashMap__iterator(val
* self
) {
1292 val
* var
/* : MapIterator[Object, nullable Object] */;
1293 val
* var1
/* : HashMapIterator[Object, nullable Object] */;
1294 var1
= hash_collection__HashMap__iterator(self
);
1299 /* method hash_collection#HashMap#length for (self: HashMap[Object, nullable Object]): Int */
1300 long hash_collection__HashMap__length(val
* self
) {
1301 long var
/* : Int */;
1302 long var1
/* : Int */;
1303 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashMap[Object, nullable Object]> */
1309 /* method hash_collection#HashMap#length for (self: Object): Int */
1310 long VIRTUAL_hash_collection__HashMap__length(val
* self
) {
1311 long var
/* : Int */;
1312 long var1
/* : Int */;
1313 var1
= hash_collection__HashMap__length(self
);
1318 /* method hash_collection#HashMap#is_empty for (self: HashMap[Object, nullable Object]): Bool */
1319 short int hash_collection__HashMap__is_empty(val
* self
) {
1320 short int var
/* : Bool */;
1321 long var1
/* : Int */;
1322 long var2
/* : Int */;
1323 short int var3
/* : Bool */;
1324 short int var5
/* : Bool */;
1325 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashMap[Object, nullable Object]> */
1327 { /* Inline kernel#Int#== (var1,var2) */
1328 var5
= var1
== var2
;
1338 /* method hash_collection#HashMap#is_empty for (self: Object): Bool */
1339 short int VIRTUAL_hash_collection__HashMap__is_empty(val
* self
) {
1340 short int var
/* : Bool */;
1341 short int var1
/* : Bool */;
1342 var1
= hash_collection__HashMap__is_empty(self
);
1347 /* method hash_collection#HashMap#[]= for (self: HashMap[Object, nullable Object], Object, nullable Object) */
1348 void hash_collection__HashMap___91d_93d_61d(val
* self
, val
* p0
, val
* p1
) {
1349 short int var
/* : Bool */;
1352 const struct type
* type_struct
;
1353 const char* var_class_name
;
1354 short int var1
/* : Bool */;
1357 const struct type
* type_struct4
;
1358 short int is_nullable
;
1359 const char* var_class_name5
;
1360 val
* var_key
/* var key: Object */;
1361 val
* var_v
/* var v: nullable Object */;
1362 long var6
/* : Int */;
1363 long var_i
/* var i: Int */;
1364 val
* var7
/* : nullable HashNode[Object] */;
1365 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
1366 val
* var8
/* : null */;
1367 short int var9
/* : Bool */;
1368 val
* var10
/* : HashMapNode[Object, nullable Object] */;
1369 /* Covariant cast for argument 0 (key) <p0:Object> isa Map#0 */
1370 /* <p0:Object> isa Map#0 */
1371 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Map_FT0
];
1372 cltype
= type_struct
->color
;
1373 idtype
= type_struct
->id
;
1374 if(cltype
>= p0
->type
->table_size
) {
1377 var
= p0
->type
->type_table
[cltype
] == idtype
;
1380 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1381 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Map#0", var_class_name
);
1382 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 223);
1385 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa Map#1 */
1386 /* <p1:nullable Object> isa Map#1 */
1387 type_struct4
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Map_FT1
];
1388 cltype2
= type_struct4
->color
;
1389 idtype3
= type_struct4
->id
;
1390 is_nullable
= type_struct4
->is_nullable
;
1394 if(cltype2
>= p1
->type
->table_size
) {
1397 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
1401 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
1402 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Map#1", var_class_name5
);
1403 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 223);
1408 var6
= ((long (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__index_at
]))(self
, var_key
) /* index_at on <self:HashMap[Object, nullable Object]>*/;
1410 var7
= ((val
* (*)(val
*, long, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__node_at_idx
]))(self
, var_i
, var_key
) /* node_at_idx on <self:HashMap[Object, nullable Object]>*/;
1413 if (var_c
== NULL
) {
1414 var9
= 0; /* is null */
1416 var9
= 1; /* arg is null and recv is not */
1419 var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_key
; /* _key on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1420 var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
= var_v
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1422 var10
= NEW_hash_collection__HashMapNode(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapNodehash_collection__HashMap_FT0hash_collection__HashMap_FT1
]);
1423 ((void (*)(val
*, val
*, val
*))(var10
->class->vft
[COLOR_hash_collection__HashMapNode__init
]))(var10
, var_key
, var_v
) /* init on <var10:HashMapNode[Object, nullable Object]>*/;
1424 CHECK_NEW_hash_collection__HashMapNode(var10
);
1425 ((void (*)(val
*, long, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__store
]))(self
, var_i
, var10
) /* store on <self:HashMap[Object, nullable Object]>*/;
1429 /* method hash_collection#HashMap#[]= for (self: Object, Object, nullable Object) */
1430 void VIRTUAL_hash_collection__HashMap___91d_93d_61d(val
* self
, val
* p0
, val
* p1
) {
1431 hash_collection__HashMap___91d_93d_61d(self
, p0
, p1
);
1434 /* method hash_collection#HashMap#clear for (self: HashMap[Object, nullable Object]) */
1435 void hash_collection__HashMap__clear(val
* self
) {
1436 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__raz
]))(self
) /* raz on <self:HashMap[Object, nullable Object]>*/;
1439 /* method hash_collection#HashMap#clear for (self: Object) */
1440 void VIRTUAL_hash_collection__HashMap__clear(val
* self
) {
1441 hash_collection__HashMap__clear(self
);
1444 /* method hash_collection#HashMap#init for (self: HashMap[Object, nullable Object]) */
1445 void hash_collection__HashMap__init(val
* self
) {
1446 long var
/* : Int */;
1447 long var1
/* : Int */;
1448 long var2
/* : Int */;
1449 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__init
]))(self
) /* init on <self:HashMap[Object, nullable Object]>*/;
1451 self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
= var
; /* _capacity on <self:HashMap[Object, nullable Object]> */
1453 self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
= var1
; /* _length on <self:HashMap[Object, nullable Object]> */
1455 ((void (*)(val
*, long))(self
->class->vft
[COLOR_hash_collection__HashCollection__enlarge
]))(self
, var2
) /* enlarge on <self:HashMap[Object, nullable Object]>*/;
1458 /* method hash_collection#HashMap#init for (self: Object) */
1459 void VIRTUAL_hash_collection__HashMap__init(val
* self
) {
1460 hash_collection__HashMap__init(self
);
1463 /* method hash_collection#HashMap#keys for (self: HashMap[Object, nullable Object]): HashMapKeys[Object, nullable Object] */
1464 val
* hash_collection__HashMap__keys(val
* self
) {
1465 val
* var
/* : HashMapKeys[Object, nullable Object] */;
1466 val
* var1
/* : HashMapKeys[Object, nullable Object] */;
1467 var1
= self
->attrs
[COLOR_hash_collection__HashMap___64dkeys
].val
; /* @keys on <self:HashMap[Object, nullable Object]> */
1469 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @keys");
1470 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 244);
1477 /* method hash_collection#HashMap#keys for (self: Object): Collection[Object] */
1478 val
* VIRTUAL_hash_collection__HashMap__keys(val
* self
) {
1479 val
* var
/* : Collection[Object] */;
1480 val
* var1
/* : HashMapKeys[Object, nullable Object] */;
1481 var1
= hash_collection__HashMap__keys(self
);
1486 /* method hash_collection#HashMap#keys= for (self: HashMap[Object, nullable Object], HashMapKeys[Object, nullable Object]) */
1487 void hash_collection__HashMap__keys_61d(val
* self
, val
* p0
) {
1488 short int var
/* : Bool */;
1491 const struct type
* type_struct
;
1492 const char* var_class_name
;
1493 /* Covariant cast for argument 0 (keys) <p0:HashMapKeys[Object, nullable Object]> isa HashMapKeys[HashMap#0, HashMap#1] */
1494 /* <p0:HashMapKeys[Object, nullable Object]> isa HashMapKeys[HashMap#0, HashMap#1] */
1495 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapKeyshash_collection__HashMap_FT0hash_collection__HashMap_FT1
];
1496 cltype
= type_struct
->color
;
1497 idtype
= type_struct
->id
;
1498 if(cltype
>= p0
->type
->table_size
) {
1501 var
= p0
->type
->type_table
[cltype
] == idtype
;
1504 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1505 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMapKeys[HashMap#0, HashMap#1]", var_class_name
);
1506 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 244);
1509 self
->attrs
[COLOR_hash_collection__HashMap___64dkeys
].val
= p0
; /* @keys on <self:HashMap[Object, nullable Object]> */
1512 /* method hash_collection#HashMap#keys= for (self: Object, HashMapKeys[Object, nullable Object]) */
1513 void VIRTUAL_hash_collection__HashMap__keys_61d(val
* self
, val
* p0
) {
1514 hash_collection__HashMap__keys_61d(self
, p0
);
1517 /* method hash_collection#HashMap#values for (self: HashMap[Object, nullable Object]): HashMapValues[Object, nullable Object] */
1518 val
* hash_collection__HashMap__values(val
* self
) {
1519 val
* var
/* : HashMapValues[Object, nullable Object] */;
1520 val
* var1
/* : HashMapValues[Object, nullable Object] */;
1521 var1
= self
->attrs
[COLOR_hash_collection__HashMap___64dvalues
].val
; /* @values on <self:HashMap[Object, nullable Object]> */
1523 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @values");
1524 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 245);
1531 /* method hash_collection#HashMap#values for (self: Object): Collection[nullable Object] */
1532 val
* VIRTUAL_hash_collection__HashMap__values(val
* self
) {
1533 val
* var
/* : Collection[nullable Object] */;
1534 val
* var1
/* : HashMapValues[Object, nullable Object] */;
1535 var1
= hash_collection__HashMap__values(self
);
1540 /* method hash_collection#HashMap#values= for (self: HashMap[Object, nullable Object], HashMapValues[Object, nullable Object]) */
1541 void hash_collection__HashMap__values_61d(val
* self
, val
* p0
) {
1542 short int var
/* : Bool */;
1545 const struct type
* type_struct
;
1546 const char* var_class_name
;
1547 /* Covariant cast for argument 0 (values) <p0:HashMapValues[Object, nullable Object]> isa HashMapValues[HashMap#0, HashMap#1] */
1548 /* <p0:HashMapValues[Object, nullable Object]> isa HashMapValues[HashMap#0, HashMap#1] */
1549 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapValueshash_collection__HashMap_FT0hash_collection__HashMap_FT1
];
1550 cltype
= type_struct
->color
;
1551 idtype
= type_struct
->id
;
1552 if(cltype
>= p0
->type
->table_size
) {
1555 var
= p0
->type
->type_table
[cltype
] == idtype
;
1558 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1559 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMapValues[HashMap#0, HashMap#1]", var_class_name
);
1560 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 245);
1563 self
->attrs
[COLOR_hash_collection__HashMap___64dvalues
].val
= p0
; /* @values on <self:HashMap[Object, nullable Object]> */
1566 /* method hash_collection#HashMap#values= for (self: Object, HashMapValues[Object, nullable Object]) */
1567 void VIRTUAL_hash_collection__HashMap__values_61d(val
* self
, val
* p0
) {
1568 hash_collection__HashMap__values_61d(self
, p0
);
1571 /* method hash_collection#HashMapKeys#map for (self: HashMapKeys[Object, nullable Object]): HashMap[Object, nullable Object] */
1572 val
* hash_collection__HashMapKeys__map(val
* self
) {
1573 val
* var
/* : HashMap[Object, nullable Object] */;
1574 val
* var1
/* : HashMap[Object, nullable Object] */;
1575 var1
= self
->attrs
[COLOR_hash_collection__HashMapKeys___64dmap
].val
; /* @map on <self:HashMapKeys[Object, nullable Object]> */
1577 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @map");
1578 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 251);
1585 /* method hash_collection#HashMapKeys#map for (self: Object): HashMap[Object, nullable Object] */
1586 val
* VIRTUAL_hash_collection__HashMapKeys__map(val
* self
) {
1587 val
* var
/* : HashMap[Object, nullable Object] */;
1588 val
* var1
/* : HashMap[Object, nullable Object] */;
1589 var1
= hash_collection__HashMapKeys__map(self
);
1594 /* method hash_collection#HashMapKeys#map= for (self: HashMapKeys[Object, nullable Object], HashMap[Object, nullable Object]) */
1595 void hash_collection__HashMapKeys__map_61d(val
* self
, val
* p0
) {
1596 short int var
/* : Bool */;
1599 const struct type
* type_struct
;
1600 const char* var_class_name
;
1601 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapKeys#0, HashMapKeys#1] */
1602 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapKeys#0, HashMapKeys#1] */
1603 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapKeys_FT0hash_collection__HashMapKeys_FT1
];
1604 cltype
= type_struct
->color
;
1605 idtype
= type_struct
->id
;
1606 if(cltype
>= p0
->type
->table_size
) {
1609 var
= p0
->type
->type_table
[cltype
] == idtype
;
1612 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1613 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapKeys#0, HashMapKeys#1]", var_class_name
);
1614 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 251);
1617 self
->attrs
[COLOR_hash_collection__HashMapKeys___64dmap
].val
= p0
; /* @map on <self:HashMapKeys[Object, nullable Object]> */
1620 /* method hash_collection#HashMapKeys#map= for (self: Object, HashMap[Object, nullable Object]) */
1621 void VIRTUAL_hash_collection__HashMapKeys__map_61d(val
* self
, val
* p0
) {
1622 hash_collection__HashMapKeys__map_61d(self
, p0
);
1625 /* method hash_collection#HashMapKeys#count for (self: HashMapKeys[Object, nullable Object], Object): Int */
1626 long hash_collection__HashMapKeys__count(val
* self
, val
* p0
) {
1627 long var
/* : Int */;
1628 short int var1
/* : Bool */;
1631 const struct type
* type_struct
;
1632 const char* var_class_name
;
1633 val
* var_k
/* var k: Object */;
1634 short int var2
/* : Bool */;
1635 long var3
/* : Int */;
1636 long var4
/* : Int */;
1637 /* Covariant cast for argument 0 (k) <p0:Object> isa Collection#0 */
1638 /* <p0:Object> isa Collection#0 */
1639 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
1640 cltype
= type_struct
->color
;
1641 idtype
= type_struct
->id
;
1642 if(cltype
>= p0
->type
->table_size
) {
1645 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1648 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1649 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
1650 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 254);
1654 var2
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__has
]))(self
, var_k
) /* has on <self:HashMapKeys[Object, nullable Object]>*/;
1667 /* method hash_collection#HashMapKeys#count for (self: Object, nullable Object): Int */
1668 long VIRTUAL_hash_collection__HashMapKeys__count(val
* self
, val
* p0
) {
1669 long var
/* : Int */;
1670 long var1
/* : Int */;
1671 var1
= hash_collection__HashMapKeys__count(self
, p0
);
1676 /* method hash_collection#HashMapKeys#first for (self: HashMapKeys[Object, nullable Object]): Object */
1677 val
* hash_collection__HashMapKeys__first(val
* self
) {
1678 val
* var
/* : Object */;
1679 val
* var1
/* : HashMap[Object, nullable Object] */;
1680 val
* var2
/* : nullable HashNode[Object] */;
1681 val
* var3
/* : Object */;
1682 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1683 var2
= var1
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[Object, nullable Object]> */
1685 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1686 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 255);
1689 var3
= var2
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashNode[Object](nullable HashMapNode[Object, nullable Object])> */
1691 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
1692 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 255);
1700 /* method hash_collection#HashMapKeys#first for (self: Object): nullable Object */
1701 val
* VIRTUAL_hash_collection__HashMapKeys__first(val
* self
) {
1702 val
* var
/* : nullable Object */;
1703 val
* var1
/* : Object */;
1704 var1
= hash_collection__HashMapKeys__first(self
);
1709 /* method hash_collection#HashMapKeys#has for (self: HashMapKeys[Object, nullable Object], Object): Bool */
1710 short int hash_collection__HashMapKeys__has(val
* self
, val
* p0
) {
1711 short int var
/* : Bool */;
1712 short int var1
/* : Bool */;
1715 const struct type
* type_struct
;
1716 const char* var_class_name
;
1717 val
* var_k
/* var k: Object */;
1718 val
* var2
/* : HashMap[Object, nullable Object] */;
1719 val
* var3
/* : nullable HashNode[Object] */;
1720 val
* var4
/* : null */;
1721 short int var5
/* : Bool */;
1722 /* Covariant cast for argument 0 (k) <p0:Object> isa Collection#0 */
1723 /* <p0:Object> isa Collection#0 */
1724 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
1725 cltype
= type_struct
->color
;
1726 idtype
= type_struct
->id
;
1727 if(cltype
>= p0
->type
->table_size
) {
1730 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1733 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1734 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
1735 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 256);
1739 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1740 var3
= ((val
* (*)(val
*, val
*))(var2
->class->vft
[COLOR_hash_collection__HashCollection__node_at
]))(var2
, var_k
) /* node_at on <var2:HashMap[Object, nullable Object]>*/;
1743 var5
= 0; /* is null */
1745 var5
= 1; /* arg is null and recv is not */
1752 /* method hash_collection#HashMapKeys#has for (self: Object, nullable Object): Bool */
1753 short int VIRTUAL_hash_collection__HashMapKeys__has(val
* self
, val
* p0
) {
1754 short int var
/* : Bool */;
1755 short int var1
/* : Bool */;
1756 var1
= hash_collection__HashMapKeys__has(self
, p0
);
1761 /* method hash_collection#HashMapKeys#has_only for (self: HashMapKeys[Object, nullable Object], Object): Bool */
1762 short int hash_collection__HashMapKeys__has_only(val
* self
, val
* p0
) {
1763 short int var
/* : Bool */;
1764 short int var1
/* : Bool */;
1767 const struct type
* type_struct
;
1768 const char* var_class_name
;
1769 val
* var_k
/* var k: Object */;
1770 short int var2
/* : Bool */;
1771 short int var3
/* : Bool */;
1772 short int var4
/* : Bool */;
1773 short int var_
/* var : Bool */;
1774 long var5
/* : Int */;
1775 long var6
/* : Int */;
1776 short int var7
/* : Bool */;
1777 short int var9
/* : Bool */;
1778 short int var_10
/* var : Bool */;
1779 short int var11
/* : Bool */;
1780 /* Covariant cast for argument 0 (k) <p0:Object> isa Collection#0 */
1781 /* <p0:Object> isa Collection#0 */
1782 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
1783 cltype
= type_struct
->color
;
1784 idtype
= type_struct
->id
;
1785 if(cltype
>= p0
->type
->table_size
) {
1788 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1791 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1792 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
1793 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 257);
1797 var4
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__has
]))(self
, var_k
) /* has on <self:HashMapKeys[Object, nullable Object]>*/;
1800 var5
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:HashMapKeys[Object, nullable Object]>*/;
1802 { /* Inline kernel#Int#== (var5,var6) */
1803 var9
= var5
== var6
;
1816 var11
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(self
) /* is_empty on <self:HashMapKeys[Object, nullable Object]>*/;
1824 /* method hash_collection#HashMapKeys#has_only for (self: Object, nullable Object): Bool */
1825 short int VIRTUAL_hash_collection__HashMapKeys__has_only(val
* self
, val
* p0
) {
1826 short int var
/* : Bool */;
1827 short int var1
/* : Bool */;
1828 var1
= hash_collection__HashMapKeys__has_only(self
, p0
);
1833 /* method hash_collection#HashMapKeys#is_empty for (self: HashMapKeys[Object, nullable Object]): Bool */
1834 short int hash_collection__HashMapKeys__is_empty(val
* self
) {
1835 short int var
/* : Bool */;
1836 val
* var1
/* : HashMap[Object, nullable Object] */;
1837 short int var2
/* : Bool */;
1838 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1839 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapRead__is_empty
]))(var1
) /* is_empty on <var1:HashMap[Object, nullable Object]>*/;
1845 /* method hash_collection#HashMapKeys#is_empty for (self: Object): Bool */
1846 short int VIRTUAL_hash_collection__HashMapKeys__is_empty(val
* self
) {
1847 short int var
/* : Bool */;
1848 short int var1
/* : Bool */;
1849 var1
= hash_collection__HashMapKeys__is_empty(self
);
1854 /* method hash_collection#HashMapKeys#length for (self: HashMapKeys[Object, nullable Object]): Int */
1855 long hash_collection__HashMapKeys__length(val
* self
) {
1856 long var
/* : Int */;
1857 val
* var1
/* : HashMap[Object, nullable Object] */;
1858 long var2
/* : Int */;
1859 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1860 var2
= ((long (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapRead__length
]))(var1
) /* length on <var1:HashMap[Object, nullable Object]>*/;
1866 /* method hash_collection#HashMapKeys#length for (self: Object): Int */
1867 long VIRTUAL_hash_collection__HashMapKeys__length(val
* self
) {
1868 long var
/* : Int */;
1869 long var1
/* : Int */;
1870 var1
= hash_collection__HashMapKeys__length(self
);
1875 /* method hash_collection#HashMapKeys#iterator for (self: HashMapKeys[Object, nullable Object]): Iterator[Object] */
1876 val
* hash_collection__HashMapKeys__iterator(val
* self
) {
1877 val
* var
/* : Iterator[Object] */;
1878 val
* var1
/* : MapKeysIterator[Object, nullable Object] */;
1879 val
* var2
/* : HashMap[Object, nullable Object] */;
1880 val
* var3
/* : MapIterator[Object, nullable Object] */;
1881 var1
= NEW_abstract_collection__MapKeysIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapKeysIteratorhash_collection__HashMapKeys_FT0hash_collection__HashMapKeys_FT1
]);
1882 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1883 var3
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__MapRead__iterator
]))(var2
) /* iterator on <var2:HashMap[Object, nullable Object]>*/;
1884 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_abstract_collection__MapKeysIterator__init
]))(var1
, var3
) /* init on <var1:MapKeysIterator[Object, nullable Object]>*/;
1885 CHECK_NEW_abstract_collection__MapKeysIterator(var1
);
1891 /* method hash_collection#HashMapKeys#iterator for (self: Object): Iterator[nullable Object] */
1892 val
* VIRTUAL_hash_collection__HashMapKeys__iterator(val
* self
) {
1893 val
* var
/* : Iterator[nullable Object] */;
1894 val
* var1
/* : Iterator[Object] */;
1895 var1
= hash_collection__HashMapKeys__iterator(self
);
1900 /* method hash_collection#HashMapKeys#clear for (self: HashMapKeys[Object, nullable Object]) */
1901 void hash_collection__HashMapKeys__clear(val
* self
) {
1902 val
* var
/* : HashMap[Object, nullable Object] */;
1903 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1904 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__Map__clear
]))(var
) /* clear on <var:HashMap[Object, nullable Object]>*/;
1907 /* method hash_collection#HashMapKeys#clear for (self: Object) */
1908 void VIRTUAL_hash_collection__HashMapKeys__clear(val
* self
) {
1909 hash_collection__HashMapKeys__clear(self
);
1912 /* method hash_collection#HashMapKeys#remove for (self: HashMapKeys[Object, nullable Object], Object) */
1913 void hash_collection__HashMapKeys__remove(val
* self
, val
* p0
) {
1914 short int var
/* : Bool */;
1917 const struct type
* type_struct
;
1918 const char* var_class_name
;
1919 val
* var_key
/* var key: Object */;
1920 val
* var1
/* : HashMap[Object, nullable Object] */;
1921 /* Covariant cast for argument 0 (key) <p0:Object> isa RemovableCollection#0 */
1922 /* <p0:Object> isa RemovableCollection#0 */
1923 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
1924 cltype
= type_struct
->color
;
1925 idtype
= type_struct
->id
;
1926 if(cltype
>= p0
->type
->table_size
) {
1929 var
= p0
->type
->type_table
[cltype
] == idtype
;
1932 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1933 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
1934 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 265);
1938 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1939 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_hash_collection__HashCollection__remove_node
]))(var1
, var_key
) /* remove_node on <var1:HashMap[Object, nullable Object]>*/;
1942 /* method hash_collection#HashMapKeys#remove for (self: Object, nullable Object) */
1943 void VIRTUAL_hash_collection__HashMapKeys__remove(val
* self
, val
* p0
) {
1944 hash_collection__HashMapKeys__remove(self
, p0
);
1947 /* method hash_collection#HashMapKeys#remove_all for (self: HashMapKeys[Object, nullable Object], Object) */
1948 void hash_collection__HashMapKeys__remove_all(val
* self
, val
* p0
) {
1949 short int var
/* : Bool */;
1952 const struct type
* type_struct
;
1953 const char* var_class_name
;
1954 val
* var_key
/* var key: Object */;
1955 val
* var1
/* : HashMap[Object, nullable Object] */;
1956 /* Covariant cast for argument 0 (key) <p0:Object> isa RemovableCollection#0 */
1957 /* <p0:Object> isa RemovableCollection#0 */
1958 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
1959 cltype
= type_struct
->color
;
1960 idtype
= type_struct
->id
;
1961 if(cltype
>= p0
->type
->table_size
) {
1964 var
= p0
->type
->type_table
[cltype
] == idtype
;
1967 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1968 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
1969 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 266);
1973 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1974 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_hash_collection__HashCollection__remove_node
]))(var1
, var_key
) /* remove_node on <var1:HashMap[Object, nullable Object]>*/;
1977 /* method hash_collection#HashMapKeys#remove_all for (self: Object, nullable Object) */
1978 void VIRTUAL_hash_collection__HashMapKeys__remove_all(val
* self
, val
* p0
) {
1979 hash_collection__HashMapKeys__remove_all(self
, p0
);
1982 /* method hash_collection#HashMapKeys#init for (self: HashMapKeys[Object, nullable Object], HashMap[Object, nullable Object]) */
1983 void hash_collection__HashMapKeys__init(val
* self
, val
* p0
) {
1984 short int var
/* : Bool */;
1987 const struct type
* type_struct
;
1988 const char* var_class_name
;
1989 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapKeys#0, HashMapKeys#1] */
1990 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapKeys#0, HashMapKeys#1] */
1991 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapKeys_FT0hash_collection__HashMapKeys_FT1
];
1992 cltype
= type_struct
->color
;
1993 idtype
= type_struct
->id
;
1994 if(cltype
>= p0
->type
->table_size
) {
1997 var
= p0
->type
->type_table
[cltype
] == idtype
;
2000 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2001 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapKeys#0, HashMapKeys#1]", var_class_name
);
2002 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 248);
2005 self
->attrs
[COLOR_hash_collection__HashMapKeys___64dmap
].val
= p0
; /* @map on <self:HashMapKeys[Object, nullable Object]> */
2008 /* method hash_collection#HashMapKeys#init for (self: Object, HashMap[Object, nullable Object]) */
2009 void VIRTUAL_hash_collection__HashMapKeys__init(val
* self
, val
* p0
) {
2010 hash_collection__HashMapKeys__init(self
, p0
);
2013 /* method hash_collection#HashMapValues#map for (self: HashMapValues[Object, nullable Object]): HashMap[Object, nullable Object] */
2014 val
* hash_collection__HashMapValues__map(val
* self
) {
2015 val
* var
/* : HashMap[Object, nullable Object] */;
2016 val
* var1
/* : HashMap[Object, nullable Object] */;
2017 var1
= self
->attrs
[COLOR_hash_collection__HashMapValues___64dmap
].val
; /* @map on <self:HashMapValues[Object, nullable Object]> */
2019 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @map");
2020 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 272);
2027 /* method hash_collection#HashMapValues#map for (self: Object): HashMap[Object, nullable Object] */
2028 val
* VIRTUAL_hash_collection__HashMapValues__map(val
* self
) {
2029 val
* var
/* : HashMap[Object, nullable Object] */;
2030 val
* var1
/* : HashMap[Object, nullable Object] */;
2031 var1
= hash_collection__HashMapValues__map(self
);
2036 /* method hash_collection#HashMapValues#map= for (self: HashMapValues[Object, nullable Object], HashMap[Object, nullable Object]) */
2037 void hash_collection__HashMapValues__map_61d(val
* self
, val
* p0
) {
2038 short int var
/* : Bool */;
2041 const struct type
* type_struct
;
2042 const char* var_class_name
;
2043 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapValues#0, HashMapValues#1] */
2044 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapValues#0, HashMapValues#1] */
2045 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapValues_FT0hash_collection__HashMapValues_FT1
];
2046 cltype
= type_struct
->color
;
2047 idtype
= type_struct
->id
;
2048 if(cltype
>= p0
->type
->table_size
) {
2051 var
= p0
->type
->type_table
[cltype
] == idtype
;
2054 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2055 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapValues#0, HashMapValues#1]", var_class_name
);
2056 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 272);
2059 self
->attrs
[COLOR_hash_collection__HashMapValues___64dmap
].val
= p0
; /* @map on <self:HashMapValues[Object, nullable Object]> */
2062 /* method hash_collection#HashMapValues#map= for (self: Object, HashMap[Object, nullable Object]) */
2063 void VIRTUAL_hash_collection__HashMapValues__map_61d(val
* self
, val
* p0
) {
2064 hash_collection__HashMapValues__map_61d(self
, p0
);
2067 /* method hash_collection#HashMapValues#count for (self: HashMapValues[Object, nullable Object], nullable Object): Int */
2068 long hash_collection__HashMapValues__count(val
* self
, val
* p0
) {
2069 long var
/* : Int */;
2070 short int var1
/* : Bool */;
2073 const struct type
* type_struct
;
2074 short int is_nullable
;
2075 const char* var_class_name
;
2076 val
* var_item
/* var item: nullable Object */;
2077 long var2
/* : Int */;
2078 long var_nb
/* var nb: Int */;
2079 val
* var3
/* : HashMap[Object, nullable Object] */;
2080 val
* var4
/* : nullable HashNode[Object] */;
2081 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2082 val
* var5
/* : null */;
2083 short int var6
/* : Bool */;
2084 val
* var7
/* : nullable Object */;
2085 short int var8
/* : Bool */;
2086 long var9
/* : Int */;
2087 long var10
/* : Int */;
2088 long var12
/* : Int */;
2089 val
* var13
/* : nullable HashNode[Object] */;
2090 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
2091 /* <p0:nullable Object> isa Collection#0 */
2092 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
2093 cltype
= type_struct
->color
;
2094 idtype
= type_struct
->id
;
2095 is_nullable
= type_struct
->is_nullable
;
2099 if(cltype
>= p0
->type
->table_size
) {
2102 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2106 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2107 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
2108 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 275);
2114 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2115 var4
= var3
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var3:HashMap[Object, nullable Object]> */
2119 if (var_c
== NULL
) {
2120 var6
= 0; /* is null */
2122 var6
= 1; /* arg is null and recv is not */
2125 var7
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2127 var8
= (var_item
== NULL
);
2129 var8
= ((short int (*)(val
*, val
*))(var7
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var7
, var_item
) /* == on <var7:nullable Object>*/;
2133 { /* Inline kernel#Int#+ (var_nb,var9) */
2134 var12
= var_nb
+ var9
;
2137 RET_LABEL11
:(void)0;
2142 var13
= var_c
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2144 CONTINUE_label
: (void)0;
2146 BREAK_label
: (void)0;
2152 /* method hash_collection#HashMapValues#count for (self: Object, nullable Object): Int */
2153 long VIRTUAL_hash_collection__HashMapValues__count(val
* self
, val
* p0
) {
2154 long var
/* : Int */;
2155 long var1
/* : Int */;
2156 var1
= hash_collection__HashMapValues__count(self
, p0
);
2161 /* method hash_collection#HashMapValues#first for (self: HashMapValues[Object, nullable Object]): nullable Object */
2162 val
* hash_collection__HashMapValues__first(val
* self
) {
2163 val
* var
/* : nullable Object */;
2164 val
* var1
/* : HashMap[Object, nullable Object] */;
2165 val
* var2
/* : nullable HashNode[Object] */;
2166 val
* var3
/* : nullable Object */;
2167 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2168 var2
= var1
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[Object, nullable Object]> */
2170 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2171 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 285);
2174 var3
= var2
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var2:nullable HashNode[Object](nullable HashMapNode[Object, nullable Object])> */
2180 /* method hash_collection#HashMapValues#first for (self: Object): nullable Object */
2181 val
* VIRTUAL_hash_collection__HashMapValues__first(val
* self
) {
2182 val
* var
/* : nullable Object */;
2183 val
* var1
/* : nullable Object */;
2184 var1
= hash_collection__HashMapValues__first(self
);
2189 /* method hash_collection#HashMapValues#has for (self: HashMapValues[Object, nullable Object], nullable Object): Bool */
2190 short int hash_collection__HashMapValues__has(val
* self
, val
* p0
) {
2191 short int var
/* : Bool */;
2192 short int var1
/* : Bool */;
2195 const struct type
* type_struct
;
2196 short int is_nullable
;
2197 const char* var_class_name
;
2198 val
* var_item
/* var item: nullable Object */;
2199 val
* var2
/* : HashMap[Object, nullable Object] */;
2200 val
* var3
/* : nullable HashNode[Object] */;
2201 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2202 val
* var4
/* : null */;
2203 short int var5
/* : Bool */;
2204 val
* var6
/* : nullable Object */;
2205 short int var7
/* : Bool */;
2206 short int var8
/* : Bool */;
2207 val
* var9
/* : nullable HashNode[Object] */;
2208 short int var10
/* : Bool */;
2209 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
2210 /* <p0:nullable Object> isa Collection#0 */
2211 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
2212 cltype
= type_struct
->color
;
2213 idtype
= type_struct
->id
;
2214 is_nullable
= type_struct
->is_nullable
;
2218 if(cltype
>= p0
->type
->table_size
) {
2221 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2225 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2226 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
2227 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 287);
2231 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2232 var3
= var2
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var2:HashMap[Object, nullable Object]> */
2236 if (var_c
== NULL
) {
2237 var5
= 0; /* is null */
2239 var5
= 1; /* arg is null and recv is not */
2242 var6
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2244 var7
= (var_item
== NULL
);
2246 var7
= ((short int (*)(val
*, val
*))(var6
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var6
, var_item
) /* == on <var6:nullable Object>*/;
2254 var9
= var_c
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2256 CONTINUE_label
: (void)0;
2258 BREAK_label
: (void)0;
2265 /* method hash_collection#HashMapValues#has for (self: Object, nullable Object): Bool */
2266 short int VIRTUAL_hash_collection__HashMapValues__has(val
* self
, val
* p0
) {
2267 short int var
/* : Bool */;
2268 short int var1
/* : Bool */;
2269 var1
= hash_collection__HashMapValues__has(self
, p0
);
2274 /* method hash_collection#HashMapValues#has_only for (self: HashMapValues[Object, nullable Object], nullable Object): Bool */
2275 short int hash_collection__HashMapValues__has_only(val
* self
, val
* p0
) {
2276 short int var
/* : Bool */;
2277 short int var1
/* : Bool */;
2280 const struct type
* type_struct
;
2281 short int is_nullable
;
2282 const char* var_class_name
;
2283 val
* var_item
/* var item: nullable Object */;
2284 val
* var2
/* : HashMap[Object, nullable Object] */;
2285 val
* var3
/* : nullable HashNode[Object] */;
2286 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2287 val
* var4
/* : null */;
2288 short int var5
/* : Bool */;
2289 val
* var6
/* : nullable Object */;
2290 short int var7
/* : Bool */;
2291 short int var8
/* : Bool */;
2292 val
* var9
/* : nullable HashNode[Object] */;
2293 short int var10
/* : Bool */;
2294 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
2295 /* <p0:nullable Object> isa Collection#0 */
2296 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
2297 cltype
= type_struct
->color
;
2298 idtype
= type_struct
->id
;
2299 is_nullable
= type_struct
->is_nullable
;
2303 if(cltype
>= p0
->type
->table_size
) {
2306 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2310 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2311 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
2312 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 297);
2316 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2317 var3
= var2
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var2:HashMap[Object, nullable Object]> */
2321 if (var_c
== NULL
) {
2322 var5
= 0; /* is null */
2324 var5
= 1; /* arg is null and recv is not */
2327 var6
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2329 var7
= (var_item
!= NULL
);
2331 var7
= ((short int (*)(val
*, val
*))(var6
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var6
, var_item
) /* != on <var6:nullable Object>*/;
2339 var9
= var_c
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2341 CONTINUE_label
: (void)0;
2343 BREAK_label
: (void)0;
2350 /* method hash_collection#HashMapValues#has_only for (self: Object, nullable Object): Bool */
2351 short int VIRTUAL_hash_collection__HashMapValues__has_only(val
* self
, val
* p0
) {
2352 short int var
/* : Bool */;
2353 short int var1
/* : Bool */;
2354 var1
= hash_collection__HashMapValues__has_only(self
, p0
);
2359 /* method hash_collection#HashMapValues#is_empty for (self: HashMapValues[Object, nullable Object]): Bool */
2360 short int hash_collection__HashMapValues__is_empty(val
* self
) {
2361 short int var
/* : Bool */;
2362 val
* var1
/* : HashMap[Object, nullable Object] */;
2363 short int var2
/* : Bool */;
2364 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2365 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapRead__is_empty
]))(var1
) /* is_empty on <var1:HashMap[Object, nullable Object]>*/;
2371 /* method hash_collection#HashMapValues#is_empty for (self: Object): Bool */
2372 short int VIRTUAL_hash_collection__HashMapValues__is_empty(val
* self
) {
2373 short int var
/* : Bool */;
2374 short int var1
/* : Bool */;
2375 var1
= hash_collection__HashMapValues__is_empty(self
);
2380 /* method hash_collection#HashMapValues#length for (self: HashMapValues[Object, nullable Object]): Int */
2381 long hash_collection__HashMapValues__length(val
* self
) {
2382 long var
/* : Int */;
2383 val
* var1
/* : HashMap[Object, nullable Object] */;
2384 long var2
/* : Int */;
2385 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2386 var2
= ((long (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapRead__length
]))(var1
) /* length on <var1:HashMap[Object, nullable Object]>*/;
2392 /* method hash_collection#HashMapValues#length for (self: Object): Int */
2393 long VIRTUAL_hash_collection__HashMapValues__length(val
* self
) {
2394 long var
/* : Int */;
2395 long var1
/* : Int */;
2396 var1
= hash_collection__HashMapValues__length(self
);
2401 /* method hash_collection#HashMapValues#iterator for (self: HashMapValues[Object, nullable Object]): Iterator[nullable Object] */
2402 val
* hash_collection__HashMapValues__iterator(val
* self
) {
2403 val
* var
/* : Iterator[nullable Object] */;
2404 val
* var1
/* : MapValuesIterator[Object, nullable Object] */;
2405 val
* var2
/* : HashMap[Object, nullable Object] */;
2406 val
* var3
/* : MapIterator[Object, nullable Object] */;
2407 var1
= NEW_abstract_collection__MapValuesIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapValuesIteratorhash_collection__HashMapValues_FT0hash_collection__HashMapValues_FT1
]);
2408 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2409 var3
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__MapRead__iterator
]))(var2
) /* iterator on <var2:HashMap[Object, nullable Object]>*/;
2410 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_abstract_collection__MapValuesIterator__init
]))(var1
, var3
) /* init on <var1:MapValuesIterator[Object, nullable Object]>*/;
2411 CHECK_NEW_abstract_collection__MapValuesIterator(var1
);
2417 /* method hash_collection#HashMapValues#iterator for (self: Object): Iterator[nullable Object] */
2418 val
* VIRTUAL_hash_collection__HashMapValues__iterator(val
* self
) {
2419 val
* var
/* : Iterator[nullable Object] */;
2420 val
* var1
/* : Iterator[nullable Object] */;
2421 var1
= hash_collection__HashMapValues__iterator(self
);
2426 /* method hash_collection#HashMapValues#clear for (self: HashMapValues[Object, nullable Object]) */
2427 void hash_collection__HashMapValues__clear(val
* self
) {
2428 val
* var
/* : HashMap[Object, nullable Object] */;
2429 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2430 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__Map__clear
]))(var
) /* clear on <var:HashMap[Object, nullable Object]>*/;
2433 /* method hash_collection#HashMapValues#clear for (self: Object) */
2434 void VIRTUAL_hash_collection__HashMapValues__clear(val
* self
) {
2435 hash_collection__HashMapValues__clear(self
);
2438 /* method hash_collection#HashMapValues#remove for (self: HashMapValues[Object, nullable Object], nullable Object) */
2439 void hash_collection__HashMapValues__remove(val
* self
, val
* p0
) {
2440 short int var
/* : Bool */;
2443 const struct type
* type_struct
;
2444 short int is_nullable
;
2445 const char* var_class_name
;
2446 val
* var_item
/* var item: nullable Object */;
2447 val
* var1
/* : HashMap[Object, nullable Object] */;
2448 val
* var_map
/* var map: HashMap[Object, nullable Object] */;
2449 val
* var2
/* : nullable HashNode[Object] */;
2450 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2451 val
* var3
/* : null */;
2452 short int var4
/* : Bool */;
2453 val
* var5
/* : nullable Object */;
2454 short int var6
/* : Bool */;
2455 val
* var7
/* : Object */;
2456 val
* var8
/* : nullable HashNode[Object] */;
2457 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa RemovableCollection#0 */
2458 /* <p0:nullable Object> isa RemovableCollection#0 */
2459 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
2460 cltype
= type_struct
->color
;
2461 idtype
= type_struct
->id
;
2462 is_nullable
= type_struct
->is_nullable
;
2466 if(cltype
>= p0
->type
->table_size
) {
2469 var
= p0
->type
->type_table
[cltype
] == idtype
;
2473 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2474 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
2475 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 314);
2479 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2481 var2
= var_map
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_map:HashMap[Object, nullable Object]> */
2485 if (var_c
== NULL
) {
2486 var4
= 0; /* is null */
2488 var4
= 1; /* arg is null and recv is not */
2491 var5
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2493 var6
= (var_item
== NULL
);
2495 var6
= ((short int (*)(val
*, val
*))(var5
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var5
, var_item
) /* == on <var5:nullable Object>*/;
2498 var7
= var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2500 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
2501 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 320);
2504 ((void (*)(val
*, val
*))(var_map
->class->vft
[COLOR_hash_collection__HashCollection__remove_node
]))(var_map
, var7
) /* remove_node on <var_map:HashMap[Object, nullable Object]>*/;
2508 var8
= var_c
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2510 CONTINUE_label
: (void)0;
2512 BREAK_label
: (void)0;
2515 /* method hash_collection#HashMapValues#remove for (self: Object, nullable Object) */
2516 void VIRTUAL_hash_collection__HashMapValues__remove(val
* self
, val
* p0
) {
2517 hash_collection__HashMapValues__remove(self
, p0
);
2520 /* method hash_collection#HashMapValues#remove_all for (self: HashMapValues[Object, nullable Object], nullable Object) */
2521 void hash_collection__HashMapValues__remove_all(val
* self
, val
* p0
) {
2522 short int var
/* : Bool */;
2525 const struct type
* type_struct
;
2526 short int is_nullable
;
2527 const char* var_class_name
;
2528 val
* var_item
/* var item: nullable Object */;
2529 val
* var1
/* : HashMap[Object, nullable Object] */;
2530 val
* var_map
/* var map: HashMap[Object, nullable Object] */;
2531 val
* var2
/* : nullable HashNode[Object] */;
2532 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2533 val
* var3
/* : null */;
2534 short int var4
/* : Bool */;
2535 val
* var5
/* : nullable Object */;
2536 short int var6
/* : Bool */;
2537 val
* var7
/* : Object */;
2538 val
* var8
/* : nullable HashNode[Object] */;
2539 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa RemovableCollection#0 */
2540 /* <p0:nullable Object> isa RemovableCollection#0 */
2541 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
2542 cltype
= type_struct
->color
;
2543 idtype
= type_struct
->id
;
2544 is_nullable
= type_struct
->is_nullable
;
2548 if(cltype
>= p0
->type
->table_size
) {
2551 var
= p0
->type
->type_table
[cltype
] == idtype
;
2555 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2556 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
2557 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 327);
2561 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2563 var2
= var_map
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_map:HashMap[Object, nullable Object]> */
2567 if (var_c
== NULL
) {
2568 var4
= 0; /* is null */
2570 var4
= 1; /* arg is null and recv is not */
2573 var5
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2575 var6
= (var_item
== NULL
);
2577 var6
= ((short int (*)(val
*, val
*))(var5
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var5
, var_item
) /* == on <var5:nullable Object>*/;
2580 var7
= var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2582 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
2583 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 333);
2586 ((void (*)(val
*, val
*))(var_map
->class->vft
[COLOR_hash_collection__HashCollection__remove_node
]))(var_map
, var7
) /* remove_node on <var_map:HashMap[Object, nullable Object]>*/;
2589 var8
= var_c
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2591 CONTINUE_label
: (void)0;
2593 BREAK_label
: (void)0;
2596 /* method hash_collection#HashMapValues#remove_all for (self: Object, nullable Object) */
2597 void VIRTUAL_hash_collection__HashMapValues__remove_all(val
* self
, val
* p0
) {
2598 hash_collection__HashMapValues__remove_all(self
, p0
);
2601 /* method hash_collection#HashMapValues#init for (self: HashMapValues[Object, nullable Object], HashMap[Object, nullable Object]) */
2602 void hash_collection__HashMapValues__init(val
* self
, val
* p0
) {
2603 short int var
/* : Bool */;
2606 const struct type
* type_struct
;
2607 const char* var_class_name
;
2608 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapValues#0, HashMapValues#1] */
2609 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapValues#0, HashMapValues#1] */
2610 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapValues_FT0hash_collection__HashMapValues_FT1
];
2611 cltype
= type_struct
->color
;
2612 idtype
= type_struct
->id
;
2613 if(cltype
>= p0
->type
->table_size
) {
2616 var
= p0
->type
->type_table
[cltype
] == idtype
;
2619 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2620 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapValues#0, HashMapValues#1]", var_class_name
);
2621 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 269);
2624 self
->attrs
[COLOR_hash_collection__HashMapValues___64dmap
].val
= p0
; /* @map on <self:HashMapValues[Object, nullable Object]> */
2627 /* method hash_collection#HashMapValues#init for (self: Object, HashMap[Object, nullable Object]) */
2628 void VIRTUAL_hash_collection__HashMapValues__init(val
* self
, val
* p0
) {
2629 hash_collection__HashMapValues__init(self
, p0
);
2632 /* method hash_collection#HashMapNode#init for (self: HashMapNode[Object, nullable Object], Object, nullable Object) */
2633 void hash_collection__HashMapNode__init(val
* self
, val
* p0
, val
* p1
) {
2634 short int var
/* : Bool */;
2637 const struct type
* type_struct
;
2638 const char* var_class_name
;
2639 short int var1
/* : Bool */;
2642 const struct type
* type_struct4
;
2643 short int is_nullable
;
2644 const char* var_class_name5
;
2645 val
* var_k
/* var k: Object */;
2646 val
* var_v
/* var v: nullable Object */;
2647 /* Covariant cast for argument 0 (k) <p0:Object> isa HashMapNode#0 */
2648 /* <p0:Object> isa HashMapNode#0 */
2649 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapNode_FT0
];
2650 cltype
= type_struct
->color
;
2651 idtype
= type_struct
->id
;
2652 if(cltype
>= p0
->type
->table_size
) {
2655 var
= p0
->type
->type_table
[cltype
] == idtype
;
2658 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2659 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMapNode#0", var_class_name
);
2660 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 345);
2663 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa HashMapNode#1 */
2664 /* <p1:nullable Object> isa HashMapNode#1 */
2665 type_struct4
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapNode_FT1
];
2666 cltype2
= type_struct4
->color
;
2667 idtype3
= type_struct4
->id
;
2668 is_nullable
= type_struct4
->is_nullable
;
2672 if(cltype2
>= p1
->type
->table_size
) {
2675 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
2679 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
2680 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMapNode#1", var_class_name5
);
2681 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 345);
2686 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashNode__init
]))(self
, var_k
) /* init on <self:HashMapNode[Object, nullable Object]>*/;
2687 self
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
= var_v
; /* _value on <self:HashMapNode[Object, nullable Object]> */
2690 /* method hash_collection#HashMapNode#init for (self: Object, Object, nullable Object) */
2691 void VIRTUAL_hash_collection__HashMapNode__init(val
* self
, val
* p0
, val
* p1
) {
2692 hash_collection__HashMapNode__init(self
, p0
, p1
);
2695 /* method hash_collection#HashMapIterator#is_ok for (self: HashMapIterator[Object, nullable Object]): Bool */
2696 short int hash_collection__HashMapIterator__is_ok(val
* self
) {
2697 short int var
/* : Bool */;
2698 val
* var1
/* : nullable HashMapNode[Object, nullable Object] */;
2699 val
* var2
/* : null */;
2700 short int var3
/* : Bool */;
2701 var1
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
2704 var3
= 0; /* is null */
2706 var3
= 1; /* arg is null and recv is not */
2713 /* method hash_collection#HashMapIterator#is_ok for (self: Object): Bool */
2714 short int VIRTUAL_hash_collection__HashMapIterator__is_ok(val
* self
) {
2715 short int var
/* : Bool */;
2716 short int var1
/* : Bool */;
2717 var1
= hash_collection__HashMapIterator__is_ok(self
);
2722 /* method hash_collection#HashMapIterator#item for (self: HashMapIterator[Object, nullable Object]): nullable Object */
2723 val
* hash_collection__HashMapIterator__item(val
* self
) {
2724 val
* var
/* : nullable Object */;
2725 short int var1
/* : Bool */;
2726 val
* var2
/* : nullable HashMapNode[Object, nullable Object] */;
2727 val
* var3
/* : nullable Object */;
2728 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(self
) /* is_ok on <self:HashMapIterator[Object, nullable Object]>*/;
2730 fprintf(stderr
, "Runtime error: %s", "Assert failed");
2731 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 358);
2734 var2
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
2736 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2737 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 359);
2740 var3
= var2
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var2:nullable HashMapNode[Object, nullable Object]> */
2746 /* method hash_collection#HashMapIterator#item for (self: Object): nullable Object */
2747 val
* VIRTUAL_hash_collection__HashMapIterator__item(val
* self
) {
2748 val
* var
/* : nullable Object */;
2749 val
* var1
/* : nullable Object */;
2750 var1
= hash_collection__HashMapIterator__item(self
);
2755 /* method hash_collection#HashMapIterator#key for (self: HashMapIterator[Object, nullable Object]): Object */
2756 val
* hash_collection__HashMapIterator__key(val
* self
) {
2757 val
* var
/* : Object */;
2758 short int var1
/* : Bool */;
2759 val
* var2
/* : nullable HashMapNode[Object, nullable Object] */;
2760 val
* var3
/* : Object */;
2761 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(self
) /* is_ok on <self:HashMapIterator[Object, nullable Object]>*/;
2763 fprintf(stderr
, "Runtime error: %s", "Assert failed");
2764 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 370);
2767 var2
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
2769 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2770 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 371);
2773 var3
= var2
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashMapNode[Object, nullable Object]> */
2775 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
2776 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 371);
2784 /* method hash_collection#HashMapIterator#key for (self: Object): Object */
2785 val
* VIRTUAL_hash_collection__HashMapIterator__key(val
* self
) {
2786 val
* var
/* : Object */;
2787 val
* var1
/* : Object */;
2788 var1
= hash_collection__HashMapIterator__key(self
);
2793 /* method hash_collection#HashMapIterator#next for (self: HashMapIterator[Object, nullable Object]) */
2794 void hash_collection__HashMapIterator__next(val
* self
) {
2795 short int var
/* : Bool */;
2796 val
* var1
/* : nullable HashMapNode[Object, nullable Object] */;
2797 val
* var2
/* : nullable HashNode[Object] */;
2798 var
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(self
) /* is_ok on <self:HashMapIterator[Object, nullable Object]>*/;
2800 fprintf(stderr
, "Runtime error: %s", "Assert failed");
2801 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 376);
2804 var1
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
2806 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2807 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 377);
2810 var2
= var1
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var1:nullable HashMapNode[Object, nullable Object]> */
2811 self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
= var2
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
2814 /* method hash_collection#HashMapIterator#next for (self: Object) */
2815 void VIRTUAL_hash_collection__HashMapIterator__next(val
* self
) {
2816 hash_collection__HashMapIterator__next(self
);
2819 /* method hash_collection#HashMapIterator#init for (self: HashMapIterator[Object, nullable Object], HashMap[Object, nullable Object]) */
2820 void hash_collection__HashMapIterator__init(val
* self
, val
* p0
) {
2821 short int var
/* : Bool */;
2824 const struct type
* type_struct
;
2825 const char* var_class_name
;
2826 val
* var_map
/* var map: HashMap[Object, nullable Object] */;
2827 val
* var1
/* : nullable HashNode[Object] */;
2828 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapIterator#0, HashMapIterator#1] */
2829 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapIterator#0, HashMapIterator#1] */
2830 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapIterator_FT0hash_collection__HashMapIterator_FT1
];
2831 cltype
= type_struct
->color
;
2832 idtype
= type_struct
->id
;
2833 if(cltype
>= p0
->type
->table_size
) {
2836 var
= p0
->type
->type_table
[cltype
] == idtype
;
2839 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2840 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapIterator#0, HashMapIterator#1]", var_class_name
);
2841 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 386);
2845 self
->attrs
[COLOR_hash_collection__HashMapIterator___map
].val
= var_map
; /* _map on <self:HashMapIterator[Object, nullable Object]> */
2846 var1
= ((val
* (*)(val
*))(var_map
->class->vft
[COLOR_hash_collection__HashCollection__first_item
]))(var_map
) /* first_item on <var_map:HashMap[Object, nullable Object]>*/;
2847 self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
= var1
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
2850 /* method hash_collection#HashMapIterator#init for (self: Object, HashMap[Object, nullable Object]) */
2851 void VIRTUAL_hash_collection__HashMapIterator__init(val
* self
, val
* p0
) {
2852 hash_collection__HashMapIterator__init(self
, p0
);
2855 /* method hash_collection#HashSet#length for (self: HashSet[Object]): Int */
2856 long hash_collection__HashSet__length(val
* self
) {
2857 long var
/* : Int */;
2858 long var1
/* : Int */;
2859 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashSet[Object]> */
2865 /* method hash_collection#HashSet#length for (self: Object): Int */
2866 long VIRTUAL_hash_collection__HashSet__length(val
* self
) {
2867 long var
/* : Int */;
2868 long var1
/* : Int */;
2869 var1
= hash_collection__HashSet__length(self
);
2874 /* method hash_collection#HashSet#is_empty for (self: HashSet[Object]): Bool */
2875 short int hash_collection__HashSet__is_empty(val
* self
) {
2876 short int var
/* : Bool */;
2877 long var1
/* : Int */;
2878 long var2
/* : Int */;
2879 short int var3
/* : Bool */;
2880 short int var5
/* : Bool */;
2881 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashSet[Object]> */
2883 { /* Inline kernel#Int#== (var1,var2) */
2884 var5
= var1
== var2
;
2894 /* method hash_collection#HashSet#is_empty for (self: Object): Bool */
2895 short int VIRTUAL_hash_collection__HashSet__is_empty(val
* self
) {
2896 short int var
/* : Bool */;
2897 short int var1
/* : Bool */;
2898 var1
= hash_collection__HashSet__is_empty(self
);
2903 /* method hash_collection#HashSet#first for (self: HashSet[Object]): Object */
2904 val
* hash_collection__HashSet__first(val
* self
) {
2905 val
* var
/* : Object */;
2906 long var1
/* : Int */;
2907 long var2
/* : Int */;
2908 short int var3
/* : Bool */;
2909 short int var5
/* : Bool */;
2912 const char* var_class_name
;
2913 short int var6
/* : Bool */;
2914 val
* var7
/* : nullable HashNode[Object] */;
2915 val
* var8
/* : Object */;
2916 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashSet[Object]> */
2918 { /* Inline kernel#Int#> (var1,var2) */
2919 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
2920 /* <var2:Int> isa OTHER */
2921 var5
= 1; /* easy <var2:Int> isa OTHER*/
2923 var_class_name
= type_kernel__Int
.name
;
2924 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2925 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
2934 fprintf(stderr
, "Runtime error: %s", "Assert failed");
2935 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 405);
2938 var7
= self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashSet[Object]> */
2940 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2941 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 406);
2944 var8
= var7
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var7:nullable HashNode[Object](nullable HashSetNode[Object])> */
2946 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
2947 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 406);
2955 /* method hash_collection#HashSet#first for (self: Object): nullable Object */
2956 val
* VIRTUAL_hash_collection__HashSet__first(val
* self
) {
2957 val
* var
/* : nullable Object */;
2958 val
* var1
/* : Object */;
2959 var1
= hash_collection__HashSet__first(self
);
2964 /* method hash_collection#HashSet#has for (self: HashSet[Object], Object): Bool */
2965 short int hash_collection__HashSet__has(val
* self
, val
* p0
) {
2966 short int var
/* : Bool */;
2967 short int var1
/* : Bool */;
2970 const struct type
* type_struct
;
2971 const char* var_class_name
;
2972 val
* var_item
/* var item: Object */;
2973 val
* var2
/* : nullable HashNode[Object] */;
2974 val
* var3
/* : null */;
2975 short int var4
/* : Bool */;
2976 /* Covariant cast for argument 0 (item) <p0:Object> isa Collection#0 */
2977 /* <p0:Object> isa Collection#0 */
2978 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
2979 cltype
= type_struct
->color
;
2980 idtype
= type_struct
->id
;
2981 if(cltype
>= p0
->type
->table_size
) {
2984 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2987 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2988 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
2989 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 409);
2993 var2
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__node_at
]))(self
, var_item
) /* node_at on <self:HashSet[Object]>*/;
2996 var4
= 0; /* is null */
2998 var4
= 1; /* arg is null and recv is not */
3005 /* method hash_collection#HashSet#has for (self: Object, nullable Object): Bool */
3006 short int VIRTUAL_hash_collection__HashSet__has(val
* self
, val
* p0
) {
3007 short int var
/* : Bool */;
3008 short int var1
/* : Bool */;
3009 var1
= hash_collection__HashSet__has(self
, p0
);
3014 /* method hash_collection#HashSet#add for (self: HashSet[Object], Object) */
3015 void hash_collection__HashSet__add(val
* self
, val
* p0
) {
3016 short int var
/* : Bool */;
3019 const struct type
* type_struct
;
3020 const char* var_class_name
;
3021 val
* var_item
/* var item: Object */;
3022 long var1
/* : Int */;
3023 long var_i
/* var i: Int */;
3024 val
* var2
/* : nullable HashNode[Object] */;
3025 val
* var_c
/* var c: nullable HashSetNode[Object] */;
3026 val
* var3
/* : null */;
3027 short int var4
/* : Bool */;
3028 val
* var5
/* : HashSetNode[Object] */;
3029 /* Covariant cast for argument 0 (item) <p0:Object> isa SimpleCollection#0 */
3030 /* <p0:Object> isa SimpleCollection#0 */
3031 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SimpleCollection_FT0
];
3032 cltype
= type_struct
->color
;
3033 idtype
= type_struct
->id
;
3034 if(cltype
>= p0
->type
->table_size
) {
3037 var
= p0
->type
->type_table
[cltype
] == idtype
;
3040 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3041 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "SimpleCollection#0", var_class_name
);
3042 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 414);
3046 var1
= ((long (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__index_at
]))(self
, var_item
) /* index_at on <self:HashSet[Object]>*/;
3048 var2
= ((val
* (*)(val
*, long, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__node_at_idx
]))(self
, var_i
, var_item
) /* node_at_idx on <self:HashSet[Object]>*/;
3051 if (var_c
== NULL
) {
3052 var4
= 0; /* is null */
3054 var4
= 1; /* arg is null and recv is not */
3057 var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_item
; /* _key on <var_c:nullable HashSetNode[Object](HashSetNode[Object])> */
3059 var5
= NEW_hash_collection__HashSetNode(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSetNodehash_collection__HashSet_FT0
]);
3060 ((void (*)(val
*, val
*))(var5
->class->vft
[COLOR_hash_collection__HashSetNode__init
]))(var5
, var_item
) /* init on <var5:HashSetNode[Object]>*/;
3061 CHECK_NEW_hash_collection__HashSetNode(var5
);
3062 ((void (*)(val
*, long, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__store
]))(self
, var_i
, var5
) /* store on <self:HashSet[Object]>*/;
3066 /* method hash_collection#HashSet#add for (self: Object, nullable Object) */
3067 void VIRTUAL_hash_collection__HashSet__add(val
* self
, val
* p0
) {
3068 hash_collection__HashSet__add(self
, p0
);
3071 /* method hash_collection#HashSet#remove for (self: HashSet[Object], Object) */
3072 void hash_collection__HashSet__remove(val
* self
, val
* p0
) {
3073 short int var
/* : Bool */;
3076 const struct type
* type_struct
;
3077 const char* var_class_name
;
3078 val
* var_item
/* var item: Object */;
3079 /* Covariant cast for argument 0 (item) <p0:Object> isa RemovableCollection#0 */
3080 /* <p0:Object> isa RemovableCollection#0 */
3081 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
3082 cltype
= type_struct
->color
;
3083 idtype
= type_struct
->id
;
3084 if(cltype
>= p0
->type
->table_size
) {
3087 var
= p0
->type
->type_table
[cltype
] == idtype
;
3090 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3091 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
3092 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 425);
3096 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__remove_node
]))(self
, var_item
) /* remove_node on <self:HashSet[Object]>*/;
3099 /* method hash_collection#HashSet#remove for (self: Object, nullable Object) */
3100 void VIRTUAL_hash_collection__HashSet__remove(val
* self
, val
* p0
) {
3101 hash_collection__HashSet__remove(self
, p0
);
3104 /* method hash_collection#HashSet#clear for (self: HashSet[Object]) */
3105 void hash_collection__HashSet__clear(val
* self
) {
3106 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__raz
]))(self
) /* raz on <self:HashSet[Object]>*/;
3109 /* method hash_collection#HashSet#clear for (self: Object) */
3110 void VIRTUAL_hash_collection__HashSet__clear(val
* self
) {
3111 hash_collection__HashSet__clear(self
);
3114 /* method hash_collection#HashSet#iterator for (self: HashSet[Object]): Iterator[Object] */
3115 val
* hash_collection__HashSet__iterator(val
* self
) {
3116 val
* var
/* : Iterator[Object] */;
3117 val
* var1
/* : HashSetIterator[Object] */;
3118 var1
= NEW_hash_collection__HashSetIterator(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSetIteratorhash_collection__HashSet_FT0
]);
3119 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_hash_collection__HashSetIterator__init
]))(var1
, self
) /* init on <var1:HashSetIterator[Object]>*/;
3120 CHECK_NEW_hash_collection__HashSetIterator(var1
);
3126 /* method hash_collection#HashSet#iterator for (self: Object): Iterator[nullable Object] */
3127 val
* VIRTUAL_hash_collection__HashSet__iterator(val
* self
) {
3128 val
* var
/* : Iterator[nullable Object] */;
3129 val
* var1
/* : Iterator[Object] */;
3130 var1
= hash_collection__HashSet__iterator(self
);
3135 /* method hash_collection#HashSet#init for (self: HashSet[Object]) */
3136 void hash_collection__HashSet__init(val
* self
) {
3137 long var
/* : Int */;
3138 long var1
/* : Int */;
3139 long var2
/* : Int */;
3140 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__init
]))(self
) /* init on <self:HashSet[Object]>*/;
3142 self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
= var
; /* _capacity on <self:HashSet[Object]> */
3144 self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
= var1
; /* _length on <self:HashSet[Object]> */
3146 ((void (*)(val
*, long))(self
->class->vft
[COLOR_hash_collection__HashCollection__enlarge
]))(self
, var2
) /* enlarge on <self:HashSet[Object]>*/;
3149 /* method hash_collection#HashSet#init for (self: Object) */
3150 void VIRTUAL_hash_collection__HashSet__init(val
* self
) {
3151 hash_collection__HashSet__init(self
);
3154 /* method hash_collection#HashSet#from for (self: HashSet[Object], Collection[Object]) */
3155 void hash_collection__HashSet__from(val
* self
, val
* p0
) {
3156 short int var
/* : Bool */;
3159 const struct type
* type_struct
;
3160 const char* var_class_name
;
3161 val
* var_coll
/* var coll: Collection[Object] */;
3162 /* Covariant cast for argument 0 (coll) <p0:Collection[Object]> isa Collection[HashSet#0] */
3163 /* <p0:Collection[Object]> isa Collection[HashSet#0] */
3164 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionhash_collection__HashSet_FT0
];
3165 cltype
= type_struct
->color
;
3166 idtype
= type_struct
->id
;
3167 if(cltype
>= p0
->type
->table_size
) {
3170 var
= p0
->type
->type_table
[cltype
] == idtype
;
3173 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3174 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[HashSet#0]", var_class_name
);
3175 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 438);
3179 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashSet__init
]))(self
) /* init on <self:HashSet[Object]>*/;
3180 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__SimpleCollection__add_all
]))(self
, var_coll
) /* add_all on <self:HashSet[Object]>*/;
3183 /* method hash_collection#HashSet#from for (self: Object, Collection[Object]) */
3184 void VIRTUAL_hash_collection__HashSet__from(val
* self
, val
* p0
) {
3185 hash_collection__HashSet__from(self
, p0
);
3188 /* method hash_collection#HashSetNode#init for (self: HashSetNode[Object], Object) */
3189 void hash_collection__HashSetNode__init(val
* self
, val
* p0
) {
3190 short int var
/* : Bool */;
3193 const struct type
* type_struct
;
3194 const char* var_class_name
;
3195 val
* var_e
/* var e: Object */;
3196 /* Covariant cast for argument 0 (e) <p0:Object> isa HashSetNode#0 */
3197 /* <p0:Object> isa HashSetNode#0 */
3198 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSetNode_FT0
];
3199 cltype
= type_struct
->color
;
3200 idtype
= type_struct
->id
;
3201 if(cltype
>= p0
->type
->table_size
) {
3204 var
= p0
->type
->type_table
[cltype
] == idtype
;
3207 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3208 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSetNode#0", var_class_name
);
3209 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 449);
3213 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashNode__init
]))(self
, p0
) /* init on <self:HashSetNode[Object]>*/;
3214 self
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_e
; /* _key on <self:HashSetNode[Object]> */
3217 /* method hash_collection#HashSetNode#init for (self: Object, Object) */
3218 void VIRTUAL_hash_collection__HashSetNode__init(val
* self
, val
* p0
) {
3219 hash_collection__HashSetNode__init(self
, p0
);
3222 /* method hash_collection#HashSetIterator#is_ok for (self: HashSetIterator[Object]): Bool */
3223 short int hash_collection__HashSetIterator__is_ok(val
* self
) {
3224 short int var
/* : Bool */;
3225 val
* var1
/* : nullable HashSetNode[Object] */;
3226 val
* var2
/* : null */;
3227 short int var3
/* : Bool */;
3228 var1
= self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[Object]> */
3231 var3
= 0; /* is null */
3233 var3
= 1; /* arg is null and recv is not */
3240 /* method hash_collection#HashSetIterator#is_ok for (self: Object): Bool */
3241 short int VIRTUAL_hash_collection__HashSetIterator__is_ok(val
* self
) {
3242 short int var
/* : Bool */;
3243 short int var1
/* : Bool */;
3244 var1
= hash_collection__HashSetIterator__is_ok(self
);
3249 /* method hash_collection#HashSetIterator#item for (self: HashSetIterator[Object]): Object */
3250 val
* hash_collection__HashSetIterator__item(val
* self
) {
3251 val
* var
/* : Object */;
3252 short int var1
/* : Bool */;
3253 val
* var2
/* : nullable HashSetNode[Object] */;
3254 val
* var3
/* : Object */;
3255 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(self
) /* is_ok on <self:HashSetIterator[Object]>*/;
3257 fprintf(stderr
, "Runtime error: %s", "Assert failed");
3258 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 461);
3261 var2
= self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[Object]> */
3263 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
3264 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 462);
3267 var3
= var2
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashSetNode[Object]> */
3269 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
3270 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 462);
3278 /* method hash_collection#HashSetIterator#item for (self: Object): nullable Object */
3279 val
* VIRTUAL_hash_collection__HashSetIterator__item(val
* self
) {
3280 val
* var
/* : nullable Object */;
3281 val
* var1
/* : Object */;
3282 var1
= hash_collection__HashSetIterator__item(self
);
3287 /* method hash_collection#HashSetIterator#next for (self: HashSetIterator[Object]) */
3288 void hash_collection__HashSetIterator__next(val
* self
) {
3289 short int var
/* : Bool */;
3290 val
* var1
/* : nullable HashSetNode[Object] */;
3291 val
* var2
/* : nullable HashNode[Object] */;
3292 var
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(self
) /* is_ok on <self:HashSetIterator[Object]>*/;
3294 fprintf(stderr
, "Runtime error: %s", "Assert failed");
3295 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 467);
3298 var1
= self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[Object]> */
3300 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
3301 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 468);
3304 var2
= var1
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var1:nullable HashSetNode[Object]> */
3305 self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
= var2
; /* _node on <self:HashSetIterator[Object]> */
3308 /* method hash_collection#HashSetIterator#next for (self: Object) */
3309 void VIRTUAL_hash_collection__HashSetIterator__next(val
* self
) {
3310 hash_collection__HashSetIterator__next(self
);
3313 /* method hash_collection#HashSetIterator#init for (self: HashSetIterator[Object], HashSet[Object]) */
3314 void hash_collection__HashSetIterator__init(val
* self
, val
* p0
) {
3315 short int var
/* : Bool */;
3318 const struct type
* type_struct
;
3319 const char* var_class_name
;
3320 val
* var_set
/* var set: HashSet[Object] */;
3321 val
* var1
/* : nullable HashNode[Object] */;
3322 /* Covariant cast for argument 0 (set) <p0:HashSet[Object]> isa HashSet[HashSetIterator#0] */
3323 /* <p0:HashSet[Object]> isa HashSet[HashSetIterator#0] */
3324 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSethash_collection__HashSetIterator_FT0
];
3325 cltype
= type_struct
->color
;
3326 idtype
= type_struct
->id
;
3327 if(cltype
>= p0
->type
->table_size
) {
3330 var
= p0
->type
->type_table
[cltype
] == idtype
;
3333 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3334 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSet[HashSetIterator#0]", var_class_name
);
3335 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 477);
3339 self
->attrs
[COLOR_hash_collection__HashSetIterator___set
].val
= var_set
; /* _set on <self:HashSetIterator[Object]> */
3340 var1
= var_set
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_set:HashSet[Object]> */
3341 self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
= var1
; /* _node on <self:HashSetIterator[Object]> */
3344 /* method hash_collection#HashSetIterator#init for (self: Object, HashSet[Object]) */
3345 void VIRTUAL_hash_collection__HashSetIterator__init(val
* self
, val
* p0
) {
3346 hash_collection__HashSetIterator__init(self
, p0
);