/* 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};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- static val_t once_value_variable2_1; static int once_bool_variable2_1;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_environ;
- variable1 = ((symbol___Symbol___to_s_t)CALL( self,COLOR_string___Object___to_s))( self) /*Symbol::to_s*/;
- variable1 = ((string___String___to_cstring_t)CALL(variable1,COLOR_string___String___to_cstring))(variable1) /*String::to_cstring*/;
- variable1 = ((environ___NativeString___get_environ_t)CALL(variable1,COLOR_environ___NativeString___get_environ))(variable1) /*NativeString::get_environ*/;
- variable0 = variable1;
- if (once_bool_variable2_1) variable2 = once_value_variable2_1;
- else {
- variable2 = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable2 = ((string___String___to_cstring_t)CALL(variable2,COLOR_string___String___to_cstring))(variable2) /*String::to_cstring*/;
- variable2 = ((environ___NativeString___get_environ_t)CALL(variable2,COLOR_environ___NativeString___get_environ))(variable2) /*NativeString::get_environ*/;
- once_value_variable2_1 = variable2;
- once_bool_variable2_1 = true;
+val_t environ___Symbol___environ(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_6; /* 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 = 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] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ 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]);
+ /* ./../lib/standard//environ.nit:24 */
+ if (!once_value_1) {
+ if (!once_value_2) {
+ 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_2 = fra.me.REG[2];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[2] = once_value_2;
+ fra.me.REG[2] = CALL_string___String___to_cstring(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[2] = CALL_environ___NativeString___get_environ(fra.me.REG[2])(fra.me.REG[2]);
+ once_value_1 = fra.me.REG[2];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[2] = once_value_1;
+ REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[1],fra.me.REG[2]));
+ /* ./../lib/standard//environ.nit:25 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ REGB0 = REGB1;
}
- variable1 = variable2;
- variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*res*/ == variable1 /*nulstr*/) || (( variable0 /*res*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*res*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*res*/, variable1 /*nulstr*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*res*/,COLOR_kernel___Object_____eqeq))( variable0 /*res*/, variable1 /*nulstr*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable2)) { /*if*/
- variable2 = NEW_String_string___String___init(); /*new String*/
- variable3 = NEW_String_string___String___with_native(BOX_NativeString("env "), TAG_Int(4)); /*new String*/
- variable4 = variable3;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable4) /*String::append*/;
- variable5 = self;
- variable5 = ((string___String___to_s_t)CALL(variable5,COLOR_string___Object___to_s))(variable5) /*String::to_s*/;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable5) /*String::append*/;
- variable6 = NEW_String_string___String___with_native(BOX_NativeString("="), TAG_Int(1)); /*new String*/
- variable7 = variable6;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable7) /*String::append*/;
- ((string___String___output_t)CALL(variable2,COLOR_kernel___Object___output))(variable2) /*String::output*/;
- ((kernel___Object___output_t)CALL( variable0 /*res*/,COLOR_kernel___Object___output))( variable0 /*res*/) /*Object::output*/;
- variable2 = NEW_String_string___String___from_cstring( variable0 /*res*/); /*new String*/
- variable0 = variable2;
- goto return_label0;
- } else { /*if*/
- variable2 = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable0 = variable2;
- goto return_label0;
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ /* ./../lib/standard//environ.nit:26 */
+ if (!once_value_3) {
+ fra.me.REG[3] = BOX_NativeString("env ");
+ REGB0 = TAG_Int(4);
+ 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;
+ array___Array___add(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ array___Array___add(fra.me.REG[2], fra.me.REG[0]);
+ if (!once_value_4) {
+ 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_4 = fra.me.REG[0];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[0] = once_value_4;
+ array___Array___add(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_kernel___Object___output(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./../lib/standard//environ.nit:27 */
+ CALL_kernel___Object___output(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[1] = NEW_String_string___String___from_cstring(fra.me.REG[1]);
+ /* ./../lib/standard//environ.nit:28 */
+ goto label5;
+ } else {
+ /* ./../lib/standard//environ.nit:30 */
+ if (!once_value_6) {
+ 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_6 = fra.me.REG[2];
+ register_static_object(&once_value_6);
+ } else fra.me.REG[2] = once_value_6;
+ fra.me.REG[1] = fra.me.REG[2];
+ goto label5;
}
- return_label0: while(false);
- tracehead = trace.prev;
- return variable0;
+ label5: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
}
-val_t environ___NativeString___get_environ(val_t self) {
- struct trace_t trace = {NULL, NULL, 36, LOCATE_environ___NativeString___get_environ};
- 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 = 36;
+ 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;
+ fra.me.REG[0] = BOX_NativeString(string_NativeString_NativeString_get_environ_0(UNBOX_NativeString(fra.me.REG[0])));
+ /* ./../lib/standard//environ.nit:36 */
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}