X-Git-Url: http://nitlanguage.org diff --git a/c_src/array._sep.c b/c_src/array._sep.c index 086d6a2..e593de6 100644 --- a/c_src/array._sep.c +++ b/c_src/array._sep.c @@ -1,1951 +1,4603 @@ /* This C file is generated by NIT to compile module array. */ #include "array._sep.h" -val_t array___AbstractArray_____eqeq(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 199, LOCATE_array___AbstractArray_____eqeq}; - val_t variable[7]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = TAG_Bool(( variable[1] /*o*/==NIT_NULL) || VAL_ISA( variable[1] /*o*/, COLOR_AbstractArray, ID_AbstractArray)) /*cast AbstractArray[E]*/; - variable[3] = TAG_Bool(!UNTAG_Bool(variable[3])); - if (!UNTAG_Bool(variable[3])) { /* or */ - variable[3] = TAG_Bool(IS_EQUAL_NN( variable[1] /*o*/, NIT_NULL /*null*/)); - } - if (UNTAG_Bool(variable[3])) { /*if*/ - variable[2] = TAG_Bool(false); - goto return_label0; - } - variable[3] = TAG_Bool(( variable[1] /*o*/==NIT_NULL) || VAL_ISA( variable[1] /*o*/, COLOR_AbstractArray, ID_AbstractArray)) /*cast AbstractArray[E]*/; - if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___AbstractArray_____eqeq, LOCATE_array, 203); nit_exit(1);} - variable[4] = variable[0]; - variable[4] = ((array___AbstractArray___length_t)CALL(variable[4],COLOR_abstract_collection___Collection___length))(variable[4]) /*AbstractArray::length*/; - variable[3] = variable[4]; - variable[4] = ((array___AbstractArray___length_t)CALL( variable[1] /*o*/,COLOR_abstract_collection___Collection___length))( variable[1] /*o*/) /*AbstractArray::length*/; - variable[4] = TAG_Bool((variable[4])!=( variable[3] /*l*/)); - if (UNTAG_Bool(variable[4])) { /*if*/ - variable[2] = TAG_Bool(false); - goto return_label0; - } - variable[4] = TAG_Int(0); - while (true) { /*while*/ - variable[5] = TAG_Bool(UNTAG_Int( variable[4] /*i*/)=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); } - variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/; - continue_7: while(0); - } - break_7: while(0); - variable[2] = TAG_Bool(false); - goto return_label6; - return_label6: while(false); - tracehead = trace.prev; - return variable[2]; -} -val_t array___AbstractArray___has_only(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 86, LOCATE_array___AbstractArray___has_only}; - val_t variable[6]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = TAG_Int(0); - variable[5] = variable[0]; - variable[5] = ((array___AbstractArray___length_t)CALL(variable[5],COLOR_abstract_collection___Collection___length))(variable[5]) /*AbstractArray::length*/; - variable[4] = variable[5]; - while (true) { /*while*/ - variable[5] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)=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]; +} +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; } - variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/; - continue_11: while(0); - } - break_11: while(0); - variable[2] = variable[3] /*res*/; - goto return_label10; - return_label10: while(false); - tracehead = trace.prev; - return variable[2]; -} -void array___AbstractArray___clear(val_t self) { - struct trace_t trace = {NULL, NULL, 73, LOCATE_array___AbstractArray___clear}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - ATTR_array___AbstractArray____length(variable[2]) /*AbstractArray::_length*/ = TAG_Int(0); - return_label12: while(false); - tracehead = trace.prev; + } + label1: while(0); + stack_frame_head = fra.me.prev; + return; +} +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___remove(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 152, LOCATE_array___AbstractArray___remove}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[4] = variable[0]; - variable[4] = ((array___AbstractArray___index_of_t)CALL(variable[4],COLOR_abstract_collection___IndexedCollection___index_of))(variable[4], variable[1] /*item*/) /*AbstractArray::index_of*/; - ((array___AbstractArray___remove_at_t)CALL(variable[3],COLOR_abstract_collection___Map___remove_at))(variable[3], variable[4]) /*AbstractArray::remove_at*/; - return_label13: while(false); - 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___remove_all(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 154, LOCATE_array___AbstractArray___remove_all}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ((array___AbstractArray___index_of_t)CALL(variable[4],COLOR_abstract_collection___IndexedCollection___index_of))(variable[4], variable[1] /*item*/) /*AbstractArray::index_of*/; - variable[3] = variable[4]; - while (true) { /*while*/ - variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable[4])) break; /* while*/ - variable[4] = variable[0]; - ((array___AbstractArray___remove_at_t)CALL(variable[4],COLOR_abstract_collection___Map___remove_at))(variable[4], variable[3] /*i*/) /*AbstractArray::remove_at*/; - variable[4] = variable[0]; - variable[4] = ((array___AbstractArray___index_of_from_t)CALL(variable[4],COLOR_array___AbstractArray___index_of_from))(variable[4], variable[1] /*item*/, variable[3] /*i*/) /*AbstractArray::index_of_from*/; - variable[3] = variable[4] /*i=*/; - continue_15: while(0); - } - break_15: while(0); - return_label14: while(false); - 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_key(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 97, LOCATE_array___AbstractArray___has_key}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable[4] = variable[3]; - if (UNTAG_Bool(variable[4])) { /* and */ - variable[4] = variable[0]; - variable[4] = ((array___AbstractArray___length_t)CALL(variable[4],COLOR_abstract_collection___Collection___length))(variable[4]) /*AbstractArray::length*/; - variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*index*/)=UNTAG_Int( TAG_Int(0))); - variable[5] = variable[4]; - if (UNTAG_Bool(variable[5])) { /* and */ - variable[5] = TAG_Bool(UNTAG_Int( variable[1] /*i*/)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; + } + } + 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___add(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 71, LOCATE_array___AbstractArray___add}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[4] = variable[0]; - variable[4] = ((array___AbstractArray___length_t)CALL(variable[4],COLOR_abstract_collection___Collection___length))(variable[4]) /*AbstractArray::length*/; - ((abstract_collection___Map_____braeq_t)CALL(variable[3],COLOR_abstract_collection___Map_____braeq))(variable[3], variable[4], variable[1] /*item*/) /*Map::[]=*/; - return_label19: while(false); - tracehead = trace.prev; +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___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___push(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 30, LOCATE_array___AbstractArray___push}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - ((array___AbstractArray___add_t)CALL(variable[3],COLOR_abstract_collection___SimpleCollection___add))(variable[3], variable[1] /*item*/) /*AbstractArray::add*/; - return_label20: while(false); - tracehead = trace.prev; +void array___AbstractArray___clear(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 192; + fra.me.meth = LOCATE_array___AbstractArray___clear; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./../lib/standard//collection//array.nit:192 */ + REGB0 = TAG_Int(0); + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; return; } -val_t array___AbstractArray___pop(val_t self) { - struct trace_t trace = {NULL, NULL, 32, LOCATE_array___AbstractArray___pop}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ((array___AbstractArray___is_empty_t)CALL(variable[2],COLOR_abstract_collection___Collection___is_empty))(variable[2]) /*AbstractArray::is_empty*/; - if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[2])))) { fprintf(stderr, "Assert%s failed", " 'not_empty' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___AbstractArray___pop, LOCATE_array, 34); nit_exit(1);} - variable[3] = variable[0]; - variable[3] = ((abstract_collection___IndexedCollection___last_t)CALL(variable[3],COLOR_abstract_collection___IndexedCollection___last))(variable[3]) /*IndexedCollection::last*/; - variable[2] = variable[3]; - variable[3] = variable[0]; - ATTR_array___AbstractArray____length(variable[3]) /*AbstractArray::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArray____length(variable[3]) /*AbstractArray::_length*/)-UNTAG_Int( TAG_Int(1))); - variable[1] = variable[2] /*r*/; - goto return_label21; - return_label21: while(false); - tracehead = trace.prev; - return variable[1]; -} -void array___AbstractArray___unshift(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 54, LOCATE_array___AbstractArray___unshift}; - val_t variable[7]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ((array___AbstractArray___length_t)CALL(variable[4],COLOR_abstract_collection___Collection___length))(variable[4]) /*AbstractArray::length*/; - variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int( TAG_Int(1))); - variable[3] = variable[4]; - while (true) { /*while*/ - variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)>UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable[4])) break; /* while*/ - variable[4] = variable[0]; - variable[5] = TAG_Int(UNTAG_Int( variable[3] /*i*/)+UNTAG_Int( TAG_Int(1))); - variable[6] = variable[0]; - variable[6] = ((abstract_collection___Map_____bra_t)CALL(variable[6],COLOR_abstract_collection___Map_____bra))(variable[6], variable[3] /*i*/) /*Map::[]*/; - ((abstract_collection___Map_____braeq_t)CALL(variable[4],COLOR_abstract_collection___Map_____braeq))(variable[4], variable[5], variable[6]) /*Map::[]=*/; - variable[3] = TAG_Int(UNTAG_Int(variable[3])-UNTAG_Int( TAG_Int(1))) /*i*/; - continue_23: while(0); - } - break_23: while(0); - variable[4] = variable[0]; - ((abstract_collection___Map_____braeq_t)CALL(variable[4],COLOR_abstract_collection___Map_____braeq))(variable[4], TAG_Int(0), variable[1] /*item*/) /*Map::[]=*/; - return_label22: while(false); - tracehead = trace.prev; +void array___AbstractArray___remove(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 194; + fra.me.meth = LOCATE_array___AbstractArray___remove; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//collection//array.nit:194 */ + REGB0 = CALL_abstract_collection___SequenceRead___index_of(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + CALL_abstract_collection___Map___remove_at(fra.me.REG[0])(fra.me.REG[0], REGB0); + stack_frame_head = fra.me.prev; + return; +} +void array___AbstractArray___remove_all(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 196; + fra.me.meth = LOCATE_array___AbstractArray___remove_all; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//collection//array.nit:198 */ + REGB0 = CALL_abstract_collection___SequenceRead___index_of(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:199 */ + while(1) { + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//array.nit:199 */ + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//collection//array.nit:200 */ + CALL_abstract_collection___Map___remove_at(fra.me.REG[0])(fra.me.REG[0], REGB0); + /* ./../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; + } + } + label1: while(0); + stack_frame_head = fra.me.prev; return; } -val_t array___AbstractArray___shift(val_t self) { - struct trace_t trace = {NULL, NULL, 40, LOCATE_array___AbstractArray___shift}; - val_t variable[8]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ((array___AbstractArray___is_empty_t)CALL(variable[2],COLOR_abstract_collection___Collection___is_empty))(variable[2]) /*AbstractArray::is_empty*/; - if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[2])))) { fprintf(stderr, "Assert%s failed", " 'not_empty' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___AbstractArray___shift, LOCATE_array, 42); nit_exit(1);} - variable[3] = variable[0]; - variable[3] = ((abstract_collection___IndexedCollection___first_t)CALL(variable[3],COLOR_abstract_collection___Collection___first))(variable[3]) /*IndexedCollection::first*/; - variable[2] = variable[3]; - variable[3] = TAG_Int(1); - variable[5] = variable[0]; - variable[5] = ((array___AbstractArray___length_t)CALL(variable[5],COLOR_abstract_collection___Collection___length))(variable[5]) /*AbstractArray::length*/; - variable[4] = variable[5]; - while (true) { /*while*/ - variable[5] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)=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; + } + } + label2: while(0); + label1: while(0); + stack_frame_head = fra.me.prev; return; } -val_t array___AbstractArray___last_index_of(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 113, LOCATE_array___AbstractArray___last_index_of}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[4] = variable[0]; - variable[4] = ((array___AbstractArray___length_t)CALL(variable[4],COLOR_abstract_collection___Collection___length))(variable[4]) /*AbstractArray::length*/; - variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int( TAG_Int(1))); - variable[3] = ((array___AbstractArray___last_index_of_from_t)CALL(variable[3],COLOR_array___AbstractArray___last_index_of_from))(variable[3], variable[1] /*item*/, variable[4]) /*AbstractArray::last_index_of_from*/; - variable[2] = variable[3]; - goto return_label28; - return_label28: while(false); - tracehead = trace.prev; - return variable[2]; -} -val_t array___AbstractArray___index_of_from(val_t self, val_t param0, val_t param1) { - struct trace_t trace = {NULL, NULL, 115, LOCATE_array___AbstractArray___index_of_from}; - val_t variable[7]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[2] = param1; - variable[4] = variable[2] /*pos*/; - variable[6] = variable[0]; - variable[6] = ((array___AbstractArray___length_t)CALL(variable[6],COLOR_abstract_collection___Collection___length))(variable[6]) /*AbstractArray::length*/; - variable[5] = variable[6]; - while (true) { /*while*/ - variable[6] = TAG_Bool(UNTAG_Int( variable[4] /*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); } - variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/; - continue_30: while(0); - } - break_30: while(0); - variable[6] = TAG_Int(-UNTAG_Int( TAG_Int(1))); - variable[3] = variable[6]; - goto return_label29; - return_label29: while(false); - tracehead = trace.prev; - return variable[3]; -} -val_t array___AbstractArray___last_index_of_from(val_t self, val_t param0, val_t param1) { - struct trace_t trace = {NULL, NULL, 128, LOCATE_array___AbstractArray___last_index_of_from}; - val_t variable[6]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[2] = param1; - variable[4] = variable[2] /*pos*/; - while (true) { /*while*/ - variable[5] = TAG_Bool(UNTAG_Int( variable[4] /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable[5])) break; /* while*/ - variable[5] = variable[0]; - variable[5] = ((abstract_collection___Map_____bra_t)CALL(variable[5],COLOR_abstract_collection___Map_____bra))(variable[5], variable[4] /*i*/) /*Map::[]*/; - variable[5] = TAG_Bool((variable[5] == variable[1] /*item*/) || ((variable[5] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[5],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[5], variable[1] /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[5],COLOR_kernel___Object_____eqeq))(variable[5], variable[1] /*item*/) /*Object::==*/))))); - if (UNTAG_Bool(variable[5])) { /*if*/ - variable[3] = variable[4] /*i*/; - goto return_label31; - } else { /*if*/ - variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int( TAG_Int(1))) /*i*/; + 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); } - continue_32: while(0); - } - break_32: while(0); - variable[5] = TAG_Int(-UNTAG_Int( TAG_Int(1))); - variable[3] = variable[5]; - goto return_label31; - return_label31: while(false); - tracehead = trace.prev; - return variable[3]; -} -val_t array___AbstractArray___reversed(val_t self) { - struct trace_t trace = {NULL, NULL, 141, LOCATE_array___AbstractArray___reversed}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[3] = variable[0]; - variable[3] = ATTR_array___AbstractArray____length(variable[3]) /*AbstractArray::_length*/; - variable[2] = variable[3]; - variable[4] = NEW_Array_array___Array___with_capacity( variable[2] /*cmp*/); /*new Array[E]*/ - variable[3] = variable[4]; - while (true) { /*while*/ - variable[4] = TAG_Bool(UNTAG_Int( variable[2] /*cmp*/)>UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable[4])) break; /* while*/ - variable[2] = TAG_Int(UNTAG_Int(variable[2])-UNTAG_Int( TAG_Int(1))) /*cmp*/; - variable[4] = variable[0]; - variable[4] = ((abstract_collection___Map_____bra_t)CALL(variable[4],COLOR_abstract_collection___Map_____bra))(variable[4], variable[2] /*cmp*/) /*Map::[]*/; - ((array___AbstractArray___add_t)CALL( variable[3] /*result*/,COLOR_abstract_collection___SimpleCollection___add))( variable[3] /*result*/, variable[4]) /*AbstractArray::add*/; - continue_34: while(0); - } - break_34: while(0); - variable[1] = variable[3] /*result*/; - goto return_label33; - return_label33: while(false); - tracehead = trace.prev; - return variable[1]; -} -void array___AbstractArray___copy_to(val_t self, val_t param0, val_t param1, val_t param2, val_t param3) { - struct trace_t trace = {NULL, NULL, 176, LOCATE_array___AbstractArray___copy_to}; - val_t variable[10]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[2] = param1; - variable[3] = param2; - variable[4] = param3; - variable[6] = variable[2] /*len*/; - while (true) { /*while*/ - variable[7] = TAG_Bool(UNTAG_Int( variable[6] /*i*/)>UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable[7])) break; /* while*/ - variable[6] = TAG_Int(UNTAG_Int(variable[6])-UNTAG_Int( TAG_Int(1))) /*i*/; - variable[7] = TAG_Int(UNTAG_Int( variable[4] /*new_start*/)+UNTAG_Int( variable[6] /*i*/)); - variable[8] = variable[0]; - variable[9] = TAG_Int(UNTAG_Int( variable[1] /*start*/)+UNTAG_Int( variable[6] /*i*/)); - variable[8] = ((abstract_collection___Map_____bra_t)CALL(variable[8],COLOR_abstract_collection___Map_____bra))(variable[8], variable[9]) /*Map::[]*/; - ((abstract_collection___Map_____braeq_t)CALL( variable[3] /*dest*/,COLOR_abstract_collection___Map_____braeq))( variable[3] /*dest*/, variable[7], variable[8]) /*Map::[]=*/; - continue_36: while(0); - } - break_36: while(0); - return_label35: while(false); - tracehead = trace.prev; + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + REGB2 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2)); + /* ./../lib/standard//kernel.nit:212 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]=fra.me.REG[1]; + stack_frame_head = fra.me.prev; return; } -void array___AbstractArray___init(val_t self, int* init_table) { - struct trace_t trace = {NULL, NULL, 0, LOCATE_array___AbstractArray___init}; - val_t *variable = NULL; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - tracehead = trace.prev; +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; } -val_t array___Array_____bra(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 227, LOCATE_array___Array_____bra}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable[4] = variable[3]; - if (UNTAG_Bool(variable[4])) { /* and */ - variable[4] = variable[0]; - variable[4] = ATTR_array___AbstractArray____length(variable[4]) /*AbstractArray::_length*/; - variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*index*/)=UNTAG_Int( TAG_Int(0))); - variable[5] = variable[4]; - if (UNTAG_Bool(variable[5])) { /* and */ - variable[5] = variable[0]; - variable[5] = ATTR_array___AbstractArray____length(variable[5]) /*AbstractArray::_length*/; - variable[5] = TAG_Int(UNTAG_Int(variable[5])+UNTAG_Int( TAG_Int(1))); - variable[5] = TAG_Bool(UNTAG_Int( variable[1] /*index*/)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, NULL, 245, LOCATE_array___Array___enlarge}; - val_t variable[7]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ATTR_array___Array____capacity(variable[4]) /*Array::_capacity*/; - variable[3] = variable[4]; - variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*cap*/)<=UNTAG_Int( variable[3] /*c*/)); - if (UNTAG_Bool(variable[4])) { /*if*/ - goto return_label39; - } - while (true) { /*while*/ - variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*c*/)<=UNTAG_Int( variable[1] /*cap*/)); - if (!UNTAG_Bool(variable[4])) break; /* while*/ - variable[4] = TAG_Int(UNTAG_Int( variable[3] /*c*/)*UNTAG_Int( TAG_Int(2))); - variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(2))); - variable[3] = variable[4] /*c=*/; - continue_40: while(0); - } - break_40: while(0); - variable[5] = variable[0]; - variable[5] = BOX_NativeArray((val_t*)malloc((UNTAG_Int( variable[3] /*c*/) * sizeof(val_t)))); - variable[4] = variable[5]; - variable[5] = variable[0]; - variable[5] = ATTR_array___Array____capacity(variable[5]) /*Array::_capacity*/; - variable[5] = TAG_Bool(UNTAG_Int(variable[5])>UNTAG_Int( TAG_Int(0))); - if (UNTAG_Bool(variable[5])) { /*if*/ - variable[5] = variable[0]; - variable[5] = ATTR_array___Array____items(variable[5]) /*Array::_items*/; - variable[6] = variable[0]; - variable[6] = ATTR_array___AbstractArray____length(variable[6]) /*AbstractArray::_length*/; - (void)memcpy(UNBOX_NativeArray( variable[4] /*a*/), UNBOX_NativeArray(variable[5]), UNTAG_Int(variable[6])*sizeof(val_t)); - } - variable[5] = variable[0]; - ATTR_array___Array____items(variable[5]) /*Array::_items*/ = variable[4] /*a*/; - variable[5] = variable[0]; - ATTR_array___Array____capacity(variable[5]) /*Array::_capacity*/ = variable[3] /*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, NULL, 256, LOCATE_array___Array___init}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Array].i]) return; - variable[2] = variable[0]; - ATTR_array___Array____capacity(variable[2]) /*Array::_capacity*/ = TAG_Int(0); - variable[2] = variable[0]; - ATTR_array___AbstractArray____length(variable[2]) /*AbstractArray::_length*/ = TAG_Int(0); - return_label41: while(false); - init_table[VAL2OBJ(variable[0])->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_items(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, NULL, 263, LOCATE_array___Array___with_items}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - /* check if pvft[INIT_TABLE_POS_Array].i]) return; - variable[3] = variable[0]; - variable[4] = ATTR_array___Array____items( variable[1] /*objects*/) /*Array::_items*/; - ATTR_array___Array____items(variable[3]) /*Array::_items*/ = variable[4]; - variable[3] = variable[0]; - variable[4] = ATTR_array___Array____capacity( variable[1] /*objects*/) /*Array::_capacity*/; - ATTR_array___Array____capacity(variable[3]) /*Array::_capacity*/ = variable[4]; - variable[3] = variable[0]; - variable[4] = ((array___AbstractArray___length_t)CALL( variable[1] /*objects*/,COLOR_abstract_collection___Collection___length))( variable[1] /*objects*/) /*AbstractArray::length*/; - ATTR_array___AbstractArray____length(variable[3]) /*AbstractArray::_length*/ = variable[4]; - return_label42: while(false); - init_table[VAL2OBJ(variable[0])->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, NULL, 271, LOCATE_array___Array___with_capacity}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Array].i]) return; - variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*cap*/)>=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", " 'positive' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array___with_capacity, LOCATE_array, 274); nit_exit(1);} - variable[3] = variable[0]; - variable[4] = variable[0]; - variable[4] = BOX_NativeArray((val_t*)malloc((UNTAG_Int( variable[1] /*cap*/) * sizeof(val_t)))); - ATTR_array___Array____items(variable[3]) /*Array::_items*/ = variable[4]; - variable[3] = variable[0]; - ATTR_array___Array____capacity(variable[3]) /*Array::_capacity*/ = variable[1] /*cap*/; - variable[3] = variable[0]; - ATTR_array___AbstractArray____length(variable[3]) /*AbstractArray::_length*/ = TAG_Int(0); - return_label43: while(false); - init_table[VAL2OBJ(variable[0])->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; - variable[4] = TAG_Bool(UNTAG_Int( variable[2] /*count*/)>=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", " 'positive' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array___filled_with, LOCATE_array, 283); nit_exit(1);} - variable[4] = variable[0]; - variable[5] = variable[0]; - variable[5] = BOX_NativeArray((val_t*)malloc((UNTAG_Int( variable[2] /*count*/) * sizeof(val_t)))); - ATTR_array___Array____items(variable[4]) /*Array::_items*/ = variable[5]; - variable[4] = variable[0]; - ATTR_array___Array____capacity(variable[4]) /*Array::_capacity*/ = variable[2] /*count*/; - variable[4] = variable[0]; - ATTR_array___AbstractArray____length(variable[4]) /*AbstractArray::_length*/ = variable[2] /*count*/; - variable[4] = TAG_Int(0); - while (true) { /*while*/ - variable[5] = TAG_Bool(UNTAG_Int( variable[4] /*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, NULL, 294, LOCATE_array___Array___with_native}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[2] = param1; - if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Array].i]) return; - variable[4] = TAG_Bool(UNTAG_Int( variable[2] /*size*/)>=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", " 'positive' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array___with_native, LOCATE_array, 297); nit_exit(1);} - variable[4] = variable[0]; - ATTR_array___Array____items(variable[4]) /*Array::_items*/ = variable[1] /*nat*/; - variable[4] = variable[0]; - ATTR_array___Array____capacity(variable[4]) /*Array::_capacity*/ = variable[2] /*size*/; - variable[4] = variable[0]; - ATTR_array___AbstractArray____length(variable[4]) /*AbstractArray::_length*/ = variable[2] /*size*/; - return_label46: while(false); - init_table[VAL2OBJ(variable[0])->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, NULL, 313, LOCATE_array___ArrayIterator___item}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArrayIterator____array(variable[2]) /*ArrayIterator::_array*/; - variable[3] = variable[0]; - variable[3] = ATTR_array___ArrayIterator____index(variable[3]) /*ArrayIterator::_index*/; - variable[2] = ((abstract_collection___Map_____bra_t)CALL(variable[2],COLOR_abstract_collection___Map_____bra))(variable[2], variable[3]) /*Map::[]*/; - variable[1] = variable[2]; - goto return_label47; - return_label47: while(false); - tracehead = trace.prev; - return variable[1]; -} -void array___ArrayIterator___next(val_t self) { - struct trace_t trace = {NULL, NULL, 319, LOCATE_array___ArrayIterator___next}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - ATTR_array___ArrayIterator____index(variable[2]) /*ArrayIterator::_index*/ = TAG_Int(UNTAG_Int(ATTR_array___ArrayIterator____index(variable[2]) /*ArrayIterator::_index*/)+UNTAG_Int( TAG_Int(1))); - return_label48: while(false); - 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, NULL, 317, LOCATE_array___ArrayIterator___is_ok}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArrayIterator____index(variable[2]) /*ArrayIterator::_index*/; - variable[3] = variable[0]; - variable[3] = ATTR_array___ArrayIterator____array(variable[3]) /*ArrayIterator::_array*/; - variable[3] = ((array___AbstractArray___length_t)CALL(variable[3],COLOR_abstract_collection___Collection___length))(variable[3]) /*AbstractArray::length*/; - variable[2] = TAG_Bool(UNTAG_Int(variable[2])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; - variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[1] /*a*/ == NIT_NULL /*null*/) || (( variable[1] /*a*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable[1] /*a*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[1] /*a*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable[1] /*a*/,COLOR_kernel___Object_____eqeq))( variable[1] /*a*/, NIT_NULL /*null*/) /*Object::==*/))))))); - if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", " 'not_nil' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___ArrayIterator___init, LOCATE_array, 323); nit_exit(1);} - variable[3] = variable[0]; - ATTR_array___ArrayIterator____array(variable[3]) /*ArrayIterator::_array*/ = variable[1] /*a*/; - variable[3] = variable[0]; - ATTR_array___ArrayIterator____index(variable[3]) /*ArrayIterator::_index*/ = TAG_Int(0); - return_label51: while(false); - init_table[VAL2OBJ(variable[0])->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___ArraySet___iterator(val_t self) { - struct trace_t trace = {NULL, NULL, 364, LOCATE_array___ArraySet___iterator}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArraySet____array(variable[2]) /*ArraySet::_array*/; - variable[2] = ((array___AbstractArray___iterator_t)CALL(variable[2],COLOR_abstract_collection___Collection___iterator))(variable[2]) /*AbstractArray::iterator*/; - variable[3] = NEW_ArraySetIterator_array___ArraySetIterator___init(variable[2]); /*new ArraySetIterator[E]*/ - variable[2] = variable[3]; - variable[1] = variable[2]; - goto return_label52; - return_label52: while(false); - tracehead = trace.prev; - return variable[1]; -} -val_t array___ArraySet___is_empty(val_t self) { - struct trace_t trace = {NULL, NULL, 344, LOCATE_array___ArraySet___is_empty}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArraySet____array(variable[2]) /*ArraySet::_array*/; - variable[2] = ((array___AbstractArray___is_empty_t)CALL(variable[2],COLOR_abstract_collection___Collection___is_empty))(variable[2]) /*AbstractArray::is_empty*/; - variable[1] = variable[2]; - goto return_label53; - return_label53: while(false); - tracehead = trace.prev; - return variable[1]; -} -val_t array___ArraySet___length(val_t self) { - struct trace_t trace = {NULL, NULL, 346, LOCATE_array___ArraySet___length}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArraySet____array(variable[2]) /*ArraySet::_array*/; - variable[2] = ((array___AbstractArray___length_t)CALL(variable[2],COLOR_abstract_collection___Collection___length))(variable[2]) /*AbstractArray::length*/; - variable[1] = variable[2]; - goto return_label54; - return_label54: while(false); - tracehead = trace.prev; - return variable[1]; -} -val_t array___ArraySet___has(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 340, LOCATE_array___ArraySet___has}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_array___ArraySet____array(variable[3]) /*ArraySet::_array*/; - variable[3] = ((array___AbstractArray___has_t)CALL(variable[3],COLOR_abstract_collection___Collection___has))(variable[3], variable[1] /*e*/) /*AbstractArray::has*/; - variable[2] = variable[3]; - goto return_label55; - return_label55: while(false); - tracehead = trace.prev; - return variable[2]; -} -val_t array___ArraySet___first(val_t self) { - struct trace_t trace = {NULL, NULL, 348, LOCATE_array___ArraySet___first}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArraySet____array(variable[2]) /*ArraySet::_array*/; - variable[2] = ((array___AbstractArray___length_t)CALL(variable[2],COLOR_abstract_collection___Collection___length))(variable[2]) /*AbstractArray::length*/; - variable[2] = TAG_Bool(UNTAG_Int(variable[2])>UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable[2])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___ArraySet___first, LOCATE_array, 350); nit_exit(1);} - variable[2] = variable[0]; - variable[2] = ATTR_array___ArraySet____array(variable[2]) /*ArraySet::_array*/; - variable[2] = ((abstract_collection___IndexedCollection___first_t)CALL(variable[2],COLOR_abstract_collection___Collection___first))(variable[2]) /*IndexedCollection::first*/; - variable[1] = variable[2]; - goto return_label56; - return_label56: while(false); - tracehead = trace.prev; - return variable[1]; -} -void array___ArraySet___clear(val_t self) { - struct trace_t trace = {NULL, NULL, 362, LOCATE_array___ArraySet___clear}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArraySet____array(variable[2]) /*ArraySet::_array*/; - ((array___AbstractArray___clear_t)CALL(variable[2],COLOR_abstract_collection___RemovableCollection___clear))(variable[2]) /*AbstractArray::clear*/; - return_label57: while(false); - 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; } -void array___ArraySet___remove(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 354, LOCATE_array___ArraySet___remove}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ATTR_array___ArraySet____array(variable[4]) /*ArraySet::_array*/; - variable[4] = ((array___AbstractArray___index_of_t)CALL(variable[4],COLOR_abstract_collection___IndexedCollection___index_of))(variable[4], variable[1] /*item*/) /*AbstractArray::index_of*/; - variable[3] = variable[4]; - variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (UNTAG_Bool(variable[4])) { /*if*/ - variable[4] = variable[0]; - ((array___ArraySet___remove_at_t)CALL(variable[4],COLOR_array___ArraySet___remove_at))(variable[4], variable[3] /*i*/) /*ArraySet::remove_at*/; - } - return_label58: while(false); - 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, NULL, 360, LOCATE_array___ArraySet___remove_all}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - ((array___ArraySet___remove_t)CALL(variable[3],COLOR_abstract_collection___RemovableCollection___remove))(variable[3], variable[1] /*item*/) /*ArraySet::remove*/; - return_label59: while(false); - 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___add(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 342, LOCATE_array___ArraySet___add}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_array___ArraySet____array(variable[3]) /*ArraySet::_array*/; - variable[3] = ((array___AbstractArray___has_t)CALL(variable[3],COLOR_abstract_collection___Collection___has))(variable[3], variable[1] /*e*/) /*AbstractArray::has*/; - if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[3])))) { /*if*/ - variable[3] = variable[0]; - variable[3] = ATTR_array___ArraySet____array(variable[3]) /*ArraySet::_array*/; - ((array___AbstractArray___add_t)CALL(variable[3],COLOR_abstract_collection___SimpleCollection___add))(variable[3], variable[1] /*e*/) /*AbstractArray::add*/; - } - return_label60: while(false); - 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; } -void array___ArraySet___enlarge(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 366, LOCATE_array___ArraySet___enlarge}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_array___ArraySet____array(variable[3]) /*ArraySet::_array*/; - ((array___Array___enlarge_t)CALL(variable[3],COLOR_array___AbstractArray___enlarge))(variable[3], variable[1] /*cap*/) /*Array::enlarge*/; - return_label61: while(false); - 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, NULL, 369, LOCATE_array___ArraySet___remove_at}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_array___ArraySet____array(variable[3]) /*ArraySet::_array*/; - variable[4] = variable[0]; - variable[4] = ATTR_array___ArraySet____array(variable[4]) /*ArraySet::_array*/; - variable[4] = ((abstract_collection___IndexedCollection___last_t)CALL(variable[4],COLOR_abstract_collection___IndexedCollection___last))(variable[4]) /*IndexedCollection::last*/; - ((array___Array_____braeq_t)CALL(variable[3],COLOR_abstract_collection___Map_____braeq))(variable[3], variable[1] /*i*/, variable[4]) /*Array::[]=*/; - variable[3] = variable[0]; - variable[3] = ATTR_array___ArraySet____array(variable[3]) /*ArraySet::_array*/; - ((array___AbstractArray___pop_t)CALL(variable[3],COLOR_abstract_collection___IndexedCollection___pop))(variable[3]) /*AbstractArray::pop*/; - return_label62: while(false); - 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, NULL, 375, LOCATE_array___ArraySet___init}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_ArraySet].i]) return; - variable[2] = variable[0]; - variable[3] = NEW_Array_array___Array___init(); /*new Array[E]*/ - ATTR_array___ArraySet____array(variable[2]) /*ArraySet::_array*/ = variable[3]; - return_label63: while(false); - init_table[VAL2OBJ(variable[0])->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, NULL, 378, LOCATE_array___ArraySet___with_capacity}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_ArraySet].i]) return; - variable[3] = variable[0]; - variable[4] = NEW_Array_array___Array___with_capacity( variable[1] /*i*/); /*new Array[E]*/ - ATTR_array___ArraySet____array(variable[3]) /*ArraySet::_array*/ = variable[4]; - return_label64: while(false); - init_table[VAL2OBJ(variable[0])->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___item(val_t self) { - struct trace_t trace = {NULL, NULL, 390, LOCATE_array___ArraySetIterator___item}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArraySetIterator____iter(variable[2]) /*ArraySetIterator::_iter*/; - variable[2] = ((array___ArrayIterator___item_t)CALL(variable[2],COLOR_abstract_collection___Iterator___item))(variable[2]) /*ArrayIterator::item*/; - variable[1] = variable[2]; - goto return_label65; - return_label65: while(false); - tracehead = trace.prev; - return variable[1]; -} -void array___ArraySetIterator___next(val_t self) { - struct trace_t trace = {NULL, NULL, 388, LOCATE_array___ArraySetIterator___next}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArraySetIterator____iter(variable[2]) /*ArraySetIterator::_iter*/; - ((array___ArrayIterator___next_t)CALL(variable[2],COLOR_abstract_collection___Iterator___next))(variable[2]) /*ArrayIterator::next*/; - return_label66: while(false); - 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___is_ok(val_t self) { - struct trace_t trace = {NULL, NULL, 386, LOCATE_array___ArraySetIterator___is_ok}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArraySetIterator____iter(variable[2]) /*ArraySetIterator::_iter*/; - variable[2] = ((array___ArrayIterator___is_ok_t)CALL(variable[2],COLOR_abstract_collection___Iterator___is_ok))(variable[2]) /*ArrayIterator::is_ok*/; - variable[1] = variable[2]; - goto return_label67; - return_label67: while(false); - tracehead = trace.prev; - return variable[1]; -} -void array___ArraySetIterator___init(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, NULL, 392, LOCATE_array___ArraySetIterator___init}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_ArraySetIterator].i]) return; - variable[3] = variable[0]; - ATTR_array___ArraySetIterator____iter(variable[3]) /*ArraySetIterator::_iter*/ = variable[1] /*iter*/; - return_label68: while(false); - init_table[VAL2OBJ(variable[0])->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___iterator(val_t self) { - struct trace_t trace = {NULL, NULL, 454, LOCATE_array___ArrayMap___iterator}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArrayMap____items(variable[2]) /*ArrayMap::_items*/; - variable[2] = ((array___AbstractArray___iterator_t)CALL(variable[2],COLOR_abstract_collection___Collection___iterator))(variable[2]) /*AbstractArray::iterator*/; - variable[3] = NEW_CoupleMapIterator_abstract_collection___CoupleMapIterator___init(variable[2]); /*new CoupleMapIterator[K, E]*/ - variable[2] = variable[3]; - variable[1] = variable[2]; - goto return_label69; - return_label69: while(false); - tracehead = trace.prev; - return variable[1]; -} -val_t array___ArrayMap___is_empty(val_t self) { - struct trace_t trace = {NULL, NULL, 456, LOCATE_array___ArrayMap___is_empty}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArrayMap____items(variable[2]) /*ArrayMap::_items*/; - variable[2] = ((array___AbstractArray___is_empty_t)CALL(variable[2],COLOR_abstract_collection___Collection___is_empty))(variable[2]) /*AbstractArray::is_empty*/; - variable[1] = variable[2]; - goto return_label70; - return_label70: while(false); - tracehead = trace.prev; - return variable[1]; -} -val_t array___ArrayMap___length(val_t self) { - struct trace_t trace = {NULL, NULL, 441, LOCATE_array___ArrayMap___length}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_array___ArrayMap____items(variable[2]) /*ArrayMap::_items*/; - variable[2] = ((array___AbstractArray___length_t)CALL(variable[2],COLOR_abstract_collection___Collection___length))(variable[2]) /*AbstractArray::length*/; - variable[1] = variable[2]; - goto return_label71; - return_label71: while(false); - tracehead = trace.prev; - return variable[1]; -} -val_t array___ArrayMap___has(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 427, LOCATE_array___ArrayMap___has}; - val_t variable[7]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_array___ArrayMap____items(variable[3]) /*ArrayMap::_items*/; - variable[3] = ((array___AbstractArray___iterator_t)CALL(variable[3],COLOR_abstract_collection___Collection___iterator))(variable[3]) /*AbstractArray::iterator*/; - while (true) { /*for*/ - variable[4] = ((array___ArrayIterator___is_ok_t)CALL(variable[3],COLOR_abstract_collection___Iterator___is_ok))(variable[3]) /*ArrayIterator::is_ok*/; - if (!UNTAG_Bool(variable[4])) break; /*for*/ - variable[4] = ((array___ArrayIterator___item_t)CALL(variable[3],COLOR_abstract_collection___Iterator___item))(variable[3]) /*ArrayIterator::item*/; - variable[5] = variable[4]; - variable[6] = ((abstract_collection___Couple___second_t)CALL( variable[5] /*i*/,COLOR_abstract_collection___Couple___second))( variable[5] /*i*/) /*Couple::second*/; - variable[6] = TAG_Bool((variable[6] == variable[1] /*item*/) || ((variable[6] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[6],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[6], variable[1] /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[6],COLOR_kernel___Object_____eqeq))(variable[6], variable[1] /*item*/) /*Object::==*/))))); - if (UNTAG_Bool(variable[6])) { /*if*/ - variable[2] = TAG_Bool(true); - goto return_label72; +val_t array___ArrayMap_____bra(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 483; + fra.me.meth = LOCATE_array___ArrayMap_____bra; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//collection//array.nit:486 */ + REGB0 = CALL_array___ArrayMap___index(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:487 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=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); } - continue_73: while(0); - ((array___ArrayIterator___next_t)CALL(variable[3],COLOR_abstract_collection___Iterator___next))(variable[3]) /*ArrayIterator::next*/; - } - break_73: while(0); - variable[2] = TAG_Bool(false); - goto return_label72; - return_label72: while(false); - tracehead = trace.prev; - return variable[2]; -} -val_t array___ArrayMap___has_only(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 434, LOCATE_array___ArrayMap___has_only}; - val_t variable[7]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_array___ArrayMap____items(variable[3]) /*ArrayMap::_items*/; - variable[3] = ((array___AbstractArray___iterator_t)CALL(variable[3],COLOR_abstract_collection___Collection___iterator))(variable[3]) /*AbstractArray::iterator*/; - while (true) { /*for*/ - variable[4] = ((array___ArrayIterator___is_ok_t)CALL(variable[3],COLOR_abstract_collection___Iterator___is_ok))(variable[3]) /*ArrayIterator::is_ok*/; - if (!UNTAG_Bool(variable[4])) break; /*for*/ - variable[4] = ((array___ArrayIterator___item_t)CALL(variable[3],COLOR_abstract_collection___Iterator___item))(variable[3]) /*ArrayIterator::item*/; - variable[5] = variable[4]; - variable[6] = ((abstract_collection___Couple___second_t)CALL( variable[5] /*i*/,COLOR_abstract_collection___Couple___second))( variable[5] /*i*/) /*Couple::second*/; - variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[6] == variable[1] /*item*/) || ((variable[6] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[6],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[6], variable[1] /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[6],COLOR_kernel___Object_____eqeq))(variable[6], variable[1] /*item*/) /*Object::==*/))))))); - if (UNTAG_Bool(variable[6])) { /*if*/ - variable[2] = TAG_Bool(false); - goto return_label74; + 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: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]; } -void array___ArrayMap___remove(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 458, LOCATE_array___ArrayMap___remove}; - val_t variable[10]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ATTR_array___ArrayMap____items(variable[4]) /*ArrayMap::_items*/; - variable[4] = ((array___AbstractArray___length_t)CALL(variable[4],COLOR_abstract_collection___Collection___length))(variable[4]) /*AbstractArray::length*/; - variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int( TAG_Int(1))); - variable[3] = variable[4]; - while (true) { /*while*/ - variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable[4])) break; /* while*/ - variable[4] = variable[0]; - variable[4] = ATTR_array___ArrayMap____items(variable[4]) /*ArrayMap::_items*/; - variable[5] = variable[4]; - variable[6] = variable[3] /*i*/; - variable[8] = TAG_Bool(UNTAG_Int( variable[6] /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable[9] = variable[8]; - if (UNTAG_Bool(variable[9])) { /* and */ - variable[9] = variable[5]; - variable[9] = ATTR_array___AbstractArray____length(variable[9]) /*AbstractArray::_length*/; - variable[9] = TAG_Bool(UNTAG_Int( variable[6] /*index*/)=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); + } + 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)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); + } + 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_81: while(0); - return_label80: 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, NULL, 470, LOCATE_array___ArrayMap___remove_all}; - val_t variable[10]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ATTR_array___ArrayMap____items(variable[4]) /*ArrayMap::_items*/; - variable[4] = ((array___AbstractArray___length_t)CALL(variable[4],COLOR_abstract_collection___Collection___length))(variable[4]) /*AbstractArray::length*/; - variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int( TAG_Int(1))); - variable[3] = variable[4]; - while (true) { /*while*/ - variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (!UNTAG_Bool(variable[4])) break; /* while*/ - variable[4] = variable[0]; - variable[4] = ATTR_array___ArrayMap____items(variable[4]) /*ArrayMap::_items*/; - variable[5] = variable[4]; - variable[6] = variable[3] /*i*/; - variable[8] = TAG_Bool(UNTAG_Int( variable[6] /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable[9] = variable[8]; - if (UNTAG_Bool(variable[9])) { /* and */ - variable[9] = variable[5]; - variable[9] = ATTR_array___AbstractArray____length(variable[9]) /*AbstractArray::_length*/; - variable[9] = TAG_Bool(UNTAG_Int( variable[6] /*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); } - variable[8] = variable[9]; - if (!UNTAG_Bool(variable[8])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_array, 229); nit_exit(1);} - variable[8] = variable[5]; - variable[8] = ATTR_array___Array____items(variable[8]) /*Array::_items*/; - variable[8] = UNBOX_NativeArray(variable[8])[UNTAG_Int( variable[6] /*index*/)]; - variable[7] = variable[8]; - goto return_label85; - return_label85: while(false); - variable[4] = variable[7]; - variable[4] = ((abstract_collection___Couple___second_t)CALL(variable[4],COLOR_abstract_collection___Couple___second))(variable[4]) /*Couple::second*/; - variable[4] = TAG_Bool((variable[4] == variable[1] /*item*/) || ((variable[4] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[4],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[4], variable[1] /*item*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[4],COLOR_kernel___Object_____eqeq))(variable[4], variable[1] /*item*/) /*Object::==*/))))); - if (UNTAG_Bool(variable[4])) { /*if*/ - variable[4] = variable[0]; - ((array___ArrayMap___remove_at_index_t)CALL(variable[4],COLOR_array___ArrayMap___remove_at_index))(variable[4], variable[3] /*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: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; } - variable[3] = TAG_Int(UNTAG_Int(variable[3])-UNTAG_Int( TAG_Int(1))) /*i*/; - continue_84: while(0); } - break_84: while(0); - return_label83: while(false); - tracehead = trace.prev; - return; + 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_____bra(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 402, LOCATE_array___ArrayMap_____bra}; - val_t variable[10]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ((array___ArrayMap___index_t)CALL(variable[4],COLOR_array___ArrayMap___index))(variable[4], variable[1] /*key*/) /*ArrayMap::index*/; - variable[3] = variable[4]; - variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (UNTAG_Bool(variable[4])) { /*if*/ - variable[4] = variable[0]; - variable[4] = ATTR_array___ArrayMap____items(variable[4]) /*ArrayMap::_items*/; - variable[5] = variable[4]; - variable[6] = variable[3] /*i*/; - variable[8] = TAG_Bool(UNTAG_Int( variable[6] /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable[9] = variable[8]; - if (UNTAG_Bool(variable[9])) { /* and */ - variable[9] = variable[5]; - variable[9] = ATTR_array___AbstractArray____length(variable[9]) /*AbstractArray::_length*/; - variable[9] = TAG_Bool(UNTAG_Int( variable[6] /*index*/)=UNTAG_Int( TAG_Int(0))); - if (UNTAG_Bool(variable[5])) { /*if*/ - variable[5] = variable[0]; - variable[5] = ATTR_array___ArrayMap____items(variable[5]) /*ArrayMap::_items*/; - variable[6] = variable[5]; - variable[7] = variable[4] /*i*/; - variable[9] = TAG_Bool(UNTAG_Int( variable[7] /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable[10] = variable[9]; - if (UNTAG_Bool(variable[10])) { /* and */ - variable[10] = variable[6]; - variable[10] = ATTR_array___AbstractArray____length(variable[10]) /*AbstractArray::_length*/; - variable[10] = TAG_Bool(UNTAG_Int( variable[7] /*index*/)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; } - variable[9] = variable[10]; - if (!UNTAG_Bool(variable[9])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_array, 229); nit_exit(1);} - variable[9] = variable[6]; - variable[9] = ATTR_array___Array____items(variable[9]) /*Array::_items*/; - variable[9] = UNBOX_NativeArray(variable[9])[UNTAG_Int( variable[7] /*index*/)]; - variable[8] = variable[9]; - goto return_label89; - return_label89: while(false); - variable[5] = variable[8]; - ((abstract_collection___Couple___second__eq_t)CALL(variable[5],COLOR_abstract_collection___Couple___second__eq))(variable[5], variable[2] /*item*/) /*Couple::second=*/; - } else { /*if*/ - variable[5] = variable[0]; - variable[5] = ATTR_array___ArrayMap____items(variable[5]) /*ArrayMap::_items*/; - variable[6] = NEW_Couple_abstract_collection___Couple___init( variable[1] /*key*/, variable[2] /*item*/); /*new Couple[K, E]*/ - ((array___AbstractArray___push_t)CALL(variable[5],COLOR_abstract_collection___IndexedCollection___push))(variable[5], variable[6]) /*AbstractArray::push*/; - } - return_label88: while(false); - tracehead = trace.prev; - return; + } + 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___has_key(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 424, LOCATE_array___ArrayMap___has_key}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ((array___ArrayMap___index_t)CALL(variable[3],COLOR_array___ArrayMap___index))(variable[3], variable[1] /*key*/) /*ArrayMap::index*/; - variable[3] = TAG_Bool(UNTAG_Int(variable[3])>=UNTAG_Int( TAG_Int(0))); - variable[2] = variable[3]; - goto return_label90; - return_label90: while(false); - tracehead = trace.prev; - return variable[2]; -} -void array___ArrayMap___remove_at(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 481, LOCATE_array___ArrayMap___remove_at}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ((array___ArrayMap___index_t)CALL(variable[4],COLOR_array___ArrayMap___index))(variable[4], variable[1] /*key*/) /*ArrayMap::index*/; - variable[3] = variable[4]; - variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (UNTAG_Bool(variable[4])) { /*if*/ - variable[4] = variable[0]; - ((array___ArrayMap___remove_at_index_t)CALL(variable[4],COLOR_array___ArrayMap___remove_at_index))(variable[4], variable[3] /*i*/) /*ArrayMap::remove_at_index*/; - } - return_label91: while(false); - tracehead = trace.prev; +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; } -val_t array___ArrayMap___couple_at(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 492, LOCATE_array___ArrayMap___couple_at}; - val_t variable[10]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ((array___ArrayMap___index_t)CALL(variable[4],COLOR_array___ArrayMap___index))(variable[4], variable[1] /*key*/) /*ArrayMap::index*/; - variable[3] = variable[4]; - variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)>=UNTAG_Int( TAG_Int(0))); - if (UNTAG_Bool(variable[4])) { /*if*/ - variable[4] = variable[0]; - variable[4] = ATTR_array___ArrayMap____items(variable[4]) /*ArrayMap::_items*/; - variable[5] = variable[4]; - variable[6] = variable[3] /*i*/; - variable[8] = TAG_Bool(UNTAG_Int( variable[6] /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable[9] = variable[8]; - if (UNTAG_Bool(variable[9])) { /* and */ - variable[9] = variable[5]; - variable[9] = ATTR_array___AbstractArray____length(variable[9]) /*AbstractArray::_length*/; - variable[9] = TAG_Bool(UNTAG_Int( variable[6] /*index*/)=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; } - variable[8] = variable[9]; - if (!UNTAG_Bool(variable[8])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_array, 229); nit_exit(1);} - variable[8] = variable[5]; - variable[8] = ATTR_array___Array____items(variable[8]) /*Array::_items*/; - variable[8] = UNBOX_NativeArray(variable[8])[UNTAG_Int( variable[6] /*index*/)]; - variable[7] = variable[8]; - goto return_label93; - return_label93: while(false); - variable[4] = variable[7]; - variable[2] = variable[4]; - goto return_label92; - } else { /*if*/ - variable[2] = NIT_NULL /*null*/; - goto return_label92; - } - return_label92: while(false); - tracehead = trace.prev; - return variable[2]; -} -void array___ArrayMap___enlarge(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 489, LOCATE_array___ArrayMap___enlarge}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_array___ArrayMap____items(variable[3]) /*ArrayMap::_items*/; - ((array___Array___enlarge_t)CALL(variable[3],COLOR_array___AbstractArray___enlarge))(variable[3], variable[1] /*cap*/) /*Array::enlarge*/; - return_label94: while(false); - tracehead = trace.prev; + } + label2: while(0); + stack_frame_head = fra.me.prev; + return; +} +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___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; +} +void array___ArrayMap___enlarge(val_t p0, val_t p1){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 570; + fra.me.meth = LOCATE_array___ArrayMap___enlarge; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + /* ./../lib/standard//collection//array.nit:571 */ + 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, 571); + } + fra.me.REG[0] = ATTR_array___ArrayMap____items(fra.me.REG[0]); + CALL_array___AbstractArray___enlarge(fra.me.REG[0])(fra.me.REG[0], REGB0); + stack_frame_head = fra.me.prev; return; } -void array___ArrayMap___remove_at_index(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 505, LOCATE_array___ArrayMap___remove_at_index}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_array___ArrayMap____items(variable[3]) /*ArrayMap::_items*/; - variable[4] = variable[0]; - variable[4] = ATTR_array___ArrayMap____items(variable[4]) /*ArrayMap::_items*/; - variable[4] = ((abstract_collection___IndexedCollection___last_t)CALL(variable[4],COLOR_abstract_collection___IndexedCollection___last))(variable[4]) /*IndexedCollection::last*/; - ((array___Array_____braeq_t)CALL(variable[3],COLOR_abstract_collection___Map_____braeq))(variable[3], variable[1] /*i*/, variable[4]) /*Array::[]=*/; - variable[3] = variable[0]; - variable[3] = ATTR_array___ArrayMap____items(variable[3]) /*ArrayMap::_items*/; - ((array___AbstractArray___pop_t)CALL(variable[3],COLOR_abstract_collection___IndexedCollection___pop))(variable[3]) /*AbstractArray::pop*/; - return_label95: while(false); - tracehead = trace.prev; +val_t array___ArrayMap___couple_at(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 573; + fra.me.meth = LOCATE_array___ArrayMap___couple_at; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//collection//array.nit:575 */ + REGB0 = CALL_array___ArrayMap___index(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:576 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=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, NULL, 515, LOCATE_array___ArrayMap___index}; - val_t variable[11]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ATTR_array___ArrayMap____last_index(variable[4]) /*ArrayMap::_last_index*/; - variable[3] = variable[4]; - variable[4] = variable[0]; - variable[4] = ATTR_array___ArrayMap____items(variable[4]) /*ArrayMap::_items*/; - variable[4] = ((array___AbstractArray___length_t)CALL(variable[4],COLOR_abstract_collection___Collection___length))(variable[4]) /*AbstractArray::length*/; - variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*l*/)=UNTAG_Int( TAG_Int(0))); - variable[10] = variable[9]; - if (UNTAG_Bool(variable[10])) { /* and */ - variable[10] = variable[6]; - variable[10] = ATTR_array___AbstractArray____length(variable[10]) /*AbstractArray::_length*/; - variable[10] = TAG_Bool(UNTAG_Int( variable[7] /*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))); - variable[10] = variable[9]; - if (UNTAG_Bool(variable[10])) { /* and */ - variable[10] = variable[6]; - variable[10] = ATTR_array___AbstractArray____length(variable[10]) /*AbstractArray::_length*/; - variable[10] = TAG_Bool(UNTAG_Int( variable[7] /*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); } - variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/; - continue_98: while(0); - } - break_98: while(0); - variable[5] = TAG_Int(-UNTAG_Int( TAG_Int(1))); - variable[2] = variable[5]; - goto return_label96; - return_label96: while(false); - tracehead = trace.prev; - return variable[2]; -} -void array___ArrayMap___init(val_t self, int* init_table) { - struct trace_t trace = {NULL, NULL, 533, LOCATE_array___ArrayMap___init}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_ArrayMap].i]) return; - variable[2] = variable[0]; - variable[3] = NEW_Array_array___Array___init(); /*new Array[Couple[K, E]]*/ - ATTR_array___ArrayMap____items(variable[2]) /*ArrayMap::_items*/ = variable[3]; - return_label100: while(false); - init_table[VAL2OBJ(variable[0])->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, NULL, 543, LOCATE_array___Iterator___to_a}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[3] = NEW_Array_array___Array___init(); /*new Array[E]*/ - variable[2] = variable[3]; - while (true) { /*while*/ - variable[3] = variable[0]; - variable[3] = ((abstract_collection___Iterator___is_ok_t)CALL(variable[3],COLOR_abstract_collection___Iterator___is_ok))(variable[3]) /*Iterator::is_ok*/; - if (!UNTAG_Bool(variable[3])) break; /* while*/ - variable[3] = variable[0]; - variable[3] = ((abstract_collection___Iterator___item_t)CALL(variable[3],COLOR_abstract_collection___Iterator___item))(variable[3]) /*Iterator::item*/; - ((array___AbstractArray___add_t)CALL( variable[2] /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable[2] /*res*/, variable[3]) /*AbstractArray::add*/; - variable[3] = variable[0]; - ((abstract_collection___Iterator___next_t)CALL(variable[3],COLOR_abstract_collection___Iterator___next))(variable[3]) /*Iterator::next*/; - continue_102: while(0); - } - break_102: while(0); - variable[1] = variable[2] /*res*/; - goto return_label101; - return_label101: while(false); - tracehead = trace.prev; - return variable[1]; -} -val_t array___Collection___to_a(val_t self) { - struct trace_t trace = {NULL, NULL, 556, LOCATE_array___Collection___to_a}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ((abstract_collection___Collection___iterator_t)CALL(variable[2],COLOR_abstract_collection___Collection___iterator))(variable[2]) /*Collection::iterator*/; - variable[2] = ((array___Iterator___to_a_t)CALL(variable[2],COLOR_array___Iterator___to_a))(variable[2]) /*Iterator::to_a*/; - variable[1] = variable[2]; - goto return_label103; - return_label103: while(false); - tracehead = trace.prev; - return variable[1]; -} -val_t array___ArrayCapable___calloc_array(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 567, LOCATE_array___ArrayCapable___calloc_array}; - val_t *variable = NULL; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - tracehead = trace.prev; - return BOX_NativeArray((val_t*)malloc((UNTAG_Int( param0) * sizeof(val_t)))); -} -val_t array___NativeArray_____bra(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 573, LOCATE_array___NativeArray_____bra}; - val_t *variable = NULL; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - tracehead = trace.prev; - return UNBOX_NativeArray( self)[UNTAG_Int( param0)]; -} -void array___NativeArray_____braeq(val_t self, val_t param0, val_t param1) { - struct trace_t trace = {NULL, NULL, 574, LOCATE_array___NativeArray_____braeq}; - val_t *variable = NULL; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - UNBOX_NativeArray( self)[UNTAG_Int( param0)]= param1; - tracehead = trace.prev; +val_t array___Iterator___to_a(val_t p0){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 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, NULL, 575, LOCATE_array___NativeArray___copy_to}; - val_t *variable = NULL; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_array; - (void)memcpy(UNBOX_NativeArray( param0), UNBOX_NativeArray( self), UNTAG_Int( param1)*sizeof(val_t)); - tracehead = trace.prev; +void array___NativeArray___copy_to(val_t p0, val_t p1, val_t p2){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_array; + fra.me.line = 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; }