compile: clean class PrimitiveInfo
[nit.git] / c_src / environ._sep.c
1 /* This C file is generated by NIT to compile module environ. */
2 #include "environ._sep.h"
3 val_t environ___Symbol___environ(val_t self) {
4 struct trace_t trace = {NULL, NULL, 19, LOCATE_environ___Symbol___environ};
5 static val_t once_value_1; static int once_bool_1; /* Once value for variable[4]*/
6 val_t variable[11];
7 void **closurevariable = NULL;
8 trace.prev = tracehead; tracehead = &trace;
9 trace.file = LOCATE_environ;
10 variable[0] = self;
11 variable[3] = variable[0];
12 variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Symbol::to_s*/;
13 variable[3] = CALL_string___String___to_cstring(variable[3])(variable[3]) /*String::to_cstring*/;
14 variable[3] = CALL_environ___NativeString___get_environ(variable[3])(variable[3]) /*NativeString::get_environ*/;
15 variable[2] = variable[3];
16 if (once_bool_1) variable[4] = once_value_1;
17 else {
18 variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
19 variable[4] = CALL_string___String___to_cstring(variable[4])(variable[4]) /*String::to_cstring*/;
20 variable[4] = CALL_environ___NativeString___get_environ(variable[4])(variable[4]) /*NativeString::get_environ*/;
21 once_value_1 = variable[4];
22 once_bool_1 = true;
23 }
24 variable[3] = variable[4];
25 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::==*/)))))));
26 if (UNTAG_Bool(variable[4])) { /*if*/
27 variable[4] = NEW_Array_array___Array___with_capacity(TAG_Int(3)); /*new Array[String]*/
28 variable[5] = NEW_String_string___String___with_native(BOX_NativeString("env "), TAG_Int(4)); /*new String*/
29 variable[6] = variable[5];
30 CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[6]) /*AbstractArray::add*/;
31 variable[7] = variable[0];
32 variable[8] = variable[7];
33 variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
34 CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[8]) /*AbstractArray::add*/;
35 variable[9] = NEW_String_string___String___with_native(BOX_NativeString("="), TAG_Int(1)); /*new String*/
36 variable[10] = variable[9];
37 CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[10]) /*AbstractArray::add*/;
38 variable[4] = CALL_string___Object___to_s(variable[4])(variable[4]) /*Object::to_s*/;
39 CALL_kernel___Object___output(variable[4])(variable[4]) /*String::output*/;
40 CALL_kernel___Object___output( variable[2] /*res*/)( variable[2] /*res*/) /*Object::output*/;
41 variable[4] = NEW_String_string___String___from_cstring( variable[2] /*res*/); /*new String*/
42 variable[1] = variable[4];
43 goto return_label0;
44 } else { /*if*/
45 variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
46 variable[1] = variable[4];
47 goto return_label0;
48 }
49 return_label0: while(false);
50 tracehead = trace.prev;
51 return variable[1];
52 }
53 val_t environ___NativeString___get_environ(val_t self) {
54 struct trace_t trace = {NULL, NULL, 36, LOCATE_environ___NativeString___get_environ};
55 val_t *variable = NULL;
56 void **closurevariable = NULL;
57 trace.prev = tracehead; tracehead = &trace;
58 trace.file = LOCATE_environ;
59 tracehead = trace.prev;
60 return BOX_NativeString(string_NativeString_NativeString_get_environ_0(UNBOX_NativeString( self)));
61 }