X-Git-Url: http://nitlanguage.org diff --git a/c_src/list._sep.c b/c_src/list._sep.c index f137903..60c4d98 100644 --- a/c_src/list._sep.c +++ b/c_src/list._sep.c @@ -1,788 +1,1578 @@ /* This C file is generated by NIT to compile module list. */ #include "list._sep.h" -val_t list___List___iterator(val_t self) { - struct trace_t trace = {NULL, NULL, 173, LOCATE_list___List___iterator}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_list___List____head(variable[2]) /*List::_head*/; - variable[3] = NEW_ListIterator_list___ListIterator___init(variable[2]); /*new ListIterator[E]*/ - variable[2] = variable[3]; - variable[1] = variable[2]; - goto return_label0; - return_label0: while(false); - tracehead = trace.prev; - return variable[1]; -} -val_t list___List___is_empty(val_t self) { - struct trace_t trace = {NULL, NULL, 40, LOCATE_list___List___is_empty}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_list___List____head(variable[2]) /*List::_head*/; - variable[2] = TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[2],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[2], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[2],COLOR_kernel___Object_____eqeq))(variable[2], NIT_NULL /*null*/) /*Object::==*/))))); - variable[1] = variable[2]; - goto return_label1; - return_label1: while(false); - tracehead = trace.prev; - return variable[1]; -} -val_t list___List___length(val_t self) { - struct trace_t trace = {NULL, NULL, 43, LOCATE_list___List___length}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[2] = TAG_Int(0); - variable[4] = variable[0]; - variable[4] = ATTR_list___List____head(variable[4]) /*List::_head*/; - variable[3] = variable[4]; - while (true) { /*while*/ - variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[3] /*t*/ == NIT_NULL /*null*/) || (( variable[3] /*t*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable[3] /*t*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[3] /*t*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable[3] /*t*/,COLOR_kernel___Object_____eqeq))( variable[3] /*t*/, NIT_NULL /*null*/) /*Object::==*/))))))); - if (!UNTAG_Bool(variable[4])) break; /* while*/ - variable[2] = TAG_Int(UNTAG_Int(variable[2])+UNTAG_Int( TAG_Int(1))) /*l*/; - variable[4] = ((list___ListNode___next_t)CALL( variable[3] /*t*/,COLOR_list___ListNode___next))( variable[3] /*t*/) /*ListNode::next*/; - variable[3] = variable[4] /*t=*/; - continue_3: while(0); - } - break_3: while(0); - variable[1] = variable[2] /*l*/; - goto return_label2; - return_label2: while(false); - tracehead = trace.prev; - return variable[1]; -} -val_t list___List___has(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 55, LOCATE_list___List___has}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[4] = variable[0]; - variable[4] = ATTR_list___List____head(variable[4]) /*List::_head*/; - variable[3] = ((list___List___search_node_after_t)CALL(variable[3],COLOR_list___List___search_node_after))(variable[3], variable[1] /*e*/, variable[4]) /*List::search_node_after*/; - variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))(variable[3], NIT_NULL /*null*/) /*Object::==*/))))))); - variable[2] = variable[3]; - goto return_label4; - return_label4: while(false); - tracehead = trace.prev; - return variable[2]; -} -val_t list___List___has_only(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 58, LOCATE_list___List___has_only}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ATTR_list___List____head(variable[4]) /*List::_head*/; - variable[3] = variable[4]; - while (true) { /*while*/ - variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[3] /*node*/ == NIT_NULL /*null*/) || (( variable[3] /*node*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable[3] /*node*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[3] /*node*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable[3] /*node*/,COLOR_kernel___Object_____eqeq))( variable[3] /*node*/, NIT_NULL /*null*/) /*Object::==*/))))))); - if (!UNTAG_Bool(variable[4])) break; /* while*/ - variable[4] = ((abstract_collection___Container___item_t)CALL( variable[3] /*node*/,COLOR_abstract_collection___Container___item))( variable[3] /*node*/) /*Container::item*/; - variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[4] == variable[1] /*e*/) || ((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] /*e*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[4],COLOR_kernel___Object_____eqeq))(variable[4], variable[1] /*e*/) /*Object::==*/))))))); - if (UNTAG_Bool(variable[4])) { /*if*/ - variable[2] = TAG_Bool(false); - goto return_label5; - } - variable[4] = ((list___ListNode___next_t)CALL( variable[3] /*node*/,COLOR_list___ListNode___next))( variable[3] /*node*/) /*ListNode::next*/; - variable[3] = variable[4] /*node=*/; - continue_6: while(0); - } - break_6: while(0); - variable[2] = TAG_Bool(true); - goto return_label5; - return_label5: while(false); - tracehead = trace.prev; - return variable[2]; -} -val_t list___List___count(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 68, LOCATE_list___List___count}; - val_t variable[6]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[3] = TAG_Int(0); - variable[5] = variable[0]; - variable[5] = ATTR_list___List____head(variable[5]) /*List::_head*/; - variable[4] = variable[5]; - while (true) { /*while*/ - variable[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[4] /*node*/ == NIT_NULL /*null*/) || (( variable[4] /*node*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable[4] /*node*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[4] /*node*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable[4] /*node*/,COLOR_kernel___Object_____eqeq))( variable[4] /*node*/, NIT_NULL /*null*/) /*Object::==*/))))))); - if (!UNTAG_Bool(variable[5])) break; /* while*/ - variable[5] = ((abstract_collection___Container___item_t)CALL( variable[4] /*node*/,COLOR_abstract_collection___Container___item))( variable[4] /*node*/) /*Container::item*/; - variable[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[5] == variable[1] /*e*/) || ((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] /*e*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[5],COLOR_kernel___Object_____eqeq))(variable[5], variable[1] /*e*/) /*Object::==*/))))))); - if (UNTAG_Bool(variable[5])) { /*if*/ - variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*nb*/; - } - variable[5] = ((list___ListNode___next_t)CALL( variable[4] /*node*/,COLOR_list___ListNode___next))( variable[4] /*node*/) /*ListNode::next*/; - variable[4] = variable[5] /*node=*/; - continue_8: while(0); - } - break_8: while(0); - variable[2] = variable[3] /*nb*/; - goto return_label7; - return_label7: while(false); - tracehead = trace.prev; - return variable[2]; -} -val_t list___List___first(val_t self) { - struct trace_t trace = {NULL, NULL, 26, LOCATE_list___List___first}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_list___List____head(variable[2]) /*List::_head*/; - variable[2] = ((abstract_collection___Container___item_t)CALL(variable[2],COLOR_abstract_collection___Container___item))(variable[2]) /*Container::item*/; - variable[1] = variable[2]; - goto return_label9; - return_label9: while(false); - tracehead = trace.prev; - return variable[1]; -} -void list___List___clear(val_t self) { - struct trace_t trace = {NULL, NULL, 166, LOCATE_list___List___clear}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[2] = variable[0]; - ATTR_list___List____head(variable[2]) /*List::_head*/ = NIT_NULL /*null*/; - variable[2] = variable[0]; - ATTR_list___List____tail(variable[2]) /*List::_tail*/ = NIT_NULL /*null*/; - return_label10: while(false); - tracehead = trace.prev; +val_t list___List_____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_list; + fra.me.line = 21; + fra.me.meth = LOCATE_list___List_____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//list.nit:22 */ + fra.me.REG[0] = CALL_list___List___get_node(fra.me.REG[0])(fra.me.REG[0], REGB0); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 22); + } + fra.me.REG[0] = CALL_abstract_collection___Container___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 list___List_____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_list; + fra.me.line = 24; + fra.me.meth = LOCATE_list___List_____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//list.nit:24 */ + fra.me.REG[0] = CALL_list___List___get_node(fra.me.REG[0])(fra.me.REG[0], REGB0); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 24); + } + CALL_abstract_collection___Container___item__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + stack_frame_head = fra.me.prev; return; } -void list___List___remove(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 154, LOCATE_list___List___remove}; - val_t variable[6]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[5] = variable[0]; - variable[5] = ATTR_list___List____head(variable[5]) /*List::_head*/; - variable[4] = ((list___List___search_node_after_t)CALL(variable[4],COLOR_list___List___search_node_after))(variable[4], variable[1] /*e*/, variable[5]) /*List::search_node_after*/; - variable[3] = variable[4]; - variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[3] /*node*/ == NIT_NULL /*null*/) || (( variable[3] /*node*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable[3] /*node*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[3] /*node*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable[3] /*node*/,COLOR_kernel___Object_____eqeq))( variable[3] /*node*/, NIT_NULL /*null*/) /*Object::==*/))))))); - if (UNTAG_Bool(variable[4])) { /*if*/ - variable[4] = variable[0]; - ((list___List___remove_node_t)CALL(variable[4],COLOR_list___List___remove_node))(variable[4], variable[3] /*node*/) /*List::remove_node*/; - } - return_label11: while(false); - tracehead = trace.prev; +val_t list___List___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_list; + fra.me.line = 26; + fra.me.meth = LOCATE_list___List___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//list.nit:27 */ + fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 27); + } + fra.me.REG[0] = CALL_abstract_collection___Container___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 list___List___first__eq(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_list; + fra.me.line = 29; + fra.me.meth = LOCATE_list___List___first__eq; + 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//list.nit:30 */ + fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 30); + } + CALL_abstract_collection___Container___item__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + stack_frame_head = fra.me.prev; return; } -val_t list___List_____bra(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 21, LOCATE_list___List_____bra}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ((list___List___get_node_t)CALL(variable[3],COLOR_list___List___get_node))(variable[3], variable[1] /*index*/) /*List::get_node*/; - variable[3] = ((abstract_collection___Container___item_t)CALL(variable[3],COLOR_abstract_collection___Container___item))(variable[3]) /*Container::item*/; - variable[2] = variable[3]; - goto return_label12; - return_label12: while(false); - tracehead = trace.prev; - return variable[2]; -} -void list___List_____braeq(val_t self, val_t param0, val_t param1) { - struct trace_t trace = {NULL, NULL, 24, LOCATE_list___List_____braeq}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[2] = param1; - variable[4] = variable[0]; - variable[4] = ((list___List___get_node_t)CALL(variable[4],COLOR_list___List___get_node))(variable[4], variable[1] /*index*/) /*List::get_node*/; - ((abstract_collection___Container___item__eq_t)CALL(variable[4],COLOR_abstract_collection___Container___item__eq))(variable[4], variable[2] /*item*/) /*Container::item=*/; - return_label13: while(false); - tracehead = trace.prev; +val_t list___List___last(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_list; + fra.me.line = 32; + fra.me.meth = LOCATE_list___List___last; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./../lib/standard//collection//list.nit:33 */ + fra.me.REG[0] = ATTR_list___List____tail(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 33); + } + fra.me.REG[0] = CALL_abstract_collection___Container___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 list___List___last__eq(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_list; + fra.me.line = 35; + fra.me.meth = LOCATE_list___List___last__eq; + 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//list.nit:36 */ + fra.me.REG[0] = ATTR_list___List____tail(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 36); + } + CALL_abstract_collection___Container___item__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + stack_frame_head = fra.me.prev; return; } -val_t list___List___has_key(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 79, LOCATE_list___List___has_key}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ((list___List___get_node_t)CALL(variable[3],COLOR_list___List___get_node))(variable[3], variable[1] /*index*/) /*List::get_node*/; - variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))(variable[3], NIT_NULL /*null*/) /*Object::==*/))))))); - variable[2] = variable[3]; - goto return_label14; - return_label14: while(false); - tracehead = trace.prev; - return variable[2]; -} -void list___List___remove_at(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 160, LOCATE_list___List___remove_at}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ((list___List___get_node_t)CALL(variable[4],COLOR_list___List___get_node))(variable[4], variable[1] /*i*/) /*List::get_node*/; - variable[3] = variable[4]; - variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[3] /*node*/ == NIT_NULL /*null*/) || (( variable[3] /*node*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable[3] /*node*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[3] /*node*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable[3] /*node*/,COLOR_kernel___Object_____eqeq))( variable[3] /*node*/, NIT_NULL /*null*/) /*Object::==*/))))))); - if (UNTAG_Bool(variable[4])) { /*if*/ - variable[4] = variable[0]; - ((list___List___remove_node_t)CALL(variable[4],COLOR_list___List___remove_node))(variable[4], variable[3] /*node*/) /*List::remove_node*/; - } - return_label15: while(false); - tracehead = trace.prev; +val_t list___List___is_empty(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_list; + fra.me.line = 40; + fra.me.meth = LOCATE_list___List___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//list.nit:41 */ + fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL); + REGB0 = REGB1; + } + } + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t list___List___length(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 tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_list; + fra.me.line = 43; + fra.me.meth = LOCATE_list___List___length; + 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//list.nit:46 */ + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//list.nit:47 */ + fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]); + /* ./../lib/standard//collection//list.nit:48 */ + while(1) { + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + REGB2 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(false); + REGB1 = REGB2; + } else { + REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL); + REGB1 = REGB2; + } + } + REGB1 = TAG_Bool(!UNTAG_Bool(REGB1)); + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//collection//list.nit:49 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//list.nit:49 */ + REGB0 = REGB1; + /* ./../lib/standard//collection//list.nit:50 */ + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 50); + } + fra.me.REG[1] = CALL_list___ListNode___next(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[0] = fra.me.REG[1]; + } else { + /* ./../lib/standard//collection//list.nit:48 */ + goto label1; + } + } + label1: while(0); + /* ./../lib/standard//collection//list.nit:52 */ + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t list___List___has(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_list; + fra.me.line = 55; + fra.me.meth = LOCATE_list___List___has; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//collection//list.nit:56 */ + fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]); + fra.me.REG[2] = CALL_list___List___search_node_after(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[2]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + REGB0 = REGB1; + } + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t list___List___has_only(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_list; + fra.me.line = 58; + fra.me.meth = LOCATE_list___List___has_only; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//collection//list.nit:60 */ + fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]); + /* ./../lib/standard//collection//list.nit:61 */ + while(1) { + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL); + REGB0 = REGB1; + } + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//list.nit:62 */ + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 62); + } + fra.me.REG[2] = CALL_abstract_collection___Container___item(fra.me.REG[0])(fra.me.REG[0]); + REGB0 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[2],fra.me.REG[1])); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + REGB0 = REGB1; + } + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(false); + goto label1; + } + /* ./../lib/standard//collection//list.nit:63 */ + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 63); + } + fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[0] = fra.me.REG[2]; + } else { + /* ./../lib/standard//collection//list.nit:61 */ + goto label2; + } + } + label2: while(0); + /* ./../lib/standard//collection//list.nit:65 */ + REGB1 = TAG_Bool(true); + REGB0 = REGB1; + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t list___List___count(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_list; + fra.me.line = 68; + fra.me.meth = LOCATE_list___List___count; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//collection//list.nit:70 */ + REGB0 = TAG_Int(0); + /* ./../lib/standard//collection//list.nit:71 */ + fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]); + /* ./../lib/standard//collection//list.nit:72 */ + while(1) { + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + REGB2 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB2)) { + REGB2 = TAG_Bool(false); + REGB1 = REGB2; + } else { + REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL); + REGB1 = REGB2; + } + } + REGB1 = TAG_Bool(!UNTAG_Bool(REGB1)); + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//collection//list.nit:73 */ + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 73); + } + fra.me.REG[2] = CALL_abstract_collection___Container___item(fra.me.REG[0])(fra.me.REG[0]); + 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; + } + } + REGB1 = TAG_Bool(!UNTAG_Bool(REGB1)); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//list.nit:73 */ + REGB0 = REGB1; + } + /* ./../lib/standard//collection//list.nit:74 */ + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 74); + } + fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[0] = fra.me.REG[2]; + } else { + /* ./../lib/standard//collection//list.nit:72 */ + goto label1; + } + } + label1: while(0); + /* ./../lib/standard//collection//list.nit:76 */ + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +val_t list___List___has_key(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_list; + fra.me.line = 79; + fra.me.meth = LOCATE_list___List___has_key; + 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//list.nit:79 */ + fra.me.REG[0] = CALL_list___List___get_node(fra.me.REG[0])(fra.me.REG[0], REGB0); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL); + REGB0 = REGB1; + } + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +void list___List___push(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_list; + fra.me.line = 83; + fra.me.meth = LOCATE_list___List___push; + 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//list.nit:86 */ + fra.me.REG[1] = NEW_ListNode_list___ListNode___init(fra.me.REG[1]); + /* ./../lib/standard//collection//list.nit:87 */ + fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + REGB0 = REGB1; + } + } + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//list.nit:88 */ + ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[1]; + } else { + /* ./../lib/standard//collection//list.nit:90 */ + fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 90); + } + CALL_list___ListNode___next__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + /* ./../lib/standard//collection//list.nit:91 */ + fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]); + CALL_list___ListNode___prev__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); + } + /* ./../lib/standard//collection//list.nit:93 */ + ATTR_list___List____tail(fra.me.REG[0]) = fra.me.REG[1]; + stack_frame_head = fra.me.prev; return; } -void list___List___first__eq(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 29, LOCATE_list___List___first__eq}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_list___List____head(variable[3]) /*List::_head*/; - ((abstract_collection___Container___item__eq_t)CALL(variable[3],COLOR_abstract_collection___Container___item__eq))(variable[3], variable[1] /*e*/) /*Container::item=*/; - return_label16: while(false); - tracehead = trace.prev; +void list___List___unshift(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_list; + fra.me.line = 96; + fra.me.meth = LOCATE_list___List___unshift; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//collection//list.nit:99 */ + fra.me.REG[1] = NEW_ListNode_list___ListNode___init(fra.me.REG[1]); + /* ./../lib/standard//collection//list.nit:100 */ + fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + REGB0 = REGB1; + } + } + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//list.nit:101 */ + ATTR_list___List____tail(fra.me.REG[0]) = fra.me.REG[1]; + } else { + /* ./../lib/standard//collection//list.nit:103 */ + fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]); + CALL_list___ListNode___next__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); + /* ./../lib/standard//collection//list.nit:104 */ + fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 104); + } + CALL_list___ListNode___prev__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + } + /* ./../lib/standard//collection//list.nit:106 */ + ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[1]; + stack_frame_head = fra.me.prev; return; } -val_t list___List___last(val_t self) { - struct trace_t trace = {NULL, NULL, 32, LOCATE_list___List___last}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_list___List____tail(variable[2]) /*List::_tail*/; - variable[2] = ((abstract_collection___Container___item_t)CALL(variable[2],COLOR_abstract_collection___Container___item))(variable[2]) /*Container::item*/; - variable[1] = variable[2]; - goto return_label17; - return_label17: while(false); - tracehead = trace.prev; - return variable[1]; -} -void list___List___last__eq(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 35, LOCATE_list___List___last__eq}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_list___List____tail(variable[3]) /*List::_tail*/; - ((abstract_collection___Container___item__eq_t)CALL(variable[3],COLOR_abstract_collection___Container___item__eq))(variable[3], variable[1] /*e*/) /*Container::item=*/; - return_label18: while(false); - tracehead = trace.prev; +void list___List___link(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 tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_list; + fra.me.line = 109; + fra.me.meth = LOCATE_list___List___link; + 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//list.nit:114 */ + fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + REGB0 = REGB1; + } + } + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//list.nit:115 */ + fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[1]); + ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[2]; + } else { + /* ./../lib/standard//collection//list.nit:116 */ + fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[1]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + REGB0 = REGB1; + } + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//list.nit:117 */ + fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]); + fra.me.REG[3] = ATTR_list___List____head(fra.me.REG[1]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 117); + } + CALL_list___ListNode___next__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]); + /* ./../lib/standard//collection//list.nit:118 */ + fra.me.REG[3] = ATTR_list___List____tail(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 118); + } + fra.me.REG[3] = CALL_list___ListNode___next(fra.me.REG[3])(fra.me.REG[3]); + fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 118); + } + CALL_list___ListNode___prev__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]); + } + } + /* ./../lib/standard//collection//list.nit:120 */ + fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[1]); + ATTR_list___List____tail(fra.me.REG[0]) = fra.me.REG[2]; + /* ./../lib/standard//collection//list.nit:121 */ + CALL_abstract_collection___RemovableCollection___clear(fra.me.REG[1])(fra.me.REG[1]); + stack_frame_head = fra.me.prev; return; } -void list___List___push(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 83, LOCATE_list___List___push}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[4] = NEW_ListNode_list___ListNode___init( variable[1] /*e*/); /*new ListNode[E]*/ - variable[3] = variable[4]; - variable[4] = variable[0]; - variable[4] = ATTR_list___List____tail(variable[4]) /*List::_tail*/; - variable[4] = TAG_Bool((variable[4] == NIT_NULL /*null*/) || ((variable[4] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[4],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[4], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[4],COLOR_kernel___Object_____eqeq))(variable[4], NIT_NULL /*null*/) /*Object::==*/))))); - if (UNTAG_Bool(variable[4])) { /*if*/ - variable[4] = variable[0]; - ATTR_list___List____head(variable[4]) /*List::_head*/ = variable[3] /*node*/; - } else { /*if*/ - variable[4] = variable[0]; - variable[4] = ATTR_list___List____tail(variable[4]) /*List::_tail*/; - ((list___ListNode___next__eq_t)CALL(variable[4],COLOR_list___ListNode___next__eq))(variable[4], variable[3] /*node*/) /*ListNode::next=*/; - variable[4] = variable[0]; - variable[4] = ATTR_list___List____tail(variable[4]) /*List::_tail*/; - ((list___ListNode___prev__eq_t)CALL( variable[3] /*node*/,COLOR_list___ListNode___prev__eq))( variable[3] /*node*/, variable[4]) /*ListNode::prev=*/; - } - variable[4] = variable[0]; - ATTR_list___List____tail(variable[4]) /*List::_tail*/ = variable[3] /*node*/; - return_label19: while(false); - tracehead = trace.prev; +val_t list___List___pop(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_list; + fra.me.line = 126; + fra.me.meth = LOCATE_list___List___pop; + 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//list.nit:129 */ + fra.me.REG[1] = ATTR_list___List____tail(fra.me.REG[0]); + /* ./../lib/standard//collection//list.nit:130 */ + REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 130); + } + fra.me.REG[2] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]); + ATTR_list___List____tail(fra.me.REG[0]) = fra.me.REG[2]; + /* ./../lib/standard//collection//list.nit:131 */ + REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 131); + } + CALL_list___ListNode___prev__eq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL); + /* ./../lib/standard//collection//list.nit:132 */ + fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + REGB0 = REGB1; + } + } + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//list.nit:133 */ + ATTR_list___List____head(fra.me.REG[0]) = NIT_NULL; + } else { + /* ./../lib/standard//collection//list.nit:135 */ + fra.me.REG[0] = ATTR_list___List____tail(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 135); + } + CALL_list___ListNode___next__eq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL); + } + /* ./../lib/standard//collection//list.nit:137 */ + REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 137); + } + fra.me.REG[1] = CALL_abstract_collection___Container___item(fra.me.REG[1])(fra.me.REG[1]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[1]; +} +val_t list___List___shift(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_list; + fra.me.line = 140; + fra.me.meth = LOCATE_list___List___shift; + fra.me.has_broke = 0; + fra.me.REG_size = 3; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./../lib/standard//collection//list.nit:143 */ + fra.me.REG[1] = ATTR_list___List____head(fra.me.REG[0]); + /* ./../lib/standard//collection//list.nit:144 */ + REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 144); + } + fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]); + ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[2]; + /* ./../lib/standard//collection//list.nit:145 */ + REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 145); + } + CALL_list___ListNode___next__eq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL); + /* ./../lib/standard//collection//list.nit:146 */ + fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + REGB0 = REGB1; + } + } + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//list.nit:147 */ + ATTR_list___List____tail(fra.me.REG[0]) = NIT_NULL; + } else { + /* ./../lib/standard//collection//list.nit:149 */ + fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 149); + } + CALL_list___ListNode___prev__eq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL); + } + /* ./../lib/standard//collection//list.nit:151 */ + REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 151); + } + fra.me.REG[1] = CALL_abstract_collection___Container___item(fra.me.REG[1])(fra.me.REG[1]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[1]; +} +void list___List___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_list; + fra.me.line = 154; + fra.me.meth = LOCATE_list___List___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//list.nit:156 */ + fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]); + fra.me.REG[2] = CALL_list___List___search_node_after(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[2]); + /* ./../lib/standard//collection//list.nit:157 */ + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + REGB0 = REGB1; + } + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + CALL_list___List___remove_node(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]); + } + stack_frame_head = fra.me.prev; return; } -val_t list___List___pop(val_t self) { - struct trace_t trace = {NULL, NULL, 126, LOCATE_list___List___pop}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[3] = variable[0]; - variable[3] = ATTR_list___List____tail(variable[3]) /*List::_tail*/; - variable[2] = variable[3]; - variable[3] = variable[0]; - variable[4] = ((list___ListNode___prev_t)CALL( variable[2] /*node*/,COLOR_list___ListNode___prev))( variable[2] /*node*/) /*ListNode::prev*/; - ATTR_list___List____tail(variable[3]) /*List::_tail*/ = variable[4]; - ((list___ListNode___prev__eq_t)CALL( variable[2] /*node*/,COLOR_list___ListNode___prev__eq))( variable[2] /*node*/, NIT_NULL /*null*/) /*ListNode::prev=*/; - variable[3] = variable[0]; - variable[3] = ATTR_list___List____tail(variable[3]) /*List::_tail*/; - variable[3] = TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))(variable[3], NIT_NULL /*null*/) /*Object::==*/))))); - if (UNTAG_Bool(variable[3])) { /*if*/ - variable[3] = variable[0]; - ATTR_list___List____head(variable[3]) /*List::_head*/ = NIT_NULL /*null*/; - } else { /*if*/ - variable[3] = variable[0]; - variable[3] = ATTR_list___List____tail(variable[3]) /*List::_tail*/; - ((list___ListNode___next__eq_t)CALL(variable[3],COLOR_list___ListNode___next__eq))(variable[3], NIT_NULL /*null*/) /*ListNode::next=*/; - } - variable[3] = ((abstract_collection___Container___item_t)CALL( variable[2] /*node*/,COLOR_abstract_collection___Container___item))( variable[2] /*node*/) /*Container::item*/; - variable[1] = variable[3]; - goto return_label20; - return_label20: while(false); - tracehead = trace.prev; - return variable[1]; -} -void list___List___unshift(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 96, LOCATE_list___List___unshift}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[4] = NEW_ListNode_list___ListNode___init( variable[1] /*e*/); /*new ListNode[E]*/ - variable[3] = variable[4]; - variable[4] = variable[0]; - variable[4] = ATTR_list___List____head(variable[4]) /*List::_head*/; - variable[4] = TAG_Bool((variable[4] == NIT_NULL /*null*/) || ((variable[4] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[4],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[4], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[4],COLOR_kernel___Object_____eqeq))(variable[4], NIT_NULL /*null*/) /*Object::==*/))))); - if (UNTAG_Bool(variable[4])) { /*if*/ - variable[4] = variable[0]; - ATTR_list___List____tail(variable[4]) /*List::_tail*/ = variable[3] /*node*/; - } else { /*if*/ - variable[4] = variable[0]; - variable[4] = ATTR_list___List____head(variable[4]) /*List::_head*/; - ((list___ListNode___next__eq_t)CALL( variable[3] /*node*/,COLOR_list___ListNode___next__eq))( variable[3] /*node*/, variable[4]) /*ListNode::next=*/; - variable[4] = variable[0]; - variable[4] = ATTR_list___List____head(variable[4]) /*List::_head*/; - ((list___ListNode___prev__eq_t)CALL(variable[4],COLOR_list___ListNode___prev__eq))(variable[4], variable[3] /*node*/) /*ListNode::prev=*/; - } - variable[4] = variable[0]; - ATTR_list___List____head(variable[4]) /*List::_head*/ = variable[3] /*node*/; - return_label21: while(false); - tracehead = trace.prev; +void list___List___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_list; + fra.me.line = 160; + fra.me.meth = LOCATE_list___List___remove_at; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + /* ./../lib/standard//collection//list.nit:162 */ + fra.me.REG[1] = CALL_list___List___get_node(fra.me.REG[0])(fra.me.REG[0], REGB0); + /* ./../lib/standard//collection//list.nit:163 */ + REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL); + REGB0 = REGB1; + } + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + CALL_list___List___remove_node(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + } + stack_frame_head = fra.me.prev; return; } -val_t list___List___shift(val_t self) { - struct trace_t trace = {NULL, NULL, 140, LOCATE_list___List___shift}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[3] = variable[0]; - variable[3] = ATTR_list___List____head(variable[3]) /*List::_head*/; - variable[2] = variable[3]; - variable[3] = variable[0]; - variable[4] = ((list___ListNode___next_t)CALL( variable[2] /*node*/,COLOR_list___ListNode___next))( variable[2] /*node*/) /*ListNode::next*/; - ATTR_list___List____head(variable[3]) /*List::_head*/ = variable[4]; - ((list___ListNode___next__eq_t)CALL( variable[2] /*node*/,COLOR_list___ListNode___next__eq))( variable[2] /*node*/, NIT_NULL /*null*/) /*ListNode::next=*/; - variable[3] = variable[0]; - variable[3] = ATTR_list___List____head(variable[3]) /*List::_head*/; - variable[3] = TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))(variable[3], NIT_NULL /*null*/) /*Object::==*/))))); - if (UNTAG_Bool(variable[3])) { /*if*/ - variable[3] = variable[0]; - ATTR_list___List____tail(variable[3]) /*List::_tail*/ = NIT_NULL /*null*/; - } else { /*if*/ - variable[3] = variable[0]; - variable[3] = ATTR_list___List____head(variable[3]) /*List::_head*/; - ((list___ListNode___prev__eq_t)CALL(variable[3],COLOR_list___ListNode___prev__eq))(variable[3], NIT_NULL /*null*/) /*ListNode::prev=*/; - } - variable[3] = ((abstract_collection___Container___item_t)CALL( variable[2] /*node*/,COLOR_abstract_collection___Container___item))( variable[2] /*node*/) /*Container::item*/; - variable[1] = variable[3]; - goto return_label22; - return_label22: while(false); - tracehead = trace.prev; - return variable[1]; -} -void list___List___link(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 109, LOCATE_list___List___link}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_list___List____tail(variable[3]) /*List::_tail*/; - variable[3] = TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))(variable[3], NIT_NULL /*null*/) /*Object::==*/))))); - if (UNTAG_Bool(variable[3])) { /*if*/ - variable[3] = variable[0]; - variable[4] = ATTR_list___List____head( variable[1] /*l*/) /*List::_head*/; - ATTR_list___List____head(variable[3]) /*List::_head*/ = variable[4]; - } else { /*if*/ - variable[3] = ATTR_list___List____head( variable[1] /*l*/) /*List::_head*/; - variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))(variable[3], NIT_NULL /*null*/) /*Object::==*/))))))); - if (UNTAG_Bool(variable[3])) { /*if*/ - variable[3] = variable[0]; - variable[3] = ATTR_list___List____tail(variable[3]) /*List::_tail*/; - variable[4] = ATTR_list___List____head( variable[1] /*l*/) /*List::_head*/; - ((list___ListNode___next__eq_t)CALL(variable[3],COLOR_list___ListNode___next__eq))(variable[3], variable[4]) /*ListNode::next=*/; - variable[3] = variable[0]; - variable[3] = ATTR_list___List____tail(variable[3]) /*List::_tail*/; - variable[3] = ((list___ListNode___next_t)CALL(variable[3],COLOR_list___ListNode___next))(variable[3]) /*ListNode::next*/; - variable[4] = variable[0]; - variable[4] = ATTR_list___List____tail(variable[4]) /*List::_tail*/; - ((list___ListNode___prev__eq_t)CALL(variable[3],COLOR_list___ListNode___prev__eq))(variable[3], variable[4]) /*ListNode::prev=*/; - } - } - variable[3] = variable[0]; - variable[4] = ATTR_list___List____tail( variable[1] /*l*/) /*List::_tail*/; - ATTR_list___List____tail(variable[3]) /*List::_tail*/ = variable[4]; - ((list___List___clear_t)CALL( variable[1] /*l*/,COLOR_abstract_collection___RemovableCollection___clear))( variable[1] /*l*/) /*List::clear*/; - return_label23: while(false); - tracehead = trace.prev; +void list___List___clear(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_list; + fra.me.line = 166; + fra.me.meth = LOCATE_list___List___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//list.nit:168 */ + ATTR_list___List____head(fra.me.REG[0]) = NIT_NULL; + /* ./../lib/standard//collection//list.nit:169 */ + ATTR_list___List____tail(fra.me.REG[0]) = NIT_NULL; + stack_frame_head = fra.me.prev; return; } -void list___List___init(val_t self, int* init_table) { - struct trace_t trace = {NULL, NULL, 175, LOCATE_list___List___init}; - val_t variable[2]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_List].i]) return; - return_label24: while(false); - init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_List].i] = 1; - tracehead = trace.prev; +val_t list___List___iterator(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_list; + fra.me.line = 173; + fra.me.meth = LOCATE_list___List___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//list.nit:173 */ + fra.me.REG[0] = NEW_ListIterator_list___ListIterator___init(fra.me.REG[0]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +void list___List___init(val_t p0, int* init_table){ + int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_List].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_list; + fra.me.line = 175; + fra.me.meth = LOCATE_list___List___init; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + stack_frame_head = fra.me.prev; + init_table[itpos0] = 1; return; } -void list___List___from(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, NULL, 178, LOCATE_list___List___from}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_List].i]) return; - variable[3] = variable[0]; - ((abstract_collection___IndexedCollection___append_t)CALL(variable[3],COLOR_abstract_collection___IndexedCollection___append))(variable[3], variable[1] /*coll*/) /*IndexedCollection::append*/; - return_label25: while(false); - init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_List].i] = 1; - tracehead = trace.prev; +void list___List___from(val_t p0, val_t p1, int* init_table){ + int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_List].i; + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t tmp; + if (init_table[itpos1]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_list; + fra.me.line = 178; + fra.me.meth = LOCATE_list___List___from; + 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//list.nit:179 */ + CALL_abstract_collection___Sequence___append(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + stack_frame_head = fra.me.prev; + init_table[itpos1] = 1; return; } -val_t list___List___get_node(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 187, LOCATE_list___List___get_node}; - val_t variable[6]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[4] = variable[0]; - variable[4] = ATTR_list___List____head(variable[4]) /*List::_head*/; - variable[3] = variable[4]; - variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*i*/)UNTAG_Int( TAG_Int(0))); - } - variable[4] = variable[5]; - if (!UNTAG_Bool(variable[4])) break; /* while*/ - variable[4] = ((list___ListNode___next_t)CALL( variable[3] /*n*/,COLOR_list___ListNode___next))( variable[3] /*n*/) /*ListNode::next*/; - variable[3] = variable[4] /*n=*/; - variable[1] = TAG_Int(UNTAG_Int(variable[1])-UNTAG_Int( TAG_Int(1))) /*i*/; - continue_27: while(0); - } - break_27: while(0); - variable[2] = variable[3] /*n*/; - goto return_label26; - return_label26: while(false); - tracehead = trace.prev; - return variable[2]; -} -val_t list___List___search_node_after(val_t self, val_t param0, val_t param1) { - struct trace_t trace = {NULL, NULL, 201, LOCATE_list___List___search_node_after}; - val_t variable[7]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[2] = param1; - variable[4] = variable[2] /*after*/; - while (true) { /*while*/ - variable[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[4] /*n*/ == NIT_NULL /*null*/) || (( variable[4] /*n*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable[4] /*n*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[4] /*n*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable[4] /*n*/,COLOR_kernel___Object_____eqeq))( variable[4] /*n*/, NIT_NULL /*null*/) /*Object::==*/))))))); - variable[6] = variable[5]; - if (UNTAG_Bool(variable[6])) { /* and */ - variable[6] = ((abstract_collection___Container___item_t)CALL( variable[4] /*n*/,COLOR_abstract_collection___Container___item))( variable[4] /*n*/) /*Container::item*/; - variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[6] == variable[1] /*e*/) || ((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] /*e*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[6],COLOR_kernel___Object_____eqeq))(variable[6], variable[1] /*e*/) /*Object::==*/))))))); - } - variable[5] = variable[6]; - if (!UNTAG_Bool(variable[5])) break; /* while*/ - variable[5] = ((list___ListNode___next_t)CALL( variable[4] /*n*/,COLOR_list___ListNode___next))( variable[4] /*n*/) /*ListNode::next*/; - variable[4] = variable[5] /*n=*/; - continue_29: while(0); - } - break_29: while(0); - variable[3] = variable[4] /*n*/; - goto return_label28; - return_label28: while(false); - tracehead = trace.prev; - return variable[3]; -} -void list___List___remove_node(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 209, LOCATE_list___List___remove_node}; - val_t variable[5]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[3] = ((list___ListNode___prev_t)CALL( variable[1] /*node*/,COLOR_list___ListNode___prev))( variable[1] /*node*/) /*ListNode::prev*/; - variable[3] = TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))(variable[3], NIT_NULL /*null*/) /*Object::==*/))))); - if (UNTAG_Bool(variable[3])) { /*if*/ - variable[3] = variable[0]; - variable[4] = ((list___ListNode___next_t)CALL( variable[1] /*node*/,COLOR_list___ListNode___next))( variable[1] /*node*/) /*ListNode::next*/; - ATTR_list___List____head(variable[3]) /*List::_head*/ = variable[4]; - variable[3] = ((list___ListNode___next_t)CALL( variable[1] /*node*/,COLOR_list___ListNode___next))( variable[1] /*node*/) /*ListNode::next*/; - variable[3] = TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))(variable[3], NIT_NULL /*null*/) /*Object::==*/))))); - if (UNTAG_Bool(variable[3])) { /*if*/ - variable[3] = variable[0]; - ATTR_list___List____tail(variable[3]) /*List::_tail*/ = NIT_NULL /*null*/; - } else { /*if*/ - variable[3] = ((list___ListNode___next_t)CALL( variable[1] /*node*/,COLOR_list___ListNode___next))( variable[1] /*node*/) /*ListNode::next*/; - ((list___ListNode___prev__eq_t)CALL(variable[3],COLOR_list___ListNode___prev__eq))(variable[3], NIT_NULL /*null*/) /*ListNode::prev=*/; - } - } else { /*if*/ - variable[3] = ((list___ListNode___next_t)CALL( variable[1] /*node*/,COLOR_list___ListNode___next))( variable[1] /*node*/) /*ListNode::next*/; - variable[3] = TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))(variable[3], NIT_NULL /*null*/) /*Object::==*/))))); - if (UNTAG_Bool(variable[3])) { /*if*/ - variable[3] = variable[0]; - variable[4] = ((list___ListNode___prev_t)CALL( variable[1] /*node*/,COLOR_list___ListNode___prev))( variable[1] /*node*/) /*ListNode::prev*/; - ATTR_list___List____tail(variable[3]) /*List::_tail*/ = variable[4]; - variable[3] = ((list___ListNode___prev_t)CALL( variable[1] /*node*/,COLOR_list___ListNode___prev))( variable[1] /*node*/) /*ListNode::prev*/; - ((list___ListNode___next__eq_t)CALL(variable[3],COLOR_list___ListNode___next__eq))(variable[3], NIT_NULL /*null*/) /*ListNode::next=*/; - } else { /*if*/ - variable[3] = ((list___ListNode___prev_t)CALL( variable[1] /*node*/,COLOR_list___ListNode___prev))( variable[1] /*node*/) /*ListNode::prev*/; - variable[4] = ((list___ListNode___next_t)CALL( variable[1] /*node*/,COLOR_list___ListNode___next))( variable[1] /*node*/) /*ListNode::next*/; - ((list___ListNode___next__eq_t)CALL(variable[3],COLOR_list___ListNode___next__eq))(variable[3], variable[4]) /*ListNode::next=*/; - variable[3] = ((list___ListNode___next_t)CALL( variable[1] /*node*/,COLOR_list___ListNode___next))( variable[1] /*node*/) /*ListNode::next*/; - variable[4] = ((list___ListNode___prev_t)CALL( variable[1] /*node*/,COLOR_list___ListNode___prev))( variable[1] /*node*/) /*ListNode::prev*/; - ((list___ListNode___prev__eq_t)CALL(variable[3],COLOR_list___ListNode___prev__eq))(variable[3], variable[4]) /*ListNode::prev=*/; - } - } - return_label30: while(false); - tracehead = trace.prev; +val_t list___List___get_node(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_list; + fra.me.line = 187; + fra.me.meth = LOCATE_list___List___get_node; + 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//list.nit:190 */ + fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]); + /* ./../lib/standard//collection//list.nit:191 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:212 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)UNTAG_Int(REGB1)); + } else { + /* ./../lib/standard//collection//list.nit:194 */ + REGB2 = TAG_Bool(false); + REGB1 = REGB2; + } + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//collection//list.nit:195 */ + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 195); + } + fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[0] = fra.me.REG[2]; + /* ./../lib/standard//collection//list.nit:196 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//list.nit:196 */ + REGB0 = REGB1; + } else { + /* ./../lib/standard//collection//list.nit:194 */ + goto label2; + } + } + label2: while(0); + /* ./../lib/standard//collection//list.nit:198 */ + fra.me.REG[1] = fra.me.REG[0]; + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[1]; +} +val_t list___List___search_node_after(val_t p0, val_t p1, val_t p2){ + 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_list; + fra.me.line = 201; + fra.me.meth = LOCATE_list___List___search_node_after; + 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; + fra.me.REG[2] = p2; + /* ./../lib/standard//collection//list.nit:205 */ + while(1) { + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + REGB0 = REGB1; + } + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 205); + } + fra.me.REG[0] = CALL_abstract_collection___Container___item(fra.me.REG[2])(fra.me.REG[2]); + REGB0 = TAG_Bool(IS_EQUAL_NN(fra.me.REG[0],fra.me.REG[1])); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + REGB0 = REGB1; + } + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + } else { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 205); + } + fra.me.REG[0] = CALL_list___ListNode___next(fra.me.REG[2])(fra.me.REG[2]); + fra.me.REG[2] = fra.me.REG[0]; + } else { + goto label1; + } + } + label1: while(0); + /* ./../lib/standard//collection//list.nit:206 */ + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[2]; +} +void list___List___remove_node(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_list; + fra.me.line = 209; + fra.me.meth = LOCATE_list___List___remove_node; + 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//list.nit:212 */ + fra.me.REG[2] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + REGB0 = REGB1; + } + } + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//list.nit:213 */ + fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]); + ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[2]; + /* ./../lib/standard//collection//list.nit:214 */ + fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + REGB0 = REGB1; + } + } + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//list.nit:215 */ + ATTR_list___List____tail(fra.me.REG[0]) = NIT_NULL; + } else { + /* ./../lib/standard//collection//list.nit:217 */ + fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 217); + } + CALL_list___ListNode___prev__eq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + } + } else { + /* ./../lib/standard//collection//list.nit:219 */ + fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + REGB0 = REGB1; + } + } + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//list.nit:220 */ + fra.me.REG[2] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]); + ATTR_list___List____tail(fra.me.REG[0]) = fra.me.REG[2]; + /* ./../lib/standard//collection//list.nit:221 */ + fra.me.REG[2] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 221); + } + CALL_list___ListNode___next__eq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); + } else { + /* ./../lib/standard//collection//list.nit:223 */ + fra.me.REG[2] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]); + REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 223); + } + CALL_list___ListNode___next__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]); + /* ./../lib/standard//collection//list.nit:224 */ + fra.me.REG[0] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[1] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 224); + } + CALL_list___ListNode___prev__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + } + } + stack_frame_head = fra.me.prev; + return; +} +void list___List___insert_before(val_t p0, val_t p1, val_t p2){ + struct {struct stack_frame_t me; val_t MORE_REG[3];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_list; + fra.me.line = 228; + fra.me.meth = LOCATE_list___List___insert_before; + fra.me.has_broke = 0; + fra.me.REG_size = 4; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[2] = NIT_NULL; + fra.me.REG[3] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + fra.me.REG[2] = p2; + /* ./../lib/standard//collection//list.nit:230 */ + fra.me.REG[1] = NEW_ListNode_list___ListNode___init(fra.me.REG[1]); + /* ./../lib/standard//collection//list.nit:231 */ + fra.me.REG[3] = CALL_list___ListNode___prev(fra.me.REG[2])(fra.me.REG[2]); + /* ./../lib/standard//collection//list.nit:232 */ + REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], NIT_NULL); + REGB0 = REGB1; + } + } + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//collection//list.nit:233 */ + ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[1]; + } else { + /* ./../lib/standard//collection//list.nit:235 */ + REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 235); + } + CALL_list___ListNode___next__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]); + } + /* ./../lib/standard//collection//list.nit:237 */ + CALL_list___ListNode___prev__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]); + /* ./../lib/standard//collection//list.nit:238 */ + CALL_list___ListNode___next__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); + /* ./../lib/standard//collection//list.nit:239 */ + CALL_list___ListNode___prev__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); + stack_frame_head = fra.me.prev; + return; +} +val_t list___ListIterator___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_list; + fra.me.line = 246; + fra.me.meth = LOCATE_list___ListIterator___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//list.nit:246 */ + fra.me.REG[0] = ATTR_list___ListIterator____node(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 246); + } + fra.me.REG[0] = CALL_abstract_collection___Container___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 list___ListIterator___item__eq(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_list; + fra.me.line = 248; + fra.me.meth = LOCATE_list___ListIterator___item__eq; + 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//list.nit:248 */ + fra.me.REG[0] = ATTR_list___ListIterator____node(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 248); + } + CALL_abstract_collection___Container___item__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + stack_frame_head = fra.me.prev; return; } -void list___List___insert_before(val_t self, val_t param0, val_t param1) { - struct trace_t trace = {NULL, NULL, 228, LOCATE_list___List___insert_before}; - val_t variable[7]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[2] = param1; - variable[5] = NEW_ListNode_list___ListNode___init( variable[1] /*element*/); /*new ListNode[E]*/ - variable[4] = variable[5]; - variable[6] = ((list___ListNode___prev_t)CALL( variable[2] /*node*/,COLOR_list___ListNode___prev))( variable[2] /*node*/) /*ListNode::prev*/; - variable[5] = variable[6]; - variable[6] = TAG_Bool(( variable[5] /*prev*/ == NIT_NULL /*null*/) || (( variable[5] /*prev*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable[5] /*prev*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*prev*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable[5] /*prev*/,COLOR_kernel___Object_____eqeq))( variable[5] /*prev*/, NIT_NULL /*null*/) /*Object::==*/))))); - if (UNTAG_Bool(variable[6])) { /*if*/ - variable[6] = variable[0]; - ATTR_list___List____head(variable[6]) /*List::_head*/ = variable[4] /*nnode*/; - } else { /*if*/ - ((list___ListNode___next__eq_t)CALL( variable[5] /*prev*/,COLOR_list___ListNode___next__eq))( variable[5] /*prev*/, variable[4] /*nnode*/) /*ListNode::next=*/; - } - ((list___ListNode___prev__eq_t)CALL( variable[4] /*nnode*/,COLOR_list___ListNode___prev__eq))( variable[4] /*nnode*/, variable[5] /*prev*/) /*ListNode::prev=*/; - ((list___ListNode___next__eq_t)CALL( variable[4] /*nnode*/,COLOR_list___ListNode___next__eq))( variable[4] /*nnode*/, variable[2] /*node*/) /*ListNode::next=*/; - ((list___ListNode___prev__eq_t)CALL( variable[2] /*node*/,COLOR_list___ListNode___prev__eq))( variable[2] /*node*/, variable[4] /*nnode*/) /*ListNode::prev=*/; - return_label31: while(false); - tracehead = trace.prev; +val_t list___ListIterator___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_list; + fra.me.line = 250; + fra.me.meth = LOCATE_list___ListIterator___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//list.nit:250 */ + fra.me.REG[0] = ATTR_list___ListIterator____node(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL); + REGB0 = REGB1; + } + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB0; +} +void list___ListIterator___next(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_list; + fra.me.line = 252; + fra.me.meth = LOCATE_list___ListIterator___next; + 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//list.nit:254 */ + fra.me.REG[1] = ATTR_list___ListIterator____node(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + nit_abort("Reciever is null", NULL, LOCATE_list, 254); + } + fra.me.REG[1] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]); + ATTR_list___ListIterator____node(fra.me.REG[0]) = fra.me.REG[1]; + /* ./../lib/standard//collection//list.nit:255 */ + REGB0 = ATTR_list___ListIterator____index(fra.me.REG[0]); + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); + /* ./../lib/standard//collection//list.nit:255 */ + ATTR_list___ListIterator____index(fra.me.REG[0]) = REGB1; + stack_frame_head = fra.me.prev; return; } -val_t list___ListIterator___item(val_t self) { - struct trace_t trace = {NULL, NULL, 246, LOCATE_list___ListIterator___item}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_list___ListIterator____node(variable[2]) /*ListIterator::_node*/; - variable[2] = ((abstract_collection___Container___item_t)CALL(variable[2],COLOR_abstract_collection___Container___item))(variable[2]) /*Container::item*/; - variable[1] = variable[2]; - goto return_label32; - return_label32: while(false); - tracehead = trace.prev; - return variable[1]; -} -void list___ListIterator___next(val_t self) { - struct trace_t trace = {NULL, NULL, 252, LOCATE_list___ListIterator___next}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[2] = variable[0]; - variable[3] = variable[0]; - variable[3] = ATTR_list___ListIterator____node(variable[3]) /*ListIterator::_node*/; - variable[3] = ((list___ListNode___next_t)CALL(variable[3],COLOR_list___ListNode___next))(variable[3]) /*ListNode::next*/; - ATTR_list___ListIterator____node(variable[2]) /*ListIterator::_node*/ = variable[3]; - variable[2] = variable[0]; - ATTR_list___ListIterator____index(variable[2]) /*ListIterator::_index*/ = TAG_Int(UNTAG_Int(ATTR_list___ListIterator____index(variable[2]) /*ListIterator::_index*/)+UNTAG_Int( TAG_Int(1))); - return_label33: while(false); - tracehead = trace.prev; +void list___ListIterator___init(val_t p0, val_t p1, int* init_table){ + int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_ListIterator].i; + struct {struct stack_frame_t me; val_t MORE_REG[1];} 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_list; + fra.me.line = 258; + fra.me.meth = LOCATE_list___ListIterator___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//list.nit:261 */ + ATTR_list___ListIterator____list(fra.me.REG[0]) = fra.me.REG[1]; + /* ./../lib/standard//collection//list.nit:262 */ + fra.me.REG[1] = ATTR_list___List____head(fra.me.REG[1]); + ATTR_list___ListIterator____node(fra.me.REG[0]) = fra.me.REG[1]; + /* ./../lib/standard//collection//list.nit:263 */ + REGB0 = TAG_Int(0); + ATTR_list___ListIterator____index(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos2] = 1; return; } -val_t list___ListIterator___is_ok(val_t self) { - struct trace_t trace = {NULL, NULL, 250, LOCATE_list___ListIterator___is_ok}; - val_t variable[3]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_list___ListIterator____node(variable[2]) /*ListIterator::_node*/; - variable[2] = TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[2],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[2], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[2],COLOR_kernel___Object_____eqeq))(variable[2], NIT_NULL /*null*/) /*Object::==*/))))); - variable[1] = TAG_Bool(!UNTAG_Bool(variable[2])); - goto return_label34; - return_label34: while(false); - tracehead = trace.prev; - return variable[1]; -} -void list___ListIterator___item__eq(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 248, LOCATE_list___ListIterator___item__eq}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_list___ListIterator____node(variable[3]) /*ListIterator::_node*/; - ((abstract_collection___Container___item__eq_t)CALL(variable[3],COLOR_abstract_collection___Container___item__eq))(variable[3], variable[1] /*e*/) /*Container::item=*/; - return_label35: while(false); - tracehead = trace.prev; +val_t list___ListIterator___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_list; + fra.me.line = 272; + fra.me.meth = LOCATE_list___ListIterator___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//list.nit:272 */ + REGB0 = TAG_Bool(ATTR_list___ListIterator____index(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_index", LOCATE_list, 272); + } + REGB0 = ATTR_list___ListIterator____index(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return REGB0; +} +void list___ListIterator___delete(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_list; + fra.me.line = 275; + fra.me.meth = LOCATE_list___ListIterator___delete; + 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//list.nit:278 */ + REGB0 = TAG_Bool(ATTR_list___ListIterator____list(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_list", LOCATE_list, 278); + } + fra.me.REG[1] = ATTR_list___ListIterator____list(fra.me.REG[0]); + fra.me.REG[0] = ATTR_list___ListIterator____node(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Cast failed", NULL, LOCATE_list, 278); + } + CALL_list___List___remove_node(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + stack_frame_head = fra.me.prev; return; } -val_t list___ListIterator___index(val_t self) { - struct trace_t trace = {NULL, NULL, 268, LOCATE_list___ListIterator___index}; - val_t *variable = NULL; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - tracehead = trace.prev; - return ATTR_list___ListIterator____index( self) /*ListIterator::_index*/; -} -void list___ListIterator___init(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, NULL, 258, LOCATE_list___ListIterator___init}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_ListIterator].i]) return; - variable[3] = variable[0]; - ATTR_list___ListIterator____node(variable[3]) /*ListIterator::_node*/ = variable[1] /*node*/; - variable[3] = variable[0]; - ATTR_list___ListIterator____index(variable[3]) /*ListIterator::_index*/ = TAG_Int(0); - return_label36: while(false); - init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_ListIterator].i] = 1; - tracehead = trace.prev; +void list___ListIterator___insert_before(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_list; + fra.me.line = 281; + fra.me.meth = LOCATE_list___ListIterator___insert_before; + 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//list.nit:284 */ + REGB0 = TAG_Bool(ATTR_list___ListIterator____list(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_list", LOCATE_list, 284); + } + fra.me.REG[2] = ATTR_list___ListIterator____list(fra.me.REG[0]); + fra.me.REG[0] = ATTR_list___ListIterator____node(fra.me.REG[0]); + REGB0 = TAG_Bool(fra.me.REG[0]!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Cast failed", NULL, LOCATE_list, 284); + } + CALL_list___List___insert_before(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1], fra.me.REG[0]); + stack_frame_head = fra.me.prev; return; } -void list___ListNode___init(val_t self, val_t param0, int* init_table) { - struct trace_t trace = {NULL, NULL, 275, LOCATE_list___ListNode___init}; - val_t variable[4]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - variable[0] = self; - variable[1] = param0; - if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_ListNode].i]) return; - ((abstract_collection___Container___init_t)CALL(variable[0],COLOR_abstract_collection___Container___init))(variable[0], variable[1], init_table /*YYY*/) /*Container::init*/; - variable[3] = variable[0]; - ((abstract_collection___Container___item__eq_t)CALL(variable[3],COLOR_abstract_collection___Container___item__eq))(variable[3], variable[1] /*i*/) /*Container::item=*/; - return_label37: while(false); - init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_ListNode].i] = 1; - tracehead = trace.prev; +void list___ListNode___init(val_t p0, val_t p1, int* init_table){ + int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_ListNode].i; + struct {struct stack_frame_t me; val_t MORE_REG[3];} fra; + val_t tmp; + if (init_table[itpos3]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_list; + fra.me.line = 291; + fra.me.meth = LOCATE_list___ListNode___init; + 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//list.nit:291 */ + fra.me.REG[2] = fra.me.REG[0]; + fra.me.REG[3] = fra.me.REG[1]; + CALL_abstract_collection___Container___init(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], init_table); + /* ./../lib/standard//collection//list.nit:293 */ + CALL_abstract_collection___Container___item__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]); + stack_frame_head = fra.me.prev; + init_table[itpos3] = 1; return; } -val_t list___ListNode___next(val_t self) { - struct trace_t trace = {NULL, NULL, 280, LOCATE_list___ListNode___next}; - val_t *variable = NULL; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - tracehead = trace.prev; - return ATTR_list___ListNode____next( self) /*ListNode::_next*/; -} -void list___ListNode___next__eq(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 280, LOCATE_list___ListNode___next__eq}; - val_t *variable = NULL; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - ATTR_list___ListNode____next( self) /*ListNode::_next*/ = param0; - tracehead = trace.prev; +val_t list___ListNode___next(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_list; + fra.me.line = 296; + fra.me.meth = LOCATE_list___ListNode___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//list.nit:296 */ + fra.me.REG[0] = ATTR_list___ListNode____next(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +void list___ListNode___next__eq(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_list; + fra.me.line = 296; + fra.me.meth = LOCATE_list___ListNode___next__eq; + 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//list.nit:296 */ + ATTR_list___ListNode____next(fra.me.REG[0]) = fra.me.REG[1]; + stack_frame_head = fra.me.prev; return; } -val_t list___ListNode___prev(val_t self) { - struct trace_t trace = {NULL, NULL, 283, LOCATE_list___ListNode___prev}; - val_t *variable = NULL; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - tracehead = trace.prev; - return ATTR_list___ListNode____prev( self) /*ListNode::_prev*/; -} -void list___ListNode___prev__eq(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 283, LOCATE_list___ListNode___prev__eq}; - val_t *variable = NULL; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_list; - ATTR_list___ListNode____prev( self) /*ListNode::_prev*/ = param0; - tracehead = trace.prev; +val_t list___ListNode___prev(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_list; + fra.me.line = 299; + fra.me.meth = LOCATE_list___ListNode___prev; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./../lib/standard//collection//list.nit:299 */ + fra.me.REG[0] = ATTR_list___ListNode____prev(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +void list___ListNode___prev__eq(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_list; + fra.me.line = 299; + fra.me.meth = LOCATE_list___ListNode___prev__eq; + 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//list.nit:299 */ + ATTR_list___ListNode____prev(fra.me.REG[0]) = fra.me.REG[1]; + stack_frame_head = fra.me.prev; return; }