X-Git-Url: http://nitlanguage.org?ds=sidebyside diff --git a/c_src/file._sep.c b/c_src/file._sep.c index e4a00b4..b640037 100644 --- a/c_src/file._sep.c +++ b/c_src/file._sep.c @@ -3,40 +3,56 @@ void file___Object___printn(val_t self, val_t param0) { struct trace_t trace = {NULL, NULL, 25, LOCATE_file___Object___printn}; val_t variable[5]; - void **closurevariable = NULL; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; + /* Register variable[1]: Local variable */ /* check if pvft[INIT_TABLE_POS_IFStream].i]) return; - variable[3] = variable[0]; - ATTR_file___FStream____path(variable[3]) /*FStream::_path*/ = variable[1] /*path*/; - variable[3] = variable[0]; - ((stream___BufferedIStream___prepare_buffer_t)CALL(variable[3],COLOR_stream___BufferedIStream___prepare_buffer))(variable[3], TAG_Int(10)) /*BufferedIStream::prepare_buffer*/; - variable[3] = variable[0]; - variable[4] = variable[0]; - variable[5] = variable[0]; - variable[5] = ATTR_file___FStream____path(variable[5]) /*FStream::_path*/; - variable[5] = ((string___String___to_cstring_t)CALL(variable[5],COLOR_string___String___to_cstring))(variable[5]) /*String::to_cstring*/; - variable[4] = ((file___NativeFileCapable___io_open_read_t)CALL(variable[4],COLOR_file___NativeFileCapable___io_open_read))(variable[4], variable[5]) /*NativeFileCapable::io_open_read*/; - ATTR_file___FStream____file(variable[3]) /*FStream::_file*/ = variable[4]; - variable[3] = variable[0]; - variable[3] = ATTR_file___FStream____file(variable[3]) /*FStream::_file*/; - variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))(variable[3], NIT_NULL /*null*/) /*Object::==*/))))))); + /* Register variable[2]: Method return value and escape marker */ + ATTR_file___FStream____path(variable[0]) /*FStream::_path*/ = variable[1] /*path*/; + CALL_stream___BufferedIStream___prepare_buffer(variable[0])(variable[0], TAG_Int(10)) /*BufferedIStream::prepare_buffer*/; + /* Register variable[3]: Result */ + variable[3] = ATTR_file___FStream____path(variable[0]) /*FStream::_path*/; + /* Register variable[3]: Result */ + variable[3] = CALL_string___String___to_cstring(variable[3])(variable[3]) /*String::to_cstring*/; + /* Register variable[3]: Result */ + variable[3] = CALL_file___NativeFileCapable___io_open_read(variable[0])(variable[0], variable[3]) /*NativeFileCapable::io_open_read*/; + ATTR_file___FStream____file(variable[0]) /*FStream::_file*/ = variable[3]; + /* Register variable[3]: Result */ + variable[3] = ATTR_file___FStream____file(variable[0]) /*FStream::_file*/; + /* Register variable[3]: Result */ + variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], NIT_NULL /*null*/) /*Object::==*/))))))); if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", " 'cant_open_file' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_file___IFStream___open, LOCATE_file, 110); nit_exit(1);} - return_label14: while(false); + return_label15: while(false); init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_IFStream].i] = 1; tracehead = trace.prev; return; @@ -280,12 +330,14 @@ void file___IFStream___open(val_t self, val_t param0, int* init_table) { void file___IFStream___init(val_t self, int* init_table) { struct trace_t trace = {NULL, NULL, 113, LOCATE_file___IFStream___init}; val_t variable[2]; - void **closurevariable = NULL; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_IFStream].i]) return; - return_label15: while(false); + /* Register variable[1]: Method return value and escape marker */ + return_label16: while(false); init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_IFStream].i] = 1; tracehead = trace.prev; return; @@ -293,12 +345,14 @@ void file___IFStream___init(val_t self, int* init_table) { void file___IFStream___without_file(val_t self, int* init_table) { struct trace_t trace = {NULL, NULL, 114, LOCATE_file___IFStream___without_file}; val_t variable[2]; - void **closurevariable = NULL; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_IFStream].i]) return; - return_label16: while(false); + /* Register variable[1]: Method return value and escape marker */ + return_label17: while(false); init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_IFStream].i] = 1; tracehead = trace.prev; return; @@ -306,111 +360,150 @@ void file___IFStream___without_file(val_t self, int* init_table) { void file___OFStream___close(val_t self) { struct trace_t trace = {NULL, NULL, 131, LOCATE_file___OFStream___close}; val_t variable[4]; - void **closurevariable = NULL; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; - variable[3] = variable[0]; - variable[3] = ATTR_file___FStream____file(variable[3]) /*FStream::_file*/; - variable[3] = ((file___NativeFile___io_close_t)CALL(variable[3],COLOR_file___NativeFile___io_close))(variable[3]) /*NativeFile::io_close*/; + /* Register variable[1]: Method return value and escape marker */ + /* Register variable[2]: Local variable */ + /* Register variable[3]: Result */ + variable[3] = ATTR_file___FStream____file(variable[0]) /*FStream::_file*/; + /* Register variable[3]: Result */ + variable[3] = CALL_file___NativeFile___io_close(variable[3])(variable[3]) /*NativeFile::io_close*/; variable[2] = variable[3]; - variable[3] = variable[0]; - ATTR_file___OFStream____writable(variable[3]) /*OFStream::_writable*/ = TAG_Bool(false); - return_label17: while(false); + ATTR_file___OFStream____writable(variable[0]) /*OFStream::_writable*/ = TAG_Bool(false); + return_label18: while(false); tracehead = trace.prev; return; } void file___OFStream___write(val_t self, val_t param0) { struct trace_t trace = {NULL, NULL, 122, LOCATE_file___OFStream___write}; - val_t variable[6]; - void **closurevariable = NULL; + val_t variable[5]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; + /* Register variable[1]: Local variable */ variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ATTR_file___OFStream____writable(variable[3]) /*OFStream::_writable*/; + /* Register variable[2]: Method return value and escape marker */ + /* Register variable[3]: Result */ + variable[3] = ATTR_file___OFStream____writable(variable[0]) /*OFStream::_writable*/; if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_file___OFStream___write, LOCATE_file, 125); nit_exit(1);} - variable[3] = variable[0]; - variable[4] = ((string___String___to_cstring_t)CALL( variable[1] /*s*/,COLOR_string___String___to_cstring))( variable[1] /*s*/) /*String::to_cstring*/; - variable[5] = ((array___AbstractArray___length_t)CALL( variable[1] /*s*/,COLOR_abstract_collection___Collection___length))( variable[1] /*s*/) /*AbstractArray::length*/; - ((file___OFStream___write_native_t)CALL(variable[3],COLOR_file___OFStream___write_native))(variable[3], variable[4], variable[5]) /*OFStream::write_native*/; - return_label18: while(false); + /* Register variable[3]: Result */ + variable[3] = CALL_string___String___to_cstring( variable[1] /*s*/)( variable[1] /*s*/) /*String::to_cstring*/; + /* Register variable[4]: Result */ + variable[4] = CALL_abstract_collection___Collection___length( variable[1] /*s*/)( variable[1] /*s*/) /*AbstractArrayRead::length*/; + CALL_file___OFStream___write_native(variable[0])(variable[0], variable[3], variable[4]) /*OFStream::write_native*/; + return_label19: while(false); tracehead = trace.prev; return; } val_t file___OFStream___is_writable(val_t self) { struct trace_t trace = {NULL, NULL, 129, LOCATE_file___OFStream___is_writable}; val_t variable[3]; - void **closurevariable = NULL; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; - variable[2] = variable[0]; - variable[2] = ATTR_file___OFStream____writable(variable[2]) /*OFStream::_writable*/; + /* Register variable[1]: Method return value and escape marker */ + /* Register variable[2]: Result */ + variable[2] = ATTR_file___OFStream____writable(variable[0]) /*OFStream::_writable*/; variable[1] = variable[2]; - goto return_label19; - return_label19: while(false); + goto return_label20; + return_label20: while(false); tracehead = trace.prev; return variable[1]; } void file___OFStream___write_native(val_t self, val_t param0, val_t param1) { struct trace_t trace = {NULL, NULL, 140, LOCATE_file___OFStream___write_native}; - val_t variable[10]; - void **closurevariable = NULL; + static val_t once_value_22 = NIT_NULL; /* Once value for string variable[6]*/ + static val_t once_value_23 = NIT_NULL; /* Once value for string variable[7]*/ + static val_t once_value_24 = NIT_NULL; /* Once value for string variable[8]*/ + val_t variable[9]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; + /* Register variable[1]: Local variable */ variable[1] = param0; + /* Register variable[2]: Local variable */ variable[2] = param1; - variable[4] = variable[0]; - variable[4] = ATTR_file___OFStream____writable(variable[4]) /*OFStream::_writable*/; + /* Register variable[3]: Method return value and escape marker */ + /* Register variable[4]: Result */ + variable[4] = ATTR_file___OFStream____writable(variable[0]) /*OFStream::_writable*/; if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_file___OFStream___write_native, LOCATE_file, 143); nit_exit(1);} - variable[5] = variable[0]; - variable[5] = ATTR_file___FStream____file(variable[5]) /*FStream::_file*/; - variable[5] = ((file___NativeFile___io_write_t)CALL(variable[5],COLOR_file___NativeFile___io_write))(variable[5], variable[1] /*native*/, variable[2] /*len*/) /*NativeFile::io_write*/; + /* Register variable[4]: Local variable */ + /* Register variable[5]: Result */ + variable[5] = ATTR_file___FStream____file(variable[0]) /*FStream::_file*/; + /* Register variable[5]: Result */ + variable[5] = CALL_file___NativeFile___io_write(variable[5])(variable[5], variable[1] /*native*/, variable[2] /*len*/) /*NativeFile::io_write*/; variable[4] = variable[5]; + /* Register variable[5]: Result */ variable[5] = TAG_Bool(( variable[4] /*err*/)!=( variable[2] /*len*/)); if (UNTAG_Bool(variable[5])) { /*if*/ - variable[5] = variable[0]; - variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(5)); /*new Array[Object]*/ - variable[7] = NEW_String_string___String___with_native(BOX_NativeString("Problem in writing : "), TAG_Int(21)); /*new String*/ - ((array___AbstractArray___add_t)CALL(variable[6],COLOR_abstract_collection___SimpleCollection___add))(variable[6], variable[7]) /*AbstractArray::add*/; - ((array___AbstractArray___add_t)CALL(variable[6],COLOR_abstract_collection___SimpleCollection___add))(variable[6], variable[4] /*err*/) /*AbstractArray::add*/; - variable[8] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)); /*new String*/ - ((array___AbstractArray___add_t)CALL(variable[6],COLOR_abstract_collection___SimpleCollection___add))(variable[6], variable[8]) /*AbstractArray::add*/; - ((array___AbstractArray___add_t)CALL(variable[6],COLOR_abstract_collection___SimpleCollection___add))(variable[6], variable[2] /*len*/) /*AbstractArray::add*/; - variable[9] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/ - ((array___AbstractArray___add_t)CALL(variable[6],COLOR_abstract_collection___SimpleCollection___add))(variable[6], variable[9]) /*AbstractArray::add*/; - ((file___Object___printn_t)CALL(variable[5],COLOR_file___Object___printn))(variable[5], variable[6]) /*Object::printn*/; + variable[5] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[Object]*/ /* Ensure var: Literal array*/; + /* Register variable[6]: Once String constant */ + if (once_value_22 != NIT_NULL) variable[6] = once_value_22; + else { + variable[6] = NEW_String_string___String___with_native(BOX_NativeString("Problem in writing : "), TAG_Int(21)) /*new String*/; + once_value_22 = variable[6]; + } + /* Register variable[6]: Result */ + CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[6]) /*AbstractArray::add*/; + CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[4] /*err*/) /*AbstractArray::add*/; + /* Register variable[7]: Once String constant */ + if (once_value_23 != NIT_NULL) variable[7] = once_value_23; + else { + variable[7] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)) /*new String*/; + once_value_23 = variable[7]; + } + /* Register variable[7]: Result */ + CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[7]) /*AbstractArray::add*/; + CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[2] /*len*/) /*AbstractArray::add*/; + /* Register variable[8]: Once String constant */ + if (once_value_24 != NIT_NULL) variable[8] = once_value_24; + else { + variable[8] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)) /*new String*/; + once_value_24 = variable[8]; + } + /* Register variable[8]: Result */ + CALL_abstract_collection___SimpleCollection___add(variable[5])(variable[5], variable[8]) /*AbstractArray::add*/; + /* Register variable[5]: Result */ + CALL_file___Object___printn(variable[0])(variable[0], variable[5]) /*Object::printn*/; } - return_label20: while(false); + return_label21: while(false); tracehead = trace.prev; return; } void file___OFStream___open(val_t self, val_t param0, int* init_table) { struct trace_t trace = {NULL, NULL, 151, LOCATE_file___OFStream___open}; - val_t variable[6]; - void **closurevariable = NULL; + val_t variable[4]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* 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_OFStream].i]) return; - variable[3] = variable[0]; - variable[4] = variable[0]; - variable[5] = ((string___String___to_cstring_t)CALL( variable[1] /*path*/,COLOR_string___String___to_cstring))( variable[1] /*path*/) /*String::to_cstring*/; - variable[4] = ((file___NativeFileCapable___io_open_write_t)CALL(variable[4],COLOR_file___NativeFileCapable___io_open_write))(variable[4], variable[5]) /*NativeFileCapable::io_open_write*/; - ATTR_file___FStream____file(variable[3]) /*FStream::_file*/ = variable[4]; - variable[3] = variable[0]; - variable[3] = ATTR_file___FStream____file(variable[3]) /*FStream::_file*/; - variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable[3],COLOR_kernel___Object_____eqeq))(variable[3], NIT_NULL /*null*/) /*Object::==*/))))))); + /* Register variable[2]: Method return value and escape marker */ + /* Register variable[3]: Result */ + variable[3] = CALL_string___String___to_cstring( variable[1] /*path*/)( variable[1] /*path*/) /*String::to_cstring*/; + /* Register variable[3]: Result */ + variable[3] = CALL_file___NativeFileCapable___io_open_write(variable[0])(variable[0], variable[3]) /*NativeFileCapable::io_open_write*/; + ATTR_file___FStream____file(variable[0]) /*FStream::_file*/ = variable[3]; + /* Register variable[3]: Result */ + variable[3] = ATTR_file___FStream____file(variable[0]) /*FStream::_file*/; + /* Register variable[3]: Result */ + variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], NIT_NULL /*null*/) /*Object::==*/))))))); if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", " 'cant_open_file' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_file___OFStream___open, LOCATE_file, 155); nit_exit(1);} - variable[3] = variable[0]; - ATTR_file___FStream____path(variable[3]) /*FStream::_path*/ = variable[1] /*path*/; - variable[3] = variable[0]; - ATTR_file___OFStream____writable(variable[3]) /*OFStream::_writable*/ = TAG_Bool(true); - return_label21: while(false); + ATTR_file___FStream____path(variable[0]) /*FStream::_path*/ = variable[1] /*path*/; + ATTR_file___OFStream____writable(variable[0]) /*OFStream::_writable*/ = TAG_Bool(true); + return_label25: while(false); init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OFStream].i] = 1; tracehead = trace.prev; return; @@ -418,12 +511,14 @@ void file___OFStream___open(val_t self, val_t param0, int* init_table) { void file___OFStream___init(val_t self, int* init_table) { struct trace_t trace = {NULL, NULL, 160, LOCATE_file___OFStream___init}; val_t variable[2]; - void **closurevariable = NULL; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OFStream].i]) return; - return_label22: while(false); + /* Register variable[1]: Method return value and escape marker */ + return_label26: while(false); init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OFStream].i] = 1; tracehead = trace.prev; return; @@ -431,81 +526,101 @@ void file___OFStream___init(val_t self, int* init_table) { void file___OFStream___without_file(val_t self, int* init_table) { struct trace_t trace = {NULL, NULL, 161, LOCATE_file___OFStream___without_file}; val_t variable[2]; - void **closurevariable = NULL; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OFStream].i]) return; - return_label23: while(false); + /* Register variable[1]: Method return value and escape marker */ + return_label27: while(false); init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OFStream].i] = 1; tracehead = trace.prev; return; } void file___Stdin___init(val_t self, int* init_table) { struct trace_t trace = {NULL, NULL, 168, LOCATE_file___Stdin___init}; - val_t variable[4]; - void **closurevariable = NULL; + static val_t once_value_29 = NIT_NULL; /* Once value for string variable[2]*/ + val_t variable[3]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Stdin].i]) return; - ((file___IFStream___init_t)CALL(variable[0],COLOR_file___IFStream___init))(variable[0], init_table /*YYY*/) /*IFStream::init*/; - variable[2] = variable[0]; - variable[3] = variable[0]; - variable[3] = ((file___NativeFileCapable___native_stdin_t)CALL(variable[3],COLOR_file___NativeFileCapable___native_stdin))(variable[3]) /*NativeFileCapable::native_stdin*/; - ATTR_file___FStream____file(variable[2]) /*FStream::_file*/ = variable[3]; - variable[2] = variable[0]; - variable[3] = NEW_String_string___String___with_native(BOX_NativeString("/dev/stdin"), TAG_Int(10)); /*new String*/ - ATTR_file___FStream____path(variable[2]) /*FStream::_path*/ = variable[3]; - variable[2] = variable[0]; - ((stream___BufferedIStream___prepare_buffer_t)CALL(variable[2],COLOR_stream___BufferedIStream___prepare_buffer))(variable[2], TAG_Int(1)) /*BufferedIStream::prepare_buffer*/; - return_label24: while(false); + /* Register variable[1]: Method return value and escape marker */ + CALL_file___IFStream___init(variable[0])(variable[0], init_table /*YYY*/) /*IFStream::init*/; + /* Register variable[2]: Result */ + variable[2] = CALL_file___NativeFileCapable___native_stdin(variable[0])(variable[0]) /*NativeFileCapable::native_stdin*/; + ATTR_file___FStream____file(variable[0]) /*FStream::_file*/ = variable[2]; + /* Register variable[2]: Once String constant */ + if (once_value_29 != NIT_NULL) variable[2] = once_value_29; + else { + variable[2] = NEW_String_string___String___with_native(BOX_NativeString("/dev/stdin"), TAG_Int(10)) /*new String*/; + once_value_29 = variable[2]; + } + /* Register variable[2]: Result */ + ATTR_file___FStream____path(variable[0]) /*FStream::_path*/ = variable[2]; + CALL_stream___BufferedIStream___prepare_buffer(variable[0])(variable[0], TAG_Int(1)) /*BufferedIStream::prepare_buffer*/; + return_label28: while(false); init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Stdin].i] = 1; tracehead = trace.prev; return; } void file___Stdout___init(val_t self, int* init_table) { struct trace_t trace = {NULL, NULL, 177, LOCATE_file___Stdout___init}; - val_t variable[4]; - void **closurevariable = NULL; + static val_t once_value_31 = NIT_NULL; /* Once value for string variable[2]*/ + val_t variable[3]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Stdout].i]) return; - ((file___OFStream___init_t)CALL(variable[0],COLOR_file___OFStream___init))(variable[0], init_table /*YYY*/) /*OFStream::init*/; - variable[2] = variable[0]; - variable[3] = variable[0]; - variable[3] = ((file___NativeFileCapable___native_stdout_t)CALL(variable[3],COLOR_file___NativeFileCapable___native_stdout))(variable[3]) /*NativeFileCapable::native_stdout*/; - ATTR_file___FStream____file(variable[2]) /*FStream::_file*/ = variable[3]; - variable[2] = variable[0]; - variable[3] = NEW_String_string___String___with_native(BOX_NativeString("/dev/stdout"), TAG_Int(11)); /*new String*/ - ATTR_file___FStream____path(variable[2]) /*FStream::_path*/ = variable[3]; - variable[2] = variable[0]; - ATTR_file___OFStream____writable(variable[2]) /*OFStream::_writable*/ = TAG_Bool(true); - return_label25: while(false); + /* Register variable[1]: Method return value and escape marker */ + CALL_file___OFStream___init(variable[0])(variable[0], init_table /*YYY*/) /*OFStream::init*/; + /* Register variable[2]: Result */ + variable[2] = CALL_file___NativeFileCapable___native_stdout(variable[0])(variable[0]) /*NativeFileCapable::native_stdout*/; + ATTR_file___FStream____file(variable[0]) /*FStream::_file*/ = variable[2]; + /* Register variable[2]: Once String constant */ + if (once_value_31 != NIT_NULL) variable[2] = once_value_31; + else { + variable[2] = NEW_String_string___String___with_native(BOX_NativeString("/dev/stdout"), TAG_Int(11)) /*new String*/; + once_value_31 = variable[2]; + } + /* Register variable[2]: Result */ + ATTR_file___FStream____path(variable[0]) /*FStream::_path*/ = variable[2]; + ATTR_file___OFStream____writable(variable[0]) /*OFStream::_writable*/ = TAG_Bool(true); + return_label30: while(false); init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Stdout].i] = 1; tracehead = trace.prev; return; } void file___Stderr___init(val_t self, int* init_table) { struct trace_t trace = {NULL, NULL, 186, LOCATE_file___Stderr___init}; - val_t variable[4]; - void **closurevariable = NULL; + static val_t once_value_33 = NIT_NULL; /* Once value for string variable[2]*/ + val_t variable[3]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Stderr].i]) return; - ((file___OFStream___init_t)CALL(variable[0],COLOR_file___OFStream___init))(variable[0], init_table /*YYY*/) /*OFStream::init*/; - variable[2] = variable[0]; - variable[3] = variable[0]; - variable[3] = ((file___NativeFileCapable___native_stderr_t)CALL(variable[3],COLOR_file___NativeFileCapable___native_stderr))(variable[3]) /*NativeFileCapable::native_stderr*/; - ATTR_file___FStream____file(variable[2]) /*FStream::_file*/ = variable[3]; - variable[2] = variable[0]; - variable[3] = NEW_String_string___String___with_native(BOX_NativeString("/dev/stderr"), TAG_Int(11)); /*new String*/ - ATTR_file___FStream____path(variable[2]) /*FStream::_path*/ = variable[3]; - variable[2] = variable[0]; - ATTR_file___OFStream____writable(variable[2]) /*OFStream::_writable*/ = TAG_Bool(true); - return_label26: while(false); + /* Register variable[1]: Method return value and escape marker */ + CALL_file___OFStream___init(variable[0])(variable[0], init_table /*YYY*/) /*OFStream::init*/; + /* Register variable[2]: Result */ + variable[2] = CALL_file___NativeFileCapable___native_stderr(variable[0])(variable[0]) /*NativeFileCapable::native_stderr*/; + ATTR_file___FStream____file(variable[0]) /*FStream::_file*/ = variable[2]; + /* Register variable[2]: Once String constant */ + if (once_value_33 != NIT_NULL) variable[2] = once_value_33; + else { + variable[2] = NEW_String_string___String___with_native(BOX_NativeString("/dev/stderr"), TAG_Int(11)) /*new String*/; + once_value_33 = variable[2]; + } + /* Register variable[2]: Result */ + ATTR_file___FStream____path(variable[0]) /*FStream::_path*/ = variable[2]; + ATTR_file___OFStream____writable(variable[0]) /*OFStream::_writable*/ = TAG_Bool(true); + return_label32: while(false); init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Stderr].i] = 1; tracehead = trace.prev; return; @@ -513,229 +628,303 @@ void file___Stderr___init(val_t self, int* init_table) { val_t file___String___file_exists(val_t self) { struct trace_t trace = {NULL, NULL, 196, LOCATE_file___String___file_exists}; val_t variable[3]; - void **closurevariable = NULL; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; - variable[2] = variable[0]; - variable[2] = ((string___String___to_cstring_t)CALL(variable[2],COLOR_string___String___to_cstring))(variable[2]) /*String::to_cstring*/; - variable[2] = ((file___NativeString___file_exists_t)CALL(variable[2],COLOR_file___NativeString___file_exists))(variable[2]) /*NativeString::file_exists*/; + /* Register variable[1]: Method return value and escape marker */ + /* Register variable[2]: Result */ + variable[2] = CALL_string___String___to_cstring(variable[0])(variable[0]) /*String::to_cstring*/; + /* Register variable[2]: Result */ + variable[2] = CALL_file___NativeString___file_exists(variable[2])(variable[2]) /*NativeString::file_exists*/; variable[1] = variable[2]; - goto return_label27; - return_label27: while(false); + goto return_label34; + return_label34: while(false); tracehead = trace.prev; return variable[1]; } val_t file___String___file_stat(val_t self) { struct trace_t trace = {NULL, NULL, 199, LOCATE_file___String___file_stat}; val_t variable[3]; - void **closurevariable = NULL; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; - variable[2] = variable[0]; - variable[2] = ((string___String___to_cstring_t)CALL(variable[2],COLOR_string___String___to_cstring))(variable[2]) /*String::to_cstring*/; - variable[2] = ((file___NativeString___file_stat_t)CALL(variable[2],COLOR_file___NativeString___file_stat))(variable[2]) /*NativeString::file_stat*/; + /* Register variable[1]: Method return value and escape marker */ + /* Register variable[2]: Result */ + variable[2] = CALL_string___String___to_cstring(variable[0])(variable[0]) /*String::to_cstring*/; + /* Register variable[2]: Result */ + variable[2] = CALL_file___NativeString___file_stat(variable[2])(variable[2]) /*NativeString::file_stat*/; variable[1] = variable[2]; - goto return_label28; - return_label28: while(false); + goto return_label35; + return_label35: while(false); tracehead = trace.prev; return variable[1]; } val_t file___String___file_delete(val_t self) { struct trace_t trace = {NULL, NULL, 201, LOCATE_file___String___file_delete}; val_t variable[3]; - void **closurevariable = NULL; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; - variable[2] = variable[0]; - variable[2] = ((string___String___to_cstring_t)CALL(variable[2],COLOR_string___String___to_cstring))(variable[2]) /*String::to_cstring*/; - variable[2] = ((file___NativeString___file_delete_t)CALL(variable[2],COLOR_file___NativeString___file_delete))(variable[2]) /*NativeString::file_delete*/; + /* Register variable[1]: Method return value and escape marker */ + /* Register variable[2]: Result */ + variable[2] = CALL_string___String___to_cstring(variable[0])(variable[0]) /*String::to_cstring*/; + /* Register variable[2]: Result */ + variable[2] = CALL_file___NativeString___file_delete(variable[2])(variable[2]) /*NativeString::file_delete*/; variable[1] = variable[2]; - goto return_label29; - return_label29: while(false); + goto return_label36; + return_label36: while(false); tracehead = trace.prev; return variable[1]; } val_t file___String___strip_extension(val_t self, val_t param0) { struct trace_t trace = {NULL, NULL, 203, LOCATE_file___String___strip_extension}; - val_t variable[6]; - void **closurevariable = NULL; + val_t variable[5]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; + /* Register variable[1]: Local variable */ variable[1] = param0; - variable[3] = variable[0]; - variable[3] = ((string___String___has_suffix_t)CALL(variable[3],COLOR_string___String___has_suffix))(variable[3], variable[1] /*ext*/) /*String::has_suffix*/; + /* Register variable[2]: Method return value and escape marker */ + /* Register variable[3]: Result */ + variable[3] = CALL_string___AbstractString___has_suffix(variable[0])(variable[0], variable[1] /*ext*/) /*AbstractString::has_suffix*/; if (UNTAG_Bool(variable[3])) { /*if*/ - variable[3] = variable[0]; - variable[4] = variable[0]; - variable[4] = ((array___AbstractArray___length_t)CALL(variable[4],COLOR_abstract_collection___Collection___length))(variable[4]) /*AbstractArray::length*/; - variable[5] = ((array___AbstractArray___length_t)CALL( variable[1] /*ext*/,COLOR_abstract_collection___Collection___length))( variable[1] /*ext*/) /*AbstractArray::length*/; - variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int(variable[5])); - variable[3] = ((string___String___substring_t)CALL(variable[3],COLOR_string___String___substring))(variable[3], TAG_Int(0), variable[4]) /*String::substring*/; + /* 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] /*ext*/)( variable[1] /*ext*/) /*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___substring(variable[0])(variable[0], TAG_Int(0), variable[3]) /*AbstractString::substring*/; variable[2] = variable[3]; - goto return_label30; + goto return_label37; } - variable[3] = variable[0]; - variable[2] = variable[3]; - goto return_label30; - return_label30: while(false); + variable[2] = variable[0]; + goto return_label37; + return_label37: while(false); tracehead = trace.prev; return variable[2]; } val_t file___String___basename(val_t self, val_t param0) { struct trace_t trace = {NULL, NULL, 211, LOCATE_file___String___basename}; - val_t variable[7]; - void **closurevariable = NULL; + val_t variable[6]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; + /* Register variable[1]: Local variable */ variable[1] = param0; - variable[4] = variable[0]; - variable[5] = variable[0]; - variable[5] = ATTR_array___AbstractArray____length(variable[5]) /*AbstractArray::_length*/; - variable[5] = TAG_Int(UNTAG_Int(variable[5])-UNTAG_Int( TAG_Int(1))); - variable[4] = ((array___AbstractArray___last_index_of_from_t)CALL(variable[4],COLOR_array___AbstractArray___last_index_of_from))(variable[4], TAG_Char('/'), variable[5]) /*AbstractArray::last_index_of_from*/; + /* Register variable[2]: Method return value and escape marker */ + /* Register variable[3]: Local variable */ + /* Register variable[4]: Result */ + variable[4] = ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/; + /* Register variable[4]: Result */ + variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int( TAG_Int(1))); + /* Register variable[4]: Result */ + variable[4] = CALL_array___AbstractArrayRead___last_index_of_from(variable[0])(variable[0], TAG_Char('/'), variable[4]) /*AbstractArrayRead::last_index_of_from*/; variable[3] = variable[4]; - variable[5] = variable[0]; - variable[4] = variable[5]; + /* Register variable[4]: Local variable */ + variable[4] = variable[0]; + /* Register variable[5]: Result */ variable[5] = TAG_Bool(UNTAG_Int( variable[3] /*pos*/)>=UNTAG_Int( TAG_Int(0))); if (UNTAG_Bool(variable[5])) { /*if*/ - variable[5] = variable[0]; - variable[6] = TAG_Int(UNTAG_Int( variable[3] /*pos*/)+UNTAG_Int( TAG_Int(1))); - variable[5] = ((string___String___substring_from_t)CALL(variable[5],COLOR_string___String___substring_from))(variable[5], variable[6]) /*String::substring_from*/; + /* Register variable[5]: Result */ + variable[5] = TAG_Int(UNTAG_Int( variable[3] /*pos*/)+UNTAG_Int( TAG_Int(1))); + /* Register variable[5]: Result */ + variable[5] = CALL_string___AbstractString___substring_from(variable[0])(variable[0], variable[5]) /*AbstractString::substring_from*/; variable[4] = variable[5] /*n=*/; } - variable[5] = ((file___String___strip_extension_t)CALL( variable[4] /*n*/,COLOR_file___String___strip_extension))( variable[4] /*n*/, variable[1] /*ext*/) /*String::strip_extension*/; + /* Register variable[5]: Result */ + variable[5] = CALL_file___String___strip_extension( variable[4] /*n*/)( variable[4] /*n*/, variable[1] /*ext*/) /*String::strip_extension*/; variable[2] = variable[5]; - goto return_label31; - return_label31: while(false); + goto return_label38; + return_label38: while(false); tracehead = trace.prev; return variable[2]; } val_t file___String___dirname(val_t self) { struct trace_t trace = {NULL, NULL, 221, LOCATE_file___String___dirname}; - val_t variable[5]; - void **closurevariable = NULL; + static val_t once_value_40 = NIT_NULL; /* Once value for string variable[3]*/ + val_t variable[4]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; - variable[3] = variable[0]; - variable[4] = variable[0]; - variable[4] = ATTR_array___AbstractArray____length(variable[4]) /*AbstractArray::_length*/; - variable[4] = TAG_Int(UNTAG_Int(variable[4])-UNTAG_Int( TAG_Int(1))); - variable[3] = ((array___AbstractArray___last_index_of_from_t)CALL(variable[3],COLOR_array___AbstractArray___last_index_of_from))(variable[3], TAG_Char('/'), variable[4]) /*AbstractArray::last_index_of_from*/; + /* Register variable[1]: Method return value and escape marker */ + /* Register variable[2]: Local variable */ + /* Register variable[3]: Result */ + variable[3] = ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/; + /* Register variable[3]: Result */ + variable[3] = TAG_Int(UNTAG_Int(variable[3])-UNTAG_Int( TAG_Int(1))); + /* Register variable[3]: Result */ + variable[3] = CALL_array___AbstractArrayRead___last_index_of_from(variable[0])(variable[0], TAG_Char('/'), variable[3]) /*AbstractArrayRead::last_index_of_from*/; variable[2] = variable[3]; + /* Register variable[3]: Result */ variable[3] = TAG_Bool(UNTAG_Int( variable[2] /*pos*/)>=UNTAG_Int( TAG_Int(0))); if (UNTAG_Bool(variable[3])) { /*if*/ - variable[3] = variable[0]; - variable[3] = ((string___String___substring_t)CALL(variable[3],COLOR_string___String___substring))(variable[3], TAG_Int(0), variable[2] /*pos*/) /*String::substring*/; + /* Register variable[3]: Result */ + variable[3] = CALL_string___AbstractString___substring(variable[0])(variable[0], TAG_Int(0), variable[2] /*pos*/) /*AbstractString::substring*/; variable[1] = variable[3]; - goto return_label32; + goto return_label39; } else { /*if*/ - variable[3] = NEW_String_string___String___with_native(BOX_NativeString("."), TAG_Int(1)); /*new String*/ + /* Register variable[3]: Once String constant */ + if (once_value_40 != NIT_NULL) variable[3] = once_value_40; + else { + variable[3] = NEW_String_string___String___with_native(BOX_NativeString("."), TAG_Int(1)) /*new String*/; + once_value_40 = variable[3]; + } + /* Register variable[3]: Result */ variable[1] = variable[3]; - goto return_label32; + goto return_label39; } - return_label32: while(false); + return_label39: while(false); tracehead = trace.prev; return variable[1]; } val_t file___String___file_path(val_t self) { struct trace_t trace = {NULL, NULL, 231, LOCATE_file___String___file_path}; - val_t variable[6]; - void **closurevariable = NULL; + static val_t once_value_42 = NIT_NULL; /* Once value for string variable[4]*/ + val_t variable[5]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; - variable[3] = variable[0]; - variable[3] = ATTR_array___AbstractArray____length(variable[3]) /*AbstractArray::_length*/; + /* Register variable[1]: Method return value and escape marker */ + /* Register variable[2]: Local variable */ + /* Register variable[3]: Result */ + variable[3] = ATTR_array___AbstractArrayRead____length(variable[0]) /*AbstractArrayRead::_length*/; variable[2] = variable[3]; - variable[4] = variable[0]; - variable[5] = TAG_Int(UNTAG_Int( variable[2] /*l*/)-UNTAG_Int( TAG_Int(1))); - variable[4] = ((array___AbstractArray___last_index_of_from_t)CALL(variable[4],COLOR_array___AbstractArray___last_index_of_from))(variable[4], TAG_Char('/'), variable[5]) /*AbstractArray::last_index_of_from*/; + /* 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] = CALL_array___AbstractArrayRead___last_index_of_from(variable[0])(variable[0], TAG_Char('/'), variable[4]) /*AbstractArrayRead::last_index_of_from*/; variable[3] = variable[4]; + /* Register variable[4]: Result */ variable[4] = TAG_Bool(UNTAG_Int( variable[3] /*pos*/)>=UNTAG_Int( TAG_Int(0))); if (UNTAG_Bool(variable[4])) { /*if*/ - variable[4] = variable[0]; - variable[4] = ((string___String___substring_t)CALL(variable[4],COLOR_string___String___substring))(variable[4], TAG_Int(0), variable[3] /*pos*/) /*String::substring*/; + /* Register variable[4]: Result */ + variable[4] = CALL_string___AbstractString___substring(variable[0])(variable[0], TAG_Int(0), variable[3] /*pos*/) /*AbstractString::substring*/; variable[1] = variable[4]; - goto return_label33; + goto return_label41; } - variable[4] = NEW_String_string___String___with_native(BOX_NativeString("."), TAG_Int(1)); /*new String*/ + /* Register variable[4]: Once String constant */ + if (once_value_42 != NIT_NULL) variable[4] = once_value_42; + else { + variable[4] = NEW_String_string___String___with_native(BOX_NativeString("."), TAG_Int(1)) /*new String*/; + once_value_42 = variable[4]; + } + /* Register variable[4]: Result */ variable[1] = variable[4]; - goto return_label33; - return_label33: while(false); + goto return_label41; + return_label41: while(false); tracehead = trace.prev; return variable[1]; } void file___String___mkdir(val_t self) { struct trace_t trace = {NULL, NULL, 241, LOCATE_file___String___mkdir}; - val_t variable[9]; - void **closurevariable = NULL; + static val_t once_value_44 = NIT_NULL; /* Once value for string variable[3]*/ + val_t variable[8]; + struct WBT_ **closurevariable = NULL; trace.prev = tracehead; tracehead = &trace; trace.file = LOCATE_file; + /* Register variable[0]: Local variable */ variable[0] = self; - variable[3] = variable[0]; - variable[4] = NEW_String_string___String___with_native(BOX_NativeString("/"), TAG_Int(1)); /*new String*/ - variable[3] = ((string_search___String___split_with_t)CALL(variable[3],COLOR_string_search___String___split_with))(variable[3], variable[4]) /*String::split_with*/; + /* Register variable[1]: Method return value and escape marker */ + /* Register variable[2]: Local variable */ + /* Register variable[3]: Once String constant */ + if (once_value_44 != NIT_NULL) variable[3] = once_value_44; + else { + variable[3] = NEW_String_string___String___with_native(BOX_NativeString("/"), TAG_Int(1)) /*new String*/; + once_value_44 = variable[3]; + } + /* Register variable[3]: Result */ + /* Register variable[3]: Result */ + variable[3] = CALL_string_search___String___split_with(variable[0])(variable[0], variable[3]) /*String::split_with*/; variable[2] = variable[3]; - variable[4] = NEW_String_string___String___init(); /*new String*/ + /* Register variable[3]: Local variable */ + /* Register variable[4]: Result */ + variable[4] = NEW_Buffer_string___Buffer___init() /*new Buffer*/; variable[3] = variable[4]; - variable[4] = ((array___AbstractArray___is_empty_t)CALL( variable[2] /*dirs*/,COLOR_abstract_collection___Collection___is_empty))( variable[2] /*dirs*/) /*AbstractArray::is_empty*/; + /* Register variable[4]: Result */ + variable[4] = CALL_abstract_collection___Collection___is_empty( variable[2] /*dirs*/)( variable[2] /*dirs*/) /*AbstractArrayRead::is_empty*/; if (UNTAG_Bool(variable[4])) { /*if*/ - goto return_label34; + goto return_label43; } + /* Register variable[4]: Local variable */ variable[4] = variable[2] /*dirs*/; + /* Register variable[5]: Local variable */ variable[5] = TAG_Int(0); + /* Register variable[6]: Method return value and escape marker */ + /* Register variable[7]: Result */ variable[7] = TAG_Bool(UNTAG_Int( variable[5] /*index*/)>=UNTAG_Int( TAG_Int(0))); - variable[8] = variable[7]; - if (UNTAG_Bool(variable[8])) { /* and */ - variable[8] = variable[4]; - variable[8] = ATTR_array___AbstractArray____length(variable[8]) /*AbstractArray::_length*/; - variable[8] = TAG_Bool(UNTAG_Int( variable[5] /*index*/)