-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};
- static val_t once_value_2 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_4 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_5 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_6 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_7 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_8 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_9 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_10 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_11 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_12 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_13 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_14 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_15 = NIT_NULL; /* Once value for string variable[8]*/
- static val_t once_value_16 = NIT_NULL; /* Once value for string variable[8]*/
- static val_t once_value_17 = NIT_NULL; /* Once value for string variable[8]*/
- static val_t once_value_18 = NIT_NULL; /* Once value for string variable[8]*/
- static val_t once_value_19 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_20 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_21 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_22 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_23 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_24 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_25 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_26 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_27 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_28 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_29 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_30 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_31 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_32 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_33 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_34 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_35 = NIT_NULL; /* Once value for string variable[8]*/
- static val_t once_value_36 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_37 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_38 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_39 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_40 = NIT_NULL; /* Once value for string variable[10]*/
- val_t variable[12];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = CALL_abstractmetamodel___MMModule___mhe(variable[0])(variable[0]) /*MMModule::mhe*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_partial_order___PartialOrderElement___greaters_and_self(variable[3])(variable[3]) /*PartialOrderElement::greaters_and_self*/;
- /* Register variable[3]: For iterator */
- variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*Collection::iterator*/;
- while (true) { /*for*/
- /* Register variable[4]: For 'is_ok' result */
- variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[4])) break; /*for*/
- variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[5]: Local variable */
- variable[5] = variable[4];
- /* Register variable[6]: Result */
- 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);}
- CALL_compiling_global___MMSrcModule___local_analysis( variable[5] /*m*/)( variable[5] /*m*/, variable[1] /*tc*/) /*MMSrcModule::local_analysis*/;
- continue_1: while(0);
- CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
- }
- break_1: while(0);
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = CALL_compiling_global___MMSrcModule___global_analysis(variable[0])(variable[0], variable[1] /*tc*/) /*MMSrcModule::global_analysis*/;
- variable[3] = variable[4];
- /* Register variable[4]: Result */
- variable[4] = CALL_compiling_base___ToolContext___compdir( variable[1] /*tc*/)( variable[1] /*tc*/) /*ToolContext::compdir*/;
- CALL_file___String___mkdir(variable[4])(variable[4]) /*String::mkdir*/;
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = NEW_Array_array___Array___init() /*new Array[String]*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = NEW_ArraySet_array___ArraySet___init() /*new ArraySet[String]*/;
- variable[5] = variable[6];
- /* Register variable[6]: Once String constant */
- if (once_value_2 != NIT_NULL) variable[6] = once_value_2;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("$CLIBDIR/nit_main.c"), TAG_Int(19)) /*new String*/;
- once_value_2 = variable[6];
- }
- /* Register variable[6]: Result */
- CALL_abstract_collection___SimpleCollection___add( variable[4] /*files*/)( variable[4] /*files*/, variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstractmetamodel___MMModule___mhe(variable[0])(variable[0]) /*MMModule::mhe*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_partial_order___PartialOrderElement___greaters_and_self(variable[6])(variable[6]) /*PartialOrderElement::greaters_and_self*/;
- /* Register variable[6]: For iterator */
- variable[6] = CALL_abstract_collection___Collection___iterator(variable[6])(variable[6]) /*Collection::iterator*/;
- while (true) { /*for*/
- /* Register variable[7]: For 'is_ok' result */
- variable[7] = CALL_abstract_collection___Iterator___is_ok(variable[6])(variable[6]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[7])) break; /*for*/
- variable[7] = CALL_abstract_collection___Iterator___item(variable[6])(variable[6]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[8]: Local variable */
- variable[8] = variable[7];
- /* Register variable[9]: Result */
- 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_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[10]: Once String constant */
- if (once_value_4 != NIT_NULL) variable[10] = once_value_4;
- else {
- variable[10] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_4 = variable[10];
- }
- /* Register variable[10]: Result */
- /* Ensure var variable[10]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[10]) /*AbstractArray::add*/;
- /* Register variable[10]: Result */
- variable[10] = CALL_compiling_base___ToolContext___compdir( variable[1] /*tc*/)( variable[1] /*tc*/) /*ToolContext::compdir*/;
- /* Ensure var variable[10]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[10]) /*AbstractArray::add*/;
- /* Register variable[10]: Once String constant */
- if (once_value_5 != NIT_NULL) variable[10] = once_value_5;
- else {
- variable[10] = NEW_String_string___String___with_native(BOX_NativeString("/"), TAG_Int(1)) /*new String*/;
- once_value_5 = variable[10];
- }
- /* Register variable[10]: Result */
- /* Ensure var variable[10]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[10]) /*AbstractArray::add*/;
- /* Register variable[10]: Result */
- variable[10] = CALL_abstractmetamodel___MMModule___name( variable[8] /*m*/)( variable[8] /*m*/) /*MMModule::name*/;
- /* Ensure var variable[10]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], CALL_string___Object___to_s(variable[10])(variable[10]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[10]: Once String constant */
- if (once_value_6 != NIT_NULL) variable[10] = once_value_6;
- else {
- variable[10] = NEW_String_string___String___with_native(BOX_NativeString("._sep.c"), TAG_Int(7)) /*new String*/;
- once_value_6 = variable[10];
- }
- /* Register variable[10]: Result */
- /* Ensure var variable[10]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[10]) /*AbstractArray::add*/;
- /* Register variable[9]: Result */
- variable[9] = CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/;
- CALL_abstract_collection___SimpleCollection___add( variable[4] /*files*/)( variable[4] /*files*/, variable[9]) /*AbstractArray::add*/;
- CALL_compiling___MMSrcModule___compile_separate_module( variable[8] /*m*/)( variable[8] /*m*/, variable[1] /*tc*/, variable[3] /*ga*/) /*MMSrcModule::compile_separate_module*/;
- /* Register variable[9]: Local variable */
- /* Register variable[10]: Result */
- variable[10] = CALL_abstractmetamodel___MMModule___filename( variable[8] /*m*/)( variable[8] /*m*/) /*MMModule::filename*/;
- /* Register variable[11]: Once String constant */
- if (once_value_7 != NIT_NULL) variable[11] = once_value_7;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString(".nit"), TAG_Int(4)) /*new String*/;
- once_value_7 = variable[11];
- }
- /* Register variable[11]: Result */
- /* Register variable[10]: Result */
- variable[10] = CALL_file___String___strip_extension(variable[10])(variable[10], variable[11]) /*String::strip_extension*/;
- variable[9] = variable[10];
- /* Register variable[10]: Once String constant */
- if (once_value_8 != NIT_NULL) variable[10] = once_value_8;
- else {
- variable[10] = NEW_String_string___String___with_native(BOX_NativeString("_nit.h"), TAG_Int(6)) /*new String*/;
- once_value_8 = variable[10];
- }
- /* Register variable[10]: Result */
- /* Register variable[10]: Result */
- variable[10] = CALL_string___String_____plus( variable[9] /*native_name*/)( variable[9] /*native_name*/, variable[10]) /*String::+*/;
- /* Register variable[10]: Result */
- variable[10] = CALL_file___String___file_exists(variable[10])(variable[10]) /*String::file_exists*/;
- if (UNTAG_Bool(variable[10])) { /*if*/
- variable[10] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[11]: Once String constant */
- if (once_value_9 != NIT_NULL) variable[11] = once_value_9;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString("-I "), TAG_Int(3)) /*new String*/;
- once_value_9 = variable[11];
- }
- /* Register variable[11]: Result */
- /* Ensure var variable[11]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[10])(variable[10], variable[11]) /*AbstractArray::add*/;
- /* Register variable[11]: Result */
- variable[11] = CALL_file___String___dirname( variable[9] /*native_name*/)( variable[9] /*native_name*/) /*String::dirname*/;
- /* Ensure var variable[11]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[10])(variable[10], variable[11]) /*AbstractArray::add*/;
- /* Register variable[11]: Once String constant */
- if (once_value_10 != NIT_NULL) variable[11] = once_value_10;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_10 = variable[11];
- }
- /* Register variable[11]: Result */
- /* Ensure var variable[11]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[10])(variable[10], variable[11]) /*AbstractArray::add*/;
- /* Register variable[10]: Result */
- variable[10] = CALL_string___Object___to_s(variable[10])(variable[10]) /*Object::to_s*/;
- CALL_abstract_collection___SimpleCollection___add( variable[5] /*includes*/)( variable[5] /*includes*/, variable[10]) /*ArraySet::add*/;