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
};
7 static val_t once_value_variable1_1
; static int once_bool_variable1_1
;
9 trace
.prev
= tracehead
; tracehead
= &trace
;
10 trace
.file
= LOCATE_symbol
;
11 if (once_bool_variable1_1
) variable1
= once_value_variable1_1
;
13 variable1
= NEW_hash___HashMap___init(); /*new HashMap[K, V]*/
14 once_value_variable1_1
= variable1
;
15 once_bool_variable1_1
= true;
17 variable0
= variable1
;
18 variable1
= ((abstract_collection___CoupleMap___has_key_t
)CALL( variable0
/*symbol_dictionary*/,COLOR_abstract_collection___Map___has_key
))( variable0
/*symbol_dictionary*/, self
) /*CoupleMap::has_key*/;
19 if (UNTAG_Bool(variable1
)) { /*if*/
20 variable1
= ((abstract_collection___CoupleMap_____bra_t
)CALL( variable0
/*symbol_dictionary*/,COLOR_abstract_collection___Map_____bra
))( variable0
/*symbol_dictionary*/, self
) /*CoupleMap::[]*/;
21 variable0
= variable1
;
24 variable2
= NEW_symbol___Symbol___init( self
); /*new Symbol*/
25 variable1
= variable2
;
26 ((hash___HashMap_____braeq_t
)CALL( variable0
/*symbol_dictionary*/,COLOR_abstract_collection___Map_____braeq
))( variable0
/*symbol_dictionary*/, self
, variable1
/*symbol*/) /*HashMap::[]=*/;
27 variable0
= variable1
/*symbol*/;
30 return_label0
: while(false);
31 tracehead
= trace
.prev
;
34 val_t
symbol___Symbol___to_s(val_t self
) {
35 struct trace_t trace
= {NULL
, NULL
, 37, LOCATE_symbol___Symbol___to_s
};
37 trace
.prev
= tracehead
; tracehead
= &trace
;
38 trace
.file
= LOCATE_symbol
;
39 variable0
= ATTR_symbol___Symbol____string( self
) /*Symbol::_string*/;
40 variable0
= ((string___String___to_s_t
)CALL(variable0
,COLOR_string___Object___to_s
))(variable0
) /*String::to_s*/;
42 return_label2
: while(false);
43 tracehead
= trace
.prev
;
46 void symbol___Symbol___init(val_t self
, val_t param0
, int* init_table
) {
47 struct trace_t trace
= {NULL
, NULL
, 39, LOCATE_symbol___Symbol___init
};
49 trace
.prev
= tracehead
; tracehead
= &trace
;
50 trace
.file
= LOCATE_symbol
;
52 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_Symbol
].i
]) return;
53 ATTR_symbol___Symbol____string( self
) /*Symbol::_string*/ = variable0
/*s*/;
54 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_Symbol
].i
] = 1;
55 tracehead
= trace
.prev
;