1 /* This C file is generated by NIT to compile module standard___collection. */
2 #include "standard___collection._sep.h"
3 static const char LOCATE_standard___collection___Sequence___subarray
[] = "collection::Sequence::subarray";
4 val_t
standard___collection___Sequence___subarray(val_t p0
, val_t p1
, val_t p2
){
5 struct {struct stack_frame_t me
; val_t MORE_REG
[2];} fra
;
10 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
11 fra
.me
.file
= LOCATE_standard___collection
;
13 fra
.me
.meth
= LOCATE_standard___collection___Sequence___subarray
;
16 fra
.me
.nitni_local_ref_head
= NULL
;
17 fra
.me
.REG
[0] = NIT_NULL
;
18 fra
.me
.REG
[1] = NIT_NULL
;
19 fra
.me
.REG
[2] = NIT_NULL
;
23 /* ../lib/standard/collection/collection.nit:26 */
24 fra
.me
.REG
[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB1
);
25 /* ../lib/standard/kernel.nit:238 */
26 REGB1
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB1
));
27 /* ../lib/standard/kernel.nit:355 */
29 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
30 if (UNTAG_Bool(REGB2
)) {
32 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
34 /* ../lib/standard/kernel.nit:235 */
35 REGB2
= TAG_Bool(UNTAG_Int(REGB0
)<UNTAG_Int(REGB1
));
36 /* ../lib/standard/kernel.nit:355 */
37 if (UNTAG_Bool(REGB2
)) {
38 /* ../lib/standard/collection/collection.nit:27 */
40 fra
.me
.REG
[2] = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB2
);
41 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[1])(fra
.me
.REG
[1], fra
.me
.REG
[2]);
42 /* ../lib/standard/kernel.nit:357 */
44 /* ../lib/standard/kernel.nit:238 */
45 REGB2
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB2
));
46 /* ../lib/standard/kernel.nit:357 */
49 /* ../lib/standard/kernel.nit:355 */
54 /* ../lib/standard/collection/collection.nit:28 */
57 stack_frame_head
= fra
.me
.prev
;