X-Git-Url: http://nitlanguage.org diff --git a/c_src/array._sep.c b/c_src/array._sep.c index 88ecd47..4508ab7 100644 --- a/c_src/array._sep.c +++ b/c_src/array._sep.c @@ -1,1686 +1,3774 @@ /* This C file is generated by NIT to compile module array. */ #include "array._sep.h" -void array___AbstractArray___enlarge(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 23, LOCATE_array___AbstractArray___enlarge}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - fprintf(stderr, "Deferred method %s called"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); - tracehead = trace.prev; +val_t array___AbstractArrayRead_____eqeq(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[3];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t REGB3; + val_t REGB4; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 128; + fra.me.meth = LOCATE_array___AbstractArrayRead_____eqeq; + fra.me.has_broke = 0; + fra.me.REG_size = 4; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[3] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = TAG_Bool((fra.me.REG[1]!=NIT_NULL) && VAL_ISA(fra.me.REG[1], COLOR_AbstractArray, ID_AbstractArray)) /*cast AbstractArray[E]*/; + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + /* ./../lib/standard//collection//array.nit:131 */ + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(true); + } else { + REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + REGB0 = REGB1; + } + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(false); + goto label1; + } + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:23 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); + nit_exit(1); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + /* ./../lib/standard//collection//array.nit:133 */ + if (UNTAG_Bool(REGB2)) { + fprintf(stderr, "Reciever is null"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 133); + nit_exit(1); + } + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:23 */ + if (UNTAG_Bool(REGB2)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); + nit_exit(1); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); + REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1)); + /* ./../lib/standard//collection//array.nit:133 */ + if (UNTAG_Bool(REGB3)) { + } else { + REGB2 = TAG_Bool((REGB2)==(REGB1)); + REGB3 = REGB2; + /* ./../lib/standard//collection//array.nit:133 */ + } + REGB3 = TAG_Bool(!UNTAG_Bool(REGB3)); + if (UNTAG_Bool(REGB3)) { + REGB3 = TAG_Bool(false); + REGB0 = REGB3; + goto label1; + } + REGB3 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:135 */ + while(1) { + REGB2 = TAG_Bool(UNTAG_Int(REGB3)=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:50 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:23 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); + nit_exit(1); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:84 */ + if (UNTAG_Bool(REGB1)) { + fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB0); + REGB1 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1])); + /* ./../lib/standard//collection//array.nit:85 */ + if (UNTAG_Bool(REGB1)) { + } else { + REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(false); + REGB1 = REGB2; + } else { + REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + REGB1 = REGB2; + } + } + if (UNTAG_Bool(REGB1)) { + REGB1 = REGB0; + /* ./../lib/standard//collection//array.nit:86 */ + goto label1; + } else { + REGB2 = TAG_Int(1); + REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2)); + REGB0 = REGB2; + /* ./../lib/standard//collection//array.nit:88 */ + } + } else { + /* ./../lib/standard//collection//array.nit:84 */ + goto label2; + } + } + label2: while(0); + REGB0 = TAG_Int(1); + REGB0 = TAG_Int(-UNTAG_Int(REGB0)); + REGB1 = REGB0; + /* ./../lib/standard//collection//array.nit:91 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB1; +} +val_t array___AbstractArrayRead___reversed(val_t p0){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 94; + fra.me.meth = LOCATE_array___AbstractArrayRead___reversed; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:96 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 96); + nit_exit(1); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB0); + /* ./../lib/standard//collection//array.nit:98 */ + while(1) { + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:98 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Int(1); + REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1)); + REGB0 = REGB1; + fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB0); + /* ./../lib/standard//collection//array.nit:100 */ + array___Array___add(fra.me.REG[1], fra.me.REG[2]); + } else { + /* ./../lib/standard//collection//array.nit:98 */ + goto label1; + } + } + label1: while(0); + /* ./../lib/standard//collection//array.nit:102 */ + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[1]; +} +void array___AbstractArrayRead___copy_to(val_t p0, val_t p1, val_t p2, val_t p3, val_t p4){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t REGB3; + val_t REGB4; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 105; + fra.me.meth = LOCATE_array___AbstractArrayRead___copy_to; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + REGB1 = p2; + fra.me.REG[1] = p3; + REGB2 = p4; + /* ./../lib/standard//collection//array.nit:109 */ + while(1) { + REGB3 = TAG_Int(0); + REGB3 = TAG_Bool(UNTAG_Int(REGB1)>UNTAG_Int(REGB3)); + /* ./../lib/standard//collection//array.nit:109 */ + if (UNTAG_Bool(REGB3)) { + REGB3 = TAG_Int(1); + REGB3 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB3)); + REGB1 = REGB3; + REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1)); + REGB4 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); + fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB4); + /* ./../lib/standard//collection//array.nit:111 */ + CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB3, fra.me.REG[2]); + } else { + /* ./../lib/standard//collection//array.nit:109 */ + goto label1; + } + } + label1: while(0); + stack_frame_head = fra.me.prev; return; } -val_t array___AbstractArray___pop(val_t self) { - struct trace_t trace = {NULL, NULL, 32, LOCATE_array___AbstractArray___pop}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ((array___AbstractArray___is_empty_t)CALL( self,COLOR_abstract_collection___Collection___is_empty))( self) /*AbstractArray::is_empty*/; - if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable0)))) { fprintf(stderr, "Assert%s failed", " 'not_empty' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___AbstractArray___pop, LOCATE_array, 34); nit_exit(1);} - variable1 = ((abstract_collection___IndexedCollection___last_t)CALL( self,COLOR_abstract_collection___IndexedCollection___last))( self) /*IndexedCollection::last*/; - variable0 = variable1; - ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/)-UNTAG_Int( TAG_Int(1))); - variable0 = variable0 /*r*/; - goto return_label2; - return_label2: while(false); - tracehead = trace.prev; - return variable0; -} -val_t array___AbstractArray___shift(val_t self) { - struct trace_t trace = {NULL, NULL, 40, LOCATE_array___AbstractArray___shift}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - val_t variable4; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ((array___AbstractArray___is_empty_t)CALL( self,COLOR_abstract_collection___Collection___is_empty))( self) /*AbstractArray::is_empty*/; - if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable0)))) { fprintf(stderr, "Assert%s failed", " 'not_empty' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___AbstractArray___shift, LOCATE_array, 42); nit_exit(1);} - variable1 = ((abstract_collection___IndexedCollection___first_t)CALL( self,COLOR_abstract_collection___Collection___first))( self) /*IndexedCollection::first*/; - variable0 = variable1; - variable1 = TAG_Int(1); - variable3 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/; - variable2 = variable3; - while (true) { /*while*/ - variable3 = TAG_Bool(UNTAG_Int( variable1 /*i*/)UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable2)) break; /* while*/ - variable2 = TAG_Int(UNTAG_Int( variable1 /*i*/)+UNTAG_Int( TAG_Int(1))); - variable3 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable1 /*i*/) /*Map::[]*/; - ((abstract_collection___Map_____braeq_t)CALL( self,COLOR_abstract_collection___Map_____braeq))( self, variable2, variable3) /*Map::[]=*/; - variable1 = TAG_Int(UNTAG_Int(variable1)-UNTAG_Int( TAG_Int(1))) /*i*/; - continue_6: while(0); - } - break_6: while(0); - ((abstract_collection___Map_____braeq_t)CALL( self,COLOR_abstract_collection___Map_____braeq))( self, TAG_Int(0), variable0 /*item*/) /*Map::[]=*/; - tracehead = trace.prev; +void array___AbstractArrayRead___init(val_t p0, int* init_table){ + int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_AbstractArrayRead].i; + struct {struct stack_frame_t me;} fra; + val_t tmp; + if (init_table[itpos0]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 0; + fra.me.meth = LOCATE_array___AbstractArrayRead___init; + fra.me.has_broke = 0; + fra.me.REG_size = 0; + stack_frame_head = fra.me.prev; + init_table[itpos0] = 1; return; } -void array___AbstractArray___insert(val_t self, val_t param0, val_t param1) { - struct trace_t trace = {NULL, NULL, 64, LOCATE_array___AbstractArray___insert}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = param1; - variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/; - variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))); - ((array___AbstractArray___enlarge_t)CALL( self,COLOR_array___AbstractArray___enlarge))( self, variable2) /*AbstractArray::enlarge*/; - variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/; - variable2 = TAG_Int(UNTAG_Int(variable2)-UNTAG_Int( variable1 /*pos*/)); - variable3 = TAG_Int(UNTAG_Int( variable1 /*pos*/)+UNTAG_Int( TAG_Int(1))); - ((array___AbstractArray___copy_to_t)CALL( self,COLOR_array___AbstractArray___copy_to))( self, variable1 /*pos*/, variable2, self, variable3) /*AbstractArray::copy_to*/; - ((abstract_collection___Map_____braeq_t)CALL( self,COLOR_abstract_collection___Map_____braeq))( self, variable1 /*pos*/, variable0 /*item*/) /*Map::[]=*/; - tracehead = trace.prev; +void array___AbstractArray___clear(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 192; + fra.me.meth = LOCATE_array___AbstractArray___clear; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:192 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; return; } -void array___AbstractArray___add(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 71, LOCATE_array___AbstractArray___add}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/; - ((abstract_collection___Map_____braeq_t)CALL( self,COLOR_abstract_collection___Map_____braeq))( self, variable1, variable0 /*item*/) /*Map::[]=*/; - tracehead = trace.prev; +void array___AbstractArray___remove(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 194; + fra.me.meth = LOCATE_array___AbstractArray___remove; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = CALL_abstract_collection___SequenceRead___index_of(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:194 */ + CALL_abstract_collection___Map___remove_at(fra.me.REG[0])(fra.me.REG[0], REGB0); + stack_frame_head = fra.me.prev; return; } -void array___AbstractArray___clear(val_t self) { - struct trace_t trace = {NULL, NULL, 73, LOCATE_array___AbstractArray___clear}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = TAG_Int(0); - tracehead = trace.prev; +void array___AbstractArray___remove_all(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 196; + fra.me.meth = LOCATE_array___AbstractArray___remove_all; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = CALL_abstract_collection___SequenceRead___index_of(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:199 */ + while(1) { + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:199 */ + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//collection//array.nit:200 */ + CALL_abstract_collection___Map___remove_at(fra.me.REG[0])(fra.me.REG[0], REGB0); + REGB1 = CALL_array___AbstractArrayRead___index_of_from(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0); + REGB0 = REGB1; + /* ./../lib/standard//collection//array.nit:201 */ + } else { + /* ./../lib/standard//collection//array.nit:199 */ + goto label1; + } + } + label1: while(0); + stack_frame_head = fra.me.prev; return; } -val_t array___AbstractArray___has(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 75, LOCATE_array___AbstractArray___has}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = TAG_Int(0); - variable3 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/; - variable2 = variable3; - while (true) { /*while*/ - variable3 = TAG_Bool(UNTAG_Int( variable1 /*i*/)=UNTAG_Int( TAG_Int(0))); - variable2 = variable1; - if (UNTAG_Bool(variable2)) { /* and */ - variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/; - variable2 = TAG_Bool(UNTAG_Int( variable0 /*index*/)=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable3)) break; /* while*/ - variable3 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable2 /*i*/) /*Map::[]*/; - 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::==*/))))); - if (UNTAG_Bool(variable3)) { /*if*/ - variable2 = variable2 /*i*/; - goto return_label21; - } else { /*if*/ - variable2 = TAG_Int(UNTAG_Int(variable2)-UNTAG_Int( TAG_Int(1))) /*i*/; +void array___AbstractArray___remove_at(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t REGB3; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 205; + fra.me.meth = LOCATE_array___AbstractArray___remove_at; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:23 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); + nit_exit(1); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + REGB2 = TAG_Int(0); + REGB2 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:208 */ + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(UNTAG_Int(REGB0)UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable2)) break; /* while*/ - variable0 = TAG_Int(UNTAG_Int(variable0)-UNTAG_Int( TAG_Int(1))) /*cmp*/; - variable2 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable0 /*cmp*/) /*Map::[]*/; - ((array___AbstractArray___add_t)CALL( variable1 /*result*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*result*/, variable2) /*AbstractArray::add*/; - continue_24: while(0); - } - break_24: while(0); - variable0 = variable1 /*result*/; - goto return_label23; - return_label23: while(false); - tracehead = trace.prev; - return variable0; -} -void array___AbstractArray___remove(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 152, LOCATE_array___AbstractArray___remove}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = ((array___AbstractArray___index_of_t)CALL( self,COLOR_abstract_collection___IndexedCollection___index_of))( self, variable0 /*item*/) /*AbstractArray::index_of*/; - ((array___AbstractArray___remove_at_t)CALL( self,COLOR_abstract_collection___Map___remove_at))( self, variable1) /*AbstractArray::remove_at*/; - tracehead = trace.prev; + label1: while(0); + REGB2 = TAG_Int(1); + REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:214 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB2; + } + stack_frame_head = fra.me.prev; + return; +} +void array___AbstractArray___add(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 190; + fra.me.meth = LOCATE_array___AbstractArray___add; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:23 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); + nit_exit(1); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:190 */ + CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[1]); + stack_frame_head = fra.me.prev; return; } -void array___AbstractArray___remove_all(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 154, LOCATE_array___AbstractArray___remove_all}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable2 = ((array___AbstractArray___index_of_t)CALL( self,COLOR_abstract_collection___IndexedCollection___index_of))( self, variable0 /*item*/) /*AbstractArray::index_of*/; - variable1 = variable2; - while (true) { /*while*/ - variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable2)) break; /* while*/ - ((array___AbstractArray___remove_at_t)CALL( self,COLOR_abstract_collection___Map___remove_at))( self, variable1 /*i*/) /*AbstractArray::remove_at*/; - variable2 = ((array___AbstractArray___index_of_from_t)CALL( self,COLOR_array___AbstractArray___index_of_from))( self, variable0 /*item*/, variable1 /*i*/) /*AbstractArray::index_of_from*/; - variable1 = variable2 /*i=*/; - continue_27: while(0); - } - break_27: while(0); - tracehead = trace.prev; +void array___AbstractArray___push(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 149; + fra.me.meth = LOCATE_array___AbstractArray___push; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//collection//array.nit:149 */ + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + stack_frame_head = fra.me.prev; return; } -void array___AbstractArray___remove_at(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 163, LOCATE_array___AbstractArray___remove_at}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - val_t variable4; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/; - variable1 = variable2; - variable2 = TAG_Bool(UNTAG_Int( variable0 /*i*/)>=UNTAG_Int( TAG_Int(0))); - variable3 = variable2; - if (UNTAG_Bool(variable3)) { /* and */ - variable3 = TAG_Bool(UNTAG_Int( variable0 /*i*/)UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:176 */ + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Int(1); + REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0)); + fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB1); + /* ./../lib/standard//collection//array.nit:177 */ + CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[2]); + REGB0 = TAG_Int(1); + REGB0 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0)); + REGB1 = REGB0; + /* ./../lib/standard//collection//array.nit:178 */ + } else { + /* ./../lib/standard//collection//array.nit:176 */ + goto label1; } - break_29: while(0); - variable3 = TAG_Int(UNTAG_Int( variable1 /*l*/)-UNTAG_Int( TAG_Int(1))); - ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = variable3; } - tracehead = trace.prev; + label1: while(0); + REGB1 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:180 */ + CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB1, fra.me.REG[1]); + stack_frame_head = fra.me.prev; return; } -void array___AbstractArray___copy_to(val_t self, val_t param0, val_t param1, val_t param2, val_t param3) { - struct trace_t trace = {NULL, NULL, 176, LOCATE_array___AbstractArray___copy_to}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - val_t variable4; - val_t variable5; - val_t variable6; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = param1; - variable2 = param2; - variable3 = param3; - variable4 = variable1 /*len*/; - while (true) { /*while*/ - variable5 = TAG_Bool(UNTAG_Int( variable4 /*i*/)>UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable5)) break; /* while*/ - variable4 = TAG_Int(UNTAG_Int(variable4)-UNTAG_Int( TAG_Int(1))) /*i*/; - variable5 = TAG_Int(UNTAG_Int( variable3 /*new_start*/)+UNTAG_Int( variable4 /*i*/)); - variable6 = TAG_Int(UNTAG_Int( variable0 /*start*/)+UNTAG_Int( variable4 /*i*/)); - variable6 = ((abstract_collection___Map_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable6) /*Map::[]*/; - ((abstract_collection___Map_____braeq_t)CALL( variable2 /*dest*/,COLOR_abstract_collection___Map_____braeq))( variable2 /*dest*/, variable5, variable6) /*Map::[]=*/; - continue_31: while(0); - } - break_31: while(0); - tracehead = trace.prev; +val_t array___AbstractArray___shift(val_t p0){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 159; + fra.me.meth = LOCATE_array___AbstractArray___shift; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]); + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + /* ./../lib/standard//collection//array.nit:161 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Assert %s failed", "'not_empty'"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 161); + nit_exit(1); + } + fra.me.REG[1] = CALL_abstract_collection___Collection___first(fra.me.REG[0])(fra.me.REG[0]); + REGB0 = TAG_Int(1); + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:23 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); + nit_exit(1); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:165 */ + while(1) { + REGB2 = TAG_Bool(UNTAG_Int(REGB0)=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:233 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233); + nit_exit(1); } - variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))) /*i*/; - continue_36: while(0); - } - break_36: while(0); - variable1 = TAG_Bool(true); - goto return_label35; - return_label35: while(false); - tracehead = trace.prev; - return variable1; -} -void array___AbstractArray___init(val_t self, int* init_table) { - struct trace_t trace = {NULL, NULL, 0, LOCATE_array___AbstractArray___init}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - tracehead = trace.prev; + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:234 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +void array___Array_____braeq(val_t p0, val_t p1, val_t p2){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 237; + fra.me.meth = LOCATE_array___Array_____braeq; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + fra.me.REG[1] = p2; + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:239 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 239); + nit_exit(1); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + REGB2 = TAG_Int(1); + REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2)); + REGB2 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]=fra.me.REG[1]; + stack_frame_head = fra.me.prev; return; } -val_t array___Array_____bra(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 227, LOCATE_array___Array_____bra}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = TAG_Bool(UNTAG_Int( variable0 /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable2 = variable1; - if (UNTAG_Bool(variable2)) { /* and */ - variable2 = ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/; - variable2 = TAG_Bool(UNTAG_Int( variable0 /*index*/)=UNTAG_Int( TAG_Int(0))); - variable3 = variable2; - if (UNTAG_Bool(variable3)) { /* and */ - variable3 = ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/; - variable3 = TAG_Int(UNTAG_Int(variable3)+UNTAG_Int( TAG_Int(1))); - variable3 = TAG_Bool(UNTAG_Int( variable0 /*index*/)val[UNTAG_Int(REGB0)]=fra.me.REG[1]; + stack_frame_head = fra.me.prev; return; } -void array___Array___enlarge(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 245, LOCATE_array___Array___enlarge}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - val_t variable4; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable2 = ATTR_array___Array____capacity( self) /*Array::_capacity*/; - variable1 = variable2; - variable2 = TAG_Bool(UNTAG_Int( variable0 /*cap*/)<=UNTAG_Int( variable1 /*c*/)); - if (UNTAG_Bool(variable2)) { /*if*/ - goto return_label39; - } - while (true) { /*while*/ - variable2 = TAG_Bool(UNTAG_Int( variable1 /*c*/)<=UNTAG_Int( variable0 /*cap*/)); - if (!UNTAG_Bool(variable2)) break; /* while*/ - variable2 = TAG_Int(UNTAG_Int( variable1 /*c*/)*UNTAG_Int( TAG_Int(2))); - variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(2))); - variable1 = variable2 /*c=*/; - continue_40: while(0); - } - break_40: while(0); - variable3 = BOX_NativeArray((val_t*)malloc((UNTAG_Int( variable1 /*c*/) * sizeof(val_t)))); - variable2 = variable3; - variable3 = ATTR_array___Array____capacity( self) /*Array::_capacity*/; - variable3 = TAG_Bool(UNTAG_Int(variable3)>UNTAG_Int( TAG_Int(0))); - if (UNTAG_Bool(variable3)) { /*if*/ - variable3 = ATTR_array___Array____items( self) /*Array::_items*/; - variable4 = ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/; - (void)memcpy(UNBOX_NativeArray( variable2 /*a*/), UNBOX_NativeArray(variable3), UNTAG_Int(variable4)*sizeof(val_t)); - } - ATTR_array___Array____items( self) /*Array::_items*/ = variable2 /*a*/; - ATTR_array___Array____capacity( self) /*Array::_capacity*/ = variable1 /*c*/; - return_label39: while(false); - tracehead = trace.prev; +void array___Array___enlarge(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t REGB3; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 259; + fra.me.meth = LOCATE_array___Array___enlarge; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + REGB1 = TAG_Bool(ATTR_array___Array____capacity(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:261 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_capacity"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 261); + nit_exit(1); + } + REGB1 = ATTR_array___Array____capacity(fra.me.REG[0]); + REGB2 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:262 */ + if (UNTAG_Bool(REGB2)) { + goto label1; + } + /* ./../lib/standard//collection//array.nit:263 */ + while(1) { + REGB2 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:263 */ + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Int(2); + REGB2 = TAG_Int(UNTAG_Int(REGB1)*UNTAG_Int(REGB2)); + REGB3 = TAG_Int(2); + REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3)); + REGB1 = REGB3; + /* ./../lib/standard//collection//array.nit:263 */ + } else { + goto label2; + } + } + label2: while(0); + fra.me.REG[1] = NEW_NativeArray(UNTAG_Int(REGB1), sizeof(val_t)); + REGB0 = TAG_Bool(ATTR_array___Array____capacity(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:265 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_capacity"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 265); + nit_exit(1); + } + REGB0 = ATTR_array___Array____capacity(fra.me.REG[0]); + REGB3 = TAG_Int(0); + REGB3 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB3)); + /* ./../lib/standard//collection//array.nit:265 */ + if (UNTAG_Bool(REGB3)) { + fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[0]); + REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB3)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 265); + nit_exit(1); + } + REGB3 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + fprintf(stderr, "Reciever is null"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 265); + nit_exit(1); + } + /* ./../lib/standard//collection//array.nit:592 */ + (void)memcpy(((Nit_NativeArray )fra.me.REG[1])->val, ((Nit_NativeArray)fra.me.REG[2])->val, UNTAG_Int(REGB3)*sizeof(val_t)); + } + /* ./../lib/standard//collection//array.nit:266 */ + ATTR_array___Array____items(fra.me.REG[0]) = fra.me.REG[1]; + /* ./../lib/standard//collection//array.nit:267 */ + ATTR_array___Array____capacity(fra.me.REG[0]) = REGB1; + label1: while(0); + stack_frame_head = fra.me.prev; return; } -void array___Array___init(val_t self, int* init_table) { - struct trace_t trace = {NULL, NULL, 256, LOCATE_array___Array___init}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i]) return; - ATTR_array___Array____capacity( self) /*Array::_capacity*/ = TAG_Int(0); - ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = TAG_Int(0); - init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i] = 1; - tracehead = trace.prev; +void array___Array___init(val_t p0, int* init_table){ + int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Array].i; + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + if (init_table[itpos1]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 270; + fra.me.meth = LOCATE_array___Array___init; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:273 */ + ATTR_array___Array____capacity(fra.me.REG[0]) = REGB0; + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:274 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos1] = 1; return; } -void array___Array___with(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, NULL, 263, LOCATE_array___Array___with}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - /* check if pvft[INIT_TABLE_POS_Array].i]) return; - variable1 = ATTR_array___Array____items( variable0 /*objects*/) /*Array::_items*/; - ATTR_array___Array____items( self) /*Array::_items*/ = variable1; - variable1 = ATTR_array___Array____capacity( variable0 /*objects*/) /*Array::_capacity*/; - ATTR_array___Array____capacity( self) /*Array::_capacity*/ = variable1; - variable1 = ((array___AbstractArray___length_t)CALL( variable0 /*objects*/,COLOR_abstract_collection___Collection___length))( variable0 /*objects*/) /*AbstractArray::length*/; - ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = variable1; - init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i] = 1; - tracehead = trace.prev; +void array___Array___with_items(val_t p0, val_t p1, int* init_table){ + int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Array].i; + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t tmp; + if (init_table[itpos2]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 277; + fra.me.meth = LOCATE_array___Array___with_items; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = TAG_Bool((fra.me.REG[1]!=NIT_NULL) && VAL_ISA(fra.me.REG[1], COLOR_Array, ID_Array)) /*cast Array[E]*/; + /* ./../lib/standard//collection//array.nit:277 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Cast failed"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 277); + nit_exit(1); + } + fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:280 */ + ATTR_array___Array____items(fra.me.REG[0]) = fra.me.REG[2]; + REGB0 = TAG_Bool(ATTR_array___Array____capacity(fra.me.REG[1])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:281 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_capacity"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 281); + nit_exit(1); + } + REGB0 = ATTR_array___Array____capacity(fra.me.REG[1]); + ATTR_array___Array____capacity(fra.me.REG[0]) = REGB0; + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:23 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); + nit_exit(1); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:282 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos2] = 1; return; } -void array___Array___with_capacity(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, NULL, 271, LOCATE_array___Array___with_capacity}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i]) return; - variable1 = TAG_Bool(UNTAG_Int( variable0 /*cap*/)>=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed", " 'positive' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array___with_capacity, LOCATE_array, 274); nit_exit(1);} - variable1 = BOX_NativeArray((val_t*)malloc((UNTAG_Int( variable0 /*cap*/) * sizeof(val_t)))); - ATTR_array___Array____items( self) /*Array::_items*/ = variable1; - ATTR_array___Array____capacity( self) /*Array::_capacity*/ = variable0 /*cap*/; - ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = TAG_Int(0); - init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i] = 1; - tracehead = trace.prev; +void array___Array___with_capacity(val_t p0, val_t p1, int* init_table){ + int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Array].i; + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + if (init_table[itpos3]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 285; + fra.me.meth = LOCATE_array___Array___with_capacity; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:288 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Assert %s failed", "'positive'"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 288); + nit_exit(1); + } + fra.me.REG[1] = NEW_NativeArray(UNTAG_Int(REGB0), sizeof(val_t)); + /* ./../lib/standard//collection//array.nit:289 */ + ATTR_array___Array____items(fra.me.REG[0]) = fra.me.REG[1]; + /* ./../lib/standard//collection//array.nit:290 */ + ATTR_array___Array____capacity(fra.me.REG[0]) = REGB0; + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:291 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos3] = 1; return; } -void array___Array___filled_with(val_t self, val_t param0, val_t param1, int* init_table) { - struct trace_t trace = {NULL, NULL, 280, LOCATE_array___Array___filled_with}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = param1; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i]) return; - variable2 = TAG_Bool(UNTAG_Int( variable1 /*count*/)>=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed", " 'positive' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array___filled_with, LOCATE_array, 283); nit_exit(1);} - variable2 = BOX_NativeArray((val_t*)malloc((UNTAG_Int( variable1 /*count*/) * sizeof(val_t)))); - ATTR_array___Array____items( self) /*Array::_items*/ = variable2; - ATTR_array___Array____capacity( self) /*Array::_capacity*/ = variable1 /*count*/; - ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = variable1 /*count*/; - variable2 = TAG_Int(0); - while (true) { /*while*/ - variable3 = TAG_Bool(UNTAG_Int( variable2 /*i*/)vft[INIT_TABLE_POS_Array].i] = 1; - tracehead = trace.prev; +void array___Array___filled_with(val_t p0, val_t p1, val_t p2, int* init_table){ + int itpos4 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Array].i; + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t tmp; + if (init_table[itpos4]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 294; + fra.me.meth = LOCATE_array___Array___filled_with; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = p2; + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:297 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Assert %s failed", "'positive'"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 297); + nit_exit(1); + } + fra.me.REG[2] = NEW_NativeArray(UNTAG_Int(REGB0), sizeof(val_t)); + /* ./../lib/standard//collection//array.nit:298 */ + ATTR_array___Array____items(fra.me.REG[0]) = fra.me.REG[2]; + /* ./../lib/standard//collection//array.nit:299 */ + ATTR_array___Array____capacity(fra.me.REG[0]) = REGB0; + /* ./../lib/standard//collection//array.nit:300 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + REGB1 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:302 */ + while(1) { + REGB2 = TAG_Bool(UNTAG_Int(REGB1)vft[INIT_TABLE_POS_Array].i]) return; - variable2 = TAG_Bool(UNTAG_Int( variable1 /*size*/)>=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed", " 'positive' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array___with_native, LOCATE_array, 297); nit_exit(1);} - ATTR_array___Array____items( self) /*Array::_items*/ = variable0 /*nat*/; - ATTR_array___Array____capacity( self) /*Array::_capacity*/ = variable1 /*size*/; - ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = variable1 /*size*/; - init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Array].i] = 1; - tracehead = trace.prev; +void array___Array___with_native(val_t p0, val_t p1, val_t p2, int* init_table){ + int itpos5 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Array].i; + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + if (init_table[itpos5]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 308; + fra.me.meth = LOCATE_array___Array___with_native; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = p2; + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:311 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Assert %s failed", "'positive'"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 311); + nit_exit(1); + } + /* ./../lib/standard//collection//array.nit:312 */ + ATTR_array___Array____items(fra.me.REG[0]) = fra.me.REG[1]; + /* ./../lib/standard//collection//array.nit:313 */ + ATTR_array___Array____capacity(fra.me.REG[0]) = REGB0; + /* ./../lib/standard//collection//array.nit:314 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos5] = 1; return; } -val_t array___ArrayIterator___item(val_t self) { - struct trace_t trace = {NULL, NULL, 313, LOCATE_array___ArrayIterator___item}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ATTR_array___ArrayIterator____array( self) /*ArrayIterator::_array*/; - variable1 = ATTR_array___ArrayIterator____index( self) /*ArrayIterator::_index*/; - variable0 = ((abstract_collection___Map_____bra_t)CALL(variable0,COLOR_abstract_collection___Map_____bra))(variable0, variable1) /*Map::[]*/; - goto return_label47; - return_label47: while(false); - tracehead = trace.prev; - return variable0; -} -void array___ArrayIterator___item__eq(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 315, LOCATE_array___ArrayIterator___item__eq}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = ATTR_array___ArrayIterator____array( self) /*ArrayIterator::_array*/; - variable2 = ATTR_array___ArrayIterator____index( self) /*ArrayIterator::_index*/; - ((abstract_collection___Map_____braeq_t)CALL(variable1,COLOR_abstract_collection___Map_____braeq))(variable1, variable2, variable0 /*e*/) /*Map::[]=*/; - tracehead = trace.prev; +val_t array___Array___intern_items(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 320; + fra.me.meth = LOCATE_array___Array___intern_items; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[0] = ATTR_array___Array____items(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:322 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Cast failed"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 322); + nit_exit(1); + } + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t array___ArrayIterator___item(val_t p0){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 331; + fra.me.meth = LOCATE_array___ArrayIterator___item; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArrayIterator____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:331 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 331); + nit_exit(1); + } + fra.me.REG[1] = ATTR_array___ArrayIterator____array(fra.me.REG[0]); + REGB0 = TAG_Bool(ATTR_array___ArrayIterator____index(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_index"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 331); + nit_exit(1); + } + REGB0 = ATTR_array___ArrayIterator____index(fra.me.REG[0]); + fra.me.REG[1] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB0); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[1]; +} +void array___ArrayIterator___next(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 337; + fra.me.meth = LOCATE_array___ArrayIterator___next; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = ATTR_array___ArrayIterator____index(fra.me.REG[0]); + REGB1 = TAG_Int(1); + REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:337 */ + ATTR_array___ArrayIterator____index(fra.me.REG[0]) = REGB1; + stack_frame_head = fra.me.prev; return; } -val_t array___ArrayIterator___is_ok(val_t self) { - struct trace_t trace = {NULL, NULL, 317, LOCATE_array___ArrayIterator___is_ok}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ATTR_array___ArrayIterator____index( self) /*ArrayIterator::_index*/; - variable1 = ATTR_array___ArrayIterator____array( self) /*ArrayIterator::_array*/; - variable1 = ((array___AbstractArray___length_t)CALL(variable1,COLOR_abstract_collection___Collection___length))(variable1) /*AbstractArray::length*/; - variable0 = TAG_Bool(UNTAG_Int(variable0)vft[INIT_TABLE_POS_ArrayIterator].i; + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + if (init_table[itpos6]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 339; + fra.me.meth = LOCATE_array___ArrayIterator___init; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//collection//array.nit:341 */ + ATTR_array___ArrayIterator____array(fra.me.REG[0]) = fra.me.REG[1]; + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:342 */ + ATTR_array___ArrayIterator____index(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos6] = 1; return; } -void array___ArrayIterator___init(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, NULL, 321, LOCATE_array___ArrayIterator___init}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArrayIterator].i]) return; - variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*a*/ == NIT_NULL /*null*/) || (( variable0 /*a*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*a*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*a*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*a*/,COLOR_kernel___Object_____eqeq))( variable0 /*a*/, NIT_NULL /*null*/) /*Object::==*/))))))); - if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed", " 'not_nil' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___ArrayIterator___init, LOCATE_array, 323); nit_exit(1);} - ATTR_array___ArrayIterator____array( self) /*ArrayIterator::_array*/ = variable0 /*a*/; - ATTR_array___ArrayIterator____index( self) /*ArrayIterator::_index*/ = TAG_Int(0); - init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArrayIterator].i] = 1; - tracehead = trace.prev; +val_t array___ArraySet___iterator(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 381; + fra.me.meth = LOCATE_array___ArraySet___iterator; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:381 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 381); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArraySet____array(fra.me.REG[0]); + fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[0] = NEW_ArraySetIterator_array___ArraySetIterator___init(fra.me.REG[0]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t array___ArraySet___is_empty(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 361; + fra.me.meth = LOCATE_array___ArraySet___is_empty; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:361 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 361); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArraySet____array(fra.me.REG[0]); + REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t array___ArraySet___length(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 363; + fra.me.meth = LOCATE_array___ArraySet___length; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:363 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 363); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArraySet____array(fra.me.REG[0]); + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:23 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); + nit_exit(1); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:363 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t array___ArraySet___has(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 357; + fra.me.meth = LOCATE_array___ArraySet___has; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:357 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 357); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArraySet____array(fra.me.REG[0]); + REGB0 = CALL_abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t array___ArraySet___first(val_t p0){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 365; + fra.me.meth = LOCATE_array___ArraySet___first; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:367 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 367); + nit_exit(1); + } + fra.me.REG[1] = ATTR_array___ArraySet____array(fra.me.REG[0]); + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:23 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); + nit_exit(1); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:367 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Assert failed"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 367); + nit_exit(1); + } + REGB1 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:368 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 368); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArraySet____array(fra.me.REG[0]); + fra.me.REG[0] = CALL_abstract_collection___Collection___first(fra.me.REG[0])(fra.me.REG[0]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +void array___ArraySet___clear(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 379; + fra.me.meth = LOCATE_array___ArraySet___clear; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:379 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 379); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArraySet____array(fra.me.REG[0]); + CALL_abstract_collection___RemovableCollection___clear(fra.me.REG[0])(fra.me.REG[0]); + stack_frame_head = fra.me.prev; return; } -val_t array___ArrayIterator___index(val_t self) { - struct trace_t trace = {NULL, NULL, 328, LOCATE_array___ArrayIterator___index}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - tracehead = trace.prev; - return ATTR_array___ArrayIterator____index( self) /*ArrayIterator::_index*/; -} -val_t array___ArraySet___has(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 340, LOCATE_array___ArraySet___has}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - variable1 = ((array___AbstractArray___has_t)CALL(variable1,COLOR_abstract_collection___Collection___has))(variable1, variable0 /*e*/) /*AbstractArray::has*/; - goto return_label52; - return_label52: while(false); - tracehead = trace.prev; - return variable1; -} -void array___ArraySet___add(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 342, LOCATE_array___ArraySet___add}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - variable1 = ((array___AbstractArray___has_t)CALL(variable1,COLOR_abstract_collection___Collection___has))(variable1, variable0 /*e*/) /*AbstractArray::has*/; - if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable1)))) { /*if*/ - variable1 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable0 /*e*/) /*AbstractArray::add*/; - } - tracehead = trace.prev; +void array___ArraySet___remove(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 371; + fra.me.meth = LOCATE_array___ArraySet___remove; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:373 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 373); + nit_exit(1); + } + fra.me.REG[2] = ATTR_array___ArraySet____array(fra.me.REG[0]); + REGB0 = CALL_abstract_collection___SequenceRead___index_of(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:374 */ + if (UNTAG_Bool(REGB1)) { + CALL_array___ArraySet___remove_at(fra.me.REG[0])(fra.me.REG[0], REGB0); + } + stack_frame_head = fra.me.prev; return; } -val_t array___ArraySet___is_empty(val_t self) { - struct trace_t trace = {NULL, NULL, 344, LOCATE_array___ArraySet___is_empty}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - variable0 = ((array___AbstractArray___is_empty_t)CALL(variable0,COLOR_abstract_collection___Collection___is_empty))(variable0) /*AbstractArray::is_empty*/; - goto return_label54; - return_label54: while(false); - tracehead = trace.prev; - return variable0; -} -val_t array___ArraySet___length(val_t self) { - struct trace_t trace = {NULL, NULL, 346, LOCATE_array___ArraySet___length}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - variable0 = ((array___AbstractArray___length_t)CALL(variable0,COLOR_abstract_collection___Collection___length))(variable0) /*AbstractArray::length*/; - goto return_label55; - return_label55: while(false); - tracehead = trace.prev; - return variable0; -} -val_t array___ArraySet___first(val_t self) { - struct trace_t trace = {NULL, NULL, 348, LOCATE_array___ArraySet___first}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - variable0 = ((array___AbstractArray___length_t)CALL(variable0,COLOR_abstract_collection___Collection___length))(variable0) /*AbstractArray::length*/; - variable0 = TAG_Bool(UNTAG_Int(variable0)>UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable0)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___ArraySet___first, LOCATE_array, 350); nit_exit(1);} - variable0 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - variable0 = ((abstract_collection___IndexedCollection___first_t)CALL(variable0,COLOR_abstract_collection___Collection___first))(variable0) /*IndexedCollection::first*/; - goto return_label56; - return_label56: while(false); - tracehead = trace.prev; - return variable0; -} -void array___ArraySet___remove(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 354, LOCATE_array___ArraySet___remove}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable2 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - variable2 = ((array___AbstractArray___index_of_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___index_of))(variable2, variable0 /*item*/) /*AbstractArray::index_of*/; - variable1 = variable2; - variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (UNTAG_Bool(variable2)) { /*if*/ - ((array___ArraySet___remove_at_t)CALL( self,COLOR_array___ArraySet___remove_at))( self, variable1 /*i*/) /*ArraySet::remove_at*/; - } - tracehead = trace.prev; +void array___ArraySet___remove_all(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 377; + fra.me.meth = LOCATE_array___ArraySet___remove_all; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//collection//array.nit:377 */ + CALL_abstract_collection___RemovableCollection___remove(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + stack_frame_head = fra.me.prev; return; } -void array___ArraySet___remove_all(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 360, LOCATE_array___ArraySet___remove_all}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - ((array___ArraySet___remove_t)CALL( self,COLOR_abstract_collection___RemovableCollection___remove))( self, variable0 /*item*/) /*ArraySet::remove*/; - tracehead = trace.prev; +void array___ArraySet___add(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 359; + fra.me.meth = LOCATE_array___ArraySet___add; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:359 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 359); + nit_exit(1); + } + fra.me.REG[2] = ATTR_array___ArraySet____array(fra.me.REG[0]); + REGB0 = CALL_abstract_collection___Collection___has(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 359); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArraySet____array(fra.me.REG[0]); + array___Array___add(fra.me.REG[0], fra.me.REG[1]); + } + stack_frame_head = fra.me.prev; return; } -void array___ArraySet___clear(val_t self) { - struct trace_t trace = {NULL, NULL, 362, LOCATE_array___ArraySet___clear}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - ((array___AbstractArray___clear_t)CALL(variable0,COLOR_abstract_collection___RemovableCollection___clear))(variable0) /*AbstractArray::clear*/; - tracehead = trace.prev; +void array___ArraySet___enlarge(val_t p0, val_t p1){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 383; + fra.me.meth = LOCATE_array___ArraySet___enlarge; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + REGB1 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:384 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 384); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArraySet____array(fra.me.REG[0]); + CALL_array___AbstractArray___enlarge(fra.me.REG[0])(fra.me.REG[0], REGB0); + stack_frame_head = fra.me.prev; return; } -val_t array___ArraySet___iterator(val_t self) { - struct trace_t trace = {NULL, NULL, 364, LOCATE_array___ArraySet___iterator}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - variable0 = ((array___AbstractArray___iterator_t)CALL(variable0,COLOR_abstract_collection___Collection___iterator))(variable0) /*AbstractArray::iterator*/; - variable1 = NEW_ArraySetIterator_array___ArraySetIterator___init(variable0); /*new ArraySetIterator[E]*/ - variable0 = variable1; - goto return_label60; - return_label60: while(false); - tracehead = trace.prev; - return variable0; -} -void array___ArraySet___enlarge(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 366, LOCATE_array___ArraySet___enlarge}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - ((array___Array___enlarge_t)CALL(variable1,COLOR_array___AbstractArray___enlarge))(variable1, variable0 /*cap*/) /*Array::enlarge*/; - tracehead = trace.prev; +void array___ArraySet___remove_at(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 386; + fra.me.meth = LOCATE_array___ArraySet___remove_at; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + REGB1 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:388 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 388); + nit_exit(1); + } + fra.me.REG[1] = ATTR_array___ArraySet____array(fra.me.REG[0]); + REGB1 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 388); + nit_exit(1); + } + fra.me.REG[2] = ATTR_array___ArraySet____array(fra.me.REG[0]); + fra.me.REG[2] = CALL_abstract_collection___SequenceRead___last(fra.me.REG[2])(fra.me.REG[2]); + CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB0, fra.me.REG[2]); + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:389 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_array"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 389); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArraySet____array(fra.me.REG[0]); + CALL_abstract_collection___Sequence___pop(fra.me.REG[0])(fra.me.REG[0]); + stack_frame_head = fra.me.prev; return; } -void array___ArraySet___remove_at(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 369, LOCATE_array___ArraySet___remove_at}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - variable2 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - variable2 = ((abstract_collection___IndexedCollection___last_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___last))(variable2) /*IndexedCollection::last*/; - ((array___Array_____braeq_t)CALL(variable1,COLOR_abstract_collection___Map_____braeq))(variable1, variable0 /*i*/, variable2) /*Array::[]=*/; - variable1 = ATTR_array___ArraySet____array( self) /*ArraySet::_array*/; - ((array___AbstractArray___pop_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___pop))(variable1) /*AbstractArray::pop*/; - tracehead = trace.prev; +void array___ArraySet___init(val_t p0, int* init_table){ + int itpos7 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_ArraySet].i; + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t tmp; + if (init_table[itpos7]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 392; + fra.me.meth = LOCATE_array___ArraySet___init; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = NEW_Array_array___Array___init(); + /* ./../lib/standard//collection//array.nit:393 */ + ATTR_array___ArraySet____array(fra.me.REG[0]) = fra.me.REG[1]; + stack_frame_head = fra.me.prev; + init_table[itpos7] = 1; return; } -void array___ArraySet___init(val_t self, int* init_table) { - struct trace_t trace = {NULL, NULL, 375, LOCATE_array___ArraySet___init}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySet].i]) return; - variable0 = NEW_Array_array___Array___init(); /*new Array[E]*/ - ATTR_array___ArraySet____array( self) /*ArraySet::_array*/ = variable0; - init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySet].i] = 1; - tracehead = trace.prev; +void array___ArraySet___with_capacity(val_t p0, val_t p1, int* init_table){ + int itpos8 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_ArraySet].i; + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + if (init_table[itpos8]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 395; + fra.me.meth = LOCATE_array___ArraySet___with_capacity; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB0); + /* ./../lib/standard//collection//array.nit:396 */ + ATTR_array___ArraySet____array(fra.me.REG[0]) = fra.me.REG[1]; + stack_frame_head = fra.me.prev; + init_table[itpos8] = 1; return; } -void array___ArraySet___with_capacity(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, NULL, 378, LOCATE_array___ArraySet___with_capacity}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySet].i]) return; - variable1 = NEW_Array_array___Array___with_capacity( variable0 /*i*/); /*new Array[E]*/ - ATTR_array___ArraySet____array( self) /*ArraySet::_array*/ = variable1; - init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySet].i] = 1; - tracehead = trace.prev; +val_t array___ArraySetIterator___item(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 407; + fra.me.meth = LOCATE_array___ArraySetIterator___item; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArraySetIterator____iter(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:407 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_iter"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 407); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArraySetIterator____iter(fra.me.REG[0]); + fra.me.REG[0] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +void array___ArraySetIterator___next(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 405; + fra.me.meth = LOCATE_array___ArraySetIterator___next; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArraySetIterator____iter(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:405 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_iter"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 405); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArraySetIterator____iter(fra.me.REG[0]); + CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]); + stack_frame_head = fra.me.prev; return; } -val_t array___ArraySetIterator___is_ok(val_t self) { - struct trace_t trace = {NULL, NULL, 386, LOCATE_array___ArraySetIterator___is_ok}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ATTR_array___ArraySetIterator____iter( self) /*ArraySetIterator::_iter*/; - variable0 = ((array___ArrayIterator___is_ok_t)CALL(variable0,COLOR_abstract_collection___Iterator___is_ok))(variable0) /*ArrayIterator::is_ok*/; - goto return_label65; - return_label65: while(false); - tracehead = trace.prev; - return variable0; -} -void array___ArraySetIterator___next(val_t self) { - struct trace_t trace = {NULL, NULL, 388, LOCATE_array___ArraySetIterator___next}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ATTR_array___ArraySetIterator____iter( self) /*ArraySetIterator::_iter*/; - ((array___ArrayIterator___next_t)CALL(variable0,COLOR_abstract_collection___Iterator___next))(variable0) /*ArrayIterator::next*/; - tracehead = trace.prev; +val_t array___ArraySetIterator___is_ok(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 403; + fra.me.meth = LOCATE_array___ArraySetIterator___is_ok; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArraySetIterator____iter(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:403 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_iter"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 403); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArraySetIterator____iter(fra.me.REG[0]); + REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +void array___ArraySetIterator___init(val_t p0, val_t p1, int* init_table){ + int itpos9 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_ArraySetIterator].i; + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t tmp; + if (init_table[itpos9]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 409; + fra.me.meth = LOCATE_array___ArraySetIterator___init; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//collection//array.nit:409 */ + ATTR_array___ArraySetIterator____iter(fra.me.REG[0]) = fra.me.REG[1]; + stack_frame_head = fra.me.prev; + init_table[itpos9] = 1; return; } -val_t array___ArraySetIterator___item(val_t self) { - struct trace_t trace = {NULL, NULL, 390, LOCATE_array___ArraySetIterator___item}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ATTR_array___ArraySetIterator____iter( self) /*ArraySetIterator::_iter*/; - variable0 = ((array___ArrayIterator___item_t)CALL(variable0,COLOR_abstract_collection___Iterator___item))(variable0) /*ArrayIterator::item*/; - goto return_label67; - return_label67: while(false); - tracehead = trace.prev; - return variable0; -} -void array___ArraySetIterator___init(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, NULL, 392, LOCATE_array___ArraySetIterator___init}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySetIterator].i]) return; - ATTR_array___ArraySetIterator____iter( self) /*ArraySetIterator::_iter*/ = variable0 /*iter*/; - init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySetIterator].i] = 1; - tracehead = trace.prev; +val_t array___ArrayMap___iterator(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 471; + fra.me.meth = LOCATE_array___ArrayMap___iterator; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:471 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 471); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[0] = NEW_CoupleMapIterator_abstract_collection___CoupleMapIterator___init(fra.me.REG[0]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t array___ArrayMap___is_empty(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 473; + fra.me.meth = LOCATE_array___ArrayMap___is_empty; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:473 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 473); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t array___ArrayMap___length(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 458; + fra.me.meth = LOCATE_array___ArrayMap___length; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:459 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 459); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:23 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); + nit_exit(1); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:459 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t array___ArrayMap___has(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 444; + fra.me.meth = LOCATE_array___ArrayMap___has; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:447 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 447); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]); + while(1) { + REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]); + if (UNTAG_Bool(REGB0)) { + fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[2] = CALL_abstract_collection___Couple___second(fra.me.REG[2])(fra.me.REG[2]); + REGB0 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1])); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + REGB0 = REGB1; + } + } + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(true); + goto label1; + } + } else { + goto label2; + } + CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]); + } + label2: while(0); + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + /* ./../lib/standard//collection//array.nit:448 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t array___ArrayMap___has_only(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 451; + fra.me.meth = LOCATE_array___ArrayMap___has_only; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:454 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 454); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]); + while(1) { + REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]); + if (UNTAG_Bool(REGB0)) { + fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[2] = CALL_abstract_collection___Couple___second(fra.me.REG[2])(fra.me.REG[2]); + REGB0 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1])); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + REGB0 = REGB1; + } + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(false); + goto label1; + } + } else { + goto label2; + } + CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]); + } + label2: while(0); + REGB1 = TAG_Bool(true); + REGB0 = REGB1; + /* ./../lib/standard//collection//array.nit:455 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t array___ArrayMap___count(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 463; + fra.me.meth = LOCATE_array___ArrayMap___count; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = TAG_Int(0); + REGB1 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:467 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 467); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]); + while(1) { + REGB1 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]); + if (UNTAG_Bool(REGB1)) { + fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[2] = CALL_abstract_collection___Couple___second(fra.me.REG[2])(fra.me.REG[2]); + REGB1 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1])); + if (UNTAG_Bool(REGB1)) { + } else { + REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(false); + REGB1 = REGB2; + } else { + REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + REGB1 = REGB2; + } + } + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Int(1); + REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); + REGB0 = REGB1; + /* ./../lib/standard//collection//array.nit:467 */ + } + } else { + goto label1; + } + CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]); + } + label1: while(0); + /* ./../lib/standard//collection//array.nit:468 */ + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t array___ArrayMap___first(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 461; + fra.me.meth = LOCATE_array___ArrayMap___first; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:461 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 461); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + fra.me.REG[0] = CALL_abstract_collection___Collection___first(fra.me.REG[0])(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + fprintf(stderr, "Reciever is null"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 461); + nit_exit(1); + } + fra.me.REG[0] = CALL_abstract_collection___Couple___first(fra.me.REG[0])(fra.me.REG[0]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +void array___ArrayMap___clear(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 504; + fra.me.meth = LOCATE_array___ArrayMap___clear; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:504 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 504); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + CALL_abstract_collection___RemovableCollection___clear(fra.me.REG[0])(fra.me.REG[0]); + stack_frame_head = fra.me.prev; return; } -val_t array___ArrayMap_____bra(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 402, LOCATE_array___ArrayMap_____bra}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - val_t variable4; - val_t variable5; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable2 = ((array___ArrayMap___index_t)CALL( self,COLOR_array___ArrayMap___index))( self, variable0 /*key*/) /*ArrayMap::index*/; - variable1 = variable2; - variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (UNTAG_Bool(variable2)) { /*if*/ - variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/; - variable3 = variable1 /*i*/; - variable4 = TAG_Bool(UNTAG_Int( variable3 /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable5 = variable4; - if (UNTAG_Bool(variable5)) { /* and */ - variable5 = variable2; - variable5 = ATTR_array___AbstractArray____length(variable5) /*AbstractArray::_length*/; - variable5 = TAG_Bool(UNTAG_Int( variable3 /*index*/)=UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:478 */ + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:479 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 479); + nit_exit(1); + } + fra.me.REG[2] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + REGB0 = REGB1; + REGB2 = TAG_Int(0); + REGB2 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:233 */ + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233); + nit_exit(1); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + REGB2 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:234 */ + goto label1; + label1: while(0); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + /* ./../lib/standard//collection//array.nit:479 */ + if (UNTAG_Bool(REGB0)) { + fprintf(stderr, "Reciever is null"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 479); + nit_exit(1); + } + fra.me.REG[2] = CALL_abstract_collection___Couple___second(fra.me.REG[2])(fra.me.REG[2]); + REGB0 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1])); + if (UNTAG_Bool(REGB0)) { + } else { + REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(false); + REGB0 = REGB2; + } else { + REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + REGB0 = REGB2; + } + } + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//array.nit:480 */ + CALL_array___ArrayMap___remove_at_index(fra.me.REG[0])(fra.me.REG[0], REGB1); + /* ./../lib/standard//collection//array.nit:481 */ + goto label2; + } + REGB0 = TAG_Int(1); + REGB0 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0)); + REGB1 = REGB0; + /* ./../lib/standard//collection//array.nit:483 */ + } else { + /* ./../lib/standard//collection//array.nit:478 */ + goto label3; } - variable4 = variable5; - if (!UNTAG_Bool(variable4)) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_array, 229); nit_exit(1);} - variable4 = variable2; - variable4 = ATTR_array___Array____items(variable4) /*Array::_items*/; - variable4 = UNBOX_NativeArray(variable4)[UNTAG_Int( variable3 /*index*/)]; - goto return_label70; - return_label70: while(false); - variable2 = variable4; - variable2 = ((abstract_collection___Couple___second_t)CALL(variable2,COLOR_abstract_collection___Couple___second))(variable2) /*Couple::second*/; - variable1 = variable2; - goto return_label69; - } else { /*if*/ - variable1 = NIT_NULL /*null*/; - goto return_label69; - } - return_label69: while(false); - tracehead = trace.prev; - return variable1; -} -void array___ArrayMap_____braeq(val_t self, val_t param0, val_t param1) { - struct trace_t trace = {NULL, NULL, 413, LOCATE_array___ArrayMap_____braeq}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - val_t variable4; - val_t variable5; - val_t variable6; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = param1; - variable3 = ((array___ArrayMap___index_t)CALL( self,COLOR_array___ArrayMap___index))( self, variable0 /*key*/) /*ArrayMap::index*/; - variable2 = variable3; - variable3 = TAG_Bool(UNTAG_Int( variable2 /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (UNTAG_Bool(variable3)) { /*if*/ - variable3 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/; - variable4 = variable2 /*i*/; - variable5 = TAG_Bool(UNTAG_Int( variable4 /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable6 = variable5; - if (UNTAG_Bool(variable6)) { /* and */ - variable6 = variable3; - variable6 = ATTR_array___AbstractArray____length(variable6) /*AbstractArray::_length*/; - variable6 = TAG_Bool(UNTAG_Int( variable4 /*index*/)=UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:490 */ + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:491 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 491); + nit_exit(1); + } + fra.me.REG[2] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + REGB0 = REGB1; + REGB2 = TAG_Int(0); + REGB2 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:233 */ + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233); + nit_exit(1); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + REGB2 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:234 */ + goto label1; + label1: while(0); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + /* ./../lib/standard//collection//array.nit:491 */ + if (UNTAG_Bool(REGB0)) { + fprintf(stderr, "Reciever is null"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 491); + nit_exit(1); + } + fra.me.REG[2] = CALL_abstract_collection___Couple___second(fra.me.REG[2])(fra.me.REG[2]); + REGB0 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1])); + if (UNTAG_Bool(REGB0)) { + } else { + REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(false); + REGB0 = REGB2; + } else { + REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + REGB0 = REGB2; + } + } + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//array.nit:492 */ + CALL_array___ArrayMap___remove_at_index(fra.me.REG[0])(fra.me.REG[0], REGB1); + } + REGB0 = TAG_Int(1); + REGB0 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0)); + REGB1 = REGB0; + /* ./../lib/standard//collection//array.nit:494 */ + } else { + /* ./../lib/standard//collection//array.nit:490 */ + goto label2; } - variable5 = variable6; - if (!UNTAG_Bool(variable5)) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_array, 229); nit_exit(1);} - variable5 = variable3; - variable5 = ATTR_array___Array____items(variable5) /*Array::_items*/; - variable5 = UNBOX_NativeArray(variable5)[UNTAG_Int( variable4 /*index*/)]; - goto return_label72; - return_label72: while(false); - variable3 = variable5; - ((abstract_collection___Couple___second__eq_t)CALL(variable3,COLOR_abstract_collection___Couple___second__eq))(variable3, variable1 /*item*/) /*Couple::second=*/; - } else { /*if*/ - variable3 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/; - variable4 = NEW_Couple_abstract_collection___Couple___init( variable0 /*key*/, variable1 /*item*/); /*new Couple[K, E]*/ - ((array___AbstractArray___push_t)CALL(variable3,COLOR_abstract_collection___IndexedCollection___push))(variable3, variable4) /*AbstractArray::push*/; - } - tracehead = trace.prev; + } + label2: while(0); + stack_frame_head = fra.me.prev; return; } -val_t array___ArrayMap___has_key(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 424, LOCATE_array___ArrayMap___has_key}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = ((array___ArrayMap___index_t)CALL( self,COLOR_array___ArrayMap___index))( self, variable0 /*key*/) /*ArrayMap::index*/; - variable1 = TAG_Bool(UNTAG_Int(variable1)>=UNTAG_Int( TAG_Int(0))); - goto return_label73; - return_label73: while(false); - tracehead = trace.prev; - return variable1; -} -val_t array___ArrayMap___has(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 427, LOCATE_array___ArrayMap___has}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/; - variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*AbstractArray::iterator*/; - while (true) { /*for*/ - variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/; - if (!UNTAG_Bool(variable2)) break; /*for*/ - variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/; - variable3 = ((abstract_collection___Couple___second_t)CALL( variable2 /*i*/,COLOR_abstract_collection___Couple___second))( variable2 /*i*/) /*Couple::second*/; - 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::==*/))))); - if (UNTAG_Bool(variable3)) { /*if*/ - variable1 = TAG_Bool(true); - goto return_label74; +val_t array___ArrayMap_____bra(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 419; + fra.me.meth = LOCATE_array___ArrayMap_____bra; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = CALL_array___ArrayMap___index(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:423 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:424 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 424); + nit_exit(1); } - continue_75: while(0); - ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/; - } - break_75: while(0); - variable1 = TAG_Bool(false); - goto return_label74; - return_label74: while(false); - tracehead = trace.prev; - return variable1; -} -val_t array___ArrayMap___has_only(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 434, LOCATE_array___ArrayMap___has_only}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/; - variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*AbstractArray::iterator*/; - while (true) { /*for*/ - variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/; - if (!UNTAG_Bool(variable2)) break; /*for*/ - variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/; - variable3 = ((abstract_collection___Couple___second_t)CALL( variable2 /*i*/,COLOR_abstract_collection___Couple___second))( variable2 /*i*/) /*Couple::second*/; - 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::==*/))))))); - if (UNTAG_Bool(variable3)) { /*if*/ - variable1 = TAG_Bool(false); - goto return_label76; + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:233 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233); + nit_exit(1); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable2)) break; /* while*/ - variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/; - variable3 = variable1 /*i*/; - variable4 = TAG_Bool(UNTAG_Int( variable3 /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable5 = variable4; - if (UNTAG_Bool(variable5)) { /* and */ - variable5 = variable2; - variable5 = ATTR_array___AbstractArray____length(variable5) /*AbstractArray::_length*/; - variable5 = TAG_Bool(UNTAG_Int( variable3 /*index*/)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:234 */ + goto label1; + label1: while(0); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + /* ./../lib/standard//collection//array.nit:424 */ + if (UNTAG_Bool(REGB0)) { + fprintf(stderr, "Reciever is null"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 424); + nit_exit(1); } - variable1 = TAG_Int(UNTAG_Int(variable1)-UNTAG_Int( TAG_Int(1))) /*i*/; - continue_85: while(0); + fra.me.REG[0] = CALL_abstract_collection___Couple___second(fra.me.REG[0])(fra.me.REG[0]); + goto label2; + } else { + /* ./../lib/standard//collection//array.nit:426 */ + fprintf(stderr, "Aborted"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 426); + nit_exit(1); } - break_85: while(0); - return_label84: while(false); - tracehead = trace.prev; - return; -} -void array___ArrayMap___remove_all(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 470, LOCATE_array___ArrayMap___remove_all}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - val_t variable4; - val_t variable5; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/; - variable2 = ((array___AbstractArray___length_t)CALL(variable2,COLOR_abstract_collection___Collection___length))(variable2) /*AbstractArray::length*/; - variable2 = TAG_Int(UNTAG_Int(variable2)-UNTAG_Int( TAG_Int(1))); - variable1 = variable2; - while (true) { /*while*/ - variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable2)) break; /* while*/ - variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/; - variable3 = variable1 /*i*/; - variable4 = TAG_Bool(UNTAG_Int( variable3 /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable5 = variable4; - if (UNTAG_Bool(variable5)) { /* and */ - variable5 = variable2; - variable5 = ATTR_array___AbstractArray____length(variable5) /*AbstractArray::_length*/; - variable5 = TAG_Bool(UNTAG_Int( variable3 /*index*/)=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:442 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB1; +} +void array___ArrayMap_____braeq(val_t p0, val_t p1, val_t p2){ + struct {struct stack_frame_t me; val_t MORE_REG[3];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 430; + fra.me.meth = LOCATE_array___ArrayMap_____braeq; + fra.me.has_broke = 0; + fra.me.REG_size = 4; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[3] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + fra.me.REG[2] = p2; + REGB0 = CALL_array___ArrayMap___index(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:434 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:435 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 435); + nit_exit(1); + } + fra.me.REG[3] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:233 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233); + nit_exit(1); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:234 */ + goto label1; + label1: while(0); + REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL); + /* ./../lib/standard//collection//array.nit:435 */ + if (UNTAG_Bool(REGB0)) { + fprintf(stderr, "Reciever is null"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 435); + nit_exit(1); } - variable1 = TAG_Int(UNTAG_Int(variable1)-UNTAG_Int( TAG_Int(1))) /*i*/; - continue_88: while(0); + CALL_abstract_collection___Couple___second__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]); + } else { + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:437 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 437); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + fra.me.REG[2] = NEW_Couple_abstract_collection___Couple___init(fra.me.REG[1], fra.me.REG[2]); + CALL_abstract_collection___Sequence___push(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]); } - break_88: while(0); - tracehead = trace.prev; + stack_frame_head = fra.me.prev; return; } -void array___ArrayMap___remove_at(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 481, LOCATE_array___ArrayMap___remove_at}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable2 = ((array___ArrayMap___index_t)CALL( self,COLOR_array___ArrayMap___index))( self, variable0 /*key*/) /*ArrayMap::index*/; - variable1 = variable2; - variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (UNTAG_Bool(variable2)) { /*if*/ - ((array___ArrayMap___remove_at_index_t)CALL( self,COLOR_array___ArrayMap___remove_at_index))( self, variable1 /*i*/) /*ArrayMap::remove_at_index*/; - } - tracehead = trace.prev; +void array___ArrayMap___remove_at(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 498; + fra.me.meth = LOCATE_array___ArrayMap___remove_at; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = CALL_array___ArrayMap___index(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:501 */ + if (UNTAG_Bool(REGB1)) { + CALL_array___ArrayMap___remove_at_index(fra.me.REG[0])(fra.me.REG[0], REGB0); + } + stack_frame_head = fra.me.prev; return; } -void array___ArrayMap___clear(val_t self) { - struct trace_t trace = {NULL, NULL, 487, LOCATE_array___ArrayMap___clear}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/; - ((array___AbstractArray___clear_t)CALL(variable0,COLOR_abstract_collection___RemovableCollection___clear))(variable0) /*AbstractArray::clear*/; - tracehead = trace.prev; +val_t array___ArrayMap___couple_at(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 509; + fra.me.meth = LOCATE_array___ArrayMap___couple_at; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = CALL_array___ArrayMap___index(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:512 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:513 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 513); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + REGB1 = TAG_Int(0); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:233 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233); + nit_exit(1); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + REGB1 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:234 */ + goto label1; + label1: while(0); + /* ./../lib/standard//collection//array.nit:513 */ + goto label2; + } else { + fra.me.REG[0] = NIT_NULL; + /* ./../lib/standard//collection//array.nit:515 */ + goto label2; + } + label2: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +void array___ArrayMap___enlarge(val_t p0, val_t p1){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 506; + fra.me.meth = LOCATE_array___ArrayMap___enlarge; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + REGB1 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:507 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 507); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + CALL_array___AbstractArray___enlarge(fra.me.REG[0])(fra.me.REG[0], REGB0); + stack_frame_head = fra.me.prev; return; } -void array___ArrayMap___enlarge(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 489, LOCATE_array___ArrayMap___enlarge}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable1 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/; - ((array___Array___enlarge_t)CALL(variable1,COLOR_array___AbstractArray___enlarge))(variable1, variable0 /*cap*/) /*Array::enlarge*/; - tracehead = trace.prev; +void array___ArrayMap___remove_at_index(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 522; + fra.me.meth = LOCATE_array___ArrayMap___remove_at_index; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + REGB1 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:525 */ + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 525); + nit_exit(1); + } + fra.me.REG[1] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + REGB1 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 525); + nit_exit(1); + } + fra.me.REG[2] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + fra.me.REG[2] = CALL_abstract_collection___SequenceRead___last(fra.me.REG[2])(fra.me.REG[2]); + CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB0, fra.me.REG[2]); + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:526 */ + if (UNTAG_Bool(REGB0)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 526); + nit_exit(1); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + CALL_abstract_collection___Sequence___pop(fra.me.REG[0])(fra.me.REG[0]); + stack_frame_head = fra.me.prev; return; } -val_t array___ArrayMap___couple_at(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 492, LOCATE_array___ArrayMap___couple_at}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - val_t variable4; - val_t variable5; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = param0; - variable2 = ((array___ArrayMap___index_t)CALL( self,COLOR_array___ArrayMap___index))( self, variable0 /*key*/) /*ArrayMap::index*/; - variable1 = variable2; - variable2 = TAG_Bool(UNTAG_Int( variable1 /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (UNTAG_Bool(variable2)) { /*if*/ - variable2 = ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/; - variable3 = variable1 /*i*/; - variable4 = TAG_Bool(UNTAG_Int( variable3 /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable5 = variable4; - if (UNTAG_Bool(variable5)) { /* and */ - variable5 = variable2; - variable5 = ATTR_array___AbstractArray____length(variable5) /*AbstractArray::_length*/; - variable5 = TAG_Bool(UNTAG_Int( variable3 /*index*/)=UNTAG_Int( TAG_Int(0))); - variable6 = variable5; - if (UNTAG_Bool(variable6)) { /* and */ - variable6 = variable3; - variable6 = ATTR_array___AbstractArray____length(variable6) /*AbstractArray::_length*/; - variable6 = TAG_Bool(UNTAG_Int( variable4 /*index*/)=UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:233 */ + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233); + nit_exit(1); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + REGB2 = TAG_Bool(UNTAG_Int(REGB1)=UNTAG_Int( TAG_Int(0))); - variable6 = variable5; - if (UNTAG_Bool(variable6)) { /* and */ - variable6 = variable3; - variable6 = ATTR_array___AbstractArray____length(variable6) /*AbstractArray::_length*/; - variable6 = TAG_Bool(UNTAG_Int( variable4 /*index*/)vft[INIT_TABLE_POS_ArrayMap].i]) return; - variable0 = NEW_Array_array___Array___init(); /*new Array[Couple[K, E]]*/ - ATTR_array___ArrayMap____items( self) /*ArrayMap::_items*/ = variable0; - init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArrayMap].i] = 1; - tracehead = trace.prev; + fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB1)]; + /* ./../lib/standard//collection//array.nit:234 */ + goto label1; + label1: while(0); + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + /* ./../lib/standard//collection//array.nit:537 */ + if (UNTAG_Bool(REGB1)) { + fprintf(stderr, "Reciever is null"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 537); + nit_exit(1); + } + fra.me.REG[2] = CALL_abstract_collection___Couple___first(fra.me.REG[2])(fra.me.REG[2]); + REGB1 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1])); + if (UNTAG_Bool(REGB1)) { + } else { + REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(false); + REGB1 = REGB2; + } else { + REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + REGB1 = REGB2; + } + } + } else { + REGB2 = TAG_Bool(false); + REGB1 = REGB2; + } + if (UNTAG_Bool(REGB1)) { + goto label2; + } + REGB1 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:540 */ + while(1) { + REGB2 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_items"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 540); + nit_exit(1); + } + fra.me.REG[2] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + /* ./../lib/standard//collection//array.nit:23 */ + if (UNTAG_Bool(REGB2)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); + nit_exit(1); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + REGB2 = TAG_Bool(UNTAG_Int(REGB1)=UNTAG_Int(REGB3)); + /* ./../lib/standard//collection//array.nit:233 */ + if (UNTAG_Bool(REGB3)) { + REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB3)) { + } else { + fprintf(stderr, "Uninitialized attribute %s", "_length"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233); + nit_exit(1); + } + REGB3 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + REGB3 = TAG_Bool(UNTAG_Int(REGB2)val[UNTAG_Int(REGB2)]; + /* ./../lib/standard//collection//array.nit:234 */ + goto label3; + label3: while(0); + REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + /* ./../lib/standard//collection//array.nit:541 */ + if (UNTAG_Bool(REGB2)) { + fprintf(stderr, "Reciever is null"); + fprintf(stderr, " (%s:%d)\n", LOCATE_array, 541); + nit_exit(1); + } + fra.me.REG[2] = CALL_abstract_collection___Couple___first(fra.me.REG[2])(fra.me.REG[2]); + REGB2 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1])); + if (UNTAG_Bool(REGB2)) { + } else { + REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB3)) { + REGB3 = TAG_Bool(false); + REGB2 = REGB3; + } else { + REGB3 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + REGB2 = REGB3; + } + } + if (UNTAG_Bool(REGB2)) { + /* ./../lib/standard//collection//array.nit:542 */ + ATTR_array___ArrayMap____last_index(fra.me.REG[0]) = REGB1; + REGB0 = REGB1; + /* ./../lib/standard//collection//array.nit:543 */ + goto label2; + } + REGB2 = TAG_Int(1); + REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2)); + REGB1 = REGB2; + /* ./../lib/standard//collection//array.nit:545 */ + } else { + /* ./../lib/standard//collection//array.nit:540 */ + goto label4; + } + } + label4: while(0); + REGB1 = TAG_Int(1); + REGB1 = TAG_Int(-UNTAG_Int(REGB1)); + REGB0 = REGB1; + /* ./../lib/standard//collection//array.nit:547 */ + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +void array___ArrayMap___init(val_t p0, int* init_table){ + int itpos10 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_ArrayMap].i; + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t tmp; + if (init_table[itpos10]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 550; + fra.me.meth = LOCATE_array___ArrayMap___init; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = NEW_Array_array___Array___init(); + /* ./../lib/standard//collection//array.nit:553 */ + ATTR_array___ArrayMap____items(fra.me.REG[0]) = fra.me.REG[1]; + stack_frame_head = fra.me.prev; + init_table[itpos10] = 1; return; } -val_t array___Iterator___to_a(val_t self) { - struct trace_t trace = {NULL, NULL, 543, LOCATE_array___Iterator___to_a}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable1 = NEW_Array_array___Array___init(); /*new Array[E]*/ - variable0 = variable1; - while (true) { /*while*/ - variable1 = ((abstract_collection___Iterator___is_ok_t)CALL( self,COLOR_abstract_collection___Iterator___is_ok))( self) /*Iterator::is_ok*/; - if (!UNTAG_Bool(variable1)) break; /* while*/ - variable1 = ((abstract_collection___Iterator___item_t)CALL( self,COLOR_abstract_collection___Iterator___item))( self) /*Iterator::item*/; - ((array___AbstractArray___add_t)CALL( variable0 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*res*/, variable1) /*AbstractArray::add*/; - ((abstract_collection___Iterator___next_t)CALL( self,COLOR_abstract_collection___Iterator___next))( self) /*Iterator::next*/; - continue_102: while(0); - } - break_102: while(0); - variable0 = variable0 /*res*/; - goto return_label101; - return_label101: while(false); - tracehead = trace.prev; - return variable0; -} -val_t array___Collection___to_a(val_t self) { - struct trace_t trace = {NULL, NULL, 556, LOCATE_array___Collection___to_a}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable0 = ((abstract_collection___Collection___iterator_t)CALL( self,COLOR_abstract_collection___Collection___iterator))( self) /*Collection::iterator*/; - variable0 = ((array___Iterator___to_a_t)CALL(variable0,COLOR_array___Iterator___to_a))(variable0) /*Iterator::to_a*/; - goto return_label103; - return_label103: while(false); - tracehead = trace.prev; - return variable0; -} -val_t array___ArrayCapable___calloc_array(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 567, LOCATE_array___ArrayCapable___calloc_array}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - tracehead = trace.prev; - return BOX_NativeArray((val_t*)malloc((UNTAG_Int( param0) * sizeof(val_t)))); -} -val_t array___NativeArray_____bra(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 573, LOCATE_array___NativeArray_____bra}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - tracehead = trace.prev; - return UNBOX_NativeArray( self)[UNTAG_Int( param0)]; -} -void array___NativeArray_____braeq(val_t self, val_t param0, val_t param1) { - struct trace_t trace = {NULL, NULL, 574, LOCATE_array___NativeArray_____braeq}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - UNBOX_NativeArray( self)[UNTAG_Int( param0)]= param1; - tracehead = trace.prev; +val_t array___Iterator___to_a(val_t p0){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 560; + fra.me.meth = LOCATE_array___Iterator___to_a; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = NEW_Array_array___Array___init(); + /* ./../lib/standard//collection//array.nit:564 */ + while(1) { + REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]); + if (UNTAG_Bool(REGB0)) { + fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:565 */ + array___Array___add(fra.me.REG[1], fra.me.REG[2]); + /* ./../lib/standard//collection//array.nit:566 */ + CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]); + } else { + /* ./../lib/standard//collection//array.nit:564 */ + goto label1; + } + } + label1: while(0); + /* ./../lib/standard//collection//array.nit:568 */ + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[1]; +} +val_t array___Collection___to_a(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 573; + fra.me.meth = LOCATE_array___Collection___to_a; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[0] = CALL_array___Iterator___to_a(fra.me.REG[0])(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:576 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t array___ArrayCapable___calloc_array(val_t p0, val_t p1){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 584; + fra.me.meth = LOCATE_array___ArrayCapable___calloc_array; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + REGB0 = p1; + fra.me.REG[0] = NEW_NativeArray(UNTAG_Int(REGB0), sizeof(val_t)); + /* ./../lib/standard//collection//array.nit:584 */ + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t array___NativeArray_____bra(val_t p0, val_t p1){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 590; + fra.me.meth = LOCATE_array___NativeArray_____bra; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + fra.me.REG[0] = ((Nit_NativeArray)fra.me.REG[0])->val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:590 */ + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +void array___NativeArray_____braeq(val_t p0, val_t p1, val_t p2){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 591; + fra.me.meth = LOCATE_array___NativeArray_____braeq; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + fra.me.REG[1] = p2; + /* ./../lib/standard//collection//array.nit:591 */ + ((Nit_NativeArray)fra.me.REG[0])->val[UNTAG_Int(REGB0)]=fra.me.REG[1]; + stack_frame_head = fra.me.prev; return; } -void array___NativeArray___copy_to(val_t self, val_t param0, val_t param1) { - struct trace_t trace = {NULL, NULL, 575, LOCATE_array___NativeArray___copy_to}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - (void)memcpy(UNBOX_NativeArray( param0), UNBOX_NativeArray( self), UNTAG_Int( param1)*sizeof(val_t)); - tracehead = trace.prev; +void array___NativeArray___copy_to(val_t p0, val_t p1, val_t p2){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 592; + fra.me.meth = LOCATE_array___NativeArray___copy_to; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + REGB0 = p2; + /* ./../lib/standard//collection//array.nit:592 */ + (void)memcpy(((Nit_NativeArray )fra.me.REG[1])->val, ((Nit_NativeArray)fra.me.REG[0])->val, UNTAG_Int(REGB0)*sizeof(val_t)); + stack_frame_head = fra.me.prev; return; }