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 p0
, val_t p1
){
4 struct {struct stack_frame_t me
; val_t MORE_REG
[6];} fra
;
9 static val_t once_value_1
; /* Once value */
10 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
11 fra
.me
.file
= LOCATE_utils
;
13 fra
.me
.meth
= LOCATE_utils___Object___cmangle
;
16 fra
.me
.REG
[0] = NIT_NULL
;
17 fra
.me
.REG
[1] = NIT_NULL
;
18 fra
.me
.REG
[2] = NIT_NULL
;
19 fra
.me
.REG
[3] = NIT_NULL
;
20 fra
.me
.REG
[4] = NIT_NULL
;
21 fra
.me
.REG
[5] = NIT_NULL
;
22 fra
.me
.REG
[6] = NIT_NULL
;
26 fra
.me
.REG
[2] = fra
.me
.REG
[0];
27 REGB0
= TAG_Bool(VAL_ISA(fra
.me
.REG
[1], COLOR_standard___collection___array___Array
, ID_standard___collection___array___Array
)) /*cast Array[Symbol]*/;
28 if (UNTAG_Bool(REGB0
)) {
30 nit_abort("Cast failed", NULL
, LOCATE_utils
, 21);
34 fra
.me
.REG
[2] = CALL_utils___Object___cmangle_table(fra
.me
.REG
[2])(fra
.me
.REG
[2]);
35 once_value_1
= fra
.me
.REG
[2];
36 register_static_object(&once_value_1
);
37 } else fra
.me
.REG
[2] = once_value_1
;
38 fra
.me
.REG
[2] = fra
.me
.REG
[2];
40 fra
.me
.REG
[0] = NEW_Buffer_standard___string___Buffer___init();
41 /* ./../lib/standard//collection//array.nit:269 */
43 /* ./../lib/standard//collection//array.nit:270 */
44 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
45 if (UNTAG_Bool(REGB1
)) {
47 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 270);
49 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
50 /* ./../lib/standard//collection//array.nit:271 */
51 fra
.me
.REG
[3] = ATTR_standard___collection___array___Array____items(fra
.me
.REG
[1]);
52 /* ./../lib/standard//collection//array.nit:272 */
54 /* ./../lib/standard//collection//array.nit:24 */
55 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
56 if (UNTAG_Bool(REGB1
)) {
58 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
60 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
61 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
62 if (UNTAG_Bool(REGB2
)) {
64 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
66 /* ./../lib/standard//kernel.nit:232 */
67 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)<UNTAG_Int(REGB1
));
68 /* ./../lib/standard//collection//array.nit:272 */
69 if (UNTAG_Bool(REGB1
)) {
70 /* ./../lib/standard//collection//array.nit:273 */
71 REGB1
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
72 if (UNTAG_Bool(REGB1
)) {
73 nit_abort("Reciever is null", NULL
, LOCATE_standard___collection___array
, 273);
75 /* ./../lib/standard//collection//array.nit:718 */
76 fra
.me
.REG
[4] = ((Nit_NativeArray
)fra
.me
.REG
[3])->val
[UNTAG_Int(REGB0
)];
78 REGB1
= CALL_standard___collection___abstract_collection___Collection___is_empty(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
79 REGB1
= TAG_Bool(!UNTAG_Bool(REGB1
));
80 if (UNTAG_Bool(REGB1
)) {
82 REGB1
= TAG_Char('_');
83 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB1
);
85 REGB1
= TAG_Char('_');
86 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB1
);
88 REGB1
= TAG_Char('_');
89 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB1
);
92 REGB1
= TAG_Bool(false);
93 fra
.me
.REG
[5] = REGB1
;
95 REGB1
= TAG_Bool(true);
96 fra
.me
.REG
[6] = REGB1
;
98 fra
.me
.REG
[4] = CALL_standard___string___Object___to_s(fra
.me
.REG
[4])(fra
.me
.REG
[4]);
99 CALL_standard___collection___abstract_collection___Collection___iterate(fra
.me
.REG
[4])(fra
.me
.REG
[4], (&(fra
.me
)), ((fun_t
)OC_utils___Object___cmangle_2
));
100 /* ./../lib/standard//collection//array.nit:274 */
102 /* ./../lib/standard//kernel.nit:235 */
103 REGB1
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB1
));
104 /* ./../lib/standard//collection//array.nit:274 */
107 /* ./../lib/standard//collection//array.nit:272 */
113 fra
.me
.REG
[0] = CALL_standard___string___Object___to_s(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
116 stack_frame_head
= fra
.me
.prev
;
117 return fra
.me
.REG
[0];
119 void OC_utils___Object___cmangle_2(struct stack_frame_t
*closctx
, val_t p0
){
120 struct {struct stack_frame_t me
;} fra
;
127 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
128 fra
.me
.file
= LOCATE_utils
;
130 fra
.me
.meth
= LOCATE_utils___Object___cmangle
;
131 fra
.me
.has_broke
= 0;
133 fra
.me
.REG
[0] = NIT_NULL
;
135 REGB0
= fra
.me
.REG
[0];
137 REGB1
= TAG_Char('a');
138 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
139 if (UNTAG_Bool(REGB2
)) {
141 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
143 /* ./../lib/standard//kernel.nit:384 */
144 REGB1
= TAG_Bool(UNTAG_Char(REGB0
)>=UNTAG_Char(REGB1
));
146 if (UNTAG_Bool(REGB1
)) {
147 REGB1
= TAG_Char('z');
148 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
149 if (UNTAG_Bool(REGB2
)) {
151 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
153 /* ./../lib/standard//kernel.nit:382 */
154 REGB1
= TAG_Bool(UNTAG_Char(REGB0
)<=UNTAG_Char(REGB1
));
157 REGB2
= TAG_Bool(false);
160 if (UNTAG_Bool(REGB1
)) {
161 REGB1
= TAG_Bool(true);
163 REGB2
= TAG_Char('A');
164 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
165 if (UNTAG_Bool(REGB3
)) {
167 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
169 /* ./../lib/standard//kernel.nit:384 */
170 REGB2
= TAG_Bool(UNTAG_Char(REGB0
)>=UNTAG_Char(REGB2
));
172 if (UNTAG_Bool(REGB2
)) {
173 REGB2
= TAG_Char('Z');
174 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
175 if (UNTAG_Bool(REGB3
)) {
177 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
179 /* ./../lib/standard//kernel.nit:382 */
180 REGB2
= TAG_Bool(UNTAG_Char(REGB0
)<=UNTAG_Char(REGB2
));
183 REGB3
= TAG_Bool(false);
188 if (UNTAG_Bool(REGB1
)) {
189 REGB1
= TAG_Bool(true);
191 REGB2
= TAG_Char('0');
192 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
193 if (UNTAG_Bool(REGB3
)) {
195 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
197 /* ./../lib/standard//kernel.nit:384 */
198 REGB2
= TAG_Bool(UNTAG_Char(REGB0
)>=UNTAG_Char(REGB2
));
200 if (UNTAG_Bool(REGB2
)) {
201 REGB2
= TAG_Char('9');
202 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
203 if (UNTAG_Bool(REGB3
)) {
205 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
207 /* ./../lib/standard//kernel.nit:382 */
208 REGB2
= TAG_Bool(UNTAG_Char(REGB0
)<=UNTAG_Char(REGB2
));
211 REGB3
= TAG_Bool(false);
216 if (UNTAG_Bool(REGB1
)) {
218 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[0])(closctx
->REG
[0], REGB0
);
220 REGB1
= TAG_Bool(false);
221 closctx
->REG
[5] = REGB1
;
223 REGB1
= TAG_Bool(true);
224 closctx
->REG
[6] = REGB1
;
227 REGB1
= TAG_Char('_');
228 REGB2
= TAG_Bool(IS_EQUAL_OO(REGB0
,REGB1
));
229 if (UNTAG_Bool(REGB2
)) {
231 /* ./../lib/standard//kernel.nit:378 */
232 REGB1
= TAG_Bool((REGB0
)==(REGB1
));
236 if (UNTAG_Bool(REGB2
)) {
237 REGB2
= TAG_Bool(!UNTAG_Bool(closctx
->REG
[5]));
239 REGB1
= TAG_Bool(false);
242 if (UNTAG_Bool(REGB2
)) {
244 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[0])(closctx
->REG
[0], REGB0
);
246 REGB2
= TAG_Bool(true);
247 closctx
->REG
[5] = REGB2
;
249 REGB2
= TAG_Bool(true);
250 closctx
->REG
[6] = REGB2
;
253 REGB2
= CALL_standard___collection___abstract_collection___MapRead___has_key(closctx
->REG
[2])(closctx
->REG
[2], REGB0
);
254 if (UNTAG_Bool(REGB2
)) {
256 if (UNTAG_Bool(closctx
->REG
[6])) {
258 REGB2
= TAG_Char('_');
259 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[0])(closctx
->REG
[0], REGB2
);
261 REGB2
= TAG_Char('_');
262 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[0])(closctx
->REG
[0], REGB2
);
265 fra
.me
.REG
[0] = CALL_standard___collection___abstract_collection___MapRead_____bra(closctx
->REG
[2])(closctx
->REG
[2], REGB0
);
266 CALL_standard___collection___abstract_collection___Sequence___append(closctx
->REG
[0])(closctx
->REG
[0], fra
.me
.REG
[0]);
268 REGB0
= TAG_Bool(false);
269 closctx
->REG
[6] = REGB0
;
271 REGB0
= TAG_Bool(false);
272 closctx
->REG
[5] = REGB0
;
276 stack_frame_head
= fra
.me
.prev
;
279 val_t
utils___Object___cmangle_table(val_t p0
){
280 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
284 static val_t once_value_1
; /* Once value */
285 static val_t once_value_2
; /* Once value */
286 static val_t once_value_3
; /* Once value */
287 static val_t once_value_4
; /* Once value */
288 static val_t once_value_5
; /* Once value */
289 static val_t once_value_6
; /* Once value */
290 static val_t once_value_7
; /* Once value */
291 static val_t once_value_8
; /* Once value */
292 static val_t once_value_9
; /* Once value */
293 static val_t once_value_10
; /* Once value */
294 static val_t once_value_11
; /* Once value */
295 static val_t once_value_12
; /* Once value */
296 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
297 fra
.me
.file
= LOCATE_utils
;
299 fra
.me
.meth
= LOCATE_utils___Object___cmangle_table
;
300 fra
.me
.has_broke
= 0;
302 fra
.me
.REG
[0] = NIT_NULL
;
303 fra
.me
.REG
[1] = NIT_NULL
;
306 fra
.me
.REG
[0] = NEW_HashMap_standard___collection___hash_collection___HashMap___init();
308 REGB0
= TAG_Char('+');
310 fra
.me
.REG
[1] = BOX_NativeString("plus");
312 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
313 once_value_1
= fra
.me
.REG
[1];
314 register_static_object(&once_value_1
);
315 } else fra
.me
.REG
[1] = once_value_1
;
316 fra
.me
.REG
[1] = fra
.me
.REG
[1];
317 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
319 REGB0
= TAG_Char('-');
321 fra
.me
.REG
[1] = BOX_NativeString("minus");
323 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
324 once_value_2
= fra
.me
.REG
[1];
325 register_static_object(&once_value_2
);
326 } else fra
.me
.REG
[1] = once_value_2
;
327 fra
.me
.REG
[1] = fra
.me
.REG
[1];
328 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
330 REGB0
= TAG_Char('*');
332 fra
.me
.REG
[1] = BOX_NativeString("star");
334 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
335 once_value_3
= fra
.me
.REG
[1];
336 register_static_object(&once_value_3
);
337 } else fra
.me
.REG
[1] = once_value_3
;
338 fra
.me
.REG
[1] = fra
.me
.REG
[1];
339 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
341 REGB0
= TAG_Char('/');
343 fra
.me
.REG
[1] = BOX_NativeString("slash");
345 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
346 once_value_4
= fra
.me
.REG
[1];
347 register_static_object(&once_value_4
);
348 } else fra
.me
.REG
[1] = once_value_4
;
349 fra
.me
.REG
[1] = fra
.me
.REG
[1];
350 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
352 REGB0
= TAG_Char('%');
354 fra
.me
.REG
[1] = BOX_NativeString("percent");
356 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
357 once_value_5
= fra
.me
.REG
[1];
358 register_static_object(&once_value_5
);
359 } else fra
.me
.REG
[1] = once_value_5
;
360 fra
.me
.REG
[1] = fra
.me
.REG
[1];
361 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
363 REGB0
= TAG_Char('[');
365 fra
.me
.REG
[1] = BOX_NativeString("bra");
367 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
368 once_value_6
= fra
.me
.REG
[1];
369 register_static_object(&once_value_6
);
370 } else fra
.me
.REG
[1] = once_value_6
;
371 fra
.me
.REG
[1] = fra
.me
.REG
[1];
372 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
374 REGB0
= TAG_Char('=');
376 fra
.me
.REG
[1] = BOX_NativeString("eq");
378 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
379 once_value_7
= fra
.me
.REG
[1];
380 register_static_object(&once_value_7
);
381 } else fra
.me
.REG
[1] = once_value_7
;
382 fra
.me
.REG
[1] = fra
.me
.REG
[1];
383 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
385 REGB0
= TAG_Char('<');
387 fra
.me
.REG
[1] = BOX_NativeString("l");
389 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
390 once_value_8
= fra
.me
.REG
[1];
391 register_static_object(&once_value_8
);
392 } else fra
.me
.REG
[1] = once_value_8
;
393 fra
.me
.REG
[1] = fra
.me
.REG
[1];
394 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
396 REGB0
= TAG_Char('>');
398 fra
.me
.REG
[1] = BOX_NativeString("g");
400 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
401 once_value_9
= fra
.me
.REG
[1];
402 register_static_object(&once_value_9
);
403 } else fra
.me
.REG
[1] = once_value_9
;
404 fra
.me
.REG
[1] = fra
.me
.REG
[1];
405 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
407 REGB0
= TAG_Char('!');
408 if (!once_value_10
) {
409 fra
.me
.REG
[1] = BOX_NativeString("n");
411 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
412 once_value_10
= fra
.me
.REG
[1];
413 register_static_object(&once_value_10
);
414 } else fra
.me
.REG
[1] = once_value_10
;
415 fra
.me
.REG
[1] = fra
.me
.REG
[1];
416 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
418 REGB0
= TAG_Char('_');
419 if (!once_value_11
) {
420 fra
.me
.REG
[1] = BOX_NativeString("u");
422 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
423 once_value_11
= fra
.me
.REG
[1];
424 register_static_object(&once_value_11
);
425 } else fra
.me
.REG
[1] = once_value_11
;
426 fra
.me
.REG
[1] = fra
.me
.REG
[1];
427 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
429 REGB0
= TAG_Char('@');
430 if (!once_value_12
) {
431 fra
.me
.REG
[1] = BOX_NativeString("at");
433 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
434 once_value_12
= fra
.me
.REG
[1];
435 register_static_object(&once_value_12
);
436 } else fra
.me
.REG
[1] = once_value_12
;
437 fra
.me
.REG
[1] = fra
.me
.REG
[1];
438 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
442 stack_frame_head
= fra
.me
.prev
;
443 return fra
.me
.REG
[0];