1 /* This C file is generated by NIT to compile module hash. */
3 val_t
hash___Object___hash(val_t self
) {
4 struct trace_t trace
= {NULL
, LOCATE_hash___Object___hash
, 21};
6 trace
.prev
= tracehead
; tracehead
= &trace
;
7 variable0
= TAG_Int((int) self
);
8 variable0
= TAG_Int(UNTAG_Int(variable0
)/UNTAG_Int( TAG_Int(8)));
10 return_label0
: while(false);
11 tracehead
= trace
.prev
;
14 val_t
hash___String___hash(val_t self
) {
15 struct trace_t trace
= {NULL
, LOCATE_hash___String___hash
, 29};
21 trace
.prev
= tracehead
; tracehead
= &trace
;
22 variable0
= TAG_Int(5381);
23 variable2
= ATTR_array___AbstractArray____length( self
) /*String::_length*/;
24 variable2
= TAG_Int(UNTAG_Int(variable2
)-UNTAG_Int( TAG_Int(1)));
25 variable1
= variable2
;
26 variable3
= ATTR_string___String____items( self
) /*String::_items*/;
27 variable2
= variable3
;
28 while (true) { /*while*/
29 variable3
= TAG_Bool(UNTAG_Int( variable1
/*i*/)>=UNTAG_Int( TAG_Int(0)));
30 if (!UNTAG_Bool(variable3
)) break; /* while*/
31 variable3
= TAG_Int(UNTAG_Int( variable0
/*h*/)*UNTAG_Int( TAG_Int(32)));
32 variable3
= TAG_Int(UNTAG_Int(variable3
)+UNTAG_Int( variable0
/*h*/));
33 variable4
= TAG_Char(UNBOX_NativeString( variable2
/*it*/)[UNTAG_Int( variable1
/*i*/)]);
34 variable4
= TAG_Int((unsigned char)UNTAG_Char(variable4
));
35 variable3
= TAG_Int(UNTAG_Int(variable3
)+UNTAG_Int(variable4
));
36 variable0
= variable3
/*h=*/;
37 variable1
= TAG_Int(UNTAG_Int(variable1
)-UNTAG_Int( TAG_Int(1))) /*i*/;
41 variable0
= variable0
/*h*/;
43 return_label1
: while(false);
44 tracehead
= trace
.prev
;
47 val_t
hash___Int___hash(val_t self
) {
48 struct trace_t trace
= {NULL
, LOCATE_hash___Int___hash
, 45};
50 trace
.prev
= tracehead
; tracehead
= &trace
;
53 return_label3
: while(false);
54 tracehead
= trace
.prev
;
57 val_t
hash___Char___hash(val_t self
) {
58 struct trace_t trace
= {NULL
, LOCATE_hash___Char___hash
, 49};
60 trace
.prev
= tracehead
; tracehead
= &trace
;
61 variable0
= TAG_Int((unsigned char)UNTAG_Char( self
));
63 return_label4
: while(false);
64 tracehead
= trace
.prev
;
67 val_t
hash___Bool___hash(val_t self
) {
68 struct trace_t trace
= {NULL
, LOCATE_hash___Bool___hash
, 53};
70 trace
.prev
= tracehead
; tracehead
= &trace
;
71 if (UNTAG_Bool( self
)) { /*if*/
72 variable0
= TAG_Int(1);
75 variable0
= TAG_Int(0);
78 return_label5
: while(false);
79 tracehead
= trace
.prev
;
82 val_t
hash___HashCollection___length(val_t self
) {
83 struct trace_t trace
= {NULL
, LOCATE_hash___HashCollection___length
, 69};
84 trace
.prev
= tracehead
; tracehead
= &trace
;
85 tracehead
= trace
.prev
;
86 return ATTR_hash___HashCollection____length( self
) /*HashCollection::_length*/;
88 val_t
hash___HashCollection___first_item(val_t self
) {
89 struct trace_t trace
= {NULL
, LOCATE_hash___HashCollection___first_item
, 71};
90 trace
.prev
= tracehead
; tracehead
= &trace
;
91 tracehead
= trace
.prev
;
92 return ATTR_hash___HashCollection____first_item( self
) /*HashCollection::_first_item*/;
94 val_t
hash___HashCollection___index_at(val_t self
, val_t param0
) {
95 struct trace_t trace
= {NULL
, LOCATE_hash___HashCollection___index_at
, 80};
103 trace
.prev
= tracehead
; tracehead
= &trace
;
105 variable2
= ATTR_hash___HashCollection____array( self
) /*HashCollection::_array*/;
106 variable1
= variable2
;
107 variable2
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0
/*k*/ == NIT_NULL
/*null*/) || (( variable0
/*k*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable0
/*k*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable0
/*k*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable0
/*k*/,COLOR_kernel___Object_____eqeq
))( variable0
/*k*/, NIT_NULL
/*null*/) /*Object::==*/)))))));
108 if (!UNTAG_Bool(variable2
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashCollection___index_at
, 84); nit_exit(1);}
109 variable2
= ATTR_hash___HashCollection____last_accessed_key( self
) /*HashCollection::_last_accessed_key*/;
110 variable2
= TAG_Bool(( variable0
/*k*/ == variable2
) || (( variable0
/*k*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable0
/*k*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable0
/*k*/,variable2
)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable0
/*k*/,COLOR_kernel___Object_____eqeq
))( variable0
/*k*/, variable2
) /*Object::==*/)))));
111 if (UNTAG_Bool(variable2
)) { /*if*/
112 variable2
= ATTR_hash___HashCollection____last_accessed_index( self
) /*HashCollection::_last_accessed_index*/;
113 variable1
= variable2
;
116 variable3
= ((hash___Object___hash_t
)CALL( variable0
/*k*/,COLOR_hash___Object___hash
))( variable0
/*k*/) /*Object::hash*/;
117 variable4
= ATTR_hash___HashCollection____capacity( self
) /*HashCollection::_capacity*/;
118 variable3
= TAG_Int(UNTAG_Int(variable3
)%UNTAG_Int(variable4
));
119 variable2
= variable3
;
120 variable3
= TAG_Bool(UNTAG_Int( variable2
/*base*/)<UNTAG_Int( TAG_Int(0)));
121 if (UNTAG_Bool(variable3
)) { /*if*/
122 variable3
= TAG_Int(-UNTAG_Int( variable2
/*base*/));
123 variable2
= variable3
/*base=*/;
125 variable3
= variable2
/*base*/;
126 while (true) { /*while*/
127 if (!UNTAG_Bool( TAG_Bool(true))) break; /* while*/
128 variable5
= UNBOX_NativeArray( variable1
/*arr*/)[UNTAG_Int( variable3
/*cur*/)];
129 variable4
= variable5
;
130 variable5
= TAG_Bool(( variable4
/*c*/ == NIT_NULL
/*null*/) || (( variable4
/*c*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable4
/*c*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable4
/*c*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable4
/*c*/,COLOR_kernel___Object_____eqeq
))( variable4
/*c*/, NIT_NULL
/*null*/) /*HashNode::==*/)))));
131 variable6
= variable5
;
132 if (!UNTAG_Bool(variable6
)) { /* or */
133 variable6
= ((hash___HashNode___key_t
)CALL( variable4
/*c*/,COLOR_hash___HashNode___key
))( variable4
/*c*/) /*HashNode::key*/;
134 variable6
= TAG_Bool((variable6
== variable0
/*k*/) || ((variable6
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable6
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable6
, variable0
/*k*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable6
,COLOR_kernel___Object_____eqeq
))(variable6
, variable0
/*k*/) /*Object::==*/)))));
136 variable5
= variable6
;
137 if (UNTAG_Bool(variable5
)) { /*if*/
138 ATTR_hash___HashCollection____last_accessed_index( self
) /*HashCollection::_last_accessed_index*/ = variable3
/*cur*/;
139 ATTR_hash___HashCollection____last_accessed_key( self
) /*HashCollection::_last_accessed_key*/ = variable0
/*k*/;
140 variable1
= variable3
/*cur*/;
143 variable3
= TAG_Int(UNTAG_Int(variable3
)-UNTAG_Int( TAG_Int(1))) /*cur*/;
144 variable5
= TAG_Bool(UNTAG_Int( variable3
/*cur*/)<UNTAG_Int( TAG_Int(0)));
145 if (UNTAG_Bool(variable5
)) { /*if*/
146 variable5
= ATTR_hash___HashCollection____capacity( self
) /*HashCollection::_capacity*/;
147 variable5
= TAG_Int(UNTAG_Int(variable5
)-UNTAG_Int( TAG_Int(1)));
148 variable3
= variable5
/*cur=*/;
150 variable5
= TAG_Bool(( variable3
/*cur*/)!=( variable2
/*base*/));
151 if (!UNTAG_Bool(variable5
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'no_loop' ", LOCATE_hash___HashCollection___index_at
, 104); nit_exit(1);}
152 continue_7
: while(0);
155 fprintf(stderr
, "Aborted (%s: %d)\n", LOCATE_hash___HashCollection___index_at
, 106); nit_exit(1);
156 return_label6
: while(false);
157 tracehead
= trace
.prev
;
160 void hash___HashCollection___store(val_t self
, val_t param0
, val_t param1
) {
161 struct trace_t trace
= {NULL
, LOCATE_hash___HashCollection___store
, 109};
166 trace
.prev
= tracehead
; tracehead
= &trace
;
169 variable2
= ATTR_hash___HashCollection____first_item( self
) /*HashCollection::_first_item*/;
170 variable2
= TAG_Bool((variable2
== NIT_NULL
/*null*/) || ((variable2
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable2
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable2
, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable2
,COLOR_kernel___Object_____eqeq
))(variable2
, NIT_NULL
/*null*/) /*HashNode::==*/)))));
171 if (UNTAG_Bool(variable2
)) { /*if*/
172 ATTR_hash___HashCollection____first_item( self
) /*HashCollection::_first_item*/ = variable1
/*node*/;
174 variable2
= ATTR_hash___HashCollection____last_item( self
) /*HashCollection::_last_item*/;
175 ((hash___HashNode___next_item__eq_t
)CALL(variable2
,COLOR_hash___HashNode___next_item__eq
))(variable2
, variable1
/*node*/) /*HashNode::next_item=*/;
177 variable2
= ATTR_hash___HashCollection____last_item( self
) /*HashCollection::_last_item*/;
178 ((hash___HashNode___prev_item__eq_t
)CALL( variable1
/*node*/,COLOR_hash___HashNode___prev_item__eq
))( variable1
/*node*/, variable2
) /*HashNode::prev_item=*/;
179 ((hash___HashNode___next_item__eq_t
)CALL( variable1
/*node*/,COLOR_hash___HashNode___next_item__eq
))( variable1
/*node*/, NIT_NULL
/*null*/) /*HashNode::next_item=*/;
180 ATTR_hash___HashCollection____last_item( self
) /*HashCollection::_last_item*/ = variable1
/*node*/;
181 variable2
= ATTR_hash___HashCollection____array( self
) /*HashCollection::_array*/;
182 variable2
= UNBOX_NativeArray(variable2
)[UNTAG_Int( variable0
/*index*/)];
183 variable2
= TAG_Bool((variable2
== NIT_NULL
/*null*/) || ((variable2
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable2
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable2
, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable2
,COLOR_kernel___Object_____eqeq
))(variable2
, NIT_NULL
/*null*/) /*HashNode::==*/)))));
184 if (!UNTAG_Bool(variable2
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashCollection___store
, 122); nit_exit(1);}
185 variable2
= ATTR_hash___HashCollection____array( self
) /*HashCollection::_array*/;
186 UNBOX_NativeArray(variable2
)[UNTAG_Int( variable0
/*index*/)]= variable1
/*node*/;
187 variable3
= ATTR_hash___HashCollection____length( self
) /*HashCollection::_length*/;
188 variable2
= variable3
;
189 variable3
= TAG_Int(UNTAG_Int( variable2
/*l*/)+UNTAG_Int( TAG_Int(1)));
190 ATTR_hash___HashCollection____length( self
) /*HashCollection::_length*/ = variable3
;
191 variable3
= TAG_Int(UNTAG_Int( variable2
/*l*/)+UNTAG_Int( TAG_Int(5)));
192 variable3
= TAG_Int(UNTAG_Int(variable3
)*UNTAG_Int( TAG_Int(150)));
193 variable3
= TAG_Int(UNTAG_Int(variable3
)/UNTAG_Int( TAG_Int(100)));
194 variable2
= variable3
/*l=*/;
195 variable3
= ATTR_hash___HashCollection____capacity( self
) /*HashCollection::_capacity*/;
196 variable3
= TAG_Bool(UNTAG_Int( variable2
/*l*/)>=UNTAG_Int(variable3
));
197 if (UNTAG_Bool(variable3
)) { /*if*/
198 variable3
= TAG_Int(UNTAG_Int( variable2
/*l*/)*UNTAG_Int( TAG_Int(2)));
199 ((hash___HashCollection___enlarge_t
)CALL( self
,COLOR_hash___HashCollection___enlarge
))( self
, variable3
) /*HashCollection::enlarge*/;
201 tracehead
= trace
.prev
;
204 void hash___HashCollection___remove_index(val_t self
, val_t param0
) {
205 struct trace_t trace
= {NULL
, LOCATE_hash___HashCollection___remove_index
, 132};
213 trace
.prev
= tracehead
; tracehead
= &trace
;
215 variable1
= TAG_Bool(UNTAG_Int( variable0
/*i*/)>=UNTAG_Int( TAG_Int(0)));
216 variable2
= variable1
;
217 if (UNTAG_Bool(variable2
)) { /* and */
218 variable2
= ATTR_hash___HashCollection____capacity( self
) /*HashCollection::_capacity*/;
219 variable2
= TAG_Bool(UNTAG_Int( variable0
/*i*/)<UNTAG_Int(variable2
));
221 variable1
= variable2
;
222 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'correct_index' ", LOCATE_hash___HashCollection___remove_index
, 134); nit_exit(1);}
223 variable2
= ATTR_hash___HashCollection____array( self
) /*HashCollection::_array*/;
224 variable2
= UNBOX_NativeArray(variable2
)[UNTAG_Int( variable0
/*i*/)];
225 variable1
= variable2
;
226 variable2
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable1
/*node*/ == NIT_NULL
/*null*/) || (( variable1
/*node*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable1
/*node*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable1
/*node*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable1
/*node*/,COLOR_kernel___Object_____eqeq
))( variable1
/*node*/, NIT_NULL
/*null*/) /*HashNode::==*/)))))));
227 if (!UNTAG_Bool(variable2
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'has_couple' ", LOCATE_hash___HashCollection___remove_index
, 136); nit_exit(1);}
228 variable3
= ((hash___HashNode___prev_item_t
)CALL( variable1
/*node*/,COLOR_hash___HashNode___prev_item
))( variable1
/*node*/) /*HashNode::prev_item*/;
229 variable2
= variable3
;
230 variable4
= ((hash___HashNode___next_item_t
)CALL( variable1
/*node*/,COLOR_hash___HashNode___next_item
))( variable1
/*node*/) /*HashNode::next_item*/;
231 variable3
= variable4
;
232 variable4
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2
/*prev*/ == NIT_NULL
/*null*/) || (( variable2
/*prev*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable2
/*prev*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable2
/*prev*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable2
/*prev*/,COLOR_kernel___Object_____eqeq
))( variable2
/*prev*/, NIT_NULL
/*null*/) /*HashNode::==*/)))))));
233 if (UNTAG_Bool(variable4
)) { /*if*/
234 ((hash___HashNode___next_item__eq_t
)CALL( variable2
/*prev*/,COLOR_hash___HashNode___next_item__eq
))( variable2
/*prev*/, variable3
/*next*/) /*HashNode::next_item=*/;
236 ATTR_hash___HashCollection____first_item( self
) /*HashCollection::_first_item*/ = variable3
/*next*/;
238 variable4
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable3
/*next*/ == NIT_NULL
/*null*/) || (( variable3
/*next*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable3
/*next*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable3
/*next*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable3
/*next*/,COLOR_kernel___Object_____eqeq
))( variable3
/*next*/, NIT_NULL
/*null*/) /*HashNode::==*/)))))));
239 if (UNTAG_Bool(variable4
)) { /*if*/
240 ((hash___HashNode___prev_item__eq_t
)CALL( variable3
/*next*/,COLOR_hash___HashNode___prev_item__eq
))( variable3
/*next*/, variable2
/*prev*/) /*HashNode::prev_item=*/;
242 ATTR_hash___HashCollection____last_item( self
) /*HashCollection::_last_item*/ = variable2
/*prev*/;
244 variable4
= ATTR_hash___HashCollection____array( self
) /*HashCollection::_array*/;
245 UNBOX_NativeArray(variable4
)[UNTAG_Int( variable0
/*i*/)]= NIT_NULL
/*null*/;
246 ATTR_hash___HashCollection____length( self
) /*HashCollection::_length*/ = TAG_Int(UNTAG_Int(ATTR_hash___HashCollection____length( self
) /*HashCollection::_length*/)-UNTAG_Int( TAG_Int(1)));
247 while (true) { /*while*/
248 if (!UNTAG_Bool( TAG_Bool(true))) break; /* while*/
249 variable0
= TAG_Int(UNTAG_Int(variable0
)-UNTAG_Int( TAG_Int(1))) /*i*/;
250 variable4
= TAG_Bool(UNTAG_Int( variable0
/*i*/)<UNTAG_Int( TAG_Int(0)));
251 if (UNTAG_Bool(variable4
)) { /*if*/
252 variable4
= ATTR_hash___HashCollection____capacity( self
) /*HashCollection::_capacity*/;
253 variable4
= TAG_Int(UNTAG_Int(variable4
)-UNTAG_Int( TAG_Int(1)));
254 variable0
= variable4
/*i=*/;
256 variable5
= ATTR_hash___HashCollection____array( self
) /*HashCollection::_array*/;
257 variable5
= UNBOX_NativeArray(variable5
)[UNTAG_Int( variable0
/*i*/)];
258 variable4
= variable5
;
259 variable5
= TAG_Bool(( variable4
/*n*/ == NIT_NULL
/*null*/) || (( variable4
/*n*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable4
/*n*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable4
/*n*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable4
/*n*/,COLOR_kernel___Object_____eqeq
))( variable4
/*n*/, NIT_NULL
/*null*/) /*HashNode::==*/)))));
260 if (UNTAG_Bool(variable5
)) { /*if*/
263 variable6
= ((hash___HashNode___key_t
)CALL( variable4
/*n*/,COLOR_hash___HashNode___key
))( variable4
/*n*/) /*HashNode::key*/;
264 variable6
= ((hash___HashCollection___index_at_t
)CALL( self
,COLOR_hash___HashCollection___index_at
))( self
, variable6
) /*HashCollection::index_at*/;
265 variable5
= variable6
;
266 variable6
= TAG_Bool(( variable0
/*i*/)!=( variable5
/*i2*/));
267 if (UNTAG_Bool(variable6
)) { /*if*/
268 variable6
= ATTR_hash___HashCollection____array( self
) /*HashCollection::_array*/;
269 UNBOX_NativeArray(variable6
)[UNTAG_Int( variable0
/*i*/)]= NIT_NULL
/*null*/;
270 variable6
= ATTR_hash___HashCollection____array( self
) /*HashCollection::_array*/;
271 variable6
= UNBOX_NativeArray(variable6
)[UNTAG_Int( variable5
/*i2*/)];
272 variable6
= TAG_Bool((variable6
== NIT_NULL
/*null*/) || ((variable6
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable6
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable6
, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable6
,COLOR_kernel___Object_____eqeq
))(variable6
, NIT_NULL
/*null*/) /*HashNode::==*/)))));
273 if (!UNTAG_Bool(variable6
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashCollection___remove_index
, 166); nit_exit(1);}
274 variable6
= ATTR_hash___HashCollection____array( self
) /*HashCollection::_array*/;
275 UNBOX_NativeArray(variable6
)[UNTAG_Int( variable5
/*i2*/)]= variable4
/*n*/;
277 continue_10
: while(0);
280 return_label9
: while(false);
281 tracehead
= trace
.prev
;
284 void hash___HashCollection___raz(val_t self
) {
285 struct trace_t trace
= {NULL
, LOCATE_hash___HashCollection___raz
, 172};
288 trace
.prev
= tracehead
; tracehead
= &trace
;
289 variable1
= ATTR_hash___HashCollection____capacity( self
) /*HashCollection::_capacity*/;
290 variable1
= TAG_Int(UNTAG_Int(variable1
)-UNTAG_Int( TAG_Int(1)));
291 variable0
= variable1
;
292 while (true) { /*while*/
293 variable1
= TAG_Bool(UNTAG_Int( variable0
/*i*/)>=UNTAG_Int( TAG_Int(0)));
294 if (!UNTAG_Bool(variable1
)) break; /* while*/
295 variable1
= ATTR_hash___HashCollection____array( self
) /*HashCollection::_array*/;
296 UNBOX_NativeArray(variable1
)[UNTAG_Int( variable0
/*i*/)]= NIT_NULL
/*null*/;
297 variable0
= TAG_Int(UNTAG_Int(variable0
)-UNTAG_Int( TAG_Int(1))) /*i*/;
298 continue_12
: while(0);
301 ATTR_hash___HashCollection____length( self
) /*HashCollection::_length*/ = TAG_Int(0);
302 ATTR_hash___HashCollection____first_item( self
) /*HashCollection::_first_item*/ = NIT_NULL
/*null*/;
303 ATTR_hash___HashCollection____last_item( self
) /*HashCollection::_last_item*/ = NIT_NULL
/*null*/;
304 ATTR_hash___HashCollection____last_accessed_key( self
) /*HashCollection::_last_accessed_key*/ = NIT_NULL
/*null*/;
305 tracehead
= trace
.prev
;
308 void hash___HashCollection___enlarge(val_t self
, val_t param0
) {
309 struct trace_t trace
= {NULL
, LOCATE_hash___HashCollection___enlarge
, 185};
318 trace
.prev
= tracehead
; tracehead
= &trace
;
320 variable2
= ATTR_hash___HashCollection____capacity( self
) /*HashCollection::_capacity*/;
321 variable1
= variable2
;
322 variable2
= ATTR_hash___HashCollection____length( self
) /*HashCollection::_length*/;
323 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(1)));
324 variable2
= TAG_Bool(UNTAG_Int( variable0
/*cap*/)<UNTAG_Int(variable2
));
325 if (UNTAG_Bool(variable2
)) { /*if*/
326 variable2
= ATTR_hash___HashCollection____length( self
) /*HashCollection::_length*/;
327 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(1)));
328 variable0
= variable2
/*cap=*/;
330 variable2
= ATTR_hash___HashCollection____capacity( self
) /*HashCollection::_capacity*/;
331 variable2
= TAG_Bool(UNTAG_Int( variable0
/*cap*/)<=UNTAG_Int(variable2
));
332 if (UNTAG_Bool(variable2
)) { /*if*/
335 ATTR_hash___HashCollection____capacity( self
) /*HashCollection::_capacity*/ = variable0
/*cap*/;
336 ATTR_hash___HashCollection____last_accessed_key( self
) /*HashCollection::_last_accessed_key*/ = NIT_NULL
/*null*/;
337 variable3
= BOX_NativeArray((val_t
*)malloc((UNTAG_Int( variable0
/*cap*/) * sizeof(val_t
))));
338 variable2
= variable3
;
339 ATTR_hash___HashCollection____array( self
) /*HashCollection::_array*/ = variable2
/*new_array*/;
340 variable4
= TAG_Int(UNTAG_Int( variable0
/*cap*/)-UNTAG_Int( TAG_Int(1)));
341 variable3
= variable4
;
342 while (true) { /*while*/
343 variable4
= TAG_Bool(UNTAG_Int( variable3
/*i*/)>=UNTAG_Int( TAG_Int(0)));
344 if (!UNTAG_Bool(variable4
)) break; /* while*/
345 UNBOX_NativeArray( variable2
/*new_array*/)[UNTAG_Int( variable3
/*i*/)]= NIT_NULL
/*null*/;
346 variable3
= TAG_Int(UNTAG_Int(variable3
)-UNTAG_Int( TAG_Int(1))) /*i*/;
347 continue_14
: while(0);
350 variable4
= ATTR_hash___HashCollection____capacity( self
) /*HashCollection::_capacity*/;
351 variable4
= TAG_Bool(UNTAG_Int(variable4
)<=UNTAG_Int( variable1
/*old_cap*/));
352 if (UNTAG_Bool(variable4
)) { /*if*/
355 variable5
= ATTR_hash___HashCollection____array( self
) /*HashCollection::_array*/;
356 variable4
= variable5
;
357 variable6
= ATTR_hash___HashCollection____first_item( self
) /*HashCollection::_first_item*/;
358 variable5
= variable6
;
359 while (true) { /*while*/
360 variable6
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable5
/*node*/ == NIT_NULL
/*null*/) || (( variable5
/*node*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable5
/*node*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable5
/*node*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable5
/*node*/,COLOR_kernel___Object_____eqeq
))( variable5
/*node*/, NIT_NULL
/*null*/) /*HashNode::==*/)))))));
361 if (!UNTAG_Bool(variable6
)) break; /* while*/
362 variable7
= ((hash___HashNode___key_t
)CALL( variable5
/*node*/,COLOR_hash___HashNode___key
))( variable5
/*node*/) /*HashNode::key*/;
363 variable7
= ((hash___HashCollection___index_at_t
)CALL( self
,COLOR_hash___HashCollection___index_at
))( self
, variable7
) /*HashCollection::index_at*/;
364 variable6
= variable7
;
365 variable7
= UNBOX_NativeArray( variable4
/*new_array*/)[UNTAG_Int( variable6
/*ind*/)];
366 variable7
= TAG_Bool((variable7
== NIT_NULL
/*null*/) || ((variable7
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable7
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable7
, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable7
,COLOR_kernel___Object_____eqeq
))(variable7
, NIT_NULL
/*null*/) /*HashNode::==*/)))));
367 if (!UNTAG_Bool(variable7
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashCollection___enlarge
, 213); nit_exit(1);}
368 UNBOX_NativeArray( variable4
/*new_array*/)[UNTAG_Int( variable6
/*ind*/)]= variable5
/*node*/;
369 variable7
= ((hash___HashNode___next_item_t
)CALL( variable5
/*node*/,COLOR_hash___HashNode___next_item
))( variable5
/*node*/) /*HashNode::next_item*/;
370 variable5
= variable7
/*node=*/;
371 continue_15
: while(0);
374 ATTR_hash___HashCollection____last_accessed_key( self
) /*HashCollection::_last_accessed_key*/ = NIT_NULL
/*null*/;
375 return_label13
: while(false);
376 tracehead
= trace
.prev
;
379 val_t
hash___HashNode___key(val_t self
) {
380 struct trace_t trace
= {NULL
, LOCATE_hash___HashNode___key
, 222};
381 trace
.prev
= tracehead
; tracehead
= &trace
;
382 fprintf(stderr
, "Deferred method %s called (%s: %d)\n", "key", LOCATE_hash___HashCollection___enlarge
, 222);
384 tracehead
= trace
.prev
;
387 val_t
hash___HashNode___next_item(val_t self
) {
388 struct trace_t trace
= {NULL
, LOCATE_hash___HashNode___next_item
, 224};
389 trace
.prev
= tracehead
; tracehead
= &trace
;
390 tracehead
= trace
.prev
;
391 return ATTR_hash___HashNode____next_item( self
) /*HashNode::_next_item*/;
393 void hash___HashNode___next_item__eq(val_t self
, val_t param0
) {
394 struct trace_t trace
= {NULL
, LOCATE_hash___HashNode___next_item__eq
, 224};
395 trace
.prev
= tracehead
; tracehead
= &trace
;
396 ATTR_hash___HashNode____next_item( self
) /*HashNode::_next_item*/ = param0
;
397 tracehead
= trace
.prev
;
400 val_t
hash___HashNode___prev_item(val_t self
) {
401 struct trace_t trace
= {NULL
, LOCATE_hash___HashNode___prev_item
, 225};
402 trace
.prev
= tracehead
; tracehead
= &trace
;
403 tracehead
= trace
.prev
;
404 return ATTR_hash___HashNode____prev_item( self
) /*HashNode::_prev_item*/;
406 void hash___HashNode___prev_item__eq(val_t self
, val_t param0
) {
407 struct trace_t trace
= {NULL
, LOCATE_hash___HashNode___prev_item__eq
, 225};
408 trace
.prev
= tracehead
; tracehead
= &trace
;
409 ATTR_hash___HashNode____prev_item( self
) /*HashNode::_prev_item*/ = param0
;
410 tracehead
= trace
.prev
;
413 val_t
hash___HashMap___iterator(val_t self
) {
414 struct trace_t trace
= {NULL
, LOCATE_hash___HashMap___iterator
, 232};
416 trace
.prev
= tracehead
; tracehead
= &trace
;
417 variable0
= NEW_hash___HashMapIterator___init( self
); /*new HashMapIterator[K, V]*/
419 return_label16
: while(false);
420 tracehead
= trace
.prev
;
423 val_t
hash___HashMap___first(val_t self
) {
424 struct trace_t trace
= {NULL
, LOCATE_hash___HashMap___first
, 234};
426 trace
.prev
= tracehead
; tracehead
= &trace
;
427 variable0
= ATTR_hash___HashCollection____length( self
) /*HashMap::_length*/;
428 variable0
= TAG_Bool(UNTAG_Int(variable0
)>UNTAG_Int( TAG_Int(0)));
429 if (!UNTAG_Bool(variable0
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashMap___first
, 236); nit_exit(1);}
430 variable0
= ATTR_hash___HashCollection____first_item( self
) /*HashMap::_first_item*/;
431 variable0
= ((abstract_collection___Couple___second_t
)CALL(variable0
,COLOR_abstract_collection___Couple___second
))(variable0
) /*HashMapNode::second*/;
433 return_label17
: while(false);
434 tracehead
= trace
.prev
;
437 val_t
hash___HashMap___is_empty(val_t self
) {
438 struct trace_t trace
= {NULL
, LOCATE_hash___HashMap___is_empty
, 240};
440 trace
.prev
= tracehead
; tracehead
= &trace
;
441 variable0
= ATTR_hash___HashCollection____length( self
) /*HashMap::_length*/;
442 variable0
= TAG_Bool((variable0
)==( TAG_Int(0)));
444 return_label18
: while(false);
445 tracehead
= trace
.prev
;
448 val_t
hash___HashMap___count(val_t self
, val_t param0
) {
449 struct trace_t trace
= {NULL
, LOCATE_hash___HashMap___count
, 242};
456 trace
.prev
= tracehead
; tracehead
= &trace
;
458 variable1
= TAG_Int(0);
459 variable2
= TAG_Int(0);
460 while (true) { /*while*/
461 variable3
= ATTR_hash___HashCollection____capacity( self
) /*HashMap::_capacity*/;
462 variable3
= TAG_Bool(UNTAG_Int( variable2
/*i*/)<UNTAG_Int(variable3
));
463 if (!UNTAG_Bool(variable3
)) break; /* while*/
464 variable4
= ATTR_hash___HashCollection____array( self
) /*HashMap::_array*/;
465 variable4
= UNBOX_NativeArray(variable4
)[UNTAG_Int( variable2
/*i*/)];
466 variable3
= variable4
;
467 variable4
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable3
/*c*/ == NIT_NULL
/*null*/) || (( variable3
/*c*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable3
/*c*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable3
/*c*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable3
/*c*/,COLOR_kernel___Object_____eqeq
))( variable3
/*c*/, NIT_NULL
/*null*/) /*HashMapNode::==*/)))))));
468 variable5
= variable4
;
469 if (UNTAG_Bool(variable5
)) { /* and */
470 variable5
= ((abstract_collection___Couple___second_t
)CALL( variable3
/*c*/,COLOR_abstract_collection___Couple___second
))( variable3
/*c*/) /*HashMapNode::second*/;
471 variable5
= TAG_Bool((variable5
== variable0
/*item*/) || ((variable5
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable5
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable5
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable5
,COLOR_kernel___Object_____eqeq
))(variable5
, variable0
/*item*/) /*Object::==*/)))));
473 variable4
= variable5
;
474 if (UNTAG_Bool(variable4
)) { /*if*/
475 variable1
= TAG_Int(UNTAG_Int(variable1
)+UNTAG_Int( TAG_Int(1))) /*nb*/;
477 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(1))) /*i*/;
478 continue_20
: while(0);
481 variable1
= variable1
/*nb*/;
483 return_label19
: while(false);
484 tracehead
= trace
.prev
;
487 val_t
hash___HashMap___has(val_t self
, val_t param0
) {
488 struct trace_t trace
= {NULL
, LOCATE_hash___HashMap___has
, 254};
494 trace
.prev
= tracehead
; tracehead
= &trace
;
496 variable1
= TAG_Int(0);
497 while (true) { /*while*/
498 variable2
= ATTR_hash___HashCollection____capacity( self
) /*HashMap::_capacity*/;
499 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)<UNTAG_Int(variable2
));
500 if (!UNTAG_Bool(variable2
)) break; /* while*/
501 variable3
= ATTR_hash___HashCollection____array( self
) /*HashMap::_array*/;
502 variable3
= UNBOX_NativeArray(variable3
)[UNTAG_Int( variable1
/*i*/)];
503 variable2
= variable3
;
504 variable3
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2
/*c*/ == NIT_NULL
/*null*/) || (( variable2
/*c*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable2
/*c*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable2
/*c*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable2
/*c*/,COLOR_kernel___Object_____eqeq
))( variable2
/*c*/, NIT_NULL
/*null*/) /*HashMapNode::==*/)))))));
505 variable4
= variable3
;
506 if (UNTAG_Bool(variable4
)) { /* and */
507 variable4
= ((abstract_collection___Couple___second_t
)CALL( variable2
/*c*/,COLOR_abstract_collection___Couple___second
))( variable2
/*c*/) /*HashMapNode::second*/;
508 variable4
= TAG_Bool((variable4
== variable0
/*item*/) || ((variable4
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable4
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable4
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable4
,COLOR_kernel___Object_____eqeq
))(variable4
, variable0
/*item*/) /*Object::==*/)))));
510 variable3
= variable4
;
511 if (UNTAG_Bool(variable3
)) { /*if*/
512 variable1
= TAG_Bool(true);
515 variable1
= TAG_Int(UNTAG_Int(variable1
)+UNTAG_Int( TAG_Int(1))) /*i*/;
516 continue_22
: while(0);
519 variable1
= TAG_Bool(false);
521 return_label21
: while(false);
522 tracehead
= trace
.prev
;
525 val_t
hash___HashMap___has_only(val_t self
, val_t param0
) {
526 struct trace_t trace
= {NULL
, LOCATE_hash___HashMap___has_only
, 265};
532 trace
.prev
= tracehead
; tracehead
= &trace
;
534 variable1
= TAG_Int(0);
535 while (true) { /*while*/
536 variable2
= ATTR_hash___HashCollection____capacity( self
) /*HashMap::_capacity*/;
537 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)<UNTAG_Int(variable2
));
538 if (!UNTAG_Bool(variable2
)) break; /* while*/
539 variable3
= ATTR_hash___HashCollection____array( self
) /*HashMap::_array*/;
540 variable3
= UNBOX_NativeArray(variable3
)[UNTAG_Int( variable1
/*i*/)];
541 variable2
= variable3
;
542 variable3
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2
/*c*/ == NIT_NULL
/*null*/) || (( variable2
/*c*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable2
/*c*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable2
/*c*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable2
/*c*/,COLOR_kernel___Object_____eqeq
))( variable2
/*c*/, NIT_NULL
/*null*/) /*HashMapNode::==*/)))))));
543 variable4
= variable3
;
544 if (UNTAG_Bool(variable4
)) { /* and */
545 variable4
= ((abstract_collection___Couple___second_t
)CALL( variable2
/*c*/,COLOR_abstract_collection___Couple___second
))( variable2
/*c*/) /*HashMapNode::second*/;
546 variable4
= TAG_Bool(!UNTAG_Bool(TAG_Bool((variable4
== variable0
/*item*/) || ((variable4
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable4
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable4
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable4
,COLOR_kernel___Object_____eqeq
))(variable4
, variable0
/*item*/) /*Object::==*/)))))));
548 variable3
= variable4
;
549 if (UNTAG_Bool(variable3
)) { /*if*/
550 variable1
= TAG_Bool(false);
553 variable1
= TAG_Int(UNTAG_Int(variable1
)+UNTAG_Int( TAG_Int(1))) /*i*/;
554 continue_24
: while(0);
557 variable1
= TAG_Bool(true);
559 return_label23
: while(false);
560 tracehead
= trace
.prev
;
563 void hash___HashMap_____braeq(val_t self
, val_t param0
, val_t param1
) {
564 struct trace_t trace
= {NULL
, LOCATE_hash___HashMap_____braeq
, 276};
570 trace
.prev
= tracehead
; tracehead
= &trace
;
573 variable2
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0
/*key*/ == NIT_NULL
/*null*/) || (( variable0
/*key*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable0
/*key*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable0
/*key*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable0
/*key*/,COLOR_kernel___Object_____eqeq
))( variable0
/*key*/, NIT_NULL
/*null*/) /*Object::==*/)))))));
574 if (!UNTAG_Bool(variable2
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashMap_____braeq
, 278); nit_exit(1);}
575 variable3
= ((hash___HashCollection___index_at_t
)CALL( self
,COLOR_hash___HashCollection___index_at
))( self
, variable0
/*key*/) /*HashMap::index_at*/;
576 variable2
= variable3
;
577 variable4
= ATTR_hash___HashCollection____array( self
) /*HashMap::_array*/;
578 variable4
= UNBOX_NativeArray(variable4
)[UNTAG_Int( variable2
/*i*/)];
579 variable3
= variable4
;
580 variable4
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable3
/*c*/ == NIT_NULL
/*null*/) || (( variable3
/*c*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable3
/*c*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable3
/*c*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable3
/*c*/,COLOR_kernel___Object_____eqeq
))( variable3
/*c*/, NIT_NULL
/*null*/) /*HashMapNode::==*/)))))));
581 if (UNTAG_Bool(variable4
)) { /*if*/
582 ((abstract_collection___Couple___first__eq_t
)CALL( variable3
/*c*/,COLOR_abstract_collection___Couple___first__eq
))( variable3
/*c*/, variable0
/*key*/) /*HashMapNode::first=*/;
583 ((abstract_collection___Couple___second__eq_t
)CALL( variable3
/*c*/,COLOR_abstract_collection___Couple___second__eq
))( variable3
/*c*/, variable1
/*v*/) /*HashMapNode::second=*/;
585 variable4
= NEW_hash___HashMapNode___init( variable0
/*key*/, variable1
/*v*/); /*new HashMapNode[K, V]*/
586 ((hash___HashCollection___store_t
)CALL( self
,COLOR_hash___HashCollection___store
))( self
, variable2
/*i*/, variable4
) /*HashMap::store*/;
588 tracehead
= trace
.prev
;
591 void hash___HashMap___remove(val_t self
, val_t param0
) {
592 struct trace_t trace
= {NULL
, LOCATE_hash___HashMap___remove
, 289};
598 trace
.prev
= tracehead
; tracehead
= &trace
;
600 variable1
= TAG_Int(0);
601 while (true) { /*while*/
602 variable2
= ATTR_hash___HashCollection____capacity( self
) /*HashMap::_capacity*/;
603 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)<UNTAG_Int(variable2
));
604 if (!UNTAG_Bool(variable2
)) break; /* while*/
605 variable3
= ATTR_hash___HashCollection____array( self
) /*HashMap::_array*/;
606 variable3
= UNBOX_NativeArray(variable3
)[UNTAG_Int( variable1
/*i*/)];
607 variable2
= variable3
;
608 variable3
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2
/*c*/ == NIT_NULL
/*null*/) || (( variable2
/*c*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable2
/*c*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable2
/*c*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable2
/*c*/,COLOR_kernel___Object_____eqeq
))( variable2
/*c*/, NIT_NULL
/*null*/) /*HashMapNode::==*/)))))));
609 variable4
= variable3
;
610 if (UNTAG_Bool(variable4
)) { /* and */
611 variable4
= ((abstract_collection___Couple___second_t
)CALL( variable2
/*c*/,COLOR_abstract_collection___Couple___second
))( variable2
/*c*/) /*HashMapNode::second*/;
612 variable4
= TAG_Bool((variable4
== variable0
/*item*/) || ((variable4
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable4
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable4
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable4
,COLOR_kernel___Object_____eqeq
))(variable4
, variable0
/*item*/) /*Object::==*/)))));
614 variable3
= variable4
;
615 if (UNTAG_Bool(variable3
)) { /*if*/
616 ((hash___HashCollection___remove_index_t
)CALL( self
,COLOR_hash___HashCollection___remove_index
))( self
, variable1
/*i*/) /*HashMap::remove_index*/;
619 variable1
= TAG_Int(UNTAG_Int(variable1
)+UNTAG_Int( TAG_Int(1))) /*i*/;
620 continue_27
: while(0);
623 return_label26
: while(false);
624 tracehead
= trace
.prev
;
627 void hash___HashMap___remove_at(val_t self
, val_t param0
) {
628 struct trace_t trace
= {NULL
, LOCATE_hash___HashMap___remove_at
, 302};
631 trace
.prev
= tracehead
; tracehead
= &trace
;
633 variable1
= ((hash___HashCollection___index_at_t
)CALL( self
,COLOR_hash___HashCollection___index_at
))( self
, variable0
/*key*/) /*HashMap::index_at*/;
634 ((hash___HashCollection___remove_index_t
)CALL( self
,COLOR_hash___HashCollection___remove_index
))( self
, variable1
) /*HashMap::remove_index*/;
635 tracehead
= trace
.prev
;
638 void hash___HashMap___clear(val_t self
) {
639 struct trace_t trace
= {NULL
, LOCATE_hash___HashMap___clear
, 304};
640 trace
.prev
= tracehead
; tracehead
= &trace
;
641 ((hash___HashCollection___raz_t
)CALL( self
,COLOR_hash___HashCollection___raz
))( self
) /*HashMap::raz*/;
642 tracehead
= trace
.prev
;
645 val_t
hash___HashMap___couple_at(val_t self
, val_t param0
) {
646 struct trace_t trace
= {NULL
, LOCATE_hash___HashMap___couple_at
, 306};
650 trace
.prev
= tracehead
; tracehead
= &trace
;
652 variable1
= ATTR_hash___HashCollection____array( self
) /*HashMap::_array*/;
653 variable2
= ((hash___HashCollection___index_at_t
)CALL( self
,COLOR_hash___HashCollection___index_at
))( self
, variable0
/*key*/) /*HashMap::index_at*/;
654 variable1
= UNBOX_NativeArray(variable1
)[UNTAG_Int(variable2
)];
656 return_label30
: while(false);
657 tracehead
= trace
.prev
;
660 void hash___HashMap___init(val_t self
, int* init_table
) {
661 struct trace_t trace
= {NULL
, LOCATE_hash___HashMap___init
, 308};
662 trace
.prev
= tracehead
; tracehead
= &trace
;
663 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_HashMap
].i
]) return;
664 ATTR_hash___HashCollection____capacity( self
) /*HashMap::_capacity*/ = TAG_Int(0);
665 ATTR_hash___HashCollection____length( self
) /*HashMap::_length*/ = TAG_Int(0);
666 ((hash___HashCollection___enlarge_t
)CALL( self
,COLOR_hash___HashCollection___enlarge
))( self
, TAG_Int(0)) /*HashMap::enlarge*/;
667 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_HashMap
].i
] = 1;
668 tracehead
= trace
.prev
;
671 val_t
hash___HashMapNode___key(val_t self
) {
672 struct trace_t trace
= {NULL
, LOCATE_hash___HashMapNode___key
, 319};
674 trace
.prev
= tracehead
; tracehead
= &trace
;
675 variable0
= ((abstract_collection___Couple___first_t
)CALL( self
,COLOR_abstract_collection___Couple___first
))( self
) /*HashMapNode::first*/;
677 return_label32
: while(false);
678 tracehead
= trace
.prev
;
681 void hash___HashMapNode___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
682 struct trace_t trace
= {NULL
, LOCATE_hash___HashMapNode___init
, 322};
685 trace
.prev
= tracehead
; tracehead
= &trace
;
688 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_HashMapNode
].i
]) return;
689 ((abstract_collection___Couple___first__eq_t
)CALL( self
,COLOR_abstract_collection___Couple___first__eq
))( self
, variable0
/*k*/) /*HashMapNode::first=*/;
690 ((abstract_collection___Couple___second__eq_t
)CALL( self
,COLOR_abstract_collection___Couple___second__eq
))( self
, variable1
/*v*/) /*HashMapNode::second=*/;
691 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_HashMapNode
].i
] = 1;
692 tracehead
= trace
.prev
;
695 val_t
hash___HashMapIterator___is_ok(val_t self
) {
696 struct trace_t trace
= {NULL
, LOCATE_hash___HashMapIterator___is_ok
, 331};
698 trace
.prev
= tracehead
; tracehead
= &trace
;
699 variable0
= ATTR_hash___HashMapIterator____node( self
) /*HashMapIterator::_node*/;
700 variable0
= TAG_Bool(!UNTAG_Bool(TAG_Bool((variable0
== NIT_NULL
/*null*/) || ((variable0
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable0
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable0
, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable0
,COLOR_kernel___Object_____eqeq
))(variable0
, NIT_NULL
/*null*/) /*HashMapNode::==*/)))))));
702 return_label34
: while(false);
703 tracehead
= trace
.prev
;
706 val_t
hash___HashMapIterator___item(val_t self
) {
707 struct trace_t trace
= {NULL
, LOCATE_hash___HashMapIterator___item
, 333};
709 trace
.prev
= tracehead
; tracehead
= &trace
;
710 variable0
= ((hash___HashMapIterator___is_ok_t
)CALL( self
,COLOR_abstract_collection___Iterator___is_ok
))( self
) /*HashMapIterator::is_ok*/;
711 if (!UNTAG_Bool(variable0
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashMapIterator___item
, 335); nit_exit(1);}
712 variable0
= ATTR_hash___HashMapIterator____node( self
) /*HashMapIterator::_node*/;
713 variable0
= ((abstract_collection___Couple___second_t
)CALL(variable0
,COLOR_abstract_collection___Couple___second
))(variable0
) /*HashMapNode::second*/;
715 return_label35
: while(false);
716 tracehead
= trace
.prev
;
719 void hash___HashMapIterator___item__eq(val_t self
, val_t param0
) {
720 struct trace_t trace
= {NULL
, LOCATE_hash___HashMapIterator___item__eq
, 339};
723 trace
.prev
= tracehead
; tracehead
= &trace
;
725 variable1
= ((hash___HashMapIterator___is_ok_t
)CALL( self
,COLOR_abstract_collection___Iterator___is_ok
))( self
) /*HashMapIterator::is_ok*/;
726 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashMapIterator___item__eq
, 341); nit_exit(1);}
727 variable1
= ATTR_hash___HashMapIterator____node( self
) /*HashMapIterator::_node*/;
728 ((abstract_collection___Couple___second__eq_t
)CALL(variable1
,COLOR_abstract_collection___Couple___second__eq
))(variable1
, variable0
/*value*/) /*HashMapNode::second=*/;
729 tracehead
= trace
.prev
;
732 val_t
hash___HashMapIterator___key(val_t self
) {
733 struct trace_t trace
= {NULL
, LOCATE_hash___HashMapIterator___key
, 345};
735 trace
.prev
= tracehead
; tracehead
= &trace
;
736 variable0
= ((hash___HashMapIterator___is_ok_t
)CALL( self
,COLOR_abstract_collection___Iterator___is_ok
))( self
) /*HashMapIterator::is_ok*/;
737 if (!UNTAG_Bool(variable0
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashMapIterator___key
, 347); nit_exit(1);}
738 variable0
= ATTR_hash___HashMapIterator____node( self
) /*HashMapIterator::_node*/;
739 variable0
= ((abstract_collection___Couple___first_t
)CALL(variable0
,COLOR_abstract_collection___Couple___first
))(variable0
) /*HashMapNode::first*/;
741 return_label37
: while(false);
742 tracehead
= trace
.prev
;
745 void hash___HashMapIterator___next(val_t self
) {
746 struct trace_t trace
= {NULL
, LOCATE_hash___HashMapIterator___next
, 351};
748 trace
.prev
= tracehead
; tracehead
= &trace
;
749 variable0
= ((hash___HashMapIterator___is_ok_t
)CALL( self
,COLOR_abstract_collection___Iterator___is_ok
))( self
) /*HashMapIterator::is_ok*/;
750 if (!UNTAG_Bool(variable0
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashMapIterator___next
, 353); nit_exit(1);}
751 variable0
= ATTR_hash___HashMapIterator____node( self
) /*HashMapIterator::_node*/;
752 variable0
= ((hash___HashNode___next_item_t
)CALL(variable0
,COLOR_hash___HashNode___next_item
))(variable0
) /*HashMapNode::next_item*/;
753 ATTR_hash___HashMapIterator____node( self
) /*HashMapIterator::_node*/ = variable0
;
754 tracehead
= trace
.prev
;
757 void hash___HashMapIterator___init(val_t self
, val_t param0
, int* init_table
) {
758 struct trace_t trace
= {NULL
, LOCATE_hash___HashMapIterator___init
, 363};
761 trace
.prev
= tracehead
; tracehead
= &trace
;
763 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_HashMapIterator
].i
]) return;
764 ATTR_hash___HashMapIterator____map( self
) /*HashMapIterator::_map*/ = variable0
/*map*/;
765 variable1
= ((hash___HashCollection___first_item_t
)CALL( variable0
/*map*/,COLOR_hash___HashCollection___first_item
))( variable0
/*map*/) /*HashMap::first_item*/;
766 ATTR_hash___HashMapIterator____node( self
) /*HashMapIterator::_node*/ = variable1
;
767 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_HashMapIterator
].i
] = 1;
768 tracehead
= trace
.prev
;
771 val_t
hash___HashSet___is_empty(val_t self
) {
772 struct trace_t trace
= {NULL
, LOCATE_hash___HashSet___is_empty
, 374};
774 trace
.prev
= tracehead
; tracehead
= &trace
;
775 variable0
= ATTR_hash___HashCollection____length( self
) /*HashSet::_length*/;
776 variable0
= TAG_Bool((variable0
)==( TAG_Int(0)));
778 return_label40
: while(false);
779 tracehead
= trace
.prev
;
782 val_t
hash___HashSet___first(val_t self
) {
783 struct trace_t trace
= {NULL
, LOCATE_hash___HashSet___first
, 376};
785 trace
.prev
= tracehead
; tracehead
= &trace
;
786 variable0
= ATTR_hash___HashCollection____length( self
) /*HashSet::_length*/;
787 variable0
= TAG_Bool(UNTAG_Int(variable0
)>UNTAG_Int( TAG_Int(0)));
788 if (!UNTAG_Bool(variable0
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashSet___first
, 378); nit_exit(1);}
789 variable0
= ATTR_hash___HashCollection____first_item( self
) /*HashSet::_first_item*/;
790 variable0
= ((hash___HashSetNode___key_t
)CALL(variable0
,COLOR_hash___HashNode___key
))(variable0
) /*HashSetNode::key*/;
792 return_label41
: while(false);
793 tracehead
= trace
.prev
;
796 val_t
hash___HashSet___has(val_t self
, val_t param0
) {
797 struct trace_t trace
= {NULL
, LOCATE_hash___HashSet___has
, 382};
801 trace
.prev
= tracehead
; tracehead
= &trace
;
803 variable1
= ATTR_hash___HashCollection____array( self
) /*HashSet::_array*/;
804 variable2
= ((hash___HashCollection___index_at_t
)CALL( self
,COLOR_hash___HashCollection___index_at
))( self
, variable0
/*item*/) /*HashSet::index_at*/;
805 variable1
= UNBOX_NativeArray(variable1
)[UNTAG_Int(variable2
)];
806 variable1
= TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1
== NIT_NULL
/*null*/) || ((variable1
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable1
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable1
, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable1
,COLOR_kernel___Object_____eqeq
))(variable1
, NIT_NULL
/*null*/) /*HashSetNode::==*/)))))));
808 return_label42
: while(false);
809 tracehead
= trace
.prev
;
812 void hash___HashSet___add(val_t self
, val_t param0
) {
813 struct trace_t trace
= {NULL
, LOCATE_hash___HashSet___add
, 387};
818 trace
.prev
= tracehead
; tracehead
= &trace
;
820 variable2
= ((hash___HashCollection___index_at_t
)CALL( self
,COLOR_hash___HashCollection___index_at
))( self
, variable0
/*item*/) /*HashSet::index_at*/;
821 variable1
= variable2
;
822 variable3
= ATTR_hash___HashCollection____array( self
) /*HashSet::_array*/;
823 variable3
= UNBOX_NativeArray(variable3
)[UNTAG_Int( variable1
/*i*/)];
824 variable2
= variable3
;
825 variable3
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2
/*c*/ == NIT_NULL
/*null*/) || (( variable2
/*c*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable2
/*c*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable2
/*c*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable2
/*c*/,COLOR_kernel___Object_____eqeq
))( variable2
/*c*/, NIT_NULL
/*null*/) /*HashSetNode::==*/)))))));
826 if (UNTAG_Bool(variable3
)) { /*if*/
827 ((hash___HashSetNode___key__eq_t
)CALL( variable2
/*c*/,COLOR_hash___HashSetNode___key__eq
))( variable2
/*c*/, variable0
/*item*/) /*HashSetNode::key=*/;
829 variable3
= NEW_hash___HashSetNode___init( variable0
/*item*/); /*new HashSetNode[E]*/
830 ((hash___HashCollection___store_t
)CALL( self
,COLOR_hash___HashCollection___store
))( self
, variable1
/*i*/, variable3
) /*HashSet::store*/;
832 tracehead
= trace
.prev
;
835 void hash___HashSet___remove(val_t self
, val_t param0
) {
836 struct trace_t trace
= {NULL
, LOCATE_hash___HashSet___remove
, 398};
839 trace
.prev
= tracehead
; tracehead
= &trace
;
841 variable1
= ((hash___HashCollection___index_at_t
)CALL( self
,COLOR_hash___HashCollection___index_at
))( self
, variable0
/*item*/) /*HashSet::index_at*/;
842 ((hash___HashCollection___remove_index_t
)CALL( self
,COLOR_hash___HashCollection___remove_index
))( self
, variable1
) /*HashSet::remove_index*/;
843 tracehead
= trace
.prev
;
846 void hash___HashSet___clear(val_t self
) {
847 struct trace_t trace
= {NULL
, LOCATE_hash___HashSet___clear
, 400};
848 trace
.prev
= tracehead
; tracehead
= &trace
;
849 ((hash___HashCollection___raz_t
)CALL( self
,COLOR_hash___HashCollection___raz
))( self
) /*HashSet::raz*/;
850 tracehead
= trace
.prev
;
853 val_t
hash___HashSet___iterator(val_t self
) {
854 struct trace_t trace
= {NULL
, LOCATE_hash___HashSet___iterator
, 402};
856 trace
.prev
= tracehead
; tracehead
= &trace
;
857 variable0
= NEW_hash___HashSetIterator___init( self
); /*new HashSetIterator[E]*/
859 return_label46
: while(false);
860 tracehead
= trace
.prev
;
863 void hash___HashSet___init(val_t self
, int* init_table
) {
864 struct trace_t trace
= {NULL
, LOCATE_hash___HashSet___init
, 404};
865 trace
.prev
= tracehead
; tracehead
= &trace
;
866 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_HashSet
].i
]) return;
867 ATTR_hash___HashCollection____capacity( self
) /*HashSet::_capacity*/ = TAG_Int(0);
868 ATTR_hash___HashCollection____length( self
) /*HashSet::_length*/ = TAG_Int(0);
869 ((hash___HashCollection___enlarge_t
)CALL( self
,COLOR_hash___HashCollection___enlarge
))( self
, TAG_Int(0)) /*HashSet::enlarge*/;
870 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_HashSet
].i
] = 1;
871 tracehead
= trace
.prev
;
874 val_t
hash___HashSetNode___key(val_t self
) {
875 struct trace_t trace
= {NULL
, LOCATE_hash___HashSetNode___key
, 416};
876 trace
.prev
= tracehead
; tracehead
= &trace
;
877 tracehead
= trace
.prev
;
878 return ATTR_hash___HashSetNode____key( self
) /*HashSetNode::_key*/;
880 void hash___HashSetNode___key__eq(val_t self
, val_t param0
) {
881 struct trace_t trace
= {NULL
, LOCATE_hash___HashSetNode___key__eq
, 416};
882 trace
.prev
= tracehead
; tracehead
= &trace
;
883 ATTR_hash___HashSetNode____key( self
) /*HashSetNode::_key*/ = param0
;
884 tracehead
= trace
.prev
;
887 void hash___HashSetNode___init(val_t self
, val_t param0
, int* init_table
) {
888 struct trace_t trace
= {NULL
, LOCATE_hash___HashSetNode___init
, 418};
890 trace
.prev
= tracehead
; tracehead
= &trace
;
892 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_HashSetNode
].i
]) return;
893 ATTR_hash___HashSetNode____key( self
) /*HashSetNode::_key*/ = variable0
/*e*/;
894 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_HashSetNode
].i
] = 1;
895 tracehead
= trace
.prev
;
898 val_t
hash___HashSetIterator___is_ok(val_t self
) {
899 struct trace_t trace
= {NULL
, LOCATE_hash___HashSetIterator___is_ok
, 426};
901 trace
.prev
= tracehead
; tracehead
= &trace
;
902 variable0
= ATTR_hash___HashSetIterator____node( self
) /*HashSetIterator::_node*/;
903 variable0
= TAG_Bool(!UNTAG_Bool(TAG_Bool((variable0
== NIT_NULL
/*null*/) || ((variable0
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable0
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable0
, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable0
,COLOR_kernel___Object_____eqeq
))(variable0
, NIT_NULL
/*null*/) /*HashSetNode::==*/)))))));
905 return_label49
: while(false);
906 tracehead
= trace
.prev
;
909 val_t
hash___HashSetIterator___item(val_t self
) {
910 struct trace_t trace
= {NULL
, LOCATE_hash___HashSetIterator___item
, 428};
912 trace
.prev
= tracehead
; tracehead
= &trace
;
913 variable0
= ((hash___HashSetIterator___is_ok_t
)CALL( self
,COLOR_abstract_collection___Iterator___is_ok
))( self
) /*HashSetIterator::is_ok*/;
914 if (!UNTAG_Bool(variable0
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashSetIterator___item
, 430); nit_exit(1);}
915 variable0
= ATTR_hash___HashSetIterator____node( self
) /*HashSetIterator::_node*/;
916 variable0
= ((hash___HashSetNode___key_t
)CALL(variable0
,COLOR_hash___HashNode___key
))(variable0
) /*HashSetNode::key*/;
918 return_label50
: while(false);
919 tracehead
= trace
.prev
;
922 void hash___HashSetIterator___next(val_t self
) {
923 struct trace_t trace
= {NULL
, LOCATE_hash___HashSetIterator___next
, 434};
925 trace
.prev
= tracehead
; tracehead
= &trace
;
926 variable0
= ((hash___HashSetIterator___is_ok_t
)CALL( self
,COLOR_abstract_collection___Iterator___is_ok
))( self
) /*HashSetIterator::is_ok*/;
927 if (!UNTAG_Bool(variable0
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_hash___HashSetIterator___next
, 436); nit_exit(1);}
928 variable0
= ATTR_hash___HashSetIterator____node( self
) /*HashSetIterator::_node*/;
929 variable0
= ((hash___HashNode___next_item_t
)CALL(variable0
,COLOR_hash___HashNode___next_item
))(variable0
) /*HashSetNode::next_item*/;
930 ATTR_hash___HashSetIterator____node( self
) /*HashSetIterator::_node*/ = variable0
;
931 tracehead
= trace
.prev
;
934 void hash___HashSetIterator___init(val_t self
, val_t param0
, int* init_table
) {
935 struct trace_t trace
= {NULL
, LOCATE_hash___HashSetIterator___init
, 446};
938 trace
.prev
= tracehead
; tracehead
= &trace
;
940 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_HashSetIterator
].i
]) return;
941 ATTR_hash___HashSetIterator____set( self
) /*HashSetIterator::_set*/ = variable0
/*set*/;
942 variable1
= ((hash___HashCollection___first_item_t
)CALL( variable0
/*set*/,COLOR_hash___HashCollection___first_item
))( variable0
/*set*/) /*HashSet::first_item*/;
943 ATTR_hash___HashSetIterator____node( self
) /*HashSetIterator::_node*/ = variable1
;
944 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_HashSetIterator
].i
] = 1;
945 tracehead
= trace
.prev
;