X-Git-Url: http://nitlanguage.org diff --git a/c_src/environ._sep.c b/c_src/environ._sep.c index 6b66ff5..291c30f 100644 --- a/c_src/environ._sep.c +++ b/c_src/environ._sep.c @@ -1,61 +1,84 @@ /* This C file is generated by NIT to compile module environ. */ #include "environ._sep.h" -val_t environ___Symbol___environ(val_t self) { - struct trace_t trace = {NULL, NULL, 19, LOCATE_environ___Symbol___environ}; - static val_t once_value_1; static int once_bool_1; /* Once value for variable[4]*/ - val_t variable[11]; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_environ; - variable[0] = self; - variable[3] = variable[0]; - variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Symbol::to_s*/; - variable[3] = CALL_string___String___to_cstring(variable[3])(variable[3]) /*String::to_cstring*/; - variable[3] = CALL_environ___NativeString___get_environ(variable[3])(variable[3]) /*NativeString::get_environ*/; - variable[2] = variable[3]; - if (once_bool_1) variable[4] = once_value_1; - else { - variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/ - variable[4] = CALL_string___String___to_cstring(variable[4])(variable[4]) /*String::to_cstring*/; - variable[4] = CALL_environ___NativeString___get_environ(variable[4])(variable[4]) /*NativeString::get_environ*/; - once_value_1 = variable[4]; - once_bool_1 = true; +val_t environ___Symbol___environ(val_t p0){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} 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_4; /* Once value */ + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_environ; + fra.me.line = 19; + fra.me.meth = LOCATE_environ___Symbol___environ; + 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; + /* ./../lib/standard//environ.nit:22 */ + fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[0] = CALL_string___String___to_cstring(fra.me.REG[0])(fra.me.REG[0]); + fra.me.REG[0] = CALL_environ___NativeString___get_environ(fra.me.REG[0])(fra.me.REG[0]); + /* ./../lib/standard//environ.nit:24 */ + if (!once_value_1) { + if (!once_value_2) { + fra.me.REG[1] = BOX_NativeString(""); + REGB0 = TAG_Int(0); + 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]; + fra.me.REG[1] = CALL_string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]); + fra.me.REG[1] = CALL_environ___NativeString___get_environ(fra.me.REG[1])(fra.me.REG[1]); + once_value_1 = fra.me.REG[1]; + register_static_object(&once_value_1); + } else fra.me.REG[1] = once_value_1; + fra.me.REG[1] = fra.me.REG[1]; + /* ./../lib/standard//environ.nit:25 */ + REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[0],fra.me.REG[1])); + if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + REGB0 = REGB1; } - variable[3] = variable[4]; - variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[2] /*res*/ == variable[3] /*nulstr*/) || (( variable[2] /*res*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[2] /*res*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[2] /*res*/, variable[3] /*nulstr*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[2] /*res*/)( variable[2] /*res*/, variable[3] /*nulstr*/) /*Object::==*/))))))); - if (UNTAG_Bool(variable[4])) { /*if*/ - variable[4] = NEW_Array_array___Array___with_capacity(TAG_Int(3)); /*new Array[String]*/ - variable[5] = NEW_String_string___String___with_native(BOX_NativeString("env "), TAG_Int(4)); /*new String*/ - variable[6] = variable[5]; - CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[6]) /*AbstractArray::add*/; - variable[7] = variable[0]; - variable[8] = variable[7]; - variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/; - CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[8]) /*AbstractArray::add*/; - variable[9] = NEW_String_string___String___with_native(BOX_NativeString("="), TAG_Int(1)); /*new String*/ - variable[10] = variable[9]; - CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[10]) /*AbstractArray::add*/; - variable[4] = CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/; - CALL_kernel___Object___output(variable[4])(variable[4]) /*String::output*/; - CALL_kernel___Object___output( variable[2] /*res*/)( variable[2] /*res*/) /*Object::output*/; - variable[4] = NEW_String_string___String___from_cstring( variable[2] /*res*/); /*new String*/ - variable[1] = variable[4]; - goto return_label0; - } else { /*if*/ - variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/ - variable[1] = variable[4]; - goto return_label0; + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//environ.nit:26 */ + fra.me.REG[0] = NEW_String_string___String___from_cstring(fra.me.REG[0]); + goto label3; + } else { + /* ./../lib/standard//environ.nit:28 */ + if (!once_value_4) { + fra.me.REG[1] = BOX_NativeString(""); + REGB0 = TAG_Int(0); + fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0); + once_value_4 = fra.me.REG[1]; + register_static_object(&once_value_4); + } else fra.me.REG[1] = once_value_4; + fra.me.REG[1] = fra.me.REG[1]; + fra.me.REG[0] = fra.me.REG[1]; + goto label3; } - return_label0: while(false); - tracehead = trace.prev; - return variable[1]; + label3: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; } -val_t environ___NativeString___get_environ(val_t self) { - struct trace_t trace = {NULL, NULL, 36, LOCATE_environ___NativeString___get_environ}; - val_t *variable = NULL; - void **closurevariable = NULL; - trace.prev = tracehead; tracehead = &trace; - trace.file = LOCATE_environ; - tracehead = trace.prev; - return BOX_NativeString(string_NativeString_NativeString_get_environ_0(UNBOX_NativeString( self))); +val_t environ___NativeString___get_environ(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_environ; + fra.me.line = 34; + fra.me.meth = LOCATE_environ___NativeString___get_environ; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./../lib/standard//environ.nit:34 */ + fra.me.REG[0] = BOX_NativeString(string_NativeString_NativeString_get_environ_0(UNBOX_NativeString(fra.me.REG[0]))); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; }