X-Git-Url: http://nitlanguage.org diff --git a/c_src/nitc._sep.c b/c_src/nitc._sep.c index ff5db09..e26959c 100644 --- a/c_src/nitc._sep.c +++ b/c_src/nitc._sep.c @@ -1,332 +1,1073 @@ /* This C file is generated by NIT to compile module nitc. */ #include "nitc._sep.h" -val_t nitc___NitCompiler___opt_output(val_t self) { - struct trace_t trace = {NULL, NULL, 26, LOCATE_nitc___NitCompiler___opt_output}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - tracehead = trace.prev; - return ATTR_nitc___NitCompiler____opt_output( self) /*NitCompiler::_opt_output*/; +val_t nitc___NitCompiler___opt_output(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 29; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_output; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:29 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_output(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_output", LOCATE_nitc, 29); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_output(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t nitc___NitCompiler___opt_boost(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 30; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_boost; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:30 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_boost(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_boost", LOCATE_nitc, 30); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_boost(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; } -val_t nitc___NitCompiler___opt_boost(val_t self) { - struct trace_t trace = {NULL, NULL, 27, LOCATE_nitc___NitCompiler___opt_boost}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - tracehead = trace.prev; - return ATTR_nitc___NitCompiler____opt_boost( self) /*NitCompiler::_opt_boost*/; +val_t nitc___NitCompiler___opt_no_cc(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 31; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_no_cc; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:31 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_no_cc(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_no_cc", LOCATE_nitc, 31); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_no_cc(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t nitc___NitCompiler___opt_cc_no_link(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 32; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_cc_no_link; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:32 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_cc_no_link(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_cc_no_link", LOCATE_nitc, 32); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_cc_no_link(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; } -val_t nitc___NitCompiler___opt_no_cc(val_t self) { - struct trace_t trace = {NULL, NULL, 28, LOCATE_nitc___NitCompiler___opt_no_cc}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - tracehead = trace.prev; - return ATTR_nitc___NitCompiler____opt_no_cc( self) /*NitCompiler::_opt_no_cc*/; +val_t nitc___NitCompiler___opt_cc_lib_paths(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 33; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_cc_lib_paths; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:33 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_cc_lib_paths(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_cc_lib_paths", LOCATE_nitc, 33); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_cc_lib_paths(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; } -val_t nitc___NitCompiler___opt_attr_sim(val_t self) { - struct trace_t trace = {NULL, NULL, 29, LOCATE_nitc___NitCompiler___opt_attr_sim}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - tracehead = trace.prev; - return ATTR_nitc___NitCompiler____opt_attr_sim( self) /*NitCompiler::_opt_attr_sim*/; +val_t nitc___NitCompiler___opt_cc_libs(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 34; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_cc_libs; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:34 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_cc_libs(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_cc_libs", LOCATE_nitc, 34); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_cc_libs(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; } -val_t nitc___NitCompiler___opt_global(val_t self) { - struct trace_t trace = {NULL, NULL, 30, LOCATE_nitc___NitCompiler___opt_global}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - tracehead = trace.prev; - return ATTR_nitc___NitCompiler____opt_global( self) /*NitCompiler::_opt_global*/; +val_t nitc___NitCompiler___opt_cc_include_paths(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 35; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_cc_include_paths; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:35 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_cc_include_paths(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_cc_include_paths", LOCATE_nitc, 35); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_cc_include_paths(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; } -val_t nitc___NitCompiler___opt_clibdir(val_t self) { - struct trace_t trace = {NULL, NULL, 31, LOCATE_nitc___NitCompiler___opt_clibdir}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - tracehead = trace.prev; - return ATTR_nitc___NitCompiler____opt_clibdir( self) /*NitCompiler::_opt_clibdir*/; +val_t nitc___NitCompiler___opt_global(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 36; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_global; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:36 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_global(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_global", LOCATE_nitc, 36); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_global(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; } -val_t nitc___NitCompiler___opt_bindir(val_t self) { - struct trace_t trace = {NULL, NULL, 32, LOCATE_nitc___NitCompiler___opt_bindir}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - tracehead = trace.prev; - return ATTR_nitc___NitCompiler____opt_bindir( self) /*NitCompiler::_opt_bindir*/; +val_t nitc___NitCompiler___opt_global_no_STF_opt(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 37; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_global_no_STF_opt; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:37 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_global_no_STF_opt(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_global_no_STF_opt", LOCATE_nitc, 37); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_global_no_STF_opt(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; } -val_t nitc___NitCompiler___opt_compdir(val_t self) { - struct trace_t trace = {NULL, NULL, 33, LOCATE_nitc___NitCompiler___opt_compdir}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - tracehead = trace.prev; - return ATTR_nitc___NitCompiler____opt_compdir( self) /*NitCompiler::_opt_compdir*/; +val_t nitc___NitCompiler___opt_global_no_DMR_opt(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 38; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_global_no_DMR_opt; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:38 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_global_no_DMR_opt(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_global_no_DMR_opt", LOCATE_nitc, 38); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_global_no_DMR_opt(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; } -val_t nitc___NitCompiler___opt_extension_prefix(val_t self) { - struct trace_t trace = {NULL, NULL, 34, LOCATE_nitc___NitCompiler___opt_extension_prefix}; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - tracehead = trace.prev; - return ATTR_nitc___NitCompiler____opt_extension_prefix( self) /*NitCompiler::_opt_extension_prefix*/; +val_t nitc___NitCompiler___opt_global_no_inline_get_set(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 39; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_global_no_inline_get_set; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:39 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_global_no_inline_get_set(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_global_no_inline_get_set", LOCATE_nitc, 39); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_global_no_inline_get_set(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t nitc___NitCompiler___opt_global_no_out_of_init_get_test_opt(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 40; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_global_no_out_of_init_get_test_opt; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:40 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_global_no_out_of_init_get_test_opt(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_global_no_out_of_init_get_test_opt", LOCATE_nitc, 40); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_global_no_out_of_init_get_test_opt(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t nitc___NitCompiler___opt_global_no_RFIMA(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 41; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_global_no_RFIMA; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:41 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_global_no_RFIMA(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_global_no_RFIMA", LOCATE_nitc, 41); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_global_no_RFIMA(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t nitc___NitCompiler___opt_global_callgraph(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 42; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_global_callgraph; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:42 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_global_callgraph(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_global_callgraph", LOCATE_nitc, 42); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_global_callgraph(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t nitc___NitCompiler___opt_clibdir(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 43; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_clibdir; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:43 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_clibdir(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_clibdir", LOCATE_nitc, 43); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_clibdir(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t nitc___NitCompiler___opt_bindir(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 44; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_bindir; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:44 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_bindir(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_bindir", LOCATE_nitc, 44); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_bindir(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; } -void nitc___NitCompiler___init(val_t self, int* init_table) { - struct trace_t trace = {NULL, NULL, 36, LOCATE_nitc___NitCompiler___init}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - val_t variable4; - val_t variable5; - val_t variable6; - val_t variable7; - val_t variable8; - val_t variable9; - val_t variable10; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_NitCompiler].i]) return; - ((abstracttool___AbstractCompiler___init_t)CALL( self,COLOR_abstracttool___AbstractCompiler___init))( self, init_table /*YYY*/) /*AbstractCompiler::init*/; - variable0 = ((mmloader___ToolContext___option_context_t)CALL( self,COLOR_mmloader___ToolContext___option_context))( self) /*ToolContext::option_context*/; - variable1 = NEW_Array_array___Array___with_capacity(TAG_Int(9)); /*new Array[Option]*/ - variable2 = ((nitc___NitCompiler___opt_output_t)CALL( self,COLOR_nitc___NitCompiler___opt_output))( self) /*NitCompiler::opt_output*/; - ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable2) /*AbstractArray::add*/; - variable3 = ((nitc___NitCompiler___opt_boost_t)CALL( self,COLOR_nitc___NitCompiler___opt_boost))( self) /*NitCompiler::opt_boost*/; - ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable3) /*AbstractArray::add*/; - variable4 = ((nitc___NitCompiler___opt_no_cc_t)CALL( self,COLOR_nitc___NitCompiler___opt_no_cc))( self) /*NitCompiler::opt_no_cc*/; - ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable4) /*AbstractArray::add*/; - variable5 = ((nitc___NitCompiler___opt_attr_sim_t)CALL( self,COLOR_nitc___NitCompiler___opt_attr_sim))( self) /*NitCompiler::opt_attr_sim*/; - ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable5) /*AbstractArray::add*/; - variable6 = ((nitc___NitCompiler___opt_global_t)CALL( self,COLOR_nitc___NitCompiler___opt_global))( self) /*NitCompiler::opt_global*/; - ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable6) /*AbstractArray::add*/; - variable7 = ((nitc___NitCompiler___opt_clibdir_t)CALL( self,COLOR_nitc___NitCompiler___opt_clibdir))( self) /*NitCompiler::opt_clibdir*/; - ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable7) /*AbstractArray::add*/; - variable8 = ((nitc___NitCompiler___opt_bindir_t)CALL( self,COLOR_nitc___NitCompiler___opt_bindir))( self) /*NitCompiler::opt_bindir*/; - ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable8) /*AbstractArray::add*/; - variable9 = ((nitc___NitCompiler___opt_compdir_t)CALL( self,COLOR_nitc___NitCompiler___opt_compdir))( self) /*NitCompiler::opt_compdir*/; - ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable9) /*AbstractArray::add*/; - variable10 = ((nitc___NitCompiler___opt_extension_prefix_t)CALL( self,COLOR_nitc___NitCompiler___opt_extension_prefix))( self) /*NitCompiler::opt_extension_prefix*/; - ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable10) /*AbstractArray::add*/; - ((opts___OptionContext___add_option_t)CALL(variable0,COLOR_opts___OptionContext___add_option))(variable0, variable1) /*OptionContext::add_option*/; - init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_NitCompiler].i] = 1; - tracehead = trace.prev; +val_t nitc___NitCompiler___opt_compdir(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 45; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_compdir; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:45 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_compdir(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_compdir", LOCATE_nitc, 45); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_compdir(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t nitc___NitCompiler___opt_extension_prefix(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 46; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_extension_prefix; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:46 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_extension_prefix(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_extension_prefix", LOCATE_nitc, 46); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_extension_prefix(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t nitc___NitCompiler___opt_output_format(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 47; + fra.me.meth = LOCATE_nitc___NitCompiler___opt_output_format; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:47 */ + REGB0 = TAG_Bool(ATTR_nitc___NitCompiler____opt_output_format(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_opt_output_format", LOCATE_nitc, 47); + } + fra.me.REG[0] = ATTR_nitc___NitCompiler____opt_output_format(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +void nitc___NitCompiler___init(val_t p0, int* init_table){ + int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_NitCompiler].i; + 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 */ + if (init_table[itpos0]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 49; + fra.me.meth = LOCATE_nitc___NitCompiler___init; + 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; + /* ./nitc.nit:49 */ + fra.me.REG[1] = fra.me.REG[0]; + /* ./nitc.nit:51 */ + if (!once_value_1) { + fra.me.REG[2] = BOX_NativeString("nitc"); + REGB0 = TAG_Int(4); + 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_abstracttool___AbstractCompiler___init(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2], init_table); + /* ./nitc.nit:52 */ + fra.me.REG[2] = CALL_mmloader___ToolContext___option_context(fra.me.REG[1])(fra.me.REG[1]); + REGB0 = TAG_Int(18); + fra.me.REG[0] = NEW_Array_array___Array___with_capacity(REGB0); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_output(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_boost(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_no_cc(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_cc_no_link(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_cc_libs(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_cc_lib_paths(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_cc_include_paths(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_global(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_clibdir(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_bindir(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_compdir(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_extension_prefix(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_global_no_STF_opt(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_global_no_DMR_opt(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_global_callgraph(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_global_no_inline_get_set(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_global_no_RFIMA(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_nitc___NitCompiler___opt_global_no_out_of_init_get_test_opt(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[1] = CALL_nitc___NitCompiler___opt_output_format(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + CALL_opts___OptionContext___add_option(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]); + stack_frame_head = fra.me.prev; + init_table[itpos0] = 1; return; } -void nitc___NitCompiler___process_options(val_t self) { - struct trace_t trace = {NULL, NULL, 42, LOCATE_nitc___NitCompiler___process_options}; - val_t variable0; - val_t variable1; - static val_t once_value_variable1_2; static int once_bool_variable1_2; - static val_t once_value_variable1_3; static int once_bool_variable1_3; - val_t variable2; - val_t variable3; - val_t variable4; - val_t variable5; - val_t variable6; - val_t variable7; - val_t variable8; - static val_t once_value_variable1_4; static int once_bool_variable1_4; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - ((nitc___NitCompiler___process_options_t)CALL( self,COLOR_SUPER_nitc___NitCompiler___process_options))( self) /*super NitCompiler::process_options*/; - variable0 = ((nitc___NitCompiler___opt_output_t)CALL( self,COLOR_nitc___NitCompiler___opt_output))( self) /*NitCompiler::opt_output*/; - variable0 = ((opts___Option___value_t)CALL(variable0,COLOR_opts___Option___value))(variable0) /*Option::value*/; - ((compiling_base___ToolContext___output_file__eq_t)CALL( self,COLOR_compiling_base___ToolContext___output_file__eq))( self, variable0) /*ToolContext::output_file=*/; - variable0 = ((nitc___NitCompiler___opt_boost_t)CALL( self,COLOR_nitc___NitCompiler___opt_boost))( self) /*NitCompiler::opt_boost*/; - variable0 = ((opts___Option___value_t)CALL(variable0,COLOR_opts___Option___value))(variable0) /*Option::value*/; - ((compiling_base___ToolContext___boost__eq_t)CALL( self,COLOR_compiling_base___ToolContext___boost__eq))( self, variable0) /*ToolContext::boost=*/; - variable0 = ((nitc___NitCompiler___opt_no_cc_t)CALL( self,COLOR_nitc___NitCompiler___opt_no_cc))( self) /*NitCompiler::opt_no_cc*/; - variable0 = ((opts___Option___value_t)CALL(variable0,COLOR_opts___Option___value))(variable0) /*Option::value*/; - ((compiling_base___ToolContext___no_cc__eq_t)CALL( self,COLOR_compiling_base___ToolContext___no_cc__eq))( self, variable0) /*ToolContext::no_cc=*/; - variable0 = ((nitc___NitCompiler___opt_extension_prefix_t)CALL( self,COLOR_nitc___NitCompiler___opt_extension_prefix))( self) /*NitCompiler::opt_extension_prefix*/; - variable0 = ((opts___Option___value_t)CALL(variable0,COLOR_opts___Option___value))(variable0) /*Option::value*/; - ((compiling_base___ToolContext___ext_prefix__eq_t)CALL( self,COLOR_compiling_base___ToolContext___ext_prefix__eq))( self, variable0) /*ToolContext::ext_prefix=*/; - variable0 = ((compiling_base___ToolContext___ext_prefix_t)CALL( self,COLOR_compiling_base___ToolContext___ext_prefix))( self) /*ToolContext::ext_prefix*/; - variable0 = TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && UNTAG_Bool(((string___String_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*String::==*/))); - if (UNTAG_Bool(variable0)) { /*if*/ - variable0 = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/ - ((compiling_base___ToolContext___ext_prefix__eq_t)CALL( self,COLOR_compiling_base___ToolContext___ext_prefix__eq))( self, variable0) /*ToolContext::ext_prefix=*/; +void nitc___NitCompiler___process_options(val_t p0){ + struct {struct stack_frame_t me; val_t MORE_REG[3];} 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 */ + static val_t once_value_16; /* Once value */ + static val_t once_value_17; /* Once value */ + static val_t once_value_18; /* Once value */ + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 55; + fra.me.meth = LOCATE_nitc___NitCompiler___process_options; + 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; + /* ./nitc.nit:55 */ + fra.me.REG[1] = fra.me.REG[0]; + /* ./nitc.nit:57 */ + CALL_SUPER_nitc___NitCompiler___process_options(fra.me.REG[0])(fra.me.REG[0]); + /* ./nitc.nit:58 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_output(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + CALL_compiling_base___ToolContext___output_file__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:59 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_boost(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + CALL_compiling_base___ToolContext___boost__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:60 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_no_cc(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + CALL_compiling_base___ToolContext___no_cc__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:61 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_cc_no_link(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + REGB0 = TAG_Bool(!UNTAG_Bool(fra.me.REG[0])); + CALL_compiling_base___ToolContext___cc_link__eq(fra.me.REG[1])(fra.me.REG[1], REGB0); + /* ./nitc.nit:62 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_cc_lib_paths(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + CALL_compiling_base___ToolContext___cc_lib_paths__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:63 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_cc_libs(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + CALL_compiling_base___ToolContext___cc_libs__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:64 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_cc_include_paths(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + CALL_compiling_base___ToolContext___cc_include_paths__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:65 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_extension_prefix(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + /* ./nitc.nit:66 */ + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL); + REGB0 = REGB1; + } + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + CALL_compiling_base___ToolContext___ext_prefix__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + } else { + if (!once_value_1) { + 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_1 = fra.me.REG[0]; + register_static_object(&once_value_1); + } else fra.me.REG[0] = once_value_1; + fra.me.REG[0] = fra.me.REG[0]; + CALL_compiling_base___ToolContext___ext_prefix__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); } - variable0 = ((nitc___NitCompiler___opt_attr_sim_t)CALL( self,COLOR_nitc___NitCompiler___opt_attr_sim))( self) /*NitCompiler::opt_attr_sim*/; - variable0 = ((opts___Option___value_t)CALL(variable0,COLOR_opts___Option___value))(variable0) /*Option::value*/; - ((compiling_base___ToolContext___attr_sim__eq_t)CALL( self,COLOR_compiling_base___ToolContext___attr_sim__eq))( self, variable0) /*ToolContext::attr_sim=*/; - variable0 = ((nitc___NitCompiler___opt_global_t)CALL( self,COLOR_nitc___NitCompiler___opt_global))( self) /*NitCompiler::opt_global*/; - variable0 = ((opts___Option___value_t)CALL(variable0,COLOR_opts___Option___value))(variable0) /*Option::value*/; - ((compiling_base___ToolContext___global__eq_t)CALL( self,COLOR_compiling_base___ToolContext___global__eq))( self, variable0) /*ToolContext::global=*/; - variable0 = ((nitc___NitCompiler___opt_compdir_t)CALL( self,COLOR_nitc___NitCompiler___opt_compdir))( self) /*NitCompiler::opt_compdir*/; - variable0 = ((opts___Option___value_t)CALL(variable0,COLOR_opts___Option___value))(variable0) /*Option::value*/; - ((compiling_base___ToolContext___compdir__eq_t)CALL( self,COLOR_compiling_base___ToolContext___compdir__eq))( self, variable0) /*ToolContext::compdir=*/; - variable0 = ((compiling_base___ToolContext___compdir_t)CALL( self,COLOR_compiling_base___ToolContext___compdir))( self) /*ToolContext::compdir*/; - variable0 = TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && UNTAG_Bool(((string___String_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*String::==*/))); - if (UNTAG_Bool(variable0)) { /*if*/ - if (once_bool_variable1_2) variable1 = once_value_variable1_2; - else { - variable1 = NEW_String_string___String___with_native(BOX_NativeString("NIT_COMPDIR"), TAG_Int(11)); /*new String*/ - variable1 = ((symbol___String___to_symbol_t)CALL(variable1,COLOR_symbol___String___to_symbol))(variable1) /*String::to_symbol*/; - variable1 = ((environ___Symbol___environ_t)CALL(variable1,COLOR_environ___Symbol___environ))(variable1) /*Symbol::environ*/; - once_value_variable1_2 = variable1; - once_bool_variable1_2 = true; + /* ./nitc.nit:67 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_global(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + CALL_program___ToolContext___global__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:68 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_global_no_STF_opt(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + REGB0 = TAG_Bool(!UNTAG_Bool(fra.me.REG[0])); + CALL_program___ToolContext___use_SFT_optimization__eq(fra.me.REG[1])(fra.me.REG[1], REGB0); + /* ./nitc.nit:69 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_global_no_DMR_opt(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + CALL_analysis___ToolContext___no_dead_method_removal__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:70 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_global_no_inline_get_set(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + CALL_analysis___ToolContext___no_inline_get_set__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:71 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_global_no_RFIMA(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + CALL_analysis___ToolContext___no_callgraph_from_init__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:72 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_global_no_out_of_init_get_test_opt(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + CALL_analysis___ToolContext___no_out_of_init_get_test_removal__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:73 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_global_callgraph(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___OptionEnum___value_name(fra.me.REG[0])(fra.me.REG[0]); + CALL_analysis___ToolContext___global_callgraph__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:74 */ + fra.me.REG[0] = CALL_nitc___NitCompiler___opt_compdir(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]); + CALL_compiling_base___ToolContext___compdir__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./nitc.nit:75 */ + fra.me.REG[0] = CALL_compiling_base___ToolContext___compdir(fra.me.REG[1])(fra.me.REG[1]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL); + REGB0 = REGB1; } - variable0 = variable1; - variable1 = ((array___AbstractArray___is_empty_t)CALL( variable0 /*dir*/,COLOR_abstract_collection___Collection___is_empty))( variable0 /*dir*/) /*AbstractArray::is_empty*/; - if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable1)))) { /*if*/ - ((compiling_base___ToolContext___compdir__eq_t)CALL( self,COLOR_compiling_base___ToolContext___compdir__eq))( self, variable0 /*dir*/) /*ToolContext::compdir=*/; + } + if (UNTAG_Bool(REGB0)) { + /* ./nitc.nit:76 */ + if (!once_value_2) { + if (!once_value_3) { + fra.me.REG[0] = BOX_NativeString("NIT_COMPDIR"); + REGB0 = TAG_Int(11); + 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]; + fra.me.REG[0] = CALL_symbol___String___to_symbol(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[0] = CALL_environ___Symbol___environ(fra.me.REG[0])(fra.me.REG[0]); + 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]; + /* ./nitc.nit:77 */ + REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]); + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + /* ./nitc.nit:78 */ + CALL_compiling_base___ToolContext___compdir__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + } + /* ./nitc.nit:80 */ + fra.me.REG[0] = CALL_compiling_base___ToolContext___compdir(fra.me.REG[1])(fra.me.REG[1]); + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL); + REGB0 = REGB1; + } } - variable1 = ((compiling_base___ToolContext___compdir_t)CALL( self,COLOR_compiling_base___ToolContext___compdir))( self) /*ToolContext::compdir*/; - variable1 = TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && UNTAG_Bool(((string___String_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*String::==*/))); - if (UNTAG_Bool(variable1)) { /*if*/ - variable1 = NEW_String_string___String___with_native(BOX_NativeString(".nit_compile"), TAG_Int(12)); /*new String*/ - ((compiling_base___ToolContext___compdir__eq_t)CALL( self,COLOR_compiling_base___ToolContext___compdir__eq))( self, variable1) /*ToolContext::compdir=*/; + if (UNTAG_Bool(REGB0)) { + /* ./nitc.nit:81 */ + if (!once_value_4) { + fra.me.REG[0] = BOX_NativeString(".nit_compile"); + REGB0 = TAG_Int(12); + fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0); + once_value_4 = fra.me.REG[0]; + register_static_object(&once_value_4); + } else fra.me.REG[0] = once_value_4; + fra.me.REG[0] = fra.me.REG[0]; + CALL_compiling_base___ToolContext___compdir__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); } } - variable0 = ((compiling_base___ToolContext___compdir_t)CALL( self,COLOR_compiling_base___ToolContext___compdir))( self) /*ToolContext::compdir*/; - variable1 = ((compiling_base___ToolContext___ext_prefix_t)CALL( self,COLOR_compiling_base___ToolContext___ext_prefix))( self) /*ToolContext::ext_prefix*/; - ((string___String___append_t)CALL(variable0,COLOR_abstract_collection___IndexedCollection___append))(variable0, variable1) /*String::append*/; - variable0 = ((nitc___NitCompiler___opt_clibdir_t)CALL( self,COLOR_nitc___NitCompiler___opt_clibdir))( self) /*NitCompiler::opt_clibdir*/; - variable0 = ((opts___Option___value_t)CALL(variable0,COLOR_opts___Option___value))(variable0) /*Option::value*/; - ((compiling_base___ToolContext___clibdir__eq_t)CALL( self,COLOR_compiling_base___ToolContext___clibdir__eq))( self, variable0) /*ToolContext::clibdir=*/; - variable0 = ((compiling_base___ToolContext___clibdir_t)CALL( self,COLOR_compiling_base___ToolContext___clibdir))( self) /*ToolContext::clibdir*/; - variable0 = TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && UNTAG_Bool(((string___String_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*String::==*/))); - if (UNTAG_Bool(variable0)) { /*if*/ - if (once_bool_variable1_3) variable1 = once_value_variable1_3; - else { - variable1 = NEW_String_string___String___with_native(BOX_NativeString("NIT_DIR"), TAG_Int(7)); /*new String*/ - variable1 = ((symbol___String___to_symbol_t)CALL(variable1,COLOR_symbol___String___to_symbol))(variable1) /*String::to_symbol*/; - variable1 = ((environ___Symbol___environ_t)CALL(variable1,COLOR_environ___Symbol___environ))(variable1) /*Symbol::environ*/; - once_value_variable1_3 = variable1; - once_bool_variable1_3 = true; + /* ./nitc.nit:84 */ + fra.me.REG[0] = CALL_compiling_base___ToolContext___compdir(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[2] = CALL_compiling_base___ToolContext___ext_prefix(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[2] = CALL_string___String_____plus(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]); + CALL_compiling_base___ToolContext___compdir__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); + /* ./nitc.nit:86 */ + fra.me.REG[2] = CALL_nitc___NitCompiler___opt_clibdir(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[2] = CALL_opts___Option___value(fra.me.REG[2])(fra.me.REG[2]); + CALL_compiling_base___ToolContext___clibdir__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); + /* ./nitc.nit:87 */ + fra.me.REG[2] = CALL_compiling_base___ToolContext___clibdir(fra.me.REG[1])(fra.me.REG[1]); + 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; } - variable0 = variable1; - variable1 = ((array___AbstractArray___is_empty_t)CALL( variable0 /*dir*/,COLOR_abstract_collection___Collection___is_empty))( variable0 /*dir*/) /*AbstractArray::is_empty*/; - if (UNTAG_Bool(variable1)) { /*if*/ - variable2 = NEW_String_string___String___init(); /*new String*/ - variable3 = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/ - variable4 = variable3; - ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable4) /*String::append*/; - variable5 = (G_sys); - variable5 = ((string___Sys___program_name_t)CALL(variable5,COLOR_string___Sys___program_name))(variable5) /*Sys::program_name*/; - variable5 = ((file___String___dirname_t)CALL(variable5,COLOR_file___String___dirname))(variable5) /*String::dirname*/; - variable6 = variable5; - ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable6) /*String::append*/; - variable7 = NEW_String_string___String___with_native(BOX_NativeString("/../lib"), TAG_Int(7)); /*new String*/ - variable8 = variable7; - ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable8) /*String::append*/; - variable1 = variable2; - variable2 = ((file___String___file_exists_t)CALL( variable1 /*dir*/,COLOR_file___String___file_exists))( variable1 /*dir*/) /*String::file_exists*/; - if (UNTAG_Bool(variable2)) { /*if*/ - ((compiling_base___ToolContext___clibdir__eq_t)CALL( self,COLOR_compiling_base___ToolContext___clibdir__eq))( self, variable1 /*dir*/) /*ToolContext::clibdir=*/; + } + if (UNTAG_Bool(REGB0)) { + /* ./nitc.nit:88 */ + if (!once_value_5) { + if (!once_value_6) { + fra.me.REG[2] = BOX_NativeString("NIT_DIR"); + REGB0 = TAG_Int(7); + 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]; + fra.me.REG[2] = CALL_symbol___String___to_symbol(fra.me.REG[2])(fra.me.REG[2]); + fra.me.REG[2] = CALL_environ___Symbol___environ(fra.me.REG[2])(fra.me.REG[2]); + 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]; + /* ./nitc.nit:89 */ + REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[2])(fra.me.REG[2]); + if (UNTAG_Bool(REGB0)) { + /* ./nitc.nit:90 */ + REGB0 = TAG_Int(3); + fra.me.REG[0] = NEW_Array_array___Array___with_capacity(REGB0); + if (!once_value_7) { + 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_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[0])(fra.me.REG[0], fra.me.REG[3]); + fra.me.REG[3] = CALL_kernel___Object___sys(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[3] = CALL_string___Sys___program_name(fra.me.REG[3])(fra.me.REG[3]); + fra.me.REG[3] = CALL_file___String___dirname(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]); + if (!once_value_8) { + fra.me.REG[3] = BOX_NativeString("/../clib"); + REGB0 = TAG_Int(8); + fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0); + 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]; + 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]); + fra.me.REG[2] = fra.me.REG[0]; + /* ./nitc.nit:91 */ + REGB0 = CALL_file___String___file_exists(fra.me.REG[2])(fra.me.REG[2]); + if (UNTAG_Bool(REGB0)) { + CALL_compiling_base___ToolContext___clibdir__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); + } + } else { + /* ./nitc.nit:93 */ + REGB0 = TAG_Int(3); + fra.me.REG[0] = NEW_Array_array___Array___with_capacity(REGB0); + if (!once_value_9) { + 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_9 = fra.me.REG[3]; + register_static_object(&once_value_9); + } else fra.me.REG[3] = once_value_9; + 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]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]); + if (!once_value_10) { + fra.me.REG[3] = BOX_NativeString("/clib"); + REGB0 = TAG_Int(5); + fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0); + once_value_10 = fra.me.REG[3]; + register_static_object(&once_value_10); + } else fra.me.REG[3] = once_value_10; + 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]); + fra.me.REG[2] = fra.me.REG[0]; + /* ./nitc.nit:94 */ + REGB0 = CALL_file___String___file_exists(fra.me.REG[2])(fra.me.REG[2]); + if (UNTAG_Bool(REGB0)) { + CALL_compiling_base___ToolContext___clibdir__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); } - } else { /*if*/ - variable1 = NEW_String_string___String___init(); /*new String*/ - variable2 = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/ - variable3 = variable2; - ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable3) /*String::append*/; - variable4 = variable0 /*dir*/; - ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable4) /*String::append*/; - variable5 = NEW_String_string___String___with_native(BOX_NativeString("/lib"), TAG_Int(4)); /*new String*/ - variable6 = variable5; - ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable6) /*String::append*/; - variable0 = variable1 /*dir=*/; - variable1 = ((file___String___file_exists_t)CALL( variable0 /*dir*/,COLOR_file___String___file_exists))( variable0 /*dir*/) /*String::file_exists*/; - if (UNTAG_Bool(variable1)) { /*if*/ - ((compiling_base___ToolContext___clibdir__eq_t)CALL( self,COLOR_compiling_base___ToolContext___clibdir__eq))( self, variable0 /*dir*/) /*ToolContext::clibdir=*/; + } + /* ./nitc.nit:96 */ + fra.me.REG[2] = CALL_compiling_base___ToolContext___clibdir(fra.me.REG[1])(fra.me.REG[1]); + 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; } } - variable1 = ((compiling_base___ToolContext___clibdir_t)CALL( self,COLOR_compiling_base___ToolContext___clibdir))( self) /*ToolContext::clibdir*/; - variable1 = TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && UNTAG_Bool(((string___String_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*String::==*/))); - if (UNTAG_Bool(variable1)) { /*if*/ - variable1 = NEW_String_string___String___with_native(BOX_NativeString("Error: Cannot locate NIT C library directory. Uses --clibdir or envvar NIT_DIR."), TAG_Int(79)); /*new String*/ - ((mmloader___ToolContext___error_t)CALL( self,COLOR_mmloader___ToolContext___error))( self, variable1) /*ToolContext::error*/; - exit(UNTAG_Int( TAG_Int(1))); + if (UNTAG_Bool(REGB0)) { + /* ./nitc.nit:97 */ + if (!once_value_11) { + fra.me.REG[2] = BOX_NativeString("Error: Cannot locate NIT C library directory. Uses --clibdir or envvar NIT_DIR."); + REGB0 = TAG_Int(79); + 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_mmloader___ToolContext___fatal_error(fra.me.REG[1])(fra.me.REG[1], NIT_NULL, fra.me.REG[2]); } } - variable0 = ((nitc___NitCompiler___opt_bindir_t)CALL( self,COLOR_nitc___NitCompiler___opt_bindir))( self) /*NitCompiler::opt_bindir*/; - variable0 = ((opts___Option___value_t)CALL(variable0,COLOR_opts___Option___value))(variable0) /*Option::value*/; - ((compiling_base___ToolContext___bindir__eq_t)CALL( self,COLOR_compiling_base___ToolContext___bindir__eq))( self, variable0) /*ToolContext::bindir=*/; - variable0 = ((compiling_base___ToolContext___bindir_t)CALL( self,COLOR_compiling_base___ToolContext___bindir))( self) /*ToolContext::bindir*/; - variable0 = TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && UNTAG_Bool(((string___String_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*String::==*/))); - if (UNTAG_Bool(variable0)) { /*if*/ - if (once_bool_variable1_4) variable1 = once_value_variable1_4; - else { - variable1 = NEW_String_string___String___with_native(BOX_NativeString("NIT_DIR"), TAG_Int(7)); /*new String*/ - variable1 = ((symbol___String___to_symbol_t)CALL(variable1,COLOR_symbol___String___to_symbol))(variable1) /*String::to_symbol*/; - variable1 = ((environ___Symbol___environ_t)CALL(variable1,COLOR_environ___Symbol___environ))(variable1) /*Symbol::environ*/; - once_value_variable1_4 = variable1; - once_bool_variable1_4 = true; + /* ./nitc.nit:100 */ + fra.me.REG[2] = CALL_nitc___NitCompiler___opt_bindir(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[2] = CALL_opts___Option___value(fra.me.REG[2])(fra.me.REG[2]); + CALL_compiling_base___ToolContext___bindir__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); + /* ./nitc.nit:102 */ + fra.me.REG[2] = CALL_compiling_base___ToolContext___bindir(fra.me.REG[1])(fra.me.REG[1]); + 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; } - variable0 = variable1; - variable1 = ((array___AbstractArray___is_empty_t)CALL( variable0 /*dir*/,COLOR_abstract_collection___Collection___is_empty))( variable0 /*dir*/) /*AbstractArray::is_empty*/; - if (UNTAG_Bool(variable1)) { /*if*/ - variable2 = NEW_String_string___String___init(); /*new String*/ - variable3 = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/ - variable4 = variable3; - ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable4) /*String::append*/; - variable5 = (G_sys); - variable5 = ((string___Sys___program_name_t)CALL(variable5,COLOR_string___Sys___program_name))(variable5) /*Sys::program_name*/; - variable5 = ((file___String___dirname_t)CALL(variable5,COLOR_file___String___dirname))(variable5) /*String::dirname*/; - variable6 = variable5; - ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable6) /*String::append*/; - variable7 = NEW_String_string___String___with_native(BOX_NativeString("/../bin"), TAG_Int(7)); /*new String*/ - variable8 = variable7; - ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable8) /*String::append*/; - variable1 = variable2; - variable2 = ((file___String___file_exists_t)CALL( variable1 /*dir*/,COLOR_file___String___file_exists))( variable1 /*dir*/) /*String::file_exists*/; - if (UNTAG_Bool(variable2)) { /*if*/ - ((compiling_base___ToolContext___bindir__eq_t)CALL( self,COLOR_compiling_base___ToolContext___bindir__eq))( self, variable1 /*dir*/) /*ToolContext::bindir=*/; + } + if (UNTAG_Bool(REGB0)) { + /* ./nitc.nit:103 */ + if (!once_value_12) { + if (!once_value_13) { + fra.me.REG[2] = BOX_NativeString("NIT_DIR"); + REGB0 = TAG_Int(7); + fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0); + once_value_13 = fra.me.REG[2]; + register_static_object(&once_value_13); + } else fra.me.REG[2] = once_value_13; + fra.me.REG[2] = fra.me.REG[2]; + fra.me.REG[2] = CALL_symbol___String___to_symbol(fra.me.REG[2])(fra.me.REG[2]); + fra.me.REG[2] = CALL_environ___Symbol___environ(fra.me.REG[2])(fra.me.REG[2]); + 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]; + /* ./nitc.nit:104 */ + REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[2])(fra.me.REG[2]); + if (UNTAG_Bool(REGB0)) { + /* ./nitc.nit:105 */ + REGB0 = TAG_Int(3); + fra.me.REG[0] = NEW_Array_array___Array___with_capacity(REGB0); + if (!once_value_14) { + 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_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[3] = CALL_kernel___Object___sys(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[3] = CALL_string___Sys___program_name(fra.me.REG[3])(fra.me.REG[3]); + fra.me.REG[3] = CALL_file___String___dirname(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]); + if (!once_value_15) { + fra.me.REG[3] = BOX_NativeString("/../bin"); + REGB0 = TAG_Int(7); + fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0); + 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[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]); + fra.me.REG[2] = fra.me.REG[0]; + /* ./nitc.nit:106 */ + REGB0 = CALL_file___String___file_exists(fra.me.REG[2])(fra.me.REG[2]); + if (UNTAG_Bool(REGB0)) { + CALL_compiling_base___ToolContext___bindir__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); + } + } else { + /* ./nitc.nit:108 */ + REGB0 = TAG_Int(3); + fra.me.REG[0] = NEW_Array_array___Array___with_capacity(REGB0); + if (!once_value_16) { + 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_16 = fra.me.REG[3]; + register_static_object(&once_value_16); + } else fra.me.REG[3] = once_value_16; + 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]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]); + if (!once_value_17) { + fra.me.REG[3] = BOX_NativeString("/bin"); + REGB0 = TAG_Int(4); + 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[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]); + fra.me.REG[2] = fra.me.REG[0]; + /* ./nitc.nit:109 */ + REGB0 = CALL_file___String___file_exists(fra.me.REG[2])(fra.me.REG[2]); + if (UNTAG_Bool(REGB0)) { + CALL_compiling_base___ToolContext___bindir__eq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); } - } else { /*if*/ - variable1 = NEW_String_string___String___init(); /*new String*/ - variable2 = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/ - variable3 = variable2; - ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable3) /*String::append*/; - variable4 = variable0 /*dir*/; - ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable4) /*String::append*/; - variable5 = NEW_String_string___String___with_native(BOX_NativeString("/bin"), TAG_Int(4)); /*new String*/ - variable6 = variable5; - ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable6) /*String::append*/; - variable0 = variable1 /*dir=*/; - variable1 = ((file___String___file_exists_t)CALL( variable0 /*dir*/,COLOR_file___String___file_exists))( variable0 /*dir*/) /*String::file_exists*/; - if (UNTAG_Bool(variable1)) { /*if*/ - ((compiling_base___ToolContext___bindir__eq_t)CALL( self,COLOR_compiling_base___ToolContext___bindir__eq))( self, variable0 /*dir*/) /*ToolContext::bindir=*/; + } + /* ./nitc.nit:111 */ + fra.me.REG[2] = CALL_compiling_base___ToolContext___bindir(fra.me.REG[1])(fra.me.REG[1]); + 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; } } - variable1 = ((compiling_base___ToolContext___bindir_t)CALL( self,COLOR_compiling_base___ToolContext___bindir))( self) /*ToolContext::bindir*/; - variable1 = TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && UNTAG_Bool(((string___String_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*String::==*/))); - if (UNTAG_Bool(variable1)) { /*if*/ - variable1 = NEW_String_string___String___with_native(BOX_NativeString("Error: Cannot locate NIT tools directory. Uses --bindir or envvar NIT_DIR."), TAG_Int(74)); /*new String*/ - ((mmloader___ToolContext___error_t)CALL( self,COLOR_mmloader___ToolContext___error))( self, variable1) /*ToolContext::error*/; - exit(UNTAG_Int( TAG_Int(1))); + if (UNTAG_Bool(REGB0)) { + /* ./nitc.nit:112 */ + if (!once_value_18) { + fra.me.REG[2] = BOX_NativeString("Error: Cannot locate NIT tools directory. Uses --bindir or envvar NIT_DIR."); + REGB0 = TAG_Int(74); + fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0); + once_value_18 = fra.me.REG[2]; + register_static_object(&once_value_18); + } else fra.me.REG[2] = once_value_18; + fra.me.REG[2] = fra.me.REG[2]; + CALL_mmloader___ToolContext___fatal_error(fra.me.REG[1])(fra.me.REG[1], NIT_NULL, fra.me.REG[2]); } } - tracehead = trace.prev; + stack_frame_head = fra.me.prev; return; } -void nitc___NitCompiler___perform_work(val_t self, val_t param0) { - struct trace_t trace = {NULL, NULL, 97, LOCATE_nitc___NitCompiler___perform_work}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - variable0 = param0; - variable1 = ((array___AbstractArray___iterator_t)CALL( variable0 /*mods*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*mods*/) /*AbstractArray::iterator*/; - while (true) { /*for*/ - variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/; - if (!UNTAG_Bool(variable2)) break; /*for*/ - variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/; - variable3 = TAG_Bool(( variable2 /*mod*/==NIT_NULL) || VAL_ISA( variable2 /*mod*/, COLOR_MMSrcModule, ID_MMSrcModule)) /*cast MMSrcModule*/; - if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_nitc___NitCompiler___perform_work, LOCATE_nitc, 100); nit_exit(1);} - ((compiling___MMSrcModule___compile_prog_to_c_t)CALL( variable2 /*mod*/,COLOR_compiling___MMSrcModule___compile_prog_to_c))( variable2 /*mod*/, self) /*MMSrcModule::compile_prog_to_c*/; - continue_6: while(0); - ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/; +void nitc___NitCompiler___perform_work(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; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_nitc; + fra.me.line = 117; + fra.me.meth = LOCATE_nitc___NitCompiler___perform_work; + 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; + /* ./../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[1])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:236 */ + fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[1]); + /* ./../lib/standard//collection//array.nit:237 */ + while(1) { + /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); + /* ./../lib/standard//kernel.nit:212 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)val[UNTAG_Int(REGB0)]; + /* ./nitc.nit:120 */ + fra.me.REG[3] = NEW_Program_program___Program___init(fra.me.REG[3], fra.me.REG[0]); + /* ./nitc.nit:121 */ + fra.me.REG[4] = CALL_nitc___NitCompiler___opt_output_format(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[4] = CALL_opts___OptionEnum___value_name(fra.me.REG[4])(fra.me.REG[4]); + CALL_compiling___Program___output_format__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]); + /* ./nitc.nit:122 */ + CALL_program___Program___compute_main_method(fra.me.REG[3])(fra.me.REG[3]); + /* ./nitc.nit:123 */ + CALL_program___Program___generate_allocation_iroutines(fra.me.REG[3])(fra.me.REG[3]); + /* ./nitc.nit:124 */ + REGB1 = CALL_program___ToolContext___global(fra.me.REG[0])(fra.me.REG[0]); + if (UNTAG_Bool(REGB1)) { + /* ./nitc.nit:125 */ + CALL_analysis___Program___do_global_pre_analysis_optimizations(fra.me.REG[3])(fra.me.REG[3]); + /* ./nitc.nit:126 */ + CALL_analysis___Program___do_global_analysis(fra.me.REG[3])(fra.me.REG[3]); + /* ./nitc.nit:127 */ + CALL_analysis___Program___do_global_post_analysis_optimizations(fra.me.REG[3])(fra.me.REG[3]); + /* ./nitc.nit:128 */ + fra.me.REG[4] = CALL_mmloader___ToolContext___opt_log(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[4] = CALL_opts___Option___value(fra.me.REG[4])(fra.me.REG[4]); + if (UNTAG_Bool(fra.me.REG[4])) { + /* ./nitc.nit:129 */ + fra.me.REG[4] = CALL_mmloader___ToolContext___log_directory(fra.me.REG[0])(fra.me.REG[0]); + CALL_analysis___Program___dump_global_optimizations_information(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]); + /* ./nitc.nit:130 */ + fra.me.REG[4] = CALL_mmloader___ToolContext___log_directory(fra.me.REG[0])(fra.me.REG[0]); + CALL_analysis___Program___dump_global_analysis_information(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]); + } + } + /* ./nitc.nit:133 */ + CALL_table_computation___Program___do_table_computation(fra.me.REG[3])(fra.me.REG[3]); + /* ./nitc.nit:134 */ + CALL_compiling___Program___compile_prog(fra.me.REG[3])(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 label1; + } } - break_6: while(0); - tracehead = trace.prev; + label1: while(0); + stack_frame_head = fra.me.prev; return; } -void nitc___Sys___main(val_t self) { - struct trace_t trace = {NULL, NULL, 107, LOCATE_nitc___Sys___main}; - val_t variable0; - val_t variable1; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_nitc; - variable1 = NEW_NitCompiler_nitc___NitCompiler___init(); /*new NitCompiler*/ - variable0 = variable1; - ((abstracttool___AbstractCompiler___exec_cmd_line_t)CALL( variable0 /*c*/,COLOR_abstracttool___AbstractCompiler___exec_cmd_line))( variable0 /*c*/) /*AbstractCompiler::exec_cmd_line*/; - tracehead = trace.prev; +void nitc___Sys___main(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_nitc; + fra.me.line = 139; + fra.me.meth = LOCATE_nitc___Sys___main; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./nitc.nit:139 */ + fra.me.REG[0] = NEW_NitCompiler_nitc___NitCompiler___init(); + /* ./nitc.nit:140 */ + CALL_abstracttool___AbstractCompiler___exec_cmd_line(fra.me.REG[0])(fra.me.REG[0]); + stack_frame_head = fra.me.prev; return; }