1 /* This C file is generated by NIT to compile module utils. */
2 #include "utils._sep.h"
3 static const char LOCATE_utils___Object___cmangle
[] = "utils::Object::cmangle";
4 val_t
utils___Object___cmangle(val_t p0
, val_t p1
){
5 struct {struct stack_frame_t me
; val_t MORE_REG
[6];} fra
;
10 static val_t once_value_1
; /* Once value */
11 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
12 fra
.me
.file
= LOCATE_utils
;
14 fra
.me
.meth
= LOCATE_utils___Object___cmangle
;
17 fra
.me
.nitni_local_ref_head
= NULL
;
18 fra
.me
.REG
[0] = NIT_NULL
;
19 fra
.me
.REG
[1] = NIT_NULL
;
20 fra
.me
.REG
[2] = NIT_NULL
;
21 fra
.me
.REG
[3] = NIT_NULL
;
22 fra
.me
.REG
[4] = NIT_NULL
;
23 fra
.me
.REG
[5] = NIT_NULL
;
24 fra
.me
.REG
[6] = NIT_NULL
;
28 fra
.me
.REG
[2] = fra
.me
.REG
[0];
29 REGB0
= TAG_Bool(VAL_ISA(fra
.me
.REG
[1], COLOR_standard___collection___array___Array
, ID_standard___collection___array___Array
)) /*cast Array[Symbol]*/;
30 if (UNTAG_Bool(REGB0
)) {
32 nit_abort("Cast failed", NULL
, LOCATE_utils
, 23);
36 fra
.me
.REG
[2] = CALL_utils___Object___cmangle_table(fra
.me
.REG
[2])(fra
.me
.REG
[2]);
37 once_value_1
= fra
.me
.REG
[2];
38 register_static_object(&once_value_1
);
39 } else fra
.me
.REG
[2] = once_value_1
;
40 fra
.me
.REG
[2] = fra
.me
.REG
[2];
42 fra
.me
.REG
[0] = NEW_Buffer_standard___string___Buffer___init();
43 /* ../lib/standard/collection/array.nit:269 */
45 /* ../lib/standard/collection/array.nit:270 */
46 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
47 if (UNTAG_Bool(REGB1
)) {
49 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 270);
51 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
52 /* ../lib/standard/collection/array.nit:271 */
53 fra
.me
.REG
[3] = ATTR_standard___collection___array___Array____items(fra
.me
.REG
[1]);
54 /* ../lib/standard/collection/array.nit:272 */
56 /* ../lib/standard/collection/array.nit:24 */
57 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
58 if (UNTAG_Bool(REGB1
)) {
60 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
62 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
63 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
64 if (UNTAG_Bool(REGB2
)) {
66 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
68 /* ../lib/standard/kernel.nit:235 */
69 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)<UNTAG_Int(REGB1
));
70 /* ../lib/standard/collection/array.nit:272 */
71 if (UNTAG_Bool(REGB1
)) {
72 /* ../lib/standard/collection/array.nit:273 */
73 REGB1
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
74 if (UNTAG_Bool(REGB1
)) {
75 nit_abort("Reciever is null", NULL
, LOCATE_standard___collection___array
, 273);
77 /* ../lib/standard/collection/array.nit:718 */
78 fra
.me
.REG
[4] = ((Nit_NativeArray
)fra
.me
.REG
[3])->val
[UNTAG_Int(REGB0
)];
80 REGB1
= CALL_standard___collection___abstract_collection___Collection___is_empty(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
81 REGB1
= TAG_Bool(!UNTAG_Bool(REGB1
));
82 if (UNTAG_Bool(REGB1
)) {
84 REGB1
= TAG_Char('_');
85 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB1
);
87 REGB1
= TAG_Char('_');
88 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB1
);
90 REGB1
= TAG_Char('_');
91 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB1
);
95 fra
.me
.REG
[5] = REGB1
;
98 fra
.me
.REG
[6] = REGB1
;
100 fra
.me
.REG
[4] = CALL_standard___string___Object___to_s(fra
.me
.REG
[4])(fra
.me
.REG
[4]);
101 CALL_standard___collection___abstract_collection___Collection___iterate(fra
.me
.REG
[4])(fra
.me
.REG
[4], (&(fra
.me
)), ((fun_t
)OC_utils___Object___cmangle_2
));
102 /* ../lib/standard/collection/array.nit:274 */
104 /* ../lib/standard/kernel.nit:238 */
105 REGB1
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB1
));
106 /* ../lib/standard/collection/array.nit:274 */
109 /* ../lib/standard/collection/array.nit:272 */
115 fra
.me
.REG
[0] = CALL_standard___string___Object___to_s(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
118 stack_frame_head
= fra
.me
.prev
;
119 return fra
.me
.REG
[0];
121 void OC_utils___Object___cmangle_2(struct stack_frame_t
*closctx
, val_t p0
){
122 struct {struct stack_frame_t me
;} fra
;
129 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
130 fra
.me
.file
= LOCATE_utils
;
132 fra
.me
.meth
= LOCATE_utils___Object___cmangle
;
133 fra
.me
.has_broke
= 0;
135 fra
.me
.nitni_local_ref_head
= NULL
;
136 fra
.me
.REG
[0] = NIT_NULL
;
138 REGB0
= fra
.me
.REG
[0];
140 REGB1
= TAG_Char('a');
141 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
142 if (UNTAG_Bool(REGB2
)) {
144 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
146 /* ../lib/standard/kernel.nit:387 */
147 REGB1
= TAG_Bool(UNTAG_Char(REGB0
)>=UNTAG_Char(REGB1
));
149 if (UNTAG_Bool(REGB1
)) {
150 REGB1
= TAG_Char('z');
151 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
152 if (UNTAG_Bool(REGB2
)) {
154 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
156 /* ../lib/standard/kernel.nit:385 */
157 REGB1
= TAG_Bool(UNTAG_Char(REGB0
)<=UNTAG_Char(REGB1
));
163 if (UNTAG_Bool(REGB1
)) {
166 REGB2
= TAG_Char('A');
167 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
168 if (UNTAG_Bool(REGB3
)) {
170 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
172 /* ../lib/standard/kernel.nit:387 */
173 REGB2
= TAG_Bool(UNTAG_Char(REGB0
)>=UNTAG_Char(REGB2
));
175 if (UNTAG_Bool(REGB2
)) {
176 REGB2
= TAG_Char('Z');
177 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
178 if (UNTAG_Bool(REGB3
)) {
180 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
182 /* ../lib/standard/kernel.nit:385 */
183 REGB2
= TAG_Bool(UNTAG_Char(REGB0
)<=UNTAG_Char(REGB2
));
191 if (UNTAG_Bool(REGB1
)) {
194 REGB2
= TAG_Char('0');
195 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
196 if (UNTAG_Bool(REGB3
)) {
198 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
200 /* ../lib/standard/kernel.nit:387 */
201 REGB2
= TAG_Bool(UNTAG_Char(REGB0
)>=UNTAG_Char(REGB2
));
203 if (UNTAG_Bool(REGB2
)) {
204 REGB2
= TAG_Char('9');
205 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
206 if (UNTAG_Bool(REGB3
)) {
208 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
210 /* ../lib/standard/kernel.nit:385 */
211 REGB2
= TAG_Bool(UNTAG_Char(REGB0
)<=UNTAG_Char(REGB2
));
219 if (UNTAG_Bool(REGB1
)) {
221 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[0])(closctx
->REG
[0], REGB0
);
224 closctx
->REG
[5] = REGB1
;
227 closctx
->REG
[6] = REGB1
;
230 REGB1
= TAG_Char('_');
231 REGB2
= TAG_Bool(IS_EQUAL_OO(REGB0
,REGB1
));
232 if (UNTAG_Bool(REGB2
)) {
234 /* ../lib/standard/kernel.nit:381 */
235 REGB1
= TAG_Bool((REGB0
)==(REGB1
));
239 if (UNTAG_Bool(REGB2
)) {
240 REGB2
= TAG_Bool(!UNTAG_Bool(closctx
->REG
[5]));
245 if (UNTAG_Bool(REGB2
)) {
247 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[0])(closctx
->REG
[0], REGB0
);
250 closctx
->REG
[5] = REGB2
;
253 closctx
->REG
[6] = REGB2
;
256 REGB2
= CALL_standard___collection___abstract_collection___MapRead___has_key(closctx
->REG
[2])(closctx
->REG
[2], REGB0
);
257 if (UNTAG_Bool(REGB2
)) {
259 if (UNTAG_Bool(closctx
->REG
[6])) {
261 REGB2
= TAG_Char('_');
262 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[0])(closctx
->REG
[0], REGB2
);
264 REGB2
= TAG_Char('_');
265 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[0])(closctx
->REG
[0], REGB2
);
268 fra
.me
.REG
[0] = CALL_standard___collection___abstract_collection___MapRead_____bra(closctx
->REG
[2])(closctx
->REG
[2], REGB0
);
269 CALL_standard___collection___abstract_collection___Sequence___append(closctx
->REG
[0])(closctx
->REG
[0], fra
.me
.REG
[0]);
272 closctx
->REG
[6] = REGB0
;
275 closctx
->REG
[5] = REGB0
;
279 stack_frame_head
= fra
.me
.prev
;
282 static const char LOCATE_utils___Object___cmangle_table
[] = "utils::Object::cmangle_table";
283 val_t
utils___Object___cmangle_table(val_t p0
){
284 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
288 static val_t once_value_1
; /* Once value */
289 static val_t once_value_2
; /* Once value */
290 static val_t once_value_3
; /* Once value */
291 static val_t once_value_4
; /* Once value */
292 static val_t once_value_5
; /* Once value */
293 static val_t once_value_6
; /* Once value */
294 static val_t once_value_7
; /* Once value */
295 static val_t once_value_8
; /* Once value */
296 static val_t once_value_9
; /* Once value */
297 static val_t once_value_10
; /* Once value */
298 static val_t once_value_11
; /* Once value */
299 static val_t once_value_12
; /* Once value */
300 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
301 fra
.me
.file
= LOCATE_utils
;
303 fra
.me
.meth
= LOCATE_utils___Object___cmangle_table
;
304 fra
.me
.has_broke
= 0;
306 fra
.me
.nitni_local_ref_head
= NULL
;
307 fra
.me
.REG
[0] = NIT_NULL
;
308 fra
.me
.REG
[1] = NIT_NULL
;
311 fra
.me
.REG
[0] = NEW_HashMap_standard___collection___hash_collection___HashMap___init();
313 REGB0
= TAG_Char('+');
315 fra
.me
.REG
[1] = BOX_NativeString("plus");
317 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
318 once_value_1
= fra
.me
.REG
[1];
319 register_static_object(&once_value_1
);
320 } else fra
.me
.REG
[1] = once_value_1
;
321 fra
.me
.REG
[1] = fra
.me
.REG
[1];
322 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
324 REGB0
= TAG_Char('-');
326 fra
.me
.REG
[1] = BOX_NativeString("minus");
328 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
329 once_value_2
= fra
.me
.REG
[1];
330 register_static_object(&once_value_2
);
331 } else fra
.me
.REG
[1] = once_value_2
;
332 fra
.me
.REG
[1] = fra
.me
.REG
[1];
333 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
335 REGB0
= TAG_Char('*');
337 fra
.me
.REG
[1] = BOX_NativeString("star");
339 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
340 once_value_3
= fra
.me
.REG
[1];
341 register_static_object(&once_value_3
);
342 } else fra
.me
.REG
[1] = once_value_3
;
343 fra
.me
.REG
[1] = fra
.me
.REG
[1];
344 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
346 REGB0
= TAG_Char('/');
348 fra
.me
.REG
[1] = BOX_NativeString("slash");
350 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
351 once_value_4
= fra
.me
.REG
[1];
352 register_static_object(&once_value_4
);
353 } else fra
.me
.REG
[1] = once_value_4
;
354 fra
.me
.REG
[1] = fra
.me
.REG
[1];
355 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
357 REGB0
= TAG_Char('%');
359 fra
.me
.REG
[1] = BOX_NativeString("percent");
361 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
362 once_value_5
= fra
.me
.REG
[1];
363 register_static_object(&once_value_5
);
364 } else fra
.me
.REG
[1] = once_value_5
;
365 fra
.me
.REG
[1] = fra
.me
.REG
[1];
366 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
368 REGB0
= TAG_Char('[');
370 fra
.me
.REG
[1] = BOX_NativeString("bra");
372 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
373 once_value_6
= fra
.me
.REG
[1];
374 register_static_object(&once_value_6
);
375 } else fra
.me
.REG
[1] = once_value_6
;
376 fra
.me
.REG
[1] = fra
.me
.REG
[1];
377 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
379 REGB0
= TAG_Char('=');
381 fra
.me
.REG
[1] = BOX_NativeString("eq");
383 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
384 once_value_7
= fra
.me
.REG
[1];
385 register_static_object(&once_value_7
);
386 } else fra
.me
.REG
[1] = once_value_7
;
387 fra
.me
.REG
[1] = fra
.me
.REG
[1];
388 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
390 REGB0
= TAG_Char('<');
392 fra
.me
.REG
[1] = BOX_NativeString("l");
394 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
395 once_value_8
= fra
.me
.REG
[1];
396 register_static_object(&once_value_8
);
397 } else fra
.me
.REG
[1] = once_value_8
;
398 fra
.me
.REG
[1] = fra
.me
.REG
[1];
399 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
401 REGB0
= TAG_Char('>');
403 fra
.me
.REG
[1] = BOX_NativeString("g");
405 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
406 once_value_9
= fra
.me
.REG
[1];
407 register_static_object(&once_value_9
);
408 } else fra
.me
.REG
[1] = once_value_9
;
409 fra
.me
.REG
[1] = fra
.me
.REG
[1];
410 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
412 REGB0
= TAG_Char('!');
413 if (!once_value_10
) {
414 fra
.me
.REG
[1] = BOX_NativeString("n");
416 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
417 once_value_10
= fra
.me
.REG
[1];
418 register_static_object(&once_value_10
);
419 } else fra
.me
.REG
[1] = once_value_10
;
420 fra
.me
.REG
[1] = fra
.me
.REG
[1];
421 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
423 REGB0
= TAG_Char('_');
424 if (!once_value_11
) {
425 fra
.me
.REG
[1] = BOX_NativeString("u");
427 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
428 once_value_11
= fra
.me
.REG
[1];
429 register_static_object(&once_value_11
);
430 } else fra
.me
.REG
[1] = once_value_11
;
431 fra
.me
.REG
[1] = fra
.me
.REG
[1];
432 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
434 REGB0
= TAG_Char('@');
435 if (!once_value_12
) {
436 fra
.me
.REG
[1] = BOX_NativeString("at");
438 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
439 once_value_12
= fra
.me
.REG
[1];
440 register_static_object(&once_value_12
);
441 } else fra
.me
.REG
[1] = once_value_12
;
442 fra
.me
.REG
[1] = fra
.me
.REG
[1];
443 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
447 stack_frame_head
= fra
.me
.prev
;
448 return fra
.me
.REG
[0];