Merge remote branch 'alexis/wip'
[nit.git] / c_src / standard___stream._sep.c
1 /* This C file is generated by NIT to compile module standard___stream. */
2 #include "standard___stream._sep.h"
3 void standard___stream___IOS___close(val_t p0){
4 struct {struct stack_frame_t me;} fra;
5 val_t tmp;
6 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
7 fra.me.file = LOCATE_standard___stream;
8 fra.me.line = 20;
9 fra.me.meth = LOCATE_standard___stream___IOS___close;
10 fra.me.has_broke = 0;
11 fra.me.REG_size = 0;
12 fra.me.nitni_local_ref_head = NULL;
13 /* ./../lib/standard//stream.nit:20 */
14 nit_abort("Deferred method called", NULL, LOCATE_standard___stream, 20);
15 stack_frame_head = fra.me.prev;
16 return;
17 }
18 void standard___stream___IOS___init(val_t p0, int* init_table){
19 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___stream___IOS].i;
20 struct {struct stack_frame_t me;} fra;
21 val_t tmp;
22 if (init_table[itpos0]) return;
23 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
24 fra.me.file = LOCATE_standard___stream;
25 fra.me.line = 0;
26 fra.me.meth = LOCATE_standard___stream___IOS___init;
27 fra.me.has_broke = 0;
28 fra.me.REG_size = 0;
29 fra.me.nitni_local_ref_head = NULL;
30 stack_frame_head = fra.me.prev;
31 init_table[itpos0] = 1;
32 return;
33 }
34 val_t standard___stream___IStream___read_char(val_t p0){
35 struct {struct stack_frame_t me;} fra;
36 val_t tmp;
37 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
38 fra.me.file = LOCATE_standard___stream;
39 fra.me.line = 27;
40 fra.me.meth = LOCATE_standard___stream___IStream___read_char;
41 fra.me.has_broke = 0;
42 fra.me.REG_size = 0;
43 fra.me.nitni_local_ref_head = NULL;
44 /* ./../lib/standard//stream.nit:27 */
45 nit_abort("Deferred method called", NULL, LOCATE_standard___stream, 27);
46 stack_frame_head = fra.me.prev;
47 return NIT_NULL;
48 }
49 val_t standard___stream___IStream___read(val_t p0, val_t p1){
50 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
51 val_t REGB0;
52 val_t REGB1;
53 val_t REGB2;
54 val_t REGB3;
55 val_t tmp;
56 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
57 fra.me.file = LOCATE_standard___stream;
58 fra.me.line = 30;
59 fra.me.meth = LOCATE_standard___stream___IStream___read;
60 fra.me.has_broke = 0;
61 fra.me.REG_size = 2;
62 fra.me.nitni_local_ref_head = NULL;
63 fra.me.REG[0] = NIT_NULL;
64 fra.me.REG[1] = NIT_NULL;
65 fra.me.REG[0] = p0;
66 REGB0 = p1;
67 /* ./../lib/standard//stream.nit:33 */
68 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB0);
69 /* ./../lib/standard//stream.nit:34 */
70 while(1) {
71 REGB1 = TAG_Int(0);
72 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
73 if (UNTAG_Bool(REGB2)) {
74 } else {
75 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
76 }
77 /* ./../lib/standard//kernel.nit:234 */
78 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
79 /* ./../lib/standard//stream.nit:34 */
80 if (UNTAG_Bool(REGB1)) {
81 REGB1 = CALL_standard___stream___IStream___eof(fra.me.REG[0])(fra.me.REG[0]);
82 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
83 } else {
84 REGB2 = TAG_Bool(false);
85 REGB1 = REGB2;
86 }
87 if (UNTAG_Bool(REGB1)) {
88 /* ./../lib/standard//stream.nit:35 */
89 REGB1 = CALL_standard___stream___IStream___read_char(fra.me.REG[0])(fra.me.REG[0]);
90 /* ./../lib/standard//stream.nit:36 */
91 REGB2 = TAG_Int(0);
92 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
93 if (UNTAG_Bool(REGB3)) {
94 } else {
95 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
96 }
97 /* ./../lib/standard//kernel.nit:233 */
98 REGB2 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB2));
99 /* ./../lib/standard//stream.nit:36 */
100 if (UNTAG_Bool(REGB2)) {
101 /* ./../lib/standard//kernel.nit:297 */
102 REGB1 = TAG_Char(UNTAG_Int(REGB1));
103 /* ./../lib/standard//stream.nit:37 */
104 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], REGB1);
105 /* ./../lib/standard//stream.nit:38 */
106 REGB1 = TAG_Int(1);
107 /* ./../lib/standard//kernel.nit:237 */
108 REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1));
109 /* ./../lib/standard//stream.nit:38 */
110 REGB0 = REGB1;
111 }
112 } else {
113 /* ./../lib/standard//stream.nit:34 */
114 goto label1;
115 }
116 }
117 label1: while(0);
118 /* ./../lib/standard//stream.nit:41 */
119 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
120 goto label2;
121 label2: while(0);
122 stack_frame_head = fra.me.prev;
123 return fra.me.REG[1];
124 }
125 val_t standard___stream___IStream___read_line(val_t p0){
126 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
127 val_t REGB0;
128 val_t tmp;
129 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
130 fra.me.file = LOCATE_standard___stream;
131 fra.me.line = 44;
132 fra.me.meth = LOCATE_standard___stream___IStream___read_line;
133 fra.me.has_broke = 0;
134 fra.me.REG_size = 2;
135 fra.me.nitni_local_ref_head = NULL;
136 fra.me.REG[0] = NIT_NULL;
137 fra.me.REG[1] = NIT_NULL;
138 fra.me.REG[0] = p0;
139 /* ./../lib/standard//stream.nit:47 */
140 REGB0 = CALL_standard___stream___IStream___eof(fra.me.REG[0])(fra.me.REG[0]);
141 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
142 if (UNTAG_Bool(REGB0)) {
143 } else {
144 nit_abort("Assert failed", NULL, LOCATE_standard___stream, 47);
145 }
146 /* ./../lib/standard//stream.nit:48 */
147 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___init();
148 /* ./../lib/standard//stream.nit:49 */
149 CALL_standard___stream___IStream___append_line_to(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
150 /* ./../lib/standard//stream.nit:50 */
151 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
152 goto label1;
153 label1: while(0);
154 stack_frame_head = fra.me.prev;
155 return fra.me.REG[1];
156 }
157 val_t standard___stream___IStream___read_all(val_t p0){
158 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
159 val_t REGB0;
160 val_t REGB1;
161 val_t REGB2;
162 val_t tmp;
163 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
164 fra.me.file = LOCATE_standard___stream;
165 fra.me.line = 53;
166 fra.me.meth = LOCATE_standard___stream___IStream___read_all;
167 fra.me.has_broke = 0;
168 fra.me.REG_size = 2;
169 fra.me.nitni_local_ref_head = NULL;
170 fra.me.REG[0] = NIT_NULL;
171 fra.me.REG[1] = NIT_NULL;
172 fra.me.REG[0] = p0;
173 /* ./../lib/standard//stream.nit:56 */
174 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___init();
175 /* ./../lib/standard//stream.nit:57 */
176 while(1) {
177 REGB0 = CALL_standard___stream___IStream___eof(fra.me.REG[0])(fra.me.REG[0]);
178 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
179 if (UNTAG_Bool(REGB0)) {
180 /* ./../lib/standard//stream.nit:58 */
181 REGB0 = CALL_standard___stream___IStream___read_char(fra.me.REG[0])(fra.me.REG[0]);
182 /* ./../lib/standard//stream.nit:59 */
183 REGB1 = TAG_Int(0);
184 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
185 if (UNTAG_Bool(REGB2)) {
186 } else {
187 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
188 }
189 /* ./../lib/standard//kernel.nit:233 */
190 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
191 /* ./../lib/standard//stream.nit:59 */
192 if (UNTAG_Bool(REGB1)) {
193 /* ./../lib/standard//kernel.nit:297 */
194 REGB0 = TAG_Char(UNTAG_Int(REGB0));
195 /* ./../lib/standard//stream.nit:59 */
196 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], REGB0);
197 }
198 } else {
199 /* ./../lib/standard//stream.nit:57 */
200 goto label1;
201 }
202 }
203 label1: while(0);
204 /* ./../lib/standard//stream.nit:61 */
205 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
206 goto label2;
207 label2: while(0);
208 stack_frame_head = fra.me.prev;
209 return fra.me.REG[1];
210 }
211 void standard___stream___IStream___append_line_to(val_t p0, val_t p1){
212 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
213 val_t REGB0;
214 val_t REGB1;
215 val_t REGB2;
216 val_t tmp;
217 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
218 fra.me.file = LOCATE_standard___stream;
219 fra.me.line = 64;
220 fra.me.meth = LOCATE_standard___stream___IStream___append_line_to;
221 fra.me.has_broke = 0;
222 fra.me.REG_size = 2;
223 fra.me.nitni_local_ref_head = NULL;
224 fra.me.REG[0] = NIT_NULL;
225 fra.me.REG[1] = NIT_NULL;
226 fra.me.REG[0] = p0;
227 fra.me.REG[1] = p1;
228 /* ./../lib/standard//stream.nit:67 */
229 while(1) {
230 /* ./../lib/standard//stream.nit:68 */
231 REGB0 = CALL_standard___stream___IStream___read_char(fra.me.REG[0])(fra.me.REG[0]);
232 /* ./../lib/standard//stream.nit:69 */
233 REGB1 = TAG_Int(1);
234 /* ./../lib/standard//kernel.nit:236 */
235 REGB1 = TAG_Int(-UNTAG_Int(REGB1));
236 /* ./../lib/standard//stream.nit:69 */
237 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
238 if (UNTAG_Bool(REGB2)) {
239 } else {
240 /* ./../lib/standard//kernel.nit:227 */
241 REGB1 = TAG_Bool((REGB0)==(REGB1));
242 /* ./../lib/standard//stream.nit:69 */
243 REGB2 = REGB1;
244 }
245 if (UNTAG_Bool(REGB2)) {
246 /* ./../lib/standard//stream.nit:70 */
247 REGB2 = CALL_standard___stream___IStream___eof(fra.me.REG[0])(fra.me.REG[0]);
248 if (UNTAG_Bool(REGB2)) {
249 goto label1;
250 }
251 } else {
252 /* ./../lib/standard//kernel.nit:297 */
253 REGB0 = TAG_Char(UNTAG_Int(REGB0));
254 /* ./../lib/standard//stream.nit:73 */
255 CALL_standard___collection___abstract_collection___Sequence___push(fra.me.REG[1])(fra.me.REG[1], REGB0);
256 /* ./../lib/standard//stream.nit:74 */
257 REGB2 = TAG_Char('\n');
258 REGB1 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB2));
259 if (UNTAG_Bool(REGB1)) {
260 } else {
261 /* ./../lib/standard//kernel.nit:378 */
262 REGB2 = TAG_Bool((REGB0)==(REGB2));
263 /* ./../lib/standard//stream.nit:74 */
264 REGB1 = REGB2;
265 }
266 if (UNTAG_Bool(REGB1)) {
267 goto label1;
268 }
269 }
270 }
271 label1: while(0);
272 stack_frame_head = fra.me.prev;
273 return;
274 }
275 val_t standard___stream___IStream___eof(val_t p0){
276 struct {struct stack_frame_t me;} fra;
277 val_t tmp;
278 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
279 fra.me.file = LOCATE_standard___stream;
280 fra.me.line = 79;
281 fra.me.meth = LOCATE_standard___stream___IStream___eof;
282 fra.me.has_broke = 0;
283 fra.me.REG_size = 0;
284 fra.me.nitni_local_ref_head = NULL;
285 /* ./../lib/standard//stream.nit:79 */
286 nit_abort("Deferred method called", NULL, LOCATE_standard___stream, 79);
287 stack_frame_head = fra.me.prev;
288 return NIT_NULL;
289 }
290 void standard___stream___OStream___write(val_t p0, val_t p1){
291 struct {struct stack_frame_t me;} fra;
292 val_t tmp;
293 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
294 fra.me.file = LOCATE_standard___stream;
295 fra.me.line = 86;
296 fra.me.meth = LOCATE_standard___stream___OStream___write;
297 fra.me.has_broke = 0;
298 fra.me.REG_size = 0;
299 fra.me.nitni_local_ref_head = NULL;
300 /* ./../lib/standard//stream.nit:86 */
301 nit_abort("Deferred method called", NULL, LOCATE_standard___stream, 86);
302 stack_frame_head = fra.me.prev;
303 return;
304 }
305 val_t standard___stream___OStream___is_writable(val_t p0){
306 struct {struct stack_frame_t me;} fra;
307 val_t tmp;
308 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
309 fra.me.file = LOCATE_standard___stream;
310 fra.me.line = 89;
311 fra.me.meth = LOCATE_standard___stream___OStream___is_writable;
312 fra.me.has_broke = 0;
313 fra.me.REG_size = 0;
314 fra.me.nitni_local_ref_head = NULL;
315 /* ./../lib/standard//stream.nit:89 */
316 nit_abort("Deferred method called", NULL, LOCATE_standard___stream, 89);
317 stack_frame_head = fra.me.prev;
318 return NIT_NULL;
319 }
320 val_t standard___stream___BufferedIStream___read_char(val_t p0){
321 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
322 val_t REGB0;
323 val_t REGB1;
324 val_t REGB2;
325 val_t REGB3;
326 val_t tmp;
327 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
328 fra.me.file = LOCATE_standard___stream;
329 fra.me.line = 96;
330 fra.me.meth = LOCATE_standard___stream___BufferedIStream___read_char;
331 fra.me.has_broke = 0;
332 fra.me.REG_size = 2;
333 fra.me.nitni_local_ref_head = NULL;
334 fra.me.REG[0] = NIT_NULL;
335 fra.me.REG[1] = NIT_NULL;
336 fra.me.REG[0] = p0;
337 /* ./../lib/standard//stream.nit:98 */
338 REGB0 = CALL_standard___stream___IStream___eof(fra.me.REG[0])(fra.me.REG[0]);
339 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
340 if (UNTAG_Bool(REGB0)) {
341 } else {
342 nit_abort("Assert failed", NULL, LOCATE_standard___stream, 98);
343 }
344 /* ./../lib/standard//stream.nit:99 */
345 REGB0 = TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
346 if (UNTAG_Bool(REGB0)) {
347 } else {
348 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream, 99);
349 }
350 REGB0 = ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
351 fra.me.REG[1] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
352 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
353 if (UNTAG_Bool(REGB1)) {
354 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 99);
355 }
356 /* ./../lib/standard//collection//array.nit:24 */
357 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
358 if (UNTAG_Bool(REGB1)) {
359 } else {
360 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
361 }
362 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
363 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
364 if (UNTAG_Bool(REGB2)) {
365 } else {
366 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
367 }
368 /* ./../lib/standard//kernel.nit:233 */
369 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
370 /* ./../lib/standard//stream.nit:99 */
371 if (UNTAG_Bool(REGB1)) {
372 /* ./../lib/standard//stream.nit:100 */
373 CALL_standard___stream___BufferedIStream___fill_buffer(fra.me.REG[0])(fra.me.REG[0]);
374 }
375 /* ./../lib/standard//stream.nit:102 */
376 REGB1 = TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
377 if (UNTAG_Bool(REGB1)) {
378 } else {
379 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream, 102);
380 }
381 REGB1 = ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
382 fra.me.REG[1] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
383 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
384 if (UNTAG_Bool(REGB0)) {
385 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 102);
386 }
387 /* ./../lib/standard//collection//array.nit:24 */
388 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
389 if (UNTAG_Bool(REGB0)) {
390 } else {
391 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
392 }
393 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
394 REGB2 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
395 if (UNTAG_Bool(REGB2)) {
396 } else {
397 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
398 }
399 /* ./../lib/standard//kernel.nit:233 */
400 REGB0 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB0));
401 /* ./../lib/standard//stream.nit:102 */
402 if (UNTAG_Bool(REGB0)) {
403 /* ./../lib/standard//stream.nit:103 */
404 REGB0 = TAG_Int(1);
405 /* ./../lib/standard//kernel.nit:236 */
406 REGB0 = TAG_Int(-UNTAG_Int(REGB0));
407 /* ./../lib/standard//stream.nit:103 */
408 goto label1;
409 }
410 /* ./../lib/standard//stream.nit:105 */
411 fra.me.REG[1] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
412 REGB1 = TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
413 if (UNTAG_Bool(REGB1)) {
414 } else {
415 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream, 105);
416 }
417 REGB1 = ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
418 REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
419 if (UNTAG_Bool(REGB2)) {
420 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 105);
421 }
422 REGB1 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB1);
423 /* ./../lib/standard//stream.nit:106 */
424 REGB2 = ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
425 REGB3 = TAG_Int(1);
426 /* ./../lib/standard//kernel.nit:235 */
427 REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
428 /* ./../lib/standard//stream.nit:106 */
429 ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB3;
430 /* ./../lib/standard//kernel.nit:413 */
431 REGB1 = TAG_Int((unsigned char)UNTAG_Char(REGB1));
432 /* ./../lib/standard//stream.nit:107 */
433 REGB0 = REGB1;
434 goto label1;
435 label1: while(0);
436 stack_frame_head = fra.me.prev;
437 return REGB0;
438 }
439 val_t standard___stream___BufferedIStream___read(val_t p0, val_t p1){
440 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
441 val_t REGB0;
442 val_t REGB1;
443 val_t REGB2;
444 val_t REGB3;
445 val_t REGB4;
446 val_t tmp;
447 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
448 fra.me.file = LOCATE_standard___stream;
449 fra.me.line = 110;
450 fra.me.meth = LOCATE_standard___stream___BufferedIStream___read;
451 fra.me.has_broke = 0;
452 fra.me.REG_size = 4;
453 fra.me.nitni_local_ref_head = NULL;
454 fra.me.REG[0] = NIT_NULL;
455 fra.me.REG[1] = NIT_NULL;
456 fra.me.REG[2] = NIT_NULL;
457 fra.me.REG[3] = NIT_NULL;
458 fra.me.REG[0] = p0;
459 REGB0 = p1;
460 /* ./../lib/standard//stream.nit:112 */
461 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB0);
462 /* ./../lib/standard//stream.nit:113 */
463 REGB1 = TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
464 if (UNTAG_Bool(REGB1)) {
465 } else {
466 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream, 113);
467 }
468 REGB1 = ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
469 /* ./../lib/standard//stream.nit:114 */
470 fra.me.REG[2] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
471 REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
472 if (UNTAG_Bool(REGB2)) {
473 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 114);
474 }
475 /* ./../lib/standard//collection//array.nit:24 */
476 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
477 if (UNTAG_Bool(REGB2)) {
478 } else {
479 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
480 }
481 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
482 /* ./../lib/standard//stream.nit:115 */
483 while(1) {
484 REGB3 = TAG_Int(0);
485 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
486 if (UNTAG_Bool(REGB4)) {
487 } else {
488 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
489 }
490 /* ./../lib/standard//kernel.nit:234 */
491 REGB3 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB3));
492 /* ./../lib/standard//stream.nit:115 */
493 if (UNTAG_Bool(REGB3)) {
494 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
495 if (UNTAG_Bool(REGB3)) {
496 } else {
497 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
498 }
499 /* ./../lib/standard//kernel.nit:233 */
500 REGB3 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB2));
501 /* ./../lib/standard//stream.nit:116 */
502 if (UNTAG_Bool(REGB3)) {
503 /* ./../lib/standard//stream.nit:117 */
504 CALL_standard___stream___BufferedIStream___fill_buffer(fra.me.REG[0])(fra.me.REG[0]);
505 /* ./../lib/standard//stream.nit:118 */
506 REGB3 = CALL_standard___stream___IStream___eof(fra.me.REG[0])(fra.me.REG[0]);
507 if (UNTAG_Bool(REGB3)) {
508 fra.me.REG[2] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
509 goto label1;
510 }
511 /* ./../lib/standard//stream.nit:119 */
512 REGB3 = TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
513 if (UNTAG_Bool(REGB3)) {
514 } else {
515 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream, 119);
516 }
517 REGB3 = ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
518 REGB1 = REGB3;
519 /* ./../lib/standard//stream.nit:120 */
520 fra.me.REG[3] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
521 REGB3 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
522 if (UNTAG_Bool(REGB3)) {
523 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 120);
524 }
525 /* ./../lib/standard//collection//array.nit:24 */
526 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
527 if (UNTAG_Bool(REGB3)) {
528 } else {
529 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
530 }
531 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
532 /* ./../lib/standard//stream.nit:120 */
533 REGB2 = REGB3;
534 }
535 /* ./../lib/standard//stream.nit:122 */
536 while(1) {
537 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
538 if (UNTAG_Bool(REGB3)) {
539 } else {
540 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
541 }
542 /* ./../lib/standard//kernel.nit:232 */
543 REGB3 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
544 /* ./../lib/standard//stream.nit:122 */
545 if (UNTAG_Bool(REGB3)) {
546 REGB3 = TAG_Int(0);
547 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
548 if (UNTAG_Bool(REGB4)) {
549 } else {
550 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
551 }
552 /* ./../lib/standard//kernel.nit:234 */
553 REGB3 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB3));
554 } else {
555 /* ./../lib/standard//stream.nit:122 */
556 REGB4 = TAG_Bool(false);
557 REGB3 = REGB4;
558 }
559 if (UNTAG_Bool(REGB3)) {
560 /* ./../lib/standard//stream.nit:123 */
561 fra.me.REG[3] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
562 REGB3 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
563 if (UNTAG_Bool(REGB3)) {
564 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 123);
565 }
566 REGB3 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[3])(fra.me.REG[3], REGB1);
567 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], REGB3);
568 /* ./../lib/standard//stream.nit:124 */
569 REGB3 = TAG_Int(1);
570 /* ./../lib/standard//kernel.nit:235 */
571 REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
572 /* ./../lib/standard//stream.nit:124 */
573 REGB1 = REGB3;
574 /* ./../lib/standard//stream.nit:125 */
575 REGB3 = TAG_Int(1);
576 /* ./../lib/standard//kernel.nit:237 */
577 REGB3 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB3));
578 /* ./../lib/standard//stream.nit:125 */
579 REGB0 = REGB3;
580 } else {
581 /* ./../lib/standard//stream.nit:122 */
582 goto label2;
583 }
584 }
585 label2: while(0);
586 } else {
587 /* ./../lib/standard//stream.nit:115 */
588 goto label3;
589 }
590 }
591 label3: while(0);
592 /* ./../lib/standard//stream.nit:128 */
593 ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB1;
594 /* ./../lib/standard//stream.nit:129 */
595 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
596 fra.me.REG[2] = fra.me.REG[1];
597 goto label1;
598 label1: while(0);
599 stack_frame_head = fra.me.prev;
600 return fra.me.REG[2];
601 }
602 val_t standard___stream___BufferedIStream___read_all(val_t p0){
603 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
604 val_t REGB0;
605 val_t REGB1;
606 val_t REGB2;
607 val_t tmp;
608 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
609 fra.me.file = LOCATE_standard___stream;
610 fra.me.line = 132;
611 fra.me.meth = LOCATE_standard___stream___BufferedIStream___read_all;
612 fra.me.has_broke = 0;
613 fra.me.REG_size = 3;
614 fra.me.nitni_local_ref_head = NULL;
615 fra.me.REG[0] = NIT_NULL;
616 fra.me.REG[1] = NIT_NULL;
617 fra.me.REG[2] = NIT_NULL;
618 fra.me.REG[0] = p0;
619 /* ./../lib/standard//stream.nit:134 */
620 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___init();
621 /* ./../lib/standard//stream.nit:135 */
622 while(1) {
623 REGB0 = CALL_standard___stream___IStream___eof(fra.me.REG[0])(fra.me.REG[0]);
624 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
625 if (UNTAG_Bool(REGB0)) {
626 /* ./../lib/standard//stream.nit:136 */
627 REGB0 = TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
628 if (UNTAG_Bool(REGB0)) {
629 } else {
630 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream, 136);
631 }
632 REGB0 = ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
633 /* ./../lib/standard//stream.nit:137 */
634 fra.me.REG[2] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
635 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
636 if (UNTAG_Bool(REGB1)) {
637 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 137);
638 }
639 /* ./../lib/standard//collection//array.nit:24 */
640 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
641 if (UNTAG_Bool(REGB1)) {
642 } else {
643 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
644 }
645 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
646 /* ./../lib/standard//stream.nit:138 */
647 while(1) {
648 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
649 if (UNTAG_Bool(REGB2)) {
650 } else {
651 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
652 }
653 /* ./../lib/standard//kernel.nit:232 */
654 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
655 /* ./../lib/standard//stream.nit:138 */
656 if (UNTAG_Bool(REGB2)) {
657 /* ./../lib/standard//stream.nit:139 */
658 fra.me.REG[2] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
659 REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
660 if (UNTAG_Bool(REGB2)) {
661 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 139);
662 }
663 REGB2 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[2])(fra.me.REG[2], REGB0);
664 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], REGB2);
665 /* ./../lib/standard//stream.nit:140 */
666 REGB2 = TAG_Int(1);
667 /* ./../lib/standard//kernel.nit:235 */
668 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
669 /* ./../lib/standard//stream.nit:140 */
670 REGB0 = REGB2;
671 } else {
672 /* ./../lib/standard//stream.nit:138 */
673 goto label1;
674 }
675 }
676 label1: while(0);
677 /* ./../lib/standard//stream.nit:142 */
678 ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB0;
679 /* ./../lib/standard//stream.nit:143 */
680 CALL_standard___stream___BufferedIStream___fill_buffer(fra.me.REG[0])(fra.me.REG[0]);
681 } else {
682 /* ./../lib/standard//stream.nit:135 */
683 goto label2;
684 }
685 }
686 label2: while(0);
687 /* ./../lib/standard//stream.nit:145 */
688 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
689 goto label3;
690 label3: while(0);
691 stack_frame_head = fra.me.prev;
692 return fra.me.REG[1];
693 }
694 void standard___stream___BufferedIStream___append_line_to(val_t p0, val_t p1){
695 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
696 val_t REGB0;
697 val_t REGB1;
698 val_t REGB2;
699 val_t REGB3;
700 val_t tmp;
701 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
702 fra.me.file = LOCATE_standard___stream;
703 fra.me.line = 148;
704 fra.me.meth = LOCATE_standard___stream___BufferedIStream___append_line_to;
705 fra.me.has_broke = 0;
706 fra.me.REG_size = 3;
707 fra.me.nitni_local_ref_head = NULL;
708 fra.me.REG[0] = NIT_NULL;
709 fra.me.REG[1] = NIT_NULL;
710 fra.me.REG[2] = NIT_NULL;
711 fra.me.REG[0] = p0;
712 fra.me.REG[1] = p1;
713 /* ./../lib/standard//stream.nit:150 */
714 while(1) {
715 /* ./../lib/standard//stream.nit:152 */
716 REGB0 = TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
717 if (UNTAG_Bool(REGB0)) {
718 } else {
719 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream, 152);
720 }
721 REGB0 = ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
722 /* ./../lib/standard//stream.nit:153 */
723 while(1) {
724 fra.me.REG[2] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
725 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
726 if (UNTAG_Bool(REGB1)) {
727 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 153);
728 }
729 /* ./../lib/standard//collection//array.nit:24 */
730 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
731 if (UNTAG_Bool(REGB1)) {
732 } else {
733 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
734 }
735 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
736 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
737 if (UNTAG_Bool(REGB2)) {
738 } else {
739 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
740 }
741 /* ./../lib/standard//kernel.nit:232 */
742 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
743 /* ./../lib/standard//stream.nit:153 */
744 if (UNTAG_Bool(REGB1)) {
745 fra.me.REG[2] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
746 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
747 if (UNTAG_Bool(REGB1)) {
748 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 153);
749 }
750 REGB1 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[2])(fra.me.REG[2], REGB0);
751 REGB2 = TAG_Char('\n');
752 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB2));
753 if (UNTAG_Bool(REGB3)) {
754 } else {
755 /* ./../lib/standard//kernel.nit:378 */
756 REGB2 = TAG_Bool((REGB1)==(REGB2));
757 /* ./../lib/standard//stream.nit:153 */
758 REGB3 = REGB2;
759 }
760 REGB3 = TAG_Bool(!UNTAG_Bool(REGB3));
761 } else {
762 REGB2 = TAG_Bool(false);
763 REGB3 = REGB2;
764 }
765 if (UNTAG_Bool(REGB3)) {
766 REGB3 = TAG_Int(1);
767 /* ./../lib/standard//kernel.nit:235 */
768 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
769 /* ./../lib/standard//stream.nit:153 */
770 REGB0 = REGB3;
771 } else {
772 goto label1;
773 }
774 }
775 label1: while(0);
776 /* ./../lib/standard//stream.nit:156 */
777 REGB3 = TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
778 if (UNTAG_Bool(REGB3)) {
779 } else {
780 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream, 156);
781 }
782 REGB3 = ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
783 REGB2 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
784 if (UNTAG_Bool(REGB2)) {
785 } else {
786 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
787 }
788 /* ./../lib/standard//kernel.nit:234 */
789 REGB3 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB3));
790 /* ./../lib/standard//stream.nit:156 */
791 if (UNTAG_Bool(REGB3)) {
792 /* ./../lib/standard//collection//array.nit:24 */
793 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
794 if (UNTAG_Bool(REGB3)) {
795 } else {
796 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
797 }
798 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
799 /* ./../lib/standard//kernel.nit:235 */
800 REGB3 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB0));
801 /* ./../lib/standard//stream.nit:158 */
802 REGB2 = TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
803 if (UNTAG_Bool(REGB2)) {
804 } else {
805 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream, 158);
806 }
807 REGB2 = ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
808 /* ./../lib/standard//kernel.nit:237 */
809 REGB2 = TAG_Int(UNTAG_Int(REGB3)-UNTAG_Int(REGB2));
810 /* ./../lib/standard//stream.nit:158 */
811 CALL_standard___collection___array___AbstractArray___enlarge(fra.me.REG[1])(fra.me.REG[1], REGB2);
812 /* ./../lib/standard//stream.nit:161 */
813 REGB2 = TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
814 if (UNTAG_Bool(REGB2)) {
815 } else {
816 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream, 161);
817 }
818 REGB2 = ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
819 /* ./../lib/standard//stream.nit:162 */
820 while(1) {
821 REGB3 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
822 if (UNTAG_Bool(REGB3)) {
823 } else {
824 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
825 }
826 /* ./../lib/standard//kernel.nit:232 */
827 REGB3 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB0));
828 /* ./../lib/standard//stream.nit:162 */
829 if (UNTAG_Bool(REGB3)) {
830 /* ./../lib/standard//stream.nit:163 */
831 fra.me.REG[2] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
832 REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
833 if (UNTAG_Bool(REGB3)) {
834 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 163);
835 }
836 REGB3 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[2])(fra.me.REG[2], REGB2);
837 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], REGB3);
838 /* ./../lib/standard//stream.nit:164 */
839 REGB3 = TAG_Int(1);
840 /* ./../lib/standard//kernel.nit:235 */
841 REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
842 /* ./../lib/standard//stream.nit:164 */
843 REGB2 = REGB3;
844 } else {
845 /* ./../lib/standard//stream.nit:162 */
846 goto label2;
847 }
848 }
849 label2: while(0);
850 }
851 /* ./../lib/standard//stream.nit:168 */
852 fra.me.REG[2] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
853 REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
854 if (UNTAG_Bool(REGB2)) {
855 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 168);
856 }
857 /* ./../lib/standard//collection//array.nit:24 */
858 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
859 if (UNTAG_Bool(REGB2)) {
860 } else {
861 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
862 }
863 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
864 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
865 if (UNTAG_Bool(REGB3)) {
866 } else {
867 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
868 }
869 /* ./../lib/standard//kernel.nit:232 */
870 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
871 /* ./../lib/standard//stream.nit:168 */
872 if (UNTAG_Bool(REGB2)) {
873 /* ./../lib/standard//stream.nit:170 */
874 REGB2 = TAG_Int(1);
875 /* ./../lib/standard//kernel.nit:235 */
876 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
877 /* ./../lib/standard//stream.nit:170 */
878 ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB2;
879 /* ./../lib/standard//stream.nit:171 */
880 goto label3;
881 } else {
882 /* ./../lib/standard//stream.nit:174 */
883 ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB0;
884 /* ./../lib/standard//stream.nit:175 */
885 REGB0 = CALL_standard___stream___BufferedIStream___end_reached(fra.me.REG[0])(fra.me.REG[0]);
886 if (UNTAG_Bool(REGB0)) {
887 /* ./../lib/standard//stream.nit:176 */
888 goto label3;
889 } else {
890 /* ./../lib/standard//stream.nit:178 */
891 CALL_standard___stream___BufferedIStream___fill_buffer(fra.me.REG[0])(fra.me.REG[0]);
892 }
893 }
894 }
895 label3: while(0);
896 stack_frame_head = fra.me.prev;
897 return;
898 }
899 val_t standard___stream___BufferedIStream___eof(val_t p0){
900 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
901 val_t REGB0;
902 val_t REGB1;
903 val_t REGB2;
904 val_t tmp;
905 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
906 fra.me.file = LOCATE_standard___stream;
907 fra.me.line = 184;
908 fra.me.meth = LOCATE_standard___stream___BufferedIStream___eof;
909 fra.me.has_broke = 0;
910 fra.me.REG_size = 2;
911 fra.me.nitni_local_ref_head = NULL;
912 fra.me.REG[0] = NIT_NULL;
913 fra.me.REG[1] = NIT_NULL;
914 fra.me.REG[0] = p0;
915 /* ./../lib/standard//stream.nit:184 */
916 REGB0 = TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
917 if (UNTAG_Bool(REGB0)) {
918 } else {
919 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream, 184);
920 }
921 REGB0 = ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
922 fra.me.REG[1] = ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]);
923 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
924 if (UNTAG_Bool(REGB1)) {
925 nit_abort("Reciever is null", NULL, LOCATE_standard___stream, 184);
926 }
927 /* ./../lib/standard//collection//array.nit:24 */
928 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
929 if (UNTAG_Bool(REGB1)) {
930 } else {
931 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
932 }
933 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
934 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
935 if (UNTAG_Bool(REGB2)) {
936 } else {
937 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
938 }
939 /* ./../lib/standard//kernel.nit:233 */
940 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
941 /* ./../lib/standard//stream.nit:184 */
942 if (UNTAG_Bool(REGB1)) {
943 REGB1 = CALL_standard___stream___BufferedIStream___end_reached(fra.me.REG[0])(fra.me.REG[0]);
944 } else {
945 REGB0 = TAG_Bool(false);
946 REGB1 = REGB0;
947 }
948 goto label1;
949 label1: while(0);
950 stack_frame_head = fra.me.prev;
951 return REGB1;
952 }
953 void standard___stream___BufferedIStream___fill_buffer(val_t p0){
954 struct {struct stack_frame_t me;} fra;
955 val_t tmp;
956 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
957 fra.me.file = LOCATE_standard___stream;
958 fra.me.line = 192;
959 fra.me.meth = LOCATE_standard___stream___BufferedIStream___fill_buffer;
960 fra.me.has_broke = 0;
961 fra.me.REG_size = 0;
962 fra.me.nitni_local_ref_head = NULL;
963 /* ./../lib/standard//stream.nit:192 */
964 nit_abort("Deferred method called", NULL, LOCATE_standard___stream, 192);
965 stack_frame_head = fra.me.prev;
966 return;
967 }
968 val_t standard___stream___BufferedIStream___end_reached(val_t p0){
969 struct {struct stack_frame_t me;} fra;
970 val_t tmp;
971 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
972 fra.me.file = LOCATE_standard___stream;
973 fra.me.line = 195;
974 fra.me.meth = LOCATE_standard___stream___BufferedIStream___end_reached;
975 fra.me.has_broke = 0;
976 fra.me.REG_size = 0;
977 fra.me.nitni_local_ref_head = NULL;
978 /* ./../lib/standard//stream.nit:195 */
979 nit_abort("Deferred method called", NULL, LOCATE_standard___stream, 195);
980 stack_frame_head = fra.me.prev;
981 return NIT_NULL;
982 }
983 void standard___stream___BufferedIStream___prepare_buffer(val_t p0, val_t p1){
984 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
985 val_t REGB0;
986 val_t tmp;
987 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
988 fra.me.file = LOCATE_standard___stream;
989 fra.me.line = 198;
990 fra.me.meth = LOCATE_standard___stream___BufferedIStream___prepare_buffer;
991 fra.me.has_broke = 0;
992 fra.me.REG_size = 2;
993 fra.me.nitni_local_ref_head = NULL;
994 fra.me.REG[0] = NIT_NULL;
995 fra.me.REG[1] = NIT_NULL;
996 fra.me.REG[0] = p0;
997 REGB0 = p1;
998 /* ./../lib/standard//stream.nit:201 */
999 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB0);
1000 ATTR_standard___stream___BufferedIStream____buffer(fra.me.REG[0]) = fra.me.REG[1];
1001 /* ./../lib/standard//stream.nit:202 */
1002 REGB0 = TAG_Int(0);
1003 ATTR_standard___stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB0;
1004 stack_frame_head = fra.me.prev;
1005 return;
1006 }
1007 void standard___stream___FDStream___close(val_t p0){
1008 struct {struct stack_frame_t me;} fra;
1009 val_t REGB0;
1010 val_t tmp;
1011 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1012 fra.me.file = LOCATE_standard___stream;
1013 fra.me.line = 218;
1014 fra.me.meth = LOCATE_standard___stream___FDStream___close;
1015 fra.me.has_broke = 0;
1016 fra.me.REG_size = 1;
1017 fra.me.nitni_local_ref_head = NULL;
1018 fra.me.REG[0] = NIT_NULL;
1019 fra.me.REG[0] = p0;
1020 /* ./../lib/standard//stream.nit:218 */
1021 REGB0 = TAG_Bool(ATTR_standard___stream___FDStream____fd(fra.me.REG[0])!=NIT_NULL);
1022 if (UNTAG_Bool(REGB0)) {
1023 } else {
1024 nit_abort("Uninitialized attribute %s", "_fd", LOCATE_standard___stream, 218);
1025 }
1026 REGB0 = ATTR_standard___stream___FDStream____fd(fra.me.REG[0]);
1027 CALL_standard___stream___FDStream___native_close(fra.me.REG[0])(fra.me.REG[0], REGB0);
1028 stack_frame_head = fra.me.prev;
1029 return;
1030 }
1031 val_t standard___stream___FDStream___native_close(val_t p0, val_t p1){
1032 struct {struct stack_frame_t me;} fra;
1033 val_t REGB0;
1034 val_t tmp;
1035 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1036 fra.me.file = LOCATE_standard___stream;
1037 fra.me.line = 220;
1038 fra.me.meth = LOCATE_standard___stream___FDStream___native_close;
1039 fra.me.has_broke = 0;
1040 fra.me.REG_size = 1;
1041 fra.me.nitni_local_ref_head = NULL;
1042 fra.me.REG[0] = NIT_NULL;
1043 fra.me.REG[0] = p0;
1044 REGB0 = p1;
1045 /* ./../lib/standard//stream.nit:220 */
1046 REGB0 = FDStream_native_close___out(fra.me.REG[0], REGB0);
1047 stack_frame_head = fra.me.prev;
1048 return REGB0;
1049 }
1050 val_t standard___stream___FDStream___native_read_char(val_t p0, val_t p1){
1051 struct {struct stack_frame_t me;} fra;
1052 val_t REGB0;
1053 val_t tmp;
1054 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1055 fra.me.file = LOCATE_standard___stream;
1056 fra.me.line = 221;
1057 fra.me.meth = LOCATE_standard___stream___FDStream___native_read_char;
1058 fra.me.has_broke = 0;
1059 fra.me.REG_size = 1;
1060 fra.me.nitni_local_ref_head = NULL;
1061 fra.me.REG[0] = NIT_NULL;
1062 fra.me.REG[0] = p0;
1063 REGB0 = p1;
1064 /* ./../lib/standard//stream.nit:221 */
1065 REGB0 = FDStream_native_read_char___out(fra.me.REG[0], REGB0);
1066 stack_frame_head = fra.me.prev;
1067 return REGB0;
1068 }
1069 val_t standard___stream___FDStream___native_read(val_t p0, val_t p1, val_t p2, val_t p3){
1070 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1071 val_t REGB0;
1072 val_t REGB1;
1073 val_t tmp;
1074 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1075 fra.me.file = LOCATE_standard___stream;
1076 fra.me.line = 222;
1077 fra.me.meth = LOCATE_standard___stream___FDStream___native_read;
1078 fra.me.has_broke = 0;
1079 fra.me.REG_size = 2;
1080 fra.me.nitni_local_ref_head = NULL;
1081 fra.me.REG[0] = NIT_NULL;
1082 fra.me.REG[1] = NIT_NULL;
1083 fra.me.REG[0] = p0;
1084 REGB0 = p1;
1085 fra.me.REG[1] = p2;
1086 REGB1 = p3;
1087 /* ./../lib/standard//stream.nit:222 */
1088 REGB1 = FDStream_native_read___out(fra.me.REG[0], REGB0, fra.me.REG[1], REGB1);
1089 stack_frame_head = fra.me.prev;
1090 return REGB1;
1091 }
1092 val_t standard___stream___FDStream___native_write(val_t p0, val_t p1, val_t p2, val_t p3){
1093 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1094 val_t REGB0;
1095 val_t REGB1;
1096 val_t tmp;
1097 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1098 fra.me.file = LOCATE_standard___stream;
1099 fra.me.line = 223;
1100 fra.me.meth = LOCATE_standard___stream___FDStream___native_write;
1101 fra.me.has_broke = 0;
1102 fra.me.REG_size = 2;
1103 fra.me.nitni_local_ref_head = NULL;
1104 fra.me.REG[0] = NIT_NULL;
1105 fra.me.REG[1] = NIT_NULL;
1106 fra.me.REG[0] = p0;
1107 REGB0 = p1;
1108 fra.me.REG[1] = p2;
1109 REGB1 = p3;
1110 /* ./../lib/standard//stream.nit:223 */
1111 REGB1 = FDStream_native_write___out(fra.me.REG[0], REGB0, fra.me.REG[1], REGB1);
1112 stack_frame_head = fra.me.prev;
1113 return REGB1;
1114 }
1115 void standard___stream___FDStream___init(val_t p0, val_t p1, int* init_table){
1116 int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___stream___FDStream].i;
1117 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1118 val_t REGB0;
1119 val_t tmp;
1120 if (init_table[itpos1]) return;
1121 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1122 fra.me.file = LOCATE_standard___stream;
1123 fra.me.line = 225;
1124 fra.me.meth = LOCATE_standard___stream___FDStream___init;
1125 fra.me.has_broke = 0;
1126 fra.me.REG_size = 2;
1127 fra.me.nitni_local_ref_head = NULL;
1128 fra.me.REG[0] = NIT_NULL;
1129 fra.me.REG[1] = NIT_NULL;
1130 fra.me.REG[0] = p0;
1131 REGB0 = p1;
1132 /* ./../lib/standard//stream.nit:225 */
1133 fra.me.REG[1] = fra.me.REG[0];
1134 CALL_standard___stream___IOS___init(fra.me.REG[0])(fra.me.REG[0], init_table);
1135 ATTR_standard___stream___FDStream____fd(fra.me.REG[1]) = REGB0;
1136 stack_frame_head = fra.me.prev;
1137 init_table[itpos1] = 1;
1138 return;
1139 }
1140 val_t standard___stream___FDIStream___eof(val_t p0){
1141 struct {struct stack_frame_t me;} fra;
1142 val_t REGB0;
1143 val_t tmp;
1144 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1145 fra.me.file = LOCATE_standard___stream;
1146 fra.me.line = 231;
1147 fra.me.meth = LOCATE_standard___stream___FDIStream___eof;
1148 fra.me.has_broke = 0;
1149 fra.me.REG_size = 1;
1150 fra.me.nitni_local_ref_head = NULL;
1151 fra.me.REG[0] = NIT_NULL;
1152 fra.me.REG[0] = p0;
1153 /* ./../lib/standard//stream.nit:231 */
1154 REGB0 = TAG_Bool(ATTR_standard___stream___FDIStream____eof(fra.me.REG[0])!=NIT_NULL);
1155 if (UNTAG_Bool(REGB0)) {
1156 } else {
1157 nit_abort("Uninitialized attribute %s", "_eof", LOCATE_standard___stream, 231);
1158 }
1159 REGB0 = ATTR_standard___stream___FDIStream____eof(fra.me.REG[0]);
1160 stack_frame_head = fra.me.prev;
1161 return REGB0;
1162 }
1163 val_t standard___stream___FDIStream___read_char(val_t p0){
1164 struct {struct stack_frame_t me;} fra;
1165 val_t REGB0;
1166 val_t REGB1;
1167 val_t REGB2;
1168 val_t tmp;
1169 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1170 fra.me.file = LOCATE_standard___stream;
1171 fra.me.line = 233;
1172 fra.me.meth = LOCATE_standard___stream___FDIStream___read_char;
1173 fra.me.has_broke = 0;
1174 fra.me.REG_size = 1;
1175 fra.me.nitni_local_ref_head = NULL;
1176 fra.me.REG[0] = NIT_NULL;
1177 fra.me.REG[0] = p0;
1178 /* ./../lib/standard//stream.nit:235 */
1179 REGB0 = TAG_Bool(ATTR_standard___stream___FDStream____fd(fra.me.REG[0])!=NIT_NULL);
1180 if (UNTAG_Bool(REGB0)) {
1181 } else {
1182 nit_abort("Uninitialized attribute %s", "_fd", LOCATE_standard___stream, 235);
1183 }
1184 REGB0 = ATTR_standard___stream___FDStream____fd(fra.me.REG[0]);
1185 REGB0 = CALL_standard___stream___FDStream___native_read_char(fra.me.REG[0])(fra.me.REG[0], REGB0);
1186 /* ./../lib/standard//stream.nit:236 */
1187 REGB1 = TAG_Int(1);
1188 /* ./../lib/standard//kernel.nit:236 */
1189 REGB1 = TAG_Int(-UNTAG_Int(REGB1));
1190 /* ./../lib/standard//stream.nit:236 */
1191 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
1192 if (UNTAG_Bool(REGB2)) {
1193 } else {
1194 /* ./../lib/standard//kernel.nit:227 */
1195 REGB1 = TAG_Bool((REGB0)==(REGB1));
1196 /* ./../lib/standard//stream.nit:236 */
1197 REGB2 = REGB1;
1198 }
1199 if (UNTAG_Bool(REGB2)) {
1200 REGB2 = TAG_Bool(true);
1201 ATTR_standard___stream___FDIStream____eof(fra.me.REG[0]) = REGB2;
1202 }
1203 /* ./../lib/standard//stream.nit:237 */
1204 goto label1;
1205 label1: while(0);
1206 stack_frame_head = fra.me.prev;
1207 return REGB0;
1208 }
1209 void standard___stream___FDIStream___init(val_t p0, val_t p1, int* init_table){
1210 int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___stream___FDIStream].i;
1211 struct {struct stack_frame_t me;} fra;
1212 val_t REGB0;
1213 val_t tmp;
1214 if (init_table[itpos2]) return;
1215 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1216 fra.me.file = LOCATE_standard___stream;
1217 fra.me.line = 240;
1218 fra.me.meth = LOCATE_standard___stream___FDIStream___init;
1219 fra.me.has_broke = 0;
1220 fra.me.REG_size = 1;
1221 fra.me.nitni_local_ref_head = NULL;
1222 fra.me.REG[0] = NIT_NULL;
1223 fra.me.REG[0] = p0;
1224 REGB0 = p1;
1225 /* ./../lib/standard//stream.nit:240 */
1226 CALL_standard___stream___FDStream___init(fra.me.REG[0])(fra.me.REG[0], REGB0, init_table);
1227 stack_frame_head = fra.me.prev;
1228 init_table[itpos2] = 1;
1229 return;
1230 }
1231 val_t standard___stream___FDOStream___is_writable(val_t p0){
1232 struct {struct stack_frame_t me;} fra;
1233 val_t REGB0;
1234 val_t tmp;
1235 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1236 fra.me.file = LOCATE_standard___stream;
1237 fra.me.line = 246;
1238 fra.me.meth = LOCATE_standard___stream___FDOStream___is_writable;
1239 fra.me.has_broke = 0;
1240 fra.me.REG_size = 1;
1241 fra.me.nitni_local_ref_head = NULL;
1242 fra.me.REG[0] = NIT_NULL;
1243 fra.me.REG[0] = p0;
1244 /* ./../lib/standard//stream.nit:246 */
1245 REGB0 = TAG_Bool(ATTR_standard___stream___FDOStream____is_writable(fra.me.REG[0])!=NIT_NULL);
1246 if (UNTAG_Bool(REGB0)) {
1247 } else {
1248 nit_abort("Uninitialized attribute %s", "_is_writable", LOCATE_standard___stream, 246);
1249 }
1250 REGB0 = ATTR_standard___stream___FDOStream____is_writable(fra.me.REG[0]);
1251 stack_frame_head = fra.me.prev;
1252 return REGB0;
1253 }
1254 void standard___stream___FDOStream___write(val_t p0, val_t p1){
1255 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1256 val_t REGB0;
1257 val_t REGB1;
1258 val_t REGB2;
1259 val_t tmp;
1260 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1261 fra.me.file = LOCATE_standard___stream;
1262 fra.me.line = 248;
1263 fra.me.meth = LOCATE_standard___stream___FDOStream___write;
1264 fra.me.has_broke = 0;
1265 fra.me.REG_size = 3;
1266 fra.me.nitni_local_ref_head = NULL;
1267 fra.me.REG[0] = NIT_NULL;
1268 fra.me.REG[1] = NIT_NULL;
1269 fra.me.REG[2] = NIT_NULL;
1270 fra.me.REG[0] = p0;
1271 fra.me.REG[1] = p1;
1272 /* ./../lib/standard//stream.nit:250 */
1273 REGB0 = TAG_Bool(ATTR_standard___stream___FDStream____fd(fra.me.REG[0])!=NIT_NULL);
1274 if (UNTAG_Bool(REGB0)) {
1275 } else {
1276 nit_abort("Uninitialized attribute %s", "_fd", LOCATE_standard___stream, 250);
1277 }
1278 REGB0 = ATTR_standard___stream___FDStream____fd(fra.me.REG[0]);
1279 fra.me.REG[2] = CALL_standard___string___String___to_cstring(fra.me.REG[1])(fra.me.REG[1]);
1280 /* ./../lib/standard//collection//array.nit:24 */
1281 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1282 if (UNTAG_Bool(REGB1)) {
1283 } else {
1284 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1285 }
1286 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1287 /* ./../lib/standard//stream.nit:250 */
1288 REGB1 = CALL_standard___stream___FDStream___native_write(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[2], REGB1);
1289 /* ./../lib/standard//collection//array.nit:24 */
1290 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1291 if (UNTAG_Bool(REGB0)) {
1292 } else {
1293 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1294 }
1295 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1296 REGB2 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1297 if (UNTAG_Bool(REGB2)) {
1298 } else {
1299 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1300 }
1301 /* ./../lib/standard//kernel.nit:232 */
1302 REGB0 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB0));
1303 /* ./../lib/standard//stream.nit:251 */
1304 if (UNTAG_Bool(REGB0)) {
1305 REGB0 = TAG_Bool(false);
1306 ATTR_standard___stream___FDOStream____is_writable(fra.me.REG[0]) = REGB0;
1307 }
1308 stack_frame_head = fra.me.prev;
1309 return;
1310 }
1311 void standard___stream___FDOStream___init(val_t p0, val_t p1, int* init_table){
1312 int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___stream___FDOStream].i;
1313 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1314 val_t REGB0;
1315 val_t tmp;
1316 if (init_table[itpos3]) return;
1317 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1318 fra.me.file = LOCATE_standard___stream;
1319 fra.me.line = 254;
1320 fra.me.meth = LOCATE_standard___stream___FDOStream___init;
1321 fra.me.has_broke = 0;
1322 fra.me.REG_size = 2;
1323 fra.me.nitni_local_ref_head = NULL;
1324 fra.me.REG[0] = NIT_NULL;
1325 fra.me.REG[1] = NIT_NULL;
1326 fra.me.REG[0] = p0;
1327 REGB0 = p1;
1328 /* ./../lib/standard//stream.nit:254 */
1329 fra.me.REG[1] = fra.me.REG[0];
1330 CALL_standard___stream___FDStream___init(fra.me.REG[0])(fra.me.REG[0], REGB0, init_table);
1331 /* ./../lib/standard//stream.nit:256 */
1332 REGB0 = TAG_Bool(true);
1333 ATTR_standard___stream___FDOStream____is_writable(fra.me.REG[1]) = REGB0;
1334 stack_frame_head = fra.me.prev;
1335 init_table[itpos3] = 1;
1336 return;
1337 }
1338 void standard___stream___FDIOStream___init(val_t p0, val_t p1, int* init_table){
1339 int itpos4 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___stream___FDIOStream].i;
1340 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1341 val_t REGB0;
1342 val_t REGB1;
1343 val_t tmp;
1344 if (init_table[itpos4]) return;
1345 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1346 fra.me.file = LOCATE_standard___stream;
1347 fra.me.line = 264;
1348 fra.me.meth = LOCATE_standard___stream___FDIOStream___init;
1349 fra.me.has_broke = 0;
1350 fra.me.REG_size = 2;
1351 fra.me.nitni_local_ref_head = NULL;
1352 fra.me.REG[0] = NIT_NULL;
1353 fra.me.REG[1] = NIT_NULL;
1354 fra.me.REG[0] = p0;
1355 REGB0 = p1;
1356 /* ./../lib/standard//stream.nit:264 */
1357 fra.me.REG[1] = fra.me.REG[0];
1358 REGB1 = REGB0;
1359 CALL_standard___stream___FDIStream___init(fra.me.REG[0])(fra.me.REG[0], REGB0, init_table);
1360 CALL_standard___stream___FDOStream___init(fra.me.REG[0])(fra.me.REG[0], REGB0, init_table);
1361 /* ./../lib/standard//stream.nit:266 */
1362 ATTR_standard___stream___FDStream____fd(fra.me.REG[1]) = REGB1;
1363 /* ./../lib/standard//stream.nit:267 */
1364 REGB1 = TAG_Bool(true);
1365 ATTR_standard___stream___FDOStream____is_writable(fra.me.REG[1]) = REGB1;
1366 stack_frame_head = fra.me.prev;
1367 init_table[itpos4] = 1;
1368 return;
1369 }