nitc: fix calling extern constructors from extern code in separate compiler
[nit.git] / c_src / parser_prod.sep.1.c
1 #include "parser_prod.sep.0.h"
2 /* method parser_prod#AModule#init_amodule for (self: AModule, nullable AModuledecl, Collection[Object], Collection[Object], Collection[Object]) */
3 void parser_prod__AModule__init_amodule(val* self, val* p0, val* p1, val* p2, val* p3) {
4 val* var_n_moduledecl /* var n_moduledecl: nullable AModuledecl */;
5 val* var_n_imports /* var n_imports: Collection[Object] */;
6 val* var_n_extern_code_blocks /* var n_extern_code_blocks: Collection[Object] */;
7 val* var_n_classdefs /* var n_classdefs: Collection[Object] */;
8 val* var /* : null */;
9 short int var1 /* : Bool */;
10 short int var2 /* : Bool */;
11 val* var_other /* var other: nullable Object */;
12 short int var4 /* : Bool */;
13 short int var5 /* : Bool */;
14 short int var6 /* : Bool */;
15 val* var8 /* : ANodes[AImport] */;
16 val* var10 /* : ANodes[AImport] */;
17 val* var11 /* : ANodes[AExternCodeBlock] */;
18 val* var13 /* : ANodes[AExternCodeBlock] */;
19 val* var14 /* : ANodes[AClassdef] */;
20 val* var16 /* : ANodes[AClassdef] */;
21 var_n_moduledecl = p0;
22 var_n_imports = p1;
23 var_n_extern_code_blocks = p2;
24 var_n_classdefs = p3;
25 self->attrs[COLOR_parser_nodes__AModule___n_moduledecl].val = var_n_moduledecl; /* _n_moduledecl on <self:AModule> */
26 var = NULL;
27 if (var_n_moduledecl == NULL) {
28 var1 = 0; /* is null */
29 } else {
30 var1 = 1; /* arg is null and recv is not */
31 }
32 if (0) {
33 { /* Inline kernel#Object#!= (var_n_moduledecl,var) on <var_n_moduledecl:nullable AModuledecl> */
34 var_other = var;
35 {
36 var5 = ((short int (*)(val*, val*))(var_n_moduledecl->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_moduledecl, var_other) /* == on <var_n_moduledecl:nullable AModuledecl(AModuledecl)>*/;
37 var4 = var5;
38 }
39 var6 = !var4;
40 var2 = var6;
41 goto RET_LABEL3;
42 RET_LABEL3:(void)0;
43 }
44 var1 = var2;
45 }
46 if (var1){
47 {
48 { /* Inline parser_nodes#ANode#parent= (var_n_moduledecl,self) on <var_n_moduledecl:nullable AModuledecl(AModuledecl)> */
49 var_n_moduledecl->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_moduledecl:nullable AModuledecl(AModuledecl)> */
50 RET_LABEL7:(void)0;
51 }
52 }
53 } else {
54 }
55 {
56 { /* Inline parser_nodes#AModule#n_imports (self) on <self:AModule> */
57 var10 = self->attrs[COLOR_parser_nodes__AModule___n_imports].val; /* _n_imports on <self:AModule> */
58 if (unlikely(var10 == NULL)) {
59 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_imports");
60 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 857);
61 show_backtrace(1);
62 }
63 var8 = var10;
64 RET_LABEL9:(void)0;
65 }
66 }
67 {
68 parser_nodes__ANodes__unsafe_add_all(var8, var_n_imports); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var8:ANodes[AImport]>*/
69 }
70 {
71 { /* Inline parser_nodes#AModule#n_extern_code_blocks (self) on <self:AModule> */
72 var13 = self->attrs[COLOR_parser_nodes__AModule___n_extern_code_blocks].val; /* _n_extern_code_blocks on <self:AModule> */
73 if (unlikely(var13 == NULL)) {
74 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_extern_code_blocks");
75 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 858);
76 show_backtrace(1);
77 }
78 var11 = var13;
79 RET_LABEL12:(void)0;
80 }
81 }
82 {
83 parser_nodes__ANodes__unsafe_add_all(var11, var_n_extern_code_blocks); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var11:ANodes[AExternCodeBlock]>*/
84 }
85 {
86 { /* Inline parser_nodes#AModule#n_classdefs (self) on <self:AModule> */
87 var16 = self->attrs[COLOR_parser_nodes__AModule___n_classdefs].val; /* _n_classdefs on <self:AModule> */
88 if (unlikely(var16 == NULL)) {
89 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_classdefs");
90 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 859);
91 show_backtrace(1);
92 }
93 var14 = var16;
94 RET_LABEL15:(void)0;
95 }
96 }
97 {
98 parser_nodes__ANodes__unsafe_add_all(var14, var_n_classdefs); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var14:ANodes[AClassdef]>*/
99 }
100 RET_LABEL:;
101 }
102 /* method parser_prod#AModule#init_amodule for (self: Object, nullable AModuledecl, Collection[Object], Collection[Object], Collection[Object]) */
103 void VIRTUAL_parser_prod__AModule__init_amodule(val* self, val* p0, val* p1, val* p2, val* p3) {
104 parser_prod__AModule__init_amodule(self, p0, p1, p2, p3); /* Direct call parser_prod#AModule#init_amodule on <self:Object(AModule)>*/
105 RET_LABEL:;
106 }
107 /* method parser_prod#AModule#replace_child for (self: AModule, ANode, nullable ANode) */
108 void parser_prod__AModule__replace_child(val* self, val* p0, val* p1) {
109 val* var_old_child /* var old_child: ANode */;
110 val* var_new_child /* var new_child: nullable ANode */;
111 val* var /* : nullable AModuledecl */;
112 short int var1 /* : Bool */;
113 short int var2 /* : Bool */;
114 val* var_other /* var other: nullable Object */;
115 short int var4 /* : Bool */;
116 short int var6 /* : Bool */;
117 short int var7 /* : Bool */;
118 int cltype;
119 int idtype;
120 const char* var_class_name;
121 val* var8 /* : ANodes[AImport] */;
122 val* var10 /* : ANodes[AImport] */;
123 short int var11 /* : Bool */;
124 val* var12 /* : ANodes[AExternCodeBlock] */;
125 val* var14 /* : ANodes[AExternCodeBlock] */;
126 short int var15 /* : Bool */;
127 val* var16 /* : ANodes[AClassdef] */;
128 val* var18 /* : ANodes[AClassdef] */;
129 short int var19 /* : Bool */;
130 var_old_child = p0;
131 var_new_child = p1;
132 var = self->attrs[COLOR_parser_nodes__AModule___n_moduledecl].val; /* _n_moduledecl on <self:AModule> */
133 if (var == NULL) {
134 var1 = 0; /* <var_old_child:ANode> cannot be null */
135 } else {
136 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable AModuledecl> */
137 var_other = var_old_child;
138 {
139 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable AModuledecl(AModuledecl)> */
140 var6 = var == var_other;
141 var4 = var6;
142 goto RET_LABEL5;
143 RET_LABEL5:(void)0;
144 }
145 }
146 var2 = var4;
147 goto RET_LABEL3;
148 RET_LABEL3:(void)0;
149 }
150 var1 = var2;
151 }
152 if (var1){
153 /* <var_new_child:nullable ANode> isa nullable AModuledecl */
154 cltype = type_nullable_parser_nodes__AModuledecl.color;
155 idtype = type_nullable_parser_nodes__AModuledecl.id;
156 if(var_new_child == NULL) {
157 var7 = 1;
158 } else {
159 if(cltype >= var_new_child->type->table_size) {
160 var7 = 0;
161 } else {
162 var7 = var_new_child->type->type_table[cltype] == idtype;
163 }
164 }
165 if (unlikely(!var7)) {
166 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
167 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AModuledecl", var_class_name);
168 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 27);
169 show_backtrace(1);
170 }
171 {
172 parser_prod__AModule__n_moduledecl_61d(self, var_new_child); /* Direct call parser_prod#AModule#n_moduledecl= on <self:AModule>*/
173 }
174 goto RET_LABEL;
175 } else {
176 }
177 {
178 { /* Inline parser_nodes#AModule#n_imports (self) on <self:AModule> */
179 var10 = self->attrs[COLOR_parser_nodes__AModule___n_imports].val; /* _n_imports on <self:AModule> */
180 if (unlikely(var10 == NULL)) {
181 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_imports");
182 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 857);
183 show_backtrace(1);
184 }
185 var8 = var10;
186 RET_LABEL9:(void)0;
187 }
188 }
189 {
190 var11 = parser_nodes__ANodes__replace_child(var8, var_old_child, var_new_child);
191 }
192 if (var11){
193 goto RET_LABEL;
194 } else {
195 }
196 {
197 { /* Inline parser_nodes#AModule#n_extern_code_blocks (self) on <self:AModule> */
198 var14 = self->attrs[COLOR_parser_nodes__AModule___n_extern_code_blocks].val; /* _n_extern_code_blocks on <self:AModule> */
199 if (unlikely(var14 == NULL)) {
200 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_extern_code_blocks");
201 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 858);
202 show_backtrace(1);
203 }
204 var12 = var14;
205 RET_LABEL13:(void)0;
206 }
207 }
208 {
209 var15 = parser_nodes__ANodes__replace_child(var12, var_old_child, var_new_child);
210 }
211 if (var15){
212 goto RET_LABEL;
213 } else {
214 }
215 {
216 { /* Inline parser_nodes#AModule#n_classdefs (self) on <self:AModule> */
217 var18 = self->attrs[COLOR_parser_nodes__AModule___n_classdefs].val; /* _n_classdefs on <self:AModule> */
218 if (unlikely(var18 == NULL)) {
219 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_classdefs");
220 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 859);
221 show_backtrace(1);
222 }
223 var16 = var18;
224 RET_LABEL17:(void)0;
225 }
226 }
227 {
228 var19 = parser_nodes__ANodes__replace_child(var16, var_old_child, var_new_child);
229 }
230 if (var19){
231 goto RET_LABEL;
232 } else {
233 }
234 RET_LABEL:;
235 }
236 /* method parser_prod#AModule#replace_child for (self: Object, ANode, nullable ANode) */
237 void VIRTUAL_parser_prod__AModule__replace_child(val* self, val* p0, val* p1) {
238 parser_prod__AModule__replace_child(self, p0, p1); /* Direct call parser_prod#AModule#replace_child on <self:Object(AModule)>*/
239 RET_LABEL:;
240 }
241 /* method parser_prod#AModule#n_moduledecl= for (self: AModule, nullable AModuledecl) */
242 void parser_prod__AModule__n_moduledecl_61d(val* self, val* p0) {
243 val* var_node /* var node: nullable AModuledecl */;
244 val* var /* : null */;
245 short int var1 /* : Bool */;
246 short int var2 /* : Bool */;
247 val* var_other /* var other: nullable Object */;
248 short int var4 /* : Bool */;
249 short int var5 /* : Bool */;
250 short int var6 /* : Bool */;
251 var_node = p0;
252 self->attrs[COLOR_parser_nodes__AModule___n_moduledecl].val = var_node; /* _n_moduledecl on <self:AModule> */
253 var = NULL;
254 if (var_node == NULL) {
255 var1 = 0; /* is null */
256 } else {
257 var1 = 1; /* arg is null and recv is not */
258 }
259 if (0) {
260 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AModuledecl> */
261 var_other = var;
262 {
263 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AModuledecl(AModuledecl)>*/;
264 var4 = var5;
265 }
266 var6 = !var4;
267 var2 = var6;
268 goto RET_LABEL3;
269 RET_LABEL3:(void)0;
270 }
271 var1 = var2;
272 }
273 if (var1){
274 {
275 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AModuledecl(AModuledecl)> */
276 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AModuledecl(AModuledecl)> */
277 RET_LABEL7:(void)0;
278 }
279 }
280 } else {
281 }
282 RET_LABEL:;
283 }
284 /* method parser_prod#AModule#n_moduledecl= for (self: Object, nullable AModuledecl) */
285 void VIRTUAL_parser_prod__AModule__n_moduledecl_61d(val* self, val* p0) {
286 parser_prod__AModule__n_moduledecl_61d(self, p0); /* Direct call parser_prod#AModule#n_moduledecl= on <self:Object(AModule)>*/
287 RET_LABEL:;
288 }
289 /* method parser_prod#AModule#visit_all for (self: AModule, Visitor) */
290 void parser_prod__AModule__visit_all(val* self, val* p0) {
291 val* var_v /* var v: Visitor */;
292 val* var /* : nullable AModuledecl */;
293 val* var1 /* : ANodes[AImport] */;
294 val* var3 /* : ANodes[AImport] */;
295 val* var4 /* : ANodes[AExternCodeBlock] */;
296 val* var6 /* : ANodes[AExternCodeBlock] */;
297 val* var7 /* : ANodes[AClassdef] */;
298 val* var9 /* : ANodes[AClassdef] */;
299 var_v = p0;
300 var = self->attrs[COLOR_parser_nodes__AModule___n_moduledecl].val; /* _n_moduledecl on <self:AModule> */
301 {
302 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
303 }
304 {
305 { /* Inline parser_nodes#AModule#n_imports (self) on <self:AModule> */
306 var3 = self->attrs[COLOR_parser_nodes__AModule___n_imports].val; /* _n_imports on <self:AModule> */
307 if (unlikely(var3 == NULL)) {
308 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_imports");
309 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 857);
310 show_backtrace(1);
311 }
312 var1 = var3;
313 RET_LABEL2:(void)0;
314 }
315 }
316 {
317 parser_nodes__ANodes__visit_all(var1, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var1:ANodes[AImport]>*/
318 }
319 {
320 { /* Inline parser_nodes#AModule#n_extern_code_blocks (self) on <self:AModule> */
321 var6 = self->attrs[COLOR_parser_nodes__AModule___n_extern_code_blocks].val; /* _n_extern_code_blocks on <self:AModule> */
322 if (unlikely(var6 == NULL)) {
323 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_extern_code_blocks");
324 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 858);
325 show_backtrace(1);
326 }
327 var4 = var6;
328 RET_LABEL5:(void)0;
329 }
330 }
331 {
332 parser_nodes__ANodes__visit_all(var4, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var4:ANodes[AExternCodeBlock]>*/
333 }
334 {
335 { /* Inline parser_nodes#AModule#n_classdefs (self) on <self:AModule> */
336 var9 = self->attrs[COLOR_parser_nodes__AModule___n_classdefs].val; /* _n_classdefs on <self:AModule> */
337 if (unlikely(var9 == NULL)) {
338 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_classdefs");
339 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 859);
340 show_backtrace(1);
341 }
342 var7 = var9;
343 RET_LABEL8:(void)0;
344 }
345 }
346 {
347 parser_nodes__ANodes__visit_all(var7, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var7:ANodes[AClassdef]>*/
348 }
349 RET_LABEL:;
350 }
351 /* method parser_prod#AModule#visit_all for (self: Object, Visitor) */
352 void VIRTUAL_parser_prod__AModule__visit_all(val* self, val* p0) {
353 parser_prod__AModule__visit_all(self, p0); /* Direct call parser_prod#AModule#visit_all on <self:Object(AModule)>*/
354 RET_LABEL:;
355 }
356 /* method parser_prod#AModuledecl#init_amoduledecl for (self: AModuledecl, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable TKwmodule, nullable AModuleName, nullable AAnnotations) */
357 void parser_prod__AModuledecl__init_amoduledecl(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5) {
358 val* var_n_doc /* var n_doc: nullable ADoc */;
359 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
360 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
361 val* var_n_kwmodule /* var n_kwmodule: nullable TKwmodule */;
362 val* var_n_name /* var n_name: nullable AModuleName */;
363 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
364 val* var /* : null */;
365 short int var1 /* : Bool */;
366 short int var2 /* : Bool */;
367 val* var_other /* var other: nullable Object */;
368 short int var4 /* : Bool */;
369 short int var5 /* : Bool */;
370 short int var6 /* : Bool */;
371 val* var8 /* : null */;
372 short int var9 /* : Bool */;
373 short int var10 /* : Bool */;
374 short int var12 /* : Bool */;
375 short int var13 /* : Bool */;
376 short int var14 /* : Bool */;
377 val* var19 /* : null */;
378 short int var20 /* : Bool */;
379 short int var21 /* : Bool */;
380 short int var23 /* : Bool */;
381 short int var24 /* : Bool */;
382 short int var25 /* : Bool */;
383 var_n_doc = p0;
384 var_n_kwredef = p1;
385 var_n_visibility = p2;
386 var_n_kwmodule = p3;
387 var_n_name = p4;
388 var_n_annotations = p5;
389 self->attrs[COLOR_parser_nodes__AModuledecl___n_doc].val = var_n_doc; /* _n_doc on <self:AModuledecl> */
390 var = NULL;
391 if (var_n_doc == NULL) {
392 var1 = 0; /* is null */
393 } else {
394 var1 = 1; /* arg is null and recv is not */
395 }
396 if (0) {
397 { /* Inline kernel#Object#!= (var_n_doc,var) on <var_n_doc:nullable ADoc> */
398 var_other = var;
399 {
400 var5 = ((short int (*)(val*, val*))(var_n_doc->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_doc, var_other) /* == on <var_n_doc:nullable ADoc(ADoc)>*/;
401 var4 = var5;
402 }
403 var6 = !var4;
404 var2 = var6;
405 goto RET_LABEL3;
406 RET_LABEL3:(void)0;
407 }
408 var1 = var2;
409 }
410 if (var1){
411 {
412 { /* Inline parser_nodes#ANode#parent= (var_n_doc,self) on <var_n_doc:nullable ADoc(ADoc)> */
413 var_n_doc->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_doc:nullable ADoc(ADoc)> */
414 RET_LABEL7:(void)0;
415 }
416 }
417 } else {
418 }
419 self->attrs[COLOR_parser_nodes__AModuledecl___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:AModuledecl> */
420 var8 = NULL;
421 if (var_n_kwredef == NULL) {
422 var9 = 0; /* is null */
423 } else {
424 var9 = 1; /* arg is null and recv is not */
425 }
426 if (0) {
427 { /* Inline kernel#Object#!= (var_n_kwredef,var8) on <var_n_kwredef:nullable TKwredef> */
428 var_other = var8;
429 {
430 var13 = ((short int (*)(val*, val*))(var_n_kwredef->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
431 var12 = var13;
432 }
433 var14 = !var12;
434 var10 = var14;
435 goto RET_LABEL11;
436 RET_LABEL11:(void)0;
437 }
438 var9 = var10;
439 }
440 if (var9){
441 {
442 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
443 var_n_kwredef->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
444 RET_LABEL15:(void)0;
445 }
446 }
447 } else {
448 }
449 if (unlikely(var_n_visibility == NULL)) {
450 PRINT_ERROR("Runtime error: %s", "Cast failed");
451 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 64);
452 show_backtrace(1);
453 }
454 self->attrs[COLOR_parser_nodes__AModuledecl___n_visibility].val = var_n_visibility; /* _n_visibility on <self:AModuledecl> */
455 if (var_n_visibility == NULL) {
456 PRINT_ERROR("Runtime error: %s", "Receiver is null");
457 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 65);
458 show_backtrace(1);
459 } else {
460 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
461 if (unlikely(var_n_visibility == NULL)) {
462 PRINT_ERROR("Runtime error: %s", "Receiver is null");
463 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
464 show_backtrace(1);
465 }
466 var_n_visibility->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
467 RET_LABEL16:(void)0;
468 }
469 }
470 if (unlikely(var_n_kwmodule == NULL)) {
471 PRINT_ERROR("Runtime error: %s", "Cast failed");
472 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 66);
473 show_backtrace(1);
474 }
475 self->attrs[COLOR_parser_nodes__AModuledecl___n_kwmodule].val = var_n_kwmodule; /* _n_kwmodule on <self:AModuledecl> */
476 if (var_n_kwmodule == NULL) {
477 PRINT_ERROR("Runtime error: %s", "Receiver is null");
478 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 67);
479 show_backtrace(1);
480 } else {
481 { /* Inline parser_nodes#ANode#parent= (var_n_kwmodule,self) on <var_n_kwmodule:nullable TKwmodule> */
482 if (unlikely(var_n_kwmodule == NULL)) {
483 PRINT_ERROR("Runtime error: %s", "Receiver is null");
484 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
485 show_backtrace(1);
486 }
487 var_n_kwmodule->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwmodule:nullable TKwmodule> */
488 RET_LABEL17:(void)0;
489 }
490 }
491 if (unlikely(var_n_name == NULL)) {
492 PRINT_ERROR("Runtime error: %s", "Cast failed");
493 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 68);
494 show_backtrace(1);
495 }
496 self->attrs[COLOR_parser_nodes__AModuledecl___n_name].val = var_n_name; /* _n_name on <self:AModuledecl> */
497 if (var_n_name == NULL) {
498 PRINT_ERROR("Runtime error: %s", "Receiver is null");
499 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 69);
500 show_backtrace(1);
501 } else {
502 { /* Inline parser_nodes#ANode#parent= (var_n_name,self) on <var_n_name:nullable AModuleName> */
503 if (unlikely(var_n_name == NULL)) {
504 PRINT_ERROR("Runtime error: %s", "Receiver is null");
505 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
506 show_backtrace(1);
507 }
508 var_n_name->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_name:nullable AModuleName> */
509 RET_LABEL18:(void)0;
510 }
511 }
512 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AModuledecl> */
513 var19 = NULL;
514 if (var_n_annotations == NULL) {
515 var20 = 0; /* is null */
516 } else {
517 var20 = 1; /* arg is null and recv is not */
518 }
519 if (0) {
520 { /* Inline kernel#Object#!= (var_n_annotations,var19) on <var_n_annotations:nullable AAnnotations> */
521 var_other = var19;
522 {
523 var24 = ((short int (*)(val*, val*))(var_n_annotations->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
524 var23 = var24;
525 }
526 var25 = !var23;
527 var21 = var25;
528 goto RET_LABEL22;
529 RET_LABEL22:(void)0;
530 }
531 var20 = var21;
532 }
533 if (var20){
534 {
535 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
536 var_n_annotations->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
537 RET_LABEL26:(void)0;
538 }
539 }
540 } else {
541 }
542 RET_LABEL:;
543 }
544 /* method parser_prod#AModuledecl#init_amoduledecl for (self: Object, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable TKwmodule, nullable AModuleName, nullable AAnnotations) */
545 void VIRTUAL_parser_prod__AModuledecl__init_amoduledecl(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5) {
546 parser_prod__AModuledecl__init_amoduledecl(self, p0, p1, p2, p3, p4, p5); /* Direct call parser_prod#AModuledecl#init_amoduledecl on <self:Object(AModuledecl)>*/
547 RET_LABEL:;
548 }
549 /* method parser_prod#AModuledecl#replace_child for (self: AModuledecl, ANode, nullable ANode) */
550 void parser_prod__AModuledecl__replace_child(val* self, val* p0, val* p1) {
551 val* var_old_child /* var old_child: ANode */;
552 val* var_new_child /* var new_child: nullable ANode */;
553 val* var /* : nullable ADoc */;
554 short int var1 /* : Bool */;
555 short int var2 /* : Bool */;
556 val* var_other /* var other: nullable Object */;
557 short int var4 /* : Bool */;
558 short int var6 /* : Bool */;
559 short int var7 /* : Bool */;
560 int cltype;
561 int idtype;
562 const char* var_class_name;
563 val* var8 /* : nullable TKwredef */;
564 short int var9 /* : Bool */;
565 short int var10 /* : Bool */;
566 short int var12 /* : Bool */;
567 short int var14 /* : Bool */;
568 short int var15 /* : Bool */;
569 int cltype16;
570 int idtype17;
571 const char* var_class_name18;
572 val* var19 /* : AVisibility */;
573 short int var20 /* : Bool */;
574 short int var21 /* : Bool */;
575 short int var23 /* : Bool */;
576 short int var25 /* : Bool */;
577 short int var26 /* : Bool */;
578 int cltype27;
579 int idtype28;
580 const char* var_class_name29;
581 val* var30 /* : TKwmodule */;
582 short int var31 /* : Bool */;
583 short int var32 /* : Bool */;
584 short int var34 /* : Bool */;
585 short int var36 /* : Bool */;
586 short int var37 /* : Bool */;
587 int cltype38;
588 int idtype39;
589 const char* var_class_name40;
590 val* var41 /* : AModuleName */;
591 short int var42 /* : Bool */;
592 short int var43 /* : Bool */;
593 short int var45 /* : Bool */;
594 short int var47 /* : Bool */;
595 short int var48 /* : Bool */;
596 int cltype49;
597 int idtype50;
598 const char* var_class_name51;
599 val* var52 /* : nullable AAnnotations */;
600 short int var53 /* : Bool */;
601 short int var54 /* : Bool */;
602 short int var56 /* : Bool */;
603 short int var58 /* : Bool */;
604 short int var59 /* : Bool */;
605 int cltype60;
606 int idtype61;
607 const char* var_class_name62;
608 var_old_child = p0;
609 var_new_child = p1;
610 var = self->attrs[COLOR_parser_nodes__AModuledecl___n_doc].val; /* _n_doc on <self:AModuledecl> */
611 if (var == NULL) {
612 var1 = 0; /* <var_old_child:ANode> cannot be null */
613 } else {
614 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable ADoc> */
615 var_other = var_old_child;
616 {
617 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable ADoc(ADoc)> */
618 var6 = var == var_other;
619 var4 = var6;
620 goto RET_LABEL5;
621 RET_LABEL5:(void)0;
622 }
623 }
624 var2 = var4;
625 goto RET_LABEL3;
626 RET_LABEL3:(void)0;
627 }
628 var1 = var2;
629 }
630 if (var1){
631 /* <var_new_child:nullable ANode> isa nullable ADoc */
632 cltype = type_nullable_parser_nodes__ADoc.color;
633 idtype = type_nullable_parser_nodes__ADoc.id;
634 if(var_new_child == NULL) {
635 var7 = 1;
636 } else {
637 if(cltype >= var_new_child->type->table_size) {
638 var7 = 0;
639 } else {
640 var7 = var_new_child->type->type_table[cltype] == idtype;
641 }
642 }
643 if (unlikely(!var7)) {
644 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
645 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ADoc", var_class_name);
646 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 77);
647 show_backtrace(1);
648 }
649 {
650 parser_prod__AModuledecl__n_doc_61d(self, var_new_child); /* Direct call parser_prod#AModuledecl#n_doc= on <self:AModuledecl>*/
651 }
652 goto RET_LABEL;
653 } else {
654 }
655 var8 = self->attrs[COLOR_parser_nodes__AModuledecl___n_kwredef].val; /* _n_kwredef on <self:AModuledecl> */
656 if (var8 == NULL) {
657 var9 = 0; /* <var_old_child:ANode> cannot be null */
658 } else {
659 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwredef> */
660 var_other = var_old_child;
661 {
662 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwredef(TKwredef)> */
663 var14 = var8 == var_other;
664 var12 = var14;
665 goto RET_LABEL13;
666 RET_LABEL13:(void)0;
667 }
668 }
669 var10 = var12;
670 goto RET_LABEL11;
671 RET_LABEL11:(void)0;
672 }
673 var9 = var10;
674 }
675 if (var9){
676 /* <var_new_child:nullable ANode> isa nullable TKwredef */
677 cltype16 = type_nullable_parser_nodes__TKwredef.color;
678 idtype17 = type_nullable_parser_nodes__TKwredef.id;
679 if(var_new_child == NULL) {
680 var15 = 1;
681 } else {
682 if(cltype16 >= var_new_child->type->table_size) {
683 var15 = 0;
684 } else {
685 var15 = var_new_child->type->type_table[cltype16] == idtype17;
686 }
687 }
688 if (unlikely(!var15)) {
689 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
690 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name18);
691 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 81);
692 show_backtrace(1);
693 }
694 {
695 parser_prod__AModuledecl__n_kwredef_61d(self, var_new_child); /* Direct call parser_prod#AModuledecl#n_kwredef= on <self:AModuledecl>*/
696 }
697 goto RET_LABEL;
698 } else {
699 }
700 var19 = self->attrs[COLOR_parser_nodes__AModuledecl___n_visibility].val; /* _n_visibility on <self:AModuledecl> */
701 if (unlikely(var19 == NULL)) {
702 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_visibility");
703 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 84);
704 show_backtrace(1);
705 }
706 {
707 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:AVisibility> */
708 var_other = var_old_child;
709 {
710 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:AVisibility> */
711 var25 = var19 == var_other;
712 var23 = var25;
713 goto RET_LABEL24;
714 RET_LABEL24:(void)0;
715 }
716 }
717 var21 = var23;
718 goto RET_LABEL22;
719 RET_LABEL22:(void)0;
720 }
721 var20 = var21;
722 }
723 if (var20){
724 /* <var_new_child:nullable ANode> isa AVisibility */
725 cltype27 = type_parser_nodes__AVisibility.color;
726 idtype28 = type_parser_nodes__AVisibility.id;
727 if(var_new_child == NULL) {
728 var26 = 0;
729 } else {
730 if(cltype27 >= var_new_child->type->table_size) {
731 var26 = 0;
732 } else {
733 var26 = var_new_child->type->type_table[cltype27] == idtype28;
734 }
735 }
736 if (unlikely(!var26)) {
737 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
738 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name29);
739 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 85);
740 show_backtrace(1);
741 }
742 {
743 parser_prod__AModuledecl__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#AModuledecl#n_visibility= on <self:AModuledecl>*/
744 }
745 goto RET_LABEL;
746 } else {
747 }
748 var30 = self->attrs[COLOR_parser_nodes__AModuledecl___n_kwmodule].val; /* _n_kwmodule on <self:AModuledecl> */
749 if (unlikely(var30 == NULL)) {
750 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwmodule");
751 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 88);
752 show_backtrace(1);
753 }
754 {
755 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:TKwmodule> */
756 var_other = var_old_child;
757 {
758 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:TKwmodule> */
759 var36 = var30 == var_other;
760 var34 = var36;
761 goto RET_LABEL35;
762 RET_LABEL35:(void)0;
763 }
764 }
765 var32 = var34;
766 goto RET_LABEL33;
767 RET_LABEL33:(void)0;
768 }
769 var31 = var32;
770 }
771 if (var31){
772 /* <var_new_child:nullable ANode> isa TKwmodule */
773 cltype38 = type_parser_nodes__TKwmodule.color;
774 idtype39 = type_parser_nodes__TKwmodule.id;
775 if(var_new_child == NULL) {
776 var37 = 0;
777 } else {
778 if(cltype38 >= var_new_child->type->table_size) {
779 var37 = 0;
780 } else {
781 var37 = var_new_child->type->type_table[cltype38] == idtype39;
782 }
783 }
784 if (unlikely(!var37)) {
785 var_class_name40 = var_new_child == NULL ? "null" : var_new_child->type->name;
786 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwmodule", var_class_name40);
787 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 89);
788 show_backtrace(1);
789 }
790 {
791 parser_prod__AModuledecl__n_kwmodule_61d(self, var_new_child); /* Direct call parser_prod#AModuledecl#n_kwmodule= on <self:AModuledecl>*/
792 }
793 goto RET_LABEL;
794 } else {
795 }
796 var41 = self->attrs[COLOR_parser_nodes__AModuledecl___n_name].val; /* _n_name on <self:AModuledecl> */
797 if (unlikely(var41 == NULL)) {
798 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_name");
799 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 92);
800 show_backtrace(1);
801 }
802 {
803 { /* Inline kernel#Object#== (var41,var_old_child) on <var41:AModuleName> */
804 var_other = var_old_child;
805 {
806 { /* Inline kernel#Object#is_same_instance (var41,var_other) on <var41:AModuleName> */
807 var47 = var41 == var_other;
808 var45 = var47;
809 goto RET_LABEL46;
810 RET_LABEL46:(void)0;
811 }
812 }
813 var43 = var45;
814 goto RET_LABEL44;
815 RET_LABEL44:(void)0;
816 }
817 var42 = var43;
818 }
819 if (var42){
820 /* <var_new_child:nullable ANode> isa AModuleName */
821 cltype49 = type_parser_nodes__AModuleName.color;
822 idtype50 = type_parser_nodes__AModuleName.id;
823 if(var_new_child == NULL) {
824 var48 = 0;
825 } else {
826 if(cltype49 >= var_new_child->type->table_size) {
827 var48 = 0;
828 } else {
829 var48 = var_new_child->type->type_table[cltype49] == idtype50;
830 }
831 }
832 if (unlikely(!var48)) {
833 var_class_name51 = var_new_child == NULL ? "null" : var_new_child->type->name;
834 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AModuleName", var_class_name51);
835 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 93);
836 show_backtrace(1);
837 }
838 {
839 parser_prod__AModuledecl__n_name_61d(self, var_new_child); /* Direct call parser_prod#AModuledecl#n_name= on <self:AModuledecl>*/
840 }
841 goto RET_LABEL;
842 } else {
843 }
844 var52 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AModuledecl> */
845 if (var52 == NULL) {
846 var53 = 0; /* <var_old_child:ANode> cannot be null */
847 } else {
848 { /* Inline kernel#Object#== (var52,var_old_child) on <var52:nullable AAnnotations> */
849 var_other = var_old_child;
850 {
851 { /* Inline kernel#Object#is_same_instance (var52,var_other) on <var52:nullable AAnnotations(AAnnotations)> */
852 var58 = var52 == var_other;
853 var56 = var58;
854 goto RET_LABEL57;
855 RET_LABEL57:(void)0;
856 }
857 }
858 var54 = var56;
859 goto RET_LABEL55;
860 RET_LABEL55:(void)0;
861 }
862 var53 = var54;
863 }
864 if (var53){
865 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
866 cltype60 = type_nullable_parser_nodes__AAnnotations.color;
867 idtype61 = type_nullable_parser_nodes__AAnnotations.id;
868 if(var_new_child == NULL) {
869 var59 = 1;
870 } else {
871 if(cltype60 >= var_new_child->type->table_size) {
872 var59 = 0;
873 } else {
874 var59 = var_new_child->type->type_table[cltype60] == idtype61;
875 }
876 }
877 if (unlikely(!var59)) {
878 var_class_name62 = var_new_child == NULL ? "null" : var_new_child->type->name;
879 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name62);
880 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 97);
881 show_backtrace(1);
882 }
883 {
884 parser_prod__AModuledecl__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AModuledecl#n_annotations= on <self:AModuledecl>*/
885 }
886 goto RET_LABEL;
887 } else {
888 }
889 RET_LABEL:;
890 }
891 /* method parser_prod#AModuledecl#replace_child for (self: Object, ANode, nullable ANode) */
892 void VIRTUAL_parser_prod__AModuledecl__replace_child(val* self, val* p0, val* p1) {
893 parser_prod__AModuledecl__replace_child(self, p0, p1); /* Direct call parser_prod#AModuledecl#replace_child on <self:Object(AModuledecl)>*/
894 RET_LABEL:;
895 }
896 /* method parser_prod#AModuledecl#n_doc= for (self: AModuledecl, nullable ADoc) */
897 void parser_prod__AModuledecl__n_doc_61d(val* self, val* p0) {
898 val* var_node /* var node: nullable ADoc */;
899 val* var /* : null */;
900 short int var1 /* : Bool */;
901 short int var2 /* : Bool */;
902 val* var_other /* var other: nullable Object */;
903 short int var4 /* : Bool */;
904 short int var5 /* : Bool */;
905 short int var6 /* : Bool */;
906 var_node = p0;
907 self->attrs[COLOR_parser_nodes__AModuledecl___n_doc].val = var_node; /* _n_doc on <self:AModuledecl> */
908 var = NULL;
909 if (var_node == NULL) {
910 var1 = 0; /* is null */
911 } else {
912 var1 = 1; /* arg is null and recv is not */
913 }
914 if (0) {
915 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable ADoc> */
916 var_other = var;
917 {
918 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable ADoc(ADoc)>*/;
919 var4 = var5;
920 }
921 var6 = !var4;
922 var2 = var6;
923 goto RET_LABEL3;
924 RET_LABEL3:(void)0;
925 }
926 var1 = var2;
927 }
928 if (var1){
929 {
930 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ADoc(ADoc)> */
931 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ADoc(ADoc)> */
932 RET_LABEL7:(void)0;
933 }
934 }
935 } else {
936 }
937 RET_LABEL:;
938 }
939 /* method parser_prod#AModuledecl#n_doc= for (self: Object, nullable ADoc) */
940 void VIRTUAL_parser_prod__AModuledecl__n_doc_61d(val* self, val* p0) {
941 parser_prod__AModuledecl__n_doc_61d(self, p0); /* Direct call parser_prod#AModuledecl#n_doc= on <self:Object(AModuledecl)>*/
942 RET_LABEL:;
943 }
944 /* method parser_prod#AModuledecl#n_kwredef= for (self: AModuledecl, nullable TKwredef) */
945 void parser_prod__AModuledecl__n_kwredef_61d(val* self, val* p0) {
946 val* var_node /* var node: nullable TKwredef */;
947 val* var /* : null */;
948 short int var1 /* : Bool */;
949 short int var2 /* : Bool */;
950 val* var_other /* var other: nullable Object */;
951 short int var4 /* : Bool */;
952 short int var5 /* : Bool */;
953 short int var6 /* : Bool */;
954 var_node = p0;
955 self->attrs[COLOR_parser_nodes__AModuledecl___n_kwredef].val = var_node; /* _n_kwredef on <self:AModuledecl> */
956 var = NULL;
957 if (var_node == NULL) {
958 var1 = 0; /* is null */
959 } else {
960 var1 = 1; /* arg is null and recv is not */
961 }
962 if (0) {
963 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
964 var_other = var;
965 {
966 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
967 var4 = var5;
968 }
969 var6 = !var4;
970 var2 = var6;
971 goto RET_LABEL3;
972 RET_LABEL3:(void)0;
973 }
974 var1 = var2;
975 }
976 if (var1){
977 {
978 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
979 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
980 RET_LABEL7:(void)0;
981 }
982 }
983 } else {
984 }
985 RET_LABEL:;
986 }
987 /* method parser_prod#AModuledecl#n_kwredef= for (self: Object, nullable TKwredef) */
988 void VIRTUAL_parser_prod__AModuledecl__n_kwredef_61d(val* self, val* p0) {
989 parser_prod__AModuledecl__n_kwredef_61d(self, p0); /* Direct call parser_prod#AModuledecl#n_kwredef= on <self:Object(AModuledecl)>*/
990 RET_LABEL:;
991 }
992 /* method parser_prod#AModuledecl#n_visibility= for (self: AModuledecl, AVisibility) */
993 void parser_prod__AModuledecl__n_visibility_61d(val* self, val* p0) {
994 val* var_node /* var node: AVisibility */;
995 var_node = p0;
996 self->attrs[COLOR_parser_nodes__AModuledecl___n_visibility].val = var_node; /* _n_visibility on <self:AModuledecl> */
997 {
998 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AVisibility> */
999 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AVisibility> */
1000 RET_LABEL1:(void)0;
1001 }
1002 }
1003 RET_LABEL:;
1004 }
1005 /* method parser_prod#AModuledecl#n_visibility= for (self: Object, AVisibility) */
1006 void VIRTUAL_parser_prod__AModuledecl__n_visibility_61d(val* self, val* p0) {
1007 parser_prod__AModuledecl__n_visibility_61d(self, p0); /* Direct call parser_prod#AModuledecl#n_visibility= on <self:Object(AModuledecl)>*/
1008 RET_LABEL:;
1009 }
1010 /* method parser_prod#AModuledecl#n_kwmodule= for (self: AModuledecl, TKwmodule) */
1011 void parser_prod__AModuledecl__n_kwmodule_61d(val* self, val* p0) {
1012 val* var_node /* var node: TKwmodule */;
1013 var_node = p0;
1014 self->attrs[COLOR_parser_nodes__AModuledecl___n_kwmodule].val = var_node; /* _n_kwmodule on <self:AModuledecl> */
1015 {
1016 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwmodule> */
1017 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwmodule> */
1018 RET_LABEL1:(void)0;
1019 }
1020 }
1021 RET_LABEL:;
1022 }
1023 /* method parser_prod#AModuledecl#n_kwmodule= for (self: Object, TKwmodule) */
1024 void VIRTUAL_parser_prod__AModuledecl__n_kwmodule_61d(val* self, val* p0) {
1025 parser_prod__AModuledecl__n_kwmodule_61d(self, p0); /* Direct call parser_prod#AModuledecl#n_kwmodule= on <self:Object(AModuledecl)>*/
1026 RET_LABEL:;
1027 }
1028 /* method parser_prod#AModuledecl#n_name= for (self: AModuledecl, AModuleName) */
1029 void parser_prod__AModuledecl__n_name_61d(val* self, val* p0) {
1030 val* var_node /* var node: AModuleName */;
1031 var_node = p0;
1032 self->attrs[COLOR_parser_nodes__AModuledecl___n_name].val = var_node; /* _n_name on <self:AModuledecl> */
1033 {
1034 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AModuleName> */
1035 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AModuleName> */
1036 RET_LABEL1:(void)0;
1037 }
1038 }
1039 RET_LABEL:;
1040 }
1041 /* method parser_prod#AModuledecl#n_name= for (self: Object, AModuleName) */
1042 void VIRTUAL_parser_prod__AModuledecl__n_name_61d(val* self, val* p0) {
1043 parser_prod__AModuledecl__n_name_61d(self, p0); /* Direct call parser_prod#AModuledecl#n_name= on <self:Object(AModuledecl)>*/
1044 RET_LABEL:;
1045 }
1046 /* method parser_prod#AModuledecl#n_annotations= for (self: AModuledecl, nullable AAnnotations) */
1047 void parser_prod__AModuledecl__n_annotations_61d(val* self, val* p0) {
1048 val* var_node /* var node: nullable AAnnotations */;
1049 val* var /* : null */;
1050 short int var1 /* : Bool */;
1051 short int var2 /* : Bool */;
1052 val* var_other /* var other: nullable Object */;
1053 short int var4 /* : Bool */;
1054 short int var5 /* : Bool */;
1055 short int var6 /* : Bool */;
1056 var_node = p0;
1057 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AModuledecl> */
1058 var = NULL;
1059 if (var_node == NULL) {
1060 var1 = 0; /* is null */
1061 } else {
1062 var1 = 1; /* arg is null and recv is not */
1063 }
1064 if (0) {
1065 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
1066 var_other = var;
1067 {
1068 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
1069 var4 = var5;
1070 }
1071 var6 = !var4;
1072 var2 = var6;
1073 goto RET_LABEL3;
1074 RET_LABEL3:(void)0;
1075 }
1076 var1 = var2;
1077 }
1078 if (var1){
1079 {
1080 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
1081 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
1082 RET_LABEL7:(void)0;
1083 }
1084 }
1085 } else {
1086 }
1087 RET_LABEL:;
1088 }
1089 /* method parser_prod#AModuledecl#n_annotations= for (self: Object, nullable AAnnotations) */
1090 void VIRTUAL_parser_prod__AModuledecl__n_annotations_61d(val* self, val* p0) {
1091 parser_prod__AModuledecl__n_annotations_61d(self, p0); /* Direct call parser_prod#AModuledecl#n_annotations= on <self:Object(AModuledecl)>*/
1092 RET_LABEL:;
1093 }
1094 /* method parser_prod#AModuledecl#visit_all for (self: AModuledecl, Visitor) */
1095 void parser_prod__AModuledecl__visit_all(val* self, val* p0) {
1096 val* var_v /* var v: Visitor */;
1097 val* var /* : nullable ADoc */;
1098 val* var1 /* : nullable TKwredef */;
1099 val* var2 /* : AVisibility */;
1100 val* var3 /* : TKwmodule */;
1101 val* var4 /* : AModuleName */;
1102 val* var5 /* : nullable AAnnotations */;
1103 var_v = p0;
1104 var = self->attrs[COLOR_parser_nodes__AModuledecl___n_doc].val; /* _n_doc on <self:AModuledecl> */
1105 {
1106 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1107 }
1108 var1 = self->attrs[COLOR_parser_nodes__AModuledecl___n_kwredef].val; /* _n_kwredef on <self:AModuledecl> */
1109 {
1110 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1111 }
1112 var2 = self->attrs[COLOR_parser_nodes__AModuledecl___n_visibility].val; /* _n_visibility on <self:AModuledecl> */
1113 if (unlikely(var2 == NULL)) {
1114 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_visibility");
1115 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 138);
1116 show_backtrace(1);
1117 }
1118 {
1119 parser_nodes__Visitor__enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1120 }
1121 var3 = self->attrs[COLOR_parser_nodes__AModuledecl___n_kwmodule].val; /* _n_kwmodule on <self:AModuledecl> */
1122 if (unlikely(var3 == NULL)) {
1123 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwmodule");
1124 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 139);
1125 show_backtrace(1);
1126 }
1127 {
1128 parser_nodes__Visitor__enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1129 }
1130 var4 = self->attrs[COLOR_parser_nodes__AModuledecl___n_name].val; /* _n_name on <self:AModuledecl> */
1131 if (unlikely(var4 == NULL)) {
1132 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_name");
1133 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 140);
1134 show_backtrace(1);
1135 }
1136 {
1137 parser_nodes__Visitor__enter_visit(var_v, var4); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1138 }
1139 var5 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AModuledecl> */
1140 {
1141 parser_nodes__Visitor__enter_visit(var_v, var5); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1142 }
1143 RET_LABEL:;
1144 }
1145 /* method parser_prod#AModuledecl#visit_all for (self: Object, Visitor) */
1146 void VIRTUAL_parser_prod__AModuledecl__visit_all(val* self, val* p0) {
1147 parser_prod__AModuledecl__visit_all(self, p0); /* Direct call parser_prod#AModuledecl#visit_all on <self:Object(AModuledecl)>*/
1148 RET_LABEL:;
1149 }
1150 /* method parser_prod#AStdImport#init_astdimport for (self: AStdImport, nullable AVisibility, nullable TKwimport, nullable AModuleName, nullable AAnnotations) */
1151 void parser_prod__AStdImport__init_astdimport(val* self, val* p0, val* p1, val* p2, val* p3) {
1152 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
1153 val* var_n_kwimport /* var n_kwimport: nullable TKwimport */;
1154 val* var_n_name /* var n_name: nullable AModuleName */;
1155 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
1156 val* var /* : null */;
1157 short int var4 /* : Bool */;
1158 short int var5 /* : Bool */;
1159 val* var_other /* var other: nullable Object */;
1160 short int var7 /* : Bool */;
1161 short int var8 /* : Bool */;
1162 short int var9 /* : Bool */;
1163 var_n_visibility = p0;
1164 var_n_kwimport = p1;
1165 var_n_name = p2;
1166 var_n_annotations = p3;
1167 if (unlikely(var_n_visibility == NULL)) {
1168 PRINT_ERROR("Runtime error: %s", "Cast failed");
1169 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 152);
1170 show_backtrace(1);
1171 }
1172 self->attrs[COLOR_parser_nodes__AStdImport___n_visibility].val = var_n_visibility; /* _n_visibility on <self:AStdImport> */
1173 if (var_n_visibility == NULL) {
1174 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1175 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 153);
1176 show_backtrace(1);
1177 } else {
1178 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
1179 if (unlikely(var_n_visibility == NULL)) {
1180 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1181 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
1182 show_backtrace(1);
1183 }
1184 var_n_visibility->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
1185 RET_LABEL1:(void)0;
1186 }
1187 }
1188 if (unlikely(var_n_kwimport == NULL)) {
1189 PRINT_ERROR("Runtime error: %s", "Cast failed");
1190 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 154);
1191 show_backtrace(1);
1192 }
1193 self->attrs[COLOR_parser_nodes__AStdImport___n_kwimport].val = var_n_kwimport; /* _n_kwimport on <self:AStdImport> */
1194 if (var_n_kwimport == NULL) {
1195 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1196 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 155);
1197 show_backtrace(1);
1198 } else {
1199 { /* Inline parser_nodes#ANode#parent= (var_n_kwimport,self) on <var_n_kwimport:nullable TKwimport> */
1200 if (unlikely(var_n_kwimport == NULL)) {
1201 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1202 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
1203 show_backtrace(1);
1204 }
1205 var_n_kwimport->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwimport:nullable TKwimport> */
1206 RET_LABEL2:(void)0;
1207 }
1208 }
1209 if (unlikely(var_n_name == NULL)) {
1210 PRINT_ERROR("Runtime error: %s", "Cast failed");
1211 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 156);
1212 show_backtrace(1);
1213 }
1214 self->attrs[COLOR_parser_nodes__AStdImport___n_name].val = var_n_name; /* _n_name on <self:AStdImport> */
1215 if (var_n_name == NULL) {
1216 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1217 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 157);
1218 show_backtrace(1);
1219 } else {
1220 { /* Inline parser_nodes#ANode#parent= (var_n_name,self) on <var_n_name:nullable AModuleName> */
1221 if (unlikely(var_n_name == NULL)) {
1222 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1223 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
1224 show_backtrace(1);
1225 }
1226 var_n_name->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_name:nullable AModuleName> */
1227 RET_LABEL3:(void)0;
1228 }
1229 }
1230 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AStdImport> */
1231 var = NULL;
1232 if (var_n_annotations == NULL) {
1233 var4 = 0; /* is null */
1234 } else {
1235 var4 = 1; /* arg is null and recv is not */
1236 }
1237 if (0) {
1238 { /* Inline kernel#Object#!= (var_n_annotations,var) on <var_n_annotations:nullable AAnnotations> */
1239 var_other = var;
1240 {
1241 var8 = ((short int (*)(val*, val*))(var_n_annotations->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
1242 var7 = var8;
1243 }
1244 var9 = !var7;
1245 var5 = var9;
1246 goto RET_LABEL6;
1247 RET_LABEL6:(void)0;
1248 }
1249 var4 = var5;
1250 }
1251 if (var4){
1252 {
1253 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
1254 var_n_annotations->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
1255 RET_LABEL10:(void)0;
1256 }
1257 }
1258 } else {
1259 }
1260 RET_LABEL:;
1261 }
1262 /* method parser_prod#AStdImport#init_astdimport for (self: Object, nullable AVisibility, nullable TKwimport, nullable AModuleName, nullable AAnnotations) */
1263 void VIRTUAL_parser_prod__AStdImport__init_astdimport(val* self, val* p0, val* p1, val* p2, val* p3) {
1264 parser_prod__AStdImport__init_astdimport(self, p0, p1, p2, p3); /* Direct call parser_prod#AStdImport#init_astdimport on <self:Object(AStdImport)>*/
1265 RET_LABEL:;
1266 }
1267 /* method parser_prod#AStdImport#replace_child for (self: AStdImport, ANode, nullable ANode) */
1268 void parser_prod__AStdImport__replace_child(val* self, val* p0, val* p1) {
1269 val* var_old_child /* var old_child: ANode */;
1270 val* var_new_child /* var new_child: nullable ANode */;
1271 val* var /* : AVisibility */;
1272 short int var1 /* : Bool */;
1273 short int var2 /* : Bool */;
1274 val* var_other /* var other: nullable Object */;
1275 short int var4 /* : Bool */;
1276 short int var6 /* : Bool */;
1277 short int var7 /* : Bool */;
1278 int cltype;
1279 int idtype;
1280 const char* var_class_name;
1281 val* var8 /* : TKwimport */;
1282 short int var9 /* : Bool */;
1283 short int var10 /* : Bool */;
1284 short int var12 /* : Bool */;
1285 short int var14 /* : Bool */;
1286 short int var15 /* : Bool */;
1287 int cltype16;
1288 int idtype17;
1289 const char* var_class_name18;
1290 val* var19 /* : AModuleName */;
1291 short int var20 /* : Bool */;
1292 short int var21 /* : Bool */;
1293 short int var23 /* : Bool */;
1294 short int var25 /* : Bool */;
1295 short int var26 /* : Bool */;
1296 int cltype27;
1297 int idtype28;
1298 const char* var_class_name29;
1299 val* var30 /* : nullable AAnnotations */;
1300 short int var31 /* : Bool */;
1301 short int var32 /* : Bool */;
1302 short int var34 /* : Bool */;
1303 short int var36 /* : Bool */;
1304 short int var37 /* : Bool */;
1305 int cltype38;
1306 int idtype39;
1307 const char* var_class_name40;
1308 var_old_child = p0;
1309 var_new_child = p1;
1310 var = self->attrs[COLOR_parser_nodes__AStdImport___n_visibility].val; /* _n_visibility on <self:AStdImport> */
1311 if (unlikely(var == NULL)) {
1312 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_visibility");
1313 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 164);
1314 show_backtrace(1);
1315 }
1316 {
1317 { /* Inline kernel#Object#== (var,var_old_child) on <var:AVisibility> */
1318 var_other = var_old_child;
1319 {
1320 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:AVisibility> */
1321 var6 = var == var_other;
1322 var4 = var6;
1323 goto RET_LABEL5;
1324 RET_LABEL5:(void)0;
1325 }
1326 }
1327 var2 = var4;
1328 goto RET_LABEL3;
1329 RET_LABEL3:(void)0;
1330 }
1331 var1 = var2;
1332 }
1333 if (var1){
1334 /* <var_new_child:nullable ANode> isa AVisibility */
1335 cltype = type_parser_nodes__AVisibility.color;
1336 idtype = type_parser_nodes__AVisibility.id;
1337 if(var_new_child == NULL) {
1338 var7 = 0;
1339 } else {
1340 if(cltype >= var_new_child->type->table_size) {
1341 var7 = 0;
1342 } else {
1343 var7 = var_new_child->type->type_table[cltype] == idtype;
1344 }
1345 }
1346 if (unlikely(!var7)) {
1347 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
1348 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name);
1349 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 165);
1350 show_backtrace(1);
1351 }
1352 {
1353 parser_prod__AStdImport__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#AStdImport#n_visibility= on <self:AStdImport>*/
1354 }
1355 goto RET_LABEL;
1356 } else {
1357 }
1358 var8 = self->attrs[COLOR_parser_nodes__AStdImport___n_kwimport].val; /* _n_kwimport on <self:AStdImport> */
1359 if (unlikely(var8 == NULL)) {
1360 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwimport");
1361 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 168);
1362 show_backtrace(1);
1363 }
1364 {
1365 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:TKwimport> */
1366 var_other = var_old_child;
1367 {
1368 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:TKwimport> */
1369 var14 = var8 == var_other;
1370 var12 = var14;
1371 goto RET_LABEL13;
1372 RET_LABEL13:(void)0;
1373 }
1374 }
1375 var10 = var12;
1376 goto RET_LABEL11;
1377 RET_LABEL11:(void)0;
1378 }
1379 var9 = var10;
1380 }
1381 if (var9){
1382 /* <var_new_child:nullable ANode> isa TKwimport */
1383 cltype16 = type_parser_nodes__TKwimport.color;
1384 idtype17 = type_parser_nodes__TKwimport.id;
1385 if(var_new_child == NULL) {
1386 var15 = 0;
1387 } else {
1388 if(cltype16 >= var_new_child->type->table_size) {
1389 var15 = 0;
1390 } else {
1391 var15 = var_new_child->type->type_table[cltype16] == idtype17;
1392 }
1393 }
1394 if (unlikely(!var15)) {
1395 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
1396 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwimport", var_class_name18);
1397 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 169);
1398 show_backtrace(1);
1399 }
1400 {
1401 parser_prod__AStdImport__n_kwimport_61d(self, var_new_child); /* Direct call parser_prod#AStdImport#n_kwimport= on <self:AStdImport>*/
1402 }
1403 goto RET_LABEL;
1404 } else {
1405 }
1406 var19 = self->attrs[COLOR_parser_nodes__AStdImport___n_name].val; /* _n_name on <self:AStdImport> */
1407 if (unlikely(var19 == NULL)) {
1408 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_name");
1409 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 172);
1410 show_backtrace(1);
1411 }
1412 {
1413 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:AModuleName> */
1414 var_other = var_old_child;
1415 {
1416 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:AModuleName> */
1417 var25 = var19 == var_other;
1418 var23 = var25;
1419 goto RET_LABEL24;
1420 RET_LABEL24:(void)0;
1421 }
1422 }
1423 var21 = var23;
1424 goto RET_LABEL22;
1425 RET_LABEL22:(void)0;
1426 }
1427 var20 = var21;
1428 }
1429 if (var20){
1430 /* <var_new_child:nullable ANode> isa AModuleName */
1431 cltype27 = type_parser_nodes__AModuleName.color;
1432 idtype28 = type_parser_nodes__AModuleName.id;
1433 if(var_new_child == NULL) {
1434 var26 = 0;
1435 } else {
1436 if(cltype27 >= var_new_child->type->table_size) {
1437 var26 = 0;
1438 } else {
1439 var26 = var_new_child->type->type_table[cltype27] == idtype28;
1440 }
1441 }
1442 if (unlikely(!var26)) {
1443 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
1444 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AModuleName", var_class_name29);
1445 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 173);
1446 show_backtrace(1);
1447 }
1448 {
1449 parser_prod__AStdImport__n_name_61d(self, var_new_child); /* Direct call parser_prod#AStdImport#n_name= on <self:AStdImport>*/
1450 }
1451 goto RET_LABEL;
1452 } else {
1453 }
1454 var30 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AStdImport> */
1455 if (var30 == NULL) {
1456 var31 = 0; /* <var_old_child:ANode> cannot be null */
1457 } else {
1458 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:nullable AAnnotations> */
1459 var_other = var_old_child;
1460 {
1461 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:nullable AAnnotations(AAnnotations)> */
1462 var36 = var30 == var_other;
1463 var34 = var36;
1464 goto RET_LABEL35;
1465 RET_LABEL35:(void)0;
1466 }
1467 }
1468 var32 = var34;
1469 goto RET_LABEL33;
1470 RET_LABEL33:(void)0;
1471 }
1472 var31 = var32;
1473 }
1474 if (var31){
1475 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
1476 cltype38 = type_nullable_parser_nodes__AAnnotations.color;
1477 idtype39 = type_nullable_parser_nodes__AAnnotations.id;
1478 if(var_new_child == NULL) {
1479 var37 = 1;
1480 } else {
1481 if(cltype38 >= var_new_child->type->table_size) {
1482 var37 = 0;
1483 } else {
1484 var37 = var_new_child->type->type_table[cltype38] == idtype39;
1485 }
1486 }
1487 if (unlikely(!var37)) {
1488 var_class_name40 = var_new_child == NULL ? "null" : var_new_child->type->name;
1489 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name40);
1490 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 177);
1491 show_backtrace(1);
1492 }
1493 {
1494 parser_prod__AStdImport__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AStdImport#n_annotations= on <self:AStdImport>*/
1495 }
1496 goto RET_LABEL;
1497 } else {
1498 }
1499 RET_LABEL:;
1500 }
1501 /* method parser_prod#AStdImport#replace_child for (self: Object, ANode, nullable ANode) */
1502 void VIRTUAL_parser_prod__AStdImport__replace_child(val* self, val* p0, val* p1) {
1503 parser_prod__AStdImport__replace_child(self, p0, p1); /* Direct call parser_prod#AStdImport#replace_child on <self:Object(AStdImport)>*/
1504 RET_LABEL:;
1505 }
1506 /* method parser_prod#AStdImport#n_visibility= for (self: AStdImport, AVisibility) */
1507 void parser_prod__AStdImport__n_visibility_61d(val* self, val* p0) {
1508 val* var_node /* var node: AVisibility */;
1509 var_node = p0;
1510 self->attrs[COLOR_parser_nodes__AStdImport___n_visibility].val = var_node; /* _n_visibility on <self:AStdImport> */
1511 {
1512 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AVisibility> */
1513 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AVisibility> */
1514 RET_LABEL1:(void)0;
1515 }
1516 }
1517 RET_LABEL:;
1518 }
1519 /* method parser_prod#AStdImport#n_visibility= for (self: Object, AVisibility) */
1520 void VIRTUAL_parser_prod__AStdImport__n_visibility_61d(val* self, val* p0) {
1521 parser_prod__AStdImport__n_visibility_61d(self, p0); /* Direct call parser_prod#AStdImport#n_visibility= on <self:Object(AStdImport)>*/
1522 RET_LABEL:;
1523 }
1524 /* method parser_prod#AStdImport#n_kwimport= for (self: AStdImport, TKwimport) */
1525 void parser_prod__AStdImport__n_kwimport_61d(val* self, val* p0) {
1526 val* var_node /* var node: TKwimport */;
1527 var_node = p0;
1528 self->attrs[COLOR_parser_nodes__AStdImport___n_kwimport].val = var_node; /* _n_kwimport on <self:AStdImport> */
1529 {
1530 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwimport> */
1531 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwimport> */
1532 RET_LABEL1:(void)0;
1533 }
1534 }
1535 RET_LABEL:;
1536 }
1537 /* method parser_prod#AStdImport#n_kwimport= for (self: Object, TKwimport) */
1538 void VIRTUAL_parser_prod__AStdImport__n_kwimport_61d(val* self, val* p0) {
1539 parser_prod__AStdImport__n_kwimport_61d(self, p0); /* Direct call parser_prod#AStdImport#n_kwimport= on <self:Object(AStdImport)>*/
1540 RET_LABEL:;
1541 }
1542 /* method parser_prod#AStdImport#n_name= for (self: AStdImport, AModuleName) */
1543 void parser_prod__AStdImport__n_name_61d(val* self, val* p0) {
1544 val* var_node /* var node: AModuleName */;
1545 var_node = p0;
1546 self->attrs[COLOR_parser_nodes__AStdImport___n_name].val = var_node; /* _n_name on <self:AStdImport> */
1547 {
1548 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AModuleName> */
1549 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AModuleName> */
1550 RET_LABEL1:(void)0;
1551 }
1552 }
1553 RET_LABEL:;
1554 }
1555 /* method parser_prod#AStdImport#n_name= for (self: Object, AModuleName) */
1556 void VIRTUAL_parser_prod__AStdImport__n_name_61d(val* self, val* p0) {
1557 parser_prod__AStdImport__n_name_61d(self, p0); /* Direct call parser_prod#AStdImport#n_name= on <self:Object(AStdImport)>*/
1558 RET_LABEL:;
1559 }
1560 /* method parser_prod#AStdImport#n_annotations= for (self: AStdImport, nullable AAnnotations) */
1561 void parser_prod__AStdImport__n_annotations_61d(val* self, val* p0) {
1562 val* var_node /* var node: nullable AAnnotations */;
1563 val* var /* : null */;
1564 short int var1 /* : Bool */;
1565 short int var2 /* : Bool */;
1566 val* var_other /* var other: nullable Object */;
1567 short int var4 /* : Bool */;
1568 short int var5 /* : Bool */;
1569 short int var6 /* : Bool */;
1570 var_node = p0;
1571 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AStdImport> */
1572 var = NULL;
1573 if (var_node == NULL) {
1574 var1 = 0; /* is null */
1575 } else {
1576 var1 = 1; /* arg is null and recv is not */
1577 }
1578 if (0) {
1579 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
1580 var_other = var;
1581 {
1582 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
1583 var4 = var5;
1584 }
1585 var6 = !var4;
1586 var2 = var6;
1587 goto RET_LABEL3;
1588 RET_LABEL3:(void)0;
1589 }
1590 var1 = var2;
1591 }
1592 if (var1){
1593 {
1594 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
1595 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
1596 RET_LABEL7:(void)0;
1597 }
1598 }
1599 } else {
1600 }
1601 RET_LABEL:;
1602 }
1603 /* method parser_prod#AStdImport#n_annotations= for (self: Object, nullable AAnnotations) */
1604 void VIRTUAL_parser_prod__AStdImport__n_annotations_61d(val* self, val* p0) {
1605 parser_prod__AStdImport__n_annotations_61d(self, p0); /* Direct call parser_prod#AStdImport#n_annotations= on <self:Object(AStdImport)>*/
1606 RET_LABEL:;
1607 }
1608 /* method parser_prod#AStdImport#visit_all for (self: AStdImport, Visitor) */
1609 void parser_prod__AStdImport__visit_all(val* self, val* p0) {
1610 val* var_v /* var v: Visitor */;
1611 val* var /* : AVisibility */;
1612 val* var1 /* : TKwimport */;
1613 val* var2 /* : AModuleName */;
1614 val* var3 /* : nullable AAnnotations */;
1615 var_v = p0;
1616 var = self->attrs[COLOR_parser_nodes__AStdImport___n_visibility].val; /* _n_visibility on <self:AStdImport> */
1617 if (unlikely(var == NULL)) {
1618 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_visibility");
1619 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 206);
1620 show_backtrace(1);
1621 }
1622 {
1623 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1624 }
1625 var1 = self->attrs[COLOR_parser_nodes__AStdImport___n_kwimport].val; /* _n_kwimport on <self:AStdImport> */
1626 if (unlikely(var1 == NULL)) {
1627 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwimport");
1628 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 207);
1629 show_backtrace(1);
1630 }
1631 {
1632 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1633 }
1634 var2 = self->attrs[COLOR_parser_nodes__AStdImport___n_name].val; /* _n_name on <self:AStdImport> */
1635 if (unlikely(var2 == NULL)) {
1636 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_name");
1637 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 208);
1638 show_backtrace(1);
1639 }
1640 {
1641 parser_nodes__Visitor__enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1642 }
1643 var3 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AStdImport> */
1644 {
1645 parser_nodes__Visitor__enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1646 }
1647 RET_LABEL:;
1648 }
1649 /* method parser_prod#AStdImport#visit_all for (self: Object, Visitor) */
1650 void VIRTUAL_parser_prod__AStdImport__visit_all(val* self, val* p0) {
1651 parser_prod__AStdImport__visit_all(self, p0); /* Direct call parser_prod#AStdImport#visit_all on <self:Object(AStdImport)>*/
1652 RET_LABEL:;
1653 }
1654 /* method parser_prod#ANoImport#init_anoimport for (self: ANoImport, nullable AVisibility, nullable TKwimport, nullable TKwend) */
1655 void parser_prod__ANoImport__init_anoimport(val* self, val* p0, val* p1, val* p2) {
1656 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
1657 val* var_n_kwimport /* var n_kwimport: nullable TKwimport */;
1658 val* var_n_kwend /* var n_kwend: nullable TKwend */;
1659 var_n_visibility = p0;
1660 var_n_kwimport = p1;
1661 var_n_kwend = p2;
1662 if (unlikely(var_n_visibility == NULL)) {
1663 PRINT_ERROR("Runtime error: %s", "Cast failed");
1664 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 219);
1665 show_backtrace(1);
1666 }
1667 self->attrs[COLOR_parser_nodes__ANoImport___n_visibility].val = var_n_visibility; /* _n_visibility on <self:ANoImport> */
1668 if (var_n_visibility == NULL) {
1669 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1670 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 220);
1671 show_backtrace(1);
1672 } else {
1673 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
1674 if (unlikely(var_n_visibility == NULL)) {
1675 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1676 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
1677 show_backtrace(1);
1678 }
1679 var_n_visibility->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
1680 RET_LABEL1:(void)0;
1681 }
1682 }
1683 if (unlikely(var_n_kwimport == NULL)) {
1684 PRINT_ERROR("Runtime error: %s", "Cast failed");
1685 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 221);
1686 show_backtrace(1);
1687 }
1688 self->attrs[COLOR_parser_nodes__ANoImport___n_kwimport].val = var_n_kwimport; /* _n_kwimport on <self:ANoImport> */
1689 if (var_n_kwimport == NULL) {
1690 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1691 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 222);
1692 show_backtrace(1);
1693 } else {
1694 { /* Inline parser_nodes#ANode#parent= (var_n_kwimport,self) on <var_n_kwimport:nullable TKwimport> */
1695 if (unlikely(var_n_kwimport == NULL)) {
1696 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1697 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
1698 show_backtrace(1);
1699 }
1700 var_n_kwimport->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwimport:nullable TKwimport> */
1701 RET_LABEL2:(void)0;
1702 }
1703 }
1704 if (unlikely(var_n_kwend == NULL)) {
1705 PRINT_ERROR("Runtime error: %s", "Cast failed");
1706 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 223);
1707 show_backtrace(1);
1708 }
1709 self->attrs[COLOR_parser_nodes__ANoImport___n_kwend].val = var_n_kwend; /* _n_kwend on <self:ANoImport> */
1710 if (var_n_kwend == NULL) {
1711 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1712 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 224);
1713 show_backtrace(1);
1714 } else {
1715 { /* Inline parser_nodes#ANode#parent= (var_n_kwend,self) on <var_n_kwend:nullable TKwend> */
1716 if (unlikely(var_n_kwend == NULL)) {
1717 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1718 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
1719 show_backtrace(1);
1720 }
1721 var_n_kwend->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwend:nullable TKwend> */
1722 RET_LABEL3:(void)0;
1723 }
1724 }
1725 RET_LABEL:;
1726 }
1727 /* method parser_prod#ANoImport#init_anoimport for (self: Object, nullable AVisibility, nullable TKwimport, nullable TKwend) */
1728 void VIRTUAL_parser_prod__ANoImport__init_anoimport(val* self, val* p0, val* p1, val* p2) {
1729 parser_prod__ANoImport__init_anoimport(self, p0, p1, p2); /* Direct call parser_prod#ANoImport#init_anoimport on <self:Object(ANoImport)>*/
1730 RET_LABEL:;
1731 }
1732 /* method parser_prod#ANoImport#replace_child for (self: ANoImport, ANode, nullable ANode) */
1733 void parser_prod__ANoImport__replace_child(val* self, val* p0, val* p1) {
1734 val* var_old_child /* var old_child: ANode */;
1735 val* var_new_child /* var new_child: nullable ANode */;
1736 val* var /* : AVisibility */;
1737 short int var1 /* : Bool */;
1738 short int var2 /* : Bool */;
1739 val* var_other /* var other: nullable Object */;
1740 short int var4 /* : Bool */;
1741 short int var6 /* : Bool */;
1742 short int var7 /* : Bool */;
1743 int cltype;
1744 int idtype;
1745 const char* var_class_name;
1746 val* var8 /* : TKwimport */;
1747 short int var9 /* : Bool */;
1748 short int var10 /* : Bool */;
1749 short int var12 /* : Bool */;
1750 short int var14 /* : Bool */;
1751 short int var15 /* : Bool */;
1752 int cltype16;
1753 int idtype17;
1754 const char* var_class_name18;
1755 val* var19 /* : TKwend */;
1756 short int var20 /* : Bool */;
1757 short int var21 /* : Bool */;
1758 short int var23 /* : Bool */;
1759 short int var25 /* : Bool */;
1760 short int var26 /* : Bool */;
1761 int cltype27;
1762 int idtype28;
1763 const char* var_class_name29;
1764 var_old_child = p0;
1765 var_new_child = p1;
1766 var = self->attrs[COLOR_parser_nodes__ANoImport___n_visibility].val; /* _n_visibility on <self:ANoImport> */
1767 if (unlikely(var == NULL)) {
1768 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_visibility");
1769 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 229);
1770 show_backtrace(1);
1771 }
1772 {
1773 { /* Inline kernel#Object#== (var,var_old_child) on <var:AVisibility> */
1774 var_other = var_old_child;
1775 {
1776 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:AVisibility> */
1777 var6 = var == var_other;
1778 var4 = var6;
1779 goto RET_LABEL5;
1780 RET_LABEL5:(void)0;
1781 }
1782 }
1783 var2 = var4;
1784 goto RET_LABEL3;
1785 RET_LABEL3:(void)0;
1786 }
1787 var1 = var2;
1788 }
1789 if (var1){
1790 /* <var_new_child:nullable ANode> isa AVisibility */
1791 cltype = type_parser_nodes__AVisibility.color;
1792 idtype = type_parser_nodes__AVisibility.id;
1793 if(var_new_child == NULL) {
1794 var7 = 0;
1795 } else {
1796 if(cltype >= var_new_child->type->table_size) {
1797 var7 = 0;
1798 } else {
1799 var7 = var_new_child->type->type_table[cltype] == idtype;
1800 }
1801 }
1802 if (unlikely(!var7)) {
1803 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
1804 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name);
1805 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 230);
1806 show_backtrace(1);
1807 }
1808 {
1809 parser_prod__ANoImport__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#ANoImport#n_visibility= on <self:ANoImport>*/
1810 }
1811 goto RET_LABEL;
1812 } else {
1813 }
1814 var8 = self->attrs[COLOR_parser_nodes__ANoImport___n_kwimport].val; /* _n_kwimport on <self:ANoImport> */
1815 if (unlikely(var8 == NULL)) {
1816 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwimport");
1817 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 233);
1818 show_backtrace(1);
1819 }
1820 {
1821 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:TKwimport> */
1822 var_other = var_old_child;
1823 {
1824 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:TKwimport> */
1825 var14 = var8 == var_other;
1826 var12 = var14;
1827 goto RET_LABEL13;
1828 RET_LABEL13:(void)0;
1829 }
1830 }
1831 var10 = var12;
1832 goto RET_LABEL11;
1833 RET_LABEL11:(void)0;
1834 }
1835 var9 = var10;
1836 }
1837 if (var9){
1838 /* <var_new_child:nullable ANode> isa TKwimport */
1839 cltype16 = type_parser_nodes__TKwimport.color;
1840 idtype17 = type_parser_nodes__TKwimport.id;
1841 if(var_new_child == NULL) {
1842 var15 = 0;
1843 } else {
1844 if(cltype16 >= var_new_child->type->table_size) {
1845 var15 = 0;
1846 } else {
1847 var15 = var_new_child->type->type_table[cltype16] == idtype17;
1848 }
1849 }
1850 if (unlikely(!var15)) {
1851 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
1852 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwimport", var_class_name18);
1853 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 234);
1854 show_backtrace(1);
1855 }
1856 {
1857 parser_prod__ANoImport__n_kwimport_61d(self, var_new_child); /* Direct call parser_prod#ANoImport#n_kwimport= on <self:ANoImport>*/
1858 }
1859 goto RET_LABEL;
1860 } else {
1861 }
1862 var19 = self->attrs[COLOR_parser_nodes__ANoImport___n_kwend].val; /* _n_kwend on <self:ANoImport> */
1863 if (unlikely(var19 == NULL)) {
1864 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwend");
1865 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 237);
1866 show_backtrace(1);
1867 }
1868 {
1869 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:TKwend> */
1870 var_other = var_old_child;
1871 {
1872 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:TKwend> */
1873 var25 = var19 == var_other;
1874 var23 = var25;
1875 goto RET_LABEL24;
1876 RET_LABEL24:(void)0;
1877 }
1878 }
1879 var21 = var23;
1880 goto RET_LABEL22;
1881 RET_LABEL22:(void)0;
1882 }
1883 var20 = var21;
1884 }
1885 if (var20){
1886 /* <var_new_child:nullable ANode> isa TKwend */
1887 cltype27 = type_parser_nodes__TKwend.color;
1888 idtype28 = type_parser_nodes__TKwend.id;
1889 if(var_new_child == NULL) {
1890 var26 = 0;
1891 } else {
1892 if(cltype27 >= var_new_child->type->table_size) {
1893 var26 = 0;
1894 } else {
1895 var26 = var_new_child->type->type_table[cltype27] == idtype28;
1896 }
1897 }
1898 if (unlikely(!var26)) {
1899 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
1900 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwend", var_class_name29);
1901 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 238);
1902 show_backtrace(1);
1903 }
1904 {
1905 parser_prod__ANoImport__n_kwend_61d(self, var_new_child); /* Direct call parser_prod#ANoImport#n_kwend= on <self:ANoImport>*/
1906 }
1907 goto RET_LABEL;
1908 } else {
1909 }
1910 RET_LABEL:;
1911 }
1912 /* method parser_prod#ANoImport#replace_child for (self: Object, ANode, nullable ANode) */
1913 void VIRTUAL_parser_prod__ANoImport__replace_child(val* self, val* p0, val* p1) {
1914 parser_prod__ANoImport__replace_child(self, p0, p1); /* Direct call parser_prod#ANoImport#replace_child on <self:Object(ANoImport)>*/
1915 RET_LABEL:;
1916 }
1917 /* method parser_prod#ANoImport#n_visibility= for (self: ANoImport, AVisibility) */
1918 void parser_prod__ANoImport__n_visibility_61d(val* self, val* p0) {
1919 val* var_node /* var node: AVisibility */;
1920 var_node = p0;
1921 self->attrs[COLOR_parser_nodes__ANoImport___n_visibility].val = var_node; /* _n_visibility on <self:ANoImport> */
1922 {
1923 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AVisibility> */
1924 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AVisibility> */
1925 RET_LABEL1:(void)0;
1926 }
1927 }
1928 RET_LABEL:;
1929 }
1930 /* method parser_prod#ANoImport#n_visibility= for (self: Object, AVisibility) */
1931 void VIRTUAL_parser_prod__ANoImport__n_visibility_61d(val* self, val* p0) {
1932 parser_prod__ANoImport__n_visibility_61d(self, p0); /* Direct call parser_prod#ANoImport#n_visibility= on <self:Object(ANoImport)>*/
1933 RET_LABEL:;
1934 }
1935 /* method parser_prod#ANoImport#n_kwimport= for (self: ANoImport, TKwimport) */
1936 void parser_prod__ANoImport__n_kwimport_61d(val* self, val* p0) {
1937 val* var_node /* var node: TKwimport */;
1938 var_node = p0;
1939 self->attrs[COLOR_parser_nodes__ANoImport___n_kwimport].val = var_node; /* _n_kwimport on <self:ANoImport> */
1940 {
1941 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwimport> */
1942 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwimport> */
1943 RET_LABEL1:(void)0;
1944 }
1945 }
1946 RET_LABEL:;
1947 }
1948 /* method parser_prod#ANoImport#n_kwimport= for (self: Object, TKwimport) */
1949 void VIRTUAL_parser_prod__ANoImport__n_kwimport_61d(val* self, val* p0) {
1950 parser_prod__ANoImport__n_kwimport_61d(self, p0); /* Direct call parser_prod#ANoImport#n_kwimport= on <self:Object(ANoImport)>*/
1951 RET_LABEL:;
1952 }
1953 /* method parser_prod#ANoImport#n_kwend= for (self: ANoImport, TKwend) */
1954 void parser_prod__ANoImport__n_kwend_61d(val* self, val* p0) {
1955 val* var_node /* var node: TKwend */;
1956 var_node = p0;
1957 self->attrs[COLOR_parser_nodes__ANoImport___n_kwend].val = var_node; /* _n_kwend on <self:ANoImport> */
1958 {
1959 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwend> */
1960 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwend> */
1961 RET_LABEL1:(void)0;
1962 }
1963 }
1964 RET_LABEL:;
1965 }
1966 /* method parser_prod#ANoImport#n_kwend= for (self: Object, TKwend) */
1967 void VIRTUAL_parser_prod__ANoImport__n_kwend_61d(val* self, val* p0) {
1968 parser_prod__ANoImport__n_kwend_61d(self, p0); /* Direct call parser_prod#ANoImport#n_kwend= on <self:Object(ANoImport)>*/
1969 RET_LABEL:;
1970 }
1971 /* method parser_prod#ANoImport#visit_all for (self: ANoImport, Visitor) */
1972 void parser_prod__ANoImport__visit_all(val* self, val* p0) {
1973 val* var_v /* var v: Visitor */;
1974 val* var /* : AVisibility */;
1975 val* var1 /* : TKwimport */;
1976 val* var2 /* : TKwend */;
1977 var_v = p0;
1978 var = self->attrs[COLOR_parser_nodes__ANoImport___n_visibility].val; /* _n_visibility on <self:ANoImport> */
1979 if (unlikely(var == NULL)) {
1980 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_visibility");
1981 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 262);
1982 show_backtrace(1);
1983 }
1984 {
1985 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1986 }
1987 var1 = self->attrs[COLOR_parser_nodes__ANoImport___n_kwimport].val; /* _n_kwimport on <self:ANoImport> */
1988 if (unlikely(var1 == NULL)) {
1989 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwimport");
1990 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 263);
1991 show_backtrace(1);
1992 }
1993 {
1994 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1995 }
1996 var2 = self->attrs[COLOR_parser_nodes__ANoImport___n_kwend].val; /* _n_kwend on <self:ANoImport> */
1997 if (unlikely(var2 == NULL)) {
1998 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwend");
1999 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 264);
2000 show_backtrace(1);
2001 }
2002 {
2003 parser_nodes__Visitor__enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2004 }
2005 RET_LABEL:;
2006 }
2007 /* method parser_prod#ANoImport#visit_all for (self: Object, Visitor) */
2008 void VIRTUAL_parser_prod__ANoImport__visit_all(val* self, val* p0) {
2009 parser_prod__ANoImport__visit_all(self, p0); /* Direct call parser_prod#ANoImport#visit_all on <self:Object(ANoImport)>*/
2010 RET_LABEL:;
2011 }
2012 /* method parser_prod#APublicVisibility#init_apublicvisibility for (self: APublicVisibility, nullable TKwpublic) */
2013 void parser_prod__APublicVisibility__init_apublicvisibility(val* self, val* p0) {
2014 val* var_n_kwpublic /* var n_kwpublic: nullable TKwpublic */;
2015 val* var /* : null */;
2016 short int var1 /* : Bool */;
2017 short int var2 /* : Bool */;
2018 val* var_other /* var other: nullable Object */;
2019 short int var4 /* : Bool */;
2020 short int var5 /* : Bool */;
2021 short int var6 /* : Bool */;
2022 var_n_kwpublic = p0;
2023 self->attrs[COLOR_parser_nodes__APublicVisibility___n_kwpublic].val = var_n_kwpublic; /* _n_kwpublic on <self:APublicVisibility> */
2024 var = NULL;
2025 if (var_n_kwpublic == NULL) {
2026 var1 = 0; /* is null */
2027 } else {
2028 var1 = 1; /* arg is null and recv is not */
2029 }
2030 if (0) {
2031 { /* Inline kernel#Object#!= (var_n_kwpublic,var) on <var_n_kwpublic:nullable TKwpublic> */
2032 var_other = var;
2033 {
2034 var5 = ((short int (*)(val*, val*))(var_n_kwpublic->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_kwpublic, var_other) /* == on <var_n_kwpublic:nullable TKwpublic(TKwpublic)>*/;
2035 var4 = var5;
2036 }
2037 var6 = !var4;
2038 var2 = var6;
2039 goto RET_LABEL3;
2040 RET_LABEL3:(void)0;
2041 }
2042 var1 = var2;
2043 }
2044 if (var1){
2045 {
2046 { /* Inline parser_nodes#ANode#parent= (var_n_kwpublic,self) on <var_n_kwpublic:nullable TKwpublic(TKwpublic)> */
2047 var_n_kwpublic->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwpublic:nullable TKwpublic(TKwpublic)> */
2048 RET_LABEL7:(void)0;
2049 }
2050 }
2051 } else {
2052 }
2053 RET_LABEL:;
2054 }
2055 /* method parser_prod#APublicVisibility#init_apublicvisibility for (self: Object, nullable TKwpublic) */
2056 void VIRTUAL_parser_prod__APublicVisibility__init_apublicvisibility(val* self, val* p0) {
2057 parser_prod__APublicVisibility__init_apublicvisibility(self, p0); /* Direct call parser_prod#APublicVisibility#init_apublicvisibility on <self:Object(APublicVisibility)>*/
2058 RET_LABEL:;
2059 }
2060 /* method parser_prod#APublicVisibility#replace_child for (self: APublicVisibility, ANode, nullable ANode) */
2061 void parser_prod__APublicVisibility__replace_child(val* self, val* p0, val* p1) {
2062 val* var_old_child /* var old_child: ANode */;
2063 val* var_new_child /* var new_child: nullable ANode */;
2064 val* var /* : nullable TKwpublic */;
2065 short int var1 /* : Bool */;
2066 short int var2 /* : Bool */;
2067 val* var_other /* var other: nullable Object */;
2068 short int var4 /* : Bool */;
2069 short int var6 /* : Bool */;
2070 short int var7 /* : Bool */;
2071 int cltype;
2072 int idtype;
2073 const char* var_class_name;
2074 var_old_child = p0;
2075 var_new_child = p1;
2076 var = self->attrs[COLOR_parser_nodes__APublicVisibility___n_kwpublic].val; /* _n_kwpublic on <self:APublicVisibility> */
2077 if (var == NULL) {
2078 var1 = 0; /* <var_old_child:ANode> cannot be null */
2079 } else {
2080 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable TKwpublic> */
2081 var_other = var_old_child;
2082 {
2083 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable TKwpublic(TKwpublic)> */
2084 var6 = var == var_other;
2085 var4 = var6;
2086 goto RET_LABEL5;
2087 RET_LABEL5:(void)0;
2088 }
2089 }
2090 var2 = var4;
2091 goto RET_LABEL3;
2092 RET_LABEL3:(void)0;
2093 }
2094 var1 = var2;
2095 }
2096 if (var1){
2097 /* <var_new_child:nullable ANode> isa nullable TKwpublic */
2098 cltype = type_nullable_parser_nodes__TKwpublic.color;
2099 idtype = type_nullable_parser_nodes__TKwpublic.id;
2100 if(var_new_child == NULL) {
2101 var7 = 1;
2102 } else {
2103 if(cltype >= var_new_child->type->table_size) {
2104 var7 = 0;
2105 } else {
2106 var7 = var_new_child->type->type_table[cltype] == idtype;
2107 }
2108 }
2109 if (unlikely(!var7)) {
2110 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
2111 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwpublic", var_class_name);
2112 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 279);
2113 show_backtrace(1);
2114 }
2115 {
2116 parser_prod__APublicVisibility__n_kwpublic_61d(self, var_new_child); /* Direct call parser_prod#APublicVisibility#n_kwpublic= on <self:APublicVisibility>*/
2117 }
2118 goto RET_LABEL;
2119 } else {
2120 }
2121 RET_LABEL:;
2122 }
2123 /* method parser_prod#APublicVisibility#replace_child for (self: Object, ANode, nullable ANode) */
2124 void VIRTUAL_parser_prod__APublicVisibility__replace_child(val* self, val* p0, val* p1) {
2125 parser_prod__APublicVisibility__replace_child(self, p0, p1); /* Direct call parser_prod#APublicVisibility#replace_child on <self:Object(APublicVisibility)>*/
2126 RET_LABEL:;
2127 }
2128 /* method parser_prod#APublicVisibility#n_kwpublic= for (self: APublicVisibility, nullable TKwpublic) */
2129 void parser_prod__APublicVisibility__n_kwpublic_61d(val* self, val* p0) {
2130 val* var_node /* var node: nullable TKwpublic */;
2131 val* var /* : null */;
2132 short int var1 /* : Bool */;
2133 short int var2 /* : Bool */;
2134 val* var_other /* var other: nullable Object */;
2135 short int var4 /* : Bool */;
2136 short int var5 /* : Bool */;
2137 short int var6 /* : Bool */;
2138 var_node = p0;
2139 self->attrs[COLOR_parser_nodes__APublicVisibility___n_kwpublic].val = var_node; /* _n_kwpublic on <self:APublicVisibility> */
2140 var = NULL;
2141 if (var_node == NULL) {
2142 var1 = 0; /* is null */
2143 } else {
2144 var1 = 1; /* arg is null and recv is not */
2145 }
2146 if (0) {
2147 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwpublic> */
2148 var_other = var;
2149 {
2150 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwpublic(TKwpublic)>*/;
2151 var4 = var5;
2152 }
2153 var6 = !var4;
2154 var2 = var6;
2155 goto RET_LABEL3;
2156 RET_LABEL3:(void)0;
2157 }
2158 var1 = var2;
2159 }
2160 if (var1){
2161 {
2162 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwpublic(TKwpublic)> */
2163 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwpublic(TKwpublic)> */
2164 RET_LABEL7:(void)0;
2165 }
2166 }
2167 } else {
2168 }
2169 RET_LABEL:;
2170 }
2171 /* method parser_prod#APublicVisibility#n_kwpublic= for (self: Object, nullable TKwpublic) */
2172 void VIRTUAL_parser_prod__APublicVisibility__n_kwpublic_61d(val* self, val* p0) {
2173 parser_prod__APublicVisibility__n_kwpublic_61d(self, p0); /* Direct call parser_prod#APublicVisibility#n_kwpublic= on <self:Object(APublicVisibility)>*/
2174 RET_LABEL:;
2175 }
2176 /* method parser_prod#APublicVisibility#visit_all for (self: APublicVisibility, Visitor) */
2177 void parser_prod__APublicVisibility__visit_all(val* self, val* p0) {
2178 val* var_v /* var v: Visitor */;
2179 val* var /* : nullable TKwpublic */;
2180 var_v = p0;
2181 var = self->attrs[COLOR_parser_nodes__APublicVisibility___n_kwpublic].val; /* _n_kwpublic on <self:APublicVisibility> */
2182 {
2183 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2184 }
2185 RET_LABEL:;
2186 }
2187 /* method parser_prod#APublicVisibility#visit_all for (self: Object, Visitor) */
2188 void VIRTUAL_parser_prod__APublicVisibility__visit_all(val* self, val* p0) {
2189 parser_prod__APublicVisibility__visit_all(self, p0); /* Direct call parser_prod#APublicVisibility#visit_all on <self:Object(APublicVisibility)>*/
2190 RET_LABEL:;
2191 }
2192 /* method parser_prod#APrivateVisibility#init_aprivatevisibility for (self: APrivateVisibility, nullable TKwprivate) */
2193 void parser_prod__APrivateVisibility__init_aprivatevisibility(val* self, val* p0) {
2194 val* var_n_kwprivate /* var n_kwprivate: nullable TKwprivate */;
2195 var_n_kwprivate = p0;
2196 if (unlikely(var_n_kwprivate == NULL)) {
2197 PRINT_ERROR("Runtime error: %s", "Cast failed");
2198 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 301);
2199 show_backtrace(1);
2200 }
2201 self->attrs[COLOR_parser_nodes__APrivateVisibility___n_kwprivate].val = var_n_kwprivate; /* _n_kwprivate on <self:APrivateVisibility> */
2202 if (var_n_kwprivate == NULL) {
2203 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2204 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 302);
2205 show_backtrace(1);
2206 } else {
2207 { /* Inline parser_nodes#ANode#parent= (var_n_kwprivate,self) on <var_n_kwprivate:nullable TKwprivate> */
2208 if (unlikely(var_n_kwprivate == NULL)) {
2209 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2210 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
2211 show_backtrace(1);
2212 }
2213 var_n_kwprivate->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwprivate:nullable TKwprivate> */
2214 RET_LABEL1:(void)0;
2215 }
2216 }
2217 RET_LABEL:;
2218 }
2219 /* method parser_prod#APrivateVisibility#init_aprivatevisibility for (self: Object, nullable TKwprivate) */
2220 void VIRTUAL_parser_prod__APrivateVisibility__init_aprivatevisibility(val* self, val* p0) {
2221 parser_prod__APrivateVisibility__init_aprivatevisibility(self, p0); /* Direct call parser_prod#APrivateVisibility#init_aprivatevisibility on <self:Object(APrivateVisibility)>*/
2222 RET_LABEL:;
2223 }
2224 /* method parser_prod#APrivateVisibility#replace_child for (self: APrivateVisibility, ANode, nullable ANode) */
2225 void parser_prod__APrivateVisibility__replace_child(val* self, val* p0, val* p1) {
2226 val* var_old_child /* var old_child: ANode */;
2227 val* var_new_child /* var new_child: nullable ANode */;
2228 val* var /* : TKwprivate */;
2229 short int var1 /* : Bool */;
2230 short int var2 /* : Bool */;
2231 val* var_other /* var other: nullable Object */;
2232 short int var4 /* : Bool */;
2233 short int var6 /* : Bool */;
2234 short int var7 /* : Bool */;
2235 int cltype;
2236 int idtype;
2237 const char* var_class_name;
2238 var_old_child = p0;
2239 var_new_child = p1;
2240 var = self->attrs[COLOR_parser_nodes__APrivateVisibility___n_kwprivate].val; /* _n_kwprivate on <self:APrivateVisibility> */
2241 if (unlikely(var == NULL)) {
2242 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwprivate");
2243 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 307);
2244 show_backtrace(1);
2245 }
2246 {
2247 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwprivate> */
2248 var_other = var_old_child;
2249 {
2250 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwprivate> */
2251 var6 = var == var_other;
2252 var4 = var6;
2253 goto RET_LABEL5;
2254 RET_LABEL5:(void)0;
2255 }
2256 }
2257 var2 = var4;
2258 goto RET_LABEL3;
2259 RET_LABEL3:(void)0;
2260 }
2261 var1 = var2;
2262 }
2263 if (var1){
2264 /* <var_new_child:nullable ANode> isa TKwprivate */
2265 cltype = type_parser_nodes__TKwprivate.color;
2266 idtype = type_parser_nodes__TKwprivate.id;
2267 if(var_new_child == NULL) {
2268 var7 = 0;
2269 } else {
2270 if(cltype >= var_new_child->type->table_size) {
2271 var7 = 0;
2272 } else {
2273 var7 = var_new_child->type->type_table[cltype] == idtype;
2274 }
2275 }
2276 if (unlikely(!var7)) {
2277 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
2278 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwprivate", var_class_name);
2279 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 308);
2280 show_backtrace(1);
2281 }
2282 {
2283 parser_prod__APrivateVisibility__n_kwprivate_61d(self, var_new_child); /* Direct call parser_prod#APrivateVisibility#n_kwprivate= on <self:APrivateVisibility>*/
2284 }
2285 goto RET_LABEL;
2286 } else {
2287 }
2288 RET_LABEL:;
2289 }
2290 /* method parser_prod#APrivateVisibility#replace_child for (self: Object, ANode, nullable ANode) */
2291 void VIRTUAL_parser_prod__APrivateVisibility__replace_child(val* self, val* p0, val* p1) {
2292 parser_prod__APrivateVisibility__replace_child(self, p0, p1); /* Direct call parser_prod#APrivateVisibility#replace_child on <self:Object(APrivateVisibility)>*/
2293 RET_LABEL:;
2294 }
2295 /* method parser_prod#APrivateVisibility#n_kwprivate= for (self: APrivateVisibility, TKwprivate) */
2296 void parser_prod__APrivateVisibility__n_kwprivate_61d(val* self, val* p0) {
2297 val* var_node /* var node: TKwprivate */;
2298 var_node = p0;
2299 self->attrs[COLOR_parser_nodes__APrivateVisibility___n_kwprivate].val = var_node; /* _n_kwprivate on <self:APrivateVisibility> */
2300 {
2301 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwprivate> */
2302 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwprivate> */
2303 RET_LABEL1:(void)0;
2304 }
2305 }
2306 RET_LABEL:;
2307 }
2308 /* method parser_prod#APrivateVisibility#n_kwprivate= for (self: Object, TKwprivate) */
2309 void VIRTUAL_parser_prod__APrivateVisibility__n_kwprivate_61d(val* self, val* p0) {
2310 parser_prod__APrivateVisibility__n_kwprivate_61d(self, p0); /* Direct call parser_prod#APrivateVisibility#n_kwprivate= on <self:Object(APrivateVisibility)>*/
2311 RET_LABEL:;
2312 }
2313 /* method parser_prod#APrivateVisibility#visit_all for (self: APrivateVisibility, Visitor) */
2314 void parser_prod__APrivateVisibility__visit_all(val* self, val* p0) {
2315 val* var_v /* var v: Visitor */;
2316 val* var /* : TKwprivate */;
2317 var_v = p0;
2318 var = self->attrs[COLOR_parser_nodes__APrivateVisibility___n_kwprivate].val; /* _n_kwprivate on <self:APrivateVisibility> */
2319 if (unlikely(var == NULL)) {
2320 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwprivate");
2321 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 322);
2322 show_backtrace(1);
2323 }
2324 {
2325 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2326 }
2327 RET_LABEL:;
2328 }
2329 /* method parser_prod#APrivateVisibility#visit_all for (self: Object, Visitor) */
2330 void VIRTUAL_parser_prod__APrivateVisibility__visit_all(val* self, val* p0) {
2331 parser_prod__APrivateVisibility__visit_all(self, p0); /* Direct call parser_prod#APrivateVisibility#visit_all on <self:Object(APrivateVisibility)>*/
2332 RET_LABEL:;
2333 }
2334 /* method parser_prod#AProtectedVisibility#init_aprotectedvisibility for (self: AProtectedVisibility, nullable TKwprotected) */
2335 void parser_prod__AProtectedVisibility__init_aprotectedvisibility(val* self, val* p0) {
2336 val* var_n_kwprotected /* var n_kwprotected: nullable TKwprotected */;
2337 var_n_kwprotected = p0;
2338 if (unlikely(var_n_kwprotected == NULL)) {
2339 PRINT_ERROR("Runtime error: %s", "Cast failed");
2340 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 330);
2341 show_backtrace(1);
2342 }
2343 self->attrs[COLOR_parser_nodes__AProtectedVisibility___n_kwprotected].val = var_n_kwprotected; /* _n_kwprotected on <self:AProtectedVisibility> */
2344 if (var_n_kwprotected == NULL) {
2345 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2346 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 331);
2347 show_backtrace(1);
2348 } else {
2349 { /* Inline parser_nodes#ANode#parent= (var_n_kwprotected,self) on <var_n_kwprotected:nullable TKwprotected> */
2350 if (unlikely(var_n_kwprotected == NULL)) {
2351 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2352 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
2353 show_backtrace(1);
2354 }
2355 var_n_kwprotected->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwprotected:nullable TKwprotected> */
2356 RET_LABEL1:(void)0;
2357 }
2358 }
2359 RET_LABEL:;
2360 }
2361 /* method parser_prod#AProtectedVisibility#init_aprotectedvisibility for (self: Object, nullable TKwprotected) */
2362 void VIRTUAL_parser_prod__AProtectedVisibility__init_aprotectedvisibility(val* self, val* p0) {
2363 parser_prod__AProtectedVisibility__init_aprotectedvisibility(self, p0); /* Direct call parser_prod#AProtectedVisibility#init_aprotectedvisibility on <self:Object(AProtectedVisibility)>*/
2364 RET_LABEL:;
2365 }
2366 /* method parser_prod#AProtectedVisibility#replace_child for (self: AProtectedVisibility, ANode, nullable ANode) */
2367 void parser_prod__AProtectedVisibility__replace_child(val* self, val* p0, val* p1) {
2368 val* var_old_child /* var old_child: ANode */;
2369 val* var_new_child /* var new_child: nullable ANode */;
2370 val* var /* : TKwprotected */;
2371 short int var1 /* : Bool */;
2372 short int var2 /* : Bool */;
2373 val* var_other /* var other: nullable Object */;
2374 short int var4 /* : Bool */;
2375 short int var6 /* : Bool */;
2376 short int var7 /* : Bool */;
2377 int cltype;
2378 int idtype;
2379 const char* var_class_name;
2380 var_old_child = p0;
2381 var_new_child = p1;
2382 var = self->attrs[COLOR_parser_nodes__AProtectedVisibility___n_kwprotected].val; /* _n_kwprotected on <self:AProtectedVisibility> */
2383 if (unlikely(var == NULL)) {
2384 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwprotected");
2385 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 336);
2386 show_backtrace(1);
2387 }
2388 {
2389 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwprotected> */
2390 var_other = var_old_child;
2391 {
2392 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwprotected> */
2393 var6 = var == var_other;
2394 var4 = var6;
2395 goto RET_LABEL5;
2396 RET_LABEL5:(void)0;
2397 }
2398 }
2399 var2 = var4;
2400 goto RET_LABEL3;
2401 RET_LABEL3:(void)0;
2402 }
2403 var1 = var2;
2404 }
2405 if (var1){
2406 /* <var_new_child:nullable ANode> isa TKwprotected */
2407 cltype = type_parser_nodes__TKwprotected.color;
2408 idtype = type_parser_nodes__TKwprotected.id;
2409 if(var_new_child == NULL) {
2410 var7 = 0;
2411 } else {
2412 if(cltype >= var_new_child->type->table_size) {
2413 var7 = 0;
2414 } else {
2415 var7 = var_new_child->type->type_table[cltype] == idtype;
2416 }
2417 }
2418 if (unlikely(!var7)) {
2419 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
2420 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwprotected", var_class_name);
2421 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 337);
2422 show_backtrace(1);
2423 }
2424 {
2425 parser_prod__AProtectedVisibility__n_kwprotected_61d(self, var_new_child); /* Direct call parser_prod#AProtectedVisibility#n_kwprotected= on <self:AProtectedVisibility>*/
2426 }
2427 goto RET_LABEL;
2428 } else {
2429 }
2430 RET_LABEL:;
2431 }
2432 /* method parser_prod#AProtectedVisibility#replace_child for (self: Object, ANode, nullable ANode) */
2433 void VIRTUAL_parser_prod__AProtectedVisibility__replace_child(val* self, val* p0, val* p1) {
2434 parser_prod__AProtectedVisibility__replace_child(self, p0, p1); /* Direct call parser_prod#AProtectedVisibility#replace_child on <self:Object(AProtectedVisibility)>*/
2435 RET_LABEL:;
2436 }
2437 /* method parser_prod#AProtectedVisibility#n_kwprotected= for (self: AProtectedVisibility, TKwprotected) */
2438 void parser_prod__AProtectedVisibility__n_kwprotected_61d(val* self, val* p0) {
2439 val* var_node /* var node: TKwprotected */;
2440 var_node = p0;
2441 self->attrs[COLOR_parser_nodes__AProtectedVisibility___n_kwprotected].val = var_node; /* _n_kwprotected on <self:AProtectedVisibility> */
2442 {
2443 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwprotected> */
2444 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwprotected> */
2445 RET_LABEL1:(void)0;
2446 }
2447 }
2448 RET_LABEL:;
2449 }
2450 /* method parser_prod#AProtectedVisibility#n_kwprotected= for (self: Object, TKwprotected) */
2451 void VIRTUAL_parser_prod__AProtectedVisibility__n_kwprotected_61d(val* self, val* p0) {
2452 parser_prod__AProtectedVisibility__n_kwprotected_61d(self, p0); /* Direct call parser_prod#AProtectedVisibility#n_kwprotected= on <self:Object(AProtectedVisibility)>*/
2453 RET_LABEL:;
2454 }
2455 /* method parser_prod#AProtectedVisibility#visit_all for (self: AProtectedVisibility, Visitor) */
2456 void parser_prod__AProtectedVisibility__visit_all(val* self, val* p0) {
2457 val* var_v /* var v: Visitor */;
2458 val* var /* : TKwprotected */;
2459 var_v = p0;
2460 var = self->attrs[COLOR_parser_nodes__AProtectedVisibility___n_kwprotected].val; /* _n_kwprotected on <self:AProtectedVisibility> */
2461 if (unlikely(var == NULL)) {
2462 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwprotected");
2463 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 351);
2464 show_backtrace(1);
2465 }
2466 {
2467 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2468 }
2469 RET_LABEL:;
2470 }
2471 /* method parser_prod#AProtectedVisibility#visit_all for (self: Object, Visitor) */
2472 void VIRTUAL_parser_prod__AProtectedVisibility__visit_all(val* self, val* p0) {
2473 parser_prod__AProtectedVisibility__visit_all(self, p0); /* Direct call parser_prod#AProtectedVisibility#visit_all on <self:Object(AProtectedVisibility)>*/
2474 RET_LABEL:;
2475 }
2476 /* method parser_prod#AIntrudeVisibility#init_aintrudevisibility for (self: AIntrudeVisibility, nullable TKwintrude) */
2477 void parser_prod__AIntrudeVisibility__init_aintrudevisibility(val* self, val* p0) {
2478 val* var_n_kwintrude /* var n_kwintrude: nullable TKwintrude */;
2479 var_n_kwintrude = p0;
2480 if (unlikely(var_n_kwintrude == NULL)) {
2481 PRINT_ERROR("Runtime error: %s", "Cast failed");
2482 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 359);
2483 show_backtrace(1);
2484 }
2485 self->attrs[COLOR_parser_nodes__AIntrudeVisibility___n_kwintrude].val = var_n_kwintrude; /* _n_kwintrude on <self:AIntrudeVisibility> */
2486 if (var_n_kwintrude == NULL) {
2487 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2488 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 360);
2489 show_backtrace(1);
2490 } else {
2491 { /* Inline parser_nodes#ANode#parent= (var_n_kwintrude,self) on <var_n_kwintrude:nullable TKwintrude> */
2492 if (unlikely(var_n_kwintrude == NULL)) {
2493 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2494 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
2495 show_backtrace(1);
2496 }
2497 var_n_kwintrude->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwintrude:nullable TKwintrude> */
2498 RET_LABEL1:(void)0;
2499 }
2500 }
2501 RET_LABEL:;
2502 }
2503 /* method parser_prod#AIntrudeVisibility#init_aintrudevisibility for (self: Object, nullable TKwintrude) */
2504 void VIRTUAL_parser_prod__AIntrudeVisibility__init_aintrudevisibility(val* self, val* p0) {
2505 parser_prod__AIntrudeVisibility__init_aintrudevisibility(self, p0); /* Direct call parser_prod#AIntrudeVisibility#init_aintrudevisibility on <self:Object(AIntrudeVisibility)>*/
2506 RET_LABEL:;
2507 }
2508 /* method parser_prod#AIntrudeVisibility#replace_child for (self: AIntrudeVisibility, ANode, nullable ANode) */
2509 void parser_prod__AIntrudeVisibility__replace_child(val* self, val* p0, val* p1) {
2510 val* var_old_child /* var old_child: ANode */;
2511 val* var_new_child /* var new_child: nullable ANode */;
2512 val* var /* : TKwintrude */;
2513 short int var1 /* : Bool */;
2514 short int var2 /* : Bool */;
2515 val* var_other /* var other: nullable Object */;
2516 short int var4 /* : Bool */;
2517 short int var6 /* : Bool */;
2518 short int var7 /* : Bool */;
2519 int cltype;
2520 int idtype;
2521 const char* var_class_name;
2522 var_old_child = p0;
2523 var_new_child = p1;
2524 var = self->attrs[COLOR_parser_nodes__AIntrudeVisibility___n_kwintrude].val; /* _n_kwintrude on <self:AIntrudeVisibility> */
2525 if (unlikely(var == NULL)) {
2526 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwintrude");
2527 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 365);
2528 show_backtrace(1);
2529 }
2530 {
2531 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwintrude> */
2532 var_other = var_old_child;
2533 {
2534 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwintrude> */
2535 var6 = var == var_other;
2536 var4 = var6;
2537 goto RET_LABEL5;
2538 RET_LABEL5:(void)0;
2539 }
2540 }
2541 var2 = var4;
2542 goto RET_LABEL3;
2543 RET_LABEL3:(void)0;
2544 }
2545 var1 = var2;
2546 }
2547 if (var1){
2548 /* <var_new_child:nullable ANode> isa TKwintrude */
2549 cltype = type_parser_nodes__TKwintrude.color;
2550 idtype = type_parser_nodes__TKwintrude.id;
2551 if(var_new_child == NULL) {
2552 var7 = 0;
2553 } else {
2554 if(cltype >= var_new_child->type->table_size) {
2555 var7 = 0;
2556 } else {
2557 var7 = var_new_child->type->type_table[cltype] == idtype;
2558 }
2559 }
2560 if (unlikely(!var7)) {
2561 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
2562 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwintrude", var_class_name);
2563 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 366);
2564 show_backtrace(1);
2565 }
2566 {
2567 parser_prod__AIntrudeVisibility__n_kwintrude_61d(self, var_new_child); /* Direct call parser_prod#AIntrudeVisibility#n_kwintrude= on <self:AIntrudeVisibility>*/
2568 }
2569 goto RET_LABEL;
2570 } else {
2571 }
2572 RET_LABEL:;
2573 }
2574 /* method parser_prod#AIntrudeVisibility#replace_child for (self: Object, ANode, nullable ANode) */
2575 void VIRTUAL_parser_prod__AIntrudeVisibility__replace_child(val* self, val* p0, val* p1) {
2576 parser_prod__AIntrudeVisibility__replace_child(self, p0, p1); /* Direct call parser_prod#AIntrudeVisibility#replace_child on <self:Object(AIntrudeVisibility)>*/
2577 RET_LABEL:;
2578 }
2579 /* method parser_prod#AIntrudeVisibility#n_kwintrude= for (self: AIntrudeVisibility, TKwintrude) */
2580 void parser_prod__AIntrudeVisibility__n_kwintrude_61d(val* self, val* p0) {
2581 val* var_node /* var node: TKwintrude */;
2582 var_node = p0;
2583 self->attrs[COLOR_parser_nodes__AIntrudeVisibility___n_kwintrude].val = var_node; /* _n_kwintrude on <self:AIntrudeVisibility> */
2584 {
2585 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwintrude> */
2586 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwintrude> */
2587 RET_LABEL1:(void)0;
2588 }
2589 }
2590 RET_LABEL:;
2591 }
2592 /* method parser_prod#AIntrudeVisibility#n_kwintrude= for (self: Object, TKwintrude) */
2593 void VIRTUAL_parser_prod__AIntrudeVisibility__n_kwintrude_61d(val* self, val* p0) {
2594 parser_prod__AIntrudeVisibility__n_kwintrude_61d(self, p0); /* Direct call parser_prod#AIntrudeVisibility#n_kwintrude= on <self:Object(AIntrudeVisibility)>*/
2595 RET_LABEL:;
2596 }
2597 /* method parser_prod#AIntrudeVisibility#visit_all for (self: AIntrudeVisibility, Visitor) */
2598 void parser_prod__AIntrudeVisibility__visit_all(val* self, val* p0) {
2599 val* var_v /* var v: Visitor */;
2600 val* var /* : TKwintrude */;
2601 var_v = p0;
2602 var = self->attrs[COLOR_parser_nodes__AIntrudeVisibility___n_kwintrude].val; /* _n_kwintrude on <self:AIntrudeVisibility> */
2603 if (unlikely(var == NULL)) {
2604 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwintrude");
2605 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 380);
2606 show_backtrace(1);
2607 }
2608 {
2609 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2610 }
2611 RET_LABEL:;
2612 }
2613 /* method parser_prod#AIntrudeVisibility#visit_all for (self: Object, Visitor) */
2614 void VIRTUAL_parser_prod__AIntrudeVisibility__visit_all(val* self, val* p0) {
2615 parser_prod__AIntrudeVisibility__visit_all(self, p0); /* Direct call parser_prod#AIntrudeVisibility#visit_all on <self:Object(AIntrudeVisibility)>*/
2616 RET_LABEL:;
2617 }
2618 /* method parser_prod#AStdClassdef#init_astdclassdef for (self: AStdClassdef, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable AClasskind, nullable TClassid, Collection[Object], nullable AAnnotations, nullable AExternCodeBlock, Collection[Object], Collection[Object], nullable TKwend) */
2619 void parser_prod__AStdClassdef__init_astdclassdef(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6, val* p7, val* p8, val* p9, val* p10) {
2620 val* var_n_doc /* var n_doc: nullable ADoc */;
2621 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
2622 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
2623 val* var_n_classkind /* var n_classkind: nullable AClasskind */;
2624 val* var_n_id /* var n_id: nullable TClassid */;
2625 val* var_n_formaldefs /* var n_formaldefs: Collection[Object] */;
2626 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
2627 val* var_n_extern_code_block /* var n_extern_code_block: nullable AExternCodeBlock */;
2628 val* var_n_superclasses /* var n_superclasses: Collection[Object] */;
2629 val* var_n_propdefs /* var n_propdefs: Collection[Object] */;
2630 val* var_n_kwend /* var n_kwend: nullable TKwend */;
2631 val* var /* : null */;
2632 short int var1 /* : Bool */;
2633 short int var2 /* : Bool */;
2634 val* var_other /* var other: nullable Object */;
2635 short int var4 /* : Bool */;
2636 short int var5 /* : Bool */;
2637 short int var6 /* : Bool */;
2638 val* var8 /* : null */;
2639 short int var9 /* : Bool */;
2640 short int var10 /* : Bool */;
2641 short int var12 /* : Bool */;
2642 short int var13 /* : Bool */;
2643 short int var14 /* : Bool */;
2644 val* var18 /* : null */;
2645 short int var19 /* : Bool */;
2646 short int var20 /* : Bool */;
2647 short int var22 /* : Bool */;
2648 short int var23 /* : Bool */;
2649 short int var24 /* : Bool */;
2650 val* var26 /* : ANodes[AFormaldef] */;
2651 val* var28 /* : ANodes[AFormaldef] */;
2652 val* var29 /* : null */;
2653 short int var30 /* : Bool */;
2654 short int var31 /* : Bool */;
2655 short int var33 /* : Bool */;
2656 short int var34 /* : Bool */;
2657 short int var35 /* : Bool */;
2658 val* var37 /* : null */;
2659 short int var38 /* : Bool */;
2660 short int var39 /* : Bool */;
2661 short int var41 /* : Bool */;
2662 short int var42 /* : Bool */;
2663 short int var43 /* : Bool */;
2664 val* var45 /* : ANodes[ASuperclass] */;
2665 val* var47 /* : ANodes[ASuperclass] */;
2666 val* var48 /* : ANodes[APropdef] */;
2667 val* var50 /* : ANodes[APropdef] */;
2668 var_n_doc = p0;
2669 var_n_kwredef = p1;
2670 var_n_visibility = p2;
2671 var_n_classkind = p3;
2672 var_n_id = p4;
2673 var_n_formaldefs = p5;
2674 var_n_annotations = p6;
2675 var_n_extern_code_block = p7;
2676 var_n_superclasses = p8;
2677 var_n_propdefs = p9;
2678 var_n_kwend = p10;
2679 self->attrs[COLOR_parser_nodes__AStdClassdef___n_doc].val = var_n_doc; /* _n_doc on <self:AStdClassdef> */
2680 var = NULL;
2681 if (var_n_doc == NULL) {
2682 var1 = 0; /* is null */
2683 } else {
2684 var1 = 1; /* arg is null and recv is not */
2685 }
2686 if (0) {
2687 { /* Inline kernel#Object#!= (var_n_doc,var) on <var_n_doc:nullable ADoc> */
2688 var_other = var;
2689 {
2690 var5 = ((short int (*)(val*, val*))(var_n_doc->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_doc, var_other) /* == on <var_n_doc:nullable ADoc(ADoc)>*/;
2691 var4 = var5;
2692 }
2693 var6 = !var4;
2694 var2 = var6;
2695 goto RET_LABEL3;
2696 RET_LABEL3:(void)0;
2697 }
2698 var1 = var2;
2699 }
2700 if (var1){
2701 {
2702 { /* Inline parser_nodes#ANode#parent= (var_n_doc,self) on <var_n_doc:nullable ADoc(ADoc)> */
2703 var_n_doc->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_doc:nullable ADoc(ADoc)> */
2704 RET_LABEL7:(void)0;
2705 }
2706 }
2707 } else {
2708 }
2709 self->attrs[COLOR_parser_nodes__AStdClassdef___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:AStdClassdef> */
2710 var8 = NULL;
2711 if (var_n_kwredef == NULL) {
2712 var9 = 0; /* is null */
2713 } else {
2714 var9 = 1; /* arg is null and recv is not */
2715 }
2716 if (0) {
2717 { /* Inline kernel#Object#!= (var_n_kwredef,var8) on <var_n_kwredef:nullable TKwredef> */
2718 var_other = var8;
2719 {
2720 var13 = ((short int (*)(val*, val*))(var_n_kwredef->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
2721 var12 = var13;
2722 }
2723 var14 = !var12;
2724 var10 = var14;
2725 goto RET_LABEL11;
2726 RET_LABEL11:(void)0;
2727 }
2728 var9 = var10;
2729 }
2730 if (var9){
2731 {
2732 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
2733 var_n_kwredef->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
2734 RET_LABEL15:(void)0;
2735 }
2736 }
2737 } else {
2738 }
2739 if (unlikely(var_n_visibility == NULL)) {
2740 PRINT_ERROR("Runtime error: %s", "Cast failed");
2741 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 402);
2742 show_backtrace(1);
2743 }
2744 self->attrs[COLOR_parser_nodes__AStdClassdef___n_visibility].val = var_n_visibility; /* _n_visibility on <self:AStdClassdef> */
2745 if (var_n_visibility == NULL) {
2746 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2747 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 403);
2748 show_backtrace(1);
2749 } else {
2750 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
2751 if (unlikely(var_n_visibility == NULL)) {
2752 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2753 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
2754 show_backtrace(1);
2755 }
2756 var_n_visibility->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
2757 RET_LABEL16:(void)0;
2758 }
2759 }
2760 if (unlikely(var_n_classkind == NULL)) {
2761 PRINT_ERROR("Runtime error: %s", "Cast failed");
2762 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 404);
2763 show_backtrace(1);
2764 }
2765 self->attrs[COLOR_parser_nodes__AStdClassdef___n_classkind].val = var_n_classkind; /* _n_classkind on <self:AStdClassdef> */
2766 if (var_n_classkind == NULL) {
2767 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2768 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 405);
2769 show_backtrace(1);
2770 } else {
2771 { /* Inline parser_nodes#ANode#parent= (var_n_classkind,self) on <var_n_classkind:nullable AClasskind> */
2772 if (unlikely(var_n_classkind == NULL)) {
2773 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2774 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
2775 show_backtrace(1);
2776 }
2777 var_n_classkind->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_classkind:nullable AClasskind> */
2778 RET_LABEL17:(void)0;
2779 }
2780 }
2781 self->attrs[COLOR_parser_nodes__AStdClassdef___n_id].val = var_n_id; /* _n_id on <self:AStdClassdef> */
2782 var18 = NULL;
2783 if (var_n_id == NULL) {
2784 var19 = 0; /* is null */
2785 } else {
2786 var19 = 1; /* arg is null and recv is not */
2787 }
2788 if (0) {
2789 { /* Inline kernel#Object#!= (var_n_id,var18) on <var_n_id:nullable TClassid> */
2790 var_other = var18;
2791 {
2792 var23 = ((short int (*)(val*, val*))(var_n_id->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_id, var_other) /* == on <var_n_id:nullable TClassid(TClassid)>*/;
2793 var22 = var23;
2794 }
2795 var24 = !var22;
2796 var20 = var24;
2797 goto RET_LABEL21;
2798 RET_LABEL21:(void)0;
2799 }
2800 var19 = var20;
2801 }
2802 if (var19){
2803 {
2804 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TClassid(TClassid)> */
2805 var_n_id->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_id:nullable TClassid(TClassid)> */
2806 RET_LABEL25:(void)0;
2807 }
2808 }
2809 } else {
2810 }
2811 {
2812 { /* Inline parser_nodes#AStdClassdef#n_formaldefs (self) on <self:AStdClassdef> */
2813 var28 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_formaldefs].val; /* _n_formaldefs on <self:AStdClassdef> */
2814 if (unlikely(var28 == NULL)) {
2815 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_formaldefs");
2816 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 940);
2817 show_backtrace(1);
2818 }
2819 var26 = var28;
2820 RET_LABEL27:(void)0;
2821 }
2822 }
2823 {
2824 parser_nodes__ANodes__unsafe_add_all(var26, var_n_formaldefs); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var26:ANodes[AFormaldef]>*/
2825 }
2826 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AStdClassdef> */
2827 var29 = NULL;
2828 if (var_n_annotations == NULL) {
2829 var30 = 0; /* is null */
2830 } else {
2831 var30 = 1; /* arg is null and recv is not */
2832 }
2833 if (0) {
2834 { /* Inline kernel#Object#!= (var_n_annotations,var29) on <var_n_annotations:nullable AAnnotations> */
2835 var_other = var29;
2836 {
2837 var34 = ((short int (*)(val*, val*))(var_n_annotations->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
2838 var33 = var34;
2839 }
2840 var35 = !var33;
2841 var31 = var35;
2842 goto RET_LABEL32;
2843 RET_LABEL32:(void)0;
2844 }
2845 var30 = var31;
2846 }
2847 if (var30){
2848 {
2849 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
2850 var_n_annotations->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
2851 RET_LABEL36:(void)0;
2852 }
2853 }
2854 } else {
2855 }
2856 self->attrs[COLOR_parser_nodes__AStdClassdef___n_extern_code_block].val = var_n_extern_code_block; /* _n_extern_code_block on <self:AStdClassdef> */
2857 var37 = NULL;
2858 if (var_n_extern_code_block == NULL) {
2859 var38 = 0; /* is null */
2860 } else {
2861 var38 = 1; /* arg is null and recv is not */
2862 }
2863 if (0) {
2864 { /* Inline kernel#Object#!= (var_n_extern_code_block,var37) on <var_n_extern_code_block:nullable AExternCodeBlock> */
2865 var_other = var37;
2866 {
2867 var42 = ((short int (*)(val*, val*))(var_n_extern_code_block->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_extern_code_block, var_other) /* == on <var_n_extern_code_block:nullable AExternCodeBlock(AExternCodeBlock)>*/;
2868 var41 = var42;
2869 }
2870 var43 = !var41;
2871 var39 = var43;
2872 goto RET_LABEL40;
2873 RET_LABEL40:(void)0;
2874 }
2875 var38 = var39;
2876 }
2877 if (var38){
2878 {
2879 { /* Inline parser_nodes#ANode#parent= (var_n_extern_code_block,self) on <var_n_extern_code_block:nullable AExternCodeBlock(AExternCodeBlock)> */
2880 var_n_extern_code_block->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_extern_code_block:nullable AExternCodeBlock(AExternCodeBlock)> */
2881 RET_LABEL44:(void)0;
2882 }
2883 }
2884 } else {
2885 }
2886 {
2887 { /* Inline parser_nodes#AStdClassdef#n_superclasses (self) on <self:AStdClassdef> */
2888 var47 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_superclasses].val; /* _n_superclasses on <self:AStdClassdef> */
2889 if (unlikely(var47 == NULL)) {
2890 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_superclasses");
2891 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 942);
2892 show_backtrace(1);
2893 }
2894 var45 = var47;
2895 RET_LABEL46:(void)0;
2896 }
2897 }
2898 {
2899 parser_nodes__ANodes__unsafe_add_all(var45, var_n_superclasses); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var45:ANodes[ASuperclass]>*/
2900 }
2901 {
2902 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:AStdClassdef> */
2903 var50 = self->attrs[COLOR_parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:AStdClassdef> */
2904 if (unlikely(var50 == NULL)) {
2905 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
2906 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 929);
2907 show_backtrace(1);
2908 }
2909 var48 = var50;
2910 RET_LABEL49:(void)0;
2911 }
2912 }
2913 {
2914 parser_nodes__ANodes__unsafe_add_all(var48, var_n_propdefs); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var48:ANodes[APropdef]>*/
2915 }
2916 if (unlikely(var_n_kwend == NULL)) {
2917 PRINT_ERROR("Runtime error: %s", "Cast failed");
2918 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 415);
2919 show_backtrace(1);
2920 }
2921 self->attrs[COLOR_parser_nodes__AStdClassdef___n_kwend].val = var_n_kwend; /* _n_kwend on <self:AStdClassdef> */
2922 if (var_n_kwend == NULL) {
2923 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2924 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 416);
2925 show_backtrace(1);
2926 } else {
2927 { /* Inline parser_nodes#ANode#parent= (var_n_kwend,self) on <var_n_kwend:nullable TKwend> */
2928 if (unlikely(var_n_kwend == NULL)) {
2929 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2930 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
2931 show_backtrace(1);
2932 }
2933 var_n_kwend->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwend:nullable TKwend> */
2934 RET_LABEL51:(void)0;
2935 }
2936 }
2937 RET_LABEL:;
2938 }
2939 /* method parser_prod#AStdClassdef#init_astdclassdef for (self: Object, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable AClasskind, nullable TClassid, Collection[Object], nullable AAnnotations, nullable AExternCodeBlock, Collection[Object], Collection[Object], nullable TKwend) */
2940 void VIRTUAL_parser_prod__AStdClassdef__init_astdclassdef(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6, val* p7, val* p8, val* p9, val* p10) {
2941 parser_prod__AStdClassdef__init_astdclassdef(self, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); /* Direct call parser_prod#AStdClassdef#init_astdclassdef on <self:Object(AStdClassdef)>*/
2942 RET_LABEL:;
2943 }
2944 /* method parser_prod#AStdClassdef#replace_child for (self: AStdClassdef, ANode, nullable ANode) */
2945 void parser_prod__AStdClassdef__replace_child(val* self, val* p0, val* p1) {
2946 val* var_old_child /* var old_child: ANode */;
2947 val* var_new_child /* var new_child: nullable ANode */;
2948 val* var /* : nullable ADoc */;
2949 short int var1 /* : Bool */;
2950 short int var2 /* : Bool */;
2951 val* var_other /* var other: nullable Object */;
2952 short int var4 /* : Bool */;
2953 short int var6 /* : Bool */;
2954 short int var7 /* : Bool */;
2955 int cltype;
2956 int idtype;
2957 const char* var_class_name;
2958 val* var8 /* : nullable TKwredef */;
2959 short int var9 /* : Bool */;
2960 short int var10 /* : Bool */;
2961 short int var12 /* : Bool */;
2962 short int var14 /* : Bool */;
2963 short int var15 /* : Bool */;
2964 int cltype16;
2965 int idtype17;
2966 const char* var_class_name18;
2967 val* var19 /* : AVisibility */;
2968 short int var20 /* : Bool */;
2969 short int var21 /* : Bool */;
2970 short int var23 /* : Bool */;
2971 short int var25 /* : Bool */;
2972 short int var26 /* : Bool */;
2973 int cltype27;
2974 int idtype28;
2975 const char* var_class_name29;
2976 val* var30 /* : AClasskind */;
2977 short int var31 /* : Bool */;
2978 short int var32 /* : Bool */;
2979 short int var34 /* : Bool */;
2980 short int var36 /* : Bool */;
2981 short int var37 /* : Bool */;
2982 int cltype38;
2983 int idtype39;
2984 const char* var_class_name40;
2985 val* var41 /* : nullable TClassid */;
2986 short int var42 /* : Bool */;
2987 short int var43 /* : Bool */;
2988 short int var45 /* : Bool */;
2989 short int var47 /* : Bool */;
2990 short int var48 /* : Bool */;
2991 int cltype49;
2992 int idtype50;
2993 const char* var_class_name51;
2994 val* var52 /* : ANodes[AFormaldef] */;
2995 val* var54 /* : ANodes[AFormaldef] */;
2996 short int var55 /* : Bool */;
2997 val* var56 /* : nullable AAnnotations */;
2998 short int var57 /* : Bool */;
2999 short int var58 /* : Bool */;
3000 short int var60 /* : Bool */;
3001 short int var62 /* : Bool */;
3002 short int var63 /* : Bool */;
3003 int cltype64;
3004 int idtype65;
3005 const char* var_class_name66;
3006 val* var67 /* : nullable AExternCodeBlock */;
3007 short int var68 /* : Bool */;
3008 short int var69 /* : Bool */;
3009 short int var71 /* : Bool */;
3010 short int var73 /* : Bool */;
3011 short int var74 /* : Bool */;
3012 int cltype75;
3013 int idtype76;
3014 const char* var_class_name77;
3015 val* var78 /* : ANodes[ASuperclass] */;
3016 val* var80 /* : ANodes[ASuperclass] */;
3017 short int var81 /* : Bool */;
3018 val* var82 /* : ANodes[APropdef] */;
3019 val* var84 /* : ANodes[APropdef] */;
3020 short int var85 /* : Bool */;
3021 val* var86 /* : TKwend */;
3022 short int var87 /* : Bool */;
3023 short int var88 /* : Bool */;
3024 short int var90 /* : Bool */;
3025 short int var92 /* : Bool */;
3026 short int var93 /* : Bool */;
3027 int cltype94;
3028 int idtype95;
3029 const char* var_class_name96;
3030 var_old_child = p0;
3031 var_new_child = p1;
3032 var = self->attrs[COLOR_parser_nodes__AStdClassdef___n_doc].val; /* _n_doc on <self:AStdClassdef> */
3033 if (var == NULL) {
3034 var1 = 0; /* <var_old_child:ANode> cannot be null */
3035 } else {
3036 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable ADoc> */
3037 var_other = var_old_child;
3038 {
3039 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable ADoc(ADoc)> */
3040 var6 = var == var_other;
3041 var4 = var6;
3042 goto RET_LABEL5;
3043 RET_LABEL5:(void)0;
3044 }
3045 }
3046 var2 = var4;
3047 goto RET_LABEL3;
3048 RET_LABEL3:(void)0;
3049 }
3050 var1 = var2;
3051 }
3052 if (var1){
3053 /* <var_new_child:nullable ANode> isa nullable ADoc */
3054 cltype = type_nullable_parser_nodes__ADoc.color;
3055 idtype = type_nullable_parser_nodes__ADoc.id;
3056 if(var_new_child == NULL) {
3057 var7 = 1;
3058 } else {
3059 if(cltype >= var_new_child->type->table_size) {
3060 var7 = 0;
3061 } else {
3062 var7 = var_new_child->type->type_table[cltype] == idtype;
3063 }
3064 }
3065 if (unlikely(!var7)) {
3066 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
3067 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ADoc", var_class_name);
3068 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 422);
3069 show_backtrace(1);
3070 }
3071 {
3072 parser_prod__AStdClassdef__n_doc_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_doc= on <self:AStdClassdef>*/
3073 }
3074 goto RET_LABEL;
3075 } else {
3076 }
3077 var8 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_kwredef].val; /* _n_kwredef on <self:AStdClassdef> */
3078 if (var8 == NULL) {
3079 var9 = 0; /* <var_old_child:ANode> cannot be null */
3080 } else {
3081 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwredef> */
3082 var_other = var_old_child;
3083 {
3084 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwredef(TKwredef)> */
3085 var14 = var8 == var_other;
3086 var12 = var14;
3087 goto RET_LABEL13;
3088 RET_LABEL13:(void)0;
3089 }
3090 }
3091 var10 = var12;
3092 goto RET_LABEL11;
3093 RET_LABEL11:(void)0;
3094 }
3095 var9 = var10;
3096 }
3097 if (var9){
3098 /* <var_new_child:nullable ANode> isa nullable TKwredef */
3099 cltype16 = type_nullable_parser_nodes__TKwredef.color;
3100 idtype17 = type_nullable_parser_nodes__TKwredef.id;
3101 if(var_new_child == NULL) {
3102 var15 = 1;
3103 } else {
3104 if(cltype16 >= var_new_child->type->table_size) {
3105 var15 = 0;
3106 } else {
3107 var15 = var_new_child->type->type_table[cltype16] == idtype17;
3108 }
3109 }
3110 if (unlikely(!var15)) {
3111 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
3112 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name18);
3113 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 426);
3114 show_backtrace(1);
3115 }
3116 {
3117 parser_prod__AStdClassdef__n_kwredef_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_kwredef= on <self:AStdClassdef>*/
3118 }
3119 goto RET_LABEL;
3120 } else {
3121 }
3122 var19 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_visibility].val; /* _n_visibility on <self:AStdClassdef> */
3123 if (unlikely(var19 == NULL)) {
3124 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_visibility");
3125 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 429);
3126 show_backtrace(1);
3127 }
3128 {
3129 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:AVisibility> */
3130 var_other = var_old_child;
3131 {
3132 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:AVisibility> */
3133 var25 = var19 == var_other;
3134 var23 = var25;
3135 goto RET_LABEL24;
3136 RET_LABEL24:(void)0;
3137 }
3138 }
3139 var21 = var23;
3140 goto RET_LABEL22;
3141 RET_LABEL22:(void)0;
3142 }
3143 var20 = var21;
3144 }
3145 if (var20){
3146 /* <var_new_child:nullable ANode> isa AVisibility */
3147 cltype27 = type_parser_nodes__AVisibility.color;
3148 idtype28 = type_parser_nodes__AVisibility.id;
3149 if(var_new_child == NULL) {
3150 var26 = 0;
3151 } else {
3152 if(cltype27 >= var_new_child->type->table_size) {
3153 var26 = 0;
3154 } else {
3155 var26 = var_new_child->type->type_table[cltype27] == idtype28;
3156 }
3157 }
3158 if (unlikely(!var26)) {
3159 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
3160 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name29);
3161 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 430);
3162 show_backtrace(1);
3163 }
3164 {
3165 parser_prod__AStdClassdef__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_visibility= on <self:AStdClassdef>*/
3166 }
3167 goto RET_LABEL;
3168 } else {
3169 }
3170 var30 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_classkind].val; /* _n_classkind on <self:AStdClassdef> */
3171 if (unlikely(var30 == NULL)) {
3172 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_classkind");
3173 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 433);
3174 show_backtrace(1);
3175 }
3176 {
3177 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:AClasskind> */
3178 var_other = var_old_child;
3179 {
3180 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:AClasskind> */
3181 var36 = var30 == var_other;
3182 var34 = var36;
3183 goto RET_LABEL35;
3184 RET_LABEL35:(void)0;
3185 }
3186 }
3187 var32 = var34;
3188 goto RET_LABEL33;
3189 RET_LABEL33:(void)0;
3190 }
3191 var31 = var32;
3192 }
3193 if (var31){
3194 /* <var_new_child:nullable ANode> isa AClasskind */
3195 cltype38 = type_parser_nodes__AClasskind.color;
3196 idtype39 = type_parser_nodes__AClasskind.id;
3197 if(var_new_child == NULL) {
3198 var37 = 0;
3199 } else {
3200 if(cltype38 >= var_new_child->type->table_size) {
3201 var37 = 0;
3202 } else {
3203 var37 = var_new_child->type->type_table[cltype38] == idtype39;
3204 }
3205 }
3206 if (unlikely(!var37)) {
3207 var_class_name40 = var_new_child == NULL ? "null" : var_new_child->type->name;
3208 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AClasskind", var_class_name40);
3209 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 434);
3210 show_backtrace(1);
3211 }
3212 {
3213 parser_prod__AStdClassdef__n_classkind_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_classkind= on <self:AStdClassdef>*/
3214 }
3215 goto RET_LABEL;
3216 } else {
3217 }
3218 var41 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_id].val; /* _n_id on <self:AStdClassdef> */
3219 if (var41 == NULL) {
3220 var42 = 0; /* <var_old_child:ANode> cannot be null */
3221 } else {
3222 { /* Inline kernel#Object#== (var41,var_old_child) on <var41:nullable TClassid> */
3223 var_other = var_old_child;
3224 {
3225 { /* Inline kernel#Object#is_same_instance (var41,var_other) on <var41:nullable TClassid(TClassid)> */
3226 var47 = var41 == var_other;
3227 var45 = var47;
3228 goto RET_LABEL46;
3229 RET_LABEL46:(void)0;
3230 }
3231 }
3232 var43 = var45;
3233 goto RET_LABEL44;
3234 RET_LABEL44:(void)0;
3235 }
3236 var42 = var43;
3237 }
3238 if (var42){
3239 /* <var_new_child:nullable ANode> isa nullable TClassid */
3240 cltype49 = type_nullable_parser_nodes__TClassid.color;
3241 idtype50 = type_nullable_parser_nodes__TClassid.id;
3242 if(var_new_child == NULL) {
3243 var48 = 1;
3244 } else {
3245 if(cltype49 >= var_new_child->type->table_size) {
3246 var48 = 0;
3247 } else {
3248 var48 = var_new_child->type->type_table[cltype49] == idtype50;
3249 }
3250 }
3251 if (unlikely(!var48)) {
3252 var_class_name51 = var_new_child == NULL ? "null" : var_new_child->type->name;
3253 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TClassid", var_class_name51);
3254 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 438);
3255 show_backtrace(1);
3256 }
3257 {
3258 parser_prod__AStdClassdef__n_id_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_id= on <self:AStdClassdef>*/
3259 }
3260 goto RET_LABEL;
3261 } else {
3262 }
3263 {
3264 { /* Inline parser_nodes#AStdClassdef#n_formaldefs (self) on <self:AStdClassdef> */
3265 var54 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_formaldefs].val; /* _n_formaldefs on <self:AStdClassdef> */
3266 if (unlikely(var54 == NULL)) {
3267 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_formaldefs");
3268 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 940);
3269 show_backtrace(1);
3270 }
3271 var52 = var54;
3272 RET_LABEL53:(void)0;
3273 }
3274 }
3275 {
3276 var55 = parser_nodes__ANodes__replace_child(var52, var_old_child, var_new_child);
3277 }
3278 if (var55){
3279 goto RET_LABEL;
3280 } else {
3281 }
3282 var56 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AStdClassdef> */
3283 if (var56 == NULL) {
3284 var57 = 0; /* <var_old_child:ANode> cannot be null */
3285 } else {
3286 { /* Inline kernel#Object#== (var56,var_old_child) on <var56:nullable AAnnotations> */
3287 var_other = var_old_child;
3288 {
3289 { /* Inline kernel#Object#is_same_instance (var56,var_other) on <var56:nullable AAnnotations(AAnnotations)> */
3290 var62 = var56 == var_other;
3291 var60 = var62;
3292 goto RET_LABEL61;
3293 RET_LABEL61:(void)0;
3294 }
3295 }
3296 var58 = var60;
3297 goto RET_LABEL59;
3298 RET_LABEL59:(void)0;
3299 }
3300 var57 = var58;
3301 }
3302 if (var57){
3303 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
3304 cltype64 = type_nullable_parser_nodes__AAnnotations.color;
3305 idtype65 = type_nullable_parser_nodes__AAnnotations.id;
3306 if(var_new_child == NULL) {
3307 var63 = 1;
3308 } else {
3309 if(cltype64 >= var_new_child->type->table_size) {
3310 var63 = 0;
3311 } else {
3312 var63 = var_new_child->type->type_table[cltype64] == idtype65;
3313 }
3314 }
3315 if (unlikely(!var63)) {
3316 var_class_name66 = var_new_child == NULL ? "null" : var_new_child->type->name;
3317 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name66);
3318 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 443);
3319 show_backtrace(1);
3320 }
3321 {
3322 parser_prod__AStdClassdef__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_annotations= on <self:AStdClassdef>*/
3323 }
3324 goto RET_LABEL;
3325 } else {
3326 }
3327 var67 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_extern_code_block].val; /* _n_extern_code_block on <self:AStdClassdef> */
3328 if (var67 == NULL) {
3329 var68 = 0; /* <var_old_child:ANode> cannot be null */
3330 } else {
3331 { /* Inline kernel#Object#== (var67,var_old_child) on <var67:nullable AExternCodeBlock> */
3332 var_other = var_old_child;
3333 {
3334 { /* Inline kernel#Object#is_same_instance (var67,var_other) on <var67:nullable AExternCodeBlock(AExternCodeBlock)> */
3335 var73 = var67 == var_other;
3336 var71 = var73;
3337 goto RET_LABEL72;
3338 RET_LABEL72:(void)0;
3339 }
3340 }
3341 var69 = var71;
3342 goto RET_LABEL70;
3343 RET_LABEL70:(void)0;
3344 }
3345 var68 = var69;
3346 }
3347 if (var68){
3348 /* <var_new_child:nullable ANode> isa nullable AExternCodeBlock */
3349 cltype75 = type_nullable_parser_nodes__AExternCodeBlock.color;
3350 idtype76 = type_nullable_parser_nodes__AExternCodeBlock.id;
3351 if(var_new_child == NULL) {
3352 var74 = 1;
3353 } else {
3354 if(cltype75 >= var_new_child->type->table_size) {
3355 var74 = 0;
3356 } else {
3357 var74 = var_new_child->type->type_table[cltype75] == idtype76;
3358 }
3359 }
3360 if (unlikely(!var74)) {
3361 var_class_name77 = var_new_child == NULL ? "null" : var_new_child->type->name;
3362 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExternCodeBlock", var_class_name77);
3363 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 447);
3364 show_backtrace(1);
3365 }
3366 {
3367 parser_prod__AStdClassdef__n_extern_code_block_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_extern_code_block= on <self:AStdClassdef>*/
3368 }
3369 goto RET_LABEL;
3370 } else {
3371 }
3372 {
3373 { /* Inline parser_nodes#AStdClassdef#n_superclasses (self) on <self:AStdClassdef> */
3374 var80 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_superclasses].val; /* _n_superclasses on <self:AStdClassdef> */
3375 if (unlikely(var80 == NULL)) {
3376 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_superclasses");
3377 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 942);
3378 show_backtrace(1);
3379 }
3380 var78 = var80;
3381 RET_LABEL79:(void)0;
3382 }
3383 }
3384 {
3385 var81 = parser_nodes__ANodes__replace_child(var78, var_old_child, var_new_child);
3386 }
3387 if (var81){
3388 goto RET_LABEL;
3389 } else {
3390 }
3391 {
3392 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:AStdClassdef> */
3393 var84 = self->attrs[COLOR_parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:AStdClassdef> */
3394 if (unlikely(var84 == NULL)) {
3395 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3396 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 929);
3397 show_backtrace(1);
3398 }
3399 var82 = var84;
3400 RET_LABEL83:(void)0;
3401 }
3402 }
3403 {
3404 var85 = parser_nodes__ANodes__replace_child(var82, var_old_child, var_new_child);
3405 }
3406 if (var85){
3407 goto RET_LABEL;
3408 } else {
3409 }
3410 var86 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_kwend].val; /* _n_kwend on <self:AStdClassdef> */
3411 if (unlikely(var86 == NULL)) {
3412 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwend");
3413 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 452);
3414 show_backtrace(1);
3415 }
3416 {
3417 { /* Inline kernel#Object#== (var86,var_old_child) on <var86:TKwend> */
3418 var_other = var_old_child;
3419 {
3420 { /* Inline kernel#Object#is_same_instance (var86,var_other) on <var86:TKwend> */
3421 var92 = var86 == var_other;
3422 var90 = var92;
3423 goto RET_LABEL91;
3424 RET_LABEL91:(void)0;
3425 }
3426 }
3427 var88 = var90;
3428 goto RET_LABEL89;
3429 RET_LABEL89:(void)0;
3430 }
3431 var87 = var88;
3432 }
3433 if (var87){
3434 /* <var_new_child:nullable ANode> isa TKwend */
3435 cltype94 = type_parser_nodes__TKwend.color;
3436 idtype95 = type_parser_nodes__TKwend.id;
3437 if(var_new_child == NULL) {
3438 var93 = 0;
3439 } else {
3440 if(cltype94 >= var_new_child->type->table_size) {
3441 var93 = 0;
3442 } else {
3443 var93 = var_new_child->type->type_table[cltype94] == idtype95;
3444 }
3445 }
3446 if (unlikely(!var93)) {
3447 var_class_name96 = var_new_child == NULL ? "null" : var_new_child->type->name;
3448 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwend", var_class_name96);
3449 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 453);
3450 show_backtrace(1);
3451 }
3452 {
3453 parser_prod__AStdClassdef__n_kwend_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_kwend= on <self:AStdClassdef>*/
3454 }
3455 goto RET_LABEL;
3456 } else {
3457 }
3458 RET_LABEL:;
3459 }
3460 /* method parser_prod#AStdClassdef#replace_child for (self: Object, ANode, nullable ANode) */
3461 void VIRTUAL_parser_prod__AStdClassdef__replace_child(val* self, val* p0, val* p1) {
3462 parser_prod__AStdClassdef__replace_child(self, p0, p1); /* Direct call parser_prod#AStdClassdef#replace_child on <self:Object(AStdClassdef)>*/
3463 RET_LABEL:;
3464 }
3465 /* method parser_prod#AStdClassdef#n_doc= for (self: AStdClassdef, nullable ADoc) */
3466 void parser_prod__AStdClassdef__n_doc_61d(val* self, val* p0) {
3467 val* var_node /* var node: nullable ADoc */;
3468 val* var /* : null */;
3469 short int var1 /* : Bool */;
3470 short int var2 /* : Bool */;
3471 val* var_other /* var other: nullable Object */;
3472 short int var4 /* : Bool */;
3473 short int var5 /* : Bool */;
3474 short int var6 /* : Bool */;
3475 var_node = p0;
3476 self->attrs[COLOR_parser_nodes__AStdClassdef___n_doc].val = var_node; /* _n_doc on <self:AStdClassdef> */
3477 var = NULL;
3478 if (var_node == NULL) {
3479 var1 = 0; /* is null */
3480 } else {
3481 var1 = 1; /* arg is null and recv is not */
3482 }
3483 if (0) {
3484 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable ADoc> */
3485 var_other = var;
3486 {
3487 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable ADoc(ADoc)>*/;
3488 var4 = var5;
3489 }
3490 var6 = !var4;
3491 var2 = var6;
3492 goto RET_LABEL3;
3493 RET_LABEL3:(void)0;
3494 }
3495 var1 = var2;
3496 }
3497 if (var1){
3498 {
3499 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ADoc(ADoc)> */
3500 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ADoc(ADoc)> */
3501 RET_LABEL7:(void)0;
3502 }
3503 }
3504 } else {
3505 }
3506 RET_LABEL:;
3507 }
3508 /* method parser_prod#AStdClassdef#n_doc= for (self: Object, nullable ADoc) */
3509 void VIRTUAL_parser_prod__AStdClassdef__n_doc_61d(val* self, val* p0) {
3510 parser_prod__AStdClassdef__n_doc_61d(self, p0); /* Direct call parser_prod#AStdClassdef#n_doc= on <self:Object(AStdClassdef)>*/
3511 RET_LABEL:;
3512 }
3513 /* method parser_prod#AStdClassdef#n_kwredef= for (self: AStdClassdef, nullable TKwredef) */
3514 void parser_prod__AStdClassdef__n_kwredef_61d(val* self, val* p0) {
3515 val* var_node /* var node: nullable TKwredef */;
3516 val* var /* : null */;
3517 short int var1 /* : Bool */;
3518 short int var2 /* : Bool */;
3519 val* var_other /* var other: nullable Object */;
3520 short int var4 /* : Bool */;
3521 short int var5 /* : Bool */;
3522 short int var6 /* : Bool */;
3523 var_node = p0;
3524 self->attrs[COLOR_parser_nodes__AStdClassdef___n_kwredef].val = var_node; /* _n_kwredef on <self:AStdClassdef> */
3525 var = NULL;
3526 if (var_node == NULL) {
3527 var1 = 0; /* is null */
3528 } else {
3529 var1 = 1; /* arg is null and recv is not */
3530 }
3531 if (0) {
3532 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
3533 var_other = var;
3534 {
3535 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
3536 var4 = var5;
3537 }
3538 var6 = !var4;
3539 var2 = var6;
3540 goto RET_LABEL3;
3541 RET_LABEL3:(void)0;
3542 }
3543 var1 = var2;
3544 }
3545 if (var1){
3546 {
3547 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
3548 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
3549 RET_LABEL7:(void)0;
3550 }
3551 }
3552 } else {
3553 }
3554 RET_LABEL:;
3555 }
3556 /* method parser_prod#AStdClassdef#n_kwredef= for (self: Object, nullable TKwredef) */
3557 void VIRTUAL_parser_prod__AStdClassdef__n_kwredef_61d(val* self, val* p0) {
3558 parser_prod__AStdClassdef__n_kwredef_61d(self, p0); /* Direct call parser_prod#AStdClassdef#n_kwredef= on <self:Object(AStdClassdef)>*/
3559 RET_LABEL:;
3560 }
3561 /* method parser_prod#AStdClassdef#n_visibility= for (self: AStdClassdef, AVisibility) */
3562 void parser_prod__AStdClassdef__n_visibility_61d(val* self, val* p0) {
3563 val* var_node /* var node: AVisibility */;
3564 var_node = p0;
3565 self->attrs[COLOR_parser_nodes__AStdClassdef___n_visibility].val = var_node; /* _n_visibility on <self:AStdClassdef> */
3566 {
3567 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AVisibility> */
3568 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AVisibility> */
3569 RET_LABEL1:(void)0;
3570 }
3571 }
3572 RET_LABEL:;
3573 }
3574 /* method parser_prod#AStdClassdef#n_visibility= for (self: Object, AVisibility) */
3575 void VIRTUAL_parser_prod__AStdClassdef__n_visibility_61d(val* self, val* p0) {
3576 parser_prod__AStdClassdef__n_visibility_61d(self, p0); /* Direct call parser_prod#AStdClassdef#n_visibility= on <self:Object(AStdClassdef)>*/
3577 RET_LABEL:;
3578 }
3579 /* method parser_prod#AStdClassdef#n_classkind= for (self: AStdClassdef, AClasskind) */
3580 void parser_prod__AStdClassdef__n_classkind_61d(val* self, val* p0) {
3581 val* var_node /* var node: AClasskind */;
3582 var_node = p0;
3583 self->attrs[COLOR_parser_nodes__AStdClassdef___n_classkind].val = var_node; /* _n_classkind on <self:AStdClassdef> */
3584 {
3585 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AClasskind> */
3586 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AClasskind> */
3587 RET_LABEL1:(void)0;
3588 }
3589 }
3590 RET_LABEL:;
3591 }
3592 /* method parser_prod#AStdClassdef#n_classkind= for (self: Object, AClasskind) */
3593 void VIRTUAL_parser_prod__AStdClassdef__n_classkind_61d(val* self, val* p0) {
3594 parser_prod__AStdClassdef__n_classkind_61d(self, p0); /* Direct call parser_prod#AStdClassdef#n_classkind= on <self:Object(AStdClassdef)>*/
3595 RET_LABEL:;
3596 }
3597 /* method parser_prod#AStdClassdef#n_id= for (self: AStdClassdef, nullable TClassid) */
3598 void parser_prod__AStdClassdef__n_id_61d(val* self, val* p0) {
3599 val* var_node /* var node: nullable TClassid */;
3600 val* var /* : null */;
3601 short int var1 /* : Bool */;
3602 short int var2 /* : Bool */;
3603 val* var_other /* var other: nullable Object */;
3604 short int var4 /* : Bool */;
3605 short int var5 /* : Bool */;
3606 short int var6 /* : Bool */;
3607 var_node = p0;
3608 self->attrs[COLOR_parser_nodes__AStdClassdef___n_id].val = var_node; /* _n_id on <self:AStdClassdef> */
3609 var = NULL;
3610 if (var_node == NULL) {
3611 var1 = 0; /* is null */
3612 } else {
3613 var1 = 1; /* arg is null and recv is not */
3614 }
3615 if (0) {
3616 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TClassid> */
3617 var_other = var;
3618 {
3619 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TClassid(TClassid)>*/;
3620 var4 = var5;
3621 }
3622 var6 = !var4;
3623 var2 = var6;
3624 goto RET_LABEL3;
3625 RET_LABEL3:(void)0;
3626 }
3627 var1 = var2;
3628 }
3629 if (var1){
3630 {
3631 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TClassid(TClassid)> */
3632 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TClassid(TClassid)> */
3633 RET_LABEL7:(void)0;
3634 }
3635 }
3636 } else {
3637 }
3638 RET_LABEL:;
3639 }
3640 /* method parser_prod#AStdClassdef#n_id= for (self: Object, nullable TClassid) */
3641 void VIRTUAL_parser_prod__AStdClassdef__n_id_61d(val* self, val* p0) {
3642 parser_prod__AStdClassdef__n_id_61d(self, p0); /* Direct call parser_prod#AStdClassdef#n_id= on <self:Object(AStdClassdef)>*/
3643 RET_LABEL:;
3644 }
3645 /* method parser_prod#AStdClassdef#n_annotations= for (self: AStdClassdef, nullable AAnnotations) */
3646 void parser_prod__AStdClassdef__n_annotations_61d(val* self, val* p0) {
3647 val* var_node /* var node: nullable AAnnotations */;
3648 val* var /* : null */;
3649 short int var1 /* : Bool */;
3650 short int var2 /* : Bool */;
3651 val* var_other /* var other: nullable Object */;
3652 short int var4 /* : Bool */;
3653 short int var5 /* : Bool */;
3654 short int var6 /* : Bool */;
3655 var_node = p0;
3656 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AStdClassdef> */
3657 var = NULL;
3658 if (var_node == NULL) {
3659 var1 = 0; /* is null */
3660 } else {
3661 var1 = 1; /* arg is null and recv is not */
3662 }
3663 if (0) {
3664 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
3665 var_other = var;
3666 {
3667 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
3668 var4 = var5;
3669 }
3670 var6 = !var4;
3671 var2 = var6;
3672 goto RET_LABEL3;
3673 RET_LABEL3:(void)0;
3674 }
3675 var1 = var2;
3676 }
3677 if (var1){
3678 {
3679 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
3680 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
3681 RET_LABEL7:(void)0;
3682 }
3683 }
3684 } else {
3685 }
3686 RET_LABEL:;
3687 }
3688 /* method parser_prod#AStdClassdef#n_annotations= for (self: Object, nullable AAnnotations) */
3689 void VIRTUAL_parser_prod__AStdClassdef__n_annotations_61d(val* self, val* p0) {
3690 parser_prod__AStdClassdef__n_annotations_61d(self, p0); /* Direct call parser_prod#AStdClassdef#n_annotations= on <self:Object(AStdClassdef)>*/
3691 RET_LABEL:;
3692 }
3693 /* method parser_prod#AStdClassdef#n_extern_code_block= for (self: AStdClassdef, nullable AExternCodeBlock) */
3694 void parser_prod__AStdClassdef__n_extern_code_block_61d(val* self, val* p0) {
3695 val* var_node /* var node: nullable AExternCodeBlock */;
3696 val* var /* : null */;
3697 short int var1 /* : Bool */;
3698 short int var2 /* : Bool */;
3699 val* var_other /* var other: nullable Object */;
3700 short int var4 /* : Bool */;
3701 short int var5 /* : Bool */;
3702 short int var6 /* : Bool */;
3703 var_node = p0;
3704 self->attrs[COLOR_parser_nodes__AStdClassdef___n_extern_code_block].val = var_node; /* _n_extern_code_block on <self:AStdClassdef> */
3705 var = NULL;
3706 if (var_node == NULL) {
3707 var1 = 0; /* is null */
3708 } else {
3709 var1 = 1; /* arg is null and recv is not */
3710 }
3711 if (0) {
3712 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExternCodeBlock> */
3713 var_other = var;
3714 {
3715 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExternCodeBlock(AExternCodeBlock)>*/;
3716 var4 = var5;
3717 }
3718 var6 = !var4;
3719 var2 = var6;
3720 goto RET_LABEL3;
3721 RET_LABEL3:(void)0;
3722 }
3723 var1 = var2;
3724 }
3725 if (var1){
3726 {
3727 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExternCodeBlock(AExternCodeBlock)> */
3728 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExternCodeBlock(AExternCodeBlock)> */
3729 RET_LABEL7:(void)0;
3730 }
3731 }
3732 } else {
3733 }
3734 RET_LABEL:;
3735 }
3736 /* method parser_prod#AStdClassdef#n_extern_code_block= for (self: Object, nullable AExternCodeBlock) */
3737 void VIRTUAL_parser_prod__AStdClassdef__n_extern_code_block_61d(val* self, val* p0) {
3738 parser_prod__AStdClassdef__n_extern_code_block_61d(self, p0); /* Direct call parser_prod#AStdClassdef#n_extern_code_block= on <self:Object(AStdClassdef)>*/
3739 RET_LABEL:;
3740 }
3741 /* method parser_prod#AStdClassdef#n_kwend= for (self: AStdClassdef, TKwend) */
3742 void parser_prod__AStdClassdef__n_kwend_61d(val* self, val* p0) {
3743 val* var_node /* var node: TKwend */;
3744 var_node = p0;
3745 self->attrs[COLOR_parser_nodes__AStdClassdef___n_kwend].val = var_node; /* _n_kwend on <self:AStdClassdef> */
3746 {
3747 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwend> */
3748 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwend> */
3749 RET_LABEL1:(void)0;
3750 }
3751 }
3752 RET_LABEL:;
3753 }
3754 /* method parser_prod#AStdClassdef#n_kwend= for (self: Object, TKwend) */
3755 void VIRTUAL_parser_prod__AStdClassdef__n_kwend_61d(val* self, val* p0) {
3756 parser_prod__AStdClassdef__n_kwend_61d(self, p0); /* Direct call parser_prod#AStdClassdef#n_kwend= on <self:Object(AStdClassdef)>*/
3757 RET_LABEL:;
3758 }
3759 /* method parser_prod#AStdClassdef#visit_all for (self: AStdClassdef, Visitor) */
3760 void parser_prod__AStdClassdef__visit_all(val* self, val* p0) {
3761 val* var_v /* var v: Visitor */;
3762 val* var /* : nullable ADoc */;
3763 val* var1 /* : nullable TKwredef */;
3764 val* var2 /* : AVisibility */;
3765 val* var3 /* : AClasskind */;
3766 val* var4 /* : nullable TClassid */;
3767 val* var5 /* : ANodes[AFormaldef] */;
3768 val* var7 /* : ANodes[AFormaldef] */;
3769 val* var8 /* : nullable AAnnotations */;
3770 val* var9 /* : nullable AExternCodeBlock */;
3771 val* var10 /* : ANodes[ASuperclass] */;
3772 val* var12 /* : ANodes[ASuperclass] */;
3773 val* var13 /* : ANodes[APropdef] */;
3774 val* var15 /* : ANodes[APropdef] */;
3775 val* var16 /* : TKwend */;
3776 var_v = p0;
3777 var = self->attrs[COLOR_parser_nodes__AStdClassdef___n_doc].val; /* _n_doc on <self:AStdClassdef> */
3778 {
3779 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3780 }
3781 var1 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_kwredef].val; /* _n_kwredef on <self:AStdClassdef> */
3782 {
3783 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3784 }
3785 var2 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_visibility].val; /* _n_visibility on <self:AStdClassdef> */
3786 if (unlikely(var2 == NULL)) {
3787 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_visibility");
3788 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 504);
3789 show_backtrace(1);
3790 }
3791 {
3792 parser_nodes__Visitor__enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3793 }
3794 var3 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_classkind].val; /* _n_classkind on <self:AStdClassdef> */
3795 if (unlikely(var3 == NULL)) {
3796 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_classkind");
3797 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 505);
3798 show_backtrace(1);
3799 }
3800 {
3801 parser_nodes__Visitor__enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3802 }
3803 var4 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_id].val; /* _n_id on <self:AStdClassdef> */
3804 {
3805 parser_nodes__Visitor__enter_visit(var_v, var4); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3806 }
3807 {
3808 { /* Inline parser_nodes#AStdClassdef#n_formaldefs (self) on <self:AStdClassdef> */
3809 var7 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_formaldefs].val; /* _n_formaldefs on <self:AStdClassdef> */
3810 if (unlikely(var7 == NULL)) {
3811 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_formaldefs");
3812 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 940);
3813 show_backtrace(1);
3814 }
3815 var5 = var7;
3816 RET_LABEL6:(void)0;
3817 }
3818 }
3819 {
3820 parser_nodes__ANodes__visit_all(var5, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var5:ANodes[AFormaldef]>*/
3821 }
3822 var8 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AStdClassdef> */
3823 {
3824 parser_nodes__Visitor__enter_visit(var_v, var8); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3825 }
3826 var9 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_extern_code_block].val; /* _n_extern_code_block on <self:AStdClassdef> */
3827 {
3828 parser_nodes__Visitor__enter_visit(var_v, var9); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3829 }
3830 {
3831 { /* Inline parser_nodes#AStdClassdef#n_superclasses (self) on <self:AStdClassdef> */
3832 var12 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_superclasses].val; /* _n_superclasses on <self:AStdClassdef> */
3833 if (unlikely(var12 == NULL)) {
3834 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_superclasses");
3835 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 942);
3836 show_backtrace(1);
3837 }
3838 var10 = var12;
3839 RET_LABEL11:(void)0;
3840 }
3841 }
3842 {
3843 parser_nodes__ANodes__visit_all(var10, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var10:ANodes[ASuperclass]>*/
3844 }
3845 {
3846 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:AStdClassdef> */
3847 var15 = self->attrs[COLOR_parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:AStdClassdef> */
3848 if (unlikely(var15 == NULL)) {
3849 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3850 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 929);
3851 show_backtrace(1);
3852 }
3853 var13 = var15;
3854 RET_LABEL14:(void)0;
3855 }
3856 }
3857 {
3858 parser_nodes__ANodes__visit_all(var13, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var13:ANodes[APropdef]>*/
3859 }
3860 var16 = self->attrs[COLOR_parser_nodes__AStdClassdef___n_kwend].val; /* _n_kwend on <self:AStdClassdef> */
3861 if (unlikely(var16 == NULL)) {
3862 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwend");
3863 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 512);
3864 show_backtrace(1);
3865 }
3866 {
3867 parser_nodes__Visitor__enter_visit(var_v, var16); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3868 }
3869 RET_LABEL:;
3870 }
3871 /* method parser_prod#AStdClassdef#visit_all for (self: Object, Visitor) */
3872 void VIRTUAL_parser_prod__AStdClassdef__visit_all(val* self, val* p0) {
3873 parser_prod__AStdClassdef__visit_all(self, p0); /* Direct call parser_prod#AStdClassdef#visit_all on <self:Object(AStdClassdef)>*/
3874 RET_LABEL:;
3875 }
3876 /* method parser_prod#ATopClassdef#init_atopclassdef for (self: ATopClassdef, Collection[Object]) */
3877 void parser_prod__ATopClassdef__init_atopclassdef(val* self, val* p0) {
3878 val* var_n_propdefs /* var n_propdefs: Collection[Object] */;
3879 val* var /* : ANodes[APropdef] */;
3880 val* var2 /* : ANodes[APropdef] */;
3881 var_n_propdefs = p0;
3882 {
3883 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:ATopClassdef> */
3884 var2 = self->attrs[COLOR_parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:ATopClassdef> */
3885 if (unlikely(var2 == NULL)) {
3886 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3887 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 929);
3888 show_backtrace(1);
3889 }
3890 var = var2;
3891 RET_LABEL1:(void)0;
3892 }
3893 }
3894 {
3895 parser_nodes__ANodes__unsafe_add_all(var, var_n_propdefs); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var:ANodes[APropdef]>*/
3896 }
3897 RET_LABEL:;
3898 }
3899 /* method parser_prod#ATopClassdef#init_atopclassdef for (self: Object, Collection[Object]) */
3900 void VIRTUAL_parser_prod__ATopClassdef__init_atopclassdef(val* self, val* p0) {
3901 parser_prod__ATopClassdef__init_atopclassdef(self, p0); /* Direct call parser_prod#ATopClassdef#init_atopclassdef on <self:Object(ATopClassdef)>*/
3902 RET_LABEL:;
3903 }
3904 /* method parser_prod#ATopClassdef#replace_child for (self: ATopClassdef, ANode, nullable ANode) */
3905 void parser_prod__ATopClassdef__replace_child(val* self, val* p0, val* p1) {
3906 val* var_old_child /* var old_child: ANode */;
3907 val* var_new_child /* var new_child: nullable ANode */;
3908 val* var /* : ANodes[APropdef] */;
3909 val* var2 /* : ANodes[APropdef] */;
3910 short int var3 /* : Bool */;
3911 var_old_child = p0;
3912 var_new_child = p1;
3913 {
3914 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:ATopClassdef> */
3915 var2 = self->attrs[COLOR_parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:ATopClassdef> */
3916 if (unlikely(var2 == NULL)) {
3917 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3918 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 929);
3919 show_backtrace(1);
3920 }
3921 var = var2;
3922 RET_LABEL1:(void)0;
3923 }
3924 }
3925 {
3926 var3 = parser_nodes__ANodes__replace_child(var, var_old_child, var_new_child);
3927 }
3928 if (var3){
3929 goto RET_LABEL;
3930 } else {
3931 }
3932 RET_LABEL:;
3933 }
3934 /* method parser_prod#ATopClassdef#replace_child for (self: Object, ANode, nullable ANode) */
3935 void VIRTUAL_parser_prod__ATopClassdef__replace_child(val* self, val* p0, val* p1) {
3936 parser_prod__ATopClassdef__replace_child(self, p0, p1); /* Direct call parser_prod#ATopClassdef#replace_child on <self:Object(ATopClassdef)>*/
3937 RET_LABEL:;
3938 }
3939 /* method parser_prod#ATopClassdef#visit_all for (self: ATopClassdef, Visitor) */
3940 void parser_prod__ATopClassdef__visit_all(val* self, val* p0) {
3941 val* var_v /* var v: Visitor */;
3942 val* var /* : ANodes[APropdef] */;
3943 val* var2 /* : ANodes[APropdef] */;
3944 var_v = p0;
3945 {
3946 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:ATopClassdef> */
3947 var2 = self->attrs[COLOR_parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:ATopClassdef> */
3948 if (unlikely(var2 == NULL)) {
3949 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3950 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 929);
3951 show_backtrace(1);
3952 }
3953 var = var2;
3954 RET_LABEL1:(void)0;
3955 }
3956 }
3957 {
3958 parser_nodes__ANodes__visit_all(var, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var:ANodes[APropdef]>*/
3959 }
3960 RET_LABEL:;
3961 }
3962 /* method parser_prod#ATopClassdef#visit_all for (self: Object, Visitor) */
3963 void VIRTUAL_parser_prod__ATopClassdef__visit_all(val* self, val* p0) {
3964 parser_prod__ATopClassdef__visit_all(self, p0); /* Direct call parser_prod#ATopClassdef#visit_all on <self:Object(ATopClassdef)>*/
3965 RET_LABEL:;
3966 }
3967 /* method parser_prod#AMainClassdef#init_amainclassdef for (self: AMainClassdef, Collection[Object]) */
3968 void parser_prod__AMainClassdef__init_amainclassdef(val* self, val* p0) {
3969 val* var_n_propdefs /* var n_propdefs: Collection[Object] */;
3970 val* var /* : ANodes[APropdef] */;
3971 val* var2 /* : ANodes[APropdef] */;
3972 var_n_propdefs = p0;
3973 {
3974 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:AMainClassdef> */
3975 var2 = self->attrs[COLOR_parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:AMainClassdef> */
3976 if (unlikely(var2 == NULL)) {
3977 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3978 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 929);
3979 show_backtrace(1);
3980 }
3981 var = var2;
3982 RET_LABEL1:(void)0;
3983 }
3984 }
3985 {
3986 parser_nodes__ANodes__unsafe_add_all(var, var_n_propdefs); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var:ANodes[APropdef]>*/
3987 }
3988 RET_LABEL:;
3989 }
3990 /* method parser_prod#AMainClassdef#init_amainclassdef for (self: Object, Collection[Object]) */
3991 void VIRTUAL_parser_prod__AMainClassdef__init_amainclassdef(val* self, val* p0) {
3992 parser_prod__AMainClassdef__init_amainclassdef(self, p0); /* Direct call parser_prod#AMainClassdef#init_amainclassdef on <self:Object(AMainClassdef)>*/
3993 RET_LABEL:;
3994 }
3995 /* method parser_prod#AMainClassdef#replace_child for (self: AMainClassdef, ANode, nullable ANode) */
3996 void parser_prod__AMainClassdef__replace_child(val* self, val* p0, val* p1) {
3997 val* var_old_child /* var old_child: ANode */;
3998 val* var_new_child /* var new_child: nullable ANode */;
3999 val* var /* : ANodes[APropdef] */;
4000 val* var2 /* : ANodes[APropdef] */;
4001 short int var3 /* : Bool */;
4002 var_old_child = p0;
4003 var_new_child = p1;
4004 {
4005 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:AMainClassdef> */
4006 var2 = self->attrs[COLOR_parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:AMainClassdef> */
4007 if (unlikely(var2 == NULL)) {
4008 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
4009 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 929);
4010 show_backtrace(1);
4011 }
4012 var = var2;
4013 RET_LABEL1:(void)0;
4014 }
4015 }
4016 {
4017 var3 = parser_nodes__ANodes__replace_child(var, var_old_child, var_new_child);
4018 }
4019 if (var3){
4020 goto RET_LABEL;
4021 } else {
4022 }
4023 RET_LABEL:;
4024 }
4025 /* method parser_prod#AMainClassdef#replace_child for (self: Object, ANode, nullable ANode) */
4026 void VIRTUAL_parser_prod__AMainClassdef__replace_child(val* self, val* p0, val* p1) {
4027 parser_prod__AMainClassdef__replace_child(self, p0, p1); /* Direct call parser_prod#AMainClassdef#replace_child on <self:Object(AMainClassdef)>*/
4028 RET_LABEL:;
4029 }
4030 /* method parser_prod#AMainClassdef#visit_all for (self: AMainClassdef, Visitor) */
4031 void parser_prod__AMainClassdef__visit_all(val* self, val* p0) {
4032 val* var_v /* var v: Visitor */;
4033 val* var /* : ANodes[APropdef] */;
4034 val* var2 /* : ANodes[APropdef] */;
4035 var_v = p0;
4036 {
4037 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:AMainClassdef> */
4038 var2 = self->attrs[COLOR_parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:AMainClassdef> */
4039 if (unlikely(var2 == NULL)) {
4040 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
4041 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 929);
4042 show_backtrace(1);
4043 }
4044 var = var2;
4045 RET_LABEL1:(void)0;
4046 }
4047 }
4048 {
4049 parser_nodes__ANodes__visit_all(var, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var:ANodes[APropdef]>*/
4050 }
4051 RET_LABEL:;
4052 }
4053 /* method parser_prod#AMainClassdef#visit_all for (self: Object, Visitor) */
4054 void VIRTUAL_parser_prod__AMainClassdef__visit_all(val* self, val* p0) {
4055 parser_prod__AMainClassdef__visit_all(self, p0); /* Direct call parser_prod#AMainClassdef#visit_all on <self:Object(AMainClassdef)>*/
4056 RET_LABEL:;
4057 }
4058 /* method parser_prod#AConcreteClasskind#init_aconcreteclasskind for (self: AConcreteClasskind, nullable TKwclass) */
4059 void parser_prod__AConcreteClasskind__init_aconcreteclasskind(val* self, val* p0) {
4060 val* var_n_kwclass /* var n_kwclass: nullable TKwclass */;
4061 var_n_kwclass = p0;
4062 if (unlikely(var_n_kwclass == NULL)) {
4063 PRINT_ERROR("Runtime error: %s", "Cast failed");
4064 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 560);
4065 show_backtrace(1);
4066 }
4067 self->attrs[COLOR_parser_nodes__AConcreteClasskind___n_kwclass].val = var_n_kwclass; /* _n_kwclass on <self:AConcreteClasskind> */
4068 if (var_n_kwclass == NULL) {
4069 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4070 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 561);
4071 show_backtrace(1);
4072 } else {
4073 { /* Inline parser_nodes#ANode#parent= (var_n_kwclass,self) on <var_n_kwclass:nullable TKwclass> */
4074 if (unlikely(var_n_kwclass == NULL)) {
4075 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4076 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
4077 show_backtrace(1);
4078 }
4079 var_n_kwclass->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwclass:nullable TKwclass> */
4080 RET_LABEL1:(void)0;
4081 }
4082 }
4083 RET_LABEL:;
4084 }
4085 /* method parser_prod#AConcreteClasskind#init_aconcreteclasskind for (self: Object, nullable TKwclass) */
4086 void VIRTUAL_parser_prod__AConcreteClasskind__init_aconcreteclasskind(val* self, val* p0) {
4087 parser_prod__AConcreteClasskind__init_aconcreteclasskind(self, p0); /* Direct call parser_prod#AConcreteClasskind#init_aconcreteclasskind on <self:Object(AConcreteClasskind)>*/
4088 RET_LABEL:;
4089 }
4090 /* method parser_prod#AConcreteClasskind#replace_child for (self: AConcreteClasskind, ANode, nullable ANode) */
4091 void parser_prod__AConcreteClasskind__replace_child(val* self, val* p0, val* p1) {
4092 val* var_old_child /* var old_child: ANode */;
4093 val* var_new_child /* var new_child: nullable ANode */;
4094 val* var /* : TKwclass */;
4095 short int var1 /* : Bool */;
4096 short int var2 /* : Bool */;
4097 val* var_other /* var other: nullable Object */;
4098 short int var4 /* : Bool */;
4099 short int var6 /* : Bool */;
4100 short int var7 /* : Bool */;
4101 int cltype;
4102 int idtype;
4103 const char* var_class_name;
4104 var_old_child = p0;
4105 var_new_child = p1;
4106 var = self->attrs[COLOR_parser_nodes__AConcreteClasskind___n_kwclass].val; /* _n_kwclass on <self:AConcreteClasskind> */
4107 if (unlikely(var == NULL)) {
4108 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwclass");
4109 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 566);
4110 show_backtrace(1);
4111 }
4112 {
4113 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwclass> */
4114 var_other = var_old_child;
4115 {
4116 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwclass> */
4117 var6 = var == var_other;
4118 var4 = var6;
4119 goto RET_LABEL5;
4120 RET_LABEL5:(void)0;
4121 }
4122 }
4123 var2 = var4;
4124 goto RET_LABEL3;
4125 RET_LABEL3:(void)0;
4126 }
4127 var1 = var2;
4128 }
4129 if (var1){
4130 /* <var_new_child:nullable ANode> isa TKwclass */
4131 cltype = type_parser_nodes__TKwclass.color;
4132 idtype = type_parser_nodes__TKwclass.id;
4133 if(var_new_child == NULL) {
4134 var7 = 0;
4135 } else {
4136 if(cltype >= var_new_child->type->table_size) {
4137 var7 = 0;
4138 } else {
4139 var7 = var_new_child->type->type_table[cltype] == idtype;
4140 }
4141 }
4142 if (unlikely(!var7)) {
4143 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
4144 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwclass", var_class_name);
4145 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 567);
4146 show_backtrace(1);
4147 }
4148 {
4149 parser_prod__AConcreteClasskind__n_kwclass_61d(self, var_new_child); /* Direct call parser_prod#AConcreteClasskind#n_kwclass= on <self:AConcreteClasskind>*/
4150 }
4151 goto RET_LABEL;
4152 } else {
4153 }
4154 RET_LABEL:;
4155 }
4156 /* method parser_prod#AConcreteClasskind#replace_child for (self: Object, ANode, nullable ANode) */
4157 void VIRTUAL_parser_prod__AConcreteClasskind__replace_child(val* self, val* p0, val* p1) {
4158 parser_prod__AConcreteClasskind__replace_child(self, p0, p1); /* Direct call parser_prod#AConcreteClasskind#replace_child on <self:Object(AConcreteClasskind)>*/
4159 RET_LABEL:;
4160 }
4161 /* method parser_prod#AConcreteClasskind#n_kwclass= for (self: AConcreteClasskind, TKwclass) */
4162 void parser_prod__AConcreteClasskind__n_kwclass_61d(val* self, val* p0) {
4163 val* var_node /* var node: TKwclass */;
4164 var_node = p0;
4165 self->attrs[COLOR_parser_nodes__AConcreteClasskind___n_kwclass].val = var_node; /* _n_kwclass on <self:AConcreteClasskind> */
4166 {
4167 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwclass> */
4168 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwclass> */
4169 RET_LABEL1:(void)0;
4170 }
4171 }
4172 RET_LABEL:;
4173 }
4174 /* method parser_prod#AConcreteClasskind#n_kwclass= for (self: Object, TKwclass) */
4175 void VIRTUAL_parser_prod__AConcreteClasskind__n_kwclass_61d(val* self, val* p0) {
4176 parser_prod__AConcreteClasskind__n_kwclass_61d(self, p0); /* Direct call parser_prod#AConcreteClasskind#n_kwclass= on <self:Object(AConcreteClasskind)>*/
4177 RET_LABEL:;
4178 }
4179 /* method parser_prod#AConcreteClasskind#visit_all for (self: AConcreteClasskind, Visitor) */
4180 void parser_prod__AConcreteClasskind__visit_all(val* self, val* p0) {
4181 val* var_v /* var v: Visitor */;
4182 val* var /* : TKwclass */;
4183 var_v = p0;
4184 var = self->attrs[COLOR_parser_nodes__AConcreteClasskind___n_kwclass].val; /* _n_kwclass on <self:AConcreteClasskind> */
4185 if (unlikely(var == NULL)) {
4186 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwclass");
4187 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 581);
4188 show_backtrace(1);
4189 }
4190 {
4191 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4192 }
4193 RET_LABEL:;
4194 }
4195 /* method parser_prod#AConcreteClasskind#visit_all for (self: Object, Visitor) */
4196 void VIRTUAL_parser_prod__AConcreteClasskind__visit_all(val* self, val* p0) {
4197 parser_prod__AConcreteClasskind__visit_all(self, p0); /* Direct call parser_prod#AConcreteClasskind#visit_all on <self:Object(AConcreteClasskind)>*/
4198 RET_LABEL:;
4199 }
4200 /* method parser_prod#AAbstractClasskind#init_aabstractclasskind for (self: AAbstractClasskind, nullable TKwabstract, nullable TKwclass) */
4201 void parser_prod__AAbstractClasskind__init_aabstractclasskind(val* self, val* p0, val* p1) {
4202 val* var_n_kwabstract /* var n_kwabstract: nullable TKwabstract */;
4203 val* var_n_kwclass /* var n_kwclass: nullable TKwclass */;
4204 var_n_kwabstract = p0;
4205 var_n_kwclass = p1;
4206 if (unlikely(var_n_kwabstract == NULL)) {
4207 PRINT_ERROR("Runtime error: %s", "Cast failed");
4208 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 590);
4209 show_backtrace(1);
4210 }
4211 self->attrs[COLOR_parser_nodes__AAbstractClasskind___n_kwabstract].val = var_n_kwabstract; /* _n_kwabstract on <self:AAbstractClasskind> */
4212 if (var_n_kwabstract == NULL) {
4213 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4214 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 591);
4215 show_backtrace(1);
4216 } else {
4217 { /* Inline parser_nodes#ANode#parent= (var_n_kwabstract,self) on <var_n_kwabstract:nullable TKwabstract> */
4218 if (unlikely(var_n_kwabstract == NULL)) {
4219 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4220 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
4221 show_backtrace(1);
4222 }
4223 var_n_kwabstract->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwabstract:nullable TKwabstract> */
4224 RET_LABEL1:(void)0;
4225 }
4226 }
4227 if (unlikely(var_n_kwclass == NULL)) {
4228 PRINT_ERROR("Runtime error: %s", "Cast failed");
4229 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 592);
4230 show_backtrace(1);
4231 }
4232 self->attrs[COLOR_parser_nodes__AAbstractClasskind___n_kwclass].val = var_n_kwclass; /* _n_kwclass on <self:AAbstractClasskind> */
4233 if (var_n_kwclass == NULL) {
4234 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4235 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 593);
4236 show_backtrace(1);
4237 } else {
4238 { /* Inline parser_nodes#ANode#parent= (var_n_kwclass,self) on <var_n_kwclass:nullable TKwclass> */
4239 if (unlikely(var_n_kwclass == NULL)) {
4240 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4241 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
4242 show_backtrace(1);
4243 }
4244 var_n_kwclass->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwclass:nullable TKwclass> */
4245 RET_LABEL2:(void)0;
4246 }
4247 }
4248 RET_LABEL:;
4249 }
4250 /* method parser_prod#AAbstractClasskind#init_aabstractclasskind for (self: Object, nullable TKwabstract, nullable TKwclass) */
4251 void VIRTUAL_parser_prod__AAbstractClasskind__init_aabstractclasskind(val* self, val* p0, val* p1) {
4252 parser_prod__AAbstractClasskind__init_aabstractclasskind(self, p0, p1); /* Direct call parser_prod#AAbstractClasskind#init_aabstractclasskind on <self:Object(AAbstractClasskind)>*/
4253 RET_LABEL:;
4254 }
4255 /* method parser_prod#AAbstractClasskind#replace_child for (self: AAbstractClasskind, ANode, nullable ANode) */
4256 void parser_prod__AAbstractClasskind__replace_child(val* self, val* p0, val* p1) {
4257 val* var_old_child /* var old_child: ANode */;
4258 val* var_new_child /* var new_child: nullable ANode */;
4259 val* var /* : TKwabstract */;
4260 short int var1 /* : Bool */;
4261 short int var2 /* : Bool */;
4262 val* var_other /* var other: nullable Object */;
4263 short int var4 /* : Bool */;
4264 short int var6 /* : Bool */;
4265 short int var7 /* : Bool */;
4266 int cltype;
4267 int idtype;
4268 const char* var_class_name;
4269 val* var8 /* : TKwclass */;
4270 short int var9 /* : Bool */;
4271 short int var10 /* : Bool */;
4272 short int var12 /* : Bool */;
4273 short int var14 /* : Bool */;
4274 short int var15 /* : Bool */;
4275 int cltype16;
4276 int idtype17;
4277 const char* var_class_name18;
4278 var_old_child = p0;
4279 var_new_child = p1;
4280 var = self->attrs[COLOR_parser_nodes__AAbstractClasskind___n_kwabstract].val; /* _n_kwabstract on <self:AAbstractClasskind> */
4281 if (unlikely(var == NULL)) {
4282 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwabstract");
4283 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 598);
4284 show_backtrace(1);
4285 }
4286 {
4287 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwabstract> */
4288 var_other = var_old_child;
4289 {
4290 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwabstract> */
4291 var6 = var == var_other;
4292 var4 = var6;
4293 goto RET_LABEL5;
4294 RET_LABEL5:(void)0;
4295 }
4296 }
4297 var2 = var4;
4298 goto RET_LABEL3;
4299 RET_LABEL3:(void)0;
4300 }
4301 var1 = var2;
4302 }
4303 if (var1){
4304 /* <var_new_child:nullable ANode> isa TKwabstract */
4305 cltype = type_parser_nodes__TKwabstract.color;
4306 idtype = type_parser_nodes__TKwabstract.id;
4307 if(var_new_child == NULL) {
4308 var7 = 0;
4309 } else {
4310 if(cltype >= var_new_child->type->table_size) {
4311 var7 = 0;
4312 } else {
4313 var7 = var_new_child->type->type_table[cltype] == idtype;
4314 }
4315 }
4316 if (unlikely(!var7)) {
4317 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
4318 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwabstract", var_class_name);
4319 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 599);
4320 show_backtrace(1);
4321 }
4322 {
4323 parser_prod__AAbstractClasskind__n_kwabstract_61d(self, var_new_child); /* Direct call parser_prod#AAbstractClasskind#n_kwabstract= on <self:AAbstractClasskind>*/
4324 }
4325 goto RET_LABEL;
4326 } else {
4327 }
4328 var8 = self->attrs[COLOR_parser_nodes__AAbstractClasskind___n_kwclass].val; /* _n_kwclass on <self:AAbstractClasskind> */
4329 if (unlikely(var8 == NULL)) {
4330 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwclass");
4331 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 602);
4332 show_backtrace(1);
4333 }
4334 {
4335 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:TKwclass> */
4336 var_other = var_old_child;
4337 {
4338 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:TKwclass> */
4339 var14 = var8 == var_other;
4340 var12 = var14;
4341 goto RET_LABEL13;
4342 RET_LABEL13:(void)0;
4343 }
4344 }
4345 var10 = var12;
4346 goto RET_LABEL11;
4347 RET_LABEL11:(void)0;
4348 }
4349 var9 = var10;
4350 }
4351 if (var9){
4352 /* <var_new_child:nullable ANode> isa TKwclass */
4353 cltype16 = type_parser_nodes__TKwclass.color;
4354 idtype17 = type_parser_nodes__TKwclass.id;
4355 if(var_new_child == NULL) {
4356 var15 = 0;
4357 } else {
4358 if(cltype16 >= var_new_child->type->table_size) {
4359 var15 = 0;
4360 } else {
4361 var15 = var_new_child->type->type_table[cltype16] == idtype17;
4362 }
4363 }
4364 if (unlikely(!var15)) {
4365 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
4366 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwclass", var_class_name18);
4367 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 603);
4368 show_backtrace(1);
4369 }
4370 {
4371 parser_prod__AAbstractClasskind__n_kwclass_61d(self, var_new_child); /* Direct call parser_prod#AAbstractClasskind#n_kwclass= on <self:AAbstractClasskind>*/
4372 }
4373 goto RET_LABEL;
4374 } else {
4375 }
4376 RET_LABEL:;
4377 }
4378 /* method parser_prod#AAbstractClasskind#replace_child for (self: Object, ANode, nullable ANode) */
4379 void VIRTUAL_parser_prod__AAbstractClasskind__replace_child(val* self, val* p0, val* p1) {
4380 parser_prod__AAbstractClasskind__replace_child(self, p0, p1); /* Direct call parser_prod#AAbstractClasskind#replace_child on <self:Object(AAbstractClasskind)>*/
4381 RET_LABEL:;
4382 }
4383 /* method parser_prod#AAbstractClasskind#n_kwabstract= for (self: AAbstractClasskind, TKwabstract) */
4384 void parser_prod__AAbstractClasskind__n_kwabstract_61d(val* self, val* p0) {
4385 val* var_node /* var node: TKwabstract */;
4386 var_node = p0;
4387 self->attrs[COLOR_parser_nodes__AAbstractClasskind___n_kwabstract].val = var_node; /* _n_kwabstract on <self:AAbstractClasskind> */
4388 {
4389 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwabstract> */
4390 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwabstract> */
4391 RET_LABEL1:(void)0;
4392 }
4393 }
4394 RET_LABEL:;
4395 }
4396 /* method parser_prod#AAbstractClasskind#n_kwabstract= for (self: Object, TKwabstract) */
4397 void VIRTUAL_parser_prod__AAbstractClasskind__n_kwabstract_61d(val* self, val* p0) {
4398 parser_prod__AAbstractClasskind__n_kwabstract_61d(self, p0); /* Direct call parser_prod#AAbstractClasskind#n_kwabstract= on <self:Object(AAbstractClasskind)>*/
4399 RET_LABEL:;
4400 }
4401 /* method parser_prod#AAbstractClasskind#n_kwclass= for (self: AAbstractClasskind, TKwclass) */
4402 void parser_prod__AAbstractClasskind__n_kwclass_61d(val* self, val* p0) {
4403 val* var_node /* var node: TKwclass */;
4404 var_node = p0;
4405 self->attrs[COLOR_parser_nodes__AAbstractClasskind___n_kwclass].val = var_node; /* _n_kwclass on <self:AAbstractClasskind> */
4406 {
4407 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwclass> */
4408 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwclass> */
4409 RET_LABEL1:(void)0;
4410 }
4411 }
4412 RET_LABEL:;
4413 }
4414 /* method parser_prod#AAbstractClasskind#n_kwclass= for (self: Object, TKwclass) */
4415 void VIRTUAL_parser_prod__AAbstractClasskind__n_kwclass_61d(val* self, val* p0) {
4416 parser_prod__AAbstractClasskind__n_kwclass_61d(self, p0); /* Direct call parser_prod#AAbstractClasskind#n_kwclass= on <self:Object(AAbstractClasskind)>*/
4417 RET_LABEL:;
4418 }
4419 /* method parser_prod#AAbstractClasskind#visit_all for (self: AAbstractClasskind, Visitor) */
4420 void parser_prod__AAbstractClasskind__visit_all(val* self, val* p0) {
4421 val* var_v /* var v: Visitor */;
4422 val* var /* : TKwabstract */;
4423 val* var1 /* : TKwclass */;
4424 var_v = p0;
4425 var = self->attrs[COLOR_parser_nodes__AAbstractClasskind___n_kwabstract].val; /* _n_kwabstract on <self:AAbstractClasskind> */
4426 if (unlikely(var == NULL)) {
4427 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwabstract");
4428 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 622);
4429 show_backtrace(1);
4430 }
4431 {
4432 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4433 }
4434 var1 = self->attrs[COLOR_parser_nodes__AAbstractClasskind___n_kwclass].val; /* _n_kwclass on <self:AAbstractClasskind> */
4435 if (unlikely(var1 == NULL)) {
4436 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwclass");
4437 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 623);
4438 show_backtrace(1);
4439 }
4440 {
4441 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4442 }
4443 RET_LABEL:;
4444 }
4445 /* method parser_prod#AAbstractClasskind#visit_all for (self: Object, Visitor) */
4446 void VIRTUAL_parser_prod__AAbstractClasskind__visit_all(val* self, val* p0) {
4447 parser_prod__AAbstractClasskind__visit_all(self, p0); /* Direct call parser_prod#AAbstractClasskind#visit_all on <self:Object(AAbstractClasskind)>*/
4448 RET_LABEL:;
4449 }
4450 /* method parser_prod#AInterfaceClasskind#init_ainterfaceclasskind for (self: AInterfaceClasskind, nullable TKwinterface) */
4451 void parser_prod__AInterfaceClasskind__init_ainterfaceclasskind(val* self, val* p0) {
4452 val* var_n_kwinterface /* var n_kwinterface: nullable TKwinterface */;
4453 var_n_kwinterface = p0;
4454 if (unlikely(var_n_kwinterface == NULL)) {
4455 PRINT_ERROR("Runtime error: %s", "Cast failed");
4456 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 631);
4457 show_backtrace(1);
4458 }
4459 self->attrs[COLOR_parser_nodes__AInterfaceClasskind___n_kwinterface].val = var_n_kwinterface; /* _n_kwinterface on <self:AInterfaceClasskind> */
4460 if (var_n_kwinterface == NULL) {
4461 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4462 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 632);
4463 show_backtrace(1);
4464 } else {
4465 { /* Inline parser_nodes#ANode#parent= (var_n_kwinterface,self) on <var_n_kwinterface:nullable TKwinterface> */
4466 if (unlikely(var_n_kwinterface == NULL)) {
4467 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4468 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
4469 show_backtrace(1);
4470 }
4471 var_n_kwinterface->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwinterface:nullable TKwinterface> */
4472 RET_LABEL1:(void)0;
4473 }
4474 }
4475 RET_LABEL:;
4476 }
4477 /* method parser_prod#AInterfaceClasskind#init_ainterfaceclasskind for (self: Object, nullable TKwinterface) */
4478 void VIRTUAL_parser_prod__AInterfaceClasskind__init_ainterfaceclasskind(val* self, val* p0) {
4479 parser_prod__AInterfaceClasskind__init_ainterfaceclasskind(self, p0); /* Direct call parser_prod#AInterfaceClasskind#init_ainterfaceclasskind on <self:Object(AInterfaceClasskind)>*/
4480 RET_LABEL:;
4481 }
4482 /* method parser_prod#AInterfaceClasskind#replace_child for (self: AInterfaceClasskind, ANode, nullable ANode) */
4483 void parser_prod__AInterfaceClasskind__replace_child(val* self, val* p0, val* p1) {
4484 val* var_old_child /* var old_child: ANode */;
4485 val* var_new_child /* var new_child: nullable ANode */;
4486 val* var /* : TKwinterface */;
4487 short int var1 /* : Bool */;
4488 short int var2 /* : Bool */;
4489 val* var_other /* var other: nullable Object */;
4490 short int var4 /* : Bool */;
4491 short int var6 /* : Bool */;
4492 short int var7 /* : Bool */;
4493 int cltype;
4494 int idtype;
4495 const char* var_class_name;
4496 var_old_child = p0;
4497 var_new_child = p1;
4498 var = self->attrs[COLOR_parser_nodes__AInterfaceClasskind___n_kwinterface].val; /* _n_kwinterface on <self:AInterfaceClasskind> */
4499 if (unlikely(var == NULL)) {
4500 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwinterface");
4501 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 637);
4502 show_backtrace(1);
4503 }
4504 {
4505 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwinterface> */
4506 var_other = var_old_child;
4507 {
4508 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwinterface> */
4509 var6 = var == var_other;
4510 var4 = var6;
4511 goto RET_LABEL5;
4512 RET_LABEL5:(void)0;
4513 }
4514 }
4515 var2 = var4;
4516 goto RET_LABEL3;
4517 RET_LABEL3:(void)0;
4518 }
4519 var1 = var2;
4520 }
4521 if (var1){
4522 /* <var_new_child:nullable ANode> isa TKwinterface */
4523 cltype = type_parser_nodes__TKwinterface.color;
4524 idtype = type_parser_nodes__TKwinterface.id;
4525 if(var_new_child == NULL) {
4526 var7 = 0;
4527 } else {
4528 if(cltype >= var_new_child->type->table_size) {
4529 var7 = 0;
4530 } else {
4531 var7 = var_new_child->type->type_table[cltype] == idtype;
4532 }
4533 }
4534 if (unlikely(!var7)) {
4535 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
4536 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwinterface", var_class_name);
4537 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 638);
4538 show_backtrace(1);
4539 }
4540 {
4541 parser_prod__AInterfaceClasskind__n_kwinterface_61d(self, var_new_child); /* Direct call parser_prod#AInterfaceClasskind#n_kwinterface= on <self:AInterfaceClasskind>*/
4542 }
4543 goto RET_LABEL;
4544 } else {
4545 }
4546 RET_LABEL:;
4547 }
4548 /* method parser_prod#AInterfaceClasskind#replace_child for (self: Object, ANode, nullable ANode) */
4549 void VIRTUAL_parser_prod__AInterfaceClasskind__replace_child(val* self, val* p0, val* p1) {
4550 parser_prod__AInterfaceClasskind__replace_child(self, p0, p1); /* Direct call parser_prod#AInterfaceClasskind#replace_child on <self:Object(AInterfaceClasskind)>*/
4551 RET_LABEL:;
4552 }
4553 /* method parser_prod#AInterfaceClasskind#n_kwinterface= for (self: AInterfaceClasskind, TKwinterface) */
4554 void parser_prod__AInterfaceClasskind__n_kwinterface_61d(val* self, val* p0) {
4555 val* var_node /* var node: TKwinterface */;
4556 var_node = p0;
4557 self->attrs[COLOR_parser_nodes__AInterfaceClasskind___n_kwinterface].val = var_node; /* _n_kwinterface on <self:AInterfaceClasskind> */
4558 {
4559 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwinterface> */
4560 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwinterface> */
4561 RET_LABEL1:(void)0;
4562 }
4563 }
4564 RET_LABEL:;
4565 }
4566 /* method parser_prod#AInterfaceClasskind#n_kwinterface= for (self: Object, TKwinterface) */
4567 void VIRTUAL_parser_prod__AInterfaceClasskind__n_kwinterface_61d(val* self, val* p0) {
4568 parser_prod__AInterfaceClasskind__n_kwinterface_61d(self, p0); /* Direct call parser_prod#AInterfaceClasskind#n_kwinterface= on <self:Object(AInterfaceClasskind)>*/
4569 RET_LABEL:;
4570 }
4571 /* method parser_prod#AInterfaceClasskind#visit_all for (self: AInterfaceClasskind, Visitor) */
4572 void parser_prod__AInterfaceClasskind__visit_all(val* self, val* p0) {
4573 val* var_v /* var v: Visitor */;
4574 val* var /* : TKwinterface */;
4575 var_v = p0;
4576 var = self->attrs[COLOR_parser_nodes__AInterfaceClasskind___n_kwinterface].val; /* _n_kwinterface on <self:AInterfaceClasskind> */
4577 if (unlikely(var == NULL)) {
4578 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwinterface");
4579 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 652);
4580 show_backtrace(1);
4581 }
4582 {
4583 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4584 }
4585 RET_LABEL:;
4586 }
4587 /* method parser_prod#AInterfaceClasskind#visit_all for (self: Object, Visitor) */
4588 void VIRTUAL_parser_prod__AInterfaceClasskind__visit_all(val* self, val* p0) {
4589 parser_prod__AInterfaceClasskind__visit_all(self, p0); /* Direct call parser_prod#AInterfaceClasskind#visit_all on <self:Object(AInterfaceClasskind)>*/
4590 RET_LABEL:;
4591 }
4592 /* method parser_prod#AEnumClasskind#init_aenumclasskind for (self: AEnumClasskind, nullable TKwenum) */
4593 void parser_prod__AEnumClasskind__init_aenumclasskind(val* self, val* p0) {
4594 val* var_n_kwenum /* var n_kwenum: nullable TKwenum */;
4595 var_n_kwenum = p0;
4596 if (unlikely(var_n_kwenum == NULL)) {
4597 PRINT_ERROR("Runtime error: %s", "Cast failed");
4598 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 660);
4599 show_backtrace(1);
4600 }
4601 self->attrs[COLOR_parser_nodes__AEnumClasskind___n_kwenum].val = var_n_kwenum; /* _n_kwenum on <self:AEnumClasskind> */
4602 if (var_n_kwenum == NULL) {
4603 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4604 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 661);
4605 show_backtrace(1);
4606 } else {
4607 { /* Inline parser_nodes#ANode#parent= (var_n_kwenum,self) on <var_n_kwenum:nullable TKwenum> */
4608 if (unlikely(var_n_kwenum == NULL)) {
4609 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4610 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
4611 show_backtrace(1);
4612 }
4613 var_n_kwenum->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwenum:nullable TKwenum> */
4614 RET_LABEL1:(void)0;
4615 }
4616 }
4617 RET_LABEL:;
4618 }
4619 /* method parser_prod#AEnumClasskind#init_aenumclasskind for (self: Object, nullable TKwenum) */
4620 void VIRTUAL_parser_prod__AEnumClasskind__init_aenumclasskind(val* self, val* p0) {
4621 parser_prod__AEnumClasskind__init_aenumclasskind(self, p0); /* Direct call parser_prod#AEnumClasskind#init_aenumclasskind on <self:Object(AEnumClasskind)>*/
4622 RET_LABEL:;
4623 }
4624 /* method parser_prod#AEnumClasskind#replace_child for (self: AEnumClasskind, ANode, nullable ANode) */
4625 void parser_prod__AEnumClasskind__replace_child(val* self, val* p0, val* p1) {
4626 val* var_old_child /* var old_child: ANode */;
4627 val* var_new_child /* var new_child: nullable ANode */;
4628 val* var /* : TKwenum */;
4629 short int var1 /* : Bool */;
4630 short int var2 /* : Bool */;
4631 val* var_other /* var other: nullable Object */;
4632 short int var4 /* : Bool */;
4633 short int var6 /* : Bool */;
4634 short int var7 /* : Bool */;
4635 int cltype;
4636 int idtype;
4637 const char* var_class_name;
4638 var_old_child = p0;
4639 var_new_child = p1;
4640 var = self->attrs[COLOR_parser_nodes__AEnumClasskind___n_kwenum].val; /* _n_kwenum on <self:AEnumClasskind> */
4641 if (unlikely(var == NULL)) {
4642 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwenum");
4643 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 666);
4644 show_backtrace(1);
4645 }
4646 {
4647 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwenum> */
4648 var_other = var_old_child;
4649 {
4650 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwenum> */
4651 var6 = var == var_other;
4652 var4 = var6;
4653 goto RET_LABEL5;
4654 RET_LABEL5:(void)0;
4655 }
4656 }
4657 var2 = var4;
4658 goto RET_LABEL3;
4659 RET_LABEL3:(void)0;
4660 }
4661 var1 = var2;
4662 }
4663 if (var1){
4664 /* <var_new_child:nullable ANode> isa TKwenum */
4665 cltype = type_parser_nodes__TKwenum.color;
4666 idtype = type_parser_nodes__TKwenum.id;
4667 if(var_new_child == NULL) {
4668 var7 = 0;
4669 } else {
4670 if(cltype >= var_new_child->type->table_size) {
4671 var7 = 0;
4672 } else {
4673 var7 = var_new_child->type->type_table[cltype] == idtype;
4674 }
4675 }
4676 if (unlikely(!var7)) {
4677 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
4678 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwenum", var_class_name);
4679 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 667);
4680 show_backtrace(1);
4681 }
4682 {
4683 parser_prod__AEnumClasskind__n_kwenum_61d(self, var_new_child); /* Direct call parser_prod#AEnumClasskind#n_kwenum= on <self:AEnumClasskind>*/
4684 }
4685 goto RET_LABEL;
4686 } else {
4687 }
4688 RET_LABEL:;
4689 }
4690 /* method parser_prod#AEnumClasskind#replace_child for (self: Object, ANode, nullable ANode) */
4691 void VIRTUAL_parser_prod__AEnumClasskind__replace_child(val* self, val* p0, val* p1) {
4692 parser_prod__AEnumClasskind__replace_child(self, p0, p1); /* Direct call parser_prod#AEnumClasskind#replace_child on <self:Object(AEnumClasskind)>*/
4693 RET_LABEL:;
4694 }
4695 /* method parser_prod#AEnumClasskind#n_kwenum= for (self: AEnumClasskind, TKwenum) */
4696 void parser_prod__AEnumClasskind__n_kwenum_61d(val* self, val* p0) {
4697 val* var_node /* var node: TKwenum */;
4698 var_node = p0;
4699 self->attrs[COLOR_parser_nodes__AEnumClasskind___n_kwenum].val = var_node; /* _n_kwenum on <self:AEnumClasskind> */
4700 {
4701 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwenum> */
4702 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwenum> */
4703 RET_LABEL1:(void)0;
4704 }
4705 }
4706 RET_LABEL:;
4707 }
4708 /* method parser_prod#AEnumClasskind#n_kwenum= for (self: Object, TKwenum) */
4709 void VIRTUAL_parser_prod__AEnumClasskind__n_kwenum_61d(val* self, val* p0) {
4710 parser_prod__AEnumClasskind__n_kwenum_61d(self, p0); /* Direct call parser_prod#AEnumClasskind#n_kwenum= on <self:Object(AEnumClasskind)>*/
4711 RET_LABEL:;
4712 }
4713 /* method parser_prod#AEnumClasskind#visit_all for (self: AEnumClasskind, Visitor) */
4714 void parser_prod__AEnumClasskind__visit_all(val* self, val* p0) {
4715 val* var_v /* var v: Visitor */;
4716 val* var /* : TKwenum */;
4717 var_v = p0;
4718 var = self->attrs[COLOR_parser_nodes__AEnumClasskind___n_kwenum].val; /* _n_kwenum on <self:AEnumClasskind> */
4719 if (unlikely(var == NULL)) {
4720 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwenum");
4721 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 681);
4722 show_backtrace(1);
4723 }
4724 {
4725 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4726 }
4727 RET_LABEL:;
4728 }
4729 /* method parser_prod#AEnumClasskind#visit_all for (self: Object, Visitor) */
4730 void VIRTUAL_parser_prod__AEnumClasskind__visit_all(val* self, val* p0) {
4731 parser_prod__AEnumClasskind__visit_all(self, p0); /* Direct call parser_prod#AEnumClasskind#visit_all on <self:Object(AEnumClasskind)>*/
4732 RET_LABEL:;
4733 }
4734 /* method parser_prod#AExternClasskind#init_aexternclasskind for (self: AExternClasskind, nullable TKwextern, nullable TKwclass) */
4735 void parser_prod__AExternClasskind__init_aexternclasskind(val* self, val* p0, val* p1) {
4736 val* var_n_kwextern /* var n_kwextern: nullable TKwextern */;
4737 val* var_n_kwclass /* var n_kwclass: nullable TKwclass */;
4738 val* var /* : null */;
4739 short int var2 /* : Bool */;
4740 short int var3 /* : Bool */;
4741 val* var_other /* var other: nullable Object */;
4742 short int var5 /* : Bool */;
4743 short int var6 /* : Bool */;
4744 short int var7 /* : Bool */;
4745 var_n_kwextern = p0;
4746 var_n_kwclass = p1;
4747 if (unlikely(var_n_kwextern == NULL)) {
4748 PRINT_ERROR("Runtime error: %s", "Cast failed");
4749 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 690);
4750 show_backtrace(1);
4751 }
4752 self->attrs[COLOR_parser_nodes__AExternClasskind___n_kwextern].val = var_n_kwextern; /* _n_kwextern on <self:AExternClasskind> */
4753 if (var_n_kwextern == NULL) {
4754 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4755 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 691);
4756 show_backtrace(1);
4757 } else {
4758 { /* Inline parser_nodes#ANode#parent= (var_n_kwextern,self) on <var_n_kwextern:nullable TKwextern> */
4759 if (unlikely(var_n_kwextern == NULL)) {
4760 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4761 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
4762 show_backtrace(1);
4763 }
4764 var_n_kwextern->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwextern:nullable TKwextern> */
4765 RET_LABEL1:(void)0;
4766 }
4767 }
4768 self->attrs[COLOR_parser_nodes__AExternClasskind___n_kwclass].val = var_n_kwclass; /* _n_kwclass on <self:AExternClasskind> */
4769 var = NULL;
4770 if (var_n_kwclass == NULL) {
4771 var2 = 0; /* is null */
4772 } else {
4773 var2 = 1; /* arg is null and recv is not */
4774 }
4775 if (0) {
4776 { /* Inline kernel#Object#!= (var_n_kwclass,var) on <var_n_kwclass:nullable TKwclass> */
4777 var_other = var;
4778 {
4779 var6 = ((short int (*)(val*, val*))(var_n_kwclass->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_kwclass, var_other) /* == on <var_n_kwclass:nullable TKwclass(TKwclass)>*/;
4780 var5 = var6;
4781 }
4782 var7 = !var5;
4783 var3 = var7;
4784 goto RET_LABEL4;
4785 RET_LABEL4:(void)0;
4786 }
4787 var2 = var3;
4788 }
4789 if (var2){
4790 {
4791 { /* Inline parser_nodes#ANode#parent= (var_n_kwclass,self) on <var_n_kwclass:nullable TKwclass(TKwclass)> */
4792 var_n_kwclass->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwclass:nullable TKwclass(TKwclass)> */
4793 RET_LABEL8:(void)0;
4794 }
4795 }
4796 } else {
4797 }
4798 RET_LABEL:;
4799 }
4800 /* method parser_prod#AExternClasskind#init_aexternclasskind for (self: Object, nullable TKwextern, nullable TKwclass) */
4801 void VIRTUAL_parser_prod__AExternClasskind__init_aexternclasskind(val* self, val* p0, val* p1) {
4802 parser_prod__AExternClasskind__init_aexternclasskind(self, p0, p1); /* Direct call parser_prod#AExternClasskind#init_aexternclasskind on <self:Object(AExternClasskind)>*/
4803 RET_LABEL:;
4804 }
4805 /* method parser_prod#AExternClasskind#replace_child for (self: AExternClasskind, ANode, nullable ANode) */
4806 void parser_prod__AExternClasskind__replace_child(val* self, val* p0, val* p1) {
4807 val* var_old_child /* var old_child: ANode */;
4808 val* var_new_child /* var new_child: nullable ANode */;
4809 val* var /* : TKwextern */;
4810 short int var1 /* : Bool */;
4811 short int var2 /* : Bool */;
4812 val* var_other /* var other: nullable Object */;
4813 short int var4 /* : Bool */;
4814 short int var6 /* : Bool */;
4815 short int var7 /* : Bool */;
4816 int cltype;
4817 int idtype;
4818 const char* var_class_name;
4819 val* var8 /* : nullable TKwclass */;
4820 short int var9 /* : Bool */;
4821 short int var10 /* : Bool */;
4822 short int var12 /* : Bool */;
4823 short int var14 /* : Bool */;
4824 short int var15 /* : Bool */;
4825 int cltype16;
4826 int idtype17;
4827 const char* var_class_name18;
4828 var_old_child = p0;
4829 var_new_child = p1;
4830 var = self->attrs[COLOR_parser_nodes__AExternClasskind___n_kwextern].val; /* _n_kwextern on <self:AExternClasskind> */
4831 if (unlikely(var == NULL)) {
4832 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwextern");
4833 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 698);
4834 show_backtrace(1);
4835 }
4836 {
4837 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwextern> */
4838 var_other = var_old_child;
4839 {
4840 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwextern> */
4841 var6 = var == var_other;
4842 var4 = var6;
4843 goto RET_LABEL5;
4844 RET_LABEL5:(void)0;
4845 }
4846 }
4847 var2 = var4;
4848 goto RET_LABEL3;
4849 RET_LABEL3:(void)0;
4850 }
4851 var1 = var2;
4852 }
4853 if (var1){
4854 /* <var_new_child:nullable ANode> isa TKwextern */
4855 cltype = type_parser_nodes__TKwextern.color;
4856 idtype = type_parser_nodes__TKwextern.id;
4857 if(var_new_child == NULL) {
4858 var7 = 0;
4859 } else {
4860 if(cltype >= var_new_child->type->table_size) {
4861 var7 = 0;
4862 } else {
4863 var7 = var_new_child->type->type_table[cltype] == idtype;
4864 }
4865 }
4866 if (unlikely(!var7)) {
4867 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
4868 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwextern", var_class_name);
4869 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 699);
4870 show_backtrace(1);
4871 }
4872 {
4873 parser_prod__AExternClasskind__n_kwextern_61d(self, var_new_child); /* Direct call parser_prod#AExternClasskind#n_kwextern= on <self:AExternClasskind>*/
4874 }
4875 goto RET_LABEL;
4876 } else {
4877 }
4878 var8 = self->attrs[COLOR_parser_nodes__AExternClasskind___n_kwclass].val; /* _n_kwclass on <self:AExternClasskind> */
4879 if (var8 == NULL) {
4880 var9 = 0; /* <var_old_child:ANode> cannot be null */
4881 } else {
4882 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwclass> */
4883 var_other = var_old_child;
4884 {
4885 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwclass(TKwclass)> */
4886 var14 = var8 == var_other;
4887 var12 = var14;
4888 goto RET_LABEL13;
4889 RET_LABEL13:(void)0;
4890 }
4891 }
4892 var10 = var12;
4893 goto RET_LABEL11;
4894 RET_LABEL11:(void)0;
4895 }
4896 var9 = var10;
4897 }
4898 if (var9){
4899 /* <var_new_child:nullable ANode> isa nullable TKwclass */
4900 cltype16 = type_nullable_parser_nodes__TKwclass.color;
4901 idtype17 = type_nullable_parser_nodes__TKwclass.id;
4902 if(var_new_child == NULL) {
4903 var15 = 1;
4904 } else {
4905 if(cltype16 >= var_new_child->type->table_size) {
4906 var15 = 0;
4907 } else {
4908 var15 = var_new_child->type->type_table[cltype16] == idtype17;
4909 }
4910 }
4911 if (unlikely(!var15)) {
4912 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
4913 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwclass", var_class_name18);
4914 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 703);
4915 show_backtrace(1);
4916 }
4917 {
4918 parser_prod__AExternClasskind__n_kwclass_61d(self, var_new_child); /* Direct call parser_prod#AExternClasskind#n_kwclass= on <self:AExternClasskind>*/
4919 }
4920 goto RET_LABEL;
4921 } else {
4922 }
4923 RET_LABEL:;
4924 }
4925 /* method parser_prod#AExternClasskind#replace_child for (self: Object, ANode, nullable ANode) */
4926 void VIRTUAL_parser_prod__AExternClasskind__replace_child(val* self, val* p0, val* p1) {
4927 parser_prod__AExternClasskind__replace_child(self, p0, p1); /* Direct call parser_prod#AExternClasskind#replace_child on <self:Object(AExternClasskind)>*/
4928 RET_LABEL:;
4929 }
4930 /* method parser_prod#AExternClasskind#n_kwextern= for (self: AExternClasskind, TKwextern) */
4931 void parser_prod__AExternClasskind__n_kwextern_61d(val* self, val* p0) {
4932 val* var_node /* var node: TKwextern */;
4933 var_node = p0;
4934 self->attrs[COLOR_parser_nodes__AExternClasskind___n_kwextern].val = var_node; /* _n_kwextern on <self:AExternClasskind> */
4935 {
4936 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwextern> */
4937 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwextern> */
4938 RET_LABEL1:(void)0;
4939 }
4940 }
4941 RET_LABEL:;
4942 }
4943 /* method parser_prod#AExternClasskind#n_kwextern= for (self: Object, TKwextern) */
4944 void VIRTUAL_parser_prod__AExternClasskind__n_kwextern_61d(val* self, val* p0) {
4945 parser_prod__AExternClasskind__n_kwextern_61d(self, p0); /* Direct call parser_prod#AExternClasskind#n_kwextern= on <self:Object(AExternClasskind)>*/
4946 RET_LABEL:;
4947 }
4948 /* method parser_prod#AExternClasskind#n_kwclass= for (self: AExternClasskind, nullable TKwclass) */
4949 void parser_prod__AExternClasskind__n_kwclass_61d(val* self, val* p0) {
4950 val* var_node /* var node: nullable TKwclass */;
4951 val* var /* : null */;
4952 short int var1 /* : Bool */;
4953 short int var2 /* : Bool */;
4954 val* var_other /* var other: nullable Object */;
4955 short int var4 /* : Bool */;
4956 short int var5 /* : Bool */;
4957 short int var6 /* : Bool */;
4958 var_node = p0;
4959 self->attrs[COLOR_parser_nodes__AExternClasskind___n_kwclass].val = var_node; /* _n_kwclass on <self:AExternClasskind> */
4960 var = NULL;
4961 if (var_node == NULL) {
4962 var1 = 0; /* is null */
4963 } else {
4964 var1 = 1; /* arg is null and recv is not */
4965 }
4966 if (0) {
4967 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwclass> */
4968 var_other = var;
4969 {
4970 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwclass(TKwclass)>*/;
4971 var4 = var5;
4972 }
4973 var6 = !var4;
4974 var2 = var6;
4975 goto RET_LABEL3;
4976 RET_LABEL3:(void)0;
4977 }
4978 var1 = var2;
4979 }
4980 if (var1){
4981 {
4982 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwclass(TKwclass)> */
4983 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwclass(TKwclass)> */
4984 RET_LABEL7:(void)0;
4985 }
4986 }
4987 } else {
4988 }
4989 RET_LABEL:;
4990 }
4991 /* method parser_prod#AExternClasskind#n_kwclass= for (self: Object, nullable TKwclass) */
4992 void VIRTUAL_parser_prod__AExternClasskind__n_kwclass_61d(val* self, val* p0) {
4993 parser_prod__AExternClasskind__n_kwclass_61d(self, p0); /* Direct call parser_prod#AExternClasskind#n_kwclass= on <self:Object(AExternClasskind)>*/
4994 RET_LABEL:;
4995 }
4996 /* method parser_prod#AExternClasskind#visit_all for (self: AExternClasskind, Visitor) */
4997 void parser_prod__AExternClasskind__visit_all(val* self, val* p0) {
4998 val* var_v /* var v: Visitor */;
4999 val* var /* : TKwextern */;
5000 val* var1 /* : nullable TKwclass */;
5001 var_v = p0;
5002 var = self->attrs[COLOR_parser_nodes__AExternClasskind___n_kwextern].val; /* _n_kwextern on <self:AExternClasskind> */
5003 if (unlikely(var == NULL)) {
5004 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwextern");
5005 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 722);
5006 show_backtrace(1);
5007 }
5008 {
5009 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
5010 }
5011 var1 = self->attrs[COLOR_parser_nodes__AExternClasskind___n_kwclass].val; /* _n_kwclass on <self:AExternClasskind> */
5012 {
5013 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
5014 }
5015 RET_LABEL:;
5016 }
5017 /* method parser_prod#AExternClasskind#visit_all for (self: Object, Visitor) */
5018 void VIRTUAL_parser_prod__AExternClasskind__visit_all(val* self, val* p0) {
5019 parser_prod__AExternClasskind__visit_all(self, p0); /* Direct call parser_prod#AExternClasskind#visit_all on <self:Object(AExternClasskind)>*/
5020 RET_LABEL:;
5021 }
5022 /* method parser_prod#AFormaldef#init_aformaldef for (self: AFormaldef, nullable TClassid, nullable AType, nullable AAnnotations) */
5023 void parser_prod__AFormaldef__init_aformaldef(val* self, val* p0, val* p1, val* p2) {
5024 val* var_n_id /* var n_id: nullable TClassid */;
5025 val* var_n_type /* var n_type: nullable AType */;
5026 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
5027 val* var /* : null */;
5028 short int var2 /* : Bool */;
5029 short int var3 /* : Bool */;
5030 val* var_other /* var other: nullable Object */;
5031 short int var5 /* : Bool */;
5032 short int var6 /* : Bool */;
5033 short int var7 /* : Bool */;
5034 val* var9 /* : null */;
5035 short int var10 /* : Bool */;
5036 short int var11 /* : Bool */;
5037 short int var13 /* : Bool */;
5038 short int var14 /* : Bool */;
5039 short int var15 /* : Bool */;
5040 var_n_id = p0;
5041 var_n_type = p1;
5042 var_n_annotations = p2;
5043 if (unlikely(var_n_id == NULL)) {
5044 PRINT_ERROR("Runtime error: %s", "Cast failed");
5045 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 733);
5046 show_backtrace(1);
5047 }
5048 self->attrs[COLOR_parser_nodes__AFormaldef___n_id].val = var_n_id; /* _n_id on <self:AFormaldef> */
5049 if (var_n_id == NULL) {
5050 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5051 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 734);
5052 show_backtrace(1);
5053 } else {
5054 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TClassid> */
5055 if (unlikely(var_n_id == NULL)) {
5056 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5057 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
5058 show_backtrace(1);
5059 }
5060 var_n_id->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_id:nullable TClassid> */
5061 RET_LABEL1:(void)0;
5062 }
5063 }
5064 self->attrs[COLOR_parser_nodes__AFormaldef___n_type].val = var_n_type; /* _n_type on <self:AFormaldef> */
5065 var = NULL;
5066 if (var_n_type == NULL) {
5067 var2 = 0; /* is null */
5068 } else {
5069 var2 = 1; /* arg is null and recv is not */
5070 }
5071 if (0) {
5072 { /* Inline kernel#Object#!= (var_n_type,var) on <var_n_type:nullable AType> */
5073 var_other = var;
5074 {
5075 var6 = ((short int (*)(val*, val*))(var_n_type->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_type, var_other) /* == on <var_n_type:nullable AType(AType)>*/;
5076 var5 = var6;
5077 }
5078 var7 = !var5;
5079 var3 = var7;
5080 goto RET_LABEL4;
5081 RET_LABEL4:(void)0;
5082 }
5083 var2 = var3;
5084 }
5085 if (var2){
5086 {
5087 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType(AType)> */
5088 var_n_type->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_type:nullable AType(AType)> */
5089 RET_LABEL8:(void)0;
5090 }
5091 }
5092 } else {
5093 }
5094 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AFormaldef> */
5095 var9 = NULL;
5096 if (var_n_annotations == NULL) {
5097 var10 = 0; /* is null */
5098 } else {
5099 var10 = 1; /* arg is null and recv is not */
5100 }
5101 if (0) {
5102 { /* Inline kernel#Object#!= (var_n_annotations,var9) on <var_n_annotations:nullable AAnnotations> */
5103 var_other = var9;
5104 {
5105 var14 = ((short int (*)(val*, val*))(var_n_annotations->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
5106 var13 = var14;
5107 }
5108 var15 = !var13;
5109 var11 = var15;
5110 goto RET_LABEL12;
5111 RET_LABEL12:(void)0;
5112 }
5113 var10 = var11;
5114 }
5115 if (var10){
5116 {
5117 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
5118 var_n_annotations->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
5119 RET_LABEL16:(void)0;
5120 }
5121 }
5122 } else {
5123 }
5124 RET_LABEL:;
5125 }
5126 /* method parser_prod#AFormaldef#init_aformaldef for (self: Object, nullable TClassid, nullable AType, nullable AAnnotations) */
5127 void VIRTUAL_parser_prod__AFormaldef__init_aformaldef(val* self, val* p0, val* p1, val* p2) {
5128 parser_prod__AFormaldef__init_aformaldef(self, p0, p1, p2); /* Direct call parser_prod#AFormaldef#init_aformaldef on <self:Object(AFormaldef)>*/
5129 RET_LABEL:;
5130 }
5131 /* method parser_prod#AFormaldef#replace_child for (self: AFormaldef, ANode, nullable ANode) */
5132 void parser_prod__AFormaldef__replace_child(val* self, val* p0, val* p1) {
5133 val* var_old_child /* var old_child: ANode */;
5134 val* var_new_child /* var new_child: nullable ANode */;
5135 val* var /* : TClassid */;
5136 short int var1 /* : Bool */;
5137 short int var2 /* : Bool */;
5138 val* var_other /* var other: nullable Object */;
5139 short int var4 /* : Bool */;
5140 short int var6 /* : Bool */;
5141 short int var7 /* : Bool */;
5142 int cltype;
5143 int idtype;
5144 const char* var_class_name;
5145 val* var8 /* : nullable AType */;
5146 short int var9 /* : Bool */;
5147 short int var10 /* : Bool */;
5148 short int var12 /* : Bool */;
5149 short int var14 /* : Bool */;
5150 short int var15 /* : Bool */;
5151 int cltype16;
5152 int idtype17;
5153 const char* var_class_name18;
5154 val* var19 /* : nullable AAnnotations */;
5155 short int var20 /* : Bool */;
5156 short int var21 /* : Bool */;
5157 short int var23 /* : Bool */;
5158 short int var25 /* : Bool */;
5159 short int var26 /* : Bool */;
5160 int cltype27;
5161 int idtype28;
5162 const char* var_class_name29;
5163 var_old_child = p0;
5164 var_new_child = p1;
5165 var = self->attrs[COLOR_parser_nodes__AFormaldef___n_id].val; /* _n_id on <self:AFormaldef> */
5166 if (unlikely(var == NULL)) {
5167 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
5168 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 743);
5169 show_backtrace(1);
5170 }
5171 {
5172 { /* Inline kernel#Object#== (var,var_old_child) on <var:TClassid> */
5173 var_other = var_old_child;
5174 {
5175 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TClassid> */
5176 var6 = var == var_other;
5177 var4 = var6;
5178 goto RET_LABEL5;
5179 RET_LABEL5:(void)0;
5180 }
5181 }
5182 var2 = var4;
5183 goto RET_LABEL3;
5184 RET_LABEL3:(void)0;
5185 }
5186 var1 = var2;
5187 }
5188 if (var1){
5189 /* <var_new_child:nullable ANode> isa TClassid */
5190 cltype = type_parser_nodes__TClassid.color;
5191 idtype = type_parser_nodes__TClassid.id;
5192 if(var_new_child == NULL) {
5193 var7 = 0;
5194 } else {
5195 if(cltype >= var_new_child->type->table_size) {
5196 var7 = 0;
5197 } else {
5198 var7 = var_new_child->type->type_table[cltype] == idtype;
5199 }
5200 }
5201 if (unlikely(!var7)) {
5202 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
5203 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TClassid", var_class_name);
5204 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 744);
5205 show_backtrace(1);
5206 }
5207 {
5208 parser_prod__AFormaldef__n_id_61d(self, var_new_child); /* Direct call parser_prod#AFormaldef#n_id= on <self:AFormaldef>*/
5209 }
5210 goto RET_LABEL;
5211 } else {
5212 }
5213 var8 = self->attrs[COLOR_parser_nodes__AFormaldef___n_type].val; /* _n_type on <self:AFormaldef> */
5214 if (var8 == NULL) {
5215 var9 = 0; /* <var_old_child:ANode> cannot be null */
5216 } else {
5217 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable AType> */
5218 var_other = var_old_child;
5219 {
5220 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable AType(AType)> */
5221 var14 = var8 == var_other;
5222 var12 = var14;
5223 goto RET_LABEL13;
5224 RET_LABEL13:(void)0;
5225 }
5226 }
5227 var10 = var12;
5228 goto RET_LABEL11;
5229 RET_LABEL11:(void)0;
5230 }
5231 var9 = var10;
5232 }
5233 if (var9){
5234 /* <var_new_child:nullable ANode> isa nullable AType */
5235 cltype16 = type_nullable_parser_nodes__AType.color;
5236 idtype17 = type_nullable_parser_nodes__AType.id;
5237 if(var_new_child == NULL) {
5238 var15 = 1;
5239 } else {
5240 if(cltype16 >= var_new_child->type->table_size) {
5241 var15 = 0;
5242 } else {
5243 var15 = var_new_child->type->type_table[cltype16] == idtype17;
5244 }
5245 }
5246 if (unlikely(!var15)) {
5247 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
5248 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AType", var_class_name18);
5249 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 748);
5250 show_backtrace(1);
5251 }
5252 {
5253 parser_prod__AFormaldef__n_type_61d(self, var_new_child); /* Direct call parser_prod#AFormaldef#n_type= on <self:AFormaldef>*/
5254 }
5255 goto RET_LABEL;
5256 } else {
5257 }
5258 var19 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AFormaldef> */
5259 if (var19 == NULL) {
5260 var20 = 0; /* <var_old_child:ANode> cannot be null */
5261 } else {
5262 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:nullable AAnnotations> */
5263 var_other = var_old_child;
5264 {
5265 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:nullable AAnnotations(AAnnotations)> */
5266 var25 = var19 == var_other;
5267 var23 = var25;
5268 goto RET_LABEL24;
5269 RET_LABEL24:(void)0;
5270 }
5271 }
5272 var21 = var23;
5273 goto RET_LABEL22;
5274 RET_LABEL22:(void)0;
5275 }
5276 var20 = var21;
5277 }
5278 if (var20){
5279 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
5280 cltype27 = type_nullable_parser_nodes__AAnnotations.color;
5281 idtype28 = type_nullable_parser_nodes__AAnnotations.id;
5282 if(var_new_child == NULL) {
5283 var26 = 1;
5284 } else {
5285 if(cltype27 >= var_new_child->type->table_size) {
5286 var26 = 0;
5287 } else {
5288 var26 = var_new_child->type->type_table[cltype27] == idtype28;
5289 }
5290 }
5291 if (unlikely(!var26)) {
5292 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
5293 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name29);
5294 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 752);
5295 show_backtrace(1);
5296 }
5297 {
5298 parser_prod__AFormaldef__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AFormaldef#n_annotations= on <self:AFormaldef>*/
5299 }
5300 goto RET_LABEL;
5301 } else {
5302 }
5303 RET_LABEL:;
5304 }
5305 /* method parser_prod#AFormaldef#replace_child for (self: Object, ANode, nullable ANode) */
5306 void VIRTUAL_parser_prod__AFormaldef__replace_child(val* self, val* p0, val* p1) {
5307 parser_prod__AFormaldef__replace_child(self, p0, p1); /* Direct call parser_prod#AFormaldef#replace_child on <self:Object(AFormaldef)>*/
5308 RET_LABEL:;
5309 }
5310 /* method parser_prod#AFormaldef#n_id= for (self: AFormaldef, TClassid) */
5311 void parser_prod__AFormaldef__n_id_61d(val* self, val* p0) {
5312 val* var_node /* var node: TClassid */;
5313 var_node = p0;
5314 self->attrs[COLOR_parser_nodes__AFormaldef___n_id].val = var_node; /* _n_id on <self:AFormaldef> */
5315 {
5316 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TClassid> */
5317 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TClassid> */
5318 RET_LABEL1:(void)0;
5319 }
5320 }
5321 RET_LABEL:;
5322 }
5323 /* method parser_prod#AFormaldef#n_id= for (self: Object, TClassid) */
5324 void VIRTUAL_parser_prod__AFormaldef__n_id_61d(val* self, val* p0) {
5325 parser_prod__AFormaldef__n_id_61d(self, p0); /* Direct call parser_prod#AFormaldef#n_id= on <self:Object(AFormaldef)>*/
5326 RET_LABEL:;
5327 }
5328 /* method parser_prod#AFormaldef#n_type= for (self: AFormaldef, nullable AType) */
5329 void parser_prod__AFormaldef__n_type_61d(val* self, val* p0) {
5330 val* var_node /* var node: nullable AType */;
5331 val* var /* : null */;
5332 short int var1 /* : Bool */;
5333 short int var2 /* : Bool */;
5334 val* var_other /* var other: nullable Object */;
5335 short int var4 /* : Bool */;
5336 short int var5 /* : Bool */;
5337 short int var6 /* : Bool */;
5338 var_node = p0;
5339 self->attrs[COLOR_parser_nodes__AFormaldef___n_type].val = var_node; /* _n_type on <self:AFormaldef> */
5340 var = NULL;
5341 if (var_node == NULL) {
5342 var1 = 0; /* is null */
5343 } else {
5344 var1 = 1; /* arg is null and recv is not */
5345 }
5346 if (0) {
5347 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AType> */
5348 var_other = var;
5349 {
5350 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AType(AType)>*/;
5351 var4 = var5;
5352 }
5353 var6 = !var4;
5354 var2 = var6;
5355 goto RET_LABEL3;
5356 RET_LABEL3:(void)0;
5357 }
5358 var1 = var2;
5359 }
5360 if (var1){
5361 {
5362 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AType(AType)> */
5363 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AType(AType)> */
5364 RET_LABEL7:(void)0;
5365 }
5366 }
5367 } else {
5368 }
5369 RET_LABEL:;
5370 }
5371 /* method parser_prod#AFormaldef#n_type= for (self: Object, nullable AType) */
5372 void VIRTUAL_parser_prod__AFormaldef__n_type_61d(val* self, val* p0) {
5373 parser_prod__AFormaldef__n_type_61d(self, p0); /* Direct call parser_prod#AFormaldef#n_type= on <self:Object(AFormaldef)>*/
5374 RET_LABEL:;
5375 }
5376 /* method parser_prod#AFormaldef#n_annotations= for (self: AFormaldef, nullable AAnnotations) */
5377 void parser_prod__AFormaldef__n_annotations_61d(val* self, val* p0) {
5378 val* var_node /* var node: nullable AAnnotations */;
5379 val* var /* : null */;
5380 short int var1 /* : Bool */;
5381 short int var2 /* : Bool */;
5382 val* var_other /* var other: nullable Object */;
5383 short int var4 /* : Bool */;
5384 short int var5 /* : Bool */;
5385 short int var6 /* : Bool */;
5386 var_node = p0;
5387 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AFormaldef> */
5388 var = NULL;
5389 if (var_node == NULL) {
5390 var1 = 0; /* is null */
5391 } else {
5392 var1 = 1; /* arg is null and recv is not */
5393 }
5394 if (0) {
5395 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
5396 var_other = var;
5397 {
5398 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
5399 var4 = var5;
5400 }
5401 var6 = !var4;
5402 var2 = var6;
5403 goto RET_LABEL3;
5404 RET_LABEL3:(void)0;
5405 }
5406 var1 = var2;
5407 }
5408 if (var1){
5409 {
5410 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
5411 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
5412 RET_LABEL7:(void)0;
5413 }
5414 }
5415 } else {
5416 }
5417 RET_LABEL:;
5418 }
5419 /* method parser_prod#AFormaldef#n_annotations= for (self: Object, nullable AAnnotations) */
5420 void VIRTUAL_parser_prod__AFormaldef__n_annotations_61d(val* self, val* p0) {
5421 parser_prod__AFormaldef__n_annotations_61d(self, p0); /* Direct call parser_prod#AFormaldef#n_annotations= on <self:Object(AFormaldef)>*/
5422 RET_LABEL:;
5423 }
5424 /* method parser_prod#AFormaldef#visit_all for (self: AFormaldef, Visitor) */
5425 void parser_prod__AFormaldef__visit_all(val* self, val* p0) {
5426 val* var_v /* var v: Visitor */;
5427 val* var /* : TClassid */;
5428 val* var1 /* : nullable AType */;
5429 val* var2 /* : nullable AAnnotations */;
5430 var_v = p0;
5431 var = self->attrs[COLOR_parser_nodes__AFormaldef___n_id].val; /* _n_id on <self:AFormaldef> */
5432 if (unlikely(var == NULL)) {
5433 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
5434 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 776);
5435 show_backtrace(1);
5436 }
5437 {
5438 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
5439 }
5440 var1 = self->attrs[COLOR_parser_nodes__AFormaldef___n_type].val; /* _n_type on <self:AFormaldef> */
5441 {
5442 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
5443 }
5444 var2 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AFormaldef> */
5445 {
5446 parser_nodes__Visitor__enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
5447 }
5448 RET_LABEL:;
5449 }
5450 /* method parser_prod#AFormaldef#visit_all for (self: Object, Visitor) */
5451 void VIRTUAL_parser_prod__AFormaldef__visit_all(val* self, val* p0) {
5452 parser_prod__AFormaldef__visit_all(self, p0); /* Direct call parser_prod#AFormaldef#visit_all on <self:Object(AFormaldef)>*/
5453 RET_LABEL:;
5454 }
5455 /* method parser_prod#ASuperclass#init_asuperclass for (self: ASuperclass, nullable TKwsuper, nullable AType, nullable AAnnotations) */
5456 void parser_prod__ASuperclass__init_asuperclass(val* self, val* p0, val* p1, val* p2) {
5457 val* var_n_kwsuper /* var n_kwsuper: nullable TKwsuper */;
5458 val* var_n_type /* var n_type: nullable AType */;
5459 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
5460 val* var /* : null */;
5461 short int var3 /* : Bool */;
5462 short int var4 /* : Bool */;
5463 val* var_other /* var other: nullable Object */;
5464 short int var6 /* : Bool */;
5465 short int var7 /* : Bool */;
5466 short int var8 /* : Bool */;
5467 var_n_kwsuper = p0;
5468 var_n_type = p1;
5469 var_n_annotations = p2;
5470 if (unlikely(var_n_kwsuper == NULL)) {
5471 PRINT_ERROR("Runtime error: %s", "Cast failed");
5472 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 788);
5473 show_backtrace(1);
5474 }
5475 self->attrs[COLOR_parser_nodes__ASuperclass___n_kwsuper].val = var_n_kwsuper; /* _n_kwsuper on <self:ASuperclass> */
5476 if (var_n_kwsuper == NULL) {
5477 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5478 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 789);
5479 show_backtrace(1);
5480 } else {
5481 { /* Inline parser_nodes#ANode#parent= (var_n_kwsuper,self) on <var_n_kwsuper:nullable TKwsuper> */
5482 if (unlikely(var_n_kwsuper == NULL)) {
5483 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5484 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
5485 show_backtrace(1);
5486 }
5487 var_n_kwsuper->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwsuper:nullable TKwsuper> */
5488 RET_LABEL1:(void)0;
5489 }
5490 }
5491 if (unlikely(var_n_type == NULL)) {
5492 PRINT_ERROR("Runtime error: %s", "Cast failed");
5493 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 790);
5494 show_backtrace(1);
5495 }
5496 self->attrs[COLOR_parser_nodes__ASuperclass___n_type].val = var_n_type; /* _n_type on <self:ASuperclass> */
5497 if (var_n_type == NULL) {
5498 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5499 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 791);
5500 show_backtrace(1);
5501 } else {
5502 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType> */
5503 if (unlikely(var_n_type == NULL)) {
5504 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5505 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
5506 show_backtrace(1);
5507 }
5508 var_n_type->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_type:nullable AType> */
5509 RET_LABEL2:(void)0;
5510 }
5511 }
5512 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:ASuperclass> */
5513 var = NULL;
5514 if (var_n_annotations == NULL) {
5515 var3 = 0; /* is null */
5516 } else {
5517 var3 = 1; /* arg is null and recv is not */
5518 }
5519 if (0) {
5520 { /* Inline kernel#Object#!= (var_n_annotations,var) on <var_n_annotations:nullable AAnnotations> */
5521 var_other = var;
5522 {
5523 var7 = ((short int (*)(val*, val*))(var_n_annotations->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
5524 var6 = var7;
5525 }
5526 var8 = !var6;
5527 var4 = var8;
5528 goto RET_LABEL5;
5529 RET_LABEL5:(void)0;
5530 }
5531 var3 = var4;
5532 }
5533 if (var3){
5534 {
5535 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
5536 var_n_annotations->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
5537 RET_LABEL9:(void)0;
5538 }
5539 }
5540 } else {
5541 }
5542 RET_LABEL:;
5543 }
5544 /* method parser_prod#ASuperclass#init_asuperclass for (self: Object, nullable TKwsuper, nullable AType, nullable AAnnotations) */
5545 void VIRTUAL_parser_prod__ASuperclass__init_asuperclass(val* self, val* p0, val* p1, val* p2) {
5546 parser_prod__ASuperclass__init_asuperclass(self, p0, p1, p2); /* Direct call parser_prod#ASuperclass#init_asuperclass on <self:Object(ASuperclass)>*/
5547 RET_LABEL:;
5548 }
5549 /* method parser_prod#ASuperclass#replace_child for (self: ASuperclass, ANode, nullable ANode) */
5550 void parser_prod__ASuperclass__replace_child(val* self, val* p0, val* p1) {
5551 val* var_old_child /* var old_child: ANode */;
5552 val* var_new_child /* var new_child: nullable ANode */;
5553 val* var /* : TKwsuper */;
5554 short int var1 /* : Bool */;
5555 short int var2 /* : Bool */;
5556 val* var_other /* var other: nullable Object */;
5557 short int var4 /* : Bool */;
5558 short int var6 /* : Bool */;
5559 short int var7 /* : Bool */;
5560 int cltype;
5561 int idtype;
5562 const char* var_class_name;
5563 val* var8 /* : AType */;
5564 short int var9 /* : Bool */;
5565 short int var10 /* : Bool */;
5566 short int var12 /* : Bool */;
5567 short int var14 /* : Bool */;
5568 short int var15 /* : Bool */;
5569 int cltype16;
5570 int idtype17;
5571 const char* var_class_name18;
5572 val* var19 /* : nullable AAnnotations */;
5573 short int var20 /* : Bool */;
5574 short int var21 /* : Bool */;
5575 short int var23 /* : Bool */;
5576 short int var25 /* : Bool */;
5577 short int var26 /* : Bool */;
5578 int cltype27;
5579 int idtype28;
5580 const char* var_class_name29;
5581 var_old_child = p0;
5582 var_new_child = p1;
5583 var = self->attrs[COLOR_parser_nodes__ASuperclass___n_kwsuper].val; /* _n_kwsuper on <self:ASuperclass> */
5584 if (unlikely(var == NULL)) {
5585 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwsuper");
5586 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 798);
5587 show_backtrace(1);
5588 }
5589 {
5590 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwsuper> */
5591 var_other = var_old_child;
5592 {
5593 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwsuper> */
5594 var6 = var == var_other;
5595 var4 = var6;
5596 goto RET_LABEL5;
5597 RET_LABEL5:(void)0;
5598 }
5599 }
5600 var2 = var4;
5601 goto RET_LABEL3;
5602 RET_LABEL3:(void)0;
5603 }
5604 var1 = var2;
5605 }
5606 if (var1){
5607 /* <var_new_child:nullable ANode> isa TKwsuper */
5608 cltype = type_parser_nodes__TKwsuper.color;
5609 idtype = type_parser_nodes__TKwsuper.id;
5610 if(var_new_child == NULL) {
5611 var7 = 0;
5612 } else {
5613 if(cltype >= var_new_child->type->table_size) {
5614 var7 = 0;
5615 } else {
5616 var7 = var_new_child->type->type_table[cltype] == idtype;
5617 }
5618 }
5619 if (unlikely(!var7)) {
5620 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
5621 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwsuper", var_class_name);
5622 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 799);
5623 show_backtrace(1);
5624 }
5625 {
5626 parser_prod__ASuperclass__n_kwsuper_61d(self, var_new_child); /* Direct call parser_prod#ASuperclass#n_kwsuper= on <self:ASuperclass>*/
5627 }
5628 goto RET_LABEL;
5629 } else {
5630 }
5631 var8 = self->attrs[COLOR_parser_nodes__ASuperclass___n_type].val; /* _n_type on <self:ASuperclass> */
5632 if (unlikely(var8 == NULL)) {
5633 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
5634 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 802);
5635 show_backtrace(1);
5636 }
5637 {
5638 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:AType> */
5639 var_other = var_old_child;
5640 {
5641 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:AType> */
5642 var14 = var8 == var_other;
5643 var12 = var14;
5644 goto RET_LABEL13;
5645 RET_LABEL13:(void)0;
5646 }
5647 }
5648 var10 = var12;
5649 goto RET_LABEL11;
5650 RET_LABEL11:(void)0;
5651 }
5652 var9 = var10;
5653 }
5654 if (var9){
5655 /* <var_new_child:nullable ANode> isa AType */
5656 cltype16 = type_parser_nodes__AType.color;
5657 idtype17 = type_parser_nodes__AType.id;
5658 if(var_new_child == NULL) {
5659 var15 = 0;
5660 } else {
5661 if(cltype16 >= var_new_child->type->table_size) {
5662 var15 = 0;
5663 } else {
5664 var15 = var_new_child->type->type_table[cltype16] == idtype17;
5665 }
5666 }
5667 if (unlikely(!var15)) {
5668 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
5669 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AType", var_class_name18);
5670 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 803);
5671 show_backtrace(1);
5672 }
5673 {
5674 parser_prod__ASuperclass__n_type_61d(self, var_new_child); /* Direct call parser_prod#ASuperclass#n_type= on <self:ASuperclass>*/
5675 }
5676 goto RET_LABEL;
5677 } else {
5678 }
5679 var19 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:ASuperclass> */
5680 if (var19 == NULL) {
5681 var20 = 0; /* <var_old_child:ANode> cannot be null */
5682 } else {
5683 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:nullable AAnnotations> */
5684 var_other = var_old_child;
5685 {
5686 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:nullable AAnnotations(AAnnotations)> */
5687 var25 = var19 == var_other;
5688 var23 = var25;
5689 goto RET_LABEL24;
5690 RET_LABEL24:(void)0;
5691 }
5692 }
5693 var21 = var23;
5694 goto RET_LABEL22;
5695 RET_LABEL22:(void)0;
5696 }
5697 var20 = var21;
5698 }
5699 if (var20){
5700 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
5701 cltype27 = type_nullable_parser_nodes__AAnnotations.color;
5702 idtype28 = type_nullable_parser_nodes__AAnnotations.id;
5703 if(var_new_child == NULL) {
5704 var26 = 1;
5705 } else {
5706 if(cltype27 >= var_new_child->type->table_size) {
5707 var26 = 0;
5708 } else {
5709 var26 = var_new_child->type->type_table[cltype27] == idtype28;
5710 }
5711 }
5712 if (unlikely(!var26)) {
5713 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
5714 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name29);
5715 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 807);
5716 show_backtrace(1);
5717 }
5718 {
5719 parser_prod__ASuperclass__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#ASuperclass#n_annotations= on <self:ASuperclass>*/
5720 }
5721 goto RET_LABEL;
5722 } else {
5723 }
5724 RET_LABEL:;
5725 }
5726 /* method parser_prod#ASuperclass#replace_child for (self: Object, ANode, nullable ANode) */
5727 void VIRTUAL_parser_prod__ASuperclass__replace_child(val* self, val* p0, val* p1) {
5728 parser_prod__ASuperclass__replace_child(self, p0, p1); /* Direct call parser_prod#ASuperclass#replace_child on <self:Object(ASuperclass)>*/
5729 RET_LABEL:;
5730 }
5731 /* method parser_prod#ASuperclass#n_kwsuper= for (self: ASuperclass, TKwsuper) */
5732 void parser_prod__ASuperclass__n_kwsuper_61d(val* self, val* p0) {
5733 val* var_node /* var node: TKwsuper */;
5734 var_node = p0;
5735 self->attrs[COLOR_parser_nodes__ASuperclass___n_kwsuper].val = var_node; /* _n_kwsuper on <self:ASuperclass> */
5736 {
5737 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwsuper> */
5738 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwsuper> */
5739 RET_LABEL1:(void)0;
5740 }
5741 }
5742 RET_LABEL:;
5743 }
5744 /* method parser_prod#ASuperclass#n_kwsuper= for (self: Object, TKwsuper) */
5745 void VIRTUAL_parser_prod__ASuperclass__n_kwsuper_61d(val* self, val* p0) {
5746 parser_prod__ASuperclass__n_kwsuper_61d(self, p0); /* Direct call parser_prod#ASuperclass#n_kwsuper= on <self:Object(ASuperclass)>*/
5747 RET_LABEL:;
5748 }
5749 /* method parser_prod#ASuperclass#n_type= for (self: ASuperclass, AType) */
5750 void parser_prod__ASuperclass__n_type_61d(val* self, val* p0) {
5751 val* var_node /* var node: AType */;
5752 var_node = p0;
5753 self->attrs[COLOR_parser_nodes__ASuperclass___n_type].val = var_node; /* _n_type on <self:ASuperclass> */
5754 {
5755 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AType> */
5756 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AType> */
5757 RET_LABEL1:(void)0;
5758 }
5759 }
5760 RET_LABEL:;
5761 }
5762 /* method parser_prod#ASuperclass#n_type= for (self: Object, AType) */
5763 void VIRTUAL_parser_prod__ASuperclass__n_type_61d(val* self, val* p0) {
5764 parser_prod__ASuperclass__n_type_61d(self, p0); /* Direct call parser_prod#ASuperclass#n_type= on <self:Object(ASuperclass)>*/
5765 RET_LABEL:;
5766 }
5767 /* method parser_prod#ASuperclass#n_annotations= for (self: ASuperclass, nullable AAnnotations) */
5768 void parser_prod__ASuperclass__n_annotations_61d(val* self, val* p0) {
5769 val* var_node /* var node: nullable AAnnotations */;
5770 val* var /* : null */;
5771 short int var1 /* : Bool */;
5772 short int var2 /* : Bool */;
5773 val* var_other /* var other: nullable Object */;
5774 short int var4 /* : Bool */;
5775 short int var5 /* : Bool */;
5776 short int var6 /* : Bool */;
5777 var_node = p0;
5778 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:ASuperclass> */
5779 var = NULL;
5780 if (var_node == NULL) {
5781 var1 = 0; /* is null */
5782 } else {
5783 var1 = 1; /* arg is null and recv is not */
5784 }
5785 if (0) {
5786 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
5787 var_other = var;
5788 {
5789 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
5790 var4 = var5;
5791 }
5792 var6 = !var4;
5793 var2 = var6;
5794 goto RET_LABEL3;
5795 RET_LABEL3:(void)0;
5796 }
5797 var1 = var2;
5798 }
5799 if (var1){
5800 {
5801 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
5802 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
5803 RET_LABEL7:(void)0;
5804 }
5805 }
5806 } else {
5807 }
5808 RET_LABEL:;
5809 }
5810 /* method parser_prod#ASuperclass#n_annotations= for (self: Object, nullable AAnnotations) */
5811 void VIRTUAL_parser_prod__ASuperclass__n_annotations_61d(val* self, val* p0) {
5812 parser_prod__ASuperclass__n_annotations_61d(self, p0); /* Direct call parser_prod#ASuperclass#n_annotations= on <self:Object(ASuperclass)>*/
5813 RET_LABEL:;
5814 }
5815 /* method parser_prod#ASuperclass#visit_all for (self: ASuperclass, Visitor) */
5816 void parser_prod__ASuperclass__visit_all(val* self, val* p0) {
5817 val* var_v /* var v: Visitor */;
5818 val* var /* : TKwsuper */;
5819 val* var1 /* : AType */;
5820 val* var2 /* : nullable AAnnotations */;
5821 var_v = p0;
5822 var = self->attrs[COLOR_parser_nodes__ASuperclass___n_kwsuper].val; /* _n_kwsuper on <self:ASuperclass> */
5823 if (unlikely(var == NULL)) {
5824 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwsuper");
5825 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 831);
5826 show_backtrace(1);
5827 }
5828 {
5829 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
5830 }
5831 var1 = self->attrs[COLOR_parser_nodes__ASuperclass___n_type].val; /* _n_type on <self:ASuperclass> */
5832 if (unlikely(var1 == NULL)) {
5833 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
5834 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 832);
5835 show_backtrace(1);
5836 }
5837 {
5838 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
5839 }
5840 var2 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:ASuperclass> */
5841 {
5842 parser_nodes__Visitor__enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
5843 }
5844 RET_LABEL:;
5845 }
5846 /* method parser_prod#ASuperclass#visit_all for (self: Object, Visitor) */
5847 void VIRTUAL_parser_prod__ASuperclass__visit_all(val* self, val* p0) {
5848 parser_prod__ASuperclass__visit_all(self, p0); /* Direct call parser_prod#ASuperclass#visit_all on <self:Object(ASuperclass)>*/
5849 RET_LABEL:;
5850 }
5851 /* method parser_prod#AAttrPropdef#init_aattrpropdef for (self: AAttrPropdef, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable TKwvar, nullable TId, nullable AType, nullable AExpr, nullable AAnnotations, nullable AExpr) */
5852 void parser_prod__AAttrPropdef__init_aattrpropdef(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6, val* p7, val* p8) {
5853 val* var_n_doc /* var n_doc: nullable ADoc */;
5854 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
5855 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
5856 val* var_n_kwvar /* var n_kwvar: nullable TKwvar */;
5857 val* var_n_id2 /* var n_id2: nullable TId */;
5858 val* var_n_type /* var n_type: nullable AType */;
5859 val* var_n_expr /* var n_expr: nullable AExpr */;
5860 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
5861 val* var_n_block /* var n_block: nullable AExpr */;
5862 val* var /* : null */;
5863 short int var1 /* : Bool */;
5864 short int var2 /* : Bool */;
5865 val* var_other /* var other: nullable Object */;
5866 short int var4 /* : Bool */;
5867 short int var5 /* : Bool */;
5868 short int var6 /* : Bool */;
5869 val* var8 /* : null */;
5870 short int var9 /* : Bool */;
5871 short int var10 /* : Bool */;
5872 short int var12 /* : Bool */;
5873 short int var13 /* : Bool */;
5874 short int var14 /* : Bool */;
5875 val* var19 /* : null */;
5876 short int var20 /* : Bool */;
5877 short int var21 /* : Bool */;
5878 short int var23 /* : Bool */;
5879 short int var24 /* : Bool */;
5880 short int var25 /* : Bool */;
5881 val* var27 /* : null */;
5882 short int var28 /* : Bool */;
5883 short int var29 /* : Bool */;
5884 short int var31 /* : Bool */;
5885 short int var32 /* : Bool */;
5886 short int var33 /* : Bool */;
5887 val* var35 /* : null */;
5888 short int var36 /* : Bool */;
5889 short int var37 /* : Bool */;
5890 short int var39 /* : Bool */;
5891 short int var40 /* : Bool */;
5892 short int var41 /* : Bool */;
5893 val* var43 /* : null */;
5894 short int var44 /* : Bool */;
5895 short int var45 /* : Bool */;
5896 short int var47 /* : Bool */;
5897 short int var48 /* : Bool */;
5898 short int var49 /* : Bool */;
5899 var_n_doc = p0;
5900 var_n_kwredef = p1;
5901 var_n_visibility = p2;
5902 var_n_kwvar = p3;
5903 var_n_id2 = p4;
5904 var_n_type = p5;
5905 var_n_expr = p6;
5906 var_n_annotations = p7;
5907 var_n_block = p8;
5908 self->attrs[COLOR_parser_nodes__APropdef___n_doc].val = var_n_doc; /* _n_doc on <self:AAttrPropdef> */
5909 var = NULL;
5910 if (var_n_doc == NULL) {
5911 var1 = 0; /* is null */
5912 } else {
5913 var1 = 1; /* arg is null and recv is not */
5914 }
5915 if (0) {
5916 { /* Inline kernel#Object#!= (var_n_doc,var) on <var_n_doc:nullable ADoc> */
5917 var_other = var;
5918 {
5919 var5 = ((short int (*)(val*, val*))(var_n_doc->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_doc, var_other) /* == on <var_n_doc:nullable ADoc(ADoc)>*/;
5920 var4 = var5;
5921 }
5922 var6 = !var4;
5923 var2 = var6;
5924 goto RET_LABEL3;
5925 RET_LABEL3:(void)0;
5926 }
5927 var1 = var2;
5928 }
5929 if (var1){
5930 {
5931 { /* Inline parser_nodes#ANode#parent= (var_n_doc,self) on <var_n_doc:nullable ADoc(ADoc)> */
5932 var_n_doc->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_doc:nullable ADoc(ADoc)> */
5933 RET_LABEL7:(void)0;
5934 }
5935 }
5936 } else {
5937 }
5938 self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:AAttrPropdef> */
5939 var8 = NULL;
5940 if (var_n_kwredef == NULL) {
5941 var9 = 0; /* is null */
5942 } else {
5943 var9 = 1; /* arg is null and recv is not */
5944 }
5945 if (0) {
5946 { /* Inline kernel#Object#!= (var_n_kwredef,var8) on <var_n_kwredef:nullable TKwredef> */
5947 var_other = var8;
5948 {
5949 var13 = ((short int (*)(val*, val*))(var_n_kwredef->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
5950 var12 = var13;
5951 }
5952 var14 = !var12;
5953 var10 = var14;
5954 goto RET_LABEL11;
5955 RET_LABEL11:(void)0;
5956 }
5957 var9 = var10;
5958 }
5959 if (var9){
5960 {
5961 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
5962 var_n_kwredef->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
5963 RET_LABEL15:(void)0;
5964 }
5965 }
5966 } else {
5967 }
5968 if (unlikely(var_n_visibility == NULL)) {
5969 PRINT_ERROR("Runtime error: %s", "Cast failed");
5970 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 853);
5971 show_backtrace(1);
5972 }
5973 self->attrs[COLOR_parser_nodes__APropdef___n_visibility].val = var_n_visibility; /* _n_visibility on <self:AAttrPropdef> */
5974 if (var_n_visibility == NULL) {
5975 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5976 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 854);
5977 show_backtrace(1);
5978 } else {
5979 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
5980 if (unlikely(var_n_visibility == NULL)) {
5981 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5982 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
5983 show_backtrace(1);
5984 }
5985 var_n_visibility->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
5986 RET_LABEL16:(void)0;
5987 }
5988 }
5989 if (unlikely(var_n_kwvar == NULL)) {
5990 PRINT_ERROR("Runtime error: %s", "Cast failed");
5991 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 855);
5992 show_backtrace(1);
5993 }
5994 self->attrs[COLOR_parser_nodes__AAttrPropdef___n_kwvar].val = var_n_kwvar; /* _n_kwvar on <self:AAttrPropdef> */
5995 if (var_n_kwvar == NULL) {
5996 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5997 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 856);
5998 show_backtrace(1);
5999 } else {
6000 { /* Inline parser_nodes#ANode#parent= (var_n_kwvar,self) on <var_n_kwvar:nullable TKwvar> */
6001 if (unlikely(var_n_kwvar == NULL)) {
6002 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6003 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
6004 show_backtrace(1);
6005 }
6006 var_n_kwvar->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwvar:nullable TKwvar> */
6007 RET_LABEL17:(void)0;
6008 }
6009 }
6010 if (unlikely(var_n_id2 == NULL)) {
6011 PRINT_ERROR("Runtime error: %s", "Cast failed");
6012 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 857);
6013 show_backtrace(1);
6014 }
6015 self->attrs[COLOR_parser_nodes__AAttrPropdef___n_id2].val = var_n_id2; /* _n_id2 on <self:AAttrPropdef> */
6016 if (var_n_id2 == NULL) {
6017 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6018 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 858);
6019 show_backtrace(1);
6020 } else {
6021 { /* Inline parser_nodes#ANode#parent= (var_n_id2,self) on <var_n_id2:nullable TId> */
6022 if (unlikely(var_n_id2 == NULL)) {
6023 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6024 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
6025 show_backtrace(1);
6026 }
6027 var_n_id2->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_id2:nullable TId> */
6028 RET_LABEL18:(void)0;
6029 }
6030 }
6031 self->attrs[COLOR_parser_nodes__AAttrPropdef___n_type].val = var_n_type; /* _n_type on <self:AAttrPropdef> */
6032 var19 = NULL;
6033 if (var_n_type == NULL) {
6034 var20 = 0; /* is null */
6035 } else {
6036 var20 = 1; /* arg is null and recv is not */
6037 }
6038 if (0) {
6039 { /* Inline kernel#Object#!= (var_n_type,var19) on <var_n_type:nullable AType> */
6040 var_other = var19;
6041 {
6042 var24 = ((short int (*)(val*, val*))(var_n_type->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_type, var_other) /* == on <var_n_type:nullable AType(AType)>*/;
6043 var23 = var24;
6044 }
6045 var25 = !var23;
6046 var21 = var25;
6047 goto RET_LABEL22;
6048 RET_LABEL22:(void)0;
6049 }
6050 var20 = var21;
6051 }
6052 if (var20){
6053 {
6054 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType(AType)> */
6055 var_n_type->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_type:nullable AType(AType)> */
6056 RET_LABEL26:(void)0;
6057 }
6058 }
6059 } else {
6060 }
6061 self->attrs[COLOR_parser_nodes__AAttrPropdef___n_expr].val = var_n_expr; /* _n_expr on <self:AAttrPropdef> */
6062 var27 = NULL;
6063 if (var_n_expr == NULL) {
6064 var28 = 0; /* is null */
6065 } else {
6066 var28 = 1; /* arg is null and recv is not */
6067 }
6068 if (0) {
6069 { /* Inline kernel#Object#!= (var_n_expr,var27) on <var_n_expr:nullable AExpr> */
6070 var_other = var27;
6071 {
6072 var32 = ((short int (*)(val*, val*))(var_n_expr->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_expr, var_other) /* == on <var_n_expr:nullable AExpr(AExpr)>*/;
6073 var31 = var32;
6074 }
6075 var33 = !var31;
6076 var29 = var33;
6077 goto RET_LABEL30;
6078 RET_LABEL30:(void)0;
6079 }
6080 var28 = var29;
6081 }
6082 if (var28){
6083 {
6084 { /* Inline parser_nodes#ANode#parent= (var_n_expr,self) on <var_n_expr:nullable AExpr(AExpr)> */
6085 var_n_expr->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_expr:nullable AExpr(AExpr)> */
6086 RET_LABEL34:(void)0;
6087 }
6088 }
6089 } else {
6090 }
6091 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AAttrPropdef> */
6092 var35 = NULL;
6093 if (var_n_annotations == NULL) {
6094 var36 = 0; /* is null */
6095 } else {
6096 var36 = 1; /* arg is null and recv is not */
6097 }
6098 if (0) {
6099 { /* Inline kernel#Object#!= (var_n_annotations,var35) on <var_n_annotations:nullable AAnnotations> */
6100 var_other = var35;
6101 {
6102 var40 = ((short int (*)(val*, val*))(var_n_annotations->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
6103 var39 = var40;
6104 }
6105 var41 = !var39;
6106 var37 = var41;
6107 goto RET_LABEL38;
6108 RET_LABEL38:(void)0;
6109 }
6110 var36 = var37;
6111 }
6112 if (var36){
6113 {
6114 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
6115 var_n_annotations->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
6116 RET_LABEL42:(void)0;
6117 }
6118 }
6119 } else {
6120 }
6121 self->attrs[COLOR_parser_nodes__AAttrPropdef___n_block].val = var_n_block; /* _n_block on <self:AAttrPropdef> */
6122 var43 = NULL;
6123 if (var_n_block == NULL) {
6124 var44 = 0; /* is null */
6125 } else {
6126 var44 = 1; /* arg is null and recv is not */
6127 }
6128 if (0) {
6129 { /* Inline kernel#Object#!= (var_n_block,var43) on <var_n_block:nullable AExpr> */
6130 var_other = var43;
6131 {
6132 var48 = ((short int (*)(val*, val*))(var_n_block->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_block, var_other) /* == on <var_n_block:nullable AExpr(AExpr)>*/;
6133 var47 = var48;
6134 }
6135 var49 = !var47;
6136 var45 = var49;
6137 goto RET_LABEL46;
6138 RET_LABEL46:(void)0;
6139 }
6140 var44 = var45;
6141 }
6142 if (var44){
6143 {
6144 { /* Inline parser_nodes#ANode#parent= (var_n_block,self) on <var_n_block:nullable AExpr(AExpr)> */
6145 var_n_block->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_block:nullable AExpr(AExpr)> */
6146 RET_LABEL50:(void)0;
6147 }
6148 }
6149 } else {
6150 }
6151 RET_LABEL:;
6152 }
6153 /* method parser_prod#AAttrPropdef#init_aattrpropdef for (self: Object, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable TKwvar, nullable TId, nullable AType, nullable AExpr, nullable AAnnotations, nullable AExpr) */
6154 void VIRTUAL_parser_prod__AAttrPropdef__init_aattrpropdef(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6, val* p7, val* p8) {
6155 parser_prod__AAttrPropdef__init_aattrpropdef(self, p0, p1, p2, p3, p4, p5, p6, p7, p8); /* Direct call parser_prod#AAttrPropdef#init_aattrpropdef on <self:Object(AAttrPropdef)>*/
6156 RET_LABEL:;
6157 }
6158 /* method parser_prod#AAttrPropdef#replace_child for (self: AAttrPropdef, ANode, nullable ANode) */
6159 void parser_prod__AAttrPropdef__replace_child(val* self, val* p0, val* p1) {
6160 val* var_old_child /* var old_child: ANode */;
6161 val* var_new_child /* var new_child: nullable ANode */;
6162 val* var /* : nullable ADoc */;
6163 short int var1 /* : Bool */;
6164 short int var2 /* : Bool */;
6165 val* var_other /* var other: nullable Object */;
6166 short int var4 /* : Bool */;
6167 short int var6 /* : Bool */;
6168 short int var7 /* : Bool */;
6169 int cltype;
6170 int idtype;
6171 const char* var_class_name;
6172 val* var8 /* : nullable TKwredef */;
6173 short int var9 /* : Bool */;
6174 short int var10 /* : Bool */;
6175 short int var12 /* : Bool */;
6176 short int var14 /* : Bool */;
6177 short int var15 /* : Bool */;
6178 int cltype16;
6179 int idtype17;
6180 const char* var_class_name18;
6181 val* var19 /* : nullable AVisibility */;
6182 short int var20 /* : Bool */;
6183 short int var21 /* : Bool */;
6184 short int var23 /* : Bool */;
6185 short int var25 /* : Bool */;
6186 short int var26 /* : Bool */;
6187 int cltype27;
6188 int idtype28;
6189 const char* var_class_name29;
6190 val* var30 /* : TKwvar */;
6191 short int var31 /* : Bool */;
6192 short int var32 /* : Bool */;
6193 short int var34 /* : Bool */;
6194 short int var36 /* : Bool */;
6195 short int var37 /* : Bool */;
6196 int cltype38;
6197 int idtype39;
6198 const char* var_class_name40;
6199 val* var41 /* : TId */;
6200 short int var42 /* : Bool */;
6201 short int var43 /* : Bool */;
6202 short int var45 /* : Bool */;
6203 short int var47 /* : Bool */;
6204 short int var48 /* : Bool */;
6205 int cltype49;
6206 int idtype50;
6207 const char* var_class_name51;
6208 val* var52 /* : nullable AType */;
6209 short int var53 /* : Bool */;
6210 short int var54 /* : Bool */;
6211 short int var56 /* : Bool */;
6212 short int var58 /* : Bool */;
6213 short int var59 /* : Bool */;
6214 int cltype60;
6215 int idtype61;
6216 const char* var_class_name62;
6217 val* var63 /* : nullable AExpr */;
6218 short int var64 /* : Bool */;
6219 short int var65 /* : Bool */;
6220 short int var67 /* : Bool */;
6221 short int var69 /* : Bool */;
6222 short int var70 /* : Bool */;
6223 int cltype71;
6224 int idtype72;
6225 const char* var_class_name73;
6226 val* var74 /* : nullable AAnnotations */;
6227 short int var75 /* : Bool */;
6228 short int var76 /* : Bool */;
6229 short int var78 /* : Bool */;
6230 short int var80 /* : Bool */;
6231 short int var81 /* : Bool */;
6232 int cltype82;
6233 int idtype83;
6234 const char* var_class_name84;
6235 val* var85 /* : nullable AExpr */;
6236 short int var86 /* : Bool */;
6237 short int var87 /* : Bool */;
6238 short int var89 /* : Bool */;
6239 short int var91 /* : Bool */;
6240 short int var92 /* : Bool */;
6241 int cltype93;
6242 int idtype94;
6243 const char* var_class_name95;
6244 var_old_child = p0;
6245 var_new_child = p1;
6246 var = self->attrs[COLOR_parser_nodes__APropdef___n_doc].val; /* _n_doc on <self:AAttrPropdef> */
6247 if (var == NULL) {
6248 var1 = 0; /* <var_old_child:ANode> cannot be null */
6249 } else {
6250 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable ADoc> */
6251 var_other = var_old_child;
6252 {
6253 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable ADoc(ADoc)> */
6254 var6 = var == var_other;
6255 var4 = var6;
6256 goto RET_LABEL5;
6257 RET_LABEL5:(void)0;
6258 }
6259 }
6260 var2 = var4;
6261 goto RET_LABEL3;
6262 RET_LABEL3:(void)0;
6263 }
6264 var1 = var2;
6265 }
6266 if (var1){
6267 /* <var_new_child:nullable ANode> isa nullable ADoc */
6268 cltype = type_nullable_parser_nodes__ADoc.color;
6269 idtype = type_nullable_parser_nodes__ADoc.id;
6270 if(var_new_child == NULL) {
6271 var7 = 1;
6272 } else {
6273 if(cltype >= var_new_child->type->table_size) {
6274 var7 = 0;
6275 } else {
6276 var7 = var_new_child->type->type_table[cltype] == idtype;
6277 }
6278 }
6279 if (unlikely(!var7)) {
6280 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
6281 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ADoc", var_class_name);
6282 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 872);
6283 show_backtrace(1);
6284 }
6285 {
6286 parser_prod__AAttrPropdef__n_doc_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_doc= on <self:AAttrPropdef>*/
6287 }
6288 goto RET_LABEL;
6289 } else {
6290 }
6291 var8 = self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val; /* _n_kwredef on <self:AAttrPropdef> */
6292 if (var8 == NULL) {
6293 var9 = 0; /* <var_old_child:ANode> cannot be null */
6294 } else {
6295 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwredef> */
6296 var_other = var_old_child;
6297 {
6298 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwredef(TKwredef)> */
6299 var14 = var8 == var_other;
6300 var12 = var14;
6301 goto RET_LABEL13;
6302 RET_LABEL13:(void)0;
6303 }
6304 }
6305 var10 = var12;
6306 goto RET_LABEL11;
6307 RET_LABEL11:(void)0;
6308 }
6309 var9 = var10;
6310 }
6311 if (var9){
6312 /* <var_new_child:nullable ANode> isa nullable TKwredef */
6313 cltype16 = type_nullable_parser_nodes__TKwredef.color;
6314 idtype17 = type_nullable_parser_nodes__TKwredef.id;
6315 if(var_new_child == NULL) {
6316 var15 = 1;
6317 } else {
6318 if(cltype16 >= var_new_child->type->table_size) {
6319 var15 = 0;
6320 } else {
6321 var15 = var_new_child->type->type_table[cltype16] == idtype17;
6322 }
6323 }
6324 if (unlikely(!var15)) {
6325 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
6326 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name18);
6327 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 876);
6328 show_backtrace(1);
6329 }
6330 {
6331 parser_prod__AAttrPropdef__n_kwredef_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_kwredef= on <self:AAttrPropdef>*/
6332 }
6333 goto RET_LABEL;
6334 } else {
6335 }
6336 var19 = self->attrs[COLOR_parser_nodes__APropdef___n_visibility].val; /* _n_visibility on <self:AAttrPropdef> */
6337 if (var19 == NULL) {
6338 var20 = 0; /* <var_old_child:ANode> cannot be null */
6339 } else {
6340 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:nullable AVisibility> */
6341 var_other = var_old_child;
6342 {
6343 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:nullable AVisibility(AVisibility)> */
6344 var25 = var19 == var_other;
6345 var23 = var25;
6346 goto RET_LABEL24;
6347 RET_LABEL24:(void)0;
6348 }
6349 }
6350 var21 = var23;
6351 goto RET_LABEL22;
6352 RET_LABEL22:(void)0;
6353 }
6354 var20 = var21;
6355 }
6356 if (var20){
6357 /* <var_new_child:nullable ANode> isa AVisibility */
6358 cltype27 = type_parser_nodes__AVisibility.color;
6359 idtype28 = type_parser_nodes__AVisibility.id;
6360 if(var_new_child == NULL) {
6361 var26 = 0;
6362 } else {
6363 if(cltype27 >= var_new_child->type->table_size) {
6364 var26 = 0;
6365 } else {
6366 var26 = var_new_child->type->type_table[cltype27] == idtype28;
6367 }
6368 }
6369 if (unlikely(!var26)) {
6370 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
6371 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name29);
6372 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 880);
6373 show_backtrace(1);
6374 }
6375 {
6376 parser_prod__AAttrPropdef__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_visibility= on <self:AAttrPropdef>*/
6377 }
6378 goto RET_LABEL;
6379 } else {
6380 }
6381 var30 = self->attrs[COLOR_parser_nodes__AAttrPropdef___n_kwvar].val; /* _n_kwvar on <self:AAttrPropdef> */
6382 if (unlikely(var30 == NULL)) {
6383 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwvar");
6384 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 883);
6385 show_backtrace(1);
6386 }
6387 {
6388 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:TKwvar> */
6389 var_other = var_old_child;
6390 {
6391 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:TKwvar> */
6392 var36 = var30 == var_other;
6393 var34 = var36;
6394 goto RET_LABEL35;
6395 RET_LABEL35:(void)0;
6396 }
6397 }
6398 var32 = var34;
6399 goto RET_LABEL33;
6400 RET_LABEL33:(void)0;
6401 }
6402 var31 = var32;
6403 }
6404 if (var31){
6405 /* <var_new_child:nullable ANode> isa TKwvar */
6406 cltype38 = type_parser_nodes__TKwvar.color;
6407 idtype39 = type_parser_nodes__TKwvar.id;
6408 if(var_new_child == NULL) {
6409 var37 = 0;
6410 } else {
6411 if(cltype38 >= var_new_child->type->table_size) {
6412 var37 = 0;
6413 } else {
6414 var37 = var_new_child->type->type_table[cltype38] == idtype39;
6415 }
6416 }
6417 if (unlikely(!var37)) {
6418 var_class_name40 = var_new_child == NULL ? "null" : var_new_child->type->name;
6419 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwvar", var_class_name40);
6420 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 884);
6421 show_backtrace(1);
6422 }
6423 {
6424 parser_prod__AAttrPropdef__n_kwvar_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_kwvar= on <self:AAttrPropdef>*/
6425 }
6426 goto RET_LABEL;
6427 } else {
6428 }
6429 var41 = self->attrs[COLOR_parser_nodes__AAttrPropdef___n_id2].val; /* _n_id2 on <self:AAttrPropdef> */
6430 if (unlikely(var41 == NULL)) {
6431 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id2");
6432 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 887);
6433 show_backtrace(1);
6434 }
6435 {
6436 { /* Inline kernel#Object#== (var41,var_old_child) on <var41:TId> */
6437 var_other = var_old_child;
6438 {
6439 { /* Inline kernel#Object#is_same_instance (var41,var_other) on <var41:TId> */
6440 var47 = var41 == var_other;
6441 var45 = var47;
6442 goto RET_LABEL46;
6443 RET_LABEL46:(void)0;
6444 }
6445 }
6446 var43 = var45;
6447 goto RET_LABEL44;
6448 RET_LABEL44:(void)0;
6449 }
6450 var42 = var43;
6451 }
6452 if (var42){
6453 /* <var_new_child:nullable ANode> isa TId */
6454 cltype49 = type_parser_nodes__TId.color;
6455 idtype50 = type_parser_nodes__TId.id;
6456 if(var_new_child == NULL) {
6457 var48 = 0;
6458 } else {
6459 if(cltype49 >= var_new_child->type->table_size) {
6460 var48 = 0;
6461 } else {
6462 var48 = var_new_child->type->type_table[cltype49] == idtype50;
6463 }
6464 }
6465 if (unlikely(!var48)) {
6466 var_class_name51 = var_new_child == NULL ? "null" : var_new_child->type->name;
6467 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TId", var_class_name51);
6468 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 888);
6469 show_backtrace(1);
6470 }
6471 {
6472 parser_prod__AAttrPropdef__n_id2_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_id2= on <self:AAttrPropdef>*/
6473 }
6474 goto RET_LABEL;
6475 } else {
6476 }
6477 var52 = self->attrs[COLOR_parser_nodes__AAttrPropdef___n_type].val; /* _n_type on <self:AAttrPropdef> */
6478 if (var52 == NULL) {
6479 var53 = 0; /* <var_old_child:ANode> cannot be null */
6480 } else {
6481 { /* Inline kernel#Object#== (var52,var_old_child) on <var52:nullable AType> */
6482 var_other = var_old_child;
6483 {
6484 { /* Inline kernel#Object#is_same_instance (var52,var_other) on <var52:nullable AType(AType)> */
6485 var58 = var52 == var_other;
6486 var56 = var58;
6487 goto RET_LABEL57;
6488 RET_LABEL57:(void)0;
6489 }
6490 }
6491 var54 = var56;
6492 goto RET_LABEL55;
6493 RET_LABEL55:(void)0;
6494 }
6495 var53 = var54;
6496 }
6497 if (var53){
6498 /* <var_new_child:nullable ANode> isa nullable AType */
6499 cltype60 = type_nullable_parser_nodes__AType.color;
6500 idtype61 = type_nullable_parser_nodes__AType.id;
6501 if(var_new_child == NULL) {
6502 var59 = 1;
6503 } else {
6504 if(cltype60 >= var_new_child->type->table_size) {
6505 var59 = 0;
6506 } else {
6507 var59 = var_new_child->type->type_table[cltype60] == idtype61;
6508 }
6509 }
6510 if (unlikely(!var59)) {
6511 var_class_name62 = var_new_child == NULL ? "null" : var_new_child->type->name;
6512 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AType", var_class_name62);
6513 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 892);
6514 show_backtrace(1);
6515 }
6516 {
6517 parser_prod__AAttrPropdef__n_type_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_type= on <self:AAttrPropdef>*/
6518 }
6519 goto RET_LABEL;
6520 } else {
6521 }
6522 var63 = self->attrs[COLOR_parser_nodes__AAttrPropdef___n_expr].val; /* _n_expr on <self:AAttrPropdef> */
6523 if (var63 == NULL) {
6524 var64 = 0; /* <var_old_child:ANode> cannot be null */
6525 } else {
6526 { /* Inline kernel#Object#== (var63,var_old_child) on <var63:nullable AExpr> */
6527 var_other = var_old_child;
6528 {
6529 { /* Inline kernel#Object#is_same_instance (var63,var_other) on <var63:nullable AExpr(AExpr)> */
6530 var69 = var63 == var_other;
6531 var67 = var69;
6532 goto RET_LABEL68;
6533 RET_LABEL68:(void)0;
6534 }
6535 }
6536 var65 = var67;
6537 goto RET_LABEL66;
6538 RET_LABEL66:(void)0;
6539 }
6540 var64 = var65;
6541 }
6542 if (var64){
6543 /* <var_new_child:nullable ANode> isa nullable AExpr */
6544 cltype71 = type_nullable_parser_nodes__AExpr.color;
6545 idtype72 = type_nullable_parser_nodes__AExpr.id;
6546 if(var_new_child == NULL) {
6547 var70 = 1;
6548 } else {
6549 if(cltype71 >= var_new_child->type->table_size) {
6550 var70 = 0;
6551 } else {
6552 var70 = var_new_child->type->type_table[cltype71] == idtype72;
6553 }
6554 }
6555 if (unlikely(!var70)) {
6556 var_class_name73 = var_new_child == NULL ? "null" : var_new_child->type->name;
6557 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExpr", var_class_name73);
6558 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 896);
6559 show_backtrace(1);
6560 }
6561 {
6562 parser_prod__AAttrPropdef__n_expr_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_expr= on <self:AAttrPropdef>*/
6563 }
6564 goto RET_LABEL;
6565 } else {
6566 }
6567 var74 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AAttrPropdef> */
6568 if (var74 == NULL) {
6569 var75 = 0; /* <var_old_child:ANode> cannot be null */
6570 } else {
6571 { /* Inline kernel#Object#== (var74,var_old_child) on <var74:nullable AAnnotations> */
6572 var_other = var_old_child;
6573 {
6574 { /* Inline kernel#Object#is_same_instance (var74,var_other) on <var74:nullable AAnnotations(AAnnotations)> */
6575 var80 = var74 == var_other;
6576 var78 = var80;
6577 goto RET_LABEL79;
6578 RET_LABEL79:(void)0;
6579 }
6580 }
6581 var76 = var78;
6582 goto RET_LABEL77;
6583 RET_LABEL77:(void)0;
6584 }
6585 var75 = var76;
6586 }
6587 if (var75){
6588 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
6589 cltype82 = type_nullable_parser_nodes__AAnnotations.color;
6590 idtype83 = type_nullable_parser_nodes__AAnnotations.id;
6591 if(var_new_child == NULL) {
6592 var81 = 1;
6593 } else {
6594 if(cltype82 >= var_new_child->type->table_size) {
6595 var81 = 0;
6596 } else {
6597 var81 = var_new_child->type->type_table[cltype82] == idtype83;
6598 }
6599 }
6600 if (unlikely(!var81)) {
6601 var_class_name84 = var_new_child == NULL ? "null" : var_new_child->type->name;
6602 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name84);
6603 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 900);
6604 show_backtrace(1);
6605 }
6606 {
6607 parser_prod__AAttrPropdef__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_annotations= on <self:AAttrPropdef>*/
6608 }
6609 goto RET_LABEL;
6610 } else {
6611 }
6612 var85 = self->attrs[COLOR_parser_nodes__AAttrPropdef___n_block].val; /* _n_block on <self:AAttrPropdef> */
6613 if (var85 == NULL) {
6614 var86 = 0; /* <var_old_child:ANode> cannot be null */
6615 } else {
6616 { /* Inline kernel#Object#== (var85,var_old_child) on <var85:nullable AExpr> */
6617 var_other = var_old_child;
6618 {
6619 { /* Inline kernel#Object#is_same_instance (var85,var_other) on <var85:nullable AExpr(AExpr)> */
6620 var91 = var85 == var_other;
6621 var89 = var91;
6622 goto RET_LABEL90;
6623 RET_LABEL90:(void)0;
6624 }
6625 }
6626 var87 = var89;
6627 goto RET_LABEL88;
6628 RET_LABEL88:(void)0;
6629 }
6630 var86 = var87;
6631 }
6632 if (var86){
6633 /* <var_new_child:nullable ANode> isa nullable AExpr */
6634 cltype93 = type_nullable_parser_nodes__AExpr.color;
6635 idtype94 = type_nullable_parser_nodes__AExpr.id;
6636 if(var_new_child == NULL) {
6637 var92 = 1;
6638 } else {
6639 if(cltype93 >= var_new_child->type->table_size) {
6640 var92 = 0;
6641 } else {
6642 var92 = var_new_child->type->type_table[cltype93] == idtype94;
6643 }
6644 }
6645 if (unlikely(!var92)) {
6646 var_class_name95 = var_new_child == NULL ? "null" : var_new_child->type->name;
6647 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExpr", var_class_name95);
6648 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 904);
6649 show_backtrace(1);
6650 }
6651 {
6652 parser_prod__AAttrPropdef__n_block_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_block= on <self:AAttrPropdef>*/
6653 }
6654 goto RET_LABEL;
6655 } else {
6656 }
6657 RET_LABEL:;
6658 }
6659 /* method parser_prod#AAttrPropdef#replace_child for (self: Object, ANode, nullable ANode) */
6660 void VIRTUAL_parser_prod__AAttrPropdef__replace_child(val* self, val* p0, val* p1) {
6661 parser_prod__AAttrPropdef__replace_child(self, p0, p1); /* Direct call parser_prod#AAttrPropdef#replace_child on <self:Object(AAttrPropdef)>*/
6662 RET_LABEL:;
6663 }
6664 /* method parser_prod#AAttrPropdef#n_doc= for (self: AAttrPropdef, nullable ADoc) */
6665 void parser_prod__AAttrPropdef__n_doc_61d(val* self, val* p0) {
6666 val* var_node /* var node: nullable ADoc */;
6667 val* var /* : null */;
6668 short int var1 /* : Bool */;
6669 short int var2 /* : Bool */;
6670 val* var_other /* var other: nullable Object */;
6671 short int var4 /* : Bool */;
6672 short int var5 /* : Bool */;
6673 short int var6 /* : Bool */;
6674 var_node = p0;
6675 self->attrs[COLOR_parser_nodes__APropdef___n_doc].val = var_node; /* _n_doc on <self:AAttrPropdef> */
6676 var = NULL;
6677 if (var_node == NULL) {
6678 var1 = 0; /* is null */
6679 } else {
6680 var1 = 1; /* arg is null and recv is not */
6681 }
6682 if (0) {
6683 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable ADoc> */
6684 var_other = var;
6685 {
6686 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable ADoc(ADoc)>*/;
6687 var4 = var5;
6688 }
6689 var6 = !var4;
6690 var2 = var6;
6691 goto RET_LABEL3;
6692 RET_LABEL3:(void)0;
6693 }
6694 var1 = var2;
6695 }
6696 if (var1){
6697 {
6698 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ADoc(ADoc)> */
6699 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ADoc(ADoc)> */
6700 RET_LABEL7:(void)0;
6701 }
6702 }
6703 } else {
6704 }
6705 RET_LABEL:;
6706 }
6707 /* method parser_prod#AAttrPropdef#n_doc= for (self: Object, nullable ADoc) */
6708 void VIRTUAL_parser_prod__AAttrPropdef__n_doc_61d(val* self, val* p0) {
6709 parser_prod__AAttrPropdef__n_doc_61d(self, p0); /* Direct call parser_prod#AAttrPropdef#n_doc= on <self:Object(AAttrPropdef)>*/
6710 RET_LABEL:;
6711 }
6712 /* method parser_prod#AAttrPropdef#n_kwredef= for (self: AAttrPropdef, nullable TKwredef) */
6713 void parser_prod__AAttrPropdef__n_kwredef_61d(val* self, val* p0) {
6714 val* var_node /* var node: nullable TKwredef */;
6715 val* var /* : null */;
6716 short int var1 /* : Bool */;
6717 short int var2 /* : Bool */;
6718 val* var_other /* var other: nullable Object */;
6719 short int var4 /* : Bool */;
6720 short int var5 /* : Bool */;
6721 short int var6 /* : Bool */;
6722 var_node = p0;
6723 self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val = var_node; /* _n_kwredef on <self:AAttrPropdef> */
6724 var = NULL;
6725 if (var_node == NULL) {
6726 var1 = 0; /* is null */
6727 } else {
6728 var1 = 1; /* arg is null and recv is not */
6729 }
6730 if (0) {
6731 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
6732 var_other = var;
6733 {
6734 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
6735 var4 = var5;
6736 }
6737 var6 = !var4;
6738 var2 = var6;
6739 goto RET_LABEL3;
6740 RET_LABEL3:(void)0;
6741 }
6742 var1 = var2;
6743 }
6744 if (var1){
6745 {
6746 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
6747 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
6748 RET_LABEL7:(void)0;
6749 }
6750 }
6751 } else {
6752 }
6753 RET_LABEL:;
6754 }
6755 /* method parser_prod#AAttrPropdef#n_kwredef= for (self: Object, nullable TKwredef) */
6756 void VIRTUAL_parser_prod__AAttrPropdef__n_kwredef_61d(val* self, val* p0) {
6757 parser_prod__AAttrPropdef__n_kwredef_61d(self, p0); /* Direct call parser_prod#AAttrPropdef#n_kwredef= on <self:Object(AAttrPropdef)>*/
6758 RET_LABEL:;
6759 }
6760 /* method parser_prod#AAttrPropdef#n_visibility= for (self: AAttrPropdef, nullable AVisibility) */
6761 void parser_prod__AAttrPropdef__n_visibility_61d(val* self, val* p0) {
6762 val* var_node /* var node: nullable AVisibility */;
6763 var_node = p0;
6764 self->attrs[COLOR_parser_nodes__APropdef___n_visibility].val = var_node; /* _n_visibility on <self:AAttrPropdef> */
6765 if (var_node == NULL) {
6766 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6767 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 922);
6768 show_backtrace(1);
6769 } else {
6770 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AVisibility> */
6771 if (unlikely(var_node == NULL)) {
6772 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6773 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
6774 show_backtrace(1);
6775 }
6776 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AVisibility> */
6777 RET_LABEL1:(void)0;
6778 }
6779 }
6780 RET_LABEL:;
6781 }
6782 /* method parser_prod#AAttrPropdef#n_visibility= for (self: Object, nullable AVisibility) */
6783 void VIRTUAL_parser_prod__AAttrPropdef__n_visibility_61d(val* self, val* p0) {
6784 parser_prod__AAttrPropdef__n_visibility_61d(self, p0); /* Direct call parser_prod#AAttrPropdef#n_visibility= on <self:Object(AAttrPropdef)>*/
6785 RET_LABEL:;
6786 }
6787 /* method parser_prod#AAttrPropdef#n_kwvar= for (self: AAttrPropdef, TKwvar) */
6788 void parser_prod__AAttrPropdef__n_kwvar_61d(val* self, val* p0) {
6789 val* var_node /* var node: TKwvar */;
6790 var_node = p0;
6791 self->attrs[COLOR_parser_nodes__AAttrPropdef___n_kwvar].val = var_node; /* _n_kwvar on <self:AAttrPropdef> */
6792 {
6793 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwvar> */
6794 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwvar> */
6795 RET_LABEL1:(void)0;
6796 }
6797 }
6798 RET_LABEL:;
6799 }
6800 /* method parser_prod#AAttrPropdef#n_kwvar= for (self: Object, TKwvar) */
6801 void VIRTUAL_parser_prod__AAttrPropdef__n_kwvar_61d(val* self, val* p0) {
6802 parser_prod__AAttrPropdef__n_kwvar_61d(self, p0); /* Direct call parser_prod#AAttrPropdef#n_kwvar= on <self:Object(AAttrPropdef)>*/
6803 RET_LABEL:;
6804 }
6805 /* method parser_prod#AAttrPropdef#n_id2= for (self: AAttrPropdef, TId) */
6806 void parser_prod__AAttrPropdef__n_id2_61d(val* self, val* p0) {
6807 val* var_node /* var node: TId */;
6808 var_node = p0;
6809 self->attrs[COLOR_parser_nodes__AAttrPropdef___n_id2].val = var_node; /* _n_id2 on <self:AAttrPropdef> */
6810 {
6811 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TId> */
6812 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TId> */
6813 RET_LABEL1:(void)0;
6814 }
6815 }
6816 RET_LABEL:;
6817 }
6818 /* method parser_prod#AAttrPropdef#n_id2= for (self: Object, TId) */
6819 void VIRTUAL_parser_prod__AAttrPropdef__n_id2_61d(val* self, val* p0) {
6820 parser_prod__AAttrPropdef__n_id2_61d(self, p0); /* Direct call parser_prod#AAttrPropdef#n_id2= on <self:Object(AAttrPropdef)>*/
6821 RET_LABEL:;
6822 }
6823 /* method parser_prod#AAttrPropdef#n_type= for (self: AAttrPropdef, nullable AType) */
6824 void parser_prod__AAttrPropdef__n_type_61d(val* self, val* p0) {
6825 val* var_node /* var node: nullable AType */;
6826 val* var /* : null */;
6827 short int var1 /* : Bool */;
6828 short int var2 /* : Bool */;
6829 val* var_other /* var other: nullable Object */;
6830 short int var4 /* : Bool */;
6831 short int var5 /* : Bool */;
6832 short int var6 /* : Bool */;
6833 var_node = p0;
6834 self->attrs[COLOR_parser_nodes__AAttrPropdef___n_type].val = var_node; /* _n_type on <self:AAttrPropdef> */
6835 var = NULL;
6836 if (var_node == NULL) {
6837 var1 = 0; /* is null */
6838 } else {
6839 var1 = 1; /* arg is null and recv is not */
6840 }
6841 if (0) {
6842 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AType> */
6843 var_other = var;
6844 {
6845 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AType(AType)>*/;
6846 var4 = var5;
6847 }
6848 var6 = !var4;
6849 var2 = var6;
6850 goto RET_LABEL3;
6851 RET_LABEL3:(void)0;
6852 }
6853 var1 = var2;
6854 }
6855 if (var1){
6856 {
6857 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AType(AType)> */
6858 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AType(AType)> */
6859 RET_LABEL7:(void)0;
6860 }
6861 }
6862 } else {
6863 }
6864 RET_LABEL:;
6865 }
6866 /* method parser_prod#AAttrPropdef#n_type= for (self: Object, nullable AType) */
6867 void VIRTUAL_parser_prod__AAttrPropdef__n_type_61d(val* self, val* p0) {
6868 parser_prod__AAttrPropdef__n_type_61d(self, p0); /* Direct call parser_prod#AAttrPropdef#n_type= on <self:Object(AAttrPropdef)>*/
6869 RET_LABEL:;
6870 }
6871 /* method parser_prod#AAttrPropdef#n_expr= for (self: AAttrPropdef, nullable AExpr) */
6872 void parser_prod__AAttrPropdef__n_expr_61d(val* self, val* p0) {
6873 val* var_node /* var node: nullable AExpr */;
6874 val* var /* : null */;
6875 short int var1 /* : Bool */;
6876 short int var2 /* : Bool */;
6877 val* var_other /* var other: nullable Object */;
6878 short int var4 /* : Bool */;
6879 short int var5 /* : Bool */;
6880 short int var6 /* : Bool */;
6881 var_node = p0;
6882 self->attrs[COLOR_parser_nodes__AAttrPropdef___n_expr].val = var_node; /* _n_expr on <self:AAttrPropdef> */
6883 var = NULL;
6884 if (var_node == NULL) {
6885 var1 = 0; /* is null */
6886 } else {
6887 var1 = 1; /* arg is null and recv is not */
6888 }
6889 if (0) {
6890 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExpr> */
6891 var_other = var;
6892 {
6893 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExpr(AExpr)>*/;
6894 var4 = var5;
6895 }
6896 var6 = !var4;
6897 var2 = var6;
6898 goto RET_LABEL3;
6899 RET_LABEL3:(void)0;
6900 }
6901 var1 = var2;
6902 }
6903 if (var1){
6904 {
6905 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExpr(AExpr)> */
6906 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExpr(AExpr)> */
6907 RET_LABEL7:(void)0;
6908 }
6909 }
6910 } else {
6911 }
6912 RET_LABEL:;
6913 }
6914 /* method parser_prod#AAttrPropdef#n_expr= for (self: Object, nullable AExpr) */
6915 void VIRTUAL_parser_prod__AAttrPropdef__n_expr_61d(val* self, val* p0) {
6916 parser_prod__AAttrPropdef__n_expr_61d(self, p0); /* Direct call parser_prod#AAttrPropdef#n_expr= on <self:Object(AAttrPropdef)>*/
6917 RET_LABEL:;
6918 }
6919 /* method parser_prod#AAttrPropdef#n_annotations= for (self: AAttrPropdef, nullable AAnnotations) */
6920 void parser_prod__AAttrPropdef__n_annotations_61d(val* self, val* p0) {
6921 val* var_node /* var node: nullable AAnnotations */;
6922 val* var /* : null */;
6923 short int var1 /* : Bool */;
6924 short int var2 /* : Bool */;
6925 val* var_other /* var other: nullable Object */;
6926 short int var4 /* : Bool */;
6927 short int var5 /* : Bool */;
6928 short int var6 /* : Bool */;
6929 var_node = p0;
6930 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AAttrPropdef> */
6931 var = NULL;
6932 if (var_node == NULL) {
6933 var1 = 0; /* is null */
6934 } else {
6935 var1 = 1; /* arg is null and recv is not */
6936 }
6937 if (0) {
6938 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
6939 var_other = var;
6940 {
6941 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
6942 var4 = var5;
6943 }
6944 var6 = !var4;
6945 var2 = var6;
6946 goto RET_LABEL3;
6947 RET_LABEL3:(void)0;
6948 }
6949 var1 = var2;
6950 }
6951 if (var1){
6952 {
6953 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
6954 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
6955 RET_LABEL7:(void)0;
6956 }
6957 }
6958 } else {
6959 }
6960 RET_LABEL:;
6961 }
6962 /* method parser_prod#AAttrPropdef#n_annotations= for (self: Object, nullable AAnnotations) */
6963 void VIRTUAL_parser_prod__AAttrPropdef__n_annotations_61d(val* self, val* p0) {
6964 parser_prod__AAttrPropdef__n_annotations_61d(self, p0); /* Direct call parser_prod#AAttrPropdef#n_annotations= on <self:Object(AAttrPropdef)>*/
6965 RET_LABEL:;
6966 }
6967 /* method parser_prod#AAttrPropdef#n_block= for (self: AAttrPropdef, nullable AExpr) */
6968 void parser_prod__AAttrPropdef__n_block_61d(val* self, val* p0) {
6969 val* var_node /* var node: nullable AExpr */;
6970 val* var /* : null */;
6971 short int var1 /* : Bool */;
6972 short int var2 /* : Bool */;
6973 val* var_other /* var other: nullable Object */;
6974 short int var4 /* : Bool */;
6975 short int var5 /* : Bool */;
6976 short int var6 /* : Bool */;
6977 var_node = p0;
6978 self->attrs[COLOR_parser_nodes__AAttrPropdef___n_block].val = var_node; /* _n_block on <self:AAttrPropdef> */
6979 var = NULL;
6980 if (var_node == NULL) {
6981 var1 = 0; /* is null */
6982 } else {
6983 var1 = 1; /* arg is null and recv is not */
6984 }
6985 if (0) {
6986 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExpr> */
6987 var_other = var;
6988 {
6989 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExpr(AExpr)>*/;
6990 var4 = var5;
6991 }
6992 var6 = !var4;
6993 var2 = var6;
6994 goto RET_LABEL3;
6995 RET_LABEL3:(void)0;
6996 }
6997 var1 = var2;
6998 }
6999 if (var1){
7000 {
7001 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExpr(AExpr)> */
7002 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExpr(AExpr)> */
7003 RET_LABEL7:(void)0;
7004 }
7005 }
7006 } else {
7007 }
7008 RET_LABEL:;
7009 }
7010 /* method parser_prod#AAttrPropdef#n_block= for (self: Object, nullable AExpr) */
7011 void VIRTUAL_parser_prod__AAttrPropdef__n_block_61d(val* self, val* p0) {
7012 parser_prod__AAttrPropdef__n_block_61d(self, p0); /* Direct call parser_prod#AAttrPropdef#n_block= on <self:Object(AAttrPropdef)>*/
7013 RET_LABEL:;
7014 }
7015 /* method parser_prod#AAttrPropdef#visit_all for (self: AAttrPropdef, Visitor) */
7016 void parser_prod__AAttrPropdef__visit_all(val* self, val* p0) {
7017 val* var_v /* var v: Visitor */;
7018 val* var /* : nullable ADoc */;
7019 val* var1 /* : nullable TKwredef */;
7020 val* var2 /* : nullable AVisibility */;
7021 val* var3 /* : TKwvar */;
7022 val* var4 /* : TId */;
7023 val* var5 /* : nullable AType */;
7024 val* var6 /* : nullable AExpr */;
7025 val* var7 /* : nullable AAnnotations */;
7026 val* var8 /* : nullable AExpr */;
7027 var_v = p0;
7028 var = self->attrs[COLOR_parser_nodes__APropdef___n_doc].val; /* _n_doc on <self:AAttrPropdef> */
7029 {
7030 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7031 }
7032 var1 = self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val; /* _n_kwredef on <self:AAttrPropdef> */
7033 {
7034 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7035 }
7036 var2 = self->attrs[COLOR_parser_nodes__APropdef___n_visibility].val; /* _n_visibility on <self:AAttrPropdef> */
7037 {
7038 parser_nodes__Visitor__enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7039 }
7040 var3 = self->attrs[COLOR_parser_nodes__AAttrPropdef___n_kwvar].val; /* _n_kwvar on <self:AAttrPropdef> */
7041 if (unlikely(var3 == NULL)) {
7042 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwvar");
7043 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 961);
7044 show_backtrace(1);
7045 }
7046 {
7047 parser_nodes__Visitor__enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7048 }
7049 var4 = self->attrs[COLOR_parser_nodes__AAttrPropdef___n_id2].val; /* _n_id2 on <self:AAttrPropdef> */
7050 if (unlikely(var4 == NULL)) {
7051 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id2");
7052 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 962);
7053 show_backtrace(1);
7054 }
7055 {
7056 parser_nodes__Visitor__enter_visit(var_v, var4); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7057 }
7058 var5 = self->attrs[COLOR_parser_nodes__AAttrPropdef___n_type].val; /* _n_type on <self:AAttrPropdef> */
7059 {
7060 parser_nodes__Visitor__enter_visit(var_v, var5); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7061 }
7062 var6 = self->attrs[COLOR_parser_nodes__AAttrPropdef___n_expr].val; /* _n_expr on <self:AAttrPropdef> */
7063 {
7064 parser_nodes__Visitor__enter_visit(var_v, var6); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7065 }
7066 var7 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AAttrPropdef> */
7067 {
7068 parser_nodes__Visitor__enter_visit(var_v, var7); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7069 }
7070 var8 = self->attrs[COLOR_parser_nodes__AAttrPropdef___n_block].val; /* _n_block on <self:AAttrPropdef> */
7071 {
7072 parser_nodes__Visitor__enter_visit(var_v, var8); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7073 }
7074 RET_LABEL:;
7075 }
7076 /* method parser_prod#AAttrPropdef#visit_all for (self: Object, Visitor) */
7077 void VIRTUAL_parser_prod__AAttrPropdef__visit_all(val* self, val* p0) {
7078 parser_prod__AAttrPropdef__visit_all(self, p0); /* Direct call parser_prod#AAttrPropdef#visit_all on <self:Object(AAttrPropdef)>*/
7079 RET_LABEL:;
7080 }
7081 /* method parser_prod#AMainMethPropdef#init_amainmethpropdef for (self: AMainMethPropdef, nullable TKwredef, nullable AExpr) */
7082 void parser_prod__AMainMethPropdef__init_amainmethpropdef(val* self, val* p0, val* p1) {
7083 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
7084 val* var_n_block /* var n_block: nullable AExpr */;
7085 val* var /* : null */;
7086 short int var1 /* : Bool */;
7087 short int var2 /* : Bool */;
7088 val* var_other /* var other: nullable Object */;
7089 short int var4 /* : Bool */;
7090 short int var5 /* : Bool */;
7091 short int var6 /* : Bool */;
7092 val* var8 /* : null */;
7093 short int var9 /* : Bool */;
7094 short int var10 /* : Bool */;
7095 short int var12 /* : Bool */;
7096 short int var13 /* : Bool */;
7097 short int var14 /* : Bool */;
7098 var_n_kwredef = p0;
7099 var_n_block = p1;
7100 self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:AMainMethPropdef> */
7101 var = NULL;
7102 if (var_n_kwredef == NULL) {
7103 var1 = 0; /* is null */
7104 } else {
7105 var1 = 1; /* arg is null and recv is not */
7106 }
7107 if (0) {
7108 { /* Inline kernel#Object#!= (var_n_kwredef,var) on <var_n_kwredef:nullable TKwredef> */
7109 var_other = var;
7110 {
7111 var5 = ((short int (*)(val*, val*))(var_n_kwredef->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
7112 var4 = var5;
7113 }
7114 var6 = !var4;
7115 var2 = var6;
7116 goto RET_LABEL3;
7117 RET_LABEL3:(void)0;
7118 }
7119 var1 = var2;
7120 }
7121 if (var1){
7122 {
7123 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
7124 var_n_kwredef->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
7125 RET_LABEL7:(void)0;
7126 }
7127 }
7128 } else {
7129 }
7130 self->attrs[COLOR_parser_nodes__AMethPropdef___n_block].val = var_n_block; /* _n_block on <self:AMainMethPropdef> */
7131 var8 = NULL;
7132 if (var_n_block == NULL) {
7133 var9 = 0; /* is null */
7134 } else {
7135 var9 = 1; /* arg is null and recv is not */
7136 }
7137 if (0) {
7138 { /* Inline kernel#Object#!= (var_n_block,var8) on <var_n_block:nullable AExpr> */
7139 var_other = var8;
7140 {
7141 var13 = ((short int (*)(val*, val*))(var_n_block->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_block, var_other) /* == on <var_n_block:nullable AExpr(AExpr)>*/;
7142 var12 = var13;
7143 }
7144 var14 = !var12;
7145 var10 = var14;
7146 goto RET_LABEL11;
7147 RET_LABEL11:(void)0;
7148 }
7149 var9 = var10;
7150 }
7151 if (var9){
7152 {
7153 { /* Inline parser_nodes#ANode#parent= (var_n_block,self) on <var_n_block:nullable AExpr(AExpr)> */
7154 var_n_block->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_block:nullable AExpr(AExpr)> */
7155 RET_LABEL15:(void)0;
7156 }
7157 }
7158 } else {
7159 }
7160 RET_LABEL:;
7161 }
7162 /* method parser_prod#AMainMethPropdef#init_amainmethpropdef for (self: Object, nullable TKwredef, nullable AExpr) */
7163 void VIRTUAL_parser_prod__AMainMethPropdef__init_amainmethpropdef(val* self, val* p0, val* p1) {
7164 parser_prod__AMainMethPropdef__init_amainmethpropdef(self, p0, p1); /* Direct call parser_prod#AMainMethPropdef#init_amainmethpropdef on <self:Object(AMainMethPropdef)>*/
7165 RET_LABEL:;
7166 }
7167 /* method parser_prod#AMainMethPropdef#replace_child for (self: AMainMethPropdef, ANode, nullable ANode) */
7168 void parser_prod__AMainMethPropdef__replace_child(val* self, val* p0, val* p1) {
7169 val* var_old_child /* var old_child: ANode */;
7170 val* var_new_child /* var new_child: nullable ANode */;
7171 val* var /* : nullable TKwredef */;
7172 short int var1 /* : Bool */;
7173 short int var2 /* : Bool */;
7174 val* var_other /* var other: nullable Object */;
7175 short int var4 /* : Bool */;
7176 short int var6 /* : Bool */;
7177 short int var7 /* : Bool */;
7178 int cltype;
7179 int idtype;
7180 const char* var_class_name;
7181 val* var8 /* : nullable AExpr */;
7182 short int var9 /* : Bool */;
7183 short int var10 /* : Bool */;
7184 short int var12 /* : Bool */;
7185 short int var14 /* : Bool */;
7186 short int var15 /* : Bool */;
7187 int cltype16;
7188 int idtype17;
7189 const char* var_class_name18;
7190 var_old_child = p0;
7191 var_new_child = p1;
7192 var = self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val; /* _n_kwredef on <self:AMainMethPropdef> */
7193 if (var == NULL) {
7194 var1 = 0; /* <var_old_child:ANode> cannot be null */
7195 } else {
7196 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable TKwredef> */
7197 var_other = var_old_child;
7198 {
7199 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable TKwredef(TKwredef)> */
7200 var6 = var == var_other;
7201 var4 = var6;
7202 goto RET_LABEL5;
7203 RET_LABEL5:(void)0;
7204 }
7205 }
7206 var2 = var4;
7207 goto RET_LABEL3;
7208 RET_LABEL3:(void)0;
7209 }
7210 var1 = var2;
7211 }
7212 if (var1){
7213 /* <var_new_child:nullable ANode> isa nullable TKwredef */
7214 cltype = type_nullable_parser_nodes__TKwredef.color;
7215 idtype = type_nullable_parser_nodes__TKwredef.id;
7216 if(var_new_child == NULL) {
7217 var7 = 1;
7218 } else {
7219 if(cltype >= var_new_child->type->table_size) {
7220 var7 = 0;
7221 } else {
7222 var7 = var_new_child->type->type_table[cltype] == idtype;
7223 }
7224 }
7225 if (unlikely(!var7)) {
7226 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
7227 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name);
7228 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 984);
7229 show_backtrace(1);
7230 }
7231 {
7232 parser_prod__AMainMethPropdef__n_kwredef_61d(self, var_new_child); /* Direct call parser_prod#AMainMethPropdef#n_kwredef= on <self:AMainMethPropdef>*/
7233 }
7234 goto RET_LABEL;
7235 } else {
7236 }
7237 var8 = self->attrs[COLOR_parser_nodes__AMethPropdef___n_block].val; /* _n_block on <self:AMainMethPropdef> */
7238 if (var8 == NULL) {
7239 var9 = 0; /* <var_old_child:ANode> cannot be null */
7240 } else {
7241 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable AExpr> */
7242 var_other = var_old_child;
7243 {
7244 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable AExpr(AExpr)> */
7245 var14 = var8 == var_other;
7246 var12 = var14;
7247 goto RET_LABEL13;
7248 RET_LABEL13:(void)0;
7249 }
7250 }
7251 var10 = var12;
7252 goto RET_LABEL11;
7253 RET_LABEL11:(void)0;
7254 }
7255 var9 = var10;
7256 }
7257 if (var9){
7258 /* <var_new_child:nullable ANode> isa nullable AExpr */
7259 cltype16 = type_nullable_parser_nodes__AExpr.color;
7260 idtype17 = type_nullable_parser_nodes__AExpr.id;
7261 if(var_new_child == NULL) {
7262 var15 = 1;
7263 } else {
7264 if(cltype16 >= var_new_child->type->table_size) {
7265 var15 = 0;
7266 } else {
7267 var15 = var_new_child->type->type_table[cltype16] == idtype17;
7268 }
7269 }
7270 if (unlikely(!var15)) {
7271 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
7272 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExpr", var_class_name18);
7273 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 988);
7274 show_backtrace(1);
7275 }
7276 {
7277 parser_prod__AMainMethPropdef__n_block_61d(self, var_new_child); /* Direct call parser_prod#AMainMethPropdef#n_block= on <self:AMainMethPropdef>*/
7278 }
7279 goto RET_LABEL;
7280 } else {
7281 }
7282 RET_LABEL:;
7283 }
7284 /* method parser_prod#AMainMethPropdef#replace_child for (self: Object, ANode, nullable ANode) */
7285 void VIRTUAL_parser_prod__AMainMethPropdef__replace_child(val* self, val* p0, val* p1) {
7286 parser_prod__AMainMethPropdef__replace_child(self, p0, p1); /* Direct call parser_prod#AMainMethPropdef#replace_child on <self:Object(AMainMethPropdef)>*/
7287 RET_LABEL:;
7288 }
7289 /* method parser_prod#AMainMethPropdef#n_kwredef= for (self: AMainMethPropdef, nullable TKwredef) */
7290 void parser_prod__AMainMethPropdef__n_kwredef_61d(val* self, val* p0) {
7291 val* var_node /* var node: nullable TKwredef */;
7292 val* var /* : null */;
7293 short int var1 /* : Bool */;
7294 short int var2 /* : Bool */;
7295 val* var_other /* var other: nullable Object */;
7296 short int var4 /* : Bool */;
7297 short int var5 /* : Bool */;
7298 short int var6 /* : Bool */;
7299 var_node = p0;
7300 self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val = var_node; /* _n_kwredef on <self:AMainMethPropdef> */
7301 var = NULL;
7302 if (var_node == NULL) {
7303 var1 = 0; /* is null */
7304 } else {
7305 var1 = 1; /* arg is null and recv is not */
7306 }
7307 if (0) {
7308 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
7309 var_other = var;
7310 {
7311 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
7312 var4 = var5;
7313 }
7314 var6 = !var4;
7315 var2 = var6;
7316 goto RET_LABEL3;
7317 RET_LABEL3:(void)0;
7318 }
7319 var1 = var2;
7320 }
7321 if (var1){
7322 {
7323 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
7324 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
7325 RET_LABEL7:(void)0;
7326 }
7327 }
7328 } else {
7329 }
7330 RET_LABEL:;
7331 }
7332 /* method parser_prod#AMainMethPropdef#n_kwredef= for (self: Object, nullable TKwredef) */
7333 void VIRTUAL_parser_prod__AMainMethPropdef__n_kwredef_61d(val* self, val* p0) {
7334 parser_prod__AMainMethPropdef__n_kwredef_61d(self, p0); /* Direct call parser_prod#AMainMethPropdef#n_kwredef= on <self:Object(AMainMethPropdef)>*/
7335 RET_LABEL:;
7336 }
7337 /* method parser_prod#AMainMethPropdef#n_block= for (self: AMainMethPropdef, nullable AExpr) */
7338 void parser_prod__AMainMethPropdef__n_block_61d(val* self, val* p0) {
7339 val* var_node /* var node: nullable AExpr */;
7340 val* var /* : null */;
7341 short int var1 /* : Bool */;
7342 short int var2 /* : Bool */;
7343 val* var_other /* var other: nullable Object */;
7344 short int var4 /* : Bool */;
7345 short int var5 /* : Bool */;
7346 short int var6 /* : Bool */;
7347 var_node = p0;
7348 self->attrs[COLOR_parser_nodes__AMethPropdef___n_block].val = var_node; /* _n_block on <self:AMainMethPropdef> */
7349 var = NULL;
7350 if (var_node == NULL) {
7351 var1 = 0; /* is null */
7352 } else {
7353 var1 = 1; /* arg is null and recv is not */
7354 }
7355 if (0) {
7356 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExpr> */
7357 var_other = var;
7358 {
7359 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExpr(AExpr)>*/;
7360 var4 = var5;
7361 }
7362 var6 = !var4;
7363 var2 = var6;
7364 goto RET_LABEL3;
7365 RET_LABEL3:(void)0;
7366 }
7367 var1 = var2;
7368 }
7369 if (var1){
7370 {
7371 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExpr(AExpr)> */
7372 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExpr(AExpr)> */
7373 RET_LABEL7:(void)0;
7374 }
7375 }
7376 } else {
7377 }
7378 RET_LABEL:;
7379 }
7380 /* method parser_prod#AMainMethPropdef#n_block= for (self: Object, nullable AExpr) */
7381 void VIRTUAL_parser_prod__AMainMethPropdef__n_block_61d(val* self, val* p0) {
7382 parser_prod__AMainMethPropdef__n_block_61d(self, p0); /* Direct call parser_prod#AMainMethPropdef#n_block= on <self:Object(AMainMethPropdef)>*/
7383 RET_LABEL:;
7384 }
7385 /* method parser_prod#AMainMethPropdef#visit_all for (self: AMainMethPropdef, Visitor) */
7386 void parser_prod__AMainMethPropdef__visit_all(val* self, val* p0) {
7387 val* var_v /* var v: Visitor */;
7388 val* var /* : nullable TKwredef */;
7389 val* var1 /* : nullable AExpr */;
7390 var_v = p0;
7391 var = self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val; /* _n_kwredef on <self:AMainMethPropdef> */
7392 {
7393 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7394 }
7395 var1 = self->attrs[COLOR_parser_nodes__AMethPropdef___n_block].val; /* _n_block on <self:AMainMethPropdef> */
7396 {
7397 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7398 }
7399 RET_LABEL:;
7400 }
7401 /* method parser_prod#AMainMethPropdef#visit_all for (self: Object, Visitor) */
7402 void VIRTUAL_parser_prod__AMainMethPropdef__visit_all(val* self, val* p0) {
7403 parser_prod__AMainMethPropdef__visit_all(self, p0); /* Direct call parser_prod#AMainMethPropdef#visit_all on <self:Object(AMainMethPropdef)>*/
7404 RET_LABEL:;
7405 }
7406 /* method parser_prod#ATypePropdef#init_atypepropdef for (self: ATypePropdef, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable TKwtype, nullable TClassid, nullable AType, nullable AAnnotations) */
7407 void parser_prod__ATypePropdef__init_atypepropdef(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6) {
7408 val* var_n_doc /* var n_doc: nullable ADoc */;
7409 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
7410 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
7411 val* var_n_kwtype /* var n_kwtype: nullable TKwtype */;
7412 val* var_n_id /* var n_id: nullable TClassid */;
7413 val* var_n_type /* var n_type: nullable AType */;
7414 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
7415 val* var /* : null */;
7416 short int var1 /* : Bool */;
7417 short int var2 /* : Bool */;
7418 val* var_other /* var other: nullable Object */;
7419 short int var4 /* : Bool */;
7420 short int var5 /* : Bool */;
7421 short int var6 /* : Bool */;
7422 val* var8 /* : null */;
7423 short int var9 /* : Bool */;
7424 short int var10 /* : Bool */;
7425 short int var12 /* : Bool */;
7426 short int var13 /* : Bool */;
7427 short int var14 /* : Bool */;
7428 val* var20 /* : null */;
7429 short int var21 /* : Bool */;
7430 short int var22 /* : Bool */;
7431 short int var24 /* : Bool */;
7432 short int var25 /* : Bool */;
7433 short int var26 /* : Bool */;
7434 var_n_doc = p0;
7435 var_n_kwredef = p1;
7436 var_n_visibility = p2;
7437 var_n_kwtype = p3;
7438 var_n_id = p4;
7439 var_n_type = p5;
7440 var_n_annotations = p6;
7441 self->attrs[COLOR_parser_nodes__APropdef___n_doc].val = var_n_doc; /* _n_doc on <self:ATypePropdef> */
7442 var = NULL;
7443 if (var_n_doc == NULL) {
7444 var1 = 0; /* is null */
7445 } else {
7446 var1 = 1; /* arg is null and recv is not */
7447 }
7448 if (0) {
7449 { /* Inline kernel#Object#!= (var_n_doc,var) on <var_n_doc:nullable ADoc> */
7450 var_other = var;
7451 {
7452 var5 = ((short int (*)(val*, val*))(var_n_doc->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_doc, var_other) /* == on <var_n_doc:nullable ADoc(ADoc)>*/;
7453 var4 = var5;
7454 }
7455 var6 = !var4;
7456 var2 = var6;
7457 goto RET_LABEL3;
7458 RET_LABEL3:(void)0;
7459 }
7460 var1 = var2;
7461 }
7462 if (var1){
7463 {
7464 { /* Inline parser_nodes#ANode#parent= (var_n_doc,self) on <var_n_doc:nullable ADoc(ADoc)> */
7465 var_n_doc->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_doc:nullable ADoc(ADoc)> */
7466 RET_LABEL7:(void)0;
7467 }
7468 }
7469 } else {
7470 }
7471 self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:ATypePropdef> */
7472 var8 = NULL;
7473 if (var_n_kwredef == NULL) {
7474 var9 = 0; /* is null */
7475 } else {
7476 var9 = 1; /* arg is null and recv is not */
7477 }
7478 if (0) {
7479 { /* Inline kernel#Object#!= (var_n_kwredef,var8) on <var_n_kwredef:nullable TKwredef> */
7480 var_other = var8;
7481 {
7482 var13 = ((short int (*)(val*, val*))(var_n_kwredef->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
7483 var12 = var13;
7484 }
7485 var14 = !var12;
7486 var10 = var14;
7487 goto RET_LABEL11;
7488 RET_LABEL11:(void)0;
7489 }
7490 var9 = var10;
7491 }
7492 if (var9){
7493 {
7494 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
7495 var_n_kwredef->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
7496 RET_LABEL15:(void)0;
7497 }
7498 }
7499 } else {
7500 }
7501 if (unlikely(var_n_visibility == NULL)) {
7502 PRINT_ERROR("Runtime error: %s", "Cast failed");
7503 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1026);
7504 show_backtrace(1);
7505 }
7506 self->attrs[COLOR_parser_nodes__APropdef___n_visibility].val = var_n_visibility; /* _n_visibility on <self:ATypePropdef> */
7507 if (var_n_visibility == NULL) {
7508 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7509 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1027);
7510 show_backtrace(1);
7511 } else {
7512 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
7513 if (unlikely(var_n_visibility == NULL)) {
7514 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7515 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
7516 show_backtrace(1);
7517 }
7518 var_n_visibility->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
7519 RET_LABEL16:(void)0;
7520 }
7521 }
7522 if (unlikely(var_n_kwtype == NULL)) {
7523 PRINT_ERROR("Runtime error: %s", "Cast failed");
7524 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1028);
7525 show_backtrace(1);
7526 }
7527 self->attrs[COLOR_parser_nodes__ATypePropdef___n_kwtype].val = var_n_kwtype; /* _n_kwtype on <self:ATypePropdef> */
7528 if (var_n_kwtype == NULL) {
7529 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7530 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1029);
7531 show_backtrace(1);
7532 } else {
7533 { /* Inline parser_nodes#ANode#parent= (var_n_kwtype,self) on <var_n_kwtype:nullable TKwtype> */
7534 if (unlikely(var_n_kwtype == NULL)) {
7535 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7536 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
7537 show_backtrace(1);
7538 }
7539 var_n_kwtype->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwtype:nullable TKwtype> */
7540 RET_LABEL17:(void)0;
7541 }
7542 }
7543 if (unlikely(var_n_id == NULL)) {
7544 PRINT_ERROR("Runtime error: %s", "Cast failed");
7545 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1030);
7546 show_backtrace(1);
7547 }
7548 self->attrs[COLOR_parser_nodes__ATypePropdef___n_id].val = var_n_id; /* _n_id on <self:ATypePropdef> */
7549 if (var_n_id == NULL) {
7550 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7551 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1031);
7552 show_backtrace(1);
7553 } else {
7554 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TClassid> */
7555 if (unlikely(var_n_id == NULL)) {
7556 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7557 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
7558 show_backtrace(1);
7559 }
7560 var_n_id->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_id:nullable TClassid> */
7561 RET_LABEL18:(void)0;
7562 }
7563 }
7564 if (unlikely(var_n_type == NULL)) {
7565 PRINT_ERROR("Runtime error: %s", "Cast failed");
7566 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1032);
7567 show_backtrace(1);
7568 }
7569 self->attrs[COLOR_parser_nodes__ATypePropdef___n_type].val = var_n_type; /* _n_type on <self:ATypePropdef> */
7570 if (var_n_type == NULL) {
7571 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7572 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1033);
7573 show_backtrace(1);
7574 } else {
7575 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType> */
7576 if (unlikely(var_n_type == NULL)) {
7577 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7578 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
7579 show_backtrace(1);
7580 }
7581 var_n_type->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_type:nullable AType> */
7582 RET_LABEL19:(void)0;
7583 }
7584 }
7585 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:ATypePropdef> */
7586 var20 = NULL;
7587 if (var_n_annotations == NULL) {
7588 var21 = 0; /* is null */
7589 } else {
7590 var21 = 1; /* arg is null and recv is not */
7591 }
7592 if (0) {
7593 { /* Inline kernel#Object#!= (var_n_annotations,var20) on <var_n_annotations:nullable AAnnotations> */
7594 var_other = var20;
7595 {
7596 var25 = ((short int (*)(val*, val*))(var_n_annotations->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
7597 var24 = var25;
7598 }
7599 var26 = !var24;
7600 var22 = var26;
7601 goto RET_LABEL23;
7602 RET_LABEL23:(void)0;
7603 }
7604 var21 = var22;
7605 }
7606 if (var21){
7607 {
7608 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
7609 var_n_annotations->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
7610 RET_LABEL27:(void)0;
7611 }
7612 }
7613 } else {
7614 }
7615 RET_LABEL:;
7616 }
7617 /* method parser_prod#ATypePropdef#init_atypepropdef for (self: Object, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable TKwtype, nullable TClassid, nullable AType, nullable AAnnotations) */
7618 void VIRTUAL_parser_prod__ATypePropdef__init_atypepropdef(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6) {
7619 parser_prod__ATypePropdef__init_atypepropdef(self, p0, p1, p2, p3, p4, p5, p6); /* Direct call parser_prod#ATypePropdef#init_atypepropdef on <self:Object(ATypePropdef)>*/
7620 RET_LABEL:;
7621 }
7622 /* method parser_prod#ATypePropdef#replace_child for (self: ATypePropdef, ANode, nullable ANode) */
7623 void parser_prod__ATypePropdef__replace_child(val* self, val* p0, val* p1) {
7624 val* var_old_child /* var old_child: ANode */;
7625 val* var_new_child /* var new_child: nullable ANode */;
7626 val* var /* : nullable ADoc */;
7627 short int var1 /* : Bool */;
7628 short int var2 /* : Bool */;
7629 val* var_other /* var other: nullable Object */;
7630 short int var4 /* : Bool */;
7631 short int var6 /* : Bool */;
7632 short int var7 /* : Bool */;
7633 int cltype;
7634 int idtype;
7635 const char* var_class_name;
7636 val* var8 /* : nullable TKwredef */;
7637 short int var9 /* : Bool */;
7638 short int var10 /* : Bool */;
7639 short int var12 /* : Bool */;
7640 short int var14 /* : Bool */;
7641 short int var15 /* : Bool */;
7642 int cltype16;
7643 int idtype17;
7644 const char* var_class_name18;
7645 val* var19 /* : nullable AVisibility */;
7646 short int var20 /* : Bool */;
7647 short int var21 /* : Bool */;
7648 short int var23 /* : Bool */;
7649 short int var25 /* : Bool */;
7650 short int var26 /* : Bool */;
7651 int cltype27;
7652 int idtype28;
7653 const char* var_class_name29;
7654 val* var30 /* : TKwtype */;
7655 short int var31 /* : Bool */;
7656 short int var32 /* : Bool */;
7657 short int var34 /* : Bool */;
7658 short int var36 /* : Bool */;
7659 short int var37 /* : Bool */;
7660 int cltype38;
7661 int idtype39;
7662 const char* var_class_name40;
7663 val* var41 /* : TClassid */;
7664 short int var42 /* : Bool */;
7665 short int var43 /* : Bool */;
7666 short int var45 /* : Bool */;
7667 short int var47 /* : Bool */;
7668 short int var48 /* : Bool */;
7669 int cltype49;
7670 int idtype50;
7671 const char* var_class_name51;
7672 val* var52 /* : AType */;
7673 short int var53 /* : Bool */;
7674 short int var54 /* : Bool */;
7675 short int var56 /* : Bool */;
7676 short int var58 /* : Bool */;
7677 short int var59 /* : Bool */;
7678 int cltype60;
7679 int idtype61;
7680 const char* var_class_name62;
7681 val* var63 /* : nullable AAnnotations */;
7682 short int var64 /* : Bool */;
7683 short int var65 /* : Bool */;
7684 short int var67 /* : Bool */;
7685 short int var69 /* : Bool */;
7686 short int var70 /* : Bool */;
7687 int cltype71;
7688 int idtype72;
7689 const char* var_class_name73;
7690 var_old_child = p0;
7691 var_new_child = p1;
7692 var = self->attrs[COLOR_parser_nodes__APropdef___n_doc].val; /* _n_doc on <self:ATypePropdef> */
7693 if (var == NULL) {
7694 var1 = 0; /* <var_old_child:ANode> cannot be null */
7695 } else {
7696 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable ADoc> */
7697 var_other = var_old_child;
7698 {
7699 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable ADoc(ADoc)> */
7700 var6 = var == var_other;
7701 var4 = var6;
7702 goto RET_LABEL5;
7703 RET_LABEL5:(void)0;
7704 }
7705 }
7706 var2 = var4;
7707 goto RET_LABEL3;
7708 RET_LABEL3:(void)0;
7709 }
7710 var1 = var2;
7711 }
7712 if (var1){
7713 /* <var_new_child:nullable ANode> isa nullable ADoc */
7714 cltype = type_nullable_parser_nodes__ADoc.color;
7715 idtype = type_nullable_parser_nodes__ADoc.id;
7716 if(var_new_child == NULL) {
7717 var7 = 1;
7718 } else {
7719 if(cltype >= var_new_child->type->table_size) {
7720 var7 = 0;
7721 } else {
7722 var7 = var_new_child->type->type_table[cltype] == idtype;
7723 }
7724 }
7725 if (unlikely(!var7)) {
7726 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
7727 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ADoc", var_class_name);
7728 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1041);
7729 show_backtrace(1);
7730 }
7731 {
7732 parser_prod__ATypePropdef__n_doc_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_doc= on <self:ATypePropdef>*/
7733 }
7734 goto RET_LABEL;
7735 } else {
7736 }
7737 var8 = self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val; /* _n_kwredef on <self:ATypePropdef> */
7738 if (var8 == NULL) {
7739 var9 = 0; /* <var_old_child:ANode> cannot be null */
7740 } else {
7741 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwredef> */
7742 var_other = var_old_child;
7743 {
7744 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwredef(TKwredef)> */
7745 var14 = var8 == var_other;
7746 var12 = var14;
7747 goto RET_LABEL13;
7748 RET_LABEL13:(void)0;
7749 }
7750 }
7751 var10 = var12;
7752 goto RET_LABEL11;
7753 RET_LABEL11:(void)0;
7754 }
7755 var9 = var10;
7756 }
7757 if (var9){
7758 /* <var_new_child:nullable ANode> isa nullable TKwredef */
7759 cltype16 = type_nullable_parser_nodes__TKwredef.color;
7760 idtype17 = type_nullable_parser_nodes__TKwredef.id;
7761 if(var_new_child == NULL) {
7762 var15 = 1;
7763 } else {
7764 if(cltype16 >= var_new_child->type->table_size) {
7765 var15 = 0;
7766 } else {
7767 var15 = var_new_child->type->type_table[cltype16] == idtype17;
7768 }
7769 }
7770 if (unlikely(!var15)) {
7771 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
7772 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name18);
7773 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1045);
7774 show_backtrace(1);
7775 }
7776 {
7777 parser_prod__ATypePropdef__n_kwredef_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_kwredef= on <self:ATypePropdef>*/
7778 }
7779 goto RET_LABEL;
7780 } else {
7781 }
7782 var19 = self->attrs[COLOR_parser_nodes__APropdef___n_visibility].val; /* _n_visibility on <self:ATypePropdef> */
7783 if (var19 == NULL) {
7784 var20 = 0; /* <var_old_child:ANode> cannot be null */
7785 } else {
7786 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:nullable AVisibility> */
7787 var_other = var_old_child;
7788 {
7789 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:nullable AVisibility(AVisibility)> */
7790 var25 = var19 == var_other;
7791 var23 = var25;
7792 goto RET_LABEL24;
7793 RET_LABEL24:(void)0;
7794 }
7795 }
7796 var21 = var23;
7797 goto RET_LABEL22;
7798 RET_LABEL22:(void)0;
7799 }
7800 var20 = var21;
7801 }
7802 if (var20){
7803 /* <var_new_child:nullable ANode> isa AVisibility */
7804 cltype27 = type_parser_nodes__AVisibility.color;
7805 idtype28 = type_parser_nodes__AVisibility.id;
7806 if(var_new_child == NULL) {
7807 var26 = 0;
7808 } else {
7809 if(cltype27 >= var_new_child->type->table_size) {
7810 var26 = 0;
7811 } else {
7812 var26 = var_new_child->type->type_table[cltype27] == idtype28;
7813 }
7814 }
7815 if (unlikely(!var26)) {
7816 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
7817 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name29);
7818 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1049);
7819 show_backtrace(1);
7820 }
7821 {
7822 parser_prod__ATypePropdef__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_visibility= on <self:ATypePropdef>*/
7823 }
7824 goto RET_LABEL;
7825 } else {
7826 }
7827 var30 = self->attrs[COLOR_parser_nodes__ATypePropdef___n_kwtype].val; /* _n_kwtype on <self:ATypePropdef> */
7828 if (unlikely(var30 == NULL)) {
7829 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwtype");
7830 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1052);
7831 show_backtrace(1);
7832 }
7833 {
7834 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:TKwtype> */
7835 var_other = var_old_child;
7836 {
7837 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:TKwtype> */
7838 var36 = var30 == var_other;
7839 var34 = var36;
7840 goto RET_LABEL35;
7841 RET_LABEL35:(void)0;
7842 }
7843 }
7844 var32 = var34;
7845 goto RET_LABEL33;
7846 RET_LABEL33:(void)0;
7847 }
7848 var31 = var32;
7849 }
7850 if (var31){
7851 /* <var_new_child:nullable ANode> isa TKwtype */
7852 cltype38 = type_parser_nodes__TKwtype.color;
7853 idtype39 = type_parser_nodes__TKwtype.id;
7854 if(var_new_child == NULL) {
7855 var37 = 0;
7856 } else {
7857 if(cltype38 >= var_new_child->type->table_size) {
7858 var37 = 0;
7859 } else {
7860 var37 = var_new_child->type->type_table[cltype38] == idtype39;
7861 }
7862 }
7863 if (unlikely(!var37)) {
7864 var_class_name40 = var_new_child == NULL ? "null" : var_new_child->type->name;
7865 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwtype", var_class_name40);
7866 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1053);
7867 show_backtrace(1);
7868 }
7869 {
7870 parser_prod__ATypePropdef__n_kwtype_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_kwtype= on <self:ATypePropdef>*/
7871 }
7872 goto RET_LABEL;
7873 } else {
7874 }
7875 var41 = self->attrs[COLOR_parser_nodes__ATypePropdef___n_id].val; /* _n_id on <self:ATypePropdef> */
7876 if (unlikely(var41 == NULL)) {
7877 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
7878 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1056);
7879 show_backtrace(1);
7880 }
7881 {
7882 { /* Inline kernel#Object#== (var41,var_old_child) on <var41:TClassid> */
7883 var_other = var_old_child;
7884 {
7885 { /* Inline kernel#Object#is_same_instance (var41,var_other) on <var41:TClassid> */
7886 var47 = var41 == var_other;
7887 var45 = var47;
7888 goto RET_LABEL46;
7889 RET_LABEL46:(void)0;
7890 }
7891 }
7892 var43 = var45;
7893 goto RET_LABEL44;
7894 RET_LABEL44:(void)0;
7895 }
7896 var42 = var43;
7897 }
7898 if (var42){
7899 /* <var_new_child:nullable ANode> isa TClassid */
7900 cltype49 = type_parser_nodes__TClassid.color;
7901 idtype50 = type_parser_nodes__TClassid.id;
7902 if(var_new_child == NULL) {
7903 var48 = 0;
7904 } else {
7905 if(cltype49 >= var_new_child->type->table_size) {
7906 var48 = 0;
7907 } else {
7908 var48 = var_new_child->type->type_table[cltype49] == idtype50;
7909 }
7910 }
7911 if (unlikely(!var48)) {
7912 var_class_name51 = var_new_child == NULL ? "null" : var_new_child->type->name;
7913 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TClassid", var_class_name51);
7914 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1057);
7915 show_backtrace(1);
7916 }
7917 {
7918 parser_prod__ATypePropdef__n_id_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_id= on <self:ATypePropdef>*/
7919 }
7920 goto RET_LABEL;
7921 } else {
7922 }
7923 var52 = self->attrs[COLOR_parser_nodes__ATypePropdef___n_type].val; /* _n_type on <self:ATypePropdef> */
7924 if (unlikely(var52 == NULL)) {
7925 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
7926 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1060);
7927 show_backtrace(1);
7928 }
7929 {
7930 { /* Inline kernel#Object#== (var52,var_old_child) on <var52:AType> */
7931 var_other = var_old_child;
7932 {
7933 { /* Inline kernel#Object#is_same_instance (var52,var_other) on <var52:AType> */
7934 var58 = var52 == var_other;
7935 var56 = var58;
7936 goto RET_LABEL57;
7937 RET_LABEL57:(void)0;
7938 }
7939 }
7940 var54 = var56;
7941 goto RET_LABEL55;
7942 RET_LABEL55:(void)0;
7943 }
7944 var53 = var54;
7945 }
7946 if (var53){
7947 /* <var_new_child:nullable ANode> isa AType */
7948 cltype60 = type_parser_nodes__AType.color;
7949 idtype61 = type_parser_nodes__AType.id;
7950 if(var_new_child == NULL) {
7951 var59 = 0;
7952 } else {
7953 if(cltype60 >= var_new_child->type->table_size) {
7954 var59 = 0;
7955 } else {
7956 var59 = var_new_child->type->type_table[cltype60] == idtype61;
7957 }
7958 }
7959 if (unlikely(!var59)) {
7960 var_class_name62 = var_new_child == NULL ? "null" : var_new_child->type->name;
7961 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AType", var_class_name62);
7962 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1061);
7963 show_backtrace(1);
7964 }
7965 {
7966 parser_prod__ATypePropdef__n_type_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_type= on <self:ATypePropdef>*/
7967 }
7968 goto RET_LABEL;
7969 } else {
7970 }
7971 var63 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:ATypePropdef> */
7972 if (var63 == NULL) {
7973 var64 = 0; /* <var_old_child:ANode> cannot be null */
7974 } else {
7975 { /* Inline kernel#Object#== (var63,var_old_child) on <var63:nullable AAnnotations> */
7976 var_other = var_old_child;
7977 {
7978 { /* Inline kernel#Object#is_same_instance (var63,var_other) on <var63:nullable AAnnotations(AAnnotations)> */
7979 var69 = var63 == var_other;
7980 var67 = var69;
7981 goto RET_LABEL68;
7982 RET_LABEL68:(void)0;
7983 }
7984 }
7985 var65 = var67;
7986 goto RET_LABEL66;
7987 RET_LABEL66:(void)0;
7988 }
7989 var64 = var65;
7990 }
7991 if (var64){
7992 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
7993 cltype71 = type_nullable_parser_nodes__AAnnotations.color;
7994 idtype72 = type_nullable_parser_nodes__AAnnotations.id;
7995 if(var_new_child == NULL) {
7996 var70 = 1;
7997 } else {
7998 if(cltype71 >= var_new_child->type->table_size) {
7999 var70 = 0;
8000 } else {
8001 var70 = var_new_child->type->type_table[cltype71] == idtype72;
8002 }
8003 }
8004 if (unlikely(!var70)) {
8005 var_class_name73 = var_new_child == NULL ? "null" : var_new_child->type->name;
8006 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name73);
8007 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1065);
8008 show_backtrace(1);
8009 }
8010 {
8011 parser_prod__ATypePropdef__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_annotations= on <self:ATypePropdef>*/
8012 }
8013 goto RET_LABEL;
8014 } else {
8015 }
8016 RET_LABEL:;
8017 }
8018 /* method parser_prod#ATypePropdef#replace_child for (self: Object, ANode, nullable ANode) */
8019 void VIRTUAL_parser_prod__ATypePropdef__replace_child(val* self, val* p0, val* p1) {
8020 parser_prod__ATypePropdef__replace_child(self, p0, p1); /* Direct call parser_prod#ATypePropdef#replace_child on <self:Object(ATypePropdef)>*/
8021 RET_LABEL:;
8022 }
8023 /* method parser_prod#ATypePropdef#n_doc= for (self: ATypePropdef, nullable ADoc) */
8024 void parser_prod__ATypePropdef__n_doc_61d(val* self, val* p0) {
8025 val* var_node /* var node: nullable ADoc */;
8026 val* var /* : null */;
8027 short int var1 /* : Bool */;
8028 short int var2 /* : Bool */;
8029 val* var_other /* var other: nullable Object */;
8030 short int var4 /* : Bool */;
8031 short int var5 /* : Bool */;
8032 short int var6 /* : Bool */;
8033 var_node = p0;
8034 self->attrs[COLOR_parser_nodes__APropdef___n_doc].val = var_node; /* _n_doc on <self:ATypePropdef> */
8035 var = NULL;
8036 if (var_node == NULL) {
8037 var1 = 0; /* is null */
8038 } else {
8039 var1 = 1; /* arg is null and recv is not */
8040 }
8041 if (0) {
8042 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable ADoc> */
8043 var_other = var;
8044 {
8045 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable ADoc(ADoc)>*/;
8046 var4 = var5;
8047 }
8048 var6 = !var4;
8049 var2 = var6;
8050 goto RET_LABEL3;
8051 RET_LABEL3:(void)0;
8052 }
8053 var1 = var2;
8054 }
8055 if (var1){
8056 {
8057 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ADoc(ADoc)> */
8058 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ADoc(ADoc)> */
8059 RET_LABEL7:(void)0;
8060 }
8061 }
8062 } else {
8063 }
8064 RET_LABEL:;
8065 }
8066 /* method parser_prod#ATypePropdef#n_doc= for (self: Object, nullable ADoc) */
8067 void VIRTUAL_parser_prod__ATypePropdef__n_doc_61d(val* self, val* p0) {
8068 parser_prod__ATypePropdef__n_doc_61d(self, p0); /* Direct call parser_prod#ATypePropdef#n_doc= on <self:Object(ATypePropdef)>*/
8069 RET_LABEL:;
8070 }
8071 /* method parser_prod#ATypePropdef#n_kwredef= for (self: ATypePropdef, nullable TKwredef) */
8072 void parser_prod__ATypePropdef__n_kwredef_61d(val* self, val* p0) {
8073 val* var_node /* var node: nullable TKwredef */;
8074 val* var /* : null */;
8075 short int var1 /* : Bool */;
8076 short int var2 /* : Bool */;
8077 val* var_other /* var other: nullable Object */;
8078 short int var4 /* : Bool */;
8079 short int var5 /* : Bool */;
8080 short int var6 /* : Bool */;
8081 var_node = p0;
8082 self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val = var_node; /* _n_kwredef on <self:ATypePropdef> */
8083 var = NULL;
8084 if (var_node == NULL) {
8085 var1 = 0; /* is null */
8086 } else {
8087 var1 = 1; /* arg is null and recv is not */
8088 }
8089 if (0) {
8090 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
8091 var_other = var;
8092 {
8093 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
8094 var4 = var5;
8095 }
8096 var6 = !var4;
8097 var2 = var6;
8098 goto RET_LABEL3;
8099 RET_LABEL3:(void)0;
8100 }
8101 var1 = var2;
8102 }
8103 if (var1){
8104 {
8105 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
8106 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
8107 RET_LABEL7:(void)0;
8108 }
8109 }
8110 } else {
8111 }
8112 RET_LABEL:;
8113 }
8114 /* method parser_prod#ATypePropdef#n_kwredef= for (self: Object, nullable TKwredef) */
8115 void VIRTUAL_parser_prod__ATypePropdef__n_kwredef_61d(val* self, val* p0) {
8116 parser_prod__ATypePropdef__n_kwredef_61d(self, p0); /* Direct call parser_prod#ATypePropdef#n_kwredef= on <self:Object(ATypePropdef)>*/
8117 RET_LABEL:;
8118 }
8119 /* method parser_prod#ATypePropdef#n_visibility= for (self: ATypePropdef, nullable AVisibility) */
8120 void parser_prod__ATypePropdef__n_visibility_61d(val* self, val* p0) {
8121 val* var_node /* var node: nullable AVisibility */;
8122 var_node = p0;
8123 self->attrs[COLOR_parser_nodes__APropdef___n_visibility].val = var_node; /* _n_visibility on <self:ATypePropdef> */
8124 if (var_node == NULL) {
8125 PRINT_ERROR("Runtime error: %s", "Receiver is null");
8126 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1083);
8127 show_backtrace(1);
8128 } else {
8129 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AVisibility> */
8130 if (unlikely(var_node == NULL)) {
8131 PRINT_ERROR("Runtime error: %s", "Receiver is null");
8132 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
8133 show_backtrace(1);
8134 }
8135 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AVisibility> */
8136 RET_LABEL1:(void)0;
8137 }
8138 }
8139 RET_LABEL:;
8140 }
8141 /* method parser_prod#ATypePropdef#n_visibility= for (self: Object, nullable AVisibility) */
8142 void VIRTUAL_parser_prod__ATypePropdef__n_visibility_61d(val* self, val* p0) {
8143 parser_prod__ATypePropdef__n_visibility_61d(self, p0); /* Direct call parser_prod#ATypePropdef#n_visibility= on <self:Object(ATypePropdef)>*/
8144 RET_LABEL:;
8145 }
8146 /* method parser_prod#ATypePropdef#n_kwtype= for (self: ATypePropdef, TKwtype) */
8147 void parser_prod__ATypePropdef__n_kwtype_61d(val* self, val* p0) {
8148 val* var_node /* var node: TKwtype */;
8149 var_node = p0;
8150 self->attrs[COLOR_parser_nodes__ATypePropdef___n_kwtype].val = var_node; /* _n_kwtype on <self:ATypePropdef> */
8151 {
8152 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwtype> */
8153 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwtype> */
8154 RET_LABEL1:(void)0;
8155 }
8156 }
8157 RET_LABEL:;
8158 }
8159 /* method parser_prod#ATypePropdef#n_kwtype= for (self: Object, TKwtype) */
8160 void VIRTUAL_parser_prod__ATypePropdef__n_kwtype_61d(val* self, val* p0) {
8161 parser_prod__ATypePropdef__n_kwtype_61d(self, p0); /* Direct call parser_prod#ATypePropdef#n_kwtype= on <self:Object(ATypePropdef)>*/
8162 RET_LABEL:;
8163 }
8164 /* method parser_prod#ATypePropdef#n_id= for (self: ATypePropdef, TClassid) */
8165 void parser_prod__ATypePropdef__n_id_61d(val* self, val* p0) {
8166 val* var_node /* var node: TClassid */;
8167 var_node = p0;
8168 self->attrs[COLOR_parser_nodes__ATypePropdef___n_id].val = var_node; /* _n_id on <self:ATypePropdef> */
8169 {
8170 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TClassid> */
8171 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TClassid> */
8172 RET_LABEL1:(void)0;
8173 }
8174 }
8175 RET_LABEL:;
8176 }
8177 /* method parser_prod#ATypePropdef#n_id= for (self: Object, TClassid) */
8178 void VIRTUAL_parser_prod__ATypePropdef__n_id_61d(val* self, val* p0) {
8179 parser_prod__ATypePropdef__n_id_61d(self, p0); /* Direct call parser_prod#ATypePropdef#n_id= on <self:Object(ATypePropdef)>*/
8180 RET_LABEL:;
8181 }
8182 /* method parser_prod#ATypePropdef#n_type= for (self: ATypePropdef, AType) */
8183 void parser_prod__ATypePropdef__n_type_61d(val* self, val* p0) {
8184 val* var_node /* var node: AType */;
8185 var_node = p0;
8186 self->attrs[COLOR_parser_nodes__ATypePropdef___n_type].val = var_node; /* _n_type on <self:ATypePropdef> */
8187 {
8188 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AType> */
8189 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AType> */
8190 RET_LABEL1:(void)0;
8191 }
8192 }
8193 RET_LABEL:;
8194 }
8195 /* method parser_prod#ATypePropdef#n_type= for (self: Object, AType) */
8196 void VIRTUAL_parser_prod__ATypePropdef__n_type_61d(val* self, val* p0) {
8197 parser_prod__ATypePropdef__n_type_61d(self, p0); /* Direct call parser_prod#ATypePropdef#n_type= on <self:Object(ATypePropdef)>*/
8198 RET_LABEL:;
8199 }
8200 /* method parser_prod#ATypePropdef#n_annotations= for (self: ATypePropdef, nullable AAnnotations) */
8201 void parser_prod__ATypePropdef__n_annotations_61d(val* self, val* p0) {
8202 val* var_node /* var node: nullable AAnnotations */;
8203 val* var /* : null */;
8204 short int var1 /* : Bool */;
8205 short int var2 /* : Bool */;
8206 val* var_other /* var other: nullable Object */;
8207 short int var4 /* : Bool */;
8208 short int var5 /* : Bool */;
8209 short int var6 /* : Bool */;
8210 var_node = p0;
8211 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:ATypePropdef> */
8212 var = NULL;
8213 if (var_node == NULL) {
8214 var1 = 0; /* is null */
8215 } else {
8216 var1 = 1; /* arg is null and recv is not */
8217 }
8218 if (0) {
8219 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
8220 var_other = var;
8221 {
8222 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
8223 var4 = var5;
8224 }
8225 var6 = !var4;
8226 var2 = var6;
8227 goto RET_LABEL3;
8228 RET_LABEL3:(void)0;
8229 }
8230 var1 = var2;
8231 }
8232 if (var1){
8233 {
8234 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
8235 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
8236 RET_LABEL7:(void)0;
8237 }
8238 }
8239 } else {
8240 }
8241 RET_LABEL:;
8242 }
8243 /* method parser_prod#ATypePropdef#n_annotations= for (self: Object, nullable AAnnotations) */
8244 void VIRTUAL_parser_prod__ATypePropdef__n_annotations_61d(val* self, val* p0) {
8245 parser_prod__ATypePropdef__n_annotations_61d(self, p0); /* Direct call parser_prod#ATypePropdef#n_annotations= on <self:Object(ATypePropdef)>*/
8246 RET_LABEL:;
8247 }
8248 /* method parser_prod#ATypePropdef#visit_all for (self: ATypePropdef, Visitor) */
8249 void parser_prod__ATypePropdef__visit_all(val* self, val* p0) {
8250 val* var_v /* var v: Visitor */;
8251 val* var /* : nullable ADoc */;
8252 val* var1 /* : nullable TKwredef */;
8253 val* var2 /* : nullable AVisibility */;
8254 val* var3 /* : TKwtype */;
8255 val* var4 /* : TClassid */;
8256 val* var5 /* : AType */;
8257 val* var6 /* : nullable AAnnotations */;
8258 var_v = p0;
8259 var = self->attrs[COLOR_parser_nodes__APropdef___n_doc].val; /* _n_doc on <self:ATypePropdef> */
8260 {
8261 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
8262 }
8263 var1 = self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val; /* _n_kwredef on <self:ATypePropdef> */
8264 {
8265 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
8266 }
8267 var2 = self->attrs[COLOR_parser_nodes__APropdef___n_visibility].val; /* _n_visibility on <self:ATypePropdef> */
8268 {
8269 parser_nodes__Visitor__enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
8270 }
8271 var3 = self->attrs[COLOR_parser_nodes__ATypePropdef___n_kwtype].val; /* _n_kwtype on <self:ATypePropdef> */
8272 if (unlikely(var3 == NULL)) {
8273 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwtype");
8274 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1112);
8275 show_backtrace(1);
8276 }
8277 {
8278 parser_nodes__Visitor__enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
8279 }
8280 var4 = self->attrs[COLOR_parser_nodes__ATypePropdef___n_id].val; /* _n_id on <self:ATypePropdef> */
8281 if (unlikely(var4 == NULL)) {
8282 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
8283 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1113);
8284 show_backtrace(1);
8285 }
8286 {
8287 parser_nodes__Visitor__enter_visit(var_v, var4); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
8288 }
8289 var5 = self->attrs[COLOR_parser_nodes__ATypePropdef___n_type].val; /* _n_type on <self:ATypePropdef> */
8290 if (unlikely(var5 == NULL)) {
8291 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
8292 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1114);
8293 show_backtrace(1);
8294 }
8295 {
8296 parser_nodes__Visitor__enter_visit(var_v, var5); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
8297 }
8298 var6 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:ATypePropdef> */
8299 {
8300 parser_nodes__Visitor__enter_visit(var_v, var6); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
8301 }
8302 RET_LABEL:;
8303 }
8304 /* method parser_prod#ATypePropdef#visit_all for (self: Object, Visitor) */
8305 void VIRTUAL_parser_prod__ATypePropdef__visit_all(val* self, val* p0) {
8306 parser_prod__ATypePropdef__visit_all(self, p0); /* Direct call parser_prod#ATypePropdef#visit_all on <self:Object(ATypePropdef)>*/
8307 RET_LABEL:;
8308 }
8309 /* method parser_prod#AMethPropdef#init_amethpropdef for (self: AMethPropdef, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable TKwmeth, nullable TKwinit, nullable TKwnew, nullable AMethid, nullable ASignature, nullable AAnnotations, nullable AExternCalls, nullable AExternCodeBlock, nullable AExpr) */
8310 void parser_prod__AMethPropdef__init_amethpropdef(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6, val* p7, val* p8, val* p9, val* p10, val* p11) {
8311 val* var_n_doc /* var n_doc: nullable ADoc */;
8312 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
8313 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
8314 val* var_n_kwmeth /* var n_kwmeth: nullable TKwmeth */;
8315 val* var_n_kwinit /* var n_kwinit: nullable TKwinit */;
8316 val* var_n_kwnew /* var n_kwnew: nullable TKwnew */;
8317 val* var_n_methid /* var n_methid: nullable AMethid */;
8318 val* var_n_signature /* var n_signature: nullable ASignature */;
8319 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
8320 val* var_n_extern_calls /* var n_extern_calls: nullable AExternCalls */;
8321 val* var_n_extern_code_block /* var n_extern_code_block: nullable AExternCodeBlock */;
8322 val* var_n_block /* var n_block: nullable AExpr */;
8323 val* var /* : null */;
8324 short int var1 /* : Bool */;
8325 short int var2 /* : Bool */;
8326 val* var_other /* var other: nullable Object */;
8327 short int var4 /* : Bool */;
8328 short int var5 /* : Bool */;
8329 short int var6 /* : Bool */;
8330 val* var8 /* : null */;
8331 short int var9 /* : Bool */;
8332 short int var10 /* : Bool */;
8333 short int var12 /* : Bool */;
8334 short int var13 /* : Bool */;
8335 short int var14 /* : Bool */;
8336 val* var17 /* : null */;
8337 short int var18 /* : Bool */;
8338 short int var19 /* : Bool */;
8339 short int var21 /* : Bool */;
8340 short int var22 /* : Bool */;
8341 short int var23 /* : Bool */;
8342 val* var25 /* : null */;
8343 short int var26 /* : Bool */;
8344 short int var27 /* : Bool */;
8345 short int var29 /* : Bool */;
8346 short int var30 /* : Bool */;
8347 short int var31 /* : Bool */;
8348 val* var33 /* : null */;
8349 short int var34 /* : Bool */;
8350 short int var35 /* : Bool */;
8351 short int var37 /* : Bool */;
8352 short int var38 /* : Bool */;
8353 short int var39 /* : Bool */;
8354 val* var41 /* : null */;
8355 short int var42 /* : Bool */;
8356 short int var43 /* : Bool */;
8357 short int var45 /* : Bool */;
8358 short int var46 /* : Bool */;
8359 short int var47 /* : Bool */;
8360 val* var50 /* : null */;
8361 short int var51 /* : Bool */;
8362 short int var52 /* : Bool */;
8363 short int var54 /* : Bool */;
8364 short int var55 /* : Bool */;
8365 short int var56 /* : Bool */;
8366 val* var58 /* : null */;
8367 short int var59 /* : Bool */;
8368 short int var60 /* : Bool */;
8369 short int var62 /* : Bool */;
8370 short int var63 /* : Bool */;
8371 short int var64 /* : Bool */;
8372 val* var66 /* : null */;
8373 short int var67 /* : Bool */;
8374 short int var68 /* : Bool */;
8375 short int var70 /* : Bool */;
8376 short int var71 /* : Bool */;
8377 short int var72 /* : Bool */;
8378 val* var74 /* : null */;
8379 short int var75 /* : Bool */;
8380 short int var76 /* : Bool */;
8381 short int var78 /* : Bool */;
8382 short int var79 /* : Bool */;
8383 short int var80 /* : Bool */;
8384 var_n_doc = p0;
8385 var_n_kwredef = p1;
8386 var_n_visibility = p2;
8387 var_n_kwmeth = p3;
8388 var_n_kwinit = p4;
8389 var_n_kwnew = p5;
8390 var_n_methid = p6;
8391 var_n_signature = p7;
8392 var_n_annotations = p8;
8393 var_n_extern_calls = p9;
8394 var_n_extern_code_block = p10;
8395 var_n_block = p11;
8396 self->attrs[COLOR_parser_nodes__APropdef___n_doc].val = var_n_doc; /* _n_doc on <self:AMethPropdef> */
8397 var = NULL;
8398 if (var_n_doc == NULL) {
8399 var1 = 0; /* is null */
8400 } else {
8401 var1 = 1; /* arg is null and recv is not */
8402 }
8403 if (0) {
8404 { /* Inline kernel#Object#!= (var_n_doc,var) on <var_n_doc:nullable ADoc> */
8405 var_other = var;
8406 {
8407 var5 = ((short int (*)(val*, val*))(var_n_doc->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_doc, var_other) /* == on <var_n_doc:nullable ADoc(ADoc)>*/;
8408 var4 = var5;
8409 }
8410 var6 = !var4;
8411 var2 = var6;
8412 goto RET_LABEL3;
8413 RET_LABEL3:(void)0;
8414 }
8415 var1 = var2;
8416 }
8417 if (var1){
8418 {
8419 { /* Inline parser_nodes#ANode#parent= (var_n_doc,self) on <var_n_doc:nullable ADoc(ADoc)> */
8420 var_n_doc->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_doc:nullable ADoc(ADoc)> */
8421 RET_LABEL7:(void)0;
8422 }
8423 }
8424 } else {
8425 }
8426 self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:AMethPropdef> */
8427 var8 = NULL;
8428 if (var_n_kwredef == NULL) {
8429 var9 = 0; /* is null */
8430 } else {
8431 var9 = 1; /* arg is null and recv is not */
8432 }
8433 if (0) {
8434 { /* Inline kernel#Object#!= (var_n_kwredef,var8) on <var_n_kwredef:nullable TKwredef> */
8435 var_other = var8;
8436 {
8437 var13 = ((short int (*)(val*, val*))(var_n_kwredef->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
8438 var12 = var13;
8439 }
8440 var14 = !var12;
8441 var10 = var14;
8442 goto RET_LABEL11;
8443 RET_LABEL11:(void)0;
8444 }
8445 var9 = var10;
8446 }
8447 if (var9){
8448 {
8449 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
8450 var_n_kwredef->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
8451 RET_LABEL15:(void)0;
8452 }
8453 }
8454 } else {
8455 }
8456 if (unlikely(var_n_visibility == NULL)) {
8457 PRINT_ERROR("Runtime error: %s", "Cast failed");
8458 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1138);
8459 show_backtrace(1);
8460 }
8461 self->attrs[COLOR_parser_nodes__APropdef___n_visibility].val = var_n_visibility; /* _n_visibility on <self:AMethPropdef> */
8462 if (var_n_visibility == NULL) {
8463 PRINT_ERROR("Runtime error: %s", "Receiver is null");
8464 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1139);
8465 show_backtrace(1);
8466 } else {
8467 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
8468 if (unlikely(var_n_visibility == NULL)) {
8469 PRINT_ERROR("Runtime error: %s", "Receiver is null");
8470 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
8471 show_backtrace(1);
8472 }
8473 var_n_visibility->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
8474 RET_LABEL16:(void)0;
8475 }
8476 }
8477 self->attrs[COLOR_parser_nodes__AMethPropdef___n_kwmeth].val = var_n_kwmeth; /* _n_kwmeth on <self:AMethPropdef> */
8478 var17 = NULL;
8479 if (var_n_kwmeth == NULL) {
8480 var18 = 0; /* is null */
8481 } else {
8482 var18 = 1; /* arg is null and recv is not */
8483 }
8484 if (0) {
8485 { /* Inline kernel#Object#!= (var_n_kwmeth,var17) on <var_n_kwmeth:nullable TKwmeth> */
8486 var_other = var17;
8487 {
8488 var22 = ((short int (*)(val*, val*))(var_n_kwmeth->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_kwmeth, var_other) /* == on <var_n_kwmeth:nullable TKwmeth(TKwmeth)>*/;
8489 var21 = var22;
8490 }
8491 var23 = !var21;
8492 var19 = var23;
8493 goto RET_LABEL20;
8494 RET_LABEL20:(void)0;
8495 }
8496 var18 = var19;
8497 }
8498 if (var18){
8499 {
8500 { /* Inline parser_nodes#ANode#parent= (var_n_kwmeth,self) on <var_n_kwmeth:nullable TKwmeth(TKwmeth)> */
8501 var_n_kwmeth->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwmeth:nullable TKwmeth(TKwmeth)> */
8502 RET_LABEL24:(void)0;
8503 }
8504 }
8505 } else {
8506 }
8507 self->attrs[COLOR_parser_nodes__AMethPropdef___n_kwinit].val = var_n_kwinit; /* _n_kwinit on <self:AMethPropdef> */
8508 var25 = NULL;
8509 if (var_n_kwinit == NULL) {
8510 var26 = 0; /* is null */
8511 } else {
8512 var26 = 1; /* arg is null and recv is not */
8513 }
8514 if (0) {
8515 { /* Inline kernel#Object#!= (var_n_kwinit,var25) on <var_n_kwinit:nullable TKwinit> */
8516 var_other = var25;
8517 {
8518 var30 = ((short int (*)(val*, val*))(var_n_kwinit->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_kwinit, var_other) /* == on <var_n_kwinit:nullable TKwinit(TKwinit)>*/;
8519 var29 = var30;
8520 }
8521 var31 = !var29;
8522 var27 = var31;
8523 goto RET_LABEL28;
8524 RET_LABEL28:(void)0;
8525 }
8526 var26 = var27;
8527 }
8528 if (var26){
8529 {
8530 { /* Inline parser_nodes#ANode#parent= (var_n_kwinit,self) on <var_n_kwinit:nullable TKwinit(TKwinit)> */
8531 var_n_kwinit->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwinit:nullable TKwinit(TKwinit)> */
8532 RET_LABEL32:(void)0;
8533 }
8534 }
8535 } else {
8536 }
8537 self->attrs[COLOR_parser_nodes__AMethPropdef___n_kwnew].val = var_n_kwnew; /* _n_kwnew on <self:AMethPropdef> */
8538 var33 = NULL;
8539 if (var_n_kwnew == NULL) {
8540 var34 = 0; /* is null */
8541 } else {
8542 var34 = 1; /* arg is null and recv is not */
8543 }
8544 if (0) {
8545 { /* Inline kernel#Object#!= (var_n_kwnew,var33) on <var_n_kwnew:nullable TKwnew> */
8546 var_other = var33;
8547 {
8548 var38 = ((short int (*)(val*, val*))(var_n_kwnew->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_kwnew, var_other) /* == on <var_n_kwnew:nullable TKwnew(TKwnew)>*/;
8549 var37 = var38;
8550 }
8551 var39 = !var37;
8552 var35 = var39;
8553 goto RET_LABEL36;
8554 RET_LABEL36:(void)0;
8555 }
8556 var34 = var35;
8557 }
8558 if (var34){
8559 {
8560 { /* Inline parser_nodes#ANode#parent= (var_n_kwnew,self) on <var_n_kwnew:nullable TKwnew(TKwnew)> */
8561 var_n_kwnew->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwnew:nullable TKwnew(TKwnew)> */
8562 RET_LABEL40:(void)0;
8563 }
8564 }
8565 } else {
8566 }
8567 self->attrs[COLOR_parser_nodes__AMethPropdef___n_methid].val = var_n_methid; /* _n_methid on <self:AMethPropdef> */
8568 var41 = NULL;
8569 if (var_n_methid == NULL) {
8570 var42 = 0; /* is null */
8571 } else {
8572 var42 = 1; /* arg is null and recv is not */
8573 }
8574 if (0) {
8575 { /* Inline kernel#Object#!= (var_n_methid,var41) on <var_n_methid:nullable AMethid> */
8576 var_other = var41;
8577 {
8578 var46 = ((short int (*)(val*, val*))(var_n_methid->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_methid, var_other) /* == on <var_n_methid:nullable AMethid(AMethid)>*/;
8579 var45 = var46;
8580 }
8581 var47 = !var45;
8582 var43 = var47;
8583 goto RET_LABEL44;
8584 RET_LABEL44:(void)0;
8585 }
8586 var42 = var43;
8587 }
8588 if (var42){
8589 {
8590 { /* Inline parser_nodes#ANode#parent= (var_n_methid,self) on <var_n_methid:nullable AMethid(AMethid)> */
8591 var_n_methid->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_methid:nullable AMethid(AMethid)> */
8592 RET_LABEL48:(void)0;
8593 }
8594 }
8595 } else {
8596 }
8597 if (unlikely(var_n_signature == NULL)) {
8598 PRINT_ERROR("Runtime error: %s", "Cast failed");
8599 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1148);
8600 show_backtrace(1);
8601 }
8602 self->attrs[COLOR_parser_nodes__AMethPropdef___n_signature].val = var_n_signature; /* _n_signature on <self:AMethPropdef> */
8603 if (var_n_signature == NULL) {
8604 PRINT_ERROR("Runtime error: %s", "Receiver is null");
8605 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1149);
8606 show_backtrace(1);
8607 } else {
8608 { /* Inline parser_nodes#ANode#parent= (var_n_signature,self) on <var_n_signature:nullable ASignature> */
8609 if (unlikely(var_n_signature == NULL)) {
8610 PRINT_ERROR("Runtime error: %s", "Receiver is null");
8611 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
8612 show_backtrace(1);
8613 }
8614 var_n_signature->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_signature:nullable ASignature> */
8615 RET_LABEL49:(void)0;
8616 }
8617 }
8618 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AMethPropdef> */
8619 var50 = NULL;
8620 if (var_n_annotations == NULL) {
8621 var51 = 0; /* is null */
8622 } else {
8623 var51 = 1; /* arg is null and recv is not */
8624 }
8625 if (0) {
8626 { /* Inline kernel#Object#!= (var_n_annotations,var50) on <var_n_annotations:nullable AAnnotations> */
8627 var_other = var50;
8628 {
8629 var55 = ((short int (*)(val*, val*))(var_n_annotations->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
8630 var54 = var55;
8631 }
8632 var56 = !var54;
8633 var52 = var56;
8634 goto RET_LABEL53;
8635 RET_LABEL53:(void)0;
8636 }
8637 var51 = var52;
8638 }
8639 if (var51){
8640 {
8641 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
8642 var_n_annotations->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
8643 RET_LABEL57:(void)0;
8644 }
8645 }
8646 } else {
8647 }
8648 self->attrs[COLOR_parser_nodes__AMethPropdef___n_extern_calls].val = var_n_extern_calls; /* _n_extern_calls on <self:AMethPropdef> */
8649 var58 = NULL;
8650 if (var_n_extern_calls == NULL) {
8651 var59 = 0; /* is null */
8652 } else {
8653 var59 = 1; /* arg is null and recv is not */
8654 }
8655 if (0) {
8656 { /* Inline kernel#Object#!= (var_n_extern_calls,var58) on <var_n_extern_calls:nullable AExternCalls> */
8657 var_other = var58;
8658 {
8659 var63 = ((short int (*)(val*, val*))(var_n_extern_calls->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_extern_calls, var_other) /* == on <var_n_extern_calls:nullable AExternCalls(AExternCalls)>*/;
8660 var62 = var63;
8661 }
8662 var64 = !var62;
8663 var60 = var64;
8664 goto RET_LABEL61;
8665 RET_LABEL61:(void)0;
8666 }
8667 var59 = var60;
8668 }
8669 if (var59){
8670 {
8671 { /* Inline parser_nodes#ANode#parent= (var_n_extern_calls,self) on <var_n_extern_calls:nullable AExternCalls(AExternCalls)> */
8672 var_n_extern_calls->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_extern_calls:nullable AExternCalls(AExternCalls)> */
8673 RET_LABEL65:(void)0;
8674 }
8675 }
8676 } else {
8677 }
8678 self->attrs[COLOR_parser_nodes__AMethPropdef___n_extern_code_block].val = var_n_extern_code_block; /* _n_extern_code_block on <self:AMethPropdef> */
8679 var66 = NULL;
8680 if (var_n_extern_code_block == NULL) {
8681 var67 = 0; /* is null */
8682 } else {
8683 var67 = 1; /* arg is null and recv is not */
8684 }
8685 if (0) {
8686 { /* Inline kernel#Object#!= (var_n_extern_code_block,var66) on <var_n_extern_code_block:nullable AExternCodeBlock> */
8687 var_other = var66;
8688 {
8689 var71 = ((short int (*)(val*, val*))(var_n_extern_code_block->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_extern_code_block, var_other) /* == on <var_n_extern_code_block:nullable AExternCodeBlock(AExternCodeBlock)>*/;
8690 var70 = var71;
8691 }
8692 var72 = !var70;
8693 var68 = var72;
8694 goto RET_LABEL69;
8695 RET_LABEL69:(void)0;
8696 }
8697 var67 = var68;
8698 }
8699 if (var67){
8700 {
8701 { /* Inline parser_nodes#ANode#parent= (var_n_extern_code_block,self) on <var_n_extern_code_block:nullable AExternCodeBlock(AExternCodeBlock)> */
8702 var_n_extern_code_block->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_extern_code_block:nullable AExternCodeBlock(AExternCodeBlock)> */
8703 RET_LABEL73:(void)0;
8704 }
8705 }
8706 } else {
8707 }
8708 self->attrs[COLOR_parser_nodes__AMethPropdef___n_block].val = var_n_block; /* _n_block on <self:AMethPropdef> */
8709 var74 = NULL;
8710 if (var_n_block == NULL) {
8711 var75 = 0; /* is null */
8712 } else {
8713 var75 = 1; /* arg is null and recv is not */
8714 }
8715 if (0) {
8716 { /* Inline kernel#Object#!= (var_n_block,var74) on <var_n_block:nullable AExpr> */
8717 var_other = var74;
8718 {
8719 var79 = ((short int (*)(val*, val*))(var_n_block->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_block, var_other) /* == on <var_n_block:nullable AExpr(AExpr)>*/;
8720 var78 = var79;
8721 }
8722 var80 = !var78;
8723 var76 = var80;
8724 goto RET_LABEL77;
8725 RET_LABEL77:(void)0;
8726 }
8727 var75 = var76;
8728 }
8729 if (var75){
8730 {
8731 { /* Inline parser_nodes#ANode#parent= (var_n_block,self) on <var_n_block:nullable AExpr(AExpr)> */
8732 var_n_block->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_block:nullable AExpr(AExpr)> */
8733 RET_LABEL81:(void)0;
8734 }
8735 }
8736 } else {
8737 }
8738 RET_LABEL:;
8739 }
8740 /* method parser_prod#AMethPropdef#init_amethpropdef for (self: Object, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable TKwmeth, nullable TKwinit, nullable TKwnew, nullable AMethid, nullable ASignature, nullable AAnnotations, nullable AExternCalls, nullable AExternCodeBlock, nullable AExpr) */
8741 void VIRTUAL_parser_prod__AMethPropdef__init_amethpropdef(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6, val* p7, val* p8, val* p9, val* p10, val* p11) {
8742 parser_prod__AMethPropdef__init_amethpropdef(self, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); /* Direct call parser_prod#AMethPropdef#init_amethpropdef on <self:Object(AMethPropdef)>*/
8743 RET_LABEL:;
8744 }
8745 /* method parser_prod#AMethPropdef#replace_child for (self: AMethPropdef, ANode, nullable ANode) */
8746 void parser_prod__AMethPropdef__replace_child(val* self, val* p0, val* p1) {
8747 val* var_old_child /* var old_child: ANode */;
8748 val* var_new_child /* var new_child: nullable ANode */;
8749 val* var /* : nullable ADoc */;
8750 short int var1 /* : Bool */;
8751 short int var2 /* : Bool */;
8752 val* var_other /* var other: nullable Object */;
8753 short int var4 /* : Bool */;
8754 short int var6 /* : Bool */;
8755 short int var7 /* : Bool */;
8756 int cltype;
8757 int idtype;
8758 const char* var_class_name;
8759 val* var8 /* : nullable TKwredef */;
8760 short int var9 /* : Bool */;
8761 short int var10 /* : Bool */;
8762 short int var12 /* : Bool */;
8763 short int var14 /* : Bool */;
8764 short int var15 /* : Bool */;
8765 int cltype16;
8766 int idtype17;
8767 const char* var_class_name18;
8768 val* var19 /* : nullable AVisibility */;
8769 short int var20 /* : Bool */;
8770 short int var21 /* : Bool */;
8771 short int var23 /* : Bool */;
8772 short int var25 /* : Bool */;
8773 short int var26 /* : Bool */;
8774 int cltype27;
8775 int idtype28;
8776 const char* var_class_name29;
8777 val* var30 /* : nullable TKwmeth */;
8778 short int var31 /* : Bool */;
8779 short int var32 /* : Bool */;
8780 short int var34 /* : Bool */;
8781 short int var36 /* : Bool */;
8782 short int var37 /* : Bool */;
8783 int cltype38;
8784 int idtype39;
8785 const char* var_class_name40;
8786 val* var41 /* : nullable TKwinit */;
8787 short int var42 /* : Bool */;
8788 short int var43 /* : Bool */;
8789 short int var45 /* : Bool */;
8790 short int var47 /* : Bool */;
8791 short int var48 /* : Bool */;
8792 int cltype49;
8793 int idtype50;
8794 const char* var_class_name51;
8795 val* var52 /* : nullable TKwnew */;
8796 short int var53 /* : Bool */;
8797 short int var54 /* : Bool */;
8798 short int var56 /* : Bool */;
8799 short int var58 /* : Bool */;
8800 short int var59 /* : Bool */;
8801 int cltype60;
8802 int idtype61;
8803 const char* var_class_name62;
8804 val* var63 /* : nullable AMethid */;
8805 short int var64 /* : Bool */;
8806 short int var65 /* : Bool */;
8807 short int var67 /* : Bool */;
8808 short int var69 /* : Bool */;
8809 short int var70 /* : Bool */;
8810 int cltype71;
8811 int idtype72;
8812 const char* var_class_name73;
8813 val* var74 /* : nullable ASignature */;
8814 short int var75 /* : Bool */;
8815 short int var76 /* : Bool */;
8816 short int var78 /* : Bool */;
8817 short int var80 /* : Bool */;
8818 short int var81 /* : Bool */;
8819 int cltype82;
8820 int idtype83;
8821 const char* var_class_name84;
8822 val* var85 /* : nullable AAnnotations */;
8823 short int var86 /* : Bool */;
8824 short int var87 /* : Bool */;
8825 short int var89 /* : Bool */;
8826 short int var91 /* : Bool */;
8827 short int var92 /* : Bool */;
8828 int cltype93;
8829 int idtype94;
8830 const char* var_class_name95;
8831 val* var96 /* : nullable AExternCalls */;
8832 short int var97 /* : Bool */;
8833 short int var98 /* : Bool */;
8834 short int var100 /* : Bool */;
8835 short int var102 /* : Bool */;
8836 short int var103 /* : Bool */;
8837 int cltype104;
8838 int idtype105;
8839 const char* var_class_name106;
8840 val* var107 /* : nullable AExternCodeBlock */;
8841 short int var108 /* : Bool */;
8842 short int var109 /* : Bool */;
8843 short int var111 /* : Bool */;
8844 short int var113 /* : Bool */;
8845 short int var114 /* : Bool */;
8846 int cltype115;
8847 int idtype116;
8848 const char* var_class_name117;
8849 val* var118 /* : nullable AExpr */;
8850 short int var119 /* : Bool */;
8851 short int var120 /* : Bool */;
8852 short int var122 /* : Bool */;
8853 short int var124 /* : Bool */;
8854 short int var125 /* : Bool */;
8855 int cltype126;
8856 int idtype127;
8857 const char* var_class_name128;
8858 var_old_child = p0;
8859 var_new_child = p1;
8860 var = self->attrs[COLOR_parser_nodes__APropdef___n_doc].val; /* _n_doc on <self:AMethPropdef> */
8861 if (var == NULL) {
8862 var1 = 0; /* <var_old_child:ANode> cannot be null */
8863 } else {
8864 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable ADoc> */
8865 var_other = var_old_child;
8866 {
8867 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable ADoc(ADoc)> */
8868 var6 = var == var_other;
8869 var4 = var6;
8870 goto RET_LABEL5;
8871 RET_LABEL5:(void)0;
8872 }
8873 }
8874 var2 = var4;
8875 goto RET_LABEL3;
8876 RET_LABEL3:(void)0;
8877 }
8878 var1 = var2;
8879 }
8880 if (var1){
8881 /* <var_new_child:nullable ANode> isa nullable ADoc */
8882 cltype = type_nullable_parser_nodes__ADoc.color;
8883 idtype = type_nullable_parser_nodes__ADoc.id;
8884 if(var_new_child == NULL) {
8885 var7 = 1;
8886 } else {
8887 if(cltype >= var_new_child->type->table_size) {
8888 var7 = 0;
8889 } else {
8890 var7 = var_new_child->type->type_table[cltype] == idtype;
8891 }
8892 }
8893 if (unlikely(!var7)) {
8894 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
8895 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ADoc", var_class_name);
8896 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1163);
8897 show_backtrace(1);
8898 }
8899 {
8900 parser_prod__AMethPropdef__n_doc_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_doc= on <self:AMethPropdef>*/
8901 }
8902 goto RET_LABEL;
8903 } else {
8904 }
8905 var8 = self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val; /* _n_kwredef on <self:AMethPropdef> */
8906 if (var8 == NULL) {
8907 var9 = 0; /* <var_old_child:ANode> cannot be null */
8908 } else {
8909 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwredef> */
8910 var_other = var_old_child;
8911 {
8912 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwredef(TKwredef)> */
8913 var14 = var8 == var_other;
8914 var12 = var14;
8915 goto RET_LABEL13;
8916 RET_LABEL13:(void)0;
8917 }
8918 }
8919 var10 = var12;
8920 goto RET_LABEL11;
8921 RET_LABEL11:(void)0;
8922 }
8923 var9 = var10;
8924 }
8925 if (var9){
8926 /* <var_new_child:nullable ANode> isa nullable TKwredef */
8927 cltype16 = type_nullable_parser_nodes__TKwredef.color;
8928 idtype17 = type_nullable_parser_nodes__TKwredef.id;
8929 if(var_new_child == NULL) {
8930 var15 = 1;
8931 } else {
8932 if(cltype16 >= var_new_child->type->table_size) {
8933 var15 = 0;
8934 } else {
8935 var15 = var_new_child->type->type_table[cltype16] == idtype17;
8936 }
8937 }
8938 if (unlikely(!var15)) {
8939 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
8940 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name18);
8941 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1167);
8942 show_backtrace(1);
8943 }
8944 {
8945 ((void (*)(val*, val*))(self->class->vft[COLOR_parser_nodes__APropdef__n_kwredef_61d]))(self, var_new_child) /* n_kwredef= on <self:AMethPropdef>*/;
8946 }
8947 goto RET_LABEL;
8948 } else {
8949 }
8950 var19 = self->attrs[COLOR_parser_nodes__APropdef___n_visibility].val; /* _n_visibility on <self:AMethPropdef> */
8951 if (var19 == NULL) {
8952 var20 = 0; /* <var_old_child:ANode> cannot be null */
8953 } else {
8954 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:nullable AVisibility> */
8955 var_other = var_old_child;
8956 {
8957 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:nullable AVisibility(AVisibility)> */
8958 var25 = var19 == var_other;
8959 var23 = var25;
8960 goto RET_LABEL24;
8961 RET_LABEL24:(void)0;
8962 }
8963 }
8964 var21 = var23;
8965 goto RET_LABEL22;
8966 RET_LABEL22:(void)0;
8967 }
8968 var20 = var21;
8969 }
8970 if (var20){
8971 /* <var_new_child:nullable ANode> isa AVisibility */
8972 cltype27 = type_parser_nodes__AVisibility.color;
8973 idtype28 = type_parser_nodes__AVisibility.id;
8974 if(var_new_child == NULL) {
8975 var26 = 0;
8976 } else {
8977 if(cltype27 >= var_new_child->type->table_size) {
8978 var26 = 0;
8979 } else {
8980 var26 = var_new_child->type->type_table[cltype27] == idtype28;
8981 }
8982 }
8983 if (unlikely(!var26)) {
8984 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
8985 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name29);
8986 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1171);
8987 show_backtrace(1);
8988 }
8989 {
8990 parser_prod__AMethPropdef__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_visibility= on <self:AMethPropdef>*/
8991 }
8992 goto RET_LABEL;
8993 } else {
8994 }
8995 var30 = self->attrs[COLOR_parser_nodes__AMethPropdef___n_kwmeth].val; /* _n_kwmeth on <self:AMethPropdef> */
8996 if (var30 == NULL) {
8997 var31 = 0; /* <var_old_child:ANode> cannot be null */
8998 } else {
8999 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:nullable TKwmeth> */
9000 var_other = var_old_child;
9001 {
9002 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:nullable TKwmeth(TKwmeth)> */
9003 var36 = var30 == var_other;
9004 var34 = var36;
9005 goto RET_LABEL35;
9006 RET_LABEL35:(void)0;
9007 }
9008 }
9009 var32 = var34;
9010 goto RET_LABEL33;
9011 RET_LABEL33:(void)0;
9012 }
9013 var31 = var32;
9014 }
9015 if (var31){
9016 /* <var_new_child:nullable ANode> isa nullable TKwmeth */
9017 cltype38 = type_nullable_parser_nodes__TKwmeth.color;
9018 idtype39 = type_nullable_parser_nodes__TKwmeth.id;
9019 if(var_new_child == NULL) {
9020 var37 = 1;
9021 } else {
9022 if(cltype38 >= var_new_child->type->table_size) {
9023 var37 = 0;
9024 } else {
9025 var37 = var_new_child->type->type_table[cltype38] == idtype39;
9026 }
9027 }
9028 if (unlikely(!var37)) {
9029 var_class_name40 = var_new_child == NULL ? "null" : var_new_child->type->name;
9030 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwmeth", var_class_name40);
9031 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1175);
9032 show_backtrace(1);
9033 }
9034 {
9035 parser_prod__AMethPropdef__n_kwmeth_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_kwmeth= on <self:AMethPropdef>*/
9036 }
9037 goto RET_LABEL;
9038 } else {
9039 }
9040 var41 = self->attrs[COLOR_parser_nodes__AMethPropdef___n_kwinit].val; /* _n_kwinit on <self:AMethPropdef> */
9041 if (var41 == NULL) {
9042 var42 = 0; /* <var_old_child:ANode> cannot be null */
9043 } else {
9044 { /* Inline kernel#Object#== (var41,var_old_child) on <var41:nullable TKwinit> */
9045 var_other = var_old_child;
9046 {
9047 { /* Inline kernel#Object#is_same_instance (var41,var_other) on <var41:nullable TKwinit(TKwinit)> */
9048 var47 = var41 == var_other;
9049 var45 = var47;
9050 goto RET_LABEL46;
9051 RET_LABEL46:(void)0;
9052 }
9053 }
9054 var43 = var45;
9055 goto RET_LABEL44;
9056 RET_LABEL44:(void)0;
9057 }
9058 var42 = var43;
9059 }
9060 if (var42){
9061 /* <var_new_child:nullable ANode> isa nullable TKwinit */
9062 cltype49 = type_nullable_parser_nodes__TKwinit.color;
9063 idtype50 = type_nullable_parser_nodes__TKwinit.id;
9064 if(var_new_child == NULL) {
9065 var48 = 1;
9066 } else {
9067 if(cltype49 >= var_new_child->type->table_size) {
9068 var48 = 0;
9069 } else {
9070 var48 = var_new_child->type->type_table[cltype49] == idtype50;
9071 }
9072 }
9073 if (unlikely(!var48)) {
9074 var_class_name51 = var_new_child == NULL ? "null" : var_new_child->type->name;
9075 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwinit", var_class_name51);
9076 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1179);
9077 show_backtrace(1);
9078 }
9079 {
9080 parser_prod__AMethPropdef__n_kwinit_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_kwinit= on <self:AMethPropdef>*/
9081 }
9082 goto RET_LABEL;
9083 } else {
9084 }
9085 var52 = self->attrs[COLOR_parser_nodes__AMethPropdef___n_kwnew].val; /* _n_kwnew on <self:AMethPropdef> */
9086 if (var52 == NULL) {
9087 var53 = 0; /* <var_old_child:ANode> cannot be null */
9088 } else {
9089 { /* Inline kernel#Object#== (var52,var_old_child) on <var52:nullable TKwnew> */
9090 var_other = var_old_child;
9091 {
9092 { /* Inline kernel#Object#is_same_instance (var52,var_other) on <var52:nullable TKwnew(TKwnew)> */
9093 var58 = var52 == var_other;
9094 var56 = var58;
9095 goto RET_LABEL57;
9096 RET_LABEL57:(void)0;
9097 }
9098 }
9099 var54 = var56;
9100 goto RET_LABEL55;
9101 RET_LABEL55:(void)0;
9102 }
9103 var53 = var54;
9104 }
9105 if (var53){
9106 /* <var_new_child:nullable ANode> isa nullable TKwnew */
9107 cltype60 = type_nullable_parser_nodes__TKwnew.color;
9108 idtype61 = type_nullable_parser_nodes__TKwnew.id;
9109 if(var_new_child == NULL) {
9110 var59 = 1;
9111 } else {
9112 if(cltype60 >= var_new_child->type->table_size) {
9113 var59 = 0;
9114 } else {
9115 var59 = var_new_child->type->type_table[cltype60] == idtype61;
9116 }
9117 }
9118 if (unlikely(!var59)) {
9119 var_class_name62 = var_new_child == NULL ? "null" : var_new_child->type->name;
9120 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwnew", var_class_name62);
9121 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1183);
9122 show_backtrace(1);
9123 }
9124 {
9125 parser_prod__AMethPropdef__n_kwnew_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_kwnew= on <self:AMethPropdef>*/
9126 }
9127 goto RET_LABEL;
9128 } else {
9129 }
9130 var63 = self->attrs[COLOR_parser_nodes__AMethPropdef___n_methid].val; /* _n_methid on <self:AMethPropdef> */
9131 if (var63 == NULL) {
9132 var64 = 0; /* <var_old_child:ANode> cannot be null */
9133 } else {
9134 { /* Inline kernel#Object#== (var63,var_old_child) on <var63:nullable AMethid> */
9135 var_other = var_old_child;
9136 {
9137 { /* Inline kernel#Object#is_same_instance (var63,var_other) on <var63:nullable AMethid(AMethid)> */
9138 var69 = var63 == var_other;
9139 var67 = var69;
9140 goto RET_LABEL68;
9141 RET_LABEL68:(void)0;
9142 }
9143 }
9144 var65 = var67;
9145 goto RET_LABEL66;
9146 RET_LABEL66:(void)0;
9147 }
9148 var64 = var65;
9149 }
9150 if (var64){
9151 /* <var_new_child:nullable ANode> isa nullable AMethid */
9152 cltype71 = type_nullable_parser_nodes__AMethid.color;
9153 idtype72 = type_nullable_parser_nodes__AMethid.id;
9154 if(var_new_child == NULL) {
9155 var70 = 1;
9156 } else {
9157 if(cltype71 >= var_new_child->type->table_size) {
9158 var70 = 0;
9159 } else {
9160 var70 = var_new_child->type->type_table[cltype71] == idtype72;
9161 }
9162 }
9163 if (unlikely(!var70)) {
9164 var_class_name73 = var_new_child == NULL ? "null" : var_new_child->type->name;
9165 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AMethid", var_class_name73);
9166 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1187);
9167 show_backtrace(1);
9168 }
9169 {
9170 parser_prod__AMethPropdef__n_methid_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_methid= on <self:AMethPropdef>*/
9171 }
9172 goto RET_LABEL;
9173 } else {
9174 }
9175 var74 = self->attrs[COLOR_parser_nodes__AMethPropdef___n_signature].val; /* _n_signature on <self:AMethPropdef> */
9176 if (var74 == NULL) {
9177 var75 = 0; /* <var_old_child:ANode> cannot be null */
9178 } else {
9179 { /* Inline kernel#Object#== (var74,var_old_child) on <var74:nullable ASignature> */
9180 var_other = var_old_child;
9181 {
9182 { /* Inline kernel#Object#is_same_instance (var74,var_other) on <var74:nullable ASignature(ASignature)> */
9183 var80 = var74 == var_other;
9184 var78 = var80;
9185 goto RET_LABEL79;
9186 RET_LABEL79:(void)0;
9187 }
9188 }
9189 var76 = var78;
9190 goto RET_LABEL77;
9191 RET_LABEL77:(void)0;
9192 }
9193 var75 = var76;
9194 }
9195 if (var75){
9196 /* <var_new_child:nullable ANode> isa ASignature */
9197 cltype82 = type_parser_nodes__ASignature.color;
9198 idtype83 = type_parser_nodes__ASignature.id;
9199 if(var_new_child == NULL) {
9200 var81 = 0;
9201 } else {
9202 if(cltype82 >= var_new_child->type->table_size) {
9203 var81 = 0;
9204 } else {
9205 var81 = var_new_child->type->type_table[cltype82] == idtype83;
9206 }
9207 }
9208 if (unlikely(!var81)) {
9209 var_class_name84 = var_new_child == NULL ? "null" : var_new_child->type->name;
9210 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "ASignature", var_class_name84);
9211 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1191);
9212 show_backtrace(1);
9213 }
9214 {
9215 parser_prod__AMethPropdef__n_signature_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_signature= on <self:AMethPropdef>*/
9216 }
9217 goto RET_LABEL;
9218 } else {
9219 }
9220 var85 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AMethPropdef> */
9221 if (var85 == NULL) {
9222 var86 = 0; /* <var_old_child:ANode> cannot be null */
9223 } else {
9224 { /* Inline kernel#Object#== (var85,var_old_child) on <var85:nullable AAnnotations> */
9225 var_other = var_old_child;
9226 {
9227 { /* Inline kernel#Object#is_same_instance (var85,var_other) on <var85:nullable AAnnotations(AAnnotations)> */
9228 var91 = var85 == var_other;
9229 var89 = var91;
9230 goto RET_LABEL90;
9231 RET_LABEL90:(void)0;
9232 }
9233 }
9234 var87 = var89;
9235 goto RET_LABEL88;
9236 RET_LABEL88:(void)0;
9237 }
9238 var86 = var87;
9239 }
9240 if (var86){
9241 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
9242 cltype93 = type_nullable_parser_nodes__AAnnotations.color;
9243 idtype94 = type_nullable_parser_nodes__AAnnotations.id;
9244 if(var_new_child == NULL) {
9245 var92 = 1;
9246 } else {
9247 if(cltype93 >= var_new_child->type->table_size) {
9248 var92 = 0;
9249 } else {
9250 var92 = var_new_child->type->type_table[cltype93] == idtype94;
9251 }
9252 }
9253 if (unlikely(!var92)) {
9254 var_class_name95 = var_new_child == NULL ? "null" : var_new_child->type->name;
9255 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name95);
9256 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1195);
9257 show_backtrace(1);
9258 }
9259 {
9260 parser_prod__AMethPropdef__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_annotations= on <self:AMethPropdef>*/
9261 }
9262 goto RET_LABEL;
9263 } else {
9264 }
9265 var96 = self->attrs[COLOR_parser_nodes__AMethPropdef___n_extern_calls].val; /* _n_extern_calls on <self:AMethPropdef> */
9266 if (var96 == NULL) {
9267 var97 = 0; /* <var_old_child:ANode> cannot be null */
9268 } else {
9269 { /* Inline kernel#Object#== (var96,var_old_child) on <var96:nullable AExternCalls> */
9270 var_other = var_old_child;
9271 {
9272 { /* Inline kernel#Object#is_same_instance (var96,var_other) on <var96:nullable AExternCalls(AExternCalls)> */
9273 var102 = var96 == var_other;
9274 var100 = var102;
9275 goto RET_LABEL101;
9276 RET_LABEL101:(void)0;
9277 }
9278 }
9279 var98 = var100;
9280 goto RET_LABEL99;
9281 RET_LABEL99:(void)0;
9282 }
9283 var97 = var98;
9284 }
9285 if (var97){
9286 /* <var_new_child:nullable ANode> isa nullable AExternCalls */
9287 cltype104 = type_nullable_parser_nodes__AExternCalls.color;
9288 idtype105 = type_nullable_parser_nodes__AExternCalls.id;
9289 if(var_new_child == NULL) {
9290 var103 = 1;
9291 } else {
9292 if(cltype104 >= var_new_child->type->table_size) {
9293 var103 = 0;
9294 } else {
9295 var103 = var_new_child->type->type_table[cltype104] == idtype105;
9296 }
9297 }
9298 if (unlikely(!var103)) {
9299 var_class_name106 = var_new_child == NULL ? "null" : var_new_child->type->name;
9300 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExternCalls", var_class_name106);
9301 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1199);
9302 show_backtrace(1);
9303 }
9304 {
9305 parser_prod__AMethPropdef__n_extern_calls_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_extern_calls= on <self:AMethPropdef>*/
9306 }
9307 goto RET_LABEL;
9308 } else {
9309 }
9310 var107 = self->attrs[COLOR_parser_nodes__AMethPropdef___n_extern_code_block].val; /* _n_extern_code_block on <self:AMethPropdef> */
9311 if (var107 == NULL) {
9312 var108 = 0; /* <var_old_child:ANode> cannot be null */
9313 } else {
9314 { /* Inline kernel#Object#== (var107,var_old_child) on <var107:nullable AExternCodeBlock> */
9315 var_other = var_old_child;
9316 {
9317 { /* Inline kernel#Object#is_same_instance (var107,var_other) on <var107:nullable AExternCodeBlock(AExternCodeBlock)> */
9318 var113 = var107 == var_other;
9319 var111 = var113;
9320 goto RET_LABEL112;
9321 RET_LABEL112:(void)0;
9322 }
9323 }
9324 var109 = var111;
9325 goto RET_LABEL110;
9326 RET_LABEL110:(void)0;
9327 }
9328 var108 = var109;
9329 }
9330 if (var108){
9331 /* <var_new_child:nullable ANode> isa nullable AExternCodeBlock */
9332 cltype115 = type_nullable_parser_nodes__AExternCodeBlock.color;
9333 idtype116 = type_nullable_parser_nodes__AExternCodeBlock.id;
9334 if(var_new_child == NULL) {
9335 var114 = 1;
9336 } else {
9337 if(cltype115 >= var_new_child->type->table_size) {
9338 var114 = 0;
9339 } else {
9340 var114 = var_new_child->type->type_table[cltype115] == idtype116;
9341 }
9342 }
9343 if (unlikely(!var114)) {
9344 var_class_name117 = var_new_child == NULL ? "null" : var_new_child->type->name;
9345 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExternCodeBlock", var_class_name117);
9346 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1203);
9347 show_backtrace(1);
9348 }
9349 {
9350 parser_prod__AMethPropdef__n_extern_code_block_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_extern_code_block= on <self:AMethPropdef>*/
9351 }
9352 goto RET_LABEL;
9353 } else {
9354 }
9355 var118 = self->attrs[COLOR_parser_nodes__AMethPropdef___n_block].val; /* _n_block on <self:AMethPropdef> */
9356 if (var118 == NULL) {
9357 var119 = 0; /* <var_old_child:ANode> cannot be null */
9358 } else {
9359 { /* Inline kernel#Object#== (var118,var_old_child) on <var118:nullable AExpr> */
9360 var_other = var_old_child;
9361 {
9362 { /* Inline kernel#Object#is_same_instance (var118,var_other) on <var118:nullable AExpr(AExpr)> */
9363 var124 = var118 == var_other;
9364 var122 = var124;
9365 goto RET_LABEL123;
9366 RET_LABEL123:(void)0;
9367 }
9368 }
9369 var120 = var122;
9370 goto RET_LABEL121;
9371 RET_LABEL121:(void)0;
9372 }
9373 var119 = var120;
9374 }
9375 if (var119){
9376 /* <var_new_child:nullable ANode> isa nullable AExpr */
9377 cltype126 = type_nullable_parser_nodes__AExpr.color;
9378 idtype127 = type_nullable_parser_nodes__AExpr.id;
9379 if(var_new_child == NULL) {
9380 var125 = 1;
9381 } else {
9382 if(cltype126 >= var_new_child->type->table_size) {
9383 var125 = 0;
9384 } else {
9385 var125 = var_new_child->type->type_table[cltype126] == idtype127;
9386 }
9387 }
9388 if (unlikely(!var125)) {
9389 var_class_name128 = var_new_child == NULL ? "null" : var_new_child->type->name;
9390 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExpr", var_class_name128);
9391 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1207);
9392 show_backtrace(1);
9393 }
9394 {
9395 ((void (*)(val*, val*))(self->class->vft[COLOR_parser_nodes__AMethPropdef__n_block_61d]))(self, var_new_child) /* n_block= on <self:AMethPropdef>*/;
9396 }
9397 goto RET_LABEL;
9398 } else {
9399 }
9400 RET_LABEL:;
9401 }
9402 /* method parser_prod#AMethPropdef#replace_child for (self: Object, ANode, nullable ANode) */
9403 void VIRTUAL_parser_prod__AMethPropdef__replace_child(val* self, val* p0, val* p1) {
9404 parser_prod__AMethPropdef__replace_child(self, p0, p1); /* Direct call parser_prod#AMethPropdef#replace_child on <self:Object(AMethPropdef)>*/
9405 RET_LABEL:;
9406 }
9407 /* method parser_prod#AMethPropdef#n_doc= for (self: AMethPropdef, nullable ADoc) */
9408 void parser_prod__AMethPropdef__n_doc_61d(val* self, val* p0) {
9409 val* var_node /* var node: nullable ADoc */;
9410 val* var /* : null */;
9411 short int var1 /* : Bool */;
9412 short int var2 /* : Bool */;
9413 val* var_other /* var other: nullable Object */;
9414 short int var4 /* : Bool */;
9415 short int var5 /* : Bool */;
9416 short int var6 /* : Bool */;
9417 var_node = p0;
9418 self->attrs[COLOR_parser_nodes__APropdef___n_doc].val = var_node; /* _n_doc on <self:AMethPropdef> */
9419 var = NULL;
9420 if (var_node == NULL) {
9421 var1 = 0; /* is null */
9422 } else {
9423 var1 = 1; /* arg is null and recv is not */
9424 }
9425 if (0) {
9426 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable ADoc> */
9427 var_other = var;
9428 {
9429 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable ADoc(ADoc)>*/;
9430 var4 = var5;
9431 }
9432 var6 = !var4;
9433 var2 = var6;
9434 goto RET_LABEL3;
9435 RET_LABEL3:(void)0;
9436 }
9437 var1 = var2;
9438 }
9439 if (var1){
9440 {
9441 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ADoc(ADoc)> */
9442 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ADoc(ADoc)> */
9443 RET_LABEL7:(void)0;
9444 }
9445 }
9446 } else {
9447 }
9448 RET_LABEL:;
9449 }
9450 /* method parser_prod#AMethPropdef#n_doc= for (self: Object, nullable ADoc) */
9451 void VIRTUAL_parser_prod__AMethPropdef__n_doc_61d(val* self, val* p0) {
9452 parser_prod__AMethPropdef__n_doc_61d(self, p0); /* Direct call parser_prod#AMethPropdef#n_doc= on <self:Object(AMethPropdef)>*/
9453 RET_LABEL:;
9454 }
9455 /* method parser_prod#AMethPropdef#n_kwredef= for (self: AMethPropdef, nullable TKwredef) */
9456 void parser_prod__AMethPropdef__n_kwredef_61d(val* self, val* p0) {
9457 val* var_node /* var node: nullable TKwredef */;
9458 val* var /* : null */;
9459 short int var1 /* : Bool */;
9460 short int var2 /* : Bool */;
9461 val* var_other /* var other: nullable Object */;
9462 short int var4 /* : Bool */;
9463 short int var5 /* : Bool */;
9464 short int var6 /* : Bool */;
9465 var_node = p0;
9466 self->attrs[COLOR_parser_nodes__APropdef___n_kwredef].val = var_node; /* _n_kwredef on <self:AMethPropdef> */
9467 var = NULL;
9468 if (var_node == NULL) {
9469 var1 = 0; /* is null */
9470 } else {
9471 var1 = 1; /* arg is null and recv is not */
9472 }
9473 if (0) {
9474 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
9475 var_other = var;
9476 {
9477 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
9478 var4 = var5;
9479 }
9480 var6 = !var4;
9481 var2 = var6;
9482 goto RET_LABEL3;
9483 RET_LABEL3:(void)0;
9484 }
9485 var1 = var2;
9486 }
9487 if (var1){
9488 {
9489 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
9490 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
9491 RET_LABEL7:(void)0;
9492 }
9493 }
9494 } else {
9495 }
9496 RET_LABEL:;
9497 }
9498 /* method parser_prod#AMethPropdef#n_kwredef= for (self: Object, nullable TKwredef) */
9499 void VIRTUAL_parser_prod__AMethPropdef__n_kwredef_61d(val* self, val* p0) {
9500 parser_prod__AMethPropdef__n_kwredef_61d(self, p0); /* Direct call parser_prod#AMethPropdef#n_kwredef= on <self:Object(AMethPropdef)>*/
9501 RET_LABEL:;
9502 }
9503 /* method parser_prod#AMethPropdef#n_visibility= for (self: AMethPropdef, nullable AVisibility) */
9504 void parser_prod__AMethPropdef__n_visibility_61d(val* self, val* p0) {
9505 val* var_node /* var node: nullable AVisibility */;
9506 var_node = p0;
9507 self->attrs[COLOR_parser_nodes__APropdef___n_visibility].val = var_node; /* _n_visibility on <self:AMethPropdef> */
9508 if (var_node == NULL) {
9509 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9510 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1225);
9511 show_backtrace(1);
9512 } else {
9513 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AVisibility> */
9514 if (unlikely(var_node == NULL)) {
9515 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9516 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
9517 show_backtrace(1);
9518 }
9519 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AVisibility> */
9520 RET_LABEL1:(void)0;
9521 }
9522 }
9523 RET_LABEL:;
9524 }
9525 /* method parser_prod#AMethPropdef#n_visibility= for (self: Object, nullable AVisibility) */
9526 void VIRTUAL_parser_prod__AMethPropdef__n_visibility_61d(val* self, val* p0) {
9527 parser_prod__AMethPropdef__n_visibility_61d(self, p0); /* Direct call parser_prod#AMethPropdef#n_visibility= on <self:Object(AMethPropdef)>*/
9528 RET_LABEL:;
9529 }
9530 /* method parser_prod#AMethPropdef#n_kwmeth= for (self: AMethPropdef, nullable TKwmeth) */
9531 void parser_prod__AMethPropdef__n_kwmeth_61d(val* self, val* p0) {
9532 val* var_node /* var node: nullable TKwmeth */;
9533 val* var /* : null */;
9534 short int var1 /* : Bool */;
9535 short int var2 /* : Bool */;
9536 val* var_other /* var other: nullable Object */;
9537 short int var4 /* : Bool */;
9538 short int var5 /* : Bool */;
9539 short int var6 /* : Bool */;
9540 var_node = p0;
9541 self->attrs[COLOR_parser_nodes__AMethPropdef___n_kwmeth].val = var_node; /* _n_kwmeth on <self:AMethPropdef> */
9542 var = NULL;
9543 if (var_node == NULL) {
9544 var1 = 0; /* is null */
9545 } else {
9546 var1 = 1; /* arg is null and recv is not */
9547 }
9548 if (0) {
9549 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwmeth> */
9550 var_other = var;
9551 {
9552 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwmeth(TKwmeth)>*/;
9553 var4 = var5;
9554 }
9555 var6 = !var4;
9556 var2 = var6;
9557 goto RET_LABEL3;
9558 RET_LABEL3:(void)0;
9559 }
9560 var1 = var2;
9561 }
9562 if (var1){
9563 {
9564 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwmeth(TKwmeth)> */
9565 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwmeth(TKwmeth)> */
9566 RET_LABEL7:(void)0;
9567 }
9568 }
9569 } else {
9570 }
9571 RET_LABEL:;
9572 }
9573 /* method parser_prod#AMethPropdef#n_kwmeth= for (self: Object, nullable TKwmeth) */
9574 void VIRTUAL_parser_prod__AMethPropdef__n_kwmeth_61d(val* self, val* p0) {
9575 parser_prod__AMethPropdef__n_kwmeth_61d(self, p0); /* Direct call parser_prod#AMethPropdef#n_kwmeth= on <self:Object(AMethPropdef)>*/
9576 RET_LABEL:;
9577 }
9578 /* method parser_prod#AMethPropdef#n_kwinit= for (self: AMethPropdef, nullable TKwinit) */
9579 void parser_prod__AMethPropdef__n_kwinit_61d(val* self, val* p0) {
9580 val* var_node /* var node: nullable TKwinit */;
9581 val* var /* : null */;
9582 short int var1 /* : Bool */;
9583 short int var2 /* : Bool */;
9584 val* var_other /* var other: nullable Object */;
9585 short int var4 /* : Bool */;
9586 short int var5 /* : Bool */;
9587 short int var6 /* : Bool */;
9588 var_node = p0;
9589 self->attrs[COLOR_parser_nodes__AMethPropdef___n_kwinit].val = var_node; /* _n_kwinit on <self:AMethPropdef> */
9590 var = NULL;
9591 if (var_node == NULL) {
9592 var1 = 0; /* is null */
9593 } else {
9594 var1 = 1; /* arg is null and recv is not */
9595 }
9596 if (0) {
9597 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwinit> */
9598 var_other = var;
9599 {
9600 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwinit(TKwinit)>*/;
9601 var4 = var5;
9602 }
9603 var6 = !var4;
9604 var2 = var6;
9605 goto RET_LABEL3;
9606 RET_LABEL3:(void)0;
9607 }
9608 var1 = var2;
9609 }
9610 if (var1){
9611 {
9612 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwinit(TKwinit)> */
9613 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwinit(TKwinit)> */
9614 RET_LABEL7:(void)0;
9615 }
9616 }
9617 } else {
9618 }
9619 RET_LABEL:;
9620 }
9621 /* method parser_prod#AMethPropdef#n_kwinit= for (self: Object, nullable TKwinit) */
9622 void VIRTUAL_parser_prod__AMethPropdef__n_kwinit_61d(val* self, val* p0) {
9623 parser_prod__AMethPropdef__n_kwinit_61d(self, p0); /* Direct call parser_prod#AMethPropdef#n_kwinit= on <self:Object(AMethPropdef)>*/
9624 RET_LABEL:;
9625 }
9626 /* method parser_prod#AMethPropdef#n_kwnew= for (self: AMethPropdef, nullable TKwnew) */
9627 void parser_prod__AMethPropdef__n_kwnew_61d(val* self, val* p0) {
9628 val* var_node /* var node: nullable TKwnew */;
9629 val* var /* : null */;
9630 short int var1 /* : Bool */;
9631 short int var2 /* : Bool */;
9632 val* var_other /* var other: nullable Object */;
9633 short int var4 /* : Bool */;
9634 short int var5 /* : Bool */;
9635 short int var6 /* : Bool */;
9636 var_node = p0;
9637 self->attrs[COLOR_parser_nodes__AMethPropdef___n_kwnew].val = var_node; /* _n_kwnew on <self:AMethPropdef> */
9638 var = NULL;
9639 if (var_node == NULL) {
9640 var1 = 0; /* is null */
9641 } else {
9642 var1 = 1; /* arg is null and recv is not */
9643 }
9644 if (0) {
9645 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwnew> */
9646 var_other = var;
9647 {
9648 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwnew(TKwnew)>*/;
9649 var4 = var5;
9650 }
9651 var6 = !var4;
9652 var2 = var6;
9653 goto RET_LABEL3;
9654 RET_LABEL3:(void)0;
9655 }
9656 var1 = var2;
9657 }
9658 if (var1){
9659 {
9660 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwnew(TKwnew)> */
9661 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwnew(TKwnew)> */
9662 RET_LABEL7:(void)0;
9663 }
9664 }
9665 } else {
9666 }
9667 RET_LABEL:;
9668 }
9669 /* method parser_prod#AMethPropdef#n_kwnew= for (self: Object, nullable TKwnew) */
9670 void VIRTUAL_parser_prod__AMethPropdef__n_kwnew_61d(val* self, val* p0) {
9671 parser_prod__AMethPropdef__n_kwnew_61d(self, p0); /* Direct call parser_prod#AMethPropdef#n_kwnew= on <self:Object(AMethPropdef)>*/
9672 RET_LABEL:;
9673 }
9674 /* method parser_prod#AMethPropdef#n_methid= for (self: AMethPropdef, nullable AMethid) */
9675 void parser_prod__AMethPropdef__n_methid_61d(val* self, val* p0) {
9676 val* var_node /* var node: nullable AMethid */;
9677 val* var /* : null */;
9678 short int var1 /* : Bool */;
9679 short int var2 /* : Bool */;
9680 val* var_other /* var other: nullable Object */;
9681 short int var4 /* : Bool */;
9682 short int var5 /* : Bool */;
9683 short int var6 /* : Bool */;
9684 var_node = p0;
9685 self->attrs[COLOR_parser_nodes__AMethPropdef___n_methid].val = var_node; /* _n_methid on <self:AMethPropdef> */
9686 var = NULL;
9687 if (var_node == NULL) {
9688 var1 = 0; /* is null */
9689 } else {
9690 var1 = 1; /* arg is null and recv is not */
9691 }
9692 if (0) {
9693 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AMethid> */
9694 var_other = var;
9695 {
9696 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AMethid(AMethid)>*/;
9697 var4 = var5;
9698 }
9699 var6 = !var4;
9700 var2 = var6;
9701 goto RET_LABEL3;
9702 RET_LABEL3:(void)0;
9703 }
9704 var1 = var2;
9705 }
9706 if (var1){
9707 {
9708 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AMethid(AMethid)> */
9709 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AMethid(AMethid)> */
9710 RET_LABEL7:(void)0;
9711 }
9712 }
9713 } else {
9714 }
9715 RET_LABEL:;
9716 }
9717 /* method parser_prod#AMethPropdef#n_methid= for (self: Object, nullable AMethid) */
9718 void VIRTUAL_parser_prod__AMethPropdef__n_methid_61d(val* self, val* p0) {
9719 parser_prod__AMethPropdef__n_methid_61d(self, p0); /* Direct call parser_prod#AMethPropdef#n_methid= on <self:Object(AMethPropdef)>*/
9720 RET_LABEL:;
9721 }
9722 /* method parser_prod#AMethPropdef#n_signature= for (self: AMethPropdef, nullable ASignature) */
9723 void parser_prod__AMethPropdef__n_signature_61d(val* self, val* p0) {
9724 val* var_node /* var node: nullable ASignature */;
9725 var_node = p0;
9726 self->attrs[COLOR_parser_nodes__AMethPropdef___n_signature].val = var_node; /* _n_signature on <self:AMethPropdef> */
9727 if (var_node == NULL) {
9728 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9729 PRINT_ERROR(" (%s:%d)\n", "parser/parser_prod.nit", 1250);
9730 show_backtrace(1);
9731 } else {
9732 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ASignature> */
9733 if (unlikely(var_node == NULL)) {
9734 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9735 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 36);
9736 show_backtrace(1);
9737 }
9738 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ASignature> */
9739 RET_LABEL1:(void)0;
9740 }
9741 }
9742 RET_LABEL:;
9743 }
9744 /* method parser_prod#AMethPropdef#n_signature= for (self: Object, nullable ASignature) */
9745 void VIRTUAL_parser_prod__AMethPropdef__n_signature_61d(val* self, val* p0) {
9746 parser_prod__AMethPropdef__n_signature_61d(self, p0); /* Direct call parser_prod#AMethPropdef#n_signature= on <self:Object(AMethPropdef)>*/
9747 RET_LABEL:;
9748 }
9749 /* method parser_prod#AMethPropdef#n_annotations= for (self: AMethPropdef, nullable AAnnotations) */
9750 void parser_prod__AMethPropdef__n_annotations_61d(val* self, val* p0) {
9751 val* var_node /* var node: nullable AAnnotations */;
9752 val* var /* : null */;
9753 short int var1 /* : Bool */;
9754 short int var2 /* : Bool */;
9755 val* var_other /* var other: nullable Object */;
9756 short int var4 /* : Bool */;
9757 short int var5 /* : Bool */;
9758 short int var6 /* : Bool */;
9759 var_node = p0;
9760 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AMethPropdef> */
9761 var = NULL;
9762 if (var_node == NULL) {
9763 var1 = 0; /* is null */
9764 } else {
9765 var1 = 1; /* arg is null and recv is not */
9766 }
9767 if (0) {
9768 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
9769 var_other = var;
9770 {
9771 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
9772 var4 = var5;
9773 }
9774 var6 = !var4;
9775 var2 = var6;
9776 goto RET_LABEL3;
9777 RET_LABEL3:(void)0;
9778 }
9779 var1 = var2;
9780 }
9781 if (var1){
9782 {
9783 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
9784 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
9785 RET_LABEL7:(void)0;
9786 }
9787 }
9788 } else {
9789 }
9790 RET_LABEL:;
9791 }
9792 /* method parser_prod#AMethPropdef#n_annotations= for (self: Object, nullable AAnnotations) */
9793 void VIRTUAL_parser_prod__AMethPropdef__n_annotations_61d(val* self, val* p0) {
9794 parser_prod__AMethPropdef__n_annotations_61d(self, p0); /* Direct call parser_prod#AMethPropdef#n_annotations= on <self:Object(AMethPropdef)>*/
9795 RET_LABEL:;
9796 }
9797 /* method parser_prod#AMethPropdef#n_extern_calls= for (self: AMethPropdef, nullable AExternCalls) */
9798 void parser_prod__AMethPropdef__n_extern_calls_61d(val* self, val* p0) {
9799 val* var_node /* var node: nullable AExternCalls */;
9800 val* var /* : null */;
9801 short int var1 /* : Bool */;
9802 short int var2 /* : Bool */;
9803 val* var_other /* var other: nullable Object */;
9804 short int var4 /* : Bool */;
9805 short int var5 /* : Bool */;
9806 short int var6 /* : Bool */;
9807 var_node = p0;
9808 self->attrs[COLOR_parser_nodes__AMethPropdef___n_extern_calls].val = var_node; /* _n_extern_calls on <self:AMethPropdef> */
9809 var = NULL;
9810 if (var_node == NULL) {
9811 var1 = 0; /* is null */
9812 } else {
9813 var1 = 1; /* arg is null and recv is not */
9814 }
9815 if (0) {
9816 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExternCalls> */
9817 var_other = var;
9818 {
9819 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExternCalls(AExternCalls)>*/;
9820 var4 = var5;
9821 }
9822 var6 = !var4;
9823 var2 = var6;
9824 goto RET_LABEL3;
9825 RET_LABEL3:(void)0;
9826 }
9827 var1 = var2;
9828 }
9829 if (var1){
9830 {
9831 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExternCalls(AExternCalls)> */
9832 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExternCalls(AExternCalls)> */
9833 RET_LABEL7:(void)0;
9834 }
9835 }
9836 } else {
9837 }
9838 RET_LABEL:;
9839 }
9840 /* method parser_prod#AMethPropdef#n_extern_calls= for (self: Object, nullable AExternCalls) */
9841 void VIRTUAL_parser_prod__AMethPropdef__n_extern_calls_61d(val* self, val* p0) {
9842 parser_prod__AMethPropdef__n_extern_calls_61d(self, p0); /* Direct call parser_prod#AMethPropdef#n_extern_calls= on <self:Object(AMethPropdef)>*/
9843 RET_LABEL:;
9844 }
9845 /* method parser_prod#AMethPropdef#n_extern_code_block= for (self: AMethPropdef, nullable AExternCodeBlock) */
9846 void parser_prod__AMethPropdef__n_extern_code_block_61d(val* self, val* p0) {
9847 val* var_node /* var node: nullable AExternCodeBlock */;
9848 val* var /* : null */;
9849 short int var1 /* : Bool */;
9850 short int var2 /* : Bool */;
9851 val* var_other /* var other: nullable Object */;
9852 short int var4 /* : Bool */;
9853 short int var5 /* : Bool */;
9854 short int var6 /* : Bool */;
9855 var_node = p0;
9856 self->attrs[COLOR_parser_nodes__AMethPropdef___n_extern_code_block].val = var_node; /* _n_extern_code_block on <self:AMethPropdef> */
9857 var = NULL;
9858 if (var_node == NULL) {
9859 var1 = 0; /* is null */
9860 } else {
9861 var1 = 1; /* arg is null and recv is not */
9862 }
9863 if (0) {
9864 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExternCodeBlock> */
9865 var_other = var;
9866 {
9867 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExternCodeBlock(AExternCodeBlock)>*/;
9868 var4 = var5;
9869 }
9870 var6 = !var4;
9871 var2 = var6;
9872 goto RET_LABEL3;
9873 RET_LABEL3:(void)0;
9874 }
9875 var1 = var2;
9876 }
9877 if (var1){
9878 {
9879 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExternCodeBlock(AExternCodeBlock)> */
9880 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExternCodeBlock(AExternCodeBlock)> */
9881 RET_LABEL7:(void)0;
9882 }
9883 }
9884 } else {
9885 }
9886 RET_LABEL:;
9887 }
9888 /* method parser_prod#AMethPropdef#n_extern_code_block= for (self: Object, nullable AExternCodeBlock) */
9889 void VIRTUAL_parser_prod__AMethPropdef__n_extern_code_block_61d(val* self, val* p0) {
9890 parser_prod__AMethPropdef__n_extern_code_block_61d(self, p0); /* Direct call parser_prod#AMethPropdef#n_extern_code_block= on <self:Object(AMethPropdef)>*/
9891 RET_LABEL:;
9892 }
9893 /* method parser_prod#AMethPropdef#n_block= for (self: AMethPropdef, nullable AExpr) */
9894 void parser_prod__AMethPropdef__n_block_61d(val* self, val* p0) {
9895 val* var_node /* var node: nullable AExpr */;
9896 val* var /* : null */;
9897 short int var1 /* : Bool */;
9898 short int var2 /* : Bool */;
9899 val* var_other /* var other: nullable Object */;
9900 short int var4 /* : Bool */;
9901 short int var5 /* : Bool */;
9902 short int var6 /* : Bool */;
9903 var_node = p0;
9904 self->attrs[COLOR_parser_nodes__AMethPropdef___n_block].val = var_node; /* _n_block on <self:AMethPropdef> */
9905 var = NULL;
9906 if (var_node == NULL) {
9907 var1 = 0; /* is null */
9908 } else {
9909 var1 = 1; /* arg is null and recv is not */
9910 }
9911 if (0) {
9912 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExpr> */
9913 var_other = var;
9914 {
9915 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExpr(AExpr)>*/;
9916 var4 = var5;
9917 }
9918 var6 = !var4;
9919 var2 = var6;
9920 goto RET_LABEL3;
9921 RET_LABEL3:(void)0;
9922 }
9923 var1 = var2;
9924 }
9925 if (var1){
9926 {
9927 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExpr(AExpr)> */
9928 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExpr(AExpr)> */
9929 RET_LABEL7:(void)0;
9930 }
9931 }
9932 } else {
9933 }
9934 RET_LABEL:;
9935 }
9936 /* method parser_prod#AMethPropdef#n_block= for (self: Object, nullable AExpr) */
9937 void VIRTUAL_parser_prod__AMethPropdef__n_block_61d(val* self, val* p0) {
9938 parser_prod__AMethPropdef__n_block_61d(self, p0); /* Direct call parser_prod#AMethPropdef#n_block= on <self:Object(AMethPropdef)>*/
9939 RET_LABEL:;
9940 }