/* This C file is generated by NIT to compile module string. */
#include "string._sep.h"
-val_t string___String_____bra(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::String::[] (bin/../lib/standard//string.nit:31,2--44)"};
- val_t variable0;
- val_t variable1;
+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;
- variable0 = param0;
- variable1 = ATTR_string___String____items( self) /*String::_items*/;
- variable1 = TAG_Char(UNBOX_NativeString(variable1)[UNTAG_Int( variable0 /*index*/)]);
- goto return_label0;
+ 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 variable1;
+ return;
}
-void string___String_____braeq(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, "string::String::[]= (bin/../lib/standard//string.nit:33,2--40:22)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
+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;
- variable0 = param0;
- variable1 = param1;
- variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable2 = TAG_Bool(( variable0 /*index*/)==(variable2));
- if (UNTAG_Bool(variable2)) { /*if*/
- ((string___String___add_t)CALL( self,COLOR_abstract_collection___SimpleCollection___add))( self, variable1 /*item*/) /*String::add*/;
- goto return_label1;
- }
- variable2 = TAG_Bool(UNTAG_Int( variable0 /*index*/)>=UNTAG_Int( TAG_Int(0)));
- variable3 = variable2;
- if (UNTAG_Bool(variable3)) { /* and */
- variable3 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable3 = TAG_Bool(UNTAG_Int( variable0 /*index*/)<UNTAG_Int(variable3));
- }
- variable2 = variable3;
- if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: bin/../lib/standard//string.nit:39,3--38\n"); nit_exit(1);}
- variable2 = ATTR_string___String____items( self) /*String::_items*/;
- UNBOX_NativeString(variable2)[UNTAG_Int( variable0 /*index*/)]=UNTAG_Char( variable1 /*item*/);
- return_label1: while(false);
+ 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;
+ return variable[2];
}
-void string___String___add(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::String::add (bin/../lib/standard//string.nit:43,2--47:14)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
+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;
- variable0 = param0;
- variable1 = ATTR_string___String____capacity( self) /*String::_capacity*/;
- variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable1 = TAG_Bool(UNTAG_Int(variable1)<=UNTAG_Int(variable2));
- if (UNTAG_Bool(variable1)) { /*if*/
- variable1 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable1 = TAG_Int(UNTAG_Int(variable1)+UNTAG_Int( TAG_Int(5)));
- ((string___String___enlarge_t)CALL( self,COLOR_array___AbstractArray___enlarge))( self, variable1) /*String::enlarge*/;
- }
- variable1 = ATTR_string___String____items( self) /*String::_items*/;
- variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- UNBOX_NativeString(variable1)[UNTAG_Int(variable2)]=UNTAG_Char( variable0 /*c*/);
- ATTR_array___AbstractArray____length( self) /*String::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArray____length( self) /*String::_length*/)+UNTAG_Int( TAG_Int(1)));
+ trace.file = LOCATE_string;
tracehead = trace.prev;
- return;
+ return ATTR_string___AbstractString____items( self) /*AbstractString::_items*/;
}
-void string___String___enlarge(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::String::enlarge (bin/../lib/standard//string.nit:50,2--58:15)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
+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;
- variable0 = param0;
- variable2 = ATTR_string___String____capacity( self) /*String::_capacity*/;
- variable1 = variable2;
- variable2 = TAG_Bool(UNTAG_Int( variable0 /*cap*/)<=UNTAG_Int( variable1 /*c*/));
- if (UNTAG_Bool(variable2)) { /*if*/
- goto return_label3;
+ 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=*/;
}
- while (true) { /*while*/
- variable2 = TAG_Bool(UNTAG_Int( variable1 /*c*/)<=UNTAG_Int( variable0 /*cap*/));
- if (!UNTAG_Bool(variable2)) break; /* while*/
- variable2 = TAG_Int(UNTAG_Int( variable1 /*c*/)*UNTAG_Int( TAG_Int(2)));
- variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(2)));
- variable1 = variable2 /*c=*/;
- continue_4: while(0);
+ /* 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=*/;
}
- break_4: while(0);
- variable3 = BOX_NativeString((char*)malloc((UNTAG_Int( variable1 /*c*/) * sizeof(char))));
- variable2 = variable3;
- variable3 = ATTR_string___String____items( self) /*String::_items*/;
- variable4 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- (void)memcpy(UNBOX_NativeString( variable2 /*a*/)+UNTAG_Int( TAG_Int(0)), UNBOX_NativeString(variable3)+UNTAG_Int( TAG_Int(0)), UNTAG_Int(variable4));
- ATTR_string___String____items( self) /*String::_items*/ = variable2 /*a*/;
- ATTR_string___String____capacity( self) /*String::_capacity*/ = variable1 /*c*/;
- return_label3: while(false);
- tracehead = trace.prev;
- return;
-}
-void string___String___append(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::String::append (bin/../lib/standard//string.nit:61,2--69:8)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = TAG_Bool(( variable0 /*s*/==NIT_NULL) || VAL_ISA( variable0 /*s*/, COLOR_String, ID_String)) /*cast String*/;
- if (UNTAG_Bool(variable1)) { /*if*/
- variable2 = ((array___AbstractArray___length_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Collection___length))( variable0 /*s*/) /*String::length*/;
- variable1 = variable2;
- variable2 = ATTR_string___String____capacity( self) /*String::_capacity*/;
- variable3 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable3 = TAG_Int(UNTAG_Int(variable3)+UNTAG_Int( variable1 /*sl*/));
- variable2 = TAG_Bool(UNTAG_Int(variable2)<UNTAG_Int(variable3));
- if (UNTAG_Bool(variable2)) { /*if*/
- variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( variable1 /*sl*/));
- ((string___String___enlarge_t)CALL( self,COLOR_array___AbstractArray___enlarge))( self, variable2) /*String::enlarge*/;
+ /* 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);
}
- variable2 = ((string___String___items_t)CALL( variable0 /*s*/,COLOR_string___String___items))( variable0 /*s*/) /*String::items*/;
- variable3 = ATTR_string___String____items( self) /*String::_items*/;
- variable4 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- (void)memcpy(UNBOX_NativeString(variable3)+UNTAG_Int(variable4), UNBOX_NativeString(variable2)+UNTAG_Int( TAG_Int(0)), UNTAG_Int( variable1 /*sl*/));
- ATTR_array___AbstractArray____length( self) /*String::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArray____length( self) /*String::_length*/)+UNTAG_Int( variable1 /*sl*/));
+ 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*/
- ((string___String___append_t)CALL( self,COLOR_SUPER_string___String___append))( self, param0) /*super String::append*/;
+ /* 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];
+ }
+ /* Register variable[4]: Result */
+ variable[3] = variable[4];
+ goto return_label3;
}
+ return_label3: while(false);
tracehead = trace.prev;
- return;
+ return variable[3];
}
-val_t string___String_____plus(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::String::+ (bin/../lib/standard//string.nit:73,2--79:10)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
+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;
- variable0 = param0;
- variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable3 = ((array___AbstractArray___length_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Collection___length))( variable0 /*s*/) /*String::length*/;
- variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int(variable3));
- variable3 = NEW_string___String___with_capacity(variable2); /*new String*/
- variable2 = variable3;
- variable1 = variable2;
- ((string___String___append_t)CALL( variable1 /*r*/,COLOR_abstract_collection___IndexedCollection___append))( variable1 /*r*/, self) /*String::append*/;
- ((string___String___append_t)CALL( variable1 /*r*/,COLOR_abstract_collection___IndexedCollection___append))( variable1 /*r*/, variable0 /*s*/) /*String::append*/;
- variable1 = variable1 /*r*/;
+ 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 variable1;
+ return variable[2];
}
-val_t string___String_____star(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::String::* (bin/../lib/standard//string.nit:82,2--91:10)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
+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;
- variable0 = param0;
- variable1 = TAG_Bool(UNTAG_Int( variable0 /*i*/)>=UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: bin/../lib/standard//string.nit:85,3--15\n"); nit_exit(1);}
- variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable2 = TAG_Int(UNTAG_Int(variable2)*UNTAG_Int( variable0 /*i*/));
- variable3 = NEW_string___String___with_capacity(variable2); /*new String*/
- variable2 = variable3;
- variable1 = variable2;
+ 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*/
- variable2 = TAG_Bool(UNTAG_Int( variable0 /*i*/)>UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable2)) break; /* while*/
- ((string___String___append_t)CALL( variable1 /*r*/,COLOR_abstract_collection___IndexedCollection___append))( variable1 /*r*/, self) /*String::append*/;
- variable0 = TAG_Int(UNTAG_Int(variable0)-UNTAG_Int( TAG_Int(1))) /*i*/;
+ /* 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;
+ }
+ 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);
- variable1 = variable1 /*r*/;
+ variable[3] = TAG_Bool(true);
goto return_label7;
return_label7: while(false);
tracehead = trace.prev;
- return variable1;
+ return variable[3];
}
-val_t string___String___to_s(val_t self) {
- struct trace_t trace = {NULL, "string::String::to_s (bin/../lib/standard//string.nit:94,2--95:55)"};
- val_t variable0;
+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;
- variable0 = NEW_string___String___from( self); /*new String*/
+ 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 variable0;
+ return variable[2];
}
-val_t string___String___to_i(val_t self) {
- struct trace_t trace = {NULL, "string::String::to_i (bin/../lib/standard//string.nit:97,2--101:24)"};
- val_t variable0;
+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;
- variable0 = ((string___String___to_cstring_t)CALL( self,COLOR_string___String___to_cstring))( self) /*String::to_cstring*/;
- variable0 = TAG_Int(atoi(UNBOX_NativeString(variable0)));
+ 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 variable0;
+ return variable[2];
}
-val_t string___String___to_hex(val_t self) {
- struct trace_t trace = {NULL, "string::String::to_hex (bin/../lib/standard//string.nit:104,2--105:35)"};
- val_t variable0;
+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;
- variable0 = ((string___String___a_to_t)CALL( self,COLOR_string___String___a_to))( self, TAG_Int(16)) /*String::a_to*/;
+ 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 variable0;
+ return variable[1];
+}
+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___String___a_to(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::String::a_to (bin/../lib/standard//string.nit:107,2--131:11)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
+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;
- variable0 = param0;
- variable1 = TAG_Int(0);
- variable2 = TAG_Bool(false);
- variable3 = ((array___AbstractArray___iterator_t)CALL( self,COLOR_abstract_collection___Collection___iterator))( self) /*String::iterator*/;
+ 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*/
- variable4 = ((array___ArrayIterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable4)) break; /*for*/
- variable4 = ((array___ArrayIterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*ArrayIterator::item*/;
- variable6 = ((kernel___Char___to_i_t)CALL( variable4 /*c*/,COLOR_kernel___Char___to_i))( variable4 /*c*/) /*Char::to_i*/;
- variable5 = variable6;
- variable6 = TAG_Bool(UNTAG_Int( variable5 /*v*/)>UNTAG_Int( variable0 /*base*/));
- if (UNTAG_Bool(variable6)) { /*if*/
- if (UNTAG_Bool( variable2 /*neg*/)) { /*if*/
- variable6 = TAG_Int(-UNTAG_Int( variable1 /*i*/));
- variable1 = variable6;
- goto return_label12;
+ /* 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*/
- variable1 = variable1 /*i*/;
- goto return_label12;
+ variable[2] = variable[3] /*i*/;
+ goto return_label13;
}
} else { /*if*/
- variable6 = TAG_Bool(UNTAG_Int( variable5 /*v*/)<UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable6)) { /*if*/
- variable2 = TAG_Bool(true) /*neg=*/;
+ /* 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*/
- variable6 = TAG_Int(UNTAG_Int( variable1 /*i*/)*UNTAG_Int( variable0 /*base*/));
- variable6 = TAG_Int(UNTAG_Int(variable6)+UNTAG_Int( variable5 /*v*/));
- variable1 = variable6 /*i=*/;
+ /* 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=*/;
}
}
- continue_13: while(0);
- ((array___ArrayIterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*ArrayIterator::next*/;
+ continue_14: while(0);
+ CALL_abstract_collection___Iterator___next(variable[5])(variable[5]) /*ArrayIterator::next*/;
}
- break_13: while(0);
- if (UNTAG_Bool( variable2 /*neg*/)) { /*if*/
- variable3 = TAG_Int(-UNTAG_Int( variable1 /*i*/));
- variable1 = variable3;
- goto return_label12;
+ 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*/
- variable1 = variable1 /*i*/;
- goto return_label12;
+ variable[2] = variable[3] /*i*/;
+ goto return_label13;
}
- return_label12: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-val_t string___String___to_cstring(val_t self) {
- struct trace_t trace = {NULL, "string::String::to_cstring (bin/../lib/standard//string.nit:135,2--140:15)"};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- ((string___String_____braeq_t)CALL( self,COLOR_abstract_collection___Map_____braeq))( self, variable0, TAG_Char('\0')) /*String::[]=*/;
- ATTR_array___AbstractArray____length( self) /*String::_length*/ = TAG_Int(UNTAG_Int(ATTR_array___AbstractArray____length( self) /*String::_length*/)-UNTAG_Int( TAG_Int(1)));
- variable0 = ATTR_string___String____items( self) /*String::_items*/;
- goto return_label14;
- return_label14: while(false);
+ return_label13: while(false);
tracehead = trace.prev;
- return variable0;
+ return variable[2];
}
-val_t string___String___substring(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, "string::String::substring (bin/../lib/standard//string.nit:143,2--163:12)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
+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;
- variable0 = param0;
- variable1 = param1;
- variable2 = TAG_Bool(UNTAG_Int( variable1 /*count*/)>=UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: bin/../lib/standard//string.nit:151,3--19\n"); nit_exit(1);}
- variable1 = TAG_Int(UNTAG_Int(variable1)+UNTAG_Int( variable0 /*from*/)) /*count*/;
- variable2 = TAG_Bool(UNTAG_Int( variable0 /*from*/)<UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable2)) { /*if*/
- variable0 = TAG_Int(0) /*from=*/;
- }
- variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable2 = TAG_Bool(UNTAG_Int( variable1 /*count*/)>UNTAG_Int(variable2));
- if (UNTAG_Bool(variable2)) { /*if*/
- variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable1 = variable2 /*count=*/;
- }
- variable2 = TAG_Bool(UNTAG_Int( variable0 /*from*/)<UNTAG_Int( variable1 /*count*/));
- if (UNTAG_Bool(variable2)) { /*if*/
- variable3 = TAG_Int(UNTAG_Int( variable1 /*count*/)-UNTAG_Int( variable0 /*from*/));
- variable4 = NEW_string___String___with_capacity(variable3); /*new String*/
- variable3 = variable4;
- variable2 = variable3;
- while (true) { /*while*/
- variable3 = TAG_Bool(UNTAG_Int( variable0 /*from*/)<UNTAG_Int( variable1 /*count*/));
- if (!UNTAG_Bool(variable3)) break; /* while*/
- variable3 = ATTR_string___String____items( self) /*String::_items*/;
- variable3 = TAG_Char(UNBOX_NativeString(variable3)[UNTAG_Int( variable0 /*from*/)]);
- ((array___AbstractArray___push_t)CALL( variable2 /*r*/,COLOR_abstract_collection___IndexedCollection___push))( variable2 /*r*/, variable3) /*String::push*/;
- variable0 = TAG_Int(UNTAG_Int(variable0)+UNTAG_Int( TAG_Int(1))) /*from*/;
- continue_16: while(0);
- }
- break_16: while(0);
- variable2 = variable2 /*r*/;
- goto return_label15;
- } else { /*if*/
- variable2 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- goto return_label15;
+ 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 variable2;
+ return variable[1];
}
-val_t string___String___substring_from(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::String::substring_from (bin/../lib/standard//string.nit:167,2--175:38)"};
- val_t variable0;
- val_t variable1;
+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;
- variable0 = param0;
- variable1 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable1 = TAG_Bool(UNTAG_Int( variable0 /*from*/)<UNTAG_Int(variable1));
- if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: bin/../lib/standard//string.nit:174,3--22\n"); nit_exit(1);}
- variable1 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable1 = TAG_Int(UNTAG_Int(variable1)-UNTAG_Int( variable0 /*from*/));
- variable1 = ((string___String___substring_t)CALL( self,COLOR_string___String___substring))( self, variable0 /*from*/, variable1) /*String::substring*/;
+ 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 variable1;
+ return variable[1];
}
-val_t string___String___has_substring(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, "string::String::has_substring (bin/../lib/standard//string.nit:178,2--194:13)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
+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;
- variable0 = param0;
- variable1 = param1;
- variable3 = ((array___AbstractArray___length_t)CALL( variable0 /*str*/,COLOR_abstract_collection___Collection___length))( variable0 /*str*/) /*String::length*/;
- variable3 = TAG_Int(UNTAG_Int(variable3)-UNTAG_Int( TAG_Int(1)));
- variable2 = variable3;
- variable4 = TAG_Int(UNTAG_Int( variable1 /*pos*/)+UNTAG_Int( variable2 /*itsindex*/));
- variable3 = variable4;
- variable5 = ATTR_string___String____items( self) /*String::_items*/;
- variable4 = variable5;
- variable6 = ATTR_string___String____items( variable0 /*str*/) /*String::_items*/;
- variable5 = variable6;
- variable6 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable6 = TAG_Bool(UNTAG_Int( variable3 /*myindex*/)>UNTAG_Int(variable6));
- variable7 = variable6;
- if (!UNTAG_Bool(variable7)) { /* or */
- variable7 = TAG_Bool(UNTAG_Int( variable2 /*itsindex*/)>UNTAG_Int( variable3 /*myindex*/));
+ 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;
}
- variable6 = variable7;
- if (UNTAG_Bool(variable6)) { /*if*/
- variable2 = TAG_Bool(false);
- goto return_label18;
+ /* 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*/
- variable6 = TAG_Bool(UNTAG_Int( variable2 /*itsindex*/)>UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable6)) break; /* while*/
- variable6 = TAG_Char(UNBOX_NativeString( variable4 /*myitems*/)[UNTAG_Int( variable3 /*myindex*/)]);
- variable7 = TAG_Char(UNBOX_NativeString( variable5 /*itsitems*/)[UNTAG_Int( variable2 /*itsindex*/)]);
- variable6 = TAG_Bool((variable6)!=(variable7));
- if (UNTAG_Bool(variable6)) { /*if*/
- variable2 = TAG_Bool(false);
- goto return_label18;
+ /* 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;
}
- variable3 = TAG_Int(UNTAG_Int(variable3)-UNTAG_Int( variable3 /*myindex*/)) /*myindex*/;
- variable2 = TAG_Int(UNTAG_Int(variable2)-UNTAG_Int( variable2 /*itsindex*/)) /*itsindex*/;
- continue_19: while(0);
+ variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
+ continue_20: while(0);
}
- break_19: while(0);
- variable2 = TAG_Bool(true);
- goto return_label18;
- return_label18: while(false);
- tracehead = trace.prev;
- return variable2;
-}
-val_t string___String___has_prefix(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::String::has_prefix (bin/../lib/standard//string.nit:197,2--201:71)"};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ((string___String___has_substring_t)CALL( self,COLOR_string___String___has_substring))( self, variable0 /*prefix*/, TAG_Int(0)) /*String::has_substring*/;
- goto return_label20;
- return_label20: while(false);
+ break_20: while(0);
+ variable[2] = TAG_Bool(true);
+ goto return_label19;
+ return_label19: while(false);
tracehead = trace.prev;
- return variable1;
-}
-val_t string___String___has_suffix(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::String::has_suffix (bin/../lib/standard//string.nit:203,2--207:93)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable2 = ((array___AbstractArray___length_t)CALL( variable0 /*suffix*/,COLOR_abstract_collection___Collection___length))( variable0 /*suffix*/) /*String::length*/;
- variable1 = TAG_Int(UNTAG_Int(variable1)-UNTAG_Int(variable2));
- variable1 = ((string___String___has_substring_t)CALL( self,COLOR_string___String___has_substring))( self, variable0 /*suffix*/, variable1) /*String::has_substring*/;
- goto return_label21;
- return_label21: while(false);
- tracehead = trace.prev;
- return variable1;
+ return variable[2];
}
val_t string___String_____l(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::String::< (bin/../lib/standard//string.nit:209,2--227:15)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
+ struct trace_t trace = {NULL, NULL, 204, LOCATE_string___String_____l};
+ val_t variable[11];
+ struct WBT_ **closurevariable = NULL;
trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = TAG_Int(0);
- variable3 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable2 = variable3;
- variable4 = ((array___AbstractArray___length_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Collection___length))( variable0 /*s*/) /*String::length*/;
- variable3 = variable4;
+ 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*/
- variable4 = TAG_Bool(UNTAG_Int( variable1 /*i*/)<UNTAG_Int( variable2 /*l1*/));
- variable5 = variable4;
- if (UNTAG_Bool(variable5)) { /* and */
- variable5 = TAG_Bool(UNTAG_Int( variable1 /*i*/)<UNTAG_Int( variable3 /*l2*/));
+ /* 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*/));
}
- variable4 = variable5;
- if (!UNTAG_Bool(variable4)) break; /* while*/
- variable5 = ((string___String_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable1 /*i*/) /*String::[]*/;
- variable5 = TAG_Int((unsigned char)UNTAG_Char(variable5));
- variable4 = variable5;
- variable6 = ((string___String_____bra_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Map_____bra))( variable0 /*s*/, variable1 /*i*/) /*String::[]*/;
- variable6 = TAG_Int((unsigned char)UNTAG_Char(variable6));
- variable5 = variable6;
- variable6 = TAG_Bool(UNTAG_Int( variable4 /*c1*/)<UNTAG_Int( variable5 /*c2*/));
- if (UNTAG_Bool(variable6)) { /*if*/
- variable1 = TAG_Bool(true);
- goto return_label22;
+ /* 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*/
- variable6 = TAG_Bool(UNTAG_Int( variable5 /*c2*/)<UNTAG_Int( variable4 /*c1*/));
- if (UNTAG_Bool(variable6)) { /*if*/
- variable1 = TAG_Bool(false);
- goto return_label22;
+ /* 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;
}
}
- variable1 = TAG_Int(UNTAG_Int(variable1)+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_23: while(0);
+ variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
+ continue_22: while(0);
}
- break_23: while(0);
- variable4 = TAG_Bool(UNTAG_Int( variable2 /*l1*/)<UNTAG_Int( variable3 /*l2*/));
- if (UNTAG_Bool(variable4)) { /*if*/
- variable1 = TAG_Bool(true);
- goto return_label22;
+ 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*/
- variable1 = TAG_Bool(false);
- goto return_label22;
+ variable[2] = TAG_Bool(false);
+ goto return_label21;
}
- return_label22: while(false);
+ return_label21: while(false);
tracehead = trace.prev;
- return variable1;
+ return variable[2];
}
-void string___String___init(val_t self, int* init_table) {
- struct trace_t trace = {NULL, "string::String::init (bin/../lib/standard//string.nit:231,2--234:17)"};
+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;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_String].i]) return;
- ((string___String___with_capacity_t)CALL( self,COLOR_string___String___with_capacity))( self, TAG_Int(5), init_table /*YYY*/) /*String::with_capacity*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_String].i] = 1;
+ 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;
+ return variable[1];
}
-void string___String___from(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, "string::String::from (bin/../lib/standard//string.nit:237,2--242:39)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
+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;
- variable0 = param0;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_String].i]) return;
- variable1 = ((array___AbstractArray___length_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Collection___length))( variable0 /*s*/) /*String::length*/;
- variable1 = TAG_Int(UNTAG_Int(variable1)+UNTAG_Int( TAG_Int(1)));
- ATTR_string___String____capacity( self) /*String::_capacity*/ = variable1;
- variable1 = ((array___AbstractArray___length_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Collection___length))( variable0 /*s*/) /*String::length*/;
- ATTR_array___AbstractArray____length( self) /*String::_length*/ = variable1;
- variable1 = ATTR_string___String____capacity( self) /*String::_capacity*/;
- variable1 = BOX_NativeString((char*)malloc((UNTAG_Int(variable1) * sizeof(char))));
- ATTR_string___String____items( self) /*String::_items*/ = variable1;
- variable1 = ((string___String___items_t)CALL( variable0 /*s*/,COLOR_string___String___items))( variable0 /*s*/) /*String::items*/;
- variable2 = ATTR_string___String____items( self) /*String::_items*/;
- variable3 = ATTR_array___AbstractArray____length( self) /*String::_length*/;
- (void)memcpy(UNBOX_NativeString(variable2)+UNTAG_Int( TAG_Int(0)), UNBOX_NativeString(variable1)+UNTAG_Int( TAG_Int(0)), UNTAG_Int(variable3));
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_String].i] = 1;
+ 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;
return;
}
-void string___String___with_capacity(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, "string::String::with_capacity (bin/../lib/standard//string.nit:245,2--252:13)"};
- val_t variable0;
- val_t variable1;
+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;
- variable0 = param0;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_String].i]) return;
- variable1 = TAG_Bool(UNTAG_Int( variable0 /*cap*/)>=UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: bin/../lib/standard//string.nit:248,3--17\n"); nit_exit(1);}
- variable1 = BOX_NativeString((char*)malloc((UNTAG_Int( variable0 /*cap*/) * sizeof(char))));
- ATTR_string___String____items( self) /*String::_items*/ = variable1;
- ATTR_string___String____capacity( self) /*String::_capacity*/ = variable0 /*cap*/;
- ATTR_array___AbstractArray____length( self) /*String::_length*/ = TAG_Int(0);
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_String].i] = 1;
+ 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;
return;
}
-void string___String___with_native(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, "string::String::with_native (bin/../lib/standard//string.nit:255,2--261:16)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
+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;
- variable0 = param0;
- variable1 = param1;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_String].i]) return;
- variable2 = TAG_Bool(UNTAG_Int( variable1 /*size*/)>=UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: bin/../lib/standard//string.nit:258,3--18\n"); nit_exit(1);}
- ATTR_string___String____items( self) /*String::_items*/ = variable0 /*nat*/;
- ATTR_string___String____capacity( self) /*String::_capacity*/ = variable1 /*size*/;
- ATTR_array___AbstractArray____length( self) /*String::_length*/ = variable1 /*size*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_String].i] = 1;
+ 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;
+ return variable[1];
}
-void string___String___from_cstring(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, "string::String::from_cstring (bin/../lib/standard//string.nit:264,2--270:16)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
+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;
- variable0 = param0;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_String].i]) return;
- variable2 = ((string___NativeString___cstring_length_t)CALL( variable0 /*str*/,COLOR_string___NativeString___cstring_length))( variable0 /*str*/) /*NativeString::cstring_length*/;
- variable1 = variable2;
- ATTR_string___String____items( self) /*String::_items*/ = variable0 /*str*/;
- variable2 = TAG_Int(UNTAG_Int( variable1 /*size*/)+UNTAG_Int( TAG_Int(1)));
- ATTR_string___String____capacity( self) /*String::_capacity*/ = variable2;
- ATTR_array___AbstractArray____length( self) /*String::_length*/ = variable1 /*size*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_String].i] = 1;
+ 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;
+ return variable[2];
}
-void string___String___filled_with(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, "string::String::filled_with (bin/../lib/standard//string.nit:273,2--282:17)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
+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;
- variable0 = param0;
- variable1 = param1;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_String].i]) return;
- ((string___String___with_capacity_t)CALL( self,COLOR_string___String___with_capacity))( self, variable1 /*count*/, init_table /*YYY*/) /*String::with_capacity*/;
- variable2 = TAG_Int(0);
+ 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*/
- variable3 = TAG_Bool(UNTAG_Int( variable2 /*i*/)<UNTAG_Int( variable1 /*count*/));
- if (!UNTAG_Bool(variable3)) break; /* while*/
- variable3 = ATTR_string___String____items( self) /*String::_items*/;
- UNBOX_NativeString(variable3)[UNTAG_Int( variable2 /*i*/)]=UNTAG_Char( variable0 /*c*/);
- variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_30: while(0);
+ /* 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_30: while(0);
- ATTR_array___AbstractArray____length( self) /*String::_length*/ = variable1 /*count*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_String].i] = 1;
+ 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;
+ return variable[2];
}
-void string___String___output(val_t self) {
- struct trace_t trace = {NULL, "string::String::output (bin/../lib/standard//string.nit:285,2--290:9)"};
- val_t variable0;
- val_t variable1;
+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;
- variable0 = TAG_Int(0);
+ 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*/
- variable1 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable1 = TAG_Bool(UNTAG_Int( variable0 /*i*/)<UNTAG_Int(variable1));
- if (!UNTAG_Bool(variable1)) break; /* while*/
- variable1 = ATTR_string___String____items( self) /*String::_items*/;
- variable1 = TAG_Char(UNBOX_NativeString(variable1)[UNTAG_Int( variable0 /*i*/)]);
- printf("%c", (unsigned char)UNTAG_Char(variable1));
- variable0 = TAG_Int(UNTAG_Int(variable0)+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_32: while(0);
+ /* 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;
+ }
+ variable[4] = TAG_Int(UNTAG_Int(variable[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
+ continue_31: while(0);
}
- break_32: while(0);
+ break_31: while(0);
+ variable[2] = TAG_Bool(true);
+ goto return_label30;
+ return_label30: while(false);
tracehead = trace.prev;
- return;
+ return variable[2];
}
-val_t string___String_____eqeq(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::String::== (bin/../lib/standard//string.nit:294,2--307:13)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
+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;
- variable0 = param0;
- variable1 = TAG_Bool(( variable0 /*o*/==NIT_NULL) || VAL_ISA( variable0 /*o*/, COLOR_String, ID_String)) /*cast String*/;
- variable1 = TAG_Bool(!UNTAG_Bool(variable1));
- if (!UNTAG_Bool(variable1)) { /* or */
- variable1 = TAG_Bool(IS_EQUAL_NN( variable0 /*o*/, NIT_NULL /*null*/));
- }
- if (UNTAG_Bool(variable1)) { /*if*/
- variable1 = TAG_Bool(false);
- goto return_label33;
- }
- variable1 = TAG_Bool(( variable0 /*o*/==NIT_NULL) || VAL_ISA( variable0 /*o*/, COLOR_String, ID_String)) /*cast String*/;
- if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: bin/../lib/standard//string.nit:297,3--21\n"); nit_exit(1);}
- variable2 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable1 = variable2;
- variable2 = ((array___AbstractArray___length_t)CALL( variable0 /*o*/,COLOR_abstract_collection___Collection___length))( variable0 /*o*/) /*String::length*/;
- variable2 = TAG_Bool((variable2)!=( variable1 /*l*/));
- if (UNTAG_Bool(variable2)) { /*if*/
- variable1 = TAG_Bool(false);
- goto return_label33;
- }
- variable2 = TAG_Int(0);
- variable4 = ATTR_string___String____items( self) /*String::_items*/;
- variable3 = variable4;
- variable5 = ATTR_string___String____items( variable0 /*o*/) /*String::_items*/;
- variable4 = variable5;
+ 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];
+}
+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*/
- variable5 = TAG_Bool(UNTAG_Int( variable2 /*i*/)<UNTAG_Int( variable1 /*l*/));
- if (!UNTAG_Bool(variable5)) break; /* while*/
- variable5 = TAG_Char(UNBOX_NativeString( variable3 /*it*/)[UNTAG_Int( variable2 /*i*/)]);
- variable6 = TAG_Char(UNBOX_NativeString( variable4 /*oit*/)[UNTAG_Int( variable2 /*i*/)]);
- variable5 = TAG_Bool((variable5)!=(variable6));
- if (UNTAG_Bool(variable5)) { /*if*/
- variable1 = TAG_Bool(false);
+ /* 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*/));
+ }
+ /* 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;
+ }
}
- variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))) /*i*/;
+ variable[3] = TAG_Int(UNTAG_Int(variable[3])+UNTAG_Int( TAG_Int(1))) /*i*/;
continue_34: while(0);
}
break_34: while(0);
- variable1 = TAG_Bool(true);
- goto return_label33;
+ /* 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 variable1;
+ return variable[2];
}
-val_t string___String___to_upper(val_t self) {
- struct trace_t trace = {NULL, "string::String::to_upper (bin/../lib/standard//string.nit:310,2--315:10)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
+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;
- variable1 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable2 = NEW_string___String___with_capacity(variable1); /*new String*/
- variable1 = variable2;
- variable0 = variable1;
- variable1 = ((array___AbstractArray___iterator_t)CALL( self,COLOR_abstract_collection___Collection___iterator))( self) /*String::iterator*/;
- while (true) { /*for*/
- variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
- variable3 = ((kernel___Char___to_upper_t)CALL( variable2 /*i*/,COLOR_kernel___Char___to_upper))( variable2 /*i*/) /*Char::to_upper*/;
- ((string___String___add_t)CALL( variable0 /*s*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*s*/, variable3) /*String::add*/;
- continue_36: while(0);
- ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
+ 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]));
}
- break_36: while(0);
- variable0 = variable0 /*s*/;
- goto return_label35;
+ /* 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 variable0;
+ return;
}
-val_t string___String___to_lower(val_t self) {
- struct trace_t trace = {NULL, "string::String::to_lower (bin/../lib/standard//string.nit:318,2--323:10)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
+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;
- variable1 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
- variable2 = NEW_string___String___with_capacity(variable1); /*new String*/
- variable1 = variable2;
- variable0 = variable1;
- variable1 = ((array___AbstractArray___iterator_t)CALL( self,COLOR_abstract_collection___Collection___iterator))( self) /*String::iterator*/;
- while (true) { /*for*/
- variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
- variable3 = ((kernel___Char___to_lower_t)CALL( variable2 /*i*/,COLOR_kernel___Char___to_lower))( variable2 /*i*/) /*Char::to_lower*/;
- ((string___String___add_t)CALL( variable0 /*s*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*s*/, variable3) /*String::add*/;
- continue_38: while(0);
- ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
+ 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;
+}
+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*/;
+ }
+ /* 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*/;
}
- break_38: while(0);
- variable0 = variable0 /*s*/;
- goto return_label37;
return_label37: while(false);
tracehead = trace.prev;
- return variable0;
+ return;
}
-val_t string___String___items(val_t self) {
- struct trace_t trace = {NULL, "string::String::items (bin/../lib/standard//string.nit:326,2--43)"};
+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;
- return ATTR_string___String____items( self) /*String::_items*/;
+ return;
}
-val_t string___String___capacity(val_t self) {
- struct trace_t trace = {NULL, "string::String::capacity (bin/../lib/standard//string.nit:327,2--37)"};
+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;
- return ATTR_string___String____capacity( self) /*String::_capacity*/;
+ 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;
+ 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;
+ 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___Object___to_s(val_t self) {
- struct trace_t trace = {NULL, "string::Object::to_s (bin/../lib/standard//string.nit:337,2--338:36)"};
- val_t variable0;
+ 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;
- variable0 = ((string___Object___inspect_t)CALL( self,COLOR_string___Object___inspect))( self) /*Object::inspect*/;
- goto return_label39;
- return_label39: while(false);
+ 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 variable0;
+ return variable[1];
}
val_t string___Object___inspect(val_t self) {
- struct trace_t trace = {NULL, "string::Object::inspect (bin/../lib/standard//string.nit:340,2--346:10)"};
- val_t variable0;
- val_t variable1;
+ struct trace_t trace = {NULL, NULL, 388, LOCATE_string___Object___inspect};
+ val_t variable[4];
+ struct WBT_ **closurevariable = NULL;
trace.prev = tracehead; tracehead = &trace;
- variable1 = ((string___Object___inspect_head_t)CALL( self,COLOR_string___Object___inspect_head))( self) /*Object::inspect_head*/;
- variable0 = variable1;
- ((string___String___add_t)CALL( variable0 /*r*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*r*/, TAG_Char('>')) /*String::add*/;
- variable0 = variable0 /*r*/;
- goto return_label40;
- return_label40: while(false);
+ 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 variable0;
+ return variable[1];
}
val_t string___Object___inspect_head(val_t self) {
- struct trace_t trace = {NULL, "string::Object::inspect_head (bin/../lib/standard//string.nit:349,2--353:30)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
+ 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;
- variable0 = NEW_string___String___init(); /*new String*/
- variable1 = NEW_string___String___with_native(BOX_NativeString("<"), TAG_Int(1)); /*new String*/
- variable2 = variable1;
- ((string___String___append_t)CALL(variable0,COLOR_abstract_collection___IndexedCollection___append))(variable0, variable2) /*String::append*/;
- variable3 = TAG_Int((int) self);
- variable3 = ((string___Int___to_hex_t)CALL(variable3,COLOR_string___Int___to_hex))(variable3) /*Int::to_hex*/;
- variable4 = variable3;
- ((string___String___append_t)CALL(variable0,COLOR_abstract_collection___IndexedCollection___append))(variable0, variable4) /*String::append*/;
- variable5 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable6 = variable5;
- ((string___String___append_t)CALL(variable0,COLOR_abstract_collection___IndexedCollection___append))(variable0, variable6) /*String::append*/;
- goto return_label41;
- return_label41: while(false);
+ 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 variable0;
+ return variable[1];
}
val_t string___Object___args(val_t self) {
- struct trace_t trace = {NULL, "string::Object::args (bin/../lib/standard//string.nit:356,2--358:17)"};
- val_t variable0;
+ struct trace_t trace = {NULL, NULL, 404, LOCATE_string___Object___args};
+ val_t variable[3];
+ struct WBT_ **closurevariable = NULL;
trace.prev = tracehead; tracehead = &trace;
- variable0 = (G_sys);
- variable0 = ((string___Sys___args_t)CALL(variable0,COLOR_string___Object___args))(variable0) /*Sys::args*/;
- goto return_label42;
- return_label42: while(false);
+ 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 variable0;
+ return variable[1];
}
val_t string___Bool___to_s(val_t self) {
- struct trace_t trace = {NULL, "string::Bool::to_s (bin/../lib/standard//string.nit:363,2--368:22)"};
- val_t variable0;
- static val_t once_value_variable0_44; static int once_bool_variable0_44;
- static val_t once_value_variable0_45; static int once_bool_variable0_45;
+ 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;
- if (UNTAG_Bool( self)) { /*if*/
- if (once_bool_variable0_44) variable0 = once_value_variable0_44;
+ 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 {
- variable0 = NEW_string___String___with_native(BOX_NativeString("true"), TAG_Int(4)); /*new String*/
- once_value_variable0_44 = variable0;
- once_bool_variable0_44 = true;
+ /* 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];
+ }
+ /* Register variable[2]: Result */
+ once_value_50 = variable[2];
+ once_bool_50 = true;
}
- goto return_label43;
+ /* Register variable[2]: Result */
+ variable[1] = variable[2];
+ goto return_label49;
} else { /*if*/
- if (once_bool_variable0_45) variable0 = once_value_variable0_45;
+ /* Register variable[2]: Once expression result */
+ if (once_bool_52) variable[2] = once_value_52;
else {
- variable0 = NEW_string___String___with_native(BOX_NativeString("false"), TAG_Int(5)); /*new String*/
- once_value_variable0_45 = variable0;
- once_bool_variable0_45 = true;
+ /* 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];
+ }
+ /* Register variable[2]: Result */
+ once_value_52 = variable[2];
+ once_bool_52 = true;
}
- goto return_label43;
+ /* Register variable[2]: Result */
+ variable[1] = variable[2];
+ goto return_label49;
}
- return_label43: while(false);
+ return_label49: while(false);
tracehead = trace.prev;
- return variable0;
+ return variable[1];
}
-void string___Int___fill_string(val_t self, val_t param0, val_t param1, val_t param2) {
- struct trace_t trace = {NULL, "string::Int::fill_string (bin/../lib/standard//string.nit:374,2--394:11)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
+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;
- variable0 = param0;
- variable1 = param1;
- variable2 = param2;
- variable3 = TAG_Int((int)0) /*decl variable n*/;
- variable4 = TAG_Bool(UNTAG_Int( self)<UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable4)) { /*if*/
- variable4 = TAG_Int(-UNTAG_Int( self));
- variable3 = variable4 /*n=*/;
- ((string___String_____braeq_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Map_____braeq))( variable0 /*s*/, TAG_Int(0), TAG_Char('-')) /*String::[]=*/;
+ 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];
+}
+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*/
- variable4 = TAG_Bool(( self)==( TAG_Int(0)));
- if (UNTAG_Bool(variable4)) { /*if*/
- ((string___String_____braeq_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Map_____braeq))( variable0 /*s*/, TAG_Int(0), TAG_Char('0')) /*String::[]=*/;
- goto return_label46;
+ /* 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*/
- variable3 = self /*n=*/;
+ variable[5] = variable[0] /*n=*/;
}
}
- variable5 = ((kernel___Int___digit_count_t)CALL( self,COLOR_kernel___Int___digit_count))( self, variable1 /*base*/) /*Int::digit_count*/;
- variable5 = TAG_Int(UNTAG_Int(variable5)-UNTAG_Int( TAG_Int(1)));
- variable4 = variable5;
+ /* 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*/
- variable5 = TAG_Bool(UNTAG_Int( variable4 /*pos*/)>=UNTAG_Int( TAG_Int(0)));
- variable6 = variable5;
- if (UNTAG_Bool(variable6)) { /* and */
- variable6 = TAG_Bool(UNTAG_Int( variable3 /*n*/)>UNTAG_Int( TAG_Int(0)));
+ /* 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)));
}
- variable5 = variable6;
- if (!UNTAG_Bool(variable5)) break; /* while*/
- variable5 = TAG_Int(UNTAG_Int( variable3 /*n*/)%UNTAG_Int( variable1 /*base*/));
- variable5 = ((kernel___Int___to_c_t)CALL(variable5,COLOR_kernel___Int___to_c))(variable5) /*Int::to_c*/;
- ((string___String_____braeq_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Map_____braeq))( variable0 /*s*/, variable4 /*pos*/, variable5) /*String::[]=*/;
- variable5 = TAG_Int(UNTAG_Int( variable3 /*n*/)/UNTAG_Int( variable1 /*base*/));
- variable3 = variable5 /*n=*/;
- variable4 = TAG_Int(UNTAG_Int(variable4)-UNTAG_Int( TAG_Int(1))) /*pos*/;
- continue_47: while(0);
+ /* 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_47: while(0);
- return_label46: while(false);
+ break_56: while(0);
+ return_label55: while(false);
tracehead = trace.prev;
return;
}
-val_t string___Int___to_s(val_t self) {
- struct trace_t trace = {NULL, "string::Int::to_s (bin/../lib/standard//string.nit:398,2--399:42)"};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ((string___Int___to_base_t)CALL( self,COLOR_string___Int___to_base))( self, TAG_Int(10), TAG_Bool(true)) /*Int::to_base*/;
- goto return_label48;
- return_label48: while(false);
- tracehead = trace.prev;
- return variable0;
-}
val_t string___Int___to_hex(val_t self) {
- struct trace_t trace = {NULL, "string::Int::to_hex (bin/../lib/standard//string.nit:401,2--402:47)"};
- val_t variable0;
+ 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;
- variable0 = ((string___Int___to_base_t)CALL( self,COLOR_string___Int___to_base))( self, TAG_Int(16), TAG_Bool(false)) /*Int::to_base*/;
- goto return_label49;
- return_label49: while(false);
+ 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 variable0;
+ return variable[1];
}
val_t string___Int___to_base(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, "string::Int::to_base (bin/../lib/standard//string.nit:404,2--410:10)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
+ 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;
- variable0 = param0;
- variable1 = param1;
- variable3 = ((kernel___Int___digit_count_t)CALL( self,COLOR_kernel___Int___digit_count))( self, variable0 /*base*/) /*Int::digit_count*/;
- variable2 = variable3;
- variable4 = NEW_string___String___filled_with( TAG_Char(' '), variable2 /*l*/); /*new String*/
- variable3 = variable4;
- ((string___Int___fill_string_t)CALL( self,COLOR_string___Int___fill_string))( self, variable3 /*s*/, variable0 /*base*/, variable1 /*signed*/) /*Int::fill_string*/;
- variable2 = variable3 /*s*/;
- goto return_label50;
- return_label50: while(false);
+ 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 variable2;
+ return variable[3];
}
val_t string___Float___to_s(val_t self) {
- struct trace_t trace = {NULL, "string::Float::to_s (bin/../lib/standard//string.nit:415,2--41)"};
- val_t variable0;
+ 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;
- variable0 = ((string___Float___to_precision_t)CALL( self,COLOR_string___Float___to_precision))( self, TAG_Int(6)) /*Float::to_precision*/;
- goto return_label51;
- return_label51: while(false);
+ 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 variable0;
+ return variable[1];
}
val_t string___Float___to_precision(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::Float::to_precision (bin/../lib/standard//string.nit:417,2--429:18)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
- val_t variable8;
- val_t variable9;
- val_t variable10;
- val_t variable11;
- val_t variable12;
+ 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;
- variable0 = param0;
- variable1 = TAG_Bool(( variable0 /*nb*/)==( TAG_Int(0)));
- if (UNTAG_Bool(variable1)) { /*if*/
- variable1 = TAG_Int((int)UNBOX_Float( self));
- variable1 = ((string___Int___to_s_t)CALL(variable1,COLOR_string___Object___to_s))(variable1) /*Int::to_s*/;
- goto return_label52;
+ 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;
}
- variable2 = TAG_Int((int)UNBOX_Float( self));
- variable1 = variable2;
- variable3 = BOX_Float(1.0);
- variable2 = variable3;
+ /* 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*/
- variable3 = TAG_Bool(UNTAG_Int( variable0 /*nb*/)>UNTAG_Int( TAG_Int(0)));
- if (!UNTAG_Bool(variable3)) break; /* while*/
- variable3 = BOX_Float(10.0);
- variable3 = BOX_Float(UNBOX_Float( variable2 /*dec*/)*UNBOX_Float(variable3));
- variable2 = variable3 /*dec=*/;
- variable0 = TAG_Int(UNTAG_Int(variable0)-UNTAG_Int( TAG_Int(1))) /*nb*/;
- continue_53: while(0);
+ /* 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];
}
- break_53: while(0);
- variable4 = BOX_Float((float)UNTAG_Int( variable1 /*i*/));
- variable4 = BOX_Float(UNBOX_Float( self)-UNBOX_Float(variable4));
- variable4 = BOX_Float(UNBOX_Float(variable4)*UNBOX_Float( variable2 /*dec*/));
- variable4 = TAG_Int((int)UNBOX_Float(variable4));
- variable3 = variable4;
- variable4 = NEW_string___String___init(); /*new String*/
- variable5 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable6 = variable5;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable6) /*String::append*/;
- variable7 = variable1 /*i*/;
- variable7 = ((string___String___to_s_t)CALL(variable7,COLOR_string___Object___to_s))(variable7) /*String::to_s*/;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable7) /*String::append*/;
- variable8 = NEW_string___String___with_native(BOX_NativeString("."), TAG_Int(1)); /*new String*/
- variable9 = variable8;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable9) /*String::append*/;
- variable10 = variable3 /*d*/;
- variable10 = ((string___String___to_s_t)CALL(variable10,COLOR_string___Object___to_s))(variable10) /*String::to_s*/;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable10) /*String::append*/;
- variable11 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable12 = variable11;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable12) /*String::append*/;
- variable1 = variable4;
- goto return_label52;
- return_label52: while(false);
+ /* 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 variable1;
+ return variable[2];
}
val_t string___Char___to_s(val_t self) {
- struct trace_t trace = {NULL, "string::Char::to_s (bin/../lib/standard//string.nit:434,2--438:10)"};
- val_t variable0;
- val_t variable1;
+ 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;
- variable1 = NEW_string___String___with_capacity( TAG_Int(1)); /*new String*/
- variable0 = variable1;
- ((string___String_____braeq_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Map_____braeq))( variable0 /*s*/, TAG_Int(0), self) /*String::[]=*/;
- variable0 = variable0 /*s*/;
- goto return_label54;
- return_label54: while(false);
+ 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 variable0;
+ return variable[1];
}
val_t string___Collection___to_s(val_t self) {
- struct trace_t trace = {NULL, "string::Collection::to_s (bin/../lib/standard//string.nit:443,2--448:10)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
+ 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;
- variable1 = NEW_string___String___init(); /*new String*/
- variable0 = variable1;
- variable1 = ((abstract_collection___Collection___iterator_t)CALL( self,COLOR_abstract_collection___Collection___iterator))( self) /*Collection::iterator*/;
+ 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*/
- variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*Iterator::item*/;
- variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2 /*e*/ == NIT_NULL /*null*/) || (( variable2 /*e*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable2 /*e*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable2 /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable2 /*e*/,COLOR_kernel___Object_____eqeq))( variable2 /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable3)) { /*if*/
- variable3 = ((string___Object___to_s_t)CALL( variable2 /*e*/,COLOR_string___Object___to_s))( variable2 /*e*/) /*Object::to_s*/;
- ((string___String___append_t)CALL( variable0 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable0 /*s*/, variable3) /*String::append*/;
+ /* 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*/;
}
- continue_56: while(0);
- ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*Iterator::next*/;
+ continue_68: while(0);
+ CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
}
- break_56: while(0);
- variable0 = variable0 /*s*/;
- goto return_label55;
- return_label55: while(false);
+ 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 variable0;
+ return variable[1];
}
val_t string___Collection___join(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::Collection::join (bin/../lib/standard//string.nit:451,2--471:10)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
+ 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;
- variable0 = param0;
- variable1 = ((abstract_collection___Collection___is_empty_t)CALL( self,COLOR_abstract_collection___Collection___is_empty))( self) /*Collection::is_empty*/;
- if (UNTAG_Bool(variable1)) { /*if*/
- variable1 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- goto return_label57;
+ 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;
}
- variable2 = NEW_string___String___init(); /*new String*/
- variable1 = variable2;
- variable3 = ((abstract_collection___Collection___iterator_t)CALL( self,COLOR_abstract_collection___Collection___iterator))( self) /*Collection::iterator*/;
- variable2 = variable3;
- variable4 = ((abstract_collection___Iterator___item_t)CALL( variable2 /*i*/,COLOR_abstract_collection___Iterator___item))( variable2 /*i*/) /*Iterator::item*/;
- variable3 = variable4;
- variable4 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable3 /*e*/ == NIT_NULL /*null*/) || (( variable3 /*e*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable3 /*e*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable3 /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable3 /*e*/,COLOR_kernel___Object_____eqeq))( variable3 /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable4)) { /*if*/
- variable4 = ((string___Object___to_s_t)CALL( variable3 /*e*/,COLOR_string___Object___to_s))( variable3 /*e*/) /*Object::to_s*/;
- ((string___String___append_t)CALL( variable1 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable1 /*s*/, variable4) /*String::append*/;
+ /* 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*/;
}
- ((abstract_collection___Iterator___next_t)CALL( variable2 /*i*/,COLOR_abstract_collection___Iterator___next))( variable2 /*i*/) /*Iterator::next*/;
+ CALL_abstract_collection___Iterator___next( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::next*/;
while (true) { /*while*/
- variable4 = ((abstract_collection___Iterator___is_ok_t)CALL( variable2 /*i*/,COLOR_abstract_collection___Iterator___is_ok))( variable2 /*i*/) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable4)) break; /* while*/
- ((string___String___append_t)CALL( variable1 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable1 /*s*/, variable0 /*sep*/) /*String::append*/;
- variable4 = ((abstract_collection___Iterator___item_t)CALL( variable2 /*i*/,COLOR_abstract_collection___Iterator___item))( variable2 /*i*/) /*Iterator::item*/;
- variable3 = variable4 /*e=*/;
- variable4 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable3 /*e*/ == NIT_NULL /*null*/) || (( variable3 /*e*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable3 /*e*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable3 /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable3 /*e*/,COLOR_kernel___Object_____eqeq))( variable3 /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable4)) { /*if*/
- variable4 = ((string___Object___to_s_t)CALL( variable3 /*e*/,COLOR_string___Object___to_s))( variable3 /*e*/) /*Object::to_s*/;
- ((string___String___append_t)CALL( variable1 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable1 /*s*/, variable4) /*String::append*/;
+ /* 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*/;
}
- ((abstract_collection___Iterator___next_t)CALL( variable2 /*i*/,COLOR_abstract_collection___Iterator___next))( variable2 /*i*/) /*Iterator::next*/;
- continue_58: while(0);
+ CALL_abstract_collection___Iterator___next( variable[4] /*i*/)( variable[4] /*i*/) /*Iterator::next*/;
+ continue_71: while(0);
}
- break_58: while(0);
- variable1 = variable1 /*s*/;
- goto return_label57;
- return_label57: while(false);
+ 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___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 variable1;
+ return variable[1];
}
val_t string___Map___map_join(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, "string::Map::map_join (bin/../lib/standard//string.nit:476,2--498:10)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
- val_t variable8;
- val_t variable9;
- val_t variable10;
- val_t variable11;
- val_t variable12;
- val_t variable13;
- val_t variable14;
- val_t variable15;
- val_t variable16;
- val_t variable17;
+ 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;
- variable0 = param0;
- variable1 = param1;
- variable2 = ((abstract_collection___Collection___is_empty_t)CALL( self,COLOR_abstract_collection___Collection___is_empty))( self) /*Map::is_empty*/;
- if (UNTAG_Bool(variable2)) { /*if*/
- variable2 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- goto return_label59;
+ 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];
+ }
+ /* Register variable[4]: Result */
+ variable[3] = variable[4];
+ goto return_label75;
}
- variable3 = NEW_string___String___init(); /*new String*/
- variable2 = variable3;
- variable4 = ((abstract_collection___Map___iterator_t)CALL( self,COLOR_abstract_collection___Collection___iterator))( self) /*Map::iterator*/;
- variable3 = variable4;
- variable5 = ((abstract_collection___MapIterator___key_t)CALL( variable3 /*i*/,COLOR_abstract_collection___MapIterator___key))( variable3 /*i*/) /*MapIterator::key*/;
- variable4 = variable5;
- variable6 = ((abstract_collection___Iterator___item_t)CALL( variable3 /*i*/,COLOR_abstract_collection___Iterator___item))( variable3 /*i*/) /*MapIterator::item*/;
- variable5 = variable6;
- variable6 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable5 /*e*/ == NIT_NULL /*null*/) || (( variable5 /*e*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable5 /*e*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable5 /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable5 /*e*/,COLOR_kernel___Object_____eqeq))( variable5 /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable6)) { /*if*/
- variable6 = NEW_string___String___init(); /*new String*/
- variable7 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable8 = variable7;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable8) /*String::append*/;
- variable9 = variable4 /*k*/;
- variable9 = ((string___String___to_s_t)CALL(variable9,COLOR_string___Object___to_s))(variable9) /*String::to_s*/;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable9) /*String::append*/;
- variable10 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable11 = variable10;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable11) /*String::append*/;
- variable12 = variable1 /*couple_sep*/;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable12) /*String::append*/;
- variable13 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable14 = variable13;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable14) /*String::append*/;
- variable15 = variable5 /*e*/;
- variable15 = ((string___String___to_s_t)CALL(variable15,COLOR_string___Object___to_s))(variable15) /*String::to_s*/;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable15) /*String::append*/;
- variable16 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable17 = variable16;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable17) /*String::append*/;
- ((string___String___append_t)CALL( variable2 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable2 /*s*/, variable6) /*String::append*/;
+ /* 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];
+ }
+ /* 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];
+ }
+ /* 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];
+ }
+ /* 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];
+ }
+ /* 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*/;
}
- ((abstract_collection___Iterator___next_t)CALL( variable3 /*i*/,COLOR_abstract_collection___Iterator___next))( variable3 /*i*/) /*MapIterator::next*/;
+ CALL_abstract_collection___Iterator___next( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::next*/;
while (true) { /*while*/
- variable6 = ((abstract_collection___Iterator___is_ok_t)CALL( variable3 /*i*/,COLOR_abstract_collection___Iterator___is_ok))( variable3 /*i*/) /*MapIterator::is_ok*/;
- if (!UNTAG_Bool(variable6)) break; /* while*/
- ((string___String___append_t)CALL( variable2 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable2 /*s*/, variable0 /*sep*/) /*String::append*/;
- variable6 = ((abstract_collection___MapIterator___key_t)CALL( variable3 /*i*/,COLOR_abstract_collection___MapIterator___key))( variable3 /*i*/) /*MapIterator::key*/;
- variable4 = variable6 /*k=*/;
- variable6 = ((abstract_collection___Iterator___item_t)CALL( variable3 /*i*/,COLOR_abstract_collection___Iterator___item))( variable3 /*i*/) /*MapIterator::item*/;
- variable5 = variable6 /*e=*/;
- variable6 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable5 /*e*/ == NIT_NULL /*null*/) || (( variable5 /*e*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable5 /*e*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable5 /*e*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable5 /*e*/,COLOR_kernel___Object_____eqeq))( variable5 /*e*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable6)) { /*if*/
- variable6 = NEW_string___String___init(); /*new String*/
- variable7 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable8 = variable7;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable8) /*String::append*/;
- variable9 = variable4 /*k*/;
- variable9 = ((string___String___to_s_t)CALL(variable9,COLOR_string___Object___to_s))(variable9) /*String::to_s*/;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable9) /*String::append*/;
- variable10 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable11 = variable10;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable11) /*String::append*/;
- variable12 = variable1 /*couple_sep*/;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable12) /*String::append*/;
- variable13 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable14 = variable13;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable14) /*String::append*/;
- variable15 = variable5 /*e*/;
- variable15 = ((string___String___to_s_t)CALL(variable15,COLOR_string___Object___to_s))(variable15) /*String::to_s*/;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable15) /*String::append*/;
- variable16 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable17 = variable16;
- ((string___String___append_t)CALL(variable6,COLOR_abstract_collection___IndexedCollection___append))(variable6, variable17) /*String::append*/;
- ((string___String___append_t)CALL( variable2 /*s*/,COLOR_abstract_collection___IndexedCollection___append))( variable2 /*s*/, variable6) /*String::append*/;
+ /* 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];
+ }
+ /* 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];
+ }
+ /* 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];
+ }
+ /* 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];
+ }
+ /* 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*/;
}
- ((abstract_collection___Iterator___next_t)CALL( variable3 /*i*/,COLOR_abstract_collection___Iterator___next))( variable3 /*i*/) /*MapIterator::next*/;
- continue_60: while(0);
+ CALL_abstract_collection___Iterator___next( variable[5] /*i*/)( variable[5] /*i*/) /*Iterator::next*/;
+ continue_81: while(0);
}
- break_60: while(0);
- variable2 = variable2 /*s*/;
- goto return_label59;
- return_label59: while(false);
+ 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 variable2;
+ return variable[3];
}
val_t string___NativeString_____bra(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::NativeString::[] (bin/../lib/standard//string.nit:508,2--26)"};
+ 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)]);
}
void string___NativeString_____braeq(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, "string::NativeString::[]= (bin/../lib/standard//string.nit:509,2--32)"};
+ 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;
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, "string::NativeString::copy_to (bin/../lib/standard//string.nit:510,2--65)"};
+ 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;
return;
}
val_t string___NativeString___cstring_length(val_t self) {
- struct trace_t trace = {NULL, "string::NativeString::cstring_length (bin/../lib/standard//string.nit:512,2--517:10)"};
- val_t variable0;
- val_t variable1;
+ 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;
- variable0 = TAG_Int(0);
+ 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*/
- variable1 = TAG_Char(UNBOX_NativeString( self)[UNTAG_Int( variable0 /*l*/)]);
- variable1 = TAG_Bool((variable1)!=( TAG_Char('\0')));
- if (!UNTAG_Bool(variable1)) break; /* while*/
- variable0 = TAG_Int(UNTAG_Int(variable0)+UNTAG_Int( TAG_Int(1))) /*l*/;
- continue_62: while(0);
+ /* 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_62: while(0);
- variable0 = variable0 /*l*/;
- goto return_label61;
- return_label61: while(false);
+ break_87: while(0);
+ variable[1] = variable[2] /*l*/;
+ goto return_label86;
+ return_label86: while(false);
tracehead = trace.prev;
- return variable0;
+ return variable[1];
}
val_t string___NativeString___atoi(val_t self) {
- struct trace_t trace = {NULL, "string::NativeString::atoi (bin/../lib/standard//string.nit:519,2--15)"};
+ 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)));
}
+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;
+ return;
+}
val_t string___StringCapable___calloc_string(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::StringCapable::calloc_string (bin/../lib/standard//string.nit:524,2--54)"};
+ 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))));
}
+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;
+ return;
+}
val_t string___Sys___args(val_t self) {
- struct trace_t trace = {NULL, "string::Sys::args (bin/../lib/standard//string.nit:530,2--533:20)"};
- val_t variable0;
+ struct trace_t trace = {NULL, NULL, 594, LOCATE_string___Sys___args};
+ val_t variable[3];
+ struct WBT_ **closurevariable = NULL;
trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_string___Sys____args_cache( self) /*Sys::_args_cache*/;
- variable0 = TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable0, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*IndexedCollection::==*/)))));
- if (UNTAG_Bool(variable0)) { /*if*/
- ((string___Sys___init_args_t)CALL( self,COLOR_string___Sys___init_args))( self) /*Sys::init_args*/;
+ 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*/;
}
- variable0 = ATTR_string___Sys____args_cache( self) /*Sys::_args_cache*/;
- goto return_label63;
- return_label63: while(false);
+ /* 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 variable0;
+ return variable[1];
}
val_t string___Sys___program_name(val_t self) {
- struct trace_t trace = {NULL, "string::Sys::program_name (bin/../lib/standard//string.nit:536,2--539:46)"};
- val_t variable0;
- val_t variable1;
+ 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;
- variable0 = ((string___Sys___native_argv_t)CALL( self,COLOR_string___Sys___native_argv))( self, TAG_Int(0)) /*Sys::native_argv*/;
- variable1 = NEW_string___String___from_cstring(variable0); /*new String*/
- variable0 = variable1;
- goto return_label64;
- return_label64: while(false);
+ 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 variable0;
+ return variable[1];
}
void string___Sys___init_args(val_t self) {
- struct trace_t trace = {NULL, "string::Sys::init_args (bin/../lib/standard//string.nit:542,2--552:20)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
+ 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;
- variable1 = ((string___Sys___native_argc_t)CALL( self,COLOR_string___Sys___native_argc))( self) /*Sys::native_argc*/;
- variable0 = variable1;
- variable2 = NEW_array___Array___with_capacity( TAG_Int(0)); /*new Array[String]*/
- variable1 = variable2;
- variable2 = TAG_Int(1);
+ 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*/
- variable3 = TAG_Bool(UNTAG_Int( variable2 /*i*/)<UNTAG_Int( variable0 /*argc*/));
- if (!UNTAG_Bool(variable3)) break; /* while*/
- variable3 = TAG_Int(UNTAG_Int( variable2 /*i*/)-UNTAG_Int( TAG_Int(1)));
- variable4 = ((string___Sys___native_argv_t)CALL( self,COLOR_string___Sys___native_argv))( self, variable2 /*i*/) /*Sys::native_argv*/;
- variable5 = NEW_string___String___from_cstring(variable4); /*new String*/
- variable4 = variable5;
- ((array___Array_____braeq_t)CALL( variable1 /*args*/,COLOR_abstract_collection___Map_____braeq))( variable1 /*args*/, variable3, variable4) /*Array::[]=*/;
- variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))) /*i*/;
- continue_66: while(0);
+ /* 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_66: while(0);
- ATTR_string___Sys____args_cache( self) /*Sys::_args_cache*/ = variable1 /*args*/;
+ break_91: while(0);
+ ATTR_string___Sys____args_cache(variable[0]) /*Sys::_args_cache*/ = variable[3] /*args*/;
+ return_label90: while(false);
tracehead = trace.prev;
return;
}
val_t string___Sys___native_argc(val_t self) {
- struct trace_t trace = {NULL, "string::Sys::native_argc (bin/../lib/standard//string.nit:555,2--71)"};
+ 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_argv(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "string::Sys::native_argv (bin/../lib/standard//string.nit:557,2--88)"};
+ 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)));
}