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]*/
7 struct WBT_
**closurevariable
= NULL
;
8 trace
.prev
= tracehead
; tracehead
= &trace
;
9 trace
.file
= LOCATE_symbol
;
10 /* Register variable[0]: Local variable */
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
;
17 /* Register variable[3]: Result */
18 variable
[3] = NEW_HashMap_hash___HashMap___init() /*new HashMap[String, Symbol]*/;
19 once_value_1
= variable
[3];
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];
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*/;
40 return_label0
: while(false);
41 tracehead
= trace
.prev
;
44 val_t
symbol___Symbol___to_s(val_t self
) {
45 struct trace_t trace
= {NULL
, NULL
, 37, LOCATE_symbol___Symbol___to_s
};
47 struct WBT_
**closurevariable
= NULL
;
48 trace
.prev
= tracehead
; tracehead
= &trace
;
49 trace
.file
= LOCATE_symbol
;
50 /* Register variable[0]: Local variable */
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];
59 return_label2
: while(false);
60 tracehead
= trace
.prev
;
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
};
66 struct WBT_
**closurevariable
= NULL
;
67 trace
.prev
= tracehead
; tracehead
= &trace
;
68 trace
.file
= LOCATE_symbol
;
69 /* Register variable[0]: Local variable */
71 /* Register variable[1]: Local variable */
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
;