X-Git-Url: http://nitlanguage.org diff --git a/c_src/array._sep.c b/c_src/array._sep.c index 23410d5..e593de6 100644 --- a/c_src/array._sep.c +++ b/c_src/array._sep.c @@ -1,1597 +1,4603 @@ /* 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, LOCATE_array, 23, LOCATE_array___AbstractArray___enlarge}; - trace.prev = tracehead; tracehead = &trace; - fprintf(stderr, "Deferred method %s called"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); - tracehead = trace.prev; - return; +val_t array___AbstractArrayRead___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 = 23; + fra.me.meth = LOCATE_array___AbstractArrayRead___length; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t array___AbstractArrayRead___is_empty(val_t p0){ + struct {struct stack_frame_t me;} 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 = 26; + fra.me.meth = LOCATE_array___AbstractArrayRead___is_empty; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./../lib/standard//collection//array.nit:26 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 26); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + REGB1 = TAG_Int(0); + REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1)); + if (UNTAG_Bool(REGB2)) { + } else { + /* ./../lib/standard//kernel.nit:207 */ + REGB1 = TAG_Bool((REGB0)==(REGB1)); + /* ./../lib/standard//collection//array.nit:26 */ + REGB2 = REGB1; + } + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB2; +} +val_t array___AbstractArrayRead___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 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 = 28; + fra.me.meth = LOCATE_array___AbstractArrayRead___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; + /* ./../lib/standard//collection//array.nit:30 */ + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:32 */ + while(1) { + /* ./../lib/standard//kernel.nit:212 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB0)=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:50 */ + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:212 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:84 */ + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//collection//array.nit:85 */ + 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])); + 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)) { + /* ./../lib/standard//collection//array.nit:86 */ + REGB1 = REGB0; + goto label1; + } else { + /* ./../lib/standard//collection//array.nit:88 */ + REGB2 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:88 */ + REGB0 = REGB2; + } + } else { + /* ./../lib/standard//collection//array.nit:84 */ + goto label2; + } + } + label2: while(0); + /* ./../lib/standard//collection//array.nit:91 */ + REGB0 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:216 */ + REGB0 = TAG_Int(-UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:91 */ + REGB1 = REGB0; + 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; + /* ./../lib/standard//collection//array.nit:96 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 96); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:97 */ + fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB0); + /* ./../lib/standard//collection//array.nit:98 */ + while(1) { + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:214 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:98 */ + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//collection//array.nit:99 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:99 */ + REGB0 = REGB1; + /* ./../lib/standard//collection//array.nit:100 */ + fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB0); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(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]; } -val_t array___AbstractArray___length(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 25, LOCATE_array___AbstractArray___length}; - trace.prev = tracehead; tracehead = &trace; - tracehead = trace.prev; - return ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/; -} -val_t array___AbstractArray___is_empty(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 28, LOCATE_array___AbstractArray___is_empty}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - variable0 = ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/; - variable0 = TAG_Bool((variable0)==( TAG_Int(0))); - goto return_label0; - return_label0: while(false); - tracehead = trace.prev; - return variable0; -} -void array___AbstractArray___push(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 30, LOCATE_array___AbstractArray___push}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - variable0 = param0; - ((array___AbstractArray___add_t)CALL( self,COLOR_abstract_collection___SimpleCollection___add))( self, variable0 /*item*/) /*AbstractArray::add*/; - tracehead = trace.prev; +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); + /* ./../lib/standard//kernel.nit:214 */ + REGB3 = TAG_Bool(UNTAG_Int(REGB1)>UNTAG_Int(REGB3)); + /* ./../lib/standard//collection//array.nit:109 */ + if (UNTAG_Bool(REGB3)) { + /* ./../lib/standard//collection//array.nit:110 */ + REGB3 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB3 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB3)); + /* ./../lib/standard//collection//array.nit:110 */ + REGB1 = REGB3; + /* ./../lib/standard//kernel.nit:215 */ + REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1)); + REGB4 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:111 */ + fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB4); + 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, LOCATE_array, 32, LOCATE_array___AbstractArray___pop}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 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; - 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___output(val_t p0){ + 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 = 115; + fra.me.meth = LOCATE_array___AbstractArrayRead___output; + 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; + /* ./../lib/standard//collection//array.nit:117 */ + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:119 */ + while(1) { + /* ./../lib/standard//kernel.nit:212 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB0)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___add(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 71, LOCATE_array___AbstractArray___add}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - 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___enlarge(val_t p0, val_t p1){ + 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 = 147; + fra.me.meth = LOCATE_array___AbstractArray___enlarge; + fra.me.has_broke = 0; + fra.me.REG_size = 0; + /* ./../lib/standard//collection//array.nit:147 */ + nit_abort("Deferred method called", NULL, LOCATE_array, 147); + stack_frame_head = fra.me.prev; return; } -void array___AbstractArray___clear(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 73, LOCATE_array___AbstractArray___clear}; - trace.prev = tracehead; tracehead = &trace; - ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/ = TAG_Int(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; } -val_t array___AbstractArray___has(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 75, LOCATE_array___AbstractArray___has}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - trace.prev = tracehead; tracehead = &trace; - 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*/; + } + label1: while(0); + /* ./../lib/standard//collection//array.nit:169 */ + REGB0 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB0 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:169 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + /* ./../lib/standard//collection//array.nit:170 */ + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[1]; +} +void array___AbstractArray___unshift(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 = 173; + fra.me.meth = LOCATE_array___AbstractArray___unshift; + 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; + /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:175 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:176 */ + while(1) { + REGB0 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:214 */ + REGB0 = TAG_Bool(UNTAG_Int(REGB1)>UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:176 */ + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//array.nit:177 */ + REGB0 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:177 */ + fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB1); + CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[2]); + /* ./../lib/standard//collection//array.nit:178 */ + REGB0 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB0 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:178 */ + REGB1 = REGB0; + } else { + /* ./../lib/standard//collection//array.nit:176 */ + goto label1; } - continue_22: while(0); - } - break_22: while(0); - variable3 = TAG_Int(-UNTAG_Int( TAG_Int(1))); - variable2 = variable3; - goto return_label21; - return_label21: while(false); - tracehead = trace.prev; - return variable2; -} -val_t array___AbstractArray___reversed(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 141, LOCATE_array___AbstractArray___reversed}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - variable1 = ATTR_array___AbstractArray____length( self) /*AbstractArray::_length*/; - variable0 = variable1; - variable2 = NEW_array___Array___with_capacity( variable0 /*cmp*/); /*new Array[E]*/ - variable1 = variable2; - while (true) { /*while*/ - variable2 = TAG_Bool(UNTAG_Int( variable0 /*cmp*/)>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, LOCATE_array, 152, LOCATE_array___AbstractArray___remove}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - 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); + /* ./../lib/standard//collection//array.nit:180 */ + REGB1 = TAG_Int(0); + 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___insert(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 = 183; + fra.me.meth = LOCATE_array___AbstractArray___insert; + 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:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:185 */ + REGB2 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:185 */ + CALL_array___AbstractArray___enlarge(fra.me.REG[0])(fra.me.REG[0], REGB2); + /* ./../lib/standard//collection//array.nit:23 */ + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:217 */ + REGB2 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:186 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:186 */ + CALL_array___AbstractArrayRead___copy_to(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2, fra.me.REG[0], REGB1); + /* ./../lib/standard//collection//array.nit:187 */ + 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, LOCATE_array, 154, LOCATE_array___AbstractArray___remove_all}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - 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___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; + /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + 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_at(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 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; - 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(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); + /* ./../lib/standard//collection//array.nit:201 */ + REGB1 = CALL_array___AbstractArrayRead___index_of_from(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0); + REGB0 = REGB1; + } else { + /* ./../lib/standard//collection//array.nit:199 */ + 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); + 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, LOCATE_array, 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; - 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; +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; + /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:208 */ + REGB2 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:208 */ + if (UNTAG_Bool(REGB2)) { + /* ./../lib/standard//kernel.nit:212 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:238 */ + ((void (*)(struct stack_frame_t *, val_t))(CREG[0]))(closctx_param, fra.me.REG[2]); + if (closctx_param->has_broke) { + goto label1; + } + /* ./../lib/standard//collection//array.nit:239 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:239 */ + REGB0 = REGB1; + } else { + /* ./../lib/standard//collection//array.nit:237 */ + goto label2; } - variable0 = TAG_Int(UNTAG_Int(variable0)+UNTAG_Int( TAG_Int(1))) /*i*/; - continue_33: while(0); } - break_33: while(0); - tracehead = trace.prev; + label2: while(0); + label1: while(0); + stack_frame_head = fra.me.prev; return; } -val_t array___AbstractArray___iterator(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 197, LOCATE_array___AbstractArray___iterator}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - variable0 = NEW_array___ArrayIterator___init( self); /*new ArrayIterator[E]*/ - goto return_label34; - return_label34: while(false); - tracehead = trace.prev; - return variable0; -} -val_t array___AbstractArray_____eqeq(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 199, LOCATE_array___AbstractArray_____eqeq}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - val_t variable4; - trace.prev = tracehead; tracehead = &trace; - variable0 = param0; - variable1 = TAG_Bool(( variable0 /*o*/==NIT_NULL) || VAL_ISA( variable0 /*o*/, COLOR_AbstractArray, ID_AbstractArray)) /*cast AbstractArray[E]*/; - variable1 = TAG_Bool(!UNTAG_Bool(variable1)); - if (!UNTAG_Bool(variable1)) { /* or */ - variable1 = TAG_Bool(IS_EQUAL_NN( variable0 /*o*/, NIT_NULL /*null*/)); - } - if (UNTAG_Bool(variable1)) { /*if*/ - variable1 = TAG_Bool(false); - goto return_label35; - } - variable1 = TAG_Bool(( variable0 /*o*/==NIT_NULL) || VAL_ISA( variable0 /*o*/, COLOR_AbstractArray, ID_AbstractArray)) /*cast AbstractArray[E]*/; - if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___AbstractArray_____eqeq, LOCATE_array, 203); nit_exit(1);} - variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*AbstractArray::length*/; - variable1 = variable2; - variable2 = ((array___AbstractArray___length_t)CALL( variable0 /*o*/,COLOR_abstract_collection___Collection___length))( variable0 /*o*/) /*AbstractArray::length*/; - variable2 = TAG_Bool((variable2)!=( variable1 /*l*/)); - if (UNTAG_Bool(variable2)) { /*if*/ - variable1 = TAG_Bool(false); - goto return_label35; - } - variable2 = TAG_Int(0); - while (true) { /*while*/ - variable3 = TAG_Bool(UNTAG_Int( variable2 /*i*/)=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:212 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:246 */ + 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 = 249; + 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; + /* ./../lib/standard//collection//array.nit:251 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:251 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 251); } - 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; -} -val_t array___Array_____bra(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 227, LOCATE_array___Array_____bra}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - 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___add(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 = 261; + fra.me.meth = LOCATE_array___Array___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; + /* ./../lib/standard//collection//array.nit:263 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 263); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:264 */ + REGB1 = TAG_Bool(ATTR_array___Array____capacity(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_array, 264); + } + REGB1 = ATTR_array___Array____capacity(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:211 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:264 */ + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//collection//array.nit:265 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:265 */ + CALL_array___AbstractArray___enlarge(fra.me.REG[0])(fra.me.REG[0], REGB1); + } + /* ./../lib/standard//collection//array.nit:267 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:267 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB1; + /* ./../lib/standard//collection//array.nit:268 */ + fra.me.REG[0] = ATTR_array___Array____items(fra.me.REG[0]); + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + nit_abort("Reciever is null", NULL, LOCATE_array, 268); + } + /* ./../lib/standard//collection//array.nit:655 */ + ((Nit_NativeArray)fra.me.REG[0])->val[UNTAG_Int(REGB0)]=fra.me.REG[1]; + stack_frame_head = fra.me.prev; + return; +} +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 = 271; + 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; + /* ./../lib/standard//collection//array.nit:273 */ + REGB1 = TAG_Bool(ATTR_array___Array____capacity(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_array, 273); + } + REGB1 = ATTR_array___Array____capacity(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:211 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:274 */ + if (UNTAG_Bool(REGB2)) { + goto label1; + } + /* ./../lib/standard//collection//array.nit:275 */ + while(1) { + /* ./../lib/standard//kernel.nit:211 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:275 */ + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Int(2); + /* ./../lib/standard//kernel.nit:218 */ + REGB2 = TAG_Int(UNTAG_Int(REGB1)*UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:275 */ + REGB3 = TAG_Int(2); + /* ./../lib/standard//kernel.nit:215 */ + REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3)); + /* ./../lib/standard//collection//array.nit:275 */ + REGB1 = REGB3; + } else { + goto label2; + } + } + label2: while(0); + /* ./../lib/standard//collection//array.nit:648 */ + fra.me.REG[1] = NEW_NativeArray(UNTAG_Int(REGB1), sizeof(val_t)); + /* ./../lib/standard//collection//array.nit:277 */ + REGB0 = TAG_Bool(ATTR_array___Array____capacity(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_array, 277); + } + REGB0 = ATTR_array___Array____capacity(fra.me.REG[0]); + REGB3 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:214 */ + REGB3 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB3)); + /* ./../lib/standard//collection//array.nit:277 */ + 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 { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 277); + } + REGB3 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_array, 277); + } + /* ./../lib/standard//collection//array.nit:656 */ + (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:278 */ + ATTR_array___Array____items(fra.me.REG[0]) = fra.me.REG[1]; + /* ./../lib/standard//collection//array.nit:279 */ + ATTR_array___Array____capacity(fra.me.REG[0]) = REGB1; + label1: while(0); + stack_frame_head = fra.me.prev; return; } -void array___Array___enlarge(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 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; - 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___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 = 282; + 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; + /* ./../lib/standard//collection//array.nit:285 */ + REGB0 = TAG_Int(0); + ATTR_array___Array____capacity(fra.me.REG[0]) = REGB0; + /* ./../lib/standard//collection//array.nit:286 */ + REGB0 = TAG_Int(0); + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos1] = 1; return; } -void array___Array___init(val_t self, int* init_table) { - struct trace_t trace = {NULL, LOCATE_array, 256, LOCATE_array___Array___init}; - trace.prev = tracehead; tracehead = &trace; - 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___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 = 289; + 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; + /* ./../lib/standard//collection//array.nit:289 */ + REGB0 = TAG_Bool((fra.me.REG[1]!=NIT_NULL) && VAL_ISA(fra.me.REG[1], COLOR_Array, ID_Array)) /*cast Array[E]*/; + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Cast failed", NULL, LOCATE_array, 289); + } + /* ./../lib/standard//collection//array.nit:292 */ + fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[1]); + ATTR_array___Array____items(fra.me.REG[0]) = fra.me.REG[2]; + /* ./../lib/standard//collection//array.nit:293 */ + REGB0 = TAG_Bool(ATTR_array___Array____capacity(fra.me.REG[1])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_array, 293); + } + REGB0 = ATTR_array___Array____capacity(fra.me.REG[1]); + ATTR_array___Array____capacity(fra.me.REG[0]) = REGB0; + /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:294 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos2] = 1; return; } -void array___Array___with(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, LOCATE_array, 263, LOCATE_array___Array___with}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - /* 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_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 = 297; + 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; + /* ./../lib/standard//collection//array.nit:300 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:300 */ + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Assert %s failed", "'positive'", LOCATE_array, 300); + } + /* ./../lib/standard//collection//array.nit:648 */ + fra.me.REG[1] = NEW_NativeArray(UNTAG_Int(REGB0), sizeof(val_t)); + /* ./../lib/standard//collection//array.nit:301 */ + ATTR_array___Array____items(fra.me.REG[0]) = fra.me.REG[1]; + /* ./../lib/standard//collection//array.nit:302 */ + ATTR_array___Array____capacity(fra.me.REG[0]) = REGB0; + /* ./../lib/standard//collection//array.nit:303 */ + REGB0 = TAG_Int(0); + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos3] = 1; return; } -void array___Array___with_capacity(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, LOCATE_array, 271, LOCATE_array___Array___with_capacity}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - 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___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 = 306; + 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; + /* ./../lib/standard//collection//array.nit:309 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:309 */ + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Assert %s failed", "'positive'", LOCATE_array, 309); + } + /* ./../lib/standard//collection//array.nit:648 */ + fra.me.REG[2] = NEW_NativeArray(UNTAG_Int(REGB0), sizeof(val_t)); + /* ./../lib/standard//collection//array.nit:310 */ + ATTR_array___Array____items(fra.me.REG[0]) = fra.me.REG[2]; + /* ./../lib/standard//collection//array.nit:311 */ + ATTR_array___Array____capacity(fra.me.REG[0]) = REGB0; + /* ./../lib/standard//collection//array.nit:312 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + /* ./../lib/standard//collection//array.nit:313 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:314 */ + while(1) { + /* ./../lib/standard//kernel.nit:212 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB1)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___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 = 320; + 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; + /* ./../lib/standard//collection//array.nit:323 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:323 */ + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Assert %s failed", "'positive'", LOCATE_array, 323); + } + /* ./../lib/standard//collection//array.nit:324 */ + ATTR_array___Array____items(fra.me.REG[0]) = fra.me.REG[1]; + /* ./../lib/standard//collection//array.nit:325 */ + ATTR_array___Array____capacity(fra.me.REG[0]) = REGB0; + /* ./../lib/standard//collection//array.nit:326 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos5] = 1; return; } -void array___Array___with_native(val_t self, val_t param0, val_t param1, int* init_table) { - struct trace_t trace = {NULL, LOCATE_array, 294, LOCATE_array___Array___with_native}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - variable0 = param0; - variable1 = param1; - if (init_table[VAL2OBJ( self)->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; +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 = 332; + 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; + /* ./../lib/standard//collection//array.nit:334 */ + fra.me.REG[0] = ATTR_array___Array____items(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Cast failed", NULL, LOCATE_array, 334); + } + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +void array___Array___sort(val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + fun_t CREG[1]; + val_t tmp; + 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___Array___sort; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.closure_ctx = closctx_param; + fra.me.closure_funs = CREG; + fra.me.REG[0] = p0; + CREG[0] = clos_fun0; + /* ./../lib/standard//collection//array.nit:343 */ + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:343 */ + REGB2 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2)); + CALL_array___Array___sub_sort(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2, (&(fra.me)), ((fun_t)OC_array___Array___sort_1)); + switch ((&(fra.me))->has_broke) { + case 0: break; + case 1: (&(fra.me))->has_broke = 0; goto label3; + } + label3: while(0); + stack_frame_head = fra.me.prev; return; } -val_t array___ArrayIterator___item(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 313, LOCATE_array___ArrayIterator___item}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 315, LOCATE_array___ArrayIterator___item__eq}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - 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 OC_array___Array___sort_1(struct stack_frame_t *closctx, val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + /* ./../lib/standard//collection//array.nit:343 */ + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 343; + fra.me.meth = LOCATE_array___Array___sort; + 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 = ((val_t (*)(struct stack_frame_t *, val_t, val_t))(closctx->closure_funs[0]))(closctx->closure_ctx, fra.me.REG[0], fra.me.REG[1]); + if (closctx->closure_ctx->has_broke) { + closctx->has_broke = 1; + goto label2; + } + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return REGB0; + } +void array___Array___sub_sort(val_t p0, val_t p1, val_t p2, struct stack_frame_t *closctx_param, fun_t clos_fun0){ + 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 REGB5; + val_t REGB6; + fun_t CREG[1]; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 346; + fra.me.meth = LOCATE_array___Array___sub_sort; + 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.closure_ctx = closctx_param; + fra.me.closure_funs = CREG; + fra.me.REG[0] = p0; + REGB0 = p1; + REGB1 = p2; + CREG[0] = clos_fun0; + /* ./../lib/standard//kernel.nit:213 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:350 */ + if (UNTAG_Bool(REGB2)) { + /* ./../lib/standard//collection//array.nit:351 */ + goto label1; + } else { + /* ./../lib/standard//collection//array.nit:352 */ + REGB2 = TAG_Int(7); + /* ./../lib/standard//kernel.nit:215 */ + REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2)); + /* ./../lib/standard//kernel.nit:212 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB2)=UNTAG_Int(REGB3)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB3)) { + REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); + if (UNTAG_Bool(REGB3)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB3 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); + /* ./../lib/standard//kernel.nit:212 */ + REGB3 = TAG_Bool(UNTAG_Int(REGB2)val[UNTAG_Int(REGB2)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label2; + label2: while(0); + /* ./../lib/standard//collection//array.nit:354 */ + REGB2 = REGB0; + /* ./../lib/standard//collection//array.nit:355 */ + REGB3 = REGB1; + /* ./../lib/standard//collection//array.nit:356 */ + while(1) { + /* ./../lib/standard//kernel.nit:214 */ + REGB4 = TAG_Bool(UNTAG_Int(REGB3)>UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:356 */ + if (UNTAG_Bool(REGB4)) { + /* ./../lib/standard//collection//array.nit:357 */ + while(1) { + /* ./../lib/standard//kernel.nit:211 */ + REGB4 = TAG_Bool(UNTAG_Int(REGB2)<=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:357 */ + if (UNTAG_Bool(REGB4)) { + /* ./../lib/standard//collection//array.nit:243 */ + fra.me.REG[2] = fra.me.REG[0]; + REGB4 = REGB2; + /* ./../lib/standard//collection//array.nit:245 */ + REGB5 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB5)) { + REGB5 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB5)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB5 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB4)val[UNTAG_Int(REGB4)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label3; + label3: while(0); + /* ./../lib/standard//collection//array.nit:357 */ + REGB4 = ((val_t (*)(struct stack_frame_t *, val_t, val_t))(CREG[0]))(closctx_param, fra.me.REG[2], fra.me.REG[1]); + if (closctx_param->has_broke) { + goto label1; + } + REGB5 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:211 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB4)<=UNTAG_Int(REGB5)); + } else { + /* ./../lib/standard//collection//array.nit:357 */ + REGB4 = TAG_Bool(false); + REGB5 = REGB4; + } + if (UNTAG_Bool(REGB5)) { + REGB5 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB5 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB5)); + /* ./../lib/standard//collection//array.nit:357 */ + REGB2 = REGB5; + } else { + goto label4; + } + } + label4: while(0); + /* ./../lib/standard//collection//array.nit:358 */ + while(1) { + /* ./../lib/standard//kernel.nit:214 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB3)>UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:358 */ + if (UNTAG_Bool(REGB5)) { + /* ./../lib/standard//collection//array.nit:243 */ + fra.me.REG[2] = fra.me.REG[0]; + REGB5 = REGB3; + /* ./../lib/standard//collection//array.nit:245 */ + REGB4 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB4 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB4)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB4)) { + REGB4 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB4)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB4 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ + REGB4 = TAG_Bool(UNTAG_Int(REGB5)val[UNTAG_Int(REGB5)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label5; + label5: while(0); + /* ./../lib/standard//collection//array.nit:358 */ + REGB5 = ((val_t (*)(struct stack_frame_t *, val_t, val_t))(CREG[0]))(closctx_param, fra.me.REG[2], fra.me.REG[1]); + if (closctx_param->has_broke) { + goto label1; + } + REGB4 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB4 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB4)); + } else { + /* ./../lib/standard//collection//array.nit:358 */ + REGB5 = TAG_Bool(false); + REGB4 = REGB5; + } + if (UNTAG_Bool(REGB4)) { + REGB4 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB4 = TAG_Int(UNTAG_Int(REGB3)-UNTAG_Int(REGB4)); + /* ./../lib/standard//collection//array.nit:358 */ + REGB3 = REGB4; + } else { + goto label6; + } + } + label6: while(0); + /* ./../lib/standard//kernel.nit:214 */ + REGB4 = TAG_Bool(UNTAG_Int(REGB3)>UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:359 */ + if (UNTAG_Bool(REGB4)) { + /* ./../lib/standard//collection//array.nit:243 */ + fra.me.REG[2] = fra.me.REG[0]; + REGB4 = REGB2; + /* ./../lib/standard//collection//array.nit:245 */ + REGB5 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB5)) { + REGB5 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB5)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB5 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB4)val[UNTAG_Int(REGB4)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label7; + label7: while(0); + /* ./../lib/standard//collection//array.nit:243 */ + fra.me.REG[3] = fra.me.REG[0]; + REGB4 = REGB3; + /* ./../lib/standard//collection//array.nit:245 */ + REGB5 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB5)) { + REGB5 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL); + if (UNTAG_Bool(REGB5)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB5 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]); + /* ./../lib/standard//kernel.nit:212 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB4)val[UNTAG_Int(REGB4)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label8; + label8: while(0); + /* ./../lib/standard//collection//array.nit:361 */ + CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB2, fra.me.REG[3]); + /* ./../lib/standard//collection//array.nit:362 */ + CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB3, fra.me.REG[2]); + } + } else { + /* ./../lib/standard//collection//array.nit:356 */ + goto label9; + } + } + label9: while(0); + /* ./../lib/standard//collection//array.nit:365 */ + REGB3 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3)); + /* ./../lib/standard//collection//array.nit:243 */ + fra.me.REG[2] = fra.me.REG[0]; + /* ./../lib/standard//collection//array.nit:245 */ + REGB4 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB4 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB4)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB4)) { + REGB4 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB4)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB4 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ + REGB4 = TAG_Bool(UNTAG_Int(REGB3)val[UNTAG_Int(REGB3)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label10; + label10: while(0); + /* ./../lib/standard//collection//array.nit:365 */ + CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[2]); + /* ./../lib/standard//collection//array.nit:366 */ + REGB3 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3)); + /* ./../lib/standard//collection//array.nit:366 */ + CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB3, fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:367 */ + REGB3 = TAG_Int(2); + /* ./../lib/standard//kernel.nit:217 */ + REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3)); + CALL_array___Array___sub_sort(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB3, (&(fra.me)), ((fun_t)OC_array___Array___sub_sort_11)); + switch ((&(fra.me))->has_broke) { + case 0: break; + case 1: (&(fra.me))->has_broke = 0; goto label1; + } + CALL_array___Array___sub_sort(fra.me.REG[0])(fra.me.REG[0], REGB2, REGB1, (&(fra.me)), ((fun_t)OC_array___Array___sub_sort_13)); + switch ((&(fra.me))->has_broke) { + case 0: break; + case 1: (&(fra.me))->has_broke = 0; goto label1; + } + } else { + /* ./../lib/standard//collection//array.nit:371 */ + while(1) { + /* ./../lib/standard//kernel.nit:212 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB0)=UNTAG_Int(REGB4)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB4)) { + REGB4 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); + if (UNTAG_Bool(REGB4)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB4 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); + /* ./../lib/standard//kernel.nit:212 */ + REGB4 = TAG_Bool(UNTAG_Int(REGB3)val[UNTAG_Int(REGB3)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label15; + label15: while(0); + /* ./../lib/standard//collection//array.nit:374 */ + REGB3 = REGB0; + /* ./../lib/standard//collection//array.nit:375 */ + while(1) { + /* ./../lib/standard//kernel.nit:211 */ + REGB4 = TAG_Bool(UNTAG_Int(REGB3)<=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:375 */ + if (UNTAG_Bool(REGB4)) { + /* ./../lib/standard//collection//array.nit:243 */ + fra.me.REG[2] = fra.me.REG[0]; + REGB4 = REGB3; + /* ./../lib/standard//collection//array.nit:245 */ + REGB5 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB5)) { + REGB5 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB5)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB5 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB4)val[UNTAG_Int(REGB4)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label16; + label16: while(0); + /* ./../lib/standard//collection//array.nit:376 */ + REGB4 = ((val_t (*)(struct stack_frame_t *, val_t, val_t))(CREG[0]))(closctx_param, fra.me.REG[1], fra.me.REG[2]); + if (closctx_param->has_broke) { + goto label1; + } + REGB5 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:214 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB4)>UNTAG_Int(REGB5)); + /* ./../lib/standard//collection//array.nit:376 */ + if (UNTAG_Bool(REGB5)) { + /* ./../lib/standard//collection//array.nit:377 */ + REGB2 = REGB3; + /* ./../lib/standard//collection//array.nit:243 */ + fra.me.REG[2] = fra.me.REG[0]; + REGB5 = REGB3; + /* ./../lib/standard//collection//array.nit:245 */ + REGB4 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB4 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB4)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB4)) { + REGB4 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB4)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB4 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ + REGB4 = TAG_Bool(UNTAG_Int(REGB5)val[UNTAG_Int(REGB5)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label17; + label17: while(0); + /* ./../lib/standard//collection//array.nit:378 */ + fra.me.REG[1] = fra.me.REG[2]; + } + /* ./../lib/standard//collection//array.nit:380 */ + REGB5 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB5)); + /* ./../lib/standard//collection//array.nit:380 */ + REGB3 = REGB5; + } else { + /* ./../lib/standard//collection//array.nit:375 */ + goto label18; + } + } + label18: while(0); + /* ./../lib/standard//collection//array.nit:382 */ + REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB0)); + if (UNTAG_Bool(REGB3)) { + } else { + /* ./../lib/standard//kernel.nit:207 */ + REGB5 = TAG_Bool((REGB2)==(REGB0)); + /* ./../lib/standard//collection//array.nit:382 */ + REGB3 = REGB5; + } + REGB3 = TAG_Bool(!UNTAG_Bool(REGB3)); + if (UNTAG_Bool(REGB3)) { + /* ./../lib/standard//collection//array.nit:243 */ + fra.me.REG[2] = fra.me.REG[0]; + REGB3 = REGB0; + /* ./../lib/standard//collection//array.nit:245 */ + REGB5 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB5)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB5)) { + REGB5 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB5)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB5 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ + REGB5 = TAG_Bool(UNTAG_Int(REGB3)val[UNTAG_Int(REGB3)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label19; + label19: while(0); + /* ./../lib/standard//collection//array.nit:383 */ + CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB2, fra.me.REG[2]); + /* ./../lib/standard//collection//array.nit:384 */ + CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[1]); + } + /* ./../lib/standard//collection//array.nit:386 */ + REGB2 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:386 */ + REGB0 = REGB2; + } else { + /* ./../lib/standard//collection//array.nit:371 */ + goto label20; + } + } + label20: while(0); + } + } + label1: while(0); + stack_frame_head = fra.me.prev; return; } -val_t array___ArrayIterator___is_ok(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 317, LOCATE_array___ArrayIterator___is_ok}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - 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)closure_funs[0]))(closctx->closure_ctx, fra.me.REG[0], fra.me.REG[1]); + if (closctx->closure_ctx->has_broke) { + closctx->has_broke = 1; + goto label12; + } + goto label12; + label12: while(0); + stack_frame_head = fra.me.prev; + return REGB0; + } + val_t OC_array___Array___sub_sort_13(struct stack_frame_t *closctx, val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + /* ./../lib/standard//collection//array.nit:368 */ + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 368; + fra.me.meth = LOCATE_array___Array___sub_sort; + 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 = ((val_t (*)(struct stack_frame_t *, val_t, val_t))(closctx->closure_funs[0]))(closctx->closure_ctx, fra.me.REG[0], fra.me.REG[1]); + if (closctx->closure_ctx->has_broke) { + closctx->has_broke = 1; + goto label14; + } + goto label14; + label14: while(0); + stack_frame_head = fra.me.prev; + return REGB0; + } +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 = 395; + 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; + /* ./../lib/standard//collection//array.nit:395 */ + REGB0 = TAG_Bool(ATTR_array___ArrayIterator____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 395); + } + 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 { + nit_abort("Uninitialized attribute %s", "_index", LOCATE_array, 395); + } + 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]; +} +val_t array___ArrayIterator___is_ok(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 = 399; + fra.me.meth = LOCATE_array___ArrayIterator___is_ok; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./../lib/standard//collection//array.nit:399 */ + REGB0 = TAG_Bool(ATTR_array___ArrayIterator____index(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_index", LOCATE_array, 399); + } + REGB0 = ATTR_array___ArrayIterator____index(fra.me.REG[0]); + REGB1 = TAG_Bool(ATTR_array___ArrayIterator____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 399); + } + fra.me.REG[0] = ATTR_array___ArrayIterator____array(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:212 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)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; +void array___ArrayIterator___init(val_t p0, val_t p1, int* init_table){ + int itpos6 = VAL2OBJ(p0)->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 = 403; + 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:405 */ + ATTR_array___ArrayIterator____array(fra.me.REG[0]) = fra.me.REG[1]; + /* ./../lib/standard//collection//array.nit:406 */ + REGB0 = TAG_Int(0); + ATTR_array___ArrayIterator____index(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos6] = 1; return; } -val_t array___ArrayIterator___index(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 328, LOCATE_array___ArrayIterator___index}; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 340, LOCATE_array___ArraySet___has}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 342, LOCATE_array___ArraySet___add}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - 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; +val_t array___ArrayIterator___index(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 = 409; + fra.me.meth = LOCATE_array___ArrayIterator___index; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./../lib/standard//collection//array.nit:409 */ + REGB0 = TAG_Bool(ATTR_array___ArrayIterator____index(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_index", LOCATE_array, 409); + } + REGB0 = ATTR_array___ArrayIterator____index(fra.me.REG[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 = 421; + 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; + /* ./../lib/standard//collection//array.nit:421 */ + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 421); + } + 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; +} +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 = 423; + 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; + /* ./../lib/standard//collection//array.nit:423 */ + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 423); + } + 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 { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 423); + } + fra.me.REG[0] = ATTR_array___ArraySet____array(fra.me.REG[0]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + } + stack_frame_head = fra.me.prev; return; } -val_t array___ArraySet___is_empty(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 344, LOCATE_array___ArraySet___is_empty}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 346, LOCATE_array___ArraySet___length}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 348, LOCATE_array___ArraySet___first}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 354, LOCATE_array___ArraySet___remove}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - 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; +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 = 425; + 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; + /* ./../lib/standard//collection//array.nit:425 */ + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 425); + } + 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 = 427; + 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; + /* ./../lib/standard//collection//array.nit:427 */ + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 427); + } + fra.me.REG[0] = ATTR_array___ArraySet____array(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:427 */ + 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 = 429; + 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; + /* ./../lib/standard//collection//array.nit:431 */ + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 431); + } + fra.me.REG[1] = ATTR_array___ArraySet____array(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:431 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:214 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:431 */ + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Assert failed", NULL, LOCATE_array, 431); + } + /* ./../lib/standard//collection//array.nit:432 */ + REGB1 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 432); + } + 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___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 = 435; + 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; + /* ./../lib/standard//collection//array.nit:437 */ + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 437); + } + 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]); + /* ./../lib/standard//collection//array.nit:438 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:438 */ + 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; } -void array___ArraySet___remove_all(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 360, LOCATE_array___ArraySet___remove_all}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - variable0 = param0; - ((array___ArraySet___remove_t)CALL( self,COLOR_abstract_collection___RemovableCollection___remove))( self, variable0 /*item*/) /*ArraySet::remove*/; - 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 = 441; + 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:441 */ + 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___clear(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 362, LOCATE_array___ArraySet___clear}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - 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___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 = 443; + 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; + /* ./../lib/standard//collection//array.nit:443 */ + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 443); + } + 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___ArraySet___iterator(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 364, LOCATE_array___ArraySet___iterator}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - 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_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, LOCATE_array, 366, LOCATE_array___ArraySet___enlarge}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - 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; +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 = 445; + 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; + /* ./../lib/standard//collection//array.nit:445 */ + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 445); + } + 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]; +} +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 = 447; + 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; + /* ./../lib/standard//collection//array.nit:448 */ + REGB1 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 448); + } + 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; } -void array___ArraySet___remove_at(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 369, LOCATE_array___ArraySet___remove_at}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - 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___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 = 450; + 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; + /* ./../lib/standard//collection//array.nit:452 */ + REGB1 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 452); + } + 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 { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 452); + } + 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]); + /* ./../lib/standard//collection//array.nit:453 */ + REGB0 = TAG_Bool(ATTR_array___ArraySet____array(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_array", LOCATE_array, 453); + } + 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___init(val_t self, int* init_table) { - struct trace_t trace = {NULL, LOCATE_array, 375, LOCATE_array___ArraySet___init}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySet].i]) return; - variable0 = NEW_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___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 = 456; + 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; + /* ./../lib/standard//collection//array.nit:457 */ + fra.me.REG[1] = NEW_Array_array___Array___init(); + 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___with_capacity(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, LOCATE_array, 378, LOCATE_array___ArraySet___with_capacity}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - variable0 = param0; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArraySet].i]) return; - variable1 = NEW_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; +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 = 459; + 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; + /* ./../lib/standard//collection//array.nit:460 */ + fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB0); + ATTR_array___ArraySet____array(fra.me.REG[0]) = fra.me.REG[1]; + stack_frame_head = fra.me.prev; + init_table[itpos8] = 1; return; } -val_t array___ArraySetIterator___is_ok(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 386, LOCATE_array___ArraySetIterator___is_ok}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 388, LOCATE_array___ArraySetIterator___next}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - 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 = 467; + 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; + /* ./../lib/standard//collection//array.nit:467 */ + REGB0 = TAG_Bool(ATTR_array___ArraySetIterator____iter(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_iter", LOCATE_array, 467); + } + 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___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 = 469; + 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; + /* ./../lib/standard//collection//array.nit:469 */ + REGB0 = TAG_Bool(ATTR_array___ArraySetIterator____iter(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_iter", LOCATE_array, 469); + } + 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___item(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 390, LOCATE_array___ArraySetIterator___item}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 392, LOCATE_array___ArraySetIterator___init}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - 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___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 = 471; + 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; + /* ./../lib/standard//collection//array.nit:471 */ + REGB0 = TAG_Bool(ATTR_array___ArraySetIterator____iter(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_iter", LOCATE_array, 471); + } + 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___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 = 473; + 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:473 */ + 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___ArrayMap_____bra(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 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; - 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(REGB1)); + /* ./../lib/standard//collection//array.nit:487 */ + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//collection//array.nit:488 */ + REGB1 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 488); } - 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, LOCATE_array, 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; - 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(REGB1)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:212 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label1; + label1: while(0); + /* ./../lib/standard//collection//array.nit:488 */ + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_array, 488); + } + 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:490 */ + nit_abort("Aborted", NULL, LOCATE_array, 490); + } + label2: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; } -val_t array___ArrayMap___has_key(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 424, LOCATE_array___ArrayMap___has_key}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 427, LOCATE_array___ArrayMap___has}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - trace.prev = tracehead; tracehead = &trace; - 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; +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 = 494; + 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; + /* ./../lib/standard//collection//array.nit:497 */ + REGB0 = CALL_array___ArrayMap___index(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:498 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:498 */ + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//collection//array.nit:499 */ + REGB1 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 499); } - 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, LOCATE_array, 434, LOCATE_array___ArrayMap___has_only}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - trace.prev = tracehead; tracehead = &trace; - 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[3] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:245 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]); + /* ./../lib/standard//kernel.nit:212 */ + 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:246 */ + goto label1; + label1: while(0); + /* ./../lib/standard//collection//array.nit:499 */ + REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_array, 499); } - variable1 = TAG_Int(UNTAG_Int(variable1)-UNTAG_Int( TAG_Int(1))) /*i*/; - continue_85: while(0); + CALL_abstract_collection___Couple___second__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]); + } else { + /* ./../lib/standard//collection//array.nit:501 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 501); + } + 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_85: while(0); - return_label84: while(false); - tracehead = trace.prev; + stack_frame_head = fra.me.prev; return; } -void array___ArrayMap___remove_all(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 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; - 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:506 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB1; +} +val_t array___ArrayMap___has(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 tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 508; + fra.me.meth = LOCATE_array___ArrayMap___has; + 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; + /* ./../lib/standard//collection//array.nit:511 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 511); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:234 */ + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:235 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:236 */ + fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:237 */ + while(1) { + /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:212 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:511 */ + fra.me.REG[3] = CALL_abstract_collection___Couple___second(fra.me.REG[3])(fra.me.REG[3]); + REGB1 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[3],fra.me.REG[1])); + if (UNTAG_Bool(REGB1)) { + } else { + REGB2 = TAG_Bool(fra.me.REG[3]==NIT_NULL); + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(false); + REGB1 = REGB2; + } else { + REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]); + REGB1 = REGB2; + } + } + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(true); + goto label1; + } + /* ./../lib/standard//collection//array.nit:239 */ + REGB2 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:239 */ + REGB0 = REGB2; + } else { + /* ./../lib/standard//collection//array.nit:237 */ + goto label2; + } + } + label2: while(0); + /* ./../lib/standard//collection//array.nit:512 */ + REGB0 = TAG_Bool(false); + REGB1 = REGB0; + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB1; +} +val_t array___ArrayMap___has_only(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 tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 515; + fra.me.meth = LOCATE_array___ArrayMap___has_only; + 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; + /* ./../lib/standard//collection//array.nit:518 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 518); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:234 */ + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:235 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:236 */ + fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:237 */ + while(1) { + /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); } - 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_label89; - return_label89: while(false); - variable2 = variable4; - variable2 = ((abstract_collection___Couple___second_t)CALL(variable2,COLOR_abstract_collection___Couple___second))(variable2) /*Couple::second*/; - variable2 = TAG_Bool((variable2 == variable0 /*item*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, variable0 /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, variable0 /*item*/) /*Object::==*/))))); - 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*/; + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:212 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:518 */ + fra.me.REG[3] = CALL_abstract_collection___Couple___second(fra.me.REG[3])(fra.me.REG[3]); + REGB1 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[3],fra.me.REG[1])); + if (UNTAG_Bool(REGB1)) { + } else { + REGB2 = TAG_Bool(fra.me.REG[3]==NIT_NULL); + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(false); + REGB1 = REGB2; + } else { + REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]); + REGB1 = REGB2; + } + } + REGB1 = TAG_Bool(!UNTAG_Bool(REGB1)); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + goto label1; + } + /* ./../lib/standard//collection//array.nit:239 */ + REGB2 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:239 */ + REGB0 = REGB2; + } else { + /* ./../lib/standard//collection//array.nit:237 */ + goto label2; } - variable1 = TAG_Int(UNTAG_Int(variable1)-UNTAG_Int( TAG_Int(1))) /*i*/; - continue_88: while(0); } - break_88: while(0); - tracehead = trace.prev; + label2: while(0); + /* ./../lib/standard//collection//array.nit:519 */ + REGB0 = TAG_Bool(true); + REGB1 = REGB0; + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB1; +} +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 = 522; + 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; + /* ./../lib/standard//collection//array.nit:523 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 523); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:523 */ + goto label1; + label1: 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 = 525; + 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; + /* ./../lib/standard//collection//array.nit:525 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 525); + } + 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)) { + nit_abort("Reciever is null", NULL, LOCATE_array, 525); + } + fra.me.REG[0] = CALL_abstract_collection___Couple___second(fra.me.REG[0])(fra.me.REG[0]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t array___ArrayMap___count(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 tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 527; + fra.me.meth = LOCATE_array___ArrayMap___count; + 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; + /* ./../lib/standard//collection//array.nit:530 */ + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:531 */ + REGB1 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 531); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:234 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:235 */ + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:236 */ + fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:237 */ + while(1) { + /* ./../lib/standard//collection//array.nit:23 */ + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:212 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB1)val[UNTAG_Int(REGB1)]; + /* ./../lib/standard//collection//array.nit:531 */ + fra.me.REG[3] = CALL_abstract_collection___Couple___second(fra.me.REG[3])(fra.me.REG[3]); + REGB2 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[3],fra.me.REG[1])); + if (UNTAG_Bool(REGB2)) { + } else { + REGB3 = TAG_Bool(fra.me.REG[3]==NIT_NULL); + if (UNTAG_Bool(REGB3)) { + REGB3 = TAG_Bool(false); + REGB2 = REGB3; + } else { + REGB3 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]); + REGB2 = REGB3; + } + } + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:531 */ + REGB0 = REGB2; + } + /* ./../lib/standard//collection//array.nit:239 */ + REGB2 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:239 */ + REGB1 = REGB2; + } else { + /* ./../lib/standard//collection//array.nit:237 */ + goto label1; + } + } + label1: while(0); + /* ./../lib/standard//collection//array.nit:532 */ + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +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 = 535; + 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; + /* ./../lib/standard//collection//array.nit:535 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 535); + } + 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 = 537; + 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; + /* ./../lib/standard//collection//array.nit:537 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 537); + } + 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; +} +void array___ArrayMap___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 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 = 539; + fra.me.meth = LOCATE_array___ArrayMap___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; + /* ./../lib/standard//collection//array.nit:541 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 541); + } + fra.me.REG[2] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//collection//array.nit:541 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:542 */ + while(1) { + REGB0 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB0 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:542 */ + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//array.nit:543 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 543); + } + fra.me.REG[2] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:243 */ + REGB0 = REGB1; + /* ./../lib/standard//collection//array.nit:245 */ + REGB2 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label1; + label1: while(0); + /* ./../lib/standard//collection//array.nit:543 */ + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_array, 543); + } + 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:544 */ + CALL_array___ArrayMap___remove_at_index(fra.me.REG[0])(fra.me.REG[0], REGB1); + /* ./../lib/standard//collection//array.nit:545 */ + goto label2; + } + /* ./../lib/standard//collection//array.nit:547 */ + REGB0 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB0 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:547 */ + REGB1 = REGB0; + } else { + /* ./../lib/standard//collection//array.nit:542 */ + goto label3; + } + } + label3: while(0); + label2: while(0); + stack_frame_head = fra.me.prev; return; } -void array___ArrayMap___remove_at(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 481, LOCATE_array___ArrayMap___remove_at}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - 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_all(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 = 551; + fra.me.meth = LOCATE_array___ArrayMap___remove_all; + 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; + /* ./../lib/standard//collection//array.nit:553 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 553); + } + fra.me.REG[2] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//collection//array.nit:553 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:554 */ + while(1) { + REGB0 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB0 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:554 */ + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//array.nit:555 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 555); + } + fra.me.REG[2] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:243 */ + REGB0 = REGB1; + /* ./../lib/standard//collection//array.nit:245 */ + REGB2 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label1; + label1: while(0); + /* ./../lib/standard//collection//array.nit:555 */ + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_array, 555); + } + 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:556 */ + CALL_array___ArrayMap___remove_at_index(fra.me.REG[0])(fra.me.REG[0], REGB1); + } + /* ./../lib/standard//collection//array.nit:558 */ + REGB0 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB0 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0)); + /* ./../lib/standard//collection//array.nit:558 */ + REGB1 = REGB0; + } else { + /* ./../lib/standard//collection//array.nit:554 */ + goto label2; + } + } + label2: while(0); + stack_frame_head = fra.me.prev; return; } -void array___ArrayMap___clear(val_t self) { - struct trace_t trace = {NULL, LOCATE_array, 487, LOCATE_array___ArrayMap___clear}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - 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; +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 = 562; + 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; + /* ./../lib/standard//collection//array.nit:564 */ + REGB0 = CALL_array___ArrayMap___index(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:565 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:565 */ + 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___enlarge(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 489, LOCATE_array___ArrayMap___enlarge}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - 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___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 = 568; + 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; + /* ./../lib/standard//collection//array.nit:568 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 568); + } + 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___couple_at(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 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; - 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(REGB1)); + /* ./../lib/standard//collection//array.nit:576 */ + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//collection//array.nit:577 */ + REGB1 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 577); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:245 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:212 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label1; + label1: while(0); + /* ./../lib/standard//collection//array.nit:577 */ + goto label2; + } else { + /* ./../lib/standard//collection//array.nit:579 */ + fra.me.REG[0] = NIT_NULL; + goto label2; + } + label2: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +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 = 586; + 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; + /* ./../lib/standard//collection//array.nit:589 */ + REGB1 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 589); + } + 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 { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 589); + } + 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]); + /* ./../lib/standard//collection//array.nit:590 */ + REGB0 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 590); + } + 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___index(val_t self, val_t param0) { - struct trace_t trace = {NULL, LOCATE_array, 515, LOCATE_array___ArrayMap___index}; - 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; - variable0 = param0; - variable2 = ATTR_array___ArrayMap____last_index( self) /*ArrayMap::_last_index*/; - variable1 = variable2; - 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_Bool(UNTAG_Int( variable1 /*l*/)=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:245 */ + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ + 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*/)val[UNTAG_Int(REGB1)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label1; + label1: while(0); + /* ./../lib/standard//collection//array.nit:601 */ + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + nit_abort("Reciever is null", NULL, LOCATE_array, 601); } - variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))) /*i*/; - continue_98: while(0); - } - break_98: while(0); - variable3 = TAG_Int(-UNTAG_Int( TAG_Int(1))); - variable1 = variable3; - goto return_label96; - return_label96: while(false); - tracehead = trace.prev; - return variable1; -} -void array___ArrayMap___init(val_t self, int* init_table) { - struct trace_t trace = {NULL, LOCATE_array, 533, LOCATE_array___ArrayMap___init}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_ArrayMap].i]) return; - variable0 = NEW_array___Array___init(); /*new Array[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] = CALL_abstract_collection___Couple___first(fra.me.REG[2])(fra.me.REG[2]); + REGB1 = TAG_Bool(IS_EQUAL_ON(fra.me.REG[1],fra.me.REG[2])); + 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; + } + /* ./../lib/standard//collection//array.nit:603 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//collection//array.nit:604 */ + while(1) { + REGB2 = TAG_Bool(ATTR_array___ArrayMap____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_array, 604); + } + fra.me.REG[2] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + /* ./../lib/standard//collection//array.nit:23 */ + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB1)=UNTAG_Int(REGB3)); + /* ./../lib/standard//collection//array.nit:245 */ + if (UNTAG_Bool(REGB3)) { + REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB3)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); + } + REGB3 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ + REGB3 = TAG_Bool(UNTAG_Int(REGB2)val[UNTAG_Int(REGB2)]; + /* ./../lib/standard//collection//array.nit:246 */ + goto label3; + label3: while(0); + /* ./../lib/standard//collection//array.nit:605 */ + REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB2)) { + nit_abort("Reciever is null", NULL, LOCATE_array, 605); + } + fra.me.REG[2] = CALL_abstract_collection___Couple___first(fra.me.REG[2])(fra.me.REG[2]); + REGB2 = TAG_Bool(IS_EQUAL_ON(fra.me.REG[1],fra.me.REG[2])); + 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:606 */ + ATTR_array___ArrayMap____last_index(fra.me.REG[0]) = REGB1; + /* ./../lib/standard//collection//array.nit:607 */ + REGB0 = REGB1; + goto label2; + } + /* ./../lib/standard//collection//array.nit:609 */ + REGB2 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2)); + /* ./../lib/standard//collection//array.nit:609 */ + REGB1 = REGB2; + } else { + /* ./../lib/standard//collection//array.nit:604 */ + goto label4; + } + } + label4: while(0); + /* ./../lib/standard//collection//array.nit:611 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:216 */ + REGB1 = TAG_Int(-UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:611 */ + REGB0 = REGB1; + 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 = 614; + 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; + /* ./../lib/standard//collection//array.nit:617 */ + fra.me.REG[1] = NEW_Array_array___Array___init(); + 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, LOCATE_array, 543, LOCATE_array___Iterator___to_a}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - variable1 = NEW_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, LOCATE_array, 556, LOCATE_array___Collection___to_a}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 567, LOCATE_array___ArrayCapable___calloc_array}; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 573, LOCATE_array___NativeArray_____bra}; - trace.prev = tracehead; tracehead = &trace; - 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, LOCATE_array, 574, LOCATE_array___NativeArray_____braeq}; - trace.prev = tracehead; tracehead = &trace; - 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 = 624; + 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; + /* ./../lib/standard//collection//array.nit:627 */ + fra.me.REG[1] = NEW_Array_array___Array___init(); + /* ./../lib/standard//collection//array.nit:628 */ + while(1) { + REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]); + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//array.nit:629 */ + fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); + /* ./../lib/standard//collection//array.nit:630 */ + CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]); + } else { + /* ./../lib/standard//collection//array.nit:628 */ + goto label1; + } + } + label1: while(0); + /* ./../lib/standard//collection//array.nit:632 */ + 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 = 637; + 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; + /* ./../lib/standard//collection//array.nit:640 */ + 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]); + 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 = 648; + fra.me.meth = LOCATE_array___ArrayCapable___calloc_array; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + /* ./../lib/standard//collection//array.nit:648 */ + fra.me.REG[0] = NEW_NativeArray(UNTAG_Int(REGB0), sizeof(val_t)); + 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 = 654; + 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; + /* ./../lib/standard//collection//array.nit:654 */ + fra.me.REG[0] = ((Nit_NativeArray)fra.me.REG[0])->val[UNTAG_Int(REGB0)]; + 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 = 655; + 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:655 */ + ((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, LOCATE_array, 575, LOCATE_array___NativeArray___copy_to}; - trace.prev = tracehead; tracehead = &trace; - (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 = 656; + 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:656 */ + (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; }