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
.nitni_local_ref_head
= NULL
;
17 fra
.me
.REG
[0] = NIT_NULL
;
18 fra
.me
.REG
[1] = NIT_NULL
;
19 fra
.me
.REG
[2] = NIT_NULL
;
20 fra
.me
.REG
[3] = NIT_NULL
;
21 fra
.me
.REG
[4] = NIT_NULL
;
22 fra
.me
.REG
[5] = NIT_NULL
;
23 fra
.me
.REG
[6] = NIT_NULL
;
27 fra
.me
.REG
[2] = fra
.me
.REG
[0];
28 REGB0
= TAG_Bool(VAL_ISA(fra
.me
.REG
[1], COLOR_standard___collection___array___Array
, ID_standard___collection___array___Array
)) /*cast Array[Symbol]*/;
29 if (UNTAG_Bool(REGB0
)) {
31 nit_abort("Cast failed", NULL
, LOCATE_utils
, 21);
35 fra
.me
.REG
[2] = CALL_utils___Object___cmangle_table(fra
.me
.REG
[2])(fra
.me
.REG
[2]);
36 once_value_1
= fra
.me
.REG
[2];
37 register_static_object(&once_value_1
);
38 } else fra
.me
.REG
[2] = once_value_1
;
39 fra
.me
.REG
[2] = fra
.me
.REG
[2];
41 fra
.me
.REG
[0] = NEW_Buffer_standard___string___Buffer___init();
42 /* ../lib/standard/collection/array.nit:269 */
44 /* ../lib/standard/collection/array.nit:270 */
45 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
46 if (UNTAG_Bool(REGB1
)) {
48 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 270);
50 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
51 /* ../lib/standard/collection/array.nit:271 */
52 fra
.me
.REG
[3] = ATTR_standard___collection___array___Array____items(fra
.me
.REG
[1]);
53 /* ../lib/standard/collection/array.nit:272 */
55 /* ../lib/standard/collection/array.nit:24 */
56 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
57 if (UNTAG_Bool(REGB1
)) {
59 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
61 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
62 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
63 if (UNTAG_Bool(REGB2
)) {
65 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
67 /* ../lib/standard/kernel.nit:232 */
68 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)<UNTAG_Int(REGB1
));
69 /* ../lib/standard/collection/array.nit:272 */
70 if (UNTAG_Bool(REGB1
)) {
71 /* ../lib/standard/collection/array.nit:273 */
72 REGB1
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
73 if (UNTAG_Bool(REGB1
)) {
74 nit_abort("Reciever is null", NULL
, LOCATE_standard___collection___array
, 273);
76 /* ../lib/standard/collection/array.nit:718 */
77 fra
.me
.REG
[4] = ((Nit_NativeArray
)fra
.me
.REG
[3])->val
[UNTAG_Int(REGB0
)];
79 REGB1
= CALL_standard___collection___abstract_collection___Collection___is_empty(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
80 REGB1
= TAG_Bool(!UNTAG_Bool(REGB1
));
81 if (UNTAG_Bool(REGB1
)) {
83 REGB1
= TAG_Char('_');
84 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB1
);
86 REGB1
= TAG_Char('_');
87 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB1
);
89 REGB1
= TAG_Char('_');
90 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB1
);
93 REGB1
= TAG_Bool(false);
94 fra
.me
.REG
[5] = REGB1
;
96 REGB1
= TAG_Bool(true);
97 fra
.me
.REG
[6] = REGB1
;
99 fra
.me
.REG
[4] = CALL_standard___string___Object___to_s(fra
.me
.REG
[4])(fra
.me
.REG
[4]);
100 CALL_standard___collection___abstract_collection___Collection___iterate(fra
.me
.REG
[4])(fra
.me
.REG
[4], (&(fra
.me
)), ((fun_t
)OC_utils___Object___cmangle_2
));
101 /* ../lib/standard/collection/array.nit:274 */
103 /* ../lib/standard/kernel.nit:235 */
104 REGB1
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB1
));
105 /* ../lib/standard/collection/array.nit:274 */
108 /* ../lib/standard/collection/array.nit:272 */
114 fra
.me
.REG
[0] = CALL_standard___string___Object___to_s(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
117 stack_frame_head
= fra
.me
.prev
;
118 return fra
.me
.REG
[0];
120 void OC_utils___Object___cmangle_2(struct stack_frame_t
*closctx
, val_t p0
){
121 struct {struct stack_frame_t me
;} fra
;
128 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
129 fra
.me
.file
= LOCATE_utils
;
131 fra
.me
.meth
= LOCATE_utils___Object___cmangle
;
132 fra
.me
.has_broke
= 0;
134 fra
.me
.nitni_local_ref_head
= NULL
;
135 fra
.me
.REG
[0] = NIT_NULL
;
137 REGB0
= fra
.me
.REG
[0];
139 REGB1
= TAG_Char('a');
140 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
141 if (UNTAG_Bool(REGB2
)) {
143 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
145 /* ../lib/standard/kernel.nit:384 */
146 REGB1
= TAG_Bool(UNTAG_Char(REGB0
)>=UNTAG_Char(REGB1
));
148 if (UNTAG_Bool(REGB1
)) {
149 REGB1
= TAG_Char('z');
150 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
151 if (UNTAG_Bool(REGB2
)) {
153 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
155 /* ../lib/standard/kernel.nit:382 */
156 REGB1
= TAG_Bool(UNTAG_Char(REGB0
)<=UNTAG_Char(REGB1
));
159 REGB2
= TAG_Bool(false);
162 if (UNTAG_Bool(REGB1
)) {
163 REGB1
= TAG_Bool(true);
165 REGB2
= TAG_Char('A');
166 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
167 if (UNTAG_Bool(REGB3
)) {
169 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
171 /* ../lib/standard/kernel.nit:384 */
172 REGB2
= TAG_Bool(UNTAG_Char(REGB0
)>=UNTAG_Char(REGB2
));
174 if (UNTAG_Bool(REGB2
)) {
175 REGB2
= TAG_Char('Z');
176 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
177 if (UNTAG_Bool(REGB3
)) {
179 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
181 /* ../lib/standard/kernel.nit:382 */
182 REGB2
= TAG_Bool(UNTAG_Char(REGB0
)<=UNTAG_Char(REGB2
));
185 REGB3
= TAG_Bool(false);
190 if (UNTAG_Bool(REGB1
)) {
191 REGB1
= TAG_Bool(true);
193 REGB2
= TAG_Char('0');
194 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
195 if (UNTAG_Bool(REGB3
)) {
197 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
199 /* ../lib/standard/kernel.nit:384 */
200 REGB2
= TAG_Bool(UNTAG_Char(REGB0
)>=UNTAG_Char(REGB2
));
202 if (UNTAG_Bool(REGB2
)) {
203 REGB2
= TAG_Char('9');
204 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
205 if (UNTAG_Bool(REGB3
)) {
207 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
209 /* ../lib/standard/kernel.nit:382 */
210 REGB2
= TAG_Bool(UNTAG_Char(REGB0
)<=UNTAG_Char(REGB2
));
213 REGB3
= TAG_Bool(false);
218 if (UNTAG_Bool(REGB1
)) {
220 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[0])(closctx
->REG
[0], REGB0
);
222 REGB1
= TAG_Bool(false);
223 closctx
->REG
[5] = REGB1
;
225 REGB1
= TAG_Bool(true);
226 closctx
->REG
[6] = REGB1
;
229 REGB1
= TAG_Char('_');
230 REGB2
= TAG_Bool(IS_EQUAL_OO(REGB0
,REGB1
));
231 if (UNTAG_Bool(REGB2
)) {
233 /* ../lib/standard/kernel.nit:378 */
234 REGB1
= TAG_Bool((REGB0
)==(REGB1
));
238 if (UNTAG_Bool(REGB2
)) {
239 REGB2
= TAG_Bool(!UNTAG_Bool(closctx
->REG
[5]));
241 REGB1
= TAG_Bool(false);
244 if (UNTAG_Bool(REGB2
)) {
246 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[0])(closctx
->REG
[0], REGB0
);
248 REGB2
= TAG_Bool(true);
249 closctx
->REG
[5] = REGB2
;
251 REGB2
= TAG_Bool(true);
252 closctx
->REG
[6] = REGB2
;
255 REGB2
= CALL_standard___collection___abstract_collection___MapRead___has_key(closctx
->REG
[2])(closctx
->REG
[2], REGB0
);
256 if (UNTAG_Bool(REGB2
)) {
258 if (UNTAG_Bool(closctx
->REG
[6])) {
260 REGB2
= TAG_Char('_');
261 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[0])(closctx
->REG
[0], REGB2
);
263 REGB2
= TAG_Char('_');
264 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[0])(closctx
->REG
[0], REGB2
);
267 fra
.me
.REG
[0] = CALL_standard___collection___abstract_collection___MapRead_____bra(closctx
->REG
[2])(closctx
->REG
[2], REGB0
);
268 CALL_standard___collection___abstract_collection___Sequence___append(closctx
->REG
[0])(closctx
->REG
[0], fra
.me
.REG
[0]);
270 REGB0
= TAG_Bool(false);
271 closctx
->REG
[6] = REGB0
;
273 REGB0
= TAG_Bool(false);
274 closctx
->REG
[5] = REGB0
;
278 stack_frame_head
= fra
.me
.prev
;
281 val_t
utils___Object___cmangle_table(val_t p0
){
282 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
286 static val_t once_value_1
; /* Once value */
287 static val_t once_value_2
; /* Once value */
288 static val_t once_value_3
; /* Once value */
289 static val_t once_value_4
; /* Once value */
290 static val_t once_value_5
; /* Once value */
291 static val_t once_value_6
; /* Once value */
292 static val_t once_value_7
; /* Once value */
293 static val_t once_value_8
; /* Once value */
294 static val_t once_value_9
; /* Once value */
295 static val_t once_value_10
; /* Once value */
296 static val_t once_value_11
; /* Once value */
297 static val_t once_value_12
; /* Once value */
298 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
299 fra
.me
.file
= LOCATE_utils
;
301 fra
.me
.meth
= LOCATE_utils___Object___cmangle_table
;
302 fra
.me
.has_broke
= 0;
304 fra
.me
.nitni_local_ref_head
= NULL
;
305 fra
.me
.REG
[0] = NIT_NULL
;
306 fra
.me
.REG
[1] = NIT_NULL
;
309 fra
.me
.REG
[0] = NEW_HashMap_standard___collection___hash_collection___HashMap___init();
311 REGB0
= TAG_Char('+');
313 fra
.me
.REG
[1] = BOX_NativeString("plus");
315 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
316 once_value_1
= fra
.me
.REG
[1];
317 register_static_object(&once_value_1
);
318 } else fra
.me
.REG
[1] = once_value_1
;
319 fra
.me
.REG
[1] = fra
.me
.REG
[1];
320 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
322 REGB0
= TAG_Char('-');
324 fra
.me
.REG
[1] = BOX_NativeString("minus");
326 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
327 once_value_2
= fra
.me
.REG
[1];
328 register_static_object(&once_value_2
);
329 } else fra
.me
.REG
[1] = once_value_2
;
330 fra
.me
.REG
[1] = fra
.me
.REG
[1];
331 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
333 REGB0
= TAG_Char('*');
335 fra
.me
.REG
[1] = BOX_NativeString("star");
337 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
338 once_value_3
= fra
.me
.REG
[1];
339 register_static_object(&once_value_3
);
340 } else fra
.me
.REG
[1] = once_value_3
;
341 fra
.me
.REG
[1] = fra
.me
.REG
[1];
342 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
344 REGB0
= TAG_Char('/');
346 fra
.me
.REG
[1] = BOX_NativeString("slash");
348 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
349 once_value_4
= fra
.me
.REG
[1];
350 register_static_object(&once_value_4
);
351 } else fra
.me
.REG
[1] = once_value_4
;
352 fra
.me
.REG
[1] = fra
.me
.REG
[1];
353 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
355 REGB0
= TAG_Char('%');
357 fra
.me
.REG
[1] = BOX_NativeString("percent");
359 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
360 once_value_5
= fra
.me
.REG
[1];
361 register_static_object(&once_value_5
);
362 } else fra
.me
.REG
[1] = once_value_5
;
363 fra
.me
.REG
[1] = fra
.me
.REG
[1];
364 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
366 REGB0
= TAG_Char('[');
368 fra
.me
.REG
[1] = BOX_NativeString("bra");
370 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
371 once_value_6
= fra
.me
.REG
[1];
372 register_static_object(&once_value_6
);
373 } else fra
.me
.REG
[1] = once_value_6
;
374 fra
.me
.REG
[1] = fra
.me
.REG
[1];
375 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
377 REGB0
= TAG_Char('=');
379 fra
.me
.REG
[1] = BOX_NativeString("eq");
381 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
382 once_value_7
= fra
.me
.REG
[1];
383 register_static_object(&once_value_7
);
384 } else fra
.me
.REG
[1] = once_value_7
;
385 fra
.me
.REG
[1] = fra
.me
.REG
[1];
386 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
388 REGB0
= TAG_Char('<');
390 fra
.me
.REG
[1] = BOX_NativeString("l");
392 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
393 once_value_8
= fra
.me
.REG
[1];
394 register_static_object(&once_value_8
);
395 } else fra
.me
.REG
[1] = once_value_8
;
396 fra
.me
.REG
[1] = fra
.me
.REG
[1];
397 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
399 REGB0
= TAG_Char('>');
401 fra
.me
.REG
[1] = BOX_NativeString("g");
403 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
404 once_value_9
= fra
.me
.REG
[1];
405 register_static_object(&once_value_9
);
406 } else fra
.me
.REG
[1] = once_value_9
;
407 fra
.me
.REG
[1] = fra
.me
.REG
[1];
408 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
410 REGB0
= TAG_Char('!');
411 if (!once_value_10
) {
412 fra
.me
.REG
[1] = BOX_NativeString("n");
414 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
415 once_value_10
= fra
.me
.REG
[1];
416 register_static_object(&once_value_10
);
417 } else fra
.me
.REG
[1] = once_value_10
;
418 fra
.me
.REG
[1] = fra
.me
.REG
[1];
419 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
421 REGB0
= TAG_Char('_');
422 if (!once_value_11
) {
423 fra
.me
.REG
[1] = BOX_NativeString("u");
425 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
426 once_value_11
= fra
.me
.REG
[1];
427 register_static_object(&once_value_11
);
428 } else fra
.me
.REG
[1] = once_value_11
;
429 fra
.me
.REG
[1] = fra
.me
.REG
[1];
430 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
432 REGB0
= TAG_Char('@');
433 if (!once_value_12
) {
434 fra
.me
.REG
[1] = BOX_NativeString("at");
436 fra
.me
.REG
[1] = NEW_String_standard___string___String___with_native(fra
.me
.REG
[1], REGB1
);
437 once_value_12
= fra
.me
.REG
[1];
438 register_static_object(&once_value_12
);
439 } else fra
.me
.REG
[1] = once_value_12
;
440 fra
.me
.REG
[1] = fra
.me
.REG
[1];
441 CALL_standard___collection___abstract_collection___Map_____braeq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1]);
445 stack_frame_head
= fra
.me
.prev
;
446 return fra
.me
.REG
[0];