val_t standard___math___Collection___rand(val_t p0){ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra; val_t REGB0; val_t tmp; fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; fra.me.file = LOCATE_standard___math; fra.me.line = 41; fra.me.meth = LOCATE_standard___math___Collection___rand; fra.me.has_broke = 0; fra.me.REG_size = 4; fra.me.nitni_local_ref_head = NULL; fra.me.REG[0] = NIT_NULL; fra.me.REG[1] = NIT_NULL; fra.me.REG[2] = NIT_NULL; fra.me.REG[3] = NIT_NULL; fra.me.REG[0] = p0; /* ../lib/standard/math.nit:44 */ REGB0 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]); if (UNTAG_Bool(REGB0)) { fra.me.REG[1] = NIT_NULL; goto label1; } /* ../lib/standard/math.nit:46 */ REGB0 = CALL_standard___collection___abstract_collection___Collection___length(fra.me.REG[0])(fra.me.REG[0]); REGB0 = CALL_standard___math___Int___rand(REGB0)(REGB0); fra.me.REG[2] = REGB0; /* ../lib/standard/math.nit:47 */ fra.me.REG[3] = NIT_NULL; CALL_standard___collection___abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_standard___math___Collection___rand_2)); switch ((&(fra.me))->has_broke) { case 0: break; case 1: (&(fra.me))->has_broke = 0; goto label4; } label4: while(0); /* ../lib/standard/math.nit:59 */ fra.me.REG[1] = fra.me.REG[3]; goto label1; label1: while(0); stack_frame_head = fra.me.prev; return fra.me.REG[1]; }
void global___cha_analysis___ChaBuilder___work(val_t p0){ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; val_t REGB0; val_t REGB1; val_t tmp; fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; fra.me.file = LOCATE_global___cha_analysis; fra.me.line = 75; fra.me.meth = LOCATE_global___cha_analysis___ChaBuilder___work; fra.me.has_broke = 0; fra.me.REG_size = 3; fra.me.nitni_local_ref_head = NULL; fra.me.REG[0] = NIT_NULL; fra.me.REG[1] = NIT_NULL; fra.me.REG[2] = NIT_NULL; fra.me.REG[0] = p0; /* global/cha_analysis.nit:77 */ fra.me.REG[1] = CALL_global___cha_analysis___ChaBuilder___program(fra.me.REG[0])(fra.me.REG[0]); fra.me.REG[1] = CALL_program___Program___main_method(fra.me.REG[1])(fra.me.REG[1]); /* global/cha_analysis.nit:78 */ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL); if (UNTAG_Bool(REGB0)) { } else { REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL); if (UNTAG_Bool(REGB1)) { REGB1 = TAG_Bool(false); REGB0 = REGB1; } else { REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL); REGB0 = REGB1; } } if (UNTAG_Bool(REGB0)) { goto label1; } /* global/cha_analysis.nit:80 */ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL); if (UNTAG_Bool(REGB0)) { nit_abort("Reciever is null", NULL, LOCATE_global___cha_analysis, 80); } fra.me.REG[2] = CALL_icode___icode_base___MMMethod___iroutine(fra.me.REG[1])(fra.me.REG[1]); REGB0 = TAG_Bool(true); REGB1 = TAG_Bool(false); CALL_global___cha_analysis___ChaBuilder___add_search(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[2], REGB0, REGB1); /* global/cha_analysis.nit:82 */ while(1) { fra.me.REG[2] = CALL_global___cha_analysis___ChaBuilder___iroutine_to_search(fra.me.REG[0])(fra.me.REG[0]); REGB1 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[2])(fra.me.REG[2]); REGB1 = TAG_Bool(!UNTAG_Bool(REGB1)); if (UNTAG_Bool(REGB1)) { /* global/cha_analysis.nit:83 */ fra.me.REG[2] = NEW_ChaVisitor_global___cha_analysis___ChaVisitor___init(fra.me.REG[0]); /* global/cha_analysis.nit:84 */ fra.me.REG[1] = CALL_global___cha_analysis___ChaBuilder___iroutine_to_search(fra.me.REG[0])(fra.me.REG[0]); fra.me.REG[1] = CALL_standard___collection___abstract_collection___Sequence___pop(fra.me.REG[1])(fra.me.REG[1]); /* global/cha_analysis.nit:85 */ fra.me.REG[1] = CALL_icode___icode_base___IRoutine___body(fra.me.REG[1])(fra.me.REG[1]); CALL_icode___icode_tools___ICodeVisitor___visit_icode(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); } else { /* global/cha_analysis.nit:82 */ goto label2; } } label2: while(0); label1: while(0); stack_frame_head = fra.me.prev; return; }
val_t utils___Object___cmangle(val_t p0, val_t p1){ struct {struct stack_frame_t me; val_t MORE_REG[6];} fra; val_t REGB0; val_t REGB1; val_t REGB2; val_t tmp; static val_t once_value_1; /* Once value */ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; fra.me.file = LOCATE_utils; fra.me.line = 23; fra.me.meth = LOCATE_utils___Object___cmangle; fra.me.has_broke = 0; fra.me.REG_size = 7; fra.me.nitni_local_ref_head = NULL; fra.me.REG[0] = NIT_NULL; fra.me.REG[1] = NIT_NULL; fra.me.REG[2] = NIT_NULL; fra.me.REG[3] = NIT_NULL; fra.me.REG[4] = NIT_NULL; fra.me.REG[5] = NIT_NULL; fra.me.REG[6] = NIT_NULL; fra.me.REG[0] = p0; fra.me.REG[1] = p1; /* utils.nit:23 */ fra.me.REG[2] = fra.me.REG[0]; REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[1], COLOR_standard___collection___array___Array, ID_standard___collection___array___Array)) /*cast Array[Symbol]*/; if (UNTAG_Bool(REGB0)) { } else { nit_abort("Cast failed", NULL, LOCATE_utils, 23); } /* utils.nit:26 */ if (!once_value_1) { fra.me.REG[2] = CALL_utils___Object___cmangle_table(fra.me.REG[2])(fra.me.REG[2]); once_value_1 = fra.me.REG[2]; register_static_object(&once_value_1); } else fra.me.REG[2] = once_value_1; fra.me.REG[2] = fra.me.REG[2]; /* utils.nit:27 */ fra.me.REG[0] = NEW_Buffer_standard___string___Buffer___init(); /* ../lib/standard/collection/array.nit:269 */ REGB0 = TAG_Int(0); /* ../lib/standard/collection/array.nit:270 */ REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); if (UNTAG_Bool(REGB1)) { } else { nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270); } REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]); /* ../lib/standard/collection/array.nit:271 */ fra.me.REG[3] = ATTR_standard___collection___array___Array____items(fra.me.REG[1]); /* ../lib/standard/collection/array.nit:272 */ while(1) { /* ../lib/standard/collection/array.nit:24 */ REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); if (UNTAG_Bool(REGB1)) { } else { nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24); } REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]); REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/; if (UNTAG_Bool(REGB2)) { } else { nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0); } /* ../lib/standard/kernel.nit:235 */ REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1)); /* ../lib/standard/collection/array.nit:272 */ if (UNTAG_Bool(REGB1)) { /* ../lib/standard/collection/array.nit:273 */ REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL); if (UNTAG_Bool(REGB1)) { nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273); } /* ../lib/standard/collection/array.nit:718 */ fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB0)]; /* utils.nit:29 */ REGB1 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]); REGB1 = TAG_Bool(!UNTAG_Bool(REGB1)); if (UNTAG_Bool(REGB1)) { /* utils.nit:30 */ REGB1 = TAG_Char('_'); CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB1); /* utils.nit:31 */ REGB1 = TAG_Char('_'); CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB1); /* utils.nit:32 */ REGB1 = TAG_Char('_'); CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB1); } /* utils.nit:34 */ REGB1 = TAG_Bool(0); fra.me.REG[5] = REGB1; /* utils.nit:35 */ REGB1 = TAG_Bool(1); fra.me.REG[6] = REGB1; /* utils.nit:36 */ fra.me.REG[4] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]); CALL_standard___collection___abstract_collection___Collection___iterate(fra.me.REG[4])(fra.me.REG[4], (&(fra.me)), ((fun_t)OC_utils___Object___cmangle_2)); /* ../lib/standard/collection/array.nit:274 */ REGB1 = TAG_Int(1); /* ../lib/standard/kernel.nit:238 */ REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); /* ../lib/standard/collection/array.nit:274 */ REGB0 = REGB1; } else { /* ../lib/standard/collection/array.nit:272 */ goto label3; } } label3: while(0); /* utils.nit:57 */ fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]); goto label4; label4: while(0); stack_frame_head = fra.me.prev; return fra.me.REG[0]; }