/* This C file is generated by NIT to compile module string. */
#include "string._sep.h"
-void string___AbstractString___output(val_t self) {
- struct trace_t trace = {NULL, NULL, 150, LOCATE_string___AbstractString___output};
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Local variable */
- variable[2] = TAG_Int(0);
- while (true) { /*while*/
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(UNTAG_Int( variable[2] /*i*/)<UNTAG_Int(variable[3]));
- if (!UNTAG_Bool(variable[3])) break; /* while*/
- /* Register variable[3]: Result */
- variable[3] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- /* Register variable[3]: Result */
- variable[3] = TAG_Char(UNBOX_NativeString(variable[3])[UNTAG_Int( variable[2] /*i*/)]);
- printf("%c", (unsigned char)UNTAG_Char(variable[3]));
- variable[2] = TAG_Int(UNTAG_Int(variable[2])+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_1: while(0);
- }
- break_1: while(0);
- return_label0: while(false);
- tracehead = trace.prev;
- return;
-}
-val_t string___AbstractString_____bra(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 27, LOCATE_string___AbstractString_____bra};
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- /* Register variable[3]: Result */
- variable[3] = TAG_Char(UNBOX_NativeString(variable[3])[UNTAG_Int( variable[1] /*index*/)]);
- variable[2] = variable[3];
- goto return_label2;
- return_label2: while(false);
- tracehead = trace.prev;
- return variable[2];
+val_t string___AbstractString___items(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 = 26;
+ fra.me.meth = LOCATE_string___AbstractString___items;
+ 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:26 */
+ 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, 26);
+ }
+ fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-val_t string___AbstractString___items(val_t self) {
- struct trace_t trace = {NULL, NULL, 25, LOCATE_string___AbstractString___items};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- tracehead = trace.prev;
- return ATTR_string___AbstractString____items( self) /*AbstractString::_items*/;
+val_t string___AbstractString_____bra(val_t p0, val_t p1){
+ 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 = 28;
+ fra.me.meth = LOCATE_string___AbstractString_____bra;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = p1;
+ /* ./../lib/standard//string.nit:28 */
+ REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 28);
+ }
+ fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:585 */
+ REGB0 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]);
+ /* ./../lib/standard//string.nit:28 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
}
-val_t string___AbstractString___substring(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 29, LOCATE_string___AbstractString___substring};
- static val_t once_value_5 = NIT_NULL; /* Once value for string variable[4]*/
- val_t variable[6];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(UNTAG_Int( variable[2] /*count*/)>=UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___AbstractString___substring, LOCATE_string, 37); nit_exit(1);}
- variable[2] = TAG_Int(UNTAG_Int(variable[2])+UNTAG_Int( variable[1] /*from*/)) /*count*/;
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*from*/)<UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable[4])) { /*if*/
- variable[1] = TAG_Int(0) /*from=*/;
- }
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(UNTAG_Int( variable[2] /*count*/)>UNTAG_Int(variable[4]));
- if (UNTAG_Bool(variable[4])) { /*if*/
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- variable[2] = variable[4] /*count=*/;
- }
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*from*/)<UNTAG_Int( variable[2] /*count*/));
- if (UNTAG_Bool(variable[4])) { /*if*/
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = TAG_Int(UNTAG_Int( variable[2] /*count*/)-UNTAG_Int( variable[1] /*from*/));
- /* Register variable[5]: Result */
- variable[5] = NEW_Buffer_string___Buffer___with_capacity(variable[5]) /*new Buffer*/;
- variable[4] = variable[5];
- while (true) { /*while*/
- /* Register variable[5]: Result */
- variable[5] = TAG_Bool(UNTAG_Int( variable[1] /*from*/)<UNTAG_Int( variable[2] /*count*/));
- if (!UNTAG_Bool(variable[5])) break; /* while*/
- /* Register variable[5]: Result */
- variable[5] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- /* Register variable[5]: Result */
- variable[5] = TAG_Char(UNBOX_NativeString(variable[5])[UNTAG_Int( variable[1] /*from*/)]);
- CALL_abstract_collection___IndexedCollection___push( variable[4] /*r*/)( variable[4] /*r*/, variable[5]) /*AbstractArray::push*/;
- variable[1] = TAG_Int(UNTAG_Int(variable[1])+UNTAG_Int( TAG_Int(1))) /*from*/;
- continue_4: while(0);
+val_t string___AbstractString___substring(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ static val_t once_value_3; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 30;
+ fra.me.meth = LOCATE_string___AbstractString___substring;
+ 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;
+ REGB0 = p1;
+ REGB1 = p2;
+ /* ./../lib/standard//string.nit:38 */
+ REGB2 = TAG_Int(0);
+ /* ./../lib/standard//kernel.nit:213 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB2));
+ /* ./../lib/standard//string.nit:38 */
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ 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:40 */
+ if (UNTAG_Bool(REGB2)) {
+ REGB2 = TAG_Int(0);
+ REGB0 = REGB2;
+ }
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//kernel.nit:214 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)>UNTAG_Int(REGB2));
+ /* ./../lib/standard//string.nit:41 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
}
- break_4: while(0);
- /* Register variable[5]: Result */
- variable[5] = CALL_string___Object___to_s( variable[4] /*r*/)( variable[4] /*r*/) /*Buffer::to_s*/;
- variable[3] = variable[5];
- goto return_label3;
- } else { /*if*/
- /* Register variable[4]: Once String constant */
- if (once_value_5 != NIT_NULL) variable[4] = once_value_5;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_5 = variable[4];
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:41 */
+ REGB1 = REGB2;
+ }
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:42 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//kernel.nit:217 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
+ /* ./../lib/standard//string.nit:43 */
+ fra.me.REG[1] = NEW_Buffer_string___Buffer___with_capacity(REGB2);
+ /* ./../lib/standard//string.nit:44 */
+ while(1) {
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:44 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//string.nit:45 */
+ 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, 45);
+ }
+ fra.me.REG[2] = ATTR_string___AbstractString____items(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:585 */
+ REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[2])[UNTAG_Int(REGB0)]);
+ /* ./../lib/standard//string.nit:45 */
+ CALL_abstract_collection___Sequence___push(fra.me.REG[1])(fra.me.REG[1], REGB2);
+ /* ./../lib/standard//string.nit:46 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
+ /* ./../lib/standard//string.nit:46 */
+ REGB0 = REGB2;
+ } else {
+ /* ./../lib/standard//string.nit:44 */
+ goto label1;
+ }
}
- /* Register variable[4]: Result */
- variable[3] = variable[4];
- goto return_label3;
+ label1: while(0);
+ /* ./../lib/standard//string.nit:48 */
+ fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+ goto label2;
+ } else {
+ /* ./../lib/standard//string.nit:50 */
+ if (!once_value_3) {
+ fra.me.REG[0] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_3 = fra.me.REG[0];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[0] = once_value_3;
+ fra.me.REG[0] = fra.me.REG[0];
+ fra.me.REG[1] = fra.me.REG[0];
+ goto label2;
}
- return_label3: while(false);
- tracehead = trace.prev;
- return variable[3];
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
}
-val_t string___AbstractString___substring_from(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 53, LOCATE_string___AbstractString___substring_from};
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*from*/)<UNTAG_Int(variable[3]));
- if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___AbstractString___substring_from, LOCATE_string, 60); nit_exit(1);}
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[3]: Result */
- variable[3] = TAG_Int(UNTAG_Int(variable[3])-UNTAG_Int( variable[1] /*from*/));
- /* Register variable[3]: Result */
- variable[3] = CALL_string___AbstractString___substring(variable[0])(variable[0], variable[1] /*from*/, variable[3]) /*AbstractString::substring*/;
- variable[2] = variable[3];
- goto return_label6;
- return_label6: while(false);
- tracehead = trace.prev;
- return variable[2];
+val_t string___AbstractString___substring_from(val_t p0, val_t p1){
+ 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 = 54;
+ fra.me.meth = LOCATE_string___AbstractString___substring_from;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = p1;
+ /* ./../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)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:61 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_string, 61);
+ }
+ /* ./../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:217 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
+ /* ./../lib/standard//string.nit:62 */
+ fra.me.REG[0] = CALL_string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB1);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-val_t string___AbstractString___has_substring(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 64, LOCATE_string___AbstractString___has_substring};
- val_t variable[10];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_abstract_collection___Collection___length( variable[1] /*str*/)( variable[1] /*str*/) /*AbstractArrayRead::length*/;
- /* Register variable[5]: Result */
- variable[5] = TAG_Int(UNTAG_Int(variable[5])-UNTAG_Int( TAG_Int(1)));
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = TAG_Int(UNTAG_Int( variable[2] /*pos*/)+UNTAG_Int( variable[4] /*itsindex*/));
- variable[5] = variable[6];
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- variable[6] = variable[7];
- /* Register variable[7]: Local variable */
- /* Register variable[8]: Result */
- variable[8] = ATTR_string___AbstractString____items( variable[1] /*str*/) /*AbstractString::_items*/;
- variable[7] = variable[8];
- /* Register variable[8]: Result */
- variable[8] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool(UNTAG_Int( variable[5] /*myindex*/)>UNTAG_Int(variable[8]));
- /* Ensure var variable[8]: Left 'or' operand*/
- if (!UNTAG_Bool(variable[8])) { /* or */
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool(UNTAG_Int( variable[4] /*itsindex*/)>UNTAG_Int( variable[5] /*myindex*/));
- }
- /* Register variable[8]: Result */
- if (UNTAG_Bool(variable[8])) { /*if*/
- variable[3] = TAG_Bool(false);
- goto return_label7;
- }
- while (true) { /*while*/
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool(UNTAG_Int( variable[4] /*itsindex*/)>UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable[8])) break; /* while*/
- /* Register variable[8]: Result */
- variable[8] = TAG_Char(UNBOX_NativeString( variable[6] /*myitems*/)[UNTAG_Int( variable[5] /*myindex*/)]);
- /* Register variable[9]: Result */
- variable[9] = TAG_Char(UNBOX_NativeString( variable[7] /*itsitems*/)[UNTAG_Int( variable[4] /*itsindex*/)]);
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool((variable[8])!=(variable[9]));
- if (UNTAG_Bool(variable[8])) { /*if*/
- variable[3] = TAG_Bool(false);
- goto return_label7;
+val_t string___AbstractString___has_substring(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} 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 = 65;
+ fra.me.meth = LOCATE_string___AbstractString___has_substring;
+ 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 = p2;
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ /* ./../lib/standard//string.nit:71 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:217 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB0 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
+ /* ./../lib/standard//string.nit:73 */
+ REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 73);
+ }
+ fra.me.REG[2] = ATTR_string___AbstractString____items(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:74 */
+ REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 74);
+ }
+ fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[1]);
+ /* ./../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:214 */
+ REGB1 = 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;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ goto label1;
+ }
+ /* ./../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)]);
+ /* ./../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;
+ }
+ REGB5 = TAG_Bool(!UNTAG_Bool(REGB5));
+ if (UNTAG_Bool(REGB5)) {
+ REGB5 = TAG_Bool(false);
+ 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;
+ } else {
+ /* ./../lib/standard//string.nit:76 */
+ goto label2;
}
- variable[5] = TAG_Int(UNTAG_Int(variable[5])-UNTAG_Int( variable[5] /*myindex*/)) /*myindex*/;
- variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int( variable[4] /*itsindex*/)) /*itsindex*/;
- continue_8: while(0);
- }
- break_8: while(0);
- variable[3] = TAG_Bool(true);
- goto return_label7;
- return_label7: while(false);
- tracehead = trace.prev;
- return variable[3];
+ }
+ label2: while(0);
+ /* ./../lib/standard//string.nit:81 */
+ REGB2 = TAG_Bool(true);
+ REGB1 = REGB2;
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB1;
}
-val_t string___AbstractString___has_prefix(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 83, LOCATE_string___AbstractString___has_prefix};
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = CALL_string___AbstractString___has_substring(variable[0])(variable[0], variable[1] /*prefix*/, TAG_Int(0)) /*AbstractString::has_substring*/;
- variable[2] = variable[3];
- goto return_label9;
- return_label9: while(false);
- tracehead = trace.prev;
- return variable[2];
+val_t string___AbstractString___has_prefix(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} 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 = 84;
+ fra.me.meth = LOCATE_string___AbstractString___has_prefix;
+ 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:88 */
+ REGB0 = TAG_Int(0);
+ REGB0 = CALL_string___AbstractString___has_substring(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
}
-val_t string___AbstractString___has_suffix(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 89, LOCATE_string___AbstractString___has_suffix};
- val_t variable[5];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*suffix*/)( variable[1] /*suffix*/) /*AbstractArrayRead::length*/;
- /* Register variable[3]: Result */
- variable[3] = TAG_Int(UNTAG_Int(variable[3])-UNTAG_Int(variable[4]));
- /* Register variable[3]: Result */
- variable[3] = CALL_string___AbstractString___has_substring(variable[0])(variable[0], variable[1] /*suffix*/, variable[3]) /*AbstractString::has_substring*/;
- variable[2] = variable[3];
- goto return_label10;
- return_label10: while(false);
- tracehead = trace.prev;
- return variable[2];
+val_t string___AbstractString___has_suffix(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 = 90;
+ fra.me.meth = LOCATE_string___AbstractString___has_suffix;
+ 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//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ 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 {
+ 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));
+ /* ./../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;
+ return REGB1;
}
-val_t string___AbstractString___to_i(val_t self) {
- struct trace_t trace = {NULL, NULL, 95, LOCATE_string___AbstractString___to_i};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = CALL_string___Object___to_s(variable[0])(variable[0]) /*Collection::to_s*/;
- /* Register variable[2]: Result */
- variable[2] = CALL_string___String___to_cstring(variable[2])(variable[2]) /*String::to_cstring*/;
- /* Register variable[2]: Result */
- variable[2] = TAG_Int(atoi(UNBOX_NativeString(variable[2])));
- variable[1] = variable[2];
- goto return_label11;
- return_label11: while(false);
- tracehead = trace.prev;
- return variable[1];
+val_t string___AbstractString___to_i(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 = 96;
+ fra.me.meth = LOCATE_string___AbstractString___to_i;
+ 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: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;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
}
-val_t string___AbstractString___to_hex(val_t self) {
- struct trace_t trace = {NULL, NULL, 102, LOCATE_string___AbstractString___to_hex};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = CALL_string___AbstractString___a_to(variable[0])(variable[0], TAG_Int(16)) /*AbstractString::a_to*/;
- variable[1] = variable[2];
- goto return_label12;
- return_label12: while(false);
- tracehead = trace.prev;
- return variable[1];
+val_t string___AbstractString___to_hex(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 = 103;
+ fra.me.meth = LOCATE_string___AbstractString___to_hex;
+ 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:104 */
+ REGB0 = TAG_Int(16);
+ REGB0 = CALL_string___AbstractString___a_to(fra.me.REG[0])(fra.me.REG[0], REGB0);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
}
-val_t string___AbstractString___a_to(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 105, LOCATE_string___AbstractString___a_to};
- val_t variable[10];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Local variable */
- variable[3] = TAG_Int(0);
- /* Register variable[4]: Local variable */
- variable[4] = TAG_Bool(false);
- /* Register variable[5]: For iterator */
- variable[5] = CALL_abstract_collection___Collection___iterator(variable[0])(variable[0]) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[6]: For 'is_ok' result */
- variable[6] = CALL_abstract_collection___Iterator___is_ok(variable[5])(variable[5]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[6])) break; /*for*/
- variable[6] = CALL_abstract_collection___Iterator___item(variable[5])(variable[5]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[7]: Local variable */
- variable[7] = variable[6];
- /* Register variable[8]: Local variable */
- /* Register variable[9]: Result */
- variable[9] = CALL_kernel___Char___to_i( variable[7] /*c*/)( variable[7] /*c*/) /*Char::to_i*/;
- variable[8] = variable[9];
- /* Register variable[9]: Result */
- variable[9] = TAG_Bool(UNTAG_Int( variable[8] /*v*/)>UNTAG_Int( variable[1] /*base*/));
- if (UNTAG_Bool(variable[9])) { /*if*/
- if (UNTAG_Bool( variable[4] /*neg*/)) { /*if*/
- /* Register variable[9]: Result */
- variable[9] = TAG_Int(-UNTAG_Int( variable[3] /*i*/));
- variable[2] = variable[9];
- goto return_label13;
- } else { /*if*/
- variable[2] = variable[3] /*i*/;
- goto return_label13;
+val_t string___AbstractString___a_to(val_t p0, val_t p1){
+ 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_string;
+ fra.me.line = 106;
+ fra.me.meth = LOCATE_string___AbstractString___a_to;
+ fra.me.has_broke = 0;
+ 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;
+ /* ./../lib/standard//string.nit:106 */
+ fra.me.REG[1] = REGB0;
+ /* ./../lib/standard//string.nit:109 */
+ REGB0 = TAG_Int(0);
+ fra.me.REG[2] = REGB0;
+ /* ./../lib/standard//string.nit:110 */
+ REGB0 = TAG_Bool(false);
+ fra.me.REG[3] = REGB0;
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[0])(fra.me.REG[0], (&(fra.me)), ((fun_t)OC_string___AbstractString___a_to_1));
+ switch ((&(fra.me))->has_broke) {
+ case 0: break;
+ case 1: (&(fra.me))->has_broke = 0; goto label3;
+ }
+ /* ./../lib/standard//string.nit:127 */
+ 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 */
+ fra.me.REG[0] = REGB0;
+ goto label3;
+ } else {
+ /* ./../lib/standard//string.nit:130 */
+ fra.me.REG[0] = fra.me.REG[2];
+ goto label3;
+ }
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
+ 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 { /*if*/
- /* Register variable[9]: Result */
- variable[9] = TAG_Bool(UNTAG_Int( variable[8] /*v*/)<UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable[9])) { /*if*/
- variable[4] = TAG_Bool(true) /*neg=*/;
- } else { /*if*/
- /* Register variable[9]: Result */
- variable[9] = TAG_Int(UNTAG_Int( variable[3] /*i*/)*UNTAG_Int( variable[1] /*base*/));
- /* Register variable[9]: Result */
- variable[9] = TAG_Int(UNTAG_Int(variable[9])+UNTAG_Int( variable[8] /*v*/));
- variable[3] = variable[9] /*i=*/;
+ } else {
+ /* ./../lib/standard//string.nit:121 */
+ REGB1 = TAG_Int(0);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:121 */
+ if (UNTAG_Bool(REGB1)) {
+ /* ./../lib/standard//string.nit:122 */
+ REGB1 = TAG_Bool(true);
+ closctx->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;
}
}
- continue_14: while(0);
- CALL_abstract_collection___Iterator___next(variable[5])(variable[5]) /*ArrayIterator::next*/;
- }
- break_14: while(0);
- if (UNTAG_Bool( variable[4] /*neg*/)) { /*if*/
- /* Register variable[5]: Result */
- variable[5] = TAG_Int(-UNTAG_Int( variable[3] /*i*/));
- variable[2] = variable[5];
- goto return_label13;
- } else { /*if*/
- variable[2] = variable[3] /*i*/;
- goto return_label13;
- }
- return_label13: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-val_t string___AbstractString___to_upper(val_t self) {
- struct trace_t trace = {NULL, NULL, 133, LOCATE_string___AbstractString___to_upper};
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Local variable */
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[3]: Result */
- variable[3] = NEW_Buffer_string___Buffer___with_capacity(variable[3]) /*new Buffer*/;
- variable[2] = variable[3];
- /* Register variable[3]: For iterator */
- variable[3] = CALL_abstract_collection___Collection___iterator(variable[0])(variable[0]) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[4]: For 'is_ok' result */
- variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[4])) break; /*for*/
- variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[5]: Local variable */
- variable[5] = variable[4];
- /* Register variable[6]: Result */
- variable[6] = CALL_kernel___Char___to_upper( variable[5] /*i*/)( variable[5] /*i*/) /*Char::to_upper*/;
- CALL_abstract_collection___SimpleCollection___add( variable[2] /*s*/)( variable[2] /*s*/, variable[6]) /*Buffer::add*/;
- continue_16: while(0);
- CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
- }
- break_16: while(0);
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___to_s( variable[2] /*s*/)( variable[2] /*s*/) /*Buffer::to_s*/;
- variable[1] = variable[3];
- goto return_label15;
- return_label15: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t string___AbstractString___to_lower(val_t self) {
- struct trace_t trace = {NULL, NULL, 141, LOCATE_string___AbstractString___to_lower};
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Local variable */
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[3]: Result */
- variable[3] = NEW_Buffer_string___Buffer___with_capacity(variable[3]) /*new Buffer*/;
- variable[2] = variable[3];
- /* Register variable[3]: For iterator */
- variable[3] = CALL_abstract_collection___Collection___iterator(variable[0])(variable[0]) /*AbstractArrayRead::iterator*/;
- while (true) { /*for*/
- /* Register variable[4]: For 'is_ok' result */
- variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[4])) break; /*for*/
- variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
- /* Register variable[5]: Local variable */
- variable[5] = variable[4];
- /* Register variable[6]: Result */
- variable[6] = CALL_kernel___Char___to_lower( variable[5] /*i*/)( variable[5] /*i*/) /*Char::to_lower*/;
- CALL_abstract_collection___SimpleCollection___add( variable[2] /*s*/)( variable[2] /*s*/, variable[6]) /*Buffer::add*/;
- continue_18: while(0);
- CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
- }
- break_18: while(0);
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___to_s( variable[2] /*s*/)( variable[2] /*s*/) /*Buffer::to_s*/;
- variable[1] = variable[3];
- goto return_label17;
- return_label17: while(false);
- tracehead = trace.prev;
- return variable[1];
+ 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;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 134;
+ fra.me.meth = LOCATE_string___AbstractString___to_upper;
+ 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//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ 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);
+ 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];
}
-val_t string___String_____eqeq(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 188, LOCATE_string___String_____eqeq};
- val_t variable[9];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(( variable[1] /*o*/==NIT_NULL) || VAL_ISA( variable[1] /*o*/, COLOR_String, ID_String)) /*cast String*/;
- variable[3] = TAG_Bool(!UNTAG_Bool(variable[3])) /* Ensure var: Left 'or' operand*/;
- if (!UNTAG_Bool(variable[3])) { /* or */
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(IS_EQUAL_NN( variable[1] /*o*/, NIT_NULL /*null*/));
- }
- /* Register variable[3]: Result */
- if (UNTAG_Bool(variable[3])) { /*if*/
- variable[2] = TAG_Bool(false);
- goto return_label19;
- }
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(( variable[1] /*o*/==NIT_NULL) || VAL_ISA( variable[1] /*o*/, COLOR_String, ID_String)) /*cast String*/;
- if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String_____eqeq, LOCATE_string, 191); nit_exit(1);}
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- variable[3] = variable[4];
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*o*/)( variable[1] /*o*/) /*AbstractArrayRead::length*/;
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool((variable[4])!=( variable[3] /*l*/));
- if (UNTAG_Bool(variable[4])) { /*if*/
- variable[2] = TAG_Bool(false);
- goto return_label19;
- }
- /* Register variable[4]: Local variable */
- variable[4] = TAG_Int(0);
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- variable[5] = variable[6];
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = ATTR_string___AbstractString____items( variable[1] /*o*/) /*AbstractString::_items*/;
- variable[6] = variable[7];
- while (true) { /*while*/
- /* Register variable[7]: Result */
- variable[7] = TAG_Bool(UNTAG_Int( variable[4] /*i*/)<UNTAG_Int( variable[3] /*l*/));
- if (!UNTAG_Bool(variable[7])) break; /* while*/
- /* Register variable[7]: Result */
- variable[7] = TAG_Char(UNBOX_NativeString( variable[5] /*it*/)[UNTAG_Int( variable[4] /*i*/)]);
- /* Register variable[8]: Result */
- variable[8] = TAG_Char(UNBOX_NativeString( variable[6] /*oit*/)[UNTAG_Int( variable[4] /*i*/)]);
- /* Register variable[7]: Result */
- variable[7] = TAG_Bool((variable[7])!=(variable[8]));
- if (UNTAG_Bool(variable[7])) { /*if*/
- variable[2] = TAG_Bool(false);
- goto return_label19;
- }
- variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_20: while(0);
- }
- break_20: while(0);
- variable[2] = TAG_Bool(true);
- goto return_label19;
- return_label19: while(false);
- tracehead = trace.prev;
- return variable[2];
+ 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;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 142;
+ fra.me.meth = LOCATE_string___AbstractString___to_lower;
+ 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//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ 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);
+ 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];
}
-val_t string___String_____l(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 204, LOCATE_string___String_____l};
- val_t variable[11];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Local variable */
- variable[3] = TAG_Int(0);
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/;
- variable[5] = variable[6];
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- variable[6] = variable[7];
- /* Register variable[7]: Local variable */
- /* Register variable[8]: Result */
- variable[8] = ATTR_string___AbstractString____items( variable[1] /*s*/) /*AbstractString::_items*/;
- variable[7] = variable[8];
- while (true) { /*while*/
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int( variable[4] /*l1*/));
- /* Ensure var variable[8]: Left 'and' operand*/
- if (UNTAG_Bool(variable[8])) { /* and */
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int( variable[5] /*l2*/));
+ 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) {
+ /* ./../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);
}
- /* Register variable[8]: Result */
- if (!UNTAG_Bool(variable[8])) break; /* while*/
- /* Register variable[8]: Local variable */
- /* Register variable[9]: Result */
- variable[9] = TAG_Char(UNBOX_NativeString( variable[6] /*n1*/)[UNTAG_Int( variable[3] /*i*/)]);
- /* Register variable[9]: Result */
- variable[9] = TAG_Int((unsigned char)UNTAG_Char(variable[9]));
- variable[8] = variable[9];
- /* Register variable[9]: Local variable */
- /* Register variable[10]: Result */
- variable[10] = TAG_Char(UNBOX_NativeString( variable[7] /*n2*/)[UNTAG_Int( variable[3] /*i*/)]);
- /* Register variable[10]: Result */
- variable[10] = TAG_Int((unsigned char)UNTAG_Char(variable[10]));
- variable[9] = variable[10];
- /* Register variable[10]: Result */
- variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*c1*/)<UNTAG_Int( variable[9] /*c2*/));
- if (UNTAG_Bool(variable[10])) { /*if*/
- variable[2] = TAG_Bool(true);
- goto return_label21;
- } else { /*if*/
- /* Register variable[10]: Result */
- variable[10] = TAG_Bool(UNTAG_Int( variable[9] /*c2*/)<UNTAG_Int( variable[8] /*c1*/));
- if (UNTAG_Bool(variable[10])) { /*if*/
- variable[2] = TAG_Bool(false);
- goto return_label21;
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:154 */
+ if (UNTAG_Bool(REGB1)) {
+ /* ./../lib/standard//string.nit:155 */
+ REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 155);
}
+ fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:585 */
+ REGB1 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB0)]);
+ /* ./../lib/standard//kernel.nit:349 */
+ printf("%c", (unsigned char)UNTAG_Char(REGB1));;
+ /* ./../lib/standard//string.nit:156 */
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:156 */
+ REGB0 = REGB1;
+ } else {
+ /* ./../lib/standard//string.nit:154 */
+ goto label1;
}
- variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_22: while(0);
- }
- break_22: while(0);
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool(UNTAG_Int( variable[4] /*l1*/)<UNTAG_Int( variable[5] /*l2*/));
- if (UNTAG_Bool(variable[8])) { /*if*/
- variable[2] = TAG_Bool(true);
- goto return_label21;
- } else { /*if*/
- variable[2] = TAG_Bool(false);
- goto return_label21;
- }
- return_label21: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-val_t string___String___to_s(val_t self) {
- struct trace_t trace = {NULL, NULL, 249, LOCATE_string___String___to_s};
- val_t variable[2];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- variable[1] = variable[0];
- goto return_label23;
- return_label23: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-void string___String___with_native(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, NULL, 166, LOCATE_string___String___with_native};
- val_t variable[5];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i]) return;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(UNTAG_Int( variable[2] /*size*/)>=UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String___with_native, LOCATE_string, 169); nit_exit(1);}
- ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/ = variable[1] /*nat*/;
- ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/ = variable[2] /*size*/;
- return_label24: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i] = 1;
- tracehead = trace.prev;
+ }
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void string___String___from_cstring(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, NULL, 174, LOCATE_string___String___from_cstring};
- val_t variable[5];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i]) return;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = CALL_string___NativeString___cstring_length( variable[1] /*str*/)( variable[1] /*str*/) /*NativeString::cstring_length*/;
- variable[3] = variable[4];
- ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/ = variable[1] /*str*/;
- ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/ = variable[3] /*size*/;
- return_label25: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_String].i] = 1;
- tracehead = trace.prev;
+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;
+ /* ./../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;
}
-val_t string___String___to_cstring(val_t self) {
- struct trace_t trace = {NULL, NULL, 182, LOCATE_string___String___to_cstring};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- variable[1] = variable[2];
- goto return_label26;
- return_label26: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t string___String_____plus(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 228, LOCATE_string___String_____plus};
- val_t variable[6];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/;
- /* Register variable[4]: Result */
- variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int(variable[5]));
- /* Register variable[4]: Result */
- variable[4] = NEW_Buffer_string___Buffer___with_capacity(variable[4]) /*new Buffer*/;
- variable[3] = variable[4];
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*r*/)( variable[3] /*r*/, variable[0]) /*Buffer::append*/;
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*r*/)( variable[3] /*r*/, variable[1] /*s*/) /*Buffer::append*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_string___Object___to_s( variable[3] /*r*/)( variable[3] /*r*/) /*Buffer::to_s*/;
- variable[2] = variable[4];
- goto return_label27;
- return_label27: while(false);
- tracehead = trace.prev;
- return variable[2];
+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_____star(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 237, LOCATE_string___String_____star};
- val_t variable[5];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*i*/)>=UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___String_____star, LOCATE_string, 240); nit_exit(1);}
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[4]: Result */
- variable[4] = TAG_Int(UNTAG_Int(variable[4])*UNTAG_Int( variable[1] /*i*/));
- /* Register variable[4]: Result */
- variable[4] = NEW_Buffer_string___Buffer___with_capacity(variable[4]) /*new Buffer*/;
- variable[3] = variable[4];
- while (true) { /*while*/
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*i*/)>UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable[4])) break; /* while*/
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*r*/)( variable[3] /*r*/, variable[0]) /*Buffer::append*/;
- variable[1] = TAG_Int(UNTAG_Int(variable[1])-UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_29: while(0);
- }
- break_29: while(0);
- /* Register variable[4]: Result */
- variable[4] = CALL_string___Object___to_s( variable[3] /*r*/)( variable[3] /*r*/) /*Buffer::to_s*/;
- variable[2] = variable[4];
- goto return_label28;
- return_label28: while(false);
- tracehead = trace.prev;
- return variable[2];
+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___Buffer_____eqeq(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 359, LOCATE_string___Buffer_____eqeq};
- val_t variable[9];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(( variable[1] /*o*/==NIT_NULL) || VAL_ISA( variable[1] /*o*/, COLOR_Buffer, ID_Buffer)) /*cast Buffer*/;
- variable[3] = TAG_Bool(!UNTAG_Bool(variable[3])) /* Ensure var: Left 'or' operand*/;
- if (!UNTAG_Bool(variable[3])) { /* or */
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(IS_EQUAL_NN( variable[1] /*o*/, NIT_NULL /*null*/));
- }
- /* Register variable[3]: Result */
- if (UNTAG_Bool(variable[3])) { /*if*/
- variable[2] = TAG_Bool(false);
- goto return_label30;
- }
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(( variable[1] /*o*/==NIT_NULL) || VAL_ISA( variable[1] /*o*/, COLOR_Buffer, ID_Buffer)) /*cast Buffer*/;
- if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___Buffer_____eqeq, LOCATE_string, 362); nit_exit(1);}
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- variable[3] = variable[4];
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*o*/)( variable[1] /*o*/) /*AbstractArrayRead::length*/;
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool((variable[4])!=( variable[3] /*l*/));
- if (UNTAG_Bool(variable[4])) { /*if*/
- variable[2] = TAG_Bool(false);
- goto return_label30;
- }
- /* Register variable[4]: Local variable */
- variable[4] = TAG_Int(0);
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- variable[5] = variable[6];
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = ATTR_string___AbstractString____items( variable[1] /*o*/) /*AbstractString::_items*/;
- variable[6] = variable[7];
- while (true) { /*while*/
- /* Register variable[7]: Result */
- variable[7] = TAG_Bool(UNTAG_Int( variable[4] /*i*/)<UNTAG_Int( variable[3] /*l*/));
- if (!UNTAG_Bool(variable[7])) break; /* while*/
- /* Register variable[7]: Result */
- variable[7] = TAG_Char(UNBOX_NativeString( variable[5] /*it*/)[UNTAG_Int( variable[4] /*i*/)]);
- /* Register variable[8]: Result */
- variable[8] = TAG_Char(UNBOX_NativeString( variable[6] /*oit*/)[UNTAG_Int( variable[4] /*i*/)]);
- /* Register variable[7]: Result */
- variable[7] = TAG_Bool((variable[7])!=(variable[8]));
- if (UNTAG_Bool(variable[7])) { /*if*/
- variable[2] = TAG_Bool(false);
- goto return_label30;
+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;
+ }
+ /* ./../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:193 */
+ REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_string, 193);
+ }
+ /* ./../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: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;
+ }
+ REGB3 = TAG_Bool(!UNTAG_Bool(REGB3));
+ if (UNTAG_Bool(REGB3)) {
+ REGB3 = TAG_Bool(false);
+ REGB0 = REGB3;
+ goto label1;
+ }
+ /* ./../lib/standard//string.nit:194 */
+ REGB3 = TAG_Int(0);
+ /* ./../lib/standard//string.nit:195 */
+ 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, 195);
+ }
+ fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:196 */
+ 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, 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:197 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//string.nit:585 */
+ REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB3)]);
+ REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB3)]);
+ /* ./../lib/standard//string.nit:198 */
+ REGB5 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB4));
+ if (UNTAG_Bool(REGB5)) {
+ } else {
+ /* ./../lib/standard//kernel.nit:347 */
+ REGB4 = TAG_Bool((REGB2)==(REGB4));
+ /* ./../lib/standard//string.nit:198 */
+ REGB5 = REGB4;
+ }
+ REGB5 = TAG_Bool(!UNTAG_Bool(REGB5));
+ if (UNTAG_Bool(REGB5)) {
+ REGB5 = TAG_Bool(false);
+ REGB0 = REGB5;
+ goto label1;
+ }
+ /* ./../lib/standard//string.nit:199 */
+ REGB5 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB5));
+ /* ./../lib/standard//string.nit:199 */
+ REGB3 = REGB5;
+ } else {
+ /* ./../lib/standard//string.nit:197 */
+ goto label2;
}
- variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_31: while(0);
- }
- break_31: while(0);
- variable[2] = TAG_Bool(true);
- goto return_label30;
- return_label30: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-val_t string___Buffer___to_s(val_t self) {
- struct trace_t trace = {NULL, NULL, 301, LOCATE_string___Buffer___to_s};
- val_t variable[5];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Local variable */
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- variable[2] = variable[3];
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = TAG_Int(UNTAG_Int( variable[2] /*l*/)+UNTAG_Int( TAG_Int(1)));
- /* Register variable[4]: Result */
- variable[4] = BOX_NativeString((char*)malloc((UNTAG_Int(variable[4]) * sizeof(char))));
- variable[3] = variable[4];
- /* Register variable[4]: Result */
- variable[4] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- (void)memcpy(UNBOX_NativeString( variable[3] /*a*/)+UNTAG_Int( TAG_Int(0)), UNBOX_NativeString(variable[4])+UNTAG_Int( TAG_Int(0)), UNTAG_Int( variable[2] /*l*/));
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- UNBOX_NativeString( variable[3] /*a*/)[UNTAG_Int(variable[4])]=UNTAG_Char( TAG_Char('\0'));
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[4]: Result */
- variable[4] = NEW_String_string___String___with_native( variable[3] /*a*/, variable[4]) /*new String*/;
- variable[1] = variable[4];
- goto return_label32;
- return_label32: while(false);
- tracehead = trace.prev;
- return variable[1];
+ }
+ label2: while(0);
+ /* ./../lib/standard//string.nit:201 */
+ REGB3 = TAG_Bool(true);
+ REGB0 = REGB3;
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
}
-val_t string___Buffer_____l(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 313, LOCATE_string___Buffer_____l};
- val_t variable[9];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Local variable */
- variable[3] = TAG_Int(0);
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/;
- variable[5] = variable[6];
- while (true) { /*while*/
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int( variable[4] /*l1*/));
- /* Ensure var variable[6]: Left 'and' operand*/
- if (UNTAG_Bool(variable[6])) { /* and */
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int( variable[5] /*l2*/));
+val_t string___String_____l(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 = 204;
+ fra.me.meth = LOCATE_string___String_____l;
+ 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:206 */
+ REGB0 = TAG_Int(0);
+ /* ./../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]);
+ 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:209 */
+ REGB3 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 209);
+ }
+ fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:210 */
+ REGB3 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 210);
+ }
+ fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[1]);
+ /* ./../lib/standard//string.nit:211 */
+ while(1) {
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:211 */
+ if (UNTAG_Bool(REGB3)) {
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
+ } else {
+ /* ./../lib/standard//string.nit:211 */
+ REGB4 = TAG_Bool(false);
+ REGB3 = REGB4;
}
- /* Register variable[6]: Result */
- if (!UNTAG_Bool(variable[6])) break; /* while*/
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = CALL_abstract_collection___MapRead_____bra(variable[0])(variable[0], variable[3] /*i*/) /*AbstractString::[]*/;
- /* Register variable[7]: Result */
- variable[7] = TAG_Int((unsigned char)UNTAG_Char(variable[7]));
- variable[6] = variable[7];
- /* Register variable[7]: Local variable */
- /* Register variable[8]: Result */
- variable[8] = CALL_abstract_collection___MapRead_____bra( variable[1] /*s*/)( variable[1] /*s*/, variable[3] /*i*/) /*AbstractString::[]*/;
- /* Register variable[8]: Result */
- variable[8] = TAG_Int((unsigned char)UNTAG_Char(variable[8]));
- variable[7] = variable[8];
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool(UNTAG_Int( variable[6] /*c1*/)<UNTAG_Int( variable[7] /*c2*/));
- if (UNTAG_Bool(variable[8])) { /*if*/
- variable[2] = TAG_Bool(true);
- goto return_label33;
- } else { /*if*/
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool(UNTAG_Int( variable[7] /*c2*/)<UNTAG_Int( variable[6] /*c1*/));
- if (UNTAG_Bool(variable[8])) { /*if*/
- variable[2] = TAG_Bool(false);
- goto return_label33;
+ if (UNTAG_Bool(REGB3)) {
+ /* ./../lib/standard//string.nit:585 */
+ REGB3 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]);
+ /* ./../lib/standard//kernel.nit:382 */
+ REGB3 = TAG_Int((unsigned char)UNTAG_Char(REGB3));
+ /* ./../lib/standard//string.nit:585 */
+ REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB0)]);
+ /* ./../lib/standard//kernel.nit:382 */
+ REGB4 = TAG_Int((unsigned char)UNTAG_Char(REGB4));
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB5 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
+ /* ./../lib/standard//string.nit:214 */
+ if (UNTAG_Bool(REGB5)) {
+ /* ./../lib/standard//string.nit:215 */
+ REGB5 = TAG_Bool(true);
+ goto label1;
+ } else {
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB3 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB3));
+ /* ./../lib/standard//string.nit:216 */
+ if (UNTAG_Bool(REGB3)) {
+ /* ./../lib/standard//string.nit:217 */
+ REGB3 = TAG_Bool(false);
+ REGB5 = REGB3;
+ goto label1;
+ }
}
+ /* ./../lib/standard//string.nit:219 */
+ REGB3 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
+ /* ./../lib/standard//string.nit:219 */
+ REGB0 = REGB3;
+ } else {
+ /* ./../lib/standard//string.nit:211 */
+ goto label2;
}
- variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_34: while(0);
- }
- break_34: while(0);
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(UNTAG_Int( variable[4] /*l1*/)<UNTAG_Int( variable[5] /*l2*/));
- if (UNTAG_Bool(variable[6])) { /*if*/
- variable[2] = TAG_Bool(true);
- goto return_label33;
- } else { /*if*/
- variable[2] = TAG_Bool(false);
- goto return_label33;
- }
- return_label33: while(false);
- tracehead = trace.prev;
- return variable[2];
+ }
+ label2: while(0);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
+ /* ./../lib/standard//string.nit:221 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//string.nit:222 */
+ REGB2 = TAG_Bool(true);
+ REGB5 = REGB2;
+ goto label1;
+ } else {
+ /* ./../lib/standard//string.nit:224 */
+ REGB2 = TAG_Bool(false);
+ REGB5 = REGB2;
+ goto label1;
+ }
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB5;
}
-void string___Buffer_____braeq(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 261, LOCATE_string___Buffer_____braeq};
- val_t variable[5];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(( variable[1] /*index*/)==(variable[4]));
- if (UNTAG_Bool(variable[4])) { /*if*/
- CALL_abstract_collection___SimpleCollection___add(variable[0])(variable[0], variable[2] /*item*/) /*Buffer::add*/;
- goto return_label35;
- }
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*index*/)>=UNTAG_Int( TAG_Int(0)));
- /* Ensure var variable[4]: Left 'and' operand*/
- if (UNTAG_Bool(variable[4])) { /* and */
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*index*/)<UNTAG_Int(variable[4]));
- }
- /* Register variable[4]: Result */
- if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___Buffer_____braeq, LOCATE_string, 267); nit_exit(1);}
- /* Register variable[4]: Result */
- variable[4] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- UNBOX_NativeString(variable[4])[UNTAG_Int( variable[1] /*index*/)]=UNTAG_Char( variable[2] /*item*/);
- return_label35: while(false);
- tracehead = trace.prev;
- return;
+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;
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ 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 {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:231 */
+ 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]);
+ /* ./../lib/standard//string.nit:234 */
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[2];
}
-void string___Buffer___add(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 271, LOCATE_string___Buffer___add};
- val_t variable[5];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(UNTAG_Int(variable[3])<=UNTAG_Int(variable[4]));
- if (UNTAG_Bool(variable[3])) { /*if*/
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[3]: Result */
- variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(5)));
- CALL_array___AbstractArray___enlarge(variable[0])(variable[0], variable[3]) /*Buffer::enlarge*/;
- }
- /* Register variable[3]: Result */
- variable[3] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- UNBOX_NativeString(variable[3])[UNTAG_Int(variable[4])]=UNTAG_Char( variable[1] /*c*/);
- ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/)+UNTAG_Int( TAG_Int(1)));
- return_label36: while(false);
- tracehead = trace.prev;
- return;
+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;
+ /* ./../lib/standard//string.nit:240 */
+ REGB1 = TAG_Int(0);
+ /* ./../lib/standard//kernel.nit:213 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=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];
}
-void string___Buffer___append(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 289, LOCATE_string___Buffer___append};
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(( variable[1] /*s*/==NIT_NULL) || VAL_ISA( variable[1] /*s*/, COLOR_String, ID_String)) /*cast String*/;
- if (UNTAG_Bool(variable[3])) { /*if*/
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/;
- variable[3] = variable[4];
- /* Register variable[4]: Result */
- variable[4] = ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/;
- /* Register variable[5]: Result */
- variable[5] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[5]: Result */
- variable[5] = TAG_Int(UNTAG_Int(variable[5])+UNTAG_Int( variable[3] /*sl*/));
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(UNTAG_Int(variable[4])<UNTAG_Int(variable[5]));
- if (UNTAG_Bool(variable[4])) { /*if*/
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- /* Register variable[4]: Result */
- variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( variable[3] /*sl*/));
- CALL_array___AbstractArray___enlarge(variable[0])(variable[0], variable[4]) /*Buffer::enlarge*/;
+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;
+ 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 = 251;
+ fra.me.meth = LOCATE_string___String___hash;
+ 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:254 */
+ REGB0 = TAG_Int(5381);
+ /* ./../lib/standard//string.nit:255 */
+ 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_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));
+ /* ./../lib/standard//string.nit:256 */
+ REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ 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;
+ } else {
+ /* ./../lib/standard//string.nit:257 */
+ goto label1;
}
- /* Register variable[4]: Result */
- variable[4] = CALL_string___AbstractString___items( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractString::items*/;
- /* Register variable[5]: Result */
- variable[5] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- (void)memcpy(UNBOX_NativeString(variable[5])+UNTAG_Int(variable[6]), UNBOX_NativeString(variable[4])+UNTAG_Int( TAG_Int(0)), UNTAG_Int( variable[3] /*sl*/));
- ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/)+UNTAG_Int( variable[3] /*sl*/));
- } else { /*if*/
- CALL_SUPER_string___Buffer___append(variable[0])(variable[0], variable[1]) /*super Buffer::append*/;
- }
- return_label37: while(false);
- tracehead = trace.prev;
- return;
+ }
+ label1: while(0);
+ /* ./../lib/standard//string.nit:261 */
+ goto label2;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
}
-void string___Buffer___enlarge(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 278, LOCATE_string___Buffer___enlarge};
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/;
- variable[3] = variable[4];
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(UNTAG_Int( variable[1] /*cap*/)<=UNTAG_Int( variable[3] /*c*/));
- if (UNTAG_Bool(variable[4])) { /*if*/
- goto return_label38;
- }
- while (true) { /*while*/
- /* Register variable[4]: Result */
- variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*c*/)<=UNTAG_Int( variable[1] /*cap*/));
- if (!UNTAG_Bool(variable[4])) break; /* while*/
- /* Register variable[4]: Result */
- variable[4] = TAG_Int(UNTAG_Int( variable[3] /*c*/)*UNTAG_Int( TAG_Int(2)));
- /* Register variable[4]: Result */
- variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(2)));
- variable[3] = variable[4] /*c=*/;
- continue_39: while(0);
- }
- break_39: while(0);
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = TAG_Int(UNTAG_Int( variable[3] /*c*/)+UNTAG_Int( TAG_Int(1)));
- /* Register variable[5]: Result */
- variable[5] = BOX_NativeString((char*)malloc((UNTAG_Int(variable[5]) * sizeof(char))));
- variable[4] = variable[5];
- /* Register variable[5]: Result */
- variable[5] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- (void)memcpy(UNBOX_NativeString( variable[4] /*a*/)+UNTAG_Int( TAG_Int(0)), UNBOX_NativeString(variable[5])+UNTAG_Int( TAG_Int(0)), UNTAG_Int(variable[6]));
- ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/ = variable[4] /*a*/;
- ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/ = variable[3] /*c*/;
- return_label38: while(false);
- tracehead = trace.prev;
+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 = 275;
+ fra.me.meth = LOCATE_string___Buffer_____braeq;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = p1;
+ REGB1 = p2;
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:277 */
+ REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB2));
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ /* ./../lib/standard//kernel.nit:207 */
+ REGB2 = TAG_Bool((REGB0)==(REGB2));
+ /* ./../lib/standard//string.nit:277 */
+ REGB3 = REGB2;
+ }
+ if (UNTAG_Bool(REGB3)) {
+ /* ./../lib/standard//string.nit:278 */
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB1);
+ /* ./../lib/standard//string.nit:279 */
+ goto label1;
+ }
+ /* ./../lib/standard//string.nit:281 */
+ REGB3 = TAG_Int(0);
+ /* ./../lib/standard//kernel.nit:213 */
+ REGB3 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB3));
+ /* ./../lib/standard//string.nit:281 */
+ if (UNTAG_Bool(REGB3)) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ 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)<UNTAG_Int(REGB3));
+ } else {
+ /* ./../lib/standard//string.nit:281 */
+ REGB2 = TAG_Bool(false);
+ REGB3 = REGB2;
+ }
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_string, 281);
+ }
+ /* ./../lib/standard//string.nit:282 */
+ REGB3 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 282);
+ }
+ fra.me.REG[0] = ATTR_string___AbstractString____items(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:586 */
+ UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB1);;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void string___Buffer___init(val_t self, int* init_table) {
- struct trace_t trace = {NULL, NULL, 335, LOCATE_string___Buffer___init};
- val_t variable[2];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Buffer].i]) return;
- /* Register variable[1]: Method return value and escape marker */
- CALL_string___Buffer___with_capacity(variable[0])(variable[0], TAG_Int(5), init_table /*YYY*/) /*Buffer::with_capacity*/;
- return_label40: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Buffer].i] = 1;
- tracehead = trace.prev;
+void string___Buffer___add(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 tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 285;
+ fra.me.meth = LOCATE_string___Buffer___add;
+ 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:287 */
+ REGB1 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_string, 287);
+ }
+ REGB1 = ATTR_string___Buffer____capacity(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//kernel.nit:211 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB2));
+ /* ./../lib/standard//string.nit:287 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:287 */
+ REGB1 = TAG_Int(5);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:287 */
+ CALL_array___AbstractArray___enlarge(fra.me.REG[0])(fra.me.REG[0], REGB1);
+ }
+ /* ./../lib/standard//string.nit:288 */
+ REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 288);
+ }
+ fra.me.REG[1] = ATTR_string___AbstractString____items(fra.me.REG[0]);
+ /* ./../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:586 */
+ UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB1)]=UNTAG_Char(REGB0);;
+ /* ./../lib/standard//string.nit:289 */
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:289 */
+ ATTR_array___AbstractArrayRead____length(fra.me.REG[0]) = REGB1;
+ stack_frame_head = fra.me.prev;
return;
}
-void string___Buffer___from(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, NULL, 341, LOCATE_string___Buffer___from};
- val_t variable[6];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Buffer].i]) return;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/;
- /* Register variable[3]: Result */
- variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1)));
- ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/ = variable[3];
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/;
- ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/ = variable[3];
- /* Register variable[3]: Result */
- variable[3] = ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/;
- /* Register variable[3]: Result */
- variable[3] = BOX_NativeString((char*)malloc((UNTAG_Int(variable[3]) * sizeof(char))));
- ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/ = variable[3];
- /* Register variable[3]: Result */
- variable[3] = CALL_string___AbstractString___items( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractString::items*/;
- /* Register variable[4]: Result */
- variable[4] = ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/;
- /* Register variable[5]: Result */
- variable[5] = ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/;
- (void)memcpy(UNBOX_NativeString(variable[4])+UNTAG_Int( TAG_Int(0)), UNBOX_NativeString(variable[3])+UNTAG_Int( TAG_Int(0)), UNTAG_Int(variable[5]));
- return_label41: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Buffer].i] = 1;
- tracehead = trace.prev;
+void string___Buffer___enlarge(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 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 = 292;
+ fra.me.meth = LOCATE_string___Buffer___enlarge;
+ 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;
+ REGB0 = p1;
+ /* ./../lib/standard//string.nit:294 */
+ REGB1 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_string, 294);
+ }
+ REGB1 = ATTR_string___Buffer____capacity(fra.me.REG[0]);
+ /* ./../lib/standard//kernel.nit:211 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:295 */
+ if (UNTAG_Bool(REGB2)) {
+ goto label1;
+ }
+ /* ./../lib/standard//string.nit:296 */
+ while(1) {
+ /* ./../lib/standard//kernel.nit:211 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)<=UNTAG_Int(REGB0));
+ /* ./../lib/standard//string.nit:296 */
+ if (UNTAG_Bool(REGB2)) {
+ REGB2 = TAG_Int(2);
+ /* ./../lib/standard//kernel.nit:218 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)*UNTAG_Int(REGB2));
+ /* ./../lib/standard//string.nit:296 */
+ REGB3 = TAG_Int(2);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
+ /* ./../lib/standard//string.nit:296 */
+ REGB1 = REGB3;
+ } else {
+ goto label2;
+ }
+ }
+ label2: while(0);
+ /* ./../lib/standard//string.nit:297 */
+ REGB0 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
+ /* ./../lib/standard//string.nit:601 */
+ fra.me.REG[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB0) * sizeof(char))));
+ /* ./../lib/standard//string.nit:298 */
+ 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, 298);
+ }
+ fra.me.REG[2] = ATTR_string___AbstractString____items(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:298 */
+ REGB3 = TAG_Int(0);
+ REGB2 = TAG_Int(0);
+ /* ./../lib/standard//string.nit:587 */
+ (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB3), UNTAG_Int(REGB0));;
+ /* ./../lib/standard//string.nit:299 */
+ ATTR_string___AbstractString____items(fra.me.REG[0]) = fra.me.REG[1];
+ /* ./../lib/standard//string.nit:300 */
+ ATTR_string___Buffer____capacity(fra.me.REG[0]) = REGB1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void string___Buffer___with_capacity(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, NULL, 349, LOCATE_string___Buffer___with_capacity};
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Buffer].i]) return;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(UNTAG_Int( variable[1] /*cap*/)>=UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_string___Buffer___with_capacity, LOCATE_string, 352); nit_exit(1);}
- /* Register variable[3]: Result */
- variable[3] = TAG_Int(UNTAG_Int( variable[1] /*cap*/)+UNTAG_Int( TAG_Int(1)));
- /* Register variable[3]: Result */
- variable[3] = BOX_NativeString((char*)malloc((UNTAG_Int(variable[3]) * sizeof(char))));
- ATTR_string___AbstractString____items(variable[0]) /*AbstractString::_items*/ = variable[3];
- ATTR_string___Buffer____capacity(variable[0]) /*Buffer::_capacity*/ = variable[1] /*cap*/;
- ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/ = TAG_Int(0);
- return_label42: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Buffer].i] = 1;
- tracehead = trace.prev;
+void string___Buffer___append(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} 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 = 303;
+ fra.me.meth = LOCATE_string___Buffer___append;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./../lib/standard//string.nit:303 */
+ fra.me.REG[2] = fra.me.REG[0];
+ fra.me.REG[3] = fra.me.REG[1];
+ /* ./../lib/standard//string.nit:305 */
+ REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[3], COLOR_String, ID_String)) /*cast String*/;
+ if (UNTAG_Bool(REGB0)) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ /* ./../lib/standard//string.nit:307 */
+ REGB1 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_string, 307);
+ }
+ REGB1 = ATTR_string___Buffer____capacity(fra.me.REG[2]);
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
+ /* ./../lib/standard//string.nit:307 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
+ /* ./../lib/standard//string.nit:307 */
+ CALL_array___AbstractArray___enlarge(fra.me.REG[2])(fra.me.REG[2], REGB2);
+ }
+ /* ./../lib/standard//string.nit:308 */
+ fra.me.REG[3] = CALL_string___AbstractString___items(fra.me.REG[3])(fra.me.REG[3]);
+ REGB2 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 308);
+ }
+ fra.me.REG[4] = ATTR_string___AbstractString____items(fra.me.REG[2]);
+ REGB2 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//string.nit:587 */
+ (void)memcpy(UNBOX_NativeString(fra.me.REG[4])+UNTAG_Int(REGB1), UNBOX_NativeString(fra.me.REG[3])+UNTAG_Int(REGB2), UNTAG_Int(REGB0));;
+ /* ./../lib/standard//string.nit:309 */
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB0 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB0));
+ /* ./../lib/standard//string.nit:309 */
+ ATTR_array___AbstractArrayRead____length(fra.me.REG[2]) = REGB0;
+ } else {
+ /* ./../lib/standard//string.nit:311 */
+ CALL_SUPER_string___Buffer___append(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ }
+ stack_frame_head = fra.me.prev;
return;
}
-val_t string___Buffer___capacity(val_t self) {
- struct trace_t trace = {NULL, NULL, 375, LOCATE_string___Buffer___capacity};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- tracehead = trace.prev;
- return ATTR_string___Buffer____capacity( self) /*Buffer::_capacity*/;
+val_t string___Buffer___to_s(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} 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 = 315;
+ fra.me.meth = LOCATE_string___Buffer___to_s;
+ 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;
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:318 */
+ 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[1] = BOX_NativeString((char*)raw_alloc((UNTAG_Int(REGB1) * sizeof(char))));
+ /* ./../lib/standard//string.nit:319 */
+ REGB1 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_items", LOCATE_string, 319);
+ }
+ fra.me.REG[2] = ATTR_string___AbstractString____items(fra.me.REG[0]);
+ REGB1 = TAG_Int(0);
+ REGB2 = TAG_Int(0);
+ /* ./../lib/standard//string.nit:587 */
+ (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[2])+UNTAG_Int(REGB1), UNTAG_Int(REGB0));;
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:322 */
+ REGB1 = TAG_Char('\0');
+ /* ./../lib/standard//string.nit:586 */
+ UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB2)]=UNTAG_Char(REGB1);;
+ /* ./../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:324 */
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB1);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
}
-val_t string___Object___to_s(val_t self) {
- struct trace_t trace = {NULL, NULL, 385, LOCATE_string___Object___to_s};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = CALL_string___Object___inspect(variable[0])(variable[0]) /*Object::inspect*/;
- variable[1] = variable[2];
- goto return_label43;
- return_label43: while(false);
- tracehead = trace.prev;
- return variable[1];
+val_t string___Buffer_____l(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 = 327;
+ fra.me.meth = LOCATE_string___Buffer_____l;
+ 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:329 */
+ REGB0 = TAG_Int(0);
+ /* ./../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]);
+ 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:332 */
+ while(1) {
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:332 */
+ if (UNTAG_Bool(REGB3)) {
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
+ } else {
+ /* ./../lib/standard//string.nit:332 */
+ REGB4 = TAG_Bool(false);
+ REGB3 = REGB4;
+ }
+ if (UNTAG_Bool(REGB3)) {
+ /* ./../lib/standard//string.nit:333 */
+ REGB3 = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB0);
+ /* ./../lib/standard//kernel.nit:382 */
+ REGB3 = TAG_Int((unsigned char)UNTAG_Char(REGB3));
+ /* ./../lib/standard//string.nit:334 */
+ REGB4 = CALL_abstract_collection___MapRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB0);
+ /* ./../lib/standard//kernel.nit:382 */
+ REGB4 = TAG_Int((unsigned char)UNTAG_Char(REGB4));
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB5 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
+ /* ./../lib/standard//string.nit:335 */
+ if (UNTAG_Bool(REGB5)) {
+ /* ./../lib/standard//string.nit:336 */
+ REGB5 = TAG_Bool(true);
+ goto label1;
+ } else {
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB3 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB3));
+ /* ./../lib/standard//string.nit:337 */
+ if (UNTAG_Bool(REGB3)) {
+ /* ./../lib/standard//string.nit:338 */
+ REGB3 = TAG_Bool(false);
+ REGB5 = REGB3;
+ goto label1;
+ }
+ }
+ /* ./../lib/standard//string.nit:340 */
+ REGB3 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
+ /* ./../lib/standard//string.nit:340 */
+ REGB0 = REGB3;
+ } else {
+ /* ./../lib/standard//string.nit:332 */
+ goto label2;
+ }
+ }
+ label2: while(0);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
+ /* ./../lib/standard//string.nit:342 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//string.nit:343 */
+ REGB2 = TAG_Bool(true);
+ REGB5 = REGB2;
+ goto label1;
+ } else {
+ /* ./../lib/standard//string.nit:345 */
+ REGB2 = TAG_Bool(false);
+ REGB5 = REGB2;
+ goto label1;
+ }
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB5;
}
-val_t string___Object___inspect(val_t self) {
- struct trace_t trace = {NULL, NULL, 388, LOCATE_string___Object___inspect};
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Local variable */
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___inspect_head(variable[0])(variable[0]) /*Object::inspect_head*/;
- variable[2] = variable[3];
- variable[1] = variable[2] /*r*/;
- goto return_label44;
- return_label44: while(false);
- tracehead = trace.prev;
- return variable[1];
+void string___Buffer___init(val_t p0, int* init_table){
+ int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Buffer].i;
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ if (init_table[itpos2]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 349;
+ fra.me.meth = LOCATE_string___Buffer___init;
+ 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: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;
+ return;
}
-val_t string___Object___inspect_head(val_t self) {
- struct trace_t trace = {NULL, NULL, 397, LOCATE_string___Object___inspect_head};
- static val_t once_value_46 = NIT_NULL; /* Once value for string variable[3]*/
- static val_t once_value_47 = NIT_NULL; /* Once value for string variable[3]*/
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- variable[2] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[3]: Once String constant */
- if (once_value_46 != NIT_NULL) variable[3] = once_value_46;
- else {
- variable[3] = NEW_String_string___String___with_native(BOX_NativeString("<"), TAG_Int(1)) /*new String*/;
- once_value_46 = variable[3];
- }
- /* Register variable[3]: Result */
- /* Ensure var variable[3]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[3]) /*AbstractArray::add*/;
- /* Register variable[3]: Result */
- variable[3] = TAG_Int((bigint)variable[0]);
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Int___to_hex(variable[3])(variable[3]) /*Int::to_hex*/;
- /* Ensure var variable[3]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[3]) /*AbstractArray::add*/;
- /* Register variable[3]: Once String constant */
- if (once_value_47 != NIT_NULL) variable[3] = once_value_47;
- else {
- variable[3] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_47 = variable[3];
- }
- /* Register variable[3]: Result */
- /* Ensure var variable[3]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[3]) /*AbstractArray::add*/;
- /* Register variable[2]: Result */
- variable[2] = CALL_string___Object___to_s(variable[2])(variable[2]) /*Object::to_s*/;
- variable[1] = variable[2];
- goto return_label45;
- return_label45: while(false);
- tracehead = trace.prev;
- return variable[1];
+void string___Buffer___from(val_t p0, val_t p1, int* init_table){
+ int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Buffer].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ if (init_table[itpos3]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 355;
+ fra.me.meth = LOCATE_string___Buffer___from;
+ 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;
+ /* ./../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);
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ 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;
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ 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;
+ /* ./../lib/standard//string.nit:359 */
+ REGB1 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ 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);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ 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 {
+ 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;
}
-val_t string___Object___args(val_t self) {
- struct trace_t trace = {NULL, NULL, 404, LOCATE_string___Object___args};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = (G_sys);
- /* Register variable[2]: Result */
- variable[2] = CALL_string___Object___args(variable[2])(variable[2]) /*Sys::args*/;
- variable[1] = variable[2];
- goto return_label48;
- return_label48: while(false);
- tracehead = trace.prev;
- return variable[1];
+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___Bool___to_s(val_t self) {
- struct trace_t trace = {NULL, NULL, 411, LOCATE_string___Bool___to_s};
- static val_t once_value_50; static int once_bool_50; /* Once value for variable[2]*/
- static val_t once_value_51 = NIT_NULL; /* Once value for string variable[2]*/
- static val_t once_value_52; static int once_bool_52; /* Once value for variable[2]*/
- static val_t once_value_53 = NIT_NULL; /* Once value for string variable[2]*/
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- if (UNTAG_Bool(variable[0])) { /*if*/
- /* Register variable[2]: Once expression result */
- if (once_bool_50) variable[2] = once_value_50;
- else {
- /* Register variable[2]: Once String constant */
- if (once_value_51 != NIT_NULL) variable[2] = once_value_51;
- else {
- variable[2] = NEW_String_string___String___with_native(BOX_NativeString("true"), TAG_Int(4)) /*new String*/;
- once_value_51 = variable[2];
+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);
+ }
+ 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(REGB1));
+ /* ./../lib/standard//string.nit:381 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//string.nit:585 */
+ REGB2 = TAG_Char(UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB3)]);
+ REGB4 = TAG_Char(UNBOX_NativeString(fra.me.REG[1])[UNTAG_Int(REGB3)]);
+ /* ./../lib/standard//string.nit:382 */
+ REGB5 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB4));
+ if (UNTAG_Bool(REGB5)) {
+ } else {
+ /* ./../lib/standard//kernel.nit:347 */
+ REGB4 = TAG_Bool((REGB2)==(REGB4));
+ /* ./../lib/standard//string.nit:382 */
+ REGB5 = REGB4;
}
- /* Register variable[2]: Result */
- once_value_50 = variable[2];
- once_bool_50 = true;
- }
- /* Register variable[2]: Result */
- variable[1] = variable[2];
- goto return_label49;
- } else { /*if*/
- /* Register variable[2]: Once expression result */
- if (once_bool_52) variable[2] = once_value_52;
- else {
- /* Register variable[2]: Once String constant */
- if (once_value_53 != NIT_NULL) variable[2] = once_value_53;
- else {
- variable[2] = NEW_String_string___String___with_native(BOX_NativeString("false"), TAG_Int(5)) /*new String*/;
- once_value_53 = variable[2];
+ REGB5 = TAG_Bool(!UNTAG_Bool(REGB5));
+ if (UNTAG_Bool(REGB5)) {
+ REGB5 = TAG_Bool(false);
+ REGB0 = REGB5;
+ goto label1;
}
- /* Register variable[2]: Result */
- once_value_52 = variable[2];
- once_bool_52 = true;
+ /* ./../lib/standard//string.nit:383 */
+ REGB5 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB5));
+ /* ./../lib/standard//string.nit:383 */
+ REGB3 = REGB5;
+ } else {
+ /* ./../lib/standard//string.nit:381 */
+ goto label2;
}
- /* Register variable[2]: Result */
- variable[1] = variable[2];
- goto return_label49;
}
- return_label49: while(false);
- tracehead = trace.prev;
- return variable[1];
+ label2: while(0);
+ /* ./../lib/standard//string.nit:385 */
+ REGB3 = TAG_Bool(true);
+ REGB0 = REGB3;
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t string___Buffer___capacity(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 = 388;
+ fra.me.meth = LOCATE_string___Buffer___capacity;
+ 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:388 */
+ REGB0 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_string, 388);
+ }
+ REGB0 = ATTR_string___Buffer____capacity(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t string___Object___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 = 398;
+ fra.me.meth = LOCATE_string___Object___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:399 */
+ fra.me.REG[0] = CALL_string___Object___inspect(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___Object___inspect(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 = 401;
+ fra.me.meth = LOCATE_string___Object___inspect;
+ 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:405 */
+ fra.me.REG[0] = CALL_string___Object___inspect_head(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:407 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t string___Object___inspect_head(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ static val_t once_value_2; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 410;
+ fra.me.meth = LOCATE_string___Object___inspect_head;
+ 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;
+ /* ./../lib/standard//string.nit:414 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[2] = BOX_NativeString("<");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ 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];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ REGB0 = CALL_kernel___Object___object_id(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Int___to_hex(REGB0)(REGB0);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ if (!once_value_2) {
+ fra.me.REG[0] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_2 = fra.me.REG[0];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[0] = once_value_2;
+ fra.me.REG[0] = fra.me.REG[0];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ 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;
+ return fra.me.REG[1];
}
-val_t string___Int___to_s(val_t self) {
- struct trace_t trace = {NULL, NULL, 446, LOCATE_string___Int___to_s};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = CALL_string___Int___to_base(variable[0])(variable[0], TAG_Int(10), TAG_Bool(true)) /*Int::to_base*/;
- variable[1] = variable[2];
- goto return_label54;
- return_label54: while(false);
- tracehead = trace.prev;
- return variable[1];
+val_t string___Object___args(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 = 417;
+ fra.me.meth = LOCATE_string___Object___args;
+ 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:419 */
+ fra.me.REG[0] = CALL_kernel___Object___sys(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___args(fra.me.REG[0])(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-void string___Int___fill_buffer(val_t self, val_t param0, val_t param1, val_t param2) {
- struct trace_t trace = {NULL, NULL, 422, LOCATE_string___Int___fill_buffer};
- val_t variable[8];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Local variable */
- variable[3] = param2;
- /* Register variable[4]: Method return value and escape marker */
- /* Register variable[5]: Local variable */
- /*variable[5] is variable n*/
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(UNTAG_Int(variable[0])<UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable[6])) { /*if*/
- /* Register variable[6]: Result */
- variable[6] = TAG_Int(-UNTAG_Int(variable[0]));
- variable[5] = variable[6] /*n=*/;
- CALL_abstract_collection___Map_____braeq( variable[1] /*s*/)( variable[1] /*s*/, TAG_Int(0), TAG_Char('-')) /*Buffer::[]=*/;
- } else { /*if*/
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool((variable[0])==( TAG_Int(0)));
- if (UNTAG_Bool(variable[6])) { /*if*/
- CALL_abstract_collection___Map_____braeq( variable[1] /*s*/)( variable[1] /*s*/, TAG_Int(0), TAG_Char('0')) /*Buffer::[]=*/;
- goto return_label55;
- } else { /*if*/
- variable[5] = variable[0] /*n=*/;
+val_t string___Bool___to_s(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ static val_t once_value_2; /* Once value */
+ static val_t once_value_4; /* Once value */
+ static val_t once_value_5; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 424;
+ fra.me.meth = LOCATE_string___Bool___to_s;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ REGB0 = p0;
+ /* ./../lib/standard//string.nit:426 */
+ if (UNTAG_Bool(REGB0)) {
+ /* ./../lib/standard//string.nit:427 */
+ if (!once_value_1) {
+ if (!once_value_2) {
+ fra.me.REG[0] = BOX_NativeString("true");
+ REGB0 = TAG_Int(4);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_2 = fra.me.REG[0];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[0] = once_value_2;
+ fra.me.REG[0] = fra.me.REG[0];
+ 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];
+ goto label3;
+ } else {
+ /* ./../lib/standard//string.nit:429 */
+ if (!once_value_4) {
+ if (!once_value_5) {
+ fra.me.REG[1] = BOX_NativeString("false");
+ REGB0 = TAG_Int(5);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
+ once_value_5 = fra.me.REG[1];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[1] = once_value_5;
+ fra.me.REG[1] = fra.me.REG[1];
+ once_value_4 = fra.me.REG[1];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[1] = once_value_4;
+ fra.me.REG[1] = fra.me.REG[1];
+ fra.me.REG[0] = fra.me.REG[1];
+ goto label3;
+ }
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+void string___Int___fill_buffer(val_t p0, val_t p1, val_t p2, val_t p3){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t REGB3;
+ val_t REGB4;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 435;
+ fra.me.meth = LOCATE_string___Int___fill_buffer;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ REGB0 = p0;
+ fra.me.REG[0] = p1;
+ REGB1 = p2;
+ REGB2 = p3;
+ /* ./../lib/standard//string.nit:441 */
+ REGB2 = TAG_Int(0);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
+ /* ./../lib/standard//string.nit:441 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//kernel.nit:216 */
+ REGB2 = TAG_Int(-UNTAG_Int(REGB0));
+ /* ./../lib/standard//string.nit:443 */
+ REGB3 = TAG_Int(0);
+ REGB4 = TAG_Char('-');
+ CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB3, REGB4);
+ } else {
+ /* ./../lib/standard//string.nit:444 */
+ REGB4 = TAG_Int(0);
+ REGB3 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB4));
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ /* ./../lib/standard//kernel.nit:207 */
+ REGB4 = TAG_Bool((REGB0)==(REGB4));
+ /* ./../lib/standard//string.nit:444 */
+ REGB3 = REGB4;
+ }
+ if (UNTAG_Bool(REGB3)) {
+ /* ./../lib/standard//string.nit:445 */
+ REGB3 = TAG_Int(0);
+ REGB4 = TAG_Char('0');
+ CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB3, REGB4);
+ /* ./../lib/standard//string.nit:446 */
+ goto label1;
+ } else {
+ /* ./../lib/standard//string.nit:448 */
+ REGB2 = REGB0;
}
}
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = CALL_kernel___Int___digit_count(variable[0])(variable[0], variable[2] /*base*/) /*Int::digit_count*/;
- /* Register variable[7]: Result */
- variable[7] = TAG_Int(UNTAG_Int(variable[7])-UNTAG_Int( TAG_Int(1)));
- variable[6] = variable[7];
- while (true) { /*while*/
- /* Register variable[7]: Result */
- variable[7] = TAG_Bool(UNTAG_Int( variable[6] /*pos*/)>=UNTAG_Int( TAG_Int(0)));
- /* Ensure var variable[7]: Left 'and' operand*/
- if (UNTAG_Bool(variable[7])) { /* and */
- /* Register variable[7]: Result */
- variable[7] = TAG_Bool(UNTAG_Int( variable[5] /*n*/)>UNTAG_Int( TAG_Int(0)));
+ /* ./../lib/standard//string.nit:451 */
+ REGB0 = CALL_kernel___Int___digit_count(REGB0)(REGB0, REGB1);
+ REGB4 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:217 */
+ REGB4 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB4));
+ /* ./../lib/standard//string.nit:452 */
+ while(1) {
+ REGB0 = TAG_Int(0);
+ /* ./../lib/standard//kernel.nit:213 */
+ REGB0 = TAG_Bool(UNTAG_Int(REGB4)>=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));
+ } else {
+ /* ./../lib/standard//string.nit:452 */
+ REGB3 = TAG_Bool(false);
+ REGB0 = REGB3;
}
- /* Register variable[7]: Result */
- if (!UNTAG_Bool(variable[7])) break; /* while*/
- /* Register variable[7]: Result */
- variable[7] = TAG_Int(UNTAG_Int( variable[5] /*n*/)%UNTAG_Int( variable[2] /*base*/));
- /* Register variable[7]: Result */
- variable[7] = CALL_kernel___Int___to_c(variable[7])(variable[7]) /*Int::to_c*/;
- CALL_abstract_collection___Map_____braeq( variable[1] /*s*/)( variable[1] /*s*/, variable[6] /*pos*/, variable[7]) /*Buffer::[]=*/;
- /* Register variable[7]: Result */
- variable[7] = TAG_Int(UNTAG_Int( variable[5] /*n*/)/UNTAG_Int( variable[2] /*base*/));
- variable[5] = variable[7] /*n=*/;
- variable[6] = TAG_Int(UNTAG_Int(variable[6])-UNTAG_Int( TAG_Int(1))) /*pos*/;
- continue_56: while(0);
- }
- break_56: while(0);
- return_label55: while(false);
- tracehead = trace.prev;
+ if (UNTAG_Bool(REGB0)) {
+ /* ./../lib/standard//kernel.nit:220 */
+ REGB0 = TAG_Int(UNTAG_Int(REGB2)%UNTAG_Int(REGB1));
+ /* ./../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;
+ } else {
+ /* ./../lib/standard//string.nit:452 */
+ goto label2;
+ }
+ }
+ label2: while(0);
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-val_t string___Int___to_hex(val_t self) {
- struct trace_t trace = {NULL, NULL, 449, LOCATE_string___Int___to_hex};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = CALL_string___Int___to_base(variable[0])(variable[0], TAG_Int(16), TAG_Bool(false)) /*Int::to_base*/;
- variable[1] = variable[2];
- goto return_label57;
- return_label57: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t string___Int___to_base(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 452, LOCATE_string___Int___to_base};
- static val_t once_value_59 = NIT_NULL; /* Once value for string variable[6]*/
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_kernel___Int___digit_count(variable[0])(variable[0], variable[1] /*base*/) /*Int::digit_count*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Once String constant */
- if (once_value_59 != NIT_NULL) variable[6] = once_value_59;
- else {
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)) /*new String*/;
- once_value_59 = variable[6];
- }
- /* Register variable[6]: Result */
- /* Register variable[6]: Result */
- variable[6] = CALL_string___String_____star(variable[6])(variable[6], variable[4] /*l*/) /*String::**/;
- /* Register variable[6]: Result */
- variable[6] = NEW_Buffer_string___Buffer___from(variable[6]) /*new Buffer*/;
- variable[5] = variable[6];
- CALL_string___Int___fill_buffer(variable[0])(variable[0], variable[5] /*s*/, variable[1] /*base*/, variable[2] /*signed*/) /*Int::fill_buffer*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s( variable[5] /*s*/)( variable[5] /*s*/) /*Buffer::to_s*/;
- variable[3] = variable[6];
- goto return_label58;
- return_label58: while(false);
- tracehead = trace.prev;
- return variable[3];
+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___Float___to_s(val_t self) {
- struct trace_t trace = {NULL, NULL, 463, LOCATE_string___Float___to_s};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = CALL_string___Float___to_precision(variable[0])(variable[0], TAG_Int(6)) /*Float::to_precision*/;
- variable[1] = variable[2];
- goto return_label60;
- return_label60: while(false);
- tracehead = trace.prev;
- return variable[1];
+val_t string___Int___to_hex(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 = 462;
+ fra.me.meth = LOCATE_string___Int___to_hex;
+ fra.me.has_broke = 0;
+ 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);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-val_t string___Float___to_precision(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 465, LOCATE_string___Float___to_precision};
- static val_t once_value_63 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_64 = NIT_NULL; /* Once value for string variable[7]*/
- static val_t once_value_65 = NIT_NULL; /* Once value for string variable[7]*/
- val_t variable[8];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool(( variable[1] /*nb*/)==( TAG_Int(0)));
- if (UNTAG_Bool(variable[3])) { /*if*/
- /* Register variable[3]: Result */
- variable[3] = TAG_Int((bigint)UNBOX_Float(variable[0]));
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Int::to_s*/;
- variable[2] = variable[3];
- goto return_label61;
- }
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = TAG_Int((bigint)UNBOX_Float(variable[0]));
- variable[3] = variable[4];
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = BOX_Float(1.0);
- variable[4] = variable[5];
- while (true) { /*while*/
- /* Register variable[5]: Result */
- variable[5] = TAG_Bool(UNTAG_Int( variable[1] /*nb*/)>UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable[5])) break; /* while*/
- /* Register variable[5]: Result */
- variable[5] = BOX_Float(10.0);
- /* Register variable[5]: Result */
- variable[5] = BOX_Float(UNBOX_Float( variable[4] /*dec*/)*UNBOX_Float(variable[5]));
- variable[4] = variable[5] /*dec=*/;
- variable[1] = TAG_Int(UNTAG_Int(variable[1])-UNTAG_Int( TAG_Int(1))) /*nb*/;
- continue_62: while(0);
- }
- break_62: while(0);
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = BOX_Float((float)UNTAG_Int( variable[3] /*i*/));
- /* Register variable[6]: Result */
- variable[6] = BOX_Float(UNBOX_Float(variable[0])-UNBOX_Float(variable[6]));
- /* Register variable[6]: Result */
- variable[6] = BOX_Float(UNBOX_Float(variable[6])*UNBOX_Float( variable[4] /*dec*/));
- /* Register variable[6]: Result */
- variable[6] = TAG_Int((bigint)UNBOX_Float(variable[6]));
- variable[5] = variable[6];
- variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[7]: Once String constant */
- if (once_value_63 != NIT_NULL) variable[7] = once_value_63;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_63 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- variable[7] = variable[3] /*i*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_64 != NIT_NULL) variable[7] = once_value_64;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString("."), TAG_Int(1)) /*new String*/;
- once_value_64 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- variable[7] = variable[5] /*d*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[7]: Once String constant */
- if (once_value_65 != NIT_NULL) variable[7] = once_value_65;
- else {
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_65 = variable[7];
- }
- /* Register variable[7]: Result */
- /* Ensure var variable[7]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
- variable[2] = variable[6];
- goto return_label61;
- return_label61: while(false);
- tracehead = trace.prev;
- return variable[2];
+val_t string___Int___to_base(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 REGB4;
+ 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_string;
+ fra.me.line = 465;
+ fra.me.meth = LOCATE_string___Int___to_base;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ 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) {
+ fra.me.REG[0] = BOX_NativeString(" ");
+ REGB4 = TAG_Int(1);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB4);
+ 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);
+ /* ./../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;
+ return fra.me.REG[0];
}
-val_t string___Char___to_s(val_t self) {
- struct trace_t trace = {NULL, NULL, 482, LOCATE_string___Char___to_s};
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Local variable */
- /* Register variable[3]: Result */
- variable[3] = NEW_Buffer_string___Buffer___with_capacity( TAG_Int(1)) /*new Buffer*/;
- variable[2] = variable[3];
- CALL_abstract_collection___Map_____braeq( variable[2] /*s*/)( variable[2] /*s*/, TAG_Int(0), variable[0]) /*Buffer::[]=*/;
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___to_s( variable[2] /*s*/)( variable[2] /*s*/) /*Buffer::to_s*/;
- variable[1] = variable[3];
- goto return_label66;
- return_label66: while(false);
- tracehead = trace.prev;
- return variable[1];
+val_t string___Float___to_s(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 = 476;
+ fra.me.meth = LOCATE_string___Float___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:476 */
+ REGB0 = TAG_Int(6);
+ fra.me.REG[0] = CALL_string___Float___to_precision(fra.me.REG[0])(fra.me.REG[0], REGB0);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-val_t string___Collection___to_s(val_t self) {
- struct trace_t trace = {NULL, NULL, 491, LOCATE_string___Collection___to_s};
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Local variable */
- /* Register variable[3]: Result */
- variable[3] = NEW_Buffer_string___Buffer___init() /*new Buffer*/;
- variable[2] = variable[3];
- /* Register variable[3]: For iterator */
- variable[3] = CALL_abstract_collection___Collection___iterator(variable[0])(variable[0]) /*Collection::iterator*/;
- while (true) { /*for*/
- /* Register variable[4]: For 'is_ok' result */
- variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[4])) break; /*for*/
- variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*Iterator::item*/ /* Ensure var: For item*/;
- /* Register variable[5]: Local variable */
- variable[5] = variable[4];
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*e*/ == NIT_NULL /*null*/) || (( variable[5] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*e*/)( variable[5] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable[6])) { /*if*/
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s( variable[5] /*e*/)( variable[5] /*e*/) /*Object::to_s*/;
- CALL_abstract_collection___IndexedCollection___append( variable[2] /*s*/)( variable[2] /*s*/, variable[6]) /*Buffer::append*/;
+val_t string___Float___to_precision(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ static val_t once_value_3; /* Once value */
+ static val_t once_value_4; /* Once value */
+ static val_t once_value_5; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 478;
+ fra.me.meth = LOCATE_string___Float___to_precision;
+ fra.me.has_broke = 0;
+ 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;
+ /* ./../lib/standard//string.nit:481 */
+ REGB1 = TAG_Int(0);
+ REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ /* ./../lib/standard//kernel.nit:207 */
+ REGB1 = TAG_Bool((REGB0)==(REGB1));
+ /* ./../lib/standard//string.nit:481 */
+ REGB2 = REGB1;
+ }
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//kernel.nit:196 */
+ REGB2 = TAG_Int((bigint)UNBOX_Float(fra.me.REG[0]));
+ /* ./../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;
+ } else {
+ /* ./../lib/standard//string.nit:485 */
+ goto label2;
}
- continue_68: while(0);
- CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
- }
- break_68: while(0);
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Object___to_s( variable[2] /*s*/)( variable[2] /*s*/) /*Buffer::to_s*/;
- variable[1] = variable[3];
- goto return_label67;
- return_label67: while(false);
- tracehead = trace.prev;
- return variable[1];
+ }
+ 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);
+ if (!once_value_3) {
+ fra.me.REG[3] = BOX_NativeString("");
+ REGB1 = TAG_Int(0);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB1);
+ once_value_3 = fra.me.REG[3];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[3] = once_value_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);
+ 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);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB2);
+ once_value_4 = fra.me.REG[3];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[3] = once_value_4;
+ 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);
+ 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);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_5 = fra.me.REG[3];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[3] = once_value_5;
+ 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;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
}
-val_t string___Collection___join(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 499, LOCATE_string___Collection___join};
- static val_t once_value_70 = NIT_NULL; /* Once value for string variable[3]*/
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Method return value and escape marker */
- /* Register variable[3]: Result */
- variable[3] = CALL_abstract_collection___Collection___is_empty(variable[0])(variable[0]) /*Collection::is_empty*/;
- if (UNTAG_Bool(variable[3])) { /*if*/
- /* Register variable[3]: Once String constant */
- if (once_value_70 != NIT_NULL) variable[3] = once_value_70;
- else {
- variable[3] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_70 = variable[3];
- }
- /* Register variable[3]: Result */
- variable[2] = variable[3];
- goto return_label69;
- }
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = NEW_Buffer_string___Buffer___init() /*new Buffer*/;
- variable[3] = variable[4];
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_abstract_collection___Collection___iterator(variable[0])(variable[0]) /*Collection::iterator*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___Iterator___item( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::item*/;
- variable[5] = variable[6];
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*e*/ == NIT_NULL /*null*/) || (( variable[5] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*e*/)( variable[5] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable[6])) { /*if*/
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s( variable[5] /*e*/)( variable[5] /*e*/) /*Object::to_s*/;
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*s*/)( variable[3] /*s*/, variable[6]) /*Buffer::append*/;
- }
- CALL_abstract_collection___Iterator___next( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::next*/;
- while (true) { /*while*/
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___Iterator___is_ok( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[6])) break; /* while*/
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*s*/)( variable[3] /*s*/, variable[1] /*sep*/) /*Buffer::append*/;
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___Iterator___item( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::item*/;
- variable[5] = variable[6] /*e=*/;
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*e*/ == NIT_NULL /*null*/) || (( variable[5] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*e*/)( variable[5] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable[6])) { /*if*/
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s( variable[5] /*e*/)( variable[5] /*e*/) /*Object::to_s*/;
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*s*/)( variable[3] /*s*/, variable[6]) /*Buffer::append*/;
- }
- CALL_abstract_collection___Iterator___next( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::next*/;
- continue_71: while(0);
- }
- break_71: while(0);
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s( variable[3] /*s*/)( variable[3] /*s*/) /*Buffer::to_s*/;
- variable[2] = variable[6];
- goto return_label69;
- return_label69: while(false);
- tracehead = trace.prev;
- return variable[2];
+val_t string___Char___to_s(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 = 495;
+ fra.me.meth = LOCATE_string___Char___to_s;
+ fra.me.has_broke = 0;
+ 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);
+ /* ./../lib/standard//string.nit:498 */
+ REGB1 = TAG_Int(0);
+ CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB1, REGB0);
+ /* ./../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___Array___to_s(val_t self) {
- struct trace_t trace = {NULL, NULL, 524, LOCATE_string___Array___to_s};
- val_t variable[10];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Local variable */
- /* Register variable[3]: Result */
- variable[3] = NEW_Buffer_string___Buffer___init() /*new Buffer*/;
- variable[2] = variable[3];
- /* Register variable[3]: Local variable */
- variable[3] = TAG_Int(0);
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = CALL_abstract_collection___Collection___length(variable[0])(variable[0]) /*AbstractArrayRead::length*/;
- variable[4] = variable[5];
- while (true) { /*while*/
- /* Register variable[5]: Result */
- variable[5] = TAG_Bool(UNTAG_Int( variable[3] /*i*/)<UNTAG_Int( variable[4] /*l*/));
- if (!UNTAG_Bool(variable[5])) break; /* while*/
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Local variable */
- variable[6] = variable[0];
- /* Register variable[7]: Local variable */
- variable[7] = variable[3] /*i*/;
- /* Register variable[8]: Method return value and escape marker */
- /* Register variable[9]: Result */
- variable[9] = TAG_Bool(UNTAG_Int( variable[7] /*index*/)>=UNTAG_Int( TAG_Int(0)));
- /* Ensure var variable[9]: Left 'and' operand*/
- if (UNTAG_Bool(variable[9])) { /* and */
- /* Register variable[9]: Result */
- variable[9] = ATTR_array___AbstractArrayRead____length(variable[6]) /*AbstractArrayRead::_length*/;
- /* Register variable[9]: Result */
- variable[9] = TAG_Bool(UNTAG_Int( variable[7] /*index*/)<UNTAG_Int(variable[9]));
- }
- /* Register variable[9]: Result */
- if (!UNTAG_Bool(variable[9])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_string, 234); nit_exit(1);}
- /* Register variable[9]: Result */
- variable[9] = ATTR_array___Array____items(variable[6]) /*Array::_items*/;
- /* Register variable[9]: Result */
- variable[9] = UNBOX_NativeArray(variable[9])[UNTAG_Int( variable[7] /*index*/)];
- variable[8] = variable[9];
- goto return_label74;
- return_label74: while(false);
- /* Register variable[6]: Result */
- variable[6] = variable[8];
- variable[5] = variable[6];
- /* Register variable[6]: Result */
- variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*e*/ == NIT_NULL /*null*/) || (( variable[5] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*e*/)( variable[5] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable[6])) { /*if*/
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Object___to_s( variable[5] /*e*/)( variable[5] /*e*/) /*Object::to_s*/;
- CALL_abstract_collection___IndexedCollection___append( variable[2] /*s*/)( variable[2] /*s*/, variable[6]) /*Buffer::append*/;
- }
- variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_73: while(0);
- }
- break_73: while(0);
- /* Register variable[5]: Result */
- variable[5] = CALL_string___Object___to_s( variable[2] /*s*/)( variable[2] /*s*/) /*Buffer::to_s*/;
- variable[1] = variable[5];
- goto return_label72;
- return_label72: while(false);
- tracehead = trace.prev;
- return variable[1];
+val_t string___Collection___to_s(val_t p0){
+ 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 = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./../lib/standard//string.nit:507 */
+ fra.me.REG[1] = NEW_Buffer_string___Buffer___init();
+ 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];
}
-val_t string___Map___map_join(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 540, LOCATE_string___Map___map_join};
- static val_t once_value_76 = NIT_NULL; /* Once value for string variable[4]*/
- static val_t once_value_77 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_78 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_79 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_80 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_82 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_83 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_84 = NIT_NULL; /* Once value for string variable[9]*/
- static val_t once_value_85 = NIT_NULL; /* Once value for string variable[9]*/
- val_t variable[10];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Method return value and escape marker */
- /* Register variable[4]: Result */
- variable[4] = CALL_abstract_collection___Collection___is_empty(variable[0])(variable[0]) /*Collection::is_empty*/;
- if (UNTAG_Bool(variable[4])) { /*if*/
- /* Register variable[4]: Once String constant */
- if (once_value_76 != NIT_NULL) variable[4] = once_value_76;
- else {
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_76 = variable[4];
+ 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)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
+ REGB0 = REGB1;
+ }
}
- /* Register variable[4]: Result */
- variable[3] = variable[4];
- goto return_label75;
- }
- /* Register variable[4]: Local variable */
- /* Register variable[5]: Result */
- variable[5] = NEW_Buffer_string___Buffer___init() /*new Buffer*/;
- variable[4] = variable[5];
- /* Register variable[5]: Local variable */
- /* Register variable[6]: Result */
- variable[6] = CALL_abstract_collection___Collection___iterator(variable[0])(variable[0]) /*MapRead::iterator*/;
- variable[5] = variable[6];
- /* Register variable[6]: Local variable */
- /* Register variable[7]: Result */
- variable[7] = CALL_abstract_collection___MapIterator___key( variable[5] /*i*/)( variable[5] /*i*/) /*MapIterator::key*/;
- variable[6] = variable[7];
- /* Register variable[7]: Local variable */
- /* Register variable[8]: Result */
- variable[8] = CALL_abstract_collection___Iterator___item( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::item*/;
- variable[7] = variable[8];
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[7] /*e*/ == NIT_NULL /*null*/) || (( variable[7] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[7] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[7] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[7] /*e*/)( variable[7] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable[8])) { /*if*/
- variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(7)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[9]: Once String constant */
- if (once_value_77 != NIT_NULL) variable[9] = once_value_77;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_77 = variable[9];
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_string, 508);
+ }
+ 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]);
}
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- variable[9] = variable[6] /*k*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_78 != NIT_NULL) variable[9] = once_value_78;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_78 = variable[9];
+ stack_frame_head = fra.me.prev;
+ return;
+ }
+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;
+ val_t REGB1;
+ 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_string;
+ fra.me.line = 512;
+ fra.me.meth = LOCATE_string___Collection___join;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 6;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./../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("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ 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]);
+ /* ./../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);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], NIT_NULL);
+ REGB0 = REGB1;
}
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- variable[9] = variable[2] /*couple_sep*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_79 != NIT_NULL) variable[9] = once_value_79;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_79 = variable[9];
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_string, 522);
}
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- variable[9] = variable[7] /*e*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_80 != NIT_NULL) variable[9] = once_value_80;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_80 = variable[9];
+ 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]);
+ }
+ /* ./../lib/standard//string.nit:525 */
+ CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:526 */
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]);
+ 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];
+ /* ./../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);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ 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]);
+ }
+ /* ./../lib/standard//string.nit:530 */
+ CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
+ } else {
+ /* ./../lib/standard//string.nit:526 */
+ goto label3;
}
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[8]: Result */
- variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
- CALL_abstract_collection___IndexedCollection___append( variable[4] /*s*/)( variable[4] /*s*/, variable[8]) /*Buffer::append*/;
- }
- CALL_abstract_collection___Iterator___next( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::next*/;
- while (true) { /*while*/
- /* Register variable[8]: Result */
- variable[8] = CALL_abstract_collection___Iterator___is_ok( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable[8])) break; /* while*/
- CALL_abstract_collection___IndexedCollection___append( variable[4] /*s*/)( variable[4] /*s*/, variable[1] /*sep*/) /*Buffer::append*/;
- /* Register variable[8]: Result */
- variable[8] = CALL_abstract_collection___MapIterator___key( variable[5] /*i*/)( variable[5] /*i*/) /*MapIterator::key*/;
- variable[6] = variable[8] /*k=*/;
- /* Register variable[8]: Result */
- variable[8] = CALL_abstract_collection___Iterator___item( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::item*/;
- variable[7] = variable[8] /*e=*/;
- /* Register variable[8]: Result */
- variable[8] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[7] /*e*/ == NIT_NULL /*null*/) || (( variable[7] /*e*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[7] /*e*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[7] /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[7] /*e*/)( variable[7] /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable[8])) { /*if*/
- variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(7)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[9]: Once String constant */
- if (once_value_82 != NIT_NULL) variable[9] = once_value_82;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_82 = variable[9];
+ }
+ 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];
+ goto label2;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[2];
+}
+val_t string___Array___to_s(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t REGB3;
+ val_t REGB4;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 537;
+ fra.me.meth = LOCATE_string___Array___to_s;
+ 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;
+ /* ./../lib/standard//string.nit:540 */
+ fra.me.REG[1] = NEW_Buffer_string___Buffer___init();
+ /* ./../lib/standard//string.nit:541 */
+ REGB0 = TAG_Int(0);
+ /* ./../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:543 */
+ while(1) {
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//string.nit:543 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//collection//array.nit:243 */
+ fra.me.REG[2] = fra.me.REG[0];
+ REGB2 = REGB0;
+ /* ./../lib/standard//collection//array.nit:245 */
+ REGB3 = TAG_Int(0);
+ /* ./../lib/standard//kernel.nit:213 */
+ REGB3 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB3));
+ /* ./../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 {
+ 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)<UNTAG_Int(REGB3));
+ } else {
+ /* ./../lib/standard//collection//array.nit:245 */
+ REGB4 = TAG_Bool(false);
+ REGB3 = REGB4;
+ }
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ nit_abort("Assert %s failed", "'index'", LOCATE_array, 245);
}
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- variable[9] = variable[6] /*k*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_83 != NIT_NULL) variable[9] = once_value_83;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_83 = variable[9];
+ /* ./../lib/standard//collection//array.nit:246 */
+ fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[2]);
+ REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB3)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 246);
}
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- variable[9] = variable[2] /*couple_sep*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_84 != NIT_NULL) variable[9] = once_value_84;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_84 = variable[9];
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB2)];
+ /* ./../lib/standard//collection//array.nit:246 */
+ goto label1;
+ label1: while(0);
+ /* ./../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);
+ if (UNTAG_Bool(REGB3)) {
+ REGB3 = TAG_Bool(false);
+ REGB2 = REGB3;
+ } else {
+ REGB3 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
+ REGB2 = REGB3;
+ }
+ }
+ REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
+ if (UNTAG_Bool(REGB2)) {
+ REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ 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;
+ } else {
+ /* ./../lib/standard//string.nit:543 */
+ goto label2;
+ }
+ }
+ label2: while(0);
+ /* ./../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;
+ return fra.me.REG[1];
+}
+val_t string___Map___map_join(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[8];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ static val_t once_value_3; /* Once value */
+ static val_t once_value_4; /* Once value */
+ static val_t once_value_5; /* Once value */
+ static val_t once_value_6; /* Once value */
+ static val_t once_value_7; /* Once value */
+ static val_t once_value_8; /* Once value */
+ static val_t once_value_9; /* Once value */
+ static val_t once_value_10; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 553;
+ fra.me.meth = LOCATE_string___Map___map_join;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 9;
+ 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[7] = NIT_NULL;
+ fra.me.REG[8] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./../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("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ 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]);
+ /* ./../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);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Int(7);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_3) {
+ fra.me.REG[8] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_3 = fra.me.REG[8];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[8] = once_value_3;
+ 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]);
+ 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);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_4 = fra.me.REG[8];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[8] = once_value_4;
+ 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);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_5 = fra.me.REG[8];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[8] = once_value_5;
+ 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]);
+ 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);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_6 = fra.me.REG[8];
+ register_static_object(&once_value_6);
+ } else fra.me.REG[8] = once_value_6;
+ 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]);
+ }
+ /* ./../lib/standard//string.nit:567 */
+ CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//string.nit:568 */
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]);
+ 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];
+ /* ./../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);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], NIT_NULL);
+ REGB0 = REGB1;
+ }
}
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- variable[9] = variable[7] /*e*/ /* Ensure var: super-string element*/;
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
- /* Register variable[9]: Once String constant */
- if (once_value_85 != NIT_NULL) variable[9] = once_value_85;
- else {
- variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_85 = variable[9];
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Int(7);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_7) {
+ fra.me.REG[8] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_7 = fra.me.REG[8];
+ register_static_object(&once_value_7);
+ } else fra.me.REG[8] = once_value_7;
+ 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]);
+ 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);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_8 = fra.me.REG[8];
+ register_static_object(&once_value_8);
+ } else fra.me.REG[8] = once_value_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]);
+ 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);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_9 = fra.me.REG[8];
+ register_static_object(&once_value_9);
+ } else fra.me.REG[8] = once_value_9;
+ 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]);
+ 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);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB0);
+ once_value_10 = fra.me.REG[8];
+ register_static_object(&once_value_10);
+ } else fra.me.REG[8] = once_value_10;
+ 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]);
}
- /* Register variable[9]: Result */
- /* Ensure var variable[9]: super-string element*/
- CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
- /* Register variable[8]: Result */
- variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
- CALL_abstract_collection___IndexedCollection___append( variable[4] /*s*/)( variable[4] /*s*/, variable[8]) /*Buffer::append*/;
+ /* ./../lib/standard//string.nit:573 */
+ CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
+ } else {
+ /* ./../lib/standard//string.nit:568 */
+ goto label11;
}
- CALL_abstract_collection___Iterator___next( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::next*/;
- continue_81: while(0);
- }
- break_81: while(0);
- /* Register variable[8]: Result */
- variable[8] = CALL_string___Object___to_s( variable[4] /*s*/)( variable[4] /*s*/) /*Buffer::to_s*/;
- variable[3] = variable[8];
- goto return_label75;
- return_label75: while(false);
- tracehead = trace.prev;
- return variable[3];
+ }
+ 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];
+ goto label2;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[3];
}
-val_t string___NativeString_____bra(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 572, LOCATE_string___NativeString_____bra};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- tracehead = trace.prev;
- return TAG_Char(UNBOX_NativeString( self)[UNTAG_Int( param0)]);
+val_t string___NativeString_____bra(val_t p0, val_t p1){
+ 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 = 585;
+ fra.me.meth = LOCATE_string___NativeString_____bra;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = p1;
+ /* ./../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;
}
-void string___NativeString_____braeq(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 573, LOCATE_string___NativeString_____braeq};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- UNBOX_NativeString( self)[UNTAG_Int( param0)]=UNTAG_Char( param1);
- tracehead = trace.prev;
+void string___NativeString_____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 tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_string;
+ fra.me.line = 586;
+ fra.me.meth = LOCATE_string___NativeString_____braeq;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = p1;
+ REGB1 = p2;
+ /* ./../lib/standard//string.nit:586 */
+ UNBOX_NativeString(fra.me.REG[0])[UNTAG_Int(REGB0)]=UNTAG_Char(REGB1);;
+ stack_frame_head = fra.me.prev;
return;
}
-void string___NativeString___copy_to(val_t self, val_t param0, val_t param1, val_t param2, val_t param3) {
- struct trace_t trace = {NULL, NULL, 574, LOCATE_string___NativeString___copy_to};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- (void)memcpy(UNBOX_NativeString( param0)+UNTAG_Int( param3), UNBOX_NativeString( self)+UNTAG_Int( param2), UNTAG_Int( param1));
- tracehead = trace.prev;
+void string___NativeString___copy_to(val_t p0, val_t p1, val_t p2, val_t p3, val_t p4){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} 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 = 587;
+ fra.me.meth = LOCATE_string___NativeString___copy_to;
+ 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 = p3;
+ REGB2 = p4;
+ /* ./../lib/standard//string.nit:587 */
+ (void)memcpy(UNBOX_NativeString(fra.me.REG[1])+UNTAG_Int(REGB2), UNBOX_NativeString(fra.me.REG[0])+UNTAG_Int(REGB1), UNTAG_Int(REGB0));;
+ stack_frame_head = fra.me.prev;
return;
}
-val_t string___NativeString___cstring_length(val_t self) {
- struct trace_t trace = {NULL, NULL, 576, LOCATE_string___NativeString___cstring_length};
- val_t variable[4];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Local variable */
- variable[2] = TAG_Int(0);
- while (true) { /*while*/
- /* Register variable[3]: Result */
- variable[3] = TAG_Char(UNBOX_NativeString(variable[0])[UNTAG_Int( variable[2] /*l*/)]);
- /* Register variable[3]: Result */
- variable[3] = TAG_Bool((variable[3])!=( TAG_Char('\0')));
- if (!UNTAG_Bool(variable[3])) break; /* while*/
- variable[2] = TAG_Int(UNTAG_Int(variable[2])+UNTAG_Int( TAG_Int(1))) /*l*/;
- continue_87: while(0);
- }
- break_87: while(0);
- variable[1] = variable[2] /*l*/;
- goto return_label86;
- return_label86: while(false);
- tracehead = trace.prev;
- return variable[1];
+val_t string___NativeString___cstring_length(val_t p0){
+ 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 = 589;
+ fra.me.meth = LOCATE_string___NativeString___cstring_length;
+ 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: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));
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ /* ./../lib/standard//kernel.nit:347 */
+ REGB2 = TAG_Bool((REGB1)==(REGB2));
+ /* ./../lib/standard//string.nit:593 */
+ REGB3 = REGB2;
+ }
+ 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;
+ } else {
+ goto label1;
+ }
+ }
+ label1: while(0);
+ /* ./../lib/standard//string.nit:594 */
+ goto label2;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
}
-val_t string___NativeString___atoi(val_t self) {
- struct trace_t trace = {NULL, NULL, 583, LOCATE_string___NativeString___atoi};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- tracehead = trace.prev;
- return TAG_Int(atoi(UNBOX_NativeString( self)));
+val_t string___NativeString___atoi(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 = 596;
+ fra.me.meth = LOCATE_string___NativeString___atoi;
+ 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:596 */
+ REGB0 = TAG_Int(atoi(UNBOX_NativeString(fra.me.REG[0])));
+ stack_frame_head = fra.me.prev;
+ return REGB0;
}
-void string___NativeString___init(val_t self, int* init_table) {
- struct trace_t trace = {NULL, NULL, 0, LOCATE_string___NativeString___init};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- tracehead = trace.prev;
+void string___NativeString___init(val_t p0, int* init_table){
+ int itpos5 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_NativeString].i;
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ if (init_table[itpos5]) return;
+ 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___NativeString___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 0;
+ stack_frame_head = fra.me.prev;
+ init_table[itpos5] = 1;
return;
}
-val_t string___StringCapable___calloc_string(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 588, LOCATE_string___StringCapable___calloc_string};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- tracehead = trace.prev;
- return BOX_NativeString((char*)malloc((UNTAG_Int( param0) * sizeof(char))));
+val_t string___StringCapable___calloc_string(val_t p0, val_t p1){
+ 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 = 601;
+ fra.me.meth = LOCATE_string___StringCapable___calloc_string;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = p1;
+ /* ./../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];
}
-void string___StringCapable___init(val_t self, int* init_table) {
- struct trace_t trace = {NULL, NULL, 0, LOCATE_string___StringCapable___init};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- tracehead = trace.prev;
+void string___StringCapable___init(val_t p0, int* init_table){
+ int itpos6 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_StringCapable].i;
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ if (init_table[itpos6]) return;
+ 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___StringCapable___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 0;
+ stack_frame_head = fra.me.prev;
+ init_table[itpos6] = 1;
return;
}
-val_t string___Sys___args(val_t self) {
- struct trace_t trace = {NULL, NULL, 594, LOCATE_string___Sys___args};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = ATTR_string___Sys____args_cache(variable[0]) /*Sys::_args_cache*/;
- /* Register variable[2]: Result */
- variable[2] = TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[2])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[2], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[2])(variable[2], NIT_NULL /*null*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable[2])) { /*if*/
- CALL_string___Sys___init_args(variable[0])(variable[0]) /*Sys::init_args*/;
- }
- /* Register variable[2]: Result */
- variable[2] = ATTR_string___Sys____args_cache(variable[0]) /*Sys::_args_cache*/;
- variable[1] = variable[2];
- goto return_label88;
- return_label88: while(false);
- tracehead = trace.prev;
- return variable[1];
+val_t string___Sys___args(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 = 607;
+ fra.me.meth = LOCATE_string___Sys___args;
+ 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:609 */
+ fra.me.REG[1] = ATTR_string___Sys____args_cache(fra.me.REG[0]);
+ 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_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ 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);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_string, 610);
+ }
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-val_t string___Sys___program_name(val_t self) {
- struct trace_t trace = {NULL, NULL, 600, LOCATE_string___Sys___program_name};
- val_t variable[3];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Result */
- variable[2] = CALL_string___Sys___native_argv(variable[0])(variable[0], TAG_Int(0)) /*Sys::native_argv*/;
- /* Register variable[2]: Result */
- variable[2] = NEW_String_string___String___from_cstring(variable[2]) /*new String*/;
- variable[1] = variable[2];
- goto return_label89;
- return_label89: while(false);
- tracehead = trace.prev;
- return variable[1];
+val_t string___Sys___program_name(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 = 613;
+ fra.me.meth = LOCATE_string___Sys___program_name;
+ 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: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]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-void string___Sys___init_args(val_t self) {
- struct trace_t trace = {NULL, NULL, 606, LOCATE_string___Sys___init_args};
- val_t variable[7];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Method return value and escape marker */
- /* Register variable[2]: Local variable */
- /* Register variable[3]: Result */
- variable[3] = CALL_string___Sys___native_argc(variable[0])(variable[0]) /*Sys::native_argc*/;
- variable[2] = variable[3];
- /* Register variable[3]: Local variable */
- /* Register variable[4]: Result */
- variable[4] = NEW_Array_array___Array___with_capacity( TAG_Int(0)) /*new Array[String]*/;
- variable[3] = variable[4];
- /* Register variable[4]: Local variable */
- variable[4] = TAG_Int(1);
- while (true) { /*while*/
- /* Register variable[5]: Result */
- variable[5] = TAG_Bool(UNTAG_Int( variable[4] /*i*/)<UNTAG_Int( variable[2] /*argc*/));
- if (!UNTAG_Bool(variable[5])) break; /* while*/
- /* Register variable[5]: Result */
- variable[5] = TAG_Int(UNTAG_Int( variable[4] /*i*/)-UNTAG_Int( TAG_Int(1)));
- /* Register variable[6]: Result */
- variable[6] = CALL_string___Sys___native_argv(variable[0])(variable[0], variable[4] /*i*/) /*Sys::native_argv*/;
- /* Register variable[6]: Result */
- variable[6] = NEW_String_string___String___from_cstring(variable[6]) /*new String*/;
- CALL_abstract_collection___Map_____braeq( variable[3] /*args*/)( variable[3] /*args*/, variable[5], variable[6]) /*Array::[]=*/;
- variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_91: while(0);
- }
- break_91: while(0);
- ATTR_string___Sys____args_cache(variable[0]) /*Sys::_args_cache*/ = variable[3] /*args*/;
- return_label90: while(false);
- tracehead = trace.prev;
+void string___Sys___init_args(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} 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 = 619;
+ fra.me.meth = LOCATE_string___Sys___init_args;
+ 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;
+ /* ./../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)<UNTAG_Int(REGB0));
+ /* ./../lib/standard//string.nit:625 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//string.nit:626 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:217 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
+ /* ./../lib/standard//string.nit:626 */
+ fra.me.REG[2] = CALL_string___Sys___native_argv(fra.me.REG[0])(fra.me.REG[0], REGB1);
+ fra.me.REG[2] = NEW_String_string___String___from_cstring(fra.me.REG[2]);
+ CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB2, fra.me.REG[2]);
+ /* ./../lib/standard//string.nit:627 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
+ /* ./../lib/standard//string.nit:627 */
+ REGB1 = REGB2;
+ } else {
+ /* ./../lib/standard//string.nit:625 */
+ goto label1;
+ }
+ }
+ label1: while(0);
+ /* ./../lib/standard//string.nit:629 */
+ ATTR_string___Sys____args_cache(fra.me.REG[0]) = fra.me.REG[1];
+ stack_frame_head = fra.me.prev;
return;
}
-val_t string___Sys___native_argc(val_t self) {
- struct trace_t trace = {NULL, NULL, 619, LOCATE_string___Sys___native_argc};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- tracehead = trace.prev;
- return TAG_Int(kernel_Sys_Sys_native_argc_0( self));
+val_t string___Sys___native_argc(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 = 632;
+ fra.me.meth = LOCATE_string___Sys___native_argc;
+ 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:632 */
+ REGB0 = TAG_Int(kernel_Sys_Sys_native_argc_0(fra.me.REG[0]));
+ stack_frame_head = fra.me.prev;
+ return REGB0;
}
-val_t string___Sys___native_argv(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 621, LOCATE_string___Sys___native_argv};
- val_t *variable = NULL;
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_string;
- tracehead = trace.prev;
- return BOX_NativeString(kernel_Sys_Sys_native_argv_1( self, UNTAG_Int( param0)));
+val_t string___Sys___native_argv(val_t p0, val_t p1){
+ 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 = 634;
+ fra.me.meth = LOCATE_string___Sys___native_argv;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = p1;
+ /* ./../lib/standard//string.nit:634 */
+ fra.me.REG[0] = BOX_NativeString(kernel_Sys_Sys_native_argv_1(fra.me.REG[0], UNTAG_Int(REGB0)));
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}