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 /* ./../lib/standard//stream.nit:20 */
13 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 20);
14 stack_frame_head
= fra
.me
.prev
;
17 void standard___stream___IOS___init(val_t p0
, int* init_table
){
18 int itpos0
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___stream___IOS
].i
;
19 struct {struct stack_frame_t me
;} fra
;
21 if (init_table
[itpos0
]) return;
22 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
23 fra
.me
.file
= LOCATE_standard___stream
;
25 fra
.me
.meth
= LOCATE_standard___stream___IOS___init
;
28 stack_frame_head
= fra
.me
.prev
;
29 init_table
[itpos0
] = 1;
32 val_t
standard___stream___IStream___read_char(val_t p0
){
33 struct {struct stack_frame_t me
;} fra
;
35 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
36 fra
.me
.file
= LOCATE_standard___stream
;
38 fra
.me
.meth
= LOCATE_standard___stream___IStream___read_char
;
41 /* ./../lib/standard//stream.nit:27 */
42 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 27);
43 stack_frame_head
= fra
.me
.prev
;
46 val_t
standard___stream___IStream___read(val_t p0
, val_t p1
){
47 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
53 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
54 fra
.me
.file
= LOCATE_standard___stream
;
56 fra
.me
.meth
= LOCATE_standard___stream___IStream___read
;
59 fra
.me
.REG
[0] = NIT_NULL
;
60 fra
.me
.REG
[1] = NIT_NULL
;
63 /* ./../lib/standard//stream.nit:33 */
64 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB0
);
65 /* ./../lib/standard//stream.nit:34 */
68 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
69 if (UNTAG_Bool(REGB2
)) {
71 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
73 /* ./../lib/standard//kernel.nit:217 */
74 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)>UNTAG_Int(REGB1
));
75 /* ./../lib/standard//stream.nit:34 */
76 if (UNTAG_Bool(REGB1
)) {
77 REGB1
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
78 REGB1
= TAG_Bool(!UNTAG_Bool(REGB1
));
80 REGB2
= TAG_Bool(false);
83 if (UNTAG_Bool(REGB1
)) {
84 /* ./../lib/standard//stream.nit:35 */
85 REGB1
= CALL_standard___stream___IStream___read_char(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
86 /* ./../lib/standard//stream.nit:36 */
88 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1
), VTID_standard___kernel___Comparable___OTHER(REGB1
))) /*cast OTHER*/;
89 if (UNTAG_Bool(REGB3
)) {
91 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
93 /* ./../lib/standard//kernel.nit:216 */
94 REGB2
= TAG_Bool(UNTAG_Int(REGB1
)>=UNTAG_Int(REGB2
));
95 /* ./../lib/standard//stream.nit:36 */
96 if (UNTAG_Bool(REGB2
)) {
97 /* ./../lib/standard//kernel.nit:280 */
98 REGB1
= TAG_Char(UNTAG_Int(REGB1
));
99 /* ./../lib/standard//stream.nit:37 */
100 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB1
);
101 /* ./../lib/standard//stream.nit:38 */
103 /* ./../lib/standard//kernel.nit:220 */
104 REGB1
= TAG_Int(UNTAG_Int(REGB0
)-UNTAG_Int(REGB1
));
105 /* ./../lib/standard//stream.nit:38 */
109 /* ./../lib/standard//stream.nit:34 */
114 /* ./../lib/standard//stream.nit:41 */
115 fra
.me
.REG
[1] = CALL_standard___string___Object___to_s(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
118 stack_frame_head
= fra
.me
.prev
;
119 return fra
.me
.REG
[1];
121 val_t
standard___stream___IStream___read_line(val_t p0
){
122 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
125 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
126 fra
.me
.file
= LOCATE_standard___stream
;
128 fra
.me
.meth
= LOCATE_standard___stream___IStream___read_line
;
129 fra
.me
.has_broke
= 0;
131 fra
.me
.REG
[0] = NIT_NULL
;
132 fra
.me
.REG
[1] = NIT_NULL
;
134 /* ./../lib/standard//stream.nit:47 */
135 REGB0
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
136 REGB0
= TAG_Bool(!UNTAG_Bool(REGB0
));
137 if (UNTAG_Bool(REGB0
)) {
139 nit_abort("Assert failed", NULL
, LOCATE_standard___stream
, 47);
141 /* ./../lib/standard//stream.nit:48 */
142 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___init();
143 /* ./../lib/standard//stream.nit:49 */
144 CALL_standard___stream___IStream___append_line_to(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1]);
145 /* ./../lib/standard//stream.nit:50 */
146 fra
.me
.REG
[1] = CALL_standard___string___Object___to_s(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
149 stack_frame_head
= fra
.me
.prev
;
150 return fra
.me
.REG
[1];
152 val_t
standard___stream___IStream___read_all(val_t p0
){
153 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
158 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
159 fra
.me
.file
= LOCATE_standard___stream
;
161 fra
.me
.meth
= LOCATE_standard___stream___IStream___read_all
;
162 fra
.me
.has_broke
= 0;
164 fra
.me
.REG
[0] = NIT_NULL
;
165 fra
.me
.REG
[1] = NIT_NULL
;
167 /* ./../lib/standard//stream.nit:56 */
168 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___init();
169 /* ./../lib/standard//stream.nit:57 */
171 REGB0
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
172 REGB0
= TAG_Bool(!UNTAG_Bool(REGB0
));
173 if (UNTAG_Bool(REGB0
)) {
174 /* ./../lib/standard//stream.nit:58 */
175 REGB0
= CALL_standard___stream___IStream___read_char(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
176 /* ./../lib/standard//stream.nit:59 */
178 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
179 if (UNTAG_Bool(REGB2
)) {
181 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
183 /* ./../lib/standard//kernel.nit:216 */
184 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)>=UNTAG_Int(REGB1
));
185 /* ./../lib/standard//stream.nit:59 */
186 if (UNTAG_Bool(REGB1
)) {
187 /* ./../lib/standard//kernel.nit:280 */
188 REGB0
= TAG_Char(UNTAG_Int(REGB0
));
189 /* ./../lib/standard//stream.nit:59 */
190 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB0
);
193 /* ./../lib/standard//stream.nit:57 */
198 /* ./../lib/standard//stream.nit:61 */
199 fra
.me
.REG
[1] = CALL_standard___string___Object___to_s(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
202 stack_frame_head
= fra
.me
.prev
;
203 return fra
.me
.REG
[1];
205 void standard___stream___IStream___append_line_to(val_t p0
, val_t p1
){
206 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
211 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
212 fra
.me
.file
= LOCATE_standard___stream
;
214 fra
.me
.meth
= LOCATE_standard___stream___IStream___append_line_to
;
215 fra
.me
.has_broke
= 0;
217 fra
.me
.REG
[0] = NIT_NULL
;
218 fra
.me
.REG
[1] = NIT_NULL
;
221 /* ./../lib/standard//stream.nit:67 */
223 /* ./../lib/standard//stream.nit:68 */
224 REGB0
= CALL_standard___stream___IStream___read_char(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
225 /* ./../lib/standard//stream.nit:69 */
227 /* ./../lib/standard//kernel.nit:219 */
228 REGB1
= TAG_Int(-UNTAG_Int(REGB1
));
229 /* ./../lib/standard//stream.nit:69 */
230 REGB2
= TAG_Bool(IS_EQUAL_OO(REGB0
,REGB1
));
231 if (UNTAG_Bool(REGB2
)) {
233 /* ./../lib/standard//kernel.nit:210 */
234 REGB1
= TAG_Bool((REGB0
)==(REGB1
));
235 /* ./../lib/standard//stream.nit:69 */
238 if (UNTAG_Bool(REGB2
)) {
239 /* ./../lib/standard//stream.nit:70 */
240 REGB2
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
241 if (UNTAG_Bool(REGB2
)) {
245 /* ./../lib/standard//kernel.nit:280 */
246 REGB0
= TAG_Char(UNTAG_Int(REGB0
));
247 /* ./../lib/standard//stream.nit:73 */
248 CALL_standard___collection___abstract_collection___Sequence___push(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB0
);
249 /* ./../lib/standard//stream.nit:74 */
250 REGB2
= TAG_Char('\n');
251 REGB1
= TAG_Bool(IS_EQUAL_OO(REGB0
,REGB2
));
252 if (UNTAG_Bool(REGB1
)) {
254 /* ./../lib/standard//kernel.nit:350 */
255 REGB2
= TAG_Bool((REGB0
)==(REGB2
));
256 /* ./../lib/standard//stream.nit:74 */
259 if (UNTAG_Bool(REGB1
)) {
265 stack_frame_head
= fra
.me
.prev
;
268 val_t
standard___stream___IStream___eof(val_t p0
){
269 struct {struct stack_frame_t me
;} fra
;
271 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
272 fra
.me
.file
= LOCATE_standard___stream
;
274 fra
.me
.meth
= LOCATE_standard___stream___IStream___eof
;
275 fra
.me
.has_broke
= 0;
277 /* ./../lib/standard//stream.nit:79 */
278 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 79);
279 stack_frame_head
= fra
.me
.prev
;
282 void standard___stream___OStream___write(val_t p0
, val_t p1
){
283 struct {struct stack_frame_t me
;} fra
;
285 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
286 fra
.me
.file
= LOCATE_standard___stream
;
288 fra
.me
.meth
= LOCATE_standard___stream___OStream___write
;
289 fra
.me
.has_broke
= 0;
291 /* ./../lib/standard//stream.nit:86 */
292 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 86);
293 stack_frame_head
= fra
.me
.prev
;
296 val_t
standard___stream___OStream___is_writable(val_t p0
){
297 struct {struct stack_frame_t me
;} fra
;
299 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
300 fra
.me
.file
= LOCATE_standard___stream
;
302 fra
.me
.meth
= LOCATE_standard___stream___OStream___is_writable
;
303 fra
.me
.has_broke
= 0;
305 /* ./../lib/standard//stream.nit:89 */
306 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 89);
307 stack_frame_head
= fra
.me
.prev
;
310 val_t
standard___stream___BufferedIStream___read_char(val_t p0
){
311 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
317 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
318 fra
.me
.file
= LOCATE_standard___stream
;
320 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___read_char
;
321 fra
.me
.has_broke
= 0;
323 fra
.me
.REG
[0] = NIT_NULL
;
324 fra
.me
.REG
[1] = NIT_NULL
;
326 /* ./../lib/standard//stream.nit:98 */
327 REGB0
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
328 REGB0
= TAG_Bool(!UNTAG_Bool(REGB0
));
329 if (UNTAG_Bool(REGB0
)) {
331 nit_abort("Assert failed", NULL
, LOCATE_standard___stream
, 98);
333 /* ./../lib/standard//stream.nit:99 */
334 REGB0
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
335 if (UNTAG_Bool(REGB0
)) {
337 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 99);
339 REGB0
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
340 fra
.me
.REG
[1] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
341 REGB1
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
342 if (UNTAG_Bool(REGB1
)) {
343 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 99);
345 /* ./../lib/standard//collection//array.nit:23 */
346 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
347 if (UNTAG_Bool(REGB1
)) {
349 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 23);
351 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
352 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
353 if (UNTAG_Bool(REGB2
)) {
355 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
357 /* ./../lib/standard//kernel.nit:216 */
358 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)>=UNTAG_Int(REGB1
));
359 /* ./../lib/standard//stream.nit:99 */
360 if (UNTAG_Bool(REGB1
)) {
361 /* ./../lib/standard//stream.nit:100 */
362 CALL_standard___stream___BufferedIStream___fill_buffer(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
364 /* ./../lib/standard//stream.nit:102 */
365 REGB1
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
366 if (UNTAG_Bool(REGB1
)) {
368 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 102);
370 REGB1
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
371 fra
.me
.REG
[1] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
372 REGB0
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
373 if (UNTAG_Bool(REGB0
)) {
374 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 102);
376 /* ./../lib/standard//collection//array.nit:23 */
377 REGB0
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
378 if (UNTAG_Bool(REGB0
)) {
380 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 23);
382 REGB0
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
383 REGB2
= TAG_Bool(VAL_ISA(REGB0
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1
), VTID_standard___kernel___Comparable___OTHER(REGB1
))) /*cast OTHER*/;
384 if (UNTAG_Bool(REGB2
)) {
386 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
388 /* ./../lib/standard//kernel.nit:216 */
389 REGB0
= TAG_Bool(UNTAG_Int(REGB1
)>=UNTAG_Int(REGB0
));
390 /* ./../lib/standard//stream.nit:102 */
391 if (UNTAG_Bool(REGB0
)) {
392 /* ./../lib/standard//stream.nit:103 */
394 /* ./../lib/standard//kernel.nit:219 */
395 REGB0
= TAG_Int(-UNTAG_Int(REGB0
));
396 /* ./../lib/standard//stream.nit:103 */
399 /* ./../lib/standard//stream.nit:105 */
400 fra
.me
.REG
[1] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
401 REGB1
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
402 if (UNTAG_Bool(REGB1
)) {
404 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 105);
406 REGB1
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
407 REGB2
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
408 if (UNTAG_Bool(REGB2
)) {
409 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 105);
411 REGB1
= CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB1
);
412 /* ./../lib/standard//stream.nit:106 */
413 REGB2
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
415 /* ./../lib/standard//kernel.nit:218 */
416 REGB3
= TAG_Int(UNTAG_Int(REGB2
)+UNTAG_Int(REGB3
));
417 /* ./../lib/standard//stream.nit:106 */
418 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB3
;
419 /* ./../lib/standard//kernel.nit:385 */
420 REGB1
= TAG_Int((unsigned char)UNTAG_Char(REGB1
));
421 /* ./../lib/standard//stream.nit:107 */
425 stack_frame_head
= fra
.me
.prev
;
428 val_t
standard___stream___BufferedIStream___read(val_t p0
, val_t p1
){
429 struct {struct stack_frame_t me
; val_t MORE_REG
[3];} fra
;
436 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
437 fra
.me
.file
= LOCATE_standard___stream
;
439 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___read
;
440 fra
.me
.has_broke
= 0;
442 fra
.me
.REG
[0] = NIT_NULL
;
443 fra
.me
.REG
[1] = NIT_NULL
;
444 fra
.me
.REG
[2] = NIT_NULL
;
445 fra
.me
.REG
[3] = NIT_NULL
;
448 /* ./../lib/standard//stream.nit:112 */
449 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB0
);
450 /* ./../lib/standard//stream.nit:113 */
451 REGB1
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
452 if (UNTAG_Bool(REGB1
)) {
454 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 113);
456 REGB1
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
457 /* ./../lib/standard//stream.nit:114 */
458 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
459 REGB2
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
460 if (UNTAG_Bool(REGB2
)) {
461 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 114);
463 /* ./../lib/standard//collection//array.nit:23 */
464 REGB2
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2])!=NIT_NULL
);
465 if (UNTAG_Bool(REGB2
)) {
467 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 23);
469 REGB2
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2]);
470 /* ./../lib/standard//stream.nit:115 */
473 REGB4
= TAG_Bool(VAL_ISA(REGB3
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
474 if (UNTAG_Bool(REGB4
)) {
476 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
478 /* ./../lib/standard//kernel.nit:217 */
479 REGB3
= TAG_Bool(UNTAG_Int(REGB0
)>UNTAG_Int(REGB3
));
480 /* ./../lib/standard//stream.nit:115 */
481 if (UNTAG_Bool(REGB3
)) {
482 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1
), VTID_standard___kernel___Comparable___OTHER(REGB1
))) /*cast OTHER*/;
483 if (UNTAG_Bool(REGB3
)) {
485 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
487 /* ./../lib/standard//kernel.nit:216 */
488 REGB3
= TAG_Bool(UNTAG_Int(REGB1
)>=UNTAG_Int(REGB2
));
489 /* ./../lib/standard//stream.nit:116 */
490 if (UNTAG_Bool(REGB3
)) {
491 /* ./../lib/standard//stream.nit:117 */
492 CALL_standard___stream___BufferedIStream___fill_buffer(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
493 /* ./../lib/standard//stream.nit:118 */
494 REGB3
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
495 if (UNTAG_Bool(REGB3
)) {
496 fra
.me
.REG
[2] = CALL_standard___string___Object___to_s(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
499 /* ./../lib/standard//stream.nit:119 */
500 REGB3
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
501 if (UNTAG_Bool(REGB3
)) {
503 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 119);
505 REGB3
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
507 /* ./../lib/standard//stream.nit:120 */
508 fra
.me
.REG
[3] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
509 REGB3
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
510 if (UNTAG_Bool(REGB3
)) {
511 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 120);
513 /* ./../lib/standard//collection//array.nit:23 */
514 REGB3
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[3])!=NIT_NULL
);
515 if (UNTAG_Bool(REGB3
)) {
517 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 23);
519 REGB3
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[3]);
520 /* ./../lib/standard//stream.nit:120 */
523 /* ./../lib/standard//stream.nit:122 */
525 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1
), VTID_standard___kernel___Comparable___OTHER(REGB1
))) /*cast OTHER*/;
526 if (UNTAG_Bool(REGB3
)) {
528 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
530 /* ./../lib/standard//kernel.nit:215 */
531 REGB3
= TAG_Bool(UNTAG_Int(REGB1
)<UNTAG_Int(REGB2
));
532 /* ./../lib/standard//stream.nit:122 */
533 if (UNTAG_Bool(REGB3
)) {
535 REGB4
= TAG_Bool(VAL_ISA(REGB3
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
536 if (UNTAG_Bool(REGB4
)) {
538 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
540 /* ./../lib/standard//kernel.nit:217 */
541 REGB3
= TAG_Bool(UNTAG_Int(REGB0
)>UNTAG_Int(REGB3
));
543 /* ./../lib/standard//stream.nit:122 */
544 REGB4
= TAG_Bool(false);
547 if (UNTAG_Bool(REGB3
)) {
548 /* ./../lib/standard//stream.nit:123 */
549 fra
.me
.REG
[3] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
550 REGB3
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
551 if (UNTAG_Bool(REGB3
)) {
552 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 123);
554 REGB3
= CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra
.me
.REG
[3])(fra
.me
.REG
[3], REGB1
);
555 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB3
);
556 /* ./../lib/standard//stream.nit:124 */
558 /* ./../lib/standard//kernel.nit:218 */
559 REGB3
= TAG_Int(UNTAG_Int(REGB1
)+UNTAG_Int(REGB3
));
560 /* ./../lib/standard//stream.nit:124 */
562 /* ./../lib/standard//stream.nit:125 */
564 /* ./../lib/standard//kernel.nit:220 */
565 REGB3
= TAG_Int(UNTAG_Int(REGB0
)-UNTAG_Int(REGB3
));
566 /* ./../lib/standard//stream.nit:125 */
569 /* ./../lib/standard//stream.nit:122 */
575 /* ./../lib/standard//stream.nit:115 */
580 /* ./../lib/standard//stream.nit:128 */
581 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB1
;
582 /* ./../lib/standard//stream.nit:129 */
583 fra
.me
.REG
[1] = CALL_standard___string___Object___to_s(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
584 fra
.me
.REG
[2] = fra
.me
.REG
[1];
587 stack_frame_head
= fra
.me
.prev
;
588 return fra
.me
.REG
[2];
590 val_t
standard___stream___BufferedIStream___read_all(val_t p0
){
591 struct {struct stack_frame_t me
; val_t MORE_REG
[2];} fra
;
596 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
597 fra
.me
.file
= LOCATE_standard___stream
;
599 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___read_all
;
600 fra
.me
.has_broke
= 0;
602 fra
.me
.REG
[0] = NIT_NULL
;
603 fra
.me
.REG
[1] = NIT_NULL
;
604 fra
.me
.REG
[2] = NIT_NULL
;
606 /* ./../lib/standard//stream.nit:134 */
607 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___init();
608 /* ./../lib/standard//stream.nit:135 */
610 REGB0
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
611 REGB0
= TAG_Bool(!UNTAG_Bool(REGB0
));
612 if (UNTAG_Bool(REGB0
)) {
613 /* ./../lib/standard//stream.nit:136 */
614 REGB0
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
615 if (UNTAG_Bool(REGB0
)) {
617 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 136);
619 REGB0
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
620 /* ./../lib/standard//stream.nit:137 */
621 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
622 REGB1
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
623 if (UNTAG_Bool(REGB1
)) {
624 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 137);
626 /* ./../lib/standard//collection//array.nit:23 */
627 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2])!=NIT_NULL
);
628 if (UNTAG_Bool(REGB1
)) {
630 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 23);
632 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2]);
633 /* ./../lib/standard//stream.nit:138 */
635 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
636 if (UNTAG_Bool(REGB2
)) {
638 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
640 /* ./../lib/standard//kernel.nit:215 */
641 REGB2
= TAG_Bool(UNTAG_Int(REGB0
)<UNTAG_Int(REGB1
));
642 /* ./../lib/standard//stream.nit:138 */
643 if (UNTAG_Bool(REGB2
)) {
644 /* ./../lib/standard//stream.nit:139 */
645 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
646 REGB2
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
647 if (UNTAG_Bool(REGB2
)) {
648 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 139);
650 REGB2
= CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra
.me
.REG
[2])(fra
.me
.REG
[2], REGB0
);
651 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB2
);
652 /* ./../lib/standard//stream.nit:140 */
654 /* ./../lib/standard//kernel.nit:218 */
655 REGB2
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB2
));
656 /* ./../lib/standard//stream.nit:140 */
659 /* ./../lib/standard//stream.nit:138 */
664 /* ./../lib/standard//stream.nit:142 */
665 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB0
;
666 /* ./../lib/standard//stream.nit:143 */
667 CALL_standard___stream___BufferedIStream___fill_buffer(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
669 /* ./../lib/standard//stream.nit:135 */
674 /* ./../lib/standard//stream.nit:145 */
675 fra
.me
.REG
[1] = CALL_standard___string___Object___to_s(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
678 stack_frame_head
= fra
.me
.prev
;
679 return fra
.me
.REG
[1];
681 void standard___stream___BufferedIStream___append_line_to(val_t p0
, val_t p1
){
682 struct {struct stack_frame_t me
; val_t MORE_REG
[2];} fra
;
688 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
689 fra
.me
.file
= LOCATE_standard___stream
;
691 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___append_line_to
;
692 fra
.me
.has_broke
= 0;
694 fra
.me
.REG
[0] = NIT_NULL
;
695 fra
.me
.REG
[1] = NIT_NULL
;
696 fra
.me
.REG
[2] = NIT_NULL
;
699 /* ./../lib/standard//stream.nit:150 */
701 /* ./../lib/standard//stream.nit:152 */
702 REGB0
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
703 if (UNTAG_Bool(REGB0
)) {
705 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 152);
707 REGB0
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
708 /* ./../lib/standard//stream.nit:153 */
710 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
711 REGB1
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
712 if (UNTAG_Bool(REGB1
)) {
713 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 153);
715 /* ./../lib/standard//collection//array.nit:23 */
716 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2])!=NIT_NULL
);
717 if (UNTAG_Bool(REGB1
)) {
719 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 23);
721 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2]);
722 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
723 if (UNTAG_Bool(REGB2
)) {
725 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
727 /* ./../lib/standard//kernel.nit:215 */
728 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)<UNTAG_Int(REGB1
));
729 /* ./../lib/standard//stream.nit:153 */
730 if (UNTAG_Bool(REGB1
)) {
731 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
732 REGB1
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
733 if (UNTAG_Bool(REGB1
)) {
734 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 153);
736 REGB1
= CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra
.me
.REG
[2])(fra
.me
.REG
[2], REGB0
);
737 REGB2
= TAG_Char('\n');
738 REGB3
= TAG_Bool(IS_EQUAL_OO(REGB1
,REGB2
));
739 if (UNTAG_Bool(REGB3
)) {
741 /* ./../lib/standard//kernel.nit:350 */
742 REGB2
= TAG_Bool((REGB1
)==(REGB2
));
743 /* ./../lib/standard//stream.nit:153 */
746 REGB3
= TAG_Bool(!UNTAG_Bool(REGB3
));
748 REGB2
= TAG_Bool(false);
751 if (UNTAG_Bool(REGB3
)) {
753 /* ./../lib/standard//kernel.nit:218 */
754 REGB3
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB3
));
755 /* ./../lib/standard//stream.nit:153 */
762 /* ./../lib/standard//stream.nit:156 */
763 REGB3
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
764 if (UNTAG_Bool(REGB3
)) {
766 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 156);
768 REGB3
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
769 REGB2
= TAG_Bool(VAL_ISA(REGB3
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
770 if (UNTAG_Bool(REGB2
)) {
772 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
774 /* ./../lib/standard//kernel.nit:217 */
775 REGB3
= TAG_Bool(UNTAG_Int(REGB0
)>UNTAG_Int(REGB3
));
776 /* ./../lib/standard//stream.nit:156 */
777 if (UNTAG_Bool(REGB3
)) {
778 /* ./../lib/standard//collection//array.nit:23 */
779 REGB3
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
780 if (UNTAG_Bool(REGB3
)) {
782 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 23);
784 REGB3
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
785 /* ./../lib/standard//kernel.nit:218 */
786 REGB3
= TAG_Int(UNTAG_Int(REGB3
)+UNTAG_Int(REGB0
));
787 /* ./../lib/standard//stream.nit:158 */
788 REGB2
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
789 if (UNTAG_Bool(REGB2
)) {
791 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 158);
793 REGB2
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
794 /* ./../lib/standard//kernel.nit:220 */
795 REGB2
= TAG_Int(UNTAG_Int(REGB3
)-UNTAG_Int(REGB2
));
796 /* ./../lib/standard//stream.nit:158 */
797 CALL_standard___collection___array___AbstractArray___enlarge(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB2
);
798 /* ./../lib/standard//stream.nit:161 */
799 REGB2
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
800 if (UNTAG_Bool(REGB2
)) {
802 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 161);
804 REGB2
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
805 /* ./../lib/standard//stream.nit:162 */
807 REGB3
= TAG_Bool(VAL_ISA(REGB0
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2
), VTID_standard___kernel___Comparable___OTHER(REGB2
))) /*cast OTHER*/;
808 if (UNTAG_Bool(REGB3
)) {
810 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
812 /* ./../lib/standard//kernel.nit:215 */
813 REGB3
= TAG_Bool(UNTAG_Int(REGB2
)<UNTAG_Int(REGB0
));
814 /* ./../lib/standard//stream.nit:162 */
815 if (UNTAG_Bool(REGB3
)) {
816 /* ./../lib/standard//stream.nit:163 */
817 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
818 REGB3
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
819 if (UNTAG_Bool(REGB3
)) {
820 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 163);
822 REGB3
= CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra
.me
.REG
[2])(fra
.me
.REG
[2], REGB2
);
823 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB3
);
824 /* ./../lib/standard//stream.nit:164 */
826 /* ./../lib/standard//kernel.nit:218 */
827 REGB3
= TAG_Int(UNTAG_Int(REGB2
)+UNTAG_Int(REGB3
));
828 /* ./../lib/standard//stream.nit:164 */
831 /* ./../lib/standard//stream.nit:162 */
837 /* ./../lib/standard//stream.nit:168 */
838 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
839 REGB2
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
840 if (UNTAG_Bool(REGB2
)) {
841 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 168);
843 /* ./../lib/standard//collection//array.nit:23 */
844 REGB2
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2])!=NIT_NULL
);
845 if (UNTAG_Bool(REGB2
)) {
847 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 23);
849 REGB2
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2]);
850 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
851 if (UNTAG_Bool(REGB3
)) {
853 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
855 /* ./../lib/standard//kernel.nit:215 */
856 REGB2
= TAG_Bool(UNTAG_Int(REGB0
)<UNTAG_Int(REGB2
));
857 /* ./../lib/standard//stream.nit:168 */
858 if (UNTAG_Bool(REGB2
)) {
859 /* ./../lib/standard//stream.nit:170 */
861 /* ./../lib/standard//kernel.nit:218 */
862 REGB2
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB2
));
863 /* ./../lib/standard//stream.nit:170 */
864 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB2
;
865 /* ./../lib/standard//stream.nit:171 */
868 /* ./../lib/standard//stream.nit:174 */
869 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB0
;
870 /* ./../lib/standard//stream.nit:175 */
871 REGB0
= CALL_standard___stream___BufferedIStream___end_reached(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
872 if (UNTAG_Bool(REGB0
)) {
873 /* ./../lib/standard//stream.nit:176 */
876 /* ./../lib/standard//stream.nit:178 */
877 CALL_standard___stream___BufferedIStream___fill_buffer(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
882 stack_frame_head
= fra
.me
.prev
;
885 val_t
standard___stream___BufferedIStream___eof(val_t p0
){
886 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
891 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
892 fra
.me
.file
= LOCATE_standard___stream
;
894 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___eof
;
895 fra
.me
.has_broke
= 0;
897 fra
.me
.REG
[0] = NIT_NULL
;
898 fra
.me
.REG
[1] = NIT_NULL
;
900 /* ./../lib/standard//stream.nit:184 */
901 REGB0
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
902 if (UNTAG_Bool(REGB0
)) {
904 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 184);
906 REGB0
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
907 fra
.me
.REG
[1] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
908 REGB1
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
909 if (UNTAG_Bool(REGB1
)) {
910 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 184);
912 /* ./../lib/standard//collection//array.nit:23 */
913 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
914 if (UNTAG_Bool(REGB1
)) {
916 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 23);
918 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
919 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
920 if (UNTAG_Bool(REGB2
)) {
922 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
924 /* ./../lib/standard//kernel.nit:216 */
925 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)>=UNTAG_Int(REGB1
));
926 /* ./../lib/standard//stream.nit:184 */
927 if (UNTAG_Bool(REGB1
)) {
928 REGB1
= CALL_standard___stream___BufferedIStream___end_reached(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
930 REGB0
= TAG_Bool(false);
935 stack_frame_head
= fra
.me
.prev
;
938 void standard___stream___BufferedIStream___fill_buffer(val_t p0
){
939 struct {struct stack_frame_t me
;} fra
;
941 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
942 fra
.me
.file
= LOCATE_standard___stream
;
944 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___fill_buffer
;
945 fra
.me
.has_broke
= 0;
947 /* ./../lib/standard//stream.nit:192 */
948 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 192);
949 stack_frame_head
= fra
.me
.prev
;
952 val_t
standard___stream___BufferedIStream___end_reached(val_t p0
){
953 struct {struct stack_frame_t me
;} fra
;
955 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
956 fra
.me
.file
= LOCATE_standard___stream
;
958 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___end_reached
;
959 fra
.me
.has_broke
= 0;
961 /* ./../lib/standard//stream.nit:195 */
962 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 195);
963 stack_frame_head
= fra
.me
.prev
;
966 void standard___stream___BufferedIStream___prepare_buffer(val_t p0
, val_t p1
){
967 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
970 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
971 fra
.me
.file
= LOCATE_standard___stream
;
973 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___prepare_buffer
;
974 fra
.me
.has_broke
= 0;
976 fra
.me
.REG
[0] = NIT_NULL
;
977 fra
.me
.REG
[1] = NIT_NULL
;
980 /* ./../lib/standard//stream.nit:201 */
981 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB0
);
982 ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]) = fra
.me
.REG
[1];
983 /* ./../lib/standard//stream.nit:202 */
985 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB0
;
986 stack_frame_head
= fra
.me
.prev
;
989 void standard___stream___FDStream___close(val_t p0
){
990 struct {struct stack_frame_t me
;} fra
;
993 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
994 fra
.me
.file
= LOCATE_standard___stream
;
996 fra
.me
.meth
= LOCATE_standard___stream___FDStream___close
;
997 fra
.me
.has_broke
= 0;
999 fra
.me
.REG
[0] = NIT_NULL
;
1001 /* ./../lib/standard//stream.nit:218 */
1002 REGB0
= TAG_Bool(ATTR_standard___stream___FDStream____fd(fra
.me
.REG
[0])!=NIT_NULL
);
1003 if (UNTAG_Bool(REGB0
)) {
1005 nit_abort("Uninitialized attribute %s", "_fd", LOCATE_standard___stream
, 218);
1007 REGB0
= ATTR_standard___stream___FDStream____fd(fra
.me
.REG
[0]);
1008 CALL_standard___stream___FDStream___native_close(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
);
1009 stack_frame_head
= fra
.me
.prev
;
1012 val_t
standard___stream___FDStream___native_close(val_t p0
, val_t p1
){
1013 struct {struct stack_frame_t me
;} fra
;
1016 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1017 fra
.me
.file
= LOCATE_standard___stream
;
1019 fra
.me
.meth
= LOCATE_standard___stream___FDStream___native_close
;
1020 fra
.me
.has_broke
= 0;
1021 fra
.me
.REG_size
= 1;
1022 fra
.me
.REG
[0] = NIT_NULL
;
1025 /* ./../lib/standard//stream.nit:220 */
1026 REGB0
= TAG_Int(stream_FDStream_FDStream_native_close_1(fra
.me
.REG
[0], UNTAG_Int(REGB0
)));
1027 stack_frame_head
= fra
.me
.prev
;
1030 val_t
standard___stream___FDStream___native_read_char(val_t p0
, val_t p1
){
1031 struct {struct stack_frame_t me
;} fra
;
1034 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1035 fra
.me
.file
= LOCATE_standard___stream
;
1037 fra
.me
.meth
= LOCATE_standard___stream___FDStream___native_read_char
;
1038 fra
.me
.has_broke
= 0;
1039 fra
.me
.REG_size
= 1;
1040 fra
.me
.REG
[0] = NIT_NULL
;
1043 /* ./../lib/standard//stream.nit:221 */
1044 REGB0
= TAG_Int(stream_FDStream_FDStream_native_read_char_1(fra
.me
.REG
[0], UNTAG_Int(REGB0
)));
1045 stack_frame_head
= fra
.me
.prev
;
1048 val_t
standard___stream___FDStream___native_read(val_t p0
, val_t p1
, val_t p2
, val_t p3
){
1049 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
1053 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1054 fra
.me
.file
= LOCATE_standard___stream
;
1056 fra
.me
.meth
= LOCATE_standard___stream___FDStream___native_read
;
1057 fra
.me
.has_broke
= 0;
1058 fra
.me
.REG_size
= 2;
1059 fra
.me
.REG
[0] = NIT_NULL
;
1060 fra
.me
.REG
[1] = NIT_NULL
;
1065 /* ./../lib/standard//stream.nit:222 */
1066 REGB1
= TAG_Int(stream_FDStream_FDStream_native_read_3(fra
.me
.REG
[0], UNTAG_Int(REGB0
), UNBOX_NativeString(fra
.me
.REG
[1]), UNTAG_Int(REGB1
)));
1067 stack_frame_head
= fra
.me
.prev
;
1070 val_t
standard___stream___FDStream___native_write(val_t p0
, val_t p1
, val_t p2
, val_t p3
){
1071 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
1075 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1076 fra
.me
.file
= LOCATE_standard___stream
;
1078 fra
.me
.meth
= LOCATE_standard___stream___FDStream___native_write
;
1079 fra
.me
.has_broke
= 0;
1080 fra
.me
.REG_size
= 2;
1081 fra
.me
.REG
[0] = NIT_NULL
;
1082 fra
.me
.REG
[1] = NIT_NULL
;
1087 /* ./../lib/standard//stream.nit:223 */
1088 REGB1
= TAG_Int(stream_FDStream_FDStream_native_write_3(fra
.me
.REG
[0], UNTAG_Int(REGB0
), UNBOX_NativeString(fra
.me
.REG
[1]), UNTAG_Int(REGB1
)));
1089 stack_frame_head
= fra
.me
.prev
;
1092 void standard___stream___FDStream___init(val_t p0
, val_t p1
, int* init_table
){
1093 int itpos1
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___stream___FDStream
].i
;
1094 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
1097 if (init_table
[itpos1
]) return;
1098 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1099 fra
.me
.file
= LOCATE_standard___stream
;
1101 fra
.me
.meth
= LOCATE_standard___stream___FDStream___init
;
1102 fra
.me
.has_broke
= 0;
1103 fra
.me
.REG_size
= 2;
1104 fra
.me
.REG
[0] = NIT_NULL
;
1105 fra
.me
.REG
[1] = NIT_NULL
;
1108 /* ./../lib/standard//stream.nit:225 */
1109 fra
.me
.REG
[1] = fra
.me
.REG
[0];
1110 CALL_standard___stream___IOS___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], init_table
);
1111 ATTR_standard___stream___FDStream____fd(fra
.me
.REG
[1]) = REGB0
;
1112 stack_frame_head
= fra
.me
.prev
;
1113 init_table
[itpos1
] = 1;
1116 val_t
standard___stream___FDIStream___eof(val_t p0
){
1117 struct {struct stack_frame_t me
;} fra
;
1120 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1121 fra
.me
.file
= LOCATE_standard___stream
;
1123 fra
.me
.meth
= LOCATE_standard___stream___FDIStream___eof
;
1124 fra
.me
.has_broke
= 0;
1125 fra
.me
.REG_size
= 1;
1126 fra
.me
.REG
[0] = NIT_NULL
;
1128 /* ./../lib/standard//stream.nit:231 */
1129 REGB0
= TAG_Bool(ATTR_standard___stream___FDIStream____eof(fra
.me
.REG
[0])!=NIT_NULL
);
1130 if (UNTAG_Bool(REGB0
)) {
1132 nit_abort("Uninitialized attribute %s", "_eof", LOCATE_standard___stream
, 231);
1134 REGB0
= ATTR_standard___stream___FDIStream____eof(fra
.me
.REG
[0]);
1135 stack_frame_head
= fra
.me
.prev
;
1138 val_t
standard___stream___FDIStream___read_char(val_t p0
){
1139 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___read_char
;
1148 fra
.me
.has_broke
= 0;
1149 fra
.me
.REG_size
= 1;
1150 fra
.me
.REG
[0] = NIT_NULL
;
1152 /* ./../lib/standard//stream.nit:235 */
1153 REGB0
= TAG_Bool(ATTR_standard___stream___FDStream____fd(fra
.me
.REG
[0])!=NIT_NULL
);
1154 if (UNTAG_Bool(REGB0
)) {
1156 nit_abort("Uninitialized attribute %s", "_fd", LOCATE_standard___stream
, 235);
1158 REGB0
= ATTR_standard___stream___FDStream____fd(fra
.me
.REG
[0]);
1159 REGB0
= CALL_standard___stream___FDStream___native_read_char(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
);
1160 /* ./../lib/standard//stream.nit:236 */
1162 /* ./../lib/standard//kernel.nit:219 */
1163 REGB1
= TAG_Int(-UNTAG_Int(REGB1
));
1164 /* ./../lib/standard//stream.nit:236 */
1165 REGB2
= TAG_Bool(IS_EQUAL_OO(REGB0
,REGB1
));
1166 if (UNTAG_Bool(REGB2
)) {
1168 /* ./../lib/standard//kernel.nit:210 */
1169 REGB1
= TAG_Bool((REGB0
)==(REGB1
));
1170 /* ./../lib/standard//stream.nit:236 */
1173 if (UNTAG_Bool(REGB2
)) {
1174 REGB2
= TAG_Bool(true);
1175 ATTR_standard___stream___FDIStream____eof(fra
.me
.REG
[0]) = REGB2
;
1177 /* ./../lib/standard//stream.nit:237 */
1180 stack_frame_head
= fra
.me
.prev
;
1183 void standard___stream___FDIStream___init(val_t p0
, val_t p1
, int* init_table
){
1184 int itpos2
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___stream___FDIStream
].i
;
1185 struct {struct stack_frame_t me
;} fra
;
1188 if (init_table
[itpos2
]) return;
1189 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1190 fra
.me
.file
= LOCATE_standard___stream
;
1192 fra
.me
.meth
= LOCATE_standard___stream___FDIStream___init
;
1193 fra
.me
.has_broke
= 0;
1194 fra
.me
.REG_size
= 1;
1195 fra
.me
.REG
[0] = NIT_NULL
;
1198 /* ./../lib/standard//stream.nit:240 */
1199 CALL_standard___stream___FDStream___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, init_table
);
1200 stack_frame_head
= fra
.me
.prev
;
1201 init_table
[itpos2
] = 1;
1204 val_t
standard___stream___FDOStream___is_writable(val_t p0
){
1205 struct {struct stack_frame_t me
;} fra
;
1208 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1209 fra
.me
.file
= LOCATE_standard___stream
;
1211 fra
.me
.meth
= LOCATE_standard___stream___FDOStream___is_writable
;
1212 fra
.me
.has_broke
= 0;
1213 fra
.me
.REG_size
= 1;
1214 fra
.me
.REG
[0] = NIT_NULL
;
1216 /* ./../lib/standard//stream.nit:246 */
1217 REGB0
= TAG_Bool(ATTR_standard___stream___FDOStream____is_writable(fra
.me
.REG
[0])!=NIT_NULL
);
1218 if (UNTAG_Bool(REGB0
)) {
1220 nit_abort("Uninitialized attribute %s", "_is_writable", LOCATE_standard___stream
, 246);
1222 REGB0
= ATTR_standard___stream___FDOStream____is_writable(fra
.me
.REG
[0]);
1223 stack_frame_head
= fra
.me
.prev
;
1226 void standard___stream___FDOStream___write(val_t p0
, val_t p1
){
1227 struct {struct stack_frame_t me
; val_t MORE_REG
[2];} fra
;
1232 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1233 fra
.me
.file
= LOCATE_standard___stream
;
1235 fra
.me
.meth
= LOCATE_standard___stream___FDOStream___write
;
1236 fra
.me
.has_broke
= 0;
1237 fra
.me
.REG_size
= 3;
1238 fra
.me
.REG
[0] = NIT_NULL
;
1239 fra
.me
.REG
[1] = NIT_NULL
;
1240 fra
.me
.REG
[2] = NIT_NULL
;
1243 /* ./../lib/standard//stream.nit:250 */
1244 REGB0
= TAG_Bool(ATTR_standard___stream___FDStream____fd(fra
.me
.REG
[0])!=NIT_NULL
);
1245 if (UNTAG_Bool(REGB0
)) {
1247 nit_abort("Uninitialized attribute %s", "_fd", LOCATE_standard___stream
, 250);
1249 REGB0
= ATTR_standard___stream___FDStream____fd(fra
.me
.REG
[0]);
1250 fra
.me
.REG
[2] = CALL_standard___string___String___to_cstring(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
1251 /* ./../lib/standard//collection//array.nit:23 */
1252 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
1253 if (UNTAG_Bool(REGB1
)) {
1255 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 23);
1257 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
1258 /* ./../lib/standard//stream.nit:250 */
1259 REGB1
= CALL_standard___stream___FDStream___native_write(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[2], REGB1
);
1260 /* ./../lib/standard//collection//array.nit:23 */
1261 REGB0
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
1262 if (UNTAG_Bool(REGB0
)) {
1264 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 23);
1266 REGB0
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
1267 REGB2
= TAG_Bool(VAL_ISA(REGB0
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1
), VTID_standard___kernel___Comparable___OTHER(REGB1
))) /*cast OTHER*/;
1268 if (UNTAG_Bool(REGB2
)) {
1270 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
1272 /* ./../lib/standard//kernel.nit:215 */
1273 REGB0
= TAG_Bool(UNTAG_Int(REGB1
)<UNTAG_Int(REGB0
));
1274 /* ./../lib/standard//stream.nit:251 */
1275 if (UNTAG_Bool(REGB0
)) {
1276 REGB0
= TAG_Bool(false);
1277 ATTR_standard___stream___FDOStream____is_writable(fra
.me
.REG
[0]) = REGB0
;
1279 stack_frame_head
= fra
.me
.prev
;
1282 void standard___stream___FDOStream___init(val_t p0
, val_t p1
, int* init_table
){
1283 int itpos3
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___stream___FDOStream
].i
;
1284 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
1287 if (init_table
[itpos3
]) return;
1288 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1289 fra
.me
.file
= LOCATE_standard___stream
;
1291 fra
.me
.meth
= LOCATE_standard___stream___FDOStream___init
;
1292 fra
.me
.has_broke
= 0;
1293 fra
.me
.REG_size
= 2;
1294 fra
.me
.REG
[0] = NIT_NULL
;
1295 fra
.me
.REG
[1] = NIT_NULL
;
1298 /* ./../lib/standard//stream.nit:254 */
1299 fra
.me
.REG
[1] = fra
.me
.REG
[0];
1300 CALL_standard___stream___FDStream___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, init_table
);
1301 /* ./../lib/standard//stream.nit:256 */
1302 REGB0
= TAG_Bool(true);
1303 ATTR_standard___stream___FDOStream____is_writable(fra
.me
.REG
[1]) = REGB0
;
1304 stack_frame_head
= fra
.me
.prev
;
1305 init_table
[itpos3
] = 1;
1308 void standard___stream___FDIOStream___init(val_t p0
, val_t p1
, int* init_table
){
1309 int itpos4
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___stream___FDIOStream
].i
;
1310 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
1314 if (init_table
[itpos4
]) return;
1315 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1316 fra
.me
.file
= LOCATE_standard___stream
;
1318 fra
.me
.meth
= LOCATE_standard___stream___FDIOStream___init
;
1319 fra
.me
.has_broke
= 0;
1320 fra
.me
.REG_size
= 2;
1321 fra
.me
.REG
[0] = NIT_NULL
;
1322 fra
.me
.REG
[1] = NIT_NULL
;
1325 /* ./../lib/standard//stream.nit:264 */
1326 fra
.me
.REG
[1] = fra
.me
.REG
[0];
1328 CALL_standard___stream___FDIStream___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, init_table
);
1329 CALL_standard___stream___FDOStream___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, init_table
);
1330 /* ./../lib/standard//stream.nit:266 */
1331 ATTR_standard___stream___FDStream____fd(fra
.me
.REG
[1]) = REGB1
;
1332 /* ./../lib/standard//stream.nit:267 */
1333 REGB1
= TAG_Bool(true);
1334 ATTR_standard___stream___FDOStream____is_writable(fra
.me
.REG
[1]) = REGB1
;
1335 stack_frame_head
= fra
.me
.prev
;
1336 init_table
[itpos4
] = 1;