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]>*/;
1289 /* method hash_collection#HashMap#iterator for (self: Object): MapIterator[Object, nullable Object] */
1290 val
* VIRTUAL_hash_collection__HashMap__iterator(val
* self
) {
1291 val
* var
/* : MapIterator[Object, nullable Object] */;
1292 val
* var1
/* : HashMapIterator[Object, nullable Object] */;
1293 var1
= hash_collection__HashMap__iterator(self
);
1298 /* method hash_collection#HashMap#length for (self: HashMap[Object, nullable Object]): Int */
1299 long hash_collection__HashMap__length(val
* self
) {
1300 long var
/* : Int */;
1301 long var1
/* : Int */;
1302 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashMap[Object, nullable Object]> */
1308 /* method hash_collection#HashMap#length for (self: Object): Int */
1309 long VIRTUAL_hash_collection__HashMap__length(val
* self
) {
1310 long var
/* : Int */;
1311 long var1
/* : Int */;
1312 var1
= hash_collection__HashMap__length(self
);
1317 /* method hash_collection#HashMap#is_empty for (self: HashMap[Object, nullable Object]): Bool */
1318 short int hash_collection__HashMap__is_empty(val
* self
) {
1319 short int var
/* : Bool */;
1320 long var1
/* : Int */;
1321 long var2
/* : Int */;
1322 short int var3
/* : Bool */;
1323 short int var5
/* : Bool */;
1324 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashMap[Object, nullable Object]> */
1326 { /* Inline kernel#Int#== (var1,var2) */
1327 var5
= var1
== var2
;
1337 /* method hash_collection#HashMap#is_empty for (self: Object): Bool */
1338 short int VIRTUAL_hash_collection__HashMap__is_empty(val
* self
) {
1339 short int var
/* : Bool */;
1340 short int var1
/* : Bool */;
1341 var1
= hash_collection__HashMap__is_empty(self
);
1346 /* method hash_collection#HashMap#[]= for (self: HashMap[Object, nullable Object], Object, nullable Object) */
1347 void hash_collection__HashMap___91d_93d_61d(val
* self
, val
* p0
, val
* p1
) {
1348 short int var
/* : Bool */;
1351 const struct type
* type_struct
;
1352 const char* var_class_name
;
1353 short int var1
/* : Bool */;
1356 const struct type
* type_struct4
;
1357 short int is_nullable
;
1358 const char* var_class_name5
;
1359 val
* var_key
/* var key: Object */;
1360 val
* var_v
/* var v: nullable Object */;
1361 long var6
/* : Int */;
1362 long var_i
/* var i: Int */;
1363 val
* var7
/* : nullable HashNode[Object] */;
1364 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
1365 val
* var8
/* : null */;
1366 short int var9
/* : Bool */;
1367 val
* var10
/* : HashMapNode[Object, nullable Object] */;
1368 /* Covariant cast for argument 0 (key) <p0:Object> isa Map#0 */
1369 /* <p0:Object> isa Map#0 */
1370 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Map_FT0
];
1371 cltype
= type_struct
->color
;
1372 idtype
= type_struct
->id
;
1373 if(cltype
>= p0
->type
->table_size
) {
1376 var
= p0
->type
->type_table
[cltype
] == idtype
;
1379 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1380 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Map#0", var_class_name
);
1381 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 223);
1384 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa Map#1 */
1385 /* <p1:nullable Object> isa Map#1 */
1386 type_struct4
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Map_FT1
];
1387 cltype2
= type_struct4
->color
;
1388 idtype3
= type_struct4
->id
;
1389 is_nullable
= type_struct4
->is_nullable
;
1393 if(cltype2
>= p1
->type
->table_size
) {
1396 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
1400 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
1401 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Map#1", var_class_name5
);
1402 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 223);
1407 var6
= ((long (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__index_at
]))(self
, var_key
) /* index_at on <self:HashMap[Object, nullable Object]>*/;
1409 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]>*/;
1412 if (var_c
== NULL
) {
1413 var9
= 0; /* is null */
1415 var9
= 1; /* arg is null and recv is not */
1418 var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_key
; /* _key on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1419 var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
= var_v
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
1421 var10
= NEW_hash_collection__HashMapNode(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapNodehash_collection__HashMap_FT0hash_collection__HashMap_FT1
]);
1422 ((void (*)(val
*, val
*, val
*))(var10
->class->vft
[COLOR_hash_collection__HashMapNode__init
]))(var10
, var_key
, var_v
) /* init on <var10:HashMapNode[Object, nullable Object]>*/;
1423 ((void (*)(val
*, long, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__store
]))(self
, var_i
, var10
) /* store on <self:HashMap[Object, nullable Object]>*/;
1427 /* method hash_collection#HashMap#[]= for (self: Object, Object, nullable Object) */
1428 void VIRTUAL_hash_collection__HashMap___91d_93d_61d(val
* self
, val
* p0
, val
* p1
) {
1429 hash_collection__HashMap___91d_93d_61d(self
, p0
, p1
);
1432 /* method hash_collection#HashMap#clear for (self: HashMap[Object, nullable Object]) */
1433 void hash_collection__HashMap__clear(val
* self
) {
1434 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__raz
]))(self
) /* raz on <self:HashMap[Object, nullable Object]>*/;
1437 /* method hash_collection#HashMap#clear for (self: Object) */
1438 void VIRTUAL_hash_collection__HashMap__clear(val
* self
) {
1439 hash_collection__HashMap__clear(self
);
1442 /* method hash_collection#HashMap#init for (self: HashMap[Object, nullable Object]) */
1443 void hash_collection__HashMap__init(val
* self
) {
1444 long var
/* : Int */;
1445 long var1
/* : Int */;
1446 long var2
/* : Int */;
1447 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__init
]))(self
) /* init on <self:HashMap[Object, nullable Object]>*/;
1449 self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
= var
; /* _capacity on <self:HashMap[Object, nullable Object]> */
1451 self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
= var1
; /* _length on <self:HashMap[Object, nullable Object]> */
1453 ((void (*)(val
*, long))(self
->class->vft
[COLOR_hash_collection__HashCollection__enlarge
]))(self
, var2
) /* enlarge on <self:HashMap[Object, nullable Object]>*/;
1456 /* method hash_collection#HashMap#init for (self: Object) */
1457 void VIRTUAL_hash_collection__HashMap__init(val
* self
) {
1458 hash_collection__HashMap__init(self
);
1461 /* method hash_collection#HashMap#keys for (self: HashMap[Object, nullable Object]): HashMapKeys[Object, nullable Object] */
1462 val
* hash_collection__HashMap__keys(val
* self
) {
1463 val
* var
/* : HashMapKeys[Object, nullable Object] */;
1464 val
* var1
/* : HashMapKeys[Object, nullable Object] */;
1465 var1
= self
->attrs
[COLOR_hash_collection__HashMap___64dkeys
].val
; /* @keys on <self:HashMap[Object, nullable Object]> */
1467 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @keys");
1468 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 244);
1475 /* method hash_collection#HashMap#keys for (self: Object): Collection[Object] */
1476 val
* VIRTUAL_hash_collection__HashMap__keys(val
* self
) {
1477 val
* var
/* : Collection[Object] */;
1478 val
* var1
/* : HashMapKeys[Object, nullable Object] */;
1479 var1
= hash_collection__HashMap__keys(self
);
1484 /* method hash_collection#HashMap#keys= for (self: HashMap[Object, nullable Object], HashMapKeys[Object, nullable Object]) */
1485 void hash_collection__HashMap__keys_61d(val
* self
, val
* p0
) {
1486 short int var
/* : Bool */;
1489 const struct type
* type_struct
;
1490 const char* var_class_name
;
1491 /* Covariant cast for argument 0 (keys) <p0:HashMapKeys[Object, nullable Object]> isa HashMapKeys[HashMap#0, HashMap#1] */
1492 /* <p0:HashMapKeys[Object, nullable Object]> isa HashMapKeys[HashMap#0, HashMap#1] */
1493 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapKeyshash_collection__HashMap_FT0hash_collection__HashMap_FT1
];
1494 cltype
= type_struct
->color
;
1495 idtype
= type_struct
->id
;
1496 if(cltype
>= p0
->type
->table_size
) {
1499 var
= p0
->type
->type_table
[cltype
] == idtype
;
1502 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1503 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMapKeys[HashMap#0, HashMap#1]", var_class_name
);
1504 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 244);
1507 self
->attrs
[COLOR_hash_collection__HashMap___64dkeys
].val
= p0
; /* @keys on <self:HashMap[Object, nullable Object]> */
1510 /* method hash_collection#HashMap#keys= for (self: Object, HashMapKeys[Object, nullable Object]) */
1511 void VIRTUAL_hash_collection__HashMap__keys_61d(val
* self
, val
* p0
) {
1512 hash_collection__HashMap__keys_61d(self
, p0
);
1515 /* method hash_collection#HashMap#values for (self: HashMap[Object, nullable Object]): HashMapValues[Object, nullable Object] */
1516 val
* hash_collection__HashMap__values(val
* self
) {
1517 val
* var
/* : HashMapValues[Object, nullable Object] */;
1518 val
* var1
/* : HashMapValues[Object, nullable Object] */;
1519 var1
= self
->attrs
[COLOR_hash_collection__HashMap___64dvalues
].val
; /* @values on <self:HashMap[Object, nullable Object]> */
1521 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @values");
1522 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 245);
1529 /* method hash_collection#HashMap#values for (self: Object): Collection[nullable Object] */
1530 val
* VIRTUAL_hash_collection__HashMap__values(val
* self
) {
1531 val
* var
/* : Collection[nullable Object] */;
1532 val
* var1
/* : HashMapValues[Object, nullable Object] */;
1533 var1
= hash_collection__HashMap__values(self
);
1538 /* method hash_collection#HashMap#values= for (self: HashMap[Object, nullable Object], HashMapValues[Object, nullable Object]) */
1539 void hash_collection__HashMap__values_61d(val
* self
, val
* p0
) {
1540 short int var
/* : Bool */;
1543 const struct type
* type_struct
;
1544 const char* var_class_name
;
1545 /* Covariant cast for argument 0 (values) <p0:HashMapValues[Object, nullable Object]> isa HashMapValues[HashMap#0, HashMap#1] */
1546 /* <p0:HashMapValues[Object, nullable Object]> isa HashMapValues[HashMap#0, HashMap#1] */
1547 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapValueshash_collection__HashMap_FT0hash_collection__HashMap_FT1
];
1548 cltype
= type_struct
->color
;
1549 idtype
= type_struct
->id
;
1550 if(cltype
>= p0
->type
->table_size
) {
1553 var
= p0
->type
->type_table
[cltype
] == idtype
;
1556 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1557 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMapValues[HashMap#0, HashMap#1]", var_class_name
);
1558 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 245);
1561 self
->attrs
[COLOR_hash_collection__HashMap___64dvalues
].val
= p0
; /* @values on <self:HashMap[Object, nullable Object]> */
1564 /* method hash_collection#HashMap#values= for (self: Object, HashMapValues[Object, nullable Object]) */
1565 void VIRTUAL_hash_collection__HashMap__values_61d(val
* self
, val
* p0
) {
1566 hash_collection__HashMap__values_61d(self
, p0
);
1569 /* method hash_collection#HashMapKeys#map for (self: HashMapKeys[Object, nullable Object]): HashMap[Object, nullable Object] */
1570 val
* hash_collection__HashMapKeys__map(val
* self
) {
1571 val
* var
/* : HashMap[Object, nullable Object] */;
1572 val
* var1
/* : HashMap[Object, nullable Object] */;
1573 var1
= self
->attrs
[COLOR_hash_collection__HashMapKeys___64dmap
].val
; /* @map on <self:HashMapKeys[Object, nullable Object]> */
1575 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @map");
1576 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 251);
1583 /* method hash_collection#HashMapKeys#map for (self: Object): HashMap[Object, nullable Object] */
1584 val
* VIRTUAL_hash_collection__HashMapKeys__map(val
* self
) {
1585 val
* var
/* : HashMap[Object, nullable Object] */;
1586 val
* var1
/* : HashMap[Object, nullable Object] */;
1587 var1
= hash_collection__HashMapKeys__map(self
);
1592 /* method hash_collection#HashMapKeys#map= for (self: HashMapKeys[Object, nullable Object], HashMap[Object, nullable Object]) */
1593 void hash_collection__HashMapKeys__map_61d(val
* self
, val
* p0
) {
1594 short int var
/* : Bool */;
1597 const struct type
* type_struct
;
1598 const char* var_class_name
;
1599 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapKeys#0, HashMapKeys#1] */
1600 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapKeys#0, HashMapKeys#1] */
1601 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapKeys_FT0hash_collection__HashMapKeys_FT1
];
1602 cltype
= type_struct
->color
;
1603 idtype
= type_struct
->id
;
1604 if(cltype
>= p0
->type
->table_size
) {
1607 var
= p0
->type
->type_table
[cltype
] == idtype
;
1610 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1611 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapKeys#0, HashMapKeys#1]", var_class_name
);
1612 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 251);
1615 self
->attrs
[COLOR_hash_collection__HashMapKeys___64dmap
].val
= p0
; /* @map on <self:HashMapKeys[Object, nullable Object]> */
1618 /* method hash_collection#HashMapKeys#map= for (self: Object, HashMap[Object, nullable Object]) */
1619 void VIRTUAL_hash_collection__HashMapKeys__map_61d(val
* self
, val
* p0
) {
1620 hash_collection__HashMapKeys__map_61d(self
, p0
);
1623 /* method hash_collection#HashMapKeys#count for (self: HashMapKeys[Object, nullable Object], Object): Int */
1624 long hash_collection__HashMapKeys__count(val
* self
, val
* p0
) {
1625 long var
/* : Int */;
1626 short int var1
/* : Bool */;
1629 const struct type
* type_struct
;
1630 const char* var_class_name
;
1631 val
* var_k
/* var k: Object */;
1632 short int var2
/* : Bool */;
1633 long var3
/* : Int */;
1634 long var4
/* : Int */;
1635 /* Covariant cast for argument 0 (k) <p0:Object> isa Collection#0 */
1636 /* <p0:Object> isa Collection#0 */
1637 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
1638 cltype
= type_struct
->color
;
1639 idtype
= type_struct
->id
;
1640 if(cltype
>= p0
->type
->table_size
) {
1643 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1646 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1647 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
1648 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 254);
1652 var2
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__has
]))(self
, var_k
) /* has on <self:HashMapKeys[Object, nullable Object]>*/;
1665 /* method hash_collection#HashMapKeys#count for (self: Object, nullable Object): Int */
1666 long VIRTUAL_hash_collection__HashMapKeys__count(val
* self
, val
* p0
) {
1667 long var
/* : Int */;
1668 long var1
/* : Int */;
1669 var1
= hash_collection__HashMapKeys__count(self
, p0
);
1674 /* method hash_collection#HashMapKeys#first for (self: HashMapKeys[Object, nullable Object]): Object */
1675 val
* hash_collection__HashMapKeys__first(val
* self
) {
1676 val
* var
/* : Object */;
1677 val
* var1
/* : HashMap[Object, nullable Object] */;
1678 val
* var2
/* : nullable HashNode[Object] */;
1679 val
* var3
/* : Object */;
1680 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1681 var2
= var1
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[Object, nullable Object]> */
1683 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1684 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 255);
1687 var3
= var2
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashNode[Object](nullable HashMapNode[Object, nullable Object])> */
1689 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
1690 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 255);
1698 /* method hash_collection#HashMapKeys#first for (self: Object): nullable Object */
1699 val
* VIRTUAL_hash_collection__HashMapKeys__first(val
* self
) {
1700 val
* var
/* : nullable Object */;
1701 val
* var1
/* : Object */;
1702 var1
= hash_collection__HashMapKeys__first(self
);
1707 /* method hash_collection#HashMapKeys#has for (self: HashMapKeys[Object, nullable Object], Object): Bool */
1708 short int hash_collection__HashMapKeys__has(val
* self
, val
* p0
) {
1709 short int var
/* : Bool */;
1710 short int var1
/* : Bool */;
1713 const struct type
* type_struct
;
1714 const char* var_class_name
;
1715 val
* var_k
/* var k: Object */;
1716 val
* var2
/* : HashMap[Object, nullable Object] */;
1717 val
* var3
/* : nullable HashNode[Object] */;
1718 val
* var4
/* : null */;
1719 short int var5
/* : Bool */;
1720 /* Covariant cast for argument 0 (k) <p0:Object> isa Collection#0 */
1721 /* <p0:Object> isa Collection#0 */
1722 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
1723 cltype
= type_struct
->color
;
1724 idtype
= type_struct
->id
;
1725 if(cltype
>= p0
->type
->table_size
) {
1728 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1731 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1732 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
1733 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 256);
1737 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1738 var3
= ((val
* (*)(val
*, val
*))(var2
->class->vft
[COLOR_hash_collection__HashCollection__node_at
]))(var2
, var_k
) /* node_at on <var2:HashMap[Object, nullable Object]>*/;
1741 var5
= 0; /* is null */
1743 var5
= 1; /* arg is null and recv is not */
1750 /* method hash_collection#HashMapKeys#has for (self: Object, nullable Object): Bool */
1751 short int VIRTUAL_hash_collection__HashMapKeys__has(val
* self
, val
* p0
) {
1752 short int var
/* : Bool */;
1753 short int var1
/* : Bool */;
1754 var1
= hash_collection__HashMapKeys__has(self
, p0
);
1759 /* method hash_collection#HashMapKeys#has_only for (self: HashMapKeys[Object, nullable Object], Object): Bool */
1760 short int hash_collection__HashMapKeys__has_only(val
* self
, val
* p0
) {
1761 short int var
/* : Bool */;
1762 short int var1
/* : Bool */;
1765 const struct type
* type_struct
;
1766 const char* var_class_name
;
1767 val
* var_k
/* var k: Object */;
1768 short int var2
/* : Bool */;
1769 short int var3
/* : Bool */;
1770 short int var4
/* : Bool */;
1771 short int var_
/* var : Bool */;
1772 long var5
/* : Int */;
1773 long var6
/* : Int */;
1774 short int var7
/* : Bool */;
1775 short int var9
/* : Bool */;
1776 short int var_10
/* var : Bool */;
1777 short int var11
/* : Bool */;
1778 /* Covariant cast for argument 0 (k) <p0:Object> isa Collection#0 */
1779 /* <p0:Object> isa Collection#0 */
1780 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
1781 cltype
= type_struct
->color
;
1782 idtype
= type_struct
->id
;
1783 if(cltype
>= p0
->type
->table_size
) {
1786 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1789 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1790 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
1791 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 257);
1795 var4
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__has
]))(self
, var_k
) /* has on <self:HashMapKeys[Object, nullable Object]>*/;
1798 var5
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:HashMapKeys[Object, nullable Object]>*/;
1800 { /* Inline kernel#Int#== (var5,var6) */
1801 var9
= var5
== var6
;
1814 var11
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(self
) /* is_empty on <self:HashMapKeys[Object, nullable Object]>*/;
1822 /* method hash_collection#HashMapKeys#has_only for (self: Object, nullable Object): Bool */
1823 short int VIRTUAL_hash_collection__HashMapKeys__has_only(val
* self
, val
* p0
) {
1824 short int var
/* : Bool */;
1825 short int var1
/* : Bool */;
1826 var1
= hash_collection__HashMapKeys__has_only(self
, p0
);
1831 /* method hash_collection#HashMapKeys#is_empty for (self: HashMapKeys[Object, nullable Object]): Bool */
1832 short int hash_collection__HashMapKeys__is_empty(val
* self
) {
1833 short int var
/* : Bool */;
1834 val
* var1
/* : HashMap[Object, nullable Object] */;
1835 short int var2
/* : Bool */;
1836 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1837 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapRead__is_empty
]))(var1
) /* is_empty on <var1:HashMap[Object, nullable Object]>*/;
1843 /* method hash_collection#HashMapKeys#is_empty for (self: Object): Bool */
1844 short int VIRTUAL_hash_collection__HashMapKeys__is_empty(val
* self
) {
1845 short int var
/* : Bool */;
1846 short int var1
/* : Bool */;
1847 var1
= hash_collection__HashMapKeys__is_empty(self
);
1852 /* method hash_collection#HashMapKeys#length for (self: HashMapKeys[Object, nullable Object]): Int */
1853 long hash_collection__HashMapKeys__length(val
* self
) {
1854 long var
/* : Int */;
1855 val
* var1
/* : HashMap[Object, nullable Object] */;
1856 long var2
/* : Int */;
1857 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1858 var2
= ((long (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapRead__length
]))(var1
) /* length on <var1:HashMap[Object, nullable Object]>*/;
1864 /* method hash_collection#HashMapKeys#length for (self: Object): Int */
1865 long VIRTUAL_hash_collection__HashMapKeys__length(val
* self
) {
1866 long var
/* : Int */;
1867 long var1
/* : Int */;
1868 var1
= hash_collection__HashMapKeys__length(self
);
1873 /* method hash_collection#HashMapKeys#iterator for (self: HashMapKeys[Object, nullable Object]): Iterator[Object] */
1874 val
* hash_collection__HashMapKeys__iterator(val
* self
) {
1875 val
* var
/* : Iterator[Object] */;
1876 val
* var1
/* : MapKeysIterator[Object, nullable Object] */;
1877 val
* var2
/* : HashMap[Object, nullable Object] */;
1878 val
* var3
/* : MapIterator[Object, nullable Object] */;
1879 var1
= NEW_abstract_collection__MapKeysIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapKeysIteratorhash_collection__HashMapKeys_FT0hash_collection__HashMapKeys_FT1
]);
1880 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1881 var3
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__MapRead__iterator
]))(var2
) /* iterator on <var2:HashMap[Object, nullable Object]>*/;
1882 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_abstract_collection__MapKeysIterator__init
]))(var1
, var3
) /* init on <var1:MapKeysIterator[Object, nullable Object]>*/;
1888 /* method hash_collection#HashMapKeys#iterator for (self: Object): Iterator[nullable Object] */
1889 val
* VIRTUAL_hash_collection__HashMapKeys__iterator(val
* self
) {
1890 val
* var
/* : Iterator[nullable Object] */;
1891 val
* var1
/* : Iterator[Object] */;
1892 var1
= hash_collection__HashMapKeys__iterator(self
);
1897 /* method hash_collection#HashMapKeys#clear for (self: HashMapKeys[Object, nullable Object]) */
1898 void hash_collection__HashMapKeys__clear(val
* self
) {
1899 val
* var
/* : HashMap[Object, nullable Object] */;
1900 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1901 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__Map__clear
]))(var
) /* clear on <var:HashMap[Object, nullable Object]>*/;
1904 /* method hash_collection#HashMapKeys#clear for (self: Object) */
1905 void VIRTUAL_hash_collection__HashMapKeys__clear(val
* self
) {
1906 hash_collection__HashMapKeys__clear(self
);
1909 /* method hash_collection#HashMapKeys#remove for (self: HashMapKeys[Object, nullable Object], Object) */
1910 void hash_collection__HashMapKeys__remove(val
* self
, val
* p0
) {
1911 short int var
/* : Bool */;
1914 const struct type
* type_struct
;
1915 const char* var_class_name
;
1916 val
* var_key
/* var key: Object */;
1917 val
* var1
/* : HashMap[Object, nullable Object] */;
1918 /* Covariant cast for argument 0 (key) <p0:Object> isa RemovableCollection#0 */
1919 /* <p0:Object> isa RemovableCollection#0 */
1920 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
1921 cltype
= type_struct
->color
;
1922 idtype
= type_struct
->id
;
1923 if(cltype
>= p0
->type
->table_size
) {
1926 var
= p0
->type
->type_table
[cltype
] == idtype
;
1929 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1930 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
1931 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 265);
1935 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1936 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_hash_collection__HashCollection__remove_node
]))(var1
, var_key
) /* remove_node on <var1:HashMap[Object, nullable Object]>*/;
1939 /* method hash_collection#HashMapKeys#remove for (self: Object, nullable Object) */
1940 void VIRTUAL_hash_collection__HashMapKeys__remove(val
* self
, val
* p0
) {
1941 hash_collection__HashMapKeys__remove(self
, p0
);
1944 /* method hash_collection#HashMapKeys#remove_all for (self: HashMapKeys[Object, nullable Object], Object) */
1945 void hash_collection__HashMapKeys__remove_all(val
* self
, val
* p0
) {
1946 short int var
/* : Bool */;
1949 const struct type
* type_struct
;
1950 const char* var_class_name
;
1951 val
* var_key
/* var key: Object */;
1952 val
* var1
/* : HashMap[Object, nullable Object] */;
1953 /* Covariant cast for argument 0 (key) <p0:Object> isa RemovableCollection#0 */
1954 /* <p0:Object> isa RemovableCollection#0 */
1955 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
1956 cltype
= type_struct
->color
;
1957 idtype
= type_struct
->id
;
1958 if(cltype
>= p0
->type
->table_size
) {
1961 var
= p0
->type
->type_table
[cltype
] == idtype
;
1964 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1965 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
1966 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 266);
1970 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapKeys__map
]))(self
) /* map on <self:HashMapKeys[Object, nullable Object]>*/;
1971 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_hash_collection__HashCollection__remove_node
]))(var1
, var_key
) /* remove_node on <var1:HashMap[Object, nullable Object]>*/;
1974 /* method hash_collection#HashMapKeys#remove_all for (self: Object, nullable Object) */
1975 void VIRTUAL_hash_collection__HashMapKeys__remove_all(val
* self
, val
* p0
) {
1976 hash_collection__HashMapKeys__remove_all(self
, p0
);
1979 /* method hash_collection#HashMapKeys#init for (self: HashMapKeys[Object, nullable Object], HashMap[Object, nullable Object]) */
1980 void hash_collection__HashMapKeys__init(val
* self
, val
* p0
) {
1981 short int var
/* : Bool */;
1984 const struct type
* type_struct
;
1985 const char* var_class_name
;
1986 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapKeys#0, HashMapKeys#1] */
1987 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapKeys#0, HashMapKeys#1] */
1988 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapKeys_FT0hash_collection__HashMapKeys_FT1
];
1989 cltype
= type_struct
->color
;
1990 idtype
= type_struct
->id
;
1991 if(cltype
>= p0
->type
->table_size
) {
1994 var
= p0
->type
->type_table
[cltype
] == idtype
;
1997 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1998 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapKeys#0, HashMapKeys#1]", var_class_name
);
1999 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 248);
2002 self
->attrs
[COLOR_hash_collection__HashMapKeys___64dmap
].val
= p0
; /* @map on <self:HashMapKeys[Object, nullable Object]> */
2005 /* method hash_collection#HashMapKeys#init for (self: Object, HashMap[Object, nullable Object]) */
2006 void VIRTUAL_hash_collection__HashMapKeys__init(val
* self
, val
* p0
) {
2007 hash_collection__HashMapKeys__init(self
, p0
);
2010 /* method hash_collection#HashMapValues#map for (self: HashMapValues[Object, nullable Object]): HashMap[Object, nullable Object] */
2011 val
* hash_collection__HashMapValues__map(val
* self
) {
2012 val
* var
/* : HashMap[Object, nullable Object] */;
2013 val
* var1
/* : HashMap[Object, nullable Object] */;
2014 var1
= self
->attrs
[COLOR_hash_collection__HashMapValues___64dmap
].val
; /* @map on <self:HashMapValues[Object, nullable Object]> */
2016 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @map");
2017 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 272);
2024 /* method hash_collection#HashMapValues#map for (self: Object): HashMap[Object, nullable Object] */
2025 val
* VIRTUAL_hash_collection__HashMapValues__map(val
* self
) {
2026 val
* var
/* : HashMap[Object, nullable Object] */;
2027 val
* var1
/* : HashMap[Object, nullable Object] */;
2028 var1
= hash_collection__HashMapValues__map(self
);
2033 /* method hash_collection#HashMapValues#map= for (self: HashMapValues[Object, nullable Object], HashMap[Object, nullable Object]) */
2034 void hash_collection__HashMapValues__map_61d(val
* self
, val
* p0
) {
2035 short int var
/* : Bool */;
2038 const struct type
* type_struct
;
2039 const char* var_class_name
;
2040 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapValues#0, HashMapValues#1] */
2041 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapValues#0, HashMapValues#1] */
2042 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapValues_FT0hash_collection__HashMapValues_FT1
];
2043 cltype
= type_struct
->color
;
2044 idtype
= type_struct
->id
;
2045 if(cltype
>= p0
->type
->table_size
) {
2048 var
= p0
->type
->type_table
[cltype
] == idtype
;
2051 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2052 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapValues#0, HashMapValues#1]", var_class_name
);
2053 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 272);
2056 self
->attrs
[COLOR_hash_collection__HashMapValues___64dmap
].val
= p0
; /* @map on <self:HashMapValues[Object, nullable Object]> */
2059 /* method hash_collection#HashMapValues#map= for (self: Object, HashMap[Object, nullable Object]) */
2060 void VIRTUAL_hash_collection__HashMapValues__map_61d(val
* self
, val
* p0
) {
2061 hash_collection__HashMapValues__map_61d(self
, p0
);
2064 /* method hash_collection#HashMapValues#count for (self: HashMapValues[Object, nullable Object], nullable Object): Int */
2065 long hash_collection__HashMapValues__count(val
* self
, val
* p0
) {
2066 long var
/* : Int */;
2067 short int var1
/* : Bool */;
2070 const struct type
* type_struct
;
2071 short int is_nullable
;
2072 const char* var_class_name
;
2073 val
* var_item
/* var item: nullable Object */;
2074 long var2
/* : Int */;
2075 long var_nb
/* var nb: Int */;
2076 val
* var3
/* : HashMap[Object, nullable Object] */;
2077 val
* var4
/* : nullable HashNode[Object] */;
2078 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2079 val
* var5
/* : null */;
2080 short int var6
/* : Bool */;
2081 val
* var7
/* : nullable Object */;
2082 short int var8
/* : Bool */;
2083 long var9
/* : Int */;
2084 long var10
/* : Int */;
2085 long var12
/* : Int */;
2086 val
* var13
/* : nullable HashNode[Object] */;
2087 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
2088 /* <p0:nullable Object> isa Collection#0 */
2089 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
2090 cltype
= type_struct
->color
;
2091 idtype
= type_struct
->id
;
2092 is_nullable
= type_struct
->is_nullable
;
2096 if(cltype
>= p0
->type
->table_size
) {
2099 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2103 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2104 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
2105 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 275);
2111 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2112 var4
= var3
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var3:HashMap[Object, nullable Object]> */
2116 if (var_c
== NULL
) {
2117 var6
= 0; /* is null */
2119 var6
= 1; /* arg is null and recv is not */
2122 var7
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2124 var8
= (var_item
== NULL
);
2126 var8
= ((short int (*)(val
*, val
*))(var7
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var7
, var_item
) /* == on <var7:nullable Object>*/;
2130 { /* Inline kernel#Int#+ (var_nb,var9) */
2131 var12
= var_nb
+ var9
;
2134 RET_LABEL11
:(void)0;
2139 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])> */
2141 CONTINUE_label
: (void)0;
2143 BREAK_label
: (void)0;
2149 /* method hash_collection#HashMapValues#count for (self: Object, nullable Object): Int */
2150 long VIRTUAL_hash_collection__HashMapValues__count(val
* self
, val
* p0
) {
2151 long var
/* : Int */;
2152 long var1
/* : Int */;
2153 var1
= hash_collection__HashMapValues__count(self
, p0
);
2158 /* method hash_collection#HashMapValues#first for (self: HashMapValues[Object, nullable Object]): nullable Object */
2159 val
* hash_collection__HashMapValues__first(val
* self
) {
2160 val
* var
/* : nullable Object */;
2161 val
* var1
/* : HashMap[Object, nullable Object] */;
2162 val
* var2
/* : nullable HashNode[Object] */;
2163 val
* var3
/* : nullable Object */;
2164 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2165 var2
= var1
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var1:HashMap[Object, nullable Object]> */
2167 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2168 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 285);
2171 var3
= var2
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var2:nullable HashNode[Object](nullable HashMapNode[Object, nullable Object])> */
2177 /* method hash_collection#HashMapValues#first for (self: Object): nullable Object */
2178 val
* VIRTUAL_hash_collection__HashMapValues__first(val
* self
) {
2179 val
* var
/* : nullable Object */;
2180 val
* var1
/* : nullable Object */;
2181 var1
= hash_collection__HashMapValues__first(self
);
2186 /* method hash_collection#HashMapValues#has for (self: HashMapValues[Object, nullable Object], nullable Object): Bool */
2187 short int hash_collection__HashMapValues__has(val
* self
, val
* p0
) {
2188 short int var
/* : Bool */;
2189 short int var1
/* : Bool */;
2192 const struct type
* type_struct
;
2193 short int is_nullable
;
2194 const char* var_class_name
;
2195 val
* var_item
/* var item: nullable Object */;
2196 val
* var2
/* : HashMap[Object, nullable Object] */;
2197 val
* var3
/* : nullable HashNode[Object] */;
2198 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2199 val
* var4
/* : null */;
2200 short int var5
/* : Bool */;
2201 val
* var6
/* : nullable Object */;
2202 short int var7
/* : Bool */;
2203 short int var8
/* : Bool */;
2204 val
* var9
/* : nullable HashNode[Object] */;
2205 short int var10
/* : Bool */;
2206 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
2207 /* <p0:nullable Object> isa Collection#0 */
2208 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
2209 cltype
= type_struct
->color
;
2210 idtype
= type_struct
->id
;
2211 is_nullable
= type_struct
->is_nullable
;
2215 if(cltype
>= p0
->type
->table_size
) {
2218 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2222 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2223 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
2224 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 287);
2228 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2229 var3
= var2
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var2:HashMap[Object, nullable Object]> */
2233 if (var_c
== NULL
) {
2234 var5
= 0; /* is null */
2236 var5
= 1; /* arg is null and recv is not */
2239 var6
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2241 var7
= (var_item
== NULL
);
2243 var7
= ((short int (*)(val
*, val
*))(var6
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var6
, var_item
) /* == on <var6:nullable Object>*/;
2251 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])> */
2253 CONTINUE_label
: (void)0;
2255 BREAK_label
: (void)0;
2262 /* method hash_collection#HashMapValues#has for (self: Object, nullable Object): Bool */
2263 short int VIRTUAL_hash_collection__HashMapValues__has(val
* self
, val
* p0
) {
2264 short int var
/* : Bool */;
2265 short int var1
/* : Bool */;
2266 var1
= hash_collection__HashMapValues__has(self
, p0
);
2271 /* method hash_collection#HashMapValues#has_only for (self: HashMapValues[Object, nullable Object], nullable Object): Bool */
2272 short int hash_collection__HashMapValues__has_only(val
* self
, val
* p0
) {
2273 short int var
/* : Bool */;
2274 short int var1
/* : Bool */;
2277 const struct type
* type_struct
;
2278 short int is_nullable
;
2279 const char* var_class_name
;
2280 val
* var_item
/* var item: nullable Object */;
2281 val
* var2
/* : HashMap[Object, nullable Object] */;
2282 val
* var3
/* : nullable HashNode[Object] */;
2283 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2284 val
* var4
/* : null */;
2285 short int var5
/* : Bool */;
2286 val
* var6
/* : nullable Object */;
2287 short int var7
/* : Bool */;
2288 short int var8
/* : Bool */;
2289 val
* var9
/* : nullable HashNode[Object] */;
2290 short int var10
/* : Bool */;
2291 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa Collection#0 */
2292 /* <p0:nullable Object> isa Collection#0 */
2293 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
2294 cltype
= type_struct
->color
;
2295 idtype
= type_struct
->id
;
2296 is_nullable
= type_struct
->is_nullable
;
2300 if(cltype
>= p0
->type
->table_size
) {
2303 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2307 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2308 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
2309 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 297);
2313 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2314 var3
= var2
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var2:HashMap[Object, nullable Object]> */
2318 if (var_c
== NULL
) {
2319 var5
= 0; /* is null */
2321 var5
= 1; /* arg is null and recv is not */
2324 var6
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2326 var7
= (var_item
!= NULL
);
2328 var7
= ((short int (*)(val
*, val
*))(var6
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var6
, var_item
) /* != on <var6:nullable Object>*/;
2336 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])> */
2338 CONTINUE_label
: (void)0;
2340 BREAK_label
: (void)0;
2347 /* method hash_collection#HashMapValues#has_only for (self: Object, nullable Object): Bool */
2348 short int VIRTUAL_hash_collection__HashMapValues__has_only(val
* self
, val
* p0
) {
2349 short int var
/* : Bool */;
2350 short int var1
/* : Bool */;
2351 var1
= hash_collection__HashMapValues__has_only(self
, p0
);
2356 /* method hash_collection#HashMapValues#is_empty for (self: HashMapValues[Object, nullable Object]): Bool */
2357 short int hash_collection__HashMapValues__is_empty(val
* self
) {
2358 short int var
/* : Bool */;
2359 val
* var1
/* : HashMap[Object, nullable Object] */;
2360 short int var2
/* : Bool */;
2361 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2362 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapRead__is_empty
]))(var1
) /* is_empty on <var1:HashMap[Object, nullable Object]>*/;
2368 /* method hash_collection#HashMapValues#is_empty for (self: Object): Bool */
2369 short int VIRTUAL_hash_collection__HashMapValues__is_empty(val
* self
) {
2370 short int var
/* : Bool */;
2371 short int var1
/* : Bool */;
2372 var1
= hash_collection__HashMapValues__is_empty(self
);
2377 /* method hash_collection#HashMapValues#length for (self: HashMapValues[Object, nullable Object]): Int */
2378 long hash_collection__HashMapValues__length(val
* self
) {
2379 long var
/* : Int */;
2380 val
* var1
/* : HashMap[Object, nullable Object] */;
2381 long var2
/* : Int */;
2382 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2383 var2
= ((long (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapRead__length
]))(var1
) /* length on <var1:HashMap[Object, nullable Object]>*/;
2389 /* method hash_collection#HashMapValues#length for (self: Object): Int */
2390 long VIRTUAL_hash_collection__HashMapValues__length(val
* self
) {
2391 long var
/* : Int */;
2392 long var1
/* : Int */;
2393 var1
= hash_collection__HashMapValues__length(self
);
2398 /* method hash_collection#HashMapValues#iterator for (self: HashMapValues[Object, nullable Object]): Iterator[nullable Object] */
2399 val
* hash_collection__HashMapValues__iterator(val
* self
) {
2400 val
* var
/* : Iterator[nullable Object] */;
2401 val
* var1
/* : MapValuesIterator[Object, nullable Object] */;
2402 val
* var2
/* : HashMap[Object, nullable Object] */;
2403 val
* var3
/* : MapIterator[Object, nullable Object] */;
2404 var1
= NEW_abstract_collection__MapValuesIterator(self
->type
->resolution_table
->types
[COLOR_abstract_collection__MapValuesIteratorhash_collection__HashMapValues_FT0hash_collection__HashMapValues_FT1
]);
2405 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2406 var3
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__MapRead__iterator
]))(var2
) /* iterator on <var2:HashMap[Object, nullable Object]>*/;
2407 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_abstract_collection__MapValuesIterator__init
]))(var1
, var3
) /* init on <var1:MapValuesIterator[Object, nullable Object]>*/;
2413 /* method hash_collection#HashMapValues#iterator for (self: Object): Iterator[nullable Object] */
2414 val
* VIRTUAL_hash_collection__HashMapValues__iterator(val
* self
) {
2415 val
* var
/* : Iterator[nullable Object] */;
2416 val
* var1
/* : Iterator[nullable Object] */;
2417 var1
= hash_collection__HashMapValues__iterator(self
);
2422 /* method hash_collection#HashMapValues#clear for (self: HashMapValues[Object, nullable Object]) */
2423 void hash_collection__HashMapValues__clear(val
* self
) {
2424 val
* var
/* : HashMap[Object, nullable Object] */;
2425 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2426 ((void (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__Map__clear
]))(var
) /* clear on <var:HashMap[Object, nullable Object]>*/;
2429 /* method hash_collection#HashMapValues#clear for (self: Object) */
2430 void VIRTUAL_hash_collection__HashMapValues__clear(val
* self
) {
2431 hash_collection__HashMapValues__clear(self
);
2434 /* method hash_collection#HashMapValues#remove for (self: HashMapValues[Object, nullable Object], nullable Object) */
2435 void hash_collection__HashMapValues__remove(val
* self
, val
* p0
) {
2436 short int var
/* : Bool */;
2439 const struct type
* type_struct
;
2440 short int is_nullable
;
2441 const char* var_class_name
;
2442 val
* var_item
/* var item: nullable Object */;
2443 val
* var1
/* : HashMap[Object, nullable Object] */;
2444 val
* var_map
/* var map: HashMap[Object, nullable Object] */;
2445 val
* var2
/* : nullable HashNode[Object] */;
2446 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2447 val
* var3
/* : null */;
2448 short int var4
/* : Bool */;
2449 val
* var5
/* : nullable Object */;
2450 short int var6
/* : Bool */;
2451 val
* var7
/* : Object */;
2452 val
* var8
/* : nullable HashNode[Object] */;
2453 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa RemovableCollection#0 */
2454 /* <p0:nullable Object> isa RemovableCollection#0 */
2455 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
2456 cltype
= type_struct
->color
;
2457 idtype
= type_struct
->id
;
2458 is_nullable
= type_struct
->is_nullable
;
2462 if(cltype
>= p0
->type
->table_size
) {
2465 var
= p0
->type
->type_table
[cltype
] == idtype
;
2469 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2470 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
2471 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 314);
2475 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2477 var2
= var_map
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_map:HashMap[Object, nullable Object]> */
2481 if (var_c
== NULL
) {
2482 var4
= 0; /* is null */
2484 var4
= 1; /* arg is null and recv is not */
2487 var5
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2489 var6
= (var_item
== NULL
);
2491 var6
= ((short int (*)(val
*, val
*))(var5
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var5
, var_item
) /* == on <var5:nullable Object>*/;
2494 var7
= var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2496 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
2497 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 320);
2500 ((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]>*/;
2504 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])> */
2506 CONTINUE_label
: (void)0;
2508 BREAK_label
: (void)0;
2511 /* method hash_collection#HashMapValues#remove for (self: Object, nullable Object) */
2512 void VIRTUAL_hash_collection__HashMapValues__remove(val
* self
, val
* p0
) {
2513 hash_collection__HashMapValues__remove(self
, p0
);
2516 /* method hash_collection#HashMapValues#remove_all for (self: HashMapValues[Object, nullable Object], nullable Object) */
2517 void hash_collection__HashMapValues__remove_all(val
* self
, val
* p0
) {
2518 short int var
/* : Bool */;
2521 const struct type
* type_struct
;
2522 short int is_nullable
;
2523 const char* var_class_name
;
2524 val
* var_item
/* var item: nullable Object */;
2525 val
* var1
/* : HashMap[Object, nullable Object] */;
2526 val
* var_map
/* var map: HashMap[Object, nullable Object] */;
2527 val
* var2
/* : nullable HashNode[Object] */;
2528 val
* var_c
/* var c: nullable HashMapNode[Object, nullable Object] */;
2529 val
* var3
/* : null */;
2530 short int var4
/* : Bool */;
2531 val
* var5
/* : nullable Object */;
2532 short int var6
/* : Bool */;
2533 val
* var7
/* : Object */;
2534 val
* var8
/* : nullable HashNode[Object] */;
2535 /* Covariant cast for argument 0 (item) <p0:nullable Object> isa RemovableCollection#0 */
2536 /* <p0:nullable Object> isa RemovableCollection#0 */
2537 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
2538 cltype
= type_struct
->color
;
2539 idtype
= type_struct
->id
;
2540 is_nullable
= type_struct
->is_nullable
;
2544 if(cltype
>= p0
->type
->table_size
) {
2547 var
= p0
->type
->type_table
[cltype
] == idtype
;
2551 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2552 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
2553 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 327);
2557 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashMapValues__map
]))(self
) /* map on <self:HashMapValues[Object, nullable Object]>*/;
2559 var2
= var_map
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_map:HashMap[Object, nullable Object]> */
2563 if (var_c
== NULL
) {
2564 var4
= 0; /* is null */
2566 var4
= 1; /* arg is null and recv is not */
2569 var5
= var_c
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2571 var6
= (var_item
== NULL
);
2573 var6
= ((short int (*)(val
*, val
*))(var5
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var5
, var_item
) /* == on <var5:nullable Object>*/;
2576 var7
= var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var_c:nullable HashMapNode[Object, nullable Object](HashMapNode[Object, nullable Object])> */
2578 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
2579 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 333);
2582 ((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]>*/;
2585 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])> */
2587 CONTINUE_label
: (void)0;
2589 BREAK_label
: (void)0;
2592 /* method hash_collection#HashMapValues#remove_all for (self: Object, nullable Object) */
2593 void VIRTUAL_hash_collection__HashMapValues__remove_all(val
* self
, val
* p0
) {
2594 hash_collection__HashMapValues__remove_all(self
, p0
);
2597 /* method hash_collection#HashMapValues#init for (self: HashMapValues[Object, nullable Object], HashMap[Object, nullable Object]) */
2598 void hash_collection__HashMapValues__init(val
* self
, val
* p0
) {
2599 short int var
/* : Bool */;
2602 const struct type
* type_struct
;
2603 const char* var_class_name
;
2604 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapValues#0, HashMapValues#1] */
2605 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapValues#0, HashMapValues#1] */
2606 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapValues_FT0hash_collection__HashMapValues_FT1
];
2607 cltype
= type_struct
->color
;
2608 idtype
= type_struct
->id
;
2609 if(cltype
>= p0
->type
->table_size
) {
2612 var
= p0
->type
->type_table
[cltype
] == idtype
;
2615 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2616 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapValues#0, HashMapValues#1]", var_class_name
);
2617 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 269);
2620 self
->attrs
[COLOR_hash_collection__HashMapValues___64dmap
].val
= p0
; /* @map on <self:HashMapValues[Object, nullable Object]> */
2623 /* method hash_collection#HashMapValues#init for (self: Object, HashMap[Object, nullable Object]) */
2624 void VIRTUAL_hash_collection__HashMapValues__init(val
* self
, val
* p0
) {
2625 hash_collection__HashMapValues__init(self
, p0
);
2628 /* method hash_collection#HashMapNode#init for (self: HashMapNode[Object, nullable Object], Object, nullable Object) */
2629 void hash_collection__HashMapNode__init(val
* self
, val
* p0
, val
* p1
) {
2630 short int var
/* : Bool */;
2633 const struct type
* type_struct
;
2634 const char* var_class_name
;
2635 short int var1
/* : Bool */;
2638 const struct type
* type_struct4
;
2639 short int is_nullable
;
2640 const char* var_class_name5
;
2641 val
* var_k
/* var k: Object */;
2642 val
* var_v
/* var v: nullable Object */;
2643 /* Covariant cast for argument 0 (k) <p0:Object> isa HashMapNode#0 */
2644 /* <p0:Object> isa HashMapNode#0 */
2645 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapNode_FT0
];
2646 cltype
= type_struct
->color
;
2647 idtype
= type_struct
->id
;
2648 if(cltype
>= p0
->type
->table_size
) {
2651 var
= p0
->type
->type_table
[cltype
] == idtype
;
2654 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2655 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMapNode#0", var_class_name
);
2656 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 345);
2659 /* Covariant cast for argument 1 (v) <p1:nullable Object> isa HashMapNode#1 */
2660 /* <p1:nullable Object> isa HashMapNode#1 */
2661 type_struct4
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMapNode_FT1
];
2662 cltype2
= type_struct4
->color
;
2663 idtype3
= type_struct4
->id
;
2664 is_nullable
= type_struct4
->is_nullable
;
2668 if(cltype2
>= p1
->type
->table_size
) {
2671 var1
= p1
->type
->type_table
[cltype2
] == idtype3
;
2675 var_class_name5
= p1
== NULL ?
"null" : p1
->type
->name
;
2676 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMapNode#1", var_class_name5
);
2677 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 345);
2682 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashNode__init
]))(self
, var_k
) /* init on <self:HashMapNode[Object, nullable Object]>*/;
2683 self
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
= var_v
; /* _value on <self:HashMapNode[Object, nullable Object]> */
2686 /* method hash_collection#HashMapNode#init for (self: Object, Object, nullable Object) */
2687 void VIRTUAL_hash_collection__HashMapNode__init(val
* self
, val
* p0
, val
* p1
) {
2688 hash_collection__HashMapNode__init(self
, p0
, p1
);
2691 /* method hash_collection#HashMapIterator#is_ok for (self: HashMapIterator[Object, nullable Object]): Bool */
2692 short int hash_collection__HashMapIterator__is_ok(val
* self
) {
2693 short int var
/* : Bool */;
2694 val
* var1
/* : nullable HashMapNode[Object, nullable Object] */;
2695 val
* var2
/* : null */;
2696 short int var3
/* : Bool */;
2697 var1
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
2700 var3
= 0; /* is null */
2702 var3
= 1; /* arg is null and recv is not */
2709 /* method hash_collection#HashMapIterator#is_ok for (self: Object): Bool */
2710 short int VIRTUAL_hash_collection__HashMapIterator__is_ok(val
* self
) {
2711 short int var
/* : Bool */;
2712 short int var1
/* : Bool */;
2713 var1
= hash_collection__HashMapIterator__is_ok(self
);
2718 /* method hash_collection#HashMapIterator#item for (self: HashMapIterator[Object, nullable Object]): nullable Object */
2719 val
* hash_collection__HashMapIterator__item(val
* self
) {
2720 val
* var
/* : nullable Object */;
2721 short int var1
/* : Bool */;
2722 val
* var2
/* : nullable HashMapNode[Object, nullable Object] */;
2723 val
* var3
/* : nullable Object */;
2724 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(self
) /* is_ok on <self:HashMapIterator[Object, nullable Object]>*/;
2726 fprintf(stderr
, "Runtime error: %s", "Assert failed");
2727 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 358);
2730 var2
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
2732 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2733 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 359);
2736 var3
= var2
->attrs
[COLOR_hash_collection__HashMapNode___value
].val
; /* _value on <var2:nullable HashMapNode[Object, nullable Object]> */
2742 /* method hash_collection#HashMapIterator#item for (self: Object): nullable Object */
2743 val
* VIRTUAL_hash_collection__HashMapIterator__item(val
* self
) {
2744 val
* var
/* : nullable Object */;
2745 val
* var1
/* : nullable Object */;
2746 var1
= hash_collection__HashMapIterator__item(self
);
2751 /* method hash_collection#HashMapIterator#key for (self: HashMapIterator[Object, nullable Object]): Object */
2752 val
* hash_collection__HashMapIterator__key(val
* self
) {
2753 val
* var
/* : Object */;
2754 short int var1
/* : Bool */;
2755 val
* var2
/* : nullable HashMapNode[Object, nullable Object] */;
2756 val
* var3
/* : Object */;
2757 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(self
) /* is_ok on <self:HashMapIterator[Object, nullable Object]>*/;
2759 fprintf(stderr
, "Runtime error: %s", "Assert failed");
2760 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 370);
2763 var2
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
2765 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2766 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 371);
2769 var3
= var2
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashMapNode[Object, nullable Object]> */
2771 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
2772 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 371);
2780 /* method hash_collection#HashMapIterator#key for (self: Object): Object */
2781 val
* VIRTUAL_hash_collection__HashMapIterator__key(val
* self
) {
2782 val
* var
/* : Object */;
2783 val
* var1
/* : Object */;
2784 var1
= hash_collection__HashMapIterator__key(self
);
2789 /* method hash_collection#HashMapIterator#next for (self: HashMapIterator[Object, nullable Object]) */
2790 void hash_collection__HashMapIterator__next(val
* self
) {
2791 short int var
/* : Bool */;
2792 val
* var1
/* : nullable HashMapNode[Object, nullable Object] */;
2793 val
* var2
/* : nullable HashNode[Object] */;
2794 var
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(self
) /* is_ok on <self:HashMapIterator[Object, nullable Object]>*/;
2796 fprintf(stderr
, "Runtime error: %s", "Assert failed");
2797 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 376);
2800 var1
= self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
2802 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2803 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 377);
2806 var2
= var1
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var1:nullable HashMapNode[Object, nullable Object]> */
2807 self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
= var2
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
2810 /* method hash_collection#HashMapIterator#next for (self: Object) */
2811 void VIRTUAL_hash_collection__HashMapIterator__next(val
* self
) {
2812 hash_collection__HashMapIterator__next(self
);
2815 /* method hash_collection#HashMapIterator#init for (self: HashMapIterator[Object, nullable Object], HashMap[Object, nullable Object]) */
2816 void hash_collection__HashMapIterator__init(val
* self
, val
* p0
) {
2817 short int var
/* : Bool */;
2820 const struct type
* type_struct
;
2821 const char* var_class_name
;
2822 val
* var_map
/* var map: HashMap[Object, nullable Object] */;
2823 val
* var1
/* : nullable HashNode[Object] */;
2824 /* Covariant cast for argument 0 (map) <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapIterator#0, HashMapIterator#1] */
2825 /* <p0:HashMap[Object, nullable Object]> isa HashMap[HashMapIterator#0, HashMapIterator#1] */
2826 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashMaphash_collection__HashMapIterator_FT0hash_collection__HashMapIterator_FT1
];
2827 cltype
= type_struct
->color
;
2828 idtype
= type_struct
->id
;
2829 if(cltype
>= p0
->type
->table_size
) {
2832 var
= p0
->type
->type_table
[cltype
] == idtype
;
2835 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2836 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[HashMapIterator#0, HashMapIterator#1]", var_class_name
);
2837 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 386);
2841 self
->attrs
[COLOR_hash_collection__HashMapIterator___map
].val
= var_map
; /* _map on <self:HashMapIterator[Object, nullable Object]> */
2842 var1
= ((val
* (*)(val
*))(var_map
->class->vft
[COLOR_hash_collection__HashCollection__first_item
]))(var_map
) /* first_item on <var_map:HashMap[Object, nullable Object]>*/;
2843 self
->attrs
[COLOR_hash_collection__HashMapIterator___node
].val
= var1
; /* _node on <self:HashMapIterator[Object, nullable Object]> */
2846 /* method hash_collection#HashMapIterator#init for (self: Object, HashMap[Object, nullable Object]) */
2847 void VIRTUAL_hash_collection__HashMapIterator__init(val
* self
, val
* p0
) {
2848 hash_collection__HashMapIterator__init(self
, p0
);
2851 /* method hash_collection#HashSet#length for (self: HashSet[Object]): Int */
2852 long hash_collection__HashSet__length(val
* self
) {
2853 long var
/* : Int */;
2854 long var1
/* : Int */;
2855 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashSet[Object]> */
2861 /* method hash_collection#HashSet#length for (self: Object): Int */
2862 long VIRTUAL_hash_collection__HashSet__length(val
* self
) {
2863 long var
/* : Int */;
2864 long var1
/* : Int */;
2865 var1
= hash_collection__HashSet__length(self
);
2870 /* method hash_collection#HashSet#is_empty for (self: HashSet[Object]): Bool */
2871 short int hash_collection__HashSet__is_empty(val
* self
) {
2872 short int var
/* : Bool */;
2873 long var1
/* : Int */;
2874 long var2
/* : Int */;
2875 short int var3
/* : Bool */;
2876 short int var5
/* : Bool */;
2877 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashSet[Object]> */
2879 { /* Inline kernel#Int#== (var1,var2) */
2880 var5
= var1
== var2
;
2890 /* method hash_collection#HashSet#is_empty for (self: Object): Bool */
2891 short int VIRTUAL_hash_collection__HashSet__is_empty(val
* self
) {
2892 short int var
/* : Bool */;
2893 short int var1
/* : Bool */;
2894 var1
= hash_collection__HashSet__is_empty(self
);
2899 /* method hash_collection#HashSet#first for (self: HashSet[Object]): Object */
2900 val
* hash_collection__HashSet__first(val
* self
) {
2901 val
* var
/* : Object */;
2902 long var1
/* : Int */;
2903 long var2
/* : Int */;
2904 short int var3
/* : Bool */;
2905 short int var5
/* : Bool */;
2908 const char* var_class_name
;
2909 short int var6
/* : Bool */;
2910 val
* var7
/* : nullable HashNode[Object] */;
2911 val
* var8
/* : Object */;
2912 var1
= self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
; /* _length on <self:HashSet[Object]> */
2914 { /* Inline kernel#Int#> (var1,var2) */
2915 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
2916 /* <var2:Int> isa OTHER */
2917 var5
= 1; /* easy <var2:Int> isa OTHER*/
2919 var_class_name
= type_kernel__Int
.name
;
2920 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2921 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
2930 fprintf(stderr
, "Runtime error: %s", "Assert failed");
2931 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 405);
2934 var7
= self
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <self:HashSet[Object]> */
2936 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2937 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 406);
2940 var8
= var7
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var7:nullable HashNode[Object](nullable HashSetNode[Object])> */
2942 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
2943 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 406);
2951 /* method hash_collection#HashSet#first for (self: Object): nullable Object */
2952 val
* VIRTUAL_hash_collection__HashSet__first(val
* self
) {
2953 val
* var
/* : nullable Object */;
2954 val
* var1
/* : Object */;
2955 var1
= hash_collection__HashSet__first(self
);
2960 /* method hash_collection#HashSet#has for (self: HashSet[Object], Object): Bool */
2961 short int hash_collection__HashSet__has(val
* self
, val
* p0
) {
2962 short int var
/* : Bool */;
2963 short int var1
/* : Bool */;
2966 const struct type
* type_struct
;
2967 const char* var_class_name
;
2968 val
* var_item
/* var item: Object */;
2969 val
* var2
/* : nullable HashNode[Object] */;
2970 val
* var3
/* : null */;
2971 short int var4
/* : Bool */;
2972 /* Covariant cast for argument 0 (item) <p0:Object> isa Collection#0 */
2973 /* <p0:Object> isa Collection#0 */
2974 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collection_FT0
];
2975 cltype
= type_struct
->color
;
2976 idtype
= type_struct
->id
;
2977 if(cltype
>= p0
->type
->table_size
) {
2980 var1
= p0
->type
->type_table
[cltype
] == idtype
;
2983 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
2984 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
2985 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 409);
2989 var2
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__node_at
]))(self
, var_item
) /* node_at on <self:HashSet[Object]>*/;
2992 var4
= 0; /* is null */
2994 var4
= 1; /* arg is null and recv is not */
3001 /* method hash_collection#HashSet#has for (self: Object, nullable Object): Bool */
3002 short int VIRTUAL_hash_collection__HashSet__has(val
* self
, val
* p0
) {
3003 short int var
/* : Bool */;
3004 short int var1
/* : Bool */;
3005 var1
= hash_collection__HashSet__has(self
, p0
);
3010 /* method hash_collection#HashSet#add for (self: HashSet[Object], Object) */
3011 void hash_collection__HashSet__add(val
* self
, val
* p0
) {
3012 short int var
/* : Bool */;
3015 const struct type
* type_struct
;
3016 const char* var_class_name
;
3017 val
* var_item
/* var item: Object */;
3018 long var1
/* : Int */;
3019 long var_i
/* var i: Int */;
3020 val
* var2
/* : nullable HashNode[Object] */;
3021 val
* var_c
/* var c: nullable HashSetNode[Object] */;
3022 val
* var3
/* : null */;
3023 short int var4
/* : Bool */;
3024 val
* var5
/* : HashSetNode[Object] */;
3025 /* Covariant cast for argument 0 (item) <p0:Object> isa SimpleCollection#0 */
3026 /* <p0:Object> isa SimpleCollection#0 */
3027 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__SimpleCollection_FT0
];
3028 cltype
= type_struct
->color
;
3029 idtype
= type_struct
->id
;
3030 if(cltype
>= p0
->type
->table_size
) {
3033 var
= p0
->type
->type_table
[cltype
] == idtype
;
3036 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3037 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "SimpleCollection#0", var_class_name
);
3038 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 414);
3042 var1
= ((long (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__index_at
]))(self
, var_item
) /* index_at on <self:HashSet[Object]>*/;
3044 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]>*/;
3047 if (var_c
== NULL
) {
3048 var4
= 0; /* is null */
3050 var4
= 1; /* arg is null and recv is not */
3053 var_c
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_item
; /* _key on <var_c:nullable HashSetNode[Object](HashSetNode[Object])> */
3055 var5
= NEW_hash_collection__HashSetNode(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSetNodehash_collection__HashSet_FT0
]);
3056 ((void (*)(val
*, val
*))(var5
->class->vft
[COLOR_hash_collection__HashSetNode__init
]))(var5
, var_item
) /* init on <var5:HashSetNode[Object]>*/;
3057 ((void (*)(val
*, long, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__store
]))(self
, var_i
, var5
) /* store on <self:HashSet[Object]>*/;
3061 /* method hash_collection#HashSet#add for (self: Object, nullable Object) */
3062 void VIRTUAL_hash_collection__HashSet__add(val
* self
, val
* p0
) {
3063 hash_collection__HashSet__add(self
, p0
);
3066 /* method hash_collection#HashSet#remove for (self: HashSet[Object], Object) */
3067 void hash_collection__HashSet__remove(val
* self
, val
* p0
) {
3068 short int var
/* : Bool */;
3071 const struct type
* type_struct
;
3072 const char* var_class_name
;
3073 val
* var_item
/* var item: Object */;
3074 /* Covariant cast for argument 0 (item) <p0:Object> isa RemovableCollection#0 */
3075 /* <p0:Object> isa RemovableCollection#0 */
3076 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__RemovableCollection_FT0
];
3077 cltype
= type_struct
->color
;
3078 idtype
= type_struct
->id
;
3079 if(cltype
>= p0
->type
->table_size
) {
3082 var
= p0
->type
->type_table
[cltype
] == idtype
;
3085 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3086 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "RemovableCollection#0", var_class_name
);
3087 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 425);
3091 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__remove_node
]))(self
, var_item
) /* remove_node on <self:HashSet[Object]>*/;
3094 /* method hash_collection#HashSet#remove for (self: Object, nullable Object) */
3095 void VIRTUAL_hash_collection__HashSet__remove(val
* self
, val
* p0
) {
3096 hash_collection__HashSet__remove(self
, p0
);
3099 /* method hash_collection#HashSet#clear for (self: HashSet[Object]) */
3100 void hash_collection__HashSet__clear(val
* self
) {
3101 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__raz
]))(self
) /* raz on <self:HashSet[Object]>*/;
3104 /* method hash_collection#HashSet#clear for (self: Object) */
3105 void VIRTUAL_hash_collection__HashSet__clear(val
* self
) {
3106 hash_collection__HashSet__clear(self
);
3109 /* method hash_collection#HashSet#iterator for (self: HashSet[Object]): Iterator[Object] */
3110 val
* hash_collection__HashSet__iterator(val
* self
) {
3111 val
* var
/* : Iterator[Object] */;
3112 val
* var1
/* : HashSetIterator[Object] */;
3113 var1
= NEW_hash_collection__HashSetIterator(self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSetIteratorhash_collection__HashSet_FT0
]);
3114 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_hash_collection__HashSetIterator__init
]))(var1
, self
) /* init on <var1:HashSetIterator[Object]>*/;
3120 /* method hash_collection#HashSet#iterator for (self: Object): Iterator[nullable Object] */
3121 val
* VIRTUAL_hash_collection__HashSet__iterator(val
* self
) {
3122 val
* var
/* : Iterator[nullable Object] */;
3123 val
* var1
/* : Iterator[Object] */;
3124 var1
= hash_collection__HashSet__iterator(self
);
3129 /* method hash_collection#HashSet#init for (self: HashSet[Object]) */
3130 void hash_collection__HashSet__init(val
* self
) {
3131 long var
/* : Int */;
3132 long var1
/* : Int */;
3133 long var2
/* : Int */;
3134 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashCollection__init
]))(self
) /* init on <self:HashSet[Object]>*/;
3136 self
->attrs
[COLOR_hash_collection__HashCollection___capacity
].l
= var
; /* _capacity on <self:HashSet[Object]> */
3138 self
->attrs
[COLOR_hash_collection__HashCollection___length
].l
= var1
; /* _length on <self:HashSet[Object]> */
3140 ((void (*)(val
*, long))(self
->class->vft
[COLOR_hash_collection__HashCollection__enlarge
]))(self
, var2
) /* enlarge on <self:HashSet[Object]>*/;
3143 /* method hash_collection#HashSet#init for (self: Object) */
3144 void VIRTUAL_hash_collection__HashSet__init(val
* self
) {
3145 hash_collection__HashSet__init(self
);
3148 /* method hash_collection#HashSet#from for (self: HashSet[Object], Collection[Object]) */
3149 void hash_collection__HashSet__from(val
* self
, val
* p0
) {
3150 short int var
/* : Bool */;
3153 const struct type
* type_struct
;
3154 const char* var_class_name
;
3155 val
* var_coll
/* var coll: Collection[Object] */;
3156 /* Covariant cast for argument 0 (coll) <p0:Collection[Object]> isa Collection[HashSet#0] */
3157 /* <p0:Collection[Object]> isa Collection[HashSet#0] */
3158 type_struct
= self
->type
->resolution_table
->types
[COLOR_abstract_collection__Collectionhash_collection__HashSet_FT0
];
3159 cltype
= type_struct
->color
;
3160 idtype
= type_struct
->id
;
3161 if(cltype
>= p0
->type
->table_size
) {
3164 var
= p0
->type
->type_table
[cltype
] == idtype
;
3167 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3168 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[HashSet#0]", var_class_name
);
3169 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 438);
3173 ((void (*)(val
*))(self
->class->vft
[COLOR_hash_collection__HashSet__init
]))(self
) /* init on <self:HashSet[Object]>*/;
3174 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_abstract_collection__SimpleCollection__add_all
]))(self
, var_coll
) /* add_all on <self:HashSet[Object]>*/;
3177 /* method hash_collection#HashSet#from for (self: Object, Collection[Object]) */
3178 void VIRTUAL_hash_collection__HashSet__from(val
* self
, val
* p0
) {
3179 hash_collection__HashSet__from(self
, p0
);
3182 /* method hash_collection#HashSetNode#init for (self: HashSetNode[Object], Object) */
3183 void hash_collection__HashSetNode__init(val
* self
, val
* p0
) {
3184 short int var
/* : Bool */;
3187 const struct type
* type_struct
;
3188 const char* var_class_name
;
3189 val
* var_e
/* var e: Object */;
3190 /* Covariant cast for argument 0 (e) <p0:Object> isa HashSetNode#0 */
3191 /* <p0:Object> isa HashSetNode#0 */
3192 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSetNode_FT0
];
3193 cltype
= type_struct
->color
;
3194 idtype
= type_struct
->id
;
3195 if(cltype
>= p0
->type
->table_size
) {
3198 var
= p0
->type
->type_table
[cltype
] == idtype
;
3201 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3202 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSetNode#0", var_class_name
);
3203 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 449);
3207 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_hash_collection__HashNode__init
]))(self
, p0
) /* init on <self:HashSetNode[Object]>*/;
3208 self
->attrs
[COLOR_hash_collection__HashNode___key
].val
= var_e
; /* _key on <self:HashSetNode[Object]> */
3211 /* method hash_collection#HashSetNode#init for (self: Object, Object) */
3212 void VIRTUAL_hash_collection__HashSetNode__init(val
* self
, val
* p0
) {
3213 hash_collection__HashSetNode__init(self
, p0
);
3216 /* method hash_collection#HashSetIterator#is_ok for (self: HashSetIterator[Object]): Bool */
3217 short int hash_collection__HashSetIterator__is_ok(val
* self
) {
3218 short int var
/* : Bool */;
3219 val
* var1
/* : nullable HashSetNode[Object] */;
3220 val
* var2
/* : null */;
3221 short int var3
/* : Bool */;
3222 var1
= self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[Object]> */
3225 var3
= 0; /* is null */
3227 var3
= 1; /* arg is null and recv is not */
3234 /* method hash_collection#HashSetIterator#is_ok for (self: Object): Bool */
3235 short int VIRTUAL_hash_collection__HashSetIterator__is_ok(val
* self
) {
3236 short int var
/* : Bool */;
3237 short int var1
/* : Bool */;
3238 var1
= hash_collection__HashSetIterator__is_ok(self
);
3243 /* method hash_collection#HashSetIterator#item for (self: HashSetIterator[Object]): Object */
3244 val
* hash_collection__HashSetIterator__item(val
* self
) {
3245 val
* var
/* : Object */;
3246 short int var1
/* : Bool */;
3247 val
* var2
/* : nullable HashSetNode[Object] */;
3248 val
* var3
/* : Object */;
3249 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(self
) /* is_ok on <self:HashSetIterator[Object]>*/;
3251 fprintf(stderr
, "Runtime error: %s", "Assert failed");
3252 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 461);
3255 var2
= self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[Object]> */
3257 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
3258 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 462);
3261 var3
= var2
->attrs
[COLOR_hash_collection__HashNode___key
].val
; /* _key on <var2:nullable HashSetNode[Object]> */
3263 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _key");
3264 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 462);
3272 /* method hash_collection#HashSetIterator#item for (self: Object): nullable Object */
3273 val
* VIRTUAL_hash_collection__HashSetIterator__item(val
* self
) {
3274 val
* var
/* : nullable Object */;
3275 val
* var1
/* : Object */;
3276 var1
= hash_collection__HashSetIterator__item(self
);
3281 /* method hash_collection#HashSetIterator#next for (self: HashSetIterator[Object]) */
3282 void hash_collection__HashSetIterator__next(val
* self
) {
3283 short int var
/* : Bool */;
3284 val
* var1
/* : nullable HashSetNode[Object] */;
3285 val
* var2
/* : nullable HashNode[Object] */;
3286 var
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(self
) /* is_ok on <self:HashSetIterator[Object]>*/;
3288 fprintf(stderr
, "Runtime error: %s", "Assert failed");
3289 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 467);
3292 var1
= self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
; /* _node on <self:HashSetIterator[Object]> */
3294 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
3295 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 468);
3298 var2
= var1
->attrs
[COLOR_hash_collection__HashNode___next_item
].val
; /* _next_item on <var1:nullable HashSetNode[Object]> */
3299 self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
= var2
; /* _node on <self:HashSetIterator[Object]> */
3302 /* method hash_collection#HashSetIterator#next for (self: Object) */
3303 void VIRTUAL_hash_collection__HashSetIterator__next(val
* self
) {
3304 hash_collection__HashSetIterator__next(self
);
3307 /* method hash_collection#HashSetIterator#init for (self: HashSetIterator[Object], HashSet[Object]) */
3308 void hash_collection__HashSetIterator__init(val
* self
, val
* p0
) {
3309 short int var
/* : Bool */;
3312 const struct type
* type_struct
;
3313 const char* var_class_name
;
3314 val
* var_set
/* var set: HashSet[Object] */;
3315 val
* var1
/* : nullable HashNode[Object] */;
3316 /* Covariant cast for argument 0 (set) <p0:HashSet[Object]> isa HashSet[HashSetIterator#0] */
3317 /* <p0:HashSet[Object]> isa HashSet[HashSetIterator#0] */
3318 type_struct
= self
->type
->resolution_table
->types
[COLOR_hash_collection__HashSethash_collection__HashSetIterator_FT0
];
3319 cltype
= type_struct
->color
;
3320 idtype
= type_struct
->id
;
3321 if(cltype
>= p0
->type
->table_size
) {
3324 var
= p0
->type
->type_table
[cltype
] == idtype
;
3327 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
3328 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSet[HashSetIterator#0]", var_class_name
);
3329 fprintf(stderr
, " (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 477);
3333 self
->attrs
[COLOR_hash_collection__HashSetIterator___set
].val
= var_set
; /* _set on <self:HashSetIterator[Object]> */
3334 var1
= var_set
->attrs
[COLOR_hash_collection__HashCollection___first_item
].val
; /* _first_item on <var_set:HashSet[Object]> */
3335 self
->attrs
[COLOR_hash_collection__HashSetIterator___node
].val
= var1
; /* _node on <self:HashSetIterator[Object]> */
3338 /* method hash_collection#HashSetIterator#init for (self: Object, HashSet[Object]) */
3339 void VIRTUAL_hash_collection__HashSetIterator__init(val
* self
, val
* p0
) {
3340 hash_collection__HashSetIterator__init(self
, p0
);