c_src: update
[nit.git] / c_src / list._sep.c
index b309803..60c4d98 100644 (file)
 /* This C file is generated by NIT to compile module list. */
 #include "list._sep.h"
-val_t list___List___iterator(val_t p0){
+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 = 173;
-  fra.me.meth = LOCATE_list___List___iterator;
+  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;
-  fra.me.REG[0] = NEW_ListIterator_list___ListIterator___init(fra.me.REG[0]);
-  /* ./../lib/standard//collection//list.nit:173 */
+  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;
+}
+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___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___is_empty(val_t p0){
   struct {struct stack_frame_t me;} fra;
   val_t REGB0;
@@ -31,9 +159,9 @@ val_t list___List___is_empty(val_t p0){
   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);
-  /* ./../lib/standard//collection//list.nit:41 */
   if (UNTAG_Bool(REGB0)) {
   } else {
     REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
@@ -65,7 +193,9 @@ val_t list___List___length(val_t p0){
   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) {
@@ -83,15 +213,16 @@ val_t list___List___length(val_t p0){
     }
     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;
-      REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
       /* ./../lib/standard//collection//list.nit:50 */
+      REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
       if (UNTAG_Bool(REGB1)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 50);
-        nit_exit(1);
+        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];
@@ -123,10 +254,10 @@ val_t list___List___has(val_t p0, val_t p1){
   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);
-  /* ./../lib/standard//collection//list.nit:56 */
   if (UNTAG_Bool(REGB0)) {
   } else {
     REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
@@ -160,6 +291,7 @@ val_t list___List___has_only(val_t p0, val_t p1){
   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) {
@@ -177,12 +309,10 @@ val_t list___List___has_only(val_t p0, val_t p1){
     }
     REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
     if (UNTAG_Bool(REGB0)) {
-      REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
       /* ./../lib/standard//collection//list.nit:62 */
+      REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
       if (UNTAG_Bool(REGB0)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 62);
-        nit_exit(1);
+        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]));
@@ -202,12 +332,10 @@ val_t list___List___has_only(val_t p0, val_t p1){
         REGB0 = TAG_Bool(false);
         goto label1;
       }
-      REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
       /* ./../lib/standard//collection//list.nit:63 */
+      REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
       if (UNTAG_Bool(REGB1)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 63);
-        nit_exit(1);
+        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];
@@ -217,9 +345,9 @@ val_t list___List___has_only(val_t p0, val_t p1){
     }
   }
   label2: while(0);
+  /* ./../lib/standard//collection//list.nit:65 */
   REGB1 = TAG_Bool(true);
   REGB0 = REGB1;
-  /* ./../lib/standard//collection//list.nit:65 */
   goto label1;
   label1: while(0);
   stack_frame_head = fra.me.prev;
@@ -242,7 +370,9 @@ val_t list___List___count(val_t p0, val_t p1){
   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) {
@@ -260,12 +390,10 @@ val_t list___List___count(val_t p0, val_t p1){
     }
     REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
     if (UNTAG_Bool(REGB1)) {
-      REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
       /* ./../lib/standard//collection//list.nit:73 */
+      REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
       if (UNTAG_Bool(REGB1)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 73);
-        nit_exit(1);
+        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]));
@@ -283,16 +411,15 @@ val_t list___List___count(val_t p0, val_t p1){
       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:73 */
       }
-      REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
       /* ./../lib/standard//collection//list.nit:74 */
+      REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
       if (UNTAG_Bool(REGB1)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 74);
-        nit_exit(1);
+        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];
@@ -308,59 +435,6 @@ val_t list___List___count(val_t p0, val_t p1){
   stack_frame_head = fra.me.prev;
   return REGB0;
 }
-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;
-  fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]);
-  REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
-  /* ./../lib/standard//collection//list.nit:27 */
-  if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 27);
-    nit_exit(1);
-  }
-  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];
-}
-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;
-  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);
-  /* ./../lib/standard//collection//list.nit:22 */
-  if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 22);
-    nit_exit(1);
-  }
-  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];
-}
 val_t list___List___has_key(val_t p0, val_t p1){
   struct {struct stack_frame_t me;} fra;
   val_t REGB0;
@@ -375,9 +449,9 @@ val_t list___List___has_key(val_t p0, val_t p1){
   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);
-  /* ./../lib/standard//collection//list.nit:79 */
   if (UNTAG_Bool(REGB0)) {
   } else {
     REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
@@ -395,59 +469,15 @@ val_t list___List___has_key(val_t p0, val_t p1){
   stack_frame_head = fra.me.prev;
   return REGB0;
 }
-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;
-  fra.me.REG[0] = ATTR_list___List____tail(fra.me.REG[0]);
-  REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
-  /* ./../lib/standard//collection//list.nit:33 */
-  if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 33);
-    nit_exit(1);
-  }
-  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___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___remove(val_t p0, val_t p1){
+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 = 154;
-  fra.me.meth = LOCATE_list___List___remove;
+  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;
@@ -455,10 +485,11 @@ void list___List___remove(val_t p0, val_t p1){
   fra.me.REG[2] = NIT_NULL;
   fra.me.REG[0] = p0;
   fra.me.REG[1] = p1;
-  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: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);
-  /* ./../lib/standard//collection//list.nit:157 */
   if (UNTAG_Bool(REGB0)) {
   } else {
     REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
@@ -470,148 +501,98 @@ void list___List___remove(val_t p0, val_t p1){
       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;
-}
-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;
-  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);
-  /* ./../lib/standard//collection//list.nit:24 */
-  if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 24);
-    nit_exit(1);
+    /* ./../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]);
   }
-  CALL_abstract_collection___Container___item__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+  /* ./../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___remove_at(val_t p0, val_t p1){
-  struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+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 = 160;
-  fra.me.meth = LOCATE_list___List___remove_at;
+  fra.me.line = 96;
+  fra.me.meth = LOCATE_list___List___unshift;
   fra.me.has_broke = 0;
-  fra.me.REG_size = 2;
+  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;
-  fra.me.REG[1] = CALL_list___List___get_node(fra.me.REG[0])(fra.me.REG[0], REGB0);
-  REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
-  /* ./../lib/standard//collection//list.nit:163 */
+  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[1]==NIT_NULL);
+    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[1])(fra.me.REG[1], NIT_NULL);
+      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[1]);
-  }
-  stack_frame_head = fra.me.prev;
-  return;
-}
-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;
-  fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]);
-  REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
-  /* ./../lib/standard//collection//list.nit:30 */
-  if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 30);
-    nit_exit(1);
-  }
-  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___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;
-  fra.me.REG[0] = ATTR_list___List____tail(fra.me.REG[0]);
-  REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
-  /* ./../lib/standard//collection//list.nit:36 */
   if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 36);
-    nit_exit(1);
+    /* ./../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]);
   }
-  CALL_abstract_collection___Container___item__eq(fra.me.REG[0])(fra.me.REG[0], 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;
 }
-void list___List___push(val_t p0, val_t p1){
-  struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+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 = 83;
-  fra.me.meth = LOCATE_list___List___push;
+  fra.me.line = 109;
+  fra.me.meth = LOCATE_list___List___link;
   fra.me.has_broke = 0;
-  fra.me.REG_size = 3;
+  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[1] = NEW_ListNode_list___ListNode___init(fra.me.REG[1]);
+  /* ./../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);
-  /* ./../lib/standard//collection//list.nit:87 */
   if (UNTAG_Bool(REGB0)) {
   } else {
     REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
@@ -624,24 +605,54 @@ void list___List___push(val_t p0, val_t p1){
     }
   }
   if (UNTAG_Bool(REGB0)) {
-    /* ./../lib/standard//collection//list.nit:88 */
-    ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[1];
+    /* ./../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 {
-    fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]);
+    /* ./../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);
-    /* ./../lib/standard//collection//list.nit:90 */
     if (UNTAG_Bool(REGB0)) {
-      fprintf(stderr, "Reciever is null");
-      fprintf(stderr, " (%s:%d)\n", LOCATE_list, 90);
-      nit_exit(1);
+    } 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]);
     }
-    CALL_list___ListNode___next__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
-    fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[0]);
-    /* ./../lib/standard//collection//list.nit:91 */
-    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];
+  /* ./../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;
 }
@@ -660,27 +671,24 @@ val_t list___List___pop(val_t p0){
   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]);
-  REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
   /* ./../lib/standard//collection//list.nit:130 */
+  REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
   if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 130);
-    nit_exit(1);
+    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];
-  REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
   /* ./../lib/standard//collection//list.nit:131 */
+  REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
   if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 131);
-    nit_exit(1);
+    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);
-  /* ./../lib/standard//collection//list.nit:132 */
   if (UNTAG_Bool(REGB0)) {
   } else {
     REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
@@ -696,22 +704,18 @@ val_t list___List___pop(val_t p0){
     /* ./../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);
-    /* ./../lib/standard//collection//list.nit:135 */
     if (UNTAG_Bool(REGB0)) {
-      fprintf(stderr, "Reciever is null");
-      fprintf(stderr, " (%s:%d)\n", LOCATE_list, 135);
-      nit_exit(1);
+      nit_abort("Reciever is null", NULL, LOCATE_list, 135);
     }
     CALL_list___ListNode___next__eq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
   }
-  REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
   /* ./../lib/standard//collection//list.nit:137 */
+  REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
   if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 137);
-    nit_exit(1);
+    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;
@@ -719,26 +723,39 @@ val_t list___List___pop(val_t p0){
   stack_frame_head = fra.me.prev;
   return fra.me.REG[1];
 }
-void list___List___unshift(val_t p0, val_t p1){
+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 = 96;
-  fra.me.meth = LOCATE_list___List___unshift;
+  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;
-  fra.me.REG[1] = p1;
-  fra.me.REG[1] = NEW_ListNode_list___ListNode___init(fra.me.REG[1]);
+  /* ./../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);
-  /* ./../lib/standard//collection//list.nit:100 */
   if (UNTAG_Bool(REGB0)) {
   } else {
     REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
@@ -751,190 +768,140 @@ void list___List___unshift(val_t p0, val_t p1){
     }
   }
   if (UNTAG_Bool(REGB0)) {
-    /* ./../lib/standard//collection//list.nit:101 */
-    ATTR_list___List____tail(fra.me.REG[0]) = fra.me.REG[1];
+    /* ./../lib/standard//collection//list.nit:147 */
+    ATTR_list___List____tail(fra.me.REG[0]) = NIT_NULL;
   } else {
-    fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]);
-    /* ./../lib/standard//collection//list.nit:103 */
-    CALL_list___ListNode___next__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
-    fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[0]);
-    REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
-    /* ./../lib/standard//collection//list.nit:104 */
+    /* ./../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)) {
-      fprintf(stderr, "Reciever is null");
-      fprintf(stderr, " (%s:%d)\n", LOCATE_list, 104);
-      nit_exit(1);
+      nit_abort("Reciever is null", NULL, LOCATE_list, 149);
     }
-    CALL_list___ListNode___prev__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+    CALL_list___ListNode___prev__eq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
   }
-  /* ./../lib/standard//collection//list.nit:106 */
-  ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[1];
+  /* ./../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;
+  return fra.me.REG[1];
 }
-val_t list___List___shift(val_t p0){
+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 = 140;
-  fra.me.meth = LOCATE_list___List___shift;
+  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] = ATTR_list___List____head(fra.me.REG[0]);
-  REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
-  /* ./../lib/standard//collection//list.nit:144 */
-  if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 144);
-    nit_exit(1);
-  }
-  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];
-  REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
-  /* ./../lib/standard//collection//list.nit:145 */
-  if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 145);
-    nit_exit(1);
-  }
-  CALL_list___ListNode___next__eq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
+  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);
-  /* ./../lib/standard//collection//list.nit:146 */
   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 {
-    fra.me.REG[0] = ATTR_list___List____head(fra.me.REG[0]);
-    REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
-    /* ./../lib/standard//collection//list.nit:149 */
-    if (UNTAG_Bool(REGB0)) {
-      fprintf(stderr, "Reciever is null");
-      fprintf(stderr, " (%s:%d)\n", LOCATE_list, 149);
-      nit_exit(1);
+      REGB1 = TAG_Bool(false);
+      REGB0 = REGB1;
+    } else {
+      REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
+      REGB0 = REGB1;
     }
-    CALL_list___ListNode___prev__eq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
   }
-  REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
-  /* ./../lib/standard//collection//list.nit:151 */
+  REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
   if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 151);
-    nit_exit(1);
+    CALL_list___List___remove_node(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
   }
-  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];
+  return;
 }
-void list___List___link(val_t p0, val_t p1){
-  struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+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 = 109;
-  fra.me.meth = LOCATE_list___List___link;
+  fra.me.line = 160;
+  fra.me.meth = LOCATE_list___List___remove_at;
   fra.me.has_broke = 0;
-  fra.me.REG_size = 4;
+  fra.me.REG_size = 2;
   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] = ATTR_list___List____tail(fra.me.REG[0]);
-  REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
-  /* ./../lib/standard//collection//list.nit:114 */
+  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[2]==NIT_NULL);
+    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[2])(fra.me.REG[2], NIT_NULL);
+      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)) {
-    fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[1]);
-    /* ./../lib/standard//collection//list.nit:115 */
-    ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[2];
-  } else {
-    fra.me.REG[2] = ATTR_list___List____head(fra.me.REG[1]);
-    REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
-    /* ./../lib/standard//collection//list.nit:116 */
-    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)) {
-      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);
-      /* ./../lib/standard//collection//list.nit:117 */
-      if (UNTAG_Bool(REGB0)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 117);
-        nit_exit(1);
-      }
-      CALL_list___ListNode___next__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
-      fra.me.REG[3] = ATTR_list___List____tail(fra.me.REG[0]);
-      REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
-      /* ./../lib/standard//collection//list.nit:118 */
-      if (UNTAG_Bool(REGB0)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 118);
-        nit_exit(1);
-      }
-      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)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 118);
-        nit_exit(1);
-      }
-      CALL_list___ListNode___prev__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
-    }
+    CALL_list___List___remove_node(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
   }
-  fra.me.REG[2] = ATTR_list___List____tail(fra.me.REG[1]);
-  /* ./../lib/standard//collection//list.nit:120 */
-  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___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;
+}
+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;
@@ -948,7 +915,6 @@ void list___List___init(val_t p0, int* init_table){
   fra.me.REG_size = 1;
   fra.me.REG[0] = NIT_NULL;
   fra.me.REG[0] = p0;
-  /* ./../lib/standard//collection//list.nit:175 */
   stack_frame_head = fra.me.prev;
   init_table[itpos0] = 1;
   return;
@@ -991,13 +957,16 @@ val_t list___List___get_node(val_t p0, val_t p1){
   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));
   /* ./../lib/standard//collection//list.nit:191 */
   if (UNTAG_Bool(REGB1)) {
-    fra.me.REG[1] = NIT_NULL;
     /* ./../lib/standard//collection//list.nit:192 */
+    fra.me.REG[1] = NIT_NULL;
     goto label1;
   }
   /* ./../lib/standard//collection//list.nit:194 */
@@ -1017,34 +986,35 @@ val_t list___List___get_node(val_t p0, val_t p1){
     REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
     if (UNTAG_Bool(REGB1)) {
       REGB1 = TAG_Int(0);
+      /* ./../lib/standard//kernel.nit:214 */
       REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
-    /* ./../lib/standard//collection//list.nit:194 */
     } else {
+      /* ./../lib/standard//collection//list.nit:194 */
       REGB2 = TAG_Bool(false);
       REGB1 = REGB2;
     }
     if (UNTAG_Bool(REGB1)) {
-      REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
       /* ./../lib/standard//collection//list.nit:195 */
+      REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
       if (UNTAG_Bool(REGB1)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 195);
-        nit_exit(1);
+        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;
-    /* ./../lib/standard//collection//list.nit:196 */
     } else {
       /* ./../lib/standard//collection//list.nit:194 */
       goto label2;
     }
   }
   label2: while(0);
-  fra.me.REG[1] = fra.me.REG[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;
@@ -1085,9 +1055,7 @@ val_t list___List___search_node_after(val_t p0, val_t p1, val_t p2){
     if (UNTAG_Bool(REGB0)) {
       REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
       if (UNTAG_Bool(REGB0)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 205);
-        nit_exit(1);
+        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]));
@@ -1110,9 +1078,7 @@ val_t list___List___search_node_after(val_t p0, val_t p1, val_t p2){
     if (UNTAG_Bool(REGB0)) {
       REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
       if (UNTAG_Bool(REGB0)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 205);
-        nit_exit(1);
+        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];
@@ -1143,9 +1109,9 @@ void list___List___remove_node(val_t p0, val_t p1){
   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);
-  /* ./../lib/standard//collection//list.nit:212 */
   if (UNTAG_Bool(REGB0)) {
   } else {
     REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
@@ -1158,12 +1124,12 @@ void list___List___remove_node(val_t p0, val_t p1){
     }
   }
   if (UNTAG_Bool(REGB0)) {
-    fra.me.REG[2] = CALL_list___ListNode___next(fra.me.REG[1])(fra.me.REG[1]);
     /* ./../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);
-    /* ./../lib/standard//collection//list.nit:214 */
     if (UNTAG_Bool(REGB0)) {
     } else {
       REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
@@ -1179,20 +1145,18 @@ void list___List___remove_node(val_t p0, val_t p1){
       /* ./../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);
-      /* ./../lib/standard//collection//list.nit:217 */
       if (UNTAG_Bool(REGB0)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 217);
-        nit_exit(1);
+        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);
-    /* ./../lib/standard//collection//list.nit:219 */
     if (UNTAG_Bool(REGB0)) {
     } else {
       REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
@@ -1205,37 +1169,31 @@ void list___List___remove_node(val_t p0, val_t p1){
       }
     }
     if (UNTAG_Bool(REGB0)) {
-      fra.me.REG[2] = CALL_list___ListNode___prev(fra.me.REG[1])(fra.me.REG[1]);
       /* ./../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);
-      /* ./../lib/standard//collection//list.nit:221 */
       if (UNTAG_Bool(REGB0)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 221);
-        nit_exit(1);
+        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);
-      /* ./../lib/standard//collection//list.nit:223 */
       if (UNTAG_Bool(REGB0)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 223);
-        nit_exit(1);
+        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);
-      /* ./../lib/standard//collection//list.nit:224 */
       if (UNTAG_Bool(REGB0)) {
-        fprintf(stderr, "Reciever is null");
-        fprintf(stderr, " (%s:%d)\n", LOCATE_list, 224);
-        nit_exit(1);
+        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]);
     }
@@ -1261,10 +1219,12 @@ void list___List___insert_before(val_t p0, val_t p1, val_t p2){
   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]);
-  REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
   /* ./../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);
@@ -1280,12 +1240,10 @@ void list___List___insert_before(val_t p0, val_t p1, val_t p2){
     /* ./../lib/standard//collection//list.nit:233 */
     ATTR_list___List____head(fra.me.REG[0]) = fra.me.REG[1];
   } else {
-    REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
     /* ./../lib/standard//collection//list.nit:235 */
+    REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
     if (UNTAG_Bool(REGB0)) {
-      fprintf(stderr, "Reciever is null");
-      fprintf(stderr, " (%s:%d)\n", LOCATE_list, 235);
-      nit_exit(1);
+      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]);
   }
@@ -1310,13 +1268,11 @@ val_t list___ListIterator___item(val_t p0){
   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);
-  /* ./../lib/standard//collection//list.nit:246 */
   if (UNTAG_Bool(REGB0)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 246);
-    nit_exit(1);
+    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;
@@ -1324,35 +1280,27 @@ val_t list___ListIterator___item(val_t p0){
   stack_frame_head = fra.me.prev;
   return fra.me.REG[0];
 }
-void list___ListIterator___next(val_t p0){
+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 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.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] = ATTR_list___ListIterator____node(fra.me.REG[0]);
-  REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
-  /* ./../lib/standard//collection//list.nit:254 */
+  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)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 254);
-    nit_exit(1);
+    nit_abort("Reciever is null", NULL, LOCATE_list, 248);
   }
-  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];
-  REGB0 = ATTR_list___ListIterator____index(fra.me.REG[0]);
-  REGB1 = TAG_Int(1);
-  REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
-  /* ./../lib/standard//collection//list.nit:255 */
-  ATTR_list___ListIterator____index(fra.me.REG[0]) = REGB1;
+  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;
 }
@@ -1369,9 +1317,9 @@ val_t list___ListIterator___is_ok(val_t p0){
   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);
-  /* ./../lib/standard//collection//list.nit:250 */
   if (UNTAG_Bool(REGB0)) {
   } else {
     REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
@@ -1389,53 +1337,35 @@ val_t list___ListIterator___is_ok(val_t p0){
   stack_frame_head = fra.me.prev;
   return REGB0;
 }
-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;
-  REGB0 = TAG_Bool(ATTR_list___ListIterator____index(fra.me.REG[0])!=NIT_NULL);
-  /* ./../lib/standard//collection//list.nit:272 */
-  if (UNTAG_Bool(REGB0)) {
-  } else {
-    fprintf(stderr, "Uninitialized attribute %s", "_index");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 272);
-    nit_exit(1);
-  }
-  REGB0 = ATTR_list___ListIterator____index(fra.me.REG[0]);
-  stack_frame_head = fra.me.prev;
-  return REGB0;
-}
-void list___ListIterator___item__eq(val_t p0, val_t p1){
+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 = 248;
-  fra.me.meth = LOCATE_list___ListIterator___item__eq;
+  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;
-  fra.me.REG[1] = p1;
-  fra.me.REG[0] = ATTR_list___ListIterator____node(fra.me.REG[0]);
-  REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
-  /* ./../lib/standard//collection//list.nit:248 */
+  /* ./../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)) {
-    fprintf(stderr, "Reciever is null");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 248);
-    nit_exit(1);
+    nit_abort("Reciever is null", NULL, LOCATE_list, 254);
   }
-  CALL_abstract_collection___Container___item__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+  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;
 }
@@ -1457,16 +1387,38 @@ void list___ListIterator___init(val_t p0, val_t p1, int* init_table){
   fra.me.REG[1] = p1;
   /* ./../lib/standard//collection//list.nit:261 */
   ATTR_list___ListIterator____list(fra.me.REG[0]) = fra.me.REG[1];
-  fra.me.REG[1] = ATTR_list___List____head(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];
-  REGB0 = TAG_Int(0);
   /* ./../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___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;
@@ -1480,22 +1432,18 @@ void list___ListIterator___delete(val_t p0){
   fra.me.REG[0] = NIT_NULL;
   fra.me.REG[1] = NIT_NULL;
   fra.me.REG[0] = p0;
-  REGB0 = TAG_Bool(ATTR_list___ListIterator____list(fra.me.REG[0])!=NIT_NULL);
   /* ./../lib/standard//collection//list.nit:278 */
+  REGB0 = TAG_Bool(ATTR_list___ListIterator____list(fra.me.REG[0])!=NIT_NULL);
   if (UNTAG_Bool(REGB0)) {
   } else {
-    fprintf(stderr, "Uninitialized attribute %s", "_list");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 278);
-    nit_exit(1);
+    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 {
-    fprintf(stderr, "Cast failed");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 278);
-    nit_exit(1);
+    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;
@@ -1516,22 +1464,18 @@ void list___ListIterator___insert_before(val_t p0, val_t p1){
   fra.me.REG[2] = NIT_NULL;
   fra.me.REG[0] = p0;
   fra.me.REG[1] = p1;
-  REGB0 = TAG_Bool(ATTR_list___ListIterator____list(fra.me.REG[0])!=NIT_NULL);
   /* ./../lib/standard//collection//list.nit:284 */
+  REGB0 = TAG_Bool(ATTR_list___ListIterator____list(fra.me.REG[0])!=NIT_NULL);
   if (UNTAG_Bool(REGB0)) {
   } else {
-    fprintf(stderr, "Uninitialized attribute %s", "_list");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 284);
-    nit_exit(1);
+    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 {
-    fprintf(stderr, "Cast failed");
-    fprintf(stderr, " (%s:%d)\n", LOCATE_list, 284);
-    nit_exit(1);
+    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;
@@ -1554,9 +1498,9 @@ void list___ListNode___init(val_t p0, val_t p1, int* init_table){
   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];
-  /* ./../lib/standard//collection//list.nit:291 */
   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]);
@@ -1575,8 +1519,8 @@ val_t list___ListNode___next(val_t p0){
   fra.me.REG_size = 1;
   fra.me.REG[0] = NIT_NULL;
   fra.me.REG[0] = p0;
-  fra.me.REG[0] = ATTR_list___ListNode____next(fra.me.REG[0]);
   /* ./../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];
 }
@@ -1609,8 +1553,8 @@ val_t list___ListNode___prev(val_t p0){
   fra.me.REG_size = 1;
   fra.me.REG[0] = NIT_NULL;
   fra.me.REG[0] = p0;
-  fra.me.REG[0] = ATTR_list___ListNode____prev(fra.me.REG[0]);
   /* ./../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];
 }