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