X-Git-Url: http://nitlanguage.org diff --git a/c_src/abstracttool._sep.c b/c_src/abstracttool._sep.c index e00bc69..03242a3 100644 --- a/c_src/abstracttool._sep.c +++ b/c_src/abstracttool._sep.c @@ -1,322 +1,556 @@ /* This C file is generated by NIT to compile module abstracttool. */ #include "abstracttool._sep.h" void abstracttool___AbstractCompiler___init(val_t self, int* init_table) { - struct trace_t trace = {NULL, LOCATE_abstracttool___AbstractCompiler___init, 28}; - val_t variable0; + struct trace_t trace = {NULL, NULL, 28, LOCATE_abstracttool___AbstractCompiler___init}; + val_t variable[3]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_AbstractCompiler].i]) return; - ((mmloader___ToolContext___init_t)CALL( self,COLOR_mmloader___ToolContext___init))( self, init_table /*YYY*/) /*ToolContext::init*/; - variable0 = NEW_syntax___SrcModuleLoader___init(); /*new SrcModuleLoader*/ - ((mmloader___ToolContext___register_loader_t)CALL( self,COLOR_mmloader___ToolContext___register_loader))( self, variable0) /*AbstractCompiler::register_loader*/; - init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_AbstractCompiler].i] = 1; + trace.file = LOCATE_abstracttool; + /* Register variable[0]: Local variable */ + variable[0] = self; + if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_AbstractCompiler].i]) return; + /* Register variable[1]: Method return value and escape marker */ + CALL_mmloader___ToolContext___init(variable[0])(variable[0], init_table /*YYY*/) /*ToolContext::init*/; + /* Register variable[2]: Result */ + variable[2] = NEW_SrcModuleLoader_syntax___SrcModuleLoader___init() /*new SrcModuleLoader*/; + CALL_mmloader___ToolContext___register_loader(variable[0])(variable[0], variable[2]) /*ToolContext::register_loader*/; + return_label0: while(false); + init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_AbstractCompiler].i] = 1; tracehead = trace.prev; return; } void abstracttool___AbstractCompiler___exec_cmd_line(val_t self) { - struct trace_t trace = {NULL, LOCATE_abstracttool___AbstractCompiler___exec_cmd_line, 34}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - val_t variable4; - val_t variable5; - val_t variable6; - val_t variable7; + struct trace_t trace = {NULL, NULL, 34, LOCATE_abstracttool___AbstractCompiler___exec_cmd_line}; + val_t variable[12]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; - ((mmloader___ToolContext___process_options_t)CALL( self,COLOR_mmloader___ToolContext___process_options))( self) /*AbstractCompiler::process_options*/; - variable0 = ((mmloader___ToolContext___opt_help_t)CALL( self,COLOR_mmloader___ToolContext___opt_help))( self) /*AbstractCompiler::opt_help*/; - variable0 = ((opts___Option___value_t)CALL(variable0,COLOR_opts___Option___value))(variable0) /*OptionBool::value*/; - if (UNTAG_Bool(variable0)) { /*if*/ - variable0 = ((mmloader___ToolContext___option_context_t)CALL( self,COLOR_mmloader___ToolContext___option_context))( self) /*AbstractCompiler::option_context*/; - ((opts___OptionContext___usage_t)CALL(variable0,COLOR_opts___OptionContext___usage))(variable0) /*OptionContext::usage*/; + trace.file = LOCATE_abstracttool; + /* Register variable[0]: Local variable */ + variable[0] = self; + /* Register variable[1]: Method return value and escape marker */ + CALL_mmloader___ToolContext___process_options(variable[0])(variable[0]) /*ToolContext::process_options*/; + /* Register variable[2]: Result */ + variable[2] = CALL_mmloader___ToolContext___opt_help(variable[0])(variable[0]) /*ToolContext::opt_help*/; + /* Register variable[2]: Result */ + variable[2] = CALL_opts___Option___value(variable[2])(variable[2]) /*Option::value*/; + if (UNTAG_Bool(variable[2])) { /*if*/ + /* Register variable[2]: Result */ + variable[2] = CALL_mmloader___ToolContext___option_context(variable[0])(variable[0]) /*ToolContext::option_context*/; + CALL_opts___OptionContext___usage(variable[2])(variable[2]) /*OptionContext::usage*/; exit(UNTAG_Int( TAG_Int(0))); } - variable0 = ((mmloader___ToolContext___option_context_t)CALL( self,COLOR_mmloader___ToolContext___option_context))( self) /*AbstractCompiler::option_context*/; - variable0 = ((opts___OptionContext___rest_t)CALL(variable0,COLOR_opts___OptionContext___rest))(variable0) /*OptionContext::rest*/; - variable0 = ((array___AbstractArray___length_t)CALL(variable0,COLOR_abstract_collection___Collection___length))(variable0) /*Array::length*/; - variable0 = TAG_Bool((variable0)==( TAG_Int(0))); - if (UNTAG_Bool(variable0)) { /*if*/ - variable0 = ((mmloader___ToolContext___option_context_t)CALL( self,COLOR_mmloader___ToolContext___option_context))( self) /*AbstractCompiler::option_context*/; - ((opts___OptionContext___usage_t)CALL(variable0,COLOR_opts___OptionContext___usage))(variable0) /*OptionContext::usage*/; + /* Register variable[2]: Result */ + variable[2] = CALL_mmloader___ToolContext___option_context(variable[0])(variable[0]) /*ToolContext::option_context*/; + /* Register variable[2]: Result */ + variable[2] = CALL_opts___OptionContext___rest(variable[2])(variable[2]) /*OptionContext::rest*/; + /* Register variable[2]: Result */ + variable[2] = CALL_abstract_collection___Collection___length(variable[2])(variable[2]) /*AbstractArrayRead::length*/; + /* Register variable[2]: Result */ + variable[2] = TAG_Bool((variable[2])==( TAG_Int(0))); + if (UNTAG_Bool(variable[2])) { /*if*/ + /* Register variable[2]: Result */ + variable[2] = CALL_mmloader___ToolContext___option_context(variable[0])(variable[0]) /*ToolContext::option_context*/; + CALL_opts___OptionContext___usage(variable[2])(variable[2]) /*OptionContext::usage*/; exit(UNTAG_Int( TAG_Int(1))); } - variable1 = ((mmloader___ToolContext___option_context_t)CALL( self,COLOR_mmloader___ToolContext___option_context))( self) /*AbstractCompiler::option_context*/; - variable1 = ((opts___OptionContext___rest_t)CALL(variable1,COLOR_opts___OptionContext___rest))(variable1) /*OptionContext::rest*/; - variable0 = variable1; - variable2 = NEW_array___Array___init(); /*new Array[MMModule]*/ - variable1 = variable2; - variable2 = ((array___AbstractArray___length_t)CALL( variable0 /*rest*/,COLOR_abstract_collection___Collection___length))( variable0 /*rest*/) /*Array::length*/; - variable3 = NEW_range___Range___without_last( TAG_Int(0), variable2); /*new Range[Int]*/ - variable2 = variable3; - variable2 = ((range___Range___iterator_t)CALL(variable2,COLOR_abstract_collection___Collection___iterator))(variable2) /*Range::iterator*/; + /* Register variable[2]: Local variable */ + /* Register variable[3]: Result */ + variable[3] = CALL_mmloader___ToolContext___option_context(variable[0])(variable[0]) /*ToolContext::option_context*/; + /* Register variable[3]: Result */ + variable[3] = CALL_opts___OptionContext___rest(variable[3])(variable[3]) /*OptionContext::rest*/; + variable[2] = variable[3]; + /* Register variable[3]: Local variable */ + /* Register variable[4]: Result */ + variable[4] = NEW_Array_array___Array___init() /*new Array[MMModule]*/; + variable[3] = variable[4]; + /* Register variable[4]: Result */ + variable[4] = CALL_abstract_collection___Collection___length( variable[2] /*rest*/)( variable[2] /*rest*/) /*AbstractArrayRead::length*/; + /* Register variable[4]: Result */ + variable[4] = NEW_Range_range___Range___without_last( TAG_Int(0), variable[4]) /*new Range[Int]*/; + /* Register variable[4]: For iterator */ + variable[4] = CALL_abstract_collection___Collection___iterator(variable[4])(variable[4]) /*Range::iterator*/; while (true) { /*for*/ - variable3 = ((abstract_collection___Iterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*Iterator::is_ok*/; - if (!UNTAG_Bool(variable3)) break; /*for*/ - variable3 = ((abstract_collection___Iterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*Iterator::item*/; - variable5 = variable3 /*i*/; - variable6 = TAG_Bool(UNTAG_Int( variable5 /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable7 = variable6; - if (UNTAG_Bool(variable7)) { /* and */ - variable7 = ATTR_array___AbstractArray____length( variable0 /*rest*/) /*Array::_length*/; - variable7 = TAG_Bool(UNTAG_Int( variable5 /*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*/)