misc: update Changelog and NOTICE; remove BUGS and TODO
[nit.git] / c_src / symbol._sep.c
1 /* This C file is generated by NIT to compile module symbol. */
2 #include "symbol._sep.h"
3 val_t symbol___String___to_symbol(val_t self) {
4 struct trace_t trace = {NULL, NULL, 20, LOCATE_symbol___String___to_symbol};
5 static val_t once_value_1; static int once_bool_1; /* Once value for variable[3]*/
6 val_t variable[5];
7 struct WBT_ **closurevariable = NULL;
8 trace.prev = tracehead; tracehead = &trace;
9 trace.file = LOCATE_symbol;
10 /* Register variable[0]: Local variable */
11 variable[0] = self;
12 /* Register variable[1]: Method return value and escape marker */
13 /* Register variable[2]: Local variable */
14 /* Register variable[3]: Once expression result */
15 if (once_bool_1) variable[3] = once_value_1;
16 else {
17 /* Register variable[3]: Result */
18 variable[3] = NEW_HashMap_hash___HashMap___init() /*new HashMap[String, Symbol]*/;
19 once_value_1 = variable[3];
20 once_bool_1 = true;
21 }
22 /* Register variable[3]: Result */
23 variable[2] = variable[3];
24 /* Register variable[3]: Result */
25 variable[3] = CALL_abstract_collection___MapRead___has_key( variable[2] /*symbol_dictionary*/)( variable[2] /*symbol_dictionary*/, variable[0]) /*CoupleMap::has_key*/;
26 if (UNTAG_Bool(variable[3])) { /*if*/
27 /* Register variable[3]: Result */
28 variable[3] = CALL_abstract_collection___MapRead_____bra( variable[2] /*symbol_dictionary*/)( variable[2] /*symbol_dictionary*/, variable[0]) /*CoupleMap::[]*/;
29 variable[1] = variable[3];
30 goto return_label0;
31 } else { /*if*/
32 /* Register variable[3]: Local variable */
33 /* Register variable[4]: Result */
34 variable[4] = NEW_Symbol_symbol___Symbol___init(variable[0]) /*new Symbol*/;
35 variable[3] = variable[4];
36 CALL_abstract_collection___Map_____braeq( variable[2] /*symbol_dictionary*/)( variable[2] /*symbol_dictionary*/, variable[0], variable[3] /*symbol*/) /*HashMap::[]=*/;
37 variable[1] = variable[3] /*symbol*/;
38 goto return_label0;
39 }
40 return_label0: while(false);
41 tracehead = trace.prev;
42 return variable[1];
43 }
44 val_t symbol___Symbol___to_s(val_t self) {
45 struct trace_t trace = {NULL, NULL, 37, LOCATE_symbol___Symbol___to_s};
46 val_t variable[3];
47 struct WBT_ **closurevariable = NULL;
48 trace.prev = tracehead; tracehead = &trace;
49 trace.file = LOCATE_symbol;
50 /* Register variable[0]: Local variable */
51 variable[0] = self;
52 /* Register variable[1]: Method return value and escape marker */
53 /* Register variable[2]: Result */
54 variable[2] = ATTR_symbol___Symbol____string(variable[0]) /*Symbol::_string*/;
55 /* Register variable[2]: Result */
56 variable[2] = CALL_string___Object___to_s(variable[2])(variable[2]) /*String::to_s*/;
57 variable[1] = variable[2];
58 goto return_label2;
59 return_label2: while(false);
60 tracehead = trace.prev;
61 return variable[1];
62 }
63 void symbol___Symbol___init(val_t self, val_t param0, int* init_table) {
64 struct trace_t trace = {NULL, NULL, 39, LOCATE_symbol___Symbol___init};
65 val_t variable[3];
66 struct WBT_ **closurevariable = NULL;
67 trace.prev = tracehead; tracehead = &trace;
68 trace.file = LOCATE_symbol;
69 /* Register variable[0]: Local variable */
70 variable[0] = self;
71 /* Register variable[1]: Local variable */
72 variable[1] = param0;
73 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Symbol].i]) return;
74 /* Register variable[2]: Method return value and escape marker */
75 ATTR_symbol___Symbol____string(variable[0]) /*Symbol::_string*/ = variable[1] /*s*/;
76 return_label3: while(false);
77 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Symbol].i] = 1;
78 tracehead = trace.prev;
79 return;
80 }