c_src: update to have intern args
[nit.git] / c_src / standard___collection._sep.c
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;
6 val_t REGB0;
7 val_t REGB1;
8 val_t REGB2;
9 val_t tmp;
10 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
11 fra.me.file = LOCATE_standard___collection;
12 fra.me.line = 24;
13 fra.me.meth = LOCATE_standard___collection___Sequence___subarray;
14 fra.me.has_broke = 0;
15 fra.me.REG_size = 3;
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;
20 fra.me.REG[0] = p0;
21 REGB0 = p1;
22 REGB1 = p2;
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 */
28 while(1) {
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)) {
31 } else {
32 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
33 }
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 */
39 REGB2 = REGB0;
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 */
43 REGB2 = TAG_Int(1);
44 /* ../lib/standard/kernel.nit:238 */
45 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
46 /* ../lib/standard/kernel.nit:357 */
47 REGB0 = REGB2;
48 } else {
49 /* ../lib/standard/kernel.nit:355 */
50 goto label1;
51 }
52 }
53 label1: while(0);
54 /* ../lib/standard/collection/collection.nit:28 */
55 goto label2;
56 label2: while(0);
57 stack_frame_head = fra.me.prev;
58 return fra.me.REG[1];
59 }