lib: remove exec::kill and exec::term
[nit.git] / c_src / hash._sep.c
1 /* This C file is generated by NIT to compile module hash. */
2 #include "hash._sep.h"
3 val_t hash___Object___hash(val_t self) {
4 struct trace_t trace = {NULL, NULL, 21, LOCATE_hash___Object___hash};
5 val_t variable[3];
6 struct WBT_ **closurevariable = NULL;
7 trace.prev = tracehead; tracehead = &trace;
8 trace.file = LOCATE_hash;
9 /* Register variable[0]: Local variable */
10 variable[0] = self;
11 /* Register variable[1]: Method return value and escape marker */
12 /* Register variable[2]: Result */
13 variable[2] = TAG_Int((bigint)variable[0]);
14 /* Register variable[2]: Result */
15 variable[2] = TAG_Int(UNTAG_Int(variable[2])/UNTAG_Int( TAG_Int(8)));
16 variable[1] = variable[2];
17 goto return_label0;
18 return_label0: while(false);
19 tracehead = trace.prev;
20 return variable[1];
21 }
22 val_t hash___String___hash(val_t self) {
23 struct trace_t trace = {NULL, NULL, 29, LOCATE_hash___String___hash};
24 val_t variable[7];
25 struct WBT_ **closurevariable = NULL;
26 trace.prev = tracehead; tracehead = &trace;
27 trace.file = LOCATE_hash;
28 /* Register variable[0]: Local variable */
29 variable[0] = self;
30 /* Register variable[1]: Method return value and escape marker */
31 /* Register variable[2]: Local variable */
32 variable[2] = TAG_Int(5381);
33 /* Register variable[3]: Local variable */
34 /* Register variable[4]: Result */
35 variable[4] = ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/;
36 /* Register variable[4]: Result */
37 variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int( TAG_Int(1)));
38 variable[3] = variable[4];
39 /* Register variable[4]: Local variable */
40 /* Register variable[5]: Result */
41 variable[5] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
42 variable[4] = variable[5];
43 while (true) { /*while*/
44 /* Register variable[5]: Result */
45 variable[5] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)>=UNTAG_Int( TAG_Int(0)));
46 if (!UNTAG_Bool(variable[5])) break; /* while*/
47 /* Register variable[5]: Result */
48 variable[5] = TAG_Int(UNTAG_Int( variable[2] /*h*/)*UNTAG_Int( TAG_Int(32)));
49 /* Register variable[5]: Result */
50 variable[5] = TAG_Int(UNTAG_Int(variable[5])+UNTAG_Int( variable[2] /*h*/));
51 /* Register variable[6]: Result */
52 variable[6] = TAG_Char(UNBOX_NativeString( variable[4] /*it*/)[UNTAG_Int( variable[3] /*i*/)]);
53 /* Register variable[6]: Result */
54 variable[6] = TAG_Int((unsigned char)UNTAG_Char(variable[6]));
55 /* Register variable[5]: Result */
56 variable[5] = TAG_Int(UNTAG_Int(variable[5])+UNTAG_Int(variable[6]));
57 variable[2] = variable[5] /*h=*/;
58 variable[3] = TAG_Int(UNTAG_Int(variable[3])-UNTAG_Int( TAG_Int(1))) /*i*/;
59 continue_2: while(0);
60 }
61 break_2: while(0);
62 variable[1] = variable[2] /*h*/;
63 goto return_label1;
64 return_label1: while(false);
65 tracehead = trace.prev;
66 return variable[1];
67 }
68 val_t hash___Int___hash(val_t self) {
69 struct trace_t trace = {NULL, NULL, 45, LOCATE_hash___Int___hash};
70 val_t variable[2];
71 struct WBT_ **closurevariable = NULL;
72 trace.prev = tracehead; tracehead = &trace;
73 trace.file = LOCATE_hash;
74 /* Register variable[0]: Local variable */
75 variable[0] = self;
76 /* Register variable[1]: Method return value and escape marker */
77 variable[1] = variable[0];
78 goto return_label3;
79 return_label3: while(false);
80 tracehead = trace.prev;
81 return variable[1];
82 }
83 val_t hash___Char___hash(val_t self) {
84 struct trace_t trace = {NULL, NULL, 49, LOCATE_hash___Char___hash};
85 val_t variable[3];
86 struct WBT_ **closurevariable = NULL;
87 trace.prev = tracehead; tracehead = &trace;
88 trace.file = LOCATE_hash;
89 /* Register variable[0]: Local variable */
90 variable[0] = self;
91 /* Register variable[1]: Method return value and escape marker */
92 /* Register variable[2]: Result */
93 variable[2] = TAG_Int((unsigned char)UNTAG_Char(variable[0]));
94 variable[1] = variable[2];
95 goto return_label4;
96 return_label4: while(false);
97 tracehead = trace.prev;
98 return variable[1];
99 }
100 val_t hash___Bool___hash(val_t self) {
101 struct trace_t trace = {NULL, NULL, 53, LOCATE_hash___Bool___hash};
102 val_t variable[2];
103 struct WBT_ **closurevariable = NULL;
104 trace.prev = tracehead; tracehead = &trace;
105 trace.file = LOCATE_hash;
106 /* Register variable[0]: Local variable */
107 variable[0] = self;
108 /* Register variable[1]: Method return value and escape marker */
109 if (UNTAG_Bool(variable[0])) { /*if*/
110 variable[1] = TAG_Int(1);
111 goto return_label5;
112 } else { /*if*/
113 variable[1] = TAG_Int(0);
114 goto return_label5;
115 }
116 return_label5: while(false);
117 tracehead = trace.prev;
118 return variable[1];
119 }
120 val_t hash___HashCollection___length(val_t self) {
121 struct trace_t trace = {NULL, NULL, 69, LOCATE_hash___HashCollection___length};
122 val_t *variable = NULL;
123 struct WBT_ **closurevariable = NULL;
124 trace.prev = tracehead; tracehead = &trace;
125 trace.file = LOCATE_hash;
126 tracehead = trace.prev;
127 return ATTR_hash___HashCollection____length( self) /*HashCollection::_length*/;
128 }
129 val_t hash___HashCollection___first_item(val_t self) {
130 struct trace_t trace = {NULL, NULL, 71, LOCATE_hash___HashCollection___first_item};
131 val_t *variable = NULL;
132 struct WBT_ **closurevariable = NULL;
133 trace.prev = tracehead; tracehead = &trace;
134 trace.file = LOCATE_hash;
135 tracehead = trace.prev;
136 return ATTR_hash___HashCollection____first_item( self) /*HashCollection::_first_item*/;
137 }
138 val_t hash___HashCollection___index_at(val_t self, val_t param0) {
139 struct trace_t trace = {NULL, NULL, 80, LOCATE_hash___HashCollection___index_at};
140 val_t variable[8];
141 struct WBT_ **closurevariable = NULL;
142 trace.prev = tracehead; tracehead = &trace;
143 trace.file = LOCATE_hash;
144 /* Register variable[0]: Local variable */
145 variable[0] = self;
146 /* Register variable[1]: Local variable */
147 variable[1] = param0;
148 /* Register variable[2]: Method return value and escape marker */
149 /* Register variable[3]: Local variable */
150 /* Register variable[4]: Result */
151 variable[4] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
152 variable[3] = variable[4];
153 /* Register variable[4]: Result */
154 variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[1] /*k*/ == NIT_NULL /*null*/) || (( variable[1] /*k*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[1] /*k*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[1] /*k*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[1] /*k*/)( variable[1] /*k*/, NIT_NULL /*null*/) /*Object::==*/)))))));
155 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashCollection___index_at, LOCATE_hash, 84); nit_exit(1);}
156 /* Register variable[4]: Result */
157 variable[4] = ATTR_hash___HashCollection____last_accessed_key(variable[0]) /*HashCollection::_last_accessed_key*/;
158 /* Register variable[4]: Result */
159 variable[4] = TAG_Bool(( variable[1] /*k*/ == variable[4]) || (( variable[1] /*k*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[1] /*k*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[1] /*k*/,variable[4])):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[1] /*k*/)( variable[1] /*k*/, variable[4]) /*Object::==*/)))));
160 if (UNTAG_Bool(variable[4])) { /*if*/
161 /* Register variable[4]: Result */
162 variable[4] = ATTR_hash___HashCollection____last_accessed_index(variable[0]) /*HashCollection::_last_accessed_index*/;
163 variable[2] = variable[4];
164 goto return_label6;
165 }
166 /* Register variable[4]: Local variable */
167 /* Register variable[5]: Result */
168 variable[5] = CALL_hash___Object___hash( variable[1] /*k*/)( variable[1] /*k*/) /*Object::hash*/;
169 /* Register variable[6]: Result */
170 variable[6] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
171 /* Register variable[5]: Result */
172 variable[5] = TAG_Int(UNTAG_Int(variable[5])%UNTAG_Int(variable[6]));
173 variable[4] = variable[5];
174 /* Register variable[5]: Result */
175 variable[5] = TAG_Bool(UNTAG_Int( variable[4] /*base*/)<UNTAG_Int( TAG_Int(0)));
176 if (UNTAG_Bool(variable[5])) { /*if*/
177 /* Register variable[5]: Result */
178 variable[5] = TAG_Int(-UNTAG_Int( variable[4] /*base*/));
179 variable[4] = variable[5] /*base=*/;
180 }
181 /* Register variable[5]: Local variable */
182 variable[5] = variable[4] /*base*/;
183 while (true) { /*while*/
184 if (!UNTAG_Bool( TAG_Bool(true))) break; /* while*/
185 /* Register variable[6]: Local variable */
186 /* Register variable[7]: Result */
187 variable[7] = UNBOX_NativeArray( variable[3] /*arr*/)[UNTAG_Int( variable[5] /*cur*/)];
188 variable[6] = variable[7];
189 /* Register variable[7]: Result */
190 variable[7] = TAG_Bool(( variable[6] /*c*/ == NIT_NULL /*null*/) || (( variable[6] /*c*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[6] /*c*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[6] /*c*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[6] /*c*/)( variable[6] /*c*/, NIT_NULL /*null*/) /*Object::==*/)))));
191 /* Ensure var variable[7]: Left 'or' operand*/
192 if (!UNTAG_Bool(variable[7])) { /* or */
193 /* Register variable[7]: Result */
194 variable[7] = CALL_hash___HashNode___key( variable[6] /*c*/)( variable[6] /*c*/) /*HashNode::key*/;
195 /* Register variable[7]: Result */
196 variable[7] = TAG_Bool((variable[7] == variable[1] /*k*/) || ((variable[7] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[7])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[7], variable[1] /*k*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[7])(variable[7], variable[1] /*k*/) /*Object::==*/)))));
197 }
198 /* Register variable[7]: Result */
199 if (UNTAG_Bool(variable[7])) { /*if*/
200 ATTR_hash___HashCollection____last_accessed_index(variable[0]) /*HashCollection::_last_accessed_index*/ = variable[5] /*cur*/;
201 ATTR_hash___HashCollection____last_accessed_key(variable[0]) /*HashCollection::_last_accessed_key*/ = variable[1] /*k*/;
202 variable[2] = variable[5] /*cur*/;
203 goto return_label6;
204 }
205 variable[5] = TAG_Int(UNTAG_Int(variable[5])-UNTAG_Int( TAG_Int(1))) /*cur*/;
206 /* Register variable[7]: Result */
207 variable[7] = TAG_Bool(UNTAG_Int( variable[5] /*cur*/)<UNTAG_Int( TAG_Int(0)));
208 if (UNTAG_Bool(variable[7])) { /*if*/
209 /* Register variable[7]: Result */
210 variable[7] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
211 /* Register variable[7]: Result */
212 variable[7] = TAG_Int(UNTAG_Int(variable[7])-UNTAG_Int( TAG_Int(1)));
213 variable[5] = variable[7] /*cur=*/;
214 }
215 /* Register variable[7]: Result */
216 variable[7] = TAG_Bool(( variable[5] /*cur*/)!=( variable[4] /*base*/));
217 if (!UNTAG_Bool(variable[7])) { fprintf(stderr, "Assert%s failed", " 'no_loop' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashCollection___index_at, LOCATE_hash, 104); nit_exit(1);}
218 continue_7: while(0);
219 }
220 break_7: while(0);
221 fprintf(stderr, "Aborted"); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashCollection___index_at, LOCATE_hash, 106); nit_exit(1);
222 return_label6: while(false);
223 tracehead = trace.prev;
224 return variable[2];
225 }
226 void hash___HashCollection___store(val_t self, val_t param0, val_t param1) {
227 struct trace_t trace = {NULL, NULL, 109, LOCATE_hash___HashCollection___store};
228 val_t variable[6];
229 struct WBT_ **closurevariable = NULL;
230 trace.prev = tracehead; tracehead = &trace;
231 trace.file = LOCATE_hash;
232 /* Register variable[0]: Local variable */
233 variable[0] = self;
234 /* Register variable[1]: Local variable */
235 variable[1] = param0;
236 /* Register variable[2]: Local variable */
237 variable[2] = param1;
238 /* Register variable[3]: Method return value and escape marker */
239 /* Register variable[4]: Result */
240 variable[4] = ATTR_hash___HashCollection____first_item(variable[0]) /*HashCollection::_first_item*/;
241 /* Register variable[4]: Result */
242 variable[4] = TAG_Bool((variable[4] == NIT_NULL /*null*/) || ((variable[4] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[4])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[4], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[4])(variable[4], NIT_NULL /*null*/) /*Object::==*/)))));
243 if (UNTAG_Bool(variable[4])) { /*if*/
244 ATTR_hash___HashCollection____first_item(variable[0]) /*HashCollection::_first_item*/ = variable[2] /*node*/;
245 } else { /*if*/
246 /* Register variable[4]: Result */
247 variable[4] = ATTR_hash___HashCollection____last_item(variable[0]) /*HashCollection::_last_item*/;
248 CALL_hash___HashNode___next_item__eq(variable[4])(variable[4], variable[2] /*node*/) /*HashNode::next_item=*/;
249 }
250 /* Register variable[4]: Result */
251 variable[4] = ATTR_hash___HashCollection____last_item(variable[0]) /*HashCollection::_last_item*/;
252 CALL_hash___HashNode___prev_item__eq( variable[2] /*node*/)( variable[2] /*node*/, variable[4]) /*HashNode::prev_item=*/;
253 CALL_hash___HashNode___next_item__eq( variable[2] /*node*/)( variable[2] /*node*/, NIT_NULL /*null*/) /*HashNode::next_item=*/;
254 ATTR_hash___HashCollection____last_item(variable[0]) /*HashCollection::_last_item*/ = variable[2] /*node*/;
255 /* Register variable[4]: Result */
256 variable[4] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
257 /* Register variable[4]: Result */
258 variable[4] = UNBOX_NativeArray(variable[4])[UNTAG_Int( variable[1] /*index*/)];
259 /* Register variable[4]: Result */
260 variable[4] = TAG_Bool((variable[4] == NIT_NULL /*null*/) || ((variable[4] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[4])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[4], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[4])(variable[4], NIT_NULL /*null*/) /*Object::==*/)))));
261 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashCollection___store, LOCATE_hash, 122); nit_exit(1);}
262 /* Register variable[4]: Result */
263 variable[4] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
264 UNBOX_NativeArray(variable[4])[UNTAG_Int( variable[1] /*index*/)]= variable[2] /*node*/;
265 /* Register variable[4]: Local variable */
266 /* Register variable[5]: Result */
267 variable[5] = ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/;
268 variable[4] = variable[5];
269 /* Register variable[5]: Result */
270 variable[5] = TAG_Int(UNTAG_Int( variable[4] /*l*/)+UNTAG_Int( TAG_Int(1)));
271 ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/ = variable[5];
272 /* Register variable[5]: Result */
273 variable[5] = TAG_Int(UNTAG_Int( variable[4] /*l*/)+UNTAG_Int( TAG_Int(5)));
274 /* Register variable[5]: Result */
275 variable[5] = TAG_Int(UNTAG_Int(variable[5])*UNTAG_Int( TAG_Int(150)));
276 /* Register variable[5]: Result */
277 variable[5] = TAG_Int(UNTAG_Int(variable[5])/UNTAG_Int( TAG_Int(100)));
278 variable[4] = variable[5] /*l=*/;
279 /* Register variable[5]: Result */
280 variable[5] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
281 /* Register variable[5]: Result */
282 variable[5] = TAG_Bool(UNTAG_Int( variable[4] /*l*/)>=UNTAG_Int(variable[5]));
283 if (UNTAG_Bool(variable[5])) { /*if*/
284 /* Register variable[5]: Result */
285 variable[5] = TAG_Int(UNTAG_Int( variable[4] /*l*/)*UNTAG_Int( TAG_Int(2)));
286 CALL_hash___HashCollection___enlarge(variable[0])(variable[0], variable[5]) /*HashCollection::enlarge*/;
287 }
288 return_label8: while(false);
289 tracehead = trace.prev;
290 return;
291 }
292 void hash___HashCollection___remove_index(val_t self, val_t param0) {
293 struct trace_t trace = {NULL, NULL, 132, LOCATE_hash___HashCollection___remove_index};
294 val_t variable[9];
295 struct WBT_ **closurevariable = NULL;
296 trace.prev = tracehead; tracehead = &trace;
297 trace.file = LOCATE_hash;
298 /* Register variable[0]: Local variable */
299 variable[0] = self;
300 /* Register variable[1]: Local variable */
301 variable[1] = param0;
302 /* Register variable[2]: Method return value and escape marker */
303 /* Register variable[3]: Result */
304 variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*i*/)>=UNTAG_Int( TAG_Int(0)));
305 /* Ensure var variable[3]: Left 'and' operand*/
306 if (UNTAG_Bool(variable[3])) { /* and */
307 /* Register variable[3]: Result */
308 variable[3] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
309 /* Register variable[3]: Result */
310 variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*i*/)<UNTAG_Int(variable[3]));
311 }
312 /* Register variable[3]: Result */
313 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", " 'correct_index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashCollection___remove_index, LOCATE_hash, 134); nit_exit(1);}
314 /* Register variable[3]: Local variable */
315 /* Register variable[4]: Result */
316 variable[4] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
317 /* Register variable[4]: Result */
318 variable[4] = UNBOX_NativeArray(variable[4])[UNTAG_Int( variable[1] /*i*/)];
319 variable[3] = variable[4];
320 /* Register variable[4]: Result */
321 variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[3] /*node*/ == NIT_NULL /*null*/) || (( variable[3] /*node*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[3] /*node*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[3] /*node*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[3] /*node*/)( variable[3] /*node*/, NIT_NULL /*null*/) /*Object::==*/)))))));
322 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", " 'has_couple' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashCollection___remove_index, LOCATE_hash, 136); nit_exit(1);}
323 /* Register variable[4]: Local variable */
324 /* Register variable[5]: Result */
325 variable[5] = CALL_hash___HashNode___prev_item( variable[3] /*node*/)( variable[3] /*node*/) /*HashNode::prev_item*/;
326 variable[4] = variable[5];
327 /* Register variable[5]: Local variable */
328 /* Register variable[6]: Result */
329 variable[6] = CALL_hash___HashNode___next_item( variable[3] /*node*/)( variable[3] /*node*/) /*HashNode::next_item*/;
330 variable[5] = variable[6];
331 /* Register variable[6]: Result */
332 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[4] /*prev*/ == NIT_NULL /*null*/) || (( variable[4] /*prev*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[4] /*prev*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[4] /*prev*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[4] /*prev*/)( variable[4] /*prev*/, NIT_NULL /*null*/) /*Object::==*/)))))));
333 if (UNTAG_Bool(variable[6])) { /*if*/
334 CALL_hash___HashNode___next_item__eq( variable[4] /*prev*/)( variable[4] /*prev*/, variable[5] /*next*/) /*HashNode::next_item=*/;
335 } else { /*if*/
336 ATTR_hash___HashCollection____first_item(variable[0]) /*HashCollection::_first_item*/ = variable[5] /*next*/;
337 }
338 /* Register variable[6]: Result */
339 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*next*/ == NIT_NULL /*null*/) || (( variable[5] /*next*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*next*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*next*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*next*/)( variable[5] /*next*/, NIT_NULL /*null*/) /*Object::==*/)))))));
340 if (UNTAG_Bool(variable[6])) { /*if*/
341 CALL_hash___HashNode___prev_item__eq( variable[5] /*next*/)( variable[5] /*next*/, variable[4] /*prev*/) /*HashNode::prev_item=*/;
342 } else { /*if*/
343 ATTR_hash___HashCollection____last_item(variable[0]) /*HashCollection::_last_item*/ = variable[4] /*prev*/;
344 }
345 /* Register variable[6]: Result */
346 variable[6] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
347 UNBOX_NativeArray(variable[6])[UNTAG_Int( variable[1] /*i*/)]= NIT_NULL /*null*/;
348 ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/ = TAG_Int(UNTAG_Int(ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/)-UNTAG_Int( TAG_Int(1)));
349 while (true) { /*while*/
350 if (!UNTAG_Bool( TAG_Bool(true))) break; /* while*/
351 variable[1] = TAG_Int(UNTAG_Int(variable[1])-UNTAG_Int( TAG_Int(1))) /*i*/;
352 /* Register variable[6]: Result */
353 variable[6] = TAG_Bool(UNTAG_Int( variable[1] /*i*/)<UNTAG_Int( TAG_Int(0)));
354 if (UNTAG_Bool(variable[6])) { /*if*/
355 /* Register variable[6]: Result */
356 variable[6] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
357 /* Register variable[6]: Result */
358 variable[6] = TAG_Int(UNTAG_Int(variable[6])-UNTAG_Int( TAG_Int(1)));
359 variable[1] = variable[6] /*i=*/;
360 }
361 /* Register variable[6]: Local variable */
362 /* Register variable[7]: Result */
363 variable[7] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
364 /* Register variable[7]: Result */
365 variable[7] = UNBOX_NativeArray(variable[7])[UNTAG_Int( variable[1] /*i*/)];
366 variable[6] = variable[7];
367 /* Register variable[7]: Result */
368 variable[7] = TAG_Bool(( variable[6] /*n*/ == NIT_NULL /*null*/) || (( variable[6] /*n*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[6] /*n*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[6] /*n*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[6] /*n*/)( variable[6] /*n*/, NIT_NULL /*null*/) /*Object::==*/)))));
369 if (UNTAG_Bool(variable[7])) { /*if*/
370 goto return_label9;
371 }
372 /* Register variable[7]: Local variable */
373 /* Register variable[8]: Result */
374 variable[8] = CALL_hash___HashNode___key( variable[6] /*n*/)( variable[6] /*n*/) /*HashNode::key*/;
375 /* Register variable[8]: Result */
376 variable[8] = CALL_hash___HashCollection___index_at(variable[0])(variable[0], variable[8]) /*HashCollection::index_at*/;
377 variable[7] = variable[8];
378 /* Register variable[8]: Result */
379 variable[8] = TAG_Bool(( variable[1] /*i*/)!=( variable[7] /*i2*/));
380 if (UNTAG_Bool(variable[8])) { /*if*/
381 /* Register variable[8]: Result */
382 variable[8] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
383 UNBOX_NativeArray(variable[8])[UNTAG_Int( variable[1] /*i*/)]= NIT_NULL /*null*/;
384 /* Register variable[8]: Result */
385 variable[8] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
386 /* Register variable[8]: Result */
387 variable[8] = UNBOX_NativeArray(variable[8])[UNTAG_Int( variable[7] /*i2*/)];
388 /* Register variable[8]: Result */
389 variable[8] = TAG_Bool((variable[8] == NIT_NULL /*null*/) || ((variable[8] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[8])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[8], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[8])(variable[8], NIT_NULL /*null*/) /*Object::==*/)))));
390 if (!UNTAG_Bool(variable[8])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashCollection___remove_index, LOCATE_hash, 166); nit_exit(1);}
391 /* Register variable[8]: Result */
392 variable[8] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
393 UNBOX_NativeArray(variable[8])[UNTAG_Int( variable[7] /*i2*/)]= variable[6] /*n*/;
394 }
395 continue_10: while(0);
396 }
397 break_10: while(0);
398 return_label9: while(false);
399 tracehead = trace.prev;
400 return;
401 }
402 void hash___HashCollection___raz(val_t self) {
403 struct trace_t trace = {NULL, NULL, 172, LOCATE_hash___HashCollection___raz};
404 val_t variable[4];
405 struct WBT_ **closurevariable = NULL;
406 trace.prev = tracehead; tracehead = &trace;
407 trace.file = LOCATE_hash;
408 /* Register variable[0]: Local variable */
409 variable[0] = self;
410 /* Register variable[1]: Method return value and escape marker */
411 /* Register variable[2]: Local variable */
412 /* Register variable[3]: Result */
413 variable[3] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
414 /* Register variable[3]: Result */
415 variable[3] = TAG_Int(UNTAG_Int(variable[3])-UNTAG_Int( TAG_Int(1)));
416 variable[2] = variable[3];
417 while (true) { /*while*/
418 /* Register variable[3]: Result */
419 variable[3] = TAG_Bool(UNTAG_Int( variable[2] /*i*/)>=UNTAG_Int( TAG_Int(0)));
420 if (!UNTAG_Bool(variable[3])) break; /* while*/
421 /* Register variable[3]: Result */
422 variable[3] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
423 UNBOX_NativeArray(variable[3])[UNTAG_Int( variable[2] /*i*/)]= NIT_NULL /*null*/;
424 variable[2] = TAG_Int(UNTAG_Int(variable[2])-UNTAG_Int( TAG_Int(1))) /*i*/;
425 continue_12: while(0);
426 }
427 break_12: while(0);
428 ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/ = TAG_Int(0);
429 ATTR_hash___HashCollection____first_item(variable[0]) /*HashCollection::_first_item*/ = NIT_NULL /*null*/;
430 ATTR_hash___HashCollection____last_item(variable[0]) /*HashCollection::_last_item*/ = NIT_NULL /*null*/;
431 ATTR_hash___HashCollection____last_accessed_key(variable[0]) /*HashCollection::_last_accessed_key*/ = NIT_NULL /*null*/;
432 return_label11: while(false);
433 tracehead = trace.prev;
434 return;
435 }
436 void hash___HashCollection___enlarge(val_t self, val_t param0) {
437 struct trace_t trace = {NULL, NULL, 185, LOCATE_hash___HashCollection___enlarge};
438 val_t variable[10];
439 struct WBT_ **closurevariable = NULL;
440 trace.prev = tracehead; tracehead = &trace;
441 trace.file = LOCATE_hash;
442 /* Register variable[0]: Local variable */
443 variable[0] = self;
444 /* Register variable[1]: Local variable */
445 variable[1] = param0;
446 /* Register variable[2]: Method return value and escape marker */
447 /* Register variable[3]: Local variable */
448 /* Register variable[4]: Result */
449 variable[4] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
450 variable[3] = variable[4];
451 /* Register variable[4]: Result */
452 variable[4] = ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/;
453 /* Register variable[4]: Result */
454 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1)));
455 /* Register variable[4]: Result */
456 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*cap*/)<UNTAG_Int(variable[4]));
457 if (UNTAG_Bool(variable[4])) { /*if*/
458 /* Register variable[4]: Result */
459 variable[4] = ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/;
460 /* Register variable[4]: Result */
461 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1)));
462 variable[1] = variable[4] /*cap=*/;
463 }
464 /* Register variable[4]: Result */
465 variable[4] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
466 /* Register variable[4]: Result */
467 variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*cap*/)<=UNTAG_Int(variable[4]));
468 if (UNTAG_Bool(variable[4])) { /*if*/
469 goto return_label13;
470 }
471 ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/ = variable[1] /*cap*/;
472 ATTR_hash___HashCollection____last_accessed_key(variable[0]) /*HashCollection::_last_accessed_key*/ = NIT_NULL /*null*/;
473 /* Register variable[4]: Local variable */
474 /* Register variable[5]: Result */
475 variable[5] = BOX_NativeArray((val_t*)malloc((UNTAG_Int( variable[1] /*cap*/) * sizeof(val_t))));
476 variable[4] = variable[5];
477 ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/ = variable[4] /*new_array*/;
478 /* Register variable[5]: Local variable */
479 /* Register variable[6]: Result */
480 variable[6] = TAG_Int(UNTAG_Int( variable[1] /*cap*/)-UNTAG_Int( TAG_Int(1)));
481 variable[5] = variable[6];
482 while (true) { /*while*/
483 /* Register variable[6]: Result */
484 variable[6] = TAG_Bool(UNTAG_Int( variable[5] /*i*/)>=UNTAG_Int( TAG_Int(0)));
485 if (!UNTAG_Bool(variable[6])) break; /* while*/
486 UNBOX_NativeArray( variable[4] /*new_array*/)[UNTAG_Int( variable[5] /*i*/)]= NIT_NULL /*null*/;
487 variable[5] = TAG_Int(UNTAG_Int(variable[5])-UNTAG_Int( TAG_Int(1))) /*i*/;
488 continue_14: while(0);
489 }
490 break_14: while(0);
491 /* Register variable[6]: Result */
492 variable[6] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
493 /* Register variable[6]: Result */
494 variable[6] = TAG_Bool(UNTAG_Int(variable[6])<=UNTAG_Int( variable[3] /*old_cap*/));
495 if (UNTAG_Bool(variable[6])) { /*if*/
496 goto return_label13;
497 }
498 /* Register variable[6]: Local variable */
499 /* Register variable[7]: Result */
500 variable[7] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
501 variable[6] = variable[7];
502 /* Register variable[7]: Local variable */
503 /* Register variable[8]: Result */
504 variable[8] = ATTR_hash___HashCollection____first_item(variable[0]) /*HashCollection::_first_item*/;
505 variable[7] = variable[8];
506 while (true) { /*while*/
507 /* Register variable[8]: Result */
508 variable[8] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[7] /*node*/ == NIT_NULL /*null*/) || (( variable[7] /*node*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[7] /*node*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[7] /*node*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[7] /*node*/)( variable[7] /*node*/, NIT_NULL /*null*/) /*Object::==*/)))))));
509 if (!UNTAG_Bool(variable[8])) break; /* while*/
510 /* Register variable[8]: Local variable */
511 /* Register variable[9]: Result */
512 variable[9] = CALL_hash___HashNode___key( variable[7] /*node*/)( variable[7] /*node*/) /*HashNode::key*/;
513 /* Register variable[9]: Result */
514 variable[9] = CALL_hash___HashCollection___index_at(variable[0])(variable[0], variable[9]) /*HashCollection::index_at*/;
515 variable[8] = variable[9];
516 /* Register variable[9]: Result */
517 variable[9] = UNBOX_NativeArray( variable[6] /*new_array*/)[UNTAG_Int( variable[8] /*ind*/)];
518 /* Register variable[9]: Result */
519 variable[9] = TAG_Bool((variable[9] == NIT_NULL /*null*/) || ((variable[9] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[9])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[9], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[9])(variable[9], NIT_NULL /*null*/) /*Object::==*/)))));
520 if (!UNTAG_Bool(variable[9])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashCollection___enlarge, LOCATE_hash, 213); nit_exit(1);}
521 UNBOX_NativeArray( variable[6] /*new_array*/)[UNTAG_Int( variable[8] /*ind*/)]= variable[7] /*node*/;
522 /* Register variable[9]: Result */
523 variable[9] = CALL_hash___HashNode___next_item( variable[7] /*node*/)( variable[7] /*node*/) /*HashNode::next_item*/;
524 variable[7] = variable[9] /*node=*/;
525 continue_15: while(0);
526 }
527 break_15: while(0);
528 ATTR_hash___HashCollection____last_accessed_key(variable[0]) /*HashCollection::_last_accessed_key*/ = NIT_NULL /*null*/;
529 return_label13: while(false);
530 tracehead = trace.prev;
531 return;
532 }
533 void hash___HashCollection___init(val_t self, int* init_table) {
534 struct trace_t trace = {NULL, NULL, 0, LOCATE_hash___HashCollection___init};
535 val_t *variable = NULL;
536 struct WBT_ **closurevariable = NULL;
537 trace.prev = tracehead; tracehead = &trace;
538 trace.file = LOCATE_hash;
539 tracehead = trace.prev;
540 return;
541 }
542 val_t hash___HashNode___key(val_t self) {
543 struct trace_t trace = {NULL, NULL, 222, LOCATE_hash___HashNode___key};
544 val_t *variable = NULL;
545 struct WBT_ **closurevariable = NULL;
546 trace.prev = tracehead; tracehead = &trace;
547 trace.file = LOCATE_hash;
548 fprintf(stderr, "Deferred method called");
549 fprintf(stderr, " (%s:%d)\n", LOCATE_hash, 222);
550 nit_exit(1);
551 tracehead = trace.prev;
552 return NIT_NULL;
553 }
554 val_t hash___HashNode___next_item(val_t self) {
555 struct trace_t trace = {NULL, NULL, 224, LOCATE_hash___HashNode___next_item};
556 val_t *variable = NULL;
557 struct WBT_ **closurevariable = NULL;
558 trace.prev = tracehead; tracehead = &trace;
559 trace.file = LOCATE_hash;
560 tracehead = trace.prev;
561 return ATTR_hash___HashNode____next_item( self) /*HashNode::_next_item*/;
562 }
563 void hash___HashNode___next_item__eq(val_t self, val_t param0) {
564 struct trace_t trace = {NULL, NULL, 224, LOCATE_hash___HashNode___next_item__eq};
565 val_t *variable = NULL;
566 struct WBT_ **closurevariable = NULL;
567 trace.prev = tracehead; tracehead = &trace;
568 trace.file = LOCATE_hash;
569 ATTR_hash___HashNode____next_item( self) /*HashNode::_next_item*/ = param0;
570 tracehead = trace.prev;
571 return;
572 }
573 val_t hash___HashNode___prev_item(val_t self) {
574 struct trace_t trace = {NULL, NULL, 225, LOCATE_hash___HashNode___prev_item};
575 val_t *variable = NULL;
576 struct WBT_ **closurevariable = NULL;
577 trace.prev = tracehead; tracehead = &trace;
578 trace.file = LOCATE_hash;
579 tracehead = trace.prev;
580 return ATTR_hash___HashNode____prev_item( self) /*HashNode::_prev_item*/;
581 }
582 void hash___HashNode___prev_item__eq(val_t self, val_t param0) {
583 struct trace_t trace = {NULL, NULL, 225, LOCATE_hash___HashNode___prev_item__eq};
584 val_t *variable = NULL;
585 struct WBT_ **closurevariable = NULL;
586 trace.prev = tracehead; tracehead = &trace;
587 trace.file = LOCATE_hash;
588 ATTR_hash___HashNode____prev_item( self) /*HashNode::_prev_item*/ = param0;
589 tracehead = trace.prev;
590 return;
591 }
592 void hash___HashNode___init(val_t self, int* init_table) {
593 struct trace_t trace = {NULL, NULL, 0, LOCATE_hash___HashNode___init};
594 val_t *variable = NULL;
595 struct WBT_ **closurevariable = NULL;
596 trace.prev = tracehead; tracehead = &trace;
597 trace.file = LOCATE_hash;
598 tracehead = trace.prev;
599 return;
600 }
601 val_t hash___HashMap___iterator(val_t self) {
602 struct trace_t trace = {NULL, NULL, 232, LOCATE_hash___HashMap___iterator};
603 val_t variable[3];
604 struct WBT_ **closurevariable = NULL;
605 trace.prev = tracehead; tracehead = &trace;
606 trace.file = LOCATE_hash;
607 /* Register variable[0]: Local variable */
608 variable[0] = self;
609 /* Register variable[1]: Method return value and escape marker */
610 /* Register variable[2]: Result */
611 variable[2] = NEW_HashMapIterator_hash___HashMapIterator___init(variable[0]) /*new HashMapIterator[K, V]*/;
612 variable[1] = variable[2];
613 goto return_label16;
614 return_label16: while(false);
615 tracehead = trace.prev;
616 return variable[1];
617 }
618 val_t hash___HashMap___is_empty(val_t self) {
619 struct trace_t trace = {NULL, NULL, 240, LOCATE_hash___HashMap___is_empty};
620 val_t variable[3];
621 struct WBT_ **closurevariable = NULL;
622 trace.prev = tracehead; tracehead = &trace;
623 trace.file = LOCATE_hash;
624 /* Register variable[0]: Local variable */
625 variable[0] = self;
626 /* Register variable[1]: Method return value and escape marker */
627 /* Register variable[2]: Result */
628 variable[2] = ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/;
629 /* Register variable[2]: Result */
630 variable[2] = TAG_Bool((variable[2])==( TAG_Int(0)));
631 variable[1] = variable[2];
632 goto return_label17;
633 return_label17: while(false);
634 tracehead = trace.prev;
635 return variable[1];
636 }
637 val_t hash___HashMap___has(val_t self, val_t param0) {
638 struct trace_t trace = {NULL, NULL, 254, LOCATE_hash___HashMap___has};
639 val_t variable[6];
640 struct WBT_ **closurevariable = NULL;
641 trace.prev = tracehead; tracehead = &trace;
642 trace.file = LOCATE_hash;
643 /* Register variable[0]: Local variable */
644 variable[0] = self;
645 /* Register variable[1]: Local variable */
646 variable[1] = param0;
647 /* Register variable[2]: Method return value and escape marker */
648 /* Register variable[3]: Local variable */
649 variable[3] = TAG_Int(0);
650 while (true) { /*while*/
651 /* Register variable[4]: Result */
652 variable[4] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
653 /* Register variable[4]: Result */
654 variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int(variable[4]));
655 if (!UNTAG_Bool(variable[4])) break; /* while*/
656 /* Register variable[4]: Local variable */
657 /* Register variable[5]: Result */
658 variable[5] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
659 /* Register variable[5]: Result */
660 variable[5] = UNBOX_NativeArray(variable[5])[UNTAG_Int( variable[3] /*i*/)];
661 variable[4] = variable[5];
662 /* Register variable[5]: Result */
663 variable[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[4] /*c*/ == NIT_NULL /*null*/) || (( variable[4] /*c*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[4] /*c*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[4] /*c*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[4] /*c*/)( variable[4] /*c*/, NIT_NULL /*null*/) /*Object::==*/)))))));
664 /* Ensure var variable[5]: Left 'and' operand*/
665 if (UNTAG_Bool(variable[5])) { /* and */
666 /* Register variable[5]: Result */
667 variable[5] = CALL_abstract_collection___Couple___second( variable[4] /*c*/)( variable[4] /*c*/) /*Couple::second*/;
668 /* Register variable[5]: Result */
669 variable[5] = TAG_Bool((variable[5] == variable[1] /*item*/) || ((variable[5] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[5])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[5], variable[1] /*item*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[5])(variable[5], variable[1] /*item*/) /*Object::==*/)))));
670 }
671 /* Register variable[5]: Result */
672 if (UNTAG_Bool(variable[5])) { /*if*/
673 variable[2] = TAG_Bool(true);
674 goto return_label18;
675 }
676 variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
677 continue_19: while(0);
678 }
679 break_19: while(0);
680 variable[2] = TAG_Bool(false);
681 goto return_label18;
682 return_label18: while(false);
683 tracehead = trace.prev;
684 return variable[2];
685 }
686 val_t hash___HashMap___has_only(val_t self, val_t param0) {
687 struct trace_t trace = {NULL, NULL, 265, LOCATE_hash___HashMap___has_only};
688 val_t variable[6];
689 struct WBT_ **closurevariable = NULL;
690 trace.prev = tracehead; tracehead = &trace;
691 trace.file = LOCATE_hash;
692 /* Register variable[0]: Local variable */
693 variable[0] = self;
694 /* Register variable[1]: Local variable */
695 variable[1] = param0;
696 /* Register variable[2]: Method return value and escape marker */
697 /* Register variable[3]: Local variable */
698 variable[3] = TAG_Int(0);
699 while (true) { /*while*/
700 /* Register variable[4]: Result */
701 variable[4] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
702 /* Register variable[4]: Result */
703 variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int(variable[4]));
704 if (!UNTAG_Bool(variable[4])) break; /* while*/
705 /* Register variable[4]: Local variable */
706 /* Register variable[5]: Result */
707 variable[5] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
708 /* Register variable[5]: Result */
709 variable[5] = UNBOX_NativeArray(variable[5])[UNTAG_Int( variable[3] /*i*/)];
710 variable[4] = variable[5];
711 /* Register variable[5]: Result */
712 variable[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[4] /*c*/ == NIT_NULL /*null*/) || (( variable[4] /*c*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[4] /*c*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[4] /*c*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[4] /*c*/)( variable[4] /*c*/, NIT_NULL /*null*/) /*Object::==*/)))))));
713 /* Ensure var variable[5]: Left 'and' operand*/
714 if (UNTAG_Bool(variable[5])) { /* and */
715 /* Register variable[5]: Result */
716 variable[5] = CALL_abstract_collection___Couple___second( variable[4] /*c*/)( variable[4] /*c*/) /*Couple::second*/;
717 /* Register variable[5]: Result */
718 variable[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[5] == variable[1] /*item*/) || ((variable[5] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[5])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[5], variable[1] /*item*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[5])(variable[5], variable[1] /*item*/) /*Object::==*/)))))));
719 }
720 /* Register variable[5]: Result */
721 if (UNTAG_Bool(variable[5])) { /*if*/
722 variable[2] = TAG_Bool(false);
723 goto return_label20;
724 }
725 variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
726 continue_21: while(0);
727 }
728 break_21: while(0);
729 variable[2] = TAG_Bool(true);
730 goto return_label20;
731 return_label20: while(false);
732 tracehead = trace.prev;
733 return variable[2];
734 }
735 val_t hash___HashMap___count(val_t self, val_t param0) {
736 struct trace_t trace = {NULL, NULL, 242, LOCATE_hash___HashMap___count};
737 val_t variable[7];
738 struct WBT_ **closurevariable = NULL;
739 trace.prev = tracehead; tracehead = &trace;
740 trace.file = LOCATE_hash;
741 /* Register variable[0]: Local variable */
742 variable[0] = self;
743 /* Register variable[1]: Local variable */
744 variable[1] = param0;
745 /* Register variable[2]: Method return value and escape marker */
746 /* Register variable[3]: Local variable */
747 variable[3] = TAG_Int(0);
748 /* Register variable[4]: Local variable */
749 variable[4] = TAG_Int(0);
750 while (true) { /*while*/
751 /* Register variable[5]: Result */
752 variable[5] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
753 /* Register variable[5]: Result */
754 variable[5] = TAG_Bool(UNTAG_Int( variable[4] /*i*/)<UNTAG_Int(variable[5]));
755 if (!UNTAG_Bool(variable[5])) break; /* while*/
756 /* Register variable[5]: Local variable */
757 /* Register variable[6]: Result */
758 variable[6] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
759 /* Register variable[6]: Result */
760 variable[6] = UNBOX_NativeArray(variable[6])[UNTAG_Int( variable[4] /*i*/)];
761 variable[5] = variable[6];
762 /* Register variable[6]: Result */
763 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*c*/ == NIT_NULL /*null*/) || (( variable[5] /*c*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*c*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*c*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*c*/)( variable[5] /*c*/, NIT_NULL /*null*/) /*Object::==*/)))))));
764 /* Ensure var variable[6]: Left 'and' operand*/
765 if (UNTAG_Bool(variable[6])) { /* and */
766 /* Register variable[6]: Result */
767 variable[6] = CALL_abstract_collection___Couple___second( variable[5] /*c*/)( variable[5] /*c*/) /*Couple::second*/;
768 /* Register variable[6]: Result */
769 variable[6] = TAG_Bool((variable[6] == variable[1] /*item*/) || ((variable[6] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[6])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[6], variable[1] /*item*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[6])(variable[6], variable[1] /*item*/) /*Object::==*/)))));
770 }
771 /* Register variable[6]: Result */
772 if (UNTAG_Bool(variable[6])) { /*if*/
773 variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*nb*/;
774 }
775 variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
776 continue_23: while(0);
777 }
778 break_23: while(0);
779 variable[2] = variable[3] /*nb*/;
780 goto return_label22;
781 return_label22: while(false);
782 tracehead = trace.prev;
783 return variable[2];
784 }
785 val_t hash___HashMap___first(val_t self) {
786 struct trace_t trace = {NULL, NULL, 234, LOCATE_hash___HashMap___first};
787 val_t variable[3];
788 struct WBT_ **closurevariable = NULL;
789 trace.prev = tracehead; tracehead = &trace;
790 trace.file = LOCATE_hash;
791 /* Register variable[0]: Local variable */
792 variable[0] = self;
793 /* Register variable[1]: Method return value and escape marker */
794 /* Register variable[2]: Result */
795 variable[2] = ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/;
796 /* Register variable[2]: Result */
797 variable[2] = TAG_Bool(UNTAG_Int(variable[2])>UNTAG_Int( TAG_Int(0)));
798 if (!UNTAG_Bool(variable[2])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashMap___first, LOCATE_hash, 236); nit_exit(1);}
799 /* Register variable[2]: Result */
800 variable[2] = ATTR_hash___HashCollection____first_item(variable[0]) /*HashCollection::_first_item*/;
801 /* Register variable[2]: Result */
802 variable[2] = CALL_abstract_collection___Couple___second(variable[2])(variable[2]) /*Couple::second*/;
803 variable[1] = variable[2];
804 goto return_label24;
805 return_label24: while(false);
806 tracehead = trace.prev;
807 return variable[1];
808 }
809 void hash___HashMap___clear(val_t self) {
810 struct trace_t trace = {NULL, NULL, 304, LOCATE_hash___HashMap___clear};
811 val_t variable[2];
812 struct WBT_ **closurevariable = NULL;
813 trace.prev = tracehead; tracehead = &trace;
814 trace.file = LOCATE_hash;
815 /* Register variable[0]: Local variable */
816 variable[0] = self;
817 /* Register variable[1]: Method return value and escape marker */
818 CALL_hash___HashCollection___raz(variable[0])(variable[0]) /*HashCollection::raz*/;
819 return_label25: while(false);
820 tracehead = trace.prev;
821 return;
822 }
823 void hash___HashMap___remove(val_t self, val_t param0) {
824 struct trace_t trace = {NULL, NULL, 289, LOCATE_hash___HashMap___remove};
825 val_t variable[6];
826 struct WBT_ **closurevariable = NULL;
827 trace.prev = tracehead; tracehead = &trace;
828 trace.file = LOCATE_hash;
829 /* Register variable[0]: Local variable */
830 variable[0] = self;
831 /* Register variable[1]: Local variable */
832 variable[1] = param0;
833 /* Register variable[2]: Method return value and escape marker */
834 /* Register variable[3]: Local variable */
835 variable[3] = TAG_Int(0);
836 while (true) { /*while*/
837 /* Register variable[4]: Result */
838 variable[4] = ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/;
839 /* Register variable[4]: Result */
840 variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int(variable[4]));
841 if (!UNTAG_Bool(variable[4])) break; /* while*/
842 /* Register variable[4]: Local variable */
843 /* Register variable[5]: Result */
844 variable[5] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
845 /* Register variable[5]: Result */
846 variable[5] = UNBOX_NativeArray(variable[5])[UNTAG_Int( variable[3] /*i*/)];
847 variable[4] = variable[5];
848 /* Register variable[5]: Result */
849 variable[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[4] /*c*/ == NIT_NULL /*null*/) || (( variable[4] /*c*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[4] /*c*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[4] /*c*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[4] /*c*/)( variable[4] /*c*/, NIT_NULL /*null*/) /*Object::==*/)))))));
850 /* Ensure var variable[5]: Left 'and' operand*/
851 if (UNTAG_Bool(variable[5])) { /* and */
852 /* Register variable[5]: Result */
853 variable[5] = CALL_abstract_collection___Couple___second( variable[4] /*c*/)( variable[4] /*c*/) /*Couple::second*/;
854 /* Register variable[5]: Result */
855 variable[5] = TAG_Bool((variable[5] == variable[1] /*item*/) || ((variable[5] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[5])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[5], variable[1] /*item*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[5])(variable[5], variable[1] /*item*/) /*Object::==*/)))));
856 }
857 /* Register variable[5]: Result */
858 if (UNTAG_Bool(variable[5])) { /*if*/
859 CALL_hash___HashCollection___remove_index(variable[0])(variable[0], variable[3] /*i*/) /*HashCollection::remove_index*/;
860 goto return_label26;
861 }
862 variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
863 continue_27: while(0);
864 }
865 break_27: while(0);
866 return_label26: while(false);
867 tracehead = trace.prev;
868 return;
869 }
870 void hash___HashMap_____braeq(val_t self, val_t param0, val_t param1) {
871 struct trace_t trace = {NULL, NULL, 276, LOCATE_hash___HashMap_____braeq};
872 val_t variable[7];
873 struct WBT_ **closurevariable = NULL;
874 trace.prev = tracehead; tracehead = &trace;
875 trace.file = LOCATE_hash;
876 /* Register variable[0]: Local variable */
877 variable[0] = self;
878 /* Register variable[1]: Local variable */
879 variable[1] = param0;
880 /* Register variable[2]: Local variable */
881 variable[2] = param1;
882 /* Register variable[3]: Method return value and escape marker */
883 /* Register variable[4]: Result */
884 variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[1] /*key*/ == NIT_NULL /*null*/) || (( variable[1] /*key*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[1] /*key*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[1] /*key*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[1] /*key*/)( variable[1] /*key*/, NIT_NULL /*null*/) /*Object::==*/)))))));
885 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashMap_____braeq, LOCATE_hash, 278); nit_exit(1);}
886 /* Register variable[4]: Local variable */
887 /* Register variable[5]: Result */
888 variable[5] = CALL_hash___HashCollection___index_at(variable[0])(variable[0], variable[1] /*key*/) /*HashCollection::index_at*/;
889 variable[4] = variable[5];
890 /* Register variable[5]: Local variable */
891 /* Register variable[6]: Result */
892 variable[6] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
893 /* Register variable[6]: Result */
894 variable[6] = UNBOX_NativeArray(variable[6])[UNTAG_Int( variable[4] /*i*/)];
895 variable[5] = variable[6];
896 /* Register variable[6]: Result */
897 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*c*/ == NIT_NULL /*null*/) || (( variable[5] /*c*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*c*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*c*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*c*/)( variable[5] /*c*/, NIT_NULL /*null*/) /*Object::==*/)))))));
898 if (UNTAG_Bool(variable[6])) { /*if*/
899 CALL_abstract_collection___Couple___first__eq( variable[5] /*c*/)( variable[5] /*c*/, variable[1] /*key*/) /*Couple::first=*/;
900 CALL_abstract_collection___Couple___second__eq( variable[5] /*c*/)( variable[5] /*c*/, variable[2] /*v*/) /*Couple::second=*/;
901 } else { /*if*/
902 /* Register variable[6]: Result */
903 variable[6] = NEW_HashMapNode_hash___HashMapNode___init( variable[1] /*key*/, variable[2] /*v*/) /*new HashMapNode[K, V]*/;
904 CALL_hash___HashCollection___store(variable[0])(variable[0], variable[4] /*i*/, variable[6]) /*HashCollection::store*/;
905 }
906 return_label28: while(false);
907 tracehead = trace.prev;
908 return;
909 }
910 void hash___HashMap___remove_at(val_t self, val_t param0) {
911 struct trace_t trace = {NULL, NULL, 302, LOCATE_hash___HashMap___remove_at};
912 val_t variable[4];
913 struct WBT_ **closurevariable = NULL;
914 trace.prev = tracehead; tracehead = &trace;
915 trace.file = LOCATE_hash;
916 /* Register variable[0]: Local variable */
917 variable[0] = self;
918 /* Register variable[1]: Local variable */
919 variable[1] = param0;
920 /* Register variable[2]: Method return value and escape marker */
921 /* Register variable[3]: Result */
922 variable[3] = CALL_hash___HashCollection___index_at(variable[0])(variable[0], variable[1] /*key*/) /*HashCollection::index_at*/;
923 CALL_hash___HashCollection___remove_index(variable[0])(variable[0], variable[3]) /*HashCollection::remove_index*/;
924 return_label29: while(false);
925 tracehead = trace.prev;
926 return;
927 }
928 val_t hash___HashMap___couple_at(val_t self, val_t param0) {
929 struct trace_t trace = {NULL, NULL, 306, LOCATE_hash___HashMap___couple_at};
930 val_t variable[5];
931 struct WBT_ **closurevariable = NULL;
932 trace.prev = tracehead; tracehead = &trace;
933 trace.file = LOCATE_hash;
934 /* Register variable[0]: Local variable */
935 variable[0] = self;
936 /* Register variable[1]: Local variable */
937 variable[1] = param0;
938 /* Register variable[2]: Method return value and escape marker */
939 /* Register variable[3]: Result */
940 variable[3] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
941 /* Register variable[4]: Result */
942 variable[4] = CALL_hash___HashCollection___index_at(variable[0])(variable[0], variable[1] /*key*/) /*HashCollection::index_at*/;
943 /* Register variable[3]: Result */
944 variable[3] = UNBOX_NativeArray(variable[3])[UNTAG_Int(variable[4])];
945 variable[2] = variable[3];
946 goto return_label30;
947 return_label30: while(false);
948 tracehead = trace.prev;
949 return variable[2];
950 }
951 void hash___HashMap___init(val_t self, int* init_table) {
952 struct trace_t trace = {NULL, NULL, 308, LOCATE_hash___HashMap___init};
953 val_t variable[2];
954 struct WBT_ **closurevariable = NULL;
955 trace.prev = tracehead; tracehead = &trace;
956 trace.file = LOCATE_hash;
957 /* Register variable[0]: Local variable */
958 variable[0] = self;
959 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_HashMap].i]) return;
960 /* Register variable[1]: Method return value and escape marker */
961 ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/ = TAG_Int(0);
962 ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/ = TAG_Int(0);
963 CALL_hash___HashCollection___enlarge(variable[0])(variable[0], TAG_Int(0)) /*HashCollection::enlarge*/;
964 return_label31: while(false);
965 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_HashMap].i] = 1;
966 tracehead = trace.prev;
967 return;
968 }
969 val_t hash___HashMapNode___key(val_t self) {
970 struct trace_t trace = {NULL, NULL, 319, LOCATE_hash___HashMapNode___key};
971 val_t variable[3];
972 struct WBT_ **closurevariable = NULL;
973 trace.prev = tracehead; tracehead = &trace;
974 trace.file = LOCATE_hash;
975 /* Register variable[0]: Local variable */
976 variable[0] = self;
977 /* Register variable[1]: Method return value and escape marker */
978 /* Register variable[2]: Result */
979 variable[2] = CALL_abstract_collection___Couple___first(variable[0])(variable[0]) /*Couple::first*/;
980 variable[1] = variable[2];
981 goto return_label32;
982 return_label32: while(false);
983 tracehead = trace.prev;
984 return variable[1];
985 }
986 void hash___HashMapNode___init(val_t self, val_t param0, val_t param1, int* init_table) {
987 struct trace_t trace = {NULL, NULL, 322, LOCATE_hash___HashMapNode___init};
988 val_t variable[4];
989 struct WBT_ **closurevariable = NULL;
990 trace.prev = tracehead; tracehead = &trace;
991 trace.file = LOCATE_hash;
992 /* Register variable[0]: Local variable */
993 variable[0] = self;
994 /* Register variable[1]: Local variable */
995 variable[1] = param0;
996 /* Register variable[2]: Local variable */
997 variable[2] = param1;
998 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_HashMapNode].i]) return;
999 /* Register variable[3]: Method return value and escape marker */
1000 CALL_abstract_collection___Couple___init(variable[0])(variable[0], variable[1], variable[2], init_table /*YYY*/) /*Couple::init*/;
1001 CALL_abstract_collection___Couple___first__eq(variable[0])(variable[0], variable[1] /*k*/) /*Couple::first=*/;
1002 CALL_abstract_collection___Couple___second__eq(variable[0])(variable[0], variable[2] /*v*/) /*Couple::second=*/;
1003 return_label33: while(false);
1004 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_HashMapNode].i] = 1;
1005 tracehead = trace.prev;
1006 return;
1007 }
1008 val_t hash___HashMapIterator___item(val_t self) {
1009 struct trace_t trace = {NULL, NULL, 333, LOCATE_hash___HashMapIterator___item};
1010 val_t variable[3];
1011 struct WBT_ **closurevariable = NULL;
1012 trace.prev = tracehead; tracehead = &trace;
1013 trace.file = LOCATE_hash;
1014 /* Register variable[0]: Local variable */
1015 variable[0] = self;
1016 /* Register variable[1]: Method return value and escape marker */
1017 /* Register variable[2]: Result */
1018 variable[2] = CALL_abstract_collection___Iterator___is_ok(variable[0])(variable[0]) /*HashMapIterator::is_ok*/;
1019 if (!UNTAG_Bool(variable[2])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashMapIterator___item, LOCATE_hash, 335); nit_exit(1);}
1020 /* Register variable[2]: Result */
1021 variable[2] = ATTR_hash___HashMapIterator____node(variable[0]) /*HashMapIterator::_node*/;
1022 /* Register variable[2]: Result */
1023 variable[2] = CALL_abstract_collection___Couple___second(variable[2])(variable[2]) /*Couple::second*/;
1024 variable[1] = variable[2];
1025 goto return_label34;
1026 return_label34: while(false);
1027 tracehead = trace.prev;
1028 return variable[1];
1029 }
1030 void hash___HashMapIterator___next(val_t self) {
1031 struct trace_t trace = {NULL, NULL, 351, LOCATE_hash___HashMapIterator___next};
1032 val_t variable[3];
1033 struct WBT_ **closurevariable = NULL;
1034 trace.prev = tracehead; tracehead = &trace;
1035 trace.file = LOCATE_hash;
1036 /* Register variable[0]: Local variable */
1037 variable[0] = self;
1038 /* Register variable[1]: Method return value and escape marker */
1039 /* Register variable[2]: Result */
1040 variable[2] = CALL_abstract_collection___Iterator___is_ok(variable[0])(variable[0]) /*HashMapIterator::is_ok*/;
1041 if (!UNTAG_Bool(variable[2])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashMapIterator___next, LOCATE_hash, 353); nit_exit(1);}
1042 /* Register variable[2]: Result */
1043 variable[2] = ATTR_hash___HashMapIterator____node(variable[0]) /*HashMapIterator::_node*/;
1044 /* Register variable[2]: Result */
1045 variable[2] = CALL_hash___HashNode___next_item(variable[2])(variable[2]) /*HashNode::next_item*/;
1046 ATTR_hash___HashMapIterator____node(variable[0]) /*HashMapIterator::_node*/ = variable[2];
1047 return_label35: while(false);
1048 tracehead = trace.prev;
1049 return;
1050 }
1051 val_t hash___HashMapIterator___is_ok(val_t self) {
1052 struct trace_t trace = {NULL, NULL, 331, LOCATE_hash___HashMapIterator___is_ok};
1053 val_t variable[3];
1054 struct WBT_ **closurevariable = NULL;
1055 trace.prev = tracehead; tracehead = &trace;
1056 trace.file = LOCATE_hash;
1057 /* Register variable[0]: Local variable */
1058 variable[0] = self;
1059 /* Register variable[1]: Method return value and escape marker */
1060 /* Register variable[2]: Result */
1061 variable[2] = ATTR_hash___HashMapIterator____node(variable[0]) /*HashMapIterator::_node*/;
1062 /* Register variable[2]: Result */
1063 variable[2] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[2])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[2], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[2])(variable[2], NIT_NULL /*null*/) /*Object::==*/)))))));
1064 variable[1] = variable[2];
1065 goto return_label36;
1066 return_label36: while(false);
1067 tracehead = trace.prev;
1068 return variable[1];
1069 }
1070 val_t hash___HashMapIterator___key(val_t self) {
1071 struct trace_t trace = {NULL, NULL, 345, LOCATE_hash___HashMapIterator___key};
1072 val_t variable[3];
1073 struct WBT_ **closurevariable = NULL;
1074 trace.prev = tracehead; tracehead = &trace;
1075 trace.file = LOCATE_hash;
1076 /* Register variable[0]: Local variable */
1077 variable[0] = self;
1078 /* Register variable[1]: Method return value and escape marker */
1079 /* Register variable[2]: Result */
1080 variable[2] = CALL_abstract_collection___Iterator___is_ok(variable[0])(variable[0]) /*HashMapIterator::is_ok*/;
1081 if (!UNTAG_Bool(variable[2])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashMapIterator___key, LOCATE_hash, 347); nit_exit(1);}
1082 /* Register variable[2]: Result */
1083 variable[2] = ATTR_hash___HashMapIterator____node(variable[0]) /*HashMapIterator::_node*/;
1084 /* Register variable[2]: Result */
1085 variable[2] = CALL_abstract_collection___Couple___first(variable[2])(variable[2]) /*Couple::first*/;
1086 variable[1] = variable[2];
1087 goto return_label37;
1088 return_label37: while(false);
1089 tracehead = trace.prev;
1090 return variable[1];
1091 }
1092 void hash___HashMapIterator___init(val_t self, val_t param0, int* init_table) {
1093 struct trace_t trace = {NULL, NULL, 363, LOCATE_hash___HashMapIterator___init};
1094 val_t variable[4];
1095 struct WBT_ **closurevariable = NULL;
1096 trace.prev = tracehead; tracehead = &trace;
1097 trace.file = LOCATE_hash;
1098 /* Register variable[0]: Local variable */
1099 variable[0] = self;
1100 /* Register variable[1]: Local variable */
1101 variable[1] = param0;
1102 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_HashMapIterator].i]) return;
1103 /* Register variable[2]: Method return value and escape marker */
1104 ATTR_hash___HashMapIterator____map(variable[0]) /*HashMapIterator::_map*/ = variable[1] /*map*/;
1105 /* Register variable[3]: Result */
1106 variable[3] = CALL_hash___HashCollection___first_item( variable[1] /*map*/)( variable[1] /*map*/) /*HashCollection::first_item*/;
1107 ATTR_hash___HashMapIterator____node(variable[0]) /*HashMapIterator::_node*/ = variable[3];
1108 return_label38: while(false);
1109 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_HashMapIterator].i] = 1;
1110 tracehead = trace.prev;
1111 return;
1112 }
1113 val_t hash___HashSet___iterator(val_t self) {
1114 struct trace_t trace = {NULL, NULL, 402, LOCATE_hash___HashSet___iterator};
1115 val_t variable[3];
1116 struct WBT_ **closurevariable = NULL;
1117 trace.prev = tracehead; tracehead = &trace;
1118 trace.file = LOCATE_hash;
1119 /* Register variable[0]: Local variable */
1120 variable[0] = self;
1121 /* Register variable[1]: Method return value and escape marker */
1122 /* Register variable[2]: Result */
1123 variable[2] = NEW_HashSetIterator_hash___HashSetIterator___init(variable[0]) /*new HashSetIterator[E]*/;
1124 variable[1] = variable[2];
1125 goto return_label39;
1126 return_label39: while(false);
1127 tracehead = trace.prev;
1128 return variable[1];
1129 }
1130 val_t hash___HashSet___is_empty(val_t self) {
1131 struct trace_t trace = {NULL, NULL, 374, LOCATE_hash___HashSet___is_empty};
1132 val_t variable[3];
1133 struct WBT_ **closurevariable = NULL;
1134 trace.prev = tracehead; tracehead = &trace;
1135 trace.file = LOCATE_hash;
1136 /* Register variable[0]: Local variable */
1137 variable[0] = self;
1138 /* Register variable[1]: Method return value and escape marker */
1139 /* Register variable[2]: Result */
1140 variable[2] = ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/;
1141 /* Register variable[2]: Result */
1142 variable[2] = TAG_Bool((variable[2])==( TAG_Int(0)));
1143 variable[1] = variable[2];
1144 goto return_label40;
1145 return_label40: while(false);
1146 tracehead = trace.prev;
1147 return variable[1];
1148 }
1149 val_t hash___HashSet___has(val_t self, val_t param0) {
1150 struct trace_t trace = {NULL, NULL, 382, LOCATE_hash___HashSet___has};
1151 val_t variable[5];
1152 struct WBT_ **closurevariable = NULL;
1153 trace.prev = tracehead; tracehead = &trace;
1154 trace.file = LOCATE_hash;
1155 /* Register variable[0]: Local variable */
1156 variable[0] = self;
1157 /* Register variable[1]: Local variable */
1158 variable[1] = param0;
1159 /* Register variable[2]: Method return value and escape marker */
1160 /* Register variable[3]: Result */
1161 variable[3] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
1162 /* Register variable[4]: Result */
1163 variable[4] = CALL_hash___HashCollection___index_at(variable[0])(variable[0], variable[1] /*item*/) /*HashCollection::index_at*/;
1164 /* Register variable[3]: Result */
1165 variable[3] = UNBOX_NativeArray(variable[3])[UNTAG_Int(variable[4])];
1166 /* Register variable[3]: Result */
1167 variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], NIT_NULL /*null*/) /*Object::==*/)))))));
1168 variable[2] = variable[3];
1169 goto return_label41;
1170 return_label41: while(false);
1171 tracehead = trace.prev;
1172 return variable[2];
1173 }
1174 val_t hash___HashSet___first(val_t self) {
1175 struct trace_t trace = {NULL, NULL, 376, LOCATE_hash___HashSet___first};
1176 val_t variable[3];
1177 struct WBT_ **closurevariable = NULL;
1178 trace.prev = tracehead; tracehead = &trace;
1179 trace.file = LOCATE_hash;
1180 /* Register variable[0]: Local variable */
1181 variable[0] = self;
1182 /* Register variable[1]: Method return value and escape marker */
1183 /* Register variable[2]: Result */
1184 variable[2] = ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/;
1185 /* Register variable[2]: Result */
1186 variable[2] = TAG_Bool(UNTAG_Int(variable[2])>UNTAG_Int( TAG_Int(0)));
1187 if (!UNTAG_Bool(variable[2])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashSet___first, LOCATE_hash, 378); nit_exit(1);}
1188 /* Register variable[2]: Result */
1189 variable[2] = ATTR_hash___HashCollection____first_item(variable[0]) /*HashCollection::_first_item*/;
1190 /* Register variable[2]: Result */
1191 variable[2] = CALL_hash___HashNode___key(variable[2])(variable[2]) /*HashSetNode::key*/;
1192 variable[1] = variable[2];
1193 goto return_label42;
1194 return_label42: while(false);
1195 tracehead = trace.prev;
1196 return variable[1];
1197 }
1198 void hash___HashSet___clear(val_t self) {
1199 struct trace_t trace = {NULL, NULL, 400, LOCATE_hash___HashSet___clear};
1200 val_t variable[2];
1201 struct WBT_ **closurevariable = NULL;
1202 trace.prev = tracehead; tracehead = &trace;
1203 trace.file = LOCATE_hash;
1204 /* Register variable[0]: Local variable */
1205 variable[0] = self;
1206 /* Register variable[1]: Method return value and escape marker */
1207 CALL_hash___HashCollection___raz(variable[0])(variable[0]) /*HashCollection::raz*/;
1208 return_label43: while(false);
1209 tracehead = trace.prev;
1210 return;
1211 }
1212 void hash___HashSet___remove(val_t self, val_t param0) {
1213 struct trace_t trace = {NULL, NULL, 398, LOCATE_hash___HashSet___remove};
1214 val_t variable[4];
1215 struct WBT_ **closurevariable = NULL;
1216 trace.prev = tracehead; tracehead = &trace;
1217 trace.file = LOCATE_hash;
1218 /* Register variable[0]: Local variable */
1219 variable[0] = self;
1220 /* Register variable[1]: Local variable */
1221 variable[1] = param0;
1222 /* Register variable[2]: Method return value and escape marker */
1223 /* Register variable[3]: Result */
1224 variable[3] = CALL_hash___HashCollection___index_at(variable[0])(variable[0], variable[1] /*item*/) /*HashCollection::index_at*/;
1225 CALL_hash___HashCollection___remove_index(variable[0])(variable[0], variable[3]) /*HashCollection::remove_index*/;
1226 return_label44: while(false);
1227 tracehead = trace.prev;
1228 return;
1229 }
1230 void hash___HashSet___add(val_t self, val_t param0) {
1231 struct trace_t trace = {NULL, NULL, 387, LOCATE_hash___HashSet___add};
1232 val_t variable[6];
1233 struct WBT_ **closurevariable = NULL;
1234 trace.prev = tracehead; tracehead = &trace;
1235 trace.file = LOCATE_hash;
1236 /* Register variable[0]: Local variable */
1237 variable[0] = self;
1238 /* Register variable[1]: Local variable */
1239 variable[1] = param0;
1240 /* Register variable[2]: Method return value and escape marker */
1241 /* Register variable[3]: Local variable */
1242 /* Register variable[4]: Result */
1243 variable[4] = CALL_hash___HashCollection___index_at(variable[0])(variable[0], variable[1] /*item*/) /*HashCollection::index_at*/;
1244 variable[3] = variable[4];
1245 /* Register variable[4]: Local variable */
1246 /* Register variable[5]: Result */
1247 variable[5] = ATTR_hash___HashCollection____array(variable[0]) /*HashCollection::_array*/;
1248 /* Register variable[5]: Result */
1249 variable[5] = UNBOX_NativeArray(variable[5])[UNTAG_Int( variable[3] /*i*/)];
1250 variable[4] = variable[5];
1251 /* Register variable[5]: Result */
1252 variable[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[4] /*c*/ == NIT_NULL /*null*/) || (( variable[4] /*c*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[4] /*c*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[4] /*c*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[4] /*c*/)( variable[4] /*c*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1253 if (UNTAG_Bool(variable[5])) { /*if*/
1254 CALL_hash___HashSetNode___key__eq( variable[4] /*c*/)( variable[4] /*c*/, variable[1] /*item*/) /*HashSetNode::key=*/;
1255 } else { /*if*/
1256 /* Register variable[5]: Result */
1257 variable[5] = NEW_HashSetNode_hash___HashSetNode___init( variable[1] /*item*/) /*new HashSetNode[E]*/;
1258 CALL_hash___HashCollection___store(variable[0])(variable[0], variable[3] /*i*/, variable[5]) /*HashCollection::store*/;
1259 }
1260 return_label45: while(false);
1261 tracehead = trace.prev;
1262 return;
1263 }
1264 void hash___HashSet___init(val_t self, int* init_table) {
1265 struct trace_t trace = {NULL, NULL, 404, LOCATE_hash___HashSet___init};
1266 val_t variable[2];
1267 struct WBT_ **closurevariable = NULL;
1268 trace.prev = tracehead; tracehead = &trace;
1269 trace.file = LOCATE_hash;
1270 /* Register variable[0]: Local variable */
1271 variable[0] = self;
1272 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_HashSet].i]) return;
1273 /* Register variable[1]: Method return value and escape marker */
1274 ATTR_hash___HashCollection____capacity(variable[0]) /*HashCollection::_capacity*/ = TAG_Int(0);
1275 ATTR_hash___HashCollection____length(variable[0]) /*HashCollection::_length*/ = TAG_Int(0);
1276 CALL_hash___HashCollection___enlarge(variable[0])(variable[0], TAG_Int(0)) /*HashCollection::enlarge*/;
1277 return_label46: while(false);
1278 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_HashSet].i] = 1;
1279 tracehead = trace.prev;
1280 return;
1281 }
1282 val_t hash___HashSetNode___key(val_t self) {
1283 struct trace_t trace = {NULL, NULL, 416, LOCATE_hash___HashSetNode___key};
1284 val_t *variable = NULL;
1285 struct WBT_ **closurevariable = NULL;
1286 trace.prev = tracehead; tracehead = &trace;
1287 trace.file = LOCATE_hash;
1288 tracehead = trace.prev;
1289 return ATTR_hash___HashSetNode____key( self) /*HashSetNode::_key*/;
1290 }
1291 void hash___HashSetNode___key__eq(val_t self, val_t param0) {
1292 struct trace_t trace = {NULL, NULL, 416, LOCATE_hash___HashSetNode___key__eq};
1293 val_t *variable = NULL;
1294 struct WBT_ **closurevariable = NULL;
1295 trace.prev = tracehead; tracehead = &trace;
1296 trace.file = LOCATE_hash;
1297 ATTR_hash___HashSetNode____key( self) /*HashSetNode::_key*/ = param0;
1298 tracehead = trace.prev;
1299 return;
1300 }
1301 void hash___HashSetNode___init(val_t self, val_t param0, int* init_table) {
1302 struct trace_t trace = {NULL, NULL, 418, LOCATE_hash___HashSetNode___init};
1303 val_t variable[3];
1304 struct WBT_ **closurevariable = NULL;
1305 trace.prev = tracehead; tracehead = &trace;
1306 trace.file = LOCATE_hash;
1307 /* Register variable[0]: Local variable */
1308 variable[0] = self;
1309 /* Register variable[1]: Local variable */
1310 variable[1] = param0;
1311 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_HashSetNode].i]) return;
1312 /* Register variable[2]: Method return value and escape marker */
1313 ATTR_hash___HashSetNode____key(variable[0]) /*HashSetNode::_key*/ = variable[1] /*e*/;
1314 return_label47: while(false);
1315 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_HashSetNode].i] = 1;
1316 tracehead = trace.prev;
1317 return;
1318 }
1319 val_t hash___HashSetIterator___item(val_t self) {
1320 struct trace_t trace = {NULL, NULL, 428, LOCATE_hash___HashSetIterator___item};
1321 val_t variable[3];
1322 struct WBT_ **closurevariable = NULL;
1323 trace.prev = tracehead; tracehead = &trace;
1324 trace.file = LOCATE_hash;
1325 /* Register variable[0]: Local variable */
1326 variable[0] = self;
1327 /* Register variable[1]: Method return value and escape marker */
1328 /* Register variable[2]: Result */
1329 variable[2] = CALL_abstract_collection___Iterator___is_ok(variable[0])(variable[0]) /*HashSetIterator::is_ok*/;
1330 if (!UNTAG_Bool(variable[2])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashSetIterator___item, LOCATE_hash, 430); nit_exit(1);}
1331 /* Register variable[2]: Result */
1332 variable[2] = ATTR_hash___HashSetIterator____node(variable[0]) /*HashSetIterator::_node*/;
1333 /* Register variable[2]: Result */
1334 variable[2] = CALL_hash___HashNode___key(variable[2])(variable[2]) /*HashSetNode::key*/;
1335 variable[1] = variable[2];
1336 goto return_label48;
1337 return_label48: while(false);
1338 tracehead = trace.prev;
1339 return variable[1];
1340 }
1341 void hash___HashSetIterator___next(val_t self) {
1342 struct trace_t trace = {NULL, NULL, 434, LOCATE_hash___HashSetIterator___next};
1343 val_t variable[3];
1344 struct WBT_ **closurevariable = NULL;
1345 trace.prev = tracehead; tracehead = &trace;
1346 trace.file = LOCATE_hash;
1347 /* Register variable[0]: Local variable */
1348 variable[0] = self;
1349 /* Register variable[1]: Method return value and escape marker */
1350 /* Register variable[2]: Result */
1351 variable[2] = CALL_abstract_collection___Iterator___is_ok(variable[0])(variable[0]) /*HashSetIterator::is_ok*/;
1352 if (!UNTAG_Bool(variable[2])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_hash___HashSetIterator___next, LOCATE_hash, 436); nit_exit(1);}
1353 /* Register variable[2]: Result */
1354 variable[2] = ATTR_hash___HashSetIterator____node(variable[0]) /*HashSetIterator::_node*/;
1355 /* Register variable[2]: Result */
1356 variable[2] = CALL_hash___HashNode___next_item(variable[2])(variable[2]) /*HashNode::next_item*/;
1357 ATTR_hash___HashSetIterator____node(variable[0]) /*HashSetIterator::_node*/ = variable[2];
1358 return_label49: while(false);
1359 tracehead = trace.prev;
1360 return;
1361 }
1362 val_t hash___HashSetIterator___is_ok(val_t self) {
1363 struct trace_t trace = {NULL, NULL, 426, LOCATE_hash___HashSetIterator___is_ok};
1364 val_t variable[3];
1365 struct WBT_ **closurevariable = NULL;
1366 trace.prev = tracehead; tracehead = &trace;
1367 trace.file = LOCATE_hash;
1368 /* Register variable[0]: Local variable */
1369 variable[0] = self;
1370 /* Register variable[1]: Method return value and escape marker */
1371 /* Register variable[2]: Result */
1372 variable[2] = ATTR_hash___HashSetIterator____node(variable[0]) /*HashSetIterator::_node*/;
1373 /* Register variable[2]: Result */
1374 variable[2] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[2])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[2], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[2])(variable[2], NIT_NULL /*null*/) /*Object::==*/)))))));
1375 variable[1] = variable[2];
1376 goto return_label50;
1377 return_label50: while(false);
1378 tracehead = trace.prev;
1379 return variable[1];
1380 }
1381 void hash___HashSetIterator___init(val_t self, val_t param0, int* init_table) {
1382 struct trace_t trace = {NULL, NULL, 446, LOCATE_hash___HashSetIterator___init};
1383 val_t variable[4];
1384 struct WBT_ **closurevariable = NULL;
1385 trace.prev = tracehead; tracehead = &trace;
1386 trace.file = LOCATE_hash;
1387 /* Register variable[0]: Local variable */
1388 variable[0] = self;
1389 /* Register variable[1]: Local variable */
1390 variable[1] = param0;
1391 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_HashSetIterator].i]) return;
1392 /* Register variable[2]: Method return value and escape marker */
1393 ATTR_hash___HashSetIterator____set(variable[0]) /*HashSetIterator::_set*/ = variable[1] /*set*/;
1394 /* Register variable[3]: Result */
1395 variable[3] = CALL_hash___HashCollection___first_item( variable[1] /*set*/)( variable[1] /*set*/) /*HashCollection::first_item*/;
1396 ATTR_hash___HashSetIterator____node(variable[0]) /*HashSetIterator::_node*/ = variable[3];
1397 return_label51: while(false);
1398 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_HashSetIterator].i] = 1;
1399 tracehead = trace.prev;
1400 return;
1401 }