1 /* This C file is generated by NIT to compile module utils. */
2 #include "utils._sep.h"
3 val_t
utils___Object___cmangle(val_t self
, val_t param0
) {
4 struct trace_t trace
= {NULL
, NULL
, 21, LOCATE_utils___Object___cmangle
};
5 static val_t once_value_1
; static int once_bool_1
; /* Once value for variable[4]*/
7 void **closurevariable
= NULL
;
8 trace
.prev
= tracehead
; tracehead
= &trace
;
9 trace
.file
= LOCATE_utils
;
11 /* check if p<Array[Symbol] with p:Symbol */
12 if (( param0
!=NIT_NULL
) && !VAL_ISA( param0
, COLOR_Array
, ID_Array
)) { fprintf(stderr
, "Cast failled"); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_utils___Object___cmangle
, LOCATE_utils
, 22); nit_exit(1); } /*cast Array[Symbol]*/;
14 if (once_bool_1
) variable
[4] = once_value_1
;
16 variable
[4] = variable
[0];
17 variable
[4] = ((utils___Object___cmangle_table_t
)CALL(variable
[4],COLOR_utils___Object___cmangle_table
))(variable
[4]) /*Object::cmangle_table*/;
18 once_value_1
= variable
[4];
21 variable
[3] = variable
[4];
22 variable
[5] = NEW_String_string___String___init(); /*new String*/
23 variable
[4] = variable
[5];
24 variable
[5] = ((array___AbstractArray___iterator_t
)CALL( variable
[1] /*symbols*/,COLOR_abstract_collection___Collection___iterator
))( variable
[1] /*symbols*/) /*AbstractArray::iterator*/;
25 while (true) { /*for*/
26 variable
[6] = ((array___ArrayIterator___is_ok_t
)CALL(variable
[5],COLOR_abstract_collection___Iterator___is_ok
))(variable
[5]) /*ArrayIterator::is_ok*/;
27 if (!UNTAG_Bool(variable
[6])) break; /*for*/
28 variable
[6] = ((array___ArrayIterator___item_t
)CALL(variable
[5],COLOR_abstract_collection___Iterator___item
))(variable
[5]) /*ArrayIterator::item*/;
29 variable
[7] = variable
[6];
30 variable
[8] = ((array___AbstractArray___is_empty_t
)CALL( variable
[4] /*res*/,COLOR_abstract_collection___Collection___is_empty
))( variable
[4] /*res*/) /*AbstractArray::is_empty*/;
31 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable
[8])))) { /*if*/
32 ((string___String___add_t
)CALL( variable
[4] /*res*/,COLOR_abstract_collection___SimpleCollection___add
))( variable
[4] /*res*/, TAG_Char('_')) /*String::add*/;
33 ((string___String___add_t
)CALL( variable
[4] /*res*/,COLOR_abstract_collection___SimpleCollection___add
))( variable
[4] /*res*/, TAG_Char('_')) /*String::add*/;
34 ((string___String___add_t
)CALL( variable
[4] /*res*/,COLOR_abstract_collection___SimpleCollection___add
))( variable
[4] /*res*/, TAG_Char('_')) /*String::add*/;
36 variable
[8] = TAG_Bool(false);
37 variable
[9] = TAG_Bool(true);
38 variable
[11] = ((symbol___Symbol___to_s_t
)CALL( variable
[7] /*sym*/,COLOR_string___Object___to_s
))( variable
[7] /*sym*/) /*Symbol::to_s*/;
39 variable
[10] = variable
[11];
40 variable
[11] = ((array___AbstractArray___iterator_t
)CALL( variable
[10] /*s*/,COLOR_abstract_collection___Collection___iterator
))( variable
[10] /*s*/) /*AbstractArray::iterator*/;
41 while (true) { /*for*/
42 variable
[12] = ((array___ArrayIterator___is_ok_t
)CALL(variable
[11],COLOR_abstract_collection___Iterator___is_ok
))(variable
[11]) /*ArrayIterator::is_ok*/;
43 if (!UNTAG_Bool(variable
[12])) break; /*for*/
44 variable
[12] = ((array___ArrayIterator___item_t
)CALL(variable
[11],COLOR_abstract_collection___Iterator___item
))(variable
[11]) /*ArrayIterator::item*/;
45 variable
[13] = variable
[12];
46 variable
[14] = TAG_Bool(UNTAG_Char( variable
[13] /*c*/)>=UNTAG_Char( TAG_Char('a')));
47 variable
[15] = variable
[14];
48 if (UNTAG_Bool(variable
[15])) { /* and */
49 variable
[15] = TAG_Bool(UNTAG_Char( variable
[13] /*c*/)<=UNTAG_Char( TAG_Char('z')));
51 variable
[14] = variable
[15];
52 variable
[15] = variable
[14];
53 if (!UNTAG_Bool(variable
[15])) { /* or */
54 variable
[15] = TAG_Bool(UNTAG_Char( variable
[13] /*c*/)>=UNTAG_Char( TAG_Char('A')));
55 variable
[16] = variable
[15];
56 if (UNTAG_Bool(variable
[16])) { /* and */
57 variable
[16] = TAG_Bool(UNTAG_Char( variable
[13] /*c*/)<=UNTAG_Char( TAG_Char('Z')));
59 variable
[15] = variable
[16];
61 variable
[14] = variable
[15];
62 variable
[15] = variable
[14];
63 if (!UNTAG_Bool(variable
[15])) { /* or */
64 variable
[15] = TAG_Bool(UNTAG_Char( variable
[13] /*c*/)>=UNTAG_Char( TAG_Char('0')));
65 variable
[16] = variable
[15];
66 if (UNTAG_Bool(variable
[16])) { /* and */
67 variable
[16] = TAG_Bool(UNTAG_Char( variable
[13] /*c*/)<=UNTAG_Char( TAG_Char('9')));
69 variable
[15] = variable
[16];
71 variable
[14] = variable
[15];
72 if (UNTAG_Bool(variable
[14])) { /*if*/
73 ((string___String___add_t
)CALL( variable
[4] /*res*/,COLOR_abstract_collection___SimpleCollection___add
))( variable
[4] /*res*/, variable
[13] /*c*/) /*String::add*/;
74 variable
[8] = TAG_Bool(false) /*underscore=*/;
75 variable
[9] = TAG_Bool(true) /*normal=*/;
77 variable
[14] = TAG_Bool(( variable
[13] /*c*/)==( TAG_Char('_')));
78 variable
[15] = variable
[14];
79 if (UNTAG_Bool(variable
[15])) { /* and */
80 variable
[15] = TAG_Bool(!UNTAG_Bool( variable
[8] /*underscore*/));
82 variable
[14] = variable
[15];
83 if (UNTAG_Bool(variable
[14])) { /*if*/
84 ((string___String___add_t
)CALL( variable
[4] /*res*/,COLOR_abstract_collection___SimpleCollection___add
))( variable
[4] /*res*/, variable
[13] /*c*/) /*String::add*/;
85 variable
[8] = TAG_Bool(true) /*underscore=*/;
86 variable
[9] = TAG_Bool(true) /*normal=*/;
88 variable
[14] = ((abstract_collection___CoupleMap___has_key_t
)CALL( variable
[3] /*table*/,COLOR_abstract_collection___Map___has_key
))( variable
[3] /*table*/, variable
[13] /*c*/) /*CoupleMap::has_key*/;
89 if (UNTAG_Bool(variable
[14])) { /*if*/
90 if (UNTAG_Bool( variable
[9] /*normal*/)) { /*if*/
91 ((string___String___add_t
)CALL( variable
[4] /*res*/,COLOR_abstract_collection___SimpleCollection___add
))( variable
[4] /*res*/, TAG_Char('_')) /*String::add*/;
92 ((string___String___add_t
)CALL( variable
[4] /*res*/,COLOR_abstract_collection___SimpleCollection___add
))( variable
[4] /*res*/, TAG_Char('_')) /*String::add*/;
94 variable
[14] = ((abstract_collection___CoupleMap_____bra_t
)CALL( variable
[3] /*table*/,COLOR_abstract_collection___Map_____bra
))( variable
[3] /*table*/, variable
[13] /*c*/) /*CoupleMap::[]*/;
95 ((string___String___append_t
)CALL( variable
[4] /*res*/,COLOR_abstract_collection___IndexedCollection___append
))( variable
[4] /*res*/, variable
[14]) /*String::append*/;
96 variable
[9] = TAG_Bool(false) /*normal=*/;
97 variable
[8] = TAG_Bool(false) /*underscore=*/;
101 continue_3
: while(0);
102 ((array___ArrayIterator___next_t
)CALL(variable
[11],COLOR_abstract_collection___Iterator___next
))(variable
[11]) /*ArrayIterator::next*/;
105 continue_2
: while(0);
106 ((array___ArrayIterator___next_t
)CALL(variable
[5],COLOR_abstract_collection___Iterator___next
))(variable
[5]) /*ArrayIterator::next*/;
109 variable
[2] = variable
[4] /*res*/;
111 return_label0
: while(false);
112 tracehead
= trace
.prev
;
115 val_t
utils___Object___cmangle_table(val_t self
) {
116 struct trace_t trace
= {NULL
, NULL
, 58, LOCATE_utils___Object___cmangle_table
};
118 void **closurevariable
= NULL
;
119 trace
.prev
= tracehead
; tracehead
= &trace
;
120 trace
.file
= LOCATE_utils
;
122 variable
[3] = NEW_HashMap_hash___HashMap___init(); /*new HashMap[Char, String]*/
123 variable
[2] = variable
[3];
124 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString("plus"), TAG_Int(4)); /*new String*/
125 ((hash___HashMap_____braeq_t
)CALL( variable
[2] /*res*/,COLOR_abstract_collection___Map_____braeq
))( variable
[2] /*res*/, TAG_Char('+'), variable
[3]) /*HashMap::[]=*/;
126 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString("minus"), TAG_Int(5)); /*new String*/
127 ((hash___HashMap_____braeq_t
)CALL( variable
[2] /*res*/,COLOR_abstract_collection___Map_____braeq
))( variable
[2] /*res*/, TAG_Char('-'), variable
[3]) /*HashMap::[]=*/;
128 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString("star"), TAG_Int(4)); /*new String*/
129 ((hash___HashMap_____braeq_t
)CALL( variable
[2] /*res*/,COLOR_abstract_collection___Map_____braeq
))( variable
[2] /*res*/, TAG_Char('*'), variable
[3]) /*HashMap::[]=*/;
130 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString("slash"), TAG_Int(5)); /*new String*/
131 ((hash___HashMap_____braeq_t
)CALL( variable
[2] /*res*/,COLOR_abstract_collection___Map_____braeq
))( variable
[2] /*res*/, TAG_Char('/'), variable
[3]) /*HashMap::[]=*/;
132 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString("percent"), TAG_Int(7)); /*new String*/
133 ((hash___HashMap_____braeq_t
)CALL( variable
[2] /*res*/,COLOR_abstract_collection___Map_____braeq
))( variable
[2] /*res*/, TAG_Char('%'), variable
[3]) /*HashMap::[]=*/;
134 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString("bra"), TAG_Int(3)); /*new String*/
135 ((hash___HashMap_____braeq_t
)CALL( variable
[2] /*res*/,COLOR_abstract_collection___Map_____braeq
))( variable
[2] /*res*/, TAG_Char('['), variable
[3]) /*HashMap::[]=*/;
136 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString("eq"), TAG_Int(2)); /*new String*/
137 ((hash___HashMap_____braeq_t
)CALL( variable
[2] /*res*/,COLOR_abstract_collection___Map_____braeq
))( variable
[2] /*res*/, TAG_Char('='), variable
[3]) /*HashMap::[]=*/;
138 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString("l"), TAG_Int(1)); /*new String*/
139 ((hash___HashMap_____braeq_t
)CALL( variable
[2] /*res*/,COLOR_abstract_collection___Map_____braeq
))( variable
[2] /*res*/, TAG_Char('<'), variable
[3]) /*HashMap::[]=*/;
140 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString("g"), TAG_Int(1)); /*new String*/
141 ((hash___HashMap_____braeq_t
)CALL( variable
[2] /*res*/,COLOR_abstract_collection___Map_____braeq
))( variable
[2] /*res*/, TAG_Char('>'), variable
[3]) /*HashMap::[]=*/;
142 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString("n"), TAG_Int(1)); /*new String*/
143 ((hash___HashMap_____braeq_t
)CALL( variable
[2] /*res*/,COLOR_abstract_collection___Map_____braeq
))( variable
[2] /*res*/, TAG_Char('!'), variable
[3]) /*HashMap::[]=*/;
144 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString("u"), TAG_Int(1)); /*new String*/
145 ((hash___HashMap_____braeq_t
)CALL( variable
[2] /*res*/,COLOR_abstract_collection___Map_____braeq
))( variable
[2] /*res*/, TAG_Char('_'), variable
[3]) /*HashMap::[]=*/;
146 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString("at"), TAG_Int(2)); /*new String*/
147 ((hash___HashMap_____braeq_t
)CALL( variable
[2] /*res*/,COLOR_abstract_collection___Map_____braeq
))( variable
[2] /*res*/, TAG_Char('@'), variable
[3]) /*HashMap::[]=*/;
148 variable
[1] = variable
[2] /*res*/;
150 return_label4
: while(false);
151 tracehead
= trace
.prev
;