/* This C file is generated by NIT to compile module file. */
#include "file._sep.h"
-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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- /* check if p<Array[Object] with p:Object */
- if (( param0!=NIT_NULL) && !VAL_ISA( param0, COLOR_Array, ID_Array)) { fprintf(stderr, "Cast failled"); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_file___Object___printn, LOCATE_file, 26); nit_exit(1); } /*cast Array[Object]*/;
- variable[1] = param0;
- variable[3] = variable[0];
- variable[3] = ((file___Object___stdout_t)CALL(variable[3],COLOR_file___Object___stdout))(variable[3]) /*Object::stdout*/;
- variable[4] = ((string___Collection___to_s_t)CALL( variable[1] /*objects*/,COLOR_string___Object___to_s))( variable[1] /*objects*/) /*Collection::to_s*/;
- ((file___OFStream___write_t)CALL(variable[3],COLOR_stream___OStream___write))(variable[3], variable[4]) /*OFStream::write*/;
- return_label0: while(false);
- tracehead = trace.prev;
+void file___Object___printn(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 25;
+ fra.me.meth = LOCATE_file___Object___printn;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[1], COLOR_Array, ID_Array)) /*cast Array[Object]*/;
+ /* ./../lib/standard//file.nit:25 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 25);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = CALL_file___Object___stdout(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/standard//file.nit:28 */
+ CALL_stream___OStream___write(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ stack_frame_head = fra.me.prev;
return;
}
-void file___Object___print(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 31, LOCATE_file___Object___print};
- val_t variable[5];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- variable[1] = param0;
- variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[1] /*object*/ == NIT_NULL /*null*/) || (( variable[1] /*object*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable[1] /*object*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[1] /*object*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable[1] /*object*/,COLOR_kernel___Object_____eqeq))( variable[1] /*object*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable[3])) { /*if*/
- variable[3] = variable[0];
- variable[3] = ((file___Object___stdout_t)CALL(variable[3],COLOR_file___Object___stdout))(variable[3]) /*Object::stdout*/;
- variable[4] = ((string___Object___to_s_t)CALL( variable[1] /*object*/,COLOR_string___Object___to_s))( variable[1] /*object*/) /*Object::to_s*/;
- ((file___OFStream___write_t)CALL(variable[3],COLOR_stream___OStream___write))(variable[3], variable[4]) /*OFStream::write*/;
- }
- variable[3] = variable[0];
- variable[3] = ((file___Object___stdout_t)CALL(variable[3],COLOR_file___Object___stdout))(variable[3]) /*Object::stdout*/;
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
- ((file___OFStream___write_t)CALL(variable[3],COLOR_stream___OStream___write))(variable[3], variable[4]) /*OFStream::write*/;
- return_label1: while(false);
- tracehead = trace.prev;
+void file___Object___print(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 31;
+ fra.me.meth = LOCATE_file___Object___print;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = CALL_file___Object___stdout(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/standard//file.nit:34 */
+ CALL_stream___OStream___write(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ fra.me.REG[0] = CALL_file___Object___stdout(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//file.nit:35 */
+ if (!once_value_1) {
+ fra.me.REG[1] = BOX_NativeString("\n");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
+ once_value_1 = fra.me.REG[1];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[1] = once_value_1;
+ CALL_stream___OStream___write(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ stack_frame_head = fra.me.prev;
return;
}
-val_t file___Object___getc(val_t self) {
- struct trace_t trace = {NULL, NULL, 40, LOCATE_file___Object___getc};
- val_t variable[3];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = ((file___Object___stdin_t)CALL(variable[2],COLOR_file___Object___stdin))(variable[2]) /*Object::stdin*/;
- variable[2] = ((stream___BufferedIStream___read_char_t)CALL(variable[2],COLOR_stream___IStream___read_char))(variable[2]) /*BufferedIStream::read_char*/;
- variable[2] = TAG_Char(UNTAG_Int(variable[2]));
- variable[1] = variable[2];
- goto return_label2;
- return_label2: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t file___Object___gets(val_t self) {
- struct trace_t trace = {NULL, NULL, 46, LOCATE_file___Object___gets};
- val_t variable[3];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = ((file___Object___stdin_t)CALL(variable[2],COLOR_file___Object___stdin))(variable[2]) /*Object::stdin*/;
- variable[2] = ((stream___IStream___read_line_t)CALL(variable[2],COLOR_stream___IStream___read_line))(variable[2]) /*IStream::read_line*/;
- variable[1] = variable[2];
- goto return_label3;
- return_label3: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t file___Object___stdin(val_t self) {
- struct trace_t trace = {NULL, NULL, 294, LOCATE_file___Object___stdin};
- static val_t once_value_5; static int once_bool_5; /* Once value for variable[2]*/
- val_t variable[3];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- if (once_bool_5) variable[2] = once_value_5;
- else {
- variable[2] = NEW_Stdin_file___Stdin___init(); /*new Stdin*/
- once_value_5 = variable[2];
- once_bool_5 = true;
- }
- variable[1] = variable[2];
- goto return_label4;
- return_label4: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t file___Object___stdout(val_t self) {
- struct trace_t trace = {NULL, NULL, 297, LOCATE_file___Object___stdout};
- static val_t once_value_7; static int once_bool_7; /* Once value for variable[2]*/
- val_t variable[3];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- if (once_bool_7) variable[2] = once_value_7;
- else {
- variable[2] = NEW_Stdout_file___Stdout___init(); /*new Stdout*/
- once_value_7 = variable[2];
- once_bool_7 = true;
- }
- variable[1] = variable[2];
- goto return_label6;
- return_label6: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t file___Object___stderr(val_t self) {
- struct trace_t trace = {NULL, NULL, 300, LOCATE_file___Object___stderr};
- static val_t once_value_9; static int once_bool_9; /* Once value for variable[2]*/
- val_t variable[3];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- if (once_bool_9) variable[2] = once_value_9;
- else {
- variable[2] = NEW_Stderr_file___Stderr___init(); /*new Stderr*/
- once_value_9 = variable[2];
- once_bool_9 = true;
- }
- variable[1] = variable[2];
- goto return_label8;
- return_label8: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t file___FStream___path(val_t self) {
- struct trace_t trace = {NULL, NULL, 58, LOCATE_file___FStream___path};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return ATTR_file___FStream____path( self) /*FStream::_path*/;
-}
-val_t file___FStream___file_stat(val_t self) {
- struct trace_t trace = {NULL, NULL, 64, LOCATE_file___FStream___file_stat};
- val_t variable[3];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = ATTR_file___FStream____file(variable[2]) /*FStream::_file*/;
- variable[2] = ((file___NativeFile___file_stat_t)CALL(variable[2],COLOR_file___NativeFile___file_stat))(variable[2]) /*NativeFile::file_stat*/;
- variable[1] = variable[2];
- goto return_label10;
- return_label10: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-void file___IFStream___close(val_t self) {
- struct trace_t trace = {NULL, NULL, 83, LOCATE_file___IFStream___close};
- val_t variable[4];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- 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*/;
- variable[2] = variable[3];
- variable[3] = variable[0];
- ATTR_file___IFStream____end_reached(variable[3]) /*IFStream::_end_reached*/ = TAG_Bool(true);
- return_label11: while(false);
- tracehead = trace.prev;
+val_t file___Object___getc(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 38;
+ fra.me.meth = LOCATE_file___Object___getc;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = CALL_file___Object___stdin(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = CALL_stream___IStream___read_char(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Char(UNTAG_Int(REGB0));
+ /* ./../lib/standard//file.nit:41 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___Object___gets(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 44;
+ fra.me.meth = LOCATE_file___Object___gets;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = CALL_file___Object___stdin(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_stream___IStream___read_line(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//file.nit:47 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t file___Object___stdin(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 291;
+ fra.me.meth = LOCATE_file___Object___stdin;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./../lib/standard//file.nit:292 */
+ if (!once_value_1) {
+ fra.me.REG[0] = NEW_Stdin_file___Stdin___init();
+ once_value_1 = fra.me.REG[0];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[0] = once_value_1;
+ goto label2;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t file___Object___stdout(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 294;
+ fra.me.meth = LOCATE_file___Object___stdout;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./../lib/standard//file.nit:295 */
+ if (!once_value_1) {
+ fra.me.REG[0] = NEW_Stdout_file___Stdout___init();
+ once_value_1 = fra.me.REG[0];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[0] = once_value_1;
+ goto label2;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t file___Object___stderr(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 297;
+ fra.me.meth = LOCATE_file___Object___stderr;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./../lib/standard//file.nit:298 */
+ if (!once_value_1) {
+ fra.me.REG[0] = NEW_Stderr_file___Stderr___init();
+ once_value_1 = fra.me.REG[0];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[0] = once_value_1;
+ goto label2;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t file___FStream___path(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 55;
+ fra.me.meth = LOCATE_file___FStream___path;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = ATTR_file___FStream____path(fra.me.REG[0]);
+ /* ./../lib/standard//file.nit:55 */
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t file___FStream___file_stat(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 61;
+ fra.me.meth = LOCATE_file___FStream___file_stat;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = ATTR_file___FStream____file(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ /* ./../lib/standard//file.nit:62 */
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 62);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = CALL_file___NativeFile___file_stat(fra.me.REG[0])(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+void file___IFStream___close(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 80;
+ fra.me.meth = LOCATE_file___IFStream___close;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = ATTR_file___FStream____file(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./../lib/standard//file.nit:82 */
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 82);
+ nit_exit(1);
+ }
+ REGB0 = CALL_file___NativeFile___io_close(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = TAG_Bool(true);
+ /* ./../lib/standard//file.nit:83 */
+ ATTR_file___IFStream____end_reached(fra.me.REG[0]) = REGB0;
+ stack_frame_head = fra.me.prev;
return;
}
-void file___IFStream___fill_buffer(val_t self) {
- struct trace_t trace = {NULL, NULL, 89, LOCATE_file___IFStream___fill_buffer};
- val_t variable[6];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- variable[3] = variable[0];
- variable[3] = ATTR_file___FStream____file(variable[3]) /*FStream::_file*/;
- variable[4] = variable[0];
- variable[4] = ATTR_stream___BufferedIStream____buffer(variable[4]) /*BufferedIStream::_buffer*/;
- variable[4] = ATTR_string___String____items(variable[4]) /*String::_items*/;
- variable[5] = variable[0];
- variable[5] = ATTR_stream___BufferedIStream____buffer(variable[5]) /*BufferedIStream::_buffer*/;
- variable[5] = ATTR_string___String____capacity(variable[5]) /*String::_capacity*/;
- variable[3] = ((file___NativeFile___io_read_t)CALL(variable[3],COLOR_file___NativeFile___io_read))(variable[3], variable[4], variable[5]) /*NativeFile::io_read*/;
- variable[2] = variable[3];
- variable[3] = TAG_Bool(UNTAG_Int( variable[2] /*nb*/)<=UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable[3])) { /*if*/
- variable[3] = variable[0];
- ATTR_file___IFStream____end_reached(variable[3]) /*IFStream::_end_reached*/ = TAG_Bool(true);
- variable[2] = TAG_Int(0) /*nb=*/;
- }
- variable[3] = variable[0];
- variable[3] = ATTR_stream___BufferedIStream____buffer(variable[3]) /*BufferedIStream::_buffer*/;
- ATTR_array___AbstractArray____length(variable[3]) /*AbstractArray::_length*/ = variable[2] /*nb*/;
- variable[3] = variable[0];
- ATTR_stream___BufferedIStream____buffer_pos(variable[3]) /*BufferedIStream::_buffer_pos*/ = TAG_Int(0);
- return_label12: while(false);
- tracehead = trace.prev;
+void file___IFStream___fill_buffer(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 86;
+ fra.me.meth = LOCATE_file___IFStream___fill_buffer;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = ATTR_file___FStream____file(fra.me.REG[0]);
+ fra.me.REG[2] = ATTR_stream___BufferedIStream____buffer(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ /* ./../lib/standard//file.nit:89 */
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 89);
+ nit_exit(1);
+ }
+ REGB0 = TAG_Bool(ATTR_string___AbstractString____items(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_items");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 89);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ATTR_string___AbstractString____items(fra.me.REG[2]);
+ fra.me.REG[3] = ATTR_stream___BufferedIStream____buffer(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 89);
+ nit_exit(1);
+ }
+ REGB0 = TAG_Bool(ATTR_string___Buffer____capacity(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_capacity");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 89);
+ nit_exit(1);
+ }
+ REGB0 = ATTR_string___Buffer____capacity(fra.me.REG[3]);
+ REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 89);
+ nit_exit(1);
+ }
+ REGB0 = CALL_file___NativeFile___io_read(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2], REGB0);
+ REGB1 = TAG_Int(0);
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB1));
+ /* ./../lib/standard//file.nit:90 */
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(true);
+ /* ./../lib/standard//file.nit:91 */
+ ATTR_file___IFStream____end_reached(fra.me.REG[0]) = REGB1;
+ REGB1 = TAG_Int(0);
+ REGB0 = REGB1;
+ /* ./../lib/standard//file.nit:92 */
+ }
+ fra.me.REG[2] = ATTR_stream___BufferedIStream____buffer(fra.me.REG[0]);
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ /* ./../lib/standard//file.nit:94 */
+ if (UNTAG_Bool(REGB1)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 94);
+ nit_exit(1);
+ }
+ ATTR_array___AbstractArrayRead____length(fra.me.REG[2]) = REGB0;
+ REGB0 = TAG_Int(0);
+ /* ./../lib/standard//file.nit:95 */
+ ATTR_stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB0;
+ stack_frame_head = fra.me.prev;
return;
}
-val_t file___IFStream___end_reached(val_t self) {
- struct trace_t trace = {NULL, NULL, 101, LOCATE_file___IFStream___end_reached};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return ATTR_file___IFStream____end_reached( self) /*IFStream::_end_reached*/;
-}
-void file___IFStream___reopen(val_t self) {
- struct trace_t trace = {NULL, NULL, 74, LOCATE_file___IFStream___reopen};
- val_t variable[5];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = ((stream___BufferedIStream___eof_t)CALL(variable[2],COLOR_stream___IStream___eof))(variable[2]) /*BufferedIStream::eof*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[2])))) { /*if*/
- variable[2] = variable[0];
- ((file___IFStream___close_t)CALL(variable[2],COLOR_stream___IOS___close))(variable[2]) /*IFStream::close*/;
- }
- variable[2] = variable[0];
- variable[3] = variable[0];
- variable[4] = variable[0];
- variable[4] = ATTR_file___FStream____path(variable[4]) /*FStream::_path*/;
- variable[4] = ((string___String___to_cstring_t)CALL(variable[4],COLOR_string___String___to_cstring))(variable[4]) /*String::to_cstring*/;
- variable[3] = ((file___NativeFileCapable___io_open_read_t)CALL(variable[3],COLOR_file___NativeFileCapable___io_open_read))(variable[3], variable[4]) /*NativeFileCapable::io_open_read*/;
- ATTR_file___FStream____file(variable[2]) /*FStream::_file*/ = variable[3];
- variable[2] = variable[0];
- ATTR_file___IFStream____end_reached(variable[2]) /*IFStream::_end_reached*/ = TAG_Bool(false);
- variable[2] = variable[0];
- ATTR_stream___BufferedIStream____buffer_pos(variable[2]) /*BufferedIStream::_buffer_pos*/ = TAG_Int(0);
- variable[2] = variable[0];
- variable[2] = ATTR_stream___BufferedIStream____buffer(variable[2]) /*BufferedIStream::_buffer*/;
- ((array___AbstractArray___clear_t)CALL(variable[2],COLOR_abstract_collection___RemovableCollection___clear))(variable[2]) /*AbstractArray::clear*/;
- return_label13: while(false);
- tracehead = trace.prev;
+val_t file___IFStream___end_reached(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 98;
+ fra.me.meth = LOCATE_file___IFStream___end_reached;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_file___IFStream____end_reached(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/standard//file.nit:98 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_end_reached");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 98);
+ nit_exit(1);
+ }
+ REGB0 = ATTR_file___IFStream____end_reached(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+void file___IFStream___reopen(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 71;
+ fra.me.meth = LOCATE_file___IFStream___reopen;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = CALL_stream___IStream___eof(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ /* ./../lib/standard//file.nit:73 */
+ if (UNTAG_Bool(REGB0)) {
+ CALL_stream___IOS___close(fra.me.REG[0])(fra.me.REG[0]);
+ }
+ fra.me.REG[1] = ATTR_file___FStream____path(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./../lib/standard//file.nit:74 */
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 74);
+ nit_exit(1);
+ }
+ fra.me.REG[1] = CALL_string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[1] = CALL_file___NativeFileCapable___io_open_read(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ ATTR_file___FStream____file(fra.me.REG[0]) = fra.me.REG[1];
+ REGB0 = TAG_Bool(false);
+ /* ./../lib/standard//file.nit:75 */
+ ATTR_file___IFStream____end_reached(fra.me.REG[0]) = REGB0;
+ REGB0 = TAG_Int(0);
+ /* ./../lib/standard//file.nit:76 */
+ ATTR_stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB0;
+ fra.me.REG[0] = ATTR_stream___BufferedIStream____buffer(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ /* ./../lib/standard//file.nit:77 */
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 77);
+ nit_exit(1);
+ }
+ CALL_abstract_collection___RemovableCollection___clear(fra.me.REG[0])(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
return;
}
-void file___IFStream___open(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, NULL, 104, LOCATE_file___IFStream___open};
- val_t variable[6];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- variable[1] = param0;
- if (init_table[VAL2OBJ(variable[0])->vft[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::==*/)))))));
- 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);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_IFStream].i] = 1;
- tracehead = trace.prev;
+void file___IFStream___open(val_t p0, val_t p1, int* init_table){
+ int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_IFStream].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ if (init_table[itpos0]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 101;
+ fra.me.meth = LOCATE_file___IFStream___open;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./../lib/standard//file.nit:104 */
+ ATTR_file___FStream____path(fra.me.REG[0]) = fra.me.REG[1];
+ REGB0 = TAG_Int(10);
+ /* ./../lib/standard//file.nit:105 */
+ CALL_stream___BufferedIStream___prepare_buffer(fra.me.REG[0])(fra.me.REG[0], REGB0);
+ fra.me.REG[1] = ATTR_file___FStream____path(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./../lib/standard//file.nit:106 */
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 106);
+ nit_exit(1);
+ }
+ fra.me.REG[1] = CALL_string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[1] = CALL_file___NativeFileCapable___io_open_read(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ ATTR_file___FStream____file(fra.me.REG[0]) = fra.me.REG[1];
+ fra.me.REG[0] = ATTR_file___FStream____file(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ /* ./../lib/standard//file.nit:107 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Assert %s failed", "'cant_open_file'");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 107);
+ nit_exit(1);
+ }
+ stack_frame_head = fra.me.prev;
+ init_table[itpos0] = 1;
return;
}
-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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_IFStream].i]) return;
- return_label15: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_IFStream].i] = 1;
- tracehead = trace.prev;
+void file___IFStream___init(val_t p0, int* init_table){
+ int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_IFStream].i;
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ if (init_table[itpos1]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 110;
+ fra.me.meth = LOCATE_file___IFStream___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./../lib/standard//file.nit:110 */
+ stack_frame_head = fra.me.prev;
+ init_table[itpos1] = 1;
return;
}
-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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_IFStream].i]) return;
- return_label16: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_IFStream].i] = 1;
- tracehead = trace.prev;
+void file___IFStream___without_file(val_t p0, int* init_table){
+ int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_IFStream].i;
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ if (init_table[itpos2]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 111;
+ fra.me.meth = LOCATE_file___IFStream___without_file;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./../lib/standard//file.nit:111 */
+ stack_frame_head = fra.me.prev;
+ init_table[itpos2] = 1;
return;
}
-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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- 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*/;
- variable[2] = variable[3];
- variable[3] = variable[0];
- ATTR_file___OFStream____writable(variable[3]) /*OFStream::_writable*/ = TAG_Bool(false);
- return_label17: while(false);
- tracehead = trace.prev;
+void file___OFStream___close(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 128;
+ fra.me.meth = LOCATE_file___OFStream___close;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = ATTR_file___FStream____file(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./../lib/standard//file.nit:130 */
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 130);
+ nit_exit(1);
+ }
+ REGB0 = CALL_file___NativeFile___io_close(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = TAG_Bool(false);
+ /* ./../lib/standard//file.nit:131 */
+ ATTR_file___OFStream____writable(fra.me.REG[0]) = REGB0;
+ stack_frame_head = fra.me.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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- variable[1] = param0;
- variable[3] = variable[0];
- variable[3] = ATTR_file___OFStream____writable(variable[3]) /*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);
- tracehead = trace.prev;
+void file___OFStream___write(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 119;
+ fra.me.meth = LOCATE_file___OFStream___write;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(ATTR_file___OFStream____writable(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/standard//file.nit:122 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_writable");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 122);
+ nit_exit(1);
+ }
+ REGB0 = ATTR_file___OFStream____writable(fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Assert failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 122);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = CALL_string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ /* ./../lib/standard//collection//array.nit:23 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_length");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23);
+ nit_exit(1);
+ }
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ /* ./../lib/standard//file.nit:123 */
+ CALL_file___OFStream___write_native(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2], REGB0);
+ stack_frame_head = fra.me.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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = ATTR_file___OFStream____writable(variable[2]) /*OFStream::_writable*/;
- variable[1] = variable[2];
- goto return_label19;
- return_label19: 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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- variable[1] = param0;
- variable[2] = param1;
- variable[4] = variable[0];
- variable[4] = ATTR_file___OFStream____writable(variable[4]) /*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*/;
- variable[4] = variable[5];
- 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*/;
- }
- return_label20: while(false);
- tracehead = trace.prev;
+val_t file___OFStream___is_writable(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 126;
+ fra.me.meth = LOCATE_file___OFStream___is_writable;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_file___OFStream____writable(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/standard//file.nit:126 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_writable");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 126);
+ nit_exit(1);
+ }
+ REGB0 = ATTR_file___OFStream____writable(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+void file___OFStream___write_native(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t REGB3;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ static val_t once_value_2; /* Once value */
+ static val_t once_value_3; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 137;
+ fra.me.meth = LOCATE_file___OFStream___write_native;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = p2;
+ REGB1 = TAG_Bool(ATTR_file___OFStream____writable(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/standard//file.nit:140 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_writable");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 140);
+ nit_exit(1);
+ }
+ REGB1 = ATTR_file___OFStream____writable(fra.me.REG[0]);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Assert failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 140);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ATTR_file___FStream____file(fra.me.REG[0]);
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ /* ./../lib/standard//file.nit:141 */
+ if (UNTAG_Bool(REGB1)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 141);
+ nit_exit(1);
+ }
+ REGB1 = CALL_file___NativeFile___io_write(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1], REGB0);
+ REGB2 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB0));
+ /* ./../lib/standard//file.nit:142 */
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ REGB3 = TAG_Bool((REGB1)==(REGB0));
+ REGB2 = REGB3;
+ /* ./../lib/standard//file.nit:142 */
+ }
+ REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
+ if (UNTAG_Bool(REGB2)) {
+ REGB2 = TAG_Int(4);
+ fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB2);
+ /* ./../lib/standard//file.nit:144 */
+ if (!once_value_1) {
+ fra.me.REG[2] = BOX_NativeString("Problem in writing : ");
+ REGB2 = TAG_Int(21);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
+ once_value_1 = fra.me.REG[2];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[2] = once_value_1;
+ array___Array___add(fra.me.REG[1], fra.me.REG[2]);
+ array___Array___add(fra.me.REG[1], REGB1);
+ if (!once_value_2) {
+ fra.me.REG[2] = BOX_NativeString(" ");
+ REGB1 = TAG_Int(1);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB1);
+ once_value_2 = fra.me.REG[2];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[2] = once_value_2;
+ array___Array___add(fra.me.REG[1], fra.me.REG[2]);
+ array___Array___add(fra.me.REG[1], REGB0);
+ if (!once_value_3) {
+ fra.me.REG[2] = BOX_NativeString("\n");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_3 = fra.me.REG[2];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[2] = once_value_3;
+ array___Array___add(fra.me.REG[1], fra.me.REG[2]);
+ CALL_file___Object___printn(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ }
+ stack_frame_head = fra.me.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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- 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::==*/)))))));
- 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);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OFStream].i] = 1;
- tracehead = trace.prev;
+void file___OFStream___open(val_t p0, val_t p1, int* init_table){
+ int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_OFStream].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ if (init_table[itpos3]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 148;
+ fra.me.meth = LOCATE_file___OFStream___open;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = CALL_string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[2] = CALL_file___NativeFileCapable___io_open_write(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ /* ./../lib/standard//file.nit:151 */
+ ATTR_file___FStream____file(fra.me.REG[0]) = fra.me.REG[2];
+ fra.me.REG[2] = ATTR_file___FStream____file(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ /* ./../lib/standard//file.nit:152 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Assert %s failed", "'cant_open_file'");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 152);
+ nit_exit(1);
+ }
+ /* ./../lib/standard//file.nit:153 */
+ ATTR_file___FStream____path(fra.me.REG[0]) = fra.me.REG[1];
+ REGB0 = TAG_Bool(true);
+ /* ./../lib/standard//file.nit:154 */
+ ATTR_file___OFStream____writable(fra.me.REG[0]) = REGB0;
+ stack_frame_head = fra.me.prev;
+ init_table[itpos3] = 1;
return;
}
-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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OFStream].i]) return;
- return_label22: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OFStream].i] = 1;
- tracehead = trace.prev;
+void file___OFStream___init(val_t p0, int* init_table){
+ int itpos4 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_OFStream].i;
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ if (init_table[itpos4]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 157;
+ fra.me.meth = LOCATE_file___OFStream___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./../lib/standard//file.nit:157 */
+ stack_frame_head = fra.me.prev;
+ init_table[itpos4] = 1;
return;
}
-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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OFStream].i]) return;
- return_label23: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OFStream].i] = 1;
- tracehead = trace.prev;
+void file___OFStream___without_file(val_t p0, int* init_table){
+ int itpos5 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_OFStream].i;
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ if (init_table[itpos5]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 158;
+ fra.me.meth = LOCATE_file___OFStream___without_file;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./../lib/standard//file.nit:158 */
+ stack_frame_head = fra.me.prev;
+ init_table[itpos5] = 1;
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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- 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);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Stdin].i] = 1;
- tracehead = trace.prev;
+void file___Stdin___init(val_t p0, int* init_table){
+ int itpos6 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Stdin].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ if (init_table[itpos6]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 165;
+ fra.me.meth = LOCATE_file___Stdin___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = fra.me.REG[0];
+ /* ./../lib/standard//file.nit:165 */
+ CALL_file___IFStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
+ fra.me.REG[0] = CALL_file___NativeFileCapable___native_stdin(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/standard//file.nit:166 */
+ ATTR_file___FStream____file(fra.me.REG[1]) = fra.me.REG[0];
+ /* ./../lib/standard//file.nit:167 */
+ if (!once_value_1) {
+ fra.me.REG[0] = BOX_NativeString("/dev/stdin");
+ REGB0 = TAG_Int(10);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_1 = fra.me.REG[0];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[0] = once_value_1;
+ ATTR_file___FStream____path(fra.me.REG[1]) = fra.me.REG[0];
+ REGB0 = TAG_Int(1);
+ /* ./../lib/standard//file.nit:168 */
+ CALL_stream___BufferedIStream___prepare_buffer(fra.me.REG[1])(fra.me.REG[1], REGB0);
+ stack_frame_head = fra.me.prev;
+ init_table[itpos6] = 1;
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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- 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);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Stdout].i] = 1;
- tracehead = trace.prev;
+void file___Stdout___init(val_t p0, int* init_table){
+ int itpos7 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Stdout].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ if (init_table[itpos7]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 174;
+ fra.me.meth = LOCATE_file___Stdout___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = fra.me.REG[0];
+ /* ./../lib/standard//file.nit:174 */
+ CALL_file___OFStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
+ fra.me.REG[0] = CALL_file___NativeFileCapable___native_stdout(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/standard//file.nit:175 */
+ ATTR_file___FStream____file(fra.me.REG[1]) = fra.me.REG[0];
+ /* ./../lib/standard//file.nit:176 */
+ if (!once_value_1) {
+ fra.me.REG[0] = BOX_NativeString("/dev/stdout");
+ REGB0 = TAG_Int(11);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_1 = fra.me.REG[0];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[0] = once_value_1;
+ ATTR_file___FStream____path(fra.me.REG[1]) = fra.me.REG[0];
+ REGB0 = TAG_Bool(true);
+ /* ./../lib/standard//file.nit:177 */
+ ATTR_file___OFStream____writable(fra.me.REG[1]) = REGB0;
+ stack_frame_head = fra.me.prev;
+ init_table[itpos7] = 1;
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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- 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);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Stderr].i] = 1;
- tracehead = trace.prev;
+void file___Stderr___init(val_t p0, int* init_table){
+ int itpos8 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Stderr].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ if (init_table[itpos8]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 183;
+ fra.me.meth = LOCATE_file___Stderr___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = fra.me.REG[0];
+ /* ./../lib/standard//file.nit:183 */
+ CALL_file___OFStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
+ fra.me.REG[0] = CALL_file___NativeFileCapable___native_stderr(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/standard//file.nit:184 */
+ ATTR_file___FStream____file(fra.me.REG[1]) = fra.me.REG[0];
+ /* ./../lib/standard//file.nit:185 */
+ if (!once_value_1) {
+ fra.me.REG[0] = BOX_NativeString("/dev/stderr");
+ REGB0 = TAG_Int(11);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_1 = fra.me.REG[0];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[0] = once_value_1;
+ ATTR_file___FStream____path(fra.me.REG[1]) = fra.me.REG[0];
+ REGB0 = TAG_Bool(true);
+ /* ./../lib/standard//file.nit:186 */
+ ATTR_file___OFStream____writable(fra.me.REG[1]) = REGB0;
+ stack_frame_head = fra.me.prev;
+ init_table[itpos8] = 1;
return;
}
-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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- 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*/;
- variable[1] = variable[2];
- goto return_label27;
- return_label27: 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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- 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*/;
- variable[1] = variable[2];
- goto return_label28;
- return_label28: 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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- 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*/;
- variable[1] = variable[2];
- goto return_label29;
- return_label29: 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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- 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*/;
- 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*/;
- variable[2] = variable[3];
- goto return_label30;
- }
- variable[3] = variable[0];
- variable[2] = variable[3];
- goto return_label30;
- return_label30: 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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- 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*/;
- variable[3] = variable[4];
- variable[5] = variable[0];
- variable[4] = variable[5];
- 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*/;
- 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*/;
- variable[2] = variable[5];
- goto return_label31;
- return_label31: 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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- 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*/;
- variable[2] = variable[3];
- 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*/;
- variable[1] = variable[3];
- goto return_label32;
- } else { /*if*/
- variable[3] = NEW_String_string___String___with_native(BOX_NativeString("."), TAG_Int(1)); /*new String*/
- variable[1] = variable[3];
- goto return_label32;
- }
- return_label32: 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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- variable[0] = self;
- variable[3] = variable[0];
- variable[3] = ATTR_array___AbstractArray____length(variable[3]) /*AbstractArray::_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*/;
- variable[3] = variable[4];
- 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*/;
- variable[1] = variable[4];
- goto return_label33;
- }
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString("."), TAG_Int(1)); /*new String*/
- variable[1] = variable[4];
- goto return_label33;
- return_label33: 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;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- 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*/;
- variable[2] = variable[3];
- variable[4] = NEW_String_string___String___init(); /*new String*/
- 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*/;
- if (UNTAG_Bool(variable[4])) { /*if*/
- goto return_label34;
- }
- variable[4] = variable[2] /*dirs*/;
- variable[5] = TAG_Int(0);
- 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*/)<UNTAG_Int(variable[8]));
- }
- variable[7] = variable[8];
- if (!UNTAG_Bool(variable[7])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_file, 229); nit_exit(1);}
- variable[7] = variable[4];
- variable[7] = ATTR_array___Array____items(variable[7]) /*Array::_items*/;
- variable[7] = UNBOX_NativeArray(variable[7])[UNTAG_Int( variable[5] /*index*/)];
- variable[6] = variable[7];
- goto return_label35;
- return_label35: while(false);
- variable[4] = variable[6];
- variable[4] = ((array___AbstractArray___is_empty_t)CALL(variable[4],COLOR_abstract_collection___Collection___is_empty))(variable[4]) /*AbstractArray::is_empty*/;
- if (UNTAG_Bool(variable[4])) { /*if*/
- ((string___String___add_t)CALL( variable[3] /*path*/,COLOR_abstract_collection___SimpleCollection___add))( variable[3] /*path*/, TAG_Char('/')) /*String::add*/;
- }
- variable[4] = ((array___AbstractArray___iterator_t)CALL( variable[2] /*dirs*/,COLOR_abstract_collection___Collection___iterator))( variable[2] /*dirs*/) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable[5] = ((array___ArrayIterator___is_ok_t)CALL(variable[4],COLOR_abstract_collection___Iterator___is_ok))(variable[4]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[5])) break; /*for*/
- variable[5] = ((array___ArrayIterator___item_t)CALL(variable[4],COLOR_abstract_collection___Iterator___item))(variable[4]) /*ArrayIterator::item*/;
- variable[6] = variable[5];
- variable[7] = ((array___AbstractArray___is_empty_t)CALL( variable[6] /*d*/,COLOR_abstract_collection___Collection___is_empty))( variable[6] /*d*/) /*AbstractArray::is_empty*/;
- if (UNTAG_Bool(variable[7])) { /*if*/
- goto continue_36;
+val_t file___String___file_exists(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 193;
+ fra.me.meth = LOCATE_file___String___file_exists;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = CALL_string___String___to_cstring(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = CALL_file___NativeString___file_exists(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//file.nit:194 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___String___file_stat(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 196;
+ fra.me.meth = LOCATE_file___String___file_stat;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = CALL_string___String___to_cstring(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_file___NativeString___file_stat(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//file.nit:196 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t file___String___file_delete(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 198;
+ fra.me.meth = LOCATE_file___String___file_delete;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = CALL_string___String___to_cstring(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = CALL_file___NativeString___file_delete(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//file.nit:198 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___String___strip_extension(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 200;
+ fra.me.meth = LOCATE_file___String___strip_extension;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = CALL_string___AbstractString___has_suffix(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* ./../lib/standard//file.nit:202 */
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Int(0);
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/standard//collection//array.nit:23 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_length");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23);
+ nit_exit(1);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_length");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23);
+ nit_exit(1);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
+ fra.me.REG[1] = CALL_string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2);
+ /* ./../lib/standard//file.nit:203 */
+ goto label1;
+ }
+ fra.me.REG[1] = fra.me.REG[0];
+ /* ./../lib/standard//file.nit:205 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
+}
+val_t file___String___basename(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 208;
+ fra.me.meth = LOCATE_file___String___basename;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Char('/');
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/standard//file.nit:210 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_length");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 210);
+ nit_exit(1);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ REGB2 = TAG_Int(1);
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
+ REGB2 = CALL_array___AbstractArrayRead___last_index_of_from(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2);
+ fra.me.REG[2] = fra.me.REG[0];
+ REGB0 = TAG_Int(0);
+ REGB0 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB0));
+ /* ./../lib/standard//file.nit:212 */
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Int(1);
+ REGB0 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
+ fra.me.REG[0] = CALL_string___AbstractString___substring_from(fra.me.REG[0])(fra.me.REG[0], REGB0);
+ fra.me.REG[2] = fra.me.REG[0];
+ /* ./../lib/standard//file.nit:213 */
+ }
+ fra.me.REG[1] = CALL_file___String___strip_extension(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ /* ./../lib/standard//file.nit:215 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
+}
+val_t file___String___dirname(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ static val_t once_value_2; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 218;
+ fra.me.meth = LOCATE_file___String___dirname;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Char('/');
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/standard//file.nit:220 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_length");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 220);
+ nit_exit(1);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ REGB2 = TAG_Int(1);
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
+ REGB2 = CALL_array___AbstractArrayRead___last_index_of_from(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2);
+ REGB0 = TAG_Int(0);
+ REGB0 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB0));
+ /* ./../lib/standard//file.nit:221 */
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Int(0);
+ fra.me.REG[0] = CALL_string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2);
+ /* ./../lib/standard//file.nit:222 */
+ goto label1;
+ } else {
+ /* ./../lib/standard//file.nit:224 */
+ if (!once_value_2) {
+ fra.me.REG[1] = BOX_NativeString(".");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB2);
+ once_value_2 = fra.me.REG[1];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[1] = once_value_2;
+ fra.me.REG[0] = fra.me.REG[1];
+ goto label1;
+ }
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t file___String___file_path(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ static val_t once_value_2; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 228;
+ fra.me.meth = LOCATE_file___String___file_path;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/standard//file.nit:230 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_length");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 230);
+ nit_exit(1);
+ }
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ REGB1 = TAG_Char('/');
+ REGB2 = TAG_Int(1);
+ REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
+ REGB2 = CALL_array___AbstractArrayRead___last_index_of_from(fra.me.REG[0])(fra.me.REG[0], REGB1, REGB2);
+ REGB1 = TAG_Int(0);
+ REGB1 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB1));
+ /* ./../lib/standard//file.nit:232 */
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Int(0);
+ fra.me.REG[0] = CALL_string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB1, REGB2);
+ /* ./../lib/standard//file.nit:233 */
+ goto label1;
+ }
+ /* ./../lib/standard//file.nit:235 */
+ if (!once_value_2) {
+ fra.me.REG[1] = BOX_NativeString(".");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB2);
+ once_value_2 = fra.me.REG[1];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[1] = once_value_2;
+ fra.me.REG[0] = fra.me.REG[1];
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+void file___String___mkdir(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 238;
+ fra.me.meth = LOCATE_file___String___mkdir;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./../lib/standard//file.nit:241 */
+ if (!once_value_1) {
+ fra.me.REG[1] = BOX_NativeString("/");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
+ once_value_1 = fra.me.REG[1];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[1] = once_value_1;
+ fra.me.REG[1] = CALL_string_search___String___split_with(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ fra.me.REG[0] = NEW_Buffer_string___Buffer___init();
+ REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/standard//file.nit:243 */
+ if (UNTAG_Bool(REGB0)) {
+ goto label2;
+ }
+ REGB0 = TAG_Int(0);
+ fra.me.REG[2] = fra.me.REG[1];
+ REGB1 = TAG_Int(0);
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:233 */
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_length");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+ nit_exit(1);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:233 */
+ } else {
+ REGB2 = TAG_Bool(false);
+ REGB1 = REGB2;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Assert %s failed", "'index'");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[2]);
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ /* ./../lib/standard//collection//array.nit:234 */
+ if (UNTAG_Bool(REGB1)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_array, 234);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
+ /* ./../lib/standard//collection//array.nit:234 */
+ goto label3;
+ label3: while(0);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ /* ./../lib/standard//file.nit:244 */
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_file, 244);
+ nit_exit(1);
+ }
+ REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[2])(fra.me.REG[2]);
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Char('/');
+ /* ./../lib/standard//file.nit:246 */
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB0);
+ }
+ fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/standard//file.nit:248 */
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./../lib/standard//file.nit:249 */
+ if (UNTAG_Bool(REGB0)) {
+ goto label4;
+ }
+ /* ./../lib/standard//file.nit:250 */
+ CALL_abstract_collection___Sequence___append(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ REGB0 = TAG_Char('/');
+ /* ./../lib/standard//file.nit:251 */
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB0);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_string___String___to_cstring(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./../lib/standard//file.nit:252 */
+ CALL_file___NativeString___file_mkdir(fra.me.REG[2])(fra.me.REG[2]);
+ label4: while(0);
+ } else {
+ /* ./../lib/standard//file.nit:248 */
+ goto label5;
}
- ((string___String___append_t)CALL( variable[3] /*path*/,COLOR_abstract_collection___IndexedCollection___append))( variable[3] /*path*/, variable[6] /*d*/) /*String::append*/;
- ((string___String___add_t)CALL( variable[3] /*path*/,COLOR_abstract_collection___SimpleCollection___add))( variable[3] /*path*/, TAG_Char('/')) /*String::add*/;
- variable[7] = ((string___String___to_cstring_t)CALL( variable[3] /*path*/,COLOR_string___String___to_cstring))( variable[3] /*path*/) /*String::to_cstring*/;
- ((file___NativeString___file_mkdir_t)CALL(variable[7],COLOR_file___NativeString___file_mkdir))(variable[7]) /*NativeString::file_mkdir*/;
- continue_36: while(0);
- ((array___ArrayIterator___next_t)CALL(variable[4],COLOR_abstract_collection___Iterator___next))(variable[4]) /*ArrayIterator::next*/;
- }
- break_36: while(0);
- return_label34: while(false);
- tracehead = trace.prev;
+ CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
+ }
+ label5: while(0);
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-val_t file___NativeString___file_exists(val_t self) {
- struct trace_t trace = {NULL, NULL, 261, LOCATE_file___NativeString___file_exists};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return TAG_Bool(string_NativeString_NativeString_file_exists_0(UNBOX_NativeString( self)));
-}
-val_t file___NativeString___file_stat(val_t self) {
- struct trace_t trace = {NULL, NULL, 262, LOCATE_file___NativeString___file_stat};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return BOX_FileStat(string_NativeString_NativeString_file_stat_0(UNBOX_NativeString( self)));
-}
-val_t file___NativeString___file_mkdir(val_t self) {
- struct trace_t trace = {NULL, NULL, 263, LOCATE_file___NativeString___file_mkdir};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return TAG_Bool(string_NativeString_NativeString_file_mkdir_0(UNBOX_NativeString( self)));
-}
-val_t file___NativeString___file_delete(val_t self) {
- struct trace_t trace = {NULL, NULL, 264, LOCATE_file___NativeString___file_delete};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return TAG_Bool(string_NativeString_NativeString_file_delete_0(UNBOX_NativeString( self)));
-}
-val_t file___FileStat___mode(val_t self) {
- struct trace_t trace = {NULL, NULL, 269, LOCATE_file___FileStat___mode};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return TAG_Int(file_FileStat_FileStat_mode_0(UNBOX_FileStat( self)));
-}
-val_t file___FileStat___atime(val_t self) {
- struct trace_t trace = {NULL, NULL, 271, LOCATE_file___FileStat___atime};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return TAG_Int(file_FileStat_FileStat_atime_0(UNBOX_FileStat( self)));
-}
-val_t file___FileStat___ctime(val_t self) {
- struct trace_t trace = {NULL, NULL, 272, LOCATE_file___FileStat___ctime};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return TAG_Int(file_FileStat_FileStat_ctime_0(UNBOX_FileStat( self)));
-}
-val_t file___FileStat___mtime(val_t self) {
- struct trace_t trace = {NULL, NULL, 273, LOCATE_file___FileStat___mtime};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return TAG_Int(file_FileStat_FileStat_mtime_0(UNBOX_FileStat( self)));
-}
-val_t file___FileStat___size(val_t self) {
- struct trace_t trace = {NULL, NULL, 274, LOCATE_file___FileStat___size};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return TAG_Int(file_FileStat_FileStat_size_0(UNBOX_FileStat( self)));
-}
-val_t file___NativeFile___io_read(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 280, LOCATE_file___NativeFile___io_read};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return TAG_Int(file_NativeFile_NativeFile_io_read_2(UNBOX_NativeFile( self), UNBOX_NativeString( param0), UNTAG_Int( param1)));
-}
-val_t file___NativeFile___io_write(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, NULL, 281, LOCATE_file___NativeFile___io_write};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return TAG_Int(file_NativeFile_NativeFile_io_write_2(UNBOX_NativeFile( self), UNBOX_NativeString( param0), UNTAG_Int( param1)));
-}
-val_t file___NativeFile___io_close(val_t self) {
- struct trace_t trace = {NULL, NULL, 282, LOCATE_file___NativeFile___io_close};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return TAG_Int(file_NativeFile_NativeFile_io_close_0(UNBOX_NativeFile( self)));
-}
-val_t file___NativeFile___file_stat(val_t self) {
- struct trace_t trace = {NULL, NULL, 283, LOCATE_file___NativeFile___file_stat};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return BOX_FileStat(file_NativeFile_NativeFile_file_stat_0(UNBOX_NativeFile( self)));
-}
-val_t file___NativeFileCapable___io_open_read(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 287, LOCATE_file___NativeFileCapable___io_open_read};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return BOX_NativeFile(file_NativeFileCapable_NativeFileCapable_io_open_read_1( self, UNBOX_NativeString( param0)));
-}
-val_t file___NativeFileCapable___io_open_write(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 288, LOCATE_file___NativeFileCapable___io_open_write};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return BOX_NativeFile(file_NativeFileCapable_NativeFileCapable_io_open_write_1( self, UNBOX_NativeString( param0)));
-}
-val_t file___NativeFileCapable___native_stdin(val_t self) {
- struct trace_t trace = {NULL, NULL, 289, LOCATE_file___NativeFileCapable___native_stdin};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return BOX_NativeFile(file_NativeFileCapable_NativeFileCapable_native_stdin_0( self));
-}
-val_t file___NativeFileCapable___native_stdout(val_t self) {
- struct trace_t trace = {NULL, NULL, 290, LOCATE_file___NativeFileCapable___native_stdout};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return BOX_NativeFile(file_NativeFileCapable_NativeFileCapable_native_stdout_0( self));
-}
-val_t file___NativeFileCapable___native_stderr(val_t self) {
- struct trace_t trace = {NULL, NULL, 291, LOCATE_file___NativeFileCapable___native_stderr};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_file;
- tracehead = trace.prev;
- return BOX_NativeFile(file_NativeFileCapable_NativeFileCapable_native_stderr_0( self));
+val_t file___NativeString___file_exists(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 258;
+ fra.me.meth = LOCATE_file___NativeString___file_exists;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(string_NativeString_NativeString_file_exists_0(UNBOX_NativeString(fra.me.REG[0])));
+ /* ./../lib/standard//file.nit:258 */
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___NativeString___file_stat(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 259;
+ fra.me.meth = LOCATE_file___NativeString___file_stat;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = BOX_FileStat(string_NativeString_NativeString_file_stat_0(UNBOX_NativeString(fra.me.REG[0])));
+ /* ./../lib/standard//file.nit:259 */
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t file___NativeString___file_mkdir(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 260;
+ fra.me.meth = LOCATE_file___NativeString___file_mkdir;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(string_NativeString_NativeString_file_mkdir_0(UNBOX_NativeString(fra.me.REG[0])));
+ /* ./../lib/standard//file.nit:260 */
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___NativeString___file_delete(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 261;
+ fra.me.meth = LOCATE_file___NativeString___file_delete;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(string_NativeString_NativeString_file_delete_0(UNBOX_NativeString(fra.me.REG[0])));
+ /* ./../lib/standard//file.nit:261 */
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___FileStat___mode(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 266;
+ fra.me.meth = LOCATE_file___FileStat___mode;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Int(file_FileStat_FileStat_mode_0(UNBOX_FileStat(fra.me.REG[0])));
+ /* ./../lib/standard//file.nit:266 */
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___FileStat___atime(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 268;
+ fra.me.meth = LOCATE_file___FileStat___atime;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Int(file_FileStat_FileStat_atime_0(UNBOX_FileStat(fra.me.REG[0])));
+ /* ./../lib/standard//file.nit:268 */
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___FileStat___ctime(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 269;
+ fra.me.meth = LOCATE_file___FileStat___ctime;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Int(file_FileStat_FileStat_ctime_0(UNBOX_FileStat(fra.me.REG[0])));
+ /* ./../lib/standard//file.nit:269 */
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___FileStat___mtime(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 270;
+ fra.me.meth = LOCATE_file___FileStat___mtime;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Int(file_FileStat_FileStat_mtime_0(UNBOX_FileStat(fra.me.REG[0])));
+ /* ./../lib/standard//file.nit:270 */
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___FileStat___size(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 271;
+ fra.me.meth = LOCATE_file___FileStat___size;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Int(file_FileStat_FileStat_size_0(UNBOX_FileStat(fra.me.REG[0])));
+ /* ./../lib/standard//file.nit:271 */
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___NativeFile___io_read(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 277;
+ fra.me.meth = LOCATE_file___NativeFile___io_read;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = p2;
+ REGB0 = TAG_Int(file_NativeFile_NativeFile_io_read_2(UNBOX_NativeFile(fra.me.REG[0]), UNBOX_NativeString(fra.me.REG[1]), UNTAG_Int(REGB0)));
+ /* ./../lib/standard//file.nit:277 */
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___NativeFile___io_write(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 278;
+ fra.me.meth = LOCATE_file___NativeFile___io_write;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = p2;
+ REGB0 = TAG_Int(file_NativeFile_NativeFile_io_write_2(UNBOX_NativeFile(fra.me.REG[0]), UNBOX_NativeString(fra.me.REG[1]), UNTAG_Int(REGB0)));
+ /* ./../lib/standard//file.nit:278 */
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___NativeFile___io_close(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 279;
+ fra.me.meth = LOCATE_file___NativeFile___io_close;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Int(file_NativeFile_NativeFile_io_close_0(UNBOX_NativeFile(fra.me.REG[0])));
+ /* ./../lib/standard//file.nit:279 */
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t file___NativeFile___file_stat(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 280;
+ fra.me.meth = LOCATE_file___NativeFile___file_stat;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = BOX_FileStat(file_NativeFile_NativeFile_file_stat_0(UNBOX_NativeFile(fra.me.REG[0])));
+ /* ./../lib/standard//file.nit:280 */
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t file___NativeFileCapable___io_open_read(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 284;
+ fra.me.meth = LOCATE_file___NativeFileCapable___io_open_read;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[1] = BOX_NativeFile(file_NativeFileCapable_NativeFileCapable_io_open_read_1(fra.me.REG[0], UNBOX_NativeString(fra.me.REG[1])));
+ /* ./../lib/standard//file.nit:284 */
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
+}
+val_t file___NativeFileCapable___io_open_write(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 285;
+ fra.me.meth = LOCATE_file___NativeFileCapable___io_open_write;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[1] = BOX_NativeFile(file_NativeFileCapable_NativeFileCapable_io_open_write_1(fra.me.REG[0], UNBOX_NativeString(fra.me.REG[1])));
+ /* ./../lib/standard//file.nit:285 */
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
+}
+val_t file___NativeFileCapable___native_stdin(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 286;
+ fra.me.meth = LOCATE_file___NativeFileCapable___native_stdin;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = BOX_NativeFile(file_NativeFileCapable_NativeFileCapable_native_stdin_0(fra.me.REG[0]));
+ /* ./../lib/standard//file.nit:286 */
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t file___NativeFileCapable___native_stdout(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 287;
+ fra.me.meth = LOCATE_file___NativeFileCapable___native_stdout;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = BOX_NativeFile(file_NativeFileCapable_NativeFileCapable_native_stdout_0(fra.me.REG[0]));
+ /* ./../lib/standard//file.nit:287 */
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t file___NativeFileCapable___native_stderr(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_file;
+ fra.me.line = 288;
+ fra.me.meth = LOCATE_file___NativeFileCapable___native_stderr;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = BOX_NativeFile(file_NativeFileCapable_NativeFileCapable_native_stderr_0(fra.me.REG[0]));
+ /* ./../lib/standard//file.nit:288 */
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}