1 /* This C file is generated by NIT to compile module array. */
2 #include "array._sep.h"
3 val_t
array___AbstractArrayRead_____eqeq(val_t self
, val_t param0
) {
4 struct trace_t trace
= {NULL
, NULL
, 128, LOCATE_array___AbstractArrayRead_____eqeq
};
6 struct WBT_
**closurevariable
= NULL
;
7 trace
.prev
= tracehead
; tracehead
= &trace
;
8 trace
.file
= LOCATE_array
;
9 /* Register variable[0]: Local variable */
11 /* Register variable[1]: Local variable */
13 /* Register variable[2]: Method return value and escape marker */
14 /* Register variable[3]: Result */
15 variable
[3] = TAG_Bool(( variable
[1] /*o*/==NIT_NULL
) || VAL_ISA( variable
[1] /*o*/, COLOR_AbstractArray
, ID_AbstractArray
)) /*cast AbstractArray[E]*/;
16 variable
[3] = TAG_Bool(!UNTAG_Bool(variable
[3])) /* Ensure var: Left 'or' operand*/;
17 if (!UNTAG_Bool(variable
[3])) { /* or */
18 /* Register variable[3]: Result */
19 variable
[3] = TAG_Bool(IS_EQUAL_NN( variable
[1] /*o*/, NIT_NULL
/*null*/));
21 /* Register variable[3]: Result */
22 if (UNTAG_Bool(variable
[3])) { /*if*/
23 variable
[2] = TAG_Bool(false);
26 /* Register variable[3]: Result */
27 variable
[3] = TAG_Bool(( variable
[1] /*o*/==NIT_NULL
) || VAL_ISA( variable
[1] /*o*/, COLOR_AbstractArray
, ID_AbstractArray
)) /*cast AbstractArray[E]*/;
28 if (!UNTAG_Bool(variable
[3])) { fprintf(stderr
, "Assert%s failed", ""); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___AbstractArrayRead_____eqeq
, LOCATE_array
, 132); nit_exit(1);}
29 /* Register variable[3]: Local variable */
30 /* Register variable[4]: Result */
31 variable
[4] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
32 variable
[3] = variable
[4];
33 /* Register variable[4]: Result */
34 variable
[4] = CALL_abstract_collection___Collection___length( variable
[1] /*o*/)( variable
[1] /*o*/) /*AbstractArrayRead::length*/;
35 /* Register variable[4]: Result */
36 variable
[4] = TAG_Bool((variable
[4])!=( variable
[3] /*l*/));
37 if (UNTAG_Bool(variable
[4])) { /*if*/
38 variable
[2] = TAG_Bool(false);
41 /* Register variable[4]: Local variable */
42 variable
[4] = TAG_Int(0);
43 while (true) { /*while*/
44 /* Register variable[5]: Result */
45 variable
[5] = TAG_Bool(UNTAG_Int( variable
[4] /*i*/)<UNTAG_Int( variable
[3] /*l*/));
46 if (!UNTAG_Bool(variable
[5])) break; /* while*/
47 /* Register variable[5]: Result */
48 variable
[5] = CALL_abstract_collection___MapRead_____bra(variable
[0])(variable
[0], variable
[4] /*i*/) /*MapRead::[]*/;
49 /* Register variable[6]: Result */
50 variable
[6] = CALL_abstract_collection___MapRead_____bra( variable
[1] /*o*/)( variable
[1] /*o*/, variable
[4] /*i*/) /*MapRead::[]*/;
51 /* Register variable[5]: Result */
52 variable
[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable
[5] == variable
[6]) || ((variable
[5] != NIT_NULL
) && ((CALL_kernel___Object_____eqeq(variable
[5])==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable
[5],variable
[6])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable
[5])(variable
[5], variable
[6]) /*Object::==*/)))))));
53 if (UNTAG_Bool(variable
[5])) { /*if*/
54 variable
[2] = TAG_Bool(false);
57 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
61 variable
[2] = TAG_Bool(true);
63 return_label0
: while(false);
64 tracehead
= trace
.prev
;
67 void array___AbstractArrayRead___output(val_t self
) {
68 struct trace_t trace
= {NULL
, NULL
, 115, LOCATE_array___AbstractArrayRead___output
};
70 struct WBT_
**closurevariable
= NULL
;
71 trace
.prev
= tracehead
; tracehead
= &trace
;
72 trace
.file
= LOCATE_array
;
73 /* Register variable[0]: Local variable */
75 /* Register variable[1]: Method return value and escape marker */
76 /* Register variable[2]: Local variable */
77 variable
[2] = TAG_Int(0);
78 /* Register variable[3]: Local variable */
79 /* Register variable[4]: Result */
80 variable
[4] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
81 variable
[3] = variable
[4];
82 while (true) { /*while*/
83 /* Register variable[4]: Result */
84 variable
[4] = TAG_Bool(UNTAG_Int( variable
[2] /*i*/)<UNTAG_Int( variable
[3] /*l*/));
85 if (!UNTAG_Bool(variable
[4])) break; /* while*/
86 /* Register variable[4]: Local variable */
87 /* Register variable[5]: Result */
88 variable
[5] = CALL_abstract_collection___MapRead_____bra(variable
[0])(variable
[0], variable
[2] /*i*/) /*MapRead::[]*/;
89 variable
[4] = variable
[5];
90 /* Register variable[5]: Result */
91 variable
[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable
[4] /*e*/ == NIT_NULL
/*null*/) || (( variable
[4] /*e*/ != NIT_NULL
) && ((CALL_kernel___Object_____eqeq( variable
[4] /*e*/)==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable
[4] /*e*/, NIT_NULL
/*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable
[4] /*e*/)( variable
[4] /*e*/, NIT_NULL
/*null*/) /*Object::==*/)))))));
92 if (UNTAG_Bool(variable
[5])) { /*if*/
93 CALL_kernel___Object___output( variable
[4] /*e*/)( variable
[4] /*e*/) /*Object::output*/;
95 variable
[2] = TAG_Int(UNTAG_Int(variable
[2])+UNTAG_Int( TAG_Int(1))) /*i*/;
99 return_label2
: while(false);
100 tracehead
= trace
.prev
;
103 val_t
array___AbstractArrayRead___iterator(val_t self
) {
104 struct trace_t trace
= {NULL
, NULL
, 126, LOCATE_array___AbstractArrayRead___iterator
};
106 struct WBT_
**closurevariable
= NULL
;
107 trace
.prev
= tracehead
; tracehead
= &trace
;
108 trace
.file
= LOCATE_array
;
109 /* Register variable[0]: Local variable */
111 /* Register variable[1]: Method return value and escape marker */
112 /* Register variable[2]: Result */
113 variable
[2] = NEW_ArrayIterator_array___ArrayIterator___init(variable
[0]) /*new ArrayIterator[E]*/;
114 variable
[1] = variable
[2];
116 return_label4
: while(false);
117 tracehead
= trace
.prev
;
120 val_t
array___AbstractArrayRead___is_empty(val_t self
) {
121 struct trace_t trace
= {NULL
, NULL
, 26, LOCATE_array___AbstractArrayRead___is_empty
};
123 struct WBT_
**closurevariable
= NULL
;
124 trace
.prev
= tracehead
; tracehead
= &trace
;
125 trace
.file
= LOCATE_array
;
126 /* Register variable[0]: Local variable */
128 /* Register variable[1]: Method return value and escape marker */
129 /* Register variable[2]: Result */
130 variable
[2] = ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/;
131 /* Register variable[2]: Result */
132 variable
[2] = TAG_Bool((variable
[2])==( TAG_Int(0)));
133 variable
[1] = variable
[2];
135 return_label5
: while(false);
136 tracehead
= trace
.prev
;
139 val_t
array___AbstractArrayRead___length(val_t self
) {
140 struct trace_t trace
= {NULL
, NULL
, 23, LOCATE_array___AbstractArrayRead___length
};
141 val_t
*variable
= NULL
;
142 struct WBT_
**closurevariable
= NULL
;
143 trace
.prev
= tracehead
; tracehead
= &trace
;
144 trace
.file
= LOCATE_array
;
145 tracehead
= trace
.prev
;
146 return ATTR_array___AbstractArrayRead____length( self
) /*AbstractArrayRead::_length*/;
148 val_t
array___AbstractArrayRead___has(val_t self
, val_t param0
) {
149 struct trace_t trace
= {NULL
, NULL
, 28, LOCATE_array___AbstractArrayRead___has
};
151 struct WBT_
**closurevariable
= NULL
;
152 trace
.prev
= tracehead
; tracehead
= &trace
;
153 trace
.file
= LOCATE_array
;
154 /* Register variable[0]: Local variable */
156 /* Register variable[1]: Local variable */
157 variable
[1] = param0
;
158 /* Register variable[2]: Method return value and escape marker */
159 /* Register variable[3]: Local variable */
160 variable
[3] = TAG_Int(0);
161 /* Register variable[4]: Local variable */
162 /* Register variable[5]: Result */
163 variable
[5] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
164 variable
[4] = variable
[5];
165 while (true) { /*while*/
166 /* Register variable[5]: Result */
167 variable
[5] = TAG_Bool(UNTAG_Int( variable
[3] /*i*/)<UNTAG_Int( variable
[4] /*l*/));
168 if (!UNTAG_Bool(variable
[5])) break; /* while*/
169 /* Register variable[5]: Result */
170 variable
[5] = CALL_abstract_collection___MapRead_____bra(variable
[0])(variable
[0], variable
[3] /*i*/) /*MapRead::[]*/;
171 /* Register variable[5]: Result */
172 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::==*/)))));
173 if (UNTAG_Bool(variable
[5])) { /*if*/
174 variable
[2] = TAG_Bool(true);
177 variable
[3] = TAG_Int(UNTAG_Int(variable
[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
178 continue_7
: while(0);
181 variable
[2] = TAG_Bool(false);
183 return_label6
: while(false);
184 tracehead
= trace
.prev
;
187 val_t
array___AbstractArrayRead___has_only(val_t self
, val_t param0
) {
188 struct trace_t trace
= {NULL
, NULL
, 39, LOCATE_array___AbstractArrayRead___has_only
};
190 struct WBT_
**closurevariable
= NULL
;
191 trace
.prev
= tracehead
; tracehead
= &trace
;
192 trace
.file
= LOCATE_array
;
193 /* Register variable[0]: Local variable */
195 /* Register variable[1]: Local variable */
196 variable
[1] = param0
;
197 /* Register variable[2]: Method return value and escape marker */
198 /* Register variable[3]: Local variable */
199 variable
[3] = TAG_Int(0);
200 /* Register variable[4]: Local variable */
201 /* Register variable[5]: Result */
202 variable
[5] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
203 variable
[4] = variable
[5];
204 while (true) { /*while*/
205 /* Register variable[5]: Result */
206 variable
[5] = TAG_Bool(UNTAG_Int( variable
[3] /*i*/)<UNTAG_Int( variable
[4] /*l*/));
207 if (!UNTAG_Bool(variable
[5])) break; /* while*/
208 /* Register variable[5]: Result */
209 variable
[5] = CALL_abstract_collection___MapRead_____bra(variable
[0])(variable
[0], variable
[3] /*i*/) /*MapRead::[]*/;
210 /* Register variable[5]: Result */
211 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::==*/)))))));
212 if (UNTAG_Bool(variable
[5])) { /*if*/
213 variable
[2] = TAG_Bool(false);
216 variable
[3] = TAG_Int(UNTAG_Int(variable
[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
217 continue_9
: while(0);
220 variable
[2] = TAG_Bool(true);
222 return_label8
: while(false);
223 tracehead
= trace
.prev
;
226 val_t
array___AbstractArrayRead___count(val_t self
, val_t param0
) {
227 struct trace_t trace
= {NULL
, NULL
, 52, LOCATE_array___AbstractArrayRead___count
};
229 struct WBT_
**closurevariable
= NULL
;
230 trace
.prev
= tracehead
; tracehead
= &trace
;
231 trace
.file
= LOCATE_array
;
232 /* Register variable[0]: Local variable */
234 /* Register variable[1]: Local variable */
235 variable
[1] = param0
;
236 /* Register variable[2]: Method return value and escape marker */
237 /* Register variable[3]: Local variable */
238 variable
[3] = TAG_Int(0);
239 /* Register variable[4]: Local variable */
240 variable
[4] = TAG_Int(0);
241 /* Register variable[5]: Local variable */
242 /* Register variable[6]: Result */
243 variable
[6] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
244 variable
[5] = variable
[6];
245 while (true) { /*while*/
246 /* Register variable[6]: Result */
247 variable
[6] = TAG_Bool(UNTAG_Int( variable
[4] /*i*/)<UNTAG_Int( variable
[5] /*l*/));
248 if (!UNTAG_Bool(variable
[6])) break; /* while*/
249 /* Register variable[6]: Result */
250 variable
[6] = CALL_abstract_collection___MapRead_____bra(variable
[0])(variable
[0], variable
[4] /*i*/) /*MapRead::[]*/;
251 /* Register variable[6]: Result */
252 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::==*/)))));
253 if (UNTAG_Bool(variable
[6])) { /*if*/
254 variable
[3] = TAG_Int(UNTAG_Int(variable
[3])+UNTAG_Int( TAG_Int(1))) /*res*/;
256 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
257 continue_11
: while(0);
260 variable
[2] = variable
[3] /*res*/;
262 return_label10
: while(false);
263 tracehead
= trace
.prev
;
266 val_t
array___AbstractArrayRead___has_key(val_t self
, val_t param0
) {
267 struct trace_t trace
= {NULL
, NULL
, 50, LOCATE_array___AbstractArrayRead___has_key
};
269 struct WBT_
**closurevariable
= NULL
;
270 trace
.prev
= tracehead
; tracehead
= &trace
;
271 trace
.file
= LOCATE_array
;
272 /* Register variable[0]: Local variable */
274 /* Register variable[1]: Local variable */
275 variable
[1] = param0
;
276 /* Register variable[2]: Method return value and escape marker */
277 /* Register variable[3]: Result */
278 variable
[3] = TAG_Bool(UNTAG_Int( variable
[1] /*index*/)>=UNTAG_Int( TAG_Int(0)));
279 /* Ensure var variable[3]: Left 'and' operand*/
280 if (UNTAG_Bool(variable
[3])) { /* and */
281 /* Register variable[3]: Result */
282 variable
[3] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
283 /* Register variable[3]: Result */
284 variable
[3] = TAG_Bool(UNTAG_Int( variable
[1] /*index*/)<UNTAG_Int(variable
[3]));
286 /* Register variable[3]: Result */
287 variable
[2] = variable
[3];
289 return_label12
: while(false);
290 tracehead
= trace
.prev
;
293 val_t
array___AbstractArrayRead___index_of(val_t self
, val_t param0
) {
294 struct trace_t trace
= {NULL
, NULL
, 64, LOCATE_array___AbstractArrayRead___index_of
};
296 struct WBT_
**closurevariable
= NULL
;
297 trace
.prev
= tracehead
; tracehead
= &trace
;
298 trace
.file
= LOCATE_array
;
299 /* Register variable[0]: Local variable */
301 /* Register variable[1]: Local variable */
302 variable
[1] = param0
;
303 /* Register variable[2]: Method return value and escape marker */
304 /* Register variable[3]: Result */
305 variable
[3] = CALL_array___AbstractArrayRead___index_of_from(variable
[0])(variable
[0], variable
[1] /*item*/, TAG_Int(0)) /*AbstractArrayRead::index_of_from*/;
306 variable
[2] = variable
[3];
308 return_label13
: while(false);
309 tracehead
= trace
.prev
;
312 val_t
array___AbstractArrayRead___last_index_of(val_t self
, val_t param0
) {
313 struct trace_t trace
= {NULL
, NULL
, 66, LOCATE_array___AbstractArrayRead___last_index_of
};
315 struct WBT_
**closurevariable
= NULL
;
316 trace
.prev
= tracehead
; tracehead
= &trace
;
317 trace
.file
= LOCATE_array
;
318 /* Register variable[0]: Local variable */
320 /* Register variable[1]: Local variable */
321 variable
[1] = param0
;
322 /* Register variable[2]: Method return value and escape marker */
323 /* Register variable[3]: Result */
324 variable
[3] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
325 /* Register variable[3]: Result */
326 variable
[3] = TAG_Int(UNTAG_Int(variable
[3])-UNTAG_Int( TAG_Int(1)));
327 /* Register variable[3]: Result */
328 variable
[3] = CALL_array___AbstractArrayRead___last_index_of_from(variable
[0])(variable
[0], variable
[1] /*item*/, variable
[3]) /*AbstractArrayRead::last_index_of_from*/;
329 variable
[2] = variable
[3];
331 return_label14
: while(false);
332 tracehead
= trace
.prev
;
335 val_t
array___AbstractArrayRead___index_of_from(val_t self
, val_t param0
, val_t param1
) {
336 struct trace_t trace
= {NULL
, NULL
, 68, LOCATE_array___AbstractArrayRead___index_of_from
};
338 struct WBT_
**closurevariable
= NULL
;
339 trace
.prev
= tracehead
; tracehead
= &trace
;
340 trace
.file
= LOCATE_array
;
341 /* Register variable[0]: Local variable */
343 /* Register variable[1]: Local variable */
344 variable
[1] = param0
;
345 /* Register variable[2]: Local variable */
346 variable
[2] = param1
;
347 /* Register variable[3]: Method return value and escape marker */
348 /* Register variable[4]: Local variable */
349 variable
[4] = variable
[2] /*pos*/;
350 /* Register variable[5]: Local variable */
351 /* Register variable[6]: Result */
352 variable
[6] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
353 variable
[5] = variable
[6];
354 while (true) { /*while*/
355 /* Register variable[6]: Result */
356 variable
[6] = TAG_Bool(UNTAG_Int( variable
[4] /*i*/)<UNTAG_Int( variable
[5] /*len*/));
357 if (!UNTAG_Bool(variable
[6])) break; /* while*/
358 /* Register variable[6]: Result */
359 variable
[6] = CALL_abstract_collection___MapRead_____bra(variable
[0])(variable
[0], variable
[4] /*i*/) /*MapRead::[]*/;
360 /* Register variable[6]: Result */
361 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::==*/)))));
362 if (UNTAG_Bool(variable
[6])) { /*if*/
363 variable
[3] = variable
[4] /*i*/;
366 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
367 continue_16
: while(0);
370 /* Register variable[6]: Result */
371 variable
[6] = TAG_Int(-UNTAG_Int( TAG_Int(1)));
372 variable
[3] = variable
[6];
374 return_label15
: while(false);
375 tracehead
= trace
.prev
;
378 val_t
array___AbstractArrayRead___last_index_of_from(val_t self
, val_t param0
, val_t param1
) {
379 struct trace_t trace
= {NULL
, NULL
, 81, LOCATE_array___AbstractArrayRead___last_index_of_from
};
381 struct WBT_
**closurevariable
= NULL
;
382 trace
.prev
= tracehead
; tracehead
= &trace
;
383 trace
.file
= LOCATE_array
;
384 /* Register variable[0]: Local variable */
386 /* Register variable[1]: Local variable */
387 variable
[1] = param0
;
388 /* Register variable[2]: Local variable */
389 variable
[2] = param1
;
390 /* Register variable[3]: Method return value and escape marker */
391 /* Register variable[4]: Local variable */
392 variable
[4] = variable
[2] /*pos*/;
393 while (true) { /*while*/
394 /* Register variable[5]: Result */
395 variable
[5] = TAG_Bool(UNTAG_Int( variable
[4] /*i*/)>=UNTAG_Int( TAG_Int(0)));
396 if (!UNTAG_Bool(variable
[5])) break; /* while*/
397 /* Register variable[5]: Result */
398 variable
[5] = CALL_abstract_collection___MapRead_____bra(variable
[0])(variable
[0], variable
[4] /*i*/) /*MapRead::[]*/;
399 /* Register variable[5]: Result */
400 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::==*/)))));
401 if (UNTAG_Bool(variable
[5])) { /*if*/
402 variable
[3] = variable
[4] /*i*/;
405 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])-UNTAG_Int( TAG_Int(1))) /*i*/;
407 continue_18
: while(0);
410 /* Register variable[5]: Result */
411 variable
[5] = TAG_Int(-UNTAG_Int( TAG_Int(1)));
412 variable
[3] = variable
[5];
414 return_label17
: while(false);
415 tracehead
= trace
.prev
;
418 val_t
array___AbstractArrayRead___reversed(val_t self
) {
419 struct trace_t trace
= {NULL
, NULL
, 94, LOCATE_array___AbstractArrayRead___reversed
};
421 struct WBT_
**closurevariable
= NULL
;
422 trace
.prev
= tracehead
; tracehead
= &trace
;
423 trace
.file
= LOCATE_array
;
424 /* Register variable[0]: Local variable */
426 /* Register variable[1]: Method return value and escape marker */
427 /* Register variable[2]: Local variable */
428 /* Register variable[3]: Result */
429 variable
[3] = ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/;
430 variable
[2] = variable
[3];
431 /* Register variable[3]: Local variable */
432 /* Register variable[4]: Result */
433 variable
[4] = NEW_Array_array___Array___with_capacity( variable
[2] /*cmp*/) /*new Array[E]*/;
434 variable
[3] = variable
[4];
435 while (true) { /*while*/
436 /* Register variable[4]: Result */
437 variable
[4] = TAG_Bool(UNTAG_Int( variable
[2] /*cmp*/)>UNTAG_Int( TAG_Int(0)));
438 if (!UNTAG_Bool(variable
[4])) break; /* while*/
439 variable
[2] = TAG_Int(UNTAG_Int(variable
[2])-UNTAG_Int( TAG_Int(1))) /*cmp*/;
440 /* Register variable[4]: Result */
441 variable
[4] = CALL_abstract_collection___MapRead_____bra(variable
[0])(variable
[0], variable
[2] /*cmp*/) /*MapRead::[]*/;
442 CALL_abstract_collection___SimpleCollection___add( variable
[3] /*result*/)( variable
[3] /*result*/, variable
[4]) /*AbstractArray::add*/;
443 continue_20
: while(0);
446 variable
[1] = variable
[3] /*result*/;
448 return_label19
: while(false);
449 tracehead
= trace
.prev
;
452 void array___AbstractArrayRead___copy_to(val_t self
, val_t param0
, val_t param1
, val_t param2
, val_t param3
) {
453 struct trace_t trace
= {NULL
, NULL
, 105, LOCATE_array___AbstractArrayRead___copy_to
};
455 struct WBT_
**closurevariable
= NULL
;
456 trace
.prev
= tracehead
; tracehead
= &trace
;
457 trace
.file
= LOCATE_array
;
458 /* Register variable[0]: Local variable */
460 /* Register variable[1]: Local variable */
461 variable
[1] = param0
;
462 /* Register variable[2]: Local variable */
463 variable
[2] = param1
;
464 /* Register variable[3]: Local variable */
465 variable
[3] = param2
;
466 /* Register variable[4]: Local variable */
467 variable
[4] = param3
;
468 /* Register variable[5]: Method return value and escape marker */
469 /* Register variable[6]: Local variable */
470 variable
[6] = variable
[2] /*len*/;
471 while (true) { /*while*/
472 /* Register variable[7]: Result */
473 variable
[7] = TAG_Bool(UNTAG_Int( variable
[6] /*i*/)>UNTAG_Int( TAG_Int(0)));
474 if (!UNTAG_Bool(variable
[7])) break; /* while*/
475 variable
[6] = TAG_Int(UNTAG_Int(variable
[6])-UNTAG_Int( TAG_Int(1))) /*i*/;
476 /* Register variable[7]: Result */
477 variable
[7] = TAG_Int(UNTAG_Int( variable
[4] /*new_start*/)+UNTAG_Int( variable
[6] /*i*/));
478 /* Register variable[8]: Result */
479 variable
[8] = TAG_Int(UNTAG_Int( variable
[1] /*start*/)+UNTAG_Int( variable
[6] /*i*/));
480 /* Register variable[8]: Result */
481 variable
[8] = CALL_abstract_collection___MapRead_____bra(variable
[0])(variable
[0], variable
[8]) /*MapRead::[]*/;
482 CALL_abstract_collection___Map_____braeq( variable
[3] /*dest*/)( variable
[3] /*dest*/, variable
[7], variable
[8]) /*Map::[]=*/;
483 continue_22
: while(0);
486 return_label21
: while(false);
487 tracehead
= trace
.prev
;
490 void array___AbstractArrayRead___init(val_t self
, int* init_table
) {
491 struct trace_t trace
= {NULL
, NULL
, 0, LOCATE_array___AbstractArrayRead___init
};
492 val_t
*variable
= NULL
;
493 struct WBT_
**closurevariable
= NULL
;
494 trace
.prev
= tracehead
; tracehead
= &trace
;
495 trace
.file
= LOCATE_array
;
496 tracehead
= trace
.prev
;
499 void array___AbstractArray___clear(val_t self
) {
500 struct trace_t trace
= {NULL
, NULL
, 193, LOCATE_array___AbstractArray___clear
};
502 struct WBT_
**closurevariable
= NULL
;
503 trace
.prev
= tracehead
; tracehead
= &trace
;
504 trace
.file
= LOCATE_array
;
505 /* Register variable[0]: Local variable */
507 /* Register variable[1]: Method return value and escape marker */
508 ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/ = TAG_Int(0);
509 return_label23
: while(false);
510 tracehead
= trace
.prev
;
513 void array___AbstractArray___remove(val_t self
, val_t param0
) {
514 struct trace_t trace
= {NULL
, NULL
, 195, LOCATE_array___AbstractArray___remove
};
516 struct WBT_
**closurevariable
= NULL
;
517 trace
.prev
= tracehead
; tracehead
= &trace
;
518 trace
.file
= LOCATE_array
;
519 /* Register variable[0]: Local variable */
521 /* Register variable[1]: Local variable */
522 variable
[1] = param0
;
523 /* Register variable[2]: Method return value and escape marker */
524 /* Register variable[3]: Result */
525 variable
[3] = CALL_abstract_collection___IndexedCollectionRead___index_of(variable
[0])(variable
[0], variable
[1] /*item*/) /*AbstractArrayRead::index_of*/;
526 CALL_abstract_collection___Map___remove_at(variable
[0])(variable
[0], variable
[3]) /*AbstractArray::remove_at*/;
527 return_label24
: while(false);
528 tracehead
= trace
.prev
;
531 void array___AbstractArray___remove_all(val_t self
, val_t param0
) {
532 struct trace_t trace
= {NULL
, NULL
, 197, LOCATE_array___AbstractArray___remove_all
};
534 struct WBT_
**closurevariable
= NULL
;
535 trace
.prev
= tracehead
; tracehead
= &trace
;
536 trace
.file
= LOCATE_array
;
537 /* Register variable[0]: Local variable */
539 /* Register variable[1]: Local variable */
540 variable
[1] = param0
;
541 /* Register variable[2]: Method return value and escape marker */
542 /* Register variable[3]: Local variable */
543 /* Register variable[4]: Result */
544 variable
[4] = CALL_abstract_collection___IndexedCollectionRead___index_of(variable
[0])(variable
[0], variable
[1] /*item*/) /*AbstractArrayRead::index_of*/;
545 variable
[3] = variable
[4];
546 while (true) { /*while*/
547 /* Register variable[4]: Result */
548 variable
[4] = TAG_Bool(UNTAG_Int( variable
[3] /*i*/)>=UNTAG_Int( TAG_Int(0)));
549 if (!UNTAG_Bool(variable
[4])) break; /* while*/
550 CALL_abstract_collection___Map___remove_at(variable
[0])(variable
[0], variable
[3] /*i*/) /*AbstractArray::remove_at*/;
551 /* Register variable[4]: Result */
552 variable
[4] = CALL_array___AbstractArrayRead___index_of_from(variable
[0])(variable
[0], variable
[1] /*item*/, variable
[3] /*i*/) /*AbstractArrayRead::index_of_from*/;
553 variable
[3] = variable
[4] /*i=*/;
554 continue_26
: while(0);
557 return_label25
: while(false);
558 tracehead
= trace
.prev
;
561 void array___AbstractArray___remove_at(val_t self
, val_t param0
) {
562 struct trace_t trace
= {NULL
, NULL
, 206, LOCATE_array___AbstractArray___remove_at
};
564 struct WBT_
**closurevariable
= NULL
;
565 trace
.prev
= tracehead
; tracehead
= &trace
;
566 trace
.file
= LOCATE_array
;
567 /* Register variable[0]: Local variable */
569 /* Register variable[1]: Local variable */
570 variable
[1] = param0
;
571 /* Register variable[2]: Method return value and escape marker */
572 /* Register variable[3]: Local variable */
573 /* Register variable[4]: Result */
574 variable
[4] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
575 variable
[3] = variable
[4];
576 /* Register variable[4]: Result */
577 variable
[4] = TAG_Bool(UNTAG_Int( variable
[1] /*i*/)>=UNTAG_Int( TAG_Int(0)));
578 /* Ensure var variable[4]: Left 'and' operand*/
579 if (UNTAG_Bool(variable
[4])) { /* and */
580 /* Register variable[4]: Result */
581 variable
[4] = TAG_Bool(UNTAG_Int( variable
[1] /*i*/)<UNTAG_Int( variable
[3] /*l*/));
583 /* Register variable[4]: Result */
584 if (UNTAG_Bool(variable
[4])) { /*if*/
585 /* Register variable[4]: Local variable */
586 /* Register variable[5]: Result */
587 variable
[5] = TAG_Int(UNTAG_Int( variable
[1] /*i*/)+UNTAG_Int( TAG_Int(1)));
588 variable
[4] = variable
[5];
589 while (true) { /*while*/
590 /* Register variable[5]: Result */
591 variable
[5] = TAG_Bool(UNTAG_Int( variable
[4] /*j*/)<UNTAG_Int( variable
[3] /*l*/));
592 if (!UNTAG_Bool(variable
[5])) break; /* while*/
593 /* Register variable[5]: Result */
594 variable
[5] = TAG_Int(UNTAG_Int( variable
[4] /*j*/)-UNTAG_Int( TAG_Int(1)));
595 /* Register variable[6]: Result */
596 variable
[6] = CALL_abstract_collection___MapRead_____bra(variable
[0])(variable
[0], variable
[4] /*j*/) /*MapRead::[]*/;
597 CALL_abstract_collection___Map_____braeq(variable
[0])(variable
[0], variable
[5], variable
[6]) /*Map::[]=*/;
598 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])+UNTAG_Int( TAG_Int(1))) /*j*/;
599 continue_28
: while(0);
602 /* Register variable[5]: Result */
603 variable
[5] = TAG_Int(UNTAG_Int( variable
[3] /*l*/)-UNTAG_Int( TAG_Int(1)));
604 ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/ = variable
[5];
606 return_label27
: while(false);
607 tracehead
= trace
.prev
;
610 void array___AbstractArray___add(val_t self
, val_t param0
) {
611 struct trace_t trace
= {NULL
, NULL
, 191, LOCATE_array___AbstractArray___add
};
613 struct WBT_
**closurevariable
= NULL
;
614 trace
.prev
= tracehead
; tracehead
= &trace
;
615 trace
.file
= LOCATE_array
;
616 /* Register variable[0]: Local variable */
618 /* Register variable[1]: Local variable */
619 variable
[1] = param0
;
620 /* Register variable[2]: Method return value and escape marker */
621 /* Register variable[3]: Result */
622 variable
[3] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
623 CALL_abstract_collection___Map_____braeq(variable
[0])(variable
[0], variable
[3], variable
[1] /*item*/) /*Map::[]=*/;
624 return_label29
: while(false);
625 tracehead
= trace
.prev
;
628 void array___AbstractArray___push(val_t self
, val_t param0
) {
629 struct trace_t trace
= {NULL
, NULL
, 150, LOCATE_array___AbstractArray___push
};
631 struct WBT_
**closurevariable
= NULL
;
632 trace
.prev
= tracehead
; tracehead
= &trace
;
633 trace
.file
= LOCATE_array
;
634 /* Register variable[0]: Local variable */
636 /* Register variable[1]: Local variable */
637 variable
[1] = param0
;
638 /* Register variable[2]: Method return value and escape marker */
639 CALL_abstract_collection___SimpleCollection___add(variable
[0])(variable
[0], variable
[1] /*item*/) /*AbstractArray::add*/;
640 return_label30
: while(false);
641 tracehead
= trace
.prev
;
644 val_t
array___AbstractArray___pop(val_t self
) {
645 struct trace_t trace
= {NULL
, NULL
, 152, LOCATE_array___AbstractArray___pop
};
647 struct WBT_
**closurevariable
= NULL
;
648 trace
.prev
= tracehead
; tracehead
= &trace
;
649 trace
.file
= LOCATE_array
;
650 /* Register variable[0]: Local variable */
652 /* Register variable[1]: Method return value and escape marker */
653 /* Register variable[2]: Result */
654 variable
[2] = CALL_abstract_collection___Collection___is_empty(variable
[0])(variable
[0]) /*AbstractArrayRead::is_empty*/;
655 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable
[2])))) { fprintf(stderr
, "Assert%s failed", " 'not_empty' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___AbstractArray___pop
, LOCATE_array
, 154); nit_exit(1);}
656 /* Register variable[2]: Local variable */
657 /* Register variable[3]: Result */
658 variable
[3] = CALL_abstract_collection___IndexedCollectionRead___last(variable
[0])(variable
[0]) /*IndexedCollectionRead::last*/;
659 variable
[2] = variable
[3];
660 ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/)-UNTAG_Int( TAG_Int(1)));
661 variable
[1] = variable
[2] /*r*/;
663 return_label31
: while(false);
664 tracehead
= trace
.prev
;
667 void array___AbstractArray___unshift(val_t self
, val_t param0
) {
668 struct trace_t trace
= {NULL
, NULL
, 174, LOCATE_array___AbstractArray___unshift
};
670 struct WBT_
**closurevariable
= NULL
;
671 trace
.prev
= tracehead
; tracehead
= &trace
;
672 trace
.file
= LOCATE_array
;
673 /* Register variable[0]: Local variable */
675 /* Register variable[1]: Local variable */
676 variable
[1] = param0
;
677 /* Register variable[2]: Method return value and escape marker */
678 /* Register variable[3]: Local variable */
679 /* Register variable[4]: Result */
680 variable
[4] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
681 /* Register variable[4]: Result */
682 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])-UNTAG_Int( TAG_Int(1)));
683 variable
[3] = variable
[4];
684 while (true) { /*while*/
685 /* Register variable[4]: Result */
686 variable
[4] = TAG_Bool(UNTAG_Int( variable
[3] /*i*/)>UNTAG_Int( TAG_Int(0)));
687 if (!UNTAG_Bool(variable
[4])) break; /* while*/
688 /* Register variable[4]: Result */
689 variable
[4] = TAG_Int(UNTAG_Int( variable
[3] /*i*/)+UNTAG_Int( TAG_Int(1)));
690 /* Register variable[5]: Result */
691 variable
[5] = CALL_abstract_collection___MapRead_____bra(variable
[0])(variable
[0], variable
[3] /*i*/) /*MapRead::[]*/;
692 CALL_abstract_collection___Map_____braeq(variable
[0])(variable
[0], variable
[4], variable
[5]) /*Map::[]=*/;
693 variable
[3] = TAG_Int(UNTAG_Int(variable
[3])-UNTAG_Int( TAG_Int(1))) /*i*/;
694 continue_33
: while(0);
697 CALL_abstract_collection___Map_____braeq(variable
[0])(variable
[0], TAG_Int(0), variable
[1] /*item*/) /*Map::[]=*/;
698 return_label32
: while(false);
699 tracehead
= trace
.prev
;
702 val_t
array___AbstractArray___shift(val_t self
) {
703 struct trace_t trace
= {NULL
, NULL
, 160, LOCATE_array___AbstractArray___shift
};
705 struct WBT_
**closurevariable
= NULL
;
706 trace
.prev
= tracehead
; tracehead
= &trace
;
707 trace
.file
= LOCATE_array
;
708 /* Register variable[0]: Local variable */
710 /* Register variable[1]: Method return value and escape marker */
711 /* Register variable[2]: Result */
712 variable
[2] = CALL_abstract_collection___Collection___is_empty(variable
[0])(variable
[0]) /*AbstractArrayRead::is_empty*/;
713 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable
[2])))) { fprintf(stderr
, "Assert%s failed", " 'not_empty' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___AbstractArray___shift
, LOCATE_array
, 162); nit_exit(1);}
714 /* Register variable[2]: Local variable */
715 /* Register variable[3]: Result */
716 variable
[3] = CALL_abstract_collection___Collection___first(variable
[0])(variable
[0]) /*IndexedCollectionRead::first*/;
717 variable
[2] = variable
[3];
718 /* Register variable[3]: Local variable */
719 variable
[3] = TAG_Int(1);
720 /* Register variable[4]: Local variable */
721 /* Register variable[5]: Result */
722 variable
[5] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
723 variable
[4] = variable
[5];
724 while (true) { /*while*/
725 /* Register variable[5]: Result */
726 variable
[5] = TAG_Bool(UNTAG_Int( variable
[3] /*i*/)<UNTAG_Int( variable
[4] /*l*/));
727 if (!UNTAG_Bool(variable
[5])) break; /* while*/
728 /* Register variable[5]: Result */
729 variable
[5] = TAG_Int(UNTAG_Int( variable
[3] /*i*/)-UNTAG_Int( TAG_Int(1)));
730 /* Register variable[6]: Result */
731 variable
[6] = CALL_abstract_collection___MapRead_____bra(variable
[0])(variable
[0], variable
[3] /*i*/) /*MapRead::[]*/;
732 CALL_abstract_collection___Map_____braeq(variable
[0])(variable
[0], variable
[5], variable
[6]) /*Map::[]=*/;
733 variable
[3] = TAG_Int(UNTAG_Int(variable
[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
734 continue_35
: while(0);
737 /* Register variable[5]: Result */
738 variable
[5] = TAG_Int(UNTAG_Int( variable
[4] /*l*/)-UNTAG_Int( TAG_Int(1)));
739 ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/ = variable
[5];
740 variable
[1] = variable
[2] /*r*/;
742 return_label34
: while(false);
743 tracehead
= trace
.prev
;
746 void array___AbstractArray___enlarge(val_t self
, val_t param0
) {
747 struct trace_t trace
= {NULL
, NULL
, 148, LOCATE_array___AbstractArray___enlarge
};
748 val_t
*variable
= NULL
;
749 struct WBT_
**closurevariable
= NULL
;
750 trace
.prev
= tracehead
; tracehead
= &trace
;
751 trace
.file
= LOCATE_array
;
752 fprintf(stderr
, "Deferred method called");
753 fprintf(stderr
, " (%s:%d)\n", LOCATE_array
, 148);
755 tracehead
= trace
.prev
;
758 void array___AbstractArray___insert(val_t self
, val_t param0
, val_t param1
) {
759 struct trace_t trace
= {NULL
, NULL
, 184, LOCATE_array___AbstractArray___insert
};
761 struct WBT_
**closurevariable
= NULL
;
762 trace
.prev
= tracehead
; tracehead
= &trace
;
763 trace
.file
= LOCATE_array
;
764 /* Register variable[0]: Local variable */
766 /* Register variable[1]: Local variable */
767 variable
[1] = param0
;
768 /* Register variable[2]: Local variable */
769 variable
[2] = param1
;
770 /* Register variable[3]: Method return value and escape marker */
771 /* Register variable[4]: Result */
772 variable
[4] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
773 /* Register variable[4]: Result */
774 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])+UNTAG_Int( TAG_Int(1)));
775 CALL_array___AbstractArray___enlarge(variable
[0])(variable
[0], variable
[4]) /*AbstractArray::enlarge*/;
776 /* Register variable[4]: Result */
777 variable
[4] = CALL_abstract_collection___Collection___length(variable
[0])(variable
[0]) /*AbstractArrayRead::length*/;
778 /* Register variable[4]: Result */
779 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])-UNTAG_Int( variable
[2] /*pos*/));
780 /* Register variable[5]: Result */
781 variable
[5] = TAG_Int(UNTAG_Int( variable
[2] /*pos*/)+UNTAG_Int( TAG_Int(1)));
782 CALL_array___AbstractArrayRead___copy_to(variable
[0])(variable
[0], variable
[2] /*pos*/, variable
[4], variable
[0], variable
[5]) /*AbstractArrayRead::copy_to*/;
783 CALL_abstract_collection___Map_____braeq(variable
[0])(variable
[0], variable
[2] /*pos*/, variable
[1] /*item*/) /*Map::[]=*/;
784 return_label36
: while(false);
785 tracehead
= trace
.prev
;
788 val_t
array___Array_____bra(val_t self
, val_t param0
) {
789 struct trace_t trace
= {NULL
, NULL
, 232, LOCATE_array___Array_____bra
};
791 struct WBT_
**closurevariable
= NULL
;
792 trace
.prev
= tracehead
; tracehead
= &trace
;
793 trace
.file
= LOCATE_array
;
794 /* Register variable[0]: Local variable */
796 /* Register variable[1]: Local variable */
797 variable
[1] = param0
;
798 /* Register variable[2]: Method return value and escape marker */
799 /* Register variable[3]: Result */
800 variable
[3] = TAG_Bool(UNTAG_Int( variable
[1] /*index*/)>=UNTAG_Int( TAG_Int(0)));
801 /* Ensure var variable[3]: Left 'and' operand*/
802 if (UNTAG_Bool(variable
[3])) { /* and */
803 /* Register variable[3]: Result */
804 variable
[3] = ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/;
805 /* Register variable[3]: Result */
806 variable
[3] = TAG_Bool(UNTAG_Int( variable
[1] /*index*/)<UNTAG_Int(variable
[3]));
808 /* Register variable[3]: Result */
809 if (!UNTAG_Bool(variable
[3])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_array
, 234); nit_exit(1);}
810 /* Register variable[3]: Result */
811 variable
[3] = ATTR_array___Array____items(variable
[0]) /*Array::_items*/;
812 /* Register variable[3]: Result */
813 variable
[3] = UNBOX_NativeArray(variable
[3])[UNTAG_Int( variable
[1] /*index*/)];
814 variable
[2] = variable
[3];
816 return_label37
: while(false);
817 tracehead
= trace
.prev
;
820 void array___Array_____braeq(val_t self
, val_t param0
, val_t param1
) {
821 struct trace_t trace
= {NULL
, NULL
, 238, LOCATE_array___Array_____braeq
};
823 struct WBT_
**closurevariable
= NULL
;
824 trace
.prev
= tracehead
; tracehead
= &trace
;
825 trace
.file
= LOCATE_array
;
826 /* Register variable[0]: Local variable */
828 /* Register variable[1]: Local variable */
829 variable
[1] = param0
;
830 /* Register variable[2]: Local variable */
831 variable
[2] = param1
;
832 /* Register variable[3]: Method return value and escape marker */
833 /* Register variable[4]: Result */
834 variable
[4] = TAG_Bool(UNTAG_Int( variable
[1] /*index*/)>=UNTAG_Int( TAG_Int(0)));
835 /* Ensure var variable[4]: Left 'and' operand*/
836 if (UNTAG_Bool(variable
[4])) { /* and */
837 /* Register variable[4]: Result */
838 variable
[4] = ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/;
839 /* Register variable[4]: Result */
840 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])+UNTAG_Int( TAG_Int(1)));
841 /* Register variable[4]: Result */
842 variable
[4] = TAG_Bool(UNTAG_Int( variable
[1] /*index*/)<UNTAG_Int(variable
[4]));
844 /* Register variable[4]: Result */
845 if (!UNTAG_Bool(variable
[4])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____braeq
, LOCATE_array
, 240); nit_exit(1);}
846 /* Register variable[4]: Result */
847 variable
[4] = ATTR_array___Array____capacity(variable
[0]) /*Array::_capacity*/;
848 /* Register variable[4]: Result */
849 variable
[4] = TAG_Bool(UNTAG_Int(variable
[4])<=UNTAG_Int( variable
[1] /*index*/));
850 if (UNTAG_Bool(variable
[4])) { /*if*/
851 /* Register variable[4]: Result */
852 variable
[4] = TAG_Int(UNTAG_Int( variable
[1] /*index*/)+UNTAG_Int( TAG_Int(1)));
853 CALL_array___AbstractArray___enlarge(variable
[0])(variable
[0], variable
[4]) /*Array::enlarge*/;
855 /* Register variable[4]: Result */
856 variable
[4] = ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/;
857 /* Register variable[4]: Result */
858 variable
[4] = TAG_Bool(UNTAG_Int(variable
[4])<=UNTAG_Int( variable
[1] /*index*/));
859 if (UNTAG_Bool(variable
[4])) { /*if*/
860 /* Register variable[4]: Result */
861 variable
[4] = TAG_Int(UNTAG_Int( variable
[1] /*index*/)+UNTAG_Int( TAG_Int(1)));
862 ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/ = variable
[4];
864 /* Register variable[4]: Result */
865 variable
[4] = ATTR_array___Array____items(variable
[0]) /*Array::_items*/;
866 UNBOX_NativeArray(variable
[4])[UNTAG_Int( variable
[1] /*index*/)]= variable
[2] /*item*/;
867 return_label38
: while(false);
868 tracehead
= trace
.prev
;
871 void array___Array___enlarge(val_t self
, val_t param0
) {
872 struct trace_t trace
= {NULL
, NULL
, 250, LOCATE_array___Array___enlarge
};
874 struct WBT_
**closurevariable
= NULL
;
875 trace
.prev
= tracehead
; tracehead
= &trace
;
876 trace
.file
= LOCATE_array
;
877 /* Register variable[0]: Local variable */
879 /* Register variable[1]: Local variable */
880 variable
[1] = param0
;
881 /* Register variable[2]: Method return value and escape marker */
882 /* Register variable[3]: Local variable */
883 /* Register variable[4]: Result */
884 variable
[4] = ATTR_array___Array____capacity(variable
[0]) /*Array::_capacity*/;
885 variable
[3] = variable
[4];
886 /* Register variable[4]: Result */
887 variable
[4] = TAG_Bool(UNTAG_Int( variable
[1] /*cap*/)<=UNTAG_Int( variable
[3] /*c*/));
888 if (UNTAG_Bool(variable
[4])) { /*if*/
891 while (true) { /*while*/
892 /* Register variable[4]: Result */
893 variable
[4] = TAG_Bool(UNTAG_Int( variable
[3] /*c*/)<=UNTAG_Int( variable
[1] /*cap*/));
894 if (!UNTAG_Bool(variable
[4])) break; /* while*/
895 /* Register variable[4]: Result */
896 variable
[4] = TAG_Int(UNTAG_Int( variable
[3] /*c*/)*UNTAG_Int( TAG_Int(2)));
897 /* Register variable[4]: Result */
898 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])+UNTAG_Int( TAG_Int(2)));
899 variable
[3] = variable
[4] /*c=*/;
900 continue_40
: while(0);
903 /* Register variable[4]: Local variable */
904 /* Register variable[5]: Result */
905 variable
[5] = BOX_NativeArray((val_t
*)malloc((UNTAG_Int( variable
[3] /*c*/) * sizeof(val_t
))));
906 variable
[4] = variable
[5];
907 /* Register variable[5]: Result */
908 variable
[5] = ATTR_array___Array____capacity(variable
[0]) /*Array::_capacity*/;
909 /* Register variable[5]: Result */
910 variable
[5] = TAG_Bool(UNTAG_Int(variable
[5])>UNTAG_Int( TAG_Int(0)));
911 if (UNTAG_Bool(variable
[5])) { /*if*/
912 /* Register variable[5]: Result */
913 variable
[5] = ATTR_array___Array____items(variable
[0]) /*Array::_items*/;
914 /* Register variable[6]: Result */
915 variable
[6] = ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/;
916 (void)memcpy(UNBOX_NativeArray( variable
[4] /*a*/), UNBOX_NativeArray(variable
[5]), UNTAG_Int(variable
[6])*sizeof(val_t
));
918 ATTR_array___Array____items(variable
[0]) /*Array::_items*/ = variable
[4] /*a*/;
919 ATTR_array___Array____capacity(variable
[0]) /*Array::_capacity*/ = variable
[3] /*c*/;
920 return_label39
: while(false);
921 tracehead
= trace
.prev
;
924 void array___Array___init(val_t self
, int* init_table
) {
925 struct trace_t trace
= {NULL
, NULL
, 261, LOCATE_array___Array___init
};
927 struct WBT_
**closurevariable
= NULL
;
928 trace
.prev
= tracehead
; tracehead
= &trace
;
929 trace
.file
= LOCATE_array
;
930 /* Register variable[0]: Local variable */
932 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Array
].i
]) return;
933 /* Register variable[1]: Method return value and escape marker */
934 ATTR_array___Array____capacity(variable
[0]) /*Array::_capacity*/ = TAG_Int(0);
935 ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/ = TAG_Int(0);
936 return_label41
: while(false);
937 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Array
].i
] = 1;
938 tracehead
= trace
.prev
;
941 void array___Array___with_items(val_t self
, val_t param0
, int* init_table
) {
942 struct trace_t trace
= {NULL
, NULL
, 268, LOCATE_array___Array___with_items
};
944 struct WBT_
**closurevariable
= NULL
;
945 trace
.prev
= tracehead
; tracehead
= &trace
;
946 trace
.file
= LOCATE_array
;
947 /* Register variable[0]: Local variable */
949 /* Register variable[1]: Local variable */
950 /* check if p<Array[E] with p:E */
951 if (( param0
==NIT_NULL
) || !VAL_ISA( param0
, COLOR_Array
, ID_Array
)) { fprintf(stderr
, "Cast failled"); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array___with_items
, LOCATE_array
, 269); nit_exit(1); } /*cast Array[E]*/;
952 variable
[1] = param0
;
953 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Array
].i
]) return;
954 /* Register variable[2]: Method return value and escape marker */
955 /* Register variable[3]: Result */
956 variable
[3] = ATTR_array___Array____items( variable
[1] /*objects*/) /*Array::_items*/;
957 ATTR_array___Array____items(variable
[0]) /*Array::_items*/ = variable
[3];
958 /* Register variable[3]: Result */
959 variable
[3] = ATTR_array___Array____capacity( variable
[1] /*objects*/) /*Array::_capacity*/;
960 ATTR_array___Array____capacity(variable
[0]) /*Array::_capacity*/ = variable
[3];
961 /* Register variable[3]: Result */
962 variable
[3] = CALL_abstract_collection___Collection___length( variable
[1] /*objects*/)( variable
[1] /*objects*/) /*AbstractArrayRead::length*/;
963 ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/ = variable
[3];
964 return_label42
: while(false);
965 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Array
].i
] = 1;
966 tracehead
= trace
.prev
;
969 void array___Array___with_capacity(val_t self
, val_t param0
, int* init_table
) {
970 struct trace_t trace
= {NULL
, NULL
, 276, LOCATE_array___Array___with_capacity
};
972 struct WBT_
**closurevariable
= NULL
;
973 trace
.prev
= tracehead
; tracehead
= &trace
;
974 trace
.file
= LOCATE_array
;
975 /* Register variable[0]: Local variable */
977 /* Register variable[1]: Local variable */
978 variable
[1] = param0
;
979 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Array
].i
]) return;
980 /* Register variable[2]: Method return value and escape marker */
981 /* Register variable[3]: Result */
982 variable
[3] = TAG_Bool(UNTAG_Int( variable
[1] /*cap*/)>=UNTAG_Int( TAG_Int(0)));
983 if (!UNTAG_Bool(variable
[3])) { fprintf(stderr
, "Assert%s failed", " 'positive' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array___with_capacity
, LOCATE_array
, 279); nit_exit(1);}
984 /* Register variable[3]: Result */
985 variable
[3] = BOX_NativeArray((val_t
*)malloc((UNTAG_Int( variable
[1] /*cap*/) * sizeof(val_t
))));
986 ATTR_array___Array____items(variable
[0]) /*Array::_items*/ = variable
[3];
987 ATTR_array___Array____capacity(variable
[0]) /*Array::_capacity*/ = variable
[1] /*cap*/;
988 ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/ = TAG_Int(0);
989 return_label43
: while(false);
990 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Array
].i
] = 1;
991 tracehead
= trace
.prev
;
994 void array___Array___filled_with(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
995 struct trace_t trace
= {NULL
, NULL
, 285, LOCATE_array___Array___filled_with
};
997 struct WBT_
**closurevariable
= NULL
;
998 trace
.prev
= tracehead
; tracehead
= &trace
;
999 trace
.file
= LOCATE_array
;
1000 /* Register variable[0]: Local variable */
1002 /* Register variable[1]: Local variable */
1003 variable
[1] = param0
;
1004 /* Register variable[2]: Local variable */
1005 variable
[2] = param1
;
1006 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Array
].i
]) return;
1007 /* Register variable[3]: Method return value and escape marker */
1008 /* Register variable[4]: Result */
1009 variable
[4] = TAG_Bool(UNTAG_Int( variable
[2] /*count*/)>=UNTAG_Int( TAG_Int(0)));
1010 if (!UNTAG_Bool(variable
[4])) { fprintf(stderr
, "Assert%s failed", " 'positive' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array___filled_with
, LOCATE_array
, 288); nit_exit(1);}
1011 /* Register variable[4]: Result */
1012 variable
[4] = BOX_NativeArray((val_t
*)malloc((UNTAG_Int( variable
[2] /*count*/) * sizeof(val_t
))));
1013 ATTR_array___Array____items(variable
[0]) /*Array::_items*/ = variable
[4];
1014 ATTR_array___Array____capacity(variable
[0]) /*Array::_capacity*/ = variable
[2] /*count*/;
1015 ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/ = variable
[2] /*count*/;
1016 /* Register variable[4]: Local variable */
1017 variable
[4] = TAG_Int(0);
1018 while (true) { /*while*/
1019 /* Register variable[5]: Result */
1020 variable
[5] = TAG_Bool(UNTAG_Int( variable
[4] /*i*/)<UNTAG_Int( variable
[2] /*count*/));
1021 if (!UNTAG_Bool(variable
[5])) break; /* while*/
1022 CALL_abstract_collection___Map_____braeq(variable
[0])(variable
[0], variable
[4] /*i*/, variable
[1] /*value*/) /*Array::[]=*/;
1023 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
1024 continue_45
: while(0);
1027 return_label44
: while(false);
1028 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Array
].i
] = 1;
1029 tracehead
= trace
.prev
;
1032 void array___Array___with_native(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
1033 struct trace_t trace
= {NULL
, NULL
, 299, LOCATE_array___Array___with_native
};
1035 struct WBT_
**closurevariable
= NULL
;
1036 trace
.prev
= tracehead
; tracehead
= &trace
;
1037 trace
.file
= LOCATE_array
;
1038 /* Register variable[0]: Local variable */
1040 /* Register variable[1]: Local variable */
1041 variable
[1] = param0
;
1042 /* Register variable[2]: Local variable */
1043 variable
[2] = param1
;
1044 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Array
].i
]) return;
1045 /* Register variable[3]: Method return value and escape marker */
1046 /* Register variable[4]: Result */
1047 variable
[4] = TAG_Bool(UNTAG_Int( variable
[2] /*size*/)>=UNTAG_Int( TAG_Int(0)));
1048 if (!UNTAG_Bool(variable
[4])) { fprintf(stderr
, "Assert%s failed", " 'positive' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array___with_native
, LOCATE_array
, 302); nit_exit(1);}
1049 ATTR_array___Array____items(variable
[0]) /*Array::_items*/ = variable
[1] /*nat*/;
1050 ATTR_array___Array____capacity(variable
[0]) /*Array::_capacity*/ = variable
[2] /*size*/;
1051 ATTR_array___AbstractArrayRead____length(variable
[0]) /*AbstractArrayRead::_length*/ = variable
[2] /*size*/;
1052 return_label46
: while(false);
1053 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Array
].i
] = 1;
1054 tracehead
= trace
.prev
;
1057 val_t
array___ArrayIterator___item(val_t self
) {
1058 struct trace_t trace
= {NULL
, NULL
, 318, LOCATE_array___ArrayIterator___item
};
1060 struct WBT_
**closurevariable
= NULL
;
1061 trace
.prev
= tracehead
; tracehead
= &trace
;
1062 trace
.file
= LOCATE_array
;
1063 /* Register variable[0]: Local variable */
1065 /* Register variable[1]: Method return value and escape marker */
1066 /* Register variable[2]: Result */
1067 variable
[2] = ATTR_array___ArrayIterator____array(variable
[0]) /*ArrayIterator::_array*/;
1068 /* Register variable[3]: Result */
1069 variable
[3] = ATTR_array___ArrayIterator____index(variable
[0]) /*ArrayIterator::_index*/;
1070 /* Register variable[2]: Result */
1071 variable
[2] = CALL_abstract_collection___MapRead_____bra(variable
[2])(variable
[2], variable
[3]) /*MapRead::[]*/;
1072 variable
[1] = variable
[2];
1073 goto return_label47
;
1074 return_label47
: while(false);
1075 tracehead
= trace
.prev
;
1078 void array___ArrayIterator___next(val_t self
) {
1079 struct trace_t trace
= {NULL
, NULL
, 324, LOCATE_array___ArrayIterator___next
};
1081 struct WBT_
**closurevariable
= NULL
;
1082 trace
.prev
= tracehead
; tracehead
= &trace
;
1083 trace
.file
= LOCATE_array
;
1084 /* Register variable[0]: Local variable */
1086 /* Register variable[1]: Method return value and escape marker */
1087 ATTR_array___ArrayIterator____index(variable
[0]) /*ArrayIterator::_index*/ = TAG_Int(UNTAG_Int(ATTR_array___ArrayIterator____index(variable
[0]) /*ArrayIterator::_index*/)+UNTAG_Int( TAG_Int(1)));
1088 return_label48
: while(false);
1089 tracehead
= trace
.prev
;
1092 val_t
array___ArrayIterator___is_ok(val_t self
) {
1093 struct trace_t trace
= {NULL
, NULL
, 322, LOCATE_array___ArrayIterator___is_ok
};
1095 struct WBT_
**closurevariable
= NULL
;
1096 trace
.prev
= tracehead
; tracehead
= &trace
;
1097 trace
.file
= LOCATE_array
;
1098 /* Register variable[0]: Local variable */
1100 /* Register variable[1]: Method return value and escape marker */
1101 /* Register variable[2]: Result */
1102 variable
[2] = ATTR_array___ArrayIterator____index(variable
[0]) /*ArrayIterator::_index*/;
1103 /* Register variable[3]: Result */
1104 variable
[3] = ATTR_array___ArrayIterator____array(variable
[0]) /*ArrayIterator::_array*/;
1105 /* Register variable[3]: Result */
1106 variable
[3] = CALL_abstract_collection___Collection___length(variable
[3])(variable
[3]) /*AbstractArrayRead::length*/;
1107 /* Register variable[2]: Result */
1108 variable
[2] = TAG_Bool(UNTAG_Int(variable
[2])<UNTAG_Int(variable
[3]));
1109 variable
[1] = variable
[2];
1110 goto return_label49
;
1111 return_label49
: while(false);
1112 tracehead
= trace
.prev
;
1115 val_t
array___ArrayIterator___index(val_t self
) {
1116 struct trace_t trace
= {NULL
, NULL
, 333, LOCATE_array___ArrayIterator___index
};
1117 val_t
*variable
= NULL
;
1118 struct WBT_
**closurevariable
= NULL
;
1119 trace
.prev
= tracehead
; tracehead
= &trace
;
1120 trace
.file
= LOCATE_array
;
1121 tracehead
= trace
.prev
;
1122 return ATTR_array___ArrayIterator____index( self
) /*ArrayIterator::_index*/;
1124 void array___ArrayIterator___init(val_t self
, val_t param0
, int* init_table
) {
1125 struct trace_t trace
= {NULL
, NULL
, 326, LOCATE_array___ArrayIterator___init
};
1127 struct WBT_
**closurevariable
= NULL
;
1128 trace
.prev
= tracehead
; tracehead
= &trace
;
1129 trace
.file
= LOCATE_array
;
1130 /* Register variable[0]: Local variable */
1132 /* Register variable[1]: Local variable */
1133 variable
[1] = param0
;
1134 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_ArrayIterator
].i
]) return;
1135 /* Register variable[2]: Method return value and escape marker */
1136 /* Register variable[3]: Result */
1137 variable
[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable
[1] /*a*/ == NIT_NULL
/*null*/) || (( variable
[1] /*a*/ != NIT_NULL
) && ((CALL_kernel___Object_____eqeq( variable
[1] /*a*/)==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable
[1] /*a*/, NIT_NULL
/*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable
[1] /*a*/)( variable
[1] /*a*/, NIT_NULL
/*null*/) /*Object::==*/)))))));
1138 if (!UNTAG_Bool(variable
[3])) { fprintf(stderr
, "Assert%s failed", " 'not_nil' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___ArrayIterator___init
, LOCATE_array
, 328); nit_exit(1);}
1139 ATTR_array___ArrayIterator____array(variable
[0]) /*ArrayIterator::_array*/ = variable
[1] /*a*/;
1140 ATTR_array___ArrayIterator____index(variable
[0]) /*ArrayIterator::_index*/ = TAG_Int(0);
1141 return_label50
: while(false);
1142 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_ArrayIterator
].i
] = 1;
1143 tracehead
= trace
.prev
;
1146 val_t
array___ArraySet___iterator(val_t self
) {
1147 struct trace_t trace
= {NULL
, NULL
, 369, LOCATE_array___ArraySet___iterator
};
1149 struct WBT_
**closurevariable
= NULL
;
1150 trace
.prev
= tracehead
; tracehead
= &trace
;
1151 trace
.file
= LOCATE_array
;
1152 /* Register variable[0]: Local variable */
1154 /* Register variable[1]: Method return value and escape marker */
1155 /* Register variable[2]: Result */
1156 variable
[2] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1157 /* Register variable[2]: Result */
1158 variable
[2] = CALL_abstract_collection___Collection___iterator(variable
[2])(variable
[2]) /*AbstractArrayRead::iterator*/;
1159 /* Register variable[2]: Result */
1160 variable
[2] = NEW_ArraySetIterator_array___ArraySetIterator___init(variable
[2]) /*new ArraySetIterator[E]*/;
1161 variable
[1] = variable
[2];
1162 goto return_label51
;
1163 return_label51
: while(false);
1164 tracehead
= trace
.prev
;
1167 val_t
array___ArraySet___is_empty(val_t self
) {
1168 struct trace_t trace
= {NULL
, NULL
, 349, LOCATE_array___ArraySet___is_empty
};
1170 struct WBT_
**closurevariable
= NULL
;
1171 trace
.prev
= tracehead
; tracehead
= &trace
;
1172 trace
.file
= LOCATE_array
;
1173 /* Register variable[0]: Local variable */
1175 /* Register variable[1]: Method return value and escape marker */
1176 /* Register variable[2]: Result */
1177 variable
[2] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1178 /* Register variable[2]: Result */
1179 variable
[2] = CALL_abstract_collection___Collection___is_empty(variable
[2])(variable
[2]) /*AbstractArrayRead::is_empty*/;
1180 variable
[1] = variable
[2];
1181 goto return_label52
;
1182 return_label52
: while(false);
1183 tracehead
= trace
.prev
;
1186 val_t
array___ArraySet___length(val_t self
) {
1187 struct trace_t trace
= {NULL
, NULL
, 351, LOCATE_array___ArraySet___length
};
1189 struct WBT_
**closurevariable
= NULL
;
1190 trace
.prev
= tracehead
; tracehead
= &trace
;
1191 trace
.file
= LOCATE_array
;
1192 /* Register variable[0]: Local variable */
1194 /* Register variable[1]: Method return value and escape marker */
1195 /* Register variable[2]: Result */
1196 variable
[2] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1197 /* Register variable[2]: Result */
1198 variable
[2] = CALL_abstract_collection___Collection___length(variable
[2])(variable
[2]) /*AbstractArrayRead::length*/;
1199 variable
[1] = variable
[2];
1200 goto return_label53
;
1201 return_label53
: while(false);
1202 tracehead
= trace
.prev
;
1205 val_t
array___ArraySet___has(val_t self
, val_t param0
) {
1206 struct trace_t trace
= {NULL
, NULL
, 345, LOCATE_array___ArraySet___has
};
1208 struct WBT_
**closurevariable
= NULL
;
1209 trace
.prev
= tracehead
; tracehead
= &trace
;
1210 trace
.file
= LOCATE_array
;
1211 /* Register variable[0]: Local variable */
1213 /* Register variable[1]: Local variable */
1214 variable
[1] = param0
;
1215 /* Register variable[2]: Method return value and escape marker */
1216 /* Register variable[3]: Result */
1217 variable
[3] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1218 /* Register variable[3]: Result */
1219 variable
[3] = CALL_abstract_collection___Collection___has(variable
[3])(variable
[3], variable
[1] /*e*/) /*AbstractArrayRead::has*/;
1220 variable
[2] = variable
[3];
1221 goto return_label54
;
1222 return_label54
: while(false);
1223 tracehead
= trace
.prev
;
1226 val_t
array___ArraySet___first(val_t self
) {
1227 struct trace_t trace
= {NULL
, NULL
, 353, LOCATE_array___ArraySet___first
};
1229 struct WBT_
**closurevariable
= NULL
;
1230 trace
.prev
= tracehead
; tracehead
= &trace
;
1231 trace
.file
= LOCATE_array
;
1232 /* Register variable[0]: Local variable */
1234 /* Register variable[1]: Method return value and escape marker */
1235 /* Register variable[2]: Result */
1236 variable
[2] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1237 /* Register variable[2]: Result */
1238 variable
[2] = CALL_abstract_collection___Collection___length(variable
[2])(variable
[2]) /*AbstractArrayRead::length*/;
1239 /* Register variable[2]: Result */
1240 variable
[2] = TAG_Bool(UNTAG_Int(variable
[2])>UNTAG_Int( TAG_Int(0)));
1241 if (!UNTAG_Bool(variable
[2])) { fprintf(stderr
, "Assert%s failed", ""); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___ArraySet___first
, LOCATE_array
, 355); nit_exit(1);}
1242 /* Register variable[2]: Result */
1243 variable
[2] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1244 /* Register variable[2]: Result */
1245 variable
[2] = CALL_abstract_collection___Collection___first(variable
[2])(variable
[2]) /*IndexedCollectionRead::first*/;
1246 variable
[1] = variable
[2];
1247 goto return_label55
;
1248 return_label55
: while(false);
1249 tracehead
= trace
.prev
;
1252 void array___ArraySet___clear(val_t self
) {
1253 struct trace_t trace
= {NULL
, NULL
, 367, LOCATE_array___ArraySet___clear
};
1255 struct WBT_
**closurevariable
= NULL
;
1256 trace
.prev
= tracehead
; tracehead
= &trace
;
1257 trace
.file
= LOCATE_array
;
1258 /* Register variable[0]: Local variable */
1260 /* Register variable[1]: Method return value and escape marker */
1261 /* Register variable[2]: Result */
1262 variable
[2] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1263 CALL_abstract_collection___RemovableCollection___clear(variable
[2])(variable
[2]) /*AbstractArray::clear*/;
1264 return_label56
: while(false);
1265 tracehead
= trace
.prev
;
1268 void array___ArraySet___remove(val_t self
, val_t param0
) {
1269 struct trace_t trace
= {NULL
, NULL
, 359, LOCATE_array___ArraySet___remove
};
1271 struct WBT_
**closurevariable
= NULL
;
1272 trace
.prev
= tracehead
; tracehead
= &trace
;
1273 trace
.file
= LOCATE_array
;
1274 /* Register variable[0]: Local variable */
1276 /* Register variable[1]: Local variable */
1277 variable
[1] = param0
;
1278 /* Register variable[2]: Method return value and escape marker */
1279 /* Register variable[3]: Local variable */
1280 /* Register variable[4]: Result */
1281 variable
[4] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1282 /* Register variable[4]: Result */
1283 variable
[4] = CALL_abstract_collection___IndexedCollectionRead___index_of(variable
[4])(variable
[4], variable
[1] /*item*/) /*AbstractArrayRead::index_of*/;
1284 variable
[3] = variable
[4];
1285 /* Register variable[4]: Result */
1286 variable
[4] = TAG_Bool(UNTAG_Int( variable
[3] /*i*/)>=UNTAG_Int( TAG_Int(0)));
1287 if (UNTAG_Bool(variable
[4])) { /*if*/
1288 CALL_array___ArraySet___remove_at(variable
[0])(variable
[0], variable
[3] /*i*/) /*ArraySet::remove_at*/;
1290 return_label57
: while(false);
1291 tracehead
= trace
.prev
;
1294 void array___ArraySet___remove_all(val_t self
, val_t param0
) {
1295 struct trace_t trace
= {NULL
, NULL
, 365, LOCATE_array___ArraySet___remove_all
};
1297 struct WBT_
**closurevariable
= NULL
;
1298 trace
.prev
= tracehead
; tracehead
= &trace
;
1299 trace
.file
= LOCATE_array
;
1300 /* Register variable[0]: Local variable */
1302 /* Register variable[1]: Local variable */
1303 variable
[1] = param0
;
1304 /* Register variable[2]: Method return value and escape marker */
1305 CALL_abstract_collection___RemovableCollection___remove(variable
[0])(variable
[0], variable
[1] /*item*/) /*ArraySet::remove*/;
1306 return_label58
: while(false);
1307 tracehead
= trace
.prev
;
1310 void array___ArraySet___add(val_t self
, val_t param0
) {
1311 struct trace_t trace
= {NULL
, NULL
, 347, LOCATE_array___ArraySet___add
};
1313 struct WBT_
**closurevariable
= NULL
;
1314 trace
.prev
= tracehead
; tracehead
= &trace
;
1315 trace
.file
= LOCATE_array
;
1316 /* Register variable[0]: Local variable */
1318 /* Register variable[1]: Local variable */
1319 variable
[1] = param0
;
1320 /* Register variable[2]: Method return value and escape marker */
1321 /* Register variable[3]: Result */
1322 variable
[3] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1323 /* Register variable[3]: Result */
1324 variable
[3] = CALL_abstract_collection___Collection___has(variable
[3])(variable
[3], variable
[1] /*e*/) /*AbstractArrayRead::has*/;
1325 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable
[3])))) { /*if*/
1326 /* Register variable[3]: Result */
1327 variable
[3] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1328 CALL_abstract_collection___SimpleCollection___add(variable
[3])(variable
[3], variable
[1] /*e*/) /*AbstractArray::add*/;
1330 return_label59
: while(false);
1331 tracehead
= trace
.prev
;
1334 void array___ArraySet___enlarge(val_t self
, val_t param0
) {
1335 struct trace_t trace
= {NULL
, NULL
, 371, LOCATE_array___ArraySet___enlarge
};
1337 struct WBT_
**closurevariable
= NULL
;
1338 trace
.prev
= tracehead
; tracehead
= &trace
;
1339 trace
.file
= LOCATE_array
;
1340 /* Register variable[0]: Local variable */
1342 /* Register variable[1]: Local variable */
1343 variable
[1] = param0
;
1344 /* Register variable[2]: Method return value and escape marker */
1345 /* Register variable[3]: Result */
1346 variable
[3] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1347 CALL_array___AbstractArray___enlarge(variable
[3])(variable
[3], variable
[1] /*cap*/) /*Array::enlarge*/;
1348 return_label60
: while(false);
1349 tracehead
= trace
.prev
;
1352 void array___ArraySet___remove_at(val_t self
, val_t param0
) {
1353 struct trace_t trace
= {NULL
, NULL
, 374, LOCATE_array___ArraySet___remove_at
};
1355 struct WBT_
**closurevariable
= NULL
;
1356 trace
.prev
= tracehead
; tracehead
= &trace
;
1357 trace
.file
= LOCATE_array
;
1358 /* Register variable[0]: Local variable */
1360 /* Register variable[1]: Local variable */
1361 variable
[1] = param0
;
1362 /* Register variable[2]: Method return value and escape marker */
1363 /* Register variable[3]: Result */
1364 variable
[3] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1365 /* Register variable[4]: Result */
1366 variable
[4] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1367 /* Register variable[4]: Result */
1368 variable
[4] = CALL_abstract_collection___IndexedCollectionRead___last(variable
[4])(variable
[4]) /*IndexedCollectionRead::last*/;
1369 CALL_abstract_collection___Map_____braeq(variable
[3])(variable
[3], variable
[1] /*i*/, variable
[4]) /*Array::[]=*/;
1370 /* Register variable[3]: Result */
1371 variable
[3] = ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/;
1372 CALL_abstract_collection___IndexedCollection___pop(variable
[3])(variable
[3]) /*AbstractArray::pop*/;
1373 return_label61
: while(false);
1374 tracehead
= trace
.prev
;
1377 void array___ArraySet___init(val_t self
, int* init_table
) {
1378 struct trace_t trace
= {NULL
, NULL
, 380, LOCATE_array___ArraySet___init
};
1380 struct WBT_
**closurevariable
= NULL
;
1381 trace
.prev
= tracehead
; tracehead
= &trace
;
1382 trace
.file
= LOCATE_array
;
1383 /* Register variable[0]: Local variable */
1385 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_ArraySet
].i
]) return;
1386 /* Register variable[1]: Method return value and escape marker */
1387 /* Register variable[2]: Result */
1388 variable
[2] = NEW_Array_array___Array___init() /*new Array[E]*/;
1389 ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/ = variable
[2];
1390 return_label62
: while(false);
1391 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_ArraySet
].i
] = 1;
1392 tracehead
= trace
.prev
;
1395 void array___ArraySet___with_capacity(val_t self
, val_t param0
, int* init_table
) {
1396 struct trace_t trace
= {NULL
, NULL
, 383, LOCATE_array___ArraySet___with_capacity
};
1398 struct WBT_
**closurevariable
= NULL
;
1399 trace
.prev
= tracehead
; tracehead
= &trace
;
1400 trace
.file
= LOCATE_array
;
1401 /* Register variable[0]: Local variable */
1403 /* Register variable[1]: Local variable */
1404 variable
[1] = param0
;
1405 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_ArraySet
].i
]) return;
1406 /* Register variable[2]: Method return value and escape marker */
1407 /* Register variable[3]: Result */
1408 variable
[3] = NEW_Array_array___Array___with_capacity( variable
[1] /*i*/) /*new Array[E]*/;
1409 ATTR_array___ArraySet____array(variable
[0]) /*ArraySet::_array*/ = variable
[3];
1410 return_label63
: while(false);
1411 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_ArraySet
].i
] = 1;
1412 tracehead
= trace
.prev
;
1415 val_t
array___ArraySetIterator___item(val_t self
) {
1416 struct trace_t trace
= {NULL
, NULL
, 395, LOCATE_array___ArraySetIterator___item
};
1418 struct WBT_
**closurevariable
= NULL
;
1419 trace
.prev
= tracehead
; tracehead
= &trace
;
1420 trace
.file
= LOCATE_array
;
1421 /* Register variable[0]: Local variable */
1423 /* Register variable[1]: Method return value and escape marker */
1424 /* Register variable[2]: Result */
1425 variable
[2] = ATTR_array___ArraySetIterator____iter(variable
[0]) /*ArraySetIterator::_iter*/;
1426 /* Register variable[2]: Result */
1427 variable
[2] = CALL_abstract_collection___Iterator___item(variable
[2])(variable
[2]) /*ArrayIterator::item*/;
1428 variable
[1] = variable
[2];
1429 goto return_label64
;
1430 return_label64
: while(false);
1431 tracehead
= trace
.prev
;
1434 void array___ArraySetIterator___next(val_t self
) {
1435 struct trace_t trace
= {NULL
, NULL
, 393, LOCATE_array___ArraySetIterator___next
};
1437 struct WBT_
**closurevariable
= NULL
;
1438 trace
.prev
= tracehead
; tracehead
= &trace
;
1439 trace
.file
= LOCATE_array
;
1440 /* Register variable[0]: Local variable */
1442 /* Register variable[1]: Method return value and escape marker */
1443 /* Register variable[2]: Result */
1444 variable
[2] = ATTR_array___ArraySetIterator____iter(variable
[0]) /*ArraySetIterator::_iter*/;
1445 CALL_abstract_collection___Iterator___next(variable
[2])(variable
[2]) /*ArrayIterator::next*/;
1446 return_label65
: while(false);
1447 tracehead
= trace
.prev
;
1450 val_t
array___ArraySetIterator___is_ok(val_t self
) {
1451 struct trace_t trace
= {NULL
, NULL
, 391, LOCATE_array___ArraySetIterator___is_ok
};
1453 struct WBT_
**closurevariable
= NULL
;
1454 trace
.prev
= tracehead
; tracehead
= &trace
;
1455 trace
.file
= LOCATE_array
;
1456 /* Register variable[0]: Local variable */
1458 /* Register variable[1]: Method return value and escape marker */
1459 /* Register variable[2]: Result */
1460 variable
[2] = ATTR_array___ArraySetIterator____iter(variable
[0]) /*ArraySetIterator::_iter*/;
1461 /* Register variable[2]: Result */
1462 variable
[2] = CALL_abstract_collection___Iterator___is_ok(variable
[2])(variable
[2]) /*ArrayIterator::is_ok*/;
1463 variable
[1] = variable
[2];
1464 goto return_label66
;
1465 return_label66
: while(false);
1466 tracehead
= trace
.prev
;
1469 void array___ArraySetIterator___init(val_t self
, val_t param0
, int* init_table
) {
1470 struct trace_t trace
= {NULL
, NULL
, 397, LOCATE_array___ArraySetIterator___init
};
1472 struct WBT_
**closurevariable
= NULL
;
1473 trace
.prev
= tracehead
; tracehead
= &trace
;
1474 trace
.file
= LOCATE_array
;
1475 /* Register variable[0]: Local variable */
1477 /* Register variable[1]: Local variable */
1478 variable
[1] = param0
;
1479 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_ArraySetIterator
].i
]) return;
1480 /* Register variable[2]: Method return value and escape marker */
1481 ATTR_array___ArraySetIterator____iter(variable
[0]) /*ArraySetIterator::_iter*/ = variable
[1] /*iter*/;
1482 return_label67
: while(false);
1483 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_ArraySetIterator
].i
] = 1;
1484 tracehead
= trace
.prev
;
1487 val_t
array___ArrayMap___iterator(val_t self
) {
1488 struct trace_t trace
= {NULL
, NULL
, 459, LOCATE_array___ArrayMap___iterator
};
1490 struct WBT_
**closurevariable
= NULL
;
1491 trace
.prev
= tracehead
; tracehead
= &trace
;
1492 trace
.file
= LOCATE_array
;
1493 /* Register variable[0]: Local variable */
1495 /* Register variable[1]: Method return value and escape marker */
1496 /* Register variable[2]: Result */
1497 variable
[2] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1498 /* Register variable[2]: Result */
1499 variable
[2] = CALL_abstract_collection___Collection___iterator(variable
[2])(variable
[2]) /*AbstractArrayRead::iterator*/;
1500 /* Register variable[2]: Result */
1501 variable
[2] = NEW_CoupleMapIterator_abstract_collection___CoupleMapIterator___init(variable
[2]) /*new CoupleMapIterator[K, E]*/;
1502 variable
[1] = variable
[2];
1503 goto return_label68
;
1504 return_label68
: while(false);
1505 tracehead
= trace
.prev
;
1508 val_t
array___ArrayMap___is_empty(val_t self
) {
1509 struct trace_t trace
= {NULL
, NULL
, 461, LOCATE_array___ArrayMap___is_empty
};
1511 struct WBT_
**closurevariable
= NULL
;
1512 trace
.prev
= tracehead
; tracehead
= &trace
;
1513 trace
.file
= LOCATE_array
;
1514 /* Register variable[0]: Local variable */
1516 /* Register variable[1]: Method return value and escape marker */
1517 /* Register variable[2]: Result */
1518 variable
[2] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1519 /* Register variable[2]: Result */
1520 variable
[2] = CALL_abstract_collection___Collection___is_empty(variable
[2])(variable
[2]) /*AbstractArrayRead::is_empty*/;
1521 variable
[1] = variable
[2];
1522 goto return_label69
;
1523 return_label69
: while(false);
1524 tracehead
= trace
.prev
;
1527 val_t
array___ArrayMap___length(val_t self
) {
1528 struct trace_t trace
= {NULL
, NULL
, 446, LOCATE_array___ArrayMap___length
};
1530 struct WBT_
**closurevariable
= NULL
;
1531 trace
.prev
= tracehead
; tracehead
= &trace
;
1532 trace
.file
= LOCATE_array
;
1533 /* Register variable[0]: Local variable */
1535 /* Register variable[1]: Method return value and escape marker */
1536 /* Register variable[2]: Result */
1537 variable
[2] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1538 /* Register variable[2]: Result */
1539 variable
[2] = CALL_abstract_collection___Collection___length(variable
[2])(variable
[2]) /*AbstractArrayRead::length*/;
1540 variable
[1] = variable
[2];
1541 goto return_label70
;
1542 return_label70
: while(false);
1543 tracehead
= trace
.prev
;
1546 val_t
array___ArrayMap___has(val_t self
, val_t param0
) {
1547 struct trace_t trace
= {NULL
, NULL
, 432, LOCATE_array___ArrayMap___has
};
1549 struct WBT_
**closurevariable
= NULL
;
1550 trace
.prev
= tracehead
; tracehead
= &trace
;
1551 trace
.file
= LOCATE_array
;
1552 /* Register variable[0]: Local variable */
1554 /* Register variable[1]: Local variable */
1555 variable
[1] = param0
;
1556 /* Register variable[2]: Method return value and escape marker */
1557 /* Register variable[3]: Result */
1558 variable
[3] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1559 /* Register variable[3]: For iterator */
1560 variable
[3] = CALL_abstract_collection___Collection___iterator(variable
[3])(variable
[3]) /*AbstractArrayRead::iterator*/;
1561 while (true) { /*for*/
1562 /* Register variable[4]: For 'is_ok' result */
1563 variable
[4] = CALL_abstract_collection___Iterator___is_ok(variable
[3])(variable
[3]) /*ArrayIterator::is_ok*/;
1564 if (!UNTAG_Bool(variable
[4])) break; /*for*/
1565 variable
[4] = CALL_abstract_collection___Iterator___item(variable
[3])(variable
[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
1566 /* Register variable[5]: Local variable */
1567 variable
[5] = variable
[4];
1568 /* Register variable[6]: Result */
1569 variable
[6] = CALL_abstract_collection___Couple___second( variable
[5] /*i*/)( variable
[5] /*i*/) /*Couple::second*/;
1570 /* Register variable[6]: Result */
1571 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::==*/)))));
1572 if (UNTAG_Bool(variable
[6])) { /*if*/
1573 variable
[2] = TAG_Bool(true);
1574 goto return_label71
;
1576 continue_72
: while(0);
1577 CALL_abstract_collection___Iterator___next(variable
[3])(variable
[3]) /*ArrayIterator::next*/;
1580 variable
[2] = TAG_Bool(false);
1581 goto return_label71
;
1582 return_label71
: while(false);
1583 tracehead
= trace
.prev
;
1586 val_t
array___ArrayMap___has_only(val_t self
, val_t param0
) {
1587 struct trace_t trace
= {NULL
, NULL
, 439, LOCATE_array___ArrayMap___has_only
};
1589 struct WBT_
**closurevariable
= NULL
;
1590 trace
.prev
= tracehead
; tracehead
= &trace
;
1591 trace
.file
= LOCATE_array
;
1592 /* Register variable[0]: Local variable */
1594 /* Register variable[1]: Local variable */
1595 variable
[1] = param0
;
1596 /* Register variable[2]: Method return value and escape marker */
1597 /* Register variable[3]: Result */
1598 variable
[3] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1599 /* Register variable[3]: For iterator */
1600 variable
[3] = CALL_abstract_collection___Collection___iterator(variable
[3])(variable
[3]) /*AbstractArrayRead::iterator*/;
1601 while (true) { /*for*/
1602 /* Register variable[4]: For 'is_ok' result */
1603 variable
[4] = CALL_abstract_collection___Iterator___is_ok(variable
[3])(variable
[3]) /*ArrayIterator::is_ok*/;
1604 if (!UNTAG_Bool(variable
[4])) break; /*for*/
1605 variable
[4] = CALL_abstract_collection___Iterator___item(variable
[3])(variable
[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
1606 /* Register variable[5]: Local variable */
1607 variable
[5] = variable
[4];
1608 /* Register variable[6]: Result */
1609 variable
[6] = CALL_abstract_collection___Couple___second( variable
[5] /*i*/)( variable
[5] /*i*/) /*Couple::second*/;
1610 /* Register variable[6]: Result */
1611 variable
[6] = TAG_Bool(!UNTAG_Bool(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::==*/)))))));
1612 if (UNTAG_Bool(variable
[6])) { /*if*/
1613 variable
[2] = TAG_Bool(false);
1614 goto return_label73
;
1616 continue_74
: while(0);
1617 CALL_abstract_collection___Iterator___next(variable
[3])(variable
[3]) /*ArrayIterator::next*/;
1620 variable
[2] = TAG_Bool(true);
1621 goto return_label73
;
1622 return_label73
: while(false);
1623 tracehead
= trace
.prev
;
1626 val_t
array___ArrayMap___count(val_t self
, val_t param0
) {
1627 struct trace_t trace
= {NULL
, NULL
, 451, LOCATE_array___ArrayMap___count
};
1629 struct WBT_
**closurevariable
= NULL
;
1630 trace
.prev
= tracehead
; tracehead
= &trace
;
1631 trace
.file
= LOCATE_array
;
1632 /* Register variable[0]: Local variable */
1634 /* Register variable[1]: Local variable */
1635 variable
[1] = param0
;
1636 /* Register variable[2]: Method return value and escape marker */
1637 /* Register variable[3]: Local variable */
1638 variable
[3] = TAG_Int(0);
1639 /* Register variable[4]: Result */
1640 variable
[4] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1641 /* Register variable[4]: For iterator */
1642 variable
[4] = CALL_abstract_collection___Collection___iterator(variable
[4])(variable
[4]) /*AbstractArrayRead::iterator*/;
1643 while (true) { /*for*/
1644 /* Register variable[5]: For 'is_ok' result */
1645 variable
[5] = CALL_abstract_collection___Iterator___is_ok(variable
[4])(variable
[4]) /*ArrayIterator::is_ok*/;
1646 if (!UNTAG_Bool(variable
[5])) break; /*for*/
1647 variable
[5] = CALL_abstract_collection___Iterator___item(variable
[4])(variable
[4]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
1648 /* Register variable[6]: Local variable */
1649 variable
[6] = variable
[5];
1650 /* Register variable[7]: Result */
1651 variable
[7] = CALL_abstract_collection___Couple___second( variable
[6] /*i*/)( variable
[6] /*i*/) /*Couple::second*/;
1652 /* Register variable[7]: Result */
1653 variable
[7] = TAG_Bool((variable
[7] == variable
[1] /*item*/) || ((variable
[7] != NIT_NULL
) && ((CALL_kernel___Object_____eqeq(variable
[7])==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable
[7], variable
[1] /*item*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable
[7])(variable
[7], variable
[1] /*item*/) /*Object::==*/)))));
1654 if (UNTAG_Bool(variable
[7])) { /*if*/
1655 variable
[3] = TAG_Int(UNTAG_Int(variable
[3])+UNTAG_Int( TAG_Int(1))) /*nb*/;
1657 continue_76
: while(0);
1658 CALL_abstract_collection___Iterator___next(variable
[4])(variable
[4]) /*ArrayIterator::next*/;
1661 variable
[2] = variable
[3] /*nb*/;
1662 goto return_label75
;
1663 return_label75
: while(false);
1664 tracehead
= trace
.prev
;
1667 val_t
array___ArrayMap___first(val_t self
) {
1668 struct trace_t trace
= {NULL
, NULL
, 449, LOCATE_array___ArrayMap___first
};
1670 struct WBT_
**closurevariable
= NULL
;
1671 trace
.prev
= tracehead
; tracehead
= &trace
;
1672 trace
.file
= LOCATE_array
;
1673 /* Register variable[0]: Local variable */
1675 /* Register variable[1]: Method return value and escape marker */
1676 /* Register variable[2]: Result */
1677 variable
[2] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1678 /* Register variable[2]: Result */
1679 variable
[2] = CALL_abstract_collection___Collection___first(variable
[2])(variable
[2]) /*IndexedCollectionRead::first*/;
1680 /* Register variable[2]: Result */
1681 variable
[2] = CALL_abstract_collection___Couple___first(variable
[2])(variable
[2]) /*Couple::first*/;
1682 variable
[1] = variable
[2];
1683 goto return_label77
;
1684 return_label77
: while(false);
1685 tracehead
= trace
.prev
;
1688 void array___ArrayMap___clear(val_t self
) {
1689 struct trace_t trace
= {NULL
, NULL
, 492, LOCATE_array___ArrayMap___clear
};
1691 struct WBT_
**closurevariable
= NULL
;
1692 trace
.prev
= tracehead
; tracehead
= &trace
;
1693 trace
.file
= LOCATE_array
;
1694 /* Register variable[0]: Local variable */
1696 /* Register variable[1]: Method return value and escape marker */
1697 /* Register variable[2]: Result */
1698 variable
[2] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1699 CALL_abstract_collection___RemovableCollection___clear(variable
[2])(variable
[2]) /*AbstractArray::clear*/;
1700 return_label78
: while(false);
1701 tracehead
= trace
.prev
;
1704 void array___ArrayMap___remove(val_t self
, val_t param0
) {
1705 struct trace_t trace
= {NULL
, NULL
, 463, LOCATE_array___ArrayMap___remove
};
1707 struct WBT_
**closurevariable
= NULL
;
1708 trace
.prev
= tracehead
; tracehead
= &trace
;
1709 trace
.file
= LOCATE_array
;
1710 /* Register variable[0]: Local variable */
1712 /* Register variable[1]: Local variable */
1713 variable
[1] = param0
;
1714 /* Register variable[2]: Method return value and escape marker */
1715 /* Register variable[3]: Local variable */
1716 /* Register variable[4]: Result */
1717 variable
[4] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1718 /* Register variable[4]: Result */
1719 variable
[4] = CALL_abstract_collection___Collection___length(variable
[4])(variable
[4]) /*AbstractArrayRead::length*/;
1720 /* Register variable[4]: Result */
1721 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])-UNTAG_Int( TAG_Int(1)));
1722 variable
[3] = variable
[4];
1723 while (true) { /*while*/
1724 /* Register variable[4]: Result */
1725 variable
[4] = TAG_Bool(UNTAG_Int( variable
[3] /*i*/)>=UNTAG_Int( TAG_Int(0)));
1726 if (!UNTAG_Bool(variable
[4])) break; /* while*/
1727 /* Register variable[4]: Result */
1728 variable
[4] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1729 /* Register variable[5]: Local variable */
1730 variable
[5] = variable
[4];
1731 /* Register variable[6]: Local variable */
1732 variable
[6] = variable
[3] /*i*/;
1733 /* Register variable[7]: Method return value and escape marker */
1734 /* Register variable[8]: Result */
1735 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*index*/)>=UNTAG_Int( TAG_Int(0)));
1736 /* Ensure var variable[8]: Left 'and' operand*/
1737 if (UNTAG_Bool(variable
[8])) { /* and */
1738 /* Register variable[8]: Result */
1739 variable
[8] = ATTR_array___AbstractArrayRead____length(variable
[5]) /*AbstractArrayRead::_length*/;
1740 /* Register variable[8]: Result */
1741 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*index*/)<UNTAG_Int(variable
[8]));
1743 /* Register variable[8]: Result */
1744 if (!UNTAG_Bool(variable
[8])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_array
, 234); nit_exit(1);}
1745 /* Register variable[8]: Result */
1746 variable
[8] = ATTR_array___Array____items(variable
[5]) /*Array::_items*/;
1747 /* Register variable[8]: Result */
1748 variable
[8] = UNBOX_NativeArray(variable
[8])[UNTAG_Int( variable
[6] /*index*/)];
1749 variable
[7] = variable
[8];
1750 goto return_label81
;
1751 return_label81
: while(false);
1752 /* Register variable[4]: Result */
1753 variable
[4] = variable
[7];
1754 /* Register variable[4]: Result */
1755 variable
[4] = CALL_abstract_collection___Couple___second(variable
[4])(variable
[4]) /*Couple::second*/;
1756 /* Register variable[4]: Result */
1757 variable
[4] = TAG_Bool((variable
[4] == variable
[1] /*item*/) || ((variable
[4] != NIT_NULL
) && ((CALL_kernel___Object_____eqeq(variable
[4])==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable
[4], variable
[1] /*item*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable
[4])(variable
[4], variable
[1] /*item*/) /*Object::==*/)))));
1758 if (UNTAG_Bool(variable
[4])) { /*if*/
1759 CALL_array___ArrayMap___remove_at_index(variable
[0])(variable
[0], variable
[3] /*i*/) /*ArrayMap::remove_at_index*/;
1760 goto return_label79
;
1762 variable
[3] = TAG_Int(UNTAG_Int(variable
[3])-UNTAG_Int( TAG_Int(1))) /*i*/;
1763 continue_80
: while(0);
1766 return_label79
: while(false);
1767 tracehead
= trace
.prev
;
1770 void array___ArrayMap___remove_all(val_t self
, val_t param0
) {
1771 struct trace_t trace
= {NULL
, NULL
, 475, LOCATE_array___ArrayMap___remove_all
};
1773 struct WBT_
**closurevariable
= NULL
;
1774 trace
.prev
= tracehead
; tracehead
= &trace
;
1775 trace
.file
= LOCATE_array
;
1776 /* Register variable[0]: Local variable */
1778 /* Register variable[1]: Local variable */
1779 variable
[1] = param0
;
1780 /* Register variable[2]: Method return value and escape marker */
1781 /* Register variable[3]: Local variable */
1782 /* Register variable[4]: Result */
1783 variable
[4] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1784 /* Register variable[4]: Result */
1785 variable
[4] = CALL_abstract_collection___Collection___length(variable
[4])(variable
[4]) /*AbstractArrayRead::length*/;
1786 /* Register variable[4]: Result */
1787 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])-UNTAG_Int( TAG_Int(1)));
1788 variable
[3] = variable
[4];
1789 while (true) { /*while*/
1790 /* Register variable[4]: Result */
1791 variable
[4] = TAG_Bool(UNTAG_Int( variable
[3] /*i*/)>=UNTAG_Int( TAG_Int(0)));
1792 if (!UNTAG_Bool(variable
[4])) break; /* while*/
1793 /* Register variable[4]: Result */
1794 variable
[4] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1795 /* Register variable[5]: Local variable */
1796 variable
[5] = variable
[4];
1797 /* Register variable[6]: Local variable */
1798 variable
[6] = variable
[3] /*i*/;
1799 /* Register variable[7]: Method return value and escape marker */
1800 /* Register variable[8]: Result */
1801 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*index*/)>=UNTAG_Int( TAG_Int(0)));
1802 /* Ensure var variable[8]: Left 'and' operand*/
1803 if (UNTAG_Bool(variable
[8])) { /* and */
1804 /* Register variable[8]: Result */
1805 variable
[8] = ATTR_array___AbstractArrayRead____length(variable
[5]) /*AbstractArrayRead::_length*/;
1806 /* Register variable[8]: Result */
1807 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*index*/)<UNTAG_Int(variable
[8]));
1809 /* Register variable[8]: Result */
1810 if (!UNTAG_Bool(variable
[8])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_array
, 234); nit_exit(1);}
1811 /* Register variable[8]: Result */
1812 variable
[8] = ATTR_array___Array____items(variable
[5]) /*Array::_items*/;
1813 /* Register variable[8]: Result */
1814 variable
[8] = UNBOX_NativeArray(variable
[8])[UNTAG_Int( variable
[6] /*index*/)];
1815 variable
[7] = variable
[8];
1816 goto return_label84
;
1817 return_label84
: while(false);
1818 /* Register variable[4]: Result */
1819 variable
[4] = variable
[7];
1820 /* Register variable[4]: Result */
1821 variable
[4] = CALL_abstract_collection___Couple___second(variable
[4])(variable
[4]) /*Couple::second*/;
1822 /* Register variable[4]: Result */
1823 variable
[4] = TAG_Bool((variable
[4] == variable
[1] /*item*/) || ((variable
[4] != NIT_NULL
) && ((CALL_kernel___Object_____eqeq(variable
[4])==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable
[4], variable
[1] /*item*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable
[4])(variable
[4], variable
[1] /*item*/) /*Object::==*/)))));
1824 if (UNTAG_Bool(variable
[4])) { /*if*/
1825 CALL_array___ArrayMap___remove_at_index(variable
[0])(variable
[0], variable
[3] /*i*/) /*ArrayMap::remove_at_index*/;
1827 variable
[3] = TAG_Int(UNTAG_Int(variable
[3])-UNTAG_Int( TAG_Int(1))) /*i*/;
1828 continue_83
: while(0);
1831 return_label82
: while(false);
1832 tracehead
= trace
.prev
;
1835 val_t
array___ArrayMap_____bra(val_t self
, val_t param0
) {
1836 struct trace_t trace
= {NULL
, NULL
, 407, LOCATE_array___ArrayMap_____bra
};
1838 struct WBT_
**closurevariable
= NULL
;
1839 trace
.prev
= tracehead
; tracehead
= &trace
;
1840 trace
.file
= LOCATE_array
;
1841 /* Register variable[0]: Local variable */
1843 /* Register variable[1]: Local variable */
1844 variable
[1] = param0
;
1845 /* Register variable[2]: Method return value and escape marker */
1846 /* Register variable[3]: Local variable */
1847 /* Register variable[4]: Result */
1848 variable
[4] = CALL_array___ArrayMap___index(variable
[0])(variable
[0], variable
[1] /*key*/) /*ArrayMap::index*/;
1849 variable
[3] = variable
[4];
1850 /* Register variable[4]: Result */
1851 variable
[4] = TAG_Bool(UNTAG_Int( variable
[3] /*i*/)>=UNTAG_Int( TAG_Int(0)));
1852 if (UNTAG_Bool(variable
[4])) { /*if*/
1853 /* Register variable[4]: Result */
1854 variable
[4] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1855 /* Register variable[5]: Local variable */
1856 variable
[5] = variable
[4];
1857 /* Register variable[6]: Local variable */
1858 variable
[6] = variable
[3] /*i*/;
1859 /* Register variable[7]: Method return value and escape marker */
1860 /* Register variable[8]: Result */
1861 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*index*/)>=UNTAG_Int( TAG_Int(0)));
1862 /* Ensure var variable[8]: Left 'and' operand*/
1863 if (UNTAG_Bool(variable
[8])) { /* and */
1864 /* Register variable[8]: Result */
1865 variable
[8] = ATTR_array___AbstractArrayRead____length(variable
[5]) /*AbstractArrayRead::_length*/;
1866 /* Register variable[8]: Result */
1867 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*index*/)<UNTAG_Int(variable
[8]));
1869 /* Register variable[8]: Result */
1870 if (!UNTAG_Bool(variable
[8])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_array
, 234); nit_exit(1);}
1871 /* Register variable[8]: Result */
1872 variable
[8] = ATTR_array___Array____items(variable
[5]) /*Array::_items*/;
1873 /* Register variable[8]: Result */
1874 variable
[8] = UNBOX_NativeArray(variable
[8])[UNTAG_Int( variable
[6] /*index*/)];
1875 variable
[7] = variable
[8];
1876 goto return_label86
;
1877 return_label86
: while(false);
1878 /* Register variable[4]: Result */
1879 variable
[4] = variable
[7];
1880 /* Register variable[4]: Result */
1881 variable
[4] = CALL_abstract_collection___Couple___second(variable
[4])(variable
[4]) /*Couple::second*/;
1882 variable
[2] = variable
[4];
1883 goto return_label85
;
1885 fprintf(stderr
, "Aborted"); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___ArrayMap_____bra
, LOCATE_array
, 414); nit_exit(1);
1887 return_label85
: while(false);
1888 tracehead
= trace
.prev
;
1891 val_t
array___ArrayMap___has_key(val_t self
, val_t param0
) {
1892 struct trace_t trace
= {NULL
, NULL
, 429, LOCATE_array___ArrayMap___has_key
};
1894 struct WBT_
**closurevariable
= NULL
;
1895 trace
.prev
= tracehead
; tracehead
= &trace
;
1896 trace
.file
= LOCATE_array
;
1897 /* Register variable[0]: Local variable */
1899 /* Register variable[1]: Local variable */
1900 variable
[1] = param0
;
1901 /* Register variable[2]: Method return value and escape marker */
1902 /* Register variable[3]: Result */
1903 variable
[3] = CALL_array___ArrayMap___index(variable
[0])(variable
[0], variable
[1] /*key*/) /*ArrayMap::index*/;
1904 /* Register variable[3]: Result */
1905 variable
[3] = TAG_Bool(UNTAG_Int(variable
[3])>=UNTAG_Int( TAG_Int(0)));
1906 variable
[2] = variable
[3];
1907 goto return_label87
;
1908 return_label87
: while(false);
1909 tracehead
= trace
.prev
;
1912 void array___ArrayMap_____braeq(val_t self
, val_t param0
, val_t param1
) {
1913 struct trace_t trace
= {NULL
, NULL
, 418, LOCATE_array___ArrayMap_____braeq
};
1915 struct WBT_
**closurevariable
= NULL
;
1916 trace
.prev
= tracehead
; tracehead
= &trace
;
1917 trace
.file
= LOCATE_array
;
1918 /* Register variable[0]: Local variable */
1920 /* Register variable[1]: Local variable */
1921 variable
[1] = param0
;
1922 /* Register variable[2]: Local variable */
1923 variable
[2] = param1
;
1924 /* Register variable[3]: Method return value and escape marker */
1925 /* Register variable[4]: Local variable */
1926 /* Register variable[5]: Result */
1927 variable
[5] = CALL_array___ArrayMap___index(variable
[0])(variable
[0], variable
[1] /*key*/) /*ArrayMap::index*/;
1928 variable
[4] = variable
[5];
1929 /* Register variable[5]: Result */
1930 variable
[5] = TAG_Bool(UNTAG_Int( variable
[4] /*i*/)>=UNTAG_Int( TAG_Int(0)));
1931 if (UNTAG_Bool(variable
[5])) { /*if*/
1932 /* Register variable[5]: Result */
1933 variable
[5] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1934 /* Register variable[6]: Local variable */
1935 variable
[6] = variable
[5];
1936 /* Register variable[7]: Local variable */
1937 variable
[7] = variable
[4] /*i*/;
1938 /* Register variable[8]: Method return value and escape marker */
1939 /* Register variable[9]: Result */
1940 variable
[9] = TAG_Bool(UNTAG_Int( variable
[7] /*index*/)>=UNTAG_Int( TAG_Int(0)));
1941 /* Ensure var variable[9]: Left 'and' operand*/
1942 if (UNTAG_Bool(variable
[9])) { /* and */
1943 /* Register variable[9]: Result */
1944 variable
[9] = ATTR_array___AbstractArrayRead____length(variable
[6]) /*AbstractArrayRead::_length*/;
1945 /* Register variable[9]: Result */
1946 variable
[9] = TAG_Bool(UNTAG_Int( variable
[7] /*index*/)<UNTAG_Int(variable
[9]));
1948 /* Register variable[9]: Result */
1949 if (!UNTAG_Bool(variable
[9])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_array
, 234); nit_exit(1);}
1950 /* Register variable[9]: Result */
1951 variable
[9] = ATTR_array___Array____items(variable
[6]) /*Array::_items*/;
1952 /* Register variable[9]: Result */
1953 variable
[9] = UNBOX_NativeArray(variable
[9])[UNTAG_Int( variable
[7] /*index*/)];
1954 variable
[8] = variable
[9];
1955 goto return_label89
;
1956 return_label89
: while(false);
1957 /* Register variable[5]: Result */
1958 variable
[5] = variable
[8];
1959 CALL_abstract_collection___Couple___second__eq(variable
[5])(variable
[5], variable
[2] /*item*/) /*Couple::second=*/;
1961 /* Register variable[5]: Result */
1962 variable
[5] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
1963 /* Register variable[6]: Result */
1964 variable
[6] = NEW_Couple_abstract_collection___Couple___init( variable
[1] /*key*/, variable
[2] /*item*/) /*new Couple[K, E]*/;
1965 CALL_abstract_collection___IndexedCollection___push(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::push*/;
1967 return_label88
: while(false);
1968 tracehead
= trace
.prev
;
1971 void array___ArrayMap___remove_at(val_t self
, val_t param0
) {
1972 struct trace_t trace
= {NULL
, NULL
, 486, LOCATE_array___ArrayMap___remove_at
};
1974 struct WBT_
**closurevariable
= NULL
;
1975 trace
.prev
= tracehead
; tracehead
= &trace
;
1976 trace
.file
= LOCATE_array
;
1977 /* Register variable[0]: Local variable */
1979 /* Register variable[1]: Local variable */
1980 variable
[1] = param0
;
1981 /* Register variable[2]: Method return value and escape marker */
1982 /* Register variable[3]: Local variable */
1983 /* Register variable[4]: Result */
1984 variable
[4] = CALL_array___ArrayMap___index(variable
[0])(variable
[0], variable
[1] /*key*/) /*ArrayMap::index*/;
1985 variable
[3] = variable
[4];
1986 /* Register variable[4]: Result */
1987 variable
[4] = TAG_Bool(UNTAG_Int( variable
[3] /*i*/)>=UNTAG_Int( TAG_Int(0)));
1988 if (UNTAG_Bool(variable
[4])) { /*if*/
1989 CALL_array___ArrayMap___remove_at_index(variable
[0])(variable
[0], variable
[3] /*i*/) /*ArrayMap::remove_at_index*/;
1991 return_label90
: while(false);
1992 tracehead
= trace
.prev
;
1995 val_t
array___ArrayMap___couple_at(val_t self
, val_t param0
) {
1996 struct trace_t trace
= {NULL
, NULL
, 497, LOCATE_array___ArrayMap___couple_at
};
1998 struct WBT_
**closurevariable
= NULL
;
1999 trace
.prev
= tracehead
; tracehead
= &trace
;
2000 trace
.file
= LOCATE_array
;
2001 /* Register variable[0]: Local variable */
2003 /* Register variable[1]: Local variable */
2004 variable
[1] = param0
;
2005 /* Register variable[2]: Method return value and escape marker */
2006 /* Register variable[3]: Local variable */
2007 /* Register variable[4]: Result */
2008 variable
[4] = CALL_array___ArrayMap___index(variable
[0])(variable
[0], variable
[1] /*key*/) /*ArrayMap::index*/;
2009 variable
[3] = variable
[4];
2010 /* Register variable[4]: Result */
2011 variable
[4] = TAG_Bool(UNTAG_Int( variable
[3] /*i*/)>=UNTAG_Int( TAG_Int(0)));
2012 if (UNTAG_Bool(variable
[4])) { /*if*/
2013 /* Register variable[4]: Result */
2014 variable
[4] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
2015 /* Register variable[5]: Local variable */
2016 variable
[5] = variable
[4];
2017 /* Register variable[6]: Local variable */
2018 variable
[6] = variable
[3] /*i*/;
2019 /* Register variable[7]: Method return value and escape marker */
2020 /* Register variable[8]: Result */
2021 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*index*/)>=UNTAG_Int( TAG_Int(0)));
2022 /* Ensure var variable[8]: Left 'and' operand*/
2023 if (UNTAG_Bool(variable
[8])) { /* and */
2024 /* Register variable[8]: Result */
2025 variable
[8] = ATTR_array___AbstractArrayRead____length(variable
[5]) /*AbstractArrayRead::_length*/;
2026 /* Register variable[8]: Result */
2027 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*index*/)<UNTAG_Int(variable
[8]));
2029 /* Register variable[8]: Result */
2030 if (!UNTAG_Bool(variable
[8])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_array
, 234); nit_exit(1);}
2031 /* Register variable[8]: Result */
2032 variable
[8] = ATTR_array___Array____items(variable
[5]) /*Array::_items*/;
2033 /* Register variable[8]: Result */
2034 variable
[8] = UNBOX_NativeArray(variable
[8])[UNTAG_Int( variable
[6] /*index*/)];
2035 variable
[7] = variable
[8];
2036 goto return_label92
;
2037 return_label92
: while(false);
2038 /* Register variable[4]: Result */
2039 variable
[4] = variable
[7];
2040 variable
[2] = variable
[4];
2041 goto return_label91
;
2043 variable
[2] = NIT_NULL
/*null*/;
2044 goto return_label91
;
2046 return_label91
: while(false);
2047 tracehead
= trace
.prev
;
2050 void array___ArrayMap___enlarge(val_t self
, val_t param0
) {
2051 struct trace_t trace
= {NULL
, NULL
, 494, LOCATE_array___ArrayMap___enlarge
};
2053 struct WBT_
**closurevariable
= NULL
;
2054 trace
.prev
= tracehead
; tracehead
= &trace
;
2055 trace
.file
= LOCATE_array
;
2056 /* Register variable[0]: Local variable */
2058 /* Register variable[1]: Local variable */
2059 variable
[1] = param0
;
2060 /* Register variable[2]: Method return value and escape marker */
2061 /* Register variable[3]: Result */
2062 variable
[3] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
2063 CALL_array___AbstractArray___enlarge(variable
[3])(variable
[3], variable
[1] /*cap*/) /*Array::enlarge*/;
2064 return_label93
: while(false);
2065 tracehead
= trace
.prev
;
2068 void array___ArrayMap___remove_at_index(val_t self
, val_t param0
) {
2069 struct trace_t trace
= {NULL
, NULL
, 510, LOCATE_array___ArrayMap___remove_at_index
};
2071 struct WBT_
**closurevariable
= NULL
;
2072 trace
.prev
= tracehead
; tracehead
= &trace
;
2073 trace
.file
= LOCATE_array
;
2074 /* Register variable[0]: Local variable */
2076 /* Register variable[1]: Local variable */
2077 variable
[1] = param0
;
2078 /* Register variable[2]: Method return value and escape marker */
2079 /* Register variable[3]: Result */
2080 variable
[3] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
2081 /* Register variable[4]: Result */
2082 variable
[4] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
2083 /* Register variable[4]: Result */
2084 variable
[4] = CALL_abstract_collection___IndexedCollectionRead___last(variable
[4])(variable
[4]) /*IndexedCollectionRead::last*/;
2085 CALL_abstract_collection___Map_____braeq(variable
[3])(variable
[3], variable
[1] /*i*/, variable
[4]) /*Array::[]=*/;
2086 /* Register variable[3]: Result */
2087 variable
[3] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
2088 CALL_abstract_collection___IndexedCollection___pop(variable
[3])(variable
[3]) /*AbstractArray::pop*/;
2089 return_label94
: while(false);
2090 tracehead
= trace
.prev
;
2093 val_t
array___ArrayMap___index(val_t self
, val_t param0
) {
2094 struct trace_t trace
= {NULL
, NULL
, 520, LOCATE_array___ArrayMap___index
};
2096 struct WBT_
**closurevariable
= NULL
;
2097 trace
.prev
= tracehead
; tracehead
= &trace
;
2098 trace
.file
= LOCATE_array
;
2099 /* Register variable[0]: Local variable */
2101 /* Register variable[1]: Local variable */
2102 variable
[1] = param0
;
2103 /* Register variable[2]: Method return value and escape marker */
2104 /* Register variable[3]: Local variable */
2105 /* Register variable[4]: Result */
2106 variable
[4] = ATTR_array___ArrayMap____last_index(variable
[0]) /*ArrayMap::_last_index*/;
2107 variable
[3] = variable
[4];
2108 /* Register variable[4]: Result */
2109 variable
[4] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
2110 /* Register variable[4]: Result */
2111 variable
[4] = CALL_abstract_collection___Collection___length(variable
[4])(variable
[4]) /*AbstractArrayRead::length*/;
2112 /* Register variable[4]: Result */
2113 variable
[4] = TAG_Bool(UNTAG_Int( variable
[3] /*l*/)<UNTAG_Int(variable
[4]));
2114 /* Ensure var variable[4]: Left 'and' operand*/
2115 if (UNTAG_Bool(variable
[4])) { /* and */
2116 /* Register variable[4]: Result */
2117 variable
[4] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
2118 /* Register variable[5]: Local variable */
2119 variable
[5] = variable
[4];
2120 /* Register variable[6]: Local variable */
2121 variable
[6] = variable
[3] /*l*/;
2122 /* Register variable[7]: Method return value and escape marker */
2123 /* Register variable[8]: Result */
2124 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*index*/)>=UNTAG_Int( TAG_Int(0)));
2125 /* Ensure var variable[8]: Left 'and' operand*/
2126 if (UNTAG_Bool(variable
[8])) { /* and */
2127 /* Register variable[8]: Result */
2128 variable
[8] = ATTR_array___AbstractArrayRead____length(variable
[5]) /*AbstractArrayRead::_length*/;
2129 /* Register variable[8]: Result */
2130 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*index*/)<UNTAG_Int(variable
[8]));
2132 /* Register variable[8]: Result */
2133 if (!UNTAG_Bool(variable
[8])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_array
, 234); nit_exit(1);}
2134 /* Register variable[8]: Result */
2135 variable
[8] = ATTR_array___Array____items(variable
[5]) /*Array::_items*/;
2136 /* Register variable[8]: Result */
2137 variable
[8] = UNBOX_NativeArray(variable
[8])[UNTAG_Int( variable
[6] /*index*/)];
2138 variable
[7] = variable
[8];
2139 goto return_label96
;
2140 return_label96
: while(false);
2141 /* Register variable[4]: Result */
2142 variable
[4] = variable
[7];
2143 /* Register variable[4]: Result */
2144 variable
[4] = CALL_abstract_collection___Couple___first(variable
[4])(variable
[4]) /*Couple::first*/;
2145 /* Register variable[4]: Result */
2146 variable
[4] = TAG_Bool((variable
[4] == variable
[1] /*key*/) || ((variable
[4] != NIT_NULL
) && ((CALL_kernel___Object_____eqeq(variable
[4])==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable
[4], variable
[1] /*key*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable
[4])(variable
[4], variable
[1] /*key*/) /*Object::==*/)))));
2148 /* Register variable[4]: Result */
2149 if (UNTAG_Bool(variable
[4])) { /*if*/
2150 variable
[2] = variable
[3] /*l*/;
2151 goto return_label95
;
2153 /* Register variable[4]: Local variable */
2154 variable
[4] = TAG_Int(0);
2155 while (true) { /*while*/
2156 /* Register variable[5]: Result */
2157 variable
[5] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
2158 /* Register variable[5]: Result */
2159 variable
[5] = CALL_abstract_collection___Collection___length(variable
[5])(variable
[5]) /*AbstractArrayRead::length*/;
2160 /* Register variable[5]: Result */
2161 variable
[5] = TAG_Bool(UNTAG_Int( variable
[4] /*i*/)<UNTAG_Int(variable
[5]));
2162 if (!UNTAG_Bool(variable
[5])) break; /* while*/
2163 /* Register variable[5]: Result */
2164 variable
[5] = ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/;
2165 /* Register variable[6]: Local variable */
2166 variable
[6] = variable
[5];
2167 /* Register variable[7]: Local variable */
2168 variable
[7] = variable
[4] /*i*/;
2169 /* Register variable[8]: Method return value and escape marker */
2170 /* Register variable[9]: Result */
2171 variable
[9] = TAG_Bool(UNTAG_Int( variable
[7] /*index*/)>=UNTAG_Int( TAG_Int(0)));
2172 /* Ensure var variable[9]: Left 'and' operand*/
2173 if (UNTAG_Bool(variable
[9])) { /* and */
2174 /* Register variable[9]: Result */
2175 variable
[9] = ATTR_array___AbstractArrayRead____length(variable
[6]) /*AbstractArrayRead::_length*/;
2176 /* Register variable[9]: Result */
2177 variable
[9] = TAG_Bool(UNTAG_Int( variable
[7] /*index*/)<UNTAG_Int(variable
[9]));
2179 /* Register variable[9]: Result */
2180 if (!UNTAG_Bool(variable
[9])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_array
, 234); nit_exit(1);}
2181 /* Register variable[9]: Result */
2182 variable
[9] = ATTR_array___Array____items(variable
[6]) /*Array::_items*/;
2183 /* Register variable[9]: Result */
2184 variable
[9] = UNBOX_NativeArray(variable
[9])[UNTAG_Int( variable
[7] /*index*/)];
2185 variable
[8] = variable
[9];
2186 goto return_label98
;
2187 return_label98
: while(false);
2188 /* Register variable[5]: Result */
2189 variable
[5] = variable
[8];
2190 /* Register variable[5]: Result */
2191 variable
[5] = CALL_abstract_collection___Couple___first(variable
[5])(variable
[5]) /*Couple::first*/;
2192 /* Register variable[5]: Result */
2193 variable
[5] = TAG_Bool((variable
[5] == variable
[1] /*key*/) || ((variable
[5] != NIT_NULL
) && ((CALL_kernel___Object_____eqeq(variable
[5])==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable
[5], variable
[1] /*key*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable
[5])(variable
[5], variable
[1] /*key*/) /*Object::==*/)))));
2194 if (UNTAG_Bool(variable
[5])) { /*if*/
2195 ATTR_array___ArrayMap____last_index(variable
[0]) /*ArrayMap::_last_index*/ = variable
[4] /*i*/;
2196 variable
[2] = variable
[4] /*i*/;
2197 goto return_label95
;
2199 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
2200 continue_97
: while(0);
2203 /* Register variable[5]: Result */
2204 variable
[5] = TAG_Int(-UNTAG_Int( TAG_Int(1)));
2205 variable
[2] = variable
[5];
2206 goto return_label95
;
2207 return_label95
: while(false);
2208 tracehead
= trace
.prev
;
2211 void array___ArrayMap___init(val_t self
, int* init_table
) {
2212 struct trace_t trace
= {NULL
, NULL
, 538, LOCATE_array___ArrayMap___init
};
2214 struct WBT_
**closurevariable
= NULL
;
2215 trace
.prev
= tracehead
; tracehead
= &trace
;
2216 trace
.file
= LOCATE_array
;
2217 /* Register variable[0]: Local variable */
2219 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_ArrayMap
].i
]) return;
2220 /* Register variable[1]: Method return value and escape marker */
2221 /* Register variable[2]: Result */
2222 variable
[2] = NEW_Array_array___Array___init() /*new Array[Couple[K, E]]*/;
2223 ATTR_array___ArrayMap____items(variable
[0]) /*ArrayMap::_items*/ = variable
[2];
2224 return_label99
: while(false);
2225 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_ArrayMap
].i
] = 1;
2226 tracehead
= trace
.prev
;
2229 val_t
array___Iterator___to_a(val_t self
) {
2230 struct trace_t trace
= {NULL
, NULL
, 548, LOCATE_array___Iterator___to_a
};
2232 struct WBT_
**closurevariable
= NULL
;
2233 trace
.prev
= tracehead
; tracehead
= &trace
;
2234 trace
.file
= LOCATE_array
;
2235 /* Register variable[0]: Local variable */
2237 /* Register variable[1]: Method return value and escape marker */
2238 /* Register variable[2]: Local variable */
2239 /* Register variable[3]: Result */
2240 variable
[3] = NEW_Array_array___Array___init() /*new Array[E]*/;
2241 variable
[2] = variable
[3];
2242 while (true) { /*while*/
2243 /* Register variable[3]: Result */
2244 variable
[3] = CALL_abstract_collection___Iterator___is_ok(variable
[0])(variable
[0]) /*Iterator::is_ok*/;
2245 if (!UNTAG_Bool(variable
[3])) break; /* while*/
2246 /* Register variable[3]: Result */
2247 variable
[3] = CALL_abstract_collection___Iterator___item(variable
[0])(variable
[0]) /*Iterator::item*/;
2248 CALL_abstract_collection___SimpleCollection___add( variable
[2] /*res*/)( variable
[2] /*res*/, variable
[3]) /*AbstractArray::add*/;
2249 CALL_abstract_collection___Iterator___next(variable
[0])(variable
[0]) /*Iterator::next*/;
2250 continue_101
: while(0);
2252 break_101
: while(0);
2253 variable
[1] = variable
[2] /*res*/;
2254 goto return_label100
;
2255 return_label100
: while(false);
2256 tracehead
= trace
.prev
;
2259 val_t
array___Collection___to_a(val_t self
) {
2260 struct trace_t trace
= {NULL
, NULL
, 561, LOCATE_array___Collection___to_a
};
2262 struct WBT_
**closurevariable
= NULL
;
2263 trace
.prev
= tracehead
; tracehead
= &trace
;
2264 trace
.file
= LOCATE_array
;
2265 /* Register variable[0]: Local variable */
2267 /* Register variable[1]: Method return value and escape marker */
2268 /* Register variable[2]: Result */
2269 variable
[2] = CALL_abstract_collection___Collection___iterator(variable
[0])(variable
[0]) /*Collection::iterator*/;
2270 /* Register variable[2]: Result */
2271 variable
[2] = CALL_array___Iterator___to_a(variable
[2])(variable
[2]) /*Iterator::to_a*/;
2272 variable
[1] = variable
[2];
2273 goto return_label102
;
2274 return_label102
: while(false);
2275 tracehead
= trace
.prev
;
2278 val_t
array___ArrayCapable___calloc_array(val_t self
, val_t param0
) {
2279 struct trace_t trace
= {NULL
, NULL
, 572, LOCATE_array___ArrayCapable___calloc_array
};
2280 val_t
*variable
= NULL
;
2281 struct WBT_
**closurevariable
= NULL
;
2282 trace
.prev
= tracehead
; tracehead
= &trace
;
2283 trace
.file
= LOCATE_array
;
2284 tracehead
= trace
.prev
;
2285 return BOX_NativeArray((val_t
*)malloc((UNTAG_Int( param0
) * sizeof(val_t
))));
2287 val_t
array___NativeArray_____bra(val_t self
, val_t param0
) {
2288 struct trace_t trace
= {NULL
, NULL
, 578, LOCATE_array___NativeArray_____bra
};
2289 val_t
*variable
= NULL
;
2290 struct WBT_
**closurevariable
= NULL
;
2291 trace
.prev
= tracehead
; tracehead
= &trace
;
2292 trace
.file
= LOCATE_array
;
2293 tracehead
= trace
.prev
;
2294 return UNBOX_NativeArray( self
)[UNTAG_Int( param0
)];
2296 void array___NativeArray_____braeq(val_t self
, val_t param0
, val_t param1
) {
2297 struct trace_t trace
= {NULL
, NULL
, 579, LOCATE_array___NativeArray_____braeq
};
2298 val_t
*variable
= NULL
;
2299 struct WBT_
**closurevariable
= NULL
;
2300 trace
.prev
= tracehead
; tracehead
= &trace
;
2301 trace
.file
= LOCATE_array
;
2302 UNBOX_NativeArray( self
)[UNTAG_Int( param0
)]= param1
;
2303 tracehead
= trace
.prev
;
2306 void array___NativeArray___copy_to(val_t self
, val_t param0
, val_t param1
) {
2307 struct trace_t trace
= {NULL
, NULL
, 580, LOCATE_array___NativeArray___copy_to
};
2308 val_t
*variable
= NULL
;
2309 struct WBT_
**closurevariable
= NULL
;
2310 trace
.prev
= tracehead
; tracehead
= &trace
;
2311 trace
.file
= LOCATE_array
;
2312 (void)memcpy(UNBOX_NativeArray( param0
), UNBOX_NativeArray( self
), UNTAG_Int( param1
)*sizeof(val_t
));
2313 tracehead
= trace
.prev
;