1 /* This C file is generated by NIT to compile module array. */
2 #include "array._sep.h"
3 void array___AbstractArray___enlarge(val_t self
, val_t param0
) {
4 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___enlarge
, 23};
5 trace
.prev
= tracehead
; tracehead
= &trace
;
6 fprintf(stderr
, "Deferred method %s called (%s: %d)\n", "enlarge", LOCATE_array
, 23);
8 tracehead
= trace
.prev
;
11 val_t
array___AbstractArray___length(val_t self
) {
12 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___length
, 25};
13 trace
.prev
= tracehead
; tracehead
= &trace
;
14 tracehead
= trace
.prev
;
15 return ATTR_array___AbstractArray____length( self
) /*AbstractArray::_length*/;
17 val_t
array___AbstractArray___is_empty(val_t self
) {
18 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___is_empty
, 28};
20 trace
.prev
= tracehead
; tracehead
= &trace
;
21 variable0
= ATTR_array___AbstractArray____length( self
) /*AbstractArray::_length*/;
22 variable0
= TAG_Bool((variable0
)==( TAG_Int(0)));
24 return_label0
: while(false);
25 tracehead
= trace
.prev
;
28 void array___AbstractArray___push(val_t self
, val_t param0
) {
29 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___push
, 30};
31 trace
.prev
= tracehead
; tracehead
= &trace
;
33 ((array___AbstractArray___add_t
)CALL( self
,COLOR_abstract_collection___SimpleCollection___add
))( self
, variable0
/*item*/) /*AbstractArray::add*/;
34 tracehead
= trace
.prev
;
37 val_t
array___AbstractArray___pop(val_t self
) {
38 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___pop
, 32};
41 trace
.prev
= tracehead
; tracehead
= &trace
;
42 variable0
= ((array___AbstractArray___is_empty_t
)CALL( self
,COLOR_abstract_collection___Collection___is_empty
))( self
) /*AbstractArray::is_empty*/;
43 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable0
)))) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'not_empty' ", LOCATE_array___AbstractArray___pop
, 34); nit_exit(1);}
44 variable1
= ((abstract_collection___IndexedCollection___last_t
)CALL( self
,COLOR_abstract_collection___IndexedCollection___last
))( self
) /*AbstractArray::last*/;
45 variable0
= variable1
;
46 ATTR_array___AbstractArray____length( self
) /*AbstractArray::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArray____length( self
) /*AbstractArray::_length*/)-UNTAG_Int( TAG_Int(1)));
47 variable0
= variable0
/*r*/;
49 return_label2
: while(false);
50 tracehead
= trace
.prev
;
53 val_t
array___AbstractArray___shift(val_t self
) {
54 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___shift
, 40};
60 trace
.prev
= tracehead
; tracehead
= &trace
;
61 variable0
= ((array___AbstractArray___is_empty_t
)CALL( self
,COLOR_abstract_collection___Collection___is_empty
))( self
) /*AbstractArray::is_empty*/;
62 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable0
)))) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'not_empty' ", LOCATE_array___AbstractArray___shift
, 42); nit_exit(1);}
63 variable1
= ((abstract_collection___IndexedCollection___first_t
)CALL( self
,COLOR_abstract_collection___Collection___first
))( self
) /*AbstractArray::first*/;
64 variable0
= variable1
;
65 variable1
= TAG_Int(1);
66 variable3
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
67 variable2
= variable3
;
68 while (true) { /*while*/
69 variable3
= TAG_Bool(UNTAG_Int( variable1
/*i*/)<UNTAG_Int( variable2
/*l*/));
70 if (!UNTAG_Bool(variable3
)) break; /* while*/
71 variable3
= TAG_Int(UNTAG_Int( variable1
/*i*/)-UNTAG_Int( TAG_Int(1)));
72 variable4
= ((abstract_collection___Map_____bra_t
)CALL( self
,COLOR_abstract_collection___Map_____bra
))( self
, variable1
/*i*/) /*AbstractArray::[]*/;
73 ((abstract_collection___Map_____braeq_t
)CALL( self
,COLOR_abstract_collection___Map_____braeq
))( self
, variable3
, variable4
) /*AbstractArray::[]=*/;
74 variable1
= TAG_Int(UNTAG_Int(variable1
)+UNTAG_Int( TAG_Int(1))) /*i*/;
78 variable3
= TAG_Int(UNTAG_Int( variable2
/*l*/)-UNTAG_Int( TAG_Int(1)));
79 ATTR_array___AbstractArray____length( self
) /*AbstractArray::_length*/ = variable3
;
80 variable0
= variable0
/*r*/;
82 return_label3
: while(false);
83 tracehead
= trace
.prev
;
86 void array___AbstractArray___unshift(val_t self
, val_t param0
) {
87 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___unshift
, 54};
92 trace
.prev
= tracehead
; tracehead
= &trace
;
94 variable2
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
95 variable2
= TAG_Int(UNTAG_Int(variable2
)-UNTAG_Int( TAG_Int(1)));
96 variable1
= variable2
;
97 while (true) { /*while*/
98 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)>UNTAG_Int( TAG_Int(0)));
99 if (!UNTAG_Bool(variable2
)) break; /* while*/
100 variable2
= TAG_Int(UNTAG_Int( variable1
/*i*/)+UNTAG_Int( TAG_Int(1)));
101 variable3
= ((abstract_collection___Map_____bra_t
)CALL( self
,COLOR_abstract_collection___Map_____bra
))( self
, variable1
/*i*/) /*AbstractArray::[]*/;
102 ((abstract_collection___Map_____braeq_t
)CALL( self
,COLOR_abstract_collection___Map_____braeq
))( self
, variable2
, variable3
) /*AbstractArray::[]=*/;
103 variable1
= TAG_Int(UNTAG_Int(variable1
)-UNTAG_Int( TAG_Int(1))) /*i*/;
104 continue_6
: while(0);
107 ((abstract_collection___Map_____braeq_t
)CALL( self
,COLOR_abstract_collection___Map_____braeq
))( self
, TAG_Int(0), variable0
/*item*/) /*AbstractArray::[]=*/;
108 tracehead
= trace
.prev
;
111 void array___AbstractArray___insert(val_t self
, val_t param0
, val_t param1
) {
112 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___insert
, 64};
117 trace
.prev
= tracehead
; tracehead
= &trace
;
120 variable2
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
121 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(1)));
122 ((array___AbstractArray___enlarge_t
)CALL( self
,COLOR_array___AbstractArray___enlarge
))( self
, variable2
) /*AbstractArray::enlarge*/;
123 variable2
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
124 variable2
= TAG_Int(UNTAG_Int(variable2
)-UNTAG_Int( variable1
/*pos*/));
125 variable3
= TAG_Int(UNTAG_Int( variable1
/*pos*/)+UNTAG_Int( TAG_Int(1)));
126 ((array___AbstractArray___copy_to_t
)CALL( self
,COLOR_array___AbstractArray___copy_to
))( self
, variable1
/*pos*/, variable2
, self
, variable3
) /*AbstractArray::copy_to*/;
127 ((abstract_collection___Map_____braeq_t
)CALL( self
,COLOR_abstract_collection___Map_____braeq
))( self
, variable1
/*pos*/, variable0
/*item*/) /*AbstractArray::[]=*/;
128 tracehead
= trace
.prev
;
131 void array___AbstractArray___add(val_t self
, val_t param0
) {
132 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___add
, 71};
135 trace
.prev
= tracehead
; tracehead
= &trace
;
137 variable1
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
138 ((abstract_collection___Map_____braeq_t
)CALL( self
,COLOR_abstract_collection___Map_____braeq
))( self
, variable1
, variable0
/*item*/) /*AbstractArray::[]=*/;
139 tracehead
= trace
.prev
;
142 void array___AbstractArray___clear(val_t self
) {
143 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___clear
, 73};
144 trace
.prev
= tracehead
; tracehead
= &trace
;
145 ATTR_array___AbstractArray____length( self
) /*AbstractArray::_length*/ = TAG_Int(0);
146 tracehead
= trace
.prev
;
149 val_t
array___AbstractArray___has(val_t self
, val_t param0
) {
150 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___has
, 75};
155 trace
.prev
= tracehead
; tracehead
= &trace
;
157 variable1
= TAG_Int(0);
158 variable3
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
159 variable2
= variable3
;
160 while (true) { /*while*/
161 variable3
= TAG_Bool(UNTAG_Int( variable1
/*i*/)<UNTAG_Int( variable2
/*l*/));
162 if (!UNTAG_Bool(variable3
)) break; /* while*/
163 variable3
= ((abstract_collection___Map_____bra_t
)CALL( self
,COLOR_abstract_collection___Map_____bra
))( self
, variable1
/*i*/) /*AbstractArray::[]*/;
164 variable3
= TAG_Bool((variable3
== variable0
/*item*/) || ((variable3
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable3
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))(variable3
, variable0
/*item*/) /*Object::==*/)))));
165 if (UNTAG_Bool(variable3
)) { /*if*/
166 variable1
= TAG_Bool(true);
169 variable1
= TAG_Int(UNTAG_Int(variable1
)+UNTAG_Int( TAG_Int(1))) /*i*/;
170 continue_11
: while(0);
173 variable1
= TAG_Bool(false);
175 return_label10
: while(false);
176 tracehead
= trace
.prev
;
179 val_t
array___AbstractArray___has_only(val_t self
, val_t param0
) {
180 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___has_only
, 86};
185 trace
.prev
= tracehead
; tracehead
= &trace
;
187 variable1
= TAG_Int(0);
188 variable3
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
189 variable2
= variable3
;
190 while (true) { /*while*/
191 variable3
= TAG_Bool(UNTAG_Int( variable1
/*i*/)<UNTAG_Int( variable2
/*l*/));
192 if (!UNTAG_Bool(variable3
)) break; /* while*/
193 variable3
= ((abstract_collection___Map_____bra_t
)CALL( self
,COLOR_abstract_collection___Map_____bra
))( self
, variable1
/*i*/) /*AbstractArray::[]*/;
194 variable3
= TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3
== variable0
/*item*/) || ((variable3
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable3
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))(variable3
, variable0
/*item*/) /*Object::==*/)))))));
195 if (UNTAG_Bool(variable3
)) { /*if*/
196 variable1
= TAG_Bool(false);
199 variable1
= TAG_Int(UNTAG_Int(variable1
)+UNTAG_Int( TAG_Int(1))) /*i*/;
200 continue_13
: while(0);
203 variable1
= TAG_Bool(true);
205 return_label12
: while(false);
206 tracehead
= trace
.prev
;
209 val_t
array___AbstractArray___has_key(val_t self
, val_t param0
) {
210 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___has_key
, 97};
214 trace
.prev
= tracehead
; tracehead
= &trace
;
216 variable1
= TAG_Bool(UNTAG_Int( variable0
/*index*/)>=UNTAG_Int( TAG_Int(0)));
217 variable2
= variable1
;
218 if (UNTAG_Bool(variable2
)) { /* and */
219 variable2
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
220 variable2
= TAG_Bool(UNTAG_Int( variable0
/*index*/)<UNTAG_Int(variable2
));
222 variable1
= variable2
;
224 return_label14
: while(false);
225 tracehead
= trace
.prev
;
228 val_t
array___AbstractArray___count(val_t self
, val_t param0
) {
229 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___count
, 99};
235 trace
.prev
= tracehead
; tracehead
= &trace
;
237 variable1
= TAG_Int(0);
238 variable2
= TAG_Int(0);
239 variable4
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
240 variable3
= variable4
;
241 while (true) { /*while*/
242 variable4
= TAG_Bool(UNTAG_Int( variable2
/*i*/)<UNTAG_Int( variable3
/*l*/));
243 if (!UNTAG_Bool(variable4
)) break; /* while*/
244 variable4
= ((abstract_collection___Map_____bra_t
)CALL( self
,COLOR_abstract_collection___Map_____bra
))( self
, variable2
/*i*/) /*AbstractArray::[]*/;
245 variable4
= TAG_Bool((variable4
== variable0
/*item*/) || ((variable4
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable4
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable4
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable4
,COLOR_kernel___Object_____eqeq
))(variable4
, variable0
/*item*/) /*Object::==*/)))));
246 if (UNTAG_Bool(variable4
)) { /*if*/
247 variable1
= TAG_Int(UNTAG_Int(variable1
)+UNTAG_Int( TAG_Int(1))) /*res*/;
249 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(1))) /*i*/;
250 continue_16
: while(0);
253 variable1
= variable1
/*res*/;
255 return_label15
: while(false);
256 tracehead
= trace
.prev
;
259 val_t
array___AbstractArray___index_of(val_t self
, val_t param0
) {
260 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___index_of
, 111};
263 trace
.prev
= tracehead
; tracehead
= &trace
;
265 variable1
= ((array___AbstractArray___index_of_from_t
)CALL( self
,COLOR_array___AbstractArray___index_of_from
))( self
, variable0
/*item*/, TAG_Int(0)) /*AbstractArray::index_of_from*/;
267 return_label17
: while(false);
268 tracehead
= trace
.prev
;
271 val_t
array___AbstractArray___last_index_of(val_t self
, val_t param0
) {
272 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___last_index_of
, 113};
275 trace
.prev
= tracehead
; tracehead
= &trace
;
277 variable1
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
278 variable1
= TAG_Int(UNTAG_Int(variable1
)-UNTAG_Int( TAG_Int(1)));
279 variable1
= ((array___AbstractArray___last_index_of_from_t
)CALL( self
,COLOR_array___AbstractArray___last_index_of_from
))( self
, variable0
/*item*/, variable1
) /*AbstractArray::last_index_of_from*/;
281 return_label18
: while(false);
282 tracehead
= trace
.prev
;
285 val_t
array___AbstractArray___index_of_from(val_t self
, val_t param0
, val_t param1
) {
286 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___index_of_from
, 115};
292 trace
.prev
= tracehead
; tracehead
= &trace
;
295 variable2
= variable1
/*pos*/;
296 variable4
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
297 variable3
= variable4
;
298 while (true) { /*while*/
299 variable4
= TAG_Bool(UNTAG_Int( variable2
/*i*/)<UNTAG_Int( variable3
/*len*/));
300 if (!UNTAG_Bool(variable4
)) break; /* while*/
301 variable4
= ((abstract_collection___Map_____bra_t
)CALL( self
,COLOR_abstract_collection___Map_____bra
))( self
, variable2
/*i*/) /*AbstractArray::[]*/;
302 variable4
= TAG_Bool((variable4
== variable0
/*item*/) || ((variable4
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable4
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable4
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable4
,COLOR_kernel___Object_____eqeq
))(variable4
, variable0
/*item*/) /*Object::==*/)))));
303 if (UNTAG_Bool(variable4
)) { /*if*/
304 variable2
= variable2
/*i*/;
307 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(1))) /*i*/;
308 continue_20
: while(0);
311 variable4
= TAG_Int(-UNTAG_Int( TAG_Int(1)));
312 variable2
= variable4
;
314 return_label19
: while(false);
315 tracehead
= trace
.prev
;
318 val_t
array___AbstractArray___last_index_of_from(val_t self
, val_t param0
, val_t param1
) {
319 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___last_index_of_from
, 128};
324 trace
.prev
= tracehead
; tracehead
= &trace
;
327 variable2
= variable1
/*pos*/;
328 while (true) { /*while*/
329 variable3
= TAG_Bool(UNTAG_Int( variable2
/*i*/)>=UNTAG_Int( TAG_Int(0)));
330 if (!UNTAG_Bool(variable3
)) break; /* while*/
331 variable3
= ((abstract_collection___Map_____bra_t
)CALL( self
,COLOR_abstract_collection___Map_____bra
))( self
, variable2
/*i*/) /*AbstractArray::[]*/;
332 variable3
= TAG_Bool((variable3
== variable0
/*item*/) || ((variable3
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable3
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))(variable3
, variable0
/*item*/) /*Object::==*/)))));
333 if (UNTAG_Bool(variable3
)) { /*if*/
334 variable2
= variable2
/*i*/;
337 variable2
= TAG_Int(UNTAG_Int(variable2
)-UNTAG_Int( TAG_Int(1))) /*i*/;
339 continue_22
: while(0);
342 variable3
= TAG_Int(-UNTAG_Int( TAG_Int(1)));
343 variable2
= variable3
;
345 return_label21
: while(false);
346 tracehead
= trace
.prev
;
349 val_t
array___AbstractArray___reversed(val_t self
) {
350 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___reversed
, 141};
354 trace
.prev
= tracehead
; tracehead
= &trace
;
355 variable1
= ATTR_array___AbstractArray____length( self
) /*AbstractArray::_length*/;
356 variable0
= variable1
;
357 variable2
= NEW_array___Array___with_capacity( variable0
/*cmp*/); /*new Array[E]*/
358 variable1
= variable2
;
359 while (true) { /*while*/
360 variable2
= TAG_Bool(UNTAG_Int( variable0
/*cmp*/)>UNTAG_Int( TAG_Int(0)));
361 if (!UNTAG_Bool(variable2
)) break; /* while*/
362 variable0
= TAG_Int(UNTAG_Int(variable0
)-UNTAG_Int( TAG_Int(1))) /*cmp*/;
363 variable2
= ((abstract_collection___Map_____bra_t
)CALL( self
,COLOR_abstract_collection___Map_____bra
))( self
, variable0
/*cmp*/) /*AbstractArray::[]*/;
364 ((array___AbstractArray___add_t
)CALL( variable1
/*result*/,COLOR_abstract_collection___SimpleCollection___add
))( variable1
/*result*/, variable2
) /*Array::add*/;
365 continue_24
: while(0);
368 variable0
= variable1
/*result*/;
370 return_label23
: while(false);
371 tracehead
= trace
.prev
;
374 void array___AbstractArray___remove(val_t self
, val_t param0
) {
375 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___remove
, 152};
378 trace
.prev
= tracehead
; tracehead
= &trace
;
380 variable1
= ((array___AbstractArray___index_of_t
)CALL( self
,COLOR_abstract_collection___IndexedCollection___index_of
))( self
, variable0
/*item*/) /*AbstractArray::index_of*/;
381 ((array___AbstractArray___remove_at_t
)CALL( self
,COLOR_abstract_collection___Map___remove_at
))( self
, variable1
) /*AbstractArray::remove_at*/;
382 tracehead
= trace
.prev
;
385 void array___AbstractArray___remove_all(val_t self
, val_t param0
) {
386 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___remove_all
, 154};
390 trace
.prev
= tracehead
; tracehead
= &trace
;
392 variable2
= ((array___AbstractArray___index_of_t
)CALL( self
,COLOR_abstract_collection___IndexedCollection___index_of
))( self
, variable0
/*item*/) /*AbstractArray::index_of*/;
393 variable1
= variable2
;
394 while (true) { /*while*/
395 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)>=UNTAG_Int( TAG_Int(0)));
396 if (!UNTAG_Bool(variable2
)) break; /* while*/
397 ((array___AbstractArray___remove_at_t
)CALL( self
,COLOR_abstract_collection___Map___remove_at
))( self
, variable1
/*i*/) /*AbstractArray::remove_at*/;
398 variable2
= ((array___AbstractArray___index_of_from_t
)CALL( self
,COLOR_array___AbstractArray___index_of_from
))( self
, variable0
/*item*/, variable1
/*i*/) /*AbstractArray::index_of_from*/;
399 variable1
= variable2
/*i=*/;
400 continue_27
: while(0);
403 tracehead
= trace
.prev
;
406 void array___AbstractArray___remove_at(val_t self
, val_t param0
) {
407 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___remove_at
, 163};
413 trace
.prev
= tracehead
; tracehead
= &trace
;
415 variable2
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
416 variable1
= variable2
;
417 variable2
= TAG_Bool(UNTAG_Int( variable0
/*i*/)>=UNTAG_Int( TAG_Int(0)));
418 variable3
= variable2
;
419 if (UNTAG_Bool(variable3
)) { /* and */
420 variable3
= TAG_Bool(UNTAG_Int( variable0
/*i*/)<UNTAG_Int( variable1
/*l*/));
422 variable2
= variable3
;
423 if (UNTAG_Bool(variable2
)) { /*if*/
424 variable3
= TAG_Int(UNTAG_Int( variable0
/*i*/)+UNTAG_Int( TAG_Int(1)));
425 variable2
= variable3
;
426 while (true) { /*while*/
427 variable3
= TAG_Bool(UNTAG_Int( variable2
/*j*/)<UNTAG_Int( variable1
/*l*/));
428 if (!UNTAG_Bool(variable3
)) break; /* while*/
429 variable3
= TAG_Int(UNTAG_Int( variable2
/*j*/)-UNTAG_Int( TAG_Int(1)));
430 variable4
= ((abstract_collection___Map_____bra_t
)CALL( self
,COLOR_abstract_collection___Map_____bra
))( self
, variable2
/*j*/) /*AbstractArray::[]*/;
431 ((abstract_collection___Map_____braeq_t
)CALL( self
,COLOR_abstract_collection___Map_____braeq
))( self
, variable3
, variable4
) /*AbstractArray::[]=*/;
432 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(1))) /*j*/;
433 continue_29
: while(0);
436 variable3
= TAG_Int(UNTAG_Int( variable1
/*l*/)-UNTAG_Int( TAG_Int(1)));
437 ATTR_array___AbstractArray____length( self
) /*AbstractArray::_length*/ = variable3
;
439 tracehead
= trace
.prev
;
442 void array___AbstractArray___copy_to(val_t self
, val_t param0
, val_t param1
, val_t param2
, val_t param3
) {
443 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___copy_to
, 176};
451 trace
.prev
= tracehead
; tracehead
= &trace
;
456 variable4
= variable1
/*len*/;
457 while (true) { /*while*/
458 variable5
= TAG_Bool(UNTAG_Int( variable4
/*i*/)>UNTAG_Int( TAG_Int(0)));
459 if (!UNTAG_Bool(variable5
)) break; /* while*/
460 variable4
= TAG_Int(UNTAG_Int(variable4
)-UNTAG_Int( TAG_Int(1))) /*i*/;
461 variable5
= TAG_Int(UNTAG_Int( variable3
/*new_start*/)+UNTAG_Int( variable4
/*i*/));
462 variable6
= TAG_Int(UNTAG_Int( variable0
/*start*/)+UNTAG_Int( variable4
/*i*/));
463 variable6
= ((abstract_collection___Map_____bra_t
)CALL( self
,COLOR_abstract_collection___Map_____bra
))( self
, variable6
) /*AbstractArray::[]*/;
464 ((abstract_collection___Map_____braeq_t
)CALL( variable2
/*dest*/,COLOR_abstract_collection___Map_____braeq
))( variable2
/*dest*/, variable5
, variable6
) /*AbstractArray::[]=*/;
465 continue_31
: while(0);
468 tracehead
= trace
.prev
;
471 void array___AbstractArray___output(val_t self
) {
472 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___output
, 186};
477 trace
.prev
= tracehead
; tracehead
= &trace
;
478 variable0
= TAG_Int(0);
479 variable2
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
480 variable1
= variable2
;
481 while (true) { /*while*/
482 variable2
= TAG_Bool(UNTAG_Int( variable0
/*i*/)<UNTAG_Int( variable1
/*l*/));
483 if (!UNTAG_Bool(variable2
)) break; /* while*/
484 variable3
= ((abstract_collection___Map_____bra_t
)CALL( self
,COLOR_abstract_collection___Map_____bra
))( self
, variable0
/*i*/) /*AbstractArray::[]*/;
485 variable2
= variable3
;
486 variable3
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2
/*e*/ == NIT_NULL
/*null*/) || (( variable2
/*e*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable2
/*e*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable2
/*e*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable2
/*e*/,COLOR_kernel___Object_____eqeq
))( variable2
/*e*/, NIT_NULL
/*null*/) /*Object::==*/)))))));
487 if (UNTAG_Bool(variable3
)) { /*if*/
488 ((kernel___Object___output_t
)CALL( variable2
/*e*/,COLOR_kernel___Object___output
))( variable2
/*e*/) /*Object::output*/;
490 variable0
= TAG_Int(UNTAG_Int(variable0
)+UNTAG_Int( TAG_Int(1))) /*i*/;
491 continue_33
: while(0);
494 tracehead
= trace
.prev
;
497 val_t
array___AbstractArray___iterator(val_t self
) {
498 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray___iterator
, 197};
500 trace
.prev
= tracehead
; tracehead
= &trace
;
501 variable0
= NEW_array___ArrayIterator___init( self
); /*new ArrayIterator[E]*/
503 return_label34
: while(false);
504 tracehead
= trace
.prev
;
507 val_t
array___AbstractArray_____eqeq(val_t self
, val_t param0
) {
508 struct trace_t trace
= {NULL
, LOCATE_array___AbstractArray_____eqeq
, 199};
514 trace
.prev
= tracehead
; tracehead
= &trace
;
516 variable1
= TAG_Bool(( variable0
/*o*/==NIT_NULL
) || VAL_ISA( variable0
/*o*/, COLOR_AbstractArray
, ID_AbstractArray
)) /*cast AbstractArray[E]*/;
517 variable1
= TAG_Bool(!UNTAG_Bool(variable1
));
518 if (!UNTAG_Bool(variable1
)) { /* or */
519 variable1
= TAG_Bool(IS_EQUAL_NN( variable0
/*o*/, NIT_NULL
/*null*/));
521 if (UNTAG_Bool(variable1
)) { /*if*/
522 variable1
= TAG_Bool(false);
525 variable1
= TAG_Bool(( variable0
/*o*/==NIT_NULL
) || VAL_ISA( variable0
/*o*/, COLOR_AbstractArray
, ID_AbstractArray
)) /*cast AbstractArray[E]*/;
526 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_array___AbstractArray_____eqeq
, 203); nit_exit(1);}
527 variable2
= ((array___AbstractArray___length_t
)CALL( self
,COLOR_abstract_collection___Collection___length
))( self
) /*AbstractArray::length*/;
528 variable1
= variable2
;
529 variable2
= ((array___AbstractArray___length_t
)CALL( variable0
/*o*/,COLOR_abstract_collection___Collection___length
))( variable0
/*o*/) /*AbstractArray::length*/;
530 variable2
= TAG_Bool((variable2
)!=( variable1
/*l*/));
531 if (UNTAG_Bool(variable2
)) { /*if*/
532 variable1
= TAG_Bool(false);
535 variable2
= TAG_Int(0);
536 while (true) { /*while*/
537 variable3
= TAG_Bool(UNTAG_Int( variable2
/*i*/)<UNTAG_Int( variable1
/*l*/));
538 if (!UNTAG_Bool(variable3
)) break; /* while*/
539 variable3
= ((abstract_collection___Map_____bra_t
)CALL( self
,COLOR_abstract_collection___Map_____bra
))( self
, variable2
/*i*/) /*AbstractArray::[]*/;
540 variable4
= ((abstract_collection___Map_____bra_t
)CALL( variable0
/*o*/,COLOR_abstract_collection___Map_____bra
))( variable0
/*o*/, variable2
/*i*/) /*AbstractArray::[]*/;
541 variable3
= TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3
== variable4
) || ((variable3
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable3
,variable4
)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))(variable3
, variable4
) /*Object::==*/)))))));
542 if (UNTAG_Bool(variable3
)) { /*if*/
543 variable1
= TAG_Bool(false);
546 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(1))) /*i*/;
547 continue_36
: while(0);
550 variable1
= TAG_Bool(true);
552 return_label35
: while(false);
553 tracehead
= trace
.prev
;
556 val_t
array___Array_____bra(val_t self
, val_t param0
) {
557 struct trace_t trace
= {NULL
, LOCATE_array___Array_____bra
, 227};
561 trace
.prev
= tracehead
; tracehead
= &trace
;
563 variable1
= TAG_Bool(UNTAG_Int( variable0
/*index*/)>=UNTAG_Int( TAG_Int(0)));
564 variable2
= variable1
;
565 if (UNTAG_Bool(variable2
)) { /* and */
566 variable2
= ATTR_array___AbstractArray____length( self
) /*Array::_length*/;
567 variable2
= TAG_Bool(UNTAG_Int( variable0
/*index*/)<UNTAG_Int(variable2
));
569 variable1
= variable2
;
570 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
571 variable1
= ATTR_array___Array____items( self
) /*Array::_items*/;
572 variable1
= UNBOX_NativeArray(variable1
)[UNTAG_Int( variable0
/*index*/)];
574 return_label37
: while(false);
575 tracehead
= trace
.prev
;
578 void array___Array_____braeq(val_t self
, val_t param0
, val_t param1
) {
579 struct trace_t trace
= {NULL
, LOCATE_array___Array_____braeq
, 233};
584 trace
.prev
= tracehead
; tracehead
= &trace
;
587 variable2
= TAG_Bool(UNTAG_Int( variable0
/*index*/)>=UNTAG_Int( TAG_Int(0)));
588 variable3
= variable2
;
589 if (UNTAG_Bool(variable3
)) { /* and */
590 variable3
= ATTR_array___AbstractArray____length( self
) /*Array::_length*/;
591 variable3
= TAG_Int(UNTAG_Int(variable3
)+UNTAG_Int( TAG_Int(1)));
592 variable3
= TAG_Bool(UNTAG_Int( variable0
/*index*/)<UNTAG_Int(variable3
));
594 variable2
= variable3
;
595 if (!UNTAG_Bool(variable2
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____braeq
, 235); nit_exit(1);}
596 variable2
= ATTR_array___Array____capacity( self
) /*Array::_capacity*/;
597 variable2
= TAG_Bool(UNTAG_Int(variable2
)<=UNTAG_Int( variable0
/*index*/));
598 if (UNTAG_Bool(variable2
)) { /*if*/
599 variable2
= TAG_Int(UNTAG_Int( variable0
/*index*/)+UNTAG_Int( TAG_Int(1)));
600 ((array___Array___enlarge_t
)CALL( self
,COLOR_array___AbstractArray___enlarge
))( self
, variable2
) /*Array::enlarge*/;
602 variable2
= ATTR_array___AbstractArray____length( self
) /*Array::_length*/;
603 variable2
= TAG_Bool(UNTAG_Int(variable2
)<=UNTAG_Int( variable0
/*index*/));
604 if (UNTAG_Bool(variable2
)) { /*if*/
605 variable2
= TAG_Int(UNTAG_Int( variable0
/*index*/)+UNTAG_Int( TAG_Int(1)));
606 ATTR_array___AbstractArray____length( self
) /*Array::_length*/ = variable2
;
608 variable2
= ATTR_array___Array____items( self
) /*Array::_items*/;
609 UNBOX_NativeArray(variable2
)[UNTAG_Int( variable0
/*index*/)]= variable1
/*item*/;
610 tracehead
= trace
.prev
;
613 void array___Array___enlarge(val_t self
, val_t param0
) {
614 struct trace_t trace
= {NULL
, LOCATE_array___Array___enlarge
, 245};
620 trace
.prev
= tracehead
; tracehead
= &trace
;
622 variable2
= ATTR_array___Array____capacity( self
) /*Array::_capacity*/;
623 variable1
= variable2
;
624 variable2
= TAG_Bool(UNTAG_Int( variable0
/*cap*/)<=UNTAG_Int( variable1
/*c*/));
625 if (UNTAG_Bool(variable2
)) { /*if*/
628 while (true) { /*while*/
629 variable2
= TAG_Bool(UNTAG_Int( variable1
/*c*/)<=UNTAG_Int( variable0
/*cap*/));
630 if (!UNTAG_Bool(variable2
)) break; /* while*/
631 variable2
= TAG_Int(UNTAG_Int( variable1
/*c*/)*UNTAG_Int( TAG_Int(2)));
632 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(2)));
633 variable1
= variable2
/*c=*/;
634 continue_40
: while(0);
637 variable3
= BOX_NativeArray((val_t
*)malloc((UNTAG_Int( variable1
/*c*/) * sizeof(val_t
))));
638 variable2
= variable3
;
639 variable3
= ATTR_array___Array____capacity( self
) /*Array::_capacity*/;
640 variable3
= TAG_Bool(UNTAG_Int(variable3
)>UNTAG_Int( TAG_Int(0)));
641 if (UNTAG_Bool(variable3
)) { /*if*/
642 variable3
= ATTR_array___Array____items( self
) /*Array::_items*/;
643 variable4
= ATTR_array___AbstractArray____length( self
) /*Array::_length*/;
644 (void)memcpy(UNBOX_NativeArray( variable2
/*a*/), UNBOX_NativeArray(variable3
), UNTAG_Int(variable4
)*sizeof(val_t
));
646 ATTR_array___Array____items( self
) /*Array::_items*/ = variable2
/*a*/;
647 ATTR_array___Array____capacity( self
) /*Array::_capacity*/ = variable1
/*c*/;
648 return_label39
: while(false);
649 tracehead
= trace
.prev
;
652 void array___Array___init(val_t self
, int* init_table
) {
653 struct trace_t trace
= {NULL
, LOCATE_array___Array___init
, 256};
654 trace
.prev
= tracehead
; tracehead
= &trace
;
655 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_Array
].i
]) return;
656 ATTR_array___Array____capacity( self
) /*Array::_capacity*/ = TAG_Int(0);
657 ATTR_array___AbstractArray____length( self
) /*Array::_length*/ = TAG_Int(0);
658 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_Array
].i
] = 1;
659 tracehead
= trace
.prev
;
662 void array___Array___with(val_t self
, val_t param0
, int* init_table
) {
663 struct trace_t trace
= {NULL
, LOCATE_array___Array___with
, 263};
666 trace
.prev
= tracehead
; tracehead
= &trace
;
667 /* check if p<Array[E] with p:E */
668 if (( param0
!=NIT_NULL
) && !VAL_ISA( param0
, COLOR_Array
, ID_Array
)) { fprintf(stderr
, "Cast failled (%s: %d)\n", LOCATE_array___Array___init
, 264); nit_exit(1); } /*cast Array[E]*/;
670 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_Array
].i
]) return;
671 variable1
= ATTR_array___Array____items( variable0
/*objects*/) /*Array::_items*/;
672 ATTR_array___Array____items( self
) /*Array::_items*/ = variable1
;
673 variable1
= ATTR_array___Array____capacity( variable0
/*objects*/) /*Array::_capacity*/;
674 ATTR_array___Array____capacity( self
) /*Array::_capacity*/ = variable1
;
675 variable1
= ((array___AbstractArray___length_t
)CALL( variable0
/*objects*/,COLOR_abstract_collection___Collection___length
))( variable0
/*objects*/) /*Array::length*/;
676 ATTR_array___AbstractArray____length( self
) /*Array::_length*/ = variable1
;
677 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_Array
].i
] = 1;
678 tracehead
= trace
.prev
;
681 void array___Array___with_capacity(val_t self
, val_t param0
, int* init_table
) {
682 struct trace_t trace
= {NULL
, LOCATE_array___Array___with_capacity
, 271};
685 trace
.prev
= tracehead
; tracehead
= &trace
;
687 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_Array
].i
]) return;
688 variable1
= TAG_Bool(UNTAG_Int( variable0
/*cap*/)>=UNTAG_Int( TAG_Int(0)));
689 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'positive' ", LOCATE_array___Array___with_capacity
, 274); nit_exit(1);}
690 variable1
= BOX_NativeArray((val_t
*)malloc((UNTAG_Int( variable0
/*cap*/) * sizeof(val_t
))));
691 ATTR_array___Array____items( self
) /*Array::_items*/ = variable1
;
692 ATTR_array___Array____capacity( self
) /*Array::_capacity*/ = variable0
/*cap*/;
693 ATTR_array___AbstractArray____length( self
) /*Array::_length*/ = TAG_Int(0);
694 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_Array
].i
] = 1;
695 tracehead
= trace
.prev
;
698 void array___Array___filled_with(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
699 struct trace_t trace
= {NULL
, LOCATE_array___Array___filled_with
, 280};
704 trace
.prev
= tracehead
; tracehead
= &trace
;
707 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_Array
].i
]) return;
708 variable2
= TAG_Bool(UNTAG_Int( variable1
/*count*/)>=UNTAG_Int( TAG_Int(0)));
709 if (!UNTAG_Bool(variable2
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'positive' ", LOCATE_array___Array___filled_with
, 283); nit_exit(1);}
710 variable2
= BOX_NativeArray((val_t
*)malloc((UNTAG_Int( variable1
/*count*/) * sizeof(val_t
))));
711 ATTR_array___Array____items( self
) /*Array::_items*/ = variable2
;
712 ATTR_array___Array____capacity( self
) /*Array::_capacity*/ = variable1
/*count*/;
713 ATTR_array___AbstractArray____length( self
) /*Array::_length*/ = variable1
/*count*/;
714 variable2
= TAG_Int(0);
715 while (true) { /*while*/
716 variable3
= TAG_Bool(UNTAG_Int( variable2
/*i*/)<UNTAG_Int( variable1
/*count*/));
717 if (!UNTAG_Bool(variable3
)) break; /* while*/
718 ((array___Array_____braeq_t
)CALL( self
,COLOR_abstract_collection___Map_____braeq
))( self
, variable2
/*i*/, variable0
/*value*/) /*Array::[]=*/;
719 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(1))) /*i*/;
720 continue_45
: while(0);
723 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_Array
].i
] = 1;
724 tracehead
= trace
.prev
;
727 void array___Array___with_native(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
728 struct trace_t trace
= {NULL
, LOCATE_array___Array___with_native
, 294};
732 trace
.prev
= tracehead
; tracehead
= &trace
;
735 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_Array
].i
]) return;
736 variable2
= TAG_Bool(UNTAG_Int( variable1
/*size*/)>=UNTAG_Int( TAG_Int(0)));
737 if (!UNTAG_Bool(variable2
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'positive' ", LOCATE_array___Array___with_native
, 297); nit_exit(1);}
738 ATTR_array___Array____items( self
) /*Array::_items*/ = variable0
/*nat*/;
739 ATTR_array___Array____capacity( self
) /*Array::_capacity*/ = variable1
/*size*/;
740 ATTR_array___AbstractArray____length( self
) /*Array::_length*/ = variable1
/*size*/;
741 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_Array
].i
] = 1;
742 tracehead
= trace
.prev
;
745 val_t
array___ArrayIterator___item(val_t self
) {
746 struct trace_t trace
= {NULL
, LOCATE_array___ArrayIterator___item
, 313};
749 trace
.prev
= tracehead
; tracehead
= &trace
;
750 variable0
= ATTR_array___ArrayIterator____array( self
) /*ArrayIterator::_array*/;
751 variable1
= ATTR_array___ArrayIterator____index( self
) /*ArrayIterator::_index*/;
752 variable0
= ((abstract_collection___Map_____bra_t
)CALL(variable0
,COLOR_abstract_collection___Map_____bra
))(variable0
, variable1
) /*AbstractArray::[]*/;
754 return_label47
: while(false);
755 tracehead
= trace
.prev
;
758 void array___ArrayIterator___item__eq(val_t self
, val_t param0
) {
759 struct trace_t trace
= {NULL
, LOCATE_array___ArrayIterator___item__eq
, 315};
763 trace
.prev
= tracehead
; tracehead
= &trace
;
765 variable1
= ATTR_array___ArrayIterator____array( self
) /*ArrayIterator::_array*/;
766 variable2
= ATTR_array___ArrayIterator____index( self
) /*ArrayIterator::_index*/;
767 ((abstract_collection___Map_____braeq_t
)CALL(variable1
,COLOR_abstract_collection___Map_____braeq
))(variable1
, variable2
, variable0
/*e*/) /*AbstractArray::[]=*/;
768 tracehead
= trace
.prev
;
771 val_t
array___ArrayIterator___is_ok(val_t self
) {
772 struct trace_t trace
= {NULL
, LOCATE_array___ArrayIterator___is_ok
, 317};
775 trace
.prev
= tracehead
; tracehead
= &trace
;
776 variable0
= ATTR_array___ArrayIterator____index( self
) /*ArrayIterator::_index*/;
777 variable1
= ATTR_array___ArrayIterator____array( self
) /*ArrayIterator::_array*/;
778 variable1
= ((array___AbstractArray___length_t
)CALL(variable1
,COLOR_abstract_collection___Collection___length
))(variable1
) /*AbstractArray::length*/;
779 variable0
= TAG_Bool(UNTAG_Int(variable0
)<UNTAG_Int(variable1
));
781 return_label49
: while(false);
782 tracehead
= trace
.prev
;
785 void array___ArrayIterator___next(val_t self
) {
786 struct trace_t trace
= {NULL
, LOCATE_array___ArrayIterator___next
, 319};
787 trace
.prev
= tracehead
; tracehead
= &trace
;
788 ATTR_array___ArrayIterator____index( self
) /*ArrayIterator::_index*/ = TAG_Int(UNTAG_Int(ATTR_array___ArrayIterator____index( self
) /*ArrayIterator::_index*/)+UNTAG_Int( TAG_Int(1)));
789 tracehead
= trace
.prev
;
792 void array___ArrayIterator___init(val_t self
, val_t param0
, int* init_table
) {
793 struct trace_t trace
= {NULL
, LOCATE_array___ArrayIterator___init
, 321};
796 trace
.prev
= tracehead
; tracehead
= &trace
;
798 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_ArrayIterator
].i
]) return;
799 variable1
= TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0
/*a*/ == NIT_NULL
/*null*/) || (( variable0
/*a*/ != NIT_NULL
) && UNTAG_Bool(((array___AbstractArray_____eqeq_t
)CALL( variable0
/*a*/,COLOR_kernel___Object_____eqeq
))( variable0
/*a*/, NIT_NULL
/*null*/) /*AbstractArray::==*/)))));
800 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'not_nil' ", LOCATE_array___ArrayIterator___init
, 323); nit_exit(1);}
801 ATTR_array___ArrayIterator____array( self
) /*ArrayIterator::_array*/ = variable0
/*a*/;
802 ATTR_array___ArrayIterator____index( self
) /*ArrayIterator::_index*/ = TAG_Int(0);
803 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_ArrayIterator
].i
] = 1;
804 tracehead
= trace
.prev
;
807 val_t
array___ArrayIterator___index(val_t self
) {
808 struct trace_t trace
= {NULL
, LOCATE_array___ArrayIterator___index
, 328};
809 trace
.prev
= tracehead
; tracehead
= &trace
;
810 tracehead
= trace
.prev
;
811 return ATTR_array___ArrayIterator____index( self
) /*ArrayIterator::_index*/;
813 val_t
array___ArraySet___has(val_t self
, val_t param0
) {
814 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___has
, 340};
817 trace
.prev
= tracehead
; tracehead
= &trace
;
819 variable1
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
820 variable1
= ((array___AbstractArray___has_t
)CALL(variable1
,COLOR_abstract_collection___Collection___has
))(variable1
, variable0
/*e*/) /*Array::has*/;
822 return_label52
: while(false);
823 tracehead
= trace
.prev
;
826 void array___ArraySet___add(val_t self
, val_t param0
) {
827 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___add
, 342};
830 trace
.prev
= tracehead
; tracehead
= &trace
;
832 variable1
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
833 variable1
= ((array___AbstractArray___has_t
)CALL(variable1
,COLOR_abstract_collection___Collection___has
))(variable1
, variable0
/*e*/) /*Array::has*/;
834 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable1
)))) { /*if*/
835 variable1
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
836 ((array___AbstractArray___add_t
)CALL(variable1
,COLOR_abstract_collection___SimpleCollection___add
))(variable1
, variable0
/*e*/) /*Array::add*/;
838 tracehead
= trace
.prev
;
841 val_t
array___ArraySet___is_empty(val_t self
) {
842 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___is_empty
, 344};
844 trace
.prev
= tracehead
; tracehead
= &trace
;
845 variable0
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
846 variable0
= ((array___AbstractArray___is_empty_t
)CALL(variable0
,COLOR_abstract_collection___Collection___is_empty
))(variable0
) /*Array::is_empty*/;
848 return_label54
: while(false);
849 tracehead
= trace
.prev
;
852 val_t
array___ArraySet___length(val_t self
) {
853 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___length
, 346};
855 trace
.prev
= tracehead
; tracehead
= &trace
;
856 variable0
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
857 variable0
= ((array___AbstractArray___length_t
)CALL(variable0
,COLOR_abstract_collection___Collection___length
))(variable0
) /*Array::length*/;
859 return_label55
: while(false);
860 tracehead
= trace
.prev
;
863 val_t
array___ArraySet___first(val_t self
) {
864 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___first
, 348};
866 trace
.prev
= tracehead
; tracehead
= &trace
;
867 variable0
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
868 variable0
= ((array___AbstractArray___length_t
)CALL(variable0
,COLOR_abstract_collection___Collection___length
))(variable0
) /*Array::length*/;
869 variable0
= TAG_Bool(UNTAG_Int(variable0
)>UNTAG_Int( TAG_Int(0)));
870 if (!UNTAG_Bool(variable0
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_array___ArraySet___first
, 350); nit_exit(1);}
871 variable0
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
872 variable0
= ((abstract_collection___IndexedCollection___first_t
)CALL(variable0
,COLOR_abstract_collection___Collection___first
))(variable0
) /*Array::first*/;
874 return_label56
: while(false);
875 tracehead
= trace
.prev
;
878 void array___ArraySet___remove(val_t self
, val_t param0
) {
879 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___remove
, 354};
883 trace
.prev
= tracehead
; tracehead
= &trace
;
885 variable2
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
886 variable2
= ((array___AbstractArray___index_of_t
)CALL(variable2
,COLOR_abstract_collection___IndexedCollection___index_of
))(variable2
, variable0
/*item*/) /*Array::index_of*/;
887 variable1
= variable2
;
888 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)>=UNTAG_Int( TAG_Int(0)));
889 if (UNTAG_Bool(variable2
)) { /*if*/
890 ((array___ArraySet___remove_at_t
)CALL( self
,COLOR_array___ArraySet___remove_at
))( self
, variable1
/*i*/) /*ArraySet::remove_at*/;
892 tracehead
= trace
.prev
;
895 void array___ArraySet___remove_all(val_t self
, val_t param0
) {
896 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___remove_all
, 360};
898 trace
.prev
= tracehead
; tracehead
= &trace
;
900 ((array___ArraySet___remove_t
)CALL( self
,COLOR_abstract_collection___RemovableCollection___remove
))( self
, variable0
/*item*/) /*ArraySet::remove*/;
901 tracehead
= trace
.prev
;
904 void array___ArraySet___clear(val_t self
) {
905 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___clear
, 362};
907 trace
.prev
= tracehead
; tracehead
= &trace
;
908 variable0
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
909 ((array___AbstractArray___clear_t
)CALL(variable0
,COLOR_abstract_collection___RemovableCollection___clear
))(variable0
) /*Array::clear*/;
910 tracehead
= trace
.prev
;
913 val_t
array___ArraySet___iterator(val_t self
) {
914 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___iterator
, 364};
917 trace
.prev
= tracehead
; tracehead
= &trace
;
918 variable0
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
919 variable0
= ((array___AbstractArray___iterator_t
)CALL(variable0
,COLOR_abstract_collection___Collection___iterator
))(variable0
) /*Array::iterator*/;
920 variable1
= NEW_array___ArraySetIterator___init(variable0
); /*new ArraySetIterator[E]*/
921 variable0
= variable1
;
923 return_label60
: while(false);
924 tracehead
= trace
.prev
;
927 void array___ArraySet___enlarge(val_t self
, val_t param0
) {
928 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___enlarge
, 366};
931 trace
.prev
= tracehead
; tracehead
= &trace
;
933 variable1
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
934 ((array___Array___enlarge_t
)CALL(variable1
,COLOR_array___AbstractArray___enlarge
))(variable1
, variable0
/*cap*/) /*Array::enlarge*/;
935 tracehead
= trace
.prev
;
938 void array___ArraySet___remove_at(val_t self
, val_t param0
) {
939 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___remove_at
, 369};
943 trace
.prev
= tracehead
; tracehead
= &trace
;
945 variable1
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
946 variable2
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
947 variable2
= ((abstract_collection___IndexedCollection___last_t
)CALL(variable2
,COLOR_abstract_collection___IndexedCollection___last
))(variable2
) /*Array::last*/;
948 ((array___Array_____braeq_t
)CALL(variable1
,COLOR_abstract_collection___Map_____braeq
))(variable1
, variable0
/*i*/, variable2
) /*Array::[]=*/;
949 variable1
= ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/;
950 ((array___AbstractArray___pop_t
)CALL(variable1
,COLOR_abstract_collection___IndexedCollection___pop
))(variable1
) /*Array::pop*/;
951 tracehead
= trace
.prev
;
954 void array___ArraySet___init(val_t self
, int* init_table
) {
955 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___init
, 375};
957 trace
.prev
= tracehead
; tracehead
= &trace
;
958 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_ArraySet
].i
]) return;
959 variable0
= NEW_array___Array___init(); /*new Array[E]*/
960 ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/ = variable0
;
961 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_ArraySet
].i
] = 1;
962 tracehead
= trace
.prev
;
965 void array___ArraySet___with_capacity(val_t self
, val_t param0
, int* init_table
) {
966 struct trace_t trace
= {NULL
, LOCATE_array___ArraySet___with_capacity
, 378};
969 trace
.prev
= tracehead
; tracehead
= &trace
;
971 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_ArraySet
].i
]) return;
972 variable1
= NEW_array___Array___with_capacity( variable0
/*i*/); /*new Array[E]*/
973 ATTR_array___ArraySet____array( self
) /*ArraySet::_array*/ = variable1
;
974 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_ArraySet
].i
] = 1;
975 tracehead
= trace
.prev
;
978 val_t
array___ArraySetIterator___is_ok(val_t self
) {
979 struct trace_t trace
= {NULL
, LOCATE_array___ArraySetIterator___is_ok
, 386};
981 trace
.prev
= tracehead
; tracehead
= &trace
;
982 variable0
= ATTR_array___ArraySetIterator____iter( self
) /*ArraySetIterator::_iter*/;
983 variable0
= ((array___ArrayIterator___is_ok_t
)CALL(variable0
,COLOR_abstract_collection___Iterator___is_ok
))(variable0
) /*ArrayIterator::is_ok*/;
985 return_label65
: while(false);
986 tracehead
= trace
.prev
;
989 void array___ArraySetIterator___next(val_t self
) {
990 struct trace_t trace
= {NULL
, LOCATE_array___ArraySetIterator___next
, 388};
992 trace
.prev
= tracehead
; tracehead
= &trace
;
993 variable0
= ATTR_array___ArraySetIterator____iter( self
) /*ArraySetIterator::_iter*/;
994 ((array___ArrayIterator___next_t
)CALL(variable0
,COLOR_abstract_collection___Iterator___next
))(variable0
) /*ArrayIterator::next*/;
995 tracehead
= trace
.prev
;
998 val_t
array___ArraySetIterator___item(val_t self
) {
999 struct trace_t trace
= {NULL
, LOCATE_array___ArraySetIterator___item
, 390};
1001 trace
.prev
= tracehead
; tracehead
= &trace
;
1002 variable0
= ATTR_array___ArraySetIterator____iter( self
) /*ArraySetIterator::_iter*/;
1003 variable0
= ((array___ArrayIterator___item_t
)CALL(variable0
,COLOR_abstract_collection___Iterator___item
))(variable0
) /*ArrayIterator::item*/;
1004 goto return_label67
;
1005 return_label67
: while(false);
1006 tracehead
= trace
.prev
;
1009 void array___ArraySetIterator___init(val_t self
, val_t param0
, int* init_table
) {
1010 struct trace_t trace
= {NULL
, LOCATE_array___ArraySetIterator___init
, 392};
1012 trace
.prev
= tracehead
; tracehead
= &trace
;
1014 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_ArraySetIterator
].i
]) return;
1015 ATTR_array___ArraySetIterator____iter( self
) /*ArraySetIterator::_iter*/ = variable0
/*iter*/;
1016 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_ArraySetIterator
].i
] = 1;
1017 tracehead
= trace
.prev
;
1020 val_t
array___ArrayMap_____bra(val_t self
, val_t param0
) {
1021 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap_____bra
, 402};
1028 trace
.prev
= tracehead
; tracehead
= &trace
;
1030 variable2
= ((array___ArrayMap___index_t
)CALL( self
,COLOR_array___ArrayMap___index
))( self
, variable0
/*key*/) /*ArrayMap::index*/;
1031 variable1
= variable2
;
1032 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)>=UNTAG_Int( TAG_Int(0)));
1033 if (UNTAG_Bool(variable2
)) { /*if*/
1034 variable2
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1035 variable3
= variable1
/*i*/;
1036 variable4
= TAG_Bool(UNTAG_Int( variable3
/*index*/)>=UNTAG_Int( TAG_Int(0)));
1037 variable5
= variable4
;
1038 if (UNTAG_Bool(variable5
)) { /* and */
1039 variable5
= variable2
;
1040 variable5
= ATTR_array___AbstractArray____length(variable5
) /*Array::_length*/;
1041 variable5
= TAG_Bool(UNTAG_Int( variable3
/*index*/)<UNTAG_Int(variable5
));
1043 variable4
= variable5
;
1044 if (!UNTAG_Bool(variable4
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
1045 variable4
= variable2
;
1046 variable4
= ATTR_array___Array____items(variable4
) /*Array::_items*/;
1047 variable4
= UNBOX_NativeArray(variable4
)[UNTAG_Int( variable3
/*index*/)];
1048 goto return_label70
;
1049 return_label70
: while(false);
1050 variable2
= variable4
;
1051 variable2
= ((abstract_collection___Couple___second_t
)CALL(variable2
,COLOR_abstract_collection___Couple___second
))(variable2
) /*Couple::second*/;
1052 variable1
= variable2
;
1053 goto return_label69
;
1055 variable1
= NIT_NULL
/*null*/;
1056 goto return_label69
;
1058 return_label69
: while(false);
1059 tracehead
= trace
.prev
;
1062 void array___ArrayMap_____braeq(val_t self
, val_t param0
, val_t param1
) {
1063 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap_____braeq
, 413};
1071 trace
.prev
= tracehead
; tracehead
= &trace
;
1074 variable3
= ((array___ArrayMap___index_t
)CALL( self
,COLOR_array___ArrayMap___index
))( self
, variable0
/*key*/) /*ArrayMap::index*/;
1075 variable2
= variable3
;
1076 variable3
= TAG_Bool(UNTAG_Int( variable2
/*i*/)>=UNTAG_Int( TAG_Int(0)));
1077 if (UNTAG_Bool(variable3
)) { /*if*/
1078 variable3
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1079 variable4
= variable2
/*i*/;
1080 variable5
= TAG_Bool(UNTAG_Int( variable4
/*index*/)>=UNTAG_Int( TAG_Int(0)));
1081 variable6
= variable5
;
1082 if (UNTAG_Bool(variable6
)) { /* and */
1083 variable6
= variable3
;
1084 variable6
= ATTR_array___AbstractArray____length(variable6
) /*Array::_length*/;
1085 variable6
= TAG_Bool(UNTAG_Int( variable4
/*index*/)<UNTAG_Int(variable6
));
1087 variable5
= variable6
;
1088 if (!UNTAG_Bool(variable5
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
1089 variable5
= variable3
;
1090 variable5
= ATTR_array___Array____items(variable5
) /*Array::_items*/;
1091 variable5
= UNBOX_NativeArray(variable5
)[UNTAG_Int( variable4
/*index*/)];
1092 goto return_label72
;
1093 return_label72
: while(false);
1094 variable3
= variable5
;
1095 ((abstract_collection___Couple___second__eq_t
)CALL(variable3
,COLOR_abstract_collection___Couple___second__eq
))(variable3
, variable1
/*item*/) /*Couple::second=*/;
1097 variable3
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1098 variable4
= NEW_abstract_collection___Couple___init( variable0
/*key*/, variable1
/*item*/); /*new Couple[K, E]*/
1099 ((array___AbstractArray___push_t
)CALL(variable3
,COLOR_abstract_collection___IndexedCollection___push
))(variable3
, variable4
) /*Array::push*/;
1101 tracehead
= trace
.prev
;
1104 val_t
array___ArrayMap___has_key(val_t self
, val_t param0
) {
1105 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___has_key
, 424};
1108 trace
.prev
= tracehead
; tracehead
= &trace
;
1110 variable1
= ((array___ArrayMap___index_t
)CALL( self
,COLOR_array___ArrayMap___index
))( self
, variable0
/*key*/) /*ArrayMap::index*/;
1111 variable1
= TAG_Bool(UNTAG_Int(variable1
)>=UNTAG_Int( TAG_Int(0)));
1112 goto return_label73
;
1113 return_label73
: while(false);
1114 tracehead
= trace
.prev
;
1117 val_t
array___ArrayMap___has(val_t self
, val_t param0
) {
1118 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___has
, 427};
1123 trace
.prev
= tracehead
; tracehead
= &trace
;
1125 variable1
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1126 variable1
= ((array___AbstractArray___iterator_t
)CALL(variable1
,COLOR_abstract_collection___Collection___iterator
))(variable1
) /*Array::iterator*/;
1127 while (true) { /*for*/
1128 variable2
= ((array___ArrayIterator___is_ok_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___is_ok
))(variable1
) /*ArrayIterator::is_ok*/;
1129 if (!UNTAG_Bool(variable2
)) break; /*for*/
1130 variable2
= ((array___ArrayIterator___item_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___item
))(variable1
) /*ArrayIterator::item*/;
1131 variable3
= ((abstract_collection___Couple___second_t
)CALL( variable2
/*i*/,COLOR_abstract_collection___Couple___second
))( variable2
/*i*/) /*Couple::second*/;
1132 variable3
= TAG_Bool((variable3
== variable0
/*item*/) || ((variable3
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable3
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))(variable3
, variable0
/*item*/) /*Object::==*/)))));
1133 if (UNTAG_Bool(variable3
)) { /*if*/
1134 variable1
= TAG_Bool(true);
1135 goto return_label74
;
1137 continue_75
: while(0);
1138 ((array___ArrayIterator___next_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___next
))(variable1
) /*ArrayIterator::next*/;
1141 variable1
= TAG_Bool(false);
1142 goto return_label74
;
1143 return_label74
: while(false);
1144 tracehead
= trace
.prev
;
1147 val_t
array___ArrayMap___has_only(val_t self
, val_t param0
) {
1148 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___has_only
, 434};
1153 trace
.prev
= tracehead
; tracehead
= &trace
;
1155 variable1
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1156 variable1
= ((array___AbstractArray___iterator_t
)CALL(variable1
,COLOR_abstract_collection___Collection___iterator
))(variable1
) /*Array::iterator*/;
1157 while (true) { /*for*/
1158 variable2
= ((array___ArrayIterator___is_ok_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___is_ok
))(variable1
) /*ArrayIterator::is_ok*/;
1159 if (!UNTAG_Bool(variable2
)) break; /*for*/
1160 variable2
= ((array___ArrayIterator___item_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___item
))(variable1
) /*ArrayIterator::item*/;
1161 variable3
= ((abstract_collection___Couple___second_t
)CALL( variable2
/*i*/,COLOR_abstract_collection___Couple___second
))( variable2
/*i*/) /*Couple::second*/;
1162 variable3
= TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3
== variable0
/*item*/) || ((variable3
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable3
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))(variable3
, variable0
/*item*/) /*Object::==*/)))))));
1163 if (UNTAG_Bool(variable3
)) { /*if*/
1164 variable1
= TAG_Bool(false);
1165 goto return_label76
;
1167 continue_77
: while(0);
1168 ((array___ArrayIterator___next_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___next
))(variable1
) /*ArrayIterator::next*/;
1171 variable1
= TAG_Bool(true);
1172 goto return_label76
;
1173 return_label76
: while(false);
1174 tracehead
= trace
.prev
;
1177 val_t
array___ArrayMap___length(val_t self
) {
1178 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___length
, 441};
1180 trace
.prev
= tracehead
; tracehead
= &trace
;
1181 variable0
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1182 variable0
= ((array___AbstractArray___length_t
)CALL(variable0
,COLOR_abstract_collection___Collection___length
))(variable0
) /*Array::length*/;
1183 goto return_label78
;
1184 return_label78
: while(false);
1185 tracehead
= trace
.prev
;
1188 val_t
array___ArrayMap___first(val_t self
) {
1189 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___first
, 444};
1191 trace
.prev
= tracehead
; tracehead
= &trace
;
1192 variable0
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1193 variable0
= ((abstract_collection___IndexedCollection___first_t
)CALL(variable0
,COLOR_abstract_collection___Collection___first
))(variable0
) /*Array::first*/;
1194 variable0
= ((abstract_collection___Couple___first_t
)CALL(variable0
,COLOR_abstract_collection___Couple___first
))(variable0
) /*Couple::first*/;
1195 goto return_label79
;
1196 return_label79
: while(false);
1197 tracehead
= trace
.prev
;
1200 val_t
array___ArrayMap___count(val_t self
, val_t param0
) {
1201 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___count
, 446};
1207 trace
.prev
= tracehead
; tracehead
= &trace
;
1209 variable1
= TAG_Int(0);
1210 variable2
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1211 variable2
= ((array___AbstractArray___iterator_t
)CALL(variable2
,COLOR_abstract_collection___Collection___iterator
))(variable2
) /*Array::iterator*/;
1212 while (true) { /*for*/
1213 variable3
= ((array___ArrayIterator___is_ok_t
)CALL(variable2
,COLOR_abstract_collection___Iterator___is_ok
))(variable2
) /*ArrayIterator::is_ok*/;
1214 if (!UNTAG_Bool(variable3
)) break; /*for*/
1215 variable3
= ((array___ArrayIterator___item_t
)CALL(variable2
,COLOR_abstract_collection___Iterator___item
))(variable2
) /*ArrayIterator::item*/;
1216 variable4
= ((abstract_collection___Couple___second_t
)CALL( variable3
/*i*/,COLOR_abstract_collection___Couple___second
))( variable3
/*i*/) /*Couple::second*/;
1217 variable4
= TAG_Bool((variable4
== variable0
/*item*/) || ((variable4
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable4
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable4
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable4
,COLOR_kernel___Object_____eqeq
))(variable4
, variable0
/*item*/) /*Object::==*/)))));
1218 if (UNTAG_Bool(variable4
)) { /*if*/
1219 variable1
= TAG_Int(UNTAG_Int(variable1
)+UNTAG_Int( TAG_Int(1))) /*nb*/;
1221 continue_81
: while(0);
1222 ((array___ArrayIterator___next_t
)CALL(variable2
,COLOR_abstract_collection___Iterator___next
))(variable2
) /*ArrayIterator::next*/;
1225 variable1
= variable1
/*nb*/;
1226 goto return_label80
;
1227 return_label80
: while(false);
1228 tracehead
= trace
.prev
;
1231 val_t
array___ArrayMap___iterator(val_t self
) {
1232 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___iterator
, 454};
1235 trace
.prev
= tracehead
; tracehead
= &trace
;
1236 variable0
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1237 variable0
= ((array___AbstractArray___iterator_t
)CALL(variable0
,COLOR_abstract_collection___Collection___iterator
))(variable0
) /*Array::iterator*/;
1238 variable1
= NEW_abstract_collection___CoupleMapIterator___init(variable0
); /*new CoupleMapIterator[K, E]*/
1239 variable0
= variable1
;
1240 goto return_label82
;
1241 return_label82
: while(false);
1242 tracehead
= trace
.prev
;
1245 val_t
array___ArrayMap___is_empty(val_t self
) {
1246 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___is_empty
, 456};
1248 trace
.prev
= tracehead
; tracehead
= &trace
;
1249 variable0
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1250 variable0
= ((array___AbstractArray___is_empty_t
)CALL(variable0
,COLOR_abstract_collection___Collection___is_empty
))(variable0
) /*Array::is_empty*/;
1251 goto return_label83
;
1252 return_label83
: while(false);
1253 tracehead
= trace
.prev
;
1256 void array___ArrayMap___remove(val_t self
, val_t param0
) {
1257 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___remove
, 458};
1264 trace
.prev
= tracehead
; tracehead
= &trace
;
1266 variable2
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1267 variable2
= ((array___AbstractArray___length_t
)CALL(variable2
,COLOR_abstract_collection___Collection___length
))(variable2
) /*Array::length*/;
1268 variable2
= TAG_Int(UNTAG_Int(variable2
)-UNTAG_Int( TAG_Int(1)));
1269 variable1
= variable2
;
1270 while (true) { /*while*/
1271 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)>=UNTAG_Int( TAG_Int(0)));
1272 if (!UNTAG_Bool(variable2
)) break; /* while*/
1273 variable2
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1274 variable3
= variable1
/*i*/;
1275 variable4
= TAG_Bool(UNTAG_Int( variable3
/*index*/)>=UNTAG_Int( TAG_Int(0)));
1276 variable5
= variable4
;
1277 if (UNTAG_Bool(variable5
)) { /* and */
1278 variable5
= variable2
;
1279 variable5
= ATTR_array___AbstractArray____length(variable5
) /*Array::_length*/;
1280 variable5
= TAG_Bool(UNTAG_Int( variable3
/*index*/)<UNTAG_Int(variable5
));
1282 variable4
= variable5
;
1283 if (!UNTAG_Bool(variable4
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
1284 variable4
= variable2
;
1285 variable4
= ATTR_array___Array____items(variable4
) /*Array::_items*/;
1286 variable4
= UNBOX_NativeArray(variable4
)[UNTAG_Int( variable3
/*index*/)];
1287 goto return_label86
;
1288 return_label86
: while(false);
1289 variable2
= variable4
;
1290 variable2
= ((abstract_collection___Couple___second_t
)CALL(variable2
,COLOR_abstract_collection___Couple___second
))(variable2
) /*Couple::second*/;
1291 variable2
= TAG_Bool((variable2
== variable0
/*item*/) || ((variable2
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable2
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable2
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable2
,COLOR_kernel___Object_____eqeq
))(variable2
, variable0
/*item*/) /*Object::==*/)))));
1292 if (UNTAG_Bool(variable2
)) { /*if*/
1293 ((array___ArrayMap___remove_at_index_t
)CALL( self
,COLOR_array___ArrayMap___remove_at_index
))( self
, variable1
/*i*/) /*ArrayMap::remove_at_index*/;
1294 goto return_label84
;
1296 variable1
= TAG_Int(UNTAG_Int(variable1
)-UNTAG_Int( TAG_Int(1))) /*i*/;
1297 continue_85
: while(0);
1300 return_label84
: while(false);
1301 tracehead
= trace
.prev
;
1304 void array___ArrayMap___remove_all(val_t self
, val_t param0
) {
1305 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___remove_all
, 470};
1312 trace
.prev
= tracehead
; tracehead
= &trace
;
1314 variable2
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1315 variable2
= ((array___AbstractArray___length_t
)CALL(variable2
,COLOR_abstract_collection___Collection___length
))(variable2
) /*Array::length*/;
1316 variable2
= TAG_Int(UNTAG_Int(variable2
)-UNTAG_Int( TAG_Int(1)));
1317 variable1
= variable2
;
1318 while (true) { /*while*/
1319 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)>=UNTAG_Int( TAG_Int(0)));
1320 if (!UNTAG_Bool(variable2
)) break; /* while*/
1321 variable2
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1322 variable3
= variable1
/*i*/;
1323 variable4
= TAG_Bool(UNTAG_Int( variable3
/*index*/)>=UNTAG_Int( TAG_Int(0)));
1324 variable5
= variable4
;
1325 if (UNTAG_Bool(variable5
)) { /* and */
1326 variable5
= variable2
;
1327 variable5
= ATTR_array___AbstractArray____length(variable5
) /*Array::_length*/;
1328 variable5
= TAG_Bool(UNTAG_Int( variable3
/*index*/)<UNTAG_Int(variable5
));
1330 variable4
= variable5
;
1331 if (!UNTAG_Bool(variable4
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
1332 variable4
= variable2
;
1333 variable4
= ATTR_array___Array____items(variable4
) /*Array::_items*/;
1334 variable4
= UNBOX_NativeArray(variable4
)[UNTAG_Int( variable3
/*index*/)];
1335 goto return_label89
;
1336 return_label89
: while(false);
1337 variable2
= variable4
;
1338 variable2
= ((abstract_collection___Couple___second_t
)CALL(variable2
,COLOR_abstract_collection___Couple___second
))(variable2
) /*Couple::second*/;
1339 variable2
= TAG_Bool((variable2
== variable0
/*item*/) || ((variable2
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable2
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable2
, variable0
/*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable2
,COLOR_kernel___Object_____eqeq
))(variable2
, variable0
/*item*/) /*Object::==*/)))));
1340 if (UNTAG_Bool(variable2
)) { /*if*/
1341 ((array___ArrayMap___remove_at_index_t
)CALL( self
,COLOR_array___ArrayMap___remove_at_index
))( self
, variable1
/*i*/) /*ArrayMap::remove_at_index*/;
1343 variable1
= TAG_Int(UNTAG_Int(variable1
)-UNTAG_Int( TAG_Int(1))) /*i*/;
1344 continue_88
: while(0);
1347 tracehead
= trace
.prev
;
1350 void array___ArrayMap___remove_at(val_t self
, val_t param0
) {
1351 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___remove_at
, 481};
1355 trace
.prev
= tracehead
; tracehead
= &trace
;
1357 variable2
= ((array___ArrayMap___index_t
)CALL( self
,COLOR_array___ArrayMap___index
))( self
, variable0
/*key*/) /*ArrayMap::index*/;
1358 variable1
= variable2
;
1359 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)>=UNTAG_Int( TAG_Int(0)));
1360 if (UNTAG_Bool(variable2
)) { /*if*/
1361 ((array___ArrayMap___remove_at_index_t
)CALL( self
,COLOR_array___ArrayMap___remove_at_index
))( self
, variable1
/*i*/) /*ArrayMap::remove_at_index*/;
1363 tracehead
= trace
.prev
;
1366 void array___ArrayMap___clear(val_t self
) {
1367 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___clear
, 487};
1369 trace
.prev
= tracehead
; tracehead
= &trace
;
1370 variable0
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1371 ((array___AbstractArray___clear_t
)CALL(variable0
,COLOR_abstract_collection___RemovableCollection___clear
))(variable0
) /*Array::clear*/;
1372 tracehead
= trace
.prev
;
1375 void array___ArrayMap___enlarge(val_t self
, val_t param0
) {
1376 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___enlarge
, 489};
1379 trace
.prev
= tracehead
; tracehead
= &trace
;
1381 variable1
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1382 ((array___Array___enlarge_t
)CALL(variable1
,COLOR_array___AbstractArray___enlarge
))(variable1
, variable0
/*cap*/) /*Array::enlarge*/;
1383 tracehead
= trace
.prev
;
1386 val_t
array___ArrayMap___couple_at(val_t self
, val_t param0
) {
1387 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___couple_at
, 492};
1394 trace
.prev
= tracehead
; tracehead
= &trace
;
1396 variable2
= ((array___ArrayMap___index_t
)CALL( self
,COLOR_array___ArrayMap___index
))( self
, variable0
/*key*/) /*ArrayMap::index*/;
1397 variable1
= variable2
;
1398 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)>=UNTAG_Int( TAG_Int(0)));
1399 if (UNTAG_Bool(variable2
)) { /*if*/
1400 variable2
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1401 variable3
= variable1
/*i*/;
1402 variable4
= TAG_Bool(UNTAG_Int( variable3
/*index*/)>=UNTAG_Int( TAG_Int(0)));
1403 variable5
= variable4
;
1404 if (UNTAG_Bool(variable5
)) { /* and */
1405 variable5
= variable2
;
1406 variable5
= ATTR_array___AbstractArray____length(variable5
) /*Array::_length*/;
1407 variable5
= TAG_Bool(UNTAG_Int( variable3
/*index*/)<UNTAG_Int(variable5
));
1409 variable4
= variable5
;
1410 if (!UNTAG_Bool(variable4
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
1411 variable4
= variable2
;
1412 variable4
= ATTR_array___Array____items(variable4
) /*Array::_items*/;
1413 variable4
= UNBOX_NativeArray(variable4
)[UNTAG_Int( variable3
/*index*/)];
1414 goto return_label94
;
1415 return_label94
: while(false);
1416 variable2
= variable4
;
1417 variable1
= variable2
;
1418 goto return_label93
;
1420 variable1
= NIT_NULL
/*null*/;
1421 goto return_label93
;
1423 return_label93
: while(false);
1424 tracehead
= trace
.prev
;
1427 void array___ArrayMap___remove_at_index(val_t self
, val_t param0
) {
1428 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___remove_at_index
, 505};
1432 trace
.prev
= tracehead
; tracehead
= &trace
;
1434 variable1
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1435 variable2
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1436 variable2
= ((abstract_collection___IndexedCollection___last_t
)CALL(variable2
,COLOR_abstract_collection___IndexedCollection___last
))(variable2
) /*Array::last*/;
1437 ((array___Array_____braeq_t
)CALL(variable1
,COLOR_abstract_collection___Map_____braeq
))(variable1
, variable0
/*i*/, variable2
) /*Array::[]=*/;
1438 variable1
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1439 ((array___AbstractArray___pop_t
)CALL(variable1
,COLOR_abstract_collection___IndexedCollection___pop
))(variable1
) /*Array::pop*/;
1440 tracehead
= trace
.prev
;
1443 val_t
array___ArrayMap___index(val_t self
, val_t param0
) {
1444 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___index
, 515};
1452 trace
.prev
= tracehead
; tracehead
= &trace
;
1454 variable2
= ATTR_array___ArrayMap____last_index( self
) /*ArrayMap::_last_index*/;
1455 variable1
= variable2
;
1456 variable2
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1457 variable2
= ((array___AbstractArray___length_t
)CALL(variable2
,COLOR_abstract_collection___Collection___length
))(variable2
) /*Array::length*/;
1458 variable2
= TAG_Bool(UNTAG_Int( variable1
/*l*/)<UNTAG_Int(variable2
));
1459 variable3
= variable2
;
1460 if (UNTAG_Bool(variable3
)) { /* and */
1461 variable3
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1462 variable4
= variable1
/*l*/;
1463 variable5
= TAG_Bool(UNTAG_Int( variable4
/*index*/)>=UNTAG_Int( TAG_Int(0)));
1464 variable6
= variable5
;
1465 if (UNTAG_Bool(variable6
)) { /* and */
1466 variable6
= variable3
;
1467 variable6
= ATTR_array___AbstractArray____length(variable6
) /*Array::_length*/;
1468 variable6
= TAG_Bool(UNTAG_Int( variable4
/*index*/)<UNTAG_Int(variable6
));
1470 variable5
= variable6
;
1471 if (!UNTAG_Bool(variable5
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
1472 variable5
= variable3
;
1473 variable5
= ATTR_array___Array____items(variable5
) /*Array::_items*/;
1474 variable5
= UNBOX_NativeArray(variable5
)[UNTAG_Int( variable4
/*index*/)];
1475 goto return_label97
;
1476 return_label97
: while(false);
1477 variable3
= variable5
;
1478 variable3
= ((abstract_collection___Couple___first_t
)CALL(variable3
,COLOR_abstract_collection___Couple___first
))(variable3
) /*Couple::first*/;
1479 variable3
= TAG_Bool((variable3
== variable0
/*key*/) || ((variable3
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable3
, variable0
/*key*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))(variable3
, variable0
/*key*/) /*Object::==*/)))));
1481 variable2
= variable3
;
1482 if (UNTAG_Bool(variable2
)) { /*if*/
1483 variable1
= variable1
/*l*/;
1484 goto return_label96
;
1486 variable2
= TAG_Int(0);
1487 while (true) { /*while*/
1488 variable3
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1489 variable3
= ((array___AbstractArray___length_t
)CALL(variable3
,COLOR_abstract_collection___Collection___length
))(variable3
) /*Array::length*/;
1490 variable3
= TAG_Bool(UNTAG_Int( variable2
/*i*/)<UNTAG_Int(variable3
));
1491 if (!UNTAG_Bool(variable3
)) break; /* while*/
1492 variable3
= ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/;
1493 variable4
= variable2
/*i*/;
1494 variable5
= TAG_Bool(UNTAG_Int( variable4
/*index*/)>=UNTAG_Int( TAG_Int(0)));
1495 variable6
= variable5
;
1496 if (UNTAG_Bool(variable6
)) { /* and */
1497 variable6
= variable3
;
1498 variable6
= ATTR_array___AbstractArray____length(variable6
) /*Array::_length*/;
1499 variable6
= TAG_Bool(UNTAG_Int( variable4
/*index*/)<UNTAG_Int(variable6
));
1501 variable5
= variable6
;
1502 if (!UNTAG_Bool(variable5
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
1503 variable5
= variable3
;
1504 variable5
= ATTR_array___Array____items(variable5
) /*Array::_items*/;
1505 variable5
= UNBOX_NativeArray(variable5
)[UNTAG_Int( variable4
/*index*/)];
1506 goto return_label99
;
1507 return_label99
: while(false);
1508 variable3
= variable5
;
1509 variable3
= ((abstract_collection___Couple___first_t
)CALL(variable3
,COLOR_abstract_collection___Couple___first
))(variable3
) /*Couple::first*/;
1510 variable3
= TAG_Bool((variable3
== variable0
/*key*/) || ((variable3
!= NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable3
, variable0
/*key*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable3
,COLOR_kernel___Object_____eqeq
))(variable3
, variable0
/*key*/) /*Object::==*/)))));
1511 if (UNTAG_Bool(variable3
)) { /*if*/
1512 ATTR_array___ArrayMap____last_index( self
) /*ArrayMap::_last_index*/ = variable2
/*i*/;
1513 variable1
= variable2
/*i*/;
1514 goto return_label96
;
1516 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(1))) /*i*/;
1517 continue_98
: while(0);
1520 variable3
= TAG_Int(-UNTAG_Int( TAG_Int(1)));
1521 variable1
= variable3
;
1522 goto return_label96
;
1523 return_label96
: while(false);
1524 tracehead
= trace
.prev
;
1527 void array___ArrayMap___init(val_t self
, int* init_table
) {
1528 struct trace_t trace
= {NULL
, LOCATE_array___ArrayMap___init
, 533};
1530 trace
.prev
= tracehead
; tracehead
= &trace
;
1531 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_ArrayMap
].i
]) return;
1532 variable0
= NEW_array___Array___init(); /*new Array[Couple[K, E]]*/
1533 ATTR_array___ArrayMap____items( self
) /*ArrayMap::_items*/ = variable0
;
1534 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_ArrayMap
].i
] = 1;
1535 tracehead
= trace
.prev
;
1538 val_t
array___Iterator___to_a(val_t self
) {
1539 struct trace_t trace
= {NULL
, LOCATE_array___Iterator___to_a
, 543};
1542 trace
.prev
= tracehead
; tracehead
= &trace
;
1543 variable1
= NEW_array___Array___init(); /*new Array[E]*/
1544 variable0
= variable1
;
1545 while (true) { /*while*/
1546 variable1
= ((abstract_collection___Iterator___is_ok_t
)CALL( self
,COLOR_abstract_collection___Iterator___is_ok
))( self
) /*Iterator::is_ok*/;
1547 if (!UNTAG_Bool(variable1
)) break; /* while*/
1548 variable1
= ((abstract_collection___Iterator___item_t
)CALL( self
,COLOR_abstract_collection___Iterator___item
))( self
) /*Iterator::item*/;
1549 ((array___AbstractArray___add_t
)CALL( variable0
/*res*/,COLOR_abstract_collection___SimpleCollection___add
))( variable0
/*res*/, variable1
) /*Array::add*/;
1550 ((abstract_collection___Iterator___next_t
)CALL( self
,COLOR_abstract_collection___Iterator___next
))( self
) /*Iterator::next*/;
1551 continue_102
: while(0);
1553 break_102
: while(0);
1554 variable0
= variable0
/*res*/;
1555 goto return_label101
;
1556 return_label101
: while(false);
1557 tracehead
= trace
.prev
;
1560 val_t
array___Collection___to_a(val_t self
) {
1561 struct trace_t trace
= {NULL
, LOCATE_array___Collection___to_a
, 556};
1563 trace
.prev
= tracehead
; tracehead
= &trace
;
1564 variable0
= ((abstract_collection___Collection___iterator_t
)CALL( self
,COLOR_abstract_collection___Collection___iterator
))( self
) /*Collection::iterator*/;
1565 variable0
= ((array___Iterator___to_a_t
)CALL(variable0
,COLOR_array___Iterator___to_a
))(variable0
) /*Iterator::to_a*/;
1566 goto return_label103
;
1567 return_label103
: while(false);
1568 tracehead
= trace
.prev
;
1571 val_t
array___ArrayCapable___calloc_array(val_t self
, val_t param0
) {
1572 struct trace_t trace
= {NULL
, LOCATE_array___ArrayCapable___calloc_array
, 567};
1573 trace
.prev
= tracehead
; tracehead
= &trace
;
1574 tracehead
= trace
.prev
;
1575 return BOX_NativeArray((val_t
*)malloc((UNTAG_Int( param0
) * sizeof(val_t
))));
1577 val_t
array___NativeArray_____bra(val_t self
, val_t param0
) {
1578 struct trace_t trace
= {NULL
, LOCATE_array___NativeArray_____bra
, 573};
1579 trace
.prev
= tracehead
; tracehead
= &trace
;
1580 tracehead
= trace
.prev
;
1581 return UNBOX_NativeArray( self
)[UNTAG_Int( param0
)];
1583 void array___NativeArray_____braeq(val_t self
, val_t param0
, val_t param1
) {
1584 struct trace_t trace
= {NULL
, LOCATE_array___NativeArray_____braeq
, 574};
1585 trace
.prev
= tracehead
; tracehead
= &trace
;
1586 UNBOX_NativeArray( self
)[UNTAG_Int( param0
)]= param1
;
1587 tracehead
= trace
.prev
;
1590 void array___NativeArray___copy_to(val_t self
, val_t param0
, val_t param1
) {
1591 struct trace_t trace
= {NULL
, LOCATE_array___NativeArray___copy_to
, 575};
1592 trace
.prev
= tracehead
; tracehead
= &trace
;
1593 (void)memcpy(UNBOX_NativeArray( param0
), UNBOX_NativeArray( self
), UNTAG_Int( param1
)*sizeof(val_t
));
1594 tracehead
= trace
.prev
;