/* This C file is generated by NIT to compile module compiling_global. */
#include "compiling_global._sep.h"
-val_t compiling_global___ColorContext___color(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 28, LOCATE_compiling_global___ColorContext___color};
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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] = ATTR_compiling_global___ColorContext____colors(variable[0]) /*ColorContext::_colors*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___MapRead_____bra(variable[3])(variable[3], variable[1] /*e*/) /*CoupleMap::[]*/;
- variable[2] = variable[3];
- goto return_label0;
- return_label0: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-val_t compiling_global___ColorContext___has_color(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 34, LOCATE_compiling_global___ColorContext___has_color};
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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] = ATTR_compiling_global___ColorContext____colors(variable[0]) /*ColorContext::_colors*/;
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], NIT_NULL /*null*/) /*Object::==*/)))))));
- /* Ensure var variable[3]: Left 'and' operand*/
- if (UNTAG_Bool(variable[3])) { /* and */
- /* Register variable[3]: Result */
- variable[3] = ATTR_compiling_global___ColorContext____colors(variable[0]) /*ColorContext::_colors*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___MapRead___has_key(variable[3])(variable[3], variable[1] /*e*/) /*CoupleMap::has_key*/;
- }
- /* Register variable[3]: Result */
- variable[2] = variable[3];
- goto return_label1;
- return_label1: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-void compiling_global___ColorContext___color__eq(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 40, LOCATE_compiling_global___ColorContext___color__eq};
- val_t variable[10];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Result */
- variable[4] = ATTR_compiling_global___ColorContext____colors(variable[0]) /*ColorContext::_colors*/;
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool((variable[4] == NIT_NULL /*null*/) || ((variable[4] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[4])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[4], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[4])(variable[4], NIT_NULL /*null*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable[4])) { /*if*/
- /* Register variable[4]: Result */
- variable[4] = NEW_HashMap_hash___HashMap___init() /*new HashMap[TableElt, Int]*/;
- ATTR_compiling_global___ColorContext____colors(variable[0]) /*ColorContext::_colors*/ = variable[4];
+void compiling_global___Program___compile_tables_to_c(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[7];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ 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_12; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 24;
+ fra.me.meth = LOCATE_compiling_global___Program___compile_tables_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 8;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./compiling//compiling_global.nit:27 */
+ fra.me.REG[2] = CALL_program___Program___main_module(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_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_global, 27);
}
- /* Register variable[4]: Result */
- variable[4] = ATTR_compiling_global___ColorContext____colors(variable[0]) /*ColorContext::_colors*/;
- CALL_abstract_collection___Map_____braeq(variable[4])(variable[4], variable[1] /*e*/, variable[2] /*c*/) /*HashMap::[]=*/;
- /* Register variable[4]: Local variable */
- variable[4] = variable[2] /*c*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_compiling_global___TableElt___length( variable[1] /*e*/)( variable[1] /*e*/) /*TableElt::length*/;
- /* Register variable[5]: Result */
- variable[5] = NEW_Range_range___Range___without_last( TAG_Int(0), variable[5]) /*new Range[Int]*/;
- /* Register variable[5]: For iterator */
- variable[5] = CALL_abstract_collection___Collection___iterator(variable[5])(variable[5]) /*Range::iterator*/;
- while (true) { /*for*/
- /* Register variable[6]: For 'is_ok' result */
- variable[6] = CALL_abstract_collection___Iterator___is_ok(variable[5])(variable[5]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[6])) break; /*for*/
- variable[6] = CALL_abstract_collection___Iterator___item(variable[5])(variable[5]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[7]: Local variable */
- variable[7] = variable[6];
- /* Register variable[8]: Result */
- variable[8] = ATTR_compiling_global___ColorContext____colors(variable[0]) /*ColorContext::_colors*/;
- /* Register variable[9]: Result */
- variable[9] = CALL_compiling_global___TableElt___item( variable[1] /*e*/)( variable[1] /*e*/, variable[7] /*i*/) /*TableElt::item*/;
- CALL_abstract_collection___Map_____braeq(variable[8])(variable[8], variable[9], variable[4] /*idx*/) /*HashMap::[]=*/;
- /* Register variable[8]: Result */
- variable[8] = TAG_Int(UNTAG_Int( variable[4] /*idx*/)+UNTAG_Int( TAG_Int(1)));
- variable[4] = variable[8] /*idx=*/;
- continue_3: while(0);
- CALL_abstract_collection___Iterator___next(variable[5])(variable[5]) /*Iterator::next*/;
+ fra.me.REG[2] = CALL_partial_order___PartialOrderElement___greaters_and_self(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[2])(fra.me.REG[2], (&(fra.me)), ((fun_t)OC_compiling_global___Program___compile_tables_to_c_1));
+ CALL_program___Program___with_each_live_local_classes(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_compiling_global___Program___compile_tables_to_c_2));
+ /* ./compiling//compiling_global.nit:36 */
+ if (!once_value_4) {
+ fra.me.REG[2] = BOX_NativeString("classtable_t TAG2VFT[4] = {NULL");
+ REGB0 = TAG_Int(31);
+ fra.me.REG[2] = NEW_String_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];
+ fra.me.REG[2] = NEW_Buffer_string___Buffer___from(fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:37 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_5) {
+ fra.me.REG[4] = BOX_NativeString("Int");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ if (!once_value_6) {
+ fra.me.REG[4] = BOX_NativeString("Char");
+ REGB0 = TAG_Int(4);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
+ once_value_6 = fra.me.REG[4];
+ register_static_object(&once_value_6);
+ } else fra.me.REG[4] = once_value_6;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ if (!once_value_7) {
+ fra.me.REG[4] = BOX_NativeString("Bool");
+ REGB0 = TAG_Int(4);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
+ once_value_7 = fra.me.REG[4];
+ register_static_object(&once_value_7);
+ } else fra.me.REG[4] = once_value_7;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB0 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
}
- break_3: while(0);
- return_label2: while(false);
- tracehead = trace.prev;
- return;
-}
-void compiling_global___ColorContext___init(val_t self, int* init_table) {
- struct trace_t trace = {NULL, NULL, 0, LOCATE_compiling_global___ColorContext___init};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return;
-}
-val_t compiling_global___GlobalAnalysis___compiled_classes(val_t self) {
- struct trace_t trace = {NULL, NULL, 56, LOCATE_compiling_global___GlobalAnalysis___compiled_classes};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___GlobalAnalysis____compiled_classes( self) /*GlobalAnalysis::_compiled_classes*/;
-}
-val_t compiling_global___GlobalAnalysis___module(val_t self) {
- struct trace_t trace = {NULL, NULL, 59, LOCATE_compiling_global___GlobalAnalysis___module};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___GlobalAnalysis____module( self) /*GlobalAnalysis::_module*/;
-}
-val_t compiling_global___GlobalAnalysis___max_class_table_length(val_t self) {
- struct trace_t trace = {NULL, NULL, 62, LOCATE_compiling_global___GlobalAnalysis___max_class_table_length};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___GlobalAnalysis____max_class_table_length( self) /*GlobalAnalysis::_max_class_table_length*/;
-}
-void compiling_global___GlobalAnalysis___max_class_table_length__eq(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 62, LOCATE_compiling_global___GlobalAnalysis___max_class_table_length__eq};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- ATTR_compiling_global___GlobalAnalysis____max_class_table_length( self) /*GlobalAnalysis::_max_class_table_length*/ = param0;
- tracehead = trace.prev;
- return;
-}
-void compiling_global___GlobalAnalysis___init(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, NULL, 65, LOCATE_compiling_global___GlobalAnalysis___init};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_GlobalAnalysis].i]) return;
- /* Register variable[2]: Method return value and escape marker */
- ATTR_compiling_global___GlobalAnalysis____module(variable[0]) /*GlobalAnalysis::_module*/ = variable[1] /*module*/;
- return_label4: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_GlobalAnalysis].i] = 1;
- tracehead = trace.prev;
- return;
-}
-val_t compiling_global___GlobalCompilerVisitor___global_analysis(val_t self) {
- struct trace_t trace = {NULL, NULL, 73, LOCATE_compiling_global___GlobalCompilerVisitor___global_analysis};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___GlobalCompilerVisitor____global_analysis( self) /*GlobalCompilerVisitor::_global_analysis*/;
-}
-void compiling_global___GlobalCompilerVisitor___init(val_t self, val_t param0, val_t param1, val_t param2, int* init_table) {
- struct trace_t trace = {NULL, NULL, 75, LOCATE_compiling_global___GlobalCompilerVisitor___init};
- val_t variable[5];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Local variable */
- variable[3] = param2;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_GlobalCompilerVisitor].i]) return;
- /* Register variable[4]: Method return value and escape marker */
- CALL_compiling_base___CompilerVisitor___init(variable[0])(variable[0], variable[1] /*m*/, variable[2] /*tc*/, init_table /*YYY*/) /*CompilerVisitor::init*/;
- ATTR_compiling_global___GlobalCompilerVisitor____global_analysis(variable[0]) /*GlobalCompilerVisitor::_global_analysis*/ = variable[3] /*ga*/;
- return_label5: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_GlobalCompilerVisitor].i] = 1;
- tracehead = trace.prev;
- return;
-}
-val_t compiling_global___CompiledClass___local_class(val_t self) {
- struct trace_t trace = {NULL, NULL, 85, LOCATE_compiling_global___CompiledClass___local_class};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___CompiledClass____local_class( self) /*CompiledClass::_local_class*/;
-}
-val_t compiling_global___CompiledClass___id(val_t self) {
- struct trace_t trace = {NULL, NULL, 88, LOCATE_compiling_global___CompiledClass___id};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___CompiledClass____id( self) /*CompiledClass::_id*/;
-}
-void compiling_global___CompiledClass___id__eq(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 88, LOCATE_compiling_global___CompiledClass___id__eq};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- ATTR_compiling_global___CompiledClass____id( self) /*CompiledClass::_id*/ = param0;
- tracehead = trace.prev;
- return;
-}
-val_t compiling_global___CompiledClass___class_table(val_t self) {
- struct trace_t trace = {NULL, NULL, 91, LOCATE_compiling_global___CompiledClass___class_table};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___CompiledClass____class_table( self) /*CompiledClass::_class_table*/;
-}
-val_t compiling_global___CompiledClass___instance_table(val_t self) {
- struct trace_t trace = {NULL, NULL, 94, LOCATE_compiling_global___CompiledClass___instance_table};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___CompiledClass____instance_table( self) /*CompiledClass::_instance_table*/;
-}
-val_t compiling_global___CompiledClass___class_layout(val_t self) {
- struct trace_t trace = {NULL, NULL, 97, LOCATE_compiling_global___CompiledClass___class_layout};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___CompiledClass____class_layout( self) /*CompiledClass::_class_layout*/;
-}
-val_t compiling_global___CompiledClass___instance_layout(val_t self) {
- struct trace_t trace = {NULL, NULL, 100, LOCATE_compiling_global___CompiledClass___instance_layout};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___CompiledClass____instance_layout( self) /*CompiledClass::_instance_layout*/;
-}
-void compiling_global___CompiledClass___init(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, NULL, 103, LOCATE_compiling_global___CompiledClass___init};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_CompiledClass].i]) return;
- /* Register variable[2]: Method return value and escape marker */
- ATTR_compiling_global___CompiledClass____local_class(variable[0]) /*CompiledClass::_local_class*/ = variable[1] /*c*/;
- return_label6: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_CompiledClass].i] = 1;
- tracehead = trace.prev;
- return;
-}
-val_t compiling_global___MMSrcLocalClass___class_color_pos(val_t self) {
- struct trace_t trace = {NULL, NULL, 107, LOCATE_compiling_global___MMSrcLocalClass___class_color_pos};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___MMSrcLocalClass____class_color_pos( self) /*MMSrcLocalClass::_class_color_pos*/;
-}
-val_t compiling_global___MMSrcLocalClass___class_layout(val_t self) {
- struct trace_t trace = {NULL, NULL, 110, LOCATE_compiling_global___MMSrcLocalClass___class_layout};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___MMSrcLocalClass____class_layout( self) /*MMSrcLocalClass::_class_layout*/;
-}
-val_t compiling_global___MMSrcLocalClass___instance_layout(val_t self) {
- struct trace_t trace = {NULL, NULL, 113, LOCATE_compiling_global___MMSrcLocalClass___instance_layout};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___MMSrcLocalClass____instance_layout( self) /*MMSrcLocalClass::_instance_layout*/;
-}
-void compiling_global___MMSrcLocalClass___build_layout_in(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 116, LOCATE_compiling_global___MMSrcLocalClass___build_layout_in};
- val_t variable[11];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = ATTR_compiling_global___MMSrcLocalClass____class_layout(variable[0]) /*MMSrcLocalClass::_class_layout*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = ATTR_compiling_global___MMSrcLocalClass____instance_layout(variable[0]) /*MMSrcLocalClass::_instance_layout*/;
- variable[5] = variable[6];
- /* Register variable[6]: Result */
- variable[6] = CALL_abstractmetamodel___MMLocalClass___global(variable[0])(variable[0]) /*MMLocalClass::global*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstractmetamodel___MMGlobalClass___intro(variable[6])(variable[6]) /*MMGlobalClass::intro*/;
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool((variable[6] == variable[0]) || ((variable[6] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[6])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[6],variable[0])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[6])(variable[6], variable[0]) /*Object::==*/)))));
- if (UNTAG_Bool(variable[6])) { /*if*/
- /* Register variable[6]: Result */
- variable[6] = NEW_TableEltClassId_compiling_global___AbsTableEltClass___init(variable[0]) /*new TableEltClassId*/;
- CALL_abstract_collection___SimpleCollection___add( variable[2] /*module_table*/)( variable[2] /*module_table*/, variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = NEW_TableEltClassColor_compiling_global___AbsTableEltClass___init(variable[0]) /*new TableEltClassColor*/;
- ATTR_compiling_global___MMSrcLocalClass____class_color_pos(variable[0]) /*MMSrcLocalClass::_class_color_pos*/ = variable[6];
- /* Register variable[6]: Result */
- variable[6] = ATTR_compiling_global___MMSrcLocalClass____class_color_pos(variable[0]) /*MMSrcLocalClass::_class_color_pos*/;
- CALL_abstract_collection___SimpleCollection___add( variable[2] /*module_table*/)( variable[2] /*module_table*/, variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = NEW_TableEltClassInitTable_compiling_global___AbsTableEltClass___init(variable[0]) /*new TableEltClassInitTable*/;
- CALL_abstract_collection___SimpleCollection___add( variable[4] /*clt*/)( variable[4] /*clt*/, variable[6]) /*AbstractArray::add*/;
- }
- /* Register variable[6]: Result */
- variable[6] = CALL_syntax_base___MMSrcLocalClass___src_local_properties(variable[0])(variable[0]) /*MMSrcLocalClass::src_local_properties*/;
- /* Register variable[6]: For iterator */
- variable[6] = CALL_abstract_collection___Collection___iterator(variable[6])(variable[6]) /*MapRead::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]: Local variable */
- /* Register variable[10]: Result */
- variable[10] = CALL_abstractmetamodel___MMLocalProperty___global( variable[8] /*p*/)( variable[8] /*p*/) /*MMLocalProperty::global*/;
- variable[9] = variable[10];
- /* Register variable[10]: Result */
- variable[10] = CALL_abstractmetamodel___MMGlobalProperty___intro( variable[9] /*pg*/)( variable[9] /*pg*/) /*MMGlobalProperty::intro*/;
- /* Register variable[10]: Result */
- variable[10] = TAG_Bool((variable[10] == variable[8] /*p*/) || ((variable[10] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[10])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[10], variable[8] /*p*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[10])(variable[10], variable[8] /*p*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable[10])) { /*if*/
- /* Register variable[10]: Result */
- variable[10] = TAG_Bool(( variable[8] /*p*/==NIT_NULL) || VAL_ISA( variable[8] /*p*/, COLOR_MMSrcAttribute, ID_MMSrcAttribute)) /*cast MMSrcAttribute*/;
- if (UNTAG_Bool(variable[10])) { /*if*/
- /* Register variable[10]: Result */
- variable[10] = NEW_TableEltAttr_compiling_global___TableEltProp___init( variable[8] /*p*/) /*new TableEltAttr*/;
- CALL_abstract_collection___SimpleCollection___add( variable[5] /*ilt*/)( variable[5] /*ilt*/, variable[10]) /*AbstractArray::add*/;
- } else { /*if*/
- /* Register variable[10]: Result */
- variable[10] = TAG_Bool(( variable[8] /*p*/==NIT_NULL) || VAL_ISA( variable[8] /*p*/, COLOR_MMSrcMethod, ID_MMSrcMethod)) /*cast MMSrcMethod*/;
- if (UNTAG_Bool(variable[10])) { /*if*/
- /* Register variable[10]: Result */
- variable[10] = NEW_TableEltMeth_compiling_global___TableEltProp___init( variable[8] /*p*/) /*new TableEltMeth*/;
- CALL_abstract_collection___SimpleCollection___add( variable[4] /*clt*/)( variable[4] /*clt*/, variable[10]) /*AbstractArray::add*/;
- }
- }
- }
- /* Register variable[10]: Result */
- variable[10] = TAG_Bool(( variable[8] /*p*/==NIT_NULL) || VAL_ISA( variable[8] /*p*/, COLOR_MMSrcMethod, ID_MMSrcMethod)) /*cast MMSrcMethod*/;
- /* Ensure var variable[10]: Left 'and' operand*/
- if (UNTAG_Bool(variable[10])) { /* and */
- /* Register variable[10]: Result */
- variable[10] = CALL_abstractmetamodel___MMLocalProperty___need_super( variable[8] /*p*/)( variable[8] /*p*/) /*MMLocalProperty::need_super*/;
- }
- /* Register variable[10]: Result */
- if (UNTAG_Bool(variable[10])) { /*if*/
- /* Register variable[10]: Result */
- variable[10] = NEW_TableEltSuper_compiling_global___TableEltProp___init( variable[8] /*p*/) /*new TableEltSuper*/;
- CALL_abstract_collection___SimpleCollection___add( variable[4] /*clt*/)( variable[4] /*clt*/, variable[10]) /*AbstractArray::add*/;
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[4] = ATTR_array___Array____items(fra.me.REG[3]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
}
- continue_8: while(0);
- CALL_abstract_collection___Iterator___next(variable[6])(variable[6]) /*Iterator::next*/;
- }
- break_8: while(0);
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___Collection___is_empty( variable[5] /*ilt*/)( variable[5] /*ilt*/) /*AbstractArrayRead::is_empty*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[6])))) { /*if*/
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = NEW_ModuleTableEltGroup_compiling_global___AbsTableElt___init() /*new ModuleTableEltGroup*/;
- variable[6] = variable[7];
- /* Register variable[7]: Result */
- variable[7] = CALL_compiling_global___ModuleTableEltGroup___elements( variable[6] /*teg*/)( variable[6] /*teg*/) /*ModuleTableEltGroup::elements*/;
- CALL_abstract_collection___IndexedCollection___append(variable[7])(variable[7], variable[5] /*ilt*/) /*IndexedCollection::append*/;
- CALL_abstract_collection___SimpleCollection___add( variable[2] /*module_table*/)( variable[2] /*module_table*/, variable[6] /*teg*/) /*AbstractArray::add*/;
- }
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___Collection___is_empty( variable[4] /*clt*/)( variable[4] /*clt*/) /*AbstractArrayRead::is_empty*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[6])))) { /*if*/
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = NEW_ModuleTableEltGroup_compiling_global___AbsTableElt___init() /*new ModuleTableEltGroup*/;
- variable[6] = variable[7];
- /* Register variable[7]: Result */
- variable[7] = CALL_compiling_global___ModuleTableEltGroup___elements( variable[6] /*teg*/)( variable[6] /*teg*/) /*ModuleTableEltGroup::elements*/;
- CALL_abstract_collection___IndexedCollection___append(variable[7])(variable[7], variable[4] /*clt*/) /*IndexedCollection::append*/;
- CALL_abstract_collection___SimpleCollection___add( variable[2] /*module_table*/)( variable[2] /*module_table*/, variable[6] /*teg*/) /*AbstractArray::add*/;
- }
- return_label7: while(false);
- tracehead = trace.prev;
- return;
-}
-void compiling_global___MMSrcModule___local_analysis(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 160, LOCATE_compiling_global___MMSrcModule___local_analysis};
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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_syntax_base___MMSrcModule___src_local_classes(variable[0])(variable[0]) /*MMSrcModule::src_local_classes*/;
- /* Register variable[3]: For iterator */
- variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*MapRead::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] = ATTR_compiling_global___MMSrcModule____local_table(variable[0]) /*MMSrcModule::_local_table*/;
- CALL_compiling_global___MMSrcLocalClass___build_layout_in( variable[5] /*c*/)( variable[5] /*c*/, variable[1] /*tc*/, variable[6]) /*MMSrcLocalClass::build_layout_in*/;
- continue_10: while(0);
- CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
- }
- break_10: while(0);
- return_label9: while(false);
- tracehead = trace.prev;
- return;
-}
-val_t compiling_global___MMSrcModule___global_analysis(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 168, LOCATE_compiling_global___MMSrcModule___global_analysis};
- val_t variable[24];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = NEW_GlobalAnalysis_compiling_global___GlobalAnalysis___init(variable[0]) /*new GlobalAnalysis*/;
- variable[3] = variable[4];
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = NEW_Array_array___Array___init() /*new Array[MMLocalClass]*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = NEW_HashSet_hash___HashSet___init() /*new HashSet[MMGlobalProperty]*/;
- variable[5] = variable[6];
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = NEW_Array_array___Array___init() /*new Array[TableElt]*/;
- variable[6] = variable[7];
- /* Register variable[7]: Local variable */
- /* Register variable[8]: Result */
- variable[8] = NEW_Array_array___Array___init() /*new Array[TableElt]*/;
- variable[7] = variable[8];
- /* Register variable[8]: Result */
- variable[8] = NEW_TableEltClassSelfId_compiling_global___AbsTableElt___init() /*new TableEltClassSelfId*/;
- CALL_abstract_collection___SimpleCollection___add( variable[6] /*ctab*/)( variable[6] /*ctab*/, variable[8]) /*AbstractArray::add*/;
- /* Register variable[8]: Result */
- variable[8] = NEW_TableEltVftPointer_compiling_global___AbsTableElt___init() /*new TableEltVftPointer*/;
- CALL_abstract_collection___SimpleCollection___add( variable[7] /*itab*/)( variable[7] /*itab*/, variable[8]) /*AbstractArray::add*/;
- /* Register variable[8]: Local variable */
- /* Register variable[9]: Result */
- variable[9] = TAG_Int(-UNTAG_Int( TAG_Int(1)));
- variable[8] = variable[9];
- /* Register variable[9]: Local variable */
- variable[9] = TAG_Int(3);
- /* Register variable[10]: Local variable */
- /* Register variable[11]: Result */
- variable[11] = NEW_Array_array___Array___init() /*new Array[MMLocalClass]*/;
- variable[10] = variable[11];
- /* Register variable[11]: Result */
- variable[11] = CALL_abstractmetamodel___MMModule___local_classes(variable[0])(variable[0]) /*MMModule::local_classes*/;
- /* Register variable[11]: For iterator */
- variable[11] = CALL_abstract_collection___Collection___iterator(variable[11])(variable[11]) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[12]: For 'is_ok' result */
- variable[12] = CALL_abstract_collection___Iterator___is_ok(variable[11])(variable[11]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[12])) break; /*for*/
- variable[12] = CALL_abstract_collection___Iterator___item(variable[11])(variable[11]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[13]: Local variable */
- variable[13] = variable[12];
- CALL_inheritance___MMLocalClass___compute_super_classes( variable[13] /*c*/)( variable[13] /*c*/) /*MMLocalClass::compute_super_classes*/;
- CALL_abstract_collection___SimpleCollection___add( variable[10] /*classes*/)( variable[10] /*classes*/, variable[13] /*c*/) /*AbstractArray::add*/;
- continue_12: while(0);
- CALL_abstract_collection___Iterator___next(variable[11])(variable[11]) /*ArrayIterator::next*/;
- }
- break_12: while(0);
- /* Register variable[11]: Result */
- variable[11] = NEW_ClassSorter_compiling_global___ClassSorter___init() /*new ClassSorter*/;
- CALL_sorter___AbstractSorter___sort(variable[11])(variable[11], variable[10] /*classes*/) /*AbstractSorter::sort*/;
- /* Register variable[11]: For iterator */
- variable[11] = CALL_abstract_collection___Collection___iterator( variable[10] /*classes*/)( variable[10] /*classes*/) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[12]: For 'is_ok' result */
- variable[12] = CALL_abstract_collection___Iterator___is_ok(variable[11])(variable[11]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[12])) break; /*for*/
- variable[12] = CALL_abstract_collection___Iterator___item(variable[11])(variable[11]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[13]: Local variable */
- variable[13] = variable[12];
- CALL_inheritance___MMLocalClass___compute_ancestors( variable[13] /*c*/)( variable[13] /*c*/) /*MMLocalClass::compute_ancestors*/;
- CALL_inheritance___MMLocalClass___inherit_global_properties( variable[13] /*c*/)( variable[13] /*c*/) /*MMLocalClass::inherit_global_properties*/;
- /* Register variable[14]: Local variable */
- /* Register variable[15]: Result */
- variable[15] = NEW_CompiledClass_compiling_global___CompiledClass___init( variable[13] /*c*/) /*new CompiledClass*/;
- variable[14] = variable[15];
- /* Register variable[15]: Result */
- variable[15] = CALL_compiling_global___GlobalAnalysis___compiled_classes( variable[3] /*ga*/)( variable[3] /*ga*/) /*GlobalAnalysis::compiled_classes*/;
- /* Register variable[16]: Result */
- variable[16] = CALL_abstractmetamodel___MMLocalClass___global( variable[13] /*c*/)( variable[13] /*c*/) /*MMLocalClass::global*/;
- CALL_abstract_collection___Map_____braeq(variable[15])(variable[15], variable[16], variable[14] /*cc*/) /*HashMap::[]=*/;
- /* Register variable[15]: Local variable */
- /* Register variable[16]: Result */
- variable[16] = CALL_abstractmetamodel___MMLocalClass___global( variable[13] /*c*/)( variable[13] /*c*/) /*MMLocalClass::global*/;
- variable[15] = variable[16];
- /* Register variable[16]: Local variable */
- /* Register variable[17]: Result */
- variable[17] = CALL_abstractmetamodel___MMGlobalClass___module( variable[15] /*gc*/)( variable[15] /*gc*/) /*MMGlobalClass::module*/;
- variable[16] = variable[17];
- /* Register variable[17]: Result */
- variable[17] = CALL_compiling_base___MMLocalClass___primitive_info( variable[13] /*c*/)( variable[13] /*c*/) /*MMLocalClass::primitive_info*/;
- /* Register variable[17]: Result */
- variable[17] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[17] == NIT_NULL /*null*/) || ((variable[17] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[17])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[17], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[17])(variable[17], NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable[17])) { /*if*/
- CALL_compiling_global___CompiledClass___id__eq( variable[14] /*cc*/)( variable[14] /*cc*/, variable[8] /*pclassid*/) /*CompiledClass::id=*/;
- /* Register variable[17]: Result */
- variable[17] = TAG_Int(UNTAG_Int( variable[8] /*pclassid*/)-UNTAG_Int( TAG_Int(4)));
- variable[8] = variable[17] /*pclassid=*/;
- } else { /*if*/
- CALL_compiling_global___CompiledClass___id__eq( variable[14] /*cc*/)( variable[14] /*cc*/, variable[9] /*classid*/) /*CompiledClass::id=*/;
- /* Register variable[17]: Result */
- variable[17] = TAG_Int(UNTAG_Int( variable[9] /*classid*/)+UNTAG_Int( TAG_Int(4)));
- variable[9] = variable[17] /*classid=*/;
- }
- /* Register variable[17]: Result */
- variable[17] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[13] /*c*/)( variable[13] /*c*/) /*MMLocalClass::cshe*/;
- /* Register variable[17]: Result */
- variable[17] = CALL_partial_order___PartialOrderElement___direct_smallers(variable[17])(variable[17]) /*PartialOrderElement::direct_smallers*/;
- /* Register variable[17]: Result */
- variable[17] = CALL_abstract_collection___Collection___is_empty(variable[17])(variable[17]) /*AbstractArrayRead::is_empty*/;
- if (UNTAG_Bool(variable[17])) { /*if*/
- CALL_abstract_collection___SimpleCollection___add( variable[4] /*smallest_classes*/)( variable[4] /*smallest_classes*/, variable[13] /*c*/) /*AbstractArray::add*/;
- }
- /* Register variable[17]: Local variable */
- /* Register variable[18]: Result */
- variable[18] = CALL_abstractmetamodel___MMLocalClass___global( variable[13] /*c*/)( variable[13] /*c*/) /*MMLocalClass::global*/;
- /* Register variable[18]: Result */
- variable[18] = CALL_abstractmetamodel___MMGlobalClass___intro(variable[18])(variable[18]) /*MMGlobalClass::intro*/;
- variable[17] = variable[18];
- /* Register variable[18]: Result */
- variable[18] = TAG_Bool(( variable[17] /*bc*/==NIT_NULL) || VAL_ISA( variable[17] /*bc*/, COLOR_MMSrcLocalClass, ID_MMSrcLocalClass)) /*cast MMSrcLocalClass*/;
- if (!UNTAG_Bool(variable[18])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_compiling_global___MMSrcModule___global_analysis, LOCATE_compiling_global, 220); nit_exit(1);}
- /* Register variable[18]: Result */
- variable[18] = CALL_compiling_global___MMSrcLocalClass___class_color_pos( variable[17] /*bc*/)( variable[17] /*bc*/) /*MMSrcLocalClass::class_color_pos*/;
- CALL_abstract_collection___SimpleCollection___add( variable[6] /*ctab*/)( variable[6] /*ctab*/, variable[18]) /*AbstractArray::add*/;
- continue_13: while(0);
- CALL_abstract_collection___Iterator___next(variable[11])(variable[11]) /*ArrayIterator::next*/;
- }
- break_13: while(0);
- /* Register variable[11]: Local variable */
- /* Register variable[12]: Result */
- variable[12] = NEW_HashSet_hash___HashSet___init() /*new HashSet[MMLocalClass]*/;
- variable[11] = variable[12];
- /* Register variable[12]: Local variable */
- /* Register variable[13]: Result */
- variable[13] = NEW_HashSet_hash___HashSet___init() /*new HashSet[MMLocalClass]*/;
- variable[12] = variable[13];
- /* Register variable[13]: For iterator */
- variable[13] = CALL_abstract_collection___Collection___iterator( variable[4] /*smallest_classes*/)( variable[4] /*smallest_classes*/) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[14]: For 'is_ok' result */
- variable[14] = CALL_abstract_collection___Iterator___is_ok(variable[13])(variable[13]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[14])) break; /*for*/
- variable[14] = CALL_abstract_collection___Iterator___item(variable[13])(variable[13]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[15]: Local variable */
- variable[15] = variable[14];
- while (true) { /*while*/
- /* Register variable[16]: Result */
- variable[16] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[15] /*c*/)( variable[15] /*c*/) /*MMLocalClass::cshe*/;
- /* Register variable[16]: Result */
- variable[16] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[16])(variable[16]) /*PartialOrderElement::direct_greaters*/;
- /* Register variable[16]: Result */
- variable[16] = CALL_abstract_collection___Collection___length(variable[16])(variable[16]) /*AbstractArrayRead::length*/;
- /* Register variable[16]: Result */
- variable[16] = TAG_Bool((variable[16])==( TAG_Int(1)));
- if (!UNTAG_Bool(variable[16])) break; /* while*/
- /* Register variable[16]: Result */
- variable[16] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[15] /*c*/)( variable[15] /*c*/) /*MMLocalClass::cshe*/;
- /* Register variable[16]: Result */
- variable[16] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[16])(variable[16]) /*PartialOrderElement::direct_greaters*/;
- /* Register variable[16]: Result */
- variable[16] = CALL_abstract_collection___Collection___first(variable[16])(variable[16]) /*IndexedCollectionRead::first*/;
- variable[15] = variable[16] /*c=*/;
- continue_15: while(0);
- }
- break_15: while(0);
- CALL_abstract_collection___SimpleCollection___add( variable[11] /*crown_classes*/)( variable[11] /*crown_classes*/, variable[15] /*c*/) /*HashSet::add*/;
- /* Register variable[16]: Result */
- variable[16] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[15] /*c*/)( variable[15] /*c*/) /*MMLocalClass::cshe*/;
- /* Register variable[16]: Result */
- variable[16] = CALL_partial_order___PartialOrderElement___greaters_and_self(variable[16])(variable[16]) /*PartialOrderElement::greaters_and_self*/;
- CALL_abstract_collection___SimpleCollection___add_all( variable[12] /*core_classes*/)( variable[12] /*core_classes*/, variable[16]) /*SimpleCollection::add_all*/;
- continue_14: while(0);
- CALL_abstract_collection___Iterator___next(variable[13])(variable[13]) /*ArrayIterator::next*/;
- }
- break_14: while(0);
- CALL_compiling_global___MMSrcModule___colorize(variable[0])(variable[0], variable[3] /*ga*/, variable[6] /*ctab*/, variable[11] /*crown_classes*/, TAG_Int(0)) /*MMSrcModule::colorize*/;
- /* Register variable[13]: Local variable */
- variable[13] = TAG_Int(0);
- /* Register variable[14]: For iterator */
- variable[14] = CALL_abstract_collection___Collection___iterator( variable[10] /*classes*/)( variable[10] /*classes*/) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[15]: For 'is_ok' result */
- variable[15] = CALL_abstract_collection___Iterator___is_ok(variable[14])(variable[14]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[15])) break; /*for*/
- variable[15] = CALL_abstract_collection___Iterator___item(variable[14])(variable[14]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[16]: Local variable */
- variable[16] = variable[15];
- /* Register variable[17]: Local variable */
- /* Register variable[18]: Result */
- variable[18] = CALL_compiling_global___GlobalAnalysis___compiled_classes( variable[3] /*ga*/)( variable[3] /*ga*/) /*GlobalAnalysis::compiled_classes*/;
- /* Register variable[19]: Result */
- variable[19] = CALL_abstractmetamodel___MMLocalClass___global( variable[16] /*c*/)( variable[16] /*c*/) /*MMLocalClass::global*/;
- /* Register variable[18]: Result */
- variable[18] = CALL_abstract_collection___MapRead_____bra(variable[18])(variable[18], variable[19]) /*CoupleMap::[]*/;
- variable[17] = variable[18];
- /* Register variable[18]: Result */
- variable[18] = CALL_abstract_collection___Collection___has( variable[12] /*core_classes*/)( variable[12] /*core_classes*/, variable[16] /*c*/) /*HashSet::has*/;
- if (UNTAG_Bool(variable[18])) { /*if*/
- /* Register variable[18]: Result */
- variable[18] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- CALL_compiling_global___MMSrcModule___build_tables_in(variable[0])(variable[0], variable[18], variable[3] /*ga*/, variable[16] /*c*/, variable[6] /*ctab*/) /*MMSrcModule::build_tables_in*/;
- /* Register variable[18]: Result */
- variable[18] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- /* Register variable[18]: Result */
- variable[18] = CALL_abstract_collection___Collection___length(variable[18])(variable[18]) /*AbstractArrayRead::length*/;
- /* Register variable[18]: Result */
- variable[18] = TAG_Bool(UNTAG_Int( variable[13] /*maxcolor*/)<UNTAG_Int(variable[18]));
- if (UNTAG_Bool(variable[18])) { /*if*/
- /* Register variable[18]: Result */
- variable[18] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- /* Register variable[18]: Result */
- variable[18] = CALL_abstract_collection___Collection___length(variable[18])(variable[18]) /*AbstractArrayRead::length*/;
- variable[13] = variable[18] /*maxcolor=*/;
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:237 */
+ if (UNTAG_Bool(REGB1)) {
+ /* ./../lib/standard//collection//array.nit:238 */
+ REGB1 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
}
- } else { /*if*/
- /* Register variable[18]: Local variable */
- /* Register variable[19]: Result */
- variable[19] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[16] /*c*/)( variable[16] /*c*/) /*MMLocalClass::cshe*/;
- /* Register variable[19]: Result */
- variable[19] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[19])(variable[19]) /*PartialOrderElement::direct_greaters*/;
- /* Register variable[19]: Result */
- variable[19] = CALL_abstract_collection___Collection___first(variable[19])(variable[19]) /*IndexedCollectionRead::first*/;
- variable[18] = variable[19];
- /* Register variable[19]: Local variable */
- /* Register variable[20]: Result */
- variable[20] = CALL_compiling_global___GlobalAnalysis___compiled_classes( variable[3] /*ga*/)( variable[3] /*ga*/) /*GlobalAnalysis::compiled_classes*/;
- /* Register variable[21]: Result */
- variable[21] = CALL_abstractmetamodel___MMLocalClass___global( variable[18] /*sc*/)( variable[18] /*sc*/) /*MMLocalClass::global*/;
- /* Register variable[20]: Result */
- variable[20] = CALL_abstract_collection___MapRead_____bra(variable[20])(variable[20], variable[21]) /*CoupleMap::[]*/;
- variable[19] = variable[20];
- /* Register variable[20]: Result */
- variable[20] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- /* Register variable[20]: Result */
- variable[20] = CALL_abstract_collection___Collection___is_empty(variable[20])(variable[20]) /*AbstractArrayRead::is_empty*/;
- if (!UNTAG_Bool(variable[20])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_compiling_global___MMSrcModule___global_analysis, LOCATE_compiling_global, 251); nit_exit(1);}
- /* Register variable[20]: Result */
- variable[20] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- /* Register variable[21]: Result */
- variable[21] = CALL_compiling_global___CompiledClass___class_table( variable[19] /*scc*/)( variable[19] /*scc*/) /*CompiledClass::class_table*/;
- CALL_abstract_collection___SimpleCollection___add_all(variable[20])(variable[20], variable[21]) /*SimpleCollection::add_all*/;
- /* Register variable[20]: Local variable */
- /* Register variable[21]: Result */
- variable[21] = CALL_abstractmetamodel___MMLocalClass___global( variable[16] /*c*/)( variable[16] /*c*/) /*MMLocalClass::global*/;
- /* Register variable[21]: Result */
- variable[21] = CALL_abstractmetamodel___MMGlobalClass___intro(variable[21])(variable[21]) /*MMGlobalClass::intro*/;
- variable[20] = variable[21];
- /* Register variable[21]: Result */
- variable[21] = TAG_Bool(( variable[20] /*bc*/==NIT_NULL) || VAL_ISA( variable[20] /*bc*/, COLOR_MMSrcLocalClass, ID_MMSrcLocalClass)) /*cast MMSrcLocalClass*/;
- if (!UNTAG_Bool(variable[21])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_compiling_global___MMSrcModule___global_analysis, LOCATE_compiling_global, 254); nit_exit(1);}
- /* Register variable[21]: Local variable */
- /* Register variable[22]: Result */
- variable[22] = CALL_compiling_global___MMSrcLocalClass___class_color_pos( variable[20] /*bc*/)( variable[20] /*bc*/) /*MMSrcLocalClass::class_color_pos*/;
- variable[21] = variable[22];
- /* Register variable[22]: Local variable */
- /* Register variable[23]: Result */
- variable[23] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- /* Register variable[23]: Result */
- variable[23] = CALL_abstract_collection___Collection___length(variable[23])(variable[23]) /*AbstractArrayRead::length*/;
- variable[22] = variable[23];
- CALL_compiling_global___ColorContext___color__eq( variable[3] /*ga*/)( variable[3] /*ga*/, variable[21] /*colpos*/, variable[22] /*colposcolor*/) /*ColorContext::color=*/;
- /* Register variable[23]: Result */
- variable[23] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[21] /*colpos*/) /*AbstractArray::add*/;
- /* Register variable[23]: Result */
- variable[23] = TAG_Bool(UNTAG_Int( variable[13] /*maxcolor*/)<UNTAG_Int( variable[22] /*colposcolor*/));
- if (UNTAG_Bool(variable[23])) { /*if*/
- variable[13] = variable[22] /*colposcolor*/ /*maxcolor=*/;
- }
- }
- continue_16: while(0);
- CALL_abstract_collection___Iterator___next(variable[14])(variable[14]) /*ArrayIterator::next*/;
- }
- break_16: while(0);
- /* Register variable[14]: Result */
- variable[14] = TAG_Int(UNTAG_Int( variable[13] /*maxcolor*/)+UNTAG_Int( TAG_Int(1)));
- CALL_compiling_global___GlobalAnalysis___max_class_table_length__eq( variable[3] /*ga*/)( variable[3] /*ga*/, variable[14]) /*GlobalAnalysis::max_class_table_length=*/;
- /* Register variable[14]: For iterator */
- variable[14] = CALL_abstract_collection___Collection___iterator( variable[10] /*classes*/)( variable[10] /*classes*/) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[15]: For 'is_ok' result */
- variable[15] = CALL_abstract_collection___Iterator___is_ok(variable[14])(variable[14]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[15])) break; /*for*/
- variable[15] = CALL_abstract_collection___Iterator___item(variable[14])(variable[14]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[16]: Local variable */
- variable[16] = variable[15];
- /* Register variable[17]: Local variable */
- /* Register variable[18]: Result */
- variable[18] = CALL_compiling_global___GlobalAnalysis___compiled_classes( variable[3] /*ga*/)( variable[3] /*ga*/) /*GlobalAnalysis::compiled_classes*/;
- /* Register variable[19]: Result */
- variable[19] = CALL_abstractmetamodel___MMLocalClass___global( variable[16] /*c*/)( variable[16] /*c*/) /*MMLocalClass::global*/;
- /* Register variable[18]: Result */
- variable[18] = CALL_abstract_collection___MapRead_____bra(variable[18])(variable[18], variable[19]) /*CoupleMap::[]*/;
- variable[17] = variable[18];
- /* Register variable[18]: Local variable */
- /* Register variable[19]: Result */
- variable[19] = CALL_compiling_global___CompiledClass___class_layout( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_layout*/;
- variable[18] = variable[19];
- /* Register variable[19]: Local variable */
- /* Register variable[20]: Result */
- variable[20] = CALL_compiling_global___CompiledClass___instance_layout( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::instance_layout*/;
- variable[19] = variable[20];
- /* Register variable[20]: Result */
- variable[20] = CALL_abstractmetamodel___MMLocalClass___crhe( variable[16] /*c*/)( variable[16] /*c*/) /*MMLocalClass::crhe*/;
- /* Register variable[20]: Result */
- variable[20] = CALL_partial_order___PartialOrderElement___greaters_and_self(variable[20])(variable[20]) /*PartialOrderElement::greaters_and_self*/;
- /* Register variable[20]: For iterator */
- variable[20] = CALL_abstract_collection___Collection___iterator(variable[20])(variable[20]) /*Collection::iterator*/;
- while (true) { /*for*/
- /* Register variable[21]: For 'is_ok' result */
- variable[21] = CALL_abstract_collection___Iterator___is_ok(variable[20])(variable[20]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[21])) break; /*for*/
- variable[21] = CALL_abstract_collection___Iterator___item(variable[20])(variable[20]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[22]: Local variable */
- variable[22] = variable[21];
- /* Register variable[23]: Result */
- variable[23] = TAG_Bool(( variable[22] /*sc*/==NIT_NULL) || VAL_ISA( variable[22] /*sc*/, COLOR_MMSrcLocalClass, ID_MMSrcLocalClass)) /*cast MMSrcLocalClass*/;
- if (UNTAG_Bool(variable[23])) { /*if*/
- /* Register variable[23]: Result */
- variable[23] = CALL_compiling_global___MMSrcLocalClass___class_layout( variable[22] /*sc*/)( variable[22] /*sc*/) /*MMSrcLocalClass::class_layout*/;
- CALL_compiling_global___TableEltComposite___add( variable[18] /*cte*/)( variable[18] /*cte*/, variable[22] /*sc*/, variable[23]) /*TableEltComposite::add*/;
- /* Register variable[23]: Result */
- variable[23] = CALL_compiling_global___MMSrcLocalClass___instance_layout( variable[22] /*sc*/)( variable[22] /*sc*/) /*MMSrcLocalClass::instance_layout*/;
- CALL_compiling_global___TableEltComposite___add( variable[19] /*ite*/)( variable[19] /*ite*/, variable[22] /*sc*/, variable[23]) /*TableEltComposite::add*/;
- }
- continue_18: while(0);
- CALL_abstract_collection___Iterator___next(variable[20])(variable[20]) /*Iterator::next*/;
- }
- break_18: while(0);
- /* Register variable[20]: Result */
- variable[20] = CALL_abstract_collection___Collection___has( variable[12] /*core_classes*/)( variable[12] /*core_classes*/, variable[16] /*c*/) /*HashSet::has*/;
- if (UNTAG_Bool(variable[20])) { /*if*/
- /* Register variable[20]: Result */
- variable[20] = CALL_compiling_global___TableElt___length( variable[18] /*cte*/)( variable[18] /*cte*/) /*TableEltComposite::length*/;
- /* Register variable[20]: Result */
- variable[20] = TAG_Bool(UNTAG_Int(variable[20])>UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable[20])) { /*if*/
- CALL_abstract_collection___SimpleCollection___add( variable[6] /*ctab*/)( variable[6] /*ctab*/, variable[18] /*cte*/) /*AbstractArray::add*/;
- }
- /* Register variable[20]: Result */
- variable[20] = CALL_compiling_global___TableElt___length( variable[19] /*ite*/)( variable[19] /*ite*/) /*TableEltComposite::length*/;
- /* Register variable[20]: Result */
- variable[20] = TAG_Bool(UNTAG_Int(variable[20])>UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable[20])) { /*if*/
- CALL_abstract_collection___SimpleCollection___add( variable[7] /*itab*/)( variable[7] /*itab*/, variable[19] /*ite*/) /*AbstractArray::add*/;
- }
- }
- continue_17: while(0);
- CALL_abstract_collection___Iterator___next(variable[14])(variable[14]) /*ArrayIterator::next*/;
- }
- break_17: while(0);
- /* Register variable[14]: Result */
- variable[14] = TAG_Int(UNTAG_Int( variable[13] /*maxcolor*/)+UNTAG_Int( TAG_Int(1)));
- CALL_compiling_global___MMSrcModule___colorize(variable[0])(variable[0], variable[3] /*ga*/, variable[6] /*ctab*/, variable[11] /*crown_classes*/, variable[14]) /*MMSrcModule::colorize*/;
- CALL_compiling_global___MMSrcModule___colorize(variable[0])(variable[0], variable[3] /*ga*/, variable[7] /*itab*/, variable[11] /*crown_classes*/, TAG_Int(0)) /*MMSrcModule::colorize*/;
- CALL_compiling_global___GlobalAnalysis___max_class_table_length__eq( variable[3] /*ga*/)( variable[3] /*ga*/, TAG_Int(0)) /*GlobalAnalysis::max_class_table_length=*/;
- /* Register variable[14]: For iterator */
- variable[14] = CALL_abstract_collection___Collection___iterator( variable[10] /*classes*/)( variable[10] /*classes*/) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[15]: For 'is_ok' result */
- variable[15] = CALL_abstract_collection___Iterator___is_ok(variable[14])(variable[14]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[15])) break; /*for*/
- variable[15] = CALL_abstract_collection___Iterator___item(variable[14])(variable[14]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[16]: Local variable */
- variable[16] = variable[15];
- /* Register variable[17]: Local variable */
- /* Register variable[18]: Result */
- variable[18] = CALL_compiling_global___GlobalAnalysis___compiled_classes( variable[3] /*ga*/)( variable[3] /*ga*/) /*GlobalAnalysis::compiled_classes*/;
- /* Register variable[19]: Result */
- variable[19] = CALL_abstractmetamodel___MMLocalClass___global( variable[16] /*c*/)( variable[16] /*c*/) /*MMLocalClass::global*/;
- /* Register variable[18]: Result */
- variable[18] = CALL_abstract_collection___MapRead_____bra(variable[18])(variable[18], variable[19]) /*CoupleMap::[]*/;
- variable[17] = variable[18];
- /* Register variable[18]: Result */
- variable[18] = CALL_abstract_collection___Collection___has( variable[12] /*core_classes*/)( variable[12] /*core_classes*/, variable[16] /*c*/) /*HashSet::has*/;
- if (UNTAG_Bool(variable[18])) { /*if*/
- /* Register variable[18]: Result */
- variable[18] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- CALL_compiling_global___MMSrcModule___build_tables_in(variable[0])(variable[0], variable[18], variable[3] /*ga*/, variable[16] /*c*/, variable[6] /*ctab*/) /*MMSrcModule::build_tables_in*/;
- /* Register variable[18]: Result */
- variable[18] = CALL_compiling_global___CompiledClass___instance_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::instance_table*/;
- CALL_compiling_global___MMSrcModule___build_tables_in(variable[0])(variable[0], variable[18], variable[3] /*ga*/, variable[16] /*c*/, variable[7] /*itab*/) /*MMSrcModule::build_tables_in*/;
- } else { /*if*/
- /* Register variable[18]: Local variable */
- /* Register variable[19]: Result */
- variable[19] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[16] /*c*/)( variable[16] /*c*/) /*MMLocalClass::cshe*/;
- /* Register variable[19]: Result */
- variable[19] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[19])(variable[19]) /*PartialOrderElement::direct_greaters*/;
- /* Register variable[19]: Result */
- variable[19] = CALL_abstract_collection___Collection___first(variable[19])(variable[19]) /*IndexedCollectionRead::first*/;
- variable[18] = variable[19];
- /* Register variable[19]: Local variable */
- /* Register variable[20]: Result */
- variable[20] = CALL_compiling_global___GlobalAnalysis___compiled_classes( variable[3] /*ga*/)( variable[3] /*ga*/) /*GlobalAnalysis::compiled_classes*/;
- /* Register variable[21]: Result */
- variable[21] = CALL_abstractmetamodel___MMLocalClass___global( variable[18] /*sc*/)( variable[18] /*sc*/) /*MMLocalClass::global*/;
- /* Register variable[20]: Result */
- variable[20] = CALL_abstract_collection___MapRead_____bra(variable[20])(variable[20], variable[21]) /*CoupleMap::[]*/;
- variable[19] = variable[20];
- /* Register variable[20]: Result */
- variable[20] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- CALL_abstract_collection___RemovableCollection___clear(variable[20])(variable[20]) /*AbstractArray::clear*/;
- /* Register variable[20]: Result */
- variable[20] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- /* Register variable[21]: Result */
- variable[21] = CALL_compiling_global___CompiledClass___class_table( variable[19] /*scc*/)( variable[19] /*scc*/) /*CompiledClass::class_table*/;
- CALL_abstract_collection___SimpleCollection___add_all(variable[20])(variable[20], variable[21]) /*SimpleCollection::add_all*/;
- /* Register variable[20]: Local variable */
- /* Register variable[21]: Result */
- variable[21] = CALL_abstractmetamodel___MMLocalClass___global( variable[16] /*c*/)( variable[16] /*c*/) /*MMLocalClass::global*/;
- /* Register variable[21]: Result */
- variable[21] = CALL_abstractmetamodel___MMGlobalClass___intro(variable[21])(variable[21]) /*MMGlobalClass::intro*/;
- variable[20] = variable[21];
- /* Register variable[21]: Result */
- variable[21] = TAG_Bool(( variable[20] /*bc*/==NIT_NULL) || VAL_ISA( variable[20] /*bc*/, COLOR_MMSrcLocalClass, ID_MMSrcLocalClass)) /*cast MMSrcLocalClass*/;
- if (!UNTAG_Bool(variable[21])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_compiling_global___MMSrcModule___global_analysis, LOCATE_compiling_global, 305); nit_exit(1);}
- /* Register variable[21]: Local variable */
- /* Register variable[22]: Result */
- variable[22] = CALL_compiling_global___MMSrcLocalClass___class_color_pos( variable[20] /*bc*/)( variable[20] /*bc*/) /*MMSrcLocalClass::class_color_pos*/;
- variable[21] = variable[22];
- /* Register variable[22]: Result */
- variable[22] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- /* Register variable[23]: Result */
- variable[23] = CALL_compiling_global___ColorContext___color( variable[3] /*ga*/)( variable[3] /*ga*/, variable[21] /*colpos*/) /*ColorContext::color*/;
- CALL_abstract_collection___Map_____braeq(variable[22])(variable[22], variable[23], variable[21] /*colpos*/) /*Array::[]=*/;
- while (true) { /*while*/
- /* Register variable[22]: Result */
- variable[22] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- /* Register variable[22]: Result */
- variable[22] = CALL_abstract_collection___Collection___length(variable[22])(variable[22]) /*AbstractArrayRead::length*/;
- /* Register variable[22]: Result */
- variable[22] = TAG_Bool(UNTAG_Int(variable[22])<=UNTAG_Int( variable[13] /*maxcolor*/));
- if (!UNTAG_Bool(variable[22])) break; /* while*/
- /* Register variable[22]: Result */
- variable[22] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- CALL_abstract_collection___SimpleCollection___add(variable[22])(variable[22], NIT_NULL /*null*/) /*AbstractArray::add*/;
- continue_20: while(0);
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[5] = ((Nit_NativeArray)fra.me.REG[4])->val[UNTAG_Int(REGB0)];
+ /* ./compiling//compiling_global.nit:38 */
+ fra.me.REG[6] = CALL_program___Program___main_module(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[7] = CALL_symbol___String___to_symbol(fra.me.REG[5])(fra.me.REG[5]);
+ REGB1 = CALL_abstractmetamodel___MMModule___has_global_class_named(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
+ if (UNTAG_Bool(REGB1)) {
+ /* ./compiling//compiling_global.nit:39 */
+ REGB1 = TAG_Int(3);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB1);
+ if (!once_value_8) {
+ fra.me.REG[6] = BOX_NativeString(", (const classtable_t)VFT_");
+ REGB1 = TAG_Int(26);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB1);
+ once_value_8 = fra.me.REG[6];
+ register_static_object(&once_value_8);
+ } else fra.me.REG[6] = once_value_8;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[6]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[5]);
+ if (!once_value_9) {
+ fra.me.REG[5] = BOX_NativeString("");
+ REGB1 = TAG_Int(0);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB1);
+ once_value_9 = fra.me.REG[5];
+ register_static_object(&once_value_9);
+ } else fra.me.REG[5] = once_value_9;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[5]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ CALL_abstract_collection___Sequence___append(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[7]);
+ } else {
+ /* ./compiling//compiling_global.nit:41 */
+ if (!once_value_10) {
+ fra.me.REG[7] = BOX_NativeString(", NULL");
+ REGB1 = TAG_Int(6);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB1);
+ once_value_10 = fra.me.REG[7];
+ register_static_object(&once_value_10);
+ } else fra.me.REG[7] = once_value_10;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___Sequence___append(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[7]);
}
- break_20: while(0);
- /* Register variable[22]: Result */
- variable[22] = CALL_compiling_global___CompiledClass___class_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_table*/;
- /* Register variable[23]: Result */
- variable[23] = CALL_compiling_global___CompiledClass___class_layout( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::class_layout*/;
- CALL_compiling_global___MMSrcModule___append_to_table(variable[0])(variable[0], variable[3] /*ga*/, variable[22], variable[23]) /*MMSrcModule::append_to_table*/;
- /* Register variable[22]: Result */
- variable[22] = CALL_compiling_global___CompiledClass___instance_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::instance_table*/;
- /* Register variable[22]: Result */
- variable[22] = CALL_abstract_collection___Collection___is_empty(variable[22])(variable[22]) /*AbstractArrayRead::is_empty*/;
- if (!UNTAG_Bool(variable[22])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_compiling_global___MMSrcModule___global_analysis, LOCATE_compiling_global, 312); nit_exit(1);}
- /* Register variable[22]: Result */
- variable[22] = CALL_compiling_global___CompiledClass___instance_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::instance_table*/;
- /* Register variable[23]: Result */
- variable[23] = CALL_compiling_global___CompiledClass___instance_table( variable[19] /*scc*/)( variable[19] /*scc*/) /*CompiledClass::instance_table*/;
- CALL_abstract_collection___SimpleCollection___add_all(variable[22])(variable[22], variable[23]) /*SimpleCollection::add_all*/;
- /* Register variable[22]: Result */
- variable[22] = CALL_compiling_global___CompiledClass___instance_table( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::instance_table*/;
- /* Register variable[23]: Result */
- variable[23] = CALL_compiling_global___CompiledClass___instance_layout( variable[17] /*cc*/)( variable[17] /*cc*/) /*CompiledClass::instance_layout*/;
- CALL_compiling_global___MMSrcModule___append_to_table(variable[0])(variable[0], variable[3] /*ga*/, variable[22], variable[23]) /*MMSrcModule::append_to_table*/;
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB0 = REGB1;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label11;
}
- continue_19: while(0);
- CALL_abstract_collection___Iterator___next(variable[14])(variable[14]) /*ArrayIterator::next*/;
}
- break_19: while(0);
- variable[2] = variable[3] /*ga*/;
- goto return_label11;
- return_label11: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-void compiling_global___MMSrcModule___append_to_table(val_t self, val_t param0, val_t param1, val_t param2) {
- struct trace_t trace = {NULL, NULL, 321, LOCATE_compiling_global___MMSrcModule___append_to_table};
- val_t variable[10];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Local variable */
- variable[3] = param2;
- /* Register variable[4]: Method return value and escape marker */
- /* Register variable[5]: Result */
- variable[5] = CALL_compiling_global___TableElt___length( variable[3] /*cmp*/)( variable[3] /*cmp*/) /*TableEltComposite::length*/;
- /* Register variable[5]: Result */
- variable[5] = NEW_Range_range___Range___without_last( TAG_Int(0), variable[5]) /*new Range[Int]*/;
- /* Register variable[5]: For iterator */
- variable[5] = CALL_abstract_collection___Collection___iterator(variable[5])(variable[5]) /*Range::iterator*/;
- while (true) { /*for*/
- /* Register variable[6]: For 'is_ok' result */
- variable[6] = CALL_abstract_collection___Iterator___is_ok(variable[5])(variable[5]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[6])) break; /*for*/
- variable[6] = CALL_abstract_collection___Iterator___item(variable[5])(variable[5]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[7]: Local variable */
- variable[7] = variable[6];
- /* Register variable[8]: Local variable */
- /* Register variable[9]: Result */
- variable[9] = CALL_compiling_global___TableElt___item( variable[3] /*cmp*/)( variable[3] /*cmp*/, variable[7] /*j*/) /*TableEltComposite::item*/;
- variable[8] = variable[9];
- /* Register variable[9]: Result */
- variable[9] = CALL_abstract_collection___Collection___length( variable[2] /*table*/)( variable[2] /*table*/) /*AbstractArrayRead::length*/;
- CALL_compiling_global___ColorContext___color__eq( variable[1] /*cc*/)( variable[1] /*cc*/, variable[8] /*e*/, variable[9]) /*ColorContext::color=*/;
- CALL_abstract_collection___SimpleCollection___add( variable[2] /*table*/)( variable[2] /*table*/, variable[8] /*e*/) /*AbstractArray::add*/;
- continue_22: while(0);
- CALL_abstract_collection___Iterator___next(variable[5])(variable[5]) /*Iterator::next*/;
- }
- break_22: while(0);
- return_label21: while(false);
- tracehead = trace.prev;
+ label11: while(0);
+ /* ./compiling//compiling_global.nit:44 */
+ if (!once_value_12) {
+ fra.me.REG[0] = BOX_NativeString("};");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_12 = fra.me.REG[0];
+ register_static_object(&once_value_12);
+ } else fra.me.REG[0] = once_value_12;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___Sequence___append(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ /* ./compiling//compiling_global.nit:45 */
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ stack_frame_head = fra.me.prev;
return;
}
-void compiling_global___MMSrcModule___build_tables_in(val_t self, val_t param0, val_t param1, val_t param2, val_t param3) {
- struct trace_t trace = {NULL, NULL, 330, LOCATE_compiling_global___MMSrcModule___build_tables_in};
- val_t variable[14];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Local variable */
- variable[3] = param2;
- /* Register variable[4]: Local variable */
- variable[4] = param3;
- /* Register variable[5]: Method return value and escape marker */
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = NEW_HashMap_hash___HashMap___init() /*new HashMap[Int, TableElt]*/;
- variable[6] = variable[7];
- /* Register variable[7]: Local variable */
- variable[7] = TAG_Int(0);
- /* Register variable[8]: For iterator */
- variable[8] = CALL_abstract_collection___Collection___iterator( variable[4] /*elts*/)( variable[4] /*elts*/) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[9]: For 'is_ok' result */
- variable[9] = CALL_abstract_collection___Iterator___is_ok(variable[8])(variable[8]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[9])) break; /*for*/
- variable[9] = CALL_abstract_collection___Iterator___item(variable[8])(variable[8]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[10]: Local variable */
- variable[10] = variable[9];
- /* Register variable[11]: Result */
- variable[11] = CALL_compiling_global___TableElt___is_related_to( variable[10] /*e*/)( variable[10] /*e*/, variable[3] /*c*/) /*TableElt::is_related_to*/;
- if (UNTAG_Bool(variable[11])) { /*if*/
- /* Register variable[11]: Local variable */
- /* Register variable[12]: Result */
- variable[12] = CALL_compiling_global___ColorContext___color( variable[2] /*ga*/)( variable[2] /*ga*/, variable[10] /*e*/) /*ColorContext::color*/;
- variable[11] = variable[12];
- /* Register variable[12]: Local variable */
- /* Register variable[13]: Result */
- variable[13] = CALL_compiling_global___TableElt___length( variable[10] /*e*/)( variable[10] /*e*/) /*TableElt::length*/;
- /* Register variable[13]: Result */
- variable[13] = TAG_Int(UNTAG_Int( variable[11] /*col*/)+UNTAG_Int(variable[13]));
- variable[12] = variable[13];
- CALL_abstract_collection___Map_____braeq( variable[6] /*tab*/)( variable[6] /*tab*/, variable[11] /*col*/, variable[10] /*e*/) /*HashMap::[]=*/;
- /* Register variable[13]: Result */
- variable[13] = TAG_Bool(UNTAG_Int( variable[7] /*len*/)<UNTAG_Int( variable[12] /*l*/));
- if (UNTAG_Bool(variable[13])) { /*if*/
- variable[7] = variable[12] /*l*/ /*len=*/;
- }
- }
- continue_24: while(0);
- CALL_abstract_collection___Iterator___next(variable[8])(variable[8]) /*ArrayIterator::next*/;
+ void OC_compiling_global___Program___compile_tables_to_c_1(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_global;
+ fra.me.line = 0;
+ fra.me.meth = LOCATE_compiling_global___Program___compile_tables_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.closure_ctx = closctx_param;
+ fra.me.closure_funs = CREG;
+ fra.me.REG[0] = p0;
+ CREG[0] = clos_fun0;
+ /* ./compiling//compiling_global.nit:28 */
+ CALL_compiling_global___MMModule___compile_local_table_to_c(fra.me.REG[0])(fra.me.REG[0], closctx->REG[1]);
+ stack_frame_head = fra.me.prev;
+ return;
}
- break_24: while(0);
- /* Register variable[8]: Local variable */
- variable[8] = TAG_Int(0);
- while (true) { /*while*/
- /* Register variable[9]: Result */
- variable[9] = TAG_Bool(UNTAG_Int( variable[8] /*i*/)<UNTAG_Int( variable[7] /*len*/));
- if (!UNTAG_Bool(variable[9])) break; /* while*/
- /* Register variable[9]: Result */
- variable[9] = CALL_abstract_collection___MapRead___has_key( variable[6] /*tab*/)( variable[6] /*tab*/, variable[8] /*i*/) /*CoupleMap::has_key*/;
- if (UNTAG_Bool(variable[9])) { /*if*/
- /* Register variable[9]: Local variable */
- /* Register variable[10]: Result */
- variable[10] = CALL_abstract_collection___MapRead_____bra( variable[6] /*tab*/)( variable[6] /*tab*/, variable[8] /*i*/) /*CoupleMap::[]*/;
- variable[9] = variable[10];
- /* Register variable[10]: Result */
- variable[10] = CALL_compiling_global___TableElt___length( variable[9] /*e*/)( variable[9] /*e*/) /*TableElt::length*/;
- /* Register variable[10]: Result */
- variable[10] = NEW_Range_range___Range___without_last( TAG_Int(0), variable[10]) /*new Range[Int]*/;
- /* Register variable[10]: For iterator */
- variable[10] = CALL_abstract_collection___Collection___iterator(variable[10])(variable[10]) /*Range::iterator*/;
- while (true) { /*for*/
- /* Register variable[11]: For 'is_ok' result */
- variable[11] = CALL_abstract_collection___Iterator___is_ok(variable[10])(variable[10]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[11])) break; /*for*/
- variable[11] = CALL_abstract_collection___Iterator___item(variable[10])(variable[10]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[12]: Local variable */
- variable[12] = variable[11];
- /* Register variable[13]: Result */
- variable[13] = CALL_compiling_global___TableElt___item( variable[9] /*e*/)( variable[9] /*e*/, variable[12] /*j*/) /*TableElt::item*/;
- CALL_abstract_collection___Map_____braeq( variable[1] /*table*/)( variable[1] /*table*/, variable[8] /*i*/, variable[13]) /*Array::[]=*/;
- /* Register variable[13]: Result */
- variable[13] = TAG_Int(UNTAG_Int( variable[8] /*i*/)+UNTAG_Int( TAG_Int(1)));
- variable[8] = variable[13] /*i=*/;
- continue_26: while(0);
- CALL_abstract_collection___Iterator___next(variable[10])(variable[10]) /*Iterator::next*/;
- }
- break_26: while(0);
- } else { /*if*/
- CALL_abstract_collection___Map_____braeq( variable[1] /*table*/)( variable[1] /*table*/, variable[8] /*i*/, NIT_NULL /*null*/) /*Array::[]=*/;
- /* Register variable[9]: Result */
- variable[9] = TAG_Int(UNTAG_Int( variable[8] /*i*/)+UNTAG_Int( TAG_Int(1)));
- variable[8] = variable[9] /*i=*/;
+ void OC_compiling_global___Program___compile_tables_to_c_2(struct stack_frame_t *closctx, val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ /* ./compiling//compiling_global.nit:31 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 31;
+ fra.me.meth = LOCATE_compiling_global___Program___compile_tables_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./compiling//compiling_global.nit:32 */
+ fra.me.REG[1] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = CALL_abstractmetamodel___MMGlobalClass___is_abstract(fra.me.REG[1])(fra.me.REG[1]);
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(true);
+ } else {
+ fra.me.REG[1] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[0])(fra.me.REG[0]);
+ REGB1 = CALL_abstractmetamodel___MMGlobalClass___is_interface(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = REGB1;
}
- continue_25: while(0);
- }
- break_25: while(0);
- return_label23: while(false);
- tracehead = trace.prev;
- return;
-}
-void compiling_global___MMSrcModule___colorize(val_t self, val_t param0, val_t param1, val_t param2, val_t param3) {
- struct trace_t trace = {NULL, NULL, 359, LOCATE_compiling_global___MMSrcModule___colorize};
- val_t variable[19];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Local variable */
- variable[3] = param2;
- /* Register variable[4]: Local variable */
- variable[4] = param3;
- /* Register variable[5]: Method return value and escape marker */
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = NEW_HashMap_hash___HashMap___init() /*new HashMap[Int, Array[TableElt]]*/;
- variable[6] = variable[7];
- /* Register variable[7]: Local variable */
- /* Register variable[8]: Result */
- variable[8] = NEW_Array_array___Array___init() /*new Array[MMLocalClass]*/;
- variable[7] = variable[8];
- /* Register variable[8]: For iterator */
- variable[8] = CALL_abstract_collection___Collection___iterator( variable[2] /*elts*/)( variable[2] /*elts*/) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[9]: For 'is_ok' result */
- variable[9] = CALL_abstract_collection___Iterator___is_ok(variable[8])(variable[8]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[9])) break; /*for*/
- variable[9] = CALL_abstract_collection___Iterator___item(variable[8])(variable[8]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[10]: Local variable */
- variable[10] = variable[9];
- /* Register variable[11]: Local variable */
- /* Register variable[12]: Result */
- variable[12] = TAG_Int(-UNTAG_Int( TAG_Int(1)));
- variable[11] = variable[12];
- /* Register variable[12]: Local variable */
- /* Register variable[13]: Result */
- variable[13] = CALL_compiling_global___TableElt___length( variable[10] /*e*/)( variable[10] /*e*/) /*TableElt::length*/;
- variable[12] = variable[13];
- /* Register variable[13]: Result */
- variable[13] = CALL_compiling_global___ColorContext___has_color( variable[1] /*ga*/)( variable[1] /*ga*/, variable[10] /*e*/) /*ColorContext::has_color*/;
- if (UNTAG_Bool(variable[13])) { /*if*/
- /* Register variable[13]: Result */
- variable[13] = CALL_compiling_global___ColorContext___color( variable[1] /*ga*/)( variable[1] /*ga*/, variable[10] /*e*/) /*ColorContext::color*/;
- variable[11] = variable[13] /*color=*/;
- } else { /*if*/
- CALL_abstract_collection___RemovableCollection___clear( variable[7] /*rel_classes*/)( variable[7] /*rel_classes*/) /*AbstractArray::clear*/;
- /* Register variable[13]: For iterator */
- variable[13] = CALL_abstract_collection___Collection___iterator( variable[3] /*classes*/)( variable[3] /*classes*/) /*Collection::iterator*/;
- while (true) { /*for*/
- /* Register variable[14]: For 'is_ok' result */
- variable[14] = CALL_abstract_collection___Iterator___is_ok(variable[13])(variable[13]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[14])) break; /*for*/
- variable[14] = CALL_abstract_collection___Iterator___item(variable[13])(variable[13]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[15]: Local variable */
- variable[15] = variable[14];
- /* Register variable[16]: Result */
- variable[16] = CALL_compiling_global___TableElt___is_related_to( variable[10] /*e*/)( variable[10] /*e*/, variable[15] /*c*/) /*TableElt::is_related_to*/;
- if (UNTAG_Bool(variable[16])) { /*if*/
- CALL_abstract_collection___SimpleCollection___add( variable[7] /*rel_classes*/)( variable[7] /*rel_classes*/, variable[15] /*c*/) /*AbstractArray::add*/;
- }
- continue_29: while(0);
- CALL_abstract_collection___Iterator___next(variable[13])(variable[13]) /*Iterator::next*/;
- }
- break_29: while(0);
- /* Register variable[13]: Local variable */
- variable[13] = variable[4] /*startcolor*/;
- while (true) { /*while*/
- /* Register variable[14]: Result */
- variable[14] = TAG_Bool(( variable[13] /*trycolor*/)!=( variable[11] /*color*/));
- if (!UNTAG_Bool(variable[14])) break; /* while*/
- variable[11] = variable[13] /*trycolor*/ /*color=*/;
- /* Register variable[14]: For iterator */
- variable[14] = CALL_abstract_collection___Collection___iterator( variable[7] /*rel_classes*/)( variable[7] /*rel_classes*/) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[15]: For 'is_ok' result */
- variable[15] = CALL_abstract_collection___Iterator___is_ok(variable[14])(variable[14]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[15])) break; /*for*/
- variable[15] = CALL_abstract_collection___Iterator___item(variable[14])(variable[14]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[16]: Local variable */
- variable[16] = variable[15];
- /* Register variable[17]: Local variable */
- variable[17] = TAG_Int(0);
- while (true) { /*while*/
- /* Register variable[18]: Result */
- variable[18] = TAG_Bool(UNTAG_Int( variable[17] /*idx*/)<UNTAG_Int( variable[12] /*len*/));
- if (!UNTAG_Bool(variable[18])) break; /* while*/
- /* Register variable[18]: Result */
- variable[18] = TAG_Int(UNTAG_Int( variable[13] /*trycolor*/)+UNTAG_Int( variable[17] /*idx*/));
- /* Register variable[18]: Result */
- variable[18] = CALL_abstract_collection___MapRead___has_key( variable[6] /*colors*/)( variable[6] /*colors*/, variable[18]) /*CoupleMap::has_key*/;
- /* Ensure var variable[18]: Left 'and' operand*/
- if (UNTAG_Bool(variable[18])) { /* and */
- /* Register variable[18]: Result */
- variable[18] = TAG_Int(UNTAG_Int( variable[13] /*trycolor*/)+UNTAG_Int( variable[17] /*idx*/));
- /* Register variable[18]: Result */
- variable[18] = CALL_abstract_collection___MapRead_____bra( variable[6] /*colors*/)( variable[6] /*colors*/, variable[18]) /*CoupleMap::[]*/;
- /* Register variable[18]: Result */
- variable[18] = CALL_compiling_global___MMSrcModule___free_color(variable[0])(variable[0], variable[18], variable[16] /*c*/) /*MMSrcModule::free_color*/;
- variable[18] = TAG_Bool(!UNTAG_Bool(variable[18]));
- }
- /* Register variable[18]: Result */
- if (UNTAG_Bool(variable[18])) { /*if*/
- /* Register variable[18]: Result */
- variable[18] = TAG_Int(UNTAG_Int( variable[13] /*trycolor*/)+UNTAG_Int( variable[17] /*idx*/));
- /* Register variable[18]: Result */
- variable[18] = TAG_Int(UNTAG_Int(variable[18])+UNTAG_Int( TAG_Int(1)));
- variable[13] = variable[18] /*trycolor=*/;
- variable[17] = TAG_Int(0) /*idx=*/;
- } else { /*if*/
- /* Register variable[18]: Result */
- variable[18] = TAG_Int(UNTAG_Int( variable[17] /*idx*/)+UNTAG_Int( TAG_Int(1)));
- variable[17] = variable[18] /*idx=*/;
- }
- continue_32: while(0);
- }
- break_32: while(0);
- continue_31: while(0);
- CALL_abstract_collection___Iterator___next(variable[14])(variable[14]) /*ArrayIterator::next*/;
- }
- break_31: while(0);
- continue_30: while(0);
- }
- break_30: while(0);
- CALL_compiling_global___ColorContext___color__eq( variable[1] /*ga*/)( variable[1] /*ga*/, variable[10] /*e*/, variable[11] /*color*/) /*ColorContext::color=*/;
- }
- /* Register variable[13]: Result */
- variable[13] = NEW_Range_range___Range___without_last( TAG_Int(0), variable[12] /*len*/) /*new Range[Int]*/;
- /* Register variable[13]: For iterator */
- variable[13] = CALL_abstract_collection___Collection___iterator(variable[13])(variable[13]) /*Range::iterator*/;
- while (true) { /*for*/
- /* Register variable[14]: For 'is_ok' result */
- variable[14] = CALL_abstract_collection___Iterator___is_ok(variable[13])(variable[13]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[14])) break; /*for*/
- variable[14] = CALL_abstract_collection___Iterator___item(variable[13])(variable[13]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[15]: Local variable */
- variable[15] = variable[14];
- /* Register variable[16]: Result */
- variable[16] = TAG_Int(UNTAG_Int( variable[11] /*color*/)+UNTAG_Int( variable[15] /*idx*/));
- /* Register variable[16]: Result */
- variable[16] = CALL_abstract_collection___MapRead___has_key( variable[6] /*colors*/)( variable[6] /*colors*/, variable[16]) /*CoupleMap::has_key*/;
- if (UNTAG_Bool(variable[16])) { /*if*/
- /* Register variable[16]: Result */
- variable[16] = TAG_Int(UNTAG_Int( variable[11] /*color*/)+UNTAG_Int( variable[15] /*idx*/));
- /* Register variable[16]: Result */
- variable[16] = CALL_abstract_collection___MapRead_____bra( variable[6] /*colors*/)( variable[6] /*colors*/, variable[16]) /*CoupleMap::[]*/;
- CALL_abstract_collection___SimpleCollection___add(variable[16])(variable[16], variable[10] /*e*/) /*AbstractArray::add*/;
- } else { /*if*/
- /* Register variable[16]: Result */
- variable[16] = TAG_Int(UNTAG_Int( variable[11] /*color*/)+UNTAG_Int( variable[15] /*idx*/));
- variable[17] = NEW_Array_array___Array___with_capacity(TAG_Int(1)) /*new Array[TableElt]*/ /* Ensure var: Literal array*/;
- CALL_abstract_collection___SimpleCollection___add(variable[17])(variable[17], variable[10] /*e*/) /*AbstractArray::add*/;
- /* Register variable[17]: Result */
- CALL_abstract_collection___Map_____braeq( variable[6] /*colors*/)( variable[6] /*colors*/, variable[16], variable[17]) /*HashMap::[]=*/;
- }
- continue_33: while(0);
- CALL_abstract_collection___Iterator___next(variable[13])(variable[13]) /*Iterator::next*/;
+ if (UNTAG_Bool(REGB0)) {
+ goto label3;
}
- break_33: while(0);
- continue_28: while(0);
- CALL_abstract_collection___Iterator___next(variable[8])(variable[8]) /*ArrayIterator::next*/;
+ /* ./compiling//compiling_global.nit:33 */
+ CALL_compiling_global___MMLocalClass___compile_tables_to_c(fra.me.REG[0])(fra.me.REG[0], closctx->REG[1]);
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
+ return;
}
- break_28: while(0);
- return_label27: while(false);
- tracehead = trace.prev;
- return;
-}
-val_t compiling_global___MMSrcModule___free_color(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 403, LOCATE_compiling_global___MMSrcModule___free_color};
- val_t variable[8];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: For iterator */
- variable[4] = CALL_abstract_collection___Collection___iterator( variable[1] /*es*/)( variable[1] /*es*/) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[5]: For 'is_ok' result */
- variable[5] = CALL_abstract_collection___Iterator___is_ok(variable[4])(variable[4]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[5])) break; /*for*/
- variable[5] = CALL_abstract_collection___Iterator___item(variable[4])(variable[4]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[6]: Local variable */
- variable[6] = variable[5];
- /* Register variable[7]: Result */
- variable[7] = CALL_compiling_global___TableElt___is_related_to( variable[6] /*e2*/)( variable[6] /*e2*/, variable[2] /*c*/) /*TableElt::is_related_to*/;
- if (UNTAG_Bool(variable[7])) { /*if*/
- variable[3] = TAG_Bool(false);
- goto return_label34;
+void compiling_global___Program___compile_main_part(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 48;
+ fra.me.meth = LOCATE_compiling_global___Program___compile_main_part;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./compiling//compiling_global.nit:51 */
+ if (!once_value_1) {
+ fra.me.REG[2] = BOX_NativeString("int main(int argc, char **argv) {");
+ REGB0 = TAG_Int(33);
+ fra.me.REG[2] = NEW_String_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];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:52 */
+ CALL_compiling_base___CompilerVisitor___indent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:53 */
+ if (!once_value_2) {
+ fra.me.REG[2] = BOX_NativeString("prepare_signals();");
+ REGB0 = TAG_Int(18);
+ fra.me.REG[2] = NEW_String_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_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:54 */
+ if (!once_value_3) {
+ fra.me.REG[2] = BOX_NativeString("glob_argc = argc; glob_argv = argv;");
+ REGB0 = TAG_Int(35);
+ fra.me.REG[2] = NEW_String_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_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:55 */
+ fra.me.REG[2] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[2] = CALL_program___Program___main_method(fra.me.REG[2])(fra.me.REG[2]);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
+ REGB0 = REGB1;
}
- continue_35: while(0);
- CALL_abstract_collection___Iterator___next(variable[4])(variable[4]) /*ArrayIterator::next*/;
- }
- break_35: while(0);
- variable[3] = TAG_Bool(true);
- goto return_label34;
- return_label34: while(false);
- tracehead = trace.prev;
- return variable[3];
-}
-void compiling_global___MMSrcModule___compile_tables_to_c(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 413, LOCATE_compiling_global___MMSrcModule___compile_tables_to_c};
- static val_t once_value_39 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_41 = NIT_NULL; /* Once value for string variable[5]*/
- static val_t once_value_42 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_43 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_44 = NIT_NULL; /* Once value for string variable[8]*/
- static val_t once_value_45 = NIT_NULL; /* Once value for string variable[8]*/
- static val_t once_value_46 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_47 = NIT_NULL; /* Once value for string variable[4]*/
- val_t variable[9];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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_global___MMSrcModule___compile_tables_to_c, LOCATE_compiling_global, 417); nit_exit(1);}
- CALL_compiling_global___MMSrcModule___compile_local_table_to_c( variable[5] /*m*/)( variable[5] /*m*/, variable[1] /*v*/) /*MMSrcModule::compile_local_table_to_c*/;
- continue_37: while(0);
- CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
}
- break_37: while(0);
- /* Register variable[3]: Result */
- variable[3] = CALL_abstractmetamodel___MMModule___local_classes(variable[0])(variable[0]) /*MMModule::local_classes*/;
- /* Register variable[3]: For iterator */
- variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[4]: For 'is_ok' result */
- variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[4])) break; /*for*/
- variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[5]: Local variable */
- variable[5] = variable[4];
- CALL_compiling_global___MMLocalClass___compile_tables_to_c( variable[5] /*c*/)( variable[5] /*c*/, variable[1] /*v*/) /*MMLocalClass::compile_tables_to_c*/;
- continue_38: while(0);
- CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
- }
- break_38: while(0);
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Once String constant */
- if (once_value_39 != NIT_NULL) variable[4] = once_value_39;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("classtable_t TAG2VFT[4] = {NULL"), TAG_Int(31)) /*new String*/;
- once_value_39 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Register variable[4]: Result */
- variable[4] = NEW_Buffer_string___Buffer___from(variable[4]) /*new Buffer*/;
- variable[3] = variable[4];
- variable[4] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Literal array*/;
- /* Register variable[5]: Once String constant */
- if (once_value_41 != NIT_NULL) variable[5] = once_value_41;
- else {
- variable[5] = NEW_String_string___String___with_native(BOX_NativeString("Int"), TAG_Int(3)) /*new String*/;
- once_value_41 = variable[5];
- }
- /* Register variable[5]: Result */
- CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[5]) /*AbstractArray::add*/;
- /* Register variable[6]: Once String constant */
- if (once_value_42 != NIT_NULL) variable[6] = once_value_42;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("Char"), TAG_Int(4)) /*new String*/;
- once_value_42 = variable[6];
- }
- /* Register variable[6]: Result */
- CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[6]) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_43 != NIT_NULL) variable[7] = once_value_43;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("Bool"), TAG_Int(4)) /*new String*/;
- once_value_43 = variable[7];
- }
- /* Register variable[7]: Result */
- CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[7]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- /* Register variable[4]: For iterator */
- variable[4] = CALL_abstract_collection___Collection___iterator(variable[4])(variable[4]) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[5]: For 'is_ok' result */
- variable[5] = CALL_abstract_collection___Iterator___is_ok(variable[4])(variable[4]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[5])) break; /*for*/
- variable[5] = CALL_abstract_collection___Iterator___item(variable[4])(variable[4]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[6]: Local variable */
- variable[6] = variable[5];
- /* Register variable[7]: Result */
- variable[7] = CALL_symbol___String___to_symbol( variable[6] /*t*/)( variable[6] /*t*/) /*String::to_symbol*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_abstractmetamodel___MMModule___has_global_class_named(variable[0])(variable[0], variable[7]) /*MMModule::has_global_class_named*/;
- if (UNTAG_Bool(variable[7])) { /*if*/
- variable[7] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[8]: Once String constant */
- if (once_value_44 != NIT_NULL) variable[8] = once_value_44;
- else {
- variable[8] = NEW_String_string___String___with_native(BOX_NativeString(", (const classtable_t)VFT_"), TAG_Int(26)) /*new String*/;
- once_value_44 = variable[8];
- }
- /* Register variable[8]: Result */
- /* Ensure var variable[8]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[7])(variable[7], variable[8]) /*AbstractArray::add*/;
- variable[8] = variable[6] /*t*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[7])(variable[7], variable[8]) /*AbstractArray::add*/;
- /* Register variable[8]: Once String constant */
- if (once_value_45 != NIT_NULL) variable[8] = once_value_45;
- else {
- variable[8] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_45 = variable[8];
- }
- /* Register variable[8]: Result */
- /* Ensure var variable[8]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[7])(variable[7], variable[8]) /*AbstractArray::add*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/;
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*s*/)( variable[3] /*s*/, variable[7]) /*Buffer::append*/;
- } else { /*if*/
- /* Register variable[7]: Once String constant */
- if (once_value_46 != NIT_NULL) variable[7] = once_value_46;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(", NULL"), TAG_Int(6)) /*new String*/;
- once_value_46 = variable[7];
- }
- /* Register variable[7]: Result */
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*s*/)( variable[3] /*s*/, variable[7]) /*Buffer::append*/;
+ if (UNTAG_Bool(REGB0)) {
+ /* ./compiling//compiling_global.nit:56 */
+ if (!once_value_4) {
+ fra.me.REG[2] = BOX_NativeString("No main");
+ REGB0 = TAG_Int(7);
+ fra.me.REG[2] = NEW_String_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];
+ CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ } else {
+ /* ./compiling//compiling_global.nit:58 */
+ if (!once_value_5) {
+ fra.me.REG[2] = BOX_NativeString("G_sys = NEW_Sys();");
+ REGB0 = TAG_Int(18);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_5 = fra.me.REG[2];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[2] = once_value_5;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:59 */
+ if (!once_value_6) {
+ fra.me.REG[2] = BOX_NativeString("register_static_object(&G_sys);");
+ REGB0 = TAG_Int(31);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_6 = fra.me.REG[2];
+ register_static_object(&once_value_6);
+ } else fra.me.REG[2] = once_value_6;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:60 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_7) {
+ fra.me.REG[0] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_7 = fra.me.REG[0];
+ register_static_object(&once_value_7);
+ } else fra.me.REG[0] = once_value_7;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ fra.me.REG[0] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[0] = CALL_program___Program___main_method(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_global, 60);
}
- continue_40: while(0);
- CALL_abstract_collection___Iterator___next(variable[4])(variable[4]) /*ArrayIterator::next*/;
+ fra.me.REG[0] = CALL_compiling_base___MMLocalProperty___cname(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ if (!once_value_8) {
+ fra.me.REG[0] = BOX_NativeString("(G_sys);");
+ REGB0 = TAG_Int(8);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_8 = fra.me.REG[0];
+ register_static_object(&once_value_8);
+ } else fra.me.REG[0] = once_value_8;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
}
- break_40: while(0);
- /* Register variable[4]: Once String constant */
- if (once_value_47 != NIT_NULL) variable[4] = once_value_47;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("};"), TAG_Int(2)) /*new String*/;
- once_value_47 = variable[4];
- }
- /* Register variable[4]: Result */
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*s*/)( variable[3] /*s*/, variable[4]) /*Buffer::append*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_string___Object___to_s( variable[3] /*s*/)( variable[3] /*s*/) /*Buffer::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[4]) /*CompilerVisitor::add_instr*/;
- return_label36: while(false);
- tracehead = trace.prev;
+ /* ./compiling//compiling_global.nit:62 */
+ if (!once_value_9) {
+ fra.me.REG[2] = BOX_NativeString("return 0;");
+ REGB0 = TAG_Int(9);
+ fra.me.REG[2] = NEW_String_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_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:63 */
+ CALL_compiling_base___CompilerVisitor___unindent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:64 */
+ if (!once_value_10) {
+ fra.me.REG[2] = BOX_NativeString("}");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_10 = fra.me.REG[2];
+ register_static_object(&once_value_10);
+ } else fra.me.REG[2] = once_value_10;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ stack_frame_head = fra.me.prev;
return;
}
-void compiling_global___MMSrcModule___declare_class_tables_to_c(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 436, LOCATE_compiling_global___MMSrcModule___declare_class_tables_to_c};
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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___local_classes(variable[0])(variable[0]) /*MMModule::local_classes*/;
- /* Register variable[3]: For iterator */
- variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[4]: For 'is_ok' result */
- variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[4])) break; /*for*/
- variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[5]: Local variable */
- variable[5] = variable[4];
- /* Register variable[6]: Result */
- variable[6] = CALL_abstractmetamodel___MMLocalClass___global( variable[5] /*c*/)( variable[5] /*c*/) /*MMLocalClass::global*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstractmetamodel___MMGlobalClass___module(variable[6])(variable[6]) /*MMGlobalClass::module*/;
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool((variable[6] == variable[0]) || ((variable[6] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[6])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[6],variable[0])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[6])(variable[6], variable[0]) /*Object::==*/)))));
- if (UNTAG_Bool(variable[6])) { /*if*/
- CALL_compiling_global___MMLocalClass___declare_tables_to_c( variable[5] /*c*/)( variable[5] /*c*/, variable[1] /*v*/) /*MMLocalClass::declare_tables_to_c*/;
- }
- continue_49: while(0);
- CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
- }
- break_49: while(0);
- return_label48: while(false);
- tracehead = trace.prev;
+void compiling_global___MMModule___declare_class_tables_to_c(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 69;
+ fra.me.meth = LOCATE_compiling_global___MMModule___declare_class_tables_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./compiling//compiling_global.nit:72 */
+ fra.me.REG[2] = CALL_abstractmetamodel___MMModule___local_classes(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[2])(fra.me.REG[2], (&(fra.me)), ((fun_t)OC_compiling_global___MMModule___declare_class_tables_to_c_1));
+ stack_frame_head = fra.me.prev;
return;
}
-void compiling_global___MMSrcModule___compile_main_part(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 446, LOCATE_compiling_global___MMSrcModule___compile_main_part};
- static val_t once_value_51 = NIT_NULL; /* Once value for string variable[3]*/
- static val_t once_value_52 = NIT_NULL; /* Once value for string variable[3]*/
- static val_t once_value_53 = NIT_NULL; /* Once value for string variable[3]*/
- static val_t once_value_54; static int once_bool_54; /* Once value for variable[4]*/
- static val_t once_value_55 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_56 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_57; static int once_bool_57; /* Once value for variable[6]*/
- static val_t once_value_58 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_59 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_60 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_61 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_62 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_63 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_64 = NIT_NULL; /* Once value for string variable[4]*/
- val_t variable[8];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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]: Once String constant */
- if (once_value_51 != NIT_NULL) variable[3] = once_value_51;
- else {
- variable[3] = NEW_String_string___String___with_native(BOX_NativeString("int main(int argc, char **argv) {"), TAG_Int(33)) /*new String*/;
- once_value_51 = variable[3];
- }
- /* Register variable[3]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[3]) /*CompilerVisitor::add_instr*/;
- CALL_compiling_base___CompilerVisitor___indent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::indent*/;
- /* Register variable[3]: Once String constant */
- if (once_value_52 != NIT_NULL) variable[3] = once_value_52;
- else {
- variable[3] = NEW_String_string___String___with_native(BOX_NativeString("prepare_signals();"), TAG_Int(18)) /*new String*/;
- once_value_52 = variable[3];
+ void OC_compiling_global___MMModule___declare_class_tables_to_c_1(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[1];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ fun_t CREG[1];
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 0;
+ fra.me.meth = LOCATE_compiling_global___MMModule___declare_class_tables_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.closure_ctx = closctx_param;
+ fra.me.closure_funs = CREG;
+ fra.me.REG[0] = p0;
+ CREG[0] = clos_fun0;
+ /* ./compiling//compiling_global.nit:73 */
+ fra.me.REG[1] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_abstractmetamodel___MMGlobalClass___mmmodule(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[1],closctx->REG[0]));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], closctx->REG[0]);
+ REGB0 = REGB1;
+ }
+ if (UNTAG_Bool(REGB0)) {
+ /* ./compiling//compiling_global.nit:74 */
+ CALL_compiling_global___MMLocalClass___declare_tables_to_c(fra.me.REG[0])(fra.me.REG[0], closctx->REG[1]);
+ }
+ stack_frame_head = fra.me.prev;
+ return;
}
- /* Register variable[3]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[3]) /*CompilerVisitor::add_instr*/;
- /* Register variable[3]: Once String constant */
- if (once_value_53 != NIT_NULL) variable[3] = once_value_53;
- else {
- variable[3] = NEW_String_string___String___with_native(BOX_NativeString("glob_argc = argc; glob_argv = argv;"), TAG_Int(35)) /*new String*/;
- once_value_53 = variable[3];
+void compiling_global___MMModule___compile_mod_to_c(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[7];} 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 79;
+ fra.me.meth = LOCATE_compiling_global___MMModule___compile_mod_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 8;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./compiling//compiling_global.nit:82 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[3] = BOX_NativeString("extern const char *LOCATE_");
+ REGB0 = TAG_Int(26);
+ fra.me.REG[3] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ if (!once_value_2) {
+ fra.me.REG[3] = BOX_NativeString(";");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_2 = fra.me.REG[3];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[3] = once_value_2;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:83 */
+ fra.me.REG[2] = CALL_compiling_base___CompilerVisitor___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]);
+ REGB0 = CALL_program___ToolContext___use_SFT_optimization(fra.me.REG[2])(fra.me.REG[2]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ /* ./compiling//compiling_global.nit:84 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_3) {
+ fra.me.REG[3] = BOX_NativeString("extern const int SFT_");
+ REGB0 = TAG_Int(21);
+ fra.me.REG[3] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ if (!once_value_4) {
+ fra.me.REG[3] = BOX_NativeString("[];");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_4 = fra.me.REG[3];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[3] = once_value_4;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
}
- /* Register variable[3]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[3]) /*CompilerVisitor::add_instr*/;
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Once expression result */
- if (once_bool_54) variable[4] = once_value_54;
- else {
- /* Register variable[4]: Once String constant */
- if (once_value_55 != NIT_NULL) variable[4] = once_value_55;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("Sys"), TAG_Int(3)) /*new String*/;
- once_value_55 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Register variable[4]: Result */
- variable[4] = CALL_symbol___String___to_symbol(variable[4])(variable[4]) /*String::to_symbol*/;
- once_value_54 = variable[4];
- once_bool_54 = true;
+ /* ./compiling//compiling_global.nit:86 */
+ REGB0 = TAG_Int(0);
+ /* ./compiling//compiling_global.nit:87 */
+ fra.me.REG[2] = CALL_table_computation___MMModule___local_table(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB1 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
}
- /* Register variable[4]: Result */
- variable[3] = variable[4];
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMModule___has_global_class_named(variable[0])(variable[0], variable[3] /*sysname*/) /*MMModule::has_global_class_named*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[4])))) { /*if*/
- /* Register variable[4]: Once String constant */
- if (once_value_56 != NIT_NULL) variable[4] = once_value_56;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("No main"), TAG_Int(7)) /*new String*/;
- once_value_56 = variable[4];
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[2]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
}
- /* Register variable[4]: Result */
- CALL_file___Object___print(variable[0])(variable[0], variable[4]) /*Object::print*/;
- } else { /*if*/
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMModule___class_by_name(variable[0])(variable[0], variable[3] /*sysname*/) /*MMModule::class_by_name*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Once expression result */
- if (once_bool_57) variable[6] = once_value_57;
- else {
- /* Register variable[6]: Once String constant */
- if (once_value_58 != NIT_NULL) variable[6] = once_value_58;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("main"), TAG_Int(4)) /*new String*/;
- once_value_58 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Register variable[6]: Result */
- variable[6] = CALL_symbol___String___to_symbol(variable[6])(variable[6]) /*String::to_symbol*/;
- once_value_57 = variable[6];
- once_bool_57 = true;
- }
- /* Register variable[6]: Result */
- /* Register variable[6]: Result */
- variable[6] = CALL_abstractmetamodel___MMLocalClass___select_method( variable[4] /*sys*/)( variable[4] /*sys*/, variable[6]) /*MMLocalClass::select_method*/;
- variable[5] = variable[6];
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(( variable[5] /*mainm*/ == NIT_NULL /*null*/) || (( variable[5] /*mainm*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*mainm*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*mainm*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*mainm*/)( variable[5] /*mainm*/, NIT_NULL /*null*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable[6])) { /*if*/
- /* Register variable[6]: Once String constant */
- if (once_value_59 != NIT_NULL) variable[6] = once_value_59;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("No main"), TAG_Int(7)) /*new String*/;
- once_value_59 = variable[6];
- }
- /* Register variable[6]: Result */
- CALL_file___Object___print(variable[0])(variable[0], variable[6]) /*Object::print*/;
- } else { /*if*/
- /* Register variable[6]: Once String constant */
- if (once_value_60 != NIT_NULL) variable[6] = once_value_60;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("G_sys = NEW_Sys();"), TAG_Int(18)) /*new String*/;
- once_value_60 = variable[6];
- }
- /* Register variable[6]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[6]) /*CompilerVisitor::add_instr*/;
- variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[7]: Once String constant */
- if (once_value_61 != NIT_NULL) variable[7] = once_value_61;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_61 = variable[7];
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:237 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//collection//array.nit:238 */
+ REGB2 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
}
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_compiling_base___MMLocalProperty___cname( variable[5] /*mainm*/)( variable[5] /*mainm*/) /*MMLocalProperty::cname*/;
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_62 != NIT_NULL) variable[7] = once_value_62;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("(G_sys);"), TAG_Int(8)) /*new String*/;
- once_value_62 = variable[7];
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB1)];
+ /* ./compiling//compiling_global.nit:89 */
+ fra.me.REG[5] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[5] = CALL_program___Program___tc(fra.me.REG[5])(fra.me.REG[5]);
+ REGB2 = CALL_program___ToolContext___use_SFT_optimization(fra.me.REG[5])(fra.me.REG[5]);
+ if (UNTAG_Bool(REGB2)) {
+ /* ./compiling//compiling_global.nit:90 */
+ REGB2 = TAG_Int(3);
+ fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_5) {
+ fra.me.REG[6] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
+ once_value_5 = fra.me.REG[6];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[6] = once_value_5;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
+ fra.me.REG[6] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[6] = CALL_compiling_global___ModuleTableElt___value(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[6]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
+ if (!once_value_6) {
+ fra.me.REG[6] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
+ once_value_6 = fra.me.REG[6];
+ register_static_object(&once_value_6);
+ } else fra.me.REG[6] = once_value_6;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
+ fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+ } else {
+ /* ./compiling//compiling_global.nit:92 */
+ REGB2 = TAG_Int(5);
+ fra.me.REG[6] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_7) {
+ fra.me.REG[7] = BOX_NativeString("SFT_");
+ REGB2 = TAG_Int(4);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_7 = fra.me.REG[7];
+ register_static_object(&once_value_7);
+ } else fra.me.REG[7] = once_value_7;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
+ fra.me.REG[7] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
+ if (!once_value_8) {
+ fra.me.REG[7] = BOX_NativeString("[");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_8 = fra.me.REG[7];
+ register_static_object(&once_value_8);
+ } else fra.me.REG[7] = once_value_8;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
+ fra.me.REG[7] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
+ if (!once_value_9) {
+ fra.me.REG[7] = BOX_NativeString("]");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_9 = fra.me.REG[7];
+ register_static_object(&once_value_9);
+ } else fra.me.REG[7] = once_value_9;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
+ fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
+ fra.me.REG[5] = fra.me.REG[6];
+ /* ./compiling//compiling_global.nit:93 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
+ /* ./compiling//compiling_global.nit:93 */
+ REGB0 = REGB2;
}
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[6]) /*CompilerVisitor::add_instr*/;
+ /* ./compiling//compiling_global.nit:95 */
+ CALL_compiling_global___AbsTableElt___compile_macros(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1], fra.me.REG[5]);
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB1 = REGB2;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label10;
}
}
- /* Register variable[4]: Once String constant */
- if (once_value_63 != NIT_NULL) variable[4] = once_value_63;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("return 0;"), TAG_Int(9)) /*new String*/;
- once_value_63 = variable[4];
- }
- /* Register variable[4]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[4]) /*CompilerVisitor::add_instr*/;
- CALL_compiling_base___CompilerVisitor___unindent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::unindent*/;
- /* Register variable[4]: Once String constant */
- if (once_value_64 != NIT_NULL) variable[4] = once_value_64;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("}"), TAG_Int(1)) /*new String*/;
- once_value_64 = variable[4];
- }
- /* Register variable[4]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[4]) /*CompilerVisitor::add_instr*/;
- return_label50: while(false);
- tracehead = trace.prev;
+ label10: while(0);
+ /* ./compiling//compiling_global.nit:97 */
+ fra.me.REG[0] = CALL_abstractmetamodel___MMModule___local_classes(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_compiling_global___MMModule___compile_mod_to_c_11));
+ stack_frame_head = fra.me.prev;
return;
}
-void compiling_global___MMSrcModule___compile_mod_to_c(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 473, LOCATE_compiling_global___MMSrcModule___compile_mod_to_c};
- static val_t once_value_66 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_67 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_68 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_69 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_71 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_72 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_73 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_74 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_75 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_79 = NIT_NULL; /* Once value for string variable[16]*/
- static val_t once_value_80 = NIT_NULL; /* Once value for string variable[16]*/
- static val_t once_value_81 = NIT_NULL; /* Once value for string variable[13]*/
- static val_t once_value_82 = NIT_NULL; /* Once value for string variable[13]*/
- static val_t once_value_83 = NIT_NULL; /* Once value for string variable[13]*/
- static val_t once_value_84 = NIT_NULL; /* Once value for string variable[13]*/
- static val_t once_value_85 = NIT_NULL; /* Once value for string variable[13]*/
- val_t variable[17];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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 */
- variable[3] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[4]: Once String constant */
- if (once_value_66 != NIT_NULL) variable[4] = once_value_66;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("extern const char *LOCATE_"), TAG_Int(26)) /*new String*/;
- once_value_66 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMModule___name(variable[0])(variable[0]) /*MMModule::name*/;
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[4]: Once String constant */
- if (once_value_67 != NIT_NULL) variable[4] = once_value_67;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(";"), TAG_Int(1)) /*new String*/;
- once_value_67 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_decl( variable[1] /*v*/)( variable[1] /*v*/, variable[3]) /*CompilerVisitor::add_decl*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_compiling_base___CompilerVisitor___tc( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::tc*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_compiling_base___ToolContext___global(variable[3])(variable[3]) /*ToolContext::global*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[3])))) { /*if*/
- variable[3] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[4]: Once String constant */
- if (once_value_68 != NIT_NULL) variable[4] = once_value_68;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("extern const int SFT_"), TAG_Int(21)) /*new String*/;
- once_value_68 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMModule___name(variable[0])(variable[0]) /*MMModule::name*/;
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[4]: Once String constant */
- if (once_value_69 != NIT_NULL) variable[4] = once_value_69;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("[];"), TAG_Int(3)) /*new String*/;
- once_value_69 = variable[4];
+ void OC_compiling_global___MMModule___compile_mod_to_c_11(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;
+ val_t REGB0;
+ fun_t CREG[1];
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 0;
+ fra.me.meth = LOCATE_compiling_global___MMModule___compile_mod_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.closure_ctx = closctx_param;
+ fra.me.closure_funs = CREG;
+ fra.me.REG[0] = p0;
+ CREG[0] = clos_fun0;
+ closctx->REG[0] = fra.me.REG[0];
+ /* ./compiling//compiling_global.nit:98 */
+ REGB0 = TAG_Bool(VAL_ISA(closctx->REG[0], COLOR_MMConcreteClass, ID_MMConcreteClass)) /*cast MMConcreteClass*/;
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ goto label12;
}
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_decl( variable[1] /*v*/)( variable[1] /*v*/, variable[3]) /*CompilerVisitor::add_decl*/;
+ /* ./compiling//compiling_global.nit:99 */
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalClass___global_properties(closctx->REG[0])(closctx->REG[0]);
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], closctx, ((fun_t)OC_compiling_global___MMModule___compile_mod_to_c_13));
+ label12: while(0);
+ stack_frame_head = fra.me.prev;
+ return;
}
- /* Register variable[3]: Local variable */
- variable[3] = TAG_Int(0);
- /* Register variable[4]: Result */
- variable[4] = ATTR_compiling_global___MMSrcModule____local_table(variable[0]) /*MMSrcModule::_local_table*/;
- /* Register variable[4]: For iterator */
- variable[4] = CALL_abstract_collection___Collection___iterator(variable[4])(variable[4]) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[5]: For 'is_ok' result */
- variable[5] = CALL_abstract_collection___Iterator___is_ok(variable[4])(variable[4]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[5])) break; /*for*/
- variable[5] = CALL_abstract_collection___Iterator___item(variable[4])(variable[4]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[6]: Local variable */
- variable[6] = variable[5];
- /* Register variable[7]: Local variable */
- /*variable[7] is variable value*/
- /* Register variable[8]: Result */
- variable[8] = CALL_compiling_base___CompilerVisitor___tc( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::tc*/;
- /* Register variable[8]: Result */
- variable[8] = CALL_compiling_base___ToolContext___global(variable[8])(variable[8]) /*ToolContext::global*/;
- if (UNTAG_Bool(variable[8])) { /*if*/
- variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[9]: Once String constant */
- if (once_value_71 != NIT_NULL) variable[9] = once_value_71;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_71 = variable[9];
+ void OC_compiling_global___MMModule___compile_mod_to_c_13(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[3];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t REGB3;
+ fun_t CREG[1];
+ val_t tmp;
+ static val_t once_value_14; /* Once value */
+ static val_t once_value_15; /* 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 0;
+ fra.me.meth = LOCATE_compiling_global___MMModule___compile_mod_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.closure_ctx = closctx_param;
+ fra.me.closure_funs = CREG;
+ fra.me.REG[0] = p0;
+ CREG[0] = clos_fun0;
+ /* ./compiling//compiling_global.nit:100 */
+ fra.me.REG[1] = CALL_abstractmetamodel___MMLocalClass_____bra(closctx->REG[0])(closctx->REG[0], fra.me.REG[0]);
+ /* ./compiling//compiling_global.nit:101 */
+ fra.me.REG[2] = CALL_abstractmetamodel___MMLocalProperty___local_class(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[2],closctx->REG[0]));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], closctx->REG[0]);
+ REGB0 = REGB1;
}
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[9]: Result */
- variable[9] = CALL_compiling_global___GlobalCompilerVisitor___global_analysis( variable[1] /*v*/)( variable[1] /*v*/) /*GlobalCompilerVisitor::global_analysis*/;
- /* Register variable[9]: Result */
- variable[9] = CALL_compiling_global___ModuleTableElt___value( variable[6] /*e*/)( variable[6] /*e*/, variable[9]) /*ModuleTableElt::value*/;
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_72 != NIT_NULL) variable[9] = once_value_72;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_72 = variable[9];
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[1], COLOR_MMMethod, ID_MMMethod)) /*cast MMMethod*/;
+ } else {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
}
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[8]: Result */
- variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
- variable[7] = variable[8] /*value=*/;
- } else { /*if*/
- variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[9]: Once String constant */
- if (once_value_73 != NIT_NULL) variable[9] = once_value_73;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString("SFT_"), TAG_Int(4)) /*new String*/;
- once_value_73 = variable[9];
- }
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[9]: Result */
- variable[9] = CALL_abstractmetamodel___MMModule___name(variable[0])(variable[0]) /*MMModule::name*/;
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_74 != NIT_NULL) variable[9] = once_value_74;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString("["), TAG_Int(1)) /*new String*/;
- once_value_74 = variable[9];
- }
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- variable[9] = variable[3] /*i*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_75 != NIT_NULL) variable[9] = once_value_75;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString("]"), TAG_Int(1)) /*new String*/;
- once_value_75 = variable[9];
- }
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[8]: Result */
- variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
- variable[7] = variable[8] /*value=*/;
- /* Register variable[8]: Result */
- variable[8] = TAG_Int(UNTAG_Int( variable[3] /*i*/)+UNTAG_Int( TAG_Int(1)));
- variable[3] = variable[8] /*i=*/;
- }
- CALL_compiling_global___AbsTableElt___compile_macros( variable[6] /*e*/)( variable[6] /*e*/, variable[1] /*v*/, variable[7] /*value*/) /*AbsTableElt::compile_macros*/;
- continue_70: while(0);
- CALL_abstract_collection___Iterator___next(variable[4])(variable[4]) /*ArrayIterator::next*/;
- }
- break_70: while(0);
- /* Register variable[4]: Result */
- variable[4] = CALL_syntax_base___MMSrcModule___src_local_classes(variable[0])(variable[0]) /*MMSrcModule::src_local_classes*/;
- /* Register variable[4]: For iterator */
- variable[4] = CALL_abstract_collection___Collection___iterator(variable[4])(variable[4]) /*MapRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[5]: For 'is_ok' result */
- variable[5] = CALL_abstract_collection___Iterator___is_ok(variable[4])(variable[4]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[5])) break; /*for*/
- variable[5] = CALL_abstract_collection___Iterator___item(variable[4])(variable[4]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[6]: Local variable */
- variable[6] = variable[5];
- /* Register variable[7]: Result */
- variable[7] = CALL_abstractmetamodel___MMLocalClass___global_properties( variable[6] /*c*/)( variable[6] /*c*/) /*MMLocalClass::global_properties*/;
- /* Register variable[7]: For iterator */
- variable[7] = CALL_abstract_collection___Collection___iterator(variable[7])(variable[7]) /*Collection::iterator*/;
- while (true) { /*for*/
- /* Register variable[8]: For 'is_ok' result */
- variable[8] = CALL_abstract_collection___Iterator___is_ok(variable[7])(variable[7]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[8])) break; /*for*/
- variable[8] = CALL_abstract_collection___Iterator___item(variable[7])(variable[7]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[9]: Local variable */
- variable[9] = variable[8];
- /* Register variable[10]: Local variable */
- /* Register variable[11]: Result */
- variable[11] = CALL_abstractmetamodel___MMLocalClass_____bra( variable[6] /*c*/)( variable[6] /*c*/, variable[9] /*pg*/) /*MMLocalClass::[]*/;
- variable[10] = variable[11];
- /* Register variable[11]: Result */
- variable[11] = CALL_abstractmetamodel___MMLocalProperty___local_class( variable[10] /*p*/)( variable[10] /*p*/) /*MMLocalProperty::local_class*/;
- /* Register variable[11]: Result */
- variable[11] = TAG_Bool((variable[11] == variable[6] /*c*/) || ((variable[11] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[11])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[11], variable[6] /*c*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[11])(variable[11], variable[6] /*c*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable[11])) { /*if*/
- CALL_compiling_methods___MMLocalProperty___compile_property_to_c( variable[10] /*p*/)( variable[10] /*p*/, variable[1] /*v*/) /*MMLocalProperty::compile_property_to_c*/;
+ if (UNTAG_Bool(REGB0)) {
+ /* ./compiling//compiling_global.nit:102 */
+ CALL_compiling_global___MMMethod___compile_property_to_c(fra.me.REG[1])(fra.me.REG[1], closctx->REG[1]);
}
- /* Register variable[11]: Result */
- variable[11] = CALL_abstractmetamodel___MMGlobalProperty___is_init_for( variable[9] /*pg*/)( variable[9] /*pg*/, variable[6] /*c*/) /*MMGlobalProperty::is_init_for*/;
- if (UNTAG_Bool(variable[11])) { /*if*/
- /* Register variable[11]: Local variable */
- /* Register variable[12]: Result */
- variable[12] = NEW_Array_array___Array___init() /*new Array[String]*/;
- variable[11] = variable[12];
- /* Register variable[12]: Result */
- variable[12] = CALL_static_type___MMLocalProperty___signature( variable[10] /*p*/)( variable[10] /*p*/) /*MMLocalProperty::signature*/;
- /* Register variable[12]: Result */
- variable[12] = CALL_static_type___MMSignature___arity(variable[12])(variable[12]) /*MMSignature::arity*/;
- /* Register variable[12]: Result */
- variable[12] = NEW_Range_range___Range___without_last( TAG_Int(0), variable[12]) /*new Range[Int]*/;
- /* Register variable[12]: For iterator */
- variable[12] = CALL_abstract_collection___Collection___iterator(variable[12])(variable[12]) /*Range::iterator*/;
- while (true) { /*for*/
- /* Register variable[13]: For 'is_ok' result */
- variable[13] = CALL_abstract_collection___Iterator___is_ok(variable[12])(variable[12]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[13])) break; /*for*/
- variable[13] = CALL_abstract_collection___Iterator___item(variable[12])(variable[12]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[14]: Local variable */
- variable[14] = variable[13];
- variable[15] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[16]: Once String constant */
- if (once_value_79 != NIT_NULL) variable[16] = once_value_79;
- else {
- variable[16] = NEW_String_string___String___with_native(BOX_NativeString("val_t p"), TAG_Int(7)) /*new String*/;
- once_value_79 = variable[16];
- }
- /* Register variable[16]: Result */
- /* Ensure var variable[16]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[15])(variable[15], variable[16]) /*AbstractArray::add*/;
- variable[16] = variable[14] /*i*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[15])(variable[15], CALL_string___Object___to_s(variable[16])(variable[16]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[16]: Once String constant */
- if (once_value_80 != NIT_NULL) variable[16] = once_value_80;
- else {
- variable[16] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_80 = variable[16];
- }
- /* Register variable[16]: Result */
- /* Ensure var variable[16]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[15])(variable[15], variable[16]) /*AbstractArray::add*/;
- /* Register variable[15]: Result */
- variable[15] = CALL_string___Object___to_s(variable[15])(variable[15]) /*Object::to_s*/;
- CALL_abstract_collection___SimpleCollection___add( variable[11] /*params*/)( variable[11] /*params*/, variable[15]) /*AbstractArray::add*/;
- continue_78: while(0);
- CALL_abstract_collection___Iterator___next(variable[12])(variable[12]) /*Iterator::next*/;
- }
- break_78: while(0);
- variable[12] = NEW_Array_array___Array___with_capacity(TAG_Int(7)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[13]: Once String constant */
- if (once_value_81 != NIT_NULL) variable[13] = once_value_81;
- else {
- variable[13] = NEW_String_string___String___with_native(BOX_NativeString("val_t NEW_"), TAG_Int(10)) /*new String*/;
- once_value_81 = variable[13];
- }
- /* Register variable[13]: Result */
- /* Ensure var variable[13]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[13]) /*AbstractArray::add*/;
- variable[13] = variable[6] /*c*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], CALL_string___Object___to_s(variable[13])(variable[13]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[13]: Once String constant */
- if (once_value_82 != NIT_NULL) variable[13] = once_value_82;
- else {
- variable[13] = NEW_String_string___String___with_native(BOX_NativeString("_"), TAG_Int(1)) /*new String*/;
- once_value_82 = variable[13];
- }
- /* Register variable[13]: Result */
- /* Ensure var variable[13]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[13]) /*AbstractArray::add*/;
- /* Register variable[13]: Result */
- variable[13] = CALL_abstractmetamodel___MMLocalProperty___global( variable[10] /*p*/)( variable[10] /*p*/) /*MMLocalProperty::global*/;
- /* Register variable[13]: Result */
- variable[13] = CALL_abstractmetamodel___MMGlobalProperty___intro(variable[13])(variable[13]) /*MMGlobalProperty::intro*/;
- /* Register variable[13]: Result */
- variable[13] = CALL_compiling_base___MMLocalProperty___cname(variable[13])(variable[13]) /*MMLocalProperty::cname*/;
- /* Ensure var variable[13]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[13]) /*AbstractArray::add*/;
- /* Register variable[13]: Once String constant */
- if (once_value_83 != NIT_NULL) variable[13] = once_value_83;
- else {
- variable[13] = NEW_String_string___String___with_native(BOX_NativeString("("), TAG_Int(1)) /*new String*/;
- once_value_83 = variable[13];
+ /* ./compiling//compiling_global.nit:104 */
+ REGB0 = CALL_abstractmetamodel___MMGlobalProperty___is_init_for(fra.me.REG[0])(fra.me.REG[0], closctx->REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ /* ./compiling//compiling_global.nit:106 */
+ fra.me.REG[0] = NEW_Array_array___Array___init();
+ /* ./compiling//compiling_global.nit:107 */
+ REGB0 = TAG_Int(0);
+ fra.me.REG[2] = CALL_static_type___MMLocalProperty___signature(fra.me.REG[1])(fra.me.REG[1]);
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 107);
}
- /* Register variable[13]: Result */
- /* Ensure var variable[13]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[13]) /*AbstractArray::add*/;
- /* Register variable[13]: Once String constant */
- if (once_value_84 != NIT_NULL) variable[13] = once_value_84;
- else {
- variable[13] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)) /*new String*/;
- once_value_84 = variable[13];
- }
- /* Register variable[13]: Result */
- /* Register variable[13]: Result */
- variable[13] = CALL_string___Collection___join( variable[11] /*params*/)( variable[11] /*params*/, variable[13]) /*Collection::join*/;
- /* Ensure var variable[13]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[13]) /*AbstractArray::add*/;
- /* Register variable[13]: Once String constant */
- if (once_value_85 != NIT_NULL) variable[13] = once_value_85;
- else {
- variable[13] = NEW_String_string___String___with_native(BOX_NativeString(");"), TAG_Int(2)) /*new String*/;
- once_value_85 = variable[13];
+ REGB1 = CALL_static_type___MMSignature___arity(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./../lib/standard//kernel.nit:332 */
+ while(1) {
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//kernel.nit:332 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./compiling//compiling_global.nit:107 */
+ REGB2 = REGB0;
+ /* ./compiling//compiling_global.nit:108 */
+ REGB3 = TAG_Int(3);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB3);
+ if (!once_value_14) {
+ fra.me.REG[3] = BOX_NativeString("val_t p");
+ REGB3 = TAG_Int(7);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB3);
+ once_value_14 = fra.me.REG[3];
+ register_static_object(&once_value_14);
+ } else fra.me.REG[3] = once_value_14;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_string___Object___to_s(REGB2)(REGB2);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ if (!once_value_15) {
+ fra.me.REG[3] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB2);
+ once_value_15 = fra.me.REG[3];
+ register_static_object(&once_value_15);
+ } else fra.me.REG[3] = once_value_15;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ /* ./../lib/standard//kernel.nit:334 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
+ /* ./../lib/standard//kernel.nit:334 */
+ REGB0 = REGB2;
+ } else {
+ /* ./../lib/standard//kernel.nit:332 */
+ goto label16;
+ }
}
- /* Register variable[13]: Result */
- /* Ensure var variable[13]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[13]) /*AbstractArray::add*/;
- /* Register variable[12]: Result */
- variable[12] = CALL_string___Object___to_s(variable[12])(variable[12]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_decl( variable[1] /*v*/)( variable[1] /*v*/, variable[12]) /*CompilerVisitor::add_decl*/;
+ label16: while(0);
+ /* ./compiling//compiling_global.nit:110 */
+ REGB0 = TAG_Int(7);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_17) {
+ fra.me.REG[3] = BOX_NativeString("val_t NEW_");
+ REGB0 = TAG_Int(10);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_17 = fra.me.REG[3];
+ register_static_object(&once_value_17);
+ } else fra.me.REG[3] = once_value_17;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_string___Object___to_s(closctx->REG[0])(closctx->REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ if (!once_value_18) {
+ fra.me.REG[3] = BOX_NativeString("_");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_18 = fra.me.REG[3];
+ register_static_object(&once_value_18);
+ } else fra.me.REG[3] = once_value_18;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[1] = CALL_abstractmetamodel___MMLocalProperty___global(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[1] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[1] = CALL_compiling_base___MMLocalProperty___cname(fra.me.REG[1])(fra.me.REG[1]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ if (!once_value_19) {
+ fra.me.REG[1] = BOX_NativeString("(");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
+ once_value_19 = fra.me.REG[1];
+ register_static_object(&once_value_19);
+ } else fra.me.REG[1] = once_value_19;
+ fra.me.REG[1] = fra.me.REG[1];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ if (!once_value_20) {
+ fra.me.REG[1] = BOX_NativeString(", ");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
+ once_value_20 = fra.me.REG[1];
+ register_static_object(&once_value_20);
+ } else fra.me.REG[1] = once_value_20;
+ fra.me.REG[1] = fra.me.REG[1];
+ fra.me.REG[1] = CALL_string___Collection___join(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ if (!once_value_21) {
+ fra.me.REG[1] = BOX_NativeString(");");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
+ once_value_21 = fra.me.REG[1];
+ register_static_object(&once_value_21);
+ } else fra.me.REG[1] = once_value_21;
+ fra.me.REG[1] = fra.me.REG[1];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_compiling_base___CompilerVisitor___add_decl(closctx->REG[1])(closctx->REG[1], fra.me.REG[2]);
}
- continue_77: while(0);
- CALL_abstract_collection___Iterator___next(variable[7])(variable[7]) /*Iterator::next*/;
+ stack_frame_head = fra.me.prev;
+ return;
}
- break_77: while(0);
- continue_76: while(0);
- CALL_abstract_collection___Iterator___next(variable[4])(variable[4]) /*Iterator::next*/;
- }
- break_76: while(0);
- return_label65: while(false);
- tracehead = trace.prev;
- return;
-}
-void compiling_global___MMSrcModule___compile_local_table_to_c(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 509, LOCATE_compiling_global___MMSrcModule___compile_local_table_to_c};
- static val_t once_value_87 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_88 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_89 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_90 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_91 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_92 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_94 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_95 = NIT_NULL; /* Once value for string variable[3]*/
- val_t variable[8];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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 */
- variable[3] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[4]: Once String constant */
- if (once_value_87 != NIT_NULL) variable[4] = once_value_87;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("const char *LOCATE_"), TAG_Int(19)) /*new String*/;
- once_value_87 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMModule___name(variable[0])(variable[0]) /*MMModule::name*/;
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[4]: Once String constant */
- if (once_value_88 != NIT_NULL) variable[4] = once_value_88;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(" = \""), TAG_Int(4)) /*new String*/;
- once_value_88 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMModule___filename(variable[0])(variable[0]) /*MMModule::filename*/;
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[4]: Once String constant */
- if (once_value_89 != NIT_NULL) variable[4] = once_value_89;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("\";"), TAG_Int(2)) /*new String*/;
- once_value_89 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[3]) /*CompilerVisitor::add_instr*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_compiling_base___CompilerVisitor___tc( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::tc*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_compiling_base___ToolContext___global(variable[3])(variable[3]) /*ToolContext::global*/;
- /* Ensure var variable[3]: Left 'or' operand*/
- if (!UNTAG_Bool(variable[3])) { /* or */
- /* Register variable[3]: Result */
- variable[3] = ATTR_compiling_global___MMSrcModule____local_table(variable[0]) /*MMSrcModule::_local_table*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___Collection___is_empty(variable[3])(variable[3]) /*AbstractArrayRead::is_empty*/;
- }
- /* Register variable[3]: Result */
- if (UNTAG_Bool(variable[3])) { /*if*/
- goto return_label86;
+void compiling_global___MMModule___compile_local_table_to_c(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ 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_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_10; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 116;
+ fra.me.meth = LOCATE_compiling_global___MMModule___compile_local_table_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./compiling//compiling_global.nit:119 */
+ REGB0 = TAG_Int(5);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[3] = BOX_NativeString("const char *LOCATE_");
+ REGB0 = TAG_Int(19);
+ fra.me.REG[3] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ if (!once_value_2) {
+ fra.me.REG[3] = BOX_NativeString(" = \"");
+ REGB0 = TAG_Int(4);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_2 = fra.me.REG[3];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[3] = once_value_2;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMModule___location(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_location___Location___file(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ if (!once_value_3) {
+ fra.me.REG[3] = BOX_NativeString("\";");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[3] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:121 */
+ fra.me.REG[2] = CALL_compiling_base___CompilerVisitor___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]);
+ REGB0 = CALL_program___ToolContext___use_SFT_optimization(fra.me.REG[2])(fra.me.REG[2]);
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(true);
+ } else {
+ fra.me.REG[2] = CALL_table_computation___MMModule___local_table(fra.me.REG[0])(fra.me.REG[0]);
+ REGB1 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[2])(fra.me.REG[2]);
+ REGB0 = REGB1;
}
- variable[3] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[4]: Once String constant */
- if (once_value_90 != NIT_NULL) variable[4] = once_value_90;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("const int SFT_"), TAG_Int(14)) /*new String*/;
- once_value_90 = variable[4];
+ if (UNTAG_Bool(REGB0)) {
+ /* ./compiling//compiling_global.nit:122 */
+ goto label4;
}
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMModule___name(variable[0])(variable[0]) /*MMModule::name*/;
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[4]: Once String constant */
- if (once_value_91 != NIT_NULL) variable[4] = once_value_91;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("["), TAG_Int(1)) /*new String*/;
- once_value_91 = variable[4];
+ /* ./compiling//compiling_global.nit:125 */
+ REGB0 = TAG_Int(5);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_5) {
+ fra.me.REG[3] = BOX_NativeString("const int SFT_");
+ REGB0 = TAG_Int(14);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_5 = fra.me.REG[3];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[3] = once_value_5;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMModule___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ if (!once_value_6) {
+ fra.me.REG[3] = BOX_NativeString("[");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[3] = NEW_String_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];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_table_computation___MMModule___local_table(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
}
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = ATTR_compiling_global___MMSrcModule____local_table(variable[0]) /*MMSrcModule::_local_table*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArrayRead::length*/;
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[4]: Once String constant */
- if (once_value_92 != NIT_NULL) variable[4] = once_value_92;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("] = {"), TAG_Int(5)) /*new String*/;
- once_value_92 = variable[4];
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:125 */
+ fra.me.REG[3] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ if (!once_value_7) {
+ fra.me.REG[3] = BOX_NativeString("] = {");
+ REGB0 = TAG_Int(5);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_7 = fra.me.REG[3];
+ register_static_object(&once_value_7);
+ } else fra.me.REG[3] = once_value_7;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:126 */
+ CALL_compiling_base___CompilerVisitor___indent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:127 */
+ fra.me.REG[0] = CALL_table_computation___MMModule___local_table(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB0 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
}
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[3]) /*CompilerVisitor::add_instr*/;
- CALL_compiling_base___CompilerVisitor___indent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::indent*/;
- /* Register variable[3]: Result */
- variable[3] = ATTR_compiling_global___MMSrcModule____local_table(variable[0]) /*MMSrcModule::_local_table*/;
- /* Register variable[3]: For iterator */
- variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[4]: For 'is_ok' result */
- variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[4])) break; /*for*/
- variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[5]: Local variable */
- variable[5] = variable[4];
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___GlobalCompilerVisitor___global_analysis( variable[1] /*v*/)( variable[1] /*v*/) /*GlobalCompilerVisitor::global_analysis*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___ModuleTableElt___value( variable[5] /*e*/)( variable[5] /*e*/, variable[6]) /*ModuleTableElt::value*/;
- /* Register variable[7]: Once String constant */
- if (once_value_94 != NIT_NULL) variable[7] = once_value_94;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(","), TAG_Int(1)) /*new String*/;
- once_value_94 = variable[7];
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:237 */
+ if (UNTAG_Bool(REGB1)) {
+ /* ./../lib/standard//collection//array.nit:238 */
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
+ /* ./compiling//compiling_global.nit:128 */
+ fra.me.REG[4] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[4] = CALL_compiling_global___ModuleTableElt___value(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ if (!once_value_8) {
+ fra.me.REG[3] = BOX_NativeString(",");
+ REGB1 = TAG_Int(1);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB1);
+ once_value_8 = fra.me.REG[3];
+ register_static_object(&once_value_8);
+ } else fra.me.REG[3] = once_value_8;
+ fra.me.REG[3] = fra.me.REG[3];
+ fra.me.REG[3] = CALL_string___String_____plus(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB0 = REGB1;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label9;
}
- /* Register variable[7]: Result */
- /* Register variable[6]: Result */
- variable[6] = CALL_string___String_____plus(variable[6])(variable[6], variable[7]) /*String::+*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[6]) /*CompilerVisitor::add_instr*/;
- continue_93: while(0);
- CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
- }
- break_93: while(0);
- CALL_compiling_base___CompilerVisitor___unindent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::unindent*/;
- /* Register variable[3]: Once String constant */
- if (once_value_95 != NIT_NULL) variable[3] = once_value_95;
- else {
- variable[3] = NEW_String_string___String___with_native(BOX_NativeString("};"), TAG_Int(2)) /*new String*/;
- once_value_95 = variable[3];
}
- /* Register variable[3]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[3]) /*CompilerVisitor::add_instr*/;
- return_label86: while(false);
- tracehead = trace.prev;
- return;
-}
-void compiling_global___AbsTableElt___compile_macros(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 532, LOCATE_compiling_global___AbsTableElt___compile_macros};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- fprintf(stderr, "Deferred method called");
- fprintf(stderr, " (%s:%d)\n", LOCATE_compiling_global, 532);
- nit_exit(1);
- tracehead = trace.prev;
+ label9: while(0);
+ /* ./compiling//compiling_global.nit:130 */
+ CALL_compiling_base___CompilerVisitor___unindent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:131 */
+ if (!once_value_10) {
+ fra.me.REG[2] = BOX_NativeString("};");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_10 = fra.me.REG[2];
+ register_static_object(&once_value_10);
+ } else fra.me.REG[2] = once_value_10;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ label4: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void compiling_global___AbsTableElt___init(val_t self, int* init_table) {
- struct trace_t trace = {NULL, NULL, 0, LOCATE_compiling_global___AbsTableElt___init};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
+void compiling_global___AbsTableElt___compile_macros(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 138;
+ fra.me.meth = LOCATE_compiling_global___AbsTableElt___compile_macros;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 0;
+ /* ./compiling//compiling_global.nit:138 */
+ nit_abort("Deferred method called", NULL, LOCATE_compiling_global, 138);
+ stack_frame_head = fra.me.prev;
return;
}
-val_t compiling_global___TableElt___is_related_to(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 540, LOCATE_compiling_global___TableElt___is_related_to};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- fprintf(stderr, "Deferred method called");
- fprintf(stderr, " (%s:%d)\n", LOCATE_compiling_global, 540);
- nit_exit(1);
- tracehead = trace.prev;
+val_t compiling_global___TableElt___compile_to_c(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 143;
+ fra.me.meth = LOCATE_compiling_global___TableElt___compile_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 0;
+ /* ./compiling//compiling_global.nit:143 */
+ nit_abort("Deferred method called", NULL, LOCATE_compiling_global, 143);
+ stack_frame_head = fra.me.prev;
return NIT_NULL;
}
-val_t compiling_global___TableElt___length(val_t self) {
- struct trace_t trace = {NULL, NULL, 543, LOCATE_compiling_global___TableElt___length};
- val_t variable[2];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- variable[1] = TAG_Int(1);
- goto return_label96;
- return_label96: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t compiling_global___TableElt___item(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 546, LOCATE_compiling_global___TableElt___item};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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 */
- variable[2] = variable[0];
- goto return_label97;
- return_label97: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-val_t compiling_global___TableElt___compile_to_c(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 549, LOCATE_compiling_global___TableElt___compile_to_c};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- fprintf(stderr, "Deferred method called");
- fprintf(stderr, " (%s:%d)\n", LOCATE_compiling_global, 549);
- nit_exit(1);
- tracehead = trace.prev;
+val_t compiling_global___ModuleTableElt___value(val_t p0, val_t p1){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 148;
+ fra.me.meth = LOCATE_compiling_global___ModuleTableElt___value;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 0;
+ /* ./compiling//compiling_global.nit:148 */
+ nit_abort("Deferred method called", NULL, LOCATE_compiling_global, 148);
+ stack_frame_head = fra.me.prev;
return NIT_NULL;
}
-val_t compiling_global___ModuleTableElt___value(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 557, LOCATE_compiling_global___ModuleTableElt___value};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- fprintf(stderr, "Deferred method called");
- fprintf(stderr, " (%s:%d)\n", LOCATE_compiling_global, 557);
- nit_exit(1);
- tracehead = trace.prev;
- return NIT_NULL;
+val_t compiling_global___ModuleTableEltGroup___value(val_t p0, val_t p1){
+ 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 153;
+ fra.me.meth = LOCATE_compiling_global___ModuleTableEltGroup___value;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./compiling//compiling_global.nit:153 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[3] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[3] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[1] = CALL_table_computation___Program___table_information(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[0] = CALL_table_computation___ModuleTableEltGroup___elements(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstract_collection___Collection___first(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = CALL_table_computation___ColorContext___color(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ if (!once_value_2) {
+ fra.me.REG[0] = BOX_NativeString(" /* Group of ? */");
+ REGB0 = TAG_Int(17);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_2 = fra.me.REG[0];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[0] = once_value_2;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ goto label3;
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[2];
}
-void compiling_global___ModuleTableEltGroup___compile_macros(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 567, LOCATE_compiling_global___ModuleTableEltGroup___compile_macros};
- static val_t once_value_100 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_101 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_102 = NIT_NULL; /* Once value for string variable[9]*/
- val_t variable[10];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- variable[4] = TAG_Int(0);
- /* Register variable[5]: Result */
- variable[5] = ATTR_compiling_global___ModuleTableEltGroup____elements(variable[0]) /*ModuleTableEltGroup::_elements*/;
- /* Register variable[5]: For iterator */
- variable[5] = CALL_abstract_collection___Collection___iterator(variable[5])(variable[5]) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[6]: For 'is_ok' result */
- variable[6] = CALL_abstract_collection___Iterator___is_ok(variable[5])(variable[5]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[6])) break; /*for*/
- variable[6] = CALL_abstract_collection___Iterator___item(variable[5])(variable[5]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[7]: Local variable */
- variable[7] = variable[6];
- variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[9]: Once String constant */
- if (once_value_100 != NIT_NULL) variable[9] = once_value_100;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_100 = variable[9];
- }
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- variable[9] = variable[2] /*value*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_101 != NIT_NULL) variable[9] = once_value_101;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(" + "), TAG_Int(3)) /*new String*/;
- once_value_101 = variable[9];
+void compiling_global___ModuleTableEltGroup___compile_macros(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[6];} 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 154;
+ fra.me.meth = LOCATE_compiling_global___ModuleTableEltGroup___compile_macros;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 7;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:156 */
+ REGB0 = TAG_Int(0);
+ /* ./compiling//compiling_global.nit:157 */
+ fra.me.REG[0] = CALL_table_computation___ModuleTableEltGroup___elements(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB1 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
}
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- variable[9] = variable[4] /*i*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_102 != NIT_NULL) variable[9] = once_value_102;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_102 = variable[9];
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:237 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//collection//array.nit:238 */
+ REGB2 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB1)];
+ /* ./compiling//compiling_global.nit:158 */
+ REGB2 = TAG_Int(5);
+ fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_1) {
+ fra.me.REG[6] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
+ once_value_1 = fra.me.REG[6];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[6] = once_value_1;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[2]);
+ if (!once_value_2) {
+ fra.me.REG[6] = BOX_NativeString(" + ");
+ REGB2 = TAG_Int(3);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
+ once_value_2 = fra.me.REG[6];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[6] = once_value_2;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
+ fra.me.REG[6] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
+ if (!once_value_3) {
+ fra.me.REG[6] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
+ once_value_3 = fra.me.REG[6];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[6] = once_value_3;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
+ fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+ CALL_compiling_global___AbsTableElt___compile_macros(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:159 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
+ /* ./compiling//compiling_global.nit:159 */
+ REGB0 = REGB2;
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB1 = REGB2;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label4;
}
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[8]: Result */
- variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
- CALL_compiling_global___AbsTableElt___compile_macros( variable[7] /*e*/)( variable[7] /*e*/, variable[1] /*v*/, variable[8]) /*AbsTableElt::compile_macros*/;
- variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_99: while(0);
- CALL_abstract_collection___Iterator___next(variable[5])(variable[5]) /*ArrayIterator::next*/;
- }
- break_99: while(0);
- return_label98: while(false);
- tracehead = trace.prev;
- return;
-}
-val_t compiling_global___ModuleTableEltGroup___value(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 566, LOCATE_compiling_global___ModuleTableEltGroup___value};
- static val_t once_value_104 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_105 = NIT_NULL; /* Once value for string variable[4]*/
- val_t variable[5];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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 */
- variable[3] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[4]: Once String constant */
- if (once_value_104 != NIT_NULL) variable[4] = once_value_104;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_104 = variable[4];
}
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = ATTR_compiling_global___ModuleTableEltGroup____elements(variable[0]) /*ModuleTableEltGroup::_elements*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___first(variable[4])(variable[4]) /*IndexedCollectionRead::first*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_compiling_global___ColorContext___color( variable[1] /*ga*/)( variable[1] /*ga*/, variable[4]) /*ColorContext::color*/;
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[4]: Once String constant */
- if (once_value_105 != NIT_NULL) variable[4] = once_value_105;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(" /* Group of ? */"), TAG_Int(17)) /*new String*/;
- once_value_105 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Object::to_s*/;
- variable[2] = variable[3];
- goto return_label103;
- return_label103: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-val_t compiling_global___ModuleTableEltGroup___elements(val_t self) {
- struct trace_t trace = {NULL, NULL, 564, LOCATE_compiling_global___ModuleTableEltGroup___elements};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- tracehead = trace.prev;
- return ATTR_compiling_global___ModuleTableEltGroup____elements( self) /*ModuleTableEltGroup::_elements*/;
-}
-void compiling_global___TableEltProp___init(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, NULL, 582, LOCATE_compiling_global___TableEltProp___init};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_TableEltProp].i]) return;
- /* Register variable[2]: Method return value and escape marker */
- ATTR_compiling_global___TableEltProp____property(variable[0]) /*TableEltProp::_property*/ = variable[1] /*p*/;
- return_label106: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_TableEltProp].i] = 1;
- tracehead = trace.prev;
+ label4: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void compiling_global___TableEltMeth___compile_macros(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 591, LOCATE_compiling_global___TableEltMeth___compile_macros};
- static val_t once_value_108 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_109 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_110 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_111 = NIT_NULL; /* Once value for string variable[6]*/
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = ATTR_compiling_global___TableEltProp____property(variable[0]) /*TableEltProp::_property*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMLocalProperty___global(variable[5])(variable[5]) /*MMLocalProperty::global*/;
- variable[4] = variable[5];
- variable[5] = NEW_Array_array___Array___with_capacity(TAG_Int(7)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[6]: Once String constant */
- if (once_value_108 != NIT_NULL) variable[6] = once_value_108;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("#define "), TAG_Int(8)) /*new String*/;
- once_value_108 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_base___MMGlobalProperty___meth_call( variable[4] /*pg*/)( variable[4] /*pg*/) /*MMGlobalProperty::meth_call*/;
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Once String constant */
- if (once_value_109 != NIT_NULL) variable[6] = once_value_109;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("(recv) (("), TAG_Int(9)) /*new String*/;
- once_value_109 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstractmetamodel___MMGlobalProperty___intro( variable[4] /*pg*/)( variable[4] /*pg*/) /*MMGlobalProperty::intro*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_base___MMLocalProperty___cname(variable[6])(variable[6]) /*MMLocalProperty::cname*/;
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Once String constant */
- if (once_value_110 != NIT_NULL) variable[6] = once_value_110;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("_t)CALL((recv), ("), TAG_Int(17)) /*new String*/;
- once_value_110 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- variable[6] = variable[2] /*value*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Once String constant */
- if (once_value_111 != NIT_NULL) variable[6] = once_value_111;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString(")))"), TAG_Int(3)) /*new String*/;
- once_value_111 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_string___Object___to_s(variable[5])(variable[5]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_decl( variable[1] /*v*/)( variable[1] /*v*/, variable[5]) /*CompilerVisitor::add_decl*/;
- return_label107: while(false);
- tracehead = trace.prev;
+void compiling_global___TableEltMeth___compile_macros(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 165;
+ fra.me.meth = LOCATE_compiling_global___TableEltMeth___compile_macros;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:167 */
+ fra.me.REG[0] = CALL_table_computation___TableEltProp___property(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalProperty___global(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./compiling//compiling_global.nit:168 */
+ REGB0 = TAG_Int(7);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[4] = BOX_NativeString("#define ");
+ REGB0 = TAG_Int(8);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[4] = CALL_compiling_base___MMGlobalProperty___meth_call(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_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("(recv) ((");
+ REGB0 = TAG_Int(9);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[0] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_compiling_base___MMLocalProperty___cname(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ if (!once_value_3) {
+ fra.me.REG[0] = BOX_NativeString("_t)CALL((recv), (");
+ REGB0 = TAG_Int(17);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_3 = fra.me.REG[0];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[0] = once_value_3;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ if (!once_value_4) {
+ fra.me.REG[2] = BOX_NativeString(")))");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_String_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];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ stack_frame_head = fra.me.prev;
return;
}
-val_t compiling_global___TableEltMeth___compile_to_c(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 597, LOCATE_compiling_global___TableEltMeth___compile_to_c};
- val_t variable[6];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = ATTR_compiling_global___TableEltProp____property(variable[0]) /*TableEltProp::_property*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMLocalProperty___global(variable[5])(variable[5]) /*MMLocalProperty::global*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMLocalClass_____bra( variable[2] /*c*/)( variable[2] /*c*/, variable[5]) /*MMLocalClass::[]*/;
- variable[4] = variable[5];
- /* Register variable[5]: Result */
- variable[5] = CALL_compiling_base___MMLocalProperty___cname( variable[4] /*p*/)( variable[4] /*p*/) /*MMLocalProperty::cname*/;
- variable[3] = variable[5];
- goto return_label112;
- return_label112: while(false);
- tracehead = trace.prev;
- return variable[3];
+val_t compiling_global___TableEltMeth___compile_to_c(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 171;
+ fra.me.meth = LOCATE_compiling_global___TableEltMeth___compile_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:173 */
+ fra.me.REG[0] = CALL_table_computation___TableEltProp___property(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalProperty___global(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalClass_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ /* ./compiling//compiling_global.nit:174 */
+ fra.me.REG[0] = CALL_compiling_base___MMLocalProperty___cname(fra.me.REG[0])(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-void compiling_global___TableEltSuper___compile_macros(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 607, LOCATE_compiling_global___TableEltSuper___compile_macros};
- static val_t once_value_114 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_115 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_116 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_117 = NIT_NULL; /* Once value for string variable[6]*/
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = ATTR_compiling_global___TableEltProp____property(variable[0]) /*TableEltProp::_property*/;
- variable[4] = variable[5];
- variable[5] = NEW_Array_array___Array___with_capacity(TAG_Int(7)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[6]: Once String constant */
- if (once_value_114 != NIT_NULL) variable[6] = once_value_114;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("#define "), TAG_Int(8)) /*new String*/;
- once_value_114 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_base___MMLocalProperty___super_meth_call( variable[4] /*p*/)( variable[4] /*p*/) /*MMLocalProperty::super_meth_call*/;
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Once String constant */
- if (once_value_115 != NIT_NULL) variable[6] = once_value_115;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("(recv) (("), TAG_Int(9)) /*new String*/;
- once_value_115 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_base___MMLocalProperty___cname( variable[4] /*p*/)( variable[4] /*p*/) /*MMLocalProperty::cname*/;
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Once String constant */
- if (once_value_116 != NIT_NULL) variable[6] = once_value_116;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("_t)CALL((recv), ("), TAG_Int(17)) /*new String*/;
- once_value_116 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- variable[6] = variable[2] /*value*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Once String constant */
- if (once_value_117 != NIT_NULL) variable[6] = once_value_117;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString(")))"), TAG_Int(3)) /*new String*/;
- once_value_117 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_string___Object___to_s(variable[5])(variable[5]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_decl( variable[1] /*v*/)( variable[1] /*v*/, variable[5]) /*CompilerVisitor::add_decl*/;
- return_label113: while(false);
- tracehead = trace.prev;
+void compiling_global___TableEltSuper___compile_macros(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 179;
+ fra.me.meth = LOCATE_compiling_global___TableEltSuper___compile_macros;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:181 */
+ fra.me.REG[0] = CALL_table_computation___TableEltProp___property(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./compiling//compiling_global.nit:182 */
+ REGB0 = TAG_Int(7);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[4] = BOX_NativeString("#define ");
+ REGB0 = TAG_Int(8);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[4] = CALL_compiling_base___MMLocalProperty___super_meth_call(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_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("(recv) ((");
+ REGB0 = TAG_Int(9);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[0] = CALL_compiling_base___MMLocalProperty___cname(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ if (!once_value_3) {
+ fra.me.REG[0] = BOX_NativeString("_t)CALL((recv), (");
+ REGB0 = TAG_Int(17);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_3 = fra.me.REG[0];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[0] = once_value_3;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ if (!once_value_4) {
+ fra.me.REG[2] = BOX_NativeString(")))");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_String_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];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ stack_frame_head = fra.me.prev;
return;
}
-val_t compiling_global___TableEltSuper___compile_to_c(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 613, LOCATE_compiling_global___TableEltSuper___compile_to_c};
- val_t variable[12];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = ATTR_compiling_global___TableEltProp____property(variable[0]) /*TableEltProp::_property*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMLocalProperty___local_class(variable[5])(variable[5]) /*MMLocalProperty::local_class*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = ATTR_compiling_global___TableEltProp____property(variable[0]) /*TableEltProp::_property*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstractmetamodel___MMLocalProperty___global(variable[6])(variable[6]) /*MMLocalProperty::global*/;
- variable[5] = variable[6];
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = CALL_abstractmetamodel___MMLocalClass___che( variable[2] /*c*/)( variable[2] /*c*/) /*MMLocalClass::che*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_partial_order___PartialOrderElement___linear_extension(variable[7])(variable[7]) /*PartialOrderElement::linear_extension*/;
- variable[6] = variable[7];
- /* Register variable[7]: Local variable */
- variable[7] = TAG_Bool(false);
- /* Register variable[8]: For iterator */
- variable[8] = CALL_abstract_collection___Collection___iterator( variable[6] /*lin*/)( variable[6] /*lin*/) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[9]: For 'is_ok' result */
- variable[9] = CALL_abstract_collection___Iterator___is_ok(variable[8])(variable[8]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[9])) break; /*for*/
- variable[9] = CALL_abstract_collection___Iterator___item(variable[8])(variable[8]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[10]: Local variable */
- variable[10] = variable[9];
- /* Register variable[11]: Result */
- variable[11] = TAG_Bool(( variable[10] /*s*/ == variable[4] /*pc*/) || (( variable[10] /*s*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[10] /*s*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[10] /*s*/, variable[4] /*pc*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[10] /*s*/)( variable[10] /*s*/, variable[4] /*pc*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable[11])) { /*if*/
- variable[7] = TAG_Bool(true) /*found=*/;
- } else { /*if*/
- variable[11] = variable[7] /*found*/ /* Ensure var: Left 'and' operand*/;
- if (UNTAG_Bool(variable[11])) { /* and */
- /* Register variable[11]: Result */
- variable[11] = CALL_abstractmetamodel___MMLocalClass___che( variable[2] /*c*/)( variable[2] /*c*/) /*MMLocalClass::che*/;
- /* Register variable[11]: Result */
- variable[11] = CALL_partial_order___PartialOrderElement_____l(variable[11])(variable[11], variable[10] /*s*/) /*PartialOrderElement::<*/;
+val_t compiling_global___TableEltSuper___compile_to_c(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[6];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t REGB3;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 185;
+ fra.me.meth = LOCATE_compiling_global___TableEltSuper___compile_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 7;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:187 */
+ fra.me.REG[1] = CALL_table_computation___TableEltProp___property(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_abstractmetamodel___MMLocalProperty___local_class(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:188 */
+ fra.me.REG[0] = CALL_table_computation___TableEltProp___property(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalProperty___global(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./compiling//compiling_global.nit:189 */
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[3] = CALL_partial_order___PartialOrderElement___linear_extension(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:190 */
+ REGB0 = TAG_Bool(false);
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB1 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[4] = ATTR_array___Array____items(fra.me.REG[3]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:237 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//collection//array.nit:238 */
+ REGB2 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
}
- /* Register variable[11]: Result */
- if (UNTAG_Bool(variable[11])) { /*if*/
- /* Register variable[11]: Result */
- variable[11] = CALL_abstractmetamodel___MMLocalClass___has_global_property( variable[10] /*s*/)( variable[10] /*s*/, variable[5] /*g*/) /*MMLocalClass::has_global_property*/;
- if (UNTAG_Bool(variable[11])) { /*if*/
- /* Register variable[11]: Result */
- variable[11] = CALL_abstractmetamodel___MMLocalClass_____bra( variable[10] /*s*/)( variable[10] /*s*/, variable[5] /*g*/) /*MMLocalClass::[]*/;
- /* Register variable[11]: Result */
- variable[11] = CALL_compiling_base___MMLocalProperty___cname(variable[11])(variable[11]) /*MMLocalProperty::cname*/;
- variable[3] = variable[11];
- goto return_label118;
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[5] = ((Nit_NativeArray)fra.me.REG[4])->val[UNTAG_Int(REGB1)];
+ /* ./compiling//compiling_global.nit:193 */
+ REGB2 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[5],fra.me.REG[1]));
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ REGB3 = CALL_kernel___Object_____eqeq(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[1]);
+ REGB2 = REGB3;
+ }
+ if (UNTAG_Bool(REGB2)) {
+ /* ./compiling//compiling_global.nit:194 */
+ REGB2 = TAG_Bool(true);
+ REGB0 = REGB2;
+ } else {
+ /* ./compiling//compiling_global.nit:195 */
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[6] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[2])(fra.me.REG[2]);
+ REGB2 = CALL_partial_order___PartialOrderElement_____l(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[5]);
+ } else {
+ REGB3 = TAG_Bool(false);
+ REGB2 = REGB3;
+ }
+ if (UNTAG_Bool(REGB2)) {
+ /* ./compiling//compiling_global.nit:196 */
+ REGB2 = CALL_abstractmetamodel___MMLocalClass___has_global_property(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[0]);
+ if (UNTAG_Bool(REGB2)) {
+ /* ./compiling//compiling_global.nit:198 */
+ fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass_____bra(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[0]);
+ fra.me.REG[5] = CALL_compiling_base___MMLocalProperty___cname(fra.me.REG[5])(fra.me.REG[5]);
+ goto label1;
+ }
}
}
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB1 = REGB2;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label2;
}
- continue_119: while(0);
- CALL_abstract_collection___Iterator___next(variable[8])(variable[8]) /*ArrayIterator::next*/;
}
- break_119: while(0);
- if (!UNTAG_Bool( TAG_Bool(false))) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_compiling_global___TableEltSuper___compile_to_c, LOCATE_compiling_global, 630); nit_exit(1);}
- variable[3] = NIT_NULL /*null*/;
- goto return_label118;
- return_label118: while(false);
- tracehead = trace.prev;
- return variable[3];
+ label2: while(0);
+ /* ./compiling//compiling_global.nit:202 */
+ nit_abort("Aborted", NULL, LOCATE_compiling_global, 202);
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[5];
}
-void compiling_global___TableEltAttr___compile_macros(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 638, LOCATE_compiling_global___TableEltAttr___compile_macros};
- static val_t once_value_121 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_122 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_123 = NIT_NULL; /* Once value for string variable[6]*/
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = ATTR_compiling_global___TableEltProp____property(variable[0]) /*TableEltProp::_property*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMLocalProperty___global(variable[5])(variable[5]) /*MMLocalProperty::global*/;
- variable[4] = variable[5];
- variable[5] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[6]: Once String constant */
- if (once_value_121 != NIT_NULL) variable[6] = once_value_121;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("#define "), TAG_Int(8)) /*new String*/;
- once_value_121 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_base___MMGlobalProperty___attr_access( variable[4] /*pg*/)( variable[4] /*pg*/) /*MMGlobalProperty::attr_access*/;
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Once String constant */
- if (once_value_122 != NIT_NULL) variable[6] = once_value_122;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("(recv) ATTR(recv, ("), TAG_Int(19)) /*new String*/;
- once_value_122 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- variable[6] = variable[2] /*value*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Once String constant */
- if (once_value_123 != NIT_NULL) variable[6] = once_value_123;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("))"), TAG_Int(2)) /*new String*/;
- once_value_123 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_string___Object___to_s(variable[5])(variable[5]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_decl( variable[1] /*v*/)( variable[1] /*v*/, variable[5]) /*CompilerVisitor::add_decl*/;
- return_label120: while(false);
- tracehead = trace.prev;
+void compiling_global___TableEltAttr___compile_macros(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 207;
+ fra.me.meth = LOCATE_compiling_global___TableEltAttr___compile_macros;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:209 */
+ fra.me.REG[0] = CALL_table_computation___TableEltProp___property(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalProperty___global(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./compiling//compiling_global.nit:210 */
+ REGB0 = TAG_Int(5);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[4] = BOX_NativeString("#define ");
+ REGB0 = TAG_Int(8);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[0] = CALL_compiling_base___MMGlobalProperty___attr_access(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ if (!once_value_2) {
+ fra.me.REG[0] = BOX_NativeString("(recv) ATTR(recv, (");
+ REGB0 = TAG_Int(19);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_2 = fra.me.REG[0];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[0] = once_value_2;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ if (!once_value_3) {
+ fra.me.REG[2] = BOX_NativeString("))");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[2] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ stack_frame_head = fra.me.prev;
return;
}
-val_t compiling_global___TableEltAttr___compile_to_c(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 644, LOCATE_compiling_global___TableEltAttr___compile_to_c};
- static val_t once_value_125 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_126 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_127 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_128 = NIT_NULL; /* Once value for string variable[7]*/
- val_t variable[8];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_compiling_global___GlobalCompilerVisitor___global_analysis( variable[1] /*v*/)( variable[1] /*v*/) /*GlobalCompilerVisitor::global_analysis*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = ATTR_compiling_global___TableEltProp____property(variable[0]) /*TableEltProp::_property*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstractmetamodel___MMLocalProperty___global(variable[6])(variable[6]) /*MMLocalProperty::global*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstractmetamodel___MMLocalClass_____bra( variable[2] /*c*/)( variable[2] /*c*/, variable[6]) /*MMLocalClass::[]*/;
- variable[5] = variable[6];
- variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(7)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[7]: Once String constant */
- if (once_value_125 != NIT_NULL) variable[7] = once_value_125;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("/* "), TAG_Int(3)) /*new String*/;
- once_value_125 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_compiling_global___ColorContext___color( variable[4] /*ga*/)( variable[4] /*ga*/, variable[0]) /*ColorContext::color*/;
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_126 != NIT_NULL) variable[7] = once_value_126;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(": Attribute "), TAG_Int(12)) /*new String*/;
- once_value_126 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- variable[7] = variable[2] /*c*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_127 != NIT_NULL) variable[7] = once_value_127;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("::"), TAG_Int(2)) /*new String*/;
- once_value_127 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- variable[7] = variable[5] /*p*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_128 != NIT_NULL) variable[7] = once_value_128;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(" */"), TAG_Int(3)) /*new String*/;
- once_value_128 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
- variable[3] = variable[6];
- goto return_label124;
- return_label124: while(false);
- tracehead = trace.prev;
- return variable[3];
+val_t compiling_global___TableEltAttr___compile_to_c(val_t p0, val_t p1, val_t p2){
+ 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 213;
+ fra.me.meth = LOCATE_compiling_global___TableEltAttr___compile_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 6;
+ 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;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:215 */
+ fra.me.REG[1] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:216 */
+ fra.me.REG[3] = CALL_table_computation___TableEltProp___property(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalProperty___global(fra.me.REG[3])(fra.me.REG[3]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:217 */
+ REGB0 = TAG_Int(7);
+ fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[5] = BOX_NativeString("/* ");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
+ once_value_1 = fra.me.REG[5];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[5] = once_value_1;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ fra.me.REG[1] = CALL_table_computation___Program___table_information(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = CALL_table_computation___ColorContext___color(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
+ if (!once_value_2) {
+ fra.me.REG[0] = BOX_NativeString(": Attribute ");
+ REGB0 = TAG_Int(12);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_2 = fra.me.REG[0];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[0] = once_value_2;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+ if (!once_value_3) {
+ fra.me.REG[2] = BOX_NativeString("::");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[2] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+ if (!once_value_4) {
+ fra.me.REG[3] = BOX_NativeString(" */");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_4 = fra.me.REG[3];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[3] = once_value_4;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ goto label5;
+ label5: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[4];
}
-void compiling_global___AbsTableEltClass___compile_macros(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 666, LOCATE_compiling_global___AbsTableEltClass___compile_macros};
- static val_t once_value_130 = NIT_NULL; /* Once value for string variable[5]*/
- static val_t once_value_131 = NIT_NULL; /* Once value for string variable[5]*/
- static val_t once_value_132 = NIT_NULL; /* Once value for string variable[5]*/
- val_t variable[6];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- variable[4] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[5]: Once String constant */
- if (once_value_130 != NIT_NULL) variable[5] = once_value_130;
- else {
- variable[5] = NEW_String_string___String___with_native(BOX_NativeString("#define "), TAG_Int(8)) /*new String*/;
- once_value_130 = variable[5];
- }
- /* Register variable[5]: Result */
- /* Ensure var variable[5]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[5]) /*AbstractArray::add*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_compiling_global___AbsTableEltClass___symbol(variable[0])(variable[0]) /*AbsTableEltClass::symbol*/;
- /* Ensure var variable[5]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[5]) /*AbstractArray::add*/;
- /* Register variable[5]: Once String constant */
- if (once_value_131 != NIT_NULL) variable[5] = once_value_131;
- else {
- variable[5] = NEW_String_string___String___with_native(BOX_NativeString(" ("), TAG_Int(2)) /*new String*/;
- once_value_131 = variable[5];
- }
- /* Register variable[5]: Result */
- /* Ensure var variable[5]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[5]) /*AbstractArray::add*/;
- variable[5] = variable[2] /*value*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[5]) /*AbstractArray::add*/;
- /* Register variable[5]: Once String constant */
- if (once_value_132 != NIT_NULL) variable[5] = once_value_132;
- else {
- variable[5] = NEW_String_string___String___with_native(BOX_NativeString(")"), TAG_Int(1)) /*new String*/;
- once_value_132 = variable[5];
- }
- /* Register variable[5]: Result */
- /* Ensure var variable[5]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[5]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_decl( variable[1] /*v*/)( variable[1] /*v*/, variable[4]) /*CompilerVisitor::add_decl*/;
- return_label129: while(false);
- tracehead = trace.prev;
- return;
+val_t compiling_global___AbsTableEltClass___symbol(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 222;
+ fra.me.meth = LOCATE_compiling_global___AbsTableEltClass___symbol;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 0;
+ /* ./compiling//compiling_global.nit:222 */
+ nit_abort("Deferred method called", NULL, LOCATE_compiling_global, 222);
+ stack_frame_head = fra.me.prev;
+ return NIT_NULL;
}
-void compiling_global___AbsTableEltClass___init(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, NULL, 658, LOCATE_compiling_global___AbsTableEltClass___init};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_AbsTableEltClass].i]) return;
- /* Register variable[2]: Method return value and escape marker */
- ATTR_compiling_global___AbsTableEltClass____local_class(variable[0]) /*AbsTableEltClass::_local_class*/ = variable[1] /*c*/;
- return_label133: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_AbsTableEltClass].i] = 1;
- tracehead = trace.prev;
+void compiling_global___AbsTableEltClass___compile_macros(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 225;
+ fra.me.meth = LOCATE_compiling_global___AbsTableEltClass___compile_macros;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:227 */
+ REGB0 = TAG_Int(5);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[4] = BOX_NativeString("#define ");
+ REGB0 = TAG_Int(8);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[0] = CALL_compiling_global___AbsTableEltClass___symbol(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ if (!once_value_2) {
+ fra.me.REG[0] = BOX_NativeString(" (");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_2 = fra.me.REG[0];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[0] = once_value_2;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ if (!once_value_3) {
+ fra.me.REG[2] = BOX_NativeString(")");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[2] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ stack_frame_head = fra.me.prev;
return;
}
-val_t compiling_global___AbsTableEltClass___symbol(val_t self) {
- struct trace_t trace = {NULL, NULL, 663, LOCATE_compiling_global___AbsTableEltClass___symbol};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- fprintf(stderr, "Deferred method called");
- fprintf(stderr, " (%s:%d)\n", LOCATE_compiling_global, 663);
- nit_exit(1);
- tracehead = trace.prev;
- return NIT_NULL;
-}
-val_t compiling_global___TableEltClass___is_related_to(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 676, LOCATE_compiling_global___TableEltClass___is_related_to};
- val_t variable[6];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMLocalClass___module( variable[1] /*c*/)( variable[1] /*c*/) /*MMLocalClass::module*/;
- /* Register variable[5]: Result */
- variable[5] = ATTR_compiling_global___AbsTableEltClass____local_class(variable[0]) /*AbsTableEltClass::_local_class*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMLocalClass___global(variable[5])(variable[5]) /*MMLocalClass::global*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMModule_____bra(variable[4])(variable[4], variable[5]) /*MMModule::[]*/;
- variable[3] = variable[4];
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[1] /*c*/)( variable[1] /*c*/) /*MMLocalClass::cshe*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_partial_order___PartialOrderElement_____leq(variable[4])(variable[4], variable[3] /*bc*/) /*PartialOrderElement::<=*/;
- variable[2] = variable[4];
- goto return_label134;
- return_label134: while(false);
- tracehead = trace.prev;
- return variable[2];
+val_t compiling_global___TableEltClassId___symbol(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 232;
+ fra.me.meth = LOCATE_compiling_global___TableEltClassId___symbol;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./compiling//compiling_global.nit:232 */
+ fra.me.REG[0] = CALL_table_computation___AbsTableEltClass___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_compiling_base___MMGlobalClass___id_id(fra.me.REG[0])(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-val_t compiling_global___TableEltClassId___value(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 689, LOCATE_compiling_global___TableEltClassId___value};
- static val_t once_value_136 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_137 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_138 = NIT_NULL; /* Once value for string variable[4]*/
- val_t variable[6];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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 */
- variable[3] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[4]: Once String constant */
- if (once_value_136 != NIT_NULL) variable[4] = once_value_136;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_136 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_compiling_global___GlobalAnalysis___compiled_classes( variable[1] /*ga*/)( variable[1] /*ga*/) /*GlobalAnalysis::compiled_classes*/;
- /* Register variable[5]: Result */
- variable[5] = ATTR_compiling_global___AbsTableEltClass____local_class(variable[0]) /*AbsTableEltClass::_local_class*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMLocalClass___global(variable[5])(variable[5]) /*MMLocalClass::global*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___MapRead_____bra(variable[4])(variable[4], variable[5]) /*CoupleMap::[]*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_compiling_global___CompiledClass___id(variable[4])(variable[4]) /*CompiledClass::id*/;
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[4]: Once String constant */
- if (once_value_137 != NIT_NULL) variable[4] = once_value_137;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(" /* Id of "), TAG_Int(10)) /*new String*/;
- once_value_137 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = ATTR_compiling_global___AbsTableEltClass____local_class(variable[0]) /*AbsTableEltClass::_local_class*/;
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[4]: Once String constant */
- if (once_value_138 != NIT_NULL) variable[4] = once_value_138;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(" */"), TAG_Int(3)) /*new String*/;
- once_value_138 = variable[4];
+val_t compiling_global___TableEltClassId___value(val_t p0, val_t p1){
+ 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 234;
+ fra.me.meth = LOCATE_compiling_global___TableEltClassId___value;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./compiling//compiling_global.nit:236 */
+ REGB0 = TAG_Int(5);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[3] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[3] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[1] = CALL_table_computation___Program___compiled_classes(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[3] = CALL_table_computation___AbsTableEltClass___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[3])(fra.me.REG[3]);
+ fra.me.REG[3] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 236);
}
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Object::to_s*/;
- variable[2] = variable[3];
- goto return_label135;
- return_label135: while(false);
- tracehead = trace.prev;
- return variable[2];
+ REGB0 = CALL_table_computation___CompiledClass___id(fra.me.REG[3])(fra.me.REG[3]);
+ fra.me.REG[3] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ if (!once_value_2) {
+ fra.me.REG[3] = BOX_NativeString(" /* Id of ");
+ REGB0 = TAG_Int(10);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_2 = fra.me.REG[3];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[3] = once_value_2;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[0] = CALL_table_computation___AbsTableEltClass___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ if (!once_value_3) {
+ fra.me.REG[0] = BOX_NativeString(" */");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_3 = fra.me.REG[0];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[0] = once_value_3;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ goto label4;
+ label4: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[2];
}
-val_t compiling_global___TableEltClassId___symbol(val_t self) {
- struct trace_t trace = {NULL, NULL, 687, LOCATE_compiling_global___TableEltClassId___symbol};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = ATTR_compiling_global___AbsTableEltClass____local_class(variable[0]) /*AbsTableEltClass::_local_class*/;
- /* Register variable[2]: Result */
- variable[2] = CALL_abstractmetamodel___MMLocalClass___global(variable[2])(variable[2]) /*MMLocalClass::global*/;
- /* Register variable[2]: Result */
- variable[2] = CALL_compiling_base___MMGlobalClass___id_id(variable[2])(variable[2]) /*MMGlobalClass::id_id*/;
- variable[1] = variable[2];
- goto return_label139;
- return_label139: while(false);
- tracehead = trace.prev;
- return variable[1];
+val_t compiling_global___TableEltClassInitTable___symbol(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 241;
+ fra.me.meth = LOCATE_compiling_global___TableEltClassInitTable___symbol;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./compiling//compiling_global.nit:241 */
+ fra.me.REG[0] = CALL_table_computation___AbsTableEltClass___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_compiling_base___MMGlobalClass___init_table_pos_id(fra.me.REG[0])(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-val_t compiling_global___TableEltClassInitTable___compile_to_c(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 700, LOCATE_compiling_global___TableEltClassInitTable___compile_to_c};
- static val_t once_value_143 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_144 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_145 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_146 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_147 = NIT_NULL; /* Once value for string variable[9]*/
- val_t variable[12];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_compiling_global___GlobalCompilerVisitor___global_analysis( variable[1] /*v*/)( variable[1] /*v*/) /*GlobalCompilerVisitor::global_analysis*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___GlobalAnalysis___compiled_classes( variable[4] /*ga*/)( variable[4] /*ga*/) /*GlobalAnalysis::compiled_classes*/;
- /* Register variable[7]: Result */
- variable[7] = ATTR_compiling_global___AbsTableEltClass____local_class(variable[0]) /*AbsTableEltClass::_local_class*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_abstractmetamodel___MMLocalClass___global(variable[7])(variable[7]) /*MMLocalClass::global*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___MapRead_____bra(variable[6])(variable[6], variable[7]) /*CoupleMap::[]*/;
- variable[5] = variable[6];
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[2] /*c*/)( variable[2] /*c*/) /*MMLocalClass::cshe*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_partial_order___PartialOrderElement___reverse_linear_extension(variable[7])(variable[7]) /*PartialOrderElement::reverse_linear_extension*/;
- variable[6] = variable[7];
- /* Register variable[7]: Local variable */
- variable[7] = TAG_Int(0);
- while (true) { /*while*/
- /* Register variable[8]: Local variable */
- variable[8] = variable[6] /*linext*/;
- /* Register variable[9]: Local variable */
- variable[9] = variable[7] /*i*/;
- /* Register variable[10]: Method return value and escape marker */
- /* Register variable[11]: Result */
- variable[11] = TAG_Bool(UNTAG_Int( variable[9] /*index*/)>=UNTAG_Int( TAG_Int(0)));
- /* Ensure var variable[11]: Left 'and' operand*/
- if (UNTAG_Bool(variable[11])) { /* and */
- /* Register variable[11]: Result */
- variable[11] = ATTR_array___AbstractArrayRead____length(variable[8]) /*AbstractArrayRead::_length*/;
- /* Register variable[11]: Result */
- variable[11] = TAG_Bool(UNTAG_Int( variable[9] /*index*/)<UNTAG_Int(variable[11]));
+val_t compiling_global___TableEltClassInitTable___compile_to_c(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[6];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t REGB3;
+ val_t tmp;
+ 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 243;
+ fra.me.meth = LOCATE_compiling_global___TableEltClassInitTable___compile_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 7;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:245 */
+ fra.me.REG[1] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:246 */
+ fra.me.REG[3] = CALL_table_computation___Program___compiled_classes(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[4] = CALL_table_computation___AbsTableEltClass___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[4])(fra.me.REG[4]);
+ fra.me.REG[4] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:247 */
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___cshe(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[3] = CALL_partial_order___PartialOrderElement___reverse_linear_extension(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:248 */
+ REGB0 = TAG_Int(0);
+ /* ./compiling//compiling_global.nit:249 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:243 */
+ fra.me.REG[5] = fra.me.REG[3];
+ REGB1 = REGB0;
+ /* ./../lib/standard//collection//array.nit:245 */
+ REGB2 = TAG_Int(0);
+ /* ./../lib/standard//kernel.nit:213 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:245 */
+ if (UNTAG_Bool(REGB2)) {
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[5])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[5]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
+ } else {
+ /* ./../lib/standard//collection//array.nit:245 */
+ REGB3 = TAG_Bool(false);
+ REGB2 = REGB3;
+ }
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Assert %s failed", "'index'", LOCATE_array, 245);
+ }
+ /* ./../lib/standard//collection//array.nit:246 */
+ fra.me.REG[5] = ATTR_array___Array____items(fra.me.REG[5]);
+ REGB2 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 246);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[5] = ((Nit_NativeArray)fra.me.REG[5])->val[UNTAG_Int(REGB1)];
+ /* ./../lib/standard//collection//array.nit:246 */
+ goto label1;
+ label1: while(0);
+ /* ./compiling//compiling_global.nit:249 */
+ REGB1 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 249);
+ }
+ fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[5])(fra.me.REG[5]);
+ fra.me.REG[6] = CALL_table_computation___AbsTableEltClass___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[6] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[6])(fra.me.REG[6]);
+ REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[5],fra.me.REG[6]));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
+ REGB1 = REGB2;
+ }
+ REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
+ if (UNTAG_Bool(REGB1)) {
+ /* ./compiling//compiling_global.nit:250 */
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
+ /* ./compiling//compiling_global.nit:250 */
+ REGB0 = REGB1;
+ } else {
+ /* ./compiling//compiling_global.nit:249 */
+ goto label2;
}
- /* Register variable[11]: Result */
- if (!UNTAG_Bool(variable[11])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_compiling_global, 234); nit_exit(1);}
- /* Register variable[11]: Result */
- variable[11] = ATTR_array___Array____items(variable[8]) /*Array::_items*/;
- /* Register variable[11]: Result */
- variable[11] = UNBOX_NativeArray(variable[11])[UNTAG_Int( variable[9] /*index*/)];
- variable[10] = variable[11];
- goto return_label142;
- return_label142: while(false);
- /* Register variable[8]: Result */
- variable[8] = variable[10];
- /* Register variable[8]: Result */
- variable[8] = CALL_abstractmetamodel___MMLocalClass___global(variable[8])(variable[8]) /*MMLocalClass::global*/;
- /* Register variable[9]: Result */
- variable[9] = ATTR_compiling_global___AbsTableEltClass____local_class(variable[0]) /*AbsTableEltClass::_local_class*/;
- /* Register variable[9]: Result */
- variable[9] = CALL_abstractmetamodel___MMLocalClass___global(variable[9])(variable[9]) /*MMLocalClass::global*/;
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[8] == variable[9]) || ((variable[8] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[8])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[8],variable[9])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[8])(variable[8], variable[9]) /*Object::==*/)))))));
- if (!UNTAG_Bool(variable[8])) break; /* while*/
- variable[7] = TAG_Int(UNTAG_Int(variable[7])+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_141: while(0);
- }
- break_141: while(0);
- variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(9)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[9]: Once String constant */
- if (once_value_143 != NIT_NULL) variable[9] = once_value_143;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_143 = variable[9];
- }
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- variable[9] = variable[7] /*i*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_144 != NIT_NULL) variable[9] = once_value_144;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(" /* "), TAG_Int(4)) /*new String*/;
- once_value_144 = variable[9];
- }
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[9]: Result */
- variable[9] = CALL_compiling_global___ColorContext___color( variable[4] /*ga*/)( variable[4] /*ga*/, variable[0]) /*ColorContext::color*/;
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_145 != NIT_NULL) variable[9] = once_value_145;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(": "), TAG_Int(2)) /*new String*/;
- once_value_145 = variable[9];
- }
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- variable[9] = variable[2] /*c*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_146 != NIT_NULL) variable[9] = once_value_146;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(" < "), TAG_Int(3)) /*new String*/;
- once_value_146 = variable[9];
- }
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[9]: Result */
- variable[9] = CALL_compiling_global___CompiledClass___local_class( variable[5] /*cc*/)( variable[5] /*cc*/) /*CompiledClass::local_class*/;
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_147 != NIT_NULL) variable[9] = once_value_147;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(": superclass init_table position */"), TAG_Int(35)) /*new String*/;
- once_value_147 = variable[9];
- }
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[8]: Result */
- variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
- variable[3] = variable[8];
- goto return_label140;
- return_label140: while(false);
- tracehead = trace.prev;
- return variable[3];
-}
-val_t compiling_global___TableEltClassInitTable___symbol(val_t self) {
- struct trace_t trace = {NULL, NULL, 698, LOCATE_compiling_global___TableEltClassInitTable___symbol};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = ATTR_compiling_global___AbsTableEltClass____local_class(variable[0]) /*AbsTableEltClass::_local_class*/;
- /* Register variable[2]: Result */
- variable[2] = CALL_abstractmetamodel___MMLocalClass___global(variable[2])(variable[2]) /*MMLocalClass::global*/;
- /* Register variable[2]: Result */
- variable[2] = CALL_compiling_base___MMGlobalClass___init_table_pos_id(variable[2])(variable[2]) /*MMGlobalClass::init_table_pos_id*/;
- variable[1] = variable[2];
- goto return_label148;
- return_label148: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t compiling_global___TableEltClassColor___compile_to_c(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 727, LOCATE_compiling_global___TableEltClassColor___compile_to_c};
- static val_t once_value_150 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_151 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_152 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_153 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_154 = NIT_NULL; /* Once value for string variable[7]*/
- val_t variable[8];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_compiling_global___GlobalCompilerVisitor___global_analysis( variable[1] /*v*/)( variable[1] /*v*/) /*GlobalCompilerVisitor::global_analysis*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___GlobalAnalysis___compiled_classes( variable[4] /*ga*/)( variable[4] /*ga*/) /*GlobalAnalysis::compiled_classes*/;
- /* Register variable[7]: Result */
- variable[7] = ATTR_compiling_global___AbsTableEltClass____local_class(variable[0]) /*AbsTableEltClass::_local_class*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_abstractmetamodel___MMLocalClass___global(variable[7])(variable[7]) /*MMLocalClass::global*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___MapRead_____bra(variable[6])(variable[6], variable[7]) /*CoupleMap::[]*/;
- variable[5] = variable[6];
- variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(9)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[7]: Once String constant */
- if (once_value_150 != NIT_NULL) variable[7] = once_value_150;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_150 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_compiling_global___CompiledClass___id( variable[5] /*cc*/)( variable[5] /*cc*/) /*CompiledClass::id*/;
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_151 != NIT_NULL) variable[7] = once_value_151;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(" /* "), TAG_Int(4)) /*new String*/;
- once_value_151 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_compiling_global___ColorContext___color( variable[4] /*ga*/)( variable[4] /*ga*/, variable[0]) /*ColorContext::color*/;
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_152 != NIT_NULL) variable[7] = once_value_152;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(": "), TAG_Int(2)) /*new String*/;
- once_value_152 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- variable[7] = variable[2] /*c*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_153 != NIT_NULL) variable[7] = once_value_153;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(" < "), TAG_Int(3)) /*new String*/;
- once_value_153 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_compiling_global___CompiledClass___local_class( variable[5] /*cc*/)( variable[5] /*cc*/) /*CompiledClass::local_class*/;
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_154 != NIT_NULL) variable[7] = once_value_154;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(": superclass typecheck marker */"), TAG_Int(32)) /*new String*/;
- once_value_154 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
- variable[3] = variable[6];
- goto return_label149;
- return_label149: while(false);
- tracehead = trace.prev;
- return variable[3];
-}
-val_t compiling_global___TableEltClassColor___symbol(val_t self) {
- struct trace_t trace = {NULL, NULL, 720, LOCATE_compiling_global___TableEltClassColor___symbol};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = ATTR_compiling_global___AbsTableEltClass____local_class(variable[0]) /*AbsTableEltClass::_local_class*/;
- /* Register variable[2]: Result */
- variable[2] = CALL_abstractmetamodel___MMLocalClass___global(variable[2])(variable[2]) /*MMLocalClass::global*/;
- /* Register variable[2]: Result */
- variable[2] = CALL_compiling_base___MMGlobalClass___color_id(variable[2])(variable[2]) /*MMGlobalClass::color_id*/;
- variable[1] = variable[2];
- goto return_label155;
- return_label155: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t compiling_global___TableEltClassColor___value(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 722, LOCATE_compiling_global___TableEltClassColor___value};
- static val_t once_value_157 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_158 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_159 = NIT_NULL; /* Once value for string variable[4]*/
- val_t variable[5];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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 */
- variable[3] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[4]: Once String constant */
- if (once_value_157 != NIT_NULL) variable[4] = once_value_157;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_157 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_compiling_global___ColorContext___color( variable[1] /*ga*/)( variable[1] /*ga*/, variable[0]) /*ColorContext::color*/;
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[4]: Once String constant */
- if (once_value_158 != NIT_NULL) variable[4] = once_value_158;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(" /* Color of "), TAG_Int(13)) /*new String*/;
- once_value_158 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = ATTR_compiling_global___AbsTableEltClass____local_class(variable[0]) /*AbsTableEltClass::_local_class*/;
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[4]: Once String constant */
- if (once_value_159 != NIT_NULL) variable[4] = once_value_159;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(" */"), TAG_Int(3)) /*new String*/;
- once_value_159 = variable[4];
- }
- /* Register variable[4]: Result */
- /* Ensure var variable[4]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Object::to_s*/;
- variable[2] = variable[3];
- goto return_label156;
- return_label156: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-val_t compiling_global___TableEltComposite___is_related_to(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 742, LOCATE_compiling_global___TableEltComposite___is_related_to};
- val_t variable[5];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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___MMLocalClass___cshe( variable[1] /*c*/)( variable[1] /*c*/) /*MMLocalClass::cshe*/;
- /* Register variable[4]: Result */
- variable[4] = ATTR_compiling_global___TableEltComposite____cc(variable[0]) /*TableEltComposite::_cc*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_compiling_global___CompiledClass___local_class(variable[4])(variable[4]) /*CompiledClass::local_class*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_partial_order___PartialOrderElement_____leq(variable[3])(variable[3], variable[4]) /*PartialOrderElement::<=*/;
- variable[2] = variable[3];
- goto return_label160;
- return_label160: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-val_t compiling_global___TableEltComposite___length(val_t self) {
- struct trace_t trace = {NULL, NULL, 741, LOCATE_compiling_global___TableEltComposite___length};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = ATTR_compiling_global___TableEltComposite____table(variable[0]) /*TableEltComposite::_table*/;
- /* Register variable[2]: Result */
- variable[2] = CALL_abstract_collection___Collection___length(variable[2])(variable[2]) /*AbstractArrayRead::length*/;
- variable[1] = variable[2];
- goto return_label161;
- return_label161: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t compiling_global___TableEltComposite___item(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 750, LOCATE_compiling_global___TableEltComposite___item};
- val_t variable[8];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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] = ATTR_compiling_global___TableEltComposite____table(variable[0]) /*TableEltComposite::_table*/;
- /* Register variable[4]: Local variable */
- variable[4] = variable[3];
- /* Register variable[5]: Local variable */
- variable[5] = variable[1] /*i*/;
- /* Register variable[6]: Method return value and escape marker */
- /* Register variable[7]: Result */
- variable[7] = TAG_Bool(UNTAG_Int( variable[5] /*index*/)>=UNTAG_Int( TAG_Int(0)));
- /* Ensure var variable[7]: Left 'and' operand*/
- if (UNTAG_Bool(variable[7])) { /* and */
- /* Register variable[7]: Result */
- variable[7] = ATTR_array___AbstractArrayRead____length(variable[4]) /*AbstractArrayRead::_length*/;
- /* Register variable[7]: Result */
- variable[7] = TAG_Bool(UNTAG_Int( variable[5] /*index*/)<UNTAG_Int(variable[7]));
}
- /* Register variable[7]: Result */
- if (!UNTAG_Bool(variable[7])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_compiling_global, 234); nit_exit(1);}
- /* Register variable[7]: Result */
- variable[7] = ATTR_array___Array____items(variable[4]) /*Array::_items*/;
- /* Register variable[7]: Result */
- variable[7] = UNBOX_NativeArray(variable[7])[UNTAG_Int( variable[5] /*index*/)];
- variable[6] = variable[7];
- goto return_label163;
- return_label163: while(false);
- /* Register variable[3]: Result */
- variable[3] = variable[6];
- variable[2] = variable[3];
- goto return_label162;
- return_label162: while(false);
- tracehead = trace.prev;
- return variable[2];
+ label2: while(0);
+ /* ./compiling//compiling_global.nit:252 */
+ REGB1 = TAG_Int(9);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB1);
+ if (!once_value_3) {
+ fra.me.REG[6] = BOX_NativeString("");
+ REGB1 = TAG_Int(0);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB1);
+ once_value_3 = fra.me.REG[6];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[6] = once_value_3;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[6]);
+ fra.me.REG[6] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[6]);
+ if (!once_value_4) {
+ fra.me.REG[6] = BOX_NativeString(" /* ");
+ REGB0 = TAG_Int(4);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
+ once_value_4 = fra.me.REG[6];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[6] = once_value_4;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[6]);
+ fra.me.REG[1] = CALL_table_computation___Program___table_information(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = CALL_table_computation___ColorContext___color(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ if (!once_value_5) {
+ fra.me.REG[0] = BOX_NativeString(": ");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_5 = fra.me.REG[0];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[0] = once_value_5;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ if (!once_value_6) {
+ fra.me.REG[2] = BOX_NativeString(" < ");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_6 = fra.me.REG[2];
+ register_static_object(&once_value_6);
+ } else fra.me.REG[2] = once_value_6;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ fra.me.REG[4] = CALL_table_computation___CompiledClass___local_class(fra.me.REG[4])(fra.me.REG[4]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ if (!once_value_7) {
+ fra.me.REG[4] = BOX_NativeString(": superclass init_table position */");
+ REGB0 = TAG_Int(35);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
+ once_value_7 = fra.me.REG[4];
+ register_static_object(&once_value_7);
+ } else fra.me.REG[4] = once_value_7;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ goto label8;
+ label8: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[3];
}
-val_t compiling_global___TableEltComposite___compile_to_c(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 752, LOCATE_compiling_global___TableEltComposite___compile_to_c};
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- fprintf(stderr, "Aborted"); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_compiling_global___TableEltComposite___compile_to_c, LOCATE_compiling_global, 752); nit_exit(1);
- return_label164: while(false);
- tracehead = trace.prev;
- return variable[3];
+val_t compiling_global___TableEltClassColor___symbol(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 257;
+ fra.me.meth = LOCATE_compiling_global___TableEltClassColor___symbol;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./compiling//compiling_global.nit:257 */
+ fra.me.REG[0] = CALL_table_computation___AbsTableEltClass___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_compiling_base___MMGlobalClass___color_id(fra.me.REG[0])(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-void compiling_global___TableEltComposite___add(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 744, LOCATE_compiling_global___TableEltComposite___add};
- val_t variable[6];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Result */
- variable[4] = ATTR_compiling_global___TableEltComposite____offsets(variable[0]) /*TableEltComposite::_offsets*/;
- /* Register variable[5]: Result */
- variable[5] = ATTR_compiling_global___TableEltComposite____table(variable[0]) /*TableEltComposite::_table*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstract_collection___Collection___length(variable[5])(variable[5]) /*AbstractArrayRead::length*/;
- CALL_abstract_collection___Map_____braeq(variable[4])(variable[4], variable[1] /*c*/, variable[5]) /*HashMap::[]=*/;
- /* Register variable[4]: Result */
- variable[4] = ATTR_compiling_global___TableEltComposite____table(variable[0]) /*TableEltComposite::_table*/;
- CALL_abstract_collection___IndexedCollection___append(variable[4])(variable[4], variable[2] /*tab*/) /*IndexedCollection::append*/;
- return_label165: while(false);
- tracehead = trace.prev;
- return;
+val_t compiling_global___TableEltClassColor___value(val_t p0, val_t p1){
+ 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 259;
+ fra.me.meth = LOCATE_compiling_global___TableEltClassColor___value;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./compiling//compiling_global.nit:261 */
+ REGB0 = TAG_Int(5);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[3] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[3] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[1] = CALL_table_computation___Program___table_information(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = CALL_table_computation___ColorContext___color(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ fra.me.REG[1] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ if (!once_value_2) {
+ fra.me.REG[1] = BOX_NativeString(" /* Color of ");
+ REGB0 = TAG_Int(13);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
+ once_value_2 = fra.me.REG[1];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[1] = once_value_2;
+ fra.me.REG[1] = fra.me.REG[1];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ fra.me.REG[0] = CALL_table_computation___AbsTableEltClass___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ if (!once_value_3) {
+ fra.me.REG[0] = BOX_NativeString(" */");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_3 = fra.me.REG[0];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[0] = once_value_3;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ goto label4;
+ label4: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[2];
}
-void compiling_global___TableEltComposite___init(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, NULL, 754, LOCATE_compiling_global___TableEltComposite___init};
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_TableEltComposite].i]) return;
- /* Register variable[2]: Method return value and escape marker */
- ATTR_compiling_global___TableEltComposite____cc(variable[0]) /*TableEltComposite::_cc*/ = variable[1] /*cc*/;
- /* Register variable[3]: Result */
- variable[3] = NEW_Array_array___Array___init() /*new Array[TableElt]*/;
- ATTR_compiling_global___TableEltComposite____table(variable[0]) /*TableEltComposite::_table*/ = variable[3];
- /* Register variable[3]: Result */
- variable[3] = NEW_HashMap_hash___HashMap___init() /*new HashMap[MMLocalClass, Int]*/;
- ATTR_compiling_global___TableEltComposite____offsets(variable[0]) /*TableEltComposite::_offsets*/ = variable[3];
- return_label166: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_TableEltComposite].i] = 1;
- tracehead = trace.prev;
- return;
+val_t compiling_global___TableEltClassColor___compile_to_c(val_t p0, val_t p1, val_t p2){
+ 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 264;
+ fra.me.meth = LOCATE_compiling_global___TableEltClassColor___compile_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 6;
+ 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;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:266 */
+ fra.me.REG[1] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:267 */
+ fra.me.REG[3] = CALL_table_computation___Program___compiled_classes(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[4] = CALL_table_computation___AbsTableEltClass___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[4])(fra.me.REG[4]);
+ fra.me.REG[4] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:268 */
+ REGB0 = TAG_Int(9);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[5] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
+ once_value_1 = fra.me.REG[5];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[5] = once_value_1;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
+ REGB0 = CALL_table_computation___CompiledClass___id(fra.me.REG[4])(fra.me.REG[4]);
+ fra.me.REG[5] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
+ if (!once_value_2) {
+ fra.me.REG[5] = BOX_NativeString(" /* ");
+ REGB0 = TAG_Int(4);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
+ once_value_2 = fra.me.REG[5];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[5] = once_value_2;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
+ fra.me.REG[1] = CALL_table_computation___Program___table_information(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = CALL_table_computation___ColorContext___color(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ if (!once_value_3) {
+ fra.me.REG[0] = BOX_NativeString(": ");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_3 = fra.me.REG[0];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[0] = once_value_3;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ if (!once_value_4) {
+ fra.me.REG[2] = BOX_NativeString(" < ");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_String_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];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ fra.me.REG[4] = CALL_table_computation___CompiledClass___local_class(fra.me.REG[4])(fra.me.REG[4]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ if (!once_value_5) {
+ fra.me.REG[4] = BOX_NativeString(": superclass typecheck marker */");
+ REGB0 = TAG_Int(32);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ goto label6;
+ label6: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[3];
}
-val_t compiling_global___TableEltClassSelfId___is_related_to(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 765, LOCATE_compiling_global___TableEltClassSelfId___is_related_to};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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 */
- variable[2] = TAG_Bool(true);
- goto return_label167;
- return_label167: while(false);
- tracehead = trace.prev;
- return variable[2];
+val_t compiling_global___TableEltComposite___compile_to_c(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 273;
+ fra.me.meth = LOCATE_compiling_global___TableEltComposite___compile_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:273 */
+ nit_abort("Aborted", NULL, LOCATE_compiling_global, 273);
+ stack_frame_head = fra.me.prev;
+ return NIT_NULL;
}
-val_t compiling_global___TableEltClassSelfId___compile_to_c(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 766, LOCATE_compiling_global___TableEltClassSelfId___compile_to_c};
- static val_t once_value_169 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_170 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_171 = NIT_NULL; /* Once value for string variable[6]*/
- val_t variable[8];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_compiling_global___GlobalCompilerVisitor___global_analysis( variable[1] /*v*/)( variable[1] /*v*/) /*GlobalCompilerVisitor::global_analysis*/;
- variable[4] = variable[5];
- variable[5] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[6]: Once String constant */
- if (once_value_169 != NIT_NULL) variable[6] = once_value_169;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_169 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___GlobalCompilerVisitor___global_analysis( variable[1] /*v*/)( variable[1] /*v*/) /*GlobalCompilerVisitor::global_analysis*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___GlobalAnalysis___compiled_classes(variable[6])(variable[6]) /*GlobalAnalysis::compiled_classes*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_abstractmetamodel___MMLocalClass___global( variable[2] /*c*/)( variable[2] /*c*/) /*MMLocalClass::global*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___MapRead_____bra(variable[6])(variable[6], variable[7]) /*CoupleMap::[]*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___CompiledClass___id(variable[6])(variable[6]) /*CompiledClass::id*/;
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[6]: Once String constant */
- if (once_value_170 != NIT_NULL) variable[6] = once_value_170;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString(" /* "), TAG_Int(4)) /*new String*/;
- once_value_170 = variable[6];
+val_t compiling_global___TableEltClassSelfId___compile_to_c(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 277;
+ fra.me.meth = LOCATE_compiling_global___TableEltClassSelfId___compile_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:279 */
+ fra.me.REG[1] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:280 */
+ REGB0 = TAG_Int(5);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[4] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[4] = CALL_table_computation___Program___compiled_classes(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[4])(fra.me.REG[4], 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_global, 280);
}
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___ColorContext___color( variable[4] /*ga*/)( variable[4] /*ga*/, variable[0]) /*ColorContext::color*/;
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[6]: Once String constant */
- if (once_value_171 != NIT_NULL) variable[6] = once_value_171;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString(": Identity */"), TAG_Int(13)) /*new String*/;
- once_value_171 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_string___Object___to_s(variable[5])(variable[5]) /*Object::to_s*/;
- variable[3] = variable[5];
- goto return_label168;
- return_label168: while(false);
- tracehead = trace.prev;
- return variable[3];
-}
-val_t compiling_global___TableEltVftPointer___is_related_to(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 776, LOCATE_compiling_global___TableEltVftPointer___is_related_to};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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 */
- variable[2] = TAG_Bool(true);
- goto return_label172;
- return_label172: while(false);
- tracehead = trace.prev;
- return variable[2];
+ REGB0 = CALL_table_computation___CompiledClass___id(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[2] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ if (!once_value_2) {
+ fra.me.REG[2] = BOX_NativeString(" /* ");
+ REGB0 = TAG_Int(4);
+ fra.me.REG[2] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ fra.me.REG[1] = CALL_table_computation___Program___table_information(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = CALL_table_computation___ColorContext___color(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ if (!once_value_3) {
+ fra.me.REG[0] = BOX_NativeString(": Identity */");
+ REGB0 = TAG_Int(13);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_3 = fra.me.REG[0];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[0] = once_value_3;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ goto label4;
+ label4: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[3];
}
-val_t compiling_global___TableEltVftPointer___compile_to_c(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 777, LOCATE_compiling_global___TableEltVftPointer___compile_to_c};
- static val_t once_value_174 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_175 = NIT_NULL; /* Once value for string variable[6]*/
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_compiling_global___GlobalCompilerVisitor___global_analysis( variable[1] /*v*/)( variable[1] /*v*/) /*GlobalCompilerVisitor::global_analysis*/;
- variable[4] = variable[5];
- variable[5] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[6]: Once String constant */
- if (once_value_174 != NIT_NULL) variable[6] = once_value_174;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("/* "), TAG_Int(3)) /*new String*/;
- once_value_174 = variable[6];
+val_t compiling_global___TableEltClassObjectSize___compile_to_c(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} 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_3; /* Once value */
+ static val_t once_value_4; /* Once value */
+ static val_t once_value_5; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 285;
+ fra.me.meth = LOCATE_compiling_global___TableEltClassObjectSize___compile_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:287 */
+ REGB0 = TAG_Int(0);
+ /* ./compiling//compiling_global.nit:288 */
+ fra.me.REG[1] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:289 */
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[2])(fra.me.REG[2]);
+ if (!once_value_1) {
+ fra.me.REG[4] = BOX_NativeString("NativeArray");
+ REGB1 = TAG_Int(11);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB1);
+ 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];
+ fra.me.REG[4] = CALL_symbol___String___to_symbol(fra.me.REG[4])(fra.me.REG[4]);
+ REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[4]));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ REGB1 = REGB2;
}
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___ColorContext___color( variable[4] /*ga*/)( variable[4] /*ga*/, variable[0]) /*ColorContext::color*/;
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[6]: Once String constant */
- if (once_value_175 != NIT_NULL) variable[6] = once_value_175;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString(": Pointer to the classtable */"), TAG_Int(30)) /*new String*/;
- once_value_175 = variable[6];
+ if (UNTAG_Bool(REGB1)) {
+ /* ./compiling//compiling_global.nit:290 */
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:216 */
+ REGB1 = TAG_Int(-UNTAG_Int(REGB1));
+ /* ./compiling//compiling_global.nit:290 */
+ REGB0 = REGB1;
+ } else {
+ /* ./compiling//compiling_global.nit:292 */
+ fra.me.REG[4] = CALL_table_computation___Program___compiled_classes(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:293 */
+ fra.me.REG[2] = CALL_table_computation___CompiledClass___instance_table(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB1 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[4] = ATTR_array___Array____items(fra.me.REG[2]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:237 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//collection//array.nit:238 */
+ REGB2 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[4])->val[UNTAG_Int(REGB1)];
+ /* ./compiling//compiling_global.nit:295 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
+ /* ./compiling//compiling_global.nit:295 */
+ REGB0 = REGB2;
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB1 = REGB2;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label2;
+ }
+ }
+ label2: while(0);
}
- /* Register variable[6]: Result */
- /* Ensure var variable[6]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_string___Object___to_s(variable[5])(variable[5]) /*Object::to_s*/;
- variable[3] = variable[5];
- goto return_label173;
- return_label173: while(false);
- tracehead = trace.prev;
- return variable[3];
+ /* ./compiling//compiling_global.nit:298 */
+ REGB1 = TAG_Int(5);
+ fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB1);
+ if (!once_value_3) {
+ fra.me.REG[2] = BOX_NativeString("");
+ REGB1 = TAG_Int(0);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB1);
+ 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_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+ fra.me.REG[2] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+ if (!once_value_4) {
+ fra.me.REG[2] = BOX_NativeString(" /* ");
+ REGB0 = TAG_Int(4);
+ fra.me.REG[2] = NEW_String_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];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+ fra.me.REG[1] = CALL_table_computation___Program___table_information(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = CALL_table_computation___ColorContext___color(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
+ if (!once_value_5) {
+ fra.me.REG[0] = BOX_NativeString(": Object size (-1 if a NativeArray)*/");
+ REGB0 = TAG_Int(37);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_5 = fra.me.REG[0];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[0] = once_value_5;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ goto label6;
+ label6: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[4];
}
-val_t compiling_global___ClassSorter___compare(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 790, LOCATE_compiling_global___ClassSorter___compare};
- val_t variable[5];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Result */
- variable[4] = CALL_compiling_global___MMLocalClass___compare( variable[1] /*a*/)( variable[1] /*a*/, variable[2] /*b*/) /*MMLocalClass::compare*/;
- variable[3] = variable[4];
- goto return_label176;
- return_label176: while(false);
- tracehead = trace.prev;
- return variable[3];
+val_t compiling_global___TableEltObjectId___compile_to_c(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ static val_t once_value_2; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 303;
+ fra.me.meth = LOCATE_compiling_global___TableEltObjectId___compile_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:305 */
+ fra.me.REG[1] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:306 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[3] = BOX_NativeString("/* ");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[3] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[1] = CALL_table_computation___Program___table_information(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = CALL_table_computation___ColorContext___color(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ if (!once_value_2) {
+ fra.me.REG[0] = BOX_NativeString(": Object_id */");
+ REGB0 = TAG_Int(14);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_2 = fra.me.REG[0];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[0] = once_value_2;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ goto label3;
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[2];
}
-void compiling_global___ClassSorter___init(val_t self, int* init_table) {
- struct trace_t trace = {NULL, NULL, 791, LOCATE_compiling_global___ClassSorter___init};
- val_t variable[2];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_ClassSorter].i]) return;
- /* Register variable[1]: Method return value and escape marker */
- return_label177: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_ClassSorter].i] = 1;
- tracehead = trace.prev;
- return;
+val_t compiling_global___TableEltVftPointer___compile_to_c(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ static val_t once_value_2; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 311;
+ fra.me.meth = LOCATE_compiling_global___TableEltVftPointer___compile_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./compiling//compiling_global.nit:313 */
+ fra.me.REG[1] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:314 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[3] = BOX_NativeString("/* ");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[3] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[1] = CALL_table_computation___Program___table_information(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = CALL_table_computation___ColorContext___color(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ if (!once_value_2) {
+ fra.me.REG[0] = BOX_NativeString(": Pointer to the classtable */");
+ REGB0 = TAG_Int(30);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_2 = fra.me.REG[0];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[0] = once_value_2;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ goto label3;
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[2];
}
-val_t compiling_global___MMLocalClass___compare(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 795, LOCATE_compiling_global___MMLocalClass___compare};
- val_t variable[8];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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]: Local variable */
- variable[3] = variable[0];
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(( variable[3] /*a*/ == variable[1] /*b*/) || (( variable[3] /*a*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[3] /*a*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[3] /*a*/, variable[1] /*b*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[3] /*a*/)( variable[3] /*a*/, variable[1] /*b*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable[4])) { /*if*/
- variable[2] = TAG_Int(0);
- goto return_label178;
- } else { /*if*/
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMLocalClass___module( variable[3] /*a*/)( variable[3] /*a*/) /*MMLocalClass::module*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMModule___mhe(variable[4])(variable[4]) /*MMModule::mhe*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMLocalClass___module( variable[1] /*b*/)( variable[1] /*b*/) /*MMLocalClass::module*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_partial_order___PartialOrderElement_____l(variable[4])(variable[4], variable[5]) /*PartialOrderElement::<*/;
- if (UNTAG_Bool(variable[4])) { /*if*/
- variable[2] = TAG_Int(1);
- goto return_label178;
- } else { /*if*/
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMLocalClass___module( variable[1] /*b*/)( variable[1] /*b*/) /*MMLocalClass::module*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstractmetamodel___MMModule___mhe(variable[4])(variable[4]) /*MMModule::mhe*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMLocalClass___module( variable[3] /*a*/)( variable[3] /*a*/) /*MMLocalClass::module*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_partial_order___PartialOrderElement_____l(variable[4])(variable[4], variable[5]) /*PartialOrderElement::<*/;
- if (UNTAG_Bool(variable[4])) { /*if*/
- /* Register variable[4]: Result */
- variable[4] = TAG_Int(-UNTAG_Int( TAG_Int(1)));
- variable[2] = variable[4];
- goto return_label178;
- }
+void compiling_global___MMLocalClass___declare_tables_to_c(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 321;
+ fra.me.meth = LOCATE_compiling_global___MMLocalClass___declare_tables_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 6;
+ 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_global.nit:324 */
+ if (!once_value_1) {
+ fra.me.REG[2] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[2] = NEW_String_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];
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:325 */
+ fra.me.REG[2] = CALL_primitive_info___MMLocalClass___primitive_info(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./compiling//compiling_global.nit:326 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_2) {
+ fra.me.REG[4] = BOX_NativeString("extern const classtable_elt_t VFT_");
+ REGB0 = TAG_Int(34);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_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(3);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:327 */
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
+ REGB0 = REGB1;
}
}
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[3] /*a*/)( variable[3] /*a*/) /*MMLocalClass::cshe*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_partial_order___PartialOrderElement___rank(variable[5])(variable[5]) /*PartialOrderElement::rank*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[1] /*b*/)( variable[1] /*b*/) /*MMLocalClass::cshe*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_partial_order___PartialOrderElement___rank(variable[6])(variable[6]) /*PartialOrderElement::rank*/;
- variable[5] = variable[6];
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(UNTAG_Int( variable[4] /*ar*/)>UNTAG_Int( variable[5] /*br*/));
- if (UNTAG_Bool(variable[6])) { /*if*/
- variable[2] = TAG_Int(1);
- goto return_label178;
- } else { /*if*/
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(UNTAG_Int( variable[5] /*br*/)>UNTAG_Int( variable[4] /*ar*/));
- if (UNTAG_Bool(variable[6])) { /*if*/
- /* Register variable[6]: Result */
- variable[6] = TAG_Int(-UNTAG_Int( TAG_Int(1)));
- variable[2] = variable[6];
- goto return_label178;
- } else { /*if*/
- /* Register variable[6]: Result */
- variable[6] = CALL_abstractmetamodel___MMLocalClass___name( variable[1] /*b*/)( variable[1] /*b*/) /*MMLocalClass::name*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Symbol::to_s*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_abstractmetamodel___MMLocalClass___name( variable[3] /*a*/)( variable[3] /*a*/) /*MMLocalClass::name*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_string___Object___to_s(variable[7])(variable[7]) /*Symbol::to_s*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_kernel___Comparable_____leqg(variable[6])(variable[6], variable[7]) /*Comparable::<=>*/;
- variable[2] = variable[6];
- goto return_label178;
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 327);
}
+ REGB0 = CALL_primitive_info___PrimitiveInfo___tagged(fra.me.REG[2])(fra.me.REG[2]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ } else {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
}
- return_label178: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-void compiling_global___MMLocalClass___declare_tables_to_c(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 817, LOCATE_compiling_global___MMLocalClass___declare_tables_to_c};
- static val_t once_value_180 = NIT_NULL; /* Once value for string variable[3]*/
- static val_t once_value_181 = NIT_NULL; /* Once value for string variable[5]*/
- static val_t once_value_182 = NIT_NULL; /* Once value for string variable[5]*/
- static val_t once_value_183 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_184 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_185 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_186 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_187 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_188 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_189 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_190 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_191 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_192 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_193 = NIT_NULL; /* Once value for string variable[7]*/
- val_t variable[8];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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]: Once String constant */
- if (once_value_180 != NIT_NULL) variable[3] = once_value_180;
- else {
- variable[3] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_180 = variable[3];
- }
- /* Register variable[3]: Result */
- CALL_compiling_base___CompilerVisitor___add_decl( variable[1] /*v*/)( variable[1] /*v*/, variable[3]) /*CompilerVisitor::add_decl*/;
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = CALL_compiling_base___MMLocalClass___primitive_info(variable[0])(variable[0]) /*MMLocalClass::primitive_info*/;
- variable[3] = variable[4];
- variable[4] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[5]: Once String constant */
- if (once_value_181 != NIT_NULL) variable[5] = once_value_181;
- else {
- variable[5] = NEW_String_string___String___with_native(BOX_NativeString("extern const classtable_elt_t VFT_"), TAG_Int(34)) /*new String*/;
- once_value_181 = variable[5];
- }
- /* Register variable[5]: Result */
- /* Ensure var variable[5]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[5]) /*AbstractArray::add*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
- /* Ensure var variable[5]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], CALL_string___Object___to_s(variable[5])(variable[5]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[5]: Once String constant */
- if (once_value_182 != NIT_NULL) variable[5] = once_value_182;
- else {
- variable[5] = NEW_String_string___String___with_native(BOX_NativeString("[];"), TAG_Int(3)) /*new String*/;
- once_value_182 = variable[5];
- }
- /* Register variable[5]: Result */
- /* Ensure var variable[5]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[5]) /*AbstractArray::add*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_decl( variable[1] /*v*/)( variable[1] /*v*/, variable[4]) /*CompilerVisitor::add_decl*/;
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(( variable[3] /*pi*/ == NIT_NULL /*null*/) || (( variable[3] /*pi*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[3] /*pi*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[3] /*pi*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[3] /*pi*/)( variable[3] /*pi*/, NIT_NULL /*null*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable[4])) { /*if*/
- } else { /*if*/
- /* Register variable[4]: Result */
- variable[4] = CALL_compiling_base___PrimitiveInfo___tagged( variable[3] /*pi*/)( variable[3] /*pi*/) /*PrimitiveInfo::tagged*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[4])))) { /*if*/
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_compiling_base___PrimitiveInfo___cname( variable[3] /*pi*/)( variable[3] /*pi*/) /*PrimitiveInfo::cname*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[7]: Once String constant */
- if (once_value_183 != NIT_NULL) variable[7] = once_value_183;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("struct TBOX_"), TAG_Int(12)) /*new String*/;
- once_value_183 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_184 != NIT_NULL) variable[7] = once_value_184;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_184 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
- variable[5] = variable[6];
- variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[7]: Once String constant */
- if (once_value_185 != NIT_NULL) variable[7] = once_value_185;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_185 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- variable[7] = variable[5] /*tbox*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_186 != NIT_NULL) variable[7] = once_value_186;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(" { const classtable_elt_t * vft; "), TAG_Int(33)) /*new String*/;
- once_value_186 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- variable[7] = variable[4] /*t*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_187 != NIT_NULL) variable[7] = once_value_187;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(" val;};"), TAG_Int(7)) /*new String*/;
- once_value_187 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_decl( variable[1] /*v*/)( variable[1] /*v*/, variable[6]) /*CompilerVisitor::add_decl*/;
- variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[7]: Once String constant */
- if (once_value_188 != NIT_NULL) variable[7] = once_value_188;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("val_t BOX_"), TAG_Int(10)) /*new String*/;
- once_value_188 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_189 != NIT_NULL) variable[7] = once_value_189;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("("), TAG_Int(1)) /*new String*/;
- once_value_189 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- variable[7] = variable[4] /*t*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_190 != NIT_NULL) variable[7] = once_value_190;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(" val);"), TAG_Int(6)) /*new String*/;
- once_value_190 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_decl( variable[1] /*v*/)( variable[1] /*v*/, variable[6]) /*CompilerVisitor::add_decl*/;
- variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[7]: Once String constant */
- if (once_value_191 != NIT_NULL) variable[7] = once_value_191;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("#define UNBOX_"), TAG_Int(14)) /*new String*/;
- once_value_191 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_192 != NIT_NULL) variable[7] = once_value_192;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("(x) ((("), TAG_Int(7)) /*new String*/;
- once_value_192 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- variable[7] = variable[5] /*tbox*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_193 != NIT_NULL) variable[7] = once_value_193;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(" *)(VAL2OBJ(x)))->val)"), TAG_Int(22)) /*new String*/;
- once_value_193 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_decl( variable[1] /*v*/)( variable[1] /*v*/, variable[6]) /*CompilerVisitor::add_decl*/;
+ if (UNTAG_Bool(REGB0)) {
+ /* ./compiling//compiling_global.nit:328 */
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 328);
}
+ fra.me.REG[2] = CALL_primitive_info___PrimitiveInfo___cname(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:329 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_4) {
+ fra.me.REG[4] = BOX_NativeString("struct TBOX_");
+ REGB0 = TAG_Int(12);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ if (!once_value_5) {
+ fra.me.REG[4] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[4] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:330 */
+ REGB0 = TAG_Int(5);
+ fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_6) {
+ fra.me.REG[5] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[5] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+ if (!once_value_7) {
+ fra.me.REG[5] = BOX_NativeString(" { const classtable_elt_t * vft; bigint object_id; ");
+ REGB0 = TAG_Int(51);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
+ once_value_7 = fra.me.REG[5];
+ register_static_object(&once_value_7);
+ } else fra.me.REG[5] = once_value_7;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+ if (!once_value_8) {
+ fra.me.REG[5] = BOX_NativeString(" val;};");
+ REGB0 = TAG_Int(7);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
+ once_value_8 = fra.me.REG[5];
+ register_static_object(&once_value_8);
+ } else fra.me.REG[5] = once_value_8;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:331 */
+ REGB0 = TAG_Int(5);
+ fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_9) {
+ fra.me.REG[5] = BOX_NativeString("val_t BOX_");
+ REGB0 = TAG_Int(10);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
+ once_value_9 = fra.me.REG[5];
+ register_static_object(&once_value_9);
+ } else fra.me.REG[5] = once_value_9;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ if (!once_value_10) {
+ fra.me.REG[5] = BOX_NativeString("(");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB0);
+ once_value_10 = fra.me.REG[5];
+ register_static_object(&once_value_10);
+ } else fra.me.REG[5] = once_value_10;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+ if (!once_value_11) {
+ fra.me.REG[2] = BOX_NativeString(" val);");
+ REGB0 = TAG_Int(6);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_11 = fra.me.REG[2];
+ register_static_object(&once_value_11);
+ } else fra.me.REG[2] = once_value_11;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:332 */
+ REGB0 = TAG_Int(5);
+ fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_12) {
+ fra.me.REG[2] = BOX_NativeString("#define UNBOX_");
+ REGB0 = TAG_Int(14);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_12 = fra.me.REG[2];
+ register_static_object(&once_value_12);
+ } else fra.me.REG[2] = once_value_12;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
+ if (!once_value_13) {
+ fra.me.REG[0] = BOX_NativeString("(x) (((");
+ REGB0 = TAG_Int(7);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_13 = fra.me.REG[0];
+ register_static_object(&once_value_13);
+ } else fra.me.REG[0] = once_value_13;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+ if (!once_value_14) {
+ fra.me.REG[3] = BOX_NativeString(" *)(VAL2OBJ(x)))->val)");
+ REGB0 = TAG_Int(22);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_14 = fra.me.REG[3];
+ register_static_object(&once_value_14);
+ } else fra.me.REG[3] = once_value_14;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
}
- return_label179: while(false);
- tracehead = trace.prev;
+ stack_frame_head = fra.me.prev;
return;
}
-void compiling_global___MMLocalClass___compile_tables_to_c(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 834, LOCATE_compiling_global___MMLocalClass___compile_tables_to_c};
- static val_t once_value_195 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_196 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_197 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_199 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_200 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_201 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_202 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_203 = NIT_NULL; /* Once value for string variable[6]*/
- static val_t once_value_205 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_206 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_207 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_208 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_209 = NIT_NULL; /* Once value for string variable[12]*/
- static val_t once_value_210 = NIT_NULL; /* Once value for string variable[13]*/
- static val_t once_value_211 = NIT_NULL; /* Once value for string variable[13]*/
- static val_t once_value_212 = NIT_NULL; /* Once value for string variable[13]*/
- static val_t once_value_213 = NIT_NULL; /* Once value for string variable[13]*/
- static val_t once_value_214 = NIT_NULL; /* Once value for string variable[12]*/
- static val_t once_value_216 = NIT_NULL; /* Once value for string variable[21]*/
- static val_t once_value_217 = NIT_NULL; /* Once value for string variable[21]*/
- static val_t once_value_218 = NIT_NULL; /* Once value for string variable[21]*/
- static val_t once_value_219 = NIT_NULL; /* Once value for string variable[12]*/
- static val_t once_value_220 = NIT_NULL; /* Once value for string variable[12]*/
- static val_t once_value_221 = NIT_NULL; /* Once value for string variable[14]*/
- static val_t once_value_222 = NIT_NULL; /* Once value for string variable[14]*/
- static val_t once_value_223 = NIT_NULL; /* Once value for string variable[13]*/
- static val_t once_value_225 = NIT_NULL; /* Once value for string variable[20]*/
- static val_t once_value_226 = NIT_NULL; /* Once value for string variable[20]*/
- static val_t once_value_227 = NIT_NULL; /* Once value for string variable[20]*/
- static val_t once_value_228 = NIT_NULL; /* Once value for string variable[14]*/
- static val_t once_value_229 = NIT_NULL; /* Once value for string variable[17]*/
- static val_t once_value_230 = NIT_NULL; /* Once value for string variable[17]*/
- static val_t once_value_231 = NIT_NULL; /* Once value for string variable[17]*/
- static val_t once_value_232 = NIT_NULL; /* Once value for string variable[17]*/
- static val_t once_value_234 = NIT_NULL; /* Once value for string variable[23]*/
- static val_t once_value_236 = NIT_NULL; /* Once value for string variable[26]*/
- static val_t once_value_237 = NIT_NULL; /* Once value for string variable[26]*/
- static val_t once_value_238 = NIT_NULL; /* Once value for string variable[26]*/
- static val_t once_value_239 = NIT_NULL; /* Once value for string variable[26]*/
- static val_t once_value_240 = NIT_NULL; /* Once value for string variable[22]*/
- static val_t once_value_241 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_242 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_243 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_244 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_245 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_246 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_247 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_248 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_249 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_250 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_251 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_252 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_253 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_254 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_255 = NIT_NULL; /* Once value for string variable[24]*/
- static val_t once_value_256 = NIT_NULL; /* Once value for string variable[23]*/
- static val_t once_value_257 = NIT_NULL; /* Once value for string variable[23]*/
- static val_t once_value_258 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_259 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_260 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_261 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_262 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_263 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_264 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_265 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_266 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_267 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_268 = NIT_NULL; /* Once value for string variable[11]*/
- static val_t once_value_269 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_270 = NIT_NULL; /* Once value for string variable[10]*/
- static val_t once_value_271 = NIT_NULL; /* Once value for string variable[10]*/
- val_t variable[27];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_compiling_global;
- /* 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]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = CALL_compiling_global___GlobalCompilerVisitor___global_analysis( variable[1] /*v*/)( variable[1] /*v*/) /*GlobalCompilerVisitor::global_analysis*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_compiling_global___GlobalAnalysis___compiled_classes(variable[4])(variable[4]) /*GlobalAnalysis::compiled_classes*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstractmetamodel___MMLocalClass___global(variable[0])(variable[0]) /*MMLocalClass::global*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___MapRead_____bra(variable[4])(variable[4], variable[5]) /*CoupleMap::[]*/;
- variable[3] = variable[4];
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_compiling_global___CompiledClass___class_table( variable[3] /*cc*/)( variable[3] /*cc*/) /*CompiledClass::class_table*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___Collection___length( variable[4] /*ctab*/)( variable[4] /*ctab*/) /*AbstractArrayRead::length*/;
- variable[5] = variable[6];
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___GlobalCompilerVisitor___global_analysis( variable[1] /*v*/)( variable[1] /*v*/) /*GlobalCompilerVisitor::global_analysis*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___GlobalAnalysis___max_class_table_length(variable[6])(variable[6]) /*GlobalAnalysis::max_class_table_length*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_abstract_collection___Collection___length( variable[4] /*ctab*/)( variable[4] /*ctab*/) /*AbstractArrayRead::length*/;
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(UNTAG_Int(variable[6])>UNTAG_Int(variable[7]));
- if (UNTAG_Bool(variable[6])) { /*if*/
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___GlobalCompilerVisitor___global_analysis( variable[1] /*v*/)( variable[1] /*v*/) /*GlobalCompilerVisitor::global_analysis*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_compiling_global___GlobalAnalysis___max_class_table_length(variable[6])(variable[6]) /*GlobalAnalysis::max_class_table_length*/;
- variable[5] = variable[6] /*clen=*/;
+void compiling_global___MMLocalClass___compile_tables_to_c(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[8];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t REGB3;
+ 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_8; /* Once value */
+ static val_t once_value_9; /* Once value */
+ static val_t once_value_10; /* 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_29; /* 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 */
+ static val_t once_value_41; /* Once value */
+ static val_t once_value_42; /* Once value */
+ static val_t once_value_43; /* Once value */
+ static val_t once_value_44; /* Once value */
+ static val_t once_value_45; /* Once value */
+ static val_t once_value_46; /* Once value */
+ static val_t once_value_47; /* Once value */
+ static val_t once_value_48; /* Once value */
+ static val_t once_value_49; /* Once value */
+ static val_t once_value_50; /* Once value */
+ static val_t once_value_62; /* Once value */
+ static val_t once_value_63; /* Once value */
+ static val_t once_value_64; /* Once value */
+ static val_t once_value_65; /* Once value */
+ static val_t once_value_66; /* Once value */
+ static val_t once_value_67; /* Once value */
+ static val_t once_value_68; /* Once value */
+ static val_t once_value_69; /* Once value */
+ static val_t once_value_70; /* Once value */
+ static val_t once_value_71; /* Once value */
+ static val_t once_value_72; /* Once value */
+ static val_t once_value_73; /* Once value */
+ static val_t once_value_74; /* Once value */
+ static val_t once_value_75; /* Once value */
+ static val_t once_value_76; /* Once value */
+ static val_t once_value_77; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 336;
+ fra.me.meth = LOCATE_compiling_global___MMLocalClass___compile_tables_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 9;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./compiling//compiling_global.nit:339 */
+ fra.me.REG[2] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[2] = CALL_table_computation___Program___compiled_classes(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:340 */
+ fra.me.REG[2] = CALL_table_computation___CompiledClass___class_table(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
}
- variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[7]: Once String constant */
- if (once_value_195 != NIT_NULL) variable[7] = once_value_195;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("const classtable_elt_t VFT_"), TAG_Int(27)) /*new String*/;
- once_value_195 = variable[7];
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:342 */
+ fra.me.REG[4] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[4] = CALL_table_computation___Program___table_information(fra.me.REG[4])(fra.me.REG[4]);
+ REGB1 = CALL_table_computation___TableInformation___max_class_table_length(fra.me.REG[4])(fra.me.REG[4]);
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
}
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[7]: Result */
- variable[7] = CALL_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_196 != NIT_NULL) variable[7] = once_value_196;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("["), TAG_Int(1)) /*new String*/;
- once_value_196 = variable[7];
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//kernel.nit:214 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)>UNTAG_Int(REGB2));
+ /* ./compiling//compiling_global.nit:342 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./compiling//compiling_global.nit:343 */
+ fra.me.REG[4] = CALL_compiling_base___CompilerVisitor___program(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[4] = CALL_table_computation___Program___table_information(fra.me.REG[4])(fra.me.REG[4]);
+ REGB2 = CALL_table_computation___TableInformation___max_class_table_length(fra.me.REG[4])(fra.me.REG[4]);
+ REGB0 = REGB2;
}
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- variable[7] = variable[5] /*clen*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_197 != NIT_NULL) variable[7] = once_value_197;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("] = {"), TAG_Int(5)) /*new String*/;
- once_value_197 = variable[7];
+ /* ./compiling//compiling_global.nit:346 */
+ REGB2 = TAG_Int(5);
+ fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_1) {
+ fra.me.REG[5] = BOX_NativeString("const classtable_elt_t VFT_");
+ REGB2 = TAG_Int(27);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_1 = fra.me.REG[5];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[5] = once_value_1;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ if (!once_value_2) {
+ fra.me.REG[5] = BOX_NativeString("[");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_2 = fra.me.REG[5];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[5] = once_value_2;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ fra.me.REG[5] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ if (!once_value_3) {
+ fra.me.REG[5] = BOX_NativeString("] = {");
+ REGB2 = TAG_Int(5);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_3 = fra.me.REG[5];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[5] = once_value_3;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:347 */
+ CALL_compiling_base___CompilerVisitor___indent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/standard//collection//array.nit:231 */
+ fra.me.REG[4] = fra.me.REG[2];
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB2 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
}
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[6]) /*CompilerVisitor::add_instr*/;
- CALL_compiling_base___CompilerVisitor___indent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::indent*/;
- /* Register variable[6]: For iterator */
- variable[6] = CALL_abstract_collection___Collection___iterator( variable[4] /*ctab*/)( variable[4] /*ctab*/) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[7]: For 'is_ok' result */
- variable[7] = CALL_abstract_collection___Iterator___is_ok(variable[6])(variable[6]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[7])) break; /*for*/
- variable[7] = CALL_abstract_collection___Iterator___item(variable[6])(variable[6]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[8]: Local variable */
- variable[8] = variable[7];
- /* Register variable[9]: Result */
- variable[9] = TAG_Bool(( variable[8] /*e*/ == NIT_NULL /*null*/) || (( variable[8] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[8] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[8] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[8] /*e*/)( variable[8] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable[9])) { /*if*/
- /* Register variable[9]: Once String constant */
- if (once_value_199 != NIT_NULL) variable[9] = once_value_199;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString("{0} /* Class Hole :( */,"), TAG_Int(24)) /*new String*/;
- once_value_199 = variable[9];
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[4]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[5] = ATTR_array___Array____items(fra.me.REG[4]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[4]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:237 */
+ if (UNTAG_Bool(REGB1)) {
+ /* ./../lib/standard//collection//array.nit:238 */
+ REGB1 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
}
- /* Register variable[9]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[9]) /*CompilerVisitor::add_instr*/;
- } else { /*if*/
- variable[9] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[10]: Once String constant */
- if (once_value_200 != NIT_NULL) variable[10] = once_value_200;
- else {
- variable[10] = NEW_String_string___String___with_native(BOX_NativeString("{(bigint) "), TAG_Int(10)) /*new String*/;
- once_value_200 = variable[10];
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[6] = ((Nit_NativeArray)fra.me.REG[5])->val[UNTAG_Int(REGB2)];
+ /* ./compiling//compiling_global.nit:349 */
+ REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB3 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
+ if (UNTAG_Bool(REGB3)) {
+ REGB3 = TAG_Bool(false);
+ REGB1 = REGB3;
+ } else {
+ REGB3 = CALL_kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], NIT_NULL);
+ REGB1 = REGB3;
+ }
}
- /* 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_global___TableElt___compile_to_c( variable[8] /*e*/)( variable[8] /*e*/, variable[1] /*v*/, variable[0]) /*TableElt::compile_to_c*/;
- /* 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_201 != NIT_NULL) variable[10] = once_value_201;
- else {
- variable[10] = NEW_String_string___String___with_native(BOX_NativeString("},"), TAG_Int(2)) /*new String*/;
- once_value_201 = variable[10];
+ if (UNTAG_Bool(REGB1)) {
+ /* ./compiling//compiling_global.nit:350 */
+ if (!once_value_4) {
+ fra.me.REG[7] = BOX_NativeString("{0} /* Class Hole :( */,");
+ REGB1 = TAG_Int(24);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB1);
+ once_value_4 = fra.me.REG[7];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[7] = once_value_4;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ } else {
+ /* ./compiling//compiling_global.nit:352 */
+ REGB1 = TAG_Int(3);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB1);
+ if (!once_value_5) {
+ fra.me.REG[8] = BOX_NativeString("{(bigint) ");
+ REGB1 = TAG_Int(10);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB1);
+ once_value_5 = fra.me.REG[8];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[8] = once_value_5;
+ fra.me.REG[8] = fra.me.REG[8];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 352);
+ }
+ fra.me.REG[6] = CALL_compiling_global___TableElt___compile_to_c(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[1], fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[6]);
+ if (!once_value_6) {
+ fra.me.REG[6] = BOX_NativeString("},");
+ REGB1 = TAG_Int(2);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB1);
+ once_value_6 = fra.me.REG[6];
+ register_static_object(&once_value_6);
+ } else fra.me.REG[6] = once_value_6;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[6]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
}
- /* 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_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[9]) /*CompilerVisitor::add_instr*/;
- }
- continue_198: while(0);
- CALL_abstract_collection___Iterator___next(variable[6])(variable[6]) /*ArrayIterator::next*/;
- }
- break_198: while(0);
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___Collection___length( variable[4] /*ctab*/)( variable[4] /*ctab*/) /*AbstractArrayRead::length*/;
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(UNTAG_Int( variable[5] /*clen*/)>UNTAG_Int(variable[6]));
- if (UNTAG_Bool(variable[6])) { /*if*/
- /* Register variable[6]: Once String constant */
- if (once_value_202 != NIT_NULL) variable[6] = once_value_202;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("{0},"), TAG_Int(4)) /*new String*/;
- once_value_202 = variable[6];
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB2 = REGB1;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label7;
}
- /* Register variable[6]: Result */
- /* Register variable[7]: Result */
- variable[7] = CALL_abstract_collection___Collection___length( variable[4] /*ctab*/)( variable[4] /*ctab*/) /*AbstractArrayRead::length*/;
- /* Register variable[7]: Result */
- variable[7] = TAG_Int(UNTAG_Int( variable[5] /*clen*/)-UNTAG_Int(variable[7]));
- /* Register variable[6]: Result */
- variable[6] = CALL_string___String_____star(variable[6])(variable[6], variable[7]) /*String::**/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[6]) /*CompilerVisitor::add_instr*/;
}
- CALL_compiling_base___CompilerVisitor___unindent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::unindent*/;
- /* Register variable[6]: Once String constant */
- if (once_value_203 != NIT_NULL) variable[6] = once_value_203;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("};"), TAG_Int(2)) /*new String*/;
- once_value_203 = variable[6];
+ label7: while(0);
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
}
- /* Register variable[6]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[6]) /*CompilerVisitor::add_instr*/;
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = CALL_compiling_global___CompiledClass___instance_table( variable[3] /*cc*/)( variable[3] /*cc*/) /*CompiledClass::instance_table*/;
- variable[6] = variable[7];
- /* Register variable[7]: For iterator */
- variable[7] = CALL_abstract_collection___Collection___iterator( variable[6] /*itab*/)( variable[6] /*itab*/) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[8]: For 'is_ok' result */
- variable[8] = CALL_abstract_collection___Iterator___is_ok(variable[7])(variable[7]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[8])) break; /*for*/
- variable[8] = CALL_abstract_collection___Iterator___item(variable[7])(variable[7]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[9]: Local variable */
- variable[9] = variable[8];
- /* Register variable[10]: Result */
- variable[10] = TAG_Bool(( variable[9] /*e*/ == NIT_NULL /*null*/) || (( variable[9] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[9] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[9] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[9] /*e*/)( variable[9] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable[10])) { /*if*/
- /* Register variable[10]: Once String constant */
- if (once_value_205 != NIT_NULL) variable[10] = once_value_205;
- else {
- variable[10] = NEW_String_string___String___with_native(BOX_NativeString("/* Instance Hole :( */"), TAG_Int(22)) /*new String*/;
- once_value_205 = variable[10];
- }
- /* Register variable[10]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[10]) /*CompilerVisitor::add_instr*/;
- } else { /*if*/
- /* Register variable[10]: Result */
- variable[10] = CALL_compiling_global___TableElt___compile_to_c( variable[9] /*e*/)( variable[9] /*e*/, variable[1] /*v*/, variable[0]) /*TableElt::compile_to_c*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[10]) /*CompilerVisitor::add_instr*/;
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//kernel.nit:214 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB2));
+ /* ./compiling//compiling_global.nit:355 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./compiling//compiling_global.nit:356 */
+ if (!once_value_8) {
+ fra.me.REG[5] = BOX_NativeString("{0},");
+ REGB2 = TAG_Int(4);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_8 = fra.me.REG[5];
+ register_static_object(&once_value_8);
+ } else fra.me.REG[5] = once_value_8;
+ fra.me.REG[5] = fra.me.REG[5];
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
}
- continue_204: while(0);
- CALL_abstract_collection___Iterator___next(variable[7])(variable[7]) /*ArrayIterator::next*/;
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//kernel.nit:217 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
+ /* ./compiling//compiling_global.nit:356 */
+ fra.me.REG[5] = CALL_string___String_____star(fra.me.REG[5])(fra.me.REG[5], REGB2);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
}
- break_204: while(0);
- /* Register variable[7]: Local variable */
- /* Register variable[8]: Result */
- variable[8] = CALL_compiling_base___MMLocalClass___primitive_info(variable[0])(variable[0]) /*MMLocalClass::primitive_info*/;
- variable[7] = variable[8];
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool(( variable[7] /*pi*/ == NIT_NULL /*null*/) || (( variable[7] /*pi*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[7] /*pi*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[7] /*pi*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[7] /*pi*/)( variable[7] /*pi*/, NIT_NULL /*null*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable[8])) { /*if*/
- /* Register variable[8]: Result */
- variable[8] = NEW_CFunctionContext_compiling_methods___CFunctionContext___init( variable[1] /*v*/) /*new CFunctionContext*/;
- CALL_compiling_methods___CompilerVisitor___cfc__eq( variable[1] /*v*/)( variable[1] /*v*/, variable[8]) /*CompilerVisitor::cfc=*/;
- /* Register variable[8]: Result */
- variable[8] = NEW_NitMethodContext_compiling_methods___NitMethodContext___init( NIT_NULL /*null*/) /*new NitMethodContext*/;
- CALL_compiling_methods___CompilerVisitor___nmc__eq( variable[1] /*v*/)( variable[1] /*v*/, variable[8]) /*CompilerVisitor::nmc=*/;
- /* Register variable[8]: Local variable */
- variable[9] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[10]: Once String constant */
- if (once_value_206 != NIT_NULL) variable[10] = once_value_206;
- else {
- variable[10] = NEW_String_string___String___with_native(BOX_NativeString("val_t NEW_"), TAG_Int(10)) /*new String*/;
- once_value_206 = 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___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::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_207 != NIT_NULL) variable[10] = once_value_207;
- else {
- variable[10] = NEW_String_string___String___with_native(BOX_NativeString("(void)"), TAG_Int(6)) /*new String*/;
- once_value_207 = 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*/;
- variable[8] = variable[9];
- /* Register variable[9]: Once String constant */
- if (once_value_208 != NIT_NULL) variable[9] = once_value_208;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(" {"), TAG_Int(2)) /*new String*/;
- once_value_208 = variable[9];
- }
- /* Register variable[9]: Result */
- /* Register variable[9]: Result */
- variable[9] = CALL_string___String_____plus( variable[8] /*s*/)( variable[8] /*s*/, variable[9]) /*String::+*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[9]) /*CompilerVisitor::add_instr*/;
- CALL_compiling_base___CompilerVisitor___indent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::indent*/;
- /* Register variable[9]: Local variable */
- /* Register variable[10]: Result */
- variable[10] = CALL_compiling_base___CompilerVisitor___ctx( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::ctx*/;
- variable[9] = variable[10];
- /* Register variable[10]: Result */
- variable[10] = NEW_CContext_compiling_base___CContext___init() /*new CContext*/;
- CALL_compiling_base___CompilerVisitor___ctx__eq( variable[1] /*v*/)( variable[1] /*v*/, variable[10]) /*CompilerVisitor::ctx=*/;
- /* Register variable[10]: Local variable */
- /* Register variable[11]: Result */
- variable[11] = NEW_ParamVariable_syntax_base___ParamVariable___init( NIT_NULL /*null*/, NIT_NULL /*null*/) /*new ParamVariable*/;
- variable[10] = variable[11];
- /* Register variable[11]: Local variable */
- /* Register variable[12]: Result */
- variable[12] = CALL_compiling_methods___CompilerVisitor___cfc( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::cfc*/;
- /* Register variable[12]: Result */
- variable[12] = CALL_compiling_methods___CFunctionContext___register_variable(variable[12])(variable[12], variable[10] /*self_var*/) /*CFunctionContext::register_variable*/;
- variable[11] = variable[12];
- /* Register variable[12]: Result */
- variable[12] = CALL_compiling_methods___CompilerVisitor___nmc( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::nmc*/;
- variable[13] = NEW_Array_array___Array___with_capacity(TAG_Int(1)) /*new Array[ParamVariable]*/ /* Ensure var: Literal array*/;
- CALL_abstract_collection___SimpleCollection___add(variable[13])(variable[13], variable[10] /*self_var*/) /*AbstractArray::add*/;
- /* Register variable[13]: Result */
- CALL_compiling_methods___NitMethodContext___method_params__eq(variable[12])(variable[12], variable[13]) /*NitMethodContext::method_params=*/;
- /* Register variable[12]: Once String constant */
- if (once_value_209 != NIT_NULL) variable[12] = once_value_209;
- else {
- variable[12] = NEW_String_string___String___with_native(BOX_NativeString("obj_t obj;"), TAG_Int(10)) /*new String*/;
- once_value_209 = variable[12];
- }
- /* Register variable[12]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[12]) /*CompilerVisitor::add_instr*/;
- variable[12] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[13]: Once String constant */
- if (once_value_210 != NIT_NULL) variable[13] = once_value_210;
- else {
- variable[13] = NEW_String_string___String___with_native(BOX_NativeString("obj = alloc(sizeof(val_t) * "), TAG_Int(28)) /*new String*/;
- once_value_210 = variable[13];
- }
- /* Register variable[13]: Result */
- /* Ensure var variable[13]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[13]) /*AbstractArray::add*/;
- /* Register variable[13]: Result */
- variable[13] = CALL_abstract_collection___Collection___length( variable[6] /*itab*/)( variable[6] /*itab*/) /*AbstractArrayRead::length*/;
- /* Ensure var variable[13]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], CALL_string___Object___to_s(variable[13])(variable[13]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[13]: Once String constant */
- if (once_value_211 != NIT_NULL) variable[13] = once_value_211;
- else {
- variable[13] = NEW_String_string___String___with_native(BOX_NativeString(");"), TAG_Int(2)) /*new String*/;
- once_value_211 = variable[13];
- }
- /* Register variable[13]: Result */
- /* Ensure var variable[13]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[13]) /*AbstractArray::add*/;
- /* Register variable[12]: Result */
- variable[12] = CALL_string___Object___to_s(variable[12])(variable[12]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[12]) /*CompilerVisitor::add_instr*/;
- variable[12] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[13]: Once String constant */
- if (once_value_212 != NIT_NULL) variable[13] = once_value_212;
- else {
- variable[13] = NEW_String_string___String___with_native(BOX_NativeString("obj->vft = (classtable_elt_t*)VFT_"), TAG_Int(34)) /*new String*/;
- once_value_212 = variable[13];
- }
- /* Register variable[13]: Result */
- /* Ensure var variable[13]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[13]) /*AbstractArray::add*/;
- /* Register variable[13]: Result */
- variable[13] = CALL_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
- /* Ensure var variable[13]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], CALL_string___Object___to_s(variable[13])(variable[13]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[13]: Once String constant */
- if (once_value_213 != NIT_NULL) variable[13] = once_value_213;
- else {
- variable[13] = NEW_String_string___String___with_native(BOX_NativeString(";"), TAG_Int(1)) /*new String*/;
- once_value_213 = variable[13];
- }
- /* Register variable[13]: Result */
- /* Ensure var variable[13]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[13]) /*AbstractArray::add*/;
- /* Register variable[12]: Result */
- variable[12] = CALL_string___Object___to_s(variable[12])(variable[12]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[12]) /*CompilerVisitor::add_instr*/;
- /* Register variable[12]: Once String constant */
- if (once_value_214 != NIT_NULL) variable[12] = once_value_214;
- else {
- variable[12] = NEW_String_string___String___with_native(BOX_NativeString("OBJ2VAL(obj)"), TAG_Int(12)) /*new String*/;
- once_value_214 = variable[12];
+ /* ./compiling//compiling_global.nit:358 */
+ CALL_compiling_base___CompilerVisitor___unindent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:359 */
+ if (!once_value_9) {
+ fra.me.REG[5] = BOX_NativeString("};");
+ REGB2 = TAG_Int(2);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_9 = fra.me.REG[5];
+ register_static_object(&once_value_9);
+ } else fra.me.REG[5] = once_value_9;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:360 */
+ fra.me.REG[3] = CALL_table_computation___CompiledClass___instance_table(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./../lib/standard//collection//array.nit:231 */
+ fra.me.REG[5] = fra.me.REG[3];
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB2 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[5])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[5]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[5]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[5])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
}
- /* Register variable[12]: Result */
- CALL_compiling_methods___CompilerVisitor___add_assignment( variable[1] /*v*/)( variable[1] /*v*/, variable[11] /*self_var_cname*/, variable[12]) /*CompilerVisitor::add_assignment*/;
- /* Register variable[12]: Result */
- variable[12] = CALL_abstractmetamodel___MMLocalClass___global_properties(variable[0])(variable[0]) /*MMLocalClass::global_properties*/;
- /* Register variable[12]: For iterator */
- variable[12] = CALL_abstract_collection___Collection___iterator(variable[12])(variable[12]) /*Collection::iterator*/;
- while (true) { /*for*/
- /* Register variable[13]: For 'is_ok' result */
- variable[13] = CALL_abstract_collection___Iterator___is_ok(variable[12])(variable[12]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[13])) break; /*for*/
- variable[13] = CALL_abstract_collection___Iterator___item(variable[12])(variable[12]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[14]: Local variable */
- variable[14] = variable[13];
- /* Register variable[15]: Local variable */
- /* Register variable[16]: Result */
- variable[16] = CALL_abstractmetamodel___MMLocalClass_____bra(variable[0])(variable[0], variable[14] /*g*/) /*MMLocalClass::[]*/;
- variable[15] = variable[16];
- /* Register variable[16]: Local variable */
- /* Register variable[17]: Result */
- variable[17] = CALL_static_type___MMLocalProperty___signature( variable[15] /*p*/)( variable[15] /*p*/) /*MMLocalProperty::signature*/;
- /* Register variable[17]: Result */
- variable[17] = CALL_static_type___MMSignature___return_type(variable[17])(variable[17]) /*MMSignature::return_type*/;
- variable[16] = variable[17];
- /* Register variable[17]: Result */
- variable[17] = TAG_Bool(( variable[15] /*p*/==NIT_NULL) || VAL_ISA( variable[15] /*p*/, COLOR_MMAttribute, ID_MMAttribute)) /*cast MMAttribute*/;
- /* Ensure var variable[17]: Left 'and' operand*/
- if (UNTAG_Bool(variable[17])) { /* and */
- /* Register variable[17]: Result */
- variable[17] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[16] /*t*/ == NIT_NULL /*null*/) || (( variable[16] /*t*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[16] /*t*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[16] /*t*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[16] /*t*/)( variable[16] /*t*/, NIT_NULL /*null*/) /*Object::==*/)))))));
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[5]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB0 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB0));
+ /* ./../lib/standard//collection//array.nit:237 */
+ if (UNTAG_Bool(REGB0)) {
+ /* ./../lib/standard//collection//array.nit:238 */
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
}
- /* Register variable[17]: Result */
- if (UNTAG_Bool(variable[17])) { /*if*/
- /* Register variable[17]: Result */
- variable[17] = TAG_Bool(( variable[15] /*p*/==NIT_NULL) || VAL_ISA( variable[15] /*p*/, COLOR_MMSrcAttribute, ID_MMSrcAttribute)) /*cast MMSrcAttribute*/;
- if (!UNTAG_Bool(variable[17])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_compiling_global___MMLocalClass___compile_tables_to_c, LOCATE_compiling_global, 891); nit_exit(1);}
- /* Register variable[17]: Local variable */
- /* Register variable[18]: Result */
- variable[18] = CALL_syntax_base___MMLocalProperty___node( variable[15] /*p*/)( variable[15] /*p*/) /*MMSrcAttribute::node*/;
- variable[17] = variable[18];
- /* Register variable[18]: Result */
- variable[18] = TAG_Bool(( variable[17] /*np*/==NIT_NULL) || VAL_ISA( variable[17] /*np*/, COLOR_AAttrPropdef, ID_AAttrPropdef)) /*cast AAttrPropdef*/;
- if (!UNTAG_Bool(variable[18])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_compiling_global___MMLocalClass___compile_tables_to_c, LOCATE_compiling_global, 893); nit_exit(1);}
- /* Register variable[18]: Local variable */
- /* Register variable[19]: Result */
- variable[19] = CALL_parser_nodes___AAttrPropdef___n_expr( variable[17] /*np*/)( variable[17] /*np*/) /*AAttrPropdef::n_expr*/;
- variable[18] = variable[19];
- /* Register variable[19]: Result */
- variable[19] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[18] /*ne*/ == NIT_NULL /*null*/) || (( variable[18] /*ne*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[18] /*ne*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[18] /*ne*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[18] /*ne*/)( variable[18] /*ne*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable[19])) { /*if*/
- /* Register variable[19]: Local variable */
- /* Register variable[20]: Result */
- variable[20] = CALL_compiling_methods___PExpr___compile_expr( variable[18] /*ne*/)( variable[18] /*ne*/, variable[1] /*v*/) /*PExpr::compile_expr*/;
- variable[19] = variable[20];
- variable[20] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[21]: Once String constant */
- if (once_value_216 != NIT_NULL) variable[21] = once_value_216;
- else {
- variable[21] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_216 = variable[21];
- }
- /* Register variable[21]: Result */
- /* Ensure var variable[21]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[20])(variable[20], variable[21]) /*AbstractArray::add*/;
- /* Register variable[21]: Result */
- variable[21] = CALL_abstractmetamodel___MMLocalProperty___global( variable[15] /*p*/)( variable[15] /*p*/) /*MMLocalProperty::global*/;
- /* Register variable[21]: Result */
- variable[21] = CALL_compiling_base___MMGlobalProperty___attr_access(variable[21])(variable[21]) /*MMGlobalProperty::attr_access*/;
- /* Ensure var variable[21]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[20])(variable[20], variable[21]) /*AbstractArray::add*/;
- /* Register variable[21]: Once String constant */
- if (once_value_217 != NIT_NULL) variable[21] = once_value_217;
- else {
- variable[21] = NEW_String_string___String___with_native(BOX_NativeString("(obj) = "), TAG_Int(8)) /*new String*/;
- once_value_217 = variable[21];
- }
- /* Register variable[21]: Result */
- /* Ensure var variable[21]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[20])(variable[20], variable[21]) /*AbstractArray::add*/;
- variable[21] = variable[19] /*e*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[20])(variable[20], variable[21]) /*AbstractArray::add*/;
- /* Register variable[21]: Once String constant */
- if (once_value_218 != NIT_NULL) variable[21] = once_value_218;
- else {
- variable[21] = NEW_String_string___String___with_native(BOX_NativeString(";"), TAG_Int(1)) /*new String*/;
- once_value_218 = variable[21];
- }
- /* Register variable[21]: Result */
- /* Ensure var variable[21]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[20])(variable[20], variable[21]) /*AbstractArray::add*/;
- /* Register variable[20]: Result */
- variable[20] = CALL_string___Object___to_s(variable[20])(variable[20]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[20]) /*CompilerVisitor::add_instr*/;
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB2)];
+ /* ./compiling//compiling_global.nit:362 */
+ REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], NIT_NULL);
+ REGB0 = REGB1;
}
}
- continue_215: while(0);
- CALL_abstract_collection___Iterator___next(variable[12])(variable[12]) /*Iterator::next*/;
- }
- break_215: while(0);
- /* Register variable[12]: Once String constant */
- if (once_value_219 != NIT_NULL) variable[12] = once_value_219;
- else {
- variable[12] = NEW_String_string___String___with_native(BOX_NativeString("return OBJ2VAL(obj);"), TAG_Int(20)) /*new String*/;
- once_value_219 = variable[12];
- }
- /* Register variable[12]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[12]) /*CompilerVisitor::add_instr*/;
- /* Register variable[12]: Result */
- variable[12] = CALL_compiling_methods___CompilerVisitor___cfc( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::cfc*/;
- CALL_compiling_methods___CFunctionContext___generate_var_decls(variable[12])(variable[12]) /*CFunctionContext::generate_var_decls*/;
- /* Register variable[12]: Result */
- variable[12] = CALL_compiling_base___CompilerVisitor___ctx( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::ctx*/;
- CALL_compiling_base___CContext___append( variable[9] /*ctx_old*/)( variable[9] /*ctx_old*/, variable[12]) /*CContext::append*/;
- CALL_compiling_base___CompilerVisitor___ctx__eq( variable[1] /*v*/)( variable[1] /*v*/, variable[9] /*ctx_old*/) /*CompilerVisitor::ctx=*/;
- CALL_compiling_base___CompilerVisitor___unindent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::unindent*/;
- /* Register variable[12]: Once String constant */
- if (once_value_220 != NIT_NULL) variable[12] = once_value_220;
- else {
- variable[12] = NEW_String_string___String___with_native(BOX_NativeString("}"), TAG_Int(1)) /*new String*/;
- once_value_220 = variable[12];
- }
- /* Register variable[12]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[12]) /*CompilerVisitor::add_instr*/;
- /* Register variable[12]: Local variable */
- variable[13] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[14]: Once String constant */
- if (once_value_221 != NIT_NULL) variable[14] = once_value_221;
- else {
- variable[14] = NEW_String_string___String___with_native(BOX_NativeString("void CHECKNEW_"), TAG_Int(14)) /*new String*/;
- once_value_221 = variable[14];
- }
- /* Register variable[14]: Result */
- /* Ensure var variable[14]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[13])(variable[13], variable[14]) /*AbstractArray::add*/;
- /* Register variable[14]: Result */
- variable[14] = CALL_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
- /* Ensure var variable[14]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[13])(variable[13], CALL_string___Object___to_s(variable[14])(variable[14]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[14]: Once String constant */
- if (once_value_222 != NIT_NULL) variable[14] = once_value_222;
- else {
- variable[14] = NEW_String_string___String___with_native(BOX_NativeString("(val_t self, char *from)"), TAG_Int(24)) /*new String*/;
- once_value_222 = variable[14];
+ if (UNTAG_Bool(REGB0)) {
+ /* ./compiling//compiling_global.nit:363 */
+ if (!once_value_10) {
+ fra.me.REG[7] = BOX_NativeString("/* Instance Hole :( */");
+ REGB0 = TAG_Int(22);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB0);
+ once_value_10 = fra.me.REG[7];
+ register_static_object(&once_value_10);
+ } else fra.me.REG[7] = once_value_10;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ } else {
+ /* ./compiling//compiling_global.nit:365 */
+ REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 365);
+ }
+ fra.me.REG[4] = CALL_compiling_global___TableElt___compile_to_c(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1], fra.me.REG[0]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ }
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB0 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB0 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB2 = REGB0;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label11;
}
- /* Register variable[14]: Result */
- /* Ensure var variable[14]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[13])(variable[13], variable[14]) /*AbstractArray::add*/;
- /* Register variable[13]: Result */
- variable[13] = CALL_string___Object___to_s(variable[13])(variable[13]) /*Object::to_s*/;
- variable[12] = variable[13];
- /* Register variable[13]: Once String constant */
- if (once_value_223 != NIT_NULL) variable[13] = once_value_223;
- else {
- variable[13] = NEW_String_string___String___with_native(BOX_NativeString(" {"), TAG_Int(2)) /*new String*/;
- once_value_223 = variable[13];
+ }
+ label11: while(0);
+ /* ./compiling//compiling_global.nit:369 */
+ fra.me.REG[2] = CALL_primitive_info___MMLocalClass___primitive_info(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./compiling//compiling_global.nit:370 */
+ fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ if (!once_value_12) {
+ fra.me.REG[4] = BOX_NativeString("NativeArray");
+ REGB2 = TAG_Int(11);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB2);
+ 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];
+ fra.me.REG[4] = CALL_symbol___String___to_symbol(fra.me.REG[4])(fra.me.REG[4]);
+ REGB2 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[5],fra.me.REG[4]));
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ REGB0 = CALL_kernel___Object_____eqeq(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[4]);
+ REGB2 = REGB0;
+ }
+ if (UNTAG_Bool(REGB2)) {
+ /* ./compiling//compiling_global.nit:371 */
+ if (!once_value_13) {
+ fra.me.REG[4] = BOX_NativeString("val_t NEW_NativeArray(size_t length, size_t size) {");
+ REGB2 = TAG_Int(51);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB2);
+ once_value_13 = fra.me.REG[4];
+ register_static_object(&once_value_13);
+ } else fra.me.REG[4] = once_value_13;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:372 */
+ CALL_compiling_base___CompilerVisitor___indent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:373 */
+ if (!once_value_14) {
+ fra.me.REG[4] = BOX_NativeString("Nit_NativeArray array;");
+ REGB2 = TAG_Int(22);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB2);
+ once_value_14 = fra.me.REG[4];
+ register_static_object(&once_value_14);
+ } else fra.me.REG[4] = once_value_14;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:374 */
+ if (!once_value_15) {
+ fra.me.REG[4] = BOX_NativeString("array = (Nit_NativeArray)alloc(sizeof(struct Nit_NativeArray) + ((length - 1) * size));");
+ REGB2 = TAG_Int(87);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB2);
+ 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];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:375 */
+ REGB2 = TAG_Int(3);
+ fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_16) {
+ fra.me.REG[5] = BOX_NativeString("array->vft = (classtable_elt_t*)VFT_");
+ REGB2 = TAG_Int(36);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_16 = fra.me.REG[5];
+ register_static_object(&once_value_16);
+ } else fra.me.REG[5] = once_value_16;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ if (!once_value_17) {
+ fra.me.REG[5] = BOX_NativeString(";");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_17 = fra.me.REG[5];
+ register_static_object(&once_value_17);
+ } else fra.me.REG[5] = once_value_17;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:376 */
+ if (!once_value_18) {
+ fra.me.REG[4] = BOX_NativeString("array->object_id = object_id_counter;");
+ REGB2 = TAG_Int(37);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB2);
+ once_value_18 = fra.me.REG[4];
+ register_static_object(&once_value_18);
+ } else fra.me.REG[4] = once_value_18;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:377 */
+ if (!once_value_19) {
+ fra.me.REG[4] = BOX_NativeString("object_id_counter = object_id_counter + 1;");
+ REGB2 = TAG_Int(42);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB2);
+ once_value_19 = fra.me.REG[4];
+ register_static_object(&once_value_19);
+ } else fra.me.REG[4] = once_value_19;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:378 */
+ if (!once_value_20) {
+ fra.me.REG[4] = BOX_NativeString("array->size = length;");
+ REGB2 = TAG_Int(21);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB2);
+ once_value_20 = fra.me.REG[4];
+ register_static_object(&once_value_20);
+ } else fra.me.REG[4] = once_value_20;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:379 */
+ if (!once_value_21) {
+ fra.me.REG[4] = BOX_NativeString("return OBJ2VAL(array);");
+ REGB2 = TAG_Int(22);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB2);
+ once_value_21 = fra.me.REG[4];
+ register_static_object(&once_value_21);
+ } else fra.me.REG[4] = once_value_21;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:380 */
+ CALL_compiling_base___CompilerVisitor___unindent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:381 */
+ if (!once_value_22) {
+ fra.me.REG[4] = BOX_NativeString("}");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB2);
+ once_value_22 = fra.me.REG[4];
+ register_static_object(&once_value_22);
+ } else fra.me.REG[4] = once_value_22;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ } else {
+ /* ./compiling//compiling_global.nit:382 */
+ REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(false);
+ REGB2 = REGB0;
+ } else {
+ REGB0 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
+ REGB2 = REGB0;
+ }
}
- /* Register variable[13]: Result */
- /* Register variable[13]: Result */
- variable[13] = CALL_string___String_____plus( variable[12] /*s*/)( variable[12] /*s*/, variable[13]) /*String::+*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[13]) /*CompilerVisitor::add_instr*/;
- CALL_compiling_base___CompilerVisitor___indent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::indent*/;
- /* Register variable[13]: Local variable */
- /* Register variable[14]: Result */
- variable[14] = CALL_compiling_base___CompilerVisitor___ctx( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::ctx*/;
- variable[13] = variable[14];
- /* Register variable[14]: Result */
- variable[14] = NEW_CContext_compiling_base___CContext___init() /*new CContext*/;
- CALL_compiling_base___CompilerVisitor___ctx__eq( variable[1] /*v*/)( variable[1] /*v*/, variable[14]) /*CompilerVisitor::ctx=*/;
- /* Register variable[14]: Result */
- variable[14] = CALL_abstractmetamodel___MMLocalClass___global_properties(variable[0])(variable[0]) /*MMLocalClass::global_properties*/;
- /* Register variable[14]: For iterator */
- variable[14] = CALL_abstract_collection___Collection___iterator(variable[14])(variable[14]) /*Collection::iterator*/;
- while (true) { /*for*/
- /* Register variable[15]: For 'is_ok' result */
- variable[15] = CALL_abstract_collection___Iterator___is_ok(variable[14])(variable[14]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[15])) break; /*for*/
- variable[15] = CALL_abstract_collection___Iterator___item(variable[14])(variable[14]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[16]: Local variable */
- variable[16] = variable[15];
- /* Register variable[17]: Local variable */
- /* Register variable[18]: Result */
- variable[18] = CALL_abstractmetamodel___MMLocalClass_____bra(variable[0])(variable[0], variable[16] /*g*/) /*MMLocalClass::[]*/;
- variable[17] = variable[18];
- /* Register variable[18]: Local variable */
- /* Register variable[19]: Result */
- variable[19] = CALL_static_type___MMLocalProperty___signature( variable[17] /*p*/)( variable[17] /*p*/) /*MMLocalProperty::signature*/;
- /* Register variable[19]: Result */
- variable[19] = CALL_static_type___MMSignature___return_type(variable[19])(variable[19]) /*MMSignature::return_type*/;
- variable[18] = variable[19];
- /* Register variable[19]: Result */
- variable[19] = TAG_Bool(( variable[17] /*p*/==NIT_NULL) || VAL_ISA( variable[17] /*p*/, COLOR_MMAttribute, ID_MMAttribute)) /*cast MMAttribute*/;
- /* Ensure var variable[19]: Left 'and' operand*/
- if (UNTAG_Bool(variable[19])) { /* and */
- /* Register variable[19]: Result */
- variable[19] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[18] /*t*/ == NIT_NULL /*null*/) || (( variable[18] /*t*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[18] /*t*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[18] /*t*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[18] /*t*/)( variable[18] /*t*/, NIT_NULL /*null*/) /*Object::==*/)))))));
+ if (UNTAG_Bool(REGB2)) {
+ /* ./compiling//compiling_global.nit:385 */
+ REGB2 = TAG_Int(3);
+ fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_23) {
+ fra.me.REG[5] = BOX_NativeString("INIT_ATTRIBUTES__");
+ REGB2 = TAG_Int(17);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_23 = fra.me.REG[5];
+ register_static_object(&once_value_23);
+ } else fra.me.REG[5] = once_value_23;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ if (!once_value_24) {
+ fra.me.REG[5] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_24 = fra.me.REG[5];
+ register_static_object(&once_value_24);
+ } else fra.me.REG[5] = once_value_24;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:386 */
+ fra.me.REG[5] = CALL_program___MMLocalClass___init_var_iroutine(fra.me.REG[0])(fra.me.REG[0]);
+ REGB2 = TAG_Int(3);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_25) {
+ fra.me.REG[6] = BOX_NativeString("init var of ");
+ REGB2 = TAG_Int(12);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
+ 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_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[6]);
+ fra.me.REG[6] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[6]);
+ if (!once_value_26) {
+ fra.me.REG[6] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
+ 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_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[6]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ REGB2 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 386);
}
- /* Register variable[19]: Result */
- /* Ensure var variable[19]: Left 'and' operand*/
- if (UNTAG_Bool(variable[19])) { /* and */
- /* Register variable[19]: Result */
- variable[19] = CALL_static_type___MMType___is_nullable( variable[18] /*t*/)( variable[18] /*t*/) /*MMType::is_nullable*/;
- variable[19] = TAG_Bool(!UNTAG_Bool(variable[19]));
+ fra.me.REG[7] = CALL_compiling_icode___IRoutine___compile_signature_to_c(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[1], fra.me.REG[4], fra.me.REG[7], NIT_NULL, NIT_NULL);
+ /* ./compiling//compiling_global.nit:387 */
+ fra.me.REG[5] = CALL_compiling_base___CompilerVisitor___decl_writer(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:388 */
+ fra.me.REG[6] = CALL_compiling_base___CompilerVisitor___writer(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[6] = CALL_compiling_writer___Writer___sub(fra.me.REG[6])(fra.me.REG[6]);
+ CALL_compiling_base___CompilerVisitor___decl_writer__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[6]);
+ /* ./compiling//compiling_global.nit:389 */
+ fra.me.REG[6] = CALL_program___MMLocalClass___init_var_iroutine(fra.me.REG[0])(fra.me.REG[0]);
+ REGB2 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 389);
}
- /* Register variable[19]: Result */
- /* Ensure var variable[19]: Left 'and' operand*/
- if (UNTAG_Bool(variable[19])) { /* and */
- /* Register variable[19]: Result */
- variable[19] = CALL_compiling_base___CompilerVisitor___tc( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::tc*/;
- /* Register variable[19]: Result */
- variable[19] = CALL_mmloader___ToolContext___opt_warn(variable[19])(variable[19]) /*ToolContext::opt_warn*/;
- /* Register variable[19]: Result */
- variable[19] = CALL_opts___Option___value(variable[19])(variable[19]) /*Option::value*/;
- /* Register variable[19]: Result */
- variable[19] = TAG_Bool(UNTAG_Int(variable[19])>UNTAG_Int( TAG_Int(0)));
+ CALL_compiling_icode___IRoutine___compile_to_c(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[1], fra.me.REG[4], fra.me.REG[7]);
+ /* ./compiling//compiling_global.nit:390 */
+ CALL_compiling_base___CompilerVisitor___decl_writer__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:391 */
+ CALL_compiling_base___CompilerVisitor___unindent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:392 */
+ if (!once_value_27) {
+ fra.me.REG[5] = BOX_NativeString("}");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_27 = fra.me.REG[5];
+ register_static_object(&once_value_27);
+ } else fra.me.REG[5] = once_value_27;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:396 */
+ REGB2 = TAG_Int(3);
+ fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_28) {
+ fra.me.REG[7] = BOX_NativeString("val_t NEW_");
+ REGB2 = TAG_Int(10);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ 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_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[7]);
+ fra.me.REG[7] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[7]);
+ if (!once_value_29) {
+ fra.me.REG[7] = BOX_NativeString("(void);");
+ REGB2 = TAG_Int(7);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_29 = fra.me.REG[7];
+ register_static_object(&once_value_29);
+ } else fra.me.REG[7] = once_value_29;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[7]);
+ fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:397 */
+ REGB2 = TAG_Int(3);
+ fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_30) {
+ fra.me.REG[7] = BOX_NativeString("val_t NEW_");
+ REGB2 = TAG_Int(10);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_30 = fra.me.REG[7];
+ register_static_object(&once_value_30);
+ } else fra.me.REG[7] = once_value_30;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[7]);
+ fra.me.REG[7] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[7]);
+ if (!once_value_31) {
+ fra.me.REG[7] = BOX_NativeString("(void)");
+ REGB2 = TAG_Int(6);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_31 = fra.me.REG[7];
+ register_static_object(&once_value_31);
+ } else fra.me.REG[7] = once_value_31;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[7]);
+ fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:398 */
+ if (!once_value_32) {
+ fra.me.REG[5] = BOX_NativeString("{");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_32 = fra.me.REG[5];
+ register_static_object(&once_value_32);
+ } else fra.me.REG[5] = once_value_32;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:399 */
+ CALL_compiling_base___CompilerVisitor___indent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:400 */
+ if (!once_value_33) {
+ fra.me.REG[5] = BOX_NativeString("obj_t obj;");
+ REGB2 = TAG_Int(10);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_33 = fra.me.REG[5];
+ register_static_object(&once_value_33);
+ } else fra.me.REG[5] = once_value_33;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:401 */
+ REGB2 = TAG_Int(3);
+ fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_34) {
+ fra.me.REG[7] = BOX_NativeString("obj = alloc(sizeof(val_t) * ");
+ REGB2 = TAG_Int(28);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_34 = fra.me.REG[7];
+ register_static_object(&once_value_34);
+ } else fra.me.REG[7] = once_value_34;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[7]);
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
}
- /* Register variable[19]: Result */
- if (UNTAG_Bool(variable[19])) { /*if*/
- variable[19] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[20]: Once String constant */
- if (once_value_225 != NIT_NULL) variable[20] = once_value_225;
- else {
- variable[20] = NEW_String_string___String___with_native(BOX_NativeString("if ("), TAG_Int(4)) /*new String*/;
- once_value_225 = variable[20];
- }
- /* Register variable[20]: Result */
- /* Ensure var variable[20]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[19])(variable[19], variable[20]) /*AbstractArray::add*/;
- /* Register variable[20]: Result */
- variable[20] = CALL_abstractmetamodel___MMLocalProperty___global( variable[17] /*p*/)( variable[17] /*p*/) /*MMLocalProperty::global*/;
- /* Register variable[20]: Result */
- variable[20] = CALL_compiling_base___MMGlobalProperty___attr_access(variable[20])(variable[20]) /*MMGlobalProperty::attr_access*/;
- /* Ensure var variable[20]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[19])(variable[19], variable[20]) /*AbstractArray::add*/;
- /* Register variable[20]: Once String constant */
- if (once_value_226 != NIT_NULL) variable[20] = once_value_226;
- else {
- variable[20] = NEW_String_string___String___with_native(BOX_NativeString("(self) == NIT_NULL) fprintf(stderr, \"Uninitialized attribute %s at %s.\\n\", \""), TAG_Int(76)) /*new String*/;
- once_value_226 = variable[20];
- }
- /* Register variable[20]: Result */
- /* Ensure var variable[20]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[19])(variable[19], variable[20]) /*AbstractArray::add*/;
- /* Register variable[20]: Result */
- variable[20] = CALL_abstractmetamodel___MMLocalProperty___full_name( variable[17] /*p*/)( variable[17] /*p*/) /*MMLocalProperty::full_name*/;
- /* Ensure var variable[20]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[19])(variable[19], variable[20]) /*AbstractArray::add*/;
- /* Register variable[20]: Once String constant */
- if (once_value_227 != NIT_NULL) variable[20] = once_value_227;
- else {
- variable[20] = NEW_String_string___String___with_native(BOX_NativeString("\", from);"), TAG_Int(9)) /*new String*/;
- once_value_227 = variable[20];
- }
- /* Register variable[20]: Result */
- /* Ensure var variable[20]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[19])(variable[19], variable[20]) /*AbstractArray::add*/;
- /* Register variable[19]: Result */
- variable[19] = CALL_string___Object___to_s(variable[19])(variable[19]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[19]) /*CompilerVisitor::add_instr*/;
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:401 */
+ fra.me.REG[3] = CALL_string___Object___to_s(REGB2)(REGB2);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[3]);
+ if (!once_value_35) {
+ fra.me.REG[3] = BOX_NativeString(");");
+ REGB2 = TAG_Int(2);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB2);
+ once_value_35 = fra.me.REG[3];
+ register_static_object(&once_value_35);
+ } else fra.me.REG[3] = once_value_35;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[3]);
+ fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:402 */
+ REGB2 = TAG_Int(3);
+ fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_36) {
+ fra.me.REG[3] = BOX_NativeString("obj->vft = (classtable_elt_t*)VFT_");
+ REGB2 = TAG_Int(34);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB2);
+ once_value_36 = fra.me.REG[3];
+ register_static_object(&once_value_36);
+ } else fra.me.REG[3] = once_value_36;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[3]);
+ if (!once_value_37) {
+ fra.me.REG[3] = BOX_NativeString(";");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB2);
+ once_value_37 = fra.me.REG[3];
+ register_static_object(&once_value_37);
+ } else fra.me.REG[3] = once_value_37;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[3]);
+ fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:403 */
+ if (!once_value_38) {
+ fra.me.REG[5] = BOX_NativeString("obj[1].object_id = object_id_counter;");
+ REGB2 = TAG_Int(37);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_38 = fra.me.REG[5];
+ register_static_object(&once_value_38);
+ } else fra.me.REG[5] = once_value_38;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:404 */
+ if (!once_value_39) {
+ fra.me.REG[5] = BOX_NativeString("object_id_counter = object_id_counter + 1;");
+ REGB2 = TAG_Int(42);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_39 = fra.me.REG[5];
+ register_static_object(&once_value_39);
+ } else fra.me.REG[5] = once_value_39;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:405 */
+ if (!once_value_40) {
+ fra.me.REG[5] = BOX_NativeString("return OBJ2VAL(obj);");
+ REGB2 = TAG_Int(20);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ 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_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:406 */
+ CALL_compiling_base___CompilerVisitor___unindent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:407 */
+ if (!once_value_41) {
+ fra.me.REG[5] = BOX_NativeString("}");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_41 = fra.me.REG[5];
+ register_static_object(&once_value_41);
+ } else fra.me.REG[5] = once_value_41;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:411 */
+ REGB2 = TAG_Int(3);
+ fra.me.REG[5] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_42) {
+ fra.me.REG[3] = BOX_NativeString("CHECKNEW_");
+ REGB2 = TAG_Int(9);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB2);
+ once_value_42 = fra.me.REG[3];
+ register_static_object(&once_value_42);
+ } else fra.me.REG[3] = once_value_42;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[3]);
+ if (!once_value_43) {
+ fra.me.REG[3] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB2);
+ once_value_43 = fra.me.REG[3];
+ register_static_object(&once_value_43);
+ } else fra.me.REG[3] = once_value_43;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[3]);
+ fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:412 */
+ fra.me.REG[3] = CALL_program___MMLocalClass___checknew_iroutine(fra.me.REG[0])(fra.me.REG[0]);
+ REGB2 = TAG_Int(3);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_44) {
+ fra.me.REG[4] = BOX_NativeString("check new ");
+ REGB2 = TAG_Int(10);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB2);
+ once_value_44 = fra.me.REG[4];
+ register_static_object(&once_value_44);
+ } else fra.me.REG[4] = once_value_44;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[4]);
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[4]);
+ if (!once_value_45) {
+ fra.me.REG[4] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB2);
+ once_value_45 = fra.me.REG[4];
+ register_static_object(&once_value_45);
+ } else fra.me.REG[4] = once_value_45;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[4]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ REGB2 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 412);
}
- continue_224: while(0);
- CALL_abstract_collection___Iterator___next(variable[14])(variable[14]) /*Iterator::next*/;
- }
- break_224: while(0);
- /* Register variable[14]: Result */
- variable[14] = CALL_compiling_base___CompilerVisitor___ctx( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::ctx*/;
- CALL_compiling_base___CContext___append( variable[13] /*ctx_old*/)( variable[13] /*ctx_old*/, variable[14]) /*CContext::append*/;
- CALL_compiling_base___CompilerVisitor___ctx__eq( variable[1] /*v*/)( variable[1] /*v*/, variable[13] /*ctx_old*/) /*CompilerVisitor::ctx=*/;
- CALL_compiling_base___CompilerVisitor___unindent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::unindent*/;
- /* Register variable[14]: Once String constant */
- if (once_value_228 != NIT_NULL) variable[14] = once_value_228;
- else {
- variable[14] = NEW_String_string___String___with_native(BOX_NativeString("}"), TAG_Int(1)) /*new String*/;
- once_value_228 = variable[14];
- }
- /* Register variable[14]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[14]) /*CompilerVisitor::add_instr*/;
- /* Register variable[14]: Local variable */
- /* Register variable[15]: Result */
- variable[15] = CALL_abstractmetamodel___MMLocalClass___cshe(variable[0])(variable[0]) /*MMLocalClass::cshe*/;
- /* Register variable[15]: Result */
- variable[15] = CALL_partial_order___PartialOrderElement___greaters(variable[15])(variable[15]) /*PartialOrderElement::greaters*/;
- /* Register variable[15]: Result */
- variable[15] = CALL_abstract_collection___Collection___length(variable[15])(variable[15]) /*Collection::length*/;
- /* Register variable[15]: Result */
- variable[15] = TAG_Int(UNTAG_Int(variable[15])+UNTAG_Int( TAG_Int(1)));
- variable[14] = variable[15];
- /* Register variable[15]: Local variable */
- variable[16] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[17]: Once String constant */
- if (once_value_229 != NIT_NULL) variable[17] = once_value_229;
- else {
- variable[17] = NEW_String_string___String___with_native(BOX_NativeString("int init_table["), TAG_Int(15)) /*new String*/;
- once_value_229 = variable[17];
- }
- /* Register variable[17]: Result */
- /* Ensure var variable[17]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[16])(variable[16], variable[17]) /*AbstractArray::add*/;
- variable[17] = variable[14] /*init_table_size*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[16])(variable[16], CALL_string___Object___to_s(variable[17])(variable[17]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[17]: Once String constant */
- if (once_value_230 != NIT_NULL) variable[17] = once_value_230;
- else {
- variable[17] = NEW_String_string___String___with_native(BOX_NativeString("] = {0"), TAG_Int(6)) /*new String*/;
- once_value_230 = variable[17];
- }
- /* Register variable[17]: Result */
- /* Ensure var variable[17]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[16])(variable[16], variable[17]) /*AbstractArray::add*/;
- /* Register variable[17]: Once String constant */
- if (once_value_231 != NIT_NULL) variable[17] = once_value_231;
- else {
- variable[17] = NEW_String_string___String___with_native(BOX_NativeString(", 0"), TAG_Int(3)) /*new String*/;
- once_value_231 = variable[17];
- }
- /* Register variable[17]: Result */
- /* Register variable[18]: Result */
- variable[18] = TAG_Int(UNTAG_Int( variable[14] /*init_table_size*/)-UNTAG_Int( TAG_Int(1)));
- /* Register variable[17]: Result */
- variable[17] = CALL_string___String_____star(variable[17])(variable[17], variable[18]) /*String::**/;
- /* Ensure var variable[17]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[16])(variable[16], variable[17]) /*AbstractArray::add*/;
- /* Register variable[17]: Once String constant */
- if (once_value_232 != NIT_NULL) variable[17] = once_value_232;
- else {
- variable[17] = NEW_String_string___String___with_native(BOX_NativeString("};"), TAG_Int(2)) /*new String*/;
- once_value_232 = variable[17];
- }
- /* Register variable[17]: Result */
- /* Ensure var variable[17]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[16])(variable[16], variable[17]) /*AbstractArray::add*/;
- /* Register variable[16]: Result */
- variable[16] = CALL_string___Object___to_s(variable[16])(variable[16]) /*Object::to_s*/;
- variable[15] = variable[16];
- /* Register variable[16]: Result */
- variable[16] = CALL_abstractmetamodel___MMLocalClass___global_properties(variable[0])(variable[0]) /*MMLocalClass::global_properties*/;
- /* Register variable[16]: For iterator */
- variable[16] = CALL_abstract_collection___Collection___iterator(variable[16])(variable[16]) /*Collection::iterator*/;
- while (true) { /*for*/
- /* Register variable[17]: For 'is_ok' result */
- variable[17] = CALL_abstract_collection___Iterator___is_ok(variable[16])(variable[16]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[17])) break; /*for*/
- variable[17] = CALL_abstract_collection___Iterator___item(variable[16])(variable[16]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[18]: Local variable */
- variable[18] = variable[17];
- /* Register variable[19]: Local variable */
- /* Register variable[20]: Result */
- variable[20] = CALL_abstractmetamodel___MMLocalClass_____bra(variable[0])(variable[0], variable[18] /*g*/) /*MMLocalClass::[]*/;
- variable[19] = variable[20];
- /* Register variable[20]: Result */
- variable[20] = CALL_abstractmetamodel___MMLocalProperty___global( variable[19] /*p*/)( variable[19] /*p*/) /*MMLocalProperty::global*/;
- /* Register variable[20]: Result */
- variable[20] = CALL_abstractmetamodel___MMGlobalProperty___is_init_for(variable[20])(variable[20], variable[0]) /*MMGlobalProperty::is_init_for*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[20])))) { /*if*/
- goto continue_233;
+ fra.me.REG[7] = CALL_compiling_icode___IRoutine___compile_signature_to_c(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1], fra.me.REG[5], fra.me.REG[7], NIT_NULL, NIT_NULL);
+ /* ./compiling//compiling_global.nit:413 */
+ fra.me.REG[3] = CALL_compiling_base___CompilerVisitor___decl_writer(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:414 */
+ fra.me.REG[4] = CALL_compiling_base___CompilerVisitor___writer(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[4] = CALL_compiling_writer___Writer___sub(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_compiling_base___CompilerVisitor___decl_writer__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:415 */
+ fra.me.REG[4] = CALL_program___MMLocalClass___checknew_iroutine(fra.me.REG[0])(fra.me.REG[0]);
+ REGB2 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 415);
}
- /* Register variable[20]: Local variable */
- /* Register variable[21]: Result */
- variable[21] = NEW_Array_array___Array___init() /*new Array[String]*/;
- variable[20] = variable[21];
- /* Register variable[21]: Local variable */
- variable[22] = NEW_Array_array___Array___with_capacity(TAG_Int(1)) /*new Array[String]*/ /* Ensure var: Literal array*/;
- /* Register variable[23]: Once String constant */
- if (once_value_234 != NIT_NULL) variable[23] = once_value_234;
- else {
- variable[23] = NEW_String_string___String___with_native(BOX_NativeString("self"), TAG_Int(4)) /*new String*/;
- once_value_234 = variable[23];
+ CALL_compiling_icode___IRoutine___compile_to_c(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1], fra.me.REG[5], fra.me.REG[7]);
+ /* ./compiling//compiling_global.nit:416 */
+ CALL_compiling_base___CompilerVisitor___decl_writer__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:417 */
+ CALL_compiling_base___CompilerVisitor___unindent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:418 */
+ if (!once_value_46) {
+ fra.me.REG[3] = BOX_NativeString("}");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB2);
+ once_value_46 = fra.me.REG[3];
+ register_static_object(&once_value_46);
+ } else fra.me.REG[3] = once_value_46;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:421 */
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___cshe(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_partial_order___PartialOrderElement___greaters(fra.me.REG[3])(fra.me.REG[3]);
+ REGB2 = CALL_abstract_collection___Collection___length(fra.me.REG[3])(fra.me.REG[3]);
+ REGB0 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB0 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
+ /* ./compiling//compiling_global.nit:422 */
+ REGB2 = TAG_Int(5);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_47) {
+ fra.me.REG[7] = BOX_NativeString("int init_table[");
+ REGB2 = TAG_Int(15);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_47 = fra.me.REG[7];
+ register_static_object(&once_value_47);
+ } else fra.me.REG[7] = once_value_47;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[7]);
+ fra.me.REG[7] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[7]);
+ if (!once_value_48) {
+ fra.me.REG[7] = BOX_NativeString("] = {0");
+ REGB2 = TAG_Int(6);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_48 = fra.me.REG[7];
+ register_static_object(&once_value_48);
+ } else fra.me.REG[7] = once_value_48;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[7]);
+ if (!once_value_49) {
+ fra.me.REG[7] = BOX_NativeString(", 0");
+ REGB2 = TAG_Int(3);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_49 = fra.me.REG[7];
+ register_static_object(&once_value_49);
+ } else fra.me.REG[7] = once_value_49;
+ fra.me.REG[7] = fra.me.REG[7];
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:217 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
+ /* ./compiling//compiling_global.nit:422 */
+ fra.me.REG[7] = CALL_string___String_____star(fra.me.REG[7])(fra.me.REG[7], REGB2);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[7]);
+ if (!once_value_50) {
+ fra.me.REG[7] = BOX_NativeString("};");
+ REGB2 = TAG_Int(2);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_50 = fra.me.REG[7];
+ register_static_object(&once_value_50);
+ } else fra.me.REG[7] = once_value_50;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[7]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:424 */
+ fra.me.REG[7] = CALL_abstractmetamodel___MMLocalClass___global_properties(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[7])(fra.me.REG[7], (&(fra.me)), ((fun_t)OC_compiling_global___MMLocalClass___compile_tables_to_c_51));
+ } else {
+ /* ./compiling//compiling_global.nit:441 */
+ REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 441);
}
- /* Register variable[23]: Result */
- CALL_abstract_collection___SimpleCollection___add(variable[22])(variable[22], variable[23]) /*AbstractArray::add*/;
- /* Register variable[22]: Result */
- variable[21] = variable[22];
- /* Register variable[22]: Result */
- variable[22] = CALL_static_type___MMLocalProperty___signature( variable[19] /*p*/)( variable[19] /*p*/) /*MMLocalProperty::signature*/;
- /* Register variable[22]: Result */
- variable[22] = CALL_static_type___MMSignature___arity(variable[22])(variable[22]) /*MMSignature::arity*/;
- /* Register variable[22]: Result */
- variable[22] = NEW_Range_range___Range___without_last( TAG_Int(0), variable[22]) /*new Range[Int]*/;
- /* Register variable[22]: For iterator */
- variable[22] = CALL_abstract_collection___Collection___iterator(variable[22])(variable[22]) /*Range::iterator*/;
- while (true) { /*for*/
- /* Register variable[23]: For 'is_ok' result */
- variable[23] = CALL_abstract_collection___Iterator___is_ok(variable[22])(variable[22]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[23])) break; /*for*/
- variable[23] = CALL_abstract_collection___Iterator___item(variable[22])(variable[22]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[24]: Local variable */
- variable[24] = variable[23];
- variable[25] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[26]: Once String constant */
- if (once_value_236 != NIT_NULL) variable[26] = once_value_236;
- else {
- variable[26] = NEW_String_string___String___with_native(BOX_NativeString("val_t p"), TAG_Int(7)) /*new String*/;
- once_value_236 = variable[26];
+ REGB2 = CALL_primitive_info___PrimitiveInfo___tagged(fra.me.REG[2])(fra.me.REG[2]);
+ REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
+ if (UNTAG_Bool(REGB2)) {
+ /* ./compiling//compiling_global.nit:442 */
+ REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 442);
}
- /* Register variable[26]: Result */
- /* Ensure var variable[26]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[25])(variable[25], variable[26]) /*AbstractArray::add*/;
- variable[26] = variable[24] /*i*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[25])(variable[25], CALL_string___Object___to_s(variable[26])(variable[26]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[26]: Once String constant */
- if (once_value_237 != NIT_NULL) variable[26] = once_value_237;
- else {
- variable[26] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_237 = variable[26];
+ fra.me.REG[2] = CALL_primitive_info___PrimitiveInfo___cname(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:443 */
+ REGB2 = TAG_Int(3);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_62) {
+ fra.me.REG[7] = BOX_NativeString("struct TBOX_");
+ REGB2 = TAG_Int(12);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_62 = fra.me.REG[7];
+ register_static_object(&once_value_62);
+ } else fra.me.REG[7] = once_value_62;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[7]);
+ fra.me.REG[7] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[7]);
+ if (!once_value_63) {
+ fra.me.REG[7] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_63 = fra.me.REG[7];
+ register_static_object(&once_value_63);
+ } else fra.me.REG[7] = once_value_63;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[7]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:444 */
+ REGB2 = TAG_Int(5);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_64) {
+ fra.me.REG[5] = BOX_NativeString("val_t BOX_");
+ REGB2 = TAG_Int(10);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_64 = fra.me.REG[5];
+ register_static_object(&once_value_64);
+ } else fra.me.REG[5] = once_value_64;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[5]);
+ fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[5]);
+ if (!once_value_65) {
+ fra.me.REG[5] = BOX_NativeString("(");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_65 = fra.me.REG[5];
+ register_static_object(&once_value_65);
+ } else fra.me.REG[5] = once_value_65;
+ fra.me.REG[5] = fra.me.REG[5];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[5]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]);
+ if (!once_value_66) {
+ fra.me.REG[2] = BOX_NativeString(" val) {");
+ REGB2 = TAG_Int(7);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
+ once_value_66 = fra.me.REG[2];
+ register_static_object(&once_value_66);
+ } else fra.me.REG[2] = once_value_66;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ /* ./compiling//compiling_global.nit:445 */
+ CALL_compiling_base___CompilerVisitor___indent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:446 */
+ REGB2 = TAG_Int(7);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_67) {
+ fra.me.REG[2] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
+ once_value_67 = fra.me.REG[2];
+ register_static_object(&once_value_67);
+ } else fra.me.REG[2] = once_value_67;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[3]);
+ if (!once_value_68) {
+ fra.me.REG[2] = BOX_NativeString(" *box = (");
+ REGB2 = TAG_Int(9);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
+ once_value_68 = fra.me.REG[2];
+ register_static_object(&once_value_68);
+ } else fra.me.REG[2] = once_value_68;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[3]);
+ if (!once_value_69) {
+ fra.me.REG[2] = BOX_NativeString("*)alloc(sizeof(");
+ REGB2 = TAG_Int(15);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
+ once_value_69 = fra.me.REG[2];
+ register_static_object(&once_value_69);
+ } else fra.me.REG[2] = once_value_69;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[3]);
+ if (!once_value_70) {
+ fra.me.REG[3] = BOX_NativeString("));");
+ REGB2 = TAG_Int(3);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB2);
+ once_value_70 = fra.me.REG[3];
+ register_static_object(&once_value_70);
+ } else fra.me.REG[3] = once_value_70;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[3]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ /* ./compiling//compiling_global.nit:447 */
+ REGB2 = TAG_Int(3);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_71) {
+ fra.me.REG[3] = BOX_NativeString("box->vft = VFT_");
+ REGB2 = TAG_Int(15);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB2);
+ once_value_71 = fra.me.REG[3];
+ register_static_object(&once_value_71);
+ } else fra.me.REG[3] = once_value_71;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[3]);
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[0]);
+ if (!once_value_72) {
+ fra.me.REG[0] = BOX_NativeString(";");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB2);
+ once_value_72 = fra.me.REG[0];
+ register_static_object(&once_value_72);
+ } else fra.me.REG[0] = once_value_72;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[0]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ /* ./compiling//compiling_global.nit:448 */
+ if (!once_value_73) {
+ fra.me.REG[7] = BOX_NativeString("box->val = val;");
+ REGB2 = TAG_Int(15);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_73 = fra.me.REG[7];
+ register_static_object(&once_value_73);
+ } else fra.me.REG[7] = once_value_73;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ /* ./compiling//compiling_global.nit:449 */
+ if (!once_value_74) {
+ fra.me.REG[7] = BOX_NativeString("box->object_id = object_id_counter;");
+ REGB2 = TAG_Int(35);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_74 = fra.me.REG[7];
+ register_static_object(&once_value_74);
+ } else fra.me.REG[7] = once_value_74;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ /* ./compiling//compiling_global.nit:450 */
+ if (!once_value_75) {
+ fra.me.REG[7] = BOX_NativeString("object_id_counter = object_id_counter + 1;");
+ REGB2 = TAG_Int(42);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_75 = fra.me.REG[7];
+ register_static_object(&once_value_75);
+ } else fra.me.REG[7] = once_value_75;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ /* ./compiling//compiling_global.nit:451 */
+ if (!once_value_76) {
+ fra.me.REG[7] = BOX_NativeString("return OBJ2VAL(box);");
+ REGB2 = TAG_Int(20);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_76 = fra.me.REG[7];
+ register_static_object(&once_value_76);
+ } else fra.me.REG[7] = once_value_76;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ /* ./compiling//compiling_global.nit:452 */
+ CALL_compiling_base___CompilerVisitor___unindent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:453 */
+ if (!once_value_77) {
+ fra.me.REG[7] = BOX_NativeString("}");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
+ once_value_77 = fra.me.REG[7];
+ register_static_object(&once_value_77);
+ } else fra.me.REG[7] = once_value_77;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ }
+ }
+ }
+ stack_frame_head = fra.me.prev;
+ return;
+}
+ void OC_compiling_global___MMLocalClass___compile_tables_to_c_51(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[4];} fra;
+ val_t REGB0;
+ fun_t CREG[1];
+ val_t tmp;
+ static val_t once_value_53; /* Once value */
+ static val_t once_value_54; /* Once value */
+ static val_t once_value_55; /* Once value */
+ static val_t once_value_56; /* Once value */
+ static val_t once_value_57; /* Once value */
+ static val_t once_value_58; /* Once value */
+ static val_t once_value_59; /* Once value */
+ static val_t once_value_60; /* Once value */
+ static val_t once_value_61; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 0;
+ fra.me.meth = LOCATE_compiling_global___MMLocalClass___compile_tables_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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.closure_ctx = closctx_param;
+ fra.me.closure_funs = CREG;
+ fra.me.REG[0] = p0;
+ CREG[0] = clos_fun0;
+ /* ./compiling//compiling_global.nit:425 */
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalClass_____bra(closctx->REG[0])(closctx->REG[0], fra.me.REG[0]);
+ /* ./compiling//compiling_global.nit:427 */
+ fra.me.REG[1] = CALL_abstractmetamodel___MMLocalProperty___global(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = CALL_abstractmetamodel___MMGlobalProperty___is_init_for(fra.me.REG[1])(fra.me.REG[1], closctx->REG[0]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ goto label52;
}
- /* Register variable[26]: Result */
- /* Ensure var variable[26]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[25])(variable[25], variable[26]) /*AbstractArray::add*/;
- /* Register variable[25]: Result */
- variable[25] = CALL_string___Object___to_s(variable[25])(variable[25]) /*Object::to_s*/;
- CALL_abstract_collection___SimpleCollection___add( variable[20] /*params*/)( variable[20] /*params*/, variable[25]) /*AbstractArray::add*/;
- variable[25] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[26]: Once String constant */
- if (once_value_238 != NIT_NULL) variable[26] = once_value_238;
- else {
- variable[26] = NEW_String_string___String___with_native(BOX_NativeString("p"), TAG_Int(1)) /*new String*/;
- once_value_238 = variable[26];
+ /* ./compiling//compiling_global.nit:428 */
+ REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[0], COLOR_MMMethod, ID_MMMethod)) /*cast MMMethod*/;
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_compiling_global, 428);
}
- /* Register variable[26]: Result */
- /* Ensure var variable[26]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[25])(variable[25], variable[26]) /*AbstractArray::add*/;
- variable[26] = variable[24] /*i*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[25])(variable[25], CALL_string___Object___to_s(variable[26])(variable[26]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[26]: Once String constant */
- if (once_value_239 != NIT_NULL) variable[26] = once_value_239;
- else {
- variable[26] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_239 = variable[26];
+ /* ./compiling//compiling_global.nit:430 */
+ REGB0 = TAG_Int(5);
+ fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_53) {
+ fra.me.REG[2] = BOX_NativeString("NEW_");
+ REGB0 = TAG_Int(4);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_53 = fra.me.REG[2];
+ register_static_object(&once_value_53);
+ } else fra.me.REG[2] = once_value_53;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ fra.me.REG[2] = CALL_string___Object___to_s(closctx->REG[0])(closctx->REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ if (!once_value_54) {
+ fra.me.REG[2] = BOX_NativeString("_");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_54 = fra.me.REG[2];
+ register_static_object(&once_value_54);
+ } else fra.me.REG[2] = once_value_54;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ fra.me.REG[2] = CALL_abstractmetamodel___MMLocalProperty___global(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[2] = CALL_compiling_base___MMLocalProperty___cname(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ if (!once_value_55) {
+ fra.me.REG[2] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_55 = fra.me.REG[2];
+ register_static_object(&once_value_55);
+ } else fra.me.REG[2] = once_value_55;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:431 */
+ fra.me.REG[2] = CALL_program___MMLocalClass___new_instance_iroutine(closctx->REG[0])(closctx->REG[0]);
+ fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]);
+ REGB0 = TAG_Int(5);
+ fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_56) {
+ fra.me.REG[4] = BOX_NativeString("new ");
+ REGB0 = TAG_Int(4);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
+ once_value_56 = fra.me.REG[4];
+ register_static_object(&once_value_56);
+ } else fra.me.REG[4] = once_value_56;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[4] = CALL_string___Object___to_s(closctx->REG[0])(closctx->REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ if (!once_value_57) {
+ fra.me.REG[4] = BOX_NativeString(" ");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
+ once_value_57 = fra.me.REG[4];
+ register_static_object(&once_value_57);
+ } else fra.me.REG[4] = once_value_57;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalProperty___full_name(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ if (!once_value_58) {
+ fra.me.REG[4] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB0);
+ once_value_58 = fra.me.REG[4];
+ register_static_object(&once_value_58);
+ } else fra.me.REG[4] = once_value_58;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_compiling_global, 431);
}
- /* Register variable[26]: Result */
- /* Ensure var variable[26]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[25])(variable[25], variable[26]) /*AbstractArray::add*/;
- /* Register variable[25]: Result */
- variable[25] = CALL_string___Object___to_s(variable[25])(variable[25]) /*Object::to_s*/;
- CALL_abstract_collection___SimpleCollection___add( variable[21] /*args*/)( variable[21] /*args*/, variable[25]) /*AbstractArray::add*/;
- continue_235: while(0);
- CALL_abstract_collection___Iterator___next(variable[22])(variable[22]) /*Iterator::next*/;
- }
- break_235: while(0);
- /* Register variable[22]: Once String constant */
- if (once_value_240 != NIT_NULL) variable[22] = once_value_240;
- else {
- variable[22] = NEW_String_string___String___with_native(BOX_NativeString("init_table"), TAG_Int(10)) /*new String*/;
- once_value_240 = variable[22];
- }
- /* Register variable[22]: Result */
- CALL_abstract_collection___SimpleCollection___add( variable[21] /*args*/)( variable[21] /*args*/, variable[22]) /*AbstractArray::add*/;
- /* Register variable[22]: Local variable */
- variable[23] = NEW_Array_array___Array___with_capacity(TAG_Int(7)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[24]: Once String constant */
- if (once_value_241 != NIT_NULL) variable[24] = once_value_241;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString("val_t NEW_"), TAG_Int(10)) /*new String*/;
- once_value_241 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Ensure var variable[0]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], CALL_string___Object___to_s(variable[0])(variable[0]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[24]: Once String constant */
- if (once_value_242 != NIT_NULL) variable[24] = once_value_242;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString("_"), TAG_Int(1)) /*new String*/;
- once_value_242 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[24]: Result */
- variable[24] = CALL_abstractmetamodel___MMLocalProperty___global( variable[19] /*p*/)( variable[19] /*p*/) /*MMLocalProperty::global*/;
- /* Register variable[24]: Result */
- variable[24] = CALL_abstractmetamodel___MMGlobalProperty___intro(variable[24])(variable[24]) /*MMGlobalProperty::intro*/;
- /* Register variable[24]: Result */
- variable[24] = CALL_compiling_base___MMLocalProperty___cname(variable[24])(variable[24]) /*MMLocalProperty::cname*/;
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[24]: Once String constant */
- if (once_value_243 != NIT_NULL) variable[24] = once_value_243;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString("("), TAG_Int(1)) /*new String*/;
- once_value_243 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[24]: Once String constant */
- if (once_value_244 != NIT_NULL) variable[24] = once_value_244;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)) /*new String*/;
- once_value_244 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Register variable[24]: Result */
- variable[24] = CALL_string___Collection___join( variable[20] /*params*/)( variable[20] /*params*/, variable[24]) /*Collection::join*/;
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[24]: Once String constant */
- if (once_value_245 != NIT_NULL) variable[24] = once_value_245;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString(") {"), TAG_Int(3)) /*new String*/;
- once_value_245 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[23]: Result */
- variable[23] = CALL_string___Object___to_s(variable[23])(variable[23]) /*Object::to_s*/;
- variable[22] = variable[23];
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[22] /*s*/) /*CompilerVisitor::add_instr*/;
- CALL_compiling_base___CompilerVisitor___indent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::indent*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[15] /*init_table_decl*/) /*CompilerVisitor::add_instr*/;
- variable[23] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[24]: Once String constant */
- if (once_value_246 != NIT_NULL) variable[24] = once_value_246;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString("val_t self = NEW_"), TAG_Int(17)) /*new String*/;
- once_value_246 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[24]: Result */
- variable[24] = CALL_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], CALL_string___Object___to_s(variable[24])(variable[24]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[24]: Once String constant */
- if (once_value_247 != NIT_NULL) variable[24] = once_value_247;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString("();"), TAG_Int(3)) /*new String*/;
- once_value_247 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[23]: Result */
- variable[23] = CALL_string___Object___to_s(variable[23])(variable[23]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[23]) /*CompilerVisitor::add_instr*/;
- variable[23] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[24]: Once String constant */
- if (once_value_248 != NIT_NULL) variable[24] = once_value_248;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_248 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[24]: Result */
- variable[24] = CALL_compiling_base___MMLocalProperty___cname( variable[19] /*p*/)( variable[19] /*p*/) /*MMLocalProperty::cname*/;
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[24]: Once String constant */
- if (once_value_249 != NIT_NULL) variable[24] = once_value_249;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString("("), TAG_Int(1)) /*new String*/;
- once_value_249 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[24]: Once String constant */
- if (once_value_250 != NIT_NULL) variable[24] = once_value_250;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)) /*new String*/;
- once_value_250 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Register variable[24]: Result */
- variable[24] = CALL_string___Collection___join( variable[21] /*args*/)( variable[21] /*args*/, variable[24]) /*Collection::join*/;
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[24]: Once String constant */
- if (once_value_251 != NIT_NULL) variable[24] = once_value_251;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString(");"), TAG_Int(2)) /*new String*/;
- once_value_251 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[23]: Result */
- variable[23] = CALL_string___Object___to_s(variable[23])(variable[23]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[23]) /*CompilerVisitor::add_instr*/;
- variable[23] = NEW_Array_array___Array___with_capacity(TAG_Int(7)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[24]: Once String constant */
- if (once_value_252 != NIT_NULL) variable[24] = once_value_252;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString("CHECKNEW_"), TAG_Int(9)) /*new String*/;
- once_value_252 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[24]: Result */
- variable[24] = CALL_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], CALL_string___Object___to_s(variable[24])(variable[24]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[24]: Once String constant */
- if (once_value_253 != NIT_NULL) variable[24] = once_value_253;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString("(self, \""), TAG_Int(8)) /*new String*/;
- once_value_253 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[24]: Result */
- variable[24] = CALL_abstractmetamodel___MMLocalProperty___full_name( variable[19] /*p*/)( variable[19] /*p*/) /*MMLocalProperty::full_name*/;
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[24]: Once String constant */
- if (once_value_254 != NIT_NULL) variable[24] = once_value_254;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString(" for "), TAG_Int(5)) /*new String*/;
- once_value_254 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Ensure var variable[0]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], CALL_string___Object___to_s(variable[0])(variable[0]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[24]: Once String constant */
- if (once_value_255 != NIT_NULL) variable[24] = once_value_255;
- else {
- variable[24] = NEW_String_string___String___with_native(BOX_NativeString("\");"), TAG_Int(3)) /*new String*/;
- once_value_255 = variable[24];
- }
- /* Register variable[24]: Result */
- /* Ensure var variable[24]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[23])(variable[23], variable[24]) /*AbstractArray::add*/;
- /* Register variable[23]: Result */
- variable[23] = CALL_string___Object___to_s(variable[23])(variable[23]) /*Object::to_s*/;
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[23]) /*CompilerVisitor::add_instr*/;
- /* Register variable[23]: Once String constant */
- if (once_value_256 != NIT_NULL) variable[23] = once_value_256;
- else {
- variable[23] = NEW_String_string___String___with_native(BOX_NativeString("return self;"), TAG_Int(12)) /*new String*/;
- once_value_256 = variable[23];
- }
- /* Register variable[23]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[23]) /*CompilerVisitor::add_instr*/;
- CALL_compiling_base___CompilerVisitor___unindent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::unindent*/;
- /* Register variable[23]: Once String constant */
- if (once_value_257 != NIT_NULL) variable[23] = once_value_257;
- else {
- variable[23] = NEW_String_string___String___with_native(BOX_NativeString("}"), TAG_Int(1)) /*new String*/;
- once_value_257 = variable[23];
+ fra.me.REG[3] = CALL_compiling_icode___IRoutine___compile_signature_to_c(fra.me.REG[2])(fra.me.REG[2], closctx->REG[1], fra.me.REG[1], fra.me.REG[3], NIT_NULL, NIT_NULL);
+ /* ./compiling//compiling_global.nit:432 */
+ fra.me.REG[2] = CALL_compiling_base___CompilerVisitor___decl_writer(closctx->REG[1])(closctx->REG[1]);
+ /* ./compiling//compiling_global.nit:433 */
+ fra.me.REG[4] = CALL_compiling_base___CompilerVisitor___writer(closctx->REG[1])(closctx->REG[1]);
+ fra.me.REG[4] = CALL_compiling_writer___Writer___sub(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_compiling_base___CompilerVisitor___decl_writer__eq(closctx->REG[1])(closctx->REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:434 */
+ CALL_compiling_base___CompilerVisitor___add_instr(closctx->REG[1])(closctx->REG[1], closctx->REG[3]);
+ /* ./compiling//compiling_global.nit:435 */
+ fra.me.REG[4] = CALL_program___MMLocalClass___new_instance_iroutine(closctx->REG[0])(closctx->REG[0]);
+ fra.me.REG[0] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[4])(fra.me.REG[4], 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_global, 435);
+ }
+ fra.me.REG[3] = CALL_compiling_icode___IRoutine___compile_to_c(fra.me.REG[0])(fra.me.REG[0], closctx->REG[1], fra.me.REG[1], fra.me.REG[3]);
+ REGB0 = TAG_Bool((fra.me.REG[3]!=NIT_NULL) && VAL_ISA(fra.me.REG[3], COLOR_String, ID_String)) /*cast String*/;
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_compiling_global, 435);
+ }
+ /* ./compiling//compiling_global.nit:436 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_59) {
+ fra.me.REG[0] = BOX_NativeString("return ");
+ REGB0 = TAG_Int(7);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_59 = fra.me.REG[0];
+ register_static_object(&once_value_59);
+ } else fra.me.REG[0] = once_value_59;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ if (!once_value_60) {
+ fra.me.REG[3] = BOX_NativeString(";");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_60 = fra.me.REG[3];
+ register_static_object(&once_value_60);
+ } else fra.me.REG[3] = once_value_60;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+ CALL_compiling_base___CompilerVisitor___add_instr(closctx->REG[1])(closctx->REG[1], fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:437 */
+ CALL_compiling_base___CompilerVisitor___decl_writer__eq(closctx->REG[1])(closctx->REG[1], fra.me.REG[2]);
+ /* ./compiling//compiling_global.nit:438 */
+ CALL_compiling_base___CompilerVisitor___unindent(closctx->REG[1])(closctx->REG[1]);
+ /* ./compiling//compiling_global.nit:439 */
+ if (!once_value_61) {
+ fra.me.REG[2] = BOX_NativeString("}");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_61 = fra.me.REG[2];
+ register_static_object(&once_value_61);
+ } else fra.me.REG[2] = once_value_61;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_compiling_base___CompilerVisitor___add_instr(closctx->REG[1])(closctx->REG[1], fra.me.REG[2]);
+ label52: while(0);
+ stack_frame_head = fra.me.prev;
+ return;
}
- /* Register variable[23]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[23]) /*CompilerVisitor::add_instr*/;
- continue_233: while(0);
- CALL_abstract_collection___Iterator___next(variable[16])(variable[16]) /*Iterator::next*/;
+void compiling_global___MMMethod___compile_property_to_c(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[8];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_compiling_global;
+ fra.me.line = 459;
+ fra.me.meth = LOCATE_compiling_global___MMMethod___compile_property_to_c;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 9;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./compiling//compiling_global.nit:461 */
+ fra.me.REG[2] = CALL_icode_base___MMMethod___iroutine(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./compiling//compiling_global.nit:462 */
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
+ REGB0 = REGB1;
}
- break_233: while(0);
- } else { /*if*/
- /* Register variable[8]: Result */
- variable[8] = CALL_compiling_base___PrimitiveInfo___tagged( variable[7] /*pi*/)( variable[7] /*pi*/) /*PrimitiveInfo::tagged*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[8])))) { /*if*/
- /* Register variable[8]: Local variable */
- /* Register variable[9]: Result */
- variable[9] = CALL_compiling_base___PrimitiveInfo___cname( variable[7] /*pi*/)( variable[7] /*pi*/) /*PrimitiveInfo::cname*/;
- variable[8] = variable[9];
- /* Register variable[9]: Local variable */
- 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_258 != NIT_NULL) variable[11] = once_value_258;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString("struct TBOX_"), TAG_Int(12)) /*new String*/;
- once_value_258 = 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_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
- /* Ensure var variable[11]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[10])(variable[10], CALL_string___Object___to_s(variable[11])(variable[11]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[11]: Once String constant */
- if (once_value_259 != NIT_NULL) variable[11] = once_value_259;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_259 = 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*/;
- variable[9] = variable[10];
- variable[10] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[11]: Once String constant */
- if (once_value_260 != NIT_NULL) variable[11] = once_value_260;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString("val_t BOX_"), TAG_Int(10)) /*new String*/;
- once_value_260 = 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_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
- /* Ensure var variable[11]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[10])(variable[10], CALL_string___Object___to_s(variable[11])(variable[11]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[11]: Once String constant */
- if (once_value_261 != NIT_NULL) variable[11] = once_value_261;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString("("), TAG_Int(1)) /*new String*/;
- once_value_261 = 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*/;
- variable[11] = variable[8] /*t*/ /* Ensure var: 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_262 != NIT_NULL) variable[11] = once_value_262;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString(" val) {"), TAG_Int(7)) /*new String*/;
- once_value_262 = 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_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[10]) /*CompilerVisitor::add_instr*/;
- CALL_compiling_base___CompilerVisitor___indent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::indent*/;
- variable[10] = NEW_Array_array___Array___with_capacity(TAG_Int(7)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[11]: Once String constant */
- if (once_value_263 != NIT_NULL) variable[11] = once_value_263;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_263 = 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*/;
- variable[11] = variable[9] /*tbox*/ /* Ensure var: 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_264 != NIT_NULL) variable[11] = once_value_264;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString(" *box = ("), TAG_Int(9)) /*new String*/;
- once_value_264 = 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*/;
- variable[11] = variable[9] /*tbox*/ /* Ensure var: 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_265 != NIT_NULL) variable[11] = once_value_265;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString("*)alloc(sizeof("), TAG_Int(15)) /*new String*/;
- once_value_265 = 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*/;
- variable[11] = variable[9] /*tbox*/ /* Ensure var: 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_266 != NIT_NULL) variable[11] = once_value_266;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString("));"), TAG_Int(3)) /*new String*/;
- once_value_266 = 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_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[10]) /*CompilerVisitor::add_instr*/;
- 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_267 != NIT_NULL) variable[11] = once_value_267;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString("box->vft = VFT_"), TAG_Int(15)) /*new String*/;
- once_value_267 = 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_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
- /* Ensure var variable[11]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[10])(variable[10], CALL_string___Object___to_s(variable[11])(variable[11]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[11]: Once String constant */
- if (once_value_268 != NIT_NULL) variable[11] = once_value_268;
- else {
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString(";"), TAG_Int(1)) /*new String*/;
- once_value_268 = 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_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[10]) /*CompilerVisitor::add_instr*/;
- /* Register variable[10]: Once String constant */
- if (once_value_269 != NIT_NULL) variable[10] = once_value_269;
- else {
- variable[10] = NEW_String_string___String___with_native(BOX_NativeString("box->val = val;"), TAG_Int(15)) /*new String*/;
- once_value_269 = variable[10];
- }
- /* Register variable[10]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[10]) /*CompilerVisitor::add_instr*/;
- /* Register variable[10]: Once String constant */
- if (once_value_270 != NIT_NULL) variable[10] = once_value_270;
- else {
- variable[10] = NEW_String_string___String___with_native(BOX_NativeString("return OBJ2VAL(box);"), TAG_Int(20)) /*new String*/;
- once_value_270 = variable[10];
- }
- /* Register variable[10]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[10]) /*CompilerVisitor::add_instr*/;
- CALL_compiling_base___CompilerVisitor___unindent( variable[1] /*v*/)( variable[1] /*v*/) /*CompilerVisitor::unindent*/;
- /* Register variable[10]: Once String constant */
- if (once_value_271 != NIT_NULL) variable[10] = once_value_271;
- else {
- variable[10] = NEW_String_string___String___with_native(BOX_NativeString("}"), TAG_Int(1)) /*new String*/;
- once_value_271 = variable[10];
- }
- /* Register variable[10]: Result */
- CALL_compiling_base___CompilerVisitor___add_instr( variable[1] /*v*/)( variable[1] /*v*/, variable[10]) /*CompilerVisitor::add_instr*/;
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_compiling_global, 462);
+ }
+ /* ./compiling//compiling_global.nit:464 */
+ fra.me.REG[3] = NIT_NULL;
+ /* ./compiling//compiling_global.nit:465 */
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalProperty___global(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = CALL_abstractmetamodel___MMGlobalProperty___is_init(fra.me.REG[4])(fra.me.REG[4]);
+ if (UNTAG_Bool(REGB0)) {
+ if (!once_value_1) {
+ fra.me.REG[4] = BOX_NativeString("int* init_table");
+ REGB0 = TAG_Int(15);
+ fra.me.REG[4] = NEW_String_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];
+ fra.me.REG[3] = fra.me.REG[4];
+ }
+ /* ./compiling//compiling_global.nit:466 */
+ fra.me.REG[4] = CALL_compiling_base___MMLocalProperty___cname(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[5] = CALL_abstractmetamodel___MMLocalProperty___full_name(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_global, 466);
+ }
+ fra.me.REG[3] = CALL_compiling_icode___IRoutine___compile_signature_to_c(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1], fra.me.REG[4], fra.me.REG[5], NIT_NULL, fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:467 */
+ fra.me.REG[5] = CALL_compiling_base___CompilerVisitor___writer(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:468 */
+ fra.me.REG[4] = CALL_compiling_base___CompilerVisitor___writer(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[4] = CALL_compiling_writer___Writer___sub(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_compiling_base___CompilerVisitor___writer__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ /* ./compiling//compiling_global.nit:469 */
+ fra.me.REG[4] = CALL_compiling_base___CompilerVisitor___decl_writer(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:470 */
+ fra.me.REG[6] = CALL_compiling_base___CompilerVisitor___writer(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[6] = CALL_compiling_writer___Writer___sub(fra.me.REG[6])(fra.me.REG[6]);
+ CALL_compiling_base___CompilerVisitor___decl_writer__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[6]);
+ /* ./compiling//compiling_global.nit:472 */
+ fra.me.REG[6] = NIT_NULL;
+ /* ./compiling//compiling_global.nit:473 */
+ fra.me.REG[7] = CALL_abstractmetamodel___MMLocalProperty___global(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = CALL_abstractmetamodel___MMGlobalProperty___is_init(fra.me.REG[7])(fra.me.REG[7]);
+ if (UNTAG_Bool(REGB0)) {
+ /* ./compiling//compiling_global.nit:474 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_2) {
+ fra.me.REG[8] = BOX_NativeString("itpos");
+ REGB0 = TAG_Int(5);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_2 = fra.me.REG[8];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[8] = once_value_2;
+ fra.me.REG[8] = fra.me.REG[8];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ REGB0 = CALL_compiling_base___CompilerVisitor___new_number(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[8] = CALL_string___Object___to_s(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ if (!once_value_3) {
+ fra.me.REG[8] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_3 = fra.me.REG[8];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[8] = once_value_3;
+ fra.me.REG[8] = fra.me.REG[8];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ fra.me.REG[6] = fra.me.REG[7];
+ /* ./compiling//compiling_global.nit:475 */
+ REGB0 = TAG_Int(7);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_4) {
+ fra.me.REG[8] = BOX_NativeString("int ");
+ REGB0 = TAG_Int(4);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_4 = fra.me.REG[8];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[8] = once_value_4;
+ fra.me.REG[8] = fra.me.REG[8];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[6]);
+ if (!once_value_5) {
+ fra.me.REG[8] = BOX_NativeString(" = VAL2OBJ(");
+ REGB0 = TAG_Int(11);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_5 = fra.me.REG[8];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[8] = once_value_5;
+ fra.me.REG[8] = fra.me.REG[8];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ fra.me.REG[8] = CALL_abstract_collection___Collection___first(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ if (!once_value_6) {
+ fra.me.REG[8] = BOX_NativeString(")->vft[");
+ REGB0 = TAG_Int(7);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_6 = fra.me.REG[8];
+ register_static_object(&once_value_6);
+ } else fra.me.REG[8] = once_value_6;
+ fra.me.REG[8] = fra.me.REG[8];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ fra.me.REG[8] = CALL_abstractmetamodel___MMLocalProperty___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[8] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[8])(fra.me.REG[8]);
+ fra.me.REG[8] = CALL_compiling_base___MMGlobalClass___init_table_pos_id(fra.me.REG[8])(fra.me.REG[8]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ if (!once_value_7) {
+ fra.me.REG[8] = BOX_NativeString("].i;");
+ REGB0 = TAG_Int(4);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_7 = fra.me.REG[8];
+ register_static_object(&once_value_7);
+ } else fra.me.REG[8] = once_value_7;
+ fra.me.REG[8] = fra.me.REG[8];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ CALL_compiling_base___CompilerVisitor___add_decl(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ /* ./compiling//compiling_global.nit:476 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_8) {
+ fra.me.REG[8] = BOX_NativeString("if (init_table[");
+ REGB0 = TAG_Int(15);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_8 = fra.me.REG[8];
+ register_static_object(&once_value_8);
+ } else fra.me.REG[8] = once_value_8;
+ fra.me.REG[8] = fra.me.REG[8];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[6]);
+ if (!once_value_9) {
+ fra.me.REG[8] = BOX_NativeString("]) return;");
+ REGB0 = TAG_Int(10);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_9 = fra.me.REG[8];
+ register_static_object(&once_value_9);
+ } else fra.me.REG[8] = once_value_9;
+ fra.me.REG[8] = fra.me.REG[8];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ }
+ /* ./compiling//compiling_global.nit:479 */
+ fra.me.REG[0] = CALL_compiling_base___MMLocalProperty___cname(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_global, 479);
+ }
+ fra.me.REG[3] = CALL_compiling_icode___IRoutine___compile_to_c(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1], fra.me.REG[0], fra.me.REG[3]);
+ /* ./compiling//compiling_global.nit:481 */
+ REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], NIT_NULL);
+ REGB0 = REGB1;
}
}
- return_label194: while(false);
- tracehead = trace.prev;
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ /* ./compiling//compiling_global.nit:482 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[0] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_10) {
+ fra.me.REG[2] = BOX_NativeString("init_table[");
+ REGB0 = TAG_Int(11);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_10 = fra.me.REG[2];
+ register_static_object(&once_value_10);
+ } else fra.me.REG[2] = once_value_10;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[6]);
+ if (!once_value_11) {
+ fra.me.REG[6] = BOX_NativeString("] = 1;");
+ REGB0 = TAG_Int(6);
+ fra.me.REG[6] = NEW_String_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_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[6]);
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ }
+ /* ./compiling//compiling_global.nit:484 */
+ REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ if (UNTAG_Bool(REGB0)) {
+ /* ./compiling//compiling_global.nit:485 */
+ if (!once_value_12) {
+ fra.me.REG[0] = BOX_NativeString("return;");
+ REGB0 = TAG_Int(7);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_12 = fra.me.REG[0];
+ register_static_object(&once_value_12);
+ } else fra.me.REG[0] = once_value_12;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ } else {
+ /* ./compiling//compiling_global.nit:487 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[0] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_13) {
+ fra.me.REG[6] = BOX_NativeString("return ");
+ REGB0 = TAG_Int(7);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB0);
+ once_value_13 = fra.me.REG[6];
+ register_static_object(&once_value_13);
+ } else fra.me.REG[6] = once_value_13;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[6]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
+ if (!once_value_14) {
+ fra.me.REG[3] = BOX_NativeString(";");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_14 = fra.me.REG[3];
+ register_static_object(&once_value_14);
+ } else fra.me.REG[3] = once_value_14;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ }
+ /* ./compiling//compiling_global.nit:489 */
+ CALL_compiling_base___CompilerVisitor___unindent(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./compiling//compiling_global.nit:490 */
+ if (!once_value_15) {
+ fra.me.REG[0] = BOX_NativeString("}");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_15 = fra.me.REG[0];
+ register_static_object(&once_value_15);
+ } else fra.me.REG[0] = once_value_15;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_compiling_base___CompilerVisitor___add_instr(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ /* ./compiling//compiling_global.nit:492 */
+ CALL_compiling_base___CompilerVisitor___writer__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
+ /* ./compiling//compiling_global.nit:493 */
+ CALL_compiling_base___CompilerVisitor___decl_writer__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ stack_frame_head = fra.me.prev;
return;
}