1 #include "stream._sep.h"
2 void stream___IOS___close(val_t self
) {
3 struct trace_t trace
= {NULL
, "stream::IOS::close (bin/../lib/standard//stream.nit:20,2--21:11)"};
4 trace
.prev
= tracehead
; tracehead
= &trace
;
5 fprintf(stderr
, "Deferred method close called (bin/../lib/standard//stream.nit:20,2)\n");
7 tracehead
= trace
.prev
;
10 val_t
stream___IStream___read_char(val_t self
) {
11 struct trace_t trace
= {NULL
, "stream::IStream::read_char (bin/../lib/standard//stream.nit:27,2--28:20)"};
12 trace
.prev
= tracehead
; tracehead
= &trace
;
13 fprintf(stderr
, "Deferred method read_char called (bin/../lib/standard//stream.nit:27,2)\n");
15 tracehead
= trace
.prev
;
18 val_t
stream___IStream___read(val_t self
, val_t param0
) {
19 struct trace_t trace
= {NULL
, "stream::IStream::read (bin/../lib/standard//stream.nit:30,2--41:10)"};
24 trace
.prev
= tracehead
; tracehead
= &trace
;
26 variable2
= NEW_string___String___with_capacity( variable0
/*i*/); /*new String*/
27 variable1
= variable2
;
28 while (true) { /*while*/
29 variable2
= TAG_Bool(UNTAG_Int( variable0
/*i*/)>UNTAG_Int( TAG_Int(0)));
30 variable3
= variable2
;
31 if (UNTAG_Bool(variable3
)) { /* and */
32 variable3
= ((stream___IStream___eof_t
)CALL( self
,COLOR_stream___IStream___eof
))( self
) /*IStream::eof*/;
33 variable3
= TAG_Bool(!UNTAG_Bool(variable3
));
35 variable2
= variable3
;
36 if (!UNTAG_Bool(variable2
)) break; /* while*/
37 variable3
= ((stream___IStream___read_char_t
)CALL( self
,COLOR_stream___IStream___read_char
))( self
) /*IStream::read_char*/;
38 variable2
= variable3
;
39 variable3
= TAG_Bool(UNTAG_Int( variable2
/*c*/)>=UNTAG_Int( TAG_Int(0)));
40 if (UNTAG_Bool(variable3
)) { /*if*/
41 variable3
= TAG_Char(UNTAG_Int( variable2
/*c*/));
42 ((string___String___add_t
)CALL( variable1
/*s*/,COLOR_abstract_collection___SimpleCollection___add
))( variable1
/*s*/, variable3
) /*String::add*/;
43 variable0
= TAG_Int(UNTAG_Int(variable0
)-UNTAG_Int( TAG_Int(1))) /*i*/;
48 variable1
= variable1
/*s*/;
50 return_label0
: while(false);
51 tracehead
= trace
.prev
;
54 val_t
stream___IStream___read_line(val_t self
) {
55 struct trace_t trace
= {NULL
, "stream::IStream::read_line (bin/../lib/standard//stream.nit:44,2--50:10)"};
58 trace
.prev
= tracehead
; tracehead
= &trace
;
59 variable0
= ((stream___IStream___eof_t
)CALL( self
,COLOR_stream___IStream___eof
))( self
) /*IStream::eof*/;
60 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable0
)))) { fprintf(stderr
, "Assert failed: bin/../lib/standard//stream.nit:47,3--16\n"); nit_exit(1);}
61 variable1
= NEW_string___String___init(); /*new String*/
62 variable0
= variable1
;
63 ((stream___IStream___append_line_to_t
)CALL( self
,COLOR_stream___IStream___append_line_to
))( self
, variable0
/*s*/) /*IStream::append_line_to*/;
64 variable0
= variable0
/*s*/;
66 return_label2
: while(false);
67 tracehead
= trace
.prev
;
70 val_t
stream___IStream___read_all(val_t self
) {
71 struct trace_t trace
= {NULL
, "stream::IStream::read_all (bin/../lib/standard//stream.nit:53,2--61:10)"};
75 trace
.prev
= tracehead
; tracehead
= &trace
;
76 variable1
= NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
77 variable0
= variable1
;
78 while (true) { /*while*/
79 variable1
= ((stream___IStream___eof_t
)CALL( self
,COLOR_stream___IStream___eof
))( self
) /*IStream::eof*/;
80 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable1
)))) break; /* while*/
81 variable2
= ((stream___IStream___read_char_t
)CALL( self
,COLOR_stream___IStream___read_char
))( self
) /*IStream::read_char*/;
82 variable1
= variable2
;
83 variable2
= TAG_Bool(UNTAG_Int( variable1
/*c*/)>=UNTAG_Int( TAG_Int(0)));
84 if (UNTAG_Bool(variable2
)) { /*if*/
85 variable2
= TAG_Char(UNTAG_Int( variable1
/*c*/));
86 ((string___String___add_t
)CALL( variable0
/*s*/,COLOR_abstract_collection___SimpleCollection___add
))( variable0
/*s*/, variable2
) /*String::add*/;
91 variable0
= variable0
/*s*/;
93 return_label3
: while(false);
94 tracehead
= trace
.prev
;
97 void stream___IStream___append_line_to(val_t self
, val_t param0
) {
98 struct trace_t trace
= {NULL
, "stream::IStream::append_line_to (bin/../lib/standard//stream.nit:64,2--74:28)"};
103 trace
.prev
= tracehead
; tracehead
= &trace
;
105 while (true) { /*while*/
106 if (!UNTAG_Bool( TAG_Bool(true))) break; /* while*/
107 variable2
= ((stream___IStream___read_char_t
)CALL( self
,COLOR_stream___IStream___read_char
))( self
) /*IStream::read_char*/;
108 variable1
= variable2
;
109 variable2
= TAG_Int(-UNTAG_Int( TAG_Int(1)));
110 variable2
= TAG_Bool(( variable1
/*x*/)==(variable2
));
111 if (UNTAG_Bool(variable2
)) { /*if*/
112 variable2
= ((stream___IStream___eof_t
)CALL( self
,COLOR_stream___IStream___eof
))( self
) /*IStream::eof*/;
113 if (UNTAG_Bool(variable2
)) { /*if*/
117 variable3
= TAG_Char(UNTAG_Int( variable1
/*x*/));
118 variable2
= variable3
;
119 ((array___AbstractArray___push_t
)CALL( variable0
/*s*/,COLOR_abstract_collection___IndexedCollection___push
))( variable0
/*s*/, variable2
/*c*/) /*String::push*/;
120 variable3
= TAG_Bool(( variable2
/*c*/)==( TAG_Char('\n')));
121 if (UNTAG_Bool(variable3
)) { /*if*/
125 continue_6
: while(0);
128 return_label5
: while(false);
129 tracehead
= trace
.prev
;
132 val_t
stream___IStream___eof(val_t self
) {
133 struct trace_t trace
= {NULL
, "stream::IStream::eof (bin/../lib/standard//stream.nit:79,2--80:15)"};
134 trace
.prev
= tracehead
; tracehead
= &trace
;
135 fprintf(stderr
, "Deferred method eof called (bin/../lib/standard//stream.nit:79,2)\n");
137 tracehead
= trace
.prev
;
140 void stream___OStream___write(val_t self
, val_t param0
) {
141 struct trace_t trace
= {NULL
, "stream::OStream::write (bin/../lib/standard//stream.nit:86,2--87:21)"};
142 trace
.prev
= tracehead
; tracehead
= &trace
;
143 fprintf(stderr
, "Deferred method write called (bin/../lib/standard//stream.nit:86,2)\n");
145 tracehead
= trace
.prev
;
148 val_t
stream___OStream___is_writable(val_t self
) {
149 struct trace_t trace
= {NULL
, "stream::OStream::is_writable (bin/../lib/standard//stream.nit:89,2--90:23)"};
150 trace
.prev
= tracehead
; tracehead
= &trace
;
151 fprintf(stderr
, "Deferred method is_writable called (bin/../lib/standard//stream.nit:89,2)\n");
153 tracehead
= trace
.prev
;
156 val_t
stream___BufferedIStream___read_char(val_t self
) {
157 struct trace_t trace
= {NULL
, "stream::BufferedIStream::read_char (bin/../lib/standard//stream.nit:96,2--107:16)"};
161 trace
.prev
= tracehead
; tracehead
= &trace
;
162 variable0
= ((stream___BufferedIStream___eof_t
)CALL( self
,COLOR_stream___IStream___eof
))( self
) /*BufferedIStream::eof*/;
163 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable0
)))) { fprintf(stderr
, "Assert failed: bin/../lib/standard//stream.nit:98,3--16\n"); nit_exit(1);}
164 variable0
= ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/;
165 variable1
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
166 variable1
= ((array___AbstractArray___length_t
)CALL(variable1
,COLOR_abstract_collection___Collection___length
))(variable1
) /*String::length*/;
167 variable0
= TAG_Bool(UNTAG_Int(variable0
)>=UNTAG_Int(variable1
));
168 if (UNTAG_Bool(variable0
)) { /*if*/
169 ((stream___BufferedIStream___fill_buffer_t
)CALL( self
,COLOR_stream___BufferedIStream___fill_buffer
))( self
) /*BufferedIStream::fill_buffer*/;
171 variable0
= ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/;
172 variable1
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
173 variable1
= ((array___AbstractArray___length_t
)CALL(variable1
,COLOR_abstract_collection___Collection___length
))(variable1
) /*String::length*/;
174 variable0
= TAG_Bool(UNTAG_Int(variable0
)>=UNTAG_Int(variable1
));
175 if (UNTAG_Bool(variable0
)) { /*if*/
176 variable0
= TAG_Int(-UNTAG_Int( TAG_Int(1)));
179 variable1
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
180 variable2
= ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/;
181 variable1
= ((string___String_____bra_t
)CALL(variable1
,COLOR_abstract_collection___Map_____bra
))(variable1
, variable2
) /*String::[]*/;
182 variable0
= variable1
;
183 ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/ = TAG_Int(UNTAG_Int(ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/)+UNTAG_Int( TAG_Int(1)));
184 variable1
= TAG_Int((unsigned char)UNTAG_Char( variable0
/*c*/));
185 variable0
= variable1
;
187 return_label7
: while(false);
188 tracehead
= trace
.prev
;
191 val_t
stream___BufferedIStream___read(val_t self
, val_t param0
) {
192 struct trace_t trace
= {NULL
, "stream::BufferedIStream::read (bin/../lib/standard//stream.nit:110,2--129:10)"};
199 trace
.prev
= tracehead
; tracehead
= &trace
;
201 variable2
= NEW_string___String___with_capacity( variable0
/*i*/); /*new String*/
202 variable1
= variable2
;
203 variable3
= ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/;
204 variable2
= variable3
;
205 variable4
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
206 variable4
= ((array___AbstractArray___length_t
)CALL(variable4
,COLOR_abstract_collection___Collection___length
))(variable4
) /*String::length*/;
207 variable3
= variable4
;
208 while (true) { /*while*/
209 variable4
= TAG_Bool(UNTAG_Int( variable0
/*i*/)>UNTAG_Int( TAG_Int(0)));
210 if (!UNTAG_Bool(variable4
)) break; /* while*/
211 variable4
= TAG_Bool(UNTAG_Int( variable2
/*j*/)>=UNTAG_Int( variable3
/*k*/));
212 if (UNTAG_Bool(variable4
)) { /*if*/
213 ((stream___BufferedIStream___fill_buffer_t
)CALL( self
,COLOR_stream___BufferedIStream___fill_buffer
))( self
) /*BufferedIStream::fill_buffer*/;
214 variable4
= ((stream___BufferedIStream___eof_t
)CALL( self
,COLOR_stream___IStream___eof
))( self
) /*BufferedIStream::eof*/;
215 if (UNTAG_Bool(variable4
)) { /*if*/
216 variable1
= variable1
/*s*/;
219 variable4
= ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/;
220 variable2
= variable4
/*j=*/;
221 variable4
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
222 variable4
= ((array___AbstractArray___length_t
)CALL(variable4
,COLOR_abstract_collection___Collection___length
))(variable4
) /*String::length*/;
223 variable3
= variable4
/*k=*/;
225 while (true) { /*while*/
226 variable4
= TAG_Bool(UNTAG_Int( variable2
/*j*/)<UNTAG_Int( variable3
/*k*/));
227 variable5
= variable4
;
228 if (UNTAG_Bool(variable5
)) { /* and */
229 variable5
= TAG_Bool(UNTAG_Int( variable0
/*i*/)>UNTAG_Int( TAG_Int(0)));
231 variable4
= variable5
;
232 if (!UNTAG_Bool(variable4
)) break; /* while*/
233 variable4
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
234 variable4
= ((string___String_____bra_t
)CALL(variable4
,COLOR_abstract_collection___Map_____bra
))(variable4
, variable2
/*j*/) /*String::[]*/;
235 ((string___String___add_t
)CALL( variable1
/*s*/,COLOR_abstract_collection___SimpleCollection___add
))( variable1
/*s*/, variable4
) /*String::add*/;
236 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(1))) /*j*/;
237 variable0
= TAG_Int(UNTAG_Int(variable0
)-UNTAG_Int( TAG_Int(1))) /*i*/;
238 continue_10
: while(0);
241 continue_9
: while(0);
244 ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/ = variable2
/*j*/;
245 variable1
= variable1
/*s*/;
247 return_label8
: while(false);
248 tracehead
= trace
.prev
;
251 val_t
stream___BufferedIStream___read_all(val_t self
) {
252 struct trace_t trace
= {NULL
, "stream::BufferedIStream::read_all (bin/../lib/standard//stream.nit:132,2--145:10)"};
257 trace
.prev
= tracehead
; tracehead
= &trace
;
258 variable1
= NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
259 variable0
= variable1
;
260 while (true) { /*while*/
261 variable1
= ((stream___BufferedIStream___eof_t
)CALL( self
,COLOR_stream___IStream___eof
))( self
) /*BufferedIStream::eof*/;
262 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable1
)))) break; /* while*/
263 variable2
= ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/;
264 variable1
= variable2
;
265 variable3
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
266 variable3
= ((array___AbstractArray___length_t
)CALL(variable3
,COLOR_abstract_collection___Collection___length
))(variable3
) /*String::length*/;
267 variable2
= variable3
;
268 while (true) { /*while*/
269 variable3
= TAG_Bool(UNTAG_Int( variable1
/*j*/)<UNTAG_Int( variable2
/*k*/));
270 if (!UNTAG_Bool(variable3
)) break; /* while*/
271 variable3
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
272 variable3
= ((string___String_____bra_t
)CALL(variable3
,COLOR_abstract_collection___Map_____bra
))(variable3
, variable1
/*j*/) /*String::[]*/;
273 ((string___String___add_t
)CALL( variable0
/*s*/,COLOR_abstract_collection___SimpleCollection___add
))( variable0
/*s*/, variable3
) /*String::add*/;
274 variable1
= TAG_Int(UNTAG_Int(variable1
)+UNTAG_Int( TAG_Int(1))) /*j*/;
275 continue_13
: while(0);
278 ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/ = variable1
/*j*/;
279 ((stream___BufferedIStream___fill_buffer_t
)CALL( self
,COLOR_stream___BufferedIStream___fill_buffer
))( self
) /*BufferedIStream::fill_buffer*/;
280 continue_12
: while(0);
283 variable0
= variable0
/*s*/;
285 return_label11
: while(false);
286 tracehead
= trace
.prev
;
289 void stream___BufferedIStream___append_line_to(val_t self
, val_t param0
) {
290 struct trace_t trace
= {NULL
, "stream::BufferedIStream::append_line_to (bin/../lib/standard//stream.nit:148,2--178:16)"};
295 trace
.prev
= tracehead
; tracehead
= &trace
;
297 while (true) { /*while*/
298 if (!UNTAG_Bool( TAG_Bool(true))) break; /* while*/
299 variable2
= ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/;
300 variable1
= variable2
;
301 while (true) { /*while*/
302 variable2
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
303 variable2
= ((array___AbstractArray___length_t
)CALL(variable2
,COLOR_abstract_collection___Collection___length
))(variable2
) /*String::length*/;
304 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)<UNTAG_Int(variable2
));
305 variable3
= variable2
;
306 if (UNTAG_Bool(variable3
)) { /* and */
307 variable3
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
308 variable3
= ((string___String_____bra_t
)CALL(variable3
,COLOR_abstract_collection___Map_____bra
))(variable3
, variable1
/*i*/) /*String::[]*/;
309 variable3
= TAG_Bool((variable3
)!=( TAG_Char('\n')));
311 variable2
= variable3
;
312 if (!UNTAG_Bool(variable2
)) break; /* while*/
313 variable1
= TAG_Int(UNTAG_Int(variable1
)+UNTAG_Int( TAG_Int(1))) /*i*/;
314 continue_16
: while(0);
317 variable2
= ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/;
318 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)>UNTAG_Int(variable2
));
319 if (UNTAG_Bool(variable2
)) { /*if*/
320 variable2
= ((array___AbstractArray___length_t
)CALL( variable0
/*s*/,COLOR_abstract_collection___Collection___length
))( variable0
/*s*/) /*String::length*/;
321 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( variable1
/*i*/));
322 variable3
= ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/;
323 variable2
= TAG_Int(UNTAG_Int(variable2
)-UNTAG_Int(variable3
));
324 ((string___String___enlarge_t
)CALL( variable0
/*s*/,COLOR_array___AbstractArray___enlarge
))( variable0
/*s*/, variable2
) /*String::enlarge*/;
325 variable3
= ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/;
326 variable2
= variable3
;
327 while (true) { /*while*/
328 variable3
= TAG_Bool(UNTAG_Int( variable2
/*j*/)<UNTAG_Int( variable1
/*i*/));
329 if (!UNTAG_Bool(variable3
)) break; /* while*/
330 variable3
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
331 variable3
= ((string___String_____bra_t
)CALL(variable3
,COLOR_abstract_collection___Map_____bra
))(variable3
, variable2
/*j*/) /*String::[]*/;
332 ((string___String___add_t
)CALL( variable0
/*s*/,COLOR_abstract_collection___SimpleCollection___add
))( variable0
/*s*/, variable3
) /*String::add*/;
333 variable2
= TAG_Int(UNTAG_Int(variable2
)+UNTAG_Int( TAG_Int(1))) /*j*/;
334 continue_17
: while(0);
338 variable2
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
339 variable2
= ((array___AbstractArray___length_t
)CALL(variable2
,COLOR_abstract_collection___Collection___length
))(variable2
) /*String::length*/;
340 variable2
= TAG_Bool(UNTAG_Int( variable1
/*i*/)<UNTAG_Int(variable2
));
341 if (UNTAG_Bool(variable2
)) { /*if*/
342 variable2
= TAG_Int(UNTAG_Int( variable1
/*i*/)+UNTAG_Int( TAG_Int(1)));
343 ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/ = variable2
;
346 ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/ = variable1
/*i*/;
347 variable2
= ((stream___BufferedIStream___end_reached_t
)CALL( self
,COLOR_stream___BufferedIStream___end_reached
))( self
) /*BufferedIStream::end_reached*/;
348 if (UNTAG_Bool(variable2
)) { /*if*/
351 ((stream___BufferedIStream___fill_buffer_t
)CALL( self
,COLOR_stream___BufferedIStream___fill_buffer
))( self
) /*BufferedIStream::fill_buffer*/;
354 continue_15
: while(0);
357 return_label14
: while(false);
358 tracehead
= trace
.prev
;
361 val_t
stream___BufferedIStream___eof(val_t self
) {
362 struct trace_t trace
= {NULL
, "stream::BufferedIStream::eof (bin/../lib/standard//stream.nit:184,2--71)"};
365 trace
.prev
= tracehead
; tracehead
= &trace
;
366 variable0
= ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/;
367 variable1
= ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/;
368 variable1
= ((array___AbstractArray___length_t
)CALL(variable1
,COLOR_abstract_collection___Collection___length
))(variable1
) /*String::length*/;
369 variable0
= TAG_Bool(UNTAG_Int(variable0
)>=UNTAG_Int(variable1
));
370 variable1
= variable0
;
371 if (UNTAG_Bool(variable1
)) { /* and */
372 variable1
= ((stream___BufferedIStream___end_reached_t
)CALL( self
,COLOR_stream___BufferedIStream___end_reached
))( self
) /*BufferedIStream::end_reached*/;
374 variable0
= variable1
;
376 return_label18
: while(false);
377 tracehead
= trace
.prev
;
380 void stream___BufferedIStream___fill_buffer(val_t self
) {
381 struct trace_t trace
= {NULL
, "stream::BufferedIStream::fill_buffer (bin/../lib/standard//stream.nit:192,2--193:27)"};
382 trace
.prev
= tracehead
; tracehead
= &trace
;
383 fprintf(stderr
, "Deferred method fill_buffer called (bin/../lib/standard//stream.nit:192,2)\n");
385 tracehead
= trace
.prev
;
388 val_t
stream___BufferedIStream___end_reached(val_t self
) {
389 struct trace_t trace
= {NULL
, "stream::BufferedIStream::end_reached (bin/../lib/standard//stream.nit:195,2--196:33)"};
390 trace
.prev
= tracehead
; tracehead
= &trace
;
391 fprintf(stderr
, "Deferred method end_reached called (bin/../lib/standard//stream.nit:195,2)\n");
393 tracehead
= trace
.prev
;
396 void stream___BufferedIStream___prepare_buffer(val_t self
, val_t param0
) {
397 struct trace_t trace
= {NULL
, "stream::BufferedIStream::prepare_buffer (bin/../lib/standard//stream.nit:198,2--202:17)"};
400 trace
.prev
= tracehead
; tracehead
= &trace
;
402 variable1
= NEW_string___String___with_capacity( variable0
/*capacity*/); /*new String*/
403 ATTR_stream___BufferedIStream____buffer( self
) /*BufferedIStream::_buffer*/ = variable1
;
404 ATTR_stream___BufferedIStream____buffer_pos( self
) /*BufferedIStream::_buffer_pos*/ = TAG_Int(0);
405 tracehead
= trace
.prev
;
408 void stream___FDStream___close(val_t self
) {
409 struct trace_t trace
= {NULL
, "stream::FDStream::close (bin/../lib/standard//stream.nit:218,2--37)"};
411 trace
.prev
= tracehead
; tracehead
= &trace
;
412 variable0
= ATTR_stream___FDStream____fd( self
) /*FDStream::_fd*/;
413 ((stream___FDStream___native_close_t
)CALL( self
,COLOR_stream___FDStream___native_close
))( self
, variable0
) /*FDStream::native_close*/;
414 tracehead
= trace
.prev
;
417 val_t
stream___FDStream___native_close(val_t self
, val_t param0
) {
418 struct trace_t trace
= {NULL
, "stream::FDStream::native_close (bin/../lib/standard//stream.nit:220,2--91)"};
419 trace
.prev
= tracehead
; tracehead
= &trace
;
420 tracehead
= trace
.prev
;
421 return TAG_Int(stream_FDStream_FDStream_native_close_1( self
, UNTAG_Int( param0
)));
423 val_t
stream___FDStream___native_read_char(val_t self
, val_t param0
) {
424 struct trace_t trace
= {NULL
, "stream::FDStream::native_read_char (bin/../lib/standard//stream.nit:221,2--99)"};
425 trace
.prev
= tracehead
; tracehead
= &trace
;
426 tracehead
= trace
.prev
;
427 return TAG_Int(stream_FDStream_FDStream_native_read_char_1( self
, UNTAG_Int( param0
)));
429 val_t
stream___FDStream___native_read(val_t self
, val_t param0
, val_t param1
, val_t param2
) {
430 struct trace_t trace
= {NULL
, "stream::FDStream::native_read (bin/../lib/standard//stream.nit:222,2--118)"};
431 trace
.prev
= tracehead
; tracehead
= &trace
;
432 tracehead
= trace
.prev
;
433 return TAG_Int(stream_FDStream_FDStream_native_read_3( self
, UNTAG_Int( param0
), UNBOX_NativeString( param1
), UNTAG_Int( param2
)));
435 val_t
stream___FDStream___native_write(val_t self
, val_t param0
, val_t param1
, val_t param2
) {
436 struct trace_t trace
= {NULL
, "stream::FDStream::native_write (bin/../lib/standard//stream.nit:223,2--120)"};
437 trace
.prev
= tracehead
; tracehead
= &trace
;
438 tracehead
= trace
.prev
;
439 return TAG_Int(stream_FDStream_FDStream_native_write_3( self
, UNTAG_Int( param0
), UNBOX_NativeString( param1
), UNTAG_Int( param2
)));
441 void stream___FDStream___init(val_t self
, val_t param0
, int* init_table
) {
442 struct trace_t trace
= {NULL
, "stream::FDStream::init (bin/../lib/standard//stream.nit:225,2--26)"};
444 trace
.prev
= tracehead
; tracehead
= &trace
;
446 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_FDStream
].i
]) return;
447 ATTR_stream___FDStream____fd( self
) /*FDStream::_fd*/ = variable0
/*fd*/;
448 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_FDStream
].i
] = 1;
449 tracehead
= trace
.prev
;
452 val_t
stream___FDIStream___eof(val_t self
) {
453 struct trace_t trace
= {NULL
, "stream::FDIStream::eof (bin/../lib/standard//stream.nit:231,2--31)"};
454 trace
.prev
= tracehead
; tracehead
= &trace
;
455 tracehead
= trace
.prev
;
456 return ATTR_stream___FDIStream____eof( self
) /*FDIStream::_eof*/;
458 val_t
stream___FDIStream___read_char(val_t self
) {
459 struct trace_t trace
= {NULL
, "stream::FDIStream::read_char (bin/../lib/standard//stream.nit:233,2--237:11)"};
462 trace
.prev
= tracehead
; tracehead
= &trace
;
463 variable1
= ATTR_stream___FDStream____fd( self
) /*FDIStream::_fd*/;
464 variable1
= ((stream___FDStream___native_read_char_t
)CALL( self
,COLOR_stream___FDStream___native_read_char
))( self
, variable1
) /*FDIStream::native_read_char*/;
465 variable0
= variable1
;
466 variable1
= TAG_Int(-UNTAG_Int( TAG_Int(1)));
467 variable1
= TAG_Bool(( variable0
/*nb*/)==(variable1
));
468 if (UNTAG_Bool(variable1
)) { /*if*/
469 ATTR_stream___FDIStream____eof( self
) /*FDIStream::_eof*/ = TAG_Bool(true);
471 variable0
= variable0
/*nb*/;
473 return_label22
: while(false);
474 tracehead
= trace
.prev
;
477 void stream___FDIStream___init(val_t self
, val_t param0
, int* init_table
) {
478 struct trace_t trace
= {NULL
, "stream::FDIStream::init (bin/../lib/standard//stream.nit:240,2--29)"};
480 trace
.prev
= tracehead
; tracehead
= &trace
;
482 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_FDIStream
].i
]) return;
483 ((stream___FDStream___init_t
)CALL( self
,COLOR_stream___FDStream___init
))( self
, param0
, init_table
/*YYY*/) /*FDStream::init*/;
484 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_FDIStream
].i
] = 1;
485 tracehead
= trace
.prev
;
488 val_t
stream___FDOStream___is_writable(val_t self
) {
489 struct trace_t trace
= {NULL
, "stream::FDOStream::is_writable (bin/../lib/standard//stream.nit:246,2--39)"};
490 trace
.prev
= tracehead
; tracehead
= &trace
;
491 tracehead
= trace
.prev
;
492 return ATTR_stream___FDOStream____is_writable( self
) /*FDOStream::_is_writable*/;
494 void stream___FDOStream___write(val_t self
, val_t param0
) {
495 struct trace_t trace
= {NULL
, "stream::FDOStream::write (bin/../lib/standard//stream.nit:248,2--251:44)"};
501 trace
.prev
= tracehead
; tracehead
= &trace
;
503 variable2
= ATTR_stream___FDStream____fd( self
) /*FDOStream::_fd*/;
504 variable3
= ((string___String___to_cstring_t
)CALL( variable0
/*s*/,COLOR_string___String___to_cstring
))( variable0
/*s*/) /*String::to_cstring*/;
505 variable4
= ((array___AbstractArray___length_t
)CALL( variable0
/*s*/,COLOR_abstract_collection___Collection___length
))( variable0
/*s*/) /*String::length*/;
506 variable2
= ((stream___FDStream___native_write_t
)CALL( self
,COLOR_stream___FDStream___native_write
))( self
, variable2
, variable3
, variable4
) /*FDOStream::native_write*/;
507 variable1
= variable2
;
508 variable2
= ((array___AbstractArray___length_t
)CALL( variable0
/*s*/,COLOR_abstract_collection___Collection___length
))( variable0
/*s*/) /*String::length*/;
509 variable2
= TAG_Bool(UNTAG_Int( variable1
/*nb*/)<UNTAG_Int(variable2
));
510 if (UNTAG_Bool(variable2
)) { /*if*/
511 ATTR_stream___FDOStream____is_writable( self
) /*FDOStream::_is_writable*/ = TAG_Bool(false);
513 tracehead
= trace
.prev
;
516 void stream___FDOStream___init(val_t self
, val_t param0
, int* init_table
) {
517 struct trace_t trace
= {NULL
, "stream::FDOStream::init (bin/../lib/standard//stream.nit:254,2--257:21)"};
519 trace
.prev
= tracehead
; tracehead
= &trace
;
521 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_FDOStream
].i
]) return;
522 ((stream___FDStream___init_t
)CALL( self
,COLOR_stream___FDStream___init
))( self
, param0
, init_table
/*YYY*/) /*FDStream::init*/;
523 ATTR_stream___FDOStream____is_writable( self
) /*FDOStream::_is_writable*/ = TAG_Bool(true);
524 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_FDOStream
].i
] = 1;
525 tracehead
= trace
.prev
;
528 void stream___FDIOStream___init(val_t self
, val_t param0
, int* init_table
) {
529 struct trace_t trace
= {NULL
, "stream::FDIOStream::init (bin/../lib/standard//stream.nit:265,2--268:21)"};
531 trace
.prev
= tracehead
; tracehead
= &trace
;
533 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_FDIOStream
].i
]) return;
534 ((stream___FDIStream___init_t
)CALL( self
,COLOR_stream___FDIStream___init
))( self
, param0
, init_table
/*YYY*/) /*FDIStream::init*/;
535 ((stream___FDOStream___init_t
)CALL( self
,COLOR_stream___FDOStream___init
))( self
, param0
, init_table
/*YYY*/) /*FDOStream::init*/;
536 ATTR_stream___FDStream____fd( self
) /*FDIOStream::_fd*/ = variable0
/*fd*/;
537 ATTR_stream___FDOStream____is_writable( self
) /*FDIOStream::_is_writable*/ = TAG_Bool(true);
538 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_FDIOStream
].i
] = 1;
539 tracehead
= trace
.prev
;