Fix 64 bits: use long int in class tables
[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, LOCATE_symbol___String___to_symbol, 20};
5 val_t variable0;
6 val_t variable1;
7 static val_t once_value_variable1_1; static int once_bool_variable1_1;
8 val_t variable2;
9 trace.prev = tracehead; tracehead = &trace;
10 if (once_bool_variable1_1) variable1 = once_value_variable1_1;
11 else {
12 variable1 = NEW_hash___HashMap___init(); /*new HashMap[String, Symbol]*/
13 once_value_variable1_1 = variable1;
14 once_bool_variable1_1 = true;
15 }
16 variable0 = variable1;
17 variable1 = ((abstract_collection___CoupleMap___has_key_t)CALL( variable0 /*symbol_dictionary*/,COLOR_abstract_collection___Map___has_key))( variable0 /*symbol_dictionary*/, self) /*HashMap::has_key*/;
18 if (UNTAG_Bool(variable1)) { /*if*/
19 variable1 = ((abstract_collection___CoupleMap_____bra_t)CALL( variable0 /*symbol_dictionary*/,COLOR_abstract_collection___Map_____bra))( variable0 /*symbol_dictionary*/, self) /*HashMap::[]*/;
20 variable0 = variable1;
21 goto return_label0;
22 } else { /*if*/
23 variable2 = NEW_symbol___Symbol___init( self); /*new Symbol*/
24 variable1 = variable2;
25 ((hash___HashMap_____braeq_t)CALL( variable0 /*symbol_dictionary*/,COLOR_abstract_collection___Map_____braeq))( variable0 /*symbol_dictionary*/, self, variable1 /*symbol*/) /*HashMap::[]=*/;
26 variable0 = variable1 /*symbol*/;
27 goto return_label0;
28 }
29 return_label0: while(false);
30 tracehead = trace.prev;
31 return variable0;
32 }
33 val_t symbol___Symbol___to_s(val_t self) {
34 struct trace_t trace = {NULL, LOCATE_symbol___Symbol___to_s, 37};
35 val_t variable0;
36 trace.prev = tracehead; tracehead = &trace;
37 variable0 = ATTR_symbol___Symbol____string( self) /*Symbol::_string*/;
38 variable0 = ((string___String___to_s_t)CALL(variable0,COLOR_string___Object___to_s))(variable0) /*String::to_s*/;
39 goto return_label2;
40 return_label2: while(false);
41 tracehead = trace.prev;
42 return variable0;
43 }
44 void symbol___Symbol___init(val_t self, val_t param0, int* init_table) {
45 struct trace_t trace = {NULL, LOCATE_symbol___Symbol___init, 39};
46 val_t variable0;
47 trace.prev = tracehead; tracehead = &trace;
48 variable0 = param0;
49 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Symbol].i]) return;
50 ATTR_symbol___Symbol____string( self) /*Symbol::_string*/ = variable0 /*s*/;
51 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Symbol].i] = 1;
52 tracehead = trace.prev;
53 return;
54 }