1 /* This C file is generated by NIT to compile module standard___stream. */
2 #include "standard___stream._sep.h"
3 static const char LOCATE_standard___stream___IOS___close
[] = "stream::IOS::close";
4 void standard___stream___IOS___close(val_t p0
){
5 struct {struct stack_frame_t me
;} fra
;
7 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
8 fra
.me
.file
= LOCATE_standard___stream
;
10 fra
.me
.meth
= LOCATE_standard___stream___IOS___close
;
13 fra
.me
.nitni_local_ref_head
= NULL
;
14 /* ../lib/standard/stream.nit:20 */
15 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 20);
16 stack_frame_head
= fra
.me
.prev
;
19 static const char LOCATE_standard___stream___IStream___read_char
[] = "stream::IStream::read_char";
20 val_t
standard___stream___IStream___read_char(val_t p0
){
21 struct {struct stack_frame_t me
;} fra
;
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___IStream___read_char
;
29 fra
.me
.nitni_local_ref_head
= NULL
;
30 /* ../lib/standard/stream.nit:27 */
31 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 27);
32 stack_frame_head
= fra
.me
.prev
;
35 static const char LOCATE_standard___stream___IStream___read
[] = "stream::IStream::read";
36 val_t
standard___stream___IStream___read(val_t p0
, val_t p1
){
37 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
43 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
44 fra
.me
.file
= LOCATE_standard___stream
;
46 fra
.me
.meth
= LOCATE_standard___stream___IStream___read
;
49 fra
.me
.nitni_local_ref_head
= NULL
;
50 fra
.me
.REG
[0] = NIT_NULL
;
51 fra
.me
.REG
[1] = NIT_NULL
;
54 /* ../lib/standard/stream.nit:33 */
55 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB0
);
56 /* ../lib/standard/stream.nit:34 */
59 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
60 if (UNTAG_Bool(REGB2
)) {
62 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
64 /* ../lib/standard/kernel.nit:237 */
65 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)>UNTAG_Int(REGB1
));
66 /* ../lib/standard/stream.nit:34 */
67 if (UNTAG_Bool(REGB1
)) {
68 REGB1
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
69 REGB1
= TAG_Bool(!UNTAG_Bool(REGB1
));
74 if (UNTAG_Bool(REGB1
)) {
75 /* ../lib/standard/stream.nit:35 */
76 REGB1
= CALL_standard___stream___IStream___read_char(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
77 /* ../lib/standard/stream.nit:36 */
79 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1
), VTID_standard___kernel___Comparable___OTHER(REGB1
))) /*cast OTHER*/;
80 if (UNTAG_Bool(REGB3
)) {
82 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
84 /* ../lib/standard/kernel.nit:236 */
85 REGB2
= TAG_Bool(UNTAG_Int(REGB1
)>=UNTAG_Int(REGB2
));
86 /* ../lib/standard/stream.nit:36 */
87 if (UNTAG_Bool(REGB2
)) {
88 /* ../lib/standard/kernel.nit:300 */
89 REGB1
= TAG_Char(UNTAG_Int(REGB1
));
90 /* ../lib/standard/stream.nit:37 */
91 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB1
);
92 /* ../lib/standard/stream.nit:38 */
94 /* ../lib/standard/kernel.nit:240 */
95 REGB1
= TAG_Int(UNTAG_Int(REGB0
)-UNTAG_Int(REGB1
));
96 /* ../lib/standard/stream.nit:38 */
100 /* ../lib/standard/stream.nit:34 */
105 /* ../lib/standard/stream.nit:41 */
106 fra
.me
.REG
[1] = CALL_standard___string___Object___to_s(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
109 stack_frame_head
= fra
.me
.prev
;
110 return fra
.me
.REG
[1];
112 static const char LOCATE_standard___stream___IStream___read_line
[] = "stream::IStream::read_line";
113 val_t
standard___stream___IStream___read_line(val_t p0
){
114 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
117 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
118 fra
.me
.file
= LOCATE_standard___stream
;
120 fra
.me
.meth
= LOCATE_standard___stream___IStream___read_line
;
121 fra
.me
.has_broke
= 0;
123 fra
.me
.nitni_local_ref_head
= NULL
;
124 fra
.me
.REG
[0] = NIT_NULL
;
125 fra
.me
.REG
[1] = NIT_NULL
;
127 /* ../lib/standard/stream.nit:47 */
128 REGB0
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
129 REGB0
= TAG_Bool(!UNTAG_Bool(REGB0
));
130 if (UNTAG_Bool(REGB0
)) {
132 nit_abort("Assert failed", NULL
, LOCATE_standard___stream
, 47);
134 /* ../lib/standard/stream.nit:48 */
135 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___init();
136 /* ../lib/standard/stream.nit:49 */
137 CALL_standard___stream___IStream___append_line_to(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1]);
138 /* ../lib/standard/stream.nit:50 */
139 fra
.me
.REG
[1] = CALL_standard___string___Object___to_s(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
142 stack_frame_head
= fra
.me
.prev
;
143 return fra
.me
.REG
[1];
145 static const char LOCATE_standard___stream___IStream___read_all
[] = "stream::IStream::read_all";
146 val_t
standard___stream___IStream___read_all(val_t p0
){
147 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
152 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
153 fra
.me
.file
= LOCATE_standard___stream
;
155 fra
.me
.meth
= LOCATE_standard___stream___IStream___read_all
;
156 fra
.me
.has_broke
= 0;
158 fra
.me
.nitni_local_ref_head
= NULL
;
159 fra
.me
.REG
[0] = NIT_NULL
;
160 fra
.me
.REG
[1] = NIT_NULL
;
162 /* ../lib/standard/stream.nit:56 */
163 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___init();
164 /* ../lib/standard/stream.nit:57 */
166 REGB0
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
167 REGB0
= TAG_Bool(!UNTAG_Bool(REGB0
));
168 if (UNTAG_Bool(REGB0
)) {
169 /* ../lib/standard/stream.nit:58 */
170 REGB0
= CALL_standard___stream___IStream___read_char(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
171 /* ../lib/standard/stream.nit:59 */
173 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
174 if (UNTAG_Bool(REGB2
)) {
176 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
178 /* ../lib/standard/kernel.nit:236 */
179 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)>=UNTAG_Int(REGB1
));
180 /* ../lib/standard/stream.nit:59 */
181 if (UNTAG_Bool(REGB1
)) {
182 /* ../lib/standard/kernel.nit:300 */
183 REGB0
= TAG_Char(UNTAG_Int(REGB0
));
184 /* ../lib/standard/stream.nit:59 */
185 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB0
);
188 /* ../lib/standard/stream.nit:57 */
193 /* ../lib/standard/stream.nit:61 */
194 fra
.me
.REG
[1] = CALL_standard___string___Object___to_s(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
197 stack_frame_head
= fra
.me
.prev
;
198 return fra
.me
.REG
[1];
200 static const char LOCATE_standard___stream___IStream___append_line_to
[] = "stream::IStream::append_line_to";
201 void standard___stream___IStream___append_line_to(val_t p0
, val_t p1
){
202 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
207 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
208 fra
.me
.file
= LOCATE_standard___stream
;
210 fra
.me
.meth
= LOCATE_standard___stream___IStream___append_line_to
;
211 fra
.me
.has_broke
= 0;
213 fra
.me
.nitni_local_ref_head
= NULL
;
214 fra
.me
.REG
[0] = NIT_NULL
;
215 fra
.me
.REG
[1] = NIT_NULL
;
218 /* ../lib/standard/stream.nit:67 */
220 /* ../lib/standard/stream.nit:68 */
221 REGB0
= CALL_standard___stream___IStream___read_char(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
222 /* ../lib/standard/stream.nit:69 */
224 /* ../lib/standard/kernel.nit:239 */
225 REGB1
= TAG_Int(-UNTAG_Int(REGB1
));
226 /* ../lib/standard/stream.nit:69 */
227 REGB2
= TAG_Bool(IS_EQUAL_OO(REGB0
,REGB1
));
228 if (UNTAG_Bool(REGB2
)) {
230 /* ../lib/standard/kernel.nit:230 */
231 REGB1
= TAG_Bool((REGB0
)==(REGB1
));
232 /* ../lib/standard/stream.nit:69 */
235 if (UNTAG_Bool(REGB2
)) {
236 /* ../lib/standard/stream.nit:70 */
237 REGB2
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
238 if (UNTAG_Bool(REGB2
)) {
242 /* ../lib/standard/kernel.nit:300 */
243 REGB0
= TAG_Char(UNTAG_Int(REGB0
));
244 /* ../lib/standard/stream.nit:73 */
245 CALL_standard___collection___abstract_collection___Sequence___push(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB0
);
246 /* ../lib/standard/stream.nit:74 */
247 REGB2
= TAG_Char('\n');
248 REGB1
= TAG_Bool(IS_EQUAL_OO(REGB0
,REGB2
));
249 if (UNTAG_Bool(REGB1
)) {
251 /* ../lib/standard/kernel.nit:381 */
252 REGB2
= TAG_Bool((REGB0
)==(REGB2
));
253 /* ../lib/standard/stream.nit:74 */
256 if (UNTAG_Bool(REGB1
)) {
262 stack_frame_head
= fra
.me
.prev
;
265 static const char LOCATE_standard___stream___IStream___eof
[] = "stream::IStream::eof";
266 val_t
standard___stream___IStream___eof(val_t p0
){
267 struct {struct stack_frame_t me
;} fra
;
269 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
270 fra
.me
.file
= LOCATE_standard___stream
;
272 fra
.me
.meth
= LOCATE_standard___stream___IStream___eof
;
273 fra
.me
.has_broke
= 0;
275 fra
.me
.nitni_local_ref_head
= NULL
;
276 /* ../lib/standard/stream.nit:79 */
277 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 79);
278 stack_frame_head
= fra
.me
.prev
;
281 static const char LOCATE_standard___stream___OStream___write
[] = "stream::OStream::write";
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 fra
.me
.nitni_local_ref_head
= NULL
;
292 /* ../lib/standard/stream.nit:86 */
293 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 86);
294 stack_frame_head
= fra
.me
.prev
;
297 static const char LOCATE_standard___stream___OStream___is_writable
[] = "stream::OStream::is_writable";
298 val_t
standard___stream___OStream___is_writable(val_t p0
){
299 struct {struct stack_frame_t me
;} fra
;
301 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
302 fra
.me
.file
= LOCATE_standard___stream
;
304 fra
.me
.meth
= LOCATE_standard___stream___OStream___is_writable
;
305 fra
.me
.has_broke
= 0;
307 fra
.me
.nitni_local_ref_head
= NULL
;
308 /* ../lib/standard/stream.nit:89 */
309 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 89);
310 stack_frame_head
= fra
.me
.prev
;
313 static const char LOCATE_standard___stream___BufferedIStream___read_char
[] = "stream::BufferedIStream::(stream::IStream::read_char)";
314 val_t
standard___stream___BufferedIStream___read_char(val_t p0
){
315 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
321 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
322 fra
.me
.file
= LOCATE_standard___stream
;
324 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___read_char
;
325 fra
.me
.has_broke
= 0;
327 fra
.me
.nitni_local_ref_head
= NULL
;
328 fra
.me
.REG
[0] = NIT_NULL
;
329 fra
.me
.REG
[1] = NIT_NULL
;
331 /* ../lib/standard/stream.nit:98 */
332 REGB0
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
333 REGB0
= TAG_Bool(!UNTAG_Bool(REGB0
));
334 if (UNTAG_Bool(REGB0
)) {
336 nit_abort("Assert failed", NULL
, LOCATE_standard___stream
, 98);
338 /* ../lib/standard/stream.nit:99 */
339 REGB0
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
340 if (UNTAG_Bool(REGB0
)) {
342 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 99);
344 REGB0
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
345 fra
.me
.REG
[1] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
346 REGB1
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
347 if (UNTAG_Bool(REGB1
)) {
348 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 99);
350 /* ../lib/standard/collection/array.nit:24 */
351 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
352 if (UNTAG_Bool(REGB1
)) {
354 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
356 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
357 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
358 if (UNTAG_Bool(REGB2
)) {
360 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
362 /* ../lib/standard/kernel.nit:236 */
363 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)>=UNTAG_Int(REGB1
));
364 /* ../lib/standard/stream.nit:99 */
365 if (UNTAG_Bool(REGB1
)) {
366 /* ../lib/standard/stream.nit:100 */
367 CALL_standard___stream___BufferedIStream___fill_buffer(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
369 /* ../lib/standard/stream.nit:102 */
370 REGB1
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
371 if (UNTAG_Bool(REGB1
)) {
373 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 102);
375 REGB1
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
376 fra
.me
.REG
[1] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
377 REGB0
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
378 if (UNTAG_Bool(REGB0
)) {
379 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 102);
381 /* ../lib/standard/collection/array.nit:24 */
382 REGB0
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
383 if (UNTAG_Bool(REGB0
)) {
385 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
387 REGB0
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
388 REGB2
= TAG_Bool(VAL_ISA(REGB0
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1
), VTID_standard___kernel___Comparable___OTHER(REGB1
))) /*cast OTHER*/;
389 if (UNTAG_Bool(REGB2
)) {
391 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
393 /* ../lib/standard/kernel.nit:236 */
394 REGB0
= TAG_Bool(UNTAG_Int(REGB1
)>=UNTAG_Int(REGB0
));
395 /* ../lib/standard/stream.nit:102 */
396 if (UNTAG_Bool(REGB0
)) {
397 /* ../lib/standard/stream.nit:103 */
399 /* ../lib/standard/kernel.nit:239 */
400 REGB0
= TAG_Int(-UNTAG_Int(REGB0
));
401 /* ../lib/standard/stream.nit:103 */
404 /* ../lib/standard/stream.nit:105 */
405 fra
.me
.REG
[1] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
406 REGB1
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
407 if (UNTAG_Bool(REGB1
)) {
409 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 105);
411 REGB1
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
412 REGB2
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
413 if (UNTAG_Bool(REGB2
)) {
414 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 105);
416 REGB1
= CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB1
);
417 /* ../lib/standard/stream.nit:106 */
418 REGB2
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
420 /* ../lib/standard/kernel.nit:238 */
421 REGB3
= TAG_Int(UNTAG_Int(REGB2
)+UNTAG_Int(REGB3
));
422 /* ../lib/standard/stream.nit:106 */
423 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB3
;
424 /* ../lib/standard/kernel.nit:416 */
425 REGB1
= TAG_Int((unsigned char)UNTAG_Char(REGB1
));
426 /* ../lib/standard/stream.nit:107 */
430 stack_frame_head
= fra
.me
.prev
;
433 static const char LOCATE_standard___stream___BufferedIStream___read
[] = "stream::BufferedIStream::(stream::IStream::read)";
434 val_t
standard___stream___BufferedIStream___read(val_t p0
, val_t p1
){
435 struct {struct stack_frame_t me
; val_t MORE_REG
[3];} fra
;
442 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
443 fra
.me
.file
= LOCATE_standard___stream
;
445 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___read
;
446 fra
.me
.has_broke
= 0;
448 fra
.me
.nitni_local_ref_head
= NULL
;
449 fra
.me
.REG
[0] = NIT_NULL
;
450 fra
.me
.REG
[1] = NIT_NULL
;
451 fra
.me
.REG
[2] = NIT_NULL
;
452 fra
.me
.REG
[3] = NIT_NULL
;
455 /* ../lib/standard/stream.nit:112 */
456 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB0
);
457 /* ../lib/standard/stream.nit:113 */
458 REGB1
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
459 if (UNTAG_Bool(REGB1
)) {
461 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 113);
463 REGB1
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
464 /* ../lib/standard/stream.nit:114 */
465 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
466 REGB2
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
467 if (UNTAG_Bool(REGB2
)) {
468 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 114);
470 /* ../lib/standard/collection/array.nit:24 */
471 REGB2
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2])!=NIT_NULL
);
472 if (UNTAG_Bool(REGB2
)) {
474 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
476 REGB2
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2]);
477 /* ../lib/standard/stream.nit:115 */
480 REGB4
= TAG_Bool(VAL_ISA(REGB3
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
481 if (UNTAG_Bool(REGB4
)) {
483 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
485 /* ../lib/standard/kernel.nit:237 */
486 REGB3
= TAG_Bool(UNTAG_Int(REGB0
)>UNTAG_Int(REGB3
));
487 /* ../lib/standard/stream.nit:115 */
488 if (UNTAG_Bool(REGB3
)) {
489 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1
), VTID_standard___kernel___Comparable___OTHER(REGB1
))) /*cast OTHER*/;
490 if (UNTAG_Bool(REGB3
)) {
492 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
494 /* ../lib/standard/kernel.nit:236 */
495 REGB3
= TAG_Bool(UNTAG_Int(REGB1
)>=UNTAG_Int(REGB2
));
496 /* ../lib/standard/stream.nit:116 */
497 if (UNTAG_Bool(REGB3
)) {
498 /* ../lib/standard/stream.nit:117 */
499 CALL_standard___stream___BufferedIStream___fill_buffer(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
500 /* ../lib/standard/stream.nit:118 */
501 REGB3
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
502 if (UNTAG_Bool(REGB3
)) {
503 fra
.me
.REG
[2] = CALL_standard___string___Object___to_s(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
506 /* ../lib/standard/stream.nit:119 */
507 REGB3
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
508 if (UNTAG_Bool(REGB3
)) {
510 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 119);
512 REGB3
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
514 /* ../lib/standard/stream.nit:120 */
515 fra
.me
.REG
[3] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
516 REGB3
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
517 if (UNTAG_Bool(REGB3
)) {
518 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 120);
520 /* ../lib/standard/collection/array.nit:24 */
521 REGB3
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[3])!=NIT_NULL
);
522 if (UNTAG_Bool(REGB3
)) {
524 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
526 REGB3
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[3]);
527 /* ../lib/standard/stream.nit:120 */
530 /* ../lib/standard/stream.nit:122 */
532 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1
), VTID_standard___kernel___Comparable___OTHER(REGB1
))) /*cast OTHER*/;
533 if (UNTAG_Bool(REGB3
)) {
535 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
537 /* ../lib/standard/kernel.nit:235 */
538 REGB3
= TAG_Bool(UNTAG_Int(REGB1
)<UNTAG_Int(REGB2
));
539 /* ../lib/standard/stream.nit:122 */
540 if (UNTAG_Bool(REGB3
)) {
542 REGB4
= TAG_Bool(VAL_ISA(REGB3
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
543 if (UNTAG_Bool(REGB4
)) {
545 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
547 /* ../lib/standard/kernel.nit:237 */
548 REGB3
= TAG_Bool(UNTAG_Int(REGB0
)>UNTAG_Int(REGB3
));
550 /* ../lib/standard/stream.nit:122 */
554 if (UNTAG_Bool(REGB3
)) {
555 /* ../lib/standard/stream.nit:123 */
556 fra
.me
.REG
[3] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
557 REGB3
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
558 if (UNTAG_Bool(REGB3
)) {
559 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 123);
561 REGB3
= CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra
.me
.REG
[3])(fra
.me
.REG
[3], REGB1
);
562 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB3
);
563 /* ../lib/standard/stream.nit:124 */
565 /* ../lib/standard/kernel.nit:238 */
566 REGB3
= TAG_Int(UNTAG_Int(REGB1
)+UNTAG_Int(REGB3
));
567 /* ../lib/standard/stream.nit:124 */
569 /* ../lib/standard/stream.nit:125 */
571 /* ../lib/standard/kernel.nit:240 */
572 REGB3
= TAG_Int(UNTAG_Int(REGB0
)-UNTAG_Int(REGB3
));
573 /* ../lib/standard/stream.nit:125 */
576 /* ../lib/standard/stream.nit:122 */
582 /* ../lib/standard/stream.nit:115 */
587 /* ../lib/standard/stream.nit:128 */
588 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB1
;
589 /* ../lib/standard/stream.nit:129 */
590 fra
.me
.REG
[1] = CALL_standard___string___Object___to_s(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
591 fra
.me
.REG
[2] = fra
.me
.REG
[1];
594 stack_frame_head
= fra
.me
.prev
;
595 return fra
.me
.REG
[2];
597 static const char LOCATE_standard___stream___BufferedIStream___read_all
[] = "stream::BufferedIStream::(stream::IStream::read_all)";
598 val_t
standard___stream___BufferedIStream___read_all(val_t p0
){
599 struct {struct stack_frame_t me
; val_t MORE_REG
[2];} fra
;
604 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
605 fra
.me
.file
= LOCATE_standard___stream
;
607 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___read_all
;
608 fra
.me
.has_broke
= 0;
610 fra
.me
.nitni_local_ref_head
= NULL
;
611 fra
.me
.REG
[0] = NIT_NULL
;
612 fra
.me
.REG
[1] = NIT_NULL
;
613 fra
.me
.REG
[2] = NIT_NULL
;
615 /* ../lib/standard/stream.nit:134 */
616 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___init();
617 /* ../lib/standard/stream.nit:135 */
619 REGB0
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
620 REGB0
= TAG_Bool(!UNTAG_Bool(REGB0
));
621 if (UNTAG_Bool(REGB0
)) {
622 /* ../lib/standard/stream.nit:136 */
623 REGB0
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
624 if (UNTAG_Bool(REGB0
)) {
626 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 136);
628 REGB0
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
629 /* ../lib/standard/stream.nit:137 */
630 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
631 REGB1
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
632 if (UNTAG_Bool(REGB1
)) {
633 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 137);
635 /* ../lib/standard/collection/array.nit:24 */
636 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2])!=NIT_NULL
);
637 if (UNTAG_Bool(REGB1
)) {
639 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
641 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2]);
642 /* ../lib/standard/stream.nit:138 */
644 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
645 if (UNTAG_Bool(REGB2
)) {
647 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
649 /* ../lib/standard/kernel.nit:235 */
650 REGB2
= TAG_Bool(UNTAG_Int(REGB0
)<UNTAG_Int(REGB1
));
651 /* ../lib/standard/stream.nit:138 */
652 if (UNTAG_Bool(REGB2
)) {
653 /* ../lib/standard/stream.nit:139 */
654 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
655 REGB2
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
656 if (UNTAG_Bool(REGB2
)) {
657 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 139);
659 REGB2
= CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra
.me
.REG
[2])(fra
.me
.REG
[2], REGB0
);
660 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB2
);
661 /* ../lib/standard/stream.nit:140 */
663 /* ../lib/standard/kernel.nit:238 */
664 REGB2
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB2
));
665 /* ../lib/standard/stream.nit:140 */
668 /* ../lib/standard/stream.nit:138 */
673 /* ../lib/standard/stream.nit:142 */
674 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB0
;
675 /* ../lib/standard/stream.nit:143 */
676 CALL_standard___stream___BufferedIStream___fill_buffer(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
678 /* ../lib/standard/stream.nit:135 */
683 /* ../lib/standard/stream.nit:145 */
684 fra
.me
.REG
[1] = CALL_standard___string___Object___to_s(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
687 stack_frame_head
= fra
.me
.prev
;
688 return fra
.me
.REG
[1];
690 static const char LOCATE_standard___stream___BufferedIStream___append_line_to
[] = "stream::BufferedIStream::(stream::IStream::append_line_to)";
691 void standard___stream___BufferedIStream___append_line_to(val_t p0
, val_t p1
){
692 struct {struct stack_frame_t me
; val_t MORE_REG
[2];} fra
;
698 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
699 fra
.me
.file
= LOCATE_standard___stream
;
701 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___append_line_to
;
702 fra
.me
.has_broke
= 0;
704 fra
.me
.nitni_local_ref_head
= NULL
;
705 fra
.me
.REG
[0] = NIT_NULL
;
706 fra
.me
.REG
[1] = NIT_NULL
;
707 fra
.me
.REG
[2] = NIT_NULL
;
710 /* ../lib/standard/stream.nit:150 */
712 /* ../lib/standard/stream.nit:152 */
713 REGB0
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
714 if (UNTAG_Bool(REGB0
)) {
716 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 152);
718 REGB0
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
719 /* ../lib/standard/stream.nit:153 */
721 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
722 REGB1
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
723 if (UNTAG_Bool(REGB1
)) {
724 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 153);
726 /* ../lib/standard/collection/array.nit:24 */
727 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2])!=NIT_NULL
);
728 if (UNTAG_Bool(REGB1
)) {
730 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
732 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2]);
733 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
734 if (UNTAG_Bool(REGB2
)) {
736 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
738 /* ../lib/standard/kernel.nit:235 */
739 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)<UNTAG_Int(REGB1
));
740 /* ../lib/standard/stream.nit:153 */
741 if (UNTAG_Bool(REGB1
)) {
742 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
743 REGB1
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
744 if (UNTAG_Bool(REGB1
)) {
745 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 153);
747 REGB1
= CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra
.me
.REG
[2])(fra
.me
.REG
[2], REGB0
);
748 REGB2
= TAG_Char('\n');
749 REGB3
= TAG_Bool(IS_EQUAL_OO(REGB1
,REGB2
));
750 if (UNTAG_Bool(REGB3
)) {
752 /* ../lib/standard/kernel.nit:381 */
753 REGB2
= TAG_Bool((REGB1
)==(REGB2
));
754 /* ../lib/standard/stream.nit:153 */
757 REGB3
= TAG_Bool(!UNTAG_Bool(REGB3
));
762 if (UNTAG_Bool(REGB3
)) {
764 /* ../lib/standard/kernel.nit:238 */
765 REGB3
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB3
));
766 /* ../lib/standard/stream.nit:153 */
773 /* ../lib/standard/stream.nit:156 */
774 REGB3
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
775 if (UNTAG_Bool(REGB3
)) {
777 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 156);
779 REGB3
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
780 REGB2
= TAG_Bool(VAL_ISA(REGB3
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
781 if (UNTAG_Bool(REGB2
)) {
783 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
785 /* ../lib/standard/kernel.nit:237 */
786 REGB3
= TAG_Bool(UNTAG_Int(REGB0
)>UNTAG_Int(REGB3
));
787 /* ../lib/standard/stream.nit:156 */
788 if (UNTAG_Bool(REGB3
)) {
789 /* ../lib/standard/collection/array.nit:24 */
790 REGB3
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
791 if (UNTAG_Bool(REGB3
)) {
793 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
795 REGB3
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
796 /* ../lib/standard/kernel.nit:238 */
797 REGB3
= TAG_Int(UNTAG_Int(REGB3
)+UNTAG_Int(REGB0
));
798 /* ../lib/standard/stream.nit:158 */
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
, 158);
804 REGB2
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
805 /* ../lib/standard/kernel.nit:240 */
806 REGB2
= TAG_Int(UNTAG_Int(REGB3
)-UNTAG_Int(REGB2
));
807 /* ../lib/standard/stream.nit:158 */
808 CALL_standard___collection___array___AbstractArray___enlarge(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB2
);
809 /* ../lib/standard/stream.nit:161 */
810 REGB2
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
811 if (UNTAG_Bool(REGB2
)) {
813 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 161);
815 REGB2
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
816 /* ../lib/standard/stream.nit:162 */
818 REGB3
= TAG_Bool(VAL_ISA(REGB0
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2
), VTID_standard___kernel___Comparable___OTHER(REGB2
))) /*cast OTHER*/;
819 if (UNTAG_Bool(REGB3
)) {
821 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
823 /* ../lib/standard/kernel.nit:235 */
824 REGB3
= TAG_Bool(UNTAG_Int(REGB2
)<UNTAG_Int(REGB0
));
825 /* ../lib/standard/stream.nit:162 */
826 if (UNTAG_Bool(REGB3
)) {
827 /* ../lib/standard/stream.nit:163 */
828 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
829 REGB3
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
830 if (UNTAG_Bool(REGB3
)) {
831 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 163);
833 REGB3
= CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra
.me
.REG
[2])(fra
.me
.REG
[2], REGB2
);
834 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB3
);
835 /* ../lib/standard/stream.nit:164 */
837 /* ../lib/standard/kernel.nit:238 */
838 REGB3
= TAG_Int(UNTAG_Int(REGB2
)+UNTAG_Int(REGB3
));
839 /* ../lib/standard/stream.nit:164 */
842 /* ../lib/standard/stream.nit:162 */
848 /* ../lib/standard/stream.nit:168 */
849 fra
.me
.REG
[2] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
850 REGB2
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
851 if (UNTAG_Bool(REGB2
)) {
852 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 168);
854 /* ../lib/standard/collection/array.nit:24 */
855 REGB2
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2])!=NIT_NULL
);
856 if (UNTAG_Bool(REGB2
)) {
858 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
860 REGB2
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2]);
861 REGB3
= TAG_Bool(VAL_ISA(REGB2
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
862 if (UNTAG_Bool(REGB3
)) {
864 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
866 /* ../lib/standard/kernel.nit:235 */
867 REGB2
= TAG_Bool(UNTAG_Int(REGB0
)<UNTAG_Int(REGB2
));
868 /* ../lib/standard/stream.nit:168 */
869 if (UNTAG_Bool(REGB2
)) {
870 /* ../lib/standard/stream.nit:170 */
872 /* ../lib/standard/kernel.nit:238 */
873 REGB2
= TAG_Int(UNTAG_Int(REGB0
)+UNTAG_Int(REGB2
));
874 /* ../lib/standard/stream.nit:170 */
875 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB2
;
876 /* ../lib/standard/stream.nit:171 */
879 /* ../lib/standard/stream.nit:174 */
880 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB0
;
881 /* ../lib/standard/stream.nit:175 */
882 REGB0
= CALL_standard___stream___BufferedIStream___end_reached(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
883 if (UNTAG_Bool(REGB0
)) {
884 /* ../lib/standard/stream.nit:176 */
887 /* ../lib/standard/stream.nit:178 */
888 CALL_standard___stream___BufferedIStream___fill_buffer(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
893 stack_frame_head
= fra
.me
.prev
;
896 static const char LOCATE_standard___stream___BufferedIStream___eof
[] = "stream::BufferedIStream::(stream::IStream::eof)";
897 val_t
standard___stream___BufferedIStream___eof(val_t p0
){
898 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
903 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
904 fra
.me
.file
= LOCATE_standard___stream
;
906 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___eof
;
907 fra
.me
.has_broke
= 0;
909 fra
.me
.nitni_local_ref_head
= NULL
;
910 fra
.me
.REG
[0] = NIT_NULL
;
911 fra
.me
.REG
[1] = NIT_NULL
;
913 /* ../lib/standard/stream.nit:184 */
914 REGB0
= TAG_Bool(ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0])!=NIT_NULL
);
915 if (UNTAG_Bool(REGB0
)) {
917 nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_standard___stream
, 184);
919 REGB0
= ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]);
920 fra
.me
.REG
[1] = ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]);
921 REGB1
= TAG_Bool(fra
.me
.REG
[1]==NIT_NULL
);
922 if (UNTAG_Bool(REGB1
)) {
923 nit_abort("Reciever is null", NULL
, LOCATE_standard___stream
, 184);
925 /* ../lib/standard/collection/array.nit:24 */
926 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
927 if (UNTAG_Bool(REGB1
)) {
929 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
931 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
932 REGB2
= TAG_Bool(VAL_ISA(REGB1
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0
), VTID_standard___kernel___Comparable___OTHER(REGB0
))) /*cast OTHER*/;
933 if (UNTAG_Bool(REGB2
)) {
935 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
937 /* ../lib/standard/kernel.nit:236 */
938 REGB1
= TAG_Bool(UNTAG_Int(REGB0
)>=UNTAG_Int(REGB1
));
939 /* ../lib/standard/stream.nit:184 */
940 if (UNTAG_Bool(REGB1
)) {
941 REGB1
= CALL_standard___stream___BufferedIStream___end_reached(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
948 stack_frame_head
= fra
.me
.prev
;
951 static const char LOCATE_standard___stream___BufferedIStream___fill_buffer
[] = "stream::BufferedIStream::fill_buffer";
952 void standard___stream___BufferedIStream___fill_buffer(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___fill_buffer
;
959 fra
.me
.has_broke
= 0;
961 fra
.me
.nitni_local_ref_head
= NULL
;
962 /* ../lib/standard/stream.nit:192 */
963 nit_abort("Deferred method called", NULL
, LOCATE_standard___stream
, 192);
964 stack_frame_head
= fra
.me
.prev
;
967 static const char LOCATE_standard___stream___BufferedIStream___end_reached
[] = "stream::BufferedIStream::end_reached";
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 static const char LOCATE_standard___stream___BufferedIStream___prepare_buffer
[] = "stream::BufferedIStream::prepare_buffer";
984 void standard___stream___BufferedIStream___prepare_buffer(val_t p0
, val_t p1
){
985 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
988 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
989 fra
.me
.file
= LOCATE_standard___stream
;
991 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___prepare_buffer
;
992 fra
.me
.has_broke
= 0;
994 fra
.me
.nitni_local_ref_head
= NULL
;
995 fra
.me
.REG
[0] = NIT_NULL
;
996 fra
.me
.REG
[1] = NIT_NULL
;
999 /* ../lib/standard/stream.nit:201 */
1000 fra
.me
.REG
[1] = NEW_Buffer_standard___string___Buffer___with_capacity(REGB0
);
1001 ATTR_standard___stream___BufferedIStream____buffer(fra
.me
.REG
[0]) = fra
.me
.REG
[1];
1002 /* ../lib/standard/stream.nit:202 */
1004 ATTR_standard___stream___BufferedIStream____buffer_pos(fra
.me
.REG
[0]) = REGB0
;
1005 stack_frame_head
= fra
.me
.prev
;
1008 static const char LOCATE_standard___stream___BufferedIStream___init
[] = "stream::BufferedIStream::init";
1009 void standard___stream___BufferedIStream___init(val_t p0
, int* init_table
){
1010 int itpos0
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___stream___BufferedIStream
].i
;
1011 struct {struct stack_frame_t me
;} fra
;
1013 if (init_table
[itpos0
]) return;
1014 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1015 fra
.me
.file
= LOCATE_standard___stream
;
1017 fra
.me
.meth
= LOCATE_standard___stream___BufferedIStream___init
;
1018 fra
.me
.has_broke
= 0;
1019 fra
.me
.REG_size
= 0;
1020 fra
.me
.nitni_local_ref_head
= NULL
;
1021 stack_frame_head
= fra
.me
.prev
;
1022 init_table
[itpos0
] = 1;
1025 static const char LOCATE_standard___stream___FDStream___fd
[] = "stream::FDStream::fd";
1026 val_t
standard___stream___FDStream___fd(val_t p0
){
1027 struct {struct stack_frame_t me
;} fra
;
1030 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1031 fra
.me
.file
= LOCATE_standard___stream
;
1033 fra
.me
.meth
= LOCATE_standard___stream___FDStream___fd
;
1034 fra
.me
.has_broke
= 0;
1035 fra
.me
.REG_size
= 1;
1036 fra
.me
.nitni_local_ref_head
= NULL
;
1037 fra
.me
.REG
[0] = NIT_NULL
;
1039 /* ../lib/standard/stream.nit:215 */
1040 REGB0
= TAG_Bool(ATTR_standard___stream___FDStream_____atfd(fra
.me
.REG
[0])!=NIT_NULL
);
1041 if (UNTAG_Bool(REGB0
)) {
1043 nit_abort("Uninitialized attribute %s", "@fd", LOCATE_standard___stream
, 215);
1045 REGB0
= ATTR_standard___stream___FDStream_____atfd(fra
.me
.REG
[0]);
1046 stack_frame_head
= fra
.me
.prev
;
1049 static const char LOCATE_standard___stream___FDStream___fd__eq
[] = "stream::FDStream::fd=";
1050 void standard___stream___FDStream___fd__eq(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___fd__eq
;
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:215 */
1065 ATTR_standard___stream___FDStream_____atfd(fra
.me
.REG
[0]) = REGB0
;
1066 stack_frame_head
= fra
.me
.prev
;
1069 static const char LOCATE_standard___stream___FDStream___close
[] = "stream::FDStream::(stream::IOS::close)";
1070 void standard___stream___FDStream___close(val_t p0
){
1071 struct {struct stack_frame_t me
;} 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___close
;
1078 fra
.me
.has_broke
= 0;
1079 fra
.me
.REG_size
= 1;
1080 fra
.me
.nitni_local_ref_head
= NULL
;
1081 fra
.me
.REG
[0] = NIT_NULL
;
1083 /* ../lib/standard/stream.nit:218 */
1084 REGB0
= CALL_standard___stream___FDStream___fd(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
1085 CALL_standard___stream___FDStream___native_close(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
);
1086 stack_frame_head
= fra
.me
.prev
;
1089 static const char LOCATE_standard___stream___FDStream___native_close
[] = "stream::FDStream::native_close";
1090 val_t
standard___stream___FDStream___native_close(val_t p0
, val_t p1
){
1091 struct {struct stack_frame_t me
;} fra
;
1094 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1095 fra
.me
.file
= LOCATE_standard___stream
;
1097 fra
.me
.meth
= LOCATE_standard___stream___FDStream___native_close
;
1098 fra
.me
.has_broke
= 0;
1099 fra
.me
.REG_size
= 1;
1100 fra
.me
.nitni_local_ref_head
= NULL
;
1101 fra
.me
.REG
[0] = NIT_NULL
;
1104 /* ../lib/standard/stream.nit:220 */
1105 REGB0
= FDStream_native_close___out(fra
.me
.REG
[0], REGB0
);
1106 stack_frame_head
= fra
.me
.prev
;
1109 static const char LOCATE_standard___stream___FDStream___native_read_char
[] = "stream::FDStream::native_read_char";
1110 val_t
standard___stream___FDStream___native_read_char(val_t p0
, val_t p1
){
1111 struct {struct stack_frame_t me
;} fra
;
1114 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1115 fra
.me
.file
= LOCATE_standard___stream
;
1117 fra
.me
.meth
= LOCATE_standard___stream___FDStream___native_read_char
;
1118 fra
.me
.has_broke
= 0;
1119 fra
.me
.REG_size
= 1;
1120 fra
.me
.nitni_local_ref_head
= NULL
;
1121 fra
.me
.REG
[0] = NIT_NULL
;
1124 /* ../lib/standard/stream.nit:221 */
1125 REGB0
= FDStream_native_read_char___out(fra
.me
.REG
[0], REGB0
);
1126 stack_frame_head
= fra
.me
.prev
;
1129 static const char LOCATE_standard___stream___FDStream___native_read
[] = "stream::FDStream::native_read";
1130 val_t
standard___stream___FDStream___native_read(val_t p0
, val_t p1
, val_t p2
, val_t p3
){
1131 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
1135 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1136 fra
.me
.file
= LOCATE_standard___stream
;
1138 fra
.me
.meth
= LOCATE_standard___stream___FDStream___native_read
;
1139 fra
.me
.has_broke
= 0;
1140 fra
.me
.REG_size
= 2;
1141 fra
.me
.nitni_local_ref_head
= NULL
;
1142 fra
.me
.REG
[0] = NIT_NULL
;
1143 fra
.me
.REG
[1] = NIT_NULL
;
1148 /* ../lib/standard/stream.nit:222 */
1149 REGB1
= FDStream_native_read___out(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1], REGB1
);
1150 stack_frame_head
= fra
.me
.prev
;
1153 static const char LOCATE_standard___stream___FDStream___native_write
[] = "stream::FDStream::native_write";
1154 val_t
standard___stream___FDStream___native_write(val_t p0
, val_t p1
, val_t p2
, val_t p3
){
1155 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
1159 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1160 fra
.me
.file
= LOCATE_standard___stream
;
1162 fra
.me
.meth
= LOCATE_standard___stream___FDStream___native_write
;
1163 fra
.me
.has_broke
= 0;
1164 fra
.me
.REG_size
= 2;
1165 fra
.me
.nitni_local_ref_head
= NULL
;
1166 fra
.me
.REG
[0] = NIT_NULL
;
1167 fra
.me
.REG
[1] = NIT_NULL
;
1172 /* ../lib/standard/stream.nit:223 */
1173 REGB1
= FDStream_native_write___out(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[1], REGB1
);
1174 stack_frame_head
= fra
.me
.prev
;
1177 static const char LOCATE_standard___stream___FDStream___native_write_char
[] = "stream::FDStream::native_write_char";
1178 val_t
standard___stream___FDStream___native_write_char(val_t p0
, val_t p1
, val_t p2
){
1179 struct {struct stack_frame_t me
;} fra
;
1183 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1184 fra
.me
.file
= LOCATE_standard___stream
;
1186 fra
.me
.meth
= LOCATE_standard___stream___FDStream___native_write_char
;
1187 fra
.me
.has_broke
= 0;
1188 fra
.me
.REG_size
= 1;
1189 fra
.me
.nitni_local_ref_head
= NULL
;
1190 fra
.me
.REG
[0] = NIT_NULL
;
1194 /* ../lib/standard/stream.nit:224 */
1195 REGB1
= FDStream_native_write_char___out(fra
.me
.REG
[0], REGB0
, REGB1
);
1196 stack_frame_head
= fra
.me
.prev
;
1199 static const char LOCATE_standard___stream___FDStream___init
[] = "stream::FDStream::init";
1200 void standard___stream___FDStream___init(val_t p0
, val_t p1
, int* init_table
){
1201 int itpos1
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___stream___FDStream
].i
;
1202 struct {struct stack_frame_t me
;} fra
;
1205 if (init_table
[itpos1
]) return;
1206 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1207 fra
.me
.file
= LOCATE_standard___stream
;
1209 fra
.me
.meth
= LOCATE_standard___stream___FDStream___init
;
1210 fra
.me
.has_broke
= 0;
1211 fra
.me
.REG_size
= 1;
1212 fra
.me
.nitni_local_ref_head
= NULL
;
1213 fra
.me
.REG
[0] = NIT_NULL
;
1216 /* ../lib/standard/stream.nit:226 */
1217 CALL_standard___stream___FDStream___fd__eq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
);
1218 stack_frame_head
= fra
.me
.prev
;
1219 init_table
[itpos1
] = 1;
1222 static const char LOCATE_standard___stream___FDIStream___eof
[] = "stream::FDIStream::(stream::IStream::eof)";
1223 val_t
standard___stream___FDIStream___eof(val_t p0
){
1224 struct {struct stack_frame_t me
;} fra
;
1227 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1228 fra
.me
.file
= LOCATE_standard___stream
;
1230 fra
.me
.meth
= LOCATE_standard___stream___FDIStream___eof
;
1231 fra
.me
.has_broke
= 0;
1232 fra
.me
.REG_size
= 1;
1233 fra
.me
.nitni_local_ref_head
= NULL
;
1234 fra
.me
.REG
[0] = NIT_NULL
;
1236 /* ../lib/standard/stream.nit:232 */
1237 REGB0
= TAG_Bool(ATTR_standard___stream___FDIStream_____ateof(fra
.me
.REG
[0])!=NIT_NULL
);
1238 if (UNTAG_Bool(REGB0
)) {
1240 nit_abort("Uninitialized attribute %s", "@eof", LOCATE_standard___stream
, 232);
1242 REGB0
= ATTR_standard___stream___FDIStream_____ateof(fra
.me
.REG
[0]);
1243 stack_frame_head
= fra
.me
.prev
;
1246 static const char LOCATE_standard___stream___FDIStream___eof__eq
[] = "stream::FDIStream::eof=";
1247 void standard___stream___FDIStream___eof__eq(val_t p0
, val_t p1
){
1248 struct {struct stack_frame_t me
;} fra
;
1251 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1252 fra
.me
.file
= LOCATE_standard___stream
;
1254 fra
.me
.meth
= LOCATE_standard___stream___FDIStream___eof__eq
;
1255 fra
.me
.has_broke
= 0;
1256 fra
.me
.REG_size
= 1;
1257 fra
.me
.nitni_local_ref_head
= NULL
;
1258 fra
.me
.REG
[0] = NIT_NULL
;
1261 /* ../lib/standard/stream.nit:232 */
1262 ATTR_standard___stream___FDIStream_____ateof(fra
.me
.REG
[0]) = REGB0
;
1263 stack_frame_head
= fra
.me
.prev
;
1266 static const char LOCATE_standard___stream___FDIStream___read_char
[] = "stream::FDIStream::(stream::IStream::read_char)";
1267 val_t
standard___stream___FDIStream___read_char(val_t p0
){
1268 struct {struct stack_frame_t me
;} fra
;
1273 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1274 fra
.me
.file
= LOCATE_standard___stream
;
1276 fra
.me
.meth
= LOCATE_standard___stream___FDIStream___read_char
;
1277 fra
.me
.has_broke
= 0;
1278 fra
.me
.REG_size
= 1;
1279 fra
.me
.nitni_local_ref_head
= NULL
;
1280 fra
.me
.REG
[0] = NIT_NULL
;
1282 /* ../lib/standard/stream.nit:236 */
1283 REGB0
= CALL_standard___stream___FDStream___fd(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
1284 REGB0
= CALL_standard___stream___FDStream___native_read_char(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
);
1285 /* ../lib/standard/stream.nit:237 */
1287 /* ../lib/standard/kernel.nit:239 */
1288 REGB1
= TAG_Int(-UNTAG_Int(REGB1
));
1289 /* ../lib/standard/stream.nit:237 */
1290 REGB2
= TAG_Bool(IS_EQUAL_OO(REGB0
,REGB1
));
1291 if (UNTAG_Bool(REGB2
)) {
1293 /* ../lib/standard/kernel.nit:230 */
1294 REGB1
= TAG_Bool((REGB0
)==(REGB1
));
1295 /* ../lib/standard/stream.nit:237 */
1298 if (UNTAG_Bool(REGB2
)) {
1299 REGB2
= TAG_Bool(1);
1300 CALL_standard___stream___FDIStream___eof__eq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB2
);
1302 /* ../lib/standard/stream.nit:238 */
1305 stack_frame_head
= fra
.me
.prev
;
1308 static const char LOCATE_standard___stream___FDIStream___init
[] = "stream::FDIStream::init";
1309 void standard___stream___FDIStream___init(val_t p0
, val_t p1
, int* init_table
){
1310 int itpos2
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___stream___FDIStream
].i
;
1311 struct {struct stack_frame_t me
;} fra
;
1314 if (init_table
[itpos2
]) 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___FDIStream___init
;
1319 fra
.me
.has_broke
= 0;
1320 fra
.me
.REG_size
= 1;
1321 fra
.me
.nitni_local_ref_head
= NULL
;
1322 fra
.me
.REG
[0] = NIT_NULL
;
1325 /* ../lib/standard/stream.nit:241 */
1326 CALL_standard___stream___FDStream___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, init_table
);
1327 stack_frame_head
= fra
.me
.prev
;
1328 init_table
[itpos2
] = 1;
1331 static const char LOCATE_standard___stream___FDOStream___is_writable
[] = "stream::FDOStream::(stream::OStream::is_writable)";
1332 val_t
standard___stream___FDOStream___is_writable(val_t p0
){
1333 struct {struct stack_frame_t me
;} fra
;
1336 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1337 fra
.me
.file
= LOCATE_standard___stream
;
1339 fra
.me
.meth
= LOCATE_standard___stream___FDOStream___is_writable
;
1340 fra
.me
.has_broke
= 0;
1341 fra
.me
.REG_size
= 1;
1342 fra
.me
.nitni_local_ref_head
= NULL
;
1343 fra
.me
.REG
[0] = NIT_NULL
;
1345 /* ../lib/standard/stream.nit:247 */
1346 REGB0
= TAG_Bool(ATTR_standard___stream___FDOStream_____atis_writable(fra
.me
.REG
[0])!=NIT_NULL
);
1347 if (UNTAG_Bool(REGB0
)) {
1349 nit_abort("Uninitialized attribute %s", "@is_writable", LOCATE_standard___stream
, 247);
1351 REGB0
= ATTR_standard___stream___FDOStream_____atis_writable(fra
.me
.REG
[0]);
1352 stack_frame_head
= fra
.me
.prev
;
1355 static const char LOCATE_standard___stream___FDOStream___is_writable__eq
[] = "stream::FDOStream::is_writable=";
1356 void standard___stream___FDOStream___is_writable__eq(val_t p0
, val_t p1
){
1357 struct {struct stack_frame_t me
;} fra
;
1360 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1361 fra
.me
.file
= LOCATE_standard___stream
;
1363 fra
.me
.meth
= LOCATE_standard___stream___FDOStream___is_writable__eq
;
1364 fra
.me
.has_broke
= 0;
1365 fra
.me
.REG_size
= 1;
1366 fra
.me
.nitni_local_ref_head
= NULL
;
1367 fra
.me
.REG
[0] = NIT_NULL
;
1370 /* ../lib/standard/stream.nit:247 */
1371 ATTR_standard___stream___FDOStream_____atis_writable(fra
.me
.REG
[0]) = REGB0
;
1372 stack_frame_head
= fra
.me
.prev
;
1375 static const char LOCATE_standard___stream___FDOStream___write
[] = "stream::FDOStream::(stream::OStream::write)";
1376 void standard___stream___FDOStream___write(val_t p0
, val_t p1
){
1377 struct {struct stack_frame_t me
; val_t MORE_REG
[2];} fra
;
1382 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1383 fra
.me
.file
= LOCATE_standard___stream
;
1385 fra
.me
.meth
= LOCATE_standard___stream___FDOStream___write
;
1386 fra
.me
.has_broke
= 0;
1387 fra
.me
.REG_size
= 3;
1388 fra
.me
.nitni_local_ref_head
= NULL
;
1389 fra
.me
.REG
[0] = NIT_NULL
;
1390 fra
.me
.REG
[1] = NIT_NULL
;
1391 fra
.me
.REG
[2] = NIT_NULL
;
1394 /* ../lib/standard/stream.nit:251 */
1395 REGB0
= CALL_standard___stream___FDStream___fd(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
1396 fra
.me
.REG
[2] = CALL_standard___string___String___to_cstring(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
1397 /* ../lib/standard/collection/array.nit:24 */
1398 REGB1
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
1399 if (UNTAG_Bool(REGB1
)) {
1401 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
1403 REGB1
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
1404 /* ../lib/standard/stream.nit:251 */
1405 REGB1
= CALL_standard___stream___FDStream___native_write(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, fra
.me
.REG
[2], REGB1
);
1406 /* ../lib/standard/collection/array.nit:24 */
1407 REGB0
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1])!=NIT_NULL
);
1408 if (UNTAG_Bool(REGB0
)) {
1410 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
1412 REGB0
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[1]);
1413 REGB2
= TAG_Bool(VAL_ISA(REGB0
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1
), VTID_standard___kernel___Comparable___OTHER(REGB1
))) /*cast OTHER*/;
1414 if (UNTAG_Bool(REGB2
)) {
1416 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
1418 /* ../lib/standard/kernel.nit:235 */
1419 REGB0
= TAG_Bool(UNTAG_Int(REGB1
)<UNTAG_Int(REGB0
));
1420 /* ../lib/standard/stream.nit:252 */
1421 if (UNTAG_Bool(REGB0
)) {
1422 REGB0
= TAG_Bool(0);
1423 CALL_standard___stream___FDOStream___is_writable__eq(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
);
1425 stack_frame_head
= fra
.me
.prev
;
1428 static const char LOCATE_standard___stream___FDOStream___init
[] = "stream::FDOStream::init";
1429 void standard___stream___FDOStream___init(val_t p0
, val_t p1
, int* init_table
){
1430 int itpos3
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___stream___FDOStream
].i
;
1431 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
1434 if (init_table
[itpos3
]) return;
1435 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1436 fra
.me
.file
= LOCATE_standard___stream
;
1438 fra
.me
.meth
= LOCATE_standard___stream___FDOStream___init
;
1439 fra
.me
.has_broke
= 0;
1440 fra
.me
.REG_size
= 2;
1441 fra
.me
.nitni_local_ref_head
= NULL
;
1442 fra
.me
.REG
[0] = NIT_NULL
;
1443 fra
.me
.REG
[1] = NIT_NULL
;
1446 /* ../lib/standard/stream.nit:255 */
1447 fra
.me
.REG
[1] = fra
.me
.REG
[0];
1448 CALL_standard___stream___FDStream___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, init_table
);
1449 /* ../lib/standard/stream.nit:257 */
1450 REGB0
= TAG_Bool(1);
1451 CALL_standard___stream___FDOStream___is_writable__eq(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB0
);
1452 stack_frame_head
= fra
.me
.prev
;
1453 init_table
[itpos3
] = 1;
1456 static const char LOCATE_standard___stream___FDIOStream___init
[] = "stream::FDIOStream::init";
1457 void standard___stream___FDIOStream___init(val_t p0
, val_t p1
, int* init_table
){
1458 int itpos4
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___stream___FDIOStream
].i
;
1459 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
1463 if (init_table
[itpos4
]) return;
1464 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1465 fra
.me
.file
= LOCATE_standard___stream
;
1467 fra
.me
.meth
= LOCATE_standard___stream___FDIOStream___init
;
1468 fra
.me
.has_broke
= 0;
1469 fra
.me
.REG_size
= 2;
1470 fra
.me
.nitni_local_ref_head
= NULL
;
1471 fra
.me
.REG
[0] = NIT_NULL
;
1472 fra
.me
.REG
[1] = NIT_NULL
;
1475 /* ../lib/standard/stream.nit:265 */
1476 fra
.me
.REG
[1] = fra
.me
.REG
[0];
1478 CALL_standard___stream___FDIStream___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, init_table
);
1479 CALL_standard___stream___FDOStream___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], REGB0
, init_table
);
1480 /* ../lib/standard/stream.nit:267 */
1481 CALL_standard___stream___FDStream___fd__eq(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB1
);
1482 /* ../lib/standard/stream.nit:268 */
1483 REGB1
= TAG_Bool(1);
1484 CALL_standard___stream___FDOStream___is_writable__eq(fra
.me
.REG
[1])(fra
.me
.REG
[1], REGB1
);
1485 stack_frame_head
= fra
.me
.prev
;
1486 init_table
[itpos4
] = 1;
1489 static const char LOCATE_standard___stream___Object___poll
[] = "stream::Object::poll";
1490 val_t
standard___stream___Object___poll(val_t p0
, val_t p1
){
1491 struct {struct stack_frame_t me
; val_t MORE_REG
[4];} fra
;
1495 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1496 fra
.me
.file
= LOCATE_standard___stream
;
1498 fra
.me
.meth
= LOCATE_standard___stream___Object___poll
;
1499 fra
.me
.has_broke
= 0;
1500 fra
.me
.REG_size
= 5;
1501 fra
.me
.nitni_local_ref_head
= NULL
;
1502 fra
.me
.REG
[0] = NIT_NULL
;
1503 fra
.me
.REG
[1] = NIT_NULL
;
1504 fra
.me
.REG
[2] = NIT_NULL
;
1505 fra
.me
.REG
[3] = NIT_NULL
;
1506 fra
.me
.REG
[4] = NIT_NULL
;
1509 /* ../lib/standard/stream.nit:277 */
1510 fra
.me
.REG
[2] = NEW_Array_standard___collection___array___Array___init();
1511 /* ../lib/standard/stream.nit:278 */
1512 fra
.me
.REG
[3] = NEW_Array_standard___collection___array___Array___init();
1513 /* ../lib/standard/stream.nit:279 */
1514 fra
.me
.REG
[4] = NEW_HashMap_standard___collection___hash_collection___HashMap___init();
1515 CALL_standard___collection___abstract_collection___Collection___iterate(fra
.me
.REG
[1])(fra
.me
.REG
[1], (&(fra
.me
)), ((fun_t
)OC_standard___stream___Object___poll_1
));
1516 /* ../lib/standard/stream.nit:288 */
1517 fra
.me
.REG
[3] = CALL_standard___stream___Object___intern_poll(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[2], fra
.me
.REG
[3]);
1518 /* ../lib/standard/stream.nit:290 */
1519 REGB0
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
1520 if (UNTAG_Bool(REGB0
)) {
1522 REGB1
= TAG_Bool(fra
.me
.REG
[3]==NIT_NULL
);
1523 if (UNTAG_Bool(REGB1
)) {
1524 REGB1
= TAG_Bool(0);
1527 /* ../lib/standard/kernel.nit:230 */
1528 REGB1
= TAG_Bool((fra
.me
.REG
[3])==(NIT_NULL
));
1529 /* ../lib/standard/stream.nit:290 */
1533 if (UNTAG_Bool(REGB0
)) {
1534 /* ../lib/standard/stream.nit:291 */
1535 fra
.me
.REG
[2] = NIT_NULL
;
1538 /* ../lib/standard/stream.nit:293 */
1539 fra
.me
.REG
[3] = CALL_standard___collection___abstract_collection___MapRead_____bra(fra
.me
.REG
[4])(fra
.me
.REG
[4], fra
.me
.REG
[3]);
1540 fra
.me
.REG
[2] = fra
.me
.REG
[3];
1544 stack_frame_head
= fra
.me
.prev
;
1545 return fra
.me
.REG
[2];
1547 void OC_standard___stream___Object___poll_1(struct stack_frame_t
*closctx
, val_t p0
, struct stack_frame_t
*closctx_param
, fun_t clos_fun0
){
1548 struct {struct stack_frame_t me
;} fra
;
1553 /* ../lib/standard/stream.nit:280 */
1554 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1555 fra
.me
.file
= LOCATE_standard___stream
;
1557 fra
.me
.meth
= LOCATE_standard___stream___Object___poll
;
1558 fra
.me
.has_broke
= 0;
1559 fra
.me
.REG_size
= 1;
1560 fra
.me
.nitni_local_ref_head
= NULL
;
1561 fra
.me
.REG
[0] = NIT_NULL
;
1562 fra
.me
.closure_ctx
= closctx_param
;
1563 fra
.me
.closure_funs
= CREG
;
1565 CREG
[0] = clos_fun0
;
1566 /* ../lib/standard/stream.nit:281 */
1567 REGB0
= CALL_standard___stream___FDStream___fd(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
1568 /* ../lib/standard/stream.nit:282 */
1569 REGB1
= TAG_Bool(VAL_ISA(fra
.me
.REG
[0], COLOR_standard___stream___FDIStream
, ID_standard___stream___FDIStream
)) /*cast FDIStream*/;
1570 if (UNTAG_Bool(REGB1
)) {
1571 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[2])(closctx
->REG
[2], REGB0
);
1573 /* ../lib/standard/stream.nit:283 */
1574 REGB1
= TAG_Bool(VAL_ISA(fra
.me
.REG
[0], COLOR_standard___stream___FDOStream
, ID_standard___stream___FDOStream
)) /*cast FDOStream*/;
1575 if (UNTAG_Bool(REGB1
)) {
1576 CALL_standard___collection___abstract_collection___SimpleCollection___add(closctx
->REG
[3])(closctx
->REG
[3], REGB0
);
1578 /* ../lib/standard/stream.nit:285 */
1579 CALL_standard___collection___abstract_collection___Map_____braeq(closctx
->REG
[4])(closctx
->REG
[4], REGB0
, fra
.me
.REG
[0]);
1580 stack_frame_head
= fra
.me
.prev
;
1583 static const char LOCATE_standard___stream___Object___intern_poll
[] = "stream::Object::intern_poll";
1584 val_t
standard___stream___Object___intern_poll(val_t p0
, val_t p1
, val_t p2
){
1585 struct {struct stack_frame_t me
; val_t MORE_REG
[2];} fra
;
1587 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
1588 fra
.me
.file
= LOCATE_standard___stream
;
1590 fra
.me
.meth
= LOCATE_standard___stream___Object___intern_poll
;
1591 fra
.me
.has_broke
= 0;
1592 fra
.me
.REG_size
= 3;
1593 fra
.me
.nitni_local_ref_head
= NULL
;
1594 fra
.me
.REG
[0] = NIT_NULL
;
1595 fra
.me
.REG
[1] = NIT_NULL
;
1596 fra
.me
.REG
[2] = NIT_NULL
;
1600 /* ../lib/standard/stream.nit:297 */
1601 fra
.me
.REG
[2] = Object_intern_poll___out(fra
.me
.REG
[0], fra
.me
.REG
[1], fra
.me
.REG
[2]);
1604 stack_frame_head
= fra
.me
.prev
;
1605 return fra
.me
.REG
[2];