X-Git-Url: http://nitlanguage.org diff --git a/c_src/string._sep.c b/c_src/string._sep.c index 0e3294a..095c6a0 100644 --- a/c_src/string._sep.c +++ b/c_src/string._sep.c @@ -1,58 +1,26 @@ /* This C file is generated by NIT to compile module string. */ #include "string._sep.h" -void string___AbstractString___output(val_t p0){ - struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; +val_t string___AbstractString___items(val_t p0){ + struct {struct stack_frame_t me;} 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_string; - fra.me.line = 151; - fra.me.meth = LOCATE_string___AbstractString___output; + fra.me.line = 26; + fra.me.meth = LOCATE_string___AbstractString___items; fra.me.has_broke = 0; - fra.me.REG_size = 2; + fra.me.REG_size = 1; fra.me.REG[0] = NIT_NULL; - fra.me.REG[1] = NIT_NULL; fra.me.REG[0] = p0; - REGB0 = TAG_Int(0); - /* ./../lib/standard//string.nit:154 */ - while(1) { - REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); - /* ./../lib/standard//collection//array.nit:23 */ - if (UNTAG_Bool(REGB1)) { - } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); - } - REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); - REGB1 = TAG_Bool(UNTAG_Int(REGB0)=UNTAG_Int(REGB2)); /* ./../lib/standard//string.nit:38 */ if (UNTAG_Bool(REGB2)) { } else { - fprintf(stderr, "Assert failed"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 38); - nit_exit(1); + nit_abort("Assert failed", NULL, LOCATE_string, 38); } + /* ./../lib/standard//kernel.nit:215 */ REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0)); + /* ./../lib/standard//string.nit:39 */ REGB1 = REGB2; + /* ./../lib/standard//string.nit:40 */ REGB2 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:212 */ REGB2 = TAG_Bool(UNTAG_Int(REGB0)UNTAG_Int(REGB2)); /* ./../lib/standard//string.nit:41 */ if (UNTAG_Bool(REGB2)) { - REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); /* ./../lib/standard//collection//array.nit:23 */ + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); if (UNTAG_Bool(REGB2)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); } REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//string.nit:41 */ REGB1 = REGB2; - /* ./../lib/standard//string.nit:41 */ } + /* ./../lib/standard//kernel.nit:212 */ REGB2 = TAG_Bool(UNTAG_Int(REGB0)UNTAG_Int(REGB1)); /* ./../lib/standard//string.nit:75 */ if (UNTAG_Bool(REGB1)) { REGB1 = TAG_Bool(true); } else { + /* ./../lib/standard//kernel.nit:214 */ REGB3 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB0)); + /* ./../lib/standard//string.nit:75 */ REGB1 = REGB3; - /* ./../lib/standard//string.nit:75 */ } if (UNTAG_Bool(REGB1)) { REGB1 = TAG_Bool(false); @@ -344,18 +287,21 @@ val_t string___AbstractString___has_substring(val_t p0, val_t p1, val_t p2){ /* ./../lib/standard//string.nit:76 */ while(1) { REGB3 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ REGB3 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB3)); /* ./../lib/standard//string.nit:76 */ if (UNTAG_Bool(REGB3)) { + /* ./../lib/standard//string.nit:585 */ REGB3 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]); REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB2)]); - REGB5 = TAG_Bool(IS_EQUAL_OO(REGB3,REGB4)); /* ./../lib/standard//string.nit:77 */ + REGB5 = TAG_Bool(IS_EQUAL_OO(REGB3,REGB4)); if (UNTAG_Bool(REGB5)) { } else { + /* ./../lib/standard//kernel.nit:347 */ REGB4 = TAG_Bool((REGB3)==(REGB4)); + /* ./../lib/standard//string.nit:77 */ REGB5 = REGB4; - /* ./../lib/standard//string.nit:77 */ } REGB5 = TAG_Bool(!UNTAG_Bool(REGB5)); if (UNTAG_Bool(REGB5)) { @@ -363,22 +309,27 @@ val_t string___AbstractString___has_substring(val_t p0, val_t p1, val_t p2){ REGB1 = REGB5; goto label1; } + /* ./../lib/standard//string.nit:78 */ REGB5 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ REGB5 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB5)); + /* ./../lib/standard//string.nit:78 */ REGB0 = REGB5; + /* ./../lib/standard//string.nit:79 */ REGB5 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ REGB5 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB5)); + /* ./../lib/standard//string.nit:79 */ REGB2 = REGB5; - /* ./../lib/standard//string.nit:79 */ } else { /* ./../lib/standard//string.nit:76 */ goto label2; } } label2: while(0); + /* ./../lib/standard//string.nit:81 */ REGB2 = TAG_Bool(true); REGB1 = REGB2; - /* ./../lib/standard//string.nit:81 */ goto label1; label1: while(0); stack_frame_head = fra.me.prev; @@ -398,9 +349,9 @@ val_t string___AbstractString___has_prefix(val_t p0, val_t p1){ fra.me.REG[1] = NIT_NULL; fra.me.REG[0] = p0; fra.me.REG[1] = p1; + /* ./../lib/standard//string.nit:88 */ REGB0 = TAG_Int(0); REGB0 = CALL_string___AbstractString___has_substring(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0); - /* ./../lib/standard//string.nit:88 */ goto label1; label1: while(0); stack_frame_head = fra.me.prev; @@ -421,26 +372,23 @@ val_t string___AbstractString___has_suffix(val_t p0, val_t p1){ fra.me.REG[1] = NIT_NULL; fra.me.REG[0] = p0; fra.me.REG[1] = p1; - REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); if (UNTAG_Bool(REGB0)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); } REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); if (UNTAG_Bool(REGB1)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); } REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); + /* ./../lib/standard//kernel.nit:217 */ REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1)); - REGB1 = CALL_string___AbstractString___has_substring(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB1); /* ./../lib/standard//string.nit:94 */ + REGB1 = CALL_string___AbstractString___has_substring(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB1); goto label1; label1: while(0); stack_frame_head = fra.me.prev; @@ -458,8 +406,10 @@ val_t string___AbstractString___to_i(val_t p0){ fra.me.REG_size = 1; fra.me.REG[0] = NIT_NULL; fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:100 */ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]); fra.me.REG[0] = CALL_string___String___to_cstring(fra.me.REG[0])(fra.me.REG[0]); + /* ./../lib/standard//string.nit:596 */ REGB0 = TAG_Int(atoi(UNBOX_NativeString(fra.me.REG[0]))); /* ./../lib/standard//string.nit:100 */ goto label1; @@ -479,91 +429,121 @@ val_t string___AbstractString___to_hex(val_t p0){ fra.me.REG_size = 1; fra.me.REG[0] = NIT_NULL; fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:104 */ REGB0 = TAG_Int(16); REGB0 = CALL_string___AbstractString___a_to(fra.me.REG[0])(fra.me.REG[0], REGB0); - /* ./../lib/standard//string.nit:104 */ goto label1; label1: while(0); stack_frame_head = fra.me.prev; return REGB0; } val_t string___AbstractString___a_to(val_t p0, val_t p1){ - struct {struct stack_frame_t me;} fra; + struct {struct stack_frame_t me; val_t MORE_REG[3];} fra; val_t REGB0; - val_t REGB1; - val_t REGB2; - val_t REGB3; - val_t REGB4; - val_t REGB5; val_t tmp; fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; fra.me.file = LOCATE_string; fra.me.line = 106; fra.me.meth = LOCATE_string___AbstractString___a_to; fra.me.has_broke = 0; - fra.me.REG_size = 1; + fra.me.REG_size = 4; 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; REGB0 = p1; - REGB1 = TAG_Int(0); - REGB2 = TAG_Bool(false); - fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]); - /* ./../lib/standard//string.nit:112 */ - while(1) { - REGB3 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]); - if (UNTAG_Bool(REGB3)) { - REGB3 = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); - REGB3 = CALL_kernel___Char___to_i(REGB3)(REGB3); - REGB4 = TAG_Bool(UNTAG_Int(REGB3)>UNTAG_Int(REGB0)); - /* ./../lib/standard//string.nit:115 */ - if (UNTAG_Bool(REGB4)) { - /* ./../lib/standard//string.nit:116 */ - if (UNTAG_Bool(REGB2)) { - REGB4 = TAG_Int(-UNTAG_Int(REGB1)); - /* ./../lib/standard//string.nit:117 */ - goto label1; - } else { - REGB4 = REGB1; - /* ./../lib/standard//string.nit:119 */ - goto label1; - } - } else { - REGB5 = TAG_Int(0); - REGB5 = TAG_Bool(UNTAG_Int(REGB3)has_broke) { + case 0: break; + case 1: (&(fra.me))->has_broke = 0; goto label3; } - label2: while(0); /* ./../lib/standard//string.nit:127 */ - if (UNTAG_Bool(REGB2)) { - REGB2 = TAG_Int(-UNTAG_Int(REGB1)); - REGB4 = REGB2; + if (UNTAG_Bool(fra.me.REG[3])) { + /* ./../lib/standard//kernel.nit:216 */ + REGB0 = TAG_Int(-UNTAG_Int(fra.me.REG[2])); /* ./../lib/standard//string.nit:128 */ - goto label1; + fra.me.REG[0] = REGB0; + goto label3; } else { - REGB4 = REGB1; /* ./../lib/standard//string.nit:130 */ - goto label1; + fra.me.REG[0] = fra.me.REG[2]; + goto label3; } - label1: while(0); + label3: while(0); stack_frame_head = fra.me.prev; - return REGB4; + return fra.me.REG[0]; } + void OC_string___AbstractString___a_to_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t REGB1; + fun_t CREG[1]; + val_t tmp; + /* ./../lib/standard//string.nit:112 */ + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_string; + fra.me.line = 0; + fra.me.meth = LOCATE_string___AbstractString___a_to; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.closure_ctx = closctx_param; + fra.me.closure_funs = CREG; + fra.me.REG[0] = p0; + CREG[0] = clos_fun0; + REGB0 = fra.me.REG[0]; + /* ./../lib/standard//string.nit:114 */ + REGB0 = CALL_kernel___Char___to_i(REGB0)(REGB0); + /* ./../lib/standard//kernel.nit:214 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(closctx->REG[1])); + /* ./../lib/standard//string.nit:115 */ + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//string.nit:116 */ + if (UNTAG_Bool(closctx->REG[3])) { + /* ./../lib/standard//kernel.nit:216 */ + REGB1 = TAG_Int(-UNTAG_Int(closctx->REG[2])); + /* ./../lib/standard//string.nit:117 */ + closctx->REG[0] = REGB1; + closctx->has_broke = 1; + goto label2; + } else { + /* ./../lib/standard//string.nit:119 */ + closctx->REG[0] = closctx->REG[2]; + closctx->has_broke = 1; + goto label2; + } + } else { + /* ./../lib/standard//string.nit:121 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:212 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)REG[3] = REGB1; + } else { + /* ./../lib/standard//kernel.nit:218 */ + REGB1 = TAG_Int(UNTAG_Int(closctx->REG[2])*UNTAG_Int(closctx->REG[1])); + /* ./../lib/standard//kernel.nit:215 */ + REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0)); + /* ./../lib/standard//string.nit:124 */ + closctx->REG[2] = REGB0; + } + } + label2: while(0); + stack_frame_head = fra.me.prev; + return; + } val_t string___AbstractString___to_upper(val_t p0){ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; val_t REGB0; @@ -577,37 +557,46 @@ val_t string___AbstractString___to_upper(val_t p0){ fra.me.REG[0] = NIT_NULL; fra.me.REG[1] = NIT_NULL; fra.me.REG[0] = p0; - REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); if (UNTAG_Bool(REGB0)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); } REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//string.nit:137 */ fra.me.REG[1] = NEW_Buffer_string___Buffer___with_capacity(REGB0); - fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]); - /* ./../lib/standard//string.nit:138 */ - while(1) { - REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]); - if (UNTAG_Bool(REGB0)) { - REGB0 = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); - REGB0 = CALL_kernel___Char___to_upper(REGB0)(REGB0); - CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], REGB0); - } else { - goto label1; - } - CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]); - } - label1: while(0); - fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]); + CALL_abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_string___AbstractString___to_upper_1)); /* ./../lib/standard//string.nit:139 */ + fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]); goto label2; label2: while(0); stack_frame_head = fra.me.prev; return fra.me.REG[1]; } + void OC_string___AbstractString___to_upper_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + fun_t CREG[1]; + val_t tmp; + /* ./../lib/standard//string.nit:138 */ + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_string; + fra.me.line = 0; + fra.me.meth = LOCATE_string___AbstractString___to_upper; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.closure_ctx = closctx_param; + fra.me.closure_funs = CREG; + fra.me.REG[0] = p0; + CREG[0] = clos_fun0; + REGB0 = fra.me.REG[0]; + REGB0 = CALL_kernel___Char___to_upper(REGB0)(REGB0); + CALL_abstract_collection___SimpleCollection___add(closctx->REG[1])(closctx->REG[1], REGB0); + stack_frame_head = fra.me.prev; + return; + } val_t string___AbstractString___to_lower(val_t p0){ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; val_t REGB0; @@ -621,101 +610,245 @@ val_t string___AbstractString___to_lower(val_t p0){ fra.me.REG[0] = NIT_NULL; fra.me.REG[1] = NIT_NULL; fra.me.REG[0] = p0; - REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); if (UNTAG_Bool(REGB0)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); } REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//string.nit:145 */ fra.me.REG[1] = NEW_Buffer_string___Buffer___with_capacity(REGB0); - fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]); - /* ./../lib/standard//string.nit:146 */ + CALL_abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_string___AbstractString___to_lower_1)); + /* ./../lib/standard//string.nit:147 */ + fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]); + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[1]; +} + void OC_string___AbstractString___to_lower_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + fun_t CREG[1]; + val_t tmp; + /* ./../lib/standard//string.nit:146 */ + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_string; + fra.me.line = 0; + fra.me.meth = LOCATE_string___AbstractString___to_lower; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.closure_ctx = closctx_param; + fra.me.closure_funs = CREG; + fra.me.REG[0] = p0; + CREG[0] = clos_fun0; + REGB0 = fra.me.REG[0]; + REGB0 = CALL_kernel___Char___to_lower(REGB0)(REGB0); + CALL_abstract_collection___SimpleCollection___add(closctx->REG[1])(closctx->REG[1], REGB0); + stack_frame_head = fra.me.prev; + return; + } +void string___AbstractString___output(val_t p0){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} 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_string; + fra.me.line = 151; + fra.me.meth = LOCATE_string___AbstractString___output; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:153 */ + REGB0 = TAG_Int(0); + /* ./../lib/standard//string.nit:154 */ while(1) { - REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]); - if (UNTAG_Bool(REGB0)) { - REGB0 = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); - REGB0 = CALL_kernel___Char___to_lower(REGB0)(REGB0); - CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], REGB0); + /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:212 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)vft[INIT_TABLE_POS_String].i; struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; val_t REGB0; val_t REGB1; - val_t REGB2; - val_t REGB3; - val_t REGB4; - val_t REGB5; val_t tmp; + if (init_table[itpos0]) return; fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; fra.me.file = LOCATE_string; - fra.me.line = 189; - fra.me.meth = LOCATE_string___String_____eqeq; + fra.me.line = 167; + fra.me.meth = LOCATE_string___String___with_native; fra.me.has_broke = 0; fra.me.REG_size = 2; fra.me.REG[0] = NIT_NULL; fra.me.REG[1] = NIT_NULL; fra.me.REG[0] = p0; fra.me.REG[1] = p1; - REGB0 = TAG_Bool((fra.me.REG[1]!=NIT_NULL) && VAL_ISA(fra.me.REG[1], COLOR_String, ID_String)) /*cast String*/; - REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); - /* ./../lib/standard//string.nit:191 */ - if (UNTAG_Bool(REGB0)) { - REGB0 = TAG_Bool(true); - } else { - REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL); - REGB0 = REGB1; - } - if (UNTAG_Bool(REGB0)) { + REGB0 = p2; + /* ./../lib/standard//string.nit:170 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//string.nit:170 */ + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Assert failed", NULL, LOCATE_string, 170); + } + /* ./../lib/standard//string.nit:171 */ + ATTR_string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1]; + /* ./../lib/standard//string.nit:172 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos0] = 1; + return; +} +void string___String___from_cstring(val_t p0, val_t p1, int* init_table){ + int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_String].i; + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t tmp; + if (init_table[itpos1]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_string; + fra.me.line = 175; + fra.me.meth = LOCATE_string___String___from_cstring; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//string.nit:178 */ + REGB0 = CALL_string___NativeString___cstring_length(fra.me.REG[1])(fra.me.REG[1]); + /* ./../lib/standard//string.nit:179 */ + ATTR_string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1]; + /* ./../lib/standard//string.nit:180 */ + ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos1] = 1; + return; +} +val_t string___String___to_cstring(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_string; + fra.me.line = 183; + fra.me.meth = LOCATE_string___String___to_cstring; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:186 */ + REGB0 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 186); + } + fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +val_t string___String_____eqeq(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t REGB3; + val_t REGB4; + val_t REGB5; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_string; + fra.me.line = 189; + fra.me.meth = LOCATE_string___String_____eqeq; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//string.nit:191 */ + REGB0 = TAG_Bool((fra.me.REG[1]!=NIT_NULL) && VAL_ISA(fra.me.REG[1], COLOR_String, ID_String)) /*cast String*/; + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(true); + } else { + REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + REGB0 = REGB1; + } + if (UNTAG_Bool(REGB0)) { REGB0 = TAG_Bool(false); goto label1; } - REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); if (UNTAG_Bool(REGB1)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); } REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); - REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL); /* ./../lib/standard//string.nit:193 */ + REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL); if (UNTAG_Bool(REGB2)) { - fprintf(stderr, "Reciever is null"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 193); - nit_exit(1); + nit_abort("Reciever is null", NULL, LOCATE_string, 193); } - REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); /* ./../lib/standard//collection//array.nit:23 */ + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); if (UNTAG_Bool(REGB2)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); } REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); - REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1)); /* ./../lib/standard//string.nit:193 */ + REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1)); if (UNTAG_Bool(REGB3)) { } else { + /* ./../lib/standard//kernel.nit:207 */ REGB2 = TAG_Bool((REGB2)==(REGB1)); + /* ./../lib/standard//string.nit:193 */ REGB3 = REGB2; - /* ./../lib/standard//string.nit:193 */ } REGB3 = TAG_Bool(!UNTAG_Bool(REGB3)); if (UNTAG_Bool(REGB3)) { @@ -723,39 +856,39 @@ val_t string___String_____eqeq(val_t p0, val_t p1){ REGB0 = REGB3; goto label1; } + /* ./../lib/standard//string.nit:194 */ REGB3 = TAG_Int(0); - REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL); /* ./../lib/standard//string.nit:195 */ + REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL); if (UNTAG_Bool(REGB2)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_items"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 195); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 195); } fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]); - REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[1])!=NIT_NULL); /* ./../lib/standard//string.nit:196 */ + REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[1])!=NIT_NULL); if (UNTAG_Bool(REGB2)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_items"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 196); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 196); } fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[1]); /* ./../lib/standard//string.nit:197 */ while(1) { + /* ./../lib/standard//kernel.nit:212 */ REGB2 = TAG_Bool(UNTAG_Int(REGB3)=UNTAG_Int(REGB1)); + /* ./../lib/standard//string.nit:240 */ + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Assert failed", NULL, LOCATE_string, 240); + } + /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:218 */ + REGB1 = TAG_Int(UNTAG_Int(REGB1)*UNTAG_Int(REGB0)); + /* ./../lib/standard//string.nit:241 */ + fra.me.REG[1] = NEW_Buffer_string___Buffer___with_capacity(REGB1); + /* ./../lib/standard//string.nit:242 */ + while(1) { + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:214 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1)); + /* ./../lib/standard//string.nit:242 */ + if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//string.nit:243 */ + CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); + /* ./../lib/standard//string.nit:244 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1)); + /* ./../lib/standard//string.nit:244 */ + REGB0 = REGB1; + } else { + /* ./../lib/standard//string.nit:242 */ + goto label1; + } + } + label1: while(0); + /* ./../lib/standard//string.nit:246 */ + fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]); + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[1]; +} +val_t string___String___to_s(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_string; + fra.me.line = 249; + fra.me.meth = LOCATE_string___String___to_s; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:249 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} val_t string___String___hash(val_t p0){ struct {struct stack_frame_t me;} fra; val_t REGB0; @@ -911,44 +1173,52 @@ val_t string___String___hash(val_t p0){ fra.me.REG_size = 1; fra.me.REG[0] = NIT_NULL; fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:254 */ REGB0 = TAG_Int(5381); - REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); /* ./../lib/standard//string.nit:255 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); if (UNTAG_Bool(REGB1)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 255); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_string, 255); } REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); REGB2 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2)); - REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL); /* ./../lib/standard//string.nit:256 */ + REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL); if (UNTAG_Bool(REGB1)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_items"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 256); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 256); } fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]); /* ./../lib/standard//string.nit:257 */ while(1) { REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ REGB1 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB1)); /* ./../lib/standard//string.nit:257 */ if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//string.nit:258 */ REGB1 = TAG_Int(32); + /* ./../lib/standard//kernel.nit:218 */ REGB1 = TAG_Int(UNTAG_Int(REGB0)*UNTAG_Int(REGB1)); + /* ./../lib/standard//kernel.nit:215 */ REGB1 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0)); + /* ./../lib/standard//string.nit:585 */ REGB3 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB2)]); + /* ./../lib/standard//kernel.nit:382 */ REGB3 = TAG_Int((unsigned char)UNTAG_Char(REGB3)); + /* ./../lib/standard//kernel.nit:215 */ REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3)); + /* ./../lib/standard//string.nit:258 */ REGB0 = REGB3; + /* ./../lib/standard//string.nit:259 */ REGB3 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3)); + /* ./../lib/standard//string.nit:259 */ REGB2 = REGB3; - /* ./../lib/standard//string.nit:259 */ } else { /* ./../lib/standard//string.nit:257 */ goto label1; @@ -961,543 +1231,38 @@ val_t string___String___hash(val_t p0){ stack_frame_head = fra.me.prev; return REGB0; } -val_t string___String___to_s(val_t p0){ +void string___Buffer_____braeq(val_t p0, val_t p1, val_t p2){ struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t REGB3; val_t tmp; fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; fra.me.file = LOCATE_string; - fra.me.line = 249; - fra.me.meth = LOCATE_string___String___to_s; - fra.me.has_broke = 0; - fra.me.REG_size = 1; - fra.me.REG[0] = NIT_NULL; - fra.me.REG[0] = p0; - /* ./../lib/standard//string.nit:249 */ - goto label1; - label1: while(0); - stack_frame_head = fra.me.prev; - return fra.me.REG[0]; -} -void string___String___with_native(val_t p0, val_t p1, val_t p2, int* init_table){ - int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_String].i; - struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; - val_t REGB0; - val_t REGB1; - val_t tmp; - if (init_table[itpos0]) return; - fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; - fra.me.file = LOCATE_string; - fra.me.line = 167; - fra.me.meth = LOCATE_string___String___with_native; - fra.me.has_broke = 0; - fra.me.REG_size = 2; - fra.me.REG[0] = NIT_NULL; - fra.me.REG[1] = NIT_NULL; - fra.me.REG[0] = p0; - fra.me.REG[1] = p1; - REGB0 = p2; - REGB1 = TAG_Int(0); - REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); - /* ./../lib/standard//string.nit:170 */ - if (UNTAG_Bool(REGB1)) { - } else { - fprintf(stderr, "Assert failed"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 170); - nit_exit(1); - } - /* ./../lib/standard//string.nit:171 */ - ATTR_string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1]; - /* ./../lib/standard//string.nit:172 */ - ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; - stack_frame_head = fra.me.prev; - init_table[itpos0] = 1; - return; -} -void string___String___from_cstring(val_t p0, val_t p1, int* init_table){ - int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_String].i; - struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; - val_t REGB0; - val_t tmp; - if (init_table[itpos1]) return; - fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; - fra.me.file = LOCATE_string; - fra.me.line = 175; - fra.me.meth = LOCATE_string___String___from_cstring; - fra.me.has_broke = 0; - fra.me.REG_size = 2; - fra.me.REG[0] = NIT_NULL; - fra.me.REG[1] = NIT_NULL; - fra.me.REG[0] = p0; - fra.me.REG[1] = p1; - REGB0 = CALL_string___NativeString___cstring_length(fra.me.REG[1])(fra.me.REG[1]); - /* ./../lib/standard//string.nit:179 */ - ATTR_string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1]; - /* ./../lib/standard//string.nit:180 */ - ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB0; - stack_frame_head = fra.me.prev; - init_table[itpos1] = 1; - return; -} -val_t string___String___to_cstring(val_t p0){ - struct {struct stack_frame_t me;} fra; - val_t REGB0; - val_t tmp; - fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; - fra.me.file = LOCATE_string; - fra.me.line = 183; - fra.me.meth = LOCATE_string___String___to_cstring; - fra.me.has_broke = 0; - fra.me.REG_size = 1; - fra.me.REG[0] = NIT_NULL; - fra.me.REG[0] = p0; - REGB0 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL); - /* ./../lib/standard//string.nit:186 */ - if (UNTAG_Bool(REGB0)) { - } else { - fprintf(stderr, "Uninitialized attribute %s", "_items"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 186); - nit_exit(1); - } - fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]); - goto label1; - label1: while(0); - stack_frame_head = fra.me.prev; - return fra.me.REG[0]; -} -val_t string___String_____plus(val_t p0, val_t p1){ - 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_string; - fra.me.line = 228; - fra.me.meth = LOCATE_string___String_____plus; - fra.me.has_broke = 0; - fra.me.REG_size = 3; - fra.me.REG[0] = NIT_NULL; - fra.me.REG[1] = NIT_NULL; - fra.me.REG[2] = NIT_NULL; - fra.me.REG[0] = p0; - fra.me.REG[1] = p1; - REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); - /* ./../lib/standard//collection//array.nit:23 */ - if (UNTAG_Bool(REGB0)) { - } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); - } - REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); - REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); - if (UNTAG_Bool(REGB1)) { - } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); - } - REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); - REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); - fra.me.REG[2] = NEW_Buffer_string___Buffer___with_capacity(REGB1); - /* ./../lib/standard//string.nit:232 */ - CALL_abstract_collection___Sequence___append(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0]); - /* ./../lib/standard//string.nit:233 */ - CALL_abstract_collection___Sequence___append(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]); - fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]); - /* ./../lib/standard//string.nit:234 */ - goto label1; - label1: while(0); - stack_frame_head = fra.me.prev; - return fra.me.REG[2]; -} -val_t string___String_____star(val_t p0, val_t p1){ - struct {struct stack_frame_t me; val_t MORE_REG[1];} 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_string; - fra.me.line = 237; - fra.me.meth = LOCATE_string___String_____star; - fra.me.has_broke = 0; - fra.me.REG_size = 2; - fra.me.REG[0] = NIT_NULL; - fra.me.REG[1] = NIT_NULL; - fra.me.REG[0] = p0; - REGB0 = p1; - REGB1 = TAG_Int(0); - REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); - /* ./../lib/standard//string.nit:240 */ - if (UNTAG_Bool(REGB1)) { - } else { - fprintf(stderr, "Assert failed"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 240); - nit_exit(1); - } - REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); - /* ./../lib/standard//collection//array.nit:23 */ - if (UNTAG_Bool(REGB1)) { - } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); - } - REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); - REGB1 = TAG_Int(UNTAG_Int(REGB1)*UNTAG_Int(REGB0)); - fra.me.REG[1] = NEW_Buffer_string___Buffer___with_capacity(REGB1); - /* ./../lib/standard//string.nit:242 */ - while(1) { - REGB1 = TAG_Int(0); - REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1)); - /* ./../lib/standard//string.nit:242 */ - if (UNTAG_Bool(REGB1)) { - /* ./../lib/standard//string.nit:243 */ - CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]); - REGB1 = TAG_Int(1); - REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1)); - REGB0 = REGB1; - /* ./../lib/standard//string.nit:244 */ - } else { - /* ./../lib/standard//string.nit:242 */ - goto label1; - } - } - label1: while(0); - fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]); - /* ./../lib/standard//string.nit:246 */ - goto label2; - label2: while(0); - stack_frame_head = fra.me.prev; - return fra.me.REG[1]; -} -val_t string___Buffer_____eqeq(val_t p0, val_t p1){ - struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; - val_t REGB0; - val_t REGB1; - val_t REGB2; - val_t REGB3; - val_t REGB4; - val_t REGB5; - val_t tmp; - fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; - fra.me.file = LOCATE_string; - fra.me.line = 373; - fra.me.meth = LOCATE_string___Buffer_____eqeq; - fra.me.has_broke = 0; - fra.me.REG_size = 2; - fra.me.REG[0] = NIT_NULL; - fra.me.REG[1] = NIT_NULL; - fra.me.REG[0] = p0; - fra.me.REG[1] = p1; - REGB0 = TAG_Bool((fra.me.REG[1]!=NIT_NULL) && VAL_ISA(fra.me.REG[1], COLOR_Buffer, ID_Buffer)) /*cast Buffer*/; - REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); - /* ./../lib/standard//string.nit:375 */ - if (UNTAG_Bool(REGB0)) { - REGB0 = TAG_Bool(true); - } else { - REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL); - REGB0 = REGB1; - } - if (UNTAG_Bool(REGB0)) { - REGB0 = TAG_Bool(false); - goto label1; - } - REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); - /* ./../lib/standard//collection//array.nit:23 */ - if (UNTAG_Bool(REGB1)) { - } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); - } - REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); - REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL); - /* ./../lib/standard//string.nit:377 */ - if (UNTAG_Bool(REGB2)) { - fprintf(stderr, "Reciever is null"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 377); - nit_exit(1); - } - REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); - /* ./../lib/standard//collection//array.nit:23 */ - if (UNTAG_Bool(REGB2)) { - } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); - } - REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); - REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1)); - /* ./../lib/standard//string.nit:377 */ - if (UNTAG_Bool(REGB3)) { - } else { - REGB2 = TAG_Bool((REGB2)==(REGB1)); - REGB3 = REGB2; - /* ./../lib/standard//string.nit:377 */ - } - REGB3 = TAG_Bool(!UNTAG_Bool(REGB3)); - if (UNTAG_Bool(REGB3)) { - REGB3 = TAG_Bool(false); - REGB0 = REGB3; - goto label1; - } - REGB3 = TAG_Int(0); - REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL); - /* ./../lib/standard//string.nit:379 */ - if (UNTAG_Bool(REGB2)) { - } else { - fprintf(stderr, "Uninitialized attribute %s", "_items"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 379); - nit_exit(1); - } - fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]); - REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[1])!=NIT_NULL); - /* ./../lib/standard//string.nit:380 */ - if (UNTAG_Bool(REGB2)) { - } else { - fprintf(stderr, "Uninitialized attribute %s", "_items"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 380); - nit_exit(1); - } - fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[1]); - /* ./../lib/standard//string.nit:381 */ - while(1) { - REGB2 = TAG_Bool(UNTAG_Int(REGB3)=UNTAG_Int(REGB3)); /* ./../lib/standard//string.nit:281 */ if (UNTAG_Bool(REGB3)) { - REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); /* ./../lib/standard//collection//array.nit:23 */ + REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); if (UNTAG_Bool(REGB3)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); } REGB3 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//kernel.nit:212 */ REGB3 = TAG_Bool(UNTAG_Int(REGB0)vft[INIT_TABLE_POS_Buffer].i; @@ -1820,8 +1743,8 @@ void string___Buffer___init(val_t p0, int* init_table){ fra.me.REG_size = 1; fra.me.REG[0] = NIT_NULL; fra.me.REG[0] = p0; - REGB0 = TAG_Int(5); /* ./../lib/standard//string.nit:352 */ + REGB0 = TAG_Int(5); CALL_string___Buffer___with_capacity(fra.me.REG[0])(fra.me.REG[0], REGB0, init_table); stack_frame_head = fra.me.prev; init_table[itpos2] = 1; @@ -1846,113 +1769,235 @@ void string___Buffer___from(val_t p0, val_t p1, int* init_table){ fra.me.REG[2] = NIT_NULL; fra.me.REG[0] = p0; fra.me.REG[1] = p1; - fra.me.REG[2] = fra.me.REG[0]; /* ./../lib/standard//string.nit:355 */ + fra.me.REG[2] = fra.me.REG[0]; CALL_string___StringCapable___init(fra.me.REG[0])(fra.me.REG[0], init_table); - REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); /* ./../lib/standard//collection//array.nit:23 */ + REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); if (UNTAG_Bool(REGB0)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); } REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); + /* ./../lib/standard//string.nit:357 */ REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); /* ./../lib/standard//string.nit:357 */ ATTR_string___Buffer____capacity(fra.me.REG[2]) = REGB1; - REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); if (UNTAG_Bool(REGB1)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); } REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); /* ./../lib/standard//string.nit:358 */ ATTR_array___AbstractArrayRead____length(fra.me.REG[2]) = REGB1; - REGB1 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[2])!=NIT_NULL); /* ./../lib/standard//string.nit:359 */ + REGB1 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[2])!=NIT_NULL); if (UNTAG_Bool(REGB1)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_capacity"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 359); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_string, 359); } REGB1 = ATTR_string___Buffer____capacity(fra.me.REG[2]); + /* ./../lib/standard//string.nit:601 */ fra.me.REG[0] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char)))); /* ./../lib/standard//string.nit:359 */ ATTR_string___AbstractString____items(fra.me.REG[2]) = fra.me.REG[0]; + /* ./../lib/standard//string.nit:360 */ fra.me.REG[1] = CALL_string___AbstractString___items(fra.me.REG[1])(fra.me.REG[1]); REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[2])!=NIT_NULL); - /* ./../lib/standard//string.nit:360 */ if (UNTAG_Bool(REGB1)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_items"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 360); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 360); } fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[2]); REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); if (UNTAG_Bool(REGB1)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 360); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_string, 360); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + REGB0 = TAG_Int(0); + REGB2 = TAG_Int(0); + /* ./../lib/standard//string.nit:587 */ + (void)memcpy(UNBOX_NativeString(fra.me.REG[0])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB0), UNTAG_Int(REGB1));; + stack_frame_head = fra.me.prev; + init_table[itpos3] = 1; + return; +} +void string___Buffer___with_capacity(val_t p0, val_t p1, int* init_table){ + int itpos4 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Buffer].i; + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t tmp; + if (init_table[itpos4]) return; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_string; + fra.me.line = 363; + fra.me.meth = LOCATE_string___Buffer___with_capacity; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + /* ./../lib/standard//string.nit:363 */ + fra.me.REG[1] = fra.me.REG[0]; + CALL_string___StringCapable___init(fra.me.REG[0])(fra.me.REG[0], init_table); + /* ./../lib/standard//string.nit:366 */ + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./../lib/standard//string.nit:366 */ + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Assert failed", NULL, LOCATE_string, 366); + } + /* ./../lib/standard//string.nit:368 */ + REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ + REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1)); + /* ./../lib/standard//string.nit:601 */ + fra.me.REG[0] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char)))); + /* ./../lib/standard//string.nit:368 */ + ATTR_string___AbstractString____items(fra.me.REG[1]) = fra.me.REG[0]; + /* ./../lib/standard//string.nit:369 */ + ATTR_string___Buffer____capacity(fra.me.REG[1]) = REGB0; + /* ./../lib/standard//string.nit:370 */ + REGB0 = TAG_Int(0); + ATTR_array___AbstractArrayRead____length(fra.me.REG[1]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos4] = 1; + return; +} +val_t string___Buffer_____eqeq(val_t p0, val_t p1){ + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t REGB3; + val_t REGB4; + val_t REGB5; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_string; + fra.me.line = 373; + fra.me.meth = LOCATE_string___Buffer_____eqeq; + fra.me.has_broke = 0; + fra.me.REG_size = 2; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[1] = NIT_NULL; + fra.me.REG[0] = p0; + fra.me.REG[1] = p1; + /* ./../lib/standard//string.nit:375 */ + REGB0 = TAG_Bool((fra.me.REG[1]!=NIT_NULL) && VAL_ISA(fra.me.REG[1], COLOR_Buffer, ID_Buffer)) /*cast Buffer*/; + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(true); + } else { + REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + REGB0 = REGB1; + } + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(false); + goto label1; + } + /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB1)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); + /* ./../lib/standard//string.nit:377 */ + REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL); + if (UNTAG_Bool(REGB2)) { + nit_abort("Reciever is null", NULL, LOCATE_string, 377); + } + /* ./../lib/standard//collection//array.nit:23 */ + REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); + } + REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]); + /* ./../lib/standard//string.nit:377 */ + REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1)); + if (UNTAG_Bool(REGB3)) { + } else { + /* ./../lib/standard//kernel.nit:207 */ + REGB2 = TAG_Bool((REGB2)==(REGB1)); + /* ./../lib/standard//string.nit:377 */ + REGB3 = REGB2; + } + REGB3 = TAG_Bool(!UNTAG_Bool(REGB3)); + if (UNTAG_Bool(REGB3)) { + REGB3 = TAG_Bool(false); + REGB0 = REGB3; + goto label1; + } + /* ./../lib/standard//string.nit:378 */ + REGB3 = TAG_Int(0); + /* ./../lib/standard//string.nit:379 */ + REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 379); + } + fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]); + /* ./../lib/standard//string.nit:380 */ + REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[1])!=NIT_NULL); + if (UNTAG_Bool(REGB2)) { + } else { + nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 380); } - REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); - REGB0 = TAG_Int(0); - REGB2 = TAG_Int(0); - /* ./../lib/standard//string.nit:587 */ - (void)memcpy(UNBOX_NativeString(fra.me.REG[0])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB0), UNTAG_Int(REGB1));; - stack_frame_head = fra.me.prev; - init_table[itpos3] = 1; - return; -} -void string___Buffer___with_capacity(val_t p0, val_t p1, int* init_table){ - int itpos4 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Buffer].i; - struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; - val_t REGB0; - val_t REGB1; - val_t tmp; - if (init_table[itpos4]) return; - fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; - fra.me.file = LOCATE_string; - fra.me.line = 363; - fra.me.meth = LOCATE_string___Buffer___with_capacity; - fra.me.has_broke = 0; - fra.me.REG_size = 2; - fra.me.REG[0] = NIT_NULL; - fra.me.REG[1] = NIT_NULL; - fra.me.REG[0] = p0; - REGB0 = p1; - fra.me.REG[1] = fra.me.REG[0]; - /* ./../lib/standard//string.nit:363 */ - CALL_string___StringCapable___init(fra.me.REG[0])(fra.me.REG[0], init_table); - REGB1 = TAG_Int(0); - REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); - /* ./../lib/standard//string.nit:366 */ - if (UNTAG_Bool(REGB1)) { - } else { - fprintf(stderr, "Assert failed"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 366); - nit_exit(1); + fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[1]); + /* ./../lib/standard//string.nit:381 */ + while(1) { + /* ./../lib/standard//kernel.nit:212 */ + REGB2 = TAG_Bool(UNTAG_Int(REGB3)=UNTAG_Int(REGB0)); /* ./../lib/standard//string.nit:452 */ if (UNTAG_Bool(REGB0)) { REGB0 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:214 */ REGB0 = TAG_Bool(UNTAG_Int(REGB2)>UNTAG_Int(REGB0)); - /* ./../lib/standard//string.nit:452 */ } else { + /* ./../lib/standard//string.nit:452 */ REGB3 = TAG_Bool(false); REGB0 = REGB3; } if (UNTAG_Bool(REGB0)) { + /* ./../lib/standard//kernel.nit:220 */ REGB0 = TAG_Int(UNTAG_Int(REGB2)%UNTAG_Int(REGB1)); - REGB0 = CALL_kernel___Int___to_c(REGB0)(REGB0); /* ./../lib/standard//string.nit:453 */ + REGB0 = CALL_kernel___Int___to_c(REGB0)(REGB0); CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB4, REGB0); + /* ./../lib/standard//kernel.nit:219 */ REGB0 = TAG_Int(UNTAG_Int(REGB2)/UNTAG_Int(REGB1)); + /* ./../lib/standard//string.nit:454 */ REGB2 = REGB0; + /* ./../lib/standard//string.nit:455 */ REGB0 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ REGB0 = TAG_Int(UNTAG_Int(REGB4)-UNTAG_Int(REGB0)); + /* ./../lib/standard//string.nit:455 */ REGB4 = REGB0; - /* ./../lib/standard//string.nit:455 */ } else { /* ./../lib/standard//string.nit:452 */ goto label2; @@ -2239,6 +2279,29 @@ void string___Int___fill_buffer(val_t p0, val_t p1, val_t p2, val_t p3){ stack_frame_head = fra.me.prev; return; } +val_t string___Int___to_s(val_t p0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t REGB1; + val_t REGB2; + val_t tmp; + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_string; + fra.me.line = 459; + fra.me.meth = LOCATE_string___Int___to_s; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + REGB0 = p0; + /* ./../lib/standard//string.nit:460 */ + REGB1 = TAG_Int(10); + REGB2 = TAG_Bool(true); + fra.me.REG[0] = CALL_string___Int___to_base(REGB0)(REGB0, REGB1, REGB2); + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} val_t string___Int___to_hex(val_t p0){ struct {struct stack_frame_t me;} fra; val_t REGB0; @@ -2253,10 +2316,10 @@ val_t string___Int___to_hex(val_t p0){ fra.me.REG_size = 1; fra.me.REG[0] = NIT_NULL; REGB0 = p0; + /* ./../lib/standard//string.nit:463 */ REGB1 = TAG_Int(16); REGB2 = TAG_Bool(false); fra.me.REG[0] = CALL_string___Int___to_base(REGB0)(REGB0, REGB1, REGB2); - /* ./../lib/standard//string.nit:463 */ goto label1; label1: while(0); stack_frame_head = fra.me.prev; @@ -2281,6 +2344,7 @@ val_t string___Int___to_base(val_t p0, val_t p1, val_t p2){ REGB0 = p0; REGB1 = p1; REGB2 = p2; + /* ./../lib/standard//string.nit:468 */ REGB3 = CALL_kernel___Int___digit_count(REGB0)(REGB0, REGB1); /* ./../lib/standard//string.nit:469 */ if (!once_value_1) { @@ -2290,12 +2354,13 @@ val_t string___Int___to_base(val_t p0, val_t p1, val_t p2){ once_value_1 = fra.me.REG[0]; register_static_object(&once_value_1); } else fra.me.REG[0] = once_value_1; + fra.me.REG[0] = fra.me.REG[0]; fra.me.REG[0] = CALL_string___String_____star(fra.me.REG[0])(fra.me.REG[0], REGB3); fra.me.REG[0] = NEW_Buffer_string___Buffer___from(fra.me.REG[0]); /* ./../lib/standard//string.nit:470 */ CALL_string___Int___fill_buffer(REGB0)(REGB0, fra.me.REG[0], REGB1, REGB2); - fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]); /* ./../lib/standard//string.nit:471 */ + fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]); goto label2; label2: while(0); stack_frame_head = fra.me.prev; @@ -2313,9 +2378,9 @@ val_t string___Float___to_s(val_t p0){ fra.me.REG_size = 1; fra.me.REG[0] = NIT_NULL; fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:476 */ REGB0 = TAG_Int(6); fra.me.REG[0] = CALL_string___Float___to_precision(fra.me.REG[0])(fra.me.REG[0], REGB0); - /* ./../lib/standard//string.nit:476 */ goto label1; label1: while(0); stack_frame_head = fra.me.prev; @@ -2342,49 +2407,63 @@ val_t string___Float___to_precision(val_t p0, val_t p1){ fra.me.REG[3] = NIT_NULL; fra.me.REG[0] = p0; REGB0 = p1; + /* ./../lib/standard//string.nit:481 */ REGB1 = TAG_Int(0); REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1)); - /* ./../lib/standard//string.nit:481 */ if (UNTAG_Bool(REGB2)) { } else { + /* ./../lib/standard//kernel.nit:207 */ REGB1 = TAG_Bool((REGB0)==(REGB1)); + /* ./../lib/standard//string.nit:481 */ REGB2 = REGB1; - /* ./../lib/standard//string.nit:481 */ } if (UNTAG_Bool(REGB2)) { + /* ./../lib/standard//kernel.nit:196 */ REGB2 = TAG_Int((bigint)UNBOX_Float(fra.me.REG[0])); - fra.me.REG[1] = CALL_string___Object___to_s(REGB2)(REGB2); /* ./../lib/standard//string.nit:481 */ + fra.me.REG[1] = CALL_string___Object___to_s(REGB2)(REGB2); goto label1; } + /* ./../lib/standard//kernel.nit:196 */ REGB2 = TAG_Int((bigint)UNBOX_Float(fra.me.REG[0])); + /* ./../lib/standard//string.nit:484 */ fra.me.REG[2] = BOX_Float(1.0); /* ./../lib/standard//string.nit:485 */ while(1) { REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:214 */ REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1)); /* ./../lib/standard//string.nit:485 */ if (UNTAG_Bool(REGB1)) { + /* ./../lib/standard//string.nit:486 */ fra.me.REG[3] = BOX_Float(10.0); + /* ./../lib/standard//kernel.nit:193 */ fra.me.REG[3] = BOX_Float(UNBOX_Float(fra.me.REG[2])*UNBOX_Float(fra.me.REG[3])); + /* ./../lib/standard//string.nit:486 */ fra.me.REG[2] = fra.me.REG[3]; + /* ./../lib/standard//string.nit:487 */ REGB1 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:217 */ REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1)); + /* ./../lib/standard//string.nit:487 */ REGB0 = REGB1; - /* ./../lib/standard//string.nit:487 */ } else { /* ./../lib/standard//string.nit:485 */ goto label2; } } label2: while(0); + /* ./../lib/standard//kernel.nit:224 */ fra.me.REG[3] = BOX_Float((float)UNTAG_Int(REGB2)); + /* ./../lib/standard//kernel.nit:192 */ fra.me.REG[3] = BOX_Float(UNBOX_Float(fra.me.REG[0])-UNBOX_Float(fra.me.REG[3])); + /* ./../lib/standard//kernel.nit:193 */ fra.me.REG[2] = BOX_Float(UNBOX_Float(fra.me.REG[3])*UNBOX_Float(fra.me.REG[2])); + /* ./../lib/standard//kernel.nit:196 */ REGB0 = TAG_Int((bigint)UNBOX_Float(fra.me.REG[2])); + /* ./../lib/standard//string.nit:490 */ REGB1 = TAG_Int(5); fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB1); - /* ./../lib/standard//string.nit:490 */ if (!once_value_3) { fra.me.REG[3] = BOX_NativeString(""); REGB1 = TAG_Int(0); @@ -2392,9 +2471,10 @@ val_t string___Float___to_precision(val_t p0, val_t p1){ once_value_3 = fra.me.REG[3]; register_static_object(&once_value_3); } else fra.me.REG[3] = once_value_3; - array___Array___add(fra.me.REG[2], fra.me.REG[3]); + fra.me.REG[3] = fra.me.REG[3]; + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]); fra.me.REG[3] = CALL_string___Object___to_s(REGB2)(REGB2); - array___Array___add(fra.me.REG[2], fra.me.REG[3]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]); if (!once_value_4) { fra.me.REG[3] = BOX_NativeString("."); REGB2 = TAG_Int(1); @@ -2402,9 +2482,10 @@ val_t string___Float___to_precision(val_t p0, val_t p1){ once_value_4 = fra.me.REG[3]; register_static_object(&once_value_4); } else fra.me.REG[3] = once_value_4; - array___Array___add(fra.me.REG[2], fra.me.REG[3]); + fra.me.REG[3] = fra.me.REG[3]; + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]); fra.me.REG[3] = CALL_string___Object___to_s(REGB0)(REGB0); - array___Array___add(fra.me.REG[2], fra.me.REG[3]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]); if (!once_value_5) { fra.me.REG[3] = BOX_NativeString(""); REGB0 = TAG_Int(0); @@ -2412,7 +2493,8 @@ val_t string___Float___to_precision(val_t p0, val_t p1){ once_value_5 = fra.me.REG[3]; register_static_object(&once_value_5); } else fra.me.REG[3] = once_value_5; - array___Array___add(fra.me.REG[2], fra.me.REG[3]); + fra.me.REG[3] = fra.me.REG[3]; + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]); fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]); fra.me.REG[1] = fra.me.REG[2]; goto label1; @@ -2433,76 +2515,83 @@ val_t string___Char___to_s(val_t p0){ fra.me.REG_size = 1; fra.me.REG[0] = NIT_NULL; REGB0 = p0; + /* ./../lib/standard//string.nit:497 */ REGB1 = TAG_Int(1); fra.me.REG[0] = NEW_Buffer_string___Buffer___with_capacity(REGB1); - REGB1 = TAG_Int(0); /* ./../lib/standard//string.nit:498 */ + REGB1 = TAG_Int(0); CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB1, REGB0); - fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]); /* ./../lib/standard//string.nit:499 */ + fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]); goto label1; label1: while(0); stack_frame_head = fra.me.prev; return fra.me.REG[0]; } val_t string___Collection___to_s(val_t p0){ - struct {struct stack_frame_t me; val_t MORE_REG[2];} fra; - val_t REGB0; - val_t REGB1; + struct {struct stack_frame_t me; val_t MORE_REG[1];} fra; val_t tmp; fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; fra.me.file = LOCATE_string; fra.me.line = 504; fra.me.meth = LOCATE_string___Collection___to_s; fra.me.has_broke = 0; - fra.me.REG_size = 3; + fra.me.REG_size = 2; fra.me.REG[0] = NIT_NULL; fra.me.REG[1] = NIT_NULL; - fra.me.REG[2] = NIT_NULL; fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:507 */ fra.me.REG[1] = NEW_Buffer_string___Buffer___init(); - fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]); - /* ./../lib/standard//string.nit:508 */ - while(1) { - REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]); + CALL_abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_string___Collection___to_s_1)); + /* ./../lib/standard//string.nit:509 */ + fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]); + goto label2; + label2: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[1]; +} + void OC_string___Collection___to_s_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){ + struct {struct stack_frame_t me;} fra; + val_t REGB0; + val_t REGB1; + fun_t CREG[1]; + val_t tmp; + /* ./../lib/standard//string.nit:508 */ + fra.me.prev = stack_frame_head; stack_frame_head = &fra.me; + fra.me.file = LOCATE_string; + fra.me.line = 0; + fra.me.meth = LOCATE_string___Collection___to_s; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.closure_ctx = closctx_param; + fra.me.closure_funs = CREG; + fra.me.REG[0] = p0; + CREG[0] = clos_fun0; + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); if (UNTAG_Bool(REGB0)) { - fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); - REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); - if (UNTAG_Bool(REGB0)) { + } else { + REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL); + if (UNTAG_Bool(REGB1)) { + REGB1 = TAG_Bool(false); + REGB0 = REGB1; } else { - REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL); - if (UNTAG_Bool(REGB1)) { - REGB1 = TAG_Bool(false); - REGB0 = REGB1; - } else { - REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL); - REGB0 = REGB1; - } + REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL); + REGB0 = REGB1; } - REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + } + REGB0 = TAG_Bool(!UNTAG_Bool(REGB0)); + if (UNTAG_Bool(REGB0)) { + REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL); if (UNTAG_Bool(REGB0)) { - REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL); - if (UNTAG_Bool(REGB0)) { - fprintf(stderr, "Reciever is null"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 508); - nit_exit(1); - } - fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]); - CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); + nit_abort("Reciever is null", NULL, LOCATE_string, 508); } - } else { - goto label1; + fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]); + CALL_abstract_collection___Sequence___append(closctx->REG[1])(closctx->REG[1], fra.me.REG[0]); } - CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return; } - label1: while(0); - fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]); - /* ./../lib/standard//string.nit:509 */ - goto label2; - label2: while(0); - stack_frame_head = fra.me.prev; - return fra.me.REG[1]; -} val_t string___Collection___join(val_t p0, val_t p1){ struct {struct stack_frame_t me; val_t MORE_REG[5];} fra; val_t REGB0; @@ -2523,8 +2612,8 @@ val_t string___Collection___join(val_t p0, val_t p1){ fra.me.REG[5] = NIT_NULL; fra.me.REG[0] = p0; fra.me.REG[1] = p1; - REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]); /* ./../lib/standard//string.nit:515 */ + REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]); if (UNTAG_Bool(REGB0)) { if (!once_value_1) { fra.me.REG[2] = BOX_NativeString(""); @@ -2533,13 +2622,17 @@ val_t string___Collection___join(val_t p0, val_t p1){ 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]; goto label2; } + /* ./../lib/standard//string.nit:517 */ fra.me.REG[3] = NEW_Buffer_string___Buffer___init(); + /* ./../lib/standard//string.nit:520 */ fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]); + /* ./../lib/standard//string.nit:521 */ fra.me.REG[4] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); - REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL); /* ./../lib/standard//string.nit:522 */ + REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL); if (UNTAG_Bool(REGB0)) { } else { REGB1 = TAG_Bool(fra.me.REG[4]==NIT_NULL); @@ -2555,9 +2648,7 @@ val_t string___Collection___join(val_t p0, val_t p1){ if (UNTAG_Bool(REGB0)) { REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL); if (UNTAG_Bool(REGB0)) { - fprintf(stderr, "Reciever is null"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 522); - nit_exit(1); + nit_abort("Reciever is null", NULL, LOCATE_string, 522); } fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]); CALL_abstract_collection___Sequence___append(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]); @@ -2570,10 +2661,11 @@ val_t string___Collection___join(val_t p0, val_t p1){ if (UNTAG_Bool(REGB0)) { /* ./../lib/standard//string.nit:527 */ CALL_abstract_collection___Sequence___append(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]); + /* ./../lib/standard//string.nit:528 */ fra.me.REG[5] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); fra.me.REG[4] = fra.me.REG[5]; - REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL); /* ./../lib/standard//string.nit:529 */ + REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL); if (UNTAG_Bool(REGB0)) { } else { REGB1 = TAG_Bool(fra.me.REG[4]==NIT_NULL); @@ -2589,9 +2681,7 @@ val_t string___Collection___join(val_t p0, val_t p1){ if (UNTAG_Bool(REGB0)) { REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL); if (UNTAG_Bool(REGB0)) { - fprintf(stderr, "Reciever is null"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 529); - nit_exit(1); + nit_abort("Reciever is null", NULL, LOCATE_string, 529); } fra.me.REG[5] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]); CALL_abstract_collection___Sequence___append(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]); @@ -2604,9 +2694,9 @@ val_t string___Collection___join(val_t p0, val_t p1){ } } label3: while(0); + /* ./../lib/standard//string.nit:532 */ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]); fra.me.REG[2] = fra.me.REG[3]; - /* ./../lib/standard//string.nit:532 */ goto label2; label2: while(0); stack_frame_head = fra.me.prev; @@ -2630,62 +2720,62 @@ val_t string___Array___to_s(val_t p0){ fra.me.REG[1] = NIT_NULL; fra.me.REG[2] = NIT_NULL; fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:540 */ fra.me.REG[1] = NEW_Buffer_string___Buffer___init(); + /* ./../lib/standard//string.nit:541 */ REGB0 = TAG_Int(0); - REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); /* ./../lib/standard//collection//array.nit:23 */ + REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL); if (UNTAG_Bool(REGB1)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23); } REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]); /* ./../lib/standard//string.nit:543 */ while(1) { + /* ./../lib/standard//kernel.nit:212 */ REGB2 = TAG_Bool(UNTAG_Int(REGB0)=UNTAG_Int(REGB3)); - /* ./../lib/standard//collection//array.nit:233 */ + /* ./../lib/standard//collection//array.nit:245 */ if (UNTAG_Bool(REGB3)) { REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL); if (UNTAG_Bool(REGB3)) { } else { - fprintf(stderr, "Uninitialized attribute %s", "_length"); - fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233); - nit_exit(1); + nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 245); } REGB3 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]); + /* ./../lib/standard//kernel.nit:212 */ REGB3 = TAG_Bool(UNTAG_Int(REGB2)val[UNTAG_Int(REGB2)]; - /* ./../lib/standard//collection//array.nit:234 */ + /* ./../lib/standard//collection//array.nit:246 */ goto label1; label1: while(0); - REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL); /* ./../lib/standard//string.nit:545 */ + REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL); if (UNTAG_Bool(REGB2)) { } else { REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL); @@ -2701,25 +2791,25 @@ val_t string___Array___to_s(val_t p0){ if (UNTAG_Bool(REGB2)) { REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL); if (UNTAG_Bool(REGB2)) { - fprintf(stderr, "Reciever is null"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 545); - nit_exit(1); + nit_abort("Reciever is null", NULL, LOCATE_string, 545); } fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]); CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]); } + /* ./../lib/standard//string.nit:546 */ REGB2 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2)); + /* ./../lib/standard//string.nit:546 */ REGB0 = REGB2; - /* ./../lib/standard//string.nit:546 */ } else { /* ./../lib/standard//string.nit:543 */ goto label2; } } label2: while(0); - fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]); /* ./../lib/standard//string.nit:548 */ + fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]); goto label3; label3: while(0); stack_frame_head = fra.me.prev; @@ -2757,8 +2847,8 @@ val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){ fra.me.REG[0] = p0; fra.me.REG[1] = p1; fra.me.REG[2] = p2; - REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]); /* ./../lib/standard//string.nit:556 */ + REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]); if (UNTAG_Bool(REGB0)) { if (!once_value_1) { fra.me.REG[3] = BOX_NativeString(""); @@ -2767,14 +2857,19 @@ val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){ once_value_1 = fra.me.REG[3]; register_static_object(&once_value_1); } else fra.me.REG[3] = once_value_1; + fra.me.REG[3] = fra.me.REG[3]; goto label2; } + /* ./../lib/standard//string.nit:558 */ fra.me.REG[4] = NEW_Buffer_string___Buffer___init(); + /* ./../lib/standard//string.nit:561 */ fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]); + /* ./../lib/standard//string.nit:562 */ fra.me.REG[5] = CALL_abstract_collection___MapIterator___key(fra.me.REG[0])(fra.me.REG[0]); + /* ./../lib/standard//string.nit:563 */ fra.me.REG[6] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); - REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL); /* ./../lib/standard//string.nit:564 */ + REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL); if (UNTAG_Bool(REGB0)) { } else { REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL); @@ -2797,9 +2892,10 @@ val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){ once_value_3 = fra.me.REG[8]; register_static_object(&once_value_3); } else fra.me.REG[8] = once_value_3; - array___Array___add(fra.me.REG[7], fra.me.REG[8]); + fra.me.REG[8] = fra.me.REG[8]; + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]); fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]); - array___Array___add(fra.me.REG[7], fra.me.REG[8]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]); if (!once_value_4) { fra.me.REG[8] = BOX_NativeString(""); REGB0 = TAG_Int(0); @@ -2807,8 +2903,9 @@ val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){ once_value_4 = fra.me.REG[8]; register_static_object(&once_value_4); } else fra.me.REG[8] = once_value_4; - array___Array___add(fra.me.REG[7], fra.me.REG[8]); - array___Array___add(fra.me.REG[7], fra.me.REG[2]); + fra.me.REG[8] = fra.me.REG[8]; + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]); if (!once_value_5) { fra.me.REG[8] = BOX_NativeString(""); REGB0 = TAG_Int(0); @@ -2816,9 +2913,10 @@ val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){ once_value_5 = fra.me.REG[8]; register_static_object(&once_value_5); } else fra.me.REG[8] = once_value_5; - array___Array___add(fra.me.REG[7], fra.me.REG[8]); + fra.me.REG[8] = fra.me.REG[8]; + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]); fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]); - array___Array___add(fra.me.REG[7], fra.me.REG[8]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]); if (!once_value_6) { fra.me.REG[8] = BOX_NativeString(""); REGB0 = TAG_Int(0); @@ -2826,7 +2924,8 @@ val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){ once_value_6 = fra.me.REG[8]; register_static_object(&once_value_6); } else fra.me.REG[8] = once_value_6; - array___Array___add(fra.me.REG[7], fra.me.REG[8]); + fra.me.REG[8] = fra.me.REG[8]; + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]); fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]); CALL_abstract_collection___Sequence___append(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[7]); } @@ -2838,12 +2937,14 @@ val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){ if (UNTAG_Bool(REGB0)) { /* ./../lib/standard//string.nit:569 */ CALL_abstract_collection___Sequence___append(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]); + /* ./../lib/standard//string.nit:570 */ fra.me.REG[7] = CALL_abstract_collection___MapIterator___key(fra.me.REG[0])(fra.me.REG[0]); fra.me.REG[5] = fra.me.REG[7]; + /* ./../lib/standard//string.nit:571 */ fra.me.REG[7] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]); fra.me.REG[6] = fra.me.REG[7]; - REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL); /* ./../lib/standard//string.nit:572 */ + REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL); if (UNTAG_Bool(REGB0)) { } else { REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL); @@ -2866,9 +2967,10 @@ val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){ once_value_7 = fra.me.REG[8]; register_static_object(&once_value_7); } else fra.me.REG[8] = once_value_7; - array___Array___add(fra.me.REG[7], fra.me.REG[8]); + fra.me.REG[8] = fra.me.REG[8]; + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]); fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[5])(fra.me.REG[5]); - array___Array___add(fra.me.REG[7], fra.me.REG[8]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]); if (!once_value_8) { fra.me.REG[8] = BOX_NativeString(""); REGB0 = TAG_Int(0); @@ -2876,8 +2978,9 @@ val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){ once_value_8 = fra.me.REG[8]; register_static_object(&once_value_8); } else fra.me.REG[8] = once_value_8; - array___Array___add(fra.me.REG[7], fra.me.REG[8]); - array___Array___add(fra.me.REG[7], fra.me.REG[2]); + fra.me.REG[8] = fra.me.REG[8]; + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[2]); if (!once_value_9) { fra.me.REG[8] = BOX_NativeString(""); REGB0 = TAG_Int(0); @@ -2885,9 +2988,10 @@ val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){ once_value_9 = fra.me.REG[8]; register_static_object(&once_value_9); } else fra.me.REG[8] = once_value_9; - array___Array___add(fra.me.REG[7], fra.me.REG[8]); + fra.me.REG[8] = fra.me.REG[8]; + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]); fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]); - array___Array___add(fra.me.REG[7], fra.me.REG[8]); + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]); if (!once_value_10) { fra.me.REG[8] = BOX_NativeString(""); REGB0 = TAG_Int(0); @@ -2895,7 +2999,8 @@ val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){ once_value_10 = fra.me.REG[8]; register_static_object(&once_value_10); } else fra.me.REG[8] = once_value_10; - array___Array___add(fra.me.REG[7], fra.me.REG[8]); + fra.me.REG[8] = fra.me.REG[8]; + CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]); fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]); CALL_abstract_collection___Sequence___append(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[7]); } @@ -2907,9 +3012,9 @@ val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){ } } label11: while(0); + /* ./../lib/standard//string.nit:575 */ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]); fra.me.REG[3] = fra.me.REG[4]; - /* ./../lib/standard//string.nit:575 */ goto label2; label2: while(0); stack_frame_head = fra.me.prev; @@ -2928,8 +3033,8 @@ val_t string___NativeString_____bra(val_t p0, val_t p1){ fra.me.REG[0] = NIT_NULL; fra.me.REG[0] = p0; REGB0 = p1; - REGB0 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]); /* ./../lib/standard//string.nit:585 */ + REGB0 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]); stack_frame_head = fra.me.prev; return REGB0; } @@ -2992,25 +3097,29 @@ val_t string___NativeString___cstring_length(val_t p0){ fra.me.REG_size = 1; fra.me.REG[0] = NIT_NULL; fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:592 */ REGB0 = TAG_Int(0); /* ./../lib/standard//string.nit:593 */ while(1) { + /* ./../lib/standard//string.nit:585 */ REGB1 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]); + /* ./../lib/standard//string.nit:593 */ REGB2 = TAG_Char('\0'); REGB3 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB2)); - /* ./../lib/standard//string.nit:593 */ if (UNTAG_Bool(REGB3)) { } else { + /* ./../lib/standard//kernel.nit:347 */ REGB2 = TAG_Bool((REGB1)==(REGB2)); + /* ./../lib/standard//string.nit:593 */ REGB3 = REGB2; - /* ./../lib/standard//string.nit:593 */ } REGB3 = TAG_Bool(!UNTAG_Bool(REGB3)); if (UNTAG_Bool(REGB3)) { REGB3 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:215 */ REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3)); + /* ./../lib/standard//string.nit:593 */ REGB0 = REGB3; - /* ./../lib/standard//string.nit:593 */ } else { goto label1; } @@ -3034,8 +3143,8 @@ val_t string___NativeString___atoi(val_t p0){ fra.me.REG_size = 1; fra.me.REG[0] = NIT_NULL; fra.me.REG[0] = p0; - REGB0 = TAG_Int(atoi(UNBOX_NativeString(fra.me.REG[0]))); /* ./../lib/standard//string.nit:596 */ + REGB0 = TAG_Int(atoi(UNBOX_NativeString(fra.me.REG[0]))); stack_frame_head = fra.me.prev; return REGB0; } @@ -3065,9 +3174,10 @@ val_t string___StringCapable___calloc_string(val_t p0, val_t p1){ fra.me.has_broke = 0; fra.me.REG_size = 1; fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; REGB0 = p1; - fra.me.REG[0] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB0) * sizeof(char)))); /* ./../lib/standard//string.nit:601 */ + fra.me.REG[0] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB0) * sizeof(char)))); stack_frame_head = fra.me.prev; return fra.me.REG[0]; } @@ -3100,9 +3210,9 @@ val_t string___Sys___args(val_t p0){ fra.me.REG[0] = NIT_NULL; fra.me.REG[1] = NIT_NULL; fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:609 */ fra.me.REG[1] = ATTR_string___Sys____args_cache(fra.me.REG[0]); REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL); - /* ./../lib/standard//string.nit:609 */ if (UNTAG_Bool(REGB0)) { } else { REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL); @@ -3117,14 +3227,12 @@ val_t string___Sys___args(val_t p0){ if (UNTAG_Bool(REGB0)) { CALL_string___Sys___init_args(fra.me.REG[0])(fra.me.REG[0]); } + /* ./../lib/standard//string.nit:610 */ fra.me.REG[0] = ATTR_string___Sys____args_cache(fra.me.REG[0]); REGB0 = TAG_Bool(fra.me.REG[0]!=NIT_NULL); - /* ./../lib/standard//string.nit:610 */ if (UNTAG_Bool(REGB0)) { } else { - fprintf(stderr, "Cast failed"); - fprintf(stderr, " (%s:%d)\n", LOCATE_string, 610); - nit_exit(1); + nit_abort("Cast failed", NULL, LOCATE_string, 610); } goto label1; label1: while(0); @@ -3143,10 +3251,10 @@ val_t string___Sys___program_name(val_t p0){ fra.me.REG_size = 1; fra.me.REG[0] = NIT_NULL; fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:616 */ REGB0 = TAG_Int(0); fra.me.REG[0] = CALL_string___Sys___native_argv(fra.me.REG[0])(fra.me.REG[0], REGB0); fra.me.REG[0] = NEW_String_string___String___from_cstring(fra.me.REG[0]); - /* ./../lib/standard//string.nit:616 */ goto label1; label1: while(0); stack_frame_head = fra.me.prev; @@ -3168,25 +3276,33 @@ void string___Sys___init_args(val_t p0){ fra.me.REG[1] = NIT_NULL; fra.me.REG[2] = NIT_NULL; fra.me.REG[0] = p0; + /* ./../lib/standard//string.nit:622 */ REGB0 = CALL_string___Sys___native_argc(fra.me.REG[0])(fra.me.REG[0]); + /* ./../lib/standard//string.nit:623 */ REGB1 = TAG_Int(0); fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB1); + /* ./../lib/standard//string.nit:624 */ REGB1 = TAG_Int(1); /* ./../lib/standard//string.nit:625 */ while(1) { + /* ./../lib/standard//kernel.nit:212 */ REGB2 = TAG_Bool(UNTAG_Int(REGB1)