Added JS files.
[nit.git] / c_src / c_tools.sep.1.c
1 #include "c_tools.sep.0.h"
2 /* method c_tools#CCompilationUnit#header_c_base for (self: CCompilationUnit): Template */
3 val* c_tools__CCompilationUnit__header_c_base(val* self) {
4 val* var /* : Template */;
5 val* var1 /* : Template */;
6 var1 = self->attrs[COLOR_c_tools__CCompilationUnit___64dheader_c_base].val; /* @header_c_base on <self:CCompilationUnit> */
7 if (var1 == NULL) {
8 fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @header_c_base");
9 fprintf(stderr, " (%s:%d)\n", "src/c_tools.nit", 24);
10 show_backtrace(1);
11 }
12 var = var1;
13 RET_LABEL:;
14 return var;
15 }
16 /* method c_tools#CCompilationUnit#header_c_base for (self: Object): Template */
17 val* VIRTUAL_c_tools__CCompilationUnit__header_c_base(val* self) {
18 val* var /* : Template */;
19 val* var1 /* : Template */;
20 var1 = c_tools__CCompilationUnit__header_c_base(self);
21 var = var1;
22 RET_LABEL:;
23 return var;
24 }
25 /* method c_tools#CCompilationUnit#header_c_base= for (self: CCompilationUnit, Template) */
26 void c_tools__CCompilationUnit__header_c_base_61d(val* self, val* p0) {
27 self->attrs[COLOR_c_tools__CCompilationUnit___64dheader_c_base].val = p0; /* @header_c_base on <self:CCompilationUnit> */
28 RET_LABEL:;
29 }
30 /* method c_tools#CCompilationUnit#header_c_base= for (self: Object, Template) */
31 void VIRTUAL_c_tools__CCompilationUnit__header_c_base_61d(val* self, val* p0) {
32 c_tools__CCompilationUnit__header_c_base_61d(self, p0);
33 RET_LABEL:;
34 }
35 /* method c_tools#CCompilationUnit#header_custom for (self: CCompilationUnit): Template */
36 val* c_tools__CCompilationUnit__header_custom(val* self) {
37 val* var /* : Template */;
38 val* var1 /* : Template */;
39 var1 = self->attrs[COLOR_c_tools__CCompilationUnit___64dheader_custom].val; /* @header_custom on <self:CCompilationUnit> */
40 if (var1 == NULL) {
41 fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @header_custom");
42 fprintf(stderr, " (%s:%d)\n", "src/c_tools.nit", 28);
43 show_backtrace(1);
44 }
45 var = var1;
46 RET_LABEL:;
47 return var;
48 }
49 /* method c_tools#CCompilationUnit#header_custom for (self: Object): Template */
50 val* VIRTUAL_c_tools__CCompilationUnit__header_custom(val* self) {
51 val* var /* : Template */;
52 val* var1 /* : Template */;
53 var1 = c_tools__CCompilationUnit__header_custom(self);
54 var = var1;
55 RET_LABEL:;
56 return var;
57 }
58 /* method c_tools#CCompilationUnit#header_custom= for (self: CCompilationUnit, Template) */
59 void c_tools__CCompilationUnit__header_custom_61d(val* self, val* p0) {
60 self->attrs[COLOR_c_tools__CCompilationUnit___64dheader_custom].val = p0; /* @header_custom on <self:CCompilationUnit> */
61 RET_LABEL:;
62 }
63 /* method c_tools#CCompilationUnit#header_custom= for (self: Object, Template) */
64 void VIRTUAL_c_tools__CCompilationUnit__header_custom_61d(val* self, val* p0) {
65 c_tools__CCompilationUnit__header_custom_61d(self, p0);
66 RET_LABEL:;
67 }
68 /* method c_tools#CCompilationUnit#header_c_types for (self: CCompilationUnit): Template */
69 val* c_tools__CCompilationUnit__header_c_types(val* self) {
70 val* var /* : Template */;
71 val* var1 /* : Template */;
72 var1 = self->attrs[COLOR_c_tools__CCompilationUnit___64dheader_c_types].val; /* @header_c_types on <self:CCompilationUnit> */
73 if (var1 == NULL) {
74 fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @header_c_types");
75 fprintf(stderr, " (%s:%d)\n", "src/c_tools.nit", 31);
76 show_backtrace(1);
77 }
78 var = var1;
79 RET_LABEL:;
80 return var;
81 }
82 /* method c_tools#CCompilationUnit#header_c_types for (self: Object): Template */
83 val* VIRTUAL_c_tools__CCompilationUnit__header_c_types(val* self) {
84 val* var /* : Template */;
85 val* var1 /* : Template */;
86 var1 = c_tools__CCompilationUnit__header_c_types(self);
87 var = var1;
88 RET_LABEL:;
89 return var;
90 }
91 /* method c_tools#CCompilationUnit#header_c_types= for (self: CCompilationUnit, Template) */
92 void c_tools__CCompilationUnit__header_c_types_61d(val* self, val* p0) {
93 self->attrs[COLOR_c_tools__CCompilationUnit___64dheader_c_types].val = p0; /* @header_c_types on <self:CCompilationUnit> */
94 RET_LABEL:;
95 }
96 /* method c_tools#CCompilationUnit#header_c_types= for (self: Object, Template) */
97 void VIRTUAL_c_tools__CCompilationUnit__header_c_types_61d(val* self, val* p0) {
98 c_tools__CCompilationUnit__header_c_types_61d(self, p0);
99 RET_LABEL:;
100 }
101 /* method c_tools#CCompilationUnit#header_decl for (self: CCompilationUnit): Template */
102 val* c_tools__CCompilationUnit__header_decl(val* self) {
103 val* var /* : Template */;
104 val* var1 /* : Template */;
105 var1 = self->attrs[COLOR_c_tools__CCompilationUnit___64dheader_decl].val; /* @header_decl on <self:CCompilationUnit> */
106 if (var1 == NULL) {
107 fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @header_decl");
108 fprintf(stderr, " (%s:%d)\n", "src/c_tools.nit", 34);
109 show_backtrace(1);
110 }
111 var = var1;
112 RET_LABEL:;
113 return var;
114 }
115 /* method c_tools#CCompilationUnit#header_decl for (self: Object): Template */
116 val* VIRTUAL_c_tools__CCompilationUnit__header_decl(val* self) {
117 val* var /* : Template */;
118 val* var1 /* : Template */;
119 var1 = c_tools__CCompilationUnit__header_decl(self);
120 var = var1;
121 RET_LABEL:;
122 return var;
123 }
124 /* method c_tools#CCompilationUnit#header_decl= for (self: CCompilationUnit, Template) */
125 void c_tools__CCompilationUnit__header_decl_61d(val* self, val* p0) {
126 self->attrs[COLOR_c_tools__CCompilationUnit___64dheader_decl].val = p0; /* @header_decl on <self:CCompilationUnit> */
127 RET_LABEL:;
128 }
129 /* method c_tools#CCompilationUnit#header_decl= for (self: Object, Template) */
130 void VIRTUAL_c_tools__CCompilationUnit__header_decl_61d(val* self, val* p0) {
131 c_tools__CCompilationUnit__header_decl_61d(self, p0);
132 RET_LABEL:;
133 }
134 /* method c_tools#CCompilationUnit#body_decl for (self: CCompilationUnit): Template */
135 val* c_tools__CCompilationUnit__body_decl(val* self) {
136 val* var /* : Template */;
137 val* var1 /* : Template */;
138 var1 = self->attrs[COLOR_c_tools__CCompilationUnit___64dbody_decl].val; /* @body_decl on <self:CCompilationUnit> */
139 if (var1 == NULL) {
140 fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @body_decl");
141 fprintf(stderr, " (%s:%d)\n", "src/c_tools.nit", 37);
142 show_backtrace(1);
143 }
144 var = var1;
145 RET_LABEL:;
146 return var;
147 }
148 /* method c_tools#CCompilationUnit#body_decl for (self: Object): Template */
149 val* VIRTUAL_c_tools__CCompilationUnit__body_decl(val* self) {
150 val* var /* : Template */;
151 val* var1 /* : Template */;
152 var1 = c_tools__CCompilationUnit__body_decl(self);
153 var = var1;
154 RET_LABEL:;
155 return var;
156 }
157 /* method c_tools#CCompilationUnit#body_decl= for (self: CCompilationUnit, Template) */
158 void c_tools__CCompilationUnit__body_decl_61d(val* self, val* p0) {
159 self->attrs[COLOR_c_tools__CCompilationUnit___64dbody_decl].val = p0; /* @body_decl on <self:CCompilationUnit> */
160 RET_LABEL:;
161 }
162 /* method c_tools#CCompilationUnit#body_decl= for (self: Object, Template) */
163 void VIRTUAL_c_tools__CCompilationUnit__body_decl_61d(val* self, val* p0) {
164 c_tools__CCompilationUnit__body_decl_61d(self, p0);
165 RET_LABEL:;
166 }
167 /* method c_tools#CCompilationUnit#body_custom for (self: CCompilationUnit): Template */
168 val* c_tools__CCompilationUnit__body_custom(val* self) {
169 val* var /* : Template */;
170 val* var1 /* : Template */;
171 var1 = self->attrs[COLOR_c_tools__CCompilationUnit___64dbody_custom].val; /* @body_custom on <self:CCompilationUnit> */
172 if (var1 == NULL) {
173 fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @body_custom");
174 fprintf(stderr, " (%s:%d)\n", "src/c_tools.nit", 41);
175 show_backtrace(1);
176 }
177 var = var1;
178 RET_LABEL:;
179 return var;
180 }
181 /* method c_tools#CCompilationUnit#body_custom for (self: Object): Template */
182 val* VIRTUAL_c_tools__CCompilationUnit__body_custom(val* self) {
183 val* var /* : Template */;
184 val* var1 /* : Template */;
185 var1 = c_tools__CCompilationUnit__body_custom(self);
186 var = var1;
187 RET_LABEL:;
188 return var;
189 }
190 /* method c_tools#CCompilationUnit#body_custom= for (self: CCompilationUnit, Template) */
191 void c_tools__CCompilationUnit__body_custom_61d(val* self, val* p0) {
192 self->attrs[COLOR_c_tools__CCompilationUnit___64dbody_custom].val = p0; /* @body_custom on <self:CCompilationUnit> */
193 RET_LABEL:;
194 }
195 /* method c_tools#CCompilationUnit#body_custom= for (self: Object, Template) */
196 void VIRTUAL_c_tools__CCompilationUnit__body_custom_61d(val* self, val* p0) {
197 c_tools__CCompilationUnit__body_custom_61d(self, p0);
198 RET_LABEL:;
199 }
200 /* method c_tools#CCompilationUnit#body_impl for (self: CCompilationUnit): Template */
201 val* c_tools__CCompilationUnit__body_impl(val* self) {
202 val* var /* : Template */;
203 val* var1 /* : Template */;
204 var1 = self->attrs[COLOR_c_tools__CCompilationUnit___64dbody_impl].val; /* @body_impl on <self:CCompilationUnit> */
205 if (var1 == NULL) {
206 fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @body_impl");
207 fprintf(stderr, " (%s:%d)\n", "src/c_tools.nit", 44);
208 show_backtrace(1);
209 }
210 var = var1;
211 RET_LABEL:;
212 return var;
213 }
214 /* method c_tools#CCompilationUnit#body_impl for (self: Object): Template */
215 val* VIRTUAL_c_tools__CCompilationUnit__body_impl(val* self) {
216 val* var /* : Template */;
217 val* var1 /* : Template */;
218 var1 = c_tools__CCompilationUnit__body_impl(self);
219 var = var1;
220 RET_LABEL:;
221 return var;
222 }
223 /* method c_tools#CCompilationUnit#body_impl= for (self: CCompilationUnit, Template) */
224 void c_tools__CCompilationUnit__body_impl_61d(val* self, val* p0) {
225 self->attrs[COLOR_c_tools__CCompilationUnit___64dbody_impl].val = p0; /* @body_impl on <self:CCompilationUnit> */
226 RET_LABEL:;
227 }
228 /* method c_tools#CCompilationUnit#body_impl= for (self: Object, Template) */
229 void VIRTUAL_c_tools__CCompilationUnit__body_impl_61d(val* self, val* p0) {
230 c_tools__CCompilationUnit__body_impl_61d(self, p0);
231 RET_LABEL:;
232 }
233 /* method c_tools#CCompilationUnit#files for (self: CCompilationUnit): Array[String] */
234 val* c_tools__CCompilationUnit__files(val* self) {
235 val* var /* : Array[String] */;
236 val* var1 /* : Array[String] */;
237 var1 = self->attrs[COLOR_c_tools__CCompilationUnit___64dfiles].val; /* @files on <self:CCompilationUnit> */
238 if (var1 == NULL) {
239 fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @files");
240 fprintf(stderr, " (%s:%d)\n", "src/c_tools.nit", 47);
241 show_backtrace(1);
242 }
243 var = var1;
244 RET_LABEL:;
245 return var;
246 }
247 /* method c_tools#CCompilationUnit#files for (self: Object): Array[String] */
248 val* VIRTUAL_c_tools__CCompilationUnit__files(val* self) {
249 val* var /* : Array[String] */;
250 val* var1 /* : Array[String] */;
251 var1 = c_tools__CCompilationUnit__files(self);
252 var = var1;
253 RET_LABEL:;
254 return var;
255 }
256 /* method c_tools#CCompilationUnit#files= for (self: CCompilationUnit, Array[String]) */
257 void c_tools__CCompilationUnit__files_61d(val* self, val* p0) {
258 self->attrs[COLOR_c_tools__CCompilationUnit___64dfiles].val = p0; /* @files on <self:CCompilationUnit> */
259 RET_LABEL:;
260 }
261 /* method c_tools#CCompilationUnit#files= for (self: Object, Array[String]) */
262 void VIRTUAL_c_tools__CCompilationUnit__files_61d(val* self, val* p0) {
263 c_tools__CCompilationUnit__files_61d(self, p0);
264 RET_LABEL:;
265 }
266 /* method c_tools#CCompilationUnit#add_local_function for (self: CCompilationUnit, CFunction) */
267 void c_tools__CCompilationUnit__add_local_function(val* self, val* p0) {
268 val* var_efc /* var efc: CFunction */;
269 val* var /* : Template */;
270 val* var1 /* : String */;
271 static val* varonce;
272 val* var2 /* : String */;
273 char* var3 /* : NativeString */;
274 long var4 /* : Int */;
275 val* var5 /* : String */;
276 val* var6 /* : Array[Object] */;
277 long var7 /* : Int */;
278 val* var8 /* : NativeArray[Object] */;
279 val* var9 /* : String */;
280 val* var10 /* : Template */;
281 static val* varonce11;
282 val* var12 /* : String */;
283 char* var13 /* : NativeString */;
284 long var14 /* : Int */;
285 val* var15 /* : String */;
286 val* var16 /* : Template */;
287 val* var17 /* : Template */;
288 var_efc = p0;
289 var = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__body_decl]))(self) /* body_decl on <self:CCompilationUnit>*/;
290 var1 = ((val* (*)(val*))(var_efc->class->vft[COLOR_c_tools__CFunction__signature]))(var_efc) /* signature on <var_efc:CFunction>*/;
291 if (varonce) {
292 var2 = varonce;
293 } else {
294 var3 = ";\n";
295 var4 = 2;
296 var5 = string__NativeString__to_s_with_length(var3, var4);
297 var2 = var5;
298 varonce = var2;
299 }
300 var6 = NEW_array__Array(&type_array__Arraykernel__Object);
301 { /* var6 = array_instance Array[Object] */
302 var7 = 2;
303 var8 = NEW_array__NativeArray(var7, &type_array__NativeArraykernel__Object);
304 ((struct instance_array__NativeArray*)var8)->values[0] = (val*) var1;
305 ((struct instance_array__NativeArray*)var8)->values[1] = (val*) var2;
306 ((void (*)(val*, val*, long))(var6->class->vft[COLOR_array__Array__with_native]))(var6, var8, var7) /* with_native on <var6:Array[Object]>*/;
307 }
308 var9 = ((val* (*)(val*))(var6->class->vft[COLOR_string__Object__to_s]))(var6) /* to_s on <var6:Array[Object]>*/;
309 ((void (*)(val*, val*))(var->class->vft[COLOR_template__Template__add]))(var, var9) /* add on <var:Template>*/;
310 var10 = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__body_impl]))(self) /* body_impl on <self:CCompilationUnit>*/;
311 if (varonce11) {
312 var12 = varonce11;
313 } else {
314 var13 = "\n";
315 var14 = 1;
316 var15 = string__NativeString__to_s_with_length(var13, var14);
317 var12 = var15;
318 varonce11 = var12;
319 }
320 ((void (*)(val*, val*))(var10->class->vft[COLOR_template__Template__add]))(var10, var12) /* add on <var10:Template>*/;
321 var16 = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__body_impl]))(self) /* body_impl on <self:CCompilationUnit>*/;
322 var17 = ((val* (*)(val*))(var_efc->class->vft[COLOR_c_tools__CFunction__to_writer]))(var_efc) /* to_writer on <var_efc:CFunction>*/;
323 ((void (*)(val*, val*))(var16->class->vft[COLOR_template__Template__add]))(var16, var17) /* add on <var16:Template>*/;
324 RET_LABEL:;
325 }
326 /* method c_tools#CCompilationUnit#add_local_function for (self: Object, CFunction) */
327 void VIRTUAL_c_tools__CCompilationUnit__add_local_function(val* self, val* p0) {
328 c_tools__CCompilationUnit__add_local_function(self, p0);
329 RET_LABEL:;
330 }
331 /* method c_tools#CCompilationUnit#add_exported_function for (self: CCompilationUnit, CFunction) */
332 void c_tools__CCompilationUnit__add_exported_function(val* self, val* p0) {
333 val* var_efc /* var efc: CFunction */;
334 val* var /* : Template */;
335 val* var1 /* : String */;
336 static val* varonce;
337 val* var2 /* : String */;
338 char* var3 /* : NativeString */;
339 long var4 /* : Int */;
340 val* var5 /* : String */;
341 val* var6 /* : Array[Object] */;
342 long var7 /* : Int */;
343 val* var8 /* : NativeArray[Object] */;
344 val* var9 /* : String */;
345 val* var10 /* : Template */;
346 static val* varonce11;
347 val* var12 /* : String */;
348 char* var13 /* : NativeString */;
349 long var14 /* : Int */;
350 val* var15 /* : String */;
351 val* var16 /* : Template */;
352 val* var17 /* : Template */;
353 var_efc = p0;
354 var = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__header_decl]))(self) /* header_decl on <self:CCompilationUnit>*/;
355 var1 = ((val* (*)(val*))(var_efc->class->vft[COLOR_c_tools__CFunction__signature]))(var_efc) /* signature on <var_efc:CFunction>*/;
356 if (varonce) {
357 var2 = varonce;
358 } else {
359 var3 = ";\n";
360 var4 = 2;
361 var5 = string__NativeString__to_s_with_length(var3, var4);
362 var2 = var5;
363 varonce = var2;
364 }
365 var6 = NEW_array__Array(&type_array__Arraykernel__Object);
366 { /* var6 = array_instance Array[Object] */
367 var7 = 2;
368 var8 = NEW_array__NativeArray(var7, &type_array__NativeArraykernel__Object);
369 ((struct instance_array__NativeArray*)var8)->values[0] = (val*) var1;
370 ((struct instance_array__NativeArray*)var8)->values[1] = (val*) var2;
371 ((void (*)(val*, val*, long))(var6->class->vft[COLOR_array__Array__with_native]))(var6, var8, var7) /* with_native on <var6:Array[Object]>*/;
372 }
373 var9 = ((val* (*)(val*))(var6->class->vft[COLOR_string__Object__to_s]))(var6) /* to_s on <var6:Array[Object]>*/;
374 ((void (*)(val*, val*))(var->class->vft[COLOR_template__Template__add]))(var, var9) /* add on <var:Template>*/;
375 var10 = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__body_impl]))(self) /* body_impl on <self:CCompilationUnit>*/;
376 if (varonce11) {
377 var12 = varonce11;
378 } else {
379 var13 = "\n";
380 var14 = 1;
381 var15 = string__NativeString__to_s_with_length(var13, var14);
382 var12 = var15;
383 varonce11 = var12;
384 }
385 ((void (*)(val*, val*))(var10->class->vft[COLOR_template__Template__add]))(var10, var12) /* add on <var10:Template>*/;
386 var16 = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__body_impl]))(self) /* body_impl on <self:CCompilationUnit>*/;
387 var17 = ((val* (*)(val*))(var_efc->class->vft[COLOR_c_tools__CFunction__to_writer]))(var_efc) /* to_writer on <var_efc:CFunction>*/;
388 ((void (*)(val*, val*))(var16->class->vft[COLOR_template__Template__add]))(var16, var17) /* add on <var16:Template>*/;
389 RET_LABEL:;
390 }
391 /* method c_tools#CCompilationUnit#add_exported_function for (self: Object, CFunction) */
392 void VIRTUAL_c_tools__CCompilationUnit__add_exported_function(val* self, val* p0) {
393 c_tools__CCompilationUnit__add_exported_function(self, p0);
394 RET_LABEL:;
395 }
396 /* method c_tools#CCompilationUnit#compile_header_core for (self: CCompilationUnit, OStream) */
397 void c_tools__CCompilationUnit__compile_header_core(val* self, val* p0) {
398 val* var_stream /* var stream: OStream */;
399 val* var /* : Template */;
400 val* var1 /* : Template */;
401 val* var2 /* : Template */;
402 val* var3 /* : Template */;
403 var_stream = p0;
404 var = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__header_c_base]))(self) /* header_c_base on <self:CCompilationUnit>*/;
405 ((void (*)(val*, val*))(var->class->vft[COLOR_stream__Streamable__write_to]))(var, var_stream) /* write_to on <var:Template>*/;
406 var1 = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__header_custom]))(self) /* header_custom on <self:CCompilationUnit>*/;
407 ((void (*)(val*, val*))(var1->class->vft[COLOR_stream__Streamable__write_to]))(var1, var_stream) /* write_to on <var1:Template>*/;
408 var2 = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__header_c_types]))(self) /* header_c_types on <self:CCompilationUnit>*/;
409 ((void (*)(val*, val*))(var2->class->vft[COLOR_stream__Streamable__write_to]))(var2, var_stream) /* write_to on <var2:Template>*/;
410 var3 = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__header_decl]))(self) /* header_decl on <self:CCompilationUnit>*/;
411 ((void (*)(val*, val*))(var3->class->vft[COLOR_stream__Streamable__write_to]))(var3, var_stream) /* write_to on <var3:Template>*/;
412 RET_LABEL:;
413 }
414 /* method c_tools#CCompilationUnit#compile_header_core for (self: Object, OStream) */
415 void VIRTUAL_c_tools__CCompilationUnit__compile_header_core(val* self, val* p0) {
416 c_tools__CCompilationUnit__compile_header_core(self, p0);
417 RET_LABEL:;
418 }
419 /* method c_tools#CCompilationUnit#compile_body_core for (self: CCompilationUnit, OStream) */
420 void c_tools__CCompilationUnit__compile_body_core(val* self, val* p0) {
421 val* var_stream /* var stream: OStream */;
422 val* var /* : Template */;
423 val* var1 /* : Template */;
424 val* var2 /* : Template */;
425 var_stream = p0;
426 var = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__body_decl]))(self) /* body_decl on <self:CCompilationUnit>*/;
427 ((void (*)(val*, val*))(var->class->vft[COLOR_stream__Streamable__write_to]))(var, var_stream) /* write_to on <var:Template>*/;
428 var1 = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__body_custom]))(self) /* body_custom on <self:CCompilationUnit>*/;
429 ((void (*)(val*, val*))(var1->class->vft[COLOR_stream__Streamable__write_to]))(var1, var_stream) /* write_to on <var1:Template>*/;
430 var2 = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CCompilationUnit__body_impl]))(self) /* body_impl on <self:CCompilationUnit>*/;
431 ((void (*)(val*, val*))(var2->class->vft[COLOR_stream__Streamable__write_to]))(var2, var_stream) /* write_to on <var2:Template>*/;
432 RET_LABEL:;
433 }
434 /* method c_tools#CCompilationUnit#compile_body_core for (self: Object, OStream) */
435 void VIRTUAL_c_tools__CCompilationUnit__compile_body_core(val* self, val* p0) {
436 c_tools__CCompilationUnit__compile_body_core(self, p0);
437 RET_LABEL:;
438 }
439 /* method c_tools#CCompilationUnit#init for (self: CCompilationUnit) */
440 void c_tools__CCompilationUnit__init(val* self) {
441 RET_LABEL:;
442 }
443 /* method c_tools#CCompilationUnit#init for (self: Object) */
444 void VIRTUAL_c_tools__CCompilationUnit__init(val* self) {
445 c_tools__CCompilationUnit__init(self);
446 RET_LABEL:;
447 }
448 /* method c_tools#CFunction#signature for (self: CFunction): String */
449 val* c_tools__CFunction__signature(val* self) {
450 val* var /* : String */;
451 val* var1 /* : String */;
452 var1 = self->attrs[COLOR_c_tools__CFunction___64dsignature].val; /* @signature on <self:CFunction> */
453 if (var1 == NULL) {
454 fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @signature");
455 fprintf(stderr, " (%s:%d)\n", "src/c_tools.nit", 82);
456 show_backtrace(1);
457 }
458 var = var1;
459 RET_LABEL:;
460 return var;
461 }
462 /* method c_tools#CFunction#signature for (self: Object): String */
463 val* VIRTUAL_c_tools__CFunction__signature(val* self) {
464 val* var /* : String */;
465 val* var1 /* : String */;
466 var1 = c_tools__CFunction__signature(self);
467 var = var1;
468 RET_LABEL:;
469 return var;
470 }
471 /* method c_tools#CFunction#signature= for (self: CFunction, String) */
472 void c_tools__CFunction__signature_61d(val* self, val* p0) {
473 self->attrs[COLOR_c_tools__CFunction___64dsignature].val = p0; /* @signature on <self:CFunction> */
474 RET_LABEL:;
475 }
476 /* method c_tools#CFunction#signature= for (self: Object, String) */
477 void VIRTUAL_c_tools__CFunction__signature_61d(val* self, val* p0) {
478 c_tools__CFunction__signature_61d(self, p0);
479 RET_LABEL:;
480 }
481 /* method c_tools#CFunction#decls for (self: CFunction): Template */
482 val* c_tools__CFunction__decls(val* self) {
483 val* var /* : Template */;
484 val* var1 /* : Template */;
485 var1 = self->attrs[COLOR_c_tools__CFunction___64ddecls].val; /* @decls on <self:CFunction> */
486 if (var1 == NULL) {
487 fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @decls");
488 fprintf(stderr, " (%s:%d)\n", "src/c_tools.nit", 84);
489 show_backtrace(1);
490 }
491 var = var1;
492 RET_LABEL:;
493 return var;
494 }
495 /* method c_tools#CFunction#decls for (self: Object): Template */
496 val* VIRTUAL_c_tools__CFunction__decls(val* self) {
497 val* var /* : Template */;
498 val* var1 /* : Template */;
499 var1 = c_tools__CFunction__decls(self);
500 var = var1;
501 RET_LABEL:;
502 return var;
503 }
504 /* method c_tools#CFunction#decls= for (self: CFunction, Template) */
505 void c_tools__CFunction__decls_61d(val* self, val* p0) {
506 self->attrs[COLOR_c_tools__CFunction___64ddecls].val = p0; /* @decls on <self:CFunction> */
507 RET_LABEL:;
508 }
509 /* method c_tools#CFunction#decls= for (self: Object, Template) */
510 void VIRTUAL_c_tools__CFunction__decls_61d(val* self, val* p0) {
511 c_tools__CFunction__decls_61d(self, p0);
512 RET_LABEL:;
513 }
514 /* method c_tools#CFunction#exprs for (self: CFunction): Template */
515 val* c_tools__CFunction__exprs(val* self) {
516 val* var /* : Template */;
517 val* var1 /* : Template */;
518 var1 = self->attrs[COLOR_c_tools__CFunction___64dexprs].val; /* @exprs on <self:CFunction> */
519 if (var1 == NULL) {
520 fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @exprs");
521 fprintf(stderr, " (%s:%d)\n", "src/c_tools.nit", 85);
522 show_backtrace(1);
523 }
524 var = var1;
525 RET_LABEL:;
526 return var;
527 }
528 /* method c_tools#CFunction#exprs for (self: Object): Template */
529 val* VIRTUAL_c_tools__CFunction__exprs(val* self) {
530 val* var /* : Template */;
531 val* var1 /* : Template */;
532 var1 = c_tools__CFunction__exprs(self);
533 var = var1;
534 RET_LABEL:;
535 return var;
536 }
537 /* method c_tools#CFunction#exprs= for (self: CFunction, Template) */
538 void c_tools__CFunction__exprs_61d(val* self, val* p0) {
539 self->attrs[COLOR_c_tools__CFunction___64dexprs].val = p0; /* @exprs on <self:CFunction> */
540 RET_LABEL:;
541 }
542 /* method c_tools#CFunction#exprs= for (self: Object, Template) */
543 void VIRTUAL_c_tools__CFunction__exprs_61d(val* self, val* p0) {
544 c_tools__CFunction__exprs_61d(self, p0);
545 RET_LABEL:;
546 }
547 /* method c_tools#CFunction#to_writer for (self: CFunction): Template */
548 val* c_tools__CFunction__to_writer(val* self) {
549 val* var /* : Template */;
550 val* var1 /* : Template */;
551 val* var_w /* var w: Template */;
552 val* var2 /* : String */;
553 static val* varonce;
554 val* var3 /* : String */;
555 char* var4 /* : NativeString */;
556 long var5 /* : Int */;
557 val* var6 /* : String */;
558 val* var7 /* : Template */;
559 static val* varonce8;
560 val* var9 /* : String */;
561 char* var10 /* : NativeString */;
562 long var11 /* : Int */;
563 val* var12 /* : String */;
564 val* var13 /* : Template */;
565 static val* varonce14;
566 val* var15 /* : String */;
567 char* var16 /* : NativeString */;
568 long var17 /* : Int */;
569 val* var18 /* : String */;
570 var1 = NEW_template__Template(&type_template__Template);
571 ((void (*)(val*))(var1->class->vft[COLOR_template__Template__init]))(var1) /* init on <var1:Template>*/;
572 var_w = var1;
573 var2 = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CFunction__signature]))(self) /* signature on <self:CFunction>*/;
574 ((void (*)(val*, val*))(var_w->class->vft[COLOR_template__Template__add]))(var_w, var2) /* add on <var_w:Template>*/;
575 if (varonce) {
576 var3 = varonce;
577 } else {
578 var4 = "\n{\n";
579 var5 = 3;
580 var6 = string__NativeString__to_s_with_length(var4, var5);
581 var3 = var6;
582 varonce = var3;
583 }
584 ((void (*)(val*, val*))(var_w->class->vft[COLOR_template__Template__add]))(var_w, var3) /* add on <var_w:Template>*/;
585 var7 = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CFunction__decls]))(self) /* decls on <self:CFunction>*/;
586 ((void (*)(val*, val*))(var_w->class->vft[COLOR_template__Template__add]))(var_w, var7) /* add on <var_w:Template>*/;
587 if (varonce8) {
588 var9 = varonce8;
589 } else {
590 var10 = "\n";
591 var11 = 1;
592 var12 = string__NativeString__to_s_with_length(var10, var11);
593 var9 = var12;
594 varonce8 = var9;
595 }
596 ((void (*)(val*, val*))(var_w->class->vft[COLOR_template__Template__add]))(var_w, var9) /* add on <var_w:Template>*/;
597 var13 = ((val* (*)(val*))(self->class->vft[COLOR_c_tools__CFunction__exprs]))(self) /* exprs on <self:CFunction>*/;
598 ((void (*)(val*, val*))(var_w->class->vft[COLOR_template__Template__add]))(var_w, var13) /* add on <var_w:Template>*/;
599 if (varonce14) {
600 var15 = varonce14;
601 } else {
602 var16 = "}\n";
603 var17 = 2;
604 var18 = string__NativeString__to_s_with_length(var16, var17);
605 var15 = var18;
606 varonce14 = var15;
607 }
608 ((void (*)(val*, val*))(var_w->class->vft[COLOR_template__Template__add]))(var_w, var15) /* add on <var_w:Template>*/;
609 var = var_w;
610 goto RET_LABEL;
611 RET_LABEL:;
612 return var;
613 }
614 /* method c_tools#CFunction#to_writer for (self: Object): Template */
615 val* VIRTUAL_c_tools__CFunction__to_writer(val* self) {
616 val* var /* : Template */;
617 val* var1 /* : Template */;
618 var1 = c_tools__CFunction__to_writer(self);
619 var = var1;
620 RET_LABEL:;
621 return var;
622 }
623 /* method c_tools#CFunction#init for (self: CFunction, String) */
624 void c_tools__CFunction__init(val* self, val* p0) {
625 self->attrs[COLOR_c_tools__CFunction___64dsignature].val = p0; /* @signature on <self:CFunction> */
626 RET_LABEL:;
627 }
628 /* method c_tools#CFunction#init for (self: Object, String) */
629 void VIRTUAL_c_tools__CFunction__init(val* self, val* p0) {
630 c_tools__CFunction__init(self, p0);
631 RET_LABEL:;
632 }