nitmetrics: refactor nullables metrics computation
[nit.git] / c_src / standard___file._sep.c
1 /* This C file is generated by NIT to compile module standard___file. */
2 #include "standard___file._sep.h"
3 void standard___file___Object___printn(val_t p0, val_t p1){
4 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
5 val_t REGB0;
6 val_t tmp;
7 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
8 fra.me.file = LOCATE_standard___file;
9 fra.me.line = 25;
10 fra.me.meth = LOCATE_standard___file___Object___printn;
11 fra.me.has_broke = 0;
12 fra.me.REG_size = 3;
13 fra.me.nitni_local_ref_head = NULL;
14 fra.me.REG[0] = NIT_NULL;
15 fra.me.REG[1] = NIT_NULL;
16 fra.me.REG[2] = NIT_NULL;
17 fra.me.REG[0] = p0;
18 fra.me.REG[1] = p1;
19 /* ../lib/standard/file.nit:25 */
20 fra.me.REG[2] = fra.me.REG[0];
21 REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[1], COLOR_standard___collection___array___Array, ID_standard___collection___array___Array)) /*cast Array[Object]*/;
22 if (UNTAG_Bool(REGB0)) {
23 } else {
24 nit_abort("Cast failed", NULL, LOCATE_standard___file, 25);
25 }
26 /* ../lib/standard/file.nit:28 */
27 fra.me.REG[2] = CALL_standard___file___Object___stdout(fra.me.REG[2])(fra.me.REG[2]);
28 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
29 CALL_standard___stream___OStream___write(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
30 stack_frame_head = fra.me.prev;
31 return;
32 }
33 void standard___file___Object___print(val_t p0, val_t p1){
34 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
35 val_t REGB0;
36 val_t tmp;
37 static val_t once_value_1; /* Once value */
38 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
39 fra.me.file = LOCATE_standard___file;
40 fra.me.line = 31;
41 fra.me.meth = LOCATE_standard___file___Object___print;
42 fra.me.has_broke = 0;
43 fra.me.REG_size = 3;
44 fra.me.nitni_local_ref_head = NULL;
45 fra.me.REG[0] = NIT_NULL;
46 fra.me.REG[1] = NIT_NULL;
47 fra.me.REG[2] = NIT_NULL;
48 fra.me.REG[0] = p0;
49 fra.me.REG[1] = p1;
50 /* ../lib/standard/file.nit:34 */
51 fra.me.REG[2] = CALL_standard___file___Object___stdout(fra.me.REG[0])(fra.me.REG[0]);
52 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
53 CALL_standard___stream___OStream___write(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
54 /* ../lib/standard/file.nit:35 */
55 fra.me.REG[0] = CALL_standard___file___Object___stdout(fra.me.REG[0])(fra.me.REG[0]);
56 if (!once_value_1) {
57 fra.me.REG[1] = BOX_NativeString("\n");
58 REGB0 = TAG_Int(1);
59 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB0);
60 once_value_1 = fra.me.REG[1];
61 register_static_object(&once_value_1);
62 } else fra.me.REG[1] = once_value_1;
63 fra.me.REG[1] = fra.me.REG[1];
64 CALL_standard___stream___OStream___write(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
65 stack_frame_head = fra.me.prev;
66 return;
67 }
68 val_t standard___file___Object___getc(val_t p0){
69 struct {struct stack_frame_t me;} fra;
70 val_t REGB0;
71 val_t tmp;
72 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
73 fra.me.file = LOCATE_standard___file;
74 fra.me.line = 38;
75 fra.me.meth = LOCATE_standard___file___Object___getc;
76 fra.me.has_broke = 0;
77 fra.me.REG_size = 1;
78 fra.me.nitni_local_ref_head = NULL;
79 fra.me.REG[0] = NIT_NULL;
80 fra.me.REG[0] = p0;
81 /* ../lib/standard/file.nit:41 */
82 fra.me.REG[0] = CALL_standard___file___Object___stdin(fra.me.REG[0])(fra.me.REG[0]);
83 REGB0 = CALL_standard___stream___IStream___read_char(fra.me.REG[0])(fra.me.REG[0]);
84 /* ../lib/standard/kernel.nit:297 */
85 REGB0 = TAG_Char(UNTAG_Int(REGB0));
86 /* ../lib/standard/file.nit:41 */
87 goto label1;
88 label1: while(0);
89 stack_frame_head = fra.me.prev;
90 return REGB0;
91 }
92 val_t standard___file___Object___gets(val_t p0){
93 struct {struct stack_frame_t me;} fra;
94 val_t tmp;
95 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
96 fra.me.file = LOCATE_standard___file;
97 fra.me.line = 44;
98 fra.me.meth = LOCATE_standard___file___Object___gets;
99 fra.me.has_broke = 0;
100 fra.me.REG_size = 1;
101 fra.me.nitni_local_ref_head = NULL;
102 fra.me.REG[0] = NIT_NULL;
103 fra.me.REG[0] = p0;
104 /* ../lib/standard/file.nit:47 */
105 fra.me.REG[0] = CALL_standard___file___Object___stdin(fra.me.REG[0])(fra.me.REG[0]);
106 fra.me.REG[0] = CALL_standard___stream___IStream___read_line(fra.me.REG[0])(fra.me.REG[0]);
107 goto label1;
108 label1: while(0);
109 stack_frame_head = fra.me.prev;
110 return fra.me.REG[0];
111 }
112 val_t standard___file___Object___stdin(val_t p0){
113 struct {struct stack_frame_t me;} fra;
114 val_t tmp;
115 static val_t once_value_1; /* Once value */
116 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
117 fra.me.file = LOCATE_standard___file;
118 fra.me.line = 346;
119 fra.me.meth = LOCATE_standard___file___Object___stdin;
120 fra.me.has_broke = 0;
121 fra.me.REG_size = 1;
122 fra.me.nitni_local_ref_head = NULL;
123 fra.me.REG[0] = NIT_NULL;
124 fra.me.REG[0] = p0;
125 /* ../lib/standard/file.nit:347 */
126 if (!once_value_1) {
127 fra.me.REG[0] = NEW_Stdin_standard___file___Stdin___init();
128 once_value_1 = fra.me.REG[0];
129 register_static_object(&once_value_1);
130 } else fra.me.REG[0] = once_value_1;
131 fra.me.REG[0] = fra.me.REG[0];
132 goto label2;
133 label2: while(0);
134 stack_frame_head = fra.me.prev;
135 return fra.me.REG[0];
136 }
137 val_t standard___file___Object___stdout(val_t p0){
138 struct {struct stack_frame_t me;} fra;
139 val_t tmp;
140 static val_t once_value_1; /* Once value */
141 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
142 fra.me.file = LOCATE_standard___file;
143 fra.me.line = 349;
144 fra.me.meth = LOCATE_standard___file___Object___stdout;
145 fra.me.has_broke = 0;
146 fra.me.REG_size = 1;
147 fra.me.nitni_local_ref_head = NULL;
148 fra.me.REG[0] = NIT_NULL;
149 fra.me.REG[0] = p0;
150 /* ../lib/standard/file.nit:350 */
151 if (!once_value_1) {
152 fra.me.REG[0] = NEW_Stdout_standard___file___Stdout___init();
153 once_value_1 = fra.me.REG[0];
154 register_static_object(&once_value_1);
155 } else fra.me.REG[0] = once_value_1;
156 fra.me.REG[0] = fra.me.REG[0];
157 goto label2;
158 label2: while(0);
159 stack_frame_head = fra.me.prev;
160 return fra.me.REG[0];
161 }
162 val_t standard___file___Object___stderr(val_t p0){
163 struct {struct stack_frame_t me;} fra;
164 val_t tmp;
165 static val_t once_value_1; /* Once value */
166 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
167 fra.me.file = LOCATE_standard___file;
168 fra.me.line = 352;
169 fra.me.meth = LOCATE_standard___file___Object___stderr;
170 fra.me.has_broke = 0;
171 fra.me.REG_size = 1;
172 fra.me.nitni_local_ref_head = NULL;
173 fra.me.REG[0] = NIT_NULL;
174 fra.me.REG[0] = p0;
175 /* ../lib/standard/file.nit:353 */
176 if (!once_value_1) {
177 fra.me.REG[0] = NEW_Stderr_standard___file___Stderr___init();
178 once_value_1 = fra.me.REG[0];
179 register_static_object(&once_value_1);
180 } else fra.me.REG[0] = once_value_1;
181 fra.me.REG[0] = fra.me.REG[0];
182 goto label2;
183 label2: while(0);
184 stack_frame_head = fra.me.prev;
185 return fra.me.REG[0];
186 }
187 val_t standard___file___FStream___path(val_t p0){
188 struct {struct stack_frame_t me;} fra;
189 val_t tmp;
190 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
191 fra.me.file = LOCATE_standard___file;
192 fra.me.line = 54;
193 fra.me.meth = LOCATE_standard___file___FStream___path;
194 fra.me.has_broke = 0;
195 fra.me.REG_size = 1;
196 fra.me.nitni_local_ref_head = NULL;
197 fra.me.REG[0] = NIT_NULL;
198 fra.me.REG[0] = p0;
199 /* ../lib/standard/file.nit:54 */
200 fra.me.REG[0] = ATTR_standard___file___FStream____path(fra.me.REG[0]);
201 stack_frame_head = fra.me.prev;
202 return fra.me.REG[0];
203 }
204 val_t standard___file___FStream___file_stat(val_t p0){
205 struct {struct stack_frame_t me;} fra;
206 val_t REGB0;
207 val_t tmp;
208 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
209 fra.me.file = LOCATE_standard___file;
210 fra.me.line = 60;
211 fra.me.meth = LOCATE_standard___file___FStream___file_stat;
212 fra.me.has_broke = 0;
213 fra.me.REG_size = 1;
214 fra.me.nitni_local_ref_head = NULL;
215 fra.me.REG[0] = NIT_NULL;
216 fra.me.REG[0] = p0;
217 /* ../lib/standard/file.nit:61 */
218 fra.me.REG[0] = ATTR_standard___file___FStream____file(fra.me.REG[0]);
219 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
220 if (UNTAG_Bool(REGB0)) {
221 nit_abort("Reciever is null", NULL, LOCATE_standard___file, 61);
222 }
223 fra.me.REG[0] = CALL_standard___file___NativeFile___file_stat(fra.me.REG[0])(fra.me.REG[0]);
224 goto label1;
225 label1: while(0);
226 stack_frame_head = fra.me.prev;
227 return fra.me.REG[0];
228 }
229 void standard___file___FStream___init(val_t p0, int* init_table){
230 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___FStream].i;
231 struct {struct stack_frame_t me;} fra;
232 val_t tmp;
233 if (init_table[itpos0]) return;
234 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
235 fra.me.file = LOCATE_standard___file;
236 fra.me.line = 0;
237 fra.me.meth = LOCATE_standard___file___FStream___init;
238 fra.me.has_broke = 0;
239 fra.me.REG_size = 0;
240 fra.me.nitni_local_ref_head = NULL;
241 stack_frame_head = fra.me.prev;
242 init_table[itpos0] = 1;
243 return;
244 }
245 void standard___file___IFStream___reopen(val_t p0){
246 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
247 val_t REGB0;
248 val_t tmp;
249 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
250 fra.me.file = LOCATE_standard___file;
251 fra.me.line = 70;
252 fra.me.meth = LOCATE_standard___file___IFStream___reopen;
253 fra.me.has_broke = 0;
254 fra.me.REG_size = 2;
255 fra.me.nitni_local_ref_head = NULL;
256 fra.me.REG[0] = NIT_NULL;
257 fra.me.REG[1] = NIT_NULL;
258 fra.me.REG[0] = p0;
259 /* ../lib/standard/file.nit:74 */
260 REGB0 = CALL_standard___stream___IStream___eof(fra.me.REG[0])(fra.me.REG[0]);
261 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
262 if (UNTAG_Bool(REGB0)) {
263 CALL_standard___stream___IOS___close(fra.me.REG[0])(fra.me.REG[0]);
264 }
265 /* ../lib/standard/file.nit:75 */
266 fra.me.REG[1] = ATTR_standard___file___FStream____path(fra.me.REG[0]);
267 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
268 if (UNTAG_Bool(REGB0)) {
269 nit_abort("Reciever is null", NULL, LOCATE_standard___file, 75);
270 }
271 fra.me.REG[1] = CALL_standard___string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]);
272 fra.me.REG[1] = NEW_NativeFile_standard___file___NativeFile___io_open_read(fra.me.REG[1]);
273 ATTR_standard___file___FStream____file(fra.me.REG[0]) = fra.me.REG[1];
274 /* ../lib/standard/file.nit:76 */
275 REGB0 = TAG_Bool(false);
276 ATTR_standard___file___IFStream____end_reached(fra.me.REG[0]) = REGB0;
277 /* ../lib/standard/file.nit:77 */
278 REGB0 = TAG_Int(0);
279 ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB0;
280 /* ../lib/standard/file.nit:78 */
281 fra.me.REG[0] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
282 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
283 if (UNTAG_Bool(REGB0)) {
284 nit_abort("Reciever is null", NULL, LOCATE_standard___file, 78);
285 }
286 CALL_standard___collection___abstract_collection___RemovableCollection___clear(fra.me.REG[0])(fra.me.REG[0]);
287 stack_frame_head = fra.me.prev;
288 return;
289 }
290 void standard___file___IFStream___close(val_t p0){
291 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
292 val_t REGB0;
293 val_t tmp;
294 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
295 fra.me.file = LOCATE_standard___file;
296 fra.me.line = 81;
297 fra.me.meth = LOCATE_standard___file___IFStream___close;
298 fra.me.has_broke = 0;
299 fra.me.REG_size = 2;
300 fra.me.nitni_local_ref_head = NULL;
301 fra.me.REG[0] = NIT_NULL;
302 fra.me.REG[1] = NIT_NULL;
303 fra.me.REG[0] = p0;
304 /* ../lib/standard/file.nit:83 */
305 fra.me.REG[1] = ATTR_standard___file___FStream____file(fra.me.REG[0]);
306 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
307 if (UNTAG_Bool(REGB0)) {
308 nit_abort("Reciever is null", NULL, LOCATE_standard___file, 83);
309 }
310 REGB0 = CALL_standard___file___NativeFile___io_close(fra.me.REG[1])(fra.me.REG[1]);
311 /* ../lib/standard/file.nit:84 */
312 REGB0 = TAG_Bool(true);
313 ATTR_standard___file___IFStream____end_reached(fra.me.REG[0]) = REGB0;
314 stack_frame_head = fra.me.prev;
315 return;
316 }
317 void standard___file___IFStream___fill_buffer(val_t p0){
318 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
319 val_t REGB0;
320 val_t REGB1;
321 val_t REGB2;
322 val_t tmp;
323 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
324 fra.me.file = LOCATE_standard___file;
325 fra.me.line = 87;
326 fra.me.meth = LOCATE_standard___file___IFStream___fill_buffer;
327 fra.me.has_broke = 0;
328 fra.me.REG_size = 4;
329 fra.me.nitni_local_ref_head = NULL;
330 fra.me.REG[0] = NIT_NULL;
331 fra.me.REG[1] = NIT_NULL;
332 fra.me.REG[2] = NIT_NULL;
333 fra.me.REG[3] = NIT_NULL;
334 fra.me.REG[0] = p0;
335 /* ../lib/standard/file.nit:89 */
336 fra.me.REG[1] = ATTR_standard___file___FStream____file(fra.me.REG[0]);
337 fra.me.REG[2] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
338 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
339 if (UNTAG_Bool(REGB0)) {
340 nit_abort("Reciever is null", NULL, LOCATE_standard___file, 89);
341 }
342 REGB0 = TAG_Bool(ATTR_standard___string___AbstractString____items(fra.me.REG[2])!=NIT_NULL);
343 if (UNTAG_Bool(REGB0)) {
344 } else {
345 nit_abort("Uninitialized attribute %s", "_items", LOCATE_standard___file, 89);
346 }
347 fra.me.REG[2] = ATTR_standard___string___AbstractString____items(fra.me.REG[2]);
348 fra.me.REG[3] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
349 REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
350 if (UNTAG_Bool(REGB0)) {
351 nit_abort("Reciever is null", NULL, LOCATE_standard___file, 89);
352 }
353 REGB0 = TAG_Bool(ATTR_standard___string___Buffer____capacity(fra.me.REG[3])!=NIT_NULL);
354 if (UNTAG_Bool(REGB0)) {
355 } else {
356 nit_abort("Uninitialized attribute %s", "_capacity", LOCATE_standard___file, 89);
357 }
358 REGB0 = ATTR_standard___string___Buffer____capacity(fra.me.REG[3]);
359 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
360 if (UNTAG_Bool(REGB1)) {
361 nit_abort("Reciever is null", NULL, LOCATE_standard___file, 89);
362 }
363 REGB0 = CALL_standard___file___NativeFile___io_read(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2], REGB0);
364 /* ../lib/standard/file.nit:90 */
365 REGB1 = TAG_Int(0);
366 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
367 if (UNTAG_Bool(REGB2)) {
368 } else {
369 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
370 }
371 /* ../lib/standard/kernel.nit:231 */
372 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<=UNTAG_Int(REGB1));
373 /* ../lib/standard/file.nit:90 */
374 if (UNTAG_Bool(REGB1)) {
375 /* ../lib/standard/file.nit:91 */
376 REGB1 = TAG_Bool(true);
377 ATTR_standard___file___IFStream____end_reached(fra.me.REG[0]) = REGB1;
378 /* ../lib/standard/file.nit:92 */
379 REGB1 = TAG_Int(0);
380 REGB0 = REGB1;
381 }
382 /* ../lib/standard/file.nit:94 */
383 fra.me.REG[2] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
384 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
385 if (UNTAG_Bool(REGB1)) {
386 nit_abort("Reciever is null", NULL, LOCATE_standard___file, 94);
387 }
388 ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]) = REGB0;
389 /* ../lib/standard/file.nit:95 */
390 REGB0 = TAG_Int(0);
391 ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB0;
392 stack_frame_head = fra.me.prev;
393 return;
394 }
395 val_t standard___file___IFStream___end_reached(val_t p0){
396 struct {struct stack_frame_t me;} fra;
397 val_t REGB0;
398 val_t tmp;
399 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
400 fra.me.file = LOCATE_standard___file;
401 fra.me.line = 98;
402 fra.me.meth = LOCATE_standard___file___IFStream___end_reached;
403 fra.me.has_broke = 0;
404 fra.me.REG_size = 1;
405 fra.me.nitni_local_ref_head = NULL;
406 fra.me.REG[0] = NIT_NULL;
407 fra.me.REG[0] = p0;
408 /* ../lib/standard/file.nit:98 */
409 REGB0 = TAG_Bool(ATTR_standard___file___IFStream____end_reached(fra.me.REG[0])!=NIT_NULL);
410 if (UNTAG_Bool(REGB0)) {
411 } else {
412 nit_abort("Uninitialized attribute %s", "_end_reached", LOCATE_standard___file, 98);
413 }
414 REGB0 = ATTR_standard___file___IFStream____end_reached(fra.me.REG[0]);
415 stack_frame_head = fra.me.prev;
416 return REGB0;
417 }
418 void standard___file___IFStream___open(val_t p0, val_t p1, int* init_table){
419 int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___IFStream].i;
420 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
421 val_t REGB0;
422 val_t REGB1;
423 val_t tmp;
424 if (init_table[itpos1]) return;
425 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
426 fra.me.file = LOCATE_standard___file;
427 fra.me.line = 101;
428 fra.me.meth = LOCATE_standard___file___IFStream___open;
429 fra.me.has_broke = 0;
430 fra.me.REG_size = 3;
431 fra.me.nitni_local_ref_head = NULL;
432 fra.me.REG[0] = NIT_NULL;
433 fra.me.REG[1] = NIT_NULL;
434 fra.me.REG[2] = NIT_NULL;
435 fra.me.REG[0] = p0;
436 fra.me.REG[1] = p1;
437 /* ../lib/standard/file.nit:101 */
438 fra.me.REG[2] = fra.me.REG[0];
439 CALL_standard___file___FStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
440 CALL_standard___stream___BufferedIStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
441 /* ../lib/standard/file.nit:104 */
442 ATTR_standard___file___FStream____path(fra.me.REG[2]) = fra.me.REG[1];
443 /* ../lib/standard/file.nit:105 */
444 REGB0 = TAG_Int(10);
445 CALL_standard___stream___BufferedIStream___prepare_buffer(fra.me.REG[2])(fra.me.REG[2], REGB0);
446 /* ../lib/standard/file.nit:106 */
447 fra.me.REG[1] = ATTR_standard___file___FStream____path(fra.me.REG[2]);
448 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
449 if (UNTAG_Bool(REGB0)) {
450 nit_abort("Reciever is null", NULL, LOCATE_standard___file, 106);
451 }
452 fra.me.REG[1] = CALL_standard___string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]);
453 fra.me.REG[1] = NEW_NativeFile_standard___file___NativeFile___io_open_read(fra.me.REG[1]);
454 ATTR_standard___file___FStream____file(fra.me.REG[2]) = fra.me.REG[1];
455 /* ../lib/standard/file.nit:107 */
456 fra.me.REG[2] = ATTR_standard___file___FStream____file(fra.me.REG[2]);
457 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
458 if (UNTAG_Bool(REGB0)) {
459 } else {
460 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
461 if (UNTAG_Bool(REGB1)) {
462 REGB1 = TAG_Bool(false);
463 REGB0 = REGB1;
464 } else {
465 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
466 REGB0 = REGB1;
467 }
468 }
469 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
470 if (UNTAG_Bool(REGB0)) {
471 } else {
472 nit_abort("Assert '%s' failed", "cant_open_file", LOCATE_standard___file, 107);
473 }
474 stack_frame_head = fra.me.prev;
475 init_table[itpos1] = 1;
476 return;
477 }
478 void standard___file___IFStream___init(val_t p0, int* init_table){
479 int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___IFStream].i;
480 struct {struct stack_frame_t me;} fra;
481 val_t tmp;
482 if (init_table[itpos2]) return;
483 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
484 fra.me.file = LOCATE_standard___file;
485 fra.me.line = 110;
486 fra.me.meth = LOCATE_standard___file___IFStream___init;
487 fra.me.has_broke = 0;
488 fra.me.REG_size = 1;
489 fra.me.nitni_local_ref_head = NULL;
490 fra.me.REG[0] = NIT_NULL;
491 fra.me.REG[0] = p0;
492 /* ../lib/standard/file.nit:110 */
493 CALL_standard___file___FStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
494 CALL_standard___stream___BufferedIStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
495 stack_frame_head = fra.me.prev;
496 init_table[itpos2] = 1;
497 return;
498 }
499 void standard___file___IFStream___without_file(val_t p0, int* init_table){
500 int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___IFStream].i;
501 struct {struct stack_frame_t me;} fra;
502 val_t tmp;
503 if (init_table[itpos3]) return;
504 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
505 fra.me.file = LOCATE_standard___file;
506 fra.me.line = 111;
507 fra.me.meth = LOCATE_standard___file___IFStream___without_file;
508 fra.me.has_broke = 0;
509 fra.me.REG_size = 1;
510 fra.me.nitni_local_ref_head = NULL;
511 fra.me.REG[0] = NIT_NULL;
512 fra.me.REG[0] = p0;
513 /* ../lib/standard/file.nit:111 */
514 CALL_standard___file___FStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
515 CALL_standard___stream___BufferedIStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
516 stack_frame_head = fra.me.prev;
517 init_table[itpos3] = 1;
518 return;
519 }
520 void standard___file___OFStream___write(val_t p0, val_t p1){
521 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
522 val_t REGB0;
523 val_t tmp;
524 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
525 fra.me.file = LOCATE_standard___file;
526 fra.me.line = 119;
527 fra.me.meth = LOCATE_standard___file___OFStream___write;
528 fra.me.has_broke = 0;
529 fra.me.REG_size = 3;
530 fra.me.nitni_local_ref_head = NULL;
531 fra.me.REG[0] = NIT_NULL;
532 fra.me.REG[1] = NIT_NULL;
533 fra.me.REG[2] = NIT_NULL;
534 fra.me.REG[0] = p0;
535 fra.me.REG[1] = p1;
536 /* ../lib/standard/file.nit:121 */
537 REGB0 = TAG_Bool(ATTR_standard___file___OFStream____writable(fra.me.REG[0])!=NIT_NULL);
538 if (UNTAG_Bool(REGB0)) {
539 } else {
540 nit_abort("Uninitialized attribute %s", "_writable", LOCATE_standard___file, 121);
541 }
542 REGB0 = ATTR_standard___file___OFStream____writable(fra.me.REG[0]);
543 if (UNTAG_Bool(REGB0)) {
544 } else {
545 nit_abort("Assert failed", NULL, LOCATE_standard___file, 121);
546 }
547 /* ../lib/standard/file.nit:122 */
548 fra.me.REG[2] = CALL_standard___string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]);
549 /* ../lib/standard/collection/array.nit:24 */
550 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
551 if (UNTAG_Bool(REGB0)) {
552 } else {
553 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
554 }
555 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
556 /* ../lib/standard/file.nit:122 */
557 CALL_standard___file___OFStream___write_native(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2], REGB0);
558 stack_frame_head = fra.me.prev;
559 return;
560 }
561 val_t standard___file___OFStream___is_writable(val_t p0){
562 struct {struct stack_frame_t me;} fra;
563 val_t REGB0;
564 val_t tmp;
565 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
566 fra.me.file = LOCATE_standard___file;
567 fra.me.line = 125;
568 fra.me.meth = LOCATE_standard___file___OFStream___is_writable;
569 fra.me.has_broke = 0;
570 fra.me.REG_size = 1;
571 fra.me.nitni_local_ref_head = NULL;
572 fra.me.REG[0] = NIT_NULL;
573 fra.me.REG[0] = p0;
574 /* ../lib/standard/file.nit:125 */
575 REGB0 = TAG_Bool(ATTR_standard___file___OFStream____writable(fra.me.REG[0])!=NIT_NULL);
576 if (UNTAG_Bool(REGB0)) {
577 } else {
578 nit_abort("Uninitialized attribute %s", "_writable", LOCATE_standard___file, 125);
579 }
580 REGB0 = ATTR_standard___file___OFStream____writable(fra.me.REG[0]);
581 goto label1;
582 label1: while(0);
583 stack_frame_head = fra.me.prev;
584 return REGB0;
585 }
586 void standard___file___OFStream___close(val_t p0){
587 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
588 val_t REGB0;
589 val_t tmp;
590 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
591 fra.me.file = LOCATE_standard___file;
592 fra.me.line = 127;
593 fra.me.meth = LOCATE_standard___file___OFStream___close;
594 fra.me.has_broke = 0;
595 fra.me.REG_size = 2;
596 fra.me.nitni_local_ref_head = NULL;
597 fra.me.REG[0] = NIT_NULL;
598 fra.me.REG[1] = NIT_NULL;
599 fra.me.REG[0] = p0;
600 /* ../lib/standard/file.nit:129 */
601 fra.me.REG[1] = ATTR_standard___file___FStream____file(fra.me.REG[0]);
602 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
603 if (UNTAG_Bool(REGB0)) {
604 nit_abort("Reciever is null", NULL, LOCATE_standard___file, 129);
605 }
606 REGB0 = CALL_standard___file___NativeFile___io_close(fra.me.REG[1])(fra.me.REG[1]);
607 /* ../lib/standard/file.nit:130 */
608 REGB0 = TAG_Bool(false);
609 ATTR_standard___file___OFStream____writable(fra.me.REG[0]) = REGB0;
610 stack_frame_head = fra.me.prev;
611 return;
612 }
613 void standard___file___OFStream___write_native(val_t p0, val_t p1, val_t p2){
614 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
615 val_t REGB0;
616 val_t REGB1;
617 val_t REGB2;
618 val_t REGB3;
619 val_t tmp;
620 static val_t once_value_1; /* Once value */
621 static val_t once_value_2; /* Once value */
622 static val_t once_value_3; /* Once value */
623 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
624 fra.me.file = LOCATE_standard___file;
625 fra.me.line = 136;
626 fra.me.meth = LOCATE_standard___file___OFStream___write_native;
627 fra.me.has_broke = 0;
628 fra.me.REG_size = 3;
629 fra.me.nitni_local_ref_head = NULL;
630 fra.me.REG[0] = NIT_NULL;
631 fra.me.REG[1] = NIT_NULL;
632 fra.me.REG[2] = NIT_NULL;
633 fra.me.REG[0] = p0;
634 fra.me.REG[1] = p1;
635 REGB0 = p2;
636 /* ../lib/standard/file.nit:139 */
637 REGB1 = TAG_Bool(ATTR_standard___file___OFStream____writable(fra.me.REG[0])!=NIT_NULL);
638 if (UNTAG_Bool(REGB1)) {
639 } else {
640 nit_abort("Uninitialized attribute %s", "_writable", LOCATE_standard___file, 139);
641 }
642 REGB1 = ATTR_standard___file___OFStream____writable(fra.me.REG[0]);
643 if (UNTAG_Bool(REGB1)) {
644 } else {
645 nit_abort("Assert failed", NULL, LOCATE_standard___file, 139);
646 }
647 /* ../lib/standard/file.nit:140 */
648 fra.me.REG[2] = ATTR_standard___file___FStream____file(fra.me.REG[0]);
649 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
650 if (UNTAG_Bool(REGB1)) {
651 nit_abort("Reciever is null", NULL, LOCATE_standard___file, 140);
652 }
653 REGB1 = CALL_standard___file___NativeFile___io_write(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1], REGB0);
654 /* ../lib/standard/file.nit:141 */
655 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB0));
656 if (UNTAG_Bool(REGB2)) {
657 } else {
658 /* ../lib/standard/kernel.nit:227 */
659 REGB3 = TAG_Bool((REGB1)==(REGB0));
660 /* ../lib/standard/file.nit:141 */
661 REGB2 = REGB3;
662 }
663 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
664 if (UNTAG_Bool(REGB2)) {
665 /* ../lib/standard/file.nit:143 */
666 REGB2 = TAG_Int(4);
667 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB2);
668 if (!once_value_1) {
669 fra.me.REG[2] = BOX_NativeString("Problem in writing : ");
670 REGB2 = TAG_Int(21);
671 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB2);
672 once_value_1 = fra.me.REG[2];
673 register_static_object(&once_value_1);
674 } else fra.me.REG[2] = once_value_1;
675 fra.me.REG[2] = fra.me.REG[2];
676 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
677 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], REGB1);
678 if (!once_value_2) {
679 fra.me.REG[2] = BOX_NativeString(" ");
680 REGB1 = TAG_Int(1);
681 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB1);
682 once_value_2 = fra.me.REG[2];
683 register_static_object(&once_value_2);
684 } else fra.me.REG[2] = once_value_2;
685 fra.me.REG[2] = fra.me.REG[2];
686 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
687 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], REGB0);
688 if (!once_value_3) {
689 fra.me.REG[2] = BOX_NativeString("\n");
690 REGB0 = TAG_Int(1);
691 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
692 once_value_3 = fra.me.REG[2];
693 register_static_object(&once_value_3);
694 } else fra.me.REG[2] = once_value_3;
695 fra.me.REG[2] = fra.me.REG[2];
696 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
697 CALL_standard___file___Object___printn(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
698 }
699 stack_frame_head = fra.me.prev;
700 return;
701 }
702 void standard___file___OFStream___open(val_t p0, val_t p1, int* init_table){
703 int itpos4 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___OFStream].i;
704 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
705 val_t REGB0;
706 val_t REGB1;
707 val_t tmp;
708 if (init_table[itpos4]) return;
709 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
710 fra.me.file = LOCATE_standard___file;
711 fra.me.line = 147;
712 fra.me.meth = LOCATE_standard___file___OFStream___open;
713 fra.me.has_broke = 0;
714 fra.me.REG_size = 3;
715 fra.me.nitni_local_ref_head = NULL;
716 fra.me.REG[0] = NIT_NULL;
717 fra.me.REG[1] = NIT_NULL;
718 fra.me.REG[2] = NIT_NULL;
719 fra.me.REG[0] = p0;
720 fra.me.REG[1] = p1;
721 /* ../lib/standard/file.nit:147 */
722 fra.me.REG[2] = fra.me.REG[0];
723 CALL_standard___file___FStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
724 /* ../lib/standard/file.nit:150 */
725 fra.me.REG[0] = CALL_standard___string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]);
726 fra.me.REG[0] = NEW_NativeFile_standard___file___NativeFile___io_open_write(fra.me.REG[0]);
727 ATTR_standard___file___FStream____file(fra.me.REG[2]) = fra.me.REG[0];
728 /* ../lib/standard/file.nit:151 */
729 fra.me.REG[0] = ATTR_standard___file___FStream____file(fra.me.REG[2]);
730 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
731 if (UNTAG_Bool(REGB0)) {
732 } else {
733 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
734 if (UNTAG_Bool(REGB1)) {
735 REGB1 = TAG_Bool(false);
736 REGB0 = REGB1;
737 } else {
738 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
739 REGB0 = REGB1;
740 }
741 }
742 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
743 if (UNTAG_Bool(REGB0)) {
744 } else {
745 nit_abort("Assert '%s' failed", "cant_open_file", LOCATE_standard___file, 151);
746 }
747 /* ../lib/standard/file.nit:152 */
748 ATTR_standard___file___FStream____path(fra.me.REG[2]) = fra.me.REG[1];
749 /* ../lib/standard/file.nit:153 */
750 REGB0 = TAG_Bool(true);
751 ATTR_standard___file___OFStream____writable(fra.me.REG[2]) = REGB0;
752 stack_frame_head = fra.me.prev;
753 init_table[itpos4] = 1;
754 return;
755 }
756 void standard___file___OFStream___init(val_t p0, int* init_table){
757 int itpos5 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___OFStream].i;
758 struct {struct stack_frame_t me;} fra;
759 val_t tmp;
760 if (init_table[itpos5]) return;
761 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
762 fra.me.file = LOCATE_standard___file;
763 fra.me.line = 156;
764 fra.me.meth = LOCATE_standard___file___OFStream___init;
765 fra.me.has_broke = 0;
766 fra.me.REG_size = 1;
767 fra.me.nitni_local_ref_head = NULL;
768 fra.me.REG[0] = NIT_NULL;
769 fra.me.REG[0] = p0;
770 /* ../lib/standard/file.nit:156 */
771 CALL_standard___file___FStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
772 stack_frame_head = fra.me.prev;
773 init_table[itpos5] = 1;
774 return;
775 }
776 void standard___file___OFStream___without_file(val_t p0, int* init_table){
777 int itpos6 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___OFStream].i;
778 struct {struct stack_frame_t me;} fra;
779 val_t tmp;
780 if (init_table[itpos6]) return;
781 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
782 fra.me.file = LOCATE_standard___file;
783 fra.me.line = 157;
784 fra.me.meth = LOCATE_standard___file___OFStream___without_file;
785 fra.me.has_broke = 0;
786 fra.me.REG_size = 1;
787 fra.me.nitni_local_ref_head = NULL;
788 fra.me.REG[0] = NIT_NULL;
789 fra.me.REG[0] = p0;
790 /* ../lib/standard/file.nit:157 */
791 CALL_standard___file___FStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
792 stack_frame_head = fra.me.prev;
793 init_table[itpos6] = 1;
794 return;
795 }
796 void standard___file___Stdin___init(val_t p0, int* init_table){
797 int itpos7 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___Stdin].i;
798 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
799 val_t REGB0;
800 val_t tmp;
801 static val_t once_value_1; /* Once value */
802 if (init_table[itpos7]) return;
803 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
804 fra.me.file = LOCATE_standard___file;
805 fra.me.line = 164;
806 fra.me.meth = LOCATE_standard___file___Stdin___init;
807 fra.me.has_broke = 0;
808 fra.me.REG_size = 2;
809 fra.me.nitni_local_ref_head = NULL;
810 fra.me.REG[0] = NIT_NULL;
811 fra.me.REG[1] = NIT_NULL;
812 fra.me.REG[0] = p0;
813 /* ../lib/standard/file.nit:164 */
814 fra.me.REG[1] = fra.me.REG[0];
815 CALL_standard___file___IFStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
816 /* ../lib/standard/file.nit:165 */
817 fra.me.REG[0] = NEW_NativeFile_standard___file___NativeFile___native_stdin();
818 ATTR_standard___file___FStream____file(fra.me.REG[1]) = fra.me.REG[0];
819 /* ../lib/standard/file.nit:166 */
820 if (!once_value_1) {
821 fra.me.REG[0] = BOX_NativeString("/dev/stdin");
822 REGB0 = TAG_Int(10);
823 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
824 once_value_1 = fra.me.REG[0];
825 register_static_object(&once_value_1);
826 } else fra.me.REG[0] = once_value_1;
827 fra.me.REG[0] = fra.me.REG[0];
828 ATTR_standard___file___FStream____path(fra.me.REG[1]) = fra.me.REG[0];
829 /* ../lib/standard/file.nit:167 */
830 REGB0 = TAG_Int(1);
831 CALL_standard___stream___BufferedIStream___prepare_buffer(fra.me.REG[1])(fra.me.REG[1], REGB0);
832 stack_frame_head = fra.me.prev;
833 init_table[itpos7] = 1;
834 return;
835 }
836 void standard___file___Stdout___init(val_t p0, int* init_table){
837 int itpos8 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___Stdout].i;
838 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
839 val_t REGB0;
840 val_t tmp;
841 static val_t once_value_1; /* Once value */
842 if (init_table[itpos8]) return;
843 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
844 fra.me.file = LOCATE_standard___file;
845 fra.me.line = 173;
846 fra.me.meth = LOCATE_standard___file___Stdout___init;
847 fra.me.has_broke = 0;
848 fra.me.REG_size = 2;
849 fra.me.nitni_local_ref_head = NULL;
850 fra.me.REG[0] = NIT_NULL;
851 fra.me.REG[1] = NIT_NULL;
852 fra.me.REG[0] = p0;
853 /* ../lib/standard/file.nit:173 */
854 fra.me.REG[1] = fra.me.REG[0];
855 CALL_standard___file___OFStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
856 /* ../lib/standard/file.nit:174 */
857 fra.me.REG[0] = NEW_NativeFile_standard___file___NativeFile___native_stdout();
858 ATTR_standard___file___FStream____file(fra.me.REG[1]) = fra.me.REG[0];
859 /* ../lib/standard/file.nit:175 */
860 if (!once_value_1) {
861 fra.me.REG[0] = BOX_NativeString("/dev/stdout");
862 REGB0 = TAG_Int(11);
863 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
864 once_value_1 = fra.me.REG[0];
865 register_static_object(&once_value_1);
866 } else fra.me.REG[0] = once_value_1;
867 fra.me.REG[0] = fra.me.REG[0];
868 ATTR_standard___file___FStream____path(fra.me.REG[1]) = fra.me.REG[0];
869 /* ../lib/standard/file.nit:176 */
870 REGB0 = TAG_Bool(true);
871 ATTR_standard___file___OFStream____writable(fra.me.REG[1]) = REGB0;
872 stack_frame_head = fra.me.prev;
873 init_table[itpos8] = 1;
874 return;
875 }
876 void standard___file___Stderr___init(val_t p0, int* init_table){
877 int itpos9 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___Stderr].i;
878 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
879 val_t REGB0;
880 val_t tmp;
881 static val_t once_value_1; /* Once value */
882 if (init_table[itpos9]) return;
883 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
884 fra.me.file = LOCATE_standard___file;
885 fra.me.line = 182;
886 fra.me.meth = LOCATE_standard___file___Stderr___init;
887 fra.me.has_broke = 0;
888 fra.me.REG_size = 2;
889 fra.me.nitni_local_ref_head = NULL;
890 fra.me.REG[0] = NIT_NULL;
891 fra.me.REG[1] = NIT_NULL;
892 fra.me.REG[0] = p0;
893 /* ../lib/standard/file.nit:182 */
894 fra.me.REG[1] = fra.me.REG[0];
895 CALL_standard___file___OFStream___init(fra.me.REG[0])(fra.me.REG[0], init_table);
896 /* ../lib/standard/file.nit:183 */
897 fra.me.REG[0] = NEW_NativeFile_standard___file___NativeFile___native_stderr();
898 ATTR_standard___file___FStream____file(fra.me.REG[1]) = fra.me.REG[0];
899 /* ../lib/standard/file.nit:184 */
900 if (!once_value_1) {
901 fra.me.REG[0] = BOX_NativeString("/dev/stderr");
902 REGB0 = TAG_Int(11);
903 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
904 once_value_1 = fra.me.REG[0];
905 register_static_object(&once_value_1);
906 } else fra.me.REG[0] = once_value_1;
907 fra.me.REG[0] = fra.me.REG[0];
908 ATTR_standard___file___FStream____path(fra.me.REG[1]) = fra.me.REG[0];
909 /* ../lib/standard/file.nit:185 */
910 REGB0 = TAG_Bool(true);
911 ATTR_standard___file___OFStream____writable(fra.me.REG[1]) = REGB0;
912 stack_frame_head = fra.me.prev;
913 init_table[itpos9] = 1;
914 return;
915 }
916 val_t standard___file___String___file_exists(val_t p0){
917 struct {struct stack_frame_t me;} fra;
918 val_t REGB0;
919 val_t tmp;
920 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
921 fra.me.file = LOCATE_standard___file;
922 fra.me.line = 192;
923 fra.me.meth = LOCATE_standard___file___String___file_exists;
924 fra.me.has_broke = 0;
925 fra.me.REG_size = 1;
926 fra.me.nitni_local_ref_head = NULL;
927 fra.me.REG[0] = NIT_NULL;
928 fra.me.REG[0] = p0;
929 /* ../lib/standard/file.nit:193 */
930 fra.me.REG[0] = CALL_standard___string___String___to_cstring(fra.me.REG[0])(fra.me.REG[0]);
931 REGB0 = CALL_standard___file___NativeString___file_exists(fra.me.REG[0])(fra.me.REG[0]);
932 goto label1;
933 label1: while(0);
934 stack_frame_head = fra.me.prev;
935 return REGB0;
936 }
937 val_t standard___file___String___file_stat(val_t p0){
938 struct {struct stack_frame_t me;} fra;
939 val_t tmp;
940 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
941 fra.me.file = LOCATE_standard___file;
942 fra.me.line = 195;
943 fra.me.meth = LOCATE_standard___file___String___file_stat;
944 fra.me.has_broke = 0;
945 fra.me.REG_size = 1;
946 fra.me.nitni_local_ref_head = NULL;
947 fra.me.REG[0] = NIT_NULL;
948 fra.me.REG[0] = p0;
949 /* ../lib/standard/file.nit:195 */
950 fra.me.REG[0] = CALL_standard___string___String___to_cstring(fra.me.REG[0])(fra.me.REG[0]);
951 fra.me.REG[0] = CALL_standard___file___NativeString___file_stat(fra.me.REG[0])(fra.me.REG[0]);
952 goto label1;
953 label1: while(0);
954 stack_frame_head = fra.me.prev;
955 return fra.me.REG[0];
956 }
957 val_t standard___file___String___file_delete(val_t p0){
958 struct {struct stack_frame_t me;} fra;
959 val_t REGB0;
960 val_t tmp;
961 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
962 fra.me.file = LOCATE_standard___file;
963 fra.me.line = 197;
964 fra.me.meth = LOCATE_standard___file___String___file_delete;
965 fra.me.has_broke = 0;
966 fra.me.REG_size = 1;
967 fra.me.nitni_local_ref_head = NULL;
968 fra.me.REG[0] = NIT_NULL;
969 fra.me.REG[0] = p0;
970 /* ../lib/standard/file.nit:198 */
971 fra.me.REG[0] = CALL_standard___string___String___to_cstring(fra.me.REG[0])(fra.me.REG[0]);
972 REGB0 = CALL_standard___file___NativeString___file_delete(fra.me.REG[0])(fra.me.REG[0]);
973 goto label1;
974 label1: while(0);
975 stack_frame_head = fra.me.prev;
976 return REGB0;
977 }
978 val_t standard___file___String___strip_extension(val_t p0, val_t p1){
979 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
980 val_t REGB0;
981 val_t REGB1;
982 val_t REGB2;
983 val_t tmp;
984 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
985 fra.me.file = LOCATE_standard___file;
986 fra.me.line = 200;
987 fra.me.meth = LOCATE_standard___file___String___strip_extension;
988 fra.me.has_broke = 0;
989 fra.me.REG_size = 2;
990 fra.me.nitni_local_ref_head = NULL;
991 fra.me.REG[0] = NIT_NULL;
992 fra.me.REG[1] = NIT_NULL;
993 fra.me.REG[0] = p0;
994 fra.me.REG[1] = p1;
995 /* ../lib/standard/file.nit:203 */
996 REGB0 = CALL_standard___string___AbstractString___has_suffix(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
997 if (UNTAG_Bool(REGB0)) {
998 /* ../lib/standard/file.nit:204 */
999 REGB0 = TAG_Int(0);
1000 /* ../lib/standard/collection/array.nit:24 */
1001 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1002 if (UNTAG_Bool(REGB1)) {
1003 } else {
1004 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1005 }
1006 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1007 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1008 if (UNTAG_Bool(REGB2)) {
1009 } else {
1010 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1011 }
1012 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1013 /* ../lib/standard/kernel.nit:237 */
1014 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
1015 /* ../lib/standard/file.nit:204 */
1016 fra.me.REG[1] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2);
1017 goto label1;
1018 }
1019 /* ../lib/standard/file.nit:206 */
1020 fra.me.REG[1] = fra.me.REG[0];
1021 goto label1;
1022 label1: while(0);
1023 stack_frame_head = fra.me.prev;
1024 return fra.me.REG[1];
1025 }
1026 val_t standard___file___String___basename(val_t p0, val_t p1){
1027 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1028 val_t REGB0;
1029 val_t REGB1;
1030 val_t REGB2;
1031 val_t tmp;
1032 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1033 fra.me.file = LOCATE_standard___file;
1034 fra.me.line = 209;
1035 fra.me.meth = LOCATE_standard___file___String___basename;
1036 fra.me.has_broke = 0;
1037 fra.me.REG_size = 3;
1038 fra.me.nitni_local_ref_head = NULL;
1039 fra.me.REG[0] = NIT_NULL;
1040 fra.me.REG[1] = NIT_NULL;
1041 fra.me.REG[2] = NIT_NULL;
1042 fra.me.REG[0] = p0;
1043 fra.me.REG[1] = p1;
1044 /* ../lib/standard/file.nit:212 */
1045 REGB0 = TAG_Char('/');
1046 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1047 if (UNTAG_Bool(REGB1)) {
1048 } else {
1049 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___file, 212);
1050 }
1051 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1052 REGB2 = TAG_Int(1);
1053 /* ../lib/standard/kernel.nit:237 */
1054 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
1055 /* ../lib/standard/file.nit:212 */
1056 REGB2 = CALL_standard___collection___array___AbstractArrayRead___last_index_of_from(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2);
1057 /* ../lib/standard/file.nit:213 */
1058 fra.me.REG[2] = fra.me.REG[0];
1059 /* ../lib/standard/file.nit:214 */
1060 REGB0 = TAG_Int(0);
1061 REGB1 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
1062 if (UNTAG_Bool(REGB1)) {
1063 } else {
1064 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1065 }
1066 /* ../lib/standard/kernel.nit:233 */
1067 REGB0 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB0));
1068 /* ../lib/standard/file.nit:214 */
1069 if (UNTAG_Bool(REGB0)) {
1070 /* ../lib/standard/file.nit:215 */
1071 REGB0 = TAG_Int(1);
1072 /* ../lib/standard/kernel.nit:235 */
1073 REGB0 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
1074 /* ../lib/standard/file.nit:215 */
1075 fra.me.REG[0] = CALL_standard___string___AbstractString___substring_from(fra.me.REG[0])(fra.me.REG[0], REGB0);
1076 fra.me.REG[2] = fra.me.REG[0];
1077 }
1078 /* ../lib/standard/file.nit:217 */
1079 fra.me.REG[1] = CALL_standard___file___String___strip_extension(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
1080 goto label1;
1081 label1: while(0);
1082 stack_frame_head = fra.me.prev;
1083 return fra.me.REG[1];
1084 }
1085 val_t standard___file___String___dirname(val_t p0){
1086 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1087 val_t REGB0;
1088 val_t REGB1;
1089 val_t REGB2;
1090 val_t tmp;
1091 static val_t once_value_2; /* Once value */
1092 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1093 fra.me.file = LOCATE_standard___file;
1094 fra.me.line = 220;
1095 fra.me.meth = LOCATE_standard___file___String___dirname;
1096 fra.me.has_broke = 0;
1097 fra.me.REG_size = 2;
1098 fra.me.nitni_local_ref_head = NULL;
1099 fra.me.REG[0] = NIT_NULL;
1100 fra.me.REG[1] = NIT_NULL;
1101 fra.me.REG[0] = p0;
1102 /* ../lib/standard/file.nit:223 */
1103 REGB0 = TAG_Char('/');
1104 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1105 if (UNTAG_Bool(REGB1)) {
1106 } else {
1107 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___file, 223);
1108 }
1109 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1110 REGB2 = TAG_Int(1);
1111 /* ../lib/standard/kernel.nit:237 */
1112 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
1113 /* ../lib/standard/file.nit:223 */
1114 REGB2 = CALL_standard___collection___array___AbstractArrayRead___last_index_of_from(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2);
1115 /* ../lib/standard/file.nit:224 */
1116 REGB0 = TAG_Int(0);
1117 REGB1 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
1118 if (UNTAG_Bool(REGB1)) {
1119 } else {
1120 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1121 }
1122 /* ../lib/standard/kernel.nit:233 */
1123 REGB0 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB0));
1124 /* ../lib/standard/file.nit:224 */
1125 if (UNTAG_Bool(REGB0)) {
1126 /* ../lib/standard/file.nit:225 */
1127 REGB0 = TAG_Int(0);
1128 fra.me.REG[0] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB0, REGB2);
1129 goto label1;
1130 } else {
1131 /* ../lib/standard/file.nit:227 */
1132 if (!once_value_2) {
1133 fra.me.REG[1] = BOX_NativeString(".");
1134 REGB2 = TAG_Int(1);
1135 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB2);
1136 once_value_2 = fra.me.REG[1];
1137 register_static_object(&once_value_2);
1138 } else fra.me.REG[1] = once_value_2;
1139 fra.me.REG[1] = fra.me.REG[1];
1140 fra.me.REG[0] = fra.me.REG[1];
1141 goto label1;
1142 }
1143 label1: while(0);
1144 stack_frame_head = fra.me.prev;
1145 return fra.me.REG[0];
1146 }
1147 val_t standard___file___String___simplify_path(val_t p0){
1148 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
1149 val_t REGB0;
1150 val_t REGB1;
1151 val_t REGB2;
1152 val_t tmp;
1153 static val_t once_value_1; /* Once value */
1154 static val_t once_value_2; /* Once value */
1155 static val_t once_value_4; /* Once value */
1156 static val_t once_value_5; /* Once value */
1157 static val_t once_value_6; /* Once value */
1158 static val_t once_value_8; /* Once value */
1159 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1160 fra.me.file = LOCATE_standard___file;
1161 fra.me.line = 231;
1162 fra.me.meth = LOCATE_standard___file___String___simplify_path;
1163 fra.me.has_broke = 0;
1164 fra.me.REG_size = 6;
1165 fra.me.nitni_local_ref_head = NULL;
1166 fra.me.REG[0] = NIT_NULL;
1167 fra.me.REG[1] = NIT_NULL;
1168 fra.me.REG[2] = NIT_NULL;
1169 fra.me.REG[3] = NIT_NULL;
1170 fra.me.REG[4] = NIT_NULL;
1171 fra.me.REG[5] = NIT_NULL;
1172 fra.me.REG[0] = p0;
1173 /* ../lib/standard/file.nit:246 */
1174 if (!once_value_1) {
1175 fra.me.REG[1] = BOX_NativeString("/");
1176 REGB0 = TAG_Int(1);
1177 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB0);
1178 once_value_1 = fra.me.REG[1];
1179 register_static_object(&once_value_1);
1180 } else fra.me.REG[1] = once_value_1;
1181 fra.me.REG[1] = fra.me.REG[1];
1182 fra.me.REG[1] = CALL_standard___string_search___String___split_with(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
1183 /* ../lib/standard/file.nit:247 */
1184 fra.me.REG[0] = NEW_Array_standard___collection___array___Array___init();
1185 /* ../lib/standard/collection/array.nit:269 */
1186 REGB0 = TAG_Int(0);
1187 /* ../lib/standard/collection/array.nit:270 */
1188 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1189 if (UNTAG_Bool(REGB1)) {
1190 } else {
1191 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
1192 }
1193 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1194 /* ../lib/standard/collection/array.nit:271 */
1195 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[1]);
1196 /* ../lib/standard/collection/array.nit:272 */
1197 while(1) {
1198 /* ../lib/standard/collection/array.nit:24 */
1199 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1200 if (UNTAG_Bool(REGB1)) {
1201 } else {
1202 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1203 }
1204 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1205 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1206 if (UNTAG_Bool(REGB2)) {
1207 } else {
1208 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1209 }
1210 /* ../lib/standard/kernel.nit:232 */
1211 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1212 /* ../lib/standard/collection/array.nit:272 */
1213 if (UNTAG_Bool(REGB1)) {
1214 /* ../lib/standard/collection/array.nit:273 */
1215 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1216 if (UNTAG_Bool(REGB1)) {
1217 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
1218 }
1219 /* ../lib/standard/collection/array.nit:718 */
1220 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
1221 /* ../lib/standard/file.nit:249 */
1222 if (!once_value_2) {
1223 fra.me.REG[4] = BOX_NativeString(".");
1224 REGB1 = TAG_Int(1);
1225 fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB1);
1226 once_value_2 = fra.me.REG[4];
1227 register_static_object(&once_value_2);
1228 } else fra.me.REG[4] = once_value_2;
1229 fra.me.REG[4] = fra.me.REG[4];
1230 REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[4]));
1231 if (UNTAG_Bool(REGB1)) {
1232 } else {
1233 REGB2 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
1234 REGB1 = REGB2;
1235 }
1236 if (UNTAG_Bool(REGB1)) {
1237 goto label3;
1238 }
1239 /* ../lib/standard/file.nit:250 */
1240 if (!once_value_4) {
1241 fra.me.REG[4] = BOX_NativeString("");
1242 REGB1 = TAG_Int(0);
1243 fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB1);
1244 once_value_4 = fra.me.REG[4];
1245 register_static_object(&once_value_4);
1246 } else fra.me.REG[4] = once_value_4;
1247 fra.me.REG[4] = fra.me.REG[4];
1248 REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[4]));
1249 if (UNTAG_Bool(REGB1)) {
1250 } else {
1251 REGB2 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
1252 REGB1 = REGB2;
1253 }
1254 if (UNTAG_Bool(REGB1)) {
1255 REGB1 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]);
1256 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
1257 } else {
1258 REGB2 = TAG_Bool(false);
1259 REGB1 = REGB2;
1260 }
1261 if (UNTAG_Bool(REGB1)) {
1262 goto label3;
1263 }
1264 /* ../lib/standard/file.nit:251 */
1265 if (!once_value_5) {
1266 fra.me.REG[4] = BOX_NativeString("..");
1267 REGB1 = TAG_Int(2);
1268 fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB1);
1269 once_value_5 = fra.me.REG[4];
1270 register_static_object(&once_value_5);
1271 } else fra.me.REG[4] = once_value_5;
1272 fra.me.REG[4] = fra.me.REG[4];
1273 REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[4]));
1274 if (UNTAG_Bool(REGB1)) {
1275 } else {
1276 REGB2 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
1277 REGB1 = REGB2;
1278 }
1279 if (UNTAG_Bool(REGB1)) {
1280 REGB1 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]);
1281 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
1282 } else {
1283 REGB2 = TAG_Bool(false);
1284 REGB1 = REGB2;
1285 }
1286 if (UNTAG_Bool(REGB1)) {
1287 fra.me.REG[4] = CALL_standard___collection___abstract_collection___SequenceRead___last(fra.me.REG[0])(fra.me.REG[0]);
1288 if (!once_value_6) {
1289 fra.me.REG[5] = BOX_NativeString("..");
1290 REGB1 = TAG_Int(2);
1291 fra.me.REG[5] = NEW_String_standard___string___String___with_native(fra.me.REG[5], REGB1);
1292 once_value_6 = fra.me.REG[5];
1293 register_static_object(&once_value_6);
1294 } else fra.me.REG[5] = once_value_6;
1295 fra.me.REG[5] = fra.me.REG[5];
1296 REGB1 = TAG_Bool(IS_EQUAL_ON(fra.me.REG[5],fra.me.REG[4]));
1297 if (UNTAG_Bool(REGB1)) {
1298 } else {
1299 REGB2 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
1300 if (UNTAG_Bool(REGB2)) {
1301 REGB2 = TAG_Bool(false);
1302 REGB1 = REGB2;
1303 } else {
1304 REGB2 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
1305 REGB1 = REGB2;
1306 }
1307 }
1308 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
1309 } else {
1310 REGB2 = TAG_Bool(false);
1311 REGB1 = REGB2;
1312 }
1313 if (UNTAG_Bool(REGB1)) {
1314 /* ../lib/standard/file.nit:252 */
1315 CALL_standard___collection___abstract_collection___Sequence___pop(fra.me.REG[0])(fra.me.REG[0]);
1316 /* ../lib/standard/file.nit:253 */
1317 goto label3;
1318 }
1319 /* ../lib/standard/file.nit:255 */
1320 CALL_standard___collection___abstract_collection___Sequence___push(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
1321 label3: while(0);
1322 /* ../lib/standard/collection/array.nit:274 */
1323 REGB1 = TAG_Int(1);
1324 /* ../lib/standard/kernel.nit:235 */
1325 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1326 /* ../lib/standard/collection/array.nit:274 */
1327 REGB0 = REGB1;
1328 } else {
1329 /* ../lib/standard/collection/array.nit:272 */
1330 goto label7;
1331 }
1332 }
1333 label7: while(0);
1334 /* ../lib/standard/file.nit:257 */
1335 if (!once_value_8) {
1336 fra.me.REG[2] = BOX_NativeString("/");
1337 REGB0 = TAG_Int(1);
1338 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
1339 once_value_8 = fra.me.REG[2];
1340 register_static_object(&once_value_8);
1341 } else fra.me.REG[2] = once_value_8;
1342 fra.me.REG[2] = fra.me.REG[2];
1343 fra.me.REG[2] = CALL_standard___string___Collection___join(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
1344 goto label9;
1345 label9: while(0);
1346 stack_frame_head = fra.me.prev;
1347 return fra.me.REG[2];
1348 }
1349 val_t standard___file___String___join_path(val_t p0, val_t p1){
1350 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
1351 val_t REGB0;
1352 val_t REGB1;
1353 val_t REGB2;
1354 val_t tmp;
1355 static val_t once_value_2; /* Once value */
1356 static val_t once_value_3; /* Once value */
1357 static val_t once_value_4; /* Once value */
1358 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1359 fra.me.file = LOCATE_standard___file;
1360 fra.me.line = 260;
1361 fra.me.meth = LOCATE_standard___file___String___join_path;
1362 fra.me.has_broke = 0;
1363 fra.me.REG_size = 5;
1364 fra.me.nitni_local_ref_head = NULL;
1365 fra.me.REG[0] = NIT_NULL;
1366 fra.me.REG[1] = NIT_NULL;
1367 fra.me.REG[2] = NIT_NULL;
1368 fra.me.REG[3] = NIT_NULL;
1369 fra.me.REG[4] = NIT_NULL;
1370 fra.me.REG[0] = p0;
1371 fra.me.REG[1] = p1;
1372 /* ../lib/standard/file.nit:277 */
1373 REGB0 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[1])(fra.me.REG[1]);
1374 if (UNTAG_Bool(REGB0)) {
1375 fra.me.REG[2] = fra.me.REG[0];
1376 goto label1;
1377 }
1378 /* ../lib/standard/file.nit:278 */
1379 REGB0 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[0])(fra.me.REG[0]);
1380 if (UNTAG_Bool(REGB0)) {
1381 fra.me.REG[2] = fra.me.REG[1];
1382 goto label1;
1383 }
1384 /* ../lib/standard/file.nit:279 */
1385 REGB0 = TAG_Int(0);
1386 REGB0 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB0);
1387 REGB1 = TAG_Char('/');
1388 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
1389 if (UNTAG_Bool(REGB2)) {
1390 } else {
1391 /* ../lib/standard/kernel.nit:378 */
1392 REGB1 = TAG_Bool((REGB0)==(REGB1));
1393 /* ../lib/standard/file.nit:279 */
1394 REGB2 = REGB1;
1395 }
1396 if (UNTAG_Bool(REGB2)) {
1397 fra.me.REG[2] = fra.me.REG[1];
1398 goto label1;
1399 }
1400 /* ../lib/standard/file.nit:280 */
1401 REGB2 = TAG_Int(5);
1402 fra.me.REG[3] = NEW_Array_standard___collection___array___Array___with_capacity(REGB2);
1403 if (!once_value_2) {
1404 fra.me.REG[4] = BOX_NativeString("");
1405 REGB2 = TAG_Int(0);
1406 fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB2);
1407 once_value_2 = fra.me.REG[4];
1408 register_static_object(&once_value_2);
1409 } else fra.me.REG[4] = once_value_2;
1410 fra.me.REG[4] = fra.me.REG[4];
1411 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
1412 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
1413 if (!once_value_3) {
1414 fra.me.REG[0] = BOX_NativeString("/");
1415 REGB2 = TAG_Int(1);
1416 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB2);
1417 once_value_3 = fra.me.REG[0];
1418 register_static_object(&once_value_3);
1419 } else fra.me.REG[0] = once_value_3;
1420 fra.me.REG[0] = fra.me.REG[0];
1421 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
1422 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
1423 if (!once_value_4) {
1424 fra.me.REG[1] = BOX_NativeString("");
1425 REGB2 = TAG_Int(0);
1426 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB2);
1427 once_value_4 = fra.me.REG[1];
1428 register_static_object(&once_value_4);
1429 } else fra.me.REG[1] = once_value_4;
1430 fra.me.REG[1] = fra.me.REG[1];
1431 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
1432 fra.me.REG[3] = CALL_standard___string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
1433 fra.me.REG[2] = fra.me.REG[3];
1434 goto label1;
1435 label1: while(0);
1436 stack_frame_head = fra.me.prev;
1437 return fra.me.REG[2];
1438 }
1439 void standard___file___String___mkdir(val_t p0){
1440 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
1441 val_t REGB0;
1442 val_t REGB1;
1443 val_t REGB2;
1444 val_t tmp;
1445 static val_t once_value_1; /* Once value */
1446 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1447 fra.me.file = LOCATE_standard___file;
1448 fra.me.line = 283;
1449 fra.me.meth = LOCATE_standard___file___String___mkdir;
1450 fra.me.has_broke = 0;
1451 fra.me.REG_size = 4;
1452 fra.me.nitni_local_ref_head = NULL;
1453 fra.me.REG[0] = NIT_NULL;
1454 fra.me.REG[1] = NIT_NULL;
1455 fra.me.REG[2] = NIT_NULL;
1456 fra.me.REG[3] = NIT_NULL;
1457 fra.me.REG[0] = p0;
1458 /* ../lib/standard/file.nit:286 */
1459 if (!once_value_1) {
1460 fra.me.REG[1] = BOX_NativeString("/");
1461 REGB0 = TAG_Int(1);
1462 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB0);
1463 once_value_1 = fra.me.REG[1];
1464 register_static_object(&once_value_1);
1465 } else fra.me.REG[1] = once_value_1;
1466 fra.me.REG[1] = fra.me.REG[1];
1467 fra.me.REG[1] = CALL_standard___string_search___String___split_with(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
1468 /* ../lib/standard/file.nit:287 */
1469 fra.me.REG[0] = NEW_Buffer_standard___string___Buffer___init();
1470 /* ../lib/standard/file.nit:288 */
1471 REGB0 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[1])(fra.me.REG[1]);
1472 if (UNTAG_Bool(REGB0)) {
1473 goto label2;
1474 }
1475 /* ../lib/standard/file.nit:289 */
1476 REGB0 = TAG_Int(0);
1477 /* ../lib/standard/collection/array.nit:278 */
1478 fra.me.REG[2] = fra.me.REG[1];
1479 /* ../lib/standard/collection/array.nit:280 */
1480 REGB1 = TAG_Int(0);
1481 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1482 if (UNTAG_Bool(REGB2)) {
1483 } else {
1484 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1485 }
1486 /* ../lib/standard/kernel.nit:233 */
1487 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
1488 /* ../lib/standard/collection/array.nit:280 */
1489 if (UNTAG_Bool(REGB1)) {
1490 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1491 if (UNTAG_Bool(REGB1)) {
1492 } else {
1493 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
1494 }
1495 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
1496 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1497 if (UNTAG_Bool(REGB2)) {
1498 } else {
1499 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1500 }
1501 /* ../lib/standard/kernel.nit:232 */
1502 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1503 } else {
1504 /* ../lib/standard/collection/array.nit:280 */
1505 REGB2 = TAG_Bool(false);
1506 REGB1 = REGB2;
1507 }
1508 if (UNTAG_Bool(REGB1)) {
1509 } else {
1510 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
1511 }
1512 /* ../lib/standard/collection/array.nit:281 */
1513 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
1514 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1515 if (UNTAG_Bool(REGB1)) {
1516 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
1517 }
1518 /* ../lib/standard/collection/array.nit:718 */
1519 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
1520 /* ../lib/standard/collection/array.nit:281 */
1521 goto label3;
1522 label3: while(0);
1523 /* ../lib/standard/file.nit:289 */
1524 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1525 if (UNTAG_Bool(REGB0)) {
1526 nit_abort("Reciever is null", NULL, LOCATE_standard___file, 289);
1527 }
1528 REGB0 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[2])(fra.me.REG[2]);
1529 if (UNTAG_Bool(REGB0)) {
1530 /* ../lib/standard/file.nit:291 */
1531 REGB0 = TAG_Char('/');
1532 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB0);
1533 }
1534 /* ../lib/standard/collection/array.nit:269 */
1535 REGB0 = TAG_Int(0);
1536 /* ../lib/standard/collection/array.nit:270 */
1537 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1538 if (UNTAG_Bool(REGB1)) {
1539 } else {
1540 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
1541 }
1542 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1543 /* ../lib/standard/collection/array.nit:271 */
1544 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[1]);
1545 /* ../lib/standard/collection/array.nit:272 */
1546 while(1) {
1547 /* ../lib/standard/collection/array.nit:24 */
1548 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1549 if (UNTAG_Bool(REGB1)) {
1550 } else {
1551 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1552 }
1553 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1554 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1555 if (UNTAG_Bool(REGB2)) {
1556 } else {
1557 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1558 }
1559 /* ../lib/standard/kernel.nit:232 */
1560 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1561 /* ../lib/standard/collection/array.nit:272 */
1562 if (UNTAG_Bool(REGB1)) {
1563 /* ../lib/standard/collection/array.nit:273 */
1564 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1565 if (UNTAG_Bool(REGB1)) {
1566 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
1567 }
1568 /* ../lib/standard/collection/array.nit:718 */
1569 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
1570 /* ../lib/standard/file.nit:294 */
1571 REGB1 = CALL_standard___collection___abstract_collection___Collection___is_empty(fra.me.REG[3])(fra.me.REG[3]);
1572 if (UNTAG_Bool(REGB1)) {
1573 goto label4;
1574 }
1575 /* ../lib/standard/file.nit:295 */
1576 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
1577 /* ../lib/standard/file.nit:296 */
1578 REGB1 = TAG_Char('/');
1579 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], REGB1);
1580 /* ../lib/standard/file.nit:297 */
1581 fra.me.REG[3] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
1582 fra.me.REG[3] = CALL_standard___string___String___to_cstring(fra.me.REG[3])(fra.me.REG[3]);
1583 CALL_standard___file___NativeString___file_mkdir(fra.me.REG[3])(fra.me.REG[3]);
1584 label4: while(0);
1585 /* ../lib/standard/collection/array.nit:274 */
1586 REGB1 = TAG_Int(1);
1587 /* ../lib/standard/kernel.nit:235 */
1588 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1589 /* ../lib/standard/collection/array.nit:274 */
1590 REGB0 = REGB1;
1591 } else {
1592 /* ../lib/standard/collection/array.nit:272 */
1593 goto label5;
1594 }
1595 }
1596 label5: while(0);
1597 label2: while(0);
1598 stack_frame_head = fra.me.prev;
1599 return;
1600 }
1601 val_t standard___file___String___file_extension(val_t p0){
1602 struct {struct stack_frame_t me;} fra;
1603 val_t REGB0;
1604 val_t REGB1;
1605 val_t REGB2;
1606 val_t tmp;
1607 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1608 fra.me.file = LOCATE_standard___file;
1609 fra.me.line = 301;
1610 fra.me.meth = LOCATE_standard___file___String___file_extension;
1611 fra.me.has_broke = 0;
1612 fra.me.REG_size = 1;
1613 fra.me.nitni_local_ref_head = NULL;
1614 fra.me.REG[0] = NIT_NULL;
1615 fra.me.REG[0] = p0;
1616 /* ../lib/standard/file.nit:304 */
1617 REGB0 = TAG_Char('.');
1618 REGB0 = CALL_standard___collection___array___AbstractArrayRead___last_index_of(fra.me.REG[0])(fra.me.REG[0], REGB0);
1619 /* ../lib/standard/file.nit:305 */
1620 REGB1 = TAG_Int(0);
1621 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1622 if (UNTAG_Bool(REGB2)) {
1623 } else {
1624 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1625 }
1626 /* ../lib/standard/kernel.nit:233 */
1627 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
1628 /* ../lib/standard/file.nit:305 */
1629 if (UNTAG_Bool(REGB1)) {
1630 /* ../lib/standard/file.nit:306 */
1631 REGB1 = TAG_Int(1);
1632 /* ../lib/standard/kernel.nit:235 */
1633 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1634 /* ../lib/standard/collection/array.nit:24 */
1635 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1636 if (UNTAG_Bool(REGB0)) {
1637 } else {
1638 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1639 }
1640 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1641 /* ../lib/standard/file.nit:306 */
1642 fra.me.REG[0] = CALL_standard___string___AbstractString___substring(fra.me.REG[0])(fra.me.REG[0], REGB1, REGB0);
1643 goto label1;
1644 } else {
1645 /* ../lib/standard/file.nit:308 */
1646 fra.me.REG[0] = NIT_NULL;
1647 goto label1;
1648 }
1649 label1: while(0);
1650 stack_frame_head = fra.me.prev;
1651 return fra.me.REG[0];
1652 }
1653 val_t standard___file___String___files(val_t p0){
1654 struct {struct stack_frame_t me;} fra;
1655 val_t tmp;
1656 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1657 fra.me.file = LOCATE_standard___file;
1658 fra.me.line = 312;
1659 fra.me.meth = LOCATE_standard___file___String___files;
1660 fra.me.has_broke = 0;
1661 fra.me.REG_size = 1;
1662 fra.me.nitni_local_ref_head = NULL;
1663 fra.me.REG[0] = NIT_NULL;
1664 fra.me.REG[0] = p0;
1665 /* ../lib/standard/file.nit:312 */
1666 fra.me.REG[0] = String_files___out(fra.me.REG[0]);
1667 ;
1668 ;
1669 ;
1670 ;
1671 stack_frame_head = fra.me.prev;
1672 return fra.me.REG[0];
1673 }
1674 val_t standard___file___NativeString___file_exists(val_t p0){
1675 struct {struct stack_frame_t me;} fra;
1676 val_t REGB0;
1677 val_t tmp;
1678 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1679 fra.me.file = LOCATE_standard___file;
1680 fra.me.line = 317;
1681 fra.me.meth = LOCATE_standard___file___NativeString___file_exists;
1682 fra.me.has_broke = 0;
1683 fra.me.REG_size = 1;
1684 fra.me.nitni_local_ref_head = NULL;
1685 fra.me.REG[0] = NIT_NULL;
1686 fra.me.REG[0] = p0;
1687 /* ../lib/standard/file.nit:317 */
1688 REGB0 = NativeString_file_exists___out(fra.me.REG[0]);
1689 stack_frame_head = fra.me.prev;
1690 return REGB0;
1691 }
1692 val_t standard___file___NativeString___file_stat(val_t p0){
1693 struct {struct stack_frame_t me;} fra;
1694 val_t tmp;
1695 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1696 fra.me.file = LOCATE_standard___file;
1697 fra.me.line = 318;
1698 fra.me.meth = LOCATE_standard___file___NativeString___file_stat;
1699 fra.me.has_broke = 0;
1700 fra.me.REG_size = 1;
1701 fra.me.nitni_local_ref_head = NULL;
1702 fra.me.REG[0] = NIT_NULL;
1703 fra.me.REG[0] = p0;
1704 /* ../lib/standard/file.nit:318 */
1705 fra.me.REG[0] = NativeString_file_stat___out(fra.me.REG[0]);
1706 stack_frame_head = fra.me.prev;
1707 return fra.me.REG[0];
1708 }
1709 val_t standard___file___NativeString___file_mkdir(val_t p0){
1710 struct {struct stack_frame_t me;} fra;
1711 val_t REGB0;
1712 val_t tmp;
1713 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1714 fra.me.file = LOCATE_standard___file;
1715 fra.me.line = 319;
1716 fra.me.meth = LOCATE_standard___file___NativeString___file_mkdir;
1717 fra.me.has_broke = 0;
1718 fra.me.REG_size = 1;
1719 fra.me.nitni_local_ref_head = NULL;
1720 fra.me.REG[0] = NIT_NULL;
1721 fra.me.REG[0] = p0;
1722 /* ../lib/standard/file.nit:319 */
1723 REGB0 = NativeString_file_mkdir___out(fra.me.REG[0]);
1724 stack_frame_head = fra.me.prev;
1725 return REGB0;
1726 }
1727 val_t standard___file___NativeString___file_delete(val_t p0){
1728 struct {struct stack_frame_t me;} fra;
1729 val_t REGB0;
1730 val_t tmp;
1731 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1732 fra.me.file = LOCATE_standard___file;
1733 fra.me.line = 320;
1734 fra.me.meth = LOCATE_standard___file___NativeString___file_delete;
1735 fra.me.has_broke = 0;
1736 fra.me.REG_size = 1;
1737 fra.me.nitni_local_ref_head = NULL;
1738 fra.me.REG[0] = NIT_NULL;
1739 fra.me.REG[0] = p0;
1740 /* ../lib/standard/file.nit:320 */
1741 REGB0 = NativeString_file_delete___out(fra.me.REG[0]);
1742 stack_frame_head = fra.me.prev;
1743 return REGB0;
1744 }
1745 val_t standard___file___FileStat___mode(val_t p0){
1746 struct {struct stack_frame_t me;} fra;
1747 val_t REGB0;
1748 val_t tmp;
1749 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1750 fra.me.file = LOCATE_standard___file;
1751 fra.me.line = 324;
1752 fra.me.meth = LOCATE_standard___file___FileStat___mode;
1753 fra.me.has_broke = 0;
1754 fra.me.REG_size = 1;
1755 fra.me.nitni_local_ref_head = NULL;
1756 fra.me.REG[0] = NIT_NULL;
1757 fra.me.REG[0] = p0;
1758 /* ../lib/standard/file.nit:324 */
1759 REGB0 = FileStat_mode___out(fra.me.REG[0]);
1760 stack_frame_head = fra.me.prev;
1761 return REGB0;
1762 }
1763 val_t standard___file___FileStat___atime(val_t p0){
1764 struct {struct stack_frame_t me;} fra;
1765 val_t REGB0;
1766 val_t tmp;
1767 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1768 fra.me.file = LOCATE_standard___file;
1769 fra.me.line = 326;
1770 fra.me.meth = LOCATE_standard___file___FileStat___atime;
1771 fra.me.has_broke = 0;
1772 fra.me.REG_size = 1;
1773 fra.me.nitni_local_ref_head = NULL;
1774 fra.me.REG[0] = NIT_NULL;
1775 fra.me.REG[0] = p0;
1776 /* ../lib/standard/file.nit:326 */
1777 REGB0 = FileStat_atime___out(fra.me.REG[0]);
1778 stack_frame_head = fra.me.prev;
1779 return REGB0;
1780 }
1781 val_t standard___file___FileStat___ctime(val_t p0){
1782 struct {struct stack_frame_t me;} fra;
1783 val_t REGB0;
1784 val_t tmp;
1785 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1786 fra.me.file = LOCATE_standard___file;
1787 fra.me.line = 327;
1788 fra.me.meth = LOCATE_standard___file___FileStat___ctime;
1789 fra.me.has_broke = 0;
1790 fra.me.REG_size = 1;
1791 fra.me.nitni_local_ref_head = NULL;
1792 fra.me.REG[0] = NIT_NULL;
1793 fra.me.REG[0] = p0;
1794 /* ../lib/standard/file.nit:327 */
1795 REGB0 = FileStat_ctime___out(fra.me.REG[0]);
1796 stack_frame_head = fra.me.prev;
1797 return REGB0;
1798 }
1799 val_t standard___file___FileStat___mtime(val_t p0){
1800 struct {struct stack_frame_t me;} fra;
1801 val_t REGB0;
1802 val_t tmp;
1803 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1804 fra.me.file = LOCATE_standard___file;
1805 fra.me.line = 328;
1806 fra.me.meth = LOCATE_standard___file___FileStat___mtime;
1807 fra.me.has_broke = 0;
1808 fra.me.REG_size = 1;
1809 fra.me.nitni_local_ref_head = NULL;
1810 fra.me.REG[0] = NIT_NULL;
1811 fra.me.REG[0] = p0;
1812 /* ../lib/standard/file.nit:328 */
1813 REGB0 = FileStat_mtime___out(fra.me.REG[0]);
1814 stack_frame_head = fra.me.prev;
1815 return REGB0;
1816 }
1817 val_t standard___file___FileStat___size(val_t p0){
1818 struct {struct stack_frame_t me;} fra;
1819 val_t REGB0;
1820 val_t tmp;
1821 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1822 fra.me.file = LOCATE_standard___file;
1823 fra.me.line = 329;
1824 fra.me.meth = LOCATE_standard___file___FileStat___size;
1825 fra.me.has_broke = 0;
1826 fra.me.REG_size = 1;
1827 fra.me.nitni_local_ref_head = NULL;
1828 fra.me.REG[0] = NIT_NULL;
1829 fra.me.REG[0] = p0;
1830 /* ../lib/standard/file.nit:329 */
1831 REGB0 = FileStat_size___out(fra.me.REG[0]);
1832 stack_frame_head = fra.me.prev;
1833 return REGB0;
1834 }
1835 val_t standard___file___NativeFile___io_read(val_t p0, val_t p1, val_t p2){
1836 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1837 val_t REGB0;
1838 val_t tmp;
1839 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1840 fra.me.file = LOCATE_standard___file;
1841 fra.me.line = 334;
1842 fra.me.meth = LOCATE_standard___file___NativeFile___io_read;
1843 fra.me.has_broke = 0;
1844 fra.me.REG_size = 2;
1845 fra.me.nitni_local_ref_head = NULL;
1846 fra.me.REG[0] = NIT_NULL;
1847 fra.me.REG[1] = NIT_NULL;
1848 fra.me.REG[0] = p0;
1849 fra.me.REG[1] = p1;
1850 REGB0 = p2;
1851 /* ../lib/standard/file.nit:334 */
1852 REGB0 = NativeFile_io_read___out(fra.me.REG[0], fra.me.REG[1], REGB0);
1853 stack_frame_head = fra.me.prev;
1854 return REGB0;
1855 }
1856 val_t standard___file___NativeFile___io_write(val_t p0, val_t p1, val_t p2){
1857 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1858 val_t REGB0;
1859 val_t tmp;
1860 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1861 fra.me.file = LOCATE_standard___file;
1862 fra.me.line = 335;
1863 fra.me.meth = LOCATE_standard___file___NativeFile___io_write;
1864 fra.me.has_broke = 0;
1865 fra.me.REG_size = 2;
1866 fra.me.nitni_local_ref_head = NULL;
1867 fra.me.REG[0] = NIT_NULL;
1868 fra.me.REG[1] = NIT_NULL;
1869 fra.me.REG[0] = p0;
1870 fra.me.REG[1] = p1;
1871 REGB0 = p2;
1872 /* ../lib/standard/file.nit:335 */
1873 REGB0 = NativeFile_io_write___out(fra.me.REG[0], fra.me.REG[1], REGB0);
1874 stack_frame_head = fra.me.prev;
1875 return REGB0;
1876 }
1877 val_t standard___file___NativeFile___io_close(val_t p0){
1878 struct {struct stack_frame_t me;} fra;
1879 val_t REGB0;
1880 val_t tmp;
1881 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1882 fra.me.file = LOCATE_standard___file;
1883 fra.me.line = 336;
1884 fra.me.meth = LOCATE_standard___file___NativeFile___io_close;
1885 fra.me.has_broke = 0;
1886 fra.me.REG_size = 1;
1887 fra.me.nitni_local_ref_head = NULL;
1888 fra.me.REG[0] = NIT_NULL;
1889 fra.me.REG[0] = p0;
1890 /* ../lib/standard/file.nit:336 */
1891 REGB0 = NativeFile_io_close___out(fra.me.REG[0]);
1892 stack_frame_head = fra.me.prev;
1893 return REGB0;
1894 }
1895 val_t standard___file___NativeFile___file_stat(val_t p0){
1896 struct {struct stack_frame_t me;} fra;
1897 val_t tmp;
1898 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1899 fra.me.file = LOCATE_standard___file;
1900 fra.me.line = 337;
1901 fra.me.meth = LOCATE_standard___file___NativeFile___file_stat;
1902 fra.me.has_broke = 0;
1903 fra.me.REG_size = 1;
1904 fra.me.nitni_local_ref_head = NULL;
1905 fra.me.REG[0] = NIT_NULL;
1906 fra.me.REG[0] = p0;
1907 /* ../lib/standard/file.nit:337 */
1908 fra.me.REG[0] = NativeFile_file_stat___out(fra.me.REG[0]);
1909 stack_frame_head = fra.me.prev;
1910 return fra.me.REG[0];
1911 }
1912 void standard___file___NativeFile___io_open_read(val_t p0, val_t p1, int* init_table){
1913 int itpos10 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___NativeFile].i;
1914 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1915 val_t tmp;
1916 if (init_table[itpos10]) return;
1917 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1918 fra.me.file = LOCATE_standard___file;
1919 fra.me.line = 339;
1920 fra.me.meth = LOCATE_standard___file___NativeFile___io_open_read;
1921 fra.me.has_broke = 0;
1922 fra.me.REG_size = 2;
1923 fra.me.nitni_local_ref_head = NULL;
1924 fra.me.REG[0] = NIT_NULL;
1925 fra.me.REG[1] = NIT_NULL;
1926 fra.me.REG[0] = p0;
1927 fra.me.REG[1] = p1;
1928 /* ../lib/standard/file.nit:339 */
1929 stack_frame_head = fra.me.prev;
1930 init_table[itpos10] = 1;
1931 return;
1932 }
1933 void standard___file___NativeFile___io_open_write(val_t p0, val_t p1, int* init_table){
1934 int itpos11 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___NativeFile].i;
1935 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1936 val_t tmp;
1937 if (init_table[itpos11]) return;
1938 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1939 fra.me.file = LOCATE_standard___file;
1940 fra.me.line = 340;
1941 fra.me.meth = LOCATE_standard___file___NativeFile___io_open_write;
1942 fra.me.has_broke = 0;
1943 fra.me.REG_size = 2;
1944 fra.me.nitni_local_ref_head = NULL;
1945 fra.me.REG[0] = NIT_NULL;
1946 fra.me.REG[1] = NIT_NULL;
1947 fra.me.REG[0] = p0;
1948 fra.me.REG[1] = p1;
1949 /* ../lib/standard/file.nit:340 */
1950 stack_frame_head = fra.me.prev;
1951 init_table[itpos11] = 1;
1952 return;
1953 }
1954 void standard___file___NativeFile___native_stdin(val_t p0, int* init_table){
1955 int itpos12 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___NativeFile].i;
1956 struct {struct stack_frame_t me;} fra;
1957 val_t tmp;
1958 if (init_table[itpos12]) return;
1959 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1960 fra.me.file = LOCATE_standard___file;
1961 fra.me.line = 341;
1962 fra.me.meth = LOCATE_standard___file___NativeFile___native_stdin;
1963 fra.me.has_broke = 0;
1964 fra.me.REG_size = 1;
1965 fra.me.nitni_local_ref_head = NULL;
1966 fra.me.REG[0] = NIT_NULL;
1967 fra.me.REG[0] = p0;
1968 /* ../lib/standard/file.nit:341 */
1969 stack_frame_head = fra.me.prev;
1970 init_table[itpos12] = 1;
1971 return;
1972 }
1973 void standard___file___NativeFile___native_stdout(val_t p0, int* init_table){
1974 int itpos13 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___NativeFile].i;
1975 struct {struct stack_frame_t me;} fra;
1976 val_t tmp;
1977 if (init_table[itpos13]) return;
1978 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1979 fra.me.file = LOCATE_standard___file;
1980 fra.me.line = 342;
1981 fra.me.meth = LOCATE_standard___file___NativeFile___native_stdout;
1982 fra.me.has_broke = 0;
1983 fra.me.REG_size = 1;
1984 fra.me.nitni_local_ref_head = NULL;
1985 fra.me.REG[0] = NIT_NULL;
1986 fra.me.REG[0] = p0;
1987 /* ../lib/standard/file.nit:342 */
1988 stack_frame_head = fra.me.prev;
1989 init_table[itpos13] = 1;
1990 return;
1991 }
1992 void standard___file___NativeFile___native_stderr(val_t p0, int* init_table){
1993 int itpos14 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___file___NativeFile].i;
1994 struct {struct stack_frame_t me;} fra;
1995 val_t tmp;
1996 if (init_table[itpos14]) return;
1997 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1998 fra.me.file = LOCATE_standard___file;
1999 fra.me.line = 343;
2000 fra.me.meth = LOCATE_standard___file___NativeFile___native_stderr;
2001 fra.me.has_broke = 0;
2002 fra.me.REG_size = 1;
2003 fra.me.nitni_local_ref_head = NULL;
2004 fra.me.REG[0] = NIT_NULL;
2005 fra.me.REG[0] = p0;
2006 /* ../lib/standard/file.nit:343 */
2007 stack_frame_head = fra.me.prev;
2008 init_table[itpos14] = 1;
2009 return;
2010 }