c_src: update
[nit.git] / c_src / compiling._sep.c
index bf0ccab..aab5b33 100644 (file)
 /* This C file is generated by NIT to compile module compiling. */
 #include "compiling._sep.h"
-void compiling___MMSrcModule___compile_prog_to_c(val_t  self, val_t  param0) {
-  struct trace_t trace = {NULL, NULL, 26, LOCATE_compiling___MMSrcModule___compile_prog_to_c};
-  val_t variable[23];
-  void **closurevariable = NULL;
-  trace.prev = tracehead; tracehead = &trace;
-  trace.file = LOCATE_compiling;
-  variable[0] =  self;
-  variable[1] =  param0;
-  variable[3] = variable[0];
-  variable[3] = ((abstractmetamodel___MMModule___mhe_t)CALL(variable[3],COLOR_abstractmetamodel___MMModule___mhe))(variable[3]) /*MMModule::mhe*/;
-  variable[3] = ((partial_order___PartialOrderElement___greaters_and_self_t)CALL(variable[3],COLOR_partial_order___PartialOrderElement___greaters_and_self))(variable[3]) /*PartialOrderElement::greaters_and_self*/;
-  variable[3] = ((abstract_collection___Collection___iterator_t)CALL(variable[3],COLOR_abstract_collection___Collection___iterator))(variable[3]) /*Collection::iterator*/;
-  while (true) { /*for*/
-    variable[4] = ((abstract_collection___Iterator___is_ok_t)CALL(variable[3],COLOR_abstract_collection___Iterator___is_ok))(variable[3]) /*Iterator::is_ok*/;
-    if (!UNTAG_Bool(variable[4])) break; /*for*/
-    variable[4] = ((abstract_collection___Iterator___item_t)CALL(variable[3],COLOR_abstract_collection___Iterator___item))(variable[3]) /*Iterator::item*/;
-    variable[5] = variable[4];
-    variable[6] = TAG_Bool(( variable[5] /*m*/==NIT_NULL) || VAL_ISA( variable[5] /*m*/, COLOR_MMSrcModule, ID_MMSrcModule)) /*cast MMSrcModule*/;
-    if (!UNTAG_Bool(variable[6])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_compiling___MMSrcModule___compile_prog_to_c, LOCATE_compiling, 32); nit_exit(1);}
-    ((compiling_global___MMSrcModule___local_analysis_t)CALL( variable[5] /*m*/,COLOR_compiling_global___MMSrcModule___local_analysis))( variable[5] /*m*/,  variable[1] /*tc*/) /*MMSrcModule::local_analysis*/;
-    continue_1: while(0);
-    ((abstract_collection___Iterator___next_t)CALL(variable[3],COLOR_abstract_collection___Iterator___next))(variable[3]) /*Iterator::next*/;
+val_t compiling___Program___output_format(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_compiling;
+  fra.me.line = 28;
+  fra.me.meth = LOCATE_compiling___Program___output_format;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 1;
+  fra.me.nitni_local_ref_head = NULL;
+  fra.me.REG[0] = NIT_NULL;
+  fra.me.REG[0] = p0;
+  /* compiling/compiling.nit:28 */
+  REGB0 = TAG_Bool(ATTR_compiling___Program____output_format(fra.me.REG[0])!=NIT_NULL);
+  if (UNTAG_Bool(REGB0)) {
+  } else {
+    nit_abort("Uninitialized attribute %s", "_output_format", LOCATE_compiling, 28);
   }
-  break_1: while(0);
-  variable[4] = variable[0];
-  variable[4] = ((compiling_global___MMSrcModule___global_analysis_t)CALL(variable[4],COLOR_compiling_global___MMSrcModule___global_analysis))(variable[4],  variable[1] /*tc*/) /*MMSrcModule::global_analysis*/;
-  variable[3] = variable[4];
-  variable[4] = ((compiling_base___ToolContext___compdir_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___compdir))( variable[1] /*tc*/) /*ToolContext::compdir*/;
-  ((file___String___mkdir_t)CALL(variable[4],COLOR_file___String___mkdir))(variable[4]) /*String::mkdir*/;
-  variable[5] = NEW_Array_array___Array___init(); /*new Array[String]*/
-  variable[4] = variable[5];
-  variable[6] = NEW_ArraySet_array___ArraySet___init(); /*new ArraySet[String]*/
-  variable[5] = variable[6];
-  variable[6] = NEW_String_string___String___with_native(BOX_NativeString("$CLIBDIR/nit_main.c"), TAG_Int(19)); /*new String*/
-  ((array___AbstractArray___add_t)CALL( variable[4] /*files*/,COLOR_abstract_collection___SimpleCollection___add))( variable[4] /*files*/, variable[6]) /*AbstractArray::add*/;
-  variable[6] = variable[0];
-  variable[6] = ((abstractmetamodel___MMModule___mhe_t)CALL(variable[6],COLOR_abstractmetamodel___MMModule___mhe))(variable[6]) /*MMModule::mhe*/;
-  variable[6] = ((partial_order___PartialOrderElement___greaters_and_self_t)CALL(variable[6],COLOR_partial_order___PartialOrderElement___greaters_and_self))(variable[6]) /*PartialOrderElement::greaters_and_self*/;
-  variable[6] = ((abstract_collection___Collection___iterator_t)CALL(variable[6],COLOR_abstract_collection___Collection___iterator))(variable[6]) /*Collection::iterator*/;
-  while (true) { /*for*/
-    variable[7] = ((abstract_collection___Iterator___is_ok_t)CALL(variable[6],COLOR_abstract_collection___Iterator___is_ok))(variable[6]) /*Iterator::is_ok*/;
-    if (!UNTAG_Bool(variable[7])) break; /*for*/
-    variable[7] = ((abstract_collection___Iterator___item_t)CALL(variable[6],COLOR_abstract_collection___Iterator___item))(variable[6]) /*Iterator::item*/;
-    variable[8] = variable[7];
-    variable[9] = TAG_Bool(( variable[8] /*m*/==NIT_NULL) || VAL_ISA( variable[8] /*m*/, COLOR_MMSrcModule, ID_MMSrcModule)) /*cast MMSrcModule*/;
-    if (!UNTAG_Bool(variable[9])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_compiling___MMSrcModule___compile_prog_to_c, LOCATE_compiling, 44); nit_exit(1);}
-    variable[9] = NEW_String_string___String___init(); /*new String*/
-    variable[10] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-    variable[11] = variable[10];
-    ((string___String___append_t)CALL(variable[9],COLOR_abstract_collection___IndexedCollection___append))(variable[9], variable[11]) /*String::append*/;
-    variable[12] = ((compiling_base___ToolContext___compdir_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___compdir))( variable[1] /*tc*/) /*ToolContext::compdir*/;
-    variable[13] = variable[12];
-    ((string___String___append_t)CALL(variable[9],COLOR_abstract_collection___IndexedCollection___append))(variable[9], variable[13]) /*String::append*/;
-    variable[14] = NEW_String_string___String___with_native(BOX_NativeString("/"), TAG_Int(1)); /*new String*/
-    variable[15] = variable[14];
-    ((string___String___append_t)CALL(variable[9],COLOR_abstract_collection___IndexedCollection___append))(variable[9], variable[15]) /*String::append*/;
-    variable[16] = ((abstractmetamodel___MMModule___name_t)CALL( variable[8] /*m*/,COLOR_abstractmetamodel___MMModule___name))( variable[8] /*m*/) /*MMModule::name*/;
-    variable[17] = variable[16];
-    variable[17] = ((string___String___to_s_t)CALL(variable[17],COLOR_string___Object___to_s))(variable[17]) /*String::to_s*/;
-    ((string___String___append_t)CALL(variable[9],COLOR_abstract_collection___IndexedCollection___append))(variable[9], variable[17]) /*String::append*/;
-    variable[18] = NEW_String_string___String___with_native(BOX_NativeString("._sep.c"), TAG_Int(7)); /*new String*/
-    variable[19] = variable[18];
-    ((string___String___append_t)CALL(variable[9],COLOR_abstract_collection___IndexedCollection___append))(variable[9], variable[19]) /*String::append*/;
-    ((array___AbstractArray___add_t)CALL( variable[4] /*files*/,COLOR_abstract_collection___SimpleCollection___add))( variable[4] /*files*/, variable[9]) /*AbstractArray::add*/;
-    ((compiling___MMSrcModule___compile_separate_module_t)CALL( variable[8] /*m*/,COLOR_compiling___MMSrcModule___compile_separate_module))( variable[8] /*m*/,  variable[1] /*tc*/,  variable[3] /*ga*/) /*MMSrcModule::compile_separate_module*/;
-    variable[10] = ((mmloader___MMModule___filename_t)CALL( variable[8] /*m*/,COLOR_mmloader___MMModule___filename))( variable[8] /*m*/) /*MMModule::filename*/;
-    variable[11] = NEW_String_string___String___with_native(BOX_NativeString(".nit"), TAG_Int(4)); /*new String*/
-    variable[10] = ((file___String___strip_extension_t)CALL(variable[10],COLOR_file___String___strip_extension))(variable[10], variable[11]) /*String::strip_extension*/;
-    variable[9] = variable[10];
-    variable[10] = NEW_String_string___String___with_native(BOX_NativeString("_nit.h"), TAG_Int(6)); /*new String*/
-    variable[10] = ((string___String_____plus_t)CALL( variable[9] /*native_name*/,COLOR_string___String_____plus))( variable[9] /*native_name*/, variable[10]) /*String::+*/;
-    variable[10] = ((file___String___file_exists_t)CALL(variable[10],COLOR_file___String___file_exists))(variable[10]) /*String::file_exists*/;
-    if (UNTAG_Bool(variable[10])) { /*if*/
-      variable[10] = NEW_String_string___String___init(); /*new String*/
-      variable[11] = NEW_String_string___String___with_native(BOX_NativeString("-I "), TAG_Int(3)); /*new String*/
-      variable[12] = variable[11];
-      ((string___String___append_t)CALL(variable[10],COLOR_abstract_collection___IndexedCollection___append))(variable[10], variable[12]) /*String::append*/;
-      variable[13] = ((file___String___dirname_t)CALL( variable[9] /*native_name*/,COLOR_file___String___dirname))( variable[9] /*native_name*/) /*String::dirname*/;
-      variable[14] = variable[13];
-      ((string___String___append_t)CALL(variable[10],COLOR_abstract_collection___IndexedCollection___append))(variable[10], variable[14]) /*String::append*/;
-      variable[15] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-      variable[16] = variable[15];
-      ((string___String___append_t)CALL(variable[10],COLOR_abstract_collection___IndexedCollection___append))(variable[10], variable[16]) /*String::append*/;
-      ((array___ArraySet___add_t)CALL( variable[5] /*includes*/,COLOR_abstract_collection___SimpleCollection___add))( variable[5] /*includes*/, variable[10]) /*ArraySet::add*/;
+  fra.me.REG[0] = ATTR_compiling___Program____output_format(fra.me.REG[0]);
+  stack_frame_head = fra.me.prev;
+  return fra.me.REG[0];
+}
+void compiling___Program___output_format__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_compiling;
+  fra.me.line = 28;
+  fra.me.meth = LOCATE_compiling___Program___output_format__eq;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 2;
+  fra.me.nitni_local_ref_head = NULL;
+  fra.me.REG[0] = NIT_NULL;
+  fra.me.REG[1] = NIT_NULL;
+  fra.me.REG[0] = p0;
+  fra.me.REG[1] = p1;
+  /* compiling/compiling.nit:28 */
+  ATTR_compiling___Program____output_format(fra.me.REG[0]) = fra.me.REG[1];
+  stack_frame_head = fra.me.prev;
+  return;
+}
+void compiling___Program___compile_prog(val_t p0){
+  struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+  val_t REGB0;
+  val_t REGB1;
+  val_t tmp;
+  static val_t once_value_1; /* Once value */
+    static val_t once_value_3; /* Once value */
+      static val_t once_value_4; /* Once value */
+  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+  fra.me.file = LOCATE_compiling;
+  fra.me.line = 31;
+  fra.me.meth = LOCATE_compiling___Program___compile_prog;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 3;
+  fra.me.nitni_local_ref_head = NULL;
+  fra.me.REG[0] = NIT_NULL;
+  fra.me.REG[1] = NIT_NULL;
+  fra.me.REG[2] = NIT_NULL;
+  fra.me.REG[0] = p0;
+  /* compiling/compiling.nit:34 */
+  fra.me.REG[1] = CALL_compiling___Program___output_format(fra.me.REG[0])(fra.me.REG[0]);
+  if (!once_value_1) {
+    fra.me.REG[2] = BOX_NativeString("none");
+    REGB0 = TAG_Int(4);
+    fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+    once_value_1 = fra.me.REG[2];
+    register_static_object(&once_value_1);
+  } else fra.me.REG[2] = once_value_1;
+  fra.me.REG[2] = fra.me.REG[2];
+  REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[1],fra.me.REG[2]));
+  if (UNTAG_Bool(REGB0)) {
+  } else {
+    REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+    REGB0 = REGB1;
+  }
+  if (UNTAG_Bool(REGB0)) {
+  } else {
+    CALL_program___Program___with_each_iroutines(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_compiling___Program___compile_prog_2));
+    /* compiling/compiling.nit:40 */
+    fra.me.REG[2] = CALL_compiling___Program___output_format(fra.me.REG[0])(fra.me.REG[0]);
+    if (!once_value_3) {
+      fra.me.REG[1] = BOX_NativeString("C");
+      REGB0 = TAG_Int(1);
+      fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB0);
+      once_value_3 = fra.me.REG[1];
+      register_static_object(&once_value_3);
+    } else fra.me.REG[1] = once_value_3;
+    fra.me.REG[1] = fra.me.REG[1];
+    REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[2],fra.me.REG[1]));
+    if (UNTAG_Bool(REGB0)) {
+    } else {
+      REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+      REGB0 = REGB1;
     }
-    variable[10] = NEW_String_string___String___with_native(BOX_NativeString("_nit.c"), TAG_Int(6)); /*new String*/
-    ((string___String___append_t)CALL( variable[9] /*native_name*/,COLOR_abstract_collection___IndexedCollection___append))( variable[9] /*native_name*/, variable[10]) /*String::append*/;
-    variable[10] = ((file___String___file_exists_t)CALL( variable[9] /*native_name*/,COLOR_file___String___file_exists))( variable[9] /*native_name*/) /*String::file_exists*/;
-    if (UNTAG_Bool(variable[10])) { /*if*/
-      ((array___AbstractArray___add_t)CALL( variable[4] /*files*/,COLOR_abstract_collection___SimpleCollection___add))( variable[4] /*files*/,  variable[9] /*native_name*/) /*AbstractArray::add*/;
+    if (UNTAG_Bool(REGB0)) {
+      /* compiling/compiling.nit:41 */
+      CALL_compiling___Program___compile_prog_to_c(fra.me.REG[0])(fra.me.REG[0]);
+    } else {
+      /* compiling/compiling.nit:42 */
+      fra.me.REG[1] = CALL_compiling___Program___output_format(fra.me.REG[0])(fra.me.REG[0]);
+      if (!once_value_4) {
+        fra.me.REG[2] = BOX_NativeString("icode");
+        REGB0 = TAG_Int(5);
+        fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+        once_value_4 = fra.me.REG[2];
+        register_static_object(&once_value_4);
+      } else fra.me.REG[2] = once_value_4;
+      fra.me.REG[2] = fra.me.REG[2];
+      REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[1],fra.me.REG[2]));
+      if (UNTAG_Bool(REGB0)) {
+      } else {
+        REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+        REGB0 = REGB1;
+      }
+      if (UNTAG_Bool(REGB0)) {
+        /* compiling/compiling.nit:43 */
+        CALL_compiling___icode_generator___Program___generate_icode_files(fra.me.REG[0])(fra.me.REG[0]);
+      }
     }
-    continue_2: while(0);
-    ((abstract_collection___Iterator___next_t)CALL(variable[6],COLOR_abstract_collection___Iterator___next))(variable[6]) /*Iterator::next*/;
   }
-  break_2: while(0);
-  variable[6] = NEW_String_string___String___init(); /*new String*/
-  variable[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-  variable[8] = variable[7];
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[8]) /*String::append*/;
-  variable[9] = ((compiling_base___ToolContext___compdir_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___compdir))( variable[1] /*tc*/) /*ToolContext::compdir*/;
-  variable[10] = variable[9];
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[10]) /*String::append*/;
-  variable[11] = NEW_String_string___String___with_native(BOX_NativeString("/"), TAG_Int(1)); /*new String*/
-  variable[12] = variable[11];
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[12]) /*String::append*/;
-  variable[13] = variable[0];
-  variable[13] = ((abstractmetamodel___MMModule___name_t)CALL(variable[13],COLOR_abstractmetamodel___MMModule___name))(variable[13]) /*MMModule::name*/;
-  variable[14] = variable[13];
-  variable[14] = ((string___String___to_s_t)CALL(variable[14],COLOR_string___Object___to_s))(variable[14]) /*String::to_s*/;
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[14]) /*String::append*/;
-  variable[15] = NEW_String_string___String___with_native(BOX_NativeString("._tables.c"), TAG_Int(10)); /*new String*/
-  variable[16] = variable[15];
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[16]) /*String::append*/;
-  ((array___AbstractArray___add_t)CALL( variable[4] /*files*/,COLOR_abstract_collection___SimpleCollection___add))( variable[4] /*files*/, variable[6]) /*AbstractArray::add*/;
-  variable[6] = variable[0];
-  ((compiling___MMSrcModule___compile_main_t)CALL(variable[6],COLOR_compiling___MMSrcModule___compile_main))(variable[6],  variable[1] /*tc*/,  variable[3] /*ga*/) /*MMSrcModule::compile_main*/;
-  variable[7] = NEW_String_string___String___init(); /*new String*/
-  variable[8] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-  variable[9] = variable[8];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[9]) /*String::append*/;
-  variable[10] = ((compiling_base___ToolContext___compdir_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___compdir))( variable[1] /*tc*/) /*ToolContext::compdir*/;
-  variable[11] = variable[10];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[11]) /*String::append*/;
-  variable[12] = NEW_String_string___String___with_native(BOX_NativeString("/"), TAG_Int(1)); /*new String*/
-  variable[13] = variable[12];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[13]) /*String::append*/;
-  variable[14] = variable[0];
-  variable[14] = ((abstractmetamodel___MMModule___name_t)CALL(variable[14],COLOR_abstractmetamodel___MMModule___name))(variable[14]) /*MMModule::name*/;
-  variable[15] = variable[14];
-  variable[15] = ((string___String___to_s_t)CALL(variable[15],COLOR_string___Object___to_s))(variable[15]) /*String::to_s*/;
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[15]) /*String::append*/;
-  variable[16] = NEW_String_string___String___with_native(BOX_NativeString("._build.sh"), TAG_Int(10)); /*new String*/
-  variable[17] = variable[16];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[17]) /*String::append*/;
-  variable[6] = variable[7];
-  variable[8] = NEW_OFStream_file___OFStream___open( variable[6] /*fn*/); /*new OFStream*/
-  variable[7] = variable[8];
-  variable[8] = NEW_String_string___String___with_native(BOX_NativeString("#!/bin/sh\n"), TAG_Int(10)); /*new String*/
-  ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
-  variable[8] = NEW_String_string___String___init(); /*new String*/
-  variable[9] = NEW_String_string___String___with_native(BOX_NativeString("# This shell script is generated by NIT to compile the program "), TAG_Int(63)); /*new String*/
-  variable[10] = variable[9];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[10]) /*String::append*/;
-  variable[11] = variable[0];
-  variable[11] = ((abstractmetamodel___MMModule___name_t)CALL(variable[11],COLOR_abstractmetamodel___MMModule___name))(variable[11]) /*MMModule::name*/;
-  variable[12] = variable[11];
-  variable[12] = ((string___String___to_s_t)CALL(variable[12],COLOR_string___Object___to_s))(variable[12]) /*String::to_s*/;
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[12]) /*String::append*/;
-  variable[13] = NEW_String_string___String___with_native(BOX_NativeString(".\n"), TAG_Int(2)); /*new String*/
-  variable[14] = variable[13];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[14]) /*String::append*/;
-  ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
-  variable[8] = NEW_String_string___String___init(); /*new String*/
-  variable[9] = NEW_String_string___String___with_native(BOX_NativeString("CLIBDIR=\""), TAG_Int(9)); /*new String*/
-  variable[10] = variable[9];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[10]) /*String::append*/;
-  variable[11] = ((compiling_base___ToolContext___clibdir_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___clibdir))( variable[1] /*tc*/) /*ToolContext::clibdir*/;
-  variable[12] = variable[11];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[12]) /*String::append*/;
-  variable[13] = NEW_String_string___String___with_native(BOX_NativeString("\"\n"), TAG_Int(2)); /*new String*/
-  variable[14] = variable[13];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[14]) /*String::append*/;
-  ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
-  variable[8] = NEW_String_string___String___init(); /*new String*/
-  variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-  variable[10] = variable[9];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[10]) /*String::append*/;
-  variable[11] = ((compiling_base___ToolContext___bindir_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___bindir))( variable[1] /*tc*/) /*ToolContext::bindir*/;
-  variable[12] = variable[11];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[12]) /*String::append*/;
-  variable[13] = NEW_String_string___String___with_native(BOX_NativeString("/gccx -d "), TAG_Int(9)); /*new String*/
-  variable[14] = variable[13];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[14]) /*String::append*/;
-  variable[15] = ((compiling_base___ToolContext___compdir_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___compdir))( variable[1] /*tc*/) /*ToolContext::compdir*/;
-  variable[16] = variable[15];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[16]) /*String::append*/;
-  variable[17] = NEW_String_string___String___with_native(BOX_NativeString(" -I $CLIBDIR "), TAG_Int(13)); /*new String*/
-  variable[18] = variable[17];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[18]) /*String::append*/;
-  variable[19] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)); /*new String*/
-  variable[19] = ((string___Collection___join_t)CALL( variable[5] /*includes*/,COLOR_string___Collection___join))( variable[5] /*includes*/, variable[19]) /*Collection::join*/;
-  variable[20] = variable[19];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[20]) /*String::append*/;
-  variable[21] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-  variable[22] = variable[21];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[22]) /*String::append*/;
-  ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
-  variable[8] = ((compiling_base___ToolContext___output_file_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___output_file))( variable[1] /*tc*/) /*ToolContext::output_file*/;
-  variable[8] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[8] ==  NIT_NULL /*null*/) || ((variable[8] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[8],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[8], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[8],COLOR_kernel___Object_____eqeq))(variable[8],  NIT_NULL /*null*/) /*Object::==*/)))))));
-  if (UNTAG_Bool(variable[8])) { /*if*/
-    variable[8] = NEW_String_string___String___init(); /*new String*/
-    variable[9] = NEW_String_string___String___with_native(BOX_NativeString(" -o "), TAG_Int(4)); /*new String*/
-    variable[10] = variable[9];
-    ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[10]) /*String::append*/;
-    variable[11] = ((compiling_base___ToolContext___output_file_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___output_file))( variable[1] /*tc*/) /*ToolContext::output_file*/;
-    variable[12] = variable[11];
-    ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[12]) /*String::append*/;
-    variable[13] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-    variable[14] = variable[13];
-    ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[14]) /*String::append*/;
-    ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
-  } else { /*if*/
-    variable[8] = ((compiling_base___ToolContext___ext_prefix_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___ext_prefix))( variable[1] /*tc*/) /*ToolContext::ext_prefix*/;
-    variable[8] = ((array___AbstractArray___is_empty_t)CALL(variable[8],COLOR_abstract_collection___Collection___is_empty))(variable[8]) /*AbstractArray::is_empty*/;
-    if (UNTAG_Bool(variable[8])) { /*if*/
-      variable[8] = NEW_String_string___String___init(); /*new String*/
-      variable[9] = NEW_String_string___String___with_native(BOX_NativeString(" -o "), TAG_Int(4)); /*new String*/
-      variable[10] = variable[9];
-      ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[10]) /*String::append*/;
-      variable[11] = variable[0];
-      variable[11] = ((abstractmetamodel___MMModule___name_t)CALL(variable[11],COLOR_abstractmetamodel___MMModule___name))(variable[11]) /*MMModule::name*/;
-      variable[12] = variable[11];
-      variable[12] = ((string___String___to_s_t)CALL(variable[12],COLOR_string___Object___to_s))(variable[12]) /*String::to_s*/;
-      ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[12]) /*String::append*/;
-      variable[13] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-      variable[14] = variable[13];
-      ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[14]) /*String::append*/;
-      ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
-    } else { /*if*/
-      variable[8] = NEW_String_string___String___init(); /*new String*/
-      variable[9] = NEW_String_string___String___with_native(BOX_NativeString(" -o "), TAG_Int(4)); /*new String*/
-      variable[10] = variable[9];
-      ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[10]) /*String::append*/;
-      variable[11] = variable[0];
-      variable[11] = ((abstractmetamodel___MMModule___name_t)CALL(variable[11],COLOR_abstractmetamodel___MMModule___name))(variable[11]) /*MMModule::name*/;
-      variable[12] = variable[11];
-      variable[12] = ((string___String___to_s_t)CALL(variable[12],COLOR_string___Object___to_s))(variable[12]) /*String::to_s*/;
-      ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[12]) /*String::append*/;
-      variable[13] = NEW_String_string___String___with_native(BOX_NativeString("_"), TAG_Int(1)); /*new String*/
-      variable[14] = variable[13];
-      ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[14]) /*String::append*/;
-      variable[15] = ((compiling_base___ToolContext___ext_prefix_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___ext_prefix))( variable[1] /*tc*/) /*ToolContext::ext_prefix*/;
-      variable[16] = variable[15];
-      ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[16]) /*String::append*/;
-      variable[17] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-      variable[18] = variable[17];
-      ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[18]) /*String::append*/;
-      ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
+  stack_frame_head = fra.me.prev;
+  return;
+}
+    void OC_compiling___Program___compile_prog_2(struct stack_frame_t *closctx, val_t p0, val_t p1){
+      struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+      val_t tmp;
+      /* compiling/compiling.nit:38 */
+      fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+      fra.me.file = LOCATE_compiling;
+      fra.me.line = 38;
+      fra.me.meth = LOCATE_compiling___Program___compile_prog;
+      fra.me.has_broke = 0;
+      fra.me.REG_size = 2;
+      fra.me.nitni_local_ref_head = NULL;
+      fra.me.REG[0] = NIT_NULL;
+      fra.me.REG[1] = NIT_NULL;
+      fra.me.REG[0] = p0;
+      fra.me.REG[1] = p1;
+      CALL_analysis___IRoutine___optimize(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+      stack_frame_head = fra.me.prev;
+      return;
     }
+void compiling___Program___compile_prog_to_c(val_t p0){
+  struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+  val_t REGB0;
+  val_t tmp;
+  static val_t once_value_1; /* Once value */
+  static val_t once_value_2; /* Once value */
+  static val_t once_value_3; /* Once value */
+  static val_t once_value_4; /* Once value */
+  static val_t once_value_6; /* Once value */
+  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+  fra.me.file = LOCATE_compiling;
+  fra.me.line = 48;
+  fra.me.meth = LOCATE_compiling___Program___compile_prog_to_c;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 4;
+  fra.me.nitni_local_ref_head = NULL;
+  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;
+  /* compiling/compiling.nit:53 */
+  fra.me.REG[1] = NEW_CProgram_compiling___compiling_base___CProgram___init(fra.me.REG[0]);
+  /* compiling/compiling.nit:55 */
+  fra.me.REG[2] = CALL_compiling___compiling_base___CProgram___compdir(fra.me.REG[1])(fra.me.REG[1]);
+  CALL_standard___file___String___mkdir(fra.me.REG[2])(fra.me.REG[2]);
+  /* compiling/compiling.nit:57 */
+  fra.me.REG[2] = CALL_compiling___compiling_base___CProgram___files(fra.me.REG[1])(fra.me.REG[1]);
+  if (!once_value_1) {
+    fra.me.REG[3] = BOX_NativeString("$CLIBDIR/nit_main.c");
+    REGB0 = TAG_Int(19);
+    fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
+    once_value_1 = fra.me.REG[3];
+    register_static_object(&once_value_1);
+  } else fra.me.REG[3] = once_value_1;
+  fra.me.REG[3] = fra.me.REG[3];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+  /* compiling/compiling.nit:58 */
+  fra.me.REG[3] = CALL_compiling___compiling_base___CProgram___files(fra.me.REG[1])(fra.me.REG[1]);
+  if (!once_value_2) {
+    fra.me.REG[2] = BOX_NativeString("$CLIBDIR/gc.c");
+    REGB0 = TAG_Int(13);
+    fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+    once_value_2 = fra.me.REG[2];
+    register_static_object(&once_value_2);
+  } else fra.me.REG[2] = once_value_2;
+  fra.me.REG[2] = fra.me.REG[2];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+  /* compiling/compiling.nit:59 */
+  fra.me.REG[2] = CALL_compiling___compiling_base___CProgram___files(fra.me.REG[1])(fra.me.REG[1]);
+  if (!once_value_3) {
+    fra.me.REG[3] = BOX_NativeString("$CLIBDIR/gc_static_objects_list.c");
+    REGB0 = TAG_Int(33);
+    fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
+    once_value_3 = fra.me.REG[3];
+    register_static_object(&once_value_3);
+  } else fra.me.REG[3] = once_value_3;
+  fra.me.REG[3] = fra.me.REG[3];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+  /* compiling/compiling.nit:61 */
+  fra.me.REG[3] = CALL_program___Program___tc(fra.me.REG[0])(fra.me.REG[0]);
+  if (!once_value_4) {
+    fra.me.REG[2] = BOX_NativeString("Generating C code");
+    REGB0 = TAG_Int(17);
+    fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+    once_value_4 = fra.me.REG[2];
+    register_static_object(&once_value_4);
+  } else fra.me.REG[2] = once_value_4;
+  fra.me.REG[2] = fra.me.REG[2];
+  REGB0 = TAG_Int(1);
+  CALL_toolcontext___ToolContext___info(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2], REGB0);
+  /* compiling/compiling.nit:62 */
+  fra.me.REG[2] = CALL_program___Program___main_module(fra.me.REG[0])(fra.me.REG[0]);
+  fra.me.REG[2] = CALL_metamodel___abstractmetamodel___MMModule___mhe(fra.me.REG[2])(fra.me.REG[2]);
+  REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+  if (UNTAG_Bool(REGB0)) {
+    nit_abort("Reciever is null", NULL, LOCATE_compiling, 62);
   }
-  variable[8] = ((compiling_base___ToolContext___boost_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___boost))( variable[1] /*tc*/) /*ToolContext::boost*/;
-  if (UNTAG_Bool(variable[8])) { /*if*/
-    variable[8] = NEW_String_string___String___with_native(BOX_NativeString(" -O"), TAG_Int(3)); /*new String*/
-    ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
+  fra.me.REG[2] = CALL_metamodel___partial_order___PartialOrderElement___greaters_and_self(fra.me.REG[2])(fra.me.REG[2]);
+  CALL_standard___collection___abstract_collection___Collection___iterate(fra.me.REG[2])(fra.me.REG[2], (&(fra.me)), ((fun_t)OC_compiling___Program___compile_prog_to_c_5));
+  /* compiling/compiling.nit:64 */
+  fra.me.REG[2] = CALL_program___Program___tc(fra.me.REG[0])(fra.me.REG[0]);
+  if (!once_value_6) {
+    fra.me.REG[3] = BOX_NativeString("Generating main, tables and makefile ...");
+    REGB0 = TAG_Int(40);
+    fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
+    once_value_6 = fra.me.REG[3];
+    register_static_object(&once_value_6);
+  } else fra.me.REG[3] = once_value_6;
+  fra.me.REG[3] = fra.me.REG[3];
+  REGB0 = TAG_Int(1);
+  CALL_toolcontext___ToolContext___info(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3], REGB0);
+  /* compiling/compiling.nit:65 */
+  CALL_compiling___Program___compile_main(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+  /* compiling/compiling.nit:67 */
+  CALL_compiling___compiling_base___CProgram___generate_build_file(fra.me.REG[1])(fra.me.REG[1]);
+  /* compiling/compiling.nit:69 */
+  fra.me.REG[0] = CALL_program___Program___tc(fra.me.REG[0])(fra.me.REG[0]);
+  REGB0 = CALL_compiling___compiling_base___ToolContext___no_cc(fra.me.REG[0])(fra.me.REG[0]);
+  REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+  if (UNTAG_Bool(REGB0)) {
+    CALL_compiling___compiling_base___CProgram___run_c_compiler(fra.me.REG[1])(fra.me.REG[1]);
   }
-  variable[8] = NEW_String_string___String___init(); /*new String*/
-  variable[9] = NEW_String_string___String___with_native(BOX_NativeString(" \"$@\" \\\n  "), TAG_Int(10)); /*new String*/
-  variable[10] = variable[9];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[10]) /*String::append*/;
-  variable[11] = NEW_String_string___String___with_native(BOX_NativeString("\\\n  "), TAG_Int(4)); /*new String*/
-  variable[11] = ((string___Collection___join_t)CALL( variable[4] /*files*/,COLOR_string___Collection___join))( variable[4] /*files*/, variable[11]) /*Collection::join*/;
-  variable[12] = variable[11];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[12]) /*String::append*/;
-  variable[13] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
-  variable[14] = variable[13];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[14]) /*String::append*/;
-  ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
-  ((file___OFStream___close_t)CALL( variable[7] /*f*/,COLOR_stream___IOS___close))( variable[7] /*f*/) /*OFStream::close*/;
-  variable[8] = ((compiling_base___ToolContext___no_cc_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___no_cc))( variable[1] /*tc*/) /*ToolContext::no_cc*/;
-  if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[8])))) { /*if*/
-    variable[8] = variable[0];
-    variable[8] = (G_sys);
-    variable[9] = NEW_String_string___String___init(); /*new String*/
-    variable[10] = NEW_String_string___String___with_native(BOX_NativeString("sh "), TAG_Int(3)); /*new String*/
-    variable[11] = variable[10];
-    ((string___String___append_t)CALL(variable[9],COLOR_abstract_collection___IndexedCollection___append))(variable[9], variable[11]) /*String::append*/;
-    variable[12] =  variable[6] /*fn*/;
-    ((string___String___append_t)CALL(variable[9],COLOR_abstract_collection___IndexedCollection___append))(variable[9], variable[12]) /*String::append*/;
-    variable[13] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-    variable[14] = variable[13];
-    ((string___String___append_t)CALL(variable[9],COLOR_abstract_collection___IndexedCollection___append))(variable[9], variable[14]) /*String::append*/;
-    ((exec___Sys___system_t)CALL(variable[8],COLOR_exec___Sys___system))(variable[8], variable[9]) /*Sys::system*/;
-  }
-  return_label0: while(false);
-  tracehead = trace.prev;
+  stack_frame_head = fra.me.prev;
   return;
 }
-void compiling___MMSrcModule___compile_main(val_t  self, val_t  param0, val_t  param1) {
-  struct trace_t trace = {NULL, NULL, 80, LOCATE_compiling___MMSrcModule___compile_main};
-  val_t variable[17];
-  void **closurevariable = NULL;
-  trace.prev = tracehead; tracehead = &trace;
-  trace.file = LOCATE_compiling;
-  variable[0] =  self;
-  variable[1] =  param0;
-  variable[2] =  param1;
-  variable[5] = variable[0];
-  variable[6] = NEW_CompilerVisitor_compiling_base___CompilerVisitor___init(variable[5]); /*new CompilerVisitor*/
-  variable[5] = variable[6];
-  variable[4] = variable[5];
-  ((compiling_base___CompilerVisitor___tc__eq_t)CALL( variable[4] /*v*/,COLOR_compiling_base___CompilerVisitor___tc__eq))( variable[4] /*v*/,  variable[1] /*tc*/) /*CompilerVisitor::tc=*/;
-  ((compiling_global___CompilerVisitor___global_analysis__eq_t)CALL( variable[4] /*v*/,COLOR_compiling_global___CompilerVisitor___global_analysis__eq))( variable[4] /*v*/,  variable[2] /*ga*/) /*CompilerVisitor::global_analysis=*/;
-  variable[5] = NEW_String_string___String___with_native(BOX_NativeString("#include <nit_common.h>"), TAG_Int(23)); /*new String*/
-  ((compiling_base___CompilerVisitor___add_decl_t)CALL( variable[4] /*v*/,COLOR_compiling_base___CompilerVisitor___add_decl))( variable[4] /*v*/, variable[5]) /*CompilerVisitor::add_decl*/;
-  variable[5] = variable[0];
-  ((compiling_global___MMSrcModule___compile_tables_to_c_t)CALL(variable[5],COLOR_compiling_global___MMSrcModule___compile_tables_to_c))(variable[5],  variable[4] /*v*/) /*MMSrcModule::compile_tables_to_c*/;
-  variable[5] = variable[0];
-  ((compiling_global___MMSrcModule___compile_main_part_t)CALL(variable[5],COLOR_compiling_global___MMSrcModule___compile_main_part))(variable[5],  variable[4] /*v*/) /*MMSrcModule::compile_main_part*/;
-  variable[6] = NEW_String_string___String___init(); /*new String*/
-  variable[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-  variable[8] = variable[7];
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[8]) /*String::append*/;
-  variable[9] = ((compiling_base___ToolContext___compdir_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___compdir))( variable[1] /*tc*/) /*ToolContext::compdir*/;
-  variable[10] = variable[9];
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[10]) /*String::append*/;
-  variable[11] = NEW_String_string___String___with_native(BOX_NativeString("/"), TAG_Int(1)); /*new String*/
-  variable[12] = variable[11];
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[12]) /*String::append*/;
-  variable[13] = variable[0];
-  variable[13] = ((abstractmetamodel___MMModule___name_t)CALL(variable[13],COLOR_abstractmetamodel___MMModule___name))(variable[13]) /*MMModule::name*/;
-  variable[14] = variable[13];
-  variable[14] = ((string___String___to_s_t)CALL(variable[14],COLOR_string___Object___to_s))(variable[14]) /*String::to_s*/;
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[14]) /*String::append*/;
-  variable[15] = NEW_String_string___String___with_native(BOX_NativeString("._tables.c"), TAG_Int(10)); /*new String*/
-  variable[16] = variable[15];
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[16]) /*String::append*/;
-  variable[7] = NEW_OFStream_file___OFStream___open(variable[6]); /*new OFStream*/
-  variable[6] = variable[7];
-  variable[5] = variable[6];
-  variable[6] = NEW_String_string___String___init(); /*new String*/
-  variable[7] = NEW_String_string___String___with_native(BOX_NativeString("/* This C file is generated by NIT to compile program "), TAG_Int(54)); /*new String*/
-  variable[8] = variable[7];
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[8]) /*String::append*/;
-  variable[9] = variable[0];
-  variable[9] = ((abstractmetamodel___MMModule___name_t)CALL(variable[9],COLOR_abstractmetamodel___MMModule___name))(variable[9]) /*MMModule::name*/;
-  variable[10] = variable[9];
-  variable[10] = ((string___String___to_s_t)CALL(variable[10],COLOR_string___Object___to_s))(variable[10]) /*String::to_s*/;
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[10]) /*String::append*/;
-  variable[11] = NEW_String_string___String___with_native(BOX_NativeString(". */\n"), TAG_Int(5)); /*new String*/
-  variable[12] = variable[11];
-  ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[12]) /*String::append*/;
-  ((file___OFStream___write_t)CALL( variable[5] /*f*/,COLOR_stream___OStream___write))( variable[5] /*f*/, variable[6]) /*OFStream::write*/;
-  variable[6] = variable[0];
-  variable[6] = ((abstractmetamodel___MMModule___mhe_t)CALL(variable[6],COLOR_abstractmetamodel___MMModule___mhe))(variable[6]) /*MMModule::mhe*/;
-  variable[6] = ((partial_order___PartialOrderElement___greaters_and_self_t)CALL(variable[6],COLOR_partial_order___PartialOrderElement___greaters_and_self))(variable[6]) /*PartialOrderElement::greaters_and_self*/;
-  variable[6] = ((abstract_collection___Collection___iterator_t)CALL(variable[6],COLOR_abstract_collection___Collection___iterator))(variable[6]) /*Collection::iterator*/;
-  while (true) { /*for*/
-    variable[7] = ((abstract_collection___Iterator___is_ok_t)CALL(variable[6],COLOR_abstract_collection___Iterator___is_ok))(variable[6]) /*Iterator::is_ok*/;
-    if (!UNTAG_Bool(variable[7])) break; /*for*/
-    variable[7] = ((abstract_collection___Iterator___item_t)CALL(variable[6],COLOR_abstract_collection___Iterator___item))(variable[6]) /*Iterator::item*/;
-    variable[8] = variable[7];
-    variable[9] = NEW_String_string___String___init(); /*new String*/
-    variable[10] = NEW_String_string___String___with_native(BOX_NativeString("#include \""), TAG_Int(10)); /*new String*/
-    variable[11] = variable[10];
-    ((string___String___append_t)CALL(variable[9],COLOR_abstract_collection___IndexedCollection___append))(variable[9], variable[11]) /*String::append*/;
-    variable[12] = ((abstractmetamodel___MMModule___name_t)CALL( variable[8] /*m*/,COLOR_abstractmetamodel___MMModule___name))( variable[8] /*m*/) /*MMModule::name*/;
-    variable[13] = variable[12];
-    variable[13] = ((string___String___to_s_t)CALL(variable[13],COLOR_string___Object___to_s))(variable[13]) /*String::to_s*/;
-    ((string___String___append_t)CALL(variable[9],COLOR_abstract_collection___IndexedCollection___append))(variable[9], variable[13]) /*String::append*/;
-    variable[14] = NEW_String_string___String___with_native(BOX_NativeString("._sep.h\"\n"), TAG_Int(9)); /*new String*/
-    variable[15] = variable[14];
-    ((string___String___append_t)CALL(variable[9],COLOR_abstract_collection___IndexedCollection___append))(variable[9], variable[15]) /*String::append*/;
-    ((file___OFStream___write_t)CALL( variable[5] /*f*/,COLOR_stream___OStream___write))( variable[5] /*f*/, variable[9]) /*OFStream::write*/;
-    continue_4: while(0);
-    ((abstract_collection___Iterator___next_t)CALL(variable[6],COLOR_abstract_collection___Iterator___next))(variable[6]) /*Iterator::next*/;
+  void OC_compiling___Program___compile_prog_to_c_5(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
+    struct {struct stack_frame_t me;} fra;
+    fun_t CREG[1];
+    val_t tmp;
+    fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+    fra.me.file = LOCATE_compiling;
+    fra.me.line = 0;
+    fra.me.meth = LOCATE_compiling___Program___compile_prog_to_c;
+    fra.me.has_broke = 0;
+    fra.me.REG_size = 1;
+    fra.me.nitni_local_ref_head = NULL;
+    fra.me.REG[0] = NIT_NULL;
+    fra.me.closure_ctx = closctx_param;
+    fra.me.closure_funs = CREG;
+    fra.me.REG[0] = p0;
+    CREG[0] = clos_fun0;
+    CALL_compiling___MMModule___compile_separate_module(fra.me.REG[0])(fra.me.REG[0], closctx->REG[1]);
+    stack_frame_head = fra.me.prev;
+    return;
+  }
+void compiling___Program___compile_main(val_t p0, val_t p1){
+  struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
+  val_t REGB0;
+  val_t tmp;
+  static val_t once_value_1; /* Once value */
+  static val_t once_value_2; /* Once value */
+  static val_t once_value_3; /* Once value */
+  static val_t once_value_4; /* Once value */
+  static val_t once_value_5; /* Once value */
+  static val_t once_value_6; /* Once value */
+  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+  fra.me.file = LOCATE_compiling;
+  fra.me.line = 72;
+  fra.me.meth = LOCATE_compiling___Program___compile_main;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 6;
+  fra.me.nitni_local_ref_head = NULL;
+  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[4] = NIT_NULL;
+  fra.me.REG[5] = NIT_NULL;
+  fra.me.REG[0] = p0;
+  fra.me.REG[1] = p1;
+  /* compiling/compiling.nit:75 */
+  fra.me.REG[2] = CALL_program___Program___main_module(fra.me.REG[0])(fra.me.REG[0]);
+  fra.me.REG[2] = NEW_CompilerVisitor_compiling___compiling_base___CompilerVisitor___init(fra.me.REG[2], fra.me.REG[1]);
+  /* compiling/compiling.nit:76 */
+  if (!once_value_1) {
+    fra.me.REG[3] = BOX_NativeString("#include <nit_common.h>");
+    REGB0 = TAG_Int(23);
+    fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
+    once_value_1 = fra.me.REG[3];
+    register_static_object(&once_value_1);
+  } else fra.me.REG[3] = once_value_1;
+  fra.me.REG[3] = fra.me.REG[3];
+  CALL_compiling___compiling_base___CompilerVisitor___add_decl(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+  /* compiling/compiling.nit:77 */
+  CALL_compiling___compiling_global___Program___compile_tables_to_c(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+  /* compiling/compiling.nit:78 */
+  CALL_compiling___compiling_global___Program___compile_main_part(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+  /* compiling/compiling.nit:79 */
+  REGB0 = TAG_Int(5);
+  fra.me.REG[3] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+  if (!once_value_2) {
+    fra.me.REG[4] = BOX_NativeString("");
+    REGB0 = TAG_Int(0);
+    fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB0);
+    once_value_2 = fra.me.REG[4];
+    register_static_object(&once_value_2);
+  } else fra.me.REG[4] = once_value_2;
+  fra.me.REG[4] = fra.me.REG[4];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+  fra.me.REG[4] = CALL_compiling___compiling_base___CProgram___compdir(fra.me.REG[1])(fra.me.REG[1]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+  if (!once_value_3) {
+    fra.me.REG[4] = BOX_NativeString("/");
+    REGB0 = TAG_Int(1);
+    fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB0);
+    once_value_3 = fra.me.REG[4];
+    register_static_object(&once_value_3);
+  } else fra.me.REG[4] = once_value_3;
+  fra.me.REG[4] = fra.me.REG[4];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+  fra.me.REG[4] = CALL_program___Program___main_module(fra.me.REG[0])(fra.me.REG[0]);
+  fra.me.REG[4] = CALL_compiling___compiling_base___MMModule___cname(fra.me.REG[4])(fra.me.REG[4]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+  if (!once_value_4) {
+    fra.me.REG[4] = BOX_NativeString("._tables.c");
+    REGB0 = TAG_Int(10);
+    fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB0);
+    once_value_4 = fra.me.REG[4];
+    register_static_object(&once_value_4);
+  } else fra.me.REG[4] = once_value_4;
+  fra.me.REG[4] = fra.me.REG[4];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+  fra.me.REG[3] = CALL_standard___string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+  /* compiling/compiling.nit:80 */
+  fra.me.REG[4] = CALL_compiling___compiling_base___CProgram___files(fra.me.REG[1])(fra.me.REG[1]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+  /* compiling/compiling.nit:81 */
+  fra.me.REG[3] = NEW_OFStream_standard___file___OFStream___open(fra.me.REG[3]);
+  /* compiling/compiling.nit:82 */
+  REGB0 = TAG_Int(3);
+  fra.me.REG[4] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+  if (!once_value_5) {
+    fra.me.REG[5] = BOX_NativeString("/* This C file is generated by NIT to compile program ");
+    REGB0 = TAG_Int(54);
+    fra.me.REG[5] = NEW_String_standard___string___String___with_native(fra.me.REG[5], REGB0);
+    once_value_5 = fra.me.REG[5];
+    register_static_object(&once_value_5);
+  } else fra.me.REG[5] = once_value_5;
+  fra.me.REG[5] = fra.me.REG[5];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+  fra.me.REG[5] = CALL_program___Program___main_module(fra.me.REG[0])(fra.me.REG[0]);
+  fra.me.REG[5] = CALL_compiling___compiling_base___MMModule___cname(fra.me.REG[5])(fra.me.REG[5]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+  if (!once_value_6) {
+    fra.me.REG[5] = BOX_NativeString(". */\n");
+    REGB0 = TAG_Int(5);
+    fra.me.REG[5] = NEW_String_standard___string___String___with_native(fra.me.REG[5], REGB0);
+    once_value_6 = fra.me.REG[5];
+    register_static_object(&once_value_6);
+  } else fra.me.REG[5] = once_value_6;
+  fra.me.REG[5] = fra.me.REG[5];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+  fra.me.REG[4] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+  CALL_standard___stream___OStream___write(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+  /* compiling/compiling.nit:83 */
+  fra.me.REG[0] = CALL_program___Program___main_module(fra.me.REG[0])(fra.me.REG[0]);
+  fra.me.REG[0] = CALL_metamodel___abstractmetamodel___MMModule___mhe(fra.me.REG[0])(fra.me.REG[0]);
+  REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+  if (UNTAG_Bool(REGB0)) {
+    nit_abort("Reciever is null", NULL, LOCATE_compiling, 83);
   }
-  break_4: while(0);
-  variable[6] = ((compiling_base___CompilerVisitor___to_s_t)CALL( variable[4] /*v*/,COLOR_string___Object___to_s))( variable[4] /*v*/) /*CompilerVisitor::to_s*/;
-  ((file___OFStream___write_t)CALL( variable[5] /*f*/,COLOR_stream___OStream___write))( variable[5] /*f*/, variable[6]) /*OFStream::write*/;
-  ((file___OFStream___close_t)CALL( variable[5] /*f*/,COLOR_stream___IOS___close))( variable[5] /*f*/) /*OFStream::close*/;
-  return_label3: while(false);
-  tracehead = trace.prev;
+  fra.me.REG[0] = CALL_metamodel___partial_order___PartialOrderElement___greaters_and_self(fra.me.REG[0])(fra.me.REG[0]);
+  CALL_standard___collection___abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_compiling___Program___compile_main_7));
+  /* compiling/compiling.nit:86 */
+  fra.me.REG[1] = CALL_compiling___compiling_base___CompilerVisitor___header_writer(fra.me.REG[2])(fra.me.REG[2]);
+  CALL_compiling___compiling_writer___Writer___write_to_stream(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+  /* compiling/compiling.nit:87 */
+  fra.me.REG[2] = CALL_compiling___compiling_base___CompilerVisitor___writer(fra.me.REG[2])(fra.me.REG[2]);
+  CALL_compiling___compiling_writer___Writer___write_to_stream(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+  /* compiling/compiling.nit:88 */
+  CALL_standard___stream___IOS___close(fra.me.REG[3])(fra.me.REG[3]);
+  stack_frame_head = fra.me.prev;
   return;
 }
-void compiling___MMSrcModule___compile_separate_module(val_t  self, val_t  param0, val_t  param1) {
-  struct trace_t trace = {NULL, NULL, 98, LOCATE_compiling___MMSrcModule___compile_separate_module};
-  val_t variable[19];
-  void **closurevariable = NULL;
-  trace.prev = tracehead; tracehead = &trace;
-  trace.file = LOCATE_compiling;
-  variable[0] =  self;
-  variable[1] =  param0;
-  variable[2] =  param1;
-  variable[5] = variable[0];
-  variable[6] = NEW_CompilerVisitor_compiling_base___CompilerVisitor___init(variable[5]); /*new CompilerVisitor*/
-  variable[5] = variable[6];
-  variable[4] = variable[5];
-  ((compiling_base___CompilerVisitor___tc__eq_t)CALL( variable[4] /*v*/,COLOR_compiling_base___CompilerVisitor___tc__eq))( variable[4] /*v*/,  variable[1] /*tc*/) /*CompilerVisitor::tc=*/;
-  ((compiling_global___CompilerVisitor___global_analysis__eq_t)CALL( variable[4] /*v*/,COLOR_compiling_global___CompilerVisitor___global_analysis__eq))( variable[4] /*v*/,  variable[2] /*ga*/) /*CompilerVisitor::global_analysis=*/;
-  variable[5] = NEW_String_string___String___with_native(BOX_NativeString("#include <nit_common.h>"), TAG_Int(23)); /*new String*/
-  ((compiling_base___CompilerVisitor___add_decl_t)CALL( variable[4] /*v*/,COLOR_compiling_base___CompilerVisitor___add_decl))( variable[4] /*v*/, variable[5]) /*CompilerVisitor::add_decl*/;
-  variable[6] = variable[0];
-  variable[6] = ((mmloader___MMModule___filename_t)CALL(variable[6],COLOR_mmloader___MMModule___filename))(variable[6]) /*MMModule::filename*/;
-  variable[7] = NEW_String_string___String___with_native(BOX_NativeString(".nit"), TAG_Int(4)); /*new String*/
-  variable[6] = ((file___String___strip_extension_t)CALL(variable[6],COLOR_file___String___strip_extension))(variable[6], variable[7]) /*String::strip_extension*/;
-  variable[5] = variable[6];
-  variable[6] = NEW_String_string___String___with_native(BOX_NativeString("_nit.h"), TAG_Int(6)); /*new String*/
-  ((string___String___append_t)CALL( variable[5] /*native_name*/,COLOR_abstract_collection___IndexedCollection___append))( variable[5] /*native_name*/, variable[6]) /*String::append*/;
-  variable[6] = ((file___String___file_exists_t)CALL( variable[5] /*native_name*/,COLOR_file___String___file_exists))( variable[5] /*native_name*/) /*String::file_exists*/;
-  if (UNTAG_Bool(variable[6])) { /*if*/
-    variable[6] = NEW_String_string___String___init(); /*new String*/
-    variable[7] = NEW_String_string___String___with_native(BOX_NativeString("#include <"), TAG_Int(10)); /*new String*/
-    variable[8] = variable[7];
-    ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[8]) /*String::append*/;
-    variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-    variable[9] = ((file___String___basename_t)CALL( variable[5] /*native_name*/,COLOR_file___String___basename))( variable[5] /*native_name*/, variable[9]) /*String::basename*/;
-    variable[10] = variable[9];
-    ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[10]) /*String::append*/;
-    variable[11] = NEW_String_string___String___with_native(BOX_NativeString(">"), TAG_Int(1)); /*new String*/
-    variable[12] = variable[11];
-    ((string___String___append_t)CALL(variable[6],COLOR_abstract_collection___IndexedCollection___append))(variable[6], variable[12]) /*String::append*/;
-    ((compiling_base___CompilerVisitor___add_decl_t)CALL( variable[4] /*v*/,COLOR_compiling_base___CompilerVisitor___add_decl))( variable[4] /*v*/, variable[6]) /*CompilerVisitor::add_decl*/;
+  void OC_compiling___Program___compile_main_7(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
+    struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+    val_t REGB0;
+    fun_t CREG[1];
+    val_t tmp;
+    static val_t once_value_8; /* Once value */
+    static val_t once_value_9; /* Once value */
+    fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+    fra.me.file = LOCATE_compiling;
+    fra.me.line = 0;
+    fra.me.meth = LOCATE_compiling___Program___compile_main;
+    fra.me.has_broke = 0;
+    fra.me.REG_size = 3;
+    fra.me.nitni_local_ref_head = NULL;
+    fra.me.REG[0] = NIT_NULL;
+    fra.me.REG[1] = NIT_NULL;
+    fra.me.REG[2] = NIT_NULL;
+    fra.me.closure_ctx = closctx_param;
+    fra.me.closure_funs = CREG;
+    fra.me.REG[0] = p0;
+    CREG[0] = clos_fun0;
+    /* compiling/compiling.nit:84 */
+    REGB0 = TAG_Int(3);
+    fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+    if (!once_value_8) {
+      fra.me.REG[2] = BOX_NativeString("#include \"");
+      REGB0 = TAG_Int(10);
+      fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+      once_value_8 = fra.me.REG[2];
+      register_static_object(&once_value_8);
+    } else fra.me.REG[2] = once_value_8;
+    fra.me.REG[2] = fra.me.REG[2];
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+    fra.me.REG[0] = CALL_compiling___compiling_base___CProgram___module_header_name(closctx->REG[1])(closctx->REG[1], fra.me.REG[0]);
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+    if (!once_value_9) {
+      fra.me.REG[0] = BOX_NativeString("\"\n");
+      REGB0 = TAG_Int(2);
+      fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
+      once_value_9 = fra.me.REG[0];
+      register_static_object(&once_value_9);
+    } else fra.me.REG[0] = once_value_9;
+    fra.me.REG[0] = fra.me.REG[0];
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+    fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+    CALL_standard___stream___OStream___write(closctx->REG[3])(closctx->REG[3], fra.me.REG[1]);
+    stack_frame_head = fra.me.prev;
+    return;
   }
-  variable[6] = variable[0];
-  ((compiling_global___MMSrcModule___declare_class_tables_to_c_t)CALL(variable[6],COLOR_compiling_global___MMSrcModule___declare_class_tables_to_c))(variable[6],  variable[4] /*v*/) /*MMSrcModule::declare_class_tables_to_c*/;
-  variable[6] = variable[0];
-  ((compiling_global___MMSrcModule___compile_mod_to_c_t)CALL(variable[6],COLOR_compiling_global___MMSrcModule___compile_mod_to_c))(variable[6],  variable[4] /*v*/) /*MMSrcModule::compile_mod_to_c*/;
-  variable[7] = NEW_String_string___String___init(); /*new String*/
-  variable[8] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-  variable[9] = variable[8];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[9]) /*String::append*/;
-  variable[10] = ((compiling_base___ToolContext___compdir_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___compdir))( variable[1] /*tc*/) /*ToolContext::compdir*/;
-  variable[11] = variable[10];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[11]) /*String::append*/;
-  variable[12] = NEW_String_string___String___with_native(BOX_NativeString("/"), TAG_Int(1)); /*new String*/
-  variable[13] = variable[12];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[13]) /*String::append*/;
-  variable[14] = variable[0];
-  variable[14] = ((abstractmetamodel___MMModule___name_t)CALL(variable[14],COLOR_abstractmetamodel___MMModule___name))(variable[14]) /*MMModule::name*/;
-  variable[15] = variable[14];
-  variable[15] = ((string___String___to_s_t)CALL(variable[15],COLOR_string___Object___to_s))(variable[15]) /*String::to_s*/;
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[15]) /*String::append*/;
-  variable[16] = NEW_String_string___String___with_native(BOX_NativeString("._sep.h"), TAG_Int(7)); /*new String*/
-  variable[17] = variable[16];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[17]) /*String::append*/;
-  variable[8] = NEW_OFStream_file___OFStream___open(variable[7]); /*new OFStream*/
-  variable[7] = variable[8];
-  variable[6] = variable[7];
-  variable[7] = NEW_String_string___String___init(); /*new String*/
-  variable[8] = NEW_String_string___String___with_native(BOX_NativeString("/* This C header file is generated by NIT to compile modules and programs that requires "), TAG_Int(88)); /*new String*/
-  variable[9] = variable[8];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[9]) /*String::append*/;
-  variable[10] = variable[0];
-  variable[10] = ((abstractmetamodel___MMModule___name_t)CALL(variable[10],COLOR_abstractmetamodel___MMModule___name))(variable[10]) /*MMModule::name*/;
-  variable[11] = variable[10];
-  variable[11] = ((string___String___to_s_t)CALL(variable[11],COLOR_string___Object___to_s))(variable[11]) /*String::to_s*/;
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[11]) /*String::append*/;
-  variable[12] = NEW_String_string___String___with_native(BOX_NativeString(". */\n"), TAG_Int(5)); /*new String*/
-  variable[13] = variable[12];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[13]) /*String::append*/;
-  ((file___OFStream___write_t)CALL( variable[6] /*f*/,COLOR_stream___OStream___write))( variable[6] /*f*/, variable[7]) /*OFStream::write*/;
-  variable[7] = NEW_String_string___String___init(); /*new String*/
-  variable[8] = NEW_String_string___String___with_native(BOX_NativeString("#ifndef "), TAG_Int(8)); /*new String*/
-  variable[9] = variable[8];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[9]) /*String::append*/;
-  variable[10] = variable[0];
-  variable[10] = ((abstractmetamodel___MMModule___name_t)CALL(variable[10],COLOR_abstractmetamodel___MMModule___name))(variable[10]) /*MMModule::name*/;
-  variable[11] = variable[10];
-  variable[11] = ((string___String___to_s_t)CALL(variable[11],COLOR_string___Object___to_s))(variable[11]) /*String::to_s*/;
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[11]) /*String::append*/;
-  variable[12] = NEW_String_string___String___with_native(BOX_NativeString("_sep\n"), TAG_Int(5)); /*new String*/
-  variable[13] = variable[12];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[13]) /*String::append*/;
-  ((file___OFStream___write_t)CALL( variable[6] /*f*/,COLOR_stream___OStream___write))( variable[6] /*f*/, variable[7]) /*OFStream::write*/;
-  variable[7] = NEW_String_string___String___init(); /*new String*/
-  variable[8] = NEW_String_string___String___with_native(BOX_NativeString("#define "), TAG_Int(8)); /*new String*/
-  variable[9] = variable[8];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[9]) /*String::append*/;
-  variable[10] = variable[0];
-  variable[10] = ((abstractmetamodel___MMModule___name_t)CALL(variable[10],COLOR_abstractmetamodel___MMModule___name))(variable[10]) /*MMModule::name*/;
-  variable[11] = variable[10];
-  variable[11] = ((string___String___to_s_t)CALL(variable[11],COLOR_string___Object___to_s))(variable[11]) /*String::to_s*/;
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[11]) /*String::append*/;
-  variable[12] = NEW_String_string___String___with_native(BOX_NativeString("_sep\n"), TAG_Int(5)); /*new String*/
-  variable[13] = variable[12];
-  ((string___String___append_t)CALL(variable[7],COLOR_abstract_collection___IndexedCollection___append))(variable[7], variable[13]) /*String::append*/;
-  ((file___OFStream___write_t)CALL( variable[6] /*f*/,COLOR_stream___OStream___write))( variable[6] /*f*/, variable[7]) /*OFStream::write*/;
-  variable[7] = variable[0];
-  variable[7] = ((abstractmetamodel___MMModule___mhe_t)CALL(variable[7],COLOR_abstractmetamodel___MMModule___mhe))(variable[7]) /*MMModule::mhe*/;
-  variable[7] = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable[7],COLOR_partial_order___PartialOrderElement___direct_greaters))(variable[7]) /*PartialOrderElement::direct_greaters*/;
-  variable[7] = ((array___AbstractArray___iterator_t)CALL(variable[7],COLOR_abstract_collection___Collection___iterator))(variable[7]) /*AbstractArray::iterator*/;
-  while (true) { /*for*/
-    variable[8] = ((array___ArrayIterator___is_ok_t)CALL(variable[7],COLOR_abstract_collection___Iterator___is_ok))(variable[7]) /*ArrayIterator::is_ok*/;
-    if (!UNTAG_Bool(variable[8])) break; /*for*/
-    variable[8] = ((array___ArrayIterator___item_t)CALL(variable[7],COLOR_abstract_collection___Iterator___item))(variable[7]) /*ArrayIterator::item*/;
-    variable[9] = variable[8];
-    variable[10] = NEW_String_string___String___init(); /*new String*/
-    variable[11] = NEW_String_string___String___with_native(BOX_NativeString("#include \""), TAG_Int(10)); /*new String*/
-    variable[12] = variable[11];
-    ((string___String___append_t)CALL(variable[10],COLOR_abstract_collection___IndexedCollection___append))(variable[10], variable[12]) /*String::append*/;
-    variable[13] = ((abstractmetamodel___MMModule___name_t)CALL( variable[9] /*m*/,COLOR_abstractmetamodel___MMModule___name))( variable[9] /*m*/) /*MMModule::name*/;
-    variable[14] = variable[13];
-    variable[14] = ((string___String___to_s_t)CALL(variable[14],COLOR_string___Object___to_s))(variable[14]) /*String::to_s*/;
-    ((string___String___append_t)CALL(variable[10],COLOR_abstract_collection___IndexedCollection___append))(variable[10], variable[14]) /*String::append*/;
-    variable[15] = NEW_String_string___String___with_native(BOX_NativeString("._sep.h\"\n"), TAG_Int(9)); /*new String*/
-    variable[16] = variable[15];
-    ((string___String___append_t)CALL(variable[10],COLOR_abstract_collection___IndexedCollection___append))(variable[10], variable[16]) /*String::append*/;
-    ((file___OFStream___write_t)CALL( variable[6] /*f*/,COLOR_stream___OStream___write))( variable[6] /*f*/, variable[10]) /*OFStream::write*/;
-    continue_6: while(0);
-    ((array___ArrayIterator___next_t)CALL(variable[7],COLOR_abstract_collection___Iterator___next))(variable[7]) /*ArrayIterator::next*/;
+void compiling___MMModule___compile_separate_module(val_t p0, val_t p1){
+  struct {struct stack_frame_t me; val_t MORE_REG[9];} fra;
+  val_t REGB0;
+  val_t REGB1;
+  val_t REGB2;
+  val_t tmp;
+  static val_t once_value_1; /* Once value */
+  static val_t once_value_2; /* Once value */
+  static val_t once_value_3; /* Once value */
+    static val_t once_value_4; /* Once value */
+    static val_t once_value_5; /* Once value */
+    static val_t once_value_6; /* Once value */
+    static val_t once_value_7; /* Once value */
+    static val_t once_value_8; /* Once value */
+    static val_t once_value_9; /* Once value */
+    static val_t once_value_10; /* Once value */
+    static val_t once_value_11; /* Once value */
+    static val_t once_value_12; /* Once value */
+    static val_t once_value_13; /* Once value */
+    static val_t once_value_14; /* Once value */
+      static val_t once_value_15; /* Once value */
+  static val_t once_value_16; /* Once value */
+  static val_t once_value_17; /* Once value */
+  static val_t once_value_18; /* Once value */
+  static val_t once_value_19; /* Once value */
+  static val_t once_value_20; /* Once value */
+  static val_t once_value_21; /* Once value */
+  static val_t once_value_22; /* Once value */
+  static val_t once_value_23; /* Once value */
+  static val_t once_value_24; /* Once value */
+  static val_t once_value_25; /* Once value */
+  static val_t once_value_26; /* Once value */
+      static val_t once_value_27; /* Once value */
+      static val_t once_value_28; /* Once value */
+  static val_t once_value_30; /* Once value */
+  static val_t once_value_31; /* Once value */
+  static val_t once_value_32; /* Once value */
+  static val_t once_value_33; /* Once value */
+  static val_t once_value_34; /* Once value */
+  static val_t once_value_35; /* Once value */
+  static val_t once_value_36; /* Once value */
+  static val_t once_value_37; /* Once value */
+  static val_t once_value_38; /* Once value */
+  static val_t once_value_39; /* Once value */
+  static val_t once_value_40; /* Once value */
+  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+  fra.me.file = LOCATE_compiling;
+  fra.me.line = 93;
+  fra.me.meth = LOCATE_compiling___MMModule___compile_separate_module;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 10;
+  fra.me.nitni_local_ref_head = NULL;
+  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[4] = NIT_NULL;
+  fra.me.REG[5] = NIT_NULL;
+  fra.me.REG[6] = NIT_NULL;
+  fra.me.REG[7] = NIT_NULL;
+  fra.me.REG[8] = NIT_NULL;
+  fra.me.REG[9] = NIT_NULL;
+  fra.me.REG[0] = p0;
+  fra.me.REG[1] = p1;
+  /* compiling/compiling.nit:96 */
+  fra.me.REG[2] = CALL_compiling___compiling_base___CProgram___program(fra.me.REG[1])(fra.me.REG[1]);
+  fra.me.REG[2] = CALL_program___Program___tc(fra.me.REG[2])(fra.me.REG[2]);
+  /* compiling/compiling.nit:97 */
+  REGB0 = TAG_Int(3);
+  fra.me.REG[3] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+  if (!once_value_1) {
+    fra.me.REG[4] = BOX_NativeString("Generating C code for module: ");
+    REGB0 = TAG_Int(30);
+    fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB0);
+    once_value_1 = fra.me.REG[4];
+    register_static_object(&once_value_1);
+  } else fra.me.REG[4] = once_value_1;
+  fra.me.REG[4] = fra.me.REG[4];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+  fra.me.REG[4] = CALL_metamodel___abstractmetamodel___MMModule___full_name(fra.me.REG[0])(fra.me.REG[0]);
+  fra.me.REG[4] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+  if (!once_value_2) {
+    fra.me.REG[4] = BOX_NativeString("");
+    REGB0 = TAG_Int(0);
+    fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB0);
+    once_value_2 = fra.me.REG[4];
+    register_static_object(&once_value_2);
+  } else fra.me.REG[4] = once_value_2;
+  fra.me.REG[4] = fra.me.REG[4];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+  fra.me.REG[3] = CALL_standard___string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+  REGB0 = TAG_Int(2);
+  CALL_toolcontext___ToolContext___info(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3], REGB0);
+  /* compiling/compiling.nit:98 */
+  fra.me.REG[3] = NEW_CompilerVisitor_compiling___compiling_base___CompilerVisitor___init(fra.me.REG[0], fra.me.REG[1]);
+  /* compiling/compiling.nit:99 */
+  if (!once_value_3) {
+    fra.me.REG[2] = BOX_NativeString("#include <nit_common.h>");
+    REGB0 = TAG_Int(23);
+    fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+    once_value_3 = fra.me.REG[2];
+    register_static_object(&once_value_3);
+  } else fra.me.REG[2] = once_value_3;
+  fra.me.REG[2] = fra.me.REG[2];
+  CALL_compiling___compiling_base___CompilerVisitor___add_decl(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+  /* compiling/compiling.nit:101 */
+  REGB0 = CALL_metamodel___abstractmetamodel___MMModule___is_extern_hybrid(fra.me.REG[0])(fra.me.REG[0]);
+  if (UNTAG_Bool(REGB0)) {
+    /* compiling/compiling.nit:104 */
+    REGB0 = TAG_Int(3);
+    fra.me.REG[2] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+    if (!once_value_4) {
+      fra.me.REG[4] = BOX_NativeString("");
+      REGB0 = TAG_Int(0);
+      fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB0);
+      once_value_4 = fra.me.REG[4];
+      register_static_object(&once_value_4);
+    } else fra.me.REG[4] = once_value_4;
+    fra.me.REG[4] = fra.me.REG[4];
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[4]);
+    fra.me.REG[4] = CALL_metamodel___abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
+    fra.me.REG[4] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[4]);
+    if (!once_value_5) {
+      fra.me.REG[4] = BOX_NativeString("._nitni.h");
+      REGB0 = TAG_Int(9);
+      fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB0);
+      once_value_5 = fra.me.REG[4];
+      register_static_object(&once_value_5);
+    } else fra.me.REG[4] = once_value_5;
+    fra.me.REG[4] = fra.me.REG[4];
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[4]);
+    fra.me.REG[2] = CALL_standard___string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+    /* compiling/compiling.nit:105 */
+    REGB0 = TAG_Int(3);
+    fra.me.REG[4] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+    if (!once_value_6) {
+      fra.me.REG[5] = BOX_NativeString("#include \"");
+      REGB0 = TAG_Int(10);
+      fra.me.REG[5] = NEW_String_standard___string___String___with_native(fra.me.REG[5], REGB0);
+      once_value_6 = fra.me.REG[5];
+      register_static_object(&once_value_6);
+    } else fra.me.REG[5] = once_value_6;
+    fra.me.REG[5] = fra.me.REG[5];
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+    if (!once_value_7) {
+      fra.me.REG[2] = BOX_NativeString("\"");
+      REGB0 = TAG_Int(1);
+      fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+      once_value_7 = fra.me.REG[2];
+      register_static_object(&once_value_7);
+    } else fra.me.REG[2] = once_value_7;
+    fra.me.REG[2] = fra.me.REG[2];
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+    fra.me.REG[4] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+    CALL_compiling___compiling_base___CompilerVisitor___add_decl(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+    /* compiling/compiling.nit:106 */
+    REGB0 = TAG_Int(3);
+    fra.me.REG[4] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+    if (!once_value_8) {
+      fra.me.REG[2] = BOX_NativeString("");
+      REGB0 = TAG_Int(0);
+      fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+      once_value_8 = fra.me.REG[2];
+      register_static_object(&once_value_8);
+    } else fra.me.REG[2] = once_value_8;
+    fra.me.REG[2] = fra.me.REG[2];
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+    fra.me.REG[2] = CALL_metamodel___abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
+    fra.me.REG[2] = CALL_standard___string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+    if (!once_value_9) {
+      fra.me.REG[2] = BOX_NativeString("._nitni.c");
+      REGB0 = TAG_Int(9);
+      fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+      once_value_9 = fra.me.REG[2];
+      register_static_object(&once_value_9);
+    } else fra.me.REG[2] = once_value_9;
+    fra.me.REG[2] = fra.me.REG[2];
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+    fra.me.REG[4] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+    /* compiling/compiling.nit:107 */
+    fra.me.REG[2] = CALL_compiling___compiling_base___CProgram___files(fra.me.REG[1])(fra.me.REG[1]);
+    REGB0 = TAG_Int(5);
+    fra.me.REG[5] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+    if (!once_value_10) {
+      fra.me.REG[6] = BOX_NativeString("");
+      REGB0 = TAG_Int(0);
+      fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+      once_value_10 = fra.me.REG[6];
+      register_static_object(&once_value_10);
+    } else fra.me.REG[6] = once_value_10;
+    fra.me.REG[6] = fra.me.REG[6];
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
+    fra.me.REG[6] = CALL_compiling___compiling_base___CProgram___compdir(fra.me.REG[1])(fra.me.REG[1]);
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
+    if (!once_value_11) {
+      fra.me.REG[6] = BOX_NativeString("/");
+      REGB0 = TAG_Int(1);
+      fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+      once_value_11 = fra.me.REG[6];
+      register_static_object(&once_value_11);
+    } else fra.me.REG[6] = once_value_11;
+    fra.me.REG[6] = fra.me.REG[6];
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[4]);
+    if (!once_value_12) {
+      fra.me.REG[4] = BOX_NativeString("");
+      REGB0 = TAG_Int(0);
+      fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB0);
+      once_value_12 = fra.me.REG[4];
+      register_static_object(&once_value_12);
+    } else fra.me.REG[4] = once_value_12;
+    fra.me.REG[4] = fra.me.REG[4];
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[4]);
+    fra.me.REG[5] = CALL_standard___string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+    CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[5]);
+    /* compiling/compiling.nit:110 */
+    fra.me.REG[5] = CALL_metamodel___abstractmetamodel___MMModule___location(fra.me.REG[0])(fra.me.REG[0]);
+    fra.me.REG[5] = CALL_location___Location___file(fra.me.REG[5])(fra.me.REG[5]);
+    REGB0 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
+    if (UNTAG_Bool(REGB0)) {
+      nit_abort("Reciever is null", NULL, LOCATE_compiling, 110);
+    }
+    fra.me.REG[5] = CALL_location___SourceFile___filename(fra.me.REG[5])(fra.me.REG[5]);
+    if (!once_value_13) {
+      fra.me.REG[2] = BOX_NativeString(".nit");
+      REGB0 = TAG_Int(4);
+      fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+      once_value_13 = fra.me.REG[2];
+      register_static_object(&once_value_13);
+    } else fra.me.REG[2] = once_value_13;
+    fra.me.REG[2] = fra.me.REG[2];
+    fra.me.REG[2] = CALL_standard___file___String___strip_extension(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[2]);
+    /* compiling/compiling.nit:111 */
+    if (!once_value_14) {
+      fra.me.REG[5] = BOX_NativeString(".nit.c");
+      REGB0 = TAG_Int(6);
+      fra.me.REG[5] = NEW_String_standard___string___String___with_native(fra.me.REG[5], REGB0);
+      once_value_14 = fra.me.REG[5];
+      register_static_object(&once_value_14);
+    } else fra.me.REG[5] = once_value_14;
+    fra.me.REG[5] = fra.me.REG[5];
+    fra.me.REG[5] = CALL_standard___string___String_____plus(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[5]);
+    /* compiling/compiling.nit:112 */
+    REGB0 = CALL_standard___file___String___file_exists(fra.me.REG[5])(fra.me.REG[5]);
+    if (UNTAG_Bool(REGB0)) {
+      /* compiling/compiling.nit:113 */
+      fra.me.REG[4] = CALL_compiling___compiling_base___CProgram___files(fra.me.REG[1])(fra.me.REG[1]);
+      CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+    } else {
+      /* compiling/compiling.nit:115 */
+      if (!once_value_15) {
+        fra.me.REG[4] = BOX_NativeString("_nit.c");
+        REGB0 = TAG_Int(6);
+        fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB0);
+        once_value_15 = fra.me.REG[4];
+        register_static_object(&once_value_15);
+      } else fra.me.REG[4] = once_value_15;
+      fra.me.REG[4] = fra.me.REG[4];
+      fra.me.REG[4] = CALL_standard___string___String_____plus(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[4]);
+      fra.me.REG[5] = fra.me.REG[4];
+      /* compiling/compiling.nit:116 */
+      REGB0 = CALL_standard___file___String___file_exists(fra.me.REG[5])(fra.me.REG[5]);
+      if (UNTAG_Bool(REGB0)) {
+        fra.me.REG[4] = CALL_compiling___compiling_base___CProgram___files(fra.me.REG[1])(fra.me.REG[1]);
+        CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+      }
+    }
+  }
+  /* compiling/compiling.nit:120 */
+  CALL_compiling___compiling_global___MMModule___declare_class_tables_to_c(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
+  /* compiling/compiling.nit:121 */
+  CALL_compiling___compiling_global___MMModule___compile_mod_to_c(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
+  /* compiling/compiling.nit:123 */
+  fra.me.REG[5] = CALL_compiling___compiling_base___CProgram___module_header_name(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+  /* compiling/compiling.nit:124 */
+  REGB0 = TAG_Int(5);
+  fra.me.REG[4] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+  if (!once_value_16) {
+    fra.me.REG[2] = BOX_NativeString("");
+    REGB0 = TAG_Int(0);
+    fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+    once_value_16 = fra.me.REG[2];
+    register_static_object(&once_value_16);
+  } else fra.me.REG[2] = once_value_16;
+  fra.me.REG[2] = fra.me.REG[2];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+  fra.me.REG[2] = CALL_compiling___compiling_base___CProgram___compdir(fra.me.REG[1])(fra.me.REG[1]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+  if (!once_value_17) {
+    fra.me.REG[2] = BOX_NativeString("/");
+    REGB0 = TAG_Int(1);
+    fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+    once_value_17 = fra.me.REG[2];
+    register_static_object(&once_value_17);
+  } else fra.me.REG[2] = once_value_17;
+  fra.me.REG[2] = fra.me.REG[2];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+  if (!once_value_18) {
+    fra.me.REG[2] = BOX_NativeString("");
+    REGB0 = TAG_Int(0);
+    fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+    once_value_18 = fra.me.REG[2];
+    register_static_object(&once_value_18);
+  } else fra.me.REG[2] = once_value_18;
+  fra.me.REG[2] = fra.me.REG[2];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+  fra.me.REG[4] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+  fra.me.REG[4] = NEW_OFStream_standard___file___OFStream___open(fra.me.REG[4]);
+  /* compiling/compiling.nit:125 */
+  REGB0 = TAG_Int(3);
+  fra.me.REG[2] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+  if (!once_value_19) {
+    fra.me.REG[6] = BOX_NativeString("/* This C header file is generated by NIT to compile modules and programs that requires ");
+    REGB0 = TAG_Int(88);
+    fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+    once_value_19 = fra.me.REG[6];
+    register_static_object(&once_value_19);
+  } else fra.me.REG[6] = once_value_19;
+  fra.me.REG[6] = fra.me.REG[6];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  fra.me.REG[6] = CALL_metamodel___abstractmetamodel___MMModule___full_name(fra.me.REG[0])(fra.me.REG[0]);
+  fra.me.REG[6] = CALL_standard___string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  if (!once_value_20) {
+    fra.me.REG[6] = BOX_NativeString(". */\n");
+    REGB0 = TAG_Int(5);
+    fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+    once_value_20 = fra.me.REG[6];
+    register_static_object(&once_value_20);
+  } else fra.me.REG[6] = once_value_20;
+  fra.me.REG[6] = fra.me.REG[6];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  fra.me.REG[2] = CALL_standard___string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+  CALL_standard___stream___OStream___write(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+  /* compiling/compiling.nit:126 */
+  REGB0 = TAG_Int(5);
+  fra.me.REG[2] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+  if (!once_value_21) {
+    fra.me.REG[6] = BOX_NativeString("#ifndef ");
+    REGB0 = TAG_Int(8);
+    fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+    once_value_21 = fra.me.REG[6];
+    register_static_object(&once_value_21);
+  } else fra.me.REG[6] = once_value_21;
+  fra.me.REG[6] = fra.me.REG[6];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  fra.me.REG[6] = CALL_compiling___compiling_base___MMModule___cname(fra.me.REG[0])(fra.me.REG[0]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  if (!once_value_22) {
+    fra.me.REG[6] = BOX_NativeString("");
+    REGB0 = TAG_Int(0);
+    fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+    once_value_22 = fra.me.REG[6];
+    register_static_object(&once_value_22);
+  } else fra.me.REG[6] = once_value_22;
+  fra.me.REG[6] = fra.me.REG[6];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  fra.me.REG[6] = CALL_compiling___compiling_base___CProgram___get_file_ending(fra.me.REG[1])(fra.me.REG[1]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  if (!once_value_23) {
+    fra.me.REG[6] = BOX_NativeString("\n");
+    REGB0 = TAG_Int(1);
+    fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+    once_value_23 = fra.me.REG[6];
+    register_static_object(&once_value_23);
+  } else fra.me.REG[6] = once_value_23;
+  fra.me.REG[6] = fra.me.REG[6];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  fra.me.REG[2] = CALL_standard___string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+  CALL_standard___stream___OStream___write(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+  /* compiling/compiling.nit:127 */
+  REGB0 = TAG_Int(5);
+  fra.me.REG[2] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+  if (!once_value_24) {
+    fra.me.REG[6] = BOX_NativeString("#define ");
+    REGB0 = TAG_Int(8);
+    fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+    once_value_24 = fra.me.REG[6];
+    register_static_object(&once_value_24);
+  } else fra.me.REG[6] = once_value_24;
+  fra.me.REG[6] = fra.me.REG[6];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  fra.me.REG[6] = CALL_compiling___compiling_base___MMModule___cname(fra.me.REG[0])(fra.me.REG[0]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  if (!once_value_25) {
+    fra.me.REG[6] = BOX_NativeString("");
+    REGB0 = TAG_Int(0);
+    fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+    once_value_25 = fra.me.REG[6];
+    register_static_object(&once_value_25);
+  } else fra.me.REG[6] = once_value_25;
+  fra.me.REG[6] = fra.me.REG[6];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  fra.me.REG[6] = CALL_compiling___compiling_base___CProgram___get_file_ending(fra.me.REG[1])(fra.me.REG[1]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  if (!once_value_26) {
+    fra.me.REG[6] = BOX_NativeString("\n");
+    REGB0 = TAG_Int(1);
+    fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+    once_value_26 = fra.me.REG[6];
+    register_static_object(&once_value_26);
+  } else fra.me.REG[6] = once_value_26;
+  fra.me.REG[6] = fra.me.REG[6];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+  fra.me.REG[2] = CALL_standard___string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+  CALL_standard___stream___OStream___write(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+  /* compiling/compiling.nit:128 */
+  fra.me.REG[2] = CALL_metamodel___abstractmetamodel___MMModule___mhe(fra.me.REG[0])(fra.me.REG[0]);
+  REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+  if (UNTAG_Bool(REGB0)) {
+    nit_abort("Reciever is null", NULL, LOCATE_compiling, 128);
+  }
+  fra.me.REG[2] = CALL_metamodel___partial_order___PartialOrderElement___direct_greaters(fra.me.REG[2])(fra.me.REG[2]);
+  /* ../lib/standard/collection/array.nit:269 */
+  REGB0 = TAG_Int(0);
+  /* ../lib/standard/collection/array.nit:270 */
+  REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+  if (UNTAG_Bool(REGB1)) {
+  } else {
+    nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
+  }
+  REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
+  /* ../lib/standard/collection/array.nit:271 */
+  fra.me.REG[6] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
+  /* ../lib/standard/collection/array.nit:272 */
+  while(1) {
+    /* ../lib/standard/collection/array.nit:24 */
+    REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+    if (UNTAG_Bool(REGB1)) {
+    } else {
+      nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
+    }
+    REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
+    REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
+    if (UNTAG_Bool(REGB2)) {
+    } else {
+      nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
+    }
+    /* ../lib/standard/kernel.nit:232 */
+    REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+    /* ../lib/standard/collection/array.nit:272 */
+    if (UNTAG_Bool(REGB1)) {
+      /* ../lib/standard/collection/array.nit:273 */
+      REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
+      if (UNTAG_Bool(REGB1)) {
+        nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
+      }
+      /* ../lib/standard/collection/array.nit:718 */
+      fra.me.REG[7] = ((Nit_NativeArray)fra.me.REG[6])->val[UNTAG_Int(REGB0)];
+      /* compiling/compiling.nit:128 */
+      REGB1 = TAG_Int(3);
+      fra.me.REG[8] = NEW_Array_standard___collection___array___Array___with_capacity(REGB1);
+      if (!once_value_27) {
+        fra.me.REG[9] = BOX_NativeString("#include \"");
+        REGB1 = TAG_Int(10);
+        fra.me.REG[9] = NEW_String_standard___string___String___with_native(fra.me.REG[9], REGB1);
+        once_value_27 = fra.me.REG[9];
+        register_static_object(&once_value_27);
+      } else fra.me.REG[9] = once_value_27;
+      fra.me.REG[9] = fra.me.REG[9];
+      CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[8])(fra.me.REG[8], fra.me.REG[9]);
+      fra.me.REG[7] = CALL_compiling___compiling_base___CProgram___module_header_name(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+      CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[8])(fra.me.REG[8], fra.me.REG[7]);
+      if (!once_value_28) {
+        fra.me.REG[7] = BOX_NativeString("\"\n");
+        REGB1 = TAG_Int(2);
+        fra.me.REG[7] = NEW_String_standard___string___String___with_native(fra.me.REG[7], REGB1);
+        once_value_28 = fra.me.REG[7];
+        register_static_object(&once_value_28);
+      } else fra.me.REG[7] = once_value_28;
+      fra.me.REG[7] = fra.me.REG[7];
+      CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[8])(fra.me.REG[8], fra.me.REG[7]);
+      fra.me.REG[8] = CALL_standard___string___Object___to_s(fra.me.REG[8])(fra.me.REG[8]);
+      CALL_standard___stream___OStream___write(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[8]);
+      /* ../lib/standard/collection/array.nit:274 */
+      REGB1 = TAG_Int(1);
+      /* ../lib/standard/kernel.nit:235 */
+      REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
+      /* ../lib/standard/collection/array.nit:274 */
+      REGB0 = REGB1;
+    } else {
+      /* ../lib/standard/collection/array.nit:272 */
+      goto label29;
+    }
   }
-  break_6: while(0);
-  variable[7] = ((compiling_base___CompilerVisitor___ctx_t)CALL( variable[4] /*v*/,COLOR_compiling_base___CompilerVisitor___ctx))( variable[4] /*v*/) /*CompilerVisitor::ctx*/;
-  variable[7] = ((compiling_base___CContext___decls_t)CALL(variable[7],COLOR_compiling_base___CContext___decls))(variable[7]) /*CContext::decls*/;
-  variable[8] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
-  variable[7] = ((string___Collection___join_t)CALL(variable[7],COLOR_string___Collection___join))(variable[7], variable[8]) /*Collection::join*/;
-  ((file___OFStream___write_t)CALL( variable[6] /*f*/,COLOR_stream___OStream___write))( variable[6] /*f*/, variable[7]) /*OFStream::write*/;
-  variable[7] = NEW_String_string___String___with_native(BOX_NativeString("\n#endif\n"), TAG_Int(8)); /*new String*/
-  ((file___OFStream___write_t)CALL( variable[6] /*f*/,COLOR_stream___OStream___write))( variable[6] /*f*/, variable[7]) /*OFStream::write*/;
-  ((file___OFStream___close_t)CALL( variable[6] /*f*/,COLOR_stream___IOS___close))( variable[6] /*f*/) /*OFStream::close*/;
-  variable[8] = NEW_String_string___String___init(); /*new String*/
-  variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
-  variable[10] = variable[9];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[10]) /*String::append*/;
-  variable[11] = ((compiling_base___ToolContext___compdir_t)CALL( variable[1] /*tc*/,COLOR_compiling_base___ToolContext___compdir))( variable[1] /*tc*/) /*ToolContext::compdir*/;
-  variable[12] = variable[11];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[12]) /*String::append*/;
-  variable[13] = NEW_String_string___String___with_native(BOX_NativeString("/"), TAG_Int(1)); /*new String*/
-  variable[14] = variable[13];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[14]) /*String::append*/;
-  variable[15] = variable[0];
-  variable[15] = ((abstractmetamodel___MMModule___name_t)CALL(variable[15],COLOR_abstractmetamodel___MMModule___name))(variable[15]) /*MMModule::name*/;
-  variable[16] = variable[15];
-  variable[16] = ((string___String___to_s_t)CALL(variable[16],COLOR_string___Object___to_s))(variable[16]) /*String::to_s*/;
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[16]) /*String::append*/;
-  variable[17] = NEW_String_string___String___with_native(BOX_NativeString("._sep.c"), TAG_Int(7)); /*new String*/
-  variable[18] = variable[17];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[18]) /*String::append*/;
-  variable[9] = NEW_OFStream_file___OFStream___open(variable[8]); /*new OFStream*/
-  variable[8] = variable[9];
-  variable[7] = variable[8];
-  variable[8] = NEW_String_string___String___init(); /*new String*/
-  variable[9] = NEW_String_string___String___with_native(BOX_NativeString("/* This C file is generated by NIT to compile module "), TAG_Int(53)); /*new String*/
-  variable[10] = variable[9];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[10]) /*String::append*/;
-  variable[11] = variable[0];
-  variable[11] = ((abstractmetamodel___MMModule___name_t)CALL(variable[11],COLOR_abstractmetamodel___MMModule___name))(variable[11]) /*MMModule::name*/;
-  variable[12] = variable[11];
-  variable[12] = ((string___String___to_s_t)CALL(variable[12],COLOR_string___Object___to_s))(variable[12]) /*String::to_s*/;
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[12]) /*String::append*/;
-  variable[13] = NEW_String_string___String___with_native(BOX_NativeString(". */\n"), TAG_Int(5)); /*new String*/
-  variable[14] = variable[13];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[14]) /*String::append*/;
-  ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
-  variable[8] = NEW_String_string___String___init(); /*new String*/
-  variable[9] = NEW_String_string___String___with_native(BOX_NativeString("#include \""), TAG_Int(10)); /*new String*/
-  variable[10] = variable[9];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[10]) /*String::append*/;
-  variable[11] = variable[0];
-  variable[11] = ((abstractmetamodel___MMModule___name_t)CALL(variable[11],COLOR_abstractmetamodel___MMModule___name))(variable[11]) /*MMModule::name*/;
-  variable[12] = variable[11];
-  variable[12] = ((string___String___to_s_t)CALL(variable[12],COLOR_string___Object___to_s))(variable[12]) /*String::to_s*/;
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[12]) /*String::append*/;
-  variable[13] = NEW_String_string___String___with_native(BOX_NativeString("._sep.h\"\n"), TAG_Int(9)); /*new String*/
-  variable[14] = variable[13];
-  ((string___String___append_t)CALL(variable[8],COLOR_abstract_collection___IndexedCollection___append))(variable[8], variable[14]) /*String::append*/;
-  ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
-  variable[8] = ((compiling_base___CompilerVisitor___ctx_t)CALL( variable[4] /*v*/,COLOR_compiling_base___CompilerVisitor___ctx))( variable[4] /*v*/) /*CompilerVisitor::ctx*/;
-  variable[8] = ((compiling_base___CContext___instrs_t)CALL(variable[8],COLOR_compiling_base___CContext___instrs))(variable[8]) /*CContext::instrs*/;
-  variable[9] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
-  variable[8] = ((string___Collection___join_t)CALL(variable[8],COLOR_string___Collection___join))(variable[8], variable[9]) /*Collection::join*/;
-  ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
-  variable[8] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
-  ((file___OFStream___write_t)CALL( variable[7] /*f*/,COLOR_stream___OStream___write))( variable[7] /*f*/, variable[8]) /*OFStream::write*/;
-  ((file___OFStream___close_t)CALL( variable[7] /*f*/,COLOR_stream___IOS___close))( variable[7] /*f*/) /*OFStream::close*/;
-  return_label5: while(false);
-  tracehead = trace.prev;
+  label29: while(0);
+  /* compiling/compiling.nit:129 */
+  fra.me.REG[6] = CALL_compiling___compiling_base___CompilerVisitor___header_writer(fra.me.REG[3])(fra.me.REG[3]);
+  CALL_compiling___compiling_writer___Writer___write_to_stream(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[4]);
+  /* compiling/compiling.nit:130 */
+  if (!once_value_30) {
+    fra.me.REG[6] = BOX_NativeString("#endif\n");
+    REGB0 = TAG_Int(7);
+    fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+    once_value_30 = fra.me.REG[6];
+    register_static_object(&once_value_30);
+  } else fra.me.REG[6] = once_value_30;
+  fra.me.REG[6] = fra.me.REG[6];
+  CALL_standard___stream___OStream___write(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[6]);
+  /* compiling/compiling.nit:131 */
+  CALL_standard___stream___IOS___close(fra.me.REG[4])(fra.me.REG[4]);
+  /* compiling/compiling.nit:133 */
+  REGB0 = TAG_Int(7);
+  fra.me.REG[6] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+  if (!once_value_31) {
+    fra.me.REG[2] = BOX_NativeString("");
+    REGB0 = TAG_Int(0);
+    fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+    once_value_31 = fra.me.REG[2];
+    register_static_object(&once_value_31);
+  } else fra.me.REG[2] = once_value_31;
+  fra.me.REG[2] = fra.me.REG[2];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+  fra.me.REG[2] = CALL_compiling___compiling_base___CProgram___compdir(fra.me.REG[1])(fra.me.REG[1]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+  if (!once_value_32) {
+    fra.me.REG[2] = BOX_NativeString("/");
+    REGB0 = TAG_Int(1);
+    fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+    once_value_32 = fra.me.REG[2];
+    register_static_object(&once_value_32);
+  } else fra.me.REG[2] = once_value_32;
+  fra.me.REG[2] = fra.me.REG[2];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+  fra.me.REG[2] = CALL_compiling___compiling_base___MMModule___cname(fra.me.REG[0])(fra.me.REG[0]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+  if (!once_value_33) {
+    fra.me.REG[2] = BOX_NativeString(".");
+    REGB0 = TAG_Int(1);
+    fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+    once_value_33 = fra.me.REG[2];
+    register_static_object(&once_value_33);
+  } else fra.me.REG[2] = once_value_33;
+  fra.me.REG[2] = fra.me.REG[2];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+  fra.me.REG[2] = CALL_compiling___compiling_base___CProgram___get_file_ending(fra.me.REG[1])(fra.me.REG[1]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+  if (!once_value_34) {
+    fra.me.REG[2] = BOX_NativeString(".c");
+    REGB0 = TAG_Int(2);
+    fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+    once_value_34 = fra.me.REG[2];
+    register_static_object(&once_value_34);
+  } else fra.me.REG[2] = once_value_34;
+  fra.me.REG[2] = fra.me.REG[2];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+  fra.me.REG[6] = CALL_standard___string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
+  /* compiling/compiling.nit:134 */
+  fra.me.REG[1] = CALL_compiling___compiling_base___CProgram___files(fra.me.REG[1])(fra.me.REG[1]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[6]);
+  /* compiling/compiling.nit:135 */
+  REGB0 = TAG_Int(3);
+  fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+  if (!once_value_35) {
+    fra.me.REG[2] = BOX_NativeString("");
+    REGB0 = TAG_Int(0);
+    fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+    once_value_35 = fra.me.REG[2];
+    register_static_object(&once_value_35);
+  } else fra.me.REG[2] = once_value_35;
+  fra.me.REG[2] = fra.me.REG[2];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[6]);
+  if (!once_value_36) {
+    fra.me.REG[6] = BOX_NativeString("");
+    REGB0 = TAG_Int(0);
+    fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+    once_value_36 = fra.me.REG[6];
+    register_static_object(&once_value_36);
+  } else fra.me.REG[6] = once_value_36;
+  fra.me.REG[6] = fra.me.REG[6];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[6]);
+  fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+  fra.me.REG[1] = NEW_OFStream_standard___file___OFStream___open(fra.me.REG[1]);
+  fra.me.REG[4] = fra.me.REG[1];
+  /* compiling/compiling.nit:136 */
+  REGB0 = TAG_Int(3);
+  fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+  if (!once_value_37) {
+    fra.me.REG[6] = BOX_NativeString("/* This C file is generated by NIT to compile module ");
+    REGB0 = TAG_Int(53);
+    fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB0);
+    once_value_37 = fra.me.REG[6];
+    register_static_object(&once_value_37);
+  } else fra.me.REG[6] = once_value_37;
+  fra.me.REG[6] = fra.me.REG[6];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[6]);
+  fra.me.REG[0] = CALL_compiling___compiling_base___MMModule___cname(fra.me.REG[0])(fra.me.REG[0]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+  if (!once_value_38) {
+    fra.me.REG[0] = BOX_NativeString(". */\n");
+    REGB0 = TAG_Int(5);
+    fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
+    once_value_38 = fra.me.REG[0];
+    register_static_object(&once_value_38);
+  } else fra.me.REG[0] = once_value_38;
+  fra.me.REG[0] = fra.me.REG[0];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+  fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+  CALL_standard___stream___OStream___write(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
+  /* compiling/compiling.nit:137 */
+  REGB0 = TAG_Int(3);
+  fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+  if (!once_value_39) {
+    fra.me.REG[0] = BOX_NativeString("#include \"");
+    REGB0 = TAG_Int(10);
+    fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
+    once_value_39 = fra.me.REG[0];
+    register_static_object(&once_value_39);
+  } else fra.me.REG[0] = once_value_39;
+  fra.me.REG[0] = fra.me.REG[0];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+  if (!once_value_40) {
+    fra.me.REG[5] = BOX_NativeString("\"\n");
+    REGB0 = TAG_Int(2);
+    fra.me.REG[5] = NEW_String_standard___string___String___with_native(fra.me.REG[5], REGB0);
+    once_value_40 = fra.me.REG[5];
+    register_static_object(&once_value_40);
+  } else fra.me.REG[5] = once_value_40;
+  fra.me.REG[5] = fra.me.REG[5];
+  CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+  fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+  CALL_standard___stream___OStream___write(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
+  /* compiling/compiling.nit:138 */
+  fra.me.REG[3] = CALL_compiling___compiling_base___CompilerVisitor___top_writer(fra.me.REG[3])(fra.me.REG[3]);
+  CALL_compiling___compiling_writer___Writer___write_to_stream(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+  /* compiling/compiling.nit:139 */
+  CALL_standard___stream___IOS___close(fra.me.REG[4])(fra.me.REG[4]);
+  stack_frame_head = fra.me.prev;
   return;
 }