/* This C file is generated by NIT to compile module standard___file. */
#include "standard___file._sep.h"
void standard___file___Object___printn(val_t p0, val_t p1){
- struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ 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.line = 25;
fra.me.meth = LOCATE_standard___file___Object___printn;
fra.me.has_broke = 0;
- fra.me.REG_size = 2;
+ fra.me.REG_size = 3;
fra.me.REG[0] = NIT_NULL;
fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
fra.me.REG[0] = p0;
fra.me.REG[1] = p1;
/* ./../lib/standard//file.nit:25 */
+ fra.me.REG[2] = fra.me.REG[0];
REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[1], COLOR_standard___collection___array___Array, ID_standard___collection___array___Array)) /*cast Array[Object]*/;
if (UNTAG_Bool(REGB0)) {
} else {
nit_abort("Cast failed", NULL, LOCATE_standard___file, 25);
}
/* ./../lib/standard//file.nit:28 */
- fra.me.REG[0] = CALL_standard___file___Object___stdout(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_standard___file___Object___stdout(fra.me.REG[2])(fra.me.REG[2]);
fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
- CALL_standard___stream___OStream___write(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ CALL_standard___stream___OStream___write(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
stack_frame_head = fra.me.prev;
return;
}
/* ./../lib/standard//file.nit:41 */
fra.me.REG[0] = CALL_standard___file___Object___stdin(fra.me.REG[0])(fra.me.REG[0]);
REGB0 = CALL_standard___stream___IStream___read_char(fra.me.REG[0])(fra.me.REG[0]);
- /* ./../lib/standard//kernel.nit:280 */
+ /* ./../lib/standard//kernel.nit:297 */
REGB0 = TAG_Char(UNTAG_Int(REGB0));
/* ./../lib/standard//file.nit:41 */
goto label1;
static val_t once_value_1; /* Once value */
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 291;
+ fra.me.line = 323;
fra.me.meth = LOCATE_standard___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 */
+ /* ./../lib/standard//file.nit:324 */
if (!once_value_1) {
fra.me.REG[0] = NEW_Stdin_standard___file___Stdin___init();
once_value_1 = fra.me.REG[0];
static val_t once_value_1; /* Once value */
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 294;
+ fra.me.line = 326;
fra.me.meth = LOCATE_standard___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 */
+ /* ./../lib/standard//file.nit:327 */
if (!once_value_1) {
fra.me.REG[0] = NEW_Stdout_standard___file___Stdout___init();
once_value_1 = fra.me.REG[0];
static val_t once_value_1; /* Once value */
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 297;
+ fra.me.line = 329;
fra.me.meth = LOCATE_standard___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 */
+ /* ./../lib/standard//file.nit:330 */
if (!once_value_1) {
fra.me.REG[0] = NEW_Stderr_standard___file___Stderr___init();
once_value_1 = fra.me.REG[0];
fra.me.REG[0] = NIT_NULL;
fra.me.REG[1] = NIT_NULL;
fra.me.REG[0] = p0;
- /* ./../lib/standard//file.nit:73 */
+ /* ./../lib/standard//file.nit:75 */
REGB0 = CALL_standard___stream___IStream___eof(fra.me.REG[0])(fra.me.REG[0]);
REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
if (UNTAG_Bool(REGB0)) {
CALL_standard___stream___IOS___close(fra.me.REG[0])(fra.me.REG[0]);
}
- /* ./../lib/standard//file.nit:74 */
+ /* ./../lib/standard//file.nit:76 */
fra.me.REG[1] = ATTR_standard___file___FStream____path(fra.me.REG[0]);
REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
if (UNTAG_Bool(REGB0)) {
- nit_abort("Reciever is null", NULL, LOCATE_standard___file, 74);
+ nit_abort("Reciever is null", NULL, LOCATE_standard___file, 76);
}
fra.me.REG[1] = CALL_standard___string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]);
fra.me.REG[1] = CALL_standard___file___NativeFileCapable___io_open_read(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
ATTR_standard___file___FStream____file(fra.me.REG[0]) = fra.me.REG[1];
- /* ./../lib/standard//file.nit:75 */
+ /* ./../lib/standard//file.nit:77 */
REGB0 = TAG_Bool(false);
ATTR_standard___file___IFStream____end_reached(fra.me.REG[0]) = REGB0;
- /* ./../lib/standard//file.nit:76 */
+ /* ./../lib/standard//file.nit:78 */
REGB0 = TAG_Int(0);
ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB0;
- /* ./../lib/standard//file.nit:77 */
+ /* ./../lib/standard//file.nit:79 */
fra.me.REG[0] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
if (UNTAG_Bool(REGB0)) {
- nit_abort("Reciever is null", NULL, LOCATE_standard___file, 77);
+ nit_abort("Reciever is null", NULL, LOCATE_standard___file, 79);
}
CALL_standard___collection___abstract_collection___RemovableCollection___clear(fra.me.REG[0])(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 80;
+ fra.me.line = 82;
fra.me.meth = LOCATE_standard___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;
- /* ./../lib/standard//file.nit:82 */
+ /* ./../lib/standard//file.nit:84 */
fra.me.REG[1] = ATTR_standard___file___FStream____file(fra.me.REG[0]);
REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
if (UNTAG_Bool(REGB0)) {
- nit_abort("Reciever is null", NULL, LOCATE_standard___file, 82);
+ nit_abort("Reciever is null", NULL, LOCATE_standard___file, 84);
}
REGB0 = CALL_standard___file___NativeFile___io_close(fra.me.REG[1])(fra.me.REG[1]);
- /* ./../lib/standard//file.nit:83 */
+ /* ./../lib/standard//file.nit:85 */
REGB0 = TAG_Bool(true);
ATTR_standard___file___IFStream____end_reached(fra.me.REG[0]) = REGB0;
stack_frame_head = fra.me.prev;
struct {struct stack_frame_t me; val_t MORE_REG[3];} 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_standard___file;
- fra.me.line = 86;
+ fra.me.line = 88;
fra.me.meth = LOCATE_standard___file___IFStream___fill_buffer;
fra.me.has_broke = 0;
fra.me.REG_size = 4;
fra.me.REG[2] = NIT_NULL;
fra.me.REG[3] = NIT_NULL;
fra.me.REG[0] = p0;
- /* ./../lib/standard//file.nit:89 */
+ /* ./../lib/standard//file.nit:90 */
fra.me.REG[1] = ATTR_standard___file___FStream____file(fra.me.REG[0]);
fra.me.REG[2] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
if (UNTAG_Bool(REGB0)) {
- nit_abort("Reciever is null", NULL, LOCATE_standard___file, 89);
+ nit_abort("Reciever is null", NULL, LOCATE_standard___file, 90);
}
REGB0 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[2])!=NIT_NULL);
if (UNTAG_Bool(REGB0)) {
} else {
- nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___file, 89);
+ nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___file, 90);
}
fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[2]);
fra.me.REG[3] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
if (UNTAG_Bool(REGB0)) {
- nit_abort("Reciever is null", NULL, LOCATE_standard___file, 89);
+ nit_abort("Reciever is null", NULL, LOCATE_standard___file, 90);
}
REGB0 = TAG_Bool(ATTR_standard___string___Buffer____capacity(fra.me.REG[3])!=NIT_NULL);
if (UNTAG_Bool(REGB0)) {
} else {
- nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___file, 89);
+ nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___file, 90);
}
REGB0 = ATTR_standard___string___Buffer____capacity(fra.me.REG[3]);
REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
if (UNTAG_Bool(REGB1)) {
- nit_abort("Reciever is null", NULL, LOCATE_standard___file, 89);
+ nit_abort("Reciever is null", NULL, LOCATE_standard___file, 90);
}
REGB0 = CALL_standard___file___NativeFile___io_read(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2], REGB0);
- /* ./../lib/standard//file.nit:90 */
+ /* ./../lib/standard//file.nit:91 */
REGB1 = TAG_Int(0);
- /* ./../lib/standard//kernel.nit:214 */
+ REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
+ }
+ /* ./../lib/standard//kernel.nit:231 */
REGB1 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB1));
- /* ./../lib/standard//file.nit:90 */
+ /* ./../lib/standard//file.nit:91 */
if (UNTAG_Bool(REGB1)) {
- /* ./../lib/standard//file.nit:91 */
+ /* ./../lib/standard//file.nit:92 */
REGB1 = TAG_Bool(true);
ATTR_standard___file___IFStream____end_reached(fra.me.REG[0]) = REGB1;
- /* ./../lib/standard//file.nit:92 */
+ /* ./../lib/standard//file.nit:93 */
REGB1 = TAG_Int(0);
REGB0 = REGB1;
}
- /* ./../lib/standard//file.nit:94 */
+ /* ./../lib/standard//file.nit:95 */
fra.me.REG[2] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
if (UNTAG_Bool(REGB1)) {
- nit_abort("Reciever is null", NULL, LOCATE_standard___file, 94);
+ nit_abort("Reciever is null", NULL, LOCATE_standard___file, 95);
}
ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]) = REGB0;
- /* ./../lib/standard//file.nit:95 */
+ /* ./../lib/standard//file.nit:96 */
REGB0 = TAG_Int(0);
ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB0;
stack_frame_head = fra.me.prev;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 98;
+ fra.me.line = 99;
fra.me.meth = LOCATE_standard___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;
- /* ./../lib/standard//file.nit:98 */
+ /* ./../lib/standard//file.nit:99 */
REGB0 = TAG_Bool(ATTR_standard___file___IFStream____end_reached(fra.me.REG[0])!=NIT_NULL);
if (UNTAG_Bool(REGB0)) {
} else {
- nit_abort("Uninitialized attribute %s", "_end_reached", LOCATE_standard___file, 98);
+ nit_abort("Uninitialized attribute %s", "_end_reached", LOCATE_standard___file, 99);
}
REGB0 = ATTR_standard___file___IFStream____end_reached(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
if (init_table[itpos0]) return;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 101;
+ fra.me.line = 102;
fra.me.meth = LOCATE_standard___file___IFStream___open;
fra.me.has_broke = 0;
fra.me.REG_size = 2;
fra.me.REG[1] = NIT_NULL;
fra.me.REG[0] = p0;
fra.me.REG[1] = p1;
- /* ./../lib/standard//file.nit:104 */
- ATTR_standard___file___FStream____path(fra.me.REG[0]) = fra.me.REG[1];
/* ./../lib/standard//file.nit:105 */
+ ATTR_standard___file___FStream____path(fra.me.REG[0]) = fra.me.REG[1];
+ /* ./../lib/standard//file.nit:106 */
REGB0 = TAG_Int(10);
CALL_standard___stream___BufferedIStream___prepare_buffer(fra.me.REG[0])(fra.me.REG[0], REGB0);
- /* ./../lib/standard//file.nit:106 */
+ /* ./../lib/standard//file.nit:107 */
fra.me.REG[1] = ATTR_standard___file___FStream____path(fra.me.REG[0]);
REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
if (UNTAG_Bool(REGB0)) {
- nit_abort("Reciever is null", NULL, LOCATE_standard___file, 106);
+ nit_abort("Reciever is null", NULL, LOCATE_standard___file, 107);
}
fra.me.REG[1] = CALL_standard___string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]);
fra.me.REG[1] = CALL_standard___file___NativeFileCapable___io_open_read(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
ATTR_standard___file___FStream____file(fra.me.REG[0]) = fra.me.REG[1];
- /* ./../lib/standard//file.nit:107 */
+ /* ./../lib/standard//file.nit:108 */
fra.me.REG[0] = ATTR_standard___file___FStream____file(fra.me.REG[0]);
REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
if (UNTAG_Bool(REGB0)) {
REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
if (UNTAG_Bool(REGB0)) {
} else {
- nit_abort("Assert %s failed", "'cant_open_file'", LOCATE_standard___file, 107);
+ nit_abort("Assert %s failed", "'cant_open_file'", LOCATE_standard___file, 108);
}
stack_frame_head = fra.me.prev;
init_table[itpos0] = 1;
if (init_table[itpos1]) return;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 110;
+ fra.me.line = 111;
fra.me.meth = LOCATE_standard___file___IFStream___init;
fra.me.has_broke = 0;
fra.me.REG_size = 1;
if (init_table[itpos2]) return;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 111;
+ fra.me.line = 112;
fra.me.meth = LOCATE_standard___file___IFStream___without_file;
fra.me.has_broke = 0;
fra.me.REG_size = 1;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 119;
+ fra.me.line = 120;
fra.me.meth = LOCATE_standard___file___OFStream___write;
fra.me.has_broke = 0;
fra.me.REG_size = 3;
}
/* ./../lib/standard//file.nit:123 */
fra.me.REG[2] = CALL_standard___string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]);
- /* ./../lib/standard//collection//array.nit:23 */
+ /* ./../lib/standard//collection//array.nit:24 */
REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
if (UNTAG_Bool(REGB0)) {
} else {
- nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 23);
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
}
REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
/* ./../lib/standard//file.nit:123 */
REGB2 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB0));
if (UNTAG_Bool(REGB2)) {
} else {
- /* ./../lib/standard//kernel.nit:210 */
+ /* ./../lib/standard//kernel.nit:227 */
REGB3 = TAG_Bool((REGB1)==(REGB0));
/* ./../lib/standard//file.nit:142 */
REGB2 = REGB3;
fra.me.REG_size = 1;
fra.me.REG[0] = NIT_NULL;
fra.me.REG[0] = p0;
- /* ./../lib/standard//file.nit:198 */
+ /* ./../lib/standard//file.nit:199 */
fra.me.REG[0] = CALL_standard___string___String___to_cstring(fra.me.REG[0])(fra.me.REG[0]);
REGB0 = CALL_standard___file___NativeString___file_delete(fra.me.REG[0])(fra.me.REG[0]);
goto label1;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 200;
+ fra.me.line = 201;
fra.me.meth = LOCATE_standard___file___String___strip_extension;
fra.me.has_broke = 0;
fra.me.REG_size = 2;
fra.me.REG[1] = NIT_NULL;
fra.me.REG[0] = p0;
fra.me.REG[1] = p1;
- /* ./../lib/standard//file.nit:202 */
+ /* ./../lib/standard//file.nit:204 */
REGB0 = CALL_standard___string___AbstractString___has_suffix(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
if (UNTAG_Bool(REGB0)) {
- /* ./../lib/standard//file.nit:203 */
+ /* ./../lib/standard//file.nit:205 */
REGB0 = TAG_Int(0);
- /* ./../lib/standard//collection//array.nit:23 */
+ /* ./../lib/standard//collection//array.nit:24 */
REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
if (UNTAG_Bool(REGB1)) {
} else {
- nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 23);
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
}
REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
if (UNTAG_Bool(REGB2)) {
} else {
- nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 23);
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
}
REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
- /* ./../lib/standard//kernel.nit:220 */
+ /* ./../lib/standard//kernel.nit:237 */
REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
- /* ./../lib/standard//file.nit:203 */
+ /* ./../lib/standard//file.nit:205 */
fra.me.REG[1] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2);
goto label1;
}
- /* ./../lib/standard//file.nit:205 */
+ /* ./../lib/standard//file.nit:207 */
fra.me.REG[1] = fra.me.REG[0];
goto label1;
label1: while(0);
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 208;
+ fra.me.line = 210;
fra.me.meth = LOCATE_standard___file___String___basename;
fra.me.has_broke = 0;
fra.me.REG_size = 3;
fra.me.REG[2] = NIT_NULL;
fra.me.REG[0] = p0;
fra.me.REG[1] = p1;
- /* ./../lib/standard//file.nit:210 */
+ /* ./../lib/standard//file.nit:213 */
REGB0 = TAG_Char('/');
REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
if (UNTAG_Bool(REGB1)) {
} else {
- nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___file, 210);
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___file, 213);
}
REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
REGB2 = TAG_Int(1);
- /* ./../lib/standard//kernel.nit:220 */
+ /* ./../lib/standard//kernel.nit:237 */
REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
- /* ./../lib/standard//file.nit:210 */
+ /* ./../lib/standard//file.nit:213 */
REGB2 = CALL_standard___collection___array___AbstractArrayRead___last_index_of_from(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2);
- /* ./../lib/standard//file.nit:211 */
+ /* ./../lib/standard//file.nit:214 */
fra.me.REG[2] = fra.me.REG[0];
- /* ./../lib/standard//file.nit:212 */
+ /* ./../lib/standard//file.nit:215 */
REGB0 = TAG_Int(0);
- /* ./../lib/standard//kernel.nit:216 */
+ REGB1 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
+ }
+ /* ./../lib/standard//kernel.nit:233 */
REGB0 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB0));
- /* ./../lib/standard//file.nit:212 */
+ /* ./../lib/standard//file.nit:215 */
if (UNTAG_Bool(REGB0)) {
- /* ./../lib/standard//file.nit:213 */
+ /* ./../lib/standard//file.nit:216 */
REGB0 = TAG_Int(1);
- /* ./../lib/standard//kernel.nit:218 */
+ /* ./../lib/standard//kernel.nit:235 */
REGB0 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
- /* ./../lib/standard//file.nit:213 */
+ /* ./../lib/standard//file.nit:216 */
fra.me.REG[0] = CALL_standard___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:215 */
+ /* ./../lib/standard//file.nit:218 */
fra.me.REG[1] = CALL_standard___file___String___strip_extension(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
goto label1;
label1: while(0);
static val_t once_value_2; /* Once value */
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 218;
+ fra.me.line = 221;
fra.me.meth = LOCATE_standard___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;
- /* ./../lib/standard//file.nit:220 */
+ /* ./../lib/standard//file.nit:224 */
REGB0 = TAG_Char('/');
REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
if (UNTAG_Bool(REGB1)) {
} else {
- nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___file, 220);
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___file, 224);
}
REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
REGB2 = TAG_Int(1);
- /* ./../lib/standard//kernel.nit:220 */
+ /* ./../lib/standard//kernel.nit:237 */
REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
- /* ./../lib/standard//file.nit:220 */
+ /* ./../lib/standard//file.nit:224 */
REGB2 = CALL_standard___collection___array___AbstractArrayRead___last_index_of_from(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2);
- /* ./../lib/standard//file.nit:221 */
+ /* ./../lib/standard//file.nit:225 */
REGB0 = TAG_Int(0);
- /* ./../lib/standard//kernel.nit:216 */
+ REGB1 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
+ }
+ /* ./../lib/standard//kernel.nit:233 */
REGB0 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB0));
- /* ./../lib/standard//file.nit:221 */
+ /* ./../lib/standard//file.nit:225 */
if (UNTAG_Bool(REGB0)) {
- /* ./../lib/standard//file.nit:222 */
+ /* ./../lib/standard//file.nit:226 */
REGB0 = TAG_Int(0);
fra.me.REG[0] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2);
goto label1;
} else {
- /* ./../lib/standard//file.nit:224 */
+ /* ./../lib/standard//file.nit:228 */
if (!once_value_2) {
fra.me.REG[1] = BOX_NativeString(".");
REGB2 = TAG_Int(1);
stack_frame_head = fra.me.prev;
return fra.me.REG[0];
}
-val_t standard___file___String___file_path(val_t p0){
- struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+val_t standard___file___String___simplify_path(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
val_t REGB0;
val_t REGB1;
val_t REGB2;
val_t tmp;
- static val_t once_value_2; /* Once value */
+ static val_t once_value_1; /* Once value */
+ static val_t once_value_2; /* Once value */
+ static val_t once_value_4; /* Once value */
+ static val_t once_value_5; /* Once value */
+ static val_t once_value_7; /* Once value */
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 228;
- fra.me.meth = LOCATE_standard___file___String___file_path;
+ fra.me.line = 232;
+ fra.me.meth = LOCATE_standard___file___String___simplify_path;
fra.me.has_broke = 0;
- fra.me.REG_size = 2;
+ fra.me.REG_size = 5;
fra.me.REG[0] = NIT_NULL;
fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[4] = NIT_NULL;
fra.me.REG[0] = p0;
- /* ./../lib/standard//file.nit:230 */
- REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
- if (UNTAG_Bool(REGB0)) {
+ /* ./../lib/standard//file.nit:247 */
+ if (!once_value_1) {
+ fra.me.REG[1] = BOX_NativeString("/");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[1] = NEW_String_standard___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] = fra.me.REG[1];
+ fra.me.REG[1] = CALL_standard___string_search___String___split_with(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* ./../lib/standard//file.nit:248 */
+ fra.me.REG[0] = NEW_Array_standard___collection___array___Array___init();
+ /* ./../lib/standard//collection//array.nit:269 */
+ REGB0 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:270 */
+ REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
} else {
- nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___file, 230);
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
}
- REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
- /* ./../lib/standard//file.nit:231 */
- REGB1 = TAG_Char('/');
- REGB2 = TAG_Int(1);
- /* ./../lib/standard//kernel.nit:220 */
- REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
- /* ./../lib/standard//file.nit:231 */
- REGB2 = CALL_standard___collection___array___AbstractArrayRead___last_index_of_from(fra.me.REG[0])(fra.me.REG[0], REGB1, REGB2);
- /* ./../lib/standard//file.nit:232 */
- REGB1 = TAG_Int(0);
- /* ./../lib/standard//kernel.nit:216 */
- REGB1 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB1));
- /* ./../lib/standard//file.nit:232 */
- if (UNTAG_Bool(REGB1)) {
- /* ./../lib/standard//file.nit:233 */
- REGB1 = TAG_Int(0);
- fra.me.REG[0] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB1, REGB2);
- goto label1;
+ REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
+ /* ./../lib/standard//collection//array.nit:271 */
+ fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[1]);
+ /* ./../lib/standard//collection//array.nit:272 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:24 */
+ REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
+ }
+ REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
+ REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
+ }
+ /* ./../lib/standard//kernel.nit:232 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:272 */
+ if (UNTAG_Bool(REGB1)) {
+ /* ./../lib/standard//collection//array.nit:273 */
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
+ }
+ /* ./../lib/standard//collection//array.nit:718 */
+ fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
+ /* ./../lib/standard//file.nit:250 */
+ if (!once_value_2) {
+ fra.me.REG[4] = BOX_NativeString(".");
+ REGB1 = TAG_Int(1);
+ fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB1);
+ once_value_2 = fra.me.REG[4];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[4] = once_value_2;
+ fra.me.REG[4] = fra.me.REG[4];
+ REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[4]));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB2 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ REGB1 = REGB2;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ goto label3;
+ }
+ /* ./../lib/standard//file.nit:251 */
+ if (!once_value_4) {
+ fra.me.REG[4] = BOX_NativeString("");
+ REGB1 = TAG_Int(0);
+ fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB1);
+ once_value_4 = fra.me.REG[4];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[4] = once_value_4;
+ fra.me.REG[4] = fra.me.REG[4];
+ REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[4]));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB2 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ REGB1 = REGB2;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]);
+ REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
+ } else {
+ REGB2 = TAG_Bool(false);
+ REGB1 = REGB2;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ goto label3;
+ }
+ /* ./../lib/standard//file.nit:252 */
+ if (!once_value_5) {
+ fra.me.REG[4] = BOX_NativeString("..");
+ REGB1 = TAG_Int(2);
+ fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB1);
+ once_value_5 = fra.me.REG[4];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[4] = once_value_5;
+ fra.me.REG[4] = fra.me.REG[4];
+ REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[4]));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB2 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ REGB1 = REGB2;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]);
+ REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
+ } else {
+ REGB2 = TAG_Bool(false);
+ REGB1 = REGB2;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ /* ./../lib/standard//file.nit:253 */
+ CALL_standard___collection___abstract_collection___Sequence___pop(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//file.nit:254 */
+ goto label3;
+ }
+ /* ./../lib/standard//file.nit:256 */
+ CALL_standard___collection___abstract_collection___Sequence___push(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
+ label3: while(0);
+ /* ./../lib/standard//collection//array.nit:274 */
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:235 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:274 */
+ REGB0 = REGB1;
+ } else {
+ /* ./../lib/standard//collection//array.nit:272 */
+ goto label6;
+ }
}
- /* ./../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_standard___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[1] = fra.me.REG[1];
- fra.me.REG[0] = fra.me.REG[1];
- goto label1;
- label1: while(0);
+ label6: while(0);
+ /* ./../lib/standard//file.nit:258 */
+ if (!once_value_7) {
+ fra.me.REG[2] = BOX_NativeString("/");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_7 = fra.me.REG[2];
+ register_static_object(&once_value_7);
+ } else fra.me.REG[2] = once_value_7;
+ fra.me.REG[2] = fra.me.REG[2];
+ fra.me.REG[2] = CALL_standard___string___Collection___join(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ goto label8;
+ label8: while(0);
stack_frame_head = fra.me.prev;
- return fra.me.REG[0];
+ return fra.me.REG[2];
}
void standard___file___String___mkdir(val_t p0){
struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
static val_t once_value_1; /* Once value */
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 238;
+ fra.me.line = 261;
fra.me.meth = LOCATE_standard___file___String___mkdir;
fra.me.has_broke = 0;
fra.me.REG_size = 4;
fra.me.REG[2] = NIT_NULL;
fra.me.REG[3] = NIT_NULL;
fra.me.REG[0] = p0;
- /* ./../lib/standard//file.nit:241 */
+ /* ./../lib/standard//file.nit:264 */
if (!once_value_1) {
fra.me.REG[1] = BOX_NativeString("/");
REGB0 = TAG_Int(1);
} else fra.me.REG[1] = once_value_1;
fra.me.REG[1] = fra.me.REG[1];
fra.me.REG[1] = CALL_standard___string_search___String___split_with(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
- /* ./../lib/standard//file.nit:242 */
+ /* ./../lib/standard//file.nit:265 */
fra.me.REG[0] = NEW_Buffer_standard___string___Buffer___init();
- /* ./../lib/standard//file.nit:243 */
+ /* ./../lib/standard//file.nit:266 */
REGB0 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[1])(fra.me.REG[1]);
if (UNTAG_Bool(REGB0)) {
goto label2;
}
- /* ./../lib/standard//file.nit:244 */
+ /* ./../lib/standard//file.nit:267 */
REGB0 = TAG_Int(0);
- /* ./../lib/standard//collection//array.nit:243 */
+ /* ./../lib/standard//collection//array.nit:278 */
fra.me.REG[2] = fra.me.REG[1];
- /* ./../lib/standard//collection//array.nit:245 */
+ /* ./../lib/standard//collection//array.nit:280 */
REGB1 = TAG_Int(0);
- /* ./../lib/standard//kernel.nit:216 */
+ REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
+ }
+ /* ./../lib/standard//kernel.nit:233 */
REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
- /* ./../lib/standard//collection//array.nit:245 */
+ /* ./../lib/standard//collection//array.nit:280 */
if (UNTAG_Bool(REGB1)) {
REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
if (UNTAG_Bool(REGB1)) {
} else {
- nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 245);
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
}
REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
- /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
+ }
+ /* ./../lib/standard//kernel.nit:232 */
REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
} else {
- /* ./../lib/standard//collection//array.nit:245 */
+ /* ./../lib/standard//collection//array.nit:280 */
REGB2 = TAG_Bool(false);
REGB1 = REGB2;
}
if (UNTAG_Bool(REGB1)) {
} else {
- nit_abort("Assert %s failed", "'index'", LOCATE_standard___collection___array, 245);
+ nit_abort("Assert %s failed", "'index'", LOCATE_standard___collection___array, 280);
}
- /* ./../lib/standard//collection//array.nit:246 */
+ /* ./../lib/standard//collection//array.nit:281 */
fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
if (UNTAG_Bool(REGB1)) {
- nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 246);
+ nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
}
- /* ./../lib/standard//collection//array.nit:654 */
+ /* ./../lib/standard//collection//array.nit:718 */
fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
- /* ./../lib/standard//collection//array.nit:246 */
+ /* ./../lib/standard//collection//array.nit:281 */
goto label3;
label3: while(0);
- /* ./../lib/standard//file.nit:244 */
+ /* ./../lib/standard//file.nit:267 */
REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
if (UNTAG_Bool(REGB0)) {
- nit_abort("Reciever is null", NULL, LOCATE_standard___file, 244);
+ nit_abort("Reciever is null", NULL, LOCATE_standard___file, 267);
}
REGB0 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[2])(fra.me.REG[2]);
if (UNTAG_Bool(REGB0)) {
- /* ./../lib/standard//file.nit:246 */
+ /* ./../lib/standard//file.nit:269 */
REGB0 = TAG_Char('/');
CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB0);
}
- /* ./../lib/standard//collection//array.nit:234 */
+ /* ./../lib/standard//collection//array.nit:269 */
REGB0 = TAG_Int(0);
- /* ./../lib/standard//collection//array.nit:235 */
+ /* ./../lib/standard//collection//array.nit:270 */
REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
if (UNTAG_Bool(REGB1)) {
} else {
- nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 235);
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
}
REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
- /* ./../lib/standard//collection//array.nit:236 */
+ /* ./../lib/standard//collection//array.nit:271 */
fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[1]);
- /* ./../lib/standard//collection//array.nit:237 */
+ /* ./../lib/standard//collection//array.nit:272 */
while(1) {
- /* ./../lib/standard//collection//array.nit:23 */
+ /* ./../lib/standard//collection//array.nit:24 */
REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
if (UNTAG_Bool(REGB1)) {
} else {
- nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 23);
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
}
REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
- /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
+ }
+ /* ./../lib/standard//kernel.nit:232 */
REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
- /* ./../lib/standard//collection//array.nit:237 */
+ /* ./../lib/standard//collection//array.nit:272 */
if (UNTAG_Bool(REGB1)) {
- /* ./../lib/standard//collection//array.nit:238 */
+ /* ./../lib/standard//collection//array.nit:273 */
REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
if (UNTAG_Bool(REGB1)) {
- nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 238);
+ nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
}
- /* ./../lib/standard//collection//array.nit:654 */
+ /* ./../lib/standard//collection//array.nit:718 */
fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
- /* ./../lib/standard//file.nit:249 */
+ /* ./../lib/standard//file.nit:272 */
REGB1 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[3])(fra.me.REG[3]);
if (UNTAG_Bool(REGB1)) {
goto label4;
}
- /* ./../lib/standard//file.nit:250 */
+ /* ./../lib/standard//file.nit:273 */
CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
- /* ./../lib/standard//file.nit:251 */
+ /* ./../lib/standard//file.nit:274 */
REGB1 = TAG_Char('/');
CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB1);
- /* ./../lib/standard//file.nit:252 */
+ /* ./../lib/standard//file.nit:275 */
fra.me.REG[3] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
fra.me.REG[3] = CALL_standard___string___String___to_cstring(fra.me.REG[3])(fra.me.REG[3]);
CALL_standard___file___NativeString___file_mkdir(fra.me.REG[3])(fra.me.REG[3]);
label4: while(0);
- /* ./../lib/standard//collection//array.nit:239 */
+ /* ./../lib/standard//collection//array.nit:274 */
REGB1 = TAG_Int(1);
- /* ./../lib/standard//kernel.nit:218 */
+ /* ./../lib/standard//kernel.nit:235 */
REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
- /* ./../lib/standard//collection//array.nit:239 */
+ /* ./../lib/standard//collection//array.nit:274 */
REGB0 = REGB1;
} else {
- /* ./../lib/standard//collection//array.nit:237 */
+ /* ./../lib/standard//collection//array.nit:272 */
goto label5;
}
}
stack_frame_head = fra.me.prev;
return;
}
+val_t standard___file___String___file_extension(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_standard___file;
+ fra.me.line = 279;
+ fra.me.meth = LOCATE_standard___file___String___file_extension;
+ 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:282 */
+ REGB0 = TAG_Char('.');
+ REGB0 = CALL_standard___collection___array___AbstractArrayRead___last_index_of(fra.me.REG[0])(fra.me.REG[0], REGB0);
+ /* ./../lib/standard//file.nit:283 */
+ REGB1 = TAG_Int(0);
+ REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
+ }
+ /* ./../lib/standard//kernel.nit:233 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
+ /* ./../lib/standard//file.nit:283 */
+ if (UNTAG_Bool(REGB1)) {
+ /* ./../lib/standard//file.nit:284 */
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:235 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:24 */
+ REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
+ }
+ REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//file.nit:284 */
+ fra.me.REG[0] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB1, REGB0);
+ goto label1;
+ } else {
+ /* ./../lib/standard//file.nit:286 */
+ fra.me.REG[0] = NIT_NULL;
+ goto label1;
+ }
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
val_t standard___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_standard___file;
- fra.me.line = 258;
+ fra.me.line = 292;
fra.me.meth = LOCATE_standard___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;
- /* ./../lib/standard//file.nit:258 */
+ /* ./../lib/standard//file.nit:292 */
REGB0 = NativeString_file_exists___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return REGB0;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 259;
+ fra.me.line = 293;
fra.me.meth = LOCATE_standard___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;
- /* ./../lib/standard//file.nit:259 */
+ /* ./../lib/standard//file.nit:293 */
fra.me.REG[0] = NativeString_file_stat___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return fra.me.REG[0];
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 260;
+ fra.me.line = 294;
fra.me.meth = LOCATE_standard___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;
- /* ./../lib/standard//file.nit:260 */
+ /* ./../lib/standard//file.nit:294 */
REGB0 = NativeString_file_mkdir___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return REGB0;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 261;
+ fra.me.line = 295;
fra.me.meth = LOCATE_standard___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;
- /* ./../lib/standard//file.nit:261 */
+ /* ./../lib/standard//file.nit:295 */
REGB0 = NativeString_file_delete___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return REGB0;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 266;
+ fra.me.line = 299;
fra.me.meth = LOCATE_standard___file___FileStat___mode;
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:266 */
+ /* ./../lib/standard//file.nit:299 */
REGB0 = FileStat_mode___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return REGB0;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 268;
+ fra.me.line = 301;
fra.me.meth = LOCATE_standard___file___FileStat___atime;
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:268 */
+ /* ./../lib/standard//file.nit:301 */
REGB0 = FileStat_atime___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return REGB0;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 269;
+ fra.me.line = 302;
fra.me.meth = LOCATE_standard___file___FileStat___ctime;
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:269 */
+ /* ./../lib/standard//file.nit:302 */
REGB0 = FileStat_ctime___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return REGB0;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 270;
+ fra.me.line = 303;
fra.me.meth = LOCATE_standard___file___FileStat___mtime;
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:270 */
+ /* ./../lib/standard//file.nit:303 */
REGB0 = FileStat_mtime___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return REGB0;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 271;
+ fra.me.line = 304;
fra.me.meth = LOCATE_standard___file___FileStat___size;
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:271 */
+ /* ./../lib/standard//file.nit:304 */
REGB0 = FileStat_size___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return REGB0;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 277;
+ fra.me.line = 309;
fra.me.meth = LOCATE_standard___file___NativeFile___io_read;
fra.me.has_broke = 0;
fra.me.REG_size = 2;
fra.me.REG[0] = p0;
fra.me.REG[1] = p1;
REGB0 = p2;
- /* ./../lib/standard//file.nit:277 */
+ /* ./../lib/standard//file.nit:309 */
REGB0 = NativeFile_io_read___out(fra.me.REG[0], fra.me.REG[1], REGB0);
stack_frame_head = fra.me.prev;
return REGB0;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 278;
+ fra.me.line = 310;
fra.me.meth = LOCATE_standard___file___NativeFile___io_write;
fra.me.has_broke = 0;
fra.me.REG_size = 2;
fra.me.REG[0] = p0;
fra.me.REG[1] = p1;
REGB0 = p2;
- /* ./../lib/standard//file.nit:278 */
+ /* ./../lib/standard//file.nit:310 */
REGB0 = NativeFile_io_write___out(fra.me.REG[0], fra.me.REG[1], REGB0);
stack_frame_head = fra.me.prev;
return REGB0;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 279;
+ fra.me.line = 311;
fra.me.meth = LOCATE_standard___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;
- /* ./../lib/standard//file.nit:279 */
+ /* ./../lib/standard//file.nit:311 */
REGB0 = NativeFile_io_close___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return REGB0;
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 280;
+ fra.me.line = 312;
fra.me.meth = LOCATE_standard___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;
- /* ./../lib/standard//file.nit:280 */
+ /* ./../lib/standard//file.nit:312 */
fra.me.REG[0] = NativeFile_file_stat___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return fra.me.REG[0];
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 284;
+ fra.me.line = 316;
fra.me.meth = LOCATE_standard___file___NativeFileCapable___io_open_read;
fra.me.has_broke = 0;
fra.me.REG_size = 2;
fra.me.REG[1] = NIT_NULL;
fra.me.REG[0] = p0;
fra.me.REG[1] = p1;
- /* ./../lib/standard//file.nit:284 */
+ /* ./../lib/standard//file.nit:316 */
fra.me.REG[1] = NativeFileCapable_io_open_read___out(fra.me.REG[0], fra.me.REG[1]);
stack_frame_head = fra.me.prev;
return fra.me.REG[1];
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 285;
+ fra.me.line = 317;
fra.me.meth = LOCATE_standard___file___NativeFileCapable___io_open_write;
fra.me.has_broke = 0;
fra.me.REG_size = 2;
fra.me.REG[1] = NIT_NULL;
fra.me.REG[0] = p0;
fra.me.REG[1] = p1;
- /* ./../lib/standard//file.nit:285 */
+ /* ./../lib/standard//file.nit:317 */
fra.me.REG[1] = NativeFileCapable_io_open_write___out(fra.me.REG[0], fra.me.REG[1]);
stack_frame_head = fra.me.prev;
return fra.me.REG[1];
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 286;
+ fra.me.line = 318;
fra.me.meth = LOCATE_standard___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;
- /* ./../lib/standard//file.nit:286 */
+ /* ./../lib/standard//file.nit:318 */
fra.me.REG[0] = NativeFileCapable_native_stdin___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return fra.me.REG[0];
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 287;
+ fra.me.line = 319;
fra.me.meth = LOCATE_standard___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;
- /* ./../lib/standard//file.nit:287 */
+ /* ./../lib/standard//file.nit:319 */
fra.me.REG[0] = NativeFileCapable_native_stdout___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return fra.me.REG[0];
val_t tmp;
fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
fra.me.file = LOCATE_standard___file;
- fra.me.line = 288;
+ fra.me.line = 320;
fra.me.meth = LOCATE_standard___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;
- /* ./../lib/standard//file.nit:288 */
+ /* ./../lib/standard//file.nit:320 */
fra.me.REG[0] = NativeFileCapable_native_stderr___out(fra.me.REG[0]);
stack_frame_head = fra.me.prev;
return fra.me.REG[0];