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
;
6 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
7 fra
.me
.file
= LOCATE_standard___stream
;
9 fra
.me
.meth
= LOCATE_standard___stream___IOS___close
;
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
;
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
;
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
;
26 fra
.me
.meth
= LOCATE_standard___stream___IOS___init
;
29 fra
.me
.nitni_local_ref_head
= NULL
;
30 stack_frame_head
= fra
.me
.prev
;
31 init_table
[itpos0
] = 1;
34 val_t
standard___stream___IStream___read_char(val_t p0
){
35 struct {struct stack_frame_t me
;} fra
;
37 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
38 fra
.me
.file
= LOCATE_standard___stream
;
40 fra
.me
.meth
= LOCATE_standard___stream___IStream___read_char
;
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
;
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
;
56 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
57 fra
.me
.file
= LOCATE_standard___stream
;
59 fra
.me
.meth
= LOCATE_standard___stream___IStream___read
;
62 fra
.me
.nitni_local_ref_head
= NULL
;
63 fra
.me
.REG
[0] = NIT_NULL
;
64 fra
.me
.REG
[1] = NIT_NULL
;
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 */
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
)) {
75 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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
));
84 REGB2
= TAG_Bool(false);
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 */
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
)) {
95 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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 */
107 /* ./../lib/standard//kernel.nit:237 */
108 REGB1
= TAG_Int(UNTAG_Int(REGB0
)-UNTAG_Int(REGB1
));
109 /* ./../lib/standard//stream.nit:38 */
113 /* ./../lib/standard//stream.nit:34 */
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]);
122 stack_frame_head
= fra
.me
.prev
;
123 return fra
.me
.REG
[1];
125 val_t
standard___stream___IStream___read_line(val_t p0
){
126 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
129 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
130 fra
.me
.file
= LOCATE_standard___stream
;
132 fra
.me
.meth
= LOCATE_standard___stream___IStream___read_line
;
133 fra
.me
.has_broke
= 0;
135 fra
.me
.nitni_local_ref_head
= NULL
;
136 fra
.me
.REG
[0] = NIT_NULL
;
137 fra
.me
.REG
[1] = NIT_NULL
;
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
)) {
144 nit_abort("Assert failed", NULL
, LOCATE_standard___stream
, 47);
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]);
154 stack_frame_head
= fra
.me
.prev
;
155 return fra
.me
.REG
[1];
157 val_t
standard___stream___IStream___read_all(val_t p0
){
158 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
163 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
164 fra
.me
.file
= LOCATE_standard___stream
;
166 fra
.me
.meth
= LOCATE_standard___stream___IStream___read_all
;
167 fra
.me
.has_broke
= 0;
169 fra
.me
.nitni_local_ref_head
= NULL
;
170 fra
.me
.REG
[0] = NIT_NULL
;
171 fra
.me
.REG
[1] = NIT_NULL
;
173 /* ./../lib/standard//stream.nit:56 */
174 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___init();
175 /* ./../lib/standard//stream.nit:57 */
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 */
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
)) {
187 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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
);
199 /* ./../lib/standard//stream.nit:57 */
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]);
208 stack_frame_head
= fra
.me
.prev
;
209 return fra
.me
.REG
[1];
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
;
217 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
218 fra
.me
.file
= LOCATE_standard___stream
;
220 fra
.me
.meth
= LOCATE_standard___stream___IStream___append_line_to
;
221 fra
.me
.has_broke
= 0;
223 fra
.me
.nitni_local_ref_head
= NULL
;
224 fra
.me
.REG
[0] = NIT_NULL
;
225 fra
.me
.REG
[1] = NIT_NULL
;
228 /* ./../lib/standard//stream.nit:67 */
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 */
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
)) {
240 /* ./../lib/standard//kernel.nit:227 */
241 REGB1
= TAG_Bool((REGB0
)==(REGB1
));
242 /* ./../lib/standard//stream.nit:69 */
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
)) {
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
)) {
261 /* ./../lib/standard//kernel.nit:378 */
262 REGB2
= TAG_Bool((REGB0
)==(REGB2
));
263 /* ./../lib/standard//stream.nit:74 */
266 if (UNTAG_Bool(REGB1
)) {
272 stack_frame_head
= fra
.me
.prev
;
275 val_t
standard___stream___IStream___eof(val_t p0
){
276 struct {struct stack_frame_t me
;} fra
;
278 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
279 fra
.me
.file
= LOCATE_standard___stream
;
281 fra
.me
.meth
= LOCATE_standard___stream___IStream___eof
;
282 fra
.me
.has_broke
= 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
;
290 void standard___stream___OStream___write(val_t p0
, val_t p1
){
291 struct {struct stack_frame_t me
;} fra
;
293 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
294 fra
.me
.file
= LOCATE_standard___stream
;
296 fra
.me
.meth
= LOCATE_standard___stream___OStream___write
;
297 fra
.me
.has_broke
= 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
;
305 val_t
standard___stream___OStream___is_writable(val_t p0
){
306 struct {struct stack_frame_t me
;} fra
;
308 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
309 fra
.me
.file
= LOCATE_standard___stream
;
311 fra
.me
.meth
= LOCATE_standard___stream___OStream___is_writable
;
312 fra
.me
.has_broke
= 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
;
320 val_t
standard___stream___BufferedIStream___read_char(val_t p0
){
321 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
327 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
328 fra
.me
.file
= LOCATE_standard___stream
;
330 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___read_char
;
331 fra
.me
.has_broke
= 0;
333 fra
.me
.nitni_local_ref_head
= NULL
;
334 fra
.me
.REG
[0] = NIT_NULL
;
335 fra
.me
.REG
[1] = NIT_NULL
;
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
)) {
342 nit_abort("Assert failed", NULL
, LOCATE_standard___stream
, 98);
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
)) {
348 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 99);
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);
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
)) {
360 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
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
)) {
366 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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]);
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
)) {
379 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 102);
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);
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
)) {
391 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
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
)) {
397 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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 */
405 /* ./../lib/standard//kernel.nit:236 */
406 REGB0
= TAG_Int(-UNTAG_Int(REGB0
));
407 /* ./../lib/standard//stream.nit:103 */
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
)) {
415 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 105);
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);
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]);
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 */
436 stack_frame_head
= fra
.me
.prev
;
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
;
447 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
448 fra
.me
.file
= LOCATE_standard___stream
;
450 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___read
;
451 fra
.me
.has_broke
= 0;
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
;
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
)) {
466 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 113);
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);
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
)) {
479 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
481 REGB2
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2]);
482 /* ./../lib/standard//stream.nit:115 */
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
)) {
488 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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
)) {
497 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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]);
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
)) {
515 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 119);
517 REGB3
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
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);
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
)) {
529 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
531 REGB3
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[3]);
532 /* ./../lib/standard//stream.nit:120 */
535 /* ./../lib/standard//stream.nit:122 */
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
)) {
540 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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
)) {
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
)) {
550 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
552 /* ./../lib/standard//kernel.nit:234 */
553 REGB3
= TAG_Bool(UNTAG_Int(REGB0
)>UNTAG_Int(REGB3
));
555 /* ./../lib/standard//stream.nit:122 */
556 REGB4
= TAG_Bool(false);
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);
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 */
570 /* ./../lib/standard//kernel.nit:235 */
571 REGB3
= TAG_Int(UNTAG_Int(REGB1
)+UNTAG_Int(REGB3
));
572 /* ./../lib/standard//stream.nit:124 */
574 /* ./../lib/standard//stream.nit:125 */
576 /* ./../lib/standard//kernel.nit:237 */
577 REGB3
= TAG_Int(UNTAG_Int(REGB0
)-UNTAG_Int(REGB3
));
578 /* ./../lib/standard//stream.nit:125 */
581 /* ./../lib/standard//stream.nit:122 */
587 /* ./../lib/standard//stream.nit:115 */
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];
599 stack_frame_head
= fra
.me
.prev
;
600 return fra
.me
.REG
[2];
602 val_t
standard___stream___BufferedIStream___read_all(val_t p0
){
603 struct {struct stack_frame_t me
; val_t MORE_REG
[2];} fra
;
608 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
609 fra
.me
.file
= LOCATE_standard___stream
;
611 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___read_all
;
612 fra
.me
.has_broke
= 0;
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
;
619 /* ./../lib/standard//stream.nit:134 */
620 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___init();
621 /* ./../lib/standard//stream.nit:135 */
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
)) {
630 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 136);
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);
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
)) {
643 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
645 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2]);
646 /* ./../lib/standard//stream.nit:138 */
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
)) {
651 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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);
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 */
667 /* ./../lib/standard//kernel.nit:235 */
668 REGB2
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB2
));
669 /* ./../lib/standard//stream.nit:140 */
672 /* ./../lib/standard//stream.nit:138 */
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]);
682 /* ./../lib/standard//stream.nit:135 */
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]);
691 stack_frame_head
= fra
.me
.prev
;
692 return fra
.me
.REG
[1];
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
;
701 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
702 fra
.me
.file
= LOCATE_standard___stream
;
704 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___append_line_to
;
705 fra
.me
.has_broke
= 0;
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
;
713 /* ./../lib/standard//stream.nit:150 */
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
)) {
719 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 152);
721 REGB0
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
722 /* ./../lib/standard//stream.nit:153 */
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);
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
)) {
733 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
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
)) {
739 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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);
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
)) {
755 /* ./../lib/standard//kernel.nit:378 */
756 REGB2
= TAG_Bool((REGB1
)==(REGB2
));
757 /* ./../lib/standard//stream.nit:153 */
760 REGB3
= TAG_Bool(!UNTAG_Bool(REGB3
));
762 REGB2
= TAG_Bool(false);
765 if (UNTAG_Bool(REGB3
)) {
767 /* ./../lib/standard//kernel.nit:235 */
768 REGB3
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB3
));
769 /* ./../lib/standard//stream.nit:153 */
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
)) {
780 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 156);
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
)) {
786 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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
)) {
796 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
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
)) {
805 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 158);
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
)) {
816 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 161);
818 REGB2
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
819 /* ./../lib/standard//stream.nit:162 */
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
)) {
824 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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);
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 */
840 /* ./../lib/standard//kernel.nit:235 */
841 REGB3
= TAG_Int(UNTAG_Int(REGB2
)+UNTAG_Int(REGB3
));
842 /* ./../lib/standard//stream.nit:164 */
845 /* ./../lib/standard//stream.nit:162 */
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);
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
)) {
861 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
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
)) {
867 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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 */
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 */
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 */
890 /* ./../lib/standard//stream.nit:178 */
891 CALL_standard___stream___BufferedIStream___fill_buffer(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
896 stack_frame_head
= fra
.me
.prev
;
899 val_t
standard___stream___BufferedIStream___eof(val_t p0
){
900 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
905 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
906 fra
.me
.file
= LOCATE_standard___stream
;
908 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___eof
;
909 fra
.me
.has_broke
= 0;
911 fra
.me
.nitni_local_ref_head
= NULL
;
912 fra
.me
.REG
[0] = NIT_NULL
;
913 fra
.me
.REG
[1] = NIT_NULL
;
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
)) {
919 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 184);
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);
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
)) {
931 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
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
)) {
937 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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]);
945 REGB0
= TAG_Bool(false);
950 stack_frame_head
= fra
.me
.prev
;
953 void standard___stream___BufferedIStream___fill_buffer(val_t p0
){
954 struct {struct stack_frame_t me
;} fra
;
956 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
957 fra
.me
.file
= LOCATE_standard___stream
;
959 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___fill_buffer
;
960 fra
.me
.has_broke
= 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
;
968 val_t
standard___stream___BufferedIStream___end_reached(val_t p0
){
969 struct {struct stack_frame_t me
;} fra
;
971 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
972 fra
.me
.file
= LOCATE_standard___stream
;
974 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___end_reached
;
975 fra
.me
.has_broke
= 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
;
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
;
987 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
988 fra
.me
.file
= LOCATE_standard___stream
;
990 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___prepare_buffer
;
991 fra
.me
.has_broke
= 0;
993 fra
.me
.nitni_local_ref_head
= NULL
;
994 fra
.me
.REG
[0] = NIT_NULL
;
995 fra
.me
.REG
[1] = NIT_NULL
;
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 */
1003 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB0
;
1004 stack_frame_head
= fra
.me
.prev
;
1007 void standard___stream___FDStream___close(val_t p0
){
1008 struct {struct stack_frame_t me
;} fra
;
1011 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1012 fra
.me
.file
= LOCATE_standard___stream
;
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
;
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
)) {
1024 nit_abort("Uninitialized attribute %s", "_fd", LOCATE_standard___stream
, 218);
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
;
1031 val_t
standard___stream___FDStream___native_close(val_t p0
, val_t p1
){
1032 struct {struct stack_frame_t me
;} fra
;
1035 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1036 fra
.me
.file
= LOCATE_standard___stream
;
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
;
1045 /* ./../lib/standard//stream.nit:220 */
1046 REGB0
= FDStream_native_close___out(fra
.me
.REG
[0], REGB0
);
1047 stack_frame_head
= fra
.me
.prev
;
1050 val_t
standard___stream___FDStream___native_read_char(val_t p0
, val_t p1
){
1051 struct {struct stack_frame_t me
;} fra
;
1054 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1055 fra
.me
.file
= LOCATE_standard___stream
;
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
;
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
;
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
;
1074 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1075 fra
.me
.file
= LOCATE_standard___stream
;
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
;
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
;
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
;
1097 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1098 fra
.me
.file
= LOCATE_standard___stream
;
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
;
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
;
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
;
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
;
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
;
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;
1140 val_t
standard___stream___FDIStream___eof(val_t p0
){
1141 struct {struct stack_frame_t me
;} fra
;
1144 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1145 fra
.me
.file
= LOCATE_standard___stream
;
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
;
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
)) {
1157 nit_abort("Uninitialized attribute %s", "_eof", LOCATE_standard___stream
, 231);
1159 REGB0
= ATTR_standard___stream___FDIStream____eof(fra
.me
.REG
[0]);
1160 stack_frame_head
= fra
.me
.prev
;
1163 val_t
standard___stream___FDIStream___read_char(val_t p0
){
1164 struct {struct stack_frame_t me
;} fra
;
1169 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1170 fra
.me
.file
= LOCATE_standard___stream
;
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
;
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
)) {
1182 nit_abort("Uninitialized attribute %s", "_fd", LOCATE_standard___stream
, 235);
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 */
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
)) {
1194 /* ./../lib/standard//kernel.nit:227 */
1195 REGB1
= TAG_Bool((REGB0
)==(REGB1
));
1196 /* ./../lib/standard//stream.nit:236 */
1199 if (UNTAG_Bool(REGB2
)) {
1200 REGB2
= TAG_Bool(true);
1201 ATTR_standard___stream___FDIStream____eof(fra
.me
.REG
[0]) = REGB2
;
1203 /* ./../lib/standard//stream.nit:237 */
1206 stack_frame_head
= fra
.me
.prev
;
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
;
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
;
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
;
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;
1231 val_t
standard___stream___FDOStream___is_writable(val_t p0
){
1232 struct {struct stack_frame_t me
;} fra
;
1235 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1236 fra
.me
.file
= LOCATE_standard___stream
;
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
;
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
)) {
1248 nit_abort("Uninitialized attribute %s", "_is_writable", LOCATE_standard___stream
, 246);
1250 REGB0
= ATTR_standard___stream___FDOStream____is_writable(fra
.me
.REG
[0]);
1251 stack_frame_head
= fra
.me
.prev
;
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
;
1260 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1261 fra
.me
.file
= LOCATE_standard___stream
;
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
;
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
)) {
1276 nit_abort("Uninitialized attribute %s", "_fd", LOCATE_standard___stream
, 250);
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
)) {
1284 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
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
)) {
1293 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
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
)) {
1299 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
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
;
1308 stack_frame_head
= fra
.me
.prev
;
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
;
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
;
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
;
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;
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
;
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
;
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
;
1356 /* ./../lib/standard//stream.nit:264 */
1357 fra
.me
.REG
[1] = fra
.me
.REG
[0];
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;