gc: add 'help' option to list all available GC
[nit.git] / c_src / environ._sep.c
index bb60a77..b88e2ad 100644 (file)
 /* 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]*/
-    static val_t once_value_2 = NIT_NULL; /* Once value for string variable[4]*/
-    static val_t once_value_3 = NIT_NULL; /* Once value for string variable[5]*/
-    static val_t once_value_4 = NIT_NULL; /* Once value for string variable[5]*/
-    static val_t once_value_5 = NIT_NULL; /* Once value for string variable[4]*/
-  val_t variable[6];
-  struct WBT_ **closurevariable = NULL;
-  trace.prev = tracehead; tracehead = &trace;
-  trace.file = LOCATE_environ;
-  /* Register variable[0]: Local variable */
-  variable[0] =  self;
-  /* Register variable[1]: Method return value and escape marker */
-  /* Register variable[2]: Local variable */
-  /* Register variable[3]: Result */
-  variable[3] = CALL_string___Object___to_s(variable[0])(variable[0]) /*Symbol::to_s*/;
-  /* Register variable[3]: Result */
-  variable[3] = CALL_string___String___to_cstring(variable[3])(variable[3]) /*String::to_cstring*/;
-  /* Register variable[3]: Result */
-  variable[3] = CALL_environ___NativeString___get_environ(variable[3])(variable[3]) /*NativeString::get_environ*/;
-  variable[2] = variable[3];
-  /* Register variable[3]: Local variable */
-  /* Register variable[4]: Once expression result */
-  if (once_bool_1) variable[4] = once_value_1;
-  else {
-    /* Register variable[4]: Once String constant */
-    if (once_value_2 != NIT_NULL) variable[4] = once_value_2;
-    else {
-      variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
-      once_value_2 = variable[4];
-    }
-    /* Register variable[4]: Result */
-    /* Register variable[4]: Result */
-    variable[4] = CALL_string___String___to_cstring(variable[4])(variable[4]) /*String::to_cstring*/;
-    /* Register variable[4]: Result */
-    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[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;
   }
-  /* Register variable[4]: Result */
-  variable[3] = variable[4];
-  /* Register variable[4]: Result */
-  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]*/ /* Ensure var: Array (for super-string)*/;
-    /* Register variable[5]: Once String constant */
-    if (once_value_3 != NIT_NULL) variable[5] = once_value_3;
-    else {
-      variable[5] = NEW_String_string___String___with_native(BOX_NativeString("env "), TAG_Int(4)) /*new String*/;
-      once_value_3 = variable[5];
-    }
-    /* Register variable[5]: Result */
-    /* Ensure var variable[5]: super-string element*/
-    CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[5]) /*AbstractArray::add*/;
-    /* Ensure var variable[0]: super-string element*/
-    CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], CALL_string___Object___to_s(variable[0])(variable[0]) /*Object::to_s*/) /*AbstractArray::add*/;
-    /* Register variable[5]: Once String constant */
-    if (once_value_4 != NIT_NULL) variable[5] = once_value_4;
-    else {
-      variable[5] = NEW_String_string___String___with_native(BOX_NativeString("="), TAG_Int(1)) /*new String*/;
-      once_value_4 = variable[5];
-    }
-    /* Register variable[5]: Result */
-    /* Ensure var variable[5]: super-string element*/
-    CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[5]) /*AbstractArray::add*/;
-    /* Register variable[4]: Result */
-    variable[4] = CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/;
-    CALL_kernel___Object___output(variable[4])(variable[4]) /*AbstractString::output*/;
-    CALL_kernel___Object___output( variable[2] /*res*/)( variable[2] /*res*/) /*Object::output*/;
-    /* Register variable[4]: Result */
-    variable[4] = NEW_String_string___String___from_cstring( variable[2] /*res*/) /*new String*/;
-    variable[1] = variable[4];
-    goto return_label0;
-  } else { /*if*/
-    /* Register variable[4]: Once String constant */
-    if (once_value_5 != NIT_NULL) variable[4] = once_value_5;
-    else {
-      variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
-      once_value_5 = variable[4];
-    }
-    /* Register variable[4]: Result */
-    variable[1] = variable[4];
-    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 variable[1];
+  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};
-  val_t *variable = NULL;
-  struct WBT_ **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 = 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];
 }