mkcsrc: copy .c and .h file to avoid the break of the bootstrap
[nit.git] / c_src / compiling_writer._sep.c
1 /* This C file is generated by NIT to compile module compiling_writer. */
2 #include "compiling_writer._sep.h"
3 static const char LOCATE_compiling_writer___Writer___add[] = "compiling_writer::Writer::add";
4 val_t compiling_writer___Writer___add(val_t p0, val_t p1){
5 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
6 val_t REGB0;
7 val_t REGB1;
8 val_t tmp;
9 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
10 fra.me.file = LOCATE_compiling_writer;
11 fra.me.line = 23;
12 fra.me.meth = LOCATE_compiling_writer___Writer___add;
13 fra.me.has_broke = 0;
14 fra.me.REG_size = 3;
15 fra.me.nitni_local_ref_head = NULL;
16 fra.me.REG[0] = NIT_NULL;
17 fra.me.REG[1] = NIT_NULL;
18 fra.me.REG[2] = NIT_NULL;
19 fra.me.REG[0] = p0;
20 fra.me.REG[1] = p1;
21 /* compiling_writer.nit:26 */
22 REGB0 = CALL_compiling_writer___Writer___is_frozen(fra.me.REG[0])(fra.me.REG[0]);
23 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
24 if (UNTAG_Bool(REGB0)) {
25 } else {
26 nit_abort("Assert failed", NULL, LOCATE_compiling_writer, 26);
27 }
28 /* compiling_writer.nit:27 */
29 fra.me.REG[2] = ATTR_compiling_writer___Writer____last_string(fra.me.REG[0]);
30 /* compiling_writer.nit:28 */
31 fra.me.REG[1] = NEW_WriterStrings_compiling_writer___WriterStrings___init(fra.me.REG[1]);
32 /* compiling_writer.nit:29 */
33 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
34 if (UNTAG_Bool(REGB0)) {
35 } else {
36 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
37 if (UNTAG_Bool(REGB1)) {
38 REGB1 = TAG_Bool(0);
39 REGB0 = REGB1;
40 } else {
41 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
42 REGB0 = REGB1;
43 }
44 }
45 if (UNTAG_Bool(REGB0)) {
46 /* compiling_writer.nit:30 */
47 CALL_compiling_writer___Writer___internal_append(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
48 } else {
49 /* compiling_writer.nit:32 */
50 ATTR_compiling_writer___WriterStrings____next(fra.me.REG[2]) = fra.me.REG[1];
51 }
52 /* compiling_writer.nit:34 */
53 ATTR_compiling_writer___Writer____last_string(fra.me.REG[0]) = fra.me.REG[1];
54 /* compiling_writer.nit:35 */
55 goto label1;
56 label1: while(0);
57 stack_frame_head = fra.me.prev;
58 return fra.me.REG[0];
59 }
60 static const char LOCATE_compiling_writer___Writer___add_all[] = "compiling_writer::Writer::add_all";
61 val_t compiling_writer___Writer___add_all(val_t p0, val_t p1, val_t p2){
62 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
63 val_t REGB0;
64 val_t REGB1;
65 val_t REGB2;
66 val_t REGB3;
67 val_t tmp;
68 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
69 fra.me.file = LOCATE_compiling_writer;
70 fra.me.line = 38;
71 fra.me.meth = LOCATE_compiling_writer___Writer___add_all;
72 fra.me.has_broke = 0;
73 fra.me.REG_size = 5;
74 fra.me.nitni_local_ref_head = NULL;
75 fra.me.REG[0] = NIT_NULL;
76 fra.me.REG[1] = NIT_NULL;
77 fra.me.REG[2] = NIT_NULL;
78 fra.me.REG[3] = NIT_NULL;
79 fra.me.REG[4] = NIT_NULL;
80 fra.me.REG[0] = p0;
81 fra.me.REG[1] = p1;
82 fra.me.REG[2] = p2;
83 /* compiling_writer.nit:41 */
84 REGB0 = CALL_compiling_writer___Writer___is_frozen(fra.me.REG[0])(fra.me.REG[0]);
85 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
86 if (UNTAG_Bool(REGB0)) {
87 } else {
88 nit_abort("Assert failed", NULL, LOCATE_compiling_writer, 41);
89 }
90 /* compiling_writer.nit:42 */
91 REGB0 = TAG_Bool(1);
92 /* ../lib/standard/collection/array.nit:270 */
93 REGB1 = TAG_Int(0);
94 /* ../lib/standard/collection/array.nit:271 */
95 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
96 if (UNTAG_Bool(REGB2)) {
97 } else {
98 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 271);
99 }
100 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
101 /* ../lib/standard/collection/array.nit:272 */
102 fra.me.REG[3] = ATTR_standard___collection___array___Array____items(fra.me.REG[1]);
103 /* ../lib/standard/collection/array.nit:273 */
104 while(1) {
105 /* ../lib/standard/collection/array.nit:24 */
106 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
107 if (UNTAG_Bool(REGB2)) {
108 } else {
109 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
110 }
111 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
112 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
113 if (UNTAG_Bool(REGB3)) {
114 } else {
115 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
116 }
117 /* ../lib/standard/kernel.nit:242 */
118 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
119 /* ../lib/standard/collection/array.nit:273 */
120 if (UNTAG_Bool(REGB2)) {
121 /* ../lib/standard/collection/array.nit:274 */
122 REGB2 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
123 if (UNTAG_Bool(REGB2)) {
124 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 274);
125 }
126 /* ../lib/standard/collection/array.nit:725 */
127 fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB1)];
128 /* compiling_writer.nit:44 */
129 if (UNTAG_Bool(REGB0)) {
130 REGB2 = TAG_Bool(0);
131 REGB0 = REGB2;
132 } else {
133 CALL_compiling_writer___Writer___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
134 }
135 /* compiling_writer.nit:45 */
136 CALL_compiling_writer___Writer___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4]);
137 /* ../lib/standard/collection/array.nit:275 */
138 REGB2 = TAG_Int(1);
139 /* ../lib/standard/kernel.nit:245 */
140 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
141 /* ../lib/standard/collection/array.nit:275 */
142 REGB1 = REGB2;
143 } else {
144 /* ../lib/standard/collection/array.nit:273 */
145 goto label1;
146 }
147 }
148 label1: while(0);
149 /* compiling_writer.nit:47 */
150 goto label2;
151 label2: while(0);
152 stack_frame_head = fra.me.prev;
153 return fra.me.REG[0];
154 }
155 static const char LOCATE_compiling_writer___Writer___append[] = "compiling_writer::Writer::append";
156 val_t compiling_writer___Writer___append(val_t p0, val_t p1){
157 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
158 val_t REGB0;
159 val_t tmp;
160 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
161 fra.me.file = LOCATE_compiling_writer;
162 fra.me.line = 56;
163 fra.me.meth = LOCATE_compiling_writer___Writer___append;
164 fra.me.has_broke = 0;
165 fra.me.REG_size = 2;
166 fra.me.nitni_local_ref_head = NULL;
167 fra.me.REG[0] = NIT_NULL;
168 fra.me.REG[1] = NIT_NULL;
169 fra.me.REG[0] = p0;
170 fra.me.REG[1] = p1;
171 /* compiling_writer.nit:59 */
172 REGB0 = CALL_compiling_writer___Writer___is_frozen(fra.me.REG[0])(fra.me.REG[0]);
173 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
174 if (UNTAG_Bool(REGB0)) {
175 } else {
176 nit_abort("Assert failed", NULL, LOCATE_compiling_writer, 59);
177 }
178 /* compiling_writer.nit:60 */
179 fra.me.REG[1] = NEW_WriterCoreNode_compiling_writer___WriterCoreNode___init(fra.me.REG[1]);
180 CALL_compiling_writer___Writer___internal_append(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
181 /* compiling_writer.nit:61 */
182 ATTR_compiling_writer___Writer____last_string(fra.me.REG[0]) = NIT_NULL;
183 /* compiling_writer.nit:62 */
184 goto label1;
185 label1: while(0);
186 stack_frame_head = fra.me.prev;
187 return fra.me.REG[0];
188 }
189 static const char LOCATE_compiling_writer___Writer___internal_append[] = "compiling_writer::Writer::internal_append";
190 void compiling_writer___Writer___internal_append(val_t p0, val_t p1){
191 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
192 val_t REGB0;
193 val_t REGB1;
194 val_t tmp;
195 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
196 fra.me.file = LOCATE_compiling_writer;
197 fra.me.line = 65;
198 fra.me.meth = LOCATE_compiling_writer___Writer___internal_append;
199 fra.me.has_broke = 0;
200 fra.me.REG_size = 3;
201 fra.me.nitni_local_ref_head = NULL;
202 fra.me.REG[0] = NIT_NULL;
203 fra.me.REG[1] = NIT_NULL;
204 fra.me.REG[2] = NIT_NULL;
205 fra.me.REG[0] = p0;
206 fra.me.REG[1] = p1;
207 /* compiling_writer.nit:68 */
208 fra.me.REG[2] = ATTR_compiling_writer___Writer____first_sub_writer(fra.me.REG[0]);
209 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
210 if (UNTAG_Bool(REGB0)) {
211 } else {
212 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
213 if (UNTAG_Bool(REGB1)) {
214 REGB1 = TAG_Bool(0);
215 REGB0 = REGB1;
216 } else {
217 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
218 REGB0 = REGB1;
219 }
220 }
221 if (UNTAG_Bool(REGB0)) {
222 ATTR_compiling_writer___Writer____first_sub_writer(fra.me.REG[0]) = fra.me.REG[1];
223 }
224 /* compiling_writer.nit:69 */
225 fra.me.REG[2] = ATTR_compiling_writer___Writer____last_sub_writer(fra.me.REG[0]);
226 /* compiling_writer.nit:70 */
227 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
228 if (UNTAG_Bool(REGB0)) {
229 } else {
230 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
231 if (UNTAG_Bool(REGB1)) {
232 REGB1 = TAG_Bool(0);
233 REGB0 = REGB1;
234 } else {
235 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
236 REGB0 = REGB1;
237 }
238 }
239 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
240 if (UNTAG_Bool(REGB0)) {
241 ATTR_compiling_writer___WriterNode____next_writer(fra.me.REG[2]) = fra.me.REG[1];
242 }
243 /* compiling_writer.nit:71 */
244 ATTR_compiling_writer___Writer____last_sub_writer(fra.me.REG[0]) = fra.me.REG[1];
245 stack_frame_head = fra.me.prev;
246 return;
247 }
248 static const char LOCATE_compiling_writer___Writer___sub[] = "compiling_writer::Writer::sub";
249 val_t compiling_writer___Writer___sub(val_t p0){
250 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
251 val_t tmp;
252 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
253 fra.me.file = LOCATE_compiling_writer;
254 fra.me.line = 74;
255 fra.me.meth = LOCATE_compiling_writer___Writer___sub;
256 fra.me.has_broke = 0;
257 fra.me.REG_size = 2;
258 fra.me.nitni_local_ref_head = NULL;
259 fra.me.REG[0] = NIT_NULL;
260 fra.me.REG[1] = NIT_NULL;
261 fra.me.REG[0] = p0;
262 /* compiling_writer.nit:77 */
263 fra.me.REG[1] = NEW_Writer_compiling_writer___Writer___init();
264 /* compiling_writer.nit:78 */
265 CALL_compiling_writer___Writer___append(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
266 /* compiling_writer.nit:79 */
267 goto label1;
268 label1: while(0);
269 stack_frame_head = fra.me.prev;
270 return fra.me.REG[1];
271 }
272 static const char LOCATE_compiling_writer___Writer___write_to_stream[] = "compiling_writer::Writer::write_to_stream";
273 void compiling_writer___Writer___write_to_stream(val_t p0, val_t p1){
274 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
275 val_t REGB0;
276 val_t REGB1;
277 val_t tmp;
278 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
279 fra.me.file = LOCATE_compiling_writer;
280 fra.me.line = 84;
281 fra.me.meth = LOCATE_compiling_writer___Writer___write_to_stream;
282 fra.me.has_broke = 0;
283 fra.me.REG_size = 4;
284 fra.me.nitni_local_ref_head = NULL;
285 fra.me.REG[0] = NIT_NULL;
286 fra.me.REG[1] = NIT_NULL;
287 fra.me.REG[2] = NIT_NULL;
288 fra.me.REG[3] = NIT_NULL;
289 fra.me.REG[0] = p0;
290 fra.me.REG[1] = p1;
291 /* compiling_writer.nit:87 */
292 REGB0 = TAG_Bool(ATTR_compiling_writer___Writer____is_writing(fra.me.REG[0])!=NIT_NULL);
293 if (UNTAG_Bool(REGB0)) {
294 } else {
295 nit_abort("Uninitialized attribute %s", "_is_writing", LOCATE_compiling_writer, 87);
296 }
297 REGB0 = ATTR_compiling_writer___Writer____is_writing(fra.me.REG[0]);
298 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
299 if (UNTAG_Bool(REGB0)) {
300 } else {
301 nit_abort("Assert failed", NULL, LOCATE_compiling_writer, 87);
302 }
303 /* compiling_writer.nit:88 */
304 REGB0 = TAG_Bool(1);
305 ATTR_compiling_writer___Writer____is_writing(fra.me.REG[0]) = REGB0;
306 /* compiling_writer.nit:89 */
307 fra.me.REG[2] = ATTR_compiling_writer___Writer____first_sub_writer(fra.me.REG[0]);
308 /* compiling_writer.nit:90 */
309 while(1) {
310 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
311 if (UNTAG_Bool(REGB0)) {
312 } else {
313 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
314 if (UNTAG_Bool(REGB1)) {
315 REGB1 = TAG_Bool(0);
316 REGB0 = REGB1;
317 } else {
318 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
319 REGB0 = REGB1;
320 }
321 }
322 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
323 if (UNTAG_Bool(REGB0)) {
324 /* compiling_writer.nit:91 */
325 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
326 if (UNTAG_Bool(REGB0)) {
327 nit_abort("Reciever is null", NULL, LOCATE_compiling_writer, 91);
328 }
329 CALL_compiling_writer___WriterNode___internal_write_to_stream(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
330 /* compiling_writer.nit:92 */
331 fra.me.REG[3] = ATTR_compiling_writer___WriterNode____next_writer(fra.me.REG[2]);
332 fra.me.REG[2] = fra.me.REG[3];
333 } else {
334 /* compiling_writer.nit:90 */
335 goto label1;
336 }
337 }
338 label1: while(0);
339 /* compiling_writer.nit:94 */
340 REGB0 = TAG_Bool(0);
341 ATTR_compiling_writer___Writer____is_writing(fra.me.REG[0]) = REGB0;
342 stack_frame_head = fra.me.prev;
343 return;
344 }
345 static const char LOCATE_compiling_writer___Writer___is_frozen[] = "compiling_writer::Writer::is_frozen";
346 val_t compiling_writer___Writer___is_frozen(val_t p0){
347 struct {struct stack_frame_t me;} fra;
348 val_t REGB0;
349 val_t tmp;
350 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
351 fra.me.file = LOCATE_compiling_writer;
352 fra.me.line = 97;
353 fra.me.meth = LOCATE_compiling_writer___Writer___is_frozen;
354 fra.me.has_broke = 0;
355 fra.me.REG_size = 1;
356 fra.me.nitni_local_ref_head = NULL;
357 fra.me.REG[0] = NIT_NULL;
358 fra.me.REG[0] = p0;
359 /* compiling_writer.nit:97 */
360 REGB0 = TAG_Bool(ATTR_compiling_writer___Writer____is_frozen(fra.me.REG[0])!=NIT_NULL);
361 if (UNTAG_Bool(REGB0)) {
362 } else {
363 nit_abort("Uninitialized attribute %s", "_is_frozen", LOCATE_compiling_writer, 97);
364 }
365 REGB0 = ATTR_compiling_writer___Writer____is_frozen(fra.me.REG[0]);
366 stack_frame_head = fra.me.prev;
367 return REGB0;
368 }
369 static const char LOCATE_compiling_writer___Writer___freeze[] = "compiling_writer::Writer::freeze";
370 void compiling_writer___Writer___freeze(val_t p0){
371 struct {struct stack_frame_t me;} fra;
372 val_t REGB0;
373 val_t tmp;
374 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
375 fra.me.file = LOCATE_compiling_writer;
376 fra.me.line = 100;
377 fra.me.meth = LOCATE_compiling_writer___Writer___freeze;
378 fra.me.has_broke = 0;
379 fra.me.REG_size = 1;
380 fra.me.nitni_local_ref_head = NULL;
381 fra.me.REG[0] = NIT_NULL;
382 fra.me.REG[0] = p0;
383 /* compiling_writer.nit:103 */
384 REGB0 = CALL_compiling_writer___Writer___is_frozen(fra.me.REG[0])(fra.me.REG[0]);
385 if (UNTAG_Bool(REGB0)) {
386 goto label1;
387 }
388 /* compiling_writer.nit:104 */
389 REGB0 = TAG_Bool(1);
390 ATTR_compiling_writer___Writer____is_frozen(fra.me.REG[0]) = REGB0;
391 label1: while(0);
392 stack_frame_head = fra.me.prev;
393 return;
394 }
395 static const char LOCATE_compiling_writer___Writer___init[] = "compiling_writer::Writer::init";
396 void compiling_writer___Writer___init(val_t p0, int* init_table){
397 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_compiling_writer___Writer].i;
398 struct {struct stack_frame_t me;} fra;
399 val_t tmp;
400 if (init_table[itpos0]) return;
401 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
402 fra.me.file = LOCATE_compiling_writer;
403 fra.me.line = 107;
404 fra.me.meth = LOCATE_compiling_writer___Writer___init;
405 fra.me.has_broke = 0;
406 fra.me.REG_size = 1;
407 fra.me.nitni_local_ref_head = NULL;
408 fra.me.REG[0] = NIT_NULL;
409 fra.me.REG[0] = p0;
410 stack_frame_head = fra.me.prev;
411 init_table[itpos0] = 1;
412 return;
413 }
414 static const char LOCATE_compiling_writer___WriterNode___internal_write_to_stream[] = "compiling_writer::WriterNode::internal_write_to_stream";
415 void compiling_writer___WriterNode___internal_write_to_stream(val_t p0, val_t p1){
416 struct {struct stack_frame_t me;} fra;
417 val_t tmp;
418 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
419 fra.me.file = LOCATE_compiling_writer;
420 fra.me.line = 115;
421 fra.me.meth = LOCATE_compiling_writer___WriterNode___internal_write_to_stream;
422 fra.me.has_broke = 0;
423 fra.me.REG_size = 0;
424 fra.me.nitni_local_ref_head = NULL;
425 /* compiling_writer.nit:115 */
426 nit_abort("Deferred method called", NULL, LOCATE_compiling_writer, 115);
427 stack_frame_head = fra.me.prev;
428 return;
429 }
430 static const char LOCATE_compiling_writer___WriterNode___init[] = "compiling_writer::WriterNode::init";
431 void compiling_writer___WriterNode___init(val_t p0, int* init_table){
432 int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_compiling_writer___WriterNode].i;
433 struct {struct stack_frame_t me;} fra;
434 val_t tmp;
435 if (init_table[itpos1]) return;
436 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
437 fra.me.file = LOCATE_compiling_writer;
438 fra.me.line = 0;
439 fra.me.meth = LOCATE_compiling_writer___WriterNode___init;
440 fra.me.has_broke = 0;
441 fra.me.REG_size = 0;
442 fra.me.nitni_local_ref_head = NULL;
443 stack_frame_head = fra.me.prev;
444 init_table[itpos1] = 1;
445 return;
446 }
447 static const char LOCATE_compiling_writer___WriterCoreNode___internal_write_to_stream[] = "compiling_writer::WriterCoreNode::(compiling_writer::WriterNode::internal_write_to_stream)";
448 void compiling_writer___WriterCoreNode___internal_write_to_stream(val_t p0, val_t p1){
449 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
450 val_t REGB0;
451 val_t tmp;
452 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
453 fra.me.file = LOCATE_compiling_writer;
454 fra.me.line = 124;
455 fra.me.meth = LOCATE_compiling_writer___WriterCoreNode___internal_write_to_stream;
456 fra.me.has_broke = 0;
457 fra.me.REG_size = 2;
458 fra.me.nitni_local_ref_head = NULL;
459 fra.me.REG[0] = NIT_NULL;
460 fra.me.REG[1] = NIT_NULL;
461 fra.me.REG[0] = p0;
462 fra.me.REG[1] = p1;
463 /* compiling_writer.nit:124 */
464 REGB0 = TAG_Bool(ATTR_compiling_writer___WriterCoreNode____writer(fra.me.REG[0])!=NIT_NULL);
465 if (UNTAG_Bool(REGB0)) {
466 } else {
467 nit_abort("Uninitialized attribute %s", "_writer", LOCATE_compiling_writer, 124);
468 }
469 fra.me.REG[0] = ATTR_compiling_writer___WriterCoreNode____writer(fra.me.REG[0]);
470 CALL_compiling_writer___Writer___write_to_stream(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
471 stack_frame_head = fra.me.prev;
472 return;
473 }
474 static const char LOCATE_compiling_writer___WriterCoreNode___init[] = "compiling_writer::WriterCoreNode::init";
475 void compiling_writer___WriterCoreNode___init(val_t p0, val_t p1, int* init_table){
476 int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_compiling_writer___WriterCoreNode].i;
477 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
478 val_t tmp;
479 if (init_table[itpos2]) return;
480 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
481 fra.me.file = LOCATE_compiling_writer;
482 fra.me.line = 126;
483 fra.me.meth = LOCATE_compiling_writer___WriterCoreNode___init;
484 fra.me.has_broke = 0;
485 fra.me.REG_size = 3;
486 fra.me.nitni_local_ref_head = NULL;
487 fra.me.REG[0] = NIT_NULL;
488 fra.me.REG[1] = NIT_NULL;
489 fra.me.REG[2] = NIT_NULL;
490 fra.me.REG[0] = p0;
491 fra.me.REG[1] = p1;
492 /* compiling_writer.nit:126 */
493 fra.me.REG[2] = fra.me.REG[0];
494 CALL_compiling_writer___WriterNode___init(fra.me.REG[0])(fra.me.REG[0], init_table);
495 ATTR_compiling_writer___WriterCoreNode____writer(fra.me.REG[2]) = fra.me.REG[1];
496 stack_frame_head = fra.me.prev;
497 init_table[itpos2] = 1;
498 return;
499 }
500 static const char LOCATE_compiling_writer___WriterStrings___init[] = "compiling_writer::WriterStrings::init";
501 void compiling_writer___WriterStrings___init(val_t p0, val_t p1, int* init_table){
502 int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_compiling_writer___WriterStrings].i;
503 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
504 val_t tmp;
505 if (init_table[itpos3]) return;
506 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
507 fra.me.file = LOCATE_compiling_writer;
508 fra.me.line = 138;
509 fra.me.meth = LOCATE_compiling_writer___WriterStrings___init;
510 fra.me.has_broke = 0;
511 fra.me.REG_size = 3;
512 fra.me.nitni_local_ref_head = NULL;
513 fra.me.REG[0] = NIT_NULL;
514 fra.me.REG[1] = NIT_NULL;
515 fra.me.REG[2] = NIT_NULL;
516 fra.me.REG[0] = p0;
517 fra.me.REG[1] = p1;
518 /* compiling_writer.nit:138 */
519 fra.me.REG[2] = fra.me.REG[0];
520 CALL_compiling_writer___WriterNode___init(fra.me.REG[0])(fra.me.REG[0], init_table);
521 /* compiling_writer.nit:140 */
522 ATTR_compiling_writer___WriterStrings____string(fra.me.REG[2]) = fra.me.REG[1];
523 stack_frame_head = fra.me.prev;
524 init_table[itpos3] = 1;
525 return;
526 }
527 static const char LOCATE_compiling_writer___WriterStrings___internal_write_to_stream[] = "compiling_writer::WriterStrings::(compiling_writer::WriterNode::internal_write_to_stream)";
528 void compiling_writer___WriterStrings___internal_write_to_stream(val_t p0, val_t p1){
529 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
530 val_t REGB0;
531 val_t REGB1;
532 val_t tmp;
533 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
534 fra.me.file = LOCATE_compiling_writer;
535 fra.me.line = 143;
536 fra.me.meth = LOCATE_compiling_writer___WriterStrings___internal_write_to_stream;
537 fra.me.has_broke = 0;
538 fra.me.REG_size = 3;
539 fra.me.nitni_local_ref_head = NULL;
540 fra.me.REG[0] = NIT_NULL;
541 fra.me.REG[1] = NIT_NULL;
542 fra.me.REG[2] = NIT_NULL;
543 fra.me.REG[0] = p0;
544 fra.me.REG[1] = p1;
545 /* compiling_writer.nit:146 */
546 while(1) {
547 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
548 if (UNTAG_Bool(REGB0)) {
549 } else {
550 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
551 if (UNTAG_Bool(REGB1)) {
552 REGB1 = TAG_Bool(0);
553 REGB0 = REGB1;
554 } else {
555 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
556 REGB0 = REGB1;
557 }
558 }
559 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
560 if (UNTAG_Bool(REGB0)) {
561 /* compiling_writer.nit:147 */
562 REGB0 = TAG_Bool(ATTR_compiling_writer___WriterStrings____string(fra.me.REG[0])!=NIT_NULL);
563 if (UNTAG_Bool(REGB0)) {
564 } else {
565 nit_abort("Uninitialized attribute %s", "_string", LOCATE_compiling_writer, 147);
566 }
567 fra.me.REG[2] = ATTR_compiling_writer___WriterStrings____string(fra.me.REG[0]);
568 CALL_standard___stream___OStream___write(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
569 /* compiling_writer.nit:148 */
570 fra.me.REG[2] = ATTR_compiling_writer___WriterStrings____next(fra.me.REG[0]);
571 fra.me.REG[0] = fra.me.REG[2];
572 } else {
573 /* compiling_writer.nit:146 */
574 goto label1;
575 }
576 }
577 label1: while(0);
578 stack_frame_head = fra.me.prev;
579 return;
580 }