1 /* This C file is generated by NIT to compile module sorter. */
2 #include "sorter._sep.h"
3 val_t
sorter___AbstractSorter___compare(val_t p0
, val_t p1
, val_t p2
){
4 struct {struct stack_frame_t me
;} fra
;
6 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
7 fra
.me
.file
= LOCATE_sorter
;
9 fra
.me
.meth
= LOCATE_sorter___AbstractSorter___compare
;
12 /* ./../lib/standard//collection//sorter.nit:22 */
13 nit_abort("Deferred method called", NULL
, LOCATE_sorter
, 22);
14 stack_frame_head
= fra
.me
.prev
;
17 void sorter___AbstractSorter___sort(val_t p0
, val_t p1
){
18 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
23 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
24 fra
.me
.file
= LOCATE_sorter
;
26 fra
.me
.meth
= LOCATE_sorter___AbstractSorter___sort
;
29 fra
.me
.REG
[0] = NIT_NULL
;
30 fra
.me
.REG
[1] = NIT_NULL
;
33 /* ./../lib/standard//collection//sorter.nit:30 */
35 /* ./../lib/standard//collection//array.nit:23 */
36 REGB1
= TAG_Bool(ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
37 if (UNTAG_Bool(REGB1
)) {
39 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array
, 23);
41 REGB1
= ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[1]);
42 /* ./../lib/standard//collection//sorter.nit:30 */
44 /* ./../lib/standard//kernel.nit:217 */
45 REGB2
= TAG_Int(UNTAG_Int(REGB1
)-UNTAG_Int(REGB2
));
46 /* ./../lib/standard//collection//sorter.nit:30 */
47 CALL_sorter___AbstractSorter___sub_sort(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], REGB0
, REGB2
);
48 stack_frame_head
= fra
.me
.prev
;
51 void sorter___AbstractSorter___sub_sort(val_t p0
, val_t p1
, val_t p2
, val_t p3
){
52 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
57 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
58 fra
.me
.file
= LOCATE_sorter
;
60 fra
.me
.meth
= LOCATE_sorter___AbstractSorter___sub_sort
;
63 fra
.me
.REG
[0] = NIT_NULL
;
64 fra
.me
.REG
[1] = NIT_NULL
;
69 /* ./../lib/standard//kernel.nit:213 */
70 REGB2
= TAG_Bool(UNTAG_Int(REGB0
)>=UNTAG_Int(REGB1
));
71 /* ./../lib/standard//collection//sorter.nit:35 */
72 if (UNTAG_Bool(REGB2
)) {
73 /* ./../lib/standard//collection//sorter.nit:36 */
76 /* ./../lib/standard//collection//sorter.nit:37 */
78 /* ./../lib/standard//kernel.nit:215 */
79 REGB2
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB2
));
80 /* ./../lib/standard//kernel.nit:212 */
81 REGB2
= TAG_Bool(UNTAG_Int(REGB2
)<UNTAG_Int(REGB1
));
82 /* ./../lib/standard//collection//sorter.nit:37 */
83 if (UNTAG_Bool(REGB2
)) {
84 /* ./../lib/standard//collection//sorter.nit:38 */
85 CALL_sorter___AbstractSorter___quick_sort(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], REGB0
, REGB1
);
87 /* ./../lib/standard//collection//sorter.nit:40 */
88 CALL_sorter___AbstractSorter___bubble_sort(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], REGB0
, REGB1
);
92 stack_frame_head
= fra
.me
.prev
;
95 void sorter___AbstractSorter___quick_sort(val_t p0
, val_t p1
, val_t p2
, val_t p3
){
96 struct {struct stack_frame_t me
; val_t MORE_REG
[4];} fra
;
105 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
106 fra
.me
.file
= LOCATE_sorter
;
108 fra
.me
.meth
= LOCATE_sorter___AbstractSorter___quick_sort
;
109 fra
.me
.has_broke
= 0;
111 fra
.me
.REG
[0] = NIT_NULL
;
112 fra
.me
.REG
[1] = NIT_NULL
;
113 fra
.me
.REG
[2] = NIT_NULL
;
114 fra
.me
.REG
[3] = NIT_NULL
;
115 fra
.me
.REG
[4] = NIT_NULL
;
120 /* ./../lib/standard//collection//array.nit:243 */
121 fra
.me
.REG
[2] = fra
.me
.REG
[1];
123 /* ./../lib/standard//collection//array.nit:245 */
125 /* ./../lib/standard//kernel.nit:213 */
126 REGB3
= TAG_Bool(UNTAG_Int(REGB2
)>=UNTAG_Int(REGB3
));
127 /* ./../lib/standard//collection//array.nit:245 */
128 if (UNTAG_Bool(REGB3
)) {
129 REGB3
= TAG_Bool(ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[2])!=NIT_NULL
);
130 if (UNTAG_Bool(REGB3
)) {
132 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array
, 245);
134 REGB3
= ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[2]);
135 /* ./../lib/standard//kernel.nit:212 */
136 REGB3
= TAG_Bool(UNTAG_Int(REGB2
)<UNTAG_Int(REGB3
));
138 /* ./../lib/standard//collection//array.nit:245 */
139 REGB4
= TAG_Bool(false);
142 if (UNTAG_Bool(REGB3
)) {
144 nit_abort("Assert %s failed", "'index'", LOCATE_array
, 245);
146 /* ./../lib/standard//collection//array.nit:246 */
147 fra
.me
.REG
[2] = ATTR_array___Array____items(fra
.me
.REG
[2]);
148 REGB3
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
149 if (UNTAG_Bool(REGB3
)) {
150 nit_abort("Reciever is null", NULL
, LOCATE_array
, 246);
152 /* ./../lib/standard//collection//array.nit:654 */
153 fra
.me
.REG
[2] = ((Nit_NativeArray
)fra
.me
.REG
[2])->val
[UNTAG_Int(REGB2
)];
154 /* ./../lib/standard//collection//array.nit:246 */
157 /* ./../lib/standard//collection//sorter.nit:48 */
159 /* ./../lib/standard//collection//sorter.nit:49 */
161 /* ./../lib/standard//collection//sorter.nit:50 */
163 /* ./../lib/standard//kernel.nit:214 */
164 REGB4
= TAG_Bool(UNTAG_Int(REGB3
)>UNTAG_Int(REGB2
));
165 /* ./../lib/standard//collection//sorter.nit:50 */
166 if (UNTAG_Bool(REGB4
)) {
167 /* ./../lib/standard//collection//sorter.nit:51 */
169 /* ./../lib/standard//kernel.nit:211 */
170 REGB4
= TAG_Bool(UNTAG_Int(REGB2
)<=UNTAG_Int(REGB1
));
171 /* ./../lib/standard//collection//sorter.nit:51 */
172 if (UNTAG_Bool(REGB4
)) {
173 /* ./../lib/standard//collection//array.nit:243 */
174 fra
.me
.REG
[3] = fra
.me
.REG
[1];
176 /* ./../lib/standard//collection//array.nit:245 */
178 /* ./../lib/standard//kernel.nit:213 */
179 REGB5
= TAG_Bool(UNTAG_Int(REGB4
)>=UNTAG_Int(REGB5
));
180 /* ./../lib/standard//collection//array.nit:245 */
181 if (UNTAG_Bool(REGB5
)) {
182 REGB5
= TAG_Bool(ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3])!=NIT_NULL
);
183 if (UNTAG_Bool(REGB5
)) {
185 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array
, 245);
187 REGB5
= ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3]);
188 /* ./../lib/standard//kernel.nit:212 */
189 REGB5
= TAG_Bool(UNTAG_Int(REGB4
)<UNTAG_Int(REGB5
));
191 /* ./../lib/standard//collection//array.nit:245 */
192 REGB6
= TAG_Bool(false);
195 if (UNTAG_Bool(REGB5
)) {
197 nit_abort("Assert %s failed", "'index'", LOCATE_array
, 245);
199 /* ./../lib/standard//collection//array.nit:246 */
200 fra
.me
.REG
[3] = ATTR_array___Array____items(fra
.me
.REG
[3]);
201 REGB5
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
202 if (UNTAG_Bool(REGB5
)) {
203 nit_abort("Reciever is null", NULL
, LOCATE_array
, 246);
205 /* ./../lib/standard//collection//array.nit:654 */
206 fra
.me
.REG
[3] = ((Nit_NativeArray
)fra
.me
.REG
[3])->val
[UNTAG_Int(REGB4
)];
207 /* ./../lib/standard//collection//array.nit:246 */
210 /* ./../lib/standard//collection//sorter.nit:51 */
211 REGB4
= CALL_sorter___AbstractSorter___compare(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[3], fra
.me
.REG
[2]);
213 /* ./../lib/standard//kernel.nit:211 */
214 REGB5
= TAG_Bool(UNTAG_Int(REGB4
)<=UNTAG_Int(REGB5
));
216 /* ./../lib/standard//collection//sorter.nit:51 */
217 REGB4
= TAG_Bool(false);
220 if (UNTAG_Bool(REGB5
)) {
222 /* ./../lib/standard//kernel.nit:215 */
223 REGB5
= TAG_Int(UNTAG_Int(REGB2
)+UNTAG_Int(REGB5
));
224 /* ./../lib/standard//collection//sorter.nit:51 */
231 /* ./../lib/standard//collection//sorter.nit:52 */
233 /* ./../lib/standard//kernel.nit:214 */
234 REGB5
= TAG_Bool(UNTAG_Int(REGB3
)>UNTAG_Int(REGB2
));
235 /* ./../lib/standard//collection//sorter.nit:52 */
236 if (UNTAG_Bool(REGB5
)) {
237 /* ./../lib/standard//collection//array.nit:243 */
238 fra
.me
.REG
[3] = fra
.me
.REG
[1];
240 /* ./../lib/standard//collection//array.nit:245 */
242 /* ./../lib/standard//kernel.nit:213 */
243 REGB4
= TAG_Bool(UNTAG_Int(REGB5
)>=UNTAG_Int(REGB4
));
244 /* ./../lib/standard//collection//array.nit:245 */
245 if (UNTAG_Bool(REGB4
)) {
246 REGB4
= TAG_Bool(ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3])!=NIT_NULL
);
247 if (UNTAG_Bool(REGB4
)) {
249 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array
, 245);
251 REGB4
= ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3]);
252 /* ./../lib/standard//kernel.nit:212 */
253 REGB4
= TAG_Bool(UNTAG_Int(REGB5
)<UNTAG_Int(REGB4
));
255 /* ./../lib/standard//collection//array.nit:245 */
256 REGB6
= TAG_Bool(false);
259 if (UNTAG_Bool(REGB4
)) {
261 nit_abort("Assert %s failed", "'index'", LOCATE_array
, 245);
263 /* ./../lib/standard//collection//array.nit:246 */
264 fra
.me
.REG
[3] = ATTR_array___Array____items(fra
.me
.REG
[3]);
265 REGB4
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
266 if (UNTAG_Bool(REGB4
)) {
267 nit_abort("Reciever is null", NULL
, LOCATE_array
, 246);
269 /* ./../lib/standard//collection//array.nit:654 */
270 fra
.me
.REG
[3] = ((Nit_NativeArray
)fra
.me
.REG
[3])->val
[UNTAG_Int(REGB5
)];
271 /* ./../lib/standard//collection//array.nit:246 */
274 /* ./../lib/standard//collection//sorter.nit:52 */
275 REGB5
= CALL_sorter___AbstractSorter___compare(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[3], fra
.me
.REG
[2]);
277 /* ./../lib/standard//kernel.nit:213 */
278 REGB4
= TAG_Bool(UNTAG_Int(REGB5
)>=UNTAG_Int(REGB4
));
280 /* ./../lib/standard//collection//sorter.nit:52 */
281 REGB5
= TAG_Bool(false);
284 if (UNTAG_Bool(REGB4
)) {
286 /* ./../lib/standard//kernel.nit:217 */
287 REGB4
= TAG_Int(UNTAG_Int(REGB3
)-UNTAG_Int(REGB4
));
288 /* ./../lib/standard//collection//sorter.nit:52 */
295 /* ./../lib/standard//kernel.nit:214 */
296 REGB4
= TAG_Bool(UNTAG_Int(REGB3
)>UNTAG_Int(REGB2
));
297 /* ./../lib/standard//collection//sorter.nit:53 */
298 if (UNTAG_Bool(REGB4
)) {
299 /* ./../lib/standard//collection//array.nit:243 */
300 fra
.me
.REG
[3] = fra
.me
.REG
[1];
302 /* ./../lib/standard//collection//array.nit:245 */
304 /* ./../lib/standard//kernel.nit:213 */
305 REGB5
= TAG_Bool(UNTAG_Int(REGB4
)>=UNTAG_Int(REGB5
));
306 /* ./../lib/standard//collection//array.nit:245 */
307 if (UNTAG_Bool(REGB5
)) {
308 REGB5
= TAG_Bool(ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3])!=NIT_NULL
);
309 if (UNTAG_Bool(REGB5
)) {
311 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array
, 245);
313 REGB5
= ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3]);
314 /* ./../lib/standard//kernel.nit:212 */
315 REGB5
= TAG_Bool(UNTAG_Int(REGB4
)<UNTAG_Int(REGB5
));
317 /* ./../lib/standard//collection//array.nit:245 */
318 REGB6
= TAG_Bool(false);
321 if (UNTAG_Bool(REGB5
)) {
323 nit_abort("Assert %s failed", "'index'", LOCATE_array
, 245);
325 /* ./../lib/standard//collection//array.nit:246 */
326 fra
.me
.REG
[3] = ATTR_array___Array____items(fra
.me
.REG
[3]);
327 REGB5
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
328 if (UNTAG_Bool(REGB5
)) {
329 nit_abort("Reciever is null", NULL
, LOCATE_array
, 246);
331 /* ./../lib/standard//collection//array.nit:654 */
332 fra
.me
.REG
[3] = ((Nit_NativeArray
)fra
.me
.REG
[3])->val
[UNTAG_Int(REGB4
)];
333 /* ./../lib/standard//collection//array.nit:246 */
336 /* ./../lib/standard//collection//array.nit:243 */
337 fra
.me
.REG
[4] = fra
.me
.REG
[1];
339 /* ./../lib/standard//collection//array.nit:245 */
341 /* ./../lib/standard//kernel.nit:213 */
342 REGB5
= TAG_Bool(UNTAG_Int(REGB4
)>=UNTAG_Int(REGB5
));
343 /* ./../lib/standard//collection//array.nit:245 */
344 if (UNTAG_Bool(REGB5
)) {
345 REGB5
= TAG_Bool(ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[4])!=NIT_NULL
);
346 if (UNTAG_Bool(REGB5
)) {
348 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array
, 245);
350 REGB5
= ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[4]);
351 /* ./../lib/standard//kernel.nit:212 */
352 REGB5
= TAG_Bool(UNTAG_Int(REGB4
)<UNTAG_Int(REGB5
));
354 /* ./../lib/standard//collection//array.nit:245 */
355 REGB6
= TAG_Bool(false);
358 if (UNTAG_Bool(REGB5
)) {
360 nit_abort("Assert %s failed", "'index'", LOCATE_array
, 245);
362 /* ./../lib/standard//collection//array.nit:246 */
363 fra
.me
.REG
[4] = ATTR_array___Array____items(fra
.me
.REG
[4]);
364 REGB5
= TAG_Bool(fra
.me
.REG
[4]==NIT_NULL
);
365 if (UNTAG_Bool(REGB5
)) {
366 nit_abort("Reciever is null", NULL
, LOCATE_array
, 246);
368 /* ./../lib/standard//collection//array.nit:654 */
369 fra
.me
.REG
[4] = ((Nit_NativeArray
)fra
.me
.REG
[4])->val
[UNTAG_Int(REGB4
)];
370 /* ./../lib/standard//collection//array.nit:246 */
373 /* ./../lib/standard//collection//sorter.nit:55 */
374 CALL_abstract_collection___Map_____braeq(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB2
, fra
.me
.REG
[4]);
375 /* ./../lib/standard//collection//sorter.nit:56 */
376 CALL_abstract_collection___Map_____braeq(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB3
, fra
.me
.REG
[3]);
379 /* ./../lib/standard//collection//sorter.nit:50 */
384 /* ./../lib/standard//collection//sorter.nit:59 */
386 /* ./../lib/standard//kernel.nit:217 */
387 REGB3
= TAG_Int(UNTAG_Int(REGB2
)-UNTAG_Int(REGB3
));
388 /* ./../lib/standard//collection//array.nit:243 */
389 fra
.me
.REG
[3] = fra
.me
.REG
[1];
390 /* ./../lib/standard//collection//array.nit:245 */
392 /* ./../lib/standard//kernel.nit:213 */
393 REGB4
= TAG_Bool(UNTAG_Int(REGB3
)>=UNTAG_Int(REGB4
));
394 /* ./../lib/standard//collection//array.nit:245 */
395 if (UNTAG_Bool(REGB4
)) {
396 REGB4
= TAG_Bool(ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3])!=NIT_NULL
);
397 if (UNTAG_Bool(REGB4
)) {
399 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array
, 245);
401 REGB4
= ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3]);
402 /* ./../lib/standard//kernel.nit:212 */
403 REGB4
= TAG_Bool(UNTAG_Int(REGB3
)<UNTAG_Int(REGB4
));
405 /* ./../lib/standard//collection//array.nit:245 */
406 REGB5
= TAG_Bool(false);
409 if (UNTAG_Bool(REGB4
)) {
411 nit_abort("Assert %s failed", "'index'", LOCATE_array
, 245);
413 /* ./../lib/standard//collection//array.nit:246 */
414 fra
.me
.REG
[3] = ATTR_array___Array____items(fra
.me
.REG
[3]);
415 REGB4
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
416 if (UNTAG_Bool(REGB4
)) {
417 nit_abort("Reciever is null", NULL
, LOCATE_array
, 246);
419 /* ./../lib/standard//collection//array.nit:654 */
420 fra
.me
.REG
[3] = ((Nit_NativeArray
)fra
.me
.REG
[3])->val
[UNTAG_Int(REGB3
)];
421 /* ./../lib/standard//collection//array.nit:246 */
424 /* ./../lib/standard//collection//sorter.nit:59 */
425 CALL_abstract_collection___Map_____braeq(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB0
, fra
.me
.REG
[3]);
426 /* ./../lib/standard//collection//sorter.nit:60 */
428 /* ./../lib/standard//kernel.nit:217 */
429 REGB3
= TAG_Int(UNTAG_Int(REGB2
)-UNTAG_Int(REGB3
));
430 /* ./../lib/standard//collection//sorter.nit:60 */
431 CALL_abstract_collection___Map_____braeq(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB3
, fra
.me
.REG
[2]);
432 /* ./../lib/standard//collection//sorter.nit:61 */
434 /* ./../lib/standard//kernel.nit:217 */
435 REGB3
= TAG_Int(UNTAG_Int(REGB2
)-UNTAG_Int(REGB3
));
436 /* ./../lib/standard//collection//sorter.nit:61 */
437 CALL_sorter___AbstractSorter___sub_sort(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], REGB0
, REGB3
);
438 /* ./../lib/standard//collection//sorter.nit:62 */
439 CALL_sorter___AbstractSorter___sub_sort(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], REGB2
, REGB1
);
440 stack_frame_head
= fra
.me
.prev
;
443 void sorter___AbstractSorter___bubble_sort(val_t p0
, val_t p1
, val_t p2
, val_t p3
){
444 struct {struct stack_frame_t me
; val_t MORE_REG
[3];} fra
;
453 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
454 fra
.me
.file
= LOCATE_sorter
;
456 fra
.me
.meth
= LOCATE_sorter___AbstractSorter___bubble_sort
;
457 fra
.me
.has_broke
= 0;
459 fra
.me
.REG
[0] = NIT_NULL
;
460 fra
.me
.REG
[1] = NIT_NULL
;
461 fra
.me
.REG
[2] = NIT_NULL
;
462 fra
.me
.REG
[3] = NIT_NULL
;
467 /* ./../lib/standard//collection//sorter.nit:69 */
469 /* ./../lib/standard//kernel.nit:212 */
470 REGB2
= TAG_Bool(UNTAG_Int(REGB0
)<UNTAG_Int(REGB1
));
471 /* ./../lib/standard//collection//sorter.nit:69 */
472 if (UNTAG_Bool(REGB2
)) {
473 /* ./../lib/standard//collection//sorter.nit:70 */
475 /* ./../lib/standard//collection//array.nit:243 */
476 fra
.me
.REG
[2] = fra
.me
.REG
[1];
478 /* ./../lib/standard//collection//array.nit:245 */
480 /* ./../lib/standard//kernel.nit:213 */
481 REGB4
= TAG_Bool(UNTAG_Int(REGB3
)>=UNTAG_Int(REGB4
));
482 /* ./../lib/standard//collection//array.nit:245 */
483 if (UNTAG_Bool(REGB4
)) {
484 REGB4
= TAG_Bool(ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[2])!=NIT_NULL
);
485 if (UNTAG_Bool(REGB4
)) {
487 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array
, 245);
489 REGB4
= ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[2]);
490 /* ./../lib/standard//kernel.nit:212 */
491 REGB4
= TAG_Bool(UNTAG_Int(REGB3
)<UNTAG_Int(REGB4
));
493 /* ./../lib/standard//collection//array.nit:245 */
494 REGB5
= TAG_Bool(false);
497 if (UNTAG_Bool(REGB4
)) {
499 nit_abort("Assert %s failed", "'index'", LOCATE_array
, 245);
501 /* ./../lib/standard//collection//array.nit:246 */
502 fra
.me
.REG
[2] = ATTR_array___Array____items(fra
.me
.REG
[2]);
503 REGB4
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
504 if (UNTAG_Bool(REGB4
)) {
505 nit_abort("Reciever is null", NULL
, LOCATE_array
, 246);
507 /* ./../lib/standard//collection//array.nit:654 */
508 fra
.me
.REG
[2] = ((Nit_NativeArray
)fra
.me
.REG
[2])->val
[UNTAG_Int(REGB3
)];
509 /* ./../lib/standard//collection//array.nit:246 */
512 /* ./../lib/standard//collection//sorter.nit:72 */
514 /* ./../lib/standard//collection//sorter.nit:73 */
516 /* ./../lib/standard//kernel.nit:211 */
517 REGB4
= TAG_Bool(UNTAG_Int(REGB3
)<=UNTAG_Int(REGB1
));
518 /* ./../lib/standard//collection//sorter.nit:73 */
519 if (UNTAG_Bool(REGB4
)) {
520 /* ./../lib/standard//collection//array.nit:243 */
521 fra
.me
.REG
[3] = fra
.me
.REG
[1];
523 /* ./../lib/standard//collection//array.nit:245 */
525 /* ./../lib/standard//kernel.nit:213 */
526 REGB5
= TAG_Bool(UNTAG_Int(REGB4
)>=UNTAG_Int(REGB5
));
527 /* ./../lib/standard//collection//array.nit:245 */
528 if (UNTAG_Bool(REGB5
)) {
529 REGB5
= TAG_Bool(ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3])!=NIT_NULL
);
530 if (UNTAG_Bool(REGB5
)) {
532 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array
, 245);
534 REGB5
= ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3]);
535 /* ./../lib/standard//kernel.nit:212 */
536 REGB5
= TAG_Bool(UNTAG_Int(REGB4
)<UNTAG_Int(REGB5
));
538 /* ./../lib/standard//collection//array.nit:245 */
539 REGB6
= TAG_Bool(false);
542 if (UNTAG_Bool(REGB5
)) {
544 nit_abort("Assert %s failed", "'index'", LOCATE_array
, 245);
546 /* ./../lib/standard//collection//array.nit:246 */
547 fra
.me
.REG
[3] = ATTR_array___Array____items(fra
.me
.REG
[3]);
548 REGB5
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
549 if (UNTAG_Bool(REGB5
)) {
550 nit_abort("Reciever is null", NULL
, LOCATE_array
, 246);
552 /* ./../lib/standard//collection//array.nit:654 */
553 fra
.me
.REG
[3] = ((Nit_NativeArray
)fra
.me
.REG
[3])->val
[UNTAG_Int(REGB4
)];
554 /* ./../lib/standard//collection//array.nit:246 */
557 /* ./../lib/standard//collection//sorter.nit:74 */
558 REGB4
= CALL_sorter___AbstractSorter___compare(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[2], fra
.me
.REG
[3]);
560 /* ./../lib/standard//kernel.nit:214 */
561 REGB5
= TAG_Bool(UNTAG_Int(REGB4
)>UNTAG_Int(REGB5
));
562 /* ./../lib/standard//collection//sorter.nit:74 */
563 if (UNTAG_Bool(REGB5
)) {
564 /* ./../lib/standard//collection//sorter.nit:75 */
566 /* ./../lib/standard//collection//array.nit:243 */
567 fra
.me
.REG
[3] = fra
.me
.REG
[1];
569 /* ./../lib/standard//collection//array.nit:245 */
571 /* ./../lib/standard//kernel.nit:213 */
572 REGB4
= TAG_Bool(UNTAG_Int(REGB5
)>=UNTAG_Int(REGB4
));
573 /* ./../lib/standard//collection//array.nit:245 */
574 if (UNTAG_Bool(REGB4
)) {
575 REGB4
= TAG_Bool(ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3])!=NIT_NULL
);
576 if (UNTAG_Bool(REGB4
)) {
578 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array
, 245);
580 REGB4
= ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3]);
581 /* ./../lib/standard//kernel.nit:212 */
582 REGB4
= TAG_Bool(UNTAG_Int(REGB5
)<UNTAG_Int(REGB4
));
584 /* ./../lib/standard//collection//array.nit:245 */
585 REGB6
= TAG_Bool(false);
588 if (UNTAG_Bool(REGB4
)) {
590 nit_abort("Assert %s failed", "'index'", LOCATE_array
, 245);
592 /* ./../lib/standard//collection//array.nit:246 */
593 fra
.me
.REG
[3] = ATTR_array___Array____items(fra
.me
.REG
[3]);
594 REGB4
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
595 if (UNTAG_Bool(REGB4
)) {
596 nit_abort("Reciever is null", NULL
, LOCATE_array
, 246);
598 /* ./../lib/standard//collection//array.nit:654 */
599 fra
.me
.REG
[3] = ((Nit_NativeArray
)fra
.me
.REG
[3])->val
[UNTAG_Int(REGB5
)];
600 /* ./../lib/standard//collection//array.nit:246 */
603 /* ./../lib/standard//collection//sorter.nit:76 */
604 fra
.me
.REG
[2] = fra
.me
.REG
[3];
606 /* ./../lib/standard//collection//sorter.nit:78 */
608 /* ./../lib/standard//kernel.nit:215 */
609 REGB5
= TAG_Int(UNTAG_Int(REGB3
)+UNTAG_Int(REGB5
));
610 /* ./../lib/standard//collection//sorter.nit:78 */
613 /* ./../lib/standard//collection//sorter.nit:73 */
618 /* ./../lib/standard//collection//sorter.nit:80 */
619 REGB3
= TAG_Bool(IS_EQUAL_OO(REGB2
,REGB0
));
620 if (UNTAG_Bool(REGB3
)) {
622 /* ./../lib/standard//kernel.nit:207 */
623 REGB5
= TAG_Bool((REGB2
)==(REGB0
));
624 /* ./../lib/standard//collection//sorter.nit:80 */
627 REGB3
= TAG_Bool(!UNTAG_Bool(REGB3
));
628 if (UNTAG_Bool(REGB3
)) {
629 /* ./../lib/standard//collection//array.nit:243 */
630 fra
.me
.REG
[3] = fra
.me
.REG
[1];
632 /* ./../lib/standard//collection//array.nit:245 */
634 /* ./../lib/standard//kernel.nit:213 */
635 REGB5
= TAG_Bool(UNTAG_Int(REGB3
)>=UNTAG_Int(REGB5
));
636 /* ./../lib/standard//collection//array.nit:245 */
637 if (UNTAG_Bool(REGB5
)) {
638 REGB5
= TAG_Bool(ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3])!=NIT_NULL
);
639 if (UNTAG_Bool(REGB5
)) {
641 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array
, 245);
643 REGB5
= ATTR_array___AbstractArrayRead____length(fra
.me
.REG
[3]);
644 /* ./../lib/standard//kernel.nit:212 */
645 REGB5
= TAG_Bool(UNTAG_Int(REGB3
)<UNTAG_Int(REGB5
));
647 /* ./../lib/standard//collection//array.nit:245 */
648 REGB4
= TAG_Bool(false);
651 if (UNTAG_Bool(REGB5
)) {
653 nit_abort("Assert %s failed", "'index'", LOCATE_array
, 245);
655 /* ./../lib/standard//collection//array.nit:246 */
656 fra
.me
.REG
[3] = ATTR_array___Array____items(fra
.me
.REG
[3]);
657 REGB5
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
658 if (UNTAG_Bool(REGB5
)) {
659 nit_abort("Reciever is null", NULL
, LOCATE_array
, 246);
661 /* ./../lib/standard//collection//array.nit:654 */
662 fra
.me
.REG
[3] = ((Nit_NativeArray
)fra
.me
.REG
[3])->val
[UNTAG_Int(REGB3
)];
663 /* ./../lib/standard//collection//array.nit:246 */
666 /* ./../lib/standard//collection//sorter.nit:81 */
667 CALL_abstract_collection___Map_____braeq(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB2
, fra
.me
.REG
[3]);
668 /* ./../lib/standard//collection//sorter.nit:82 */
669 CALL_abstract_collection___Map_____braeq(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB0
, fra
.me
.REG
[2]);
671 /* ./../lib/standard//collection//sorter.nit:84 */
673 /* ./../lib/standard//kernel.nit:215 */
674 REGB2
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB2
));
675 /* ./../lib/standard//collection//sorter.nit:84 */
678 /* ./../lib/standard//collection//sorter.nit:69 */
683 stack_frame_head
= fra
.me
.prev
;
686 void sorter___AbstractSorter___init(val_t p0
, int* init_table
){
687 int itpos0
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_AbstractSorter
].i
;
688 struct {struct stack_frame_t me
;} fra
;
690 if (init_table
[itpos0
]) return;
691 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
692 fra
.me
.file
= LOCATE_sorter
;
694 fra
.me
.meth
= LOCATE_sorter___AbstractSorter___init
;
695 fra
.me
.has_broke
= 0;
697 stack_frame_head
= fra
.me
.prev
;
698 init_table
[itpos0
] = 1;
701 val_t
sorter___ComparableSorter___compare(val_t p0
, val_t p1
, val_t p2
){
702 struct {struct stack_frame_t me
; val_t MORE_REG
[2];} fra
;
705 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
706 fra
.me
.file
= LOCATE_sorter
;
708 fra
.me
.meth
= LOCATE_sorter___ComparableSorter___compare
;
709 fra
.me
.has_broke
= 0;
711 fra
.me
.REG
[0] = NIT_NULL
;
712 fra
.me
.REG
[1] = NIT_NULL
;
713 fra
.me
.REG
[2] = NIT_NULL
;
717 /* ./../lib/standard//collection//sorter.nit:94 */
718 REGB0
= CALL_kernel___Comparable_____leqg(fra
.me
.REG
[1])(fra
.me
.REG
[1], fra
.me
.REG
[2]);
721 stack_frame_head
= fra
.me
.prev
;
724 void sorter___ComparableSorter___init(val_t p0
, int* init_table
){
725 int itpos1
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_ComparableSorter
].i
;
726 struct {struct stack_frame_t me
;} fra
;
728 if (init_table
[itpos1
]) return;
729 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
730 fra
.me
.file
= LOCATE_sorter
;
732 fra
.me
.meth
= LOCATE_sorter___ComparableSorter___init
;
733 fra
.me
.has_broke
= 0;
735 fra
.me
.REG
[0] = NIT_NULL
;
737 /* ./../lib/standard//collection//sorter.nit:96 */
738 CALL_sorter___AbstractSorter___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], init_table
);
739 stack_frame_head
= fra
.me
.prev
;
740 init_table
[itpos1
] = 1;