1 #include "auto_super_init.sep.0.h"
2 /* method auto_super_init#ToolContext#auto_super_init_phase for (self: ToolContext): Phase */
3 val
* auto_super_init__ToolContext__auto_super_init_phase(val
* self
) {
4 val
* var
/* : Phase */;
5 val
* var1
/* : Phase */;
6 var1
= self
->attrs
[COLOR_auto_super_init__ToolContext___64dauto_super_init_phase
].val
; /* @auto_super_init_phase on <self:ToolContext> */
8 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @auto_super_init_phase");
9 fprintf(stderr
, " (%s:%d)\n", "src/auto_super_init.nit", 26);
16 /* method auto_super_init#ToolContext#auto_super_init_phase for (self: Object): Phase */
17 val
* VIRTUAL_auto_super_init__ToolContext__auto_super_init_phase(val
* self
) {
18 val
* var
/* : Phase */;
19 val
* var1
/* : Phase */;
20 var1
= auto_super_init__ToolContext__auto_super_init_phase(self
);
25 /* method auto_super_init#ToolContext#auto_super_init_phase= for (self: ToolContext, Phase) */
26 void auto_super_init__ToolContext__auto_super_init_phase_61d(val
* self
, val
* p0
) {
27 self
->attrs
[COLOR_auto_super_init__ToolContext___64dauto_super_init_phase
].val
= p0
; /* @auto_super_init_phase on <self:ToolContext> */
30 /* method auto_super_init#ToolContext#auto_super_init_phase= for (self: Object, Phase) */
31 void VIRTUAL_auto_super_init__ToolContext__auto_super_init_phase_61d(val
* self
, val
* p0
) {
32 auto_super_init__ToolContext__auto_super_init_phase_61d(self
, p0
);
35 /* method auto_super_init#AutoSuperInitPhase#process_npropdef for (self: AutoSuperInitPhase, APropdef) */
36 void auto_super_init__AutoSuperInitPhase__process_npropdef(val
* self
, val
* p0
) {
37 val
* var_npropdef
/* var npropdef: APropdef */;
38 short int var
/* : Bool */;
41 val
* var1
/* : ToolContext */;
42 val
* var2
/* : ModelBuilder */;
44 /* <var_npropdef:APropdef> isa AConcreteMethPropdef */
45 cltype
= type_parser_nodes__AConcreteMethPropdef
.color
;
46 idtype
= type_parser_nodes__AConcreteMethPropdef
.id
;
47 if(cltype
>= var_npropdef
->type
->table_size
) {
50 var
= var_npropdef
->type
->type_table
[cltype
] == idtype
;
53 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_phase__Phase__toolcontext
]))(self
) /* toolcontext on <self:AutoSuperInitPhase>*/;
54 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_modelbuilder__ToolContext__modelbuilder
]))(var1
) /* modelbuilder on <var1:ToolContext>*/;
55 ((void (*)(val
*, val
*))(var_npropdef
->class->vft
[COLOR_auto_super_init__AConcreteMethPropdef__do_auto_super_init
]))(var_npropdef
, var2
) /* do_auto_super_init on <var_npropdef:APropdef(AConcreteMethPropdef)>*/;
60 /* method auto_super_init#AutoSuperInitPhase#process_npropdef for (self: Object, APropdef) */
61 void VIRTUAL_auto_super_init__AutoSuperInitPhase__process_npropdef(val
* self
, val
* p0
) {
62 auto_super_init__AutoSuperInitPhase__process_npropdef(self
, p0
);
65 /* method auto_super_init#AutoSuperInitVisitor#init for (self: AutoSuperInitVisitor) */
66 void auto_super_init__AutoSuperInitVisitor__init(val
* self
) {
67 ((void (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__Visitor__init
]))(self
) /* init on <self:AutoSuperInitVisitor>*/;
70 /* method auto_super_init#AutoSuperInitVisitor#init for (self: Object) */
71 void VIRTUAL_auto_super_init__AutoSuperInitVisitor__init(val
* self
) {
72 auto_super_init__AutoSuperInitVisitor__init(self
);
75 /* method auto_super_init#AutoSuperInitVisitor#visit for (self: AutoSuperInitVisitor, ANode) */
76 void auto_super_init__AutoSuperInitVisitor__visit(val
* self
, val
* p0
) {
77 val
* var_n
/* var n: ANode */;
79 ((void (*)(val
*, val
*))(var_n
->class->vft
[COLOR_auto_super_init__ANode__accept_auto_super_init
]))(var_n
, self
) /* accept_auto_super_init on <var_n:ANode>*/;
80 ((void (*)(val
*, val
*))(var_n
->class->vft
[COLOR_parser_nodes__ANode__visit_all
]))(var_n
, self
) /* visit_all on <var_n:ANode>*/;
83 /* method auto_super_init#AutoSuperInitVisitor#visit for (self: Object, ANode) */
84 void VIRTUAL_auto_super_init__AutoSuperInitVisitor__visit(val
* self
, val
* p0
) {
85 auto_super_init__AutoSuperInitVisitor__visit(self
, p0
);
88 /* method auto_super_init#AutoSuperInitVisitor#has_explicit_super_init for (self: AutoSuperInitVisitor): Bool */
89 short int auto_super_init__AutoSuperInitVisitor__has_explicit_super_init(val
* self
) {
90 short int var
/* : Bool */;
91 short int var1
/* : Bool */;
92 var1
= self
->attrs
[COLOR_auto_super_init__AutoSuperInitVisitor___64dhas_explicit_super_init
].s
; /* @has_explicit_super_init on <self:AutoSuperInitVisitor> */
97 /* method auto_super_init#AutoSuperInitVisitor#has_explicit_super_init for (self: Object): Bool */
98 short int VIRTUAL_auto_super_init__AutoSuperInitVisitor__has_explicit_super_init(val
* self
) {
99 short int var
/* : Bool */;
100 short int var1
/* : Bool */;
101 var1
= auto_super_init__AutoSuperInitVisitor__has_explicit_super_init(self
);
106 /* method auto_super_init#AutoSuperInitVisitor#has_explicit_super_init= for (self: AutoSuperInitVisitor, Bool) */
107 void auto_super_init__AutoSuperInitVisitor__has_explicit_super_init_61d(val
* self
, short int p0
) {
108 self
->attrs
[COLOR_auto_super_init__AutoSuperInitVisitor___64dhas_explicit_super_init
].s
= p0
; /* @has_explicit_super_init on <self:AutoSuperInitVisitor> */
111 /* method auto_super_init#AutoSuperInitVisitor#has_explicit_super_init= for (self: Object, Bool) */
112 void VIRTUAL_auto_super_init__AutoSuperInitVisitor__has_explicit_super_init_61d(val
* self
, short int p0
) {
113 auto_super_init__AutoSuperInitVisitor__has_explicit_super_init_61d(self
, p0
);
116 /* method auto_super_init#AConcreteMethPropdef#auto_super_inits for (self: AConcreteMethPropdef): nullable Array[MMethod] */
117 val
* auto_super_init__AConcreteMethPropdef__auto_super_inits(val
* self
) {
118 val
* var
/* : nullable Array[MMethod] */;
119 val
* var1
/* : nullable Array[MMethod] */;
120 var1
= self
->attrs
[COLOR_auto_super_init__AConcreteMethPropdef___64dauto_super_inits
].val
; /* @auto_super_inits on <self:AConcreteMethPropdef> */
125 /* method auto_super_init#AConcreteMethPropdef#auto_super_inits for (self: Object): nullable Array[MMethod] */
126 val
* VIRTUAL_auto_super_init__AConcreteMethPropdef__auto_super_inits(val
* self
) {
127 val
* var
/* : nullable Array[MMethod] */;
128 val
* var1
/* : nullable Array[MMethod] */;
129 var1
= auto_super_init__AConcreteMethPropdef__auto_super_inits(self
);
134 /* method auto_super_init#AConcreteMethPropdef#auto_super_inits= for (self: AConcreteMethPropdef, nullable Array[MMethod]) */
135 void auto_super_init__AConcreteMethPropdef__auto_super_inits_61d(val
* self
, val
* p0
) {
136 self
->attrs
[COLOR_auto_super_init__AConcreteMethPropdef___64dauto_super_inits
].val
= p0
; /* @auto_super_inits on <self:AConcreteMethPropdef> */
139 /* method auto_super_init#AConcreteMethPropdef#auto_super_inits= for (self: Object, nullable Array[MMethod]) */
140 void VIRTUAL_auto_super_init__AConcreteMethPropdef__auto_super_inits_61d(val
* self
, val
* p0
) {
141 auto_super_init__AConcreteMethPropdef__auto_super_inits_61d(self
, p0
);
144 /* method auto_super_init#AConcreteMethPropdef#do_auto_super_init for (self: AConcreteMethPropdef, ModelBuilder) */
145 void auto_super_init__AConcreteMethPropdef__do_auto_super_init(val
* self
, val
* p0
) {
146 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
147 val
* var
/* : nullable ANode */;
148 short int var1
/* : Bool */;
151 const char* var_class_name
;
152 val
* var2
/* : nullable MClassDef */;
153 val
* var_mclassdef
/* var mclassdef: MClassDef */;
154 val
* var3
/* : nullable MPropDef */;
155 val
* var_mpropdef
/* var mpropdef: MMethodDef */;
156 val
* var4
/* : MClassDef */;
157 val
* var5
/* : MModule */;
158 val
* var_mmodule
/* var mmodule: MModule */;
159 val
* var6
/* : MProperty */;
160 short int var7
/* : Bool */;
161 short int var8
/* : Bool */;
162 val
* var9
/* : MClassDef */;
163 short int var10
/* : Bool */;
164 short int var11
/* : Bool */;
165 short int var12
/* : Bool */;
166 short int var_skip
/* var skip: Bool */;
167 val
* var13
/* : nullable POSetElement[MClassDef] */;
168 val
* var14
/* : Collection[Object] */;
169 val
* var15
/* : Iterator[nullable Object] */;
170 short int var16
/* : Bool */;
171 val
* var17
/* : nullable Object */;
172 val
* var_cd
/* var cd: MClassDef */;
173 val
* var18
/* : MClass */;
174 val
* var19
/* : MClassKind */;
175 short int var20
/* : Bool */;
176 short int var21
/* : Bool */;
177 val
* var22
/* : nullable AExpr */;
178 val
* var_nblock
/* var nblock: nullable AExpr */;
179 val
* var23
/* : null */;
180 short int var24
/* : Bool */;
181 val
* var25
/* : AutoSuperInitVisitor */;
182 val
* var_v
/* var v: AutoSuperInitVisitor */;
183 short int var26
/* : Bool */;
184 val
* var27
/* : Array[MMethod] */;
185 val
* var_auto_super_inits
/* var auto_super_inits: Array[MMethod] */;
186 val
* var28
/* : Array[MClassType] */;
187 val
* var29
/* : Iterator[nullable Object] */;
188 short int var30
/* : Bool */;
189 val
* var31
/* : nullable Object */;
190 val
* var_msupertype
/* var msupertype: MClassType */;
191 val
* var32
/* : MClass */;
192 val
* var33
/* : MClassKind */;
193 short int var34
/* : Bool */;
194 short int var35
/* : Bool */;
195 val
* var37
/* : MClassType */;
196 val
* var38
/* : MType */;
197 val
* var39
/* : MProperty */;
198 val
* var40
/* : String */;
199 val
* var41
/* : nullable MProperty */;
200 val
* var_candidate
/* var candidate: nullable MProperty */;
201 val
* var42
/* : null */;
202 short int var43
/* : Bool */;
204 val
* var44
/* : String */;
205 char* var45
/* : NativeString */;
206 long var46
/* : Int */;
207 val
* var47
/* : String */;
208 val
* var48
/* : nullable MProperty */;
209 val
* var49
/* : null */;
210 short int var50
/* : Bool */;
211 static val
* varonce51
;
212 val
* var52
/* : String */;
213 char* var53
/* : NativeString */;
214 long var54
/* : Int */;
215 val
* var55
/* : String */;
216 static val
* varonce56
;
217 val
* var57
/* : String */;
218 char* var58
/* : NativeString */;
219 long var59
/* : Int */;
220 val
* var60
/* : String */;
221 val
* var61
/* : MProperty */;
222 val
* var62
/* : String */;
223 static val
* varonce63
;
224 val
* var64
/* : String */;
225 char* var65
/* : NativeString */;
226 long var66
/* : Int */;
227 val
* var67
/* : String */;
228 static val
* varonce68
;
229 val
* var69
/* : String */;
230 char* var70
/* : NativeString */;
231 long var71
/* : Int */;
232 val
* var72
/* : String */;
233 val
* var73
/* : Array[Object] */;
234 long var74
/* : Int */;
235 val
* var75
/* : NativeArray[Object] */;
236 val
* var76
/* : String */;
237 short int var77
/* : Bool */;
240 short int var80
/* : Bool */;
241 static val
* varonce81
;
242 val
* var82
/* : String */;
243 char* var83
/* : NativeString */;
244 long var84
/* : Int */;
245 val
* var85
/* : String */;
246 val
* var86
/* : Iterator[nullable Object] */;
247 short int var87
/* : Bool */;
248 val
* var88
/* : nullable Object */;
249 val
* var_auto_super_init
/* var auto_super_init: MMethod */;
250 val
* var89
/* : MPropDef */;
251 val
* var_auto_super_init_def
/* var auto_super_init_def: MMethodDef */;
252 val
* var90
/* : nullable MSignature */;
253 val
* var_msig
/* var msig: MSignature */;
254 val
* var91
/* : nullable MSignature */;
255 val
* var_supermsig
/* var supermsig: MSignature */;
256 short int var92
/* : Bool */;
257 val
* var93
/* : nullable MSignature */;
258 long var94
/* : Int */;
259 long var95
/* : Int */;
260 short int var96
/* : Bool */;
261 short int var98
/* : Bool */;
262 short int var99
/* : Bool */;
263 short int var_
/* var : Bool */;
264 val
* var100
/* : nullable MSignature */;
265 long var101
/* : Int */;
266 val
* var102
/* : nullable MSignature */;
267 long var103
/* : Int */;
268 short int var104
/* : Bool */;
269 short int var106
/* : Bool */;
270 short int var107
/* : Bool */;
271 static val
* varonce108
;
272 val
* var109
/* : String */;
273 char* var110
/* : NativeString */;
274 long var111
/* : Int */;
275 val
* var112
/* : String */;
276 static val
* varonce113
;
277 val
* var114
/* : String */;
278 char* var115
/* : NativeString */;
279 long var116
/* : Int */;
280 val
* var117
/* : String */;
281 val
* var118
/* : Array[Object] */;
282 long var119
/* : Int */;
283 val
* var120
/* : NativeArray[Object] */;
284 val
* var121
/* : String */;
285 var_modelbuilder
= p0
;
286 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__ANode__parent
]))(self
) /* parent on <self:AConcreteMethPropdef>*/;
287 /* <var:nullable ANode> isa AClassdef */
288 cltype
= type_parser_nodes__AClassdef
.color
;
289 idtype
= type_parser_nodes__AClassdef
.id
;
293 if(cltype
>= var
->type
->table_size
) {
296 var1
= var
->type
->type_table
[cltype
] == idtype
;
300 var_class_name
= var
== NULL ?
"null" : var
->type
->name
;
301 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "AClassdef", var_class_name
);
302 fprintf(stderr
, " (%s:%d)\n", "src/auto_super_init.nit", 56);
305 var2
= ((val
* (*)(val
*))(var
->class->vft
[COLOR_modelize_class__AClassdef__mclassdef
]))(var
) /* mclassdef on <var:nullable ANode(AClassdef)>*/;
307 fprintf(stderr
, "Runtime error: %s", "Cast failed");
308 fprintf(stderr
, " (%s:%d)\n", "src/auto_super_init.nit", 56);
311 var_mclassdef
= var2
;
312 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_modelize_property__APropdef__mpropdef
]))(self
) /* mpropdef on <self:AConcreteMethPropdef>*/;
314 fprintf(stderr
, "Runtime error: %s", "Cast failed");
315 fprintf(stderr
, " (%s:%d)\n", "src/auto_super_init.nit", 57);
319 var4
= ((val
* (*)(val
*))(var_mpropdef
->class->vft
[COLOR_model__MPropDef__mclassdef
]))(var_mpropdef
) /* mclassdef on <var_mpropdef:MMethodDef>*/;
320 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_model__MClassDef__mmodule
]))(var4
) /* mmodule on <var4:MClassDef>*/;
322 var6
= ((val
* (*)(val
*))(var_mpropdef
->class->vft
[COLOR_model__MPropDef__mproperty
]))(var_mpropdef
) /* mproperty on <var_mpropdef:MMethodDef>*/;
323 var7
= ((short int (*)(val
*))(var6
->class->vft
[COLOR_model__MMethod__is_init
]))(var6
) /* is_init on <var6:MProperty(MMethod)>*/;
329 var9
= ((val
* (*)(val
*))(var_mpropdef
->class->vft
[COLOR_model__MPropDef__mclassdef
]))(var_mpropdef
) /* mclassdef on <var_mpropdef:MMethodDef>*/;
330 var10
= ((short int (*)(val
*))(var9
->class->vft
[COLOR_model__MClassDef__is_intro
]))(var9
) /* is_intro on <var9:MClassDef>*/;
338 var13
= ((val
* (*)(val
*))(var_mclassdef
->class->vft
[COLOR_model__MClassDef__in_hierarchy
]))(var_mclassdef
) /* in_hierarchy on <var_mclassdef:MClassDef>*/;
340 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
341 fprintf(stderr
, " (%s:%d)\n", "src/auto_super_init.nit", 68);
344 var14
= ((val
* (*)(val
*))(var13
->class->vft
[COLOR_poset__POSetElement__direct_greaters
]))(var13
) /* direct_greaters on <var13:nullable POSetElement[MClassDef]>*/;
346 var15
= ((val
* (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var14
) /* iterator on <var14:Collection[Object](Collection[MClassDef])>*/;
348 var16
= ((short int (*)(val
*))(var15
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var15
) /* is_ok on <var15:Iterator[nullable Object]>*/;
350 var17
= ((val
* (*)(val
*))(var15
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var15
) /* item on <var15:Iterator[nullable Object]>*/;
352 var18
= ((val
* (*)(val
*))(var_cd
->class->vft
[COLOR_model__MClassDef__mclass
]))(var_cd
) /* mclass on <var_cd:MClassDef>*/;
353 var19
= ((val
* (*)(val
*))(var18
->class->vft
[COLOR_model__MClass__kind
]))(var18
) /* kind on <var18:MClass>*/;
354 var20
= ((short int (*)(val
*))(var19
->class->vft
[COLOR_model__MClassKind__need_init
]))(var19
) /* need_init on <var19:MClassKind>*/;
360 CONTINUE_label
: (void)0;
361 ((void (*)(val
*))(var15
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var15
) /* next on <var15:Iterator[nullable Object]>*/;
363 BREAK_label
: (void)0;
368 var22
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AConcreteMethPropdef__n_block
]))(self
) /* n_block on <self:AConcreteMethPropdef>*/;
371 if (var_nblock
== NULL
) {
372 var24
= 0; /* is null */
374 var24
= 1; /* arg is null and recv is not */
377 var25
= NEW_auto_super_init__AutoSuperInitVisitor(&type_auto_super_init__AutoSuperInitVisitor
);
378 ((void (*)(val
*))(var25
->class->vft
[COLOR_auto_super_init__AutoSuperInitVisitor__init
]))(var25
) /* init on <var25:AutoSuperInitVisitor>*/;
380 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_parser_nodes__Visitor__enter_visit
]))(var_v
, var_nblock
) /* enter_visit on <var_v:AutoSuperInitVisitor>*/;
381 var26
= ((short int (*)(val
*))(var_v
->class->vft
[COLOR_auto_super_init__AutoSuperInitVisitor__has_explicit_super_init
]))(var_v
) /* has_explicit_super_init on <var_v:AutoSuperInitVisitor>*/;
388 var27
= NEW_array__Array(&type_array__Arraymodel__MMethod
);
389 ((void (*)(val
*))(var27
->class->vft
[COLOR_array__Array__init
]))(var27
) /* init on <var27:Array[MMethod]>*/;
390 var_auto_super_inits
= var27
;
391 var28
= ((val
* (*)(val
*))(var_mclassdef
->class->vft
[COLOR_model__MClassDef__supertypes
]))(var_mclassdef
) /* supertypes on <var_mclassdef:MClassDef>*/;
392 var29
= ((val
* (*)(val
*))(var28
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var28
) /* iterator on <var28:Array[MClassType]>*/;
394 var30
= ((short int (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var29
) /* is_ok on <var29:Iterator[nullable Object]>*/;
396 var31
= ((val
* (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var29
) /* item on <var29:Iterator[nullable Object]>*/;
397 var_msupertype
= var31
;
398 var32
= ((val
* (*)(val
*))(var_msupertype
->class->vft
[COLOR_model__MClassType__mclass
]))(var_msupertype
) /* mclass on <var_msupertype:MClassType>*/;
399 var33
= ((val
* (*)(val
*))(var32
->class->vft
[COLOR_model__MClass__kind
]))(var32
) /* kind on <var32:MClass>*/;
400 var34
= ((short int (*)(val
*))(var33
->class->vft
[COLOR_model__MClassKind__need_init
]))(var33
) /* need_init on <var33:MClassKind>*/;
403 goto CONTINUE_label36
;
406 var37
= ((val
* (*)(val
*))(var_mclassdef
->class->vft
[COLOR_model__MClassDef__bound_mtype
]))(var_mclassdef
) /* bound_mtype on <var_mclassdef:MClassDef>*/;
407 var38
= ((val
* (*)(val
*, val
*, val
*))(var_msupertype
->class->vft
[COLOR_model__MType__anchor_to
]))(var_msupertype
, var_mmodule
, var37
) /* anchor_to on <var_msupertype:MClassType>*/;
408 var_msupertype
= var38
;
409 var39
= ((val
* (*)(val
*))(var_mpropdef
->class->vft
[COLOR_model__MPropDef__mproperty
]))(var_mpropdef
) /* mproperty on <var_mpropdef:MMethodDef>*/;
410 var40
= ((val
* (*)(val
*))(var39
->class->vft
[COLOR_model__MProperty__name
]))(var39
) /* name on <var39:MProperty(MMethod)>*/;
411 var41
= ((val
* (*)(val
*, val
*, val
*, val
*, val
*))(var_modelbuilder
->class->vft
[COLOR_modelbuilder__ModelBuilder__try_get_mproperty_by_name2
]))(var_modelbuilder
, self
, var_mmodule
, var_msupertype
, var40
) /* try_get_mproperty_by_name2 on <var_modelbuilder:ModelBuilder>*/;
412 var_candidate
= var41
;
414 if (var_candidate
== NULL
) {
415 var43
= 1; /* is null */
417 var43
= 0; /* arg is null but recv is not */
425 var47
= string__NativeString__to_s_with_length(var45
, var46
);
429 var48
= ((val
* (*)(val
*, val
*, val
*, val
*, val
*))(var_modelbuilder
->class->vft
[COLOR_modelbuilder__ModelBuilder__try_get_mproperty_by_name2
]))(var_modelbuilder
, self
, var_mmodule
, var_msupertype
, var44
) /* try_get_mproperty_by_name2 on <var_modelbuilder:ModelBuilder>*/;
430 var_candidate
= var48
;
434 if (var_candidate
== NULL
) {
435 var50
= 1; /* is null */
437 var50
= 0; /* arg is null but recv is not */
443 var53
= "Cannot do an implicit constructor call for ";
445 var55
= string__NativeString__to_s_with_length(var53
, var54
);
452 var58
= ": there is no costructor named ";
454 var60
= string__NativeString__to_s_with_length(var58
, var59
);
458 var61
= ((val
* (*)(val
*))(var_mpropdef
->class->vft
[COLOR_model__MPropDef__mproperty
]))(var_mpropdef
) /* mproperty on <var_mpropdef:MMethodDef>*/;
459 var62
= ((val
* (*)(val
*))(var61
->class->vft
[COLOR_model__MProperty__name
]))(var61
) /* name on <var61:MProperty(MMethod)>*/;
465 var67
= string__NativeString__to_s_with_length(var65
, var66
);
474 var72
= string__NativeString__to_s_with_length(var70
, var71
);
478 var73
= NEW_array__Array(&type_array__Arraykernel__Object
);
479 { /* var73 = array_instance Array[Object] */
481 var75
= NEW_array__NativeArray(var74
, &type_array__NativeArraykernel__Object
);
482 ((struct instance_array__NativeArray
*)var75
)->values
[0] = (val
*) var52
;
483 ((struct instance_array__NativeArray
*)var75
)->values
[1] = (val
*) var_mpropdef
;
484 ((struct instance_array__NativeArray
*)var75
)->values
[2] = (val
*) var57
;
485 ((struct instance_array__NativeArray
*)var75
)->values
[3] = (val
*) var62
;
486 ((struct instance_array__NativeArray
*)var75
)->values
[4] = (val
*) var64
;
487 ((struct instance_array__NativeArray
*)var75
)->values
[5] = (val
*) var_msupertype
;
488 ((struct instance_array__NativeArray
*)var75
)->values
[6] = (val
*) var69
;
489 ((void (*)(val
*, val
*, long))(var73
->class->vft
[COLOR_array__Array__with_native
]))(var73
, var75
, var74
) /* with_native on <var73:Array[Object]>*/;
491 var76
= ((val
* (*)(val
*))(var73
->class->vft
[COLOR_string__Object__to_s
]))(var73
) /* to_s on <var73:Array[Object]>*/;
492 ((void (*)(val
*, val
*, val
*))(var_modelbuilder
->class->vft
[COLOR_modelbuilder__ModelBuilder__error
]))(var_modelbuilder
, self
, var76
) /* error on <var_modelbuilder:ModelBuilder>*/;
496 /* <var_candidate:nullable MProperty(MProperty)> isa MMethod */
497 cltype78
= type_model__MMethod
.color
;
498 idtype79
= type_model__MMethod
.id
;
499 if(cltype78
>= var_candidate
->type
->table_size
) {
502 var77
= var_candidate
->type
->type_table
[cltype78
] == idtype79
;
505 fprintf(stderr
, "Runtime error: %s", "Assert failed");
506 fprintf(stderr
, " (%s:%d)\n", "src/auto_super_init.nit", 98);
509 ((void (*)(val
*, val
*))(var_auto_super_inits
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var_auto_super_inits
, var_candidate
) /* add on <var_auto_super_inits:Array[MMethod]>*/;
510 CONTINUE_label36
: (void)0;
511 ((void (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var29
) /* next on <var29:Iterator[nullable Object]>*/;
513 BREAK_label36
: (void)0;
514 var80
= ((short int (*)(val
*))(var_auto_super_inits
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(var_auto_super_inits
) /* is_empty on <var_auto_super_inits:Array[MMethod]>*/;
519 var83
= "No constructors to call implicitely. Call one explicitely.";
521 var85
= string__NativeString__to_s_with_length(var83
, var84
);
525 ((void (*)(val
*, val
*, val
*))(var_modelbuilder
->class->vft
[COLOR_modelbuilder__ModelBuilder__error
]))(var_modelbuilder
, self
, var82
) /* error on <var_modelbuilder:ModelBuilder>*/;
529 var86
= ((val
* (*)(val
*))(var_auto_super_inits
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_auto_super_inits
) /* iterator on <var_auto_super_inits:Array[MMethod]>*/;
531 var87
= ((short int (*)(val
*))(var86
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var86
) /* is_ok on <var86:Iterator[nullable Object]>*/;
533 var88
= ((val
* (*)(val
*))(var86
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var86
) /* item on <var86:Iterator[nullable Object]>*/;
534 var_auto_super_init
= var88
;
535 var89
= ((val
* (*)(val
*))(var_auto_super_init
->class->vft
[COLOR_model__MProperty__intro
]))(var_auto_super_init
) /* intro on <var_auto_super_init:MMethod>*/;
536 var_auto_super_init_def
= var89
;
537 var90
= ((val
* (*)(val
*))(var_mpropdef
->class->vft
[COLOR_model__MMethodDef__msignature
]))(var_mpropdef
) /* msignature on <var_mpropdef:MMethodDef>*/;
539 fprintf(stderr
, "Runtime error: %s", "Cast failed");
540 fprintf(stderr
, " (%s:%d)\n", "src/auto_super_init.nit", 107);
544 var91
= ((val
* (*)(val
*))(var_auto_super_init_def
->class->vft
[COLOR_model__MMethodDef__msignature
]))(var_auto_super_init_def
) /* msignature on <var_auto_super_init_def:MMethodDef>*/;
546 fprintf(stderr
, "Runtime error: %s", "Cast failed");
547 fprintf(stderr
, " (%s:%d)\n", "src/auto_super_init.nit", 108);
550 var_supermsig
= var91
;
551 var93
= ((val
* (*)(val
*))(var_auto_super_init_def
->class->vft
[COLOR_model__MMethodDef__msignature
]))(var_auto_super_init_def
) /* msignature on <var_auto_super_init_def:MMethodDef>*/;
553 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
554 fprintf(stderr
, " (%s:%d)\n", "src/auto_super_init.nit", 109);
557 var94
= ((long (*)(val
*))(var93
->class->vft
[COLOR_model__MSignature__arity
]))(var93
) /* arity on <var93:nullable MSignature>*/;
560 { /* Inline kernel#Int#!= (var94,var95) */
561 var98
= var94
== var95
;
569 var100
= ((val
* (*)(val
*))(var_auto_super_init_def
->class->vft
[COLOR_model__MMethodDef__msignature
]))(var_auto_super_init_def
) /* msignature on <var_auto_super_init_def:MMethodDef>*/;
570 if (var100
== NULL
) {
571 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
572 fprintf(stderr
, " (%s:%d)\n", "src/auto_super_init.nit", 109);
575 var101
= ((long (*)(val
*))(var100
->class->vft
[COLOR_model__MSignature__arity
]))(var100
) /* arity on <var100:nullable MSignature>*/;
577 var102
= ((val
* (*)(val
*))(var_mpropdef
->class->vft
[COLOR_model__MMethodDef__msignature
]))(var_mpropdef
) /* msignature on <var_mpropdef:MMethodDef>*/;
578 if (var102
== NULL
) {
579 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
580 fprintf(stderr
, " (%s:%d)\n", "src/auto_super_init.nit", 109);
583 var103
= ((long (*)(val
*))(var102
->class->vft
[COLOR_model__MSignature__arity
]))(var102
) /* arity on <var102:nullable MSignature>*/;
585 { /* Inline kernel#Int#!= (var101,var103) */
586 var106
= var101
== var103
;
590 RET_LABEL105
:(void)0;
600 var110
= "Problem with signature of constructor ";
602 var112
= string__NativeString__to_s_with_length(var110
, var111
);
609 var115
= ". Expected ";
611 var117
= string__NativeString__to_s_with_length(var115
, var116
);
615 var118
= NEW_array__Array(&type_array__Arraykernel__Object
);
616 { /* var118 = array_instance Array[Object] */
618 var120
= NEW_array__NativeArray(var119
, &type_array__NativeArraykernel__Object
);
619 ((struct instance_array__NativeArray
*)var120
)->values
[0] = (val
*) var109
;
620 ((struct instance_array__NativeArray
*)var120
)->values
[1] = (val
*) var_auto_super_init_def
;
621 ((struct instance_array__NativeArray
*)var120
)->values
[2] = (val
*) var_supermsig
;
622 ((struct instance_array__NativeArray
*)var120
)->values
[3] = (val
*) var114
;
623 ((struct instance_array__NativeArray
*)var120
)->values
[4] = (val
*) var_msig
;
624 ((void (*)(val
*, val
*, long))(var118
->class->vft
[COLOR_array__Array__with_native
]))(var118
, var120
, var119
) /* with_native on <var118:Array[Object]>*/;
626 var121
= ((val
* (*)(val
*))(var118
->class->vft
[COLOR_string__Object__to_s
]))(var118
) /* to_s on <var118:Array[Object]>*/;
627 ((void (*)(val
*, val
*, val
*))(var_modelbuilder
->class->vft
[COLOR_modelbuilder__ModelBuilder__error
]))(var_modelbuilder
, self
, var121
) /* error on <var_modelbuilder:ModelBuilder>*/;
630 CONTINUE_label122
: (void)0;
631 ((void (*)(val
*))(var86
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var86
) /* next on <var86:Iterator[nullable Object]>*/;
633 BREAK_label122
: (void)0;
634 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_auto_super_init__AConcreteMethPropdef__auto_super_inits_61d
]))(self
, var_auto_super_inits
) /* auto_super_inits= on <self:AConcreteMethPropdef>*/;
637 /* method auto_super_init#AConcreteMethPropdef#do_auto_super_init for (self: Object, ModelBuilder) */
638 void VIRTUAL_auto_super_init__AConcreteMethPropdef__do_auto_super_init(val
* self
, val
* p0
) {
639 auto_super_init__AConcreteMethPropdef__do_auto_super_init(self
, p0
);
642 /* method auto_super_init#ANode#accept_auto_super_init for (self: ANode, AutoSuperInitVisitor) */
643 void auto_super_init__ANode__accept_auto_super_init(val
* self
, val
* p0
) {
644 val
* var_v
/* var v: AutoSuperInitVisitor */;
648 /* method auto_super_init#ANode#accept_auto_super_init for (self: Object, AutoSuperInitVisitor) */
649 void VIRTUAL_auto_super_init__ANode__accept_auto_super_init(val
* self
, val
* p0
) {
650 auto_super_init__ANode__accept_auto_super_init(self
, p0
);
653 /* method auto_super_init#ASendExpr#accept_auto_super_init for (self: ASendExpr, AutoSuperInitVisitor) */
654 void auto_super_init__ASendExpr__accept_auto_super_init(val
* self
, val
* p0
) {
655 val
* var_v
/* var v: AutoSuperInitVisitor */;
656 val
* var
/* : nullable MMethod */;
657 val
* var_mproperty
/* var mproperty: nullable MMethod */;
658 val
* var1
/* : null */;
659 short int var2
/* : Bool */;
660 short int var3
/* : Bool */;
661 short int var4
/* : Bool */;
663 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__ASendExpr__mproperty
]))(self
) /* mproperty on <self:ASendExpr>*/;
666 if (var_mproperty
== NULL
) {
667 var2
= 1; /* is null */
669 var2
= 0; /* arg is null but recv is not */
675 var3
= ((short int (*)(val
*))(var_mproperty
->class->vft
[COLOR_model__MMethod__is_init
]))(var_mproperty
) /* is_init on <var_mproperty:nullable MMethod(MMethod)>*/;
678 ((void (*)(val
*, short int))(var_v
->class->vft
[COLOR_auto_super_init__AutoSuperInitVisitor__has_explicit_super_init_61d
]))(var_v
, var4
) /* has_explicit_super_init= on <var_v:AutoSuperInitVisitor>*/;
683 /* method auto_super_init#ASendExpr#accept_auto_super_init for (self: Object, AutoSuperInitVisitor) */
684 void VIRTUAL_auto_super_init__ASendExpr__accept_auto_super_init(val
* self
, val
* p0
) {
685 auto_super_init__ASendExpr__accept_auto_super_init(self
, p0
);
688 /* method auto_super_init#ASuperExpr#accept_auto_super_init for (self: ASuperExpr, AutoSuperInitVisitor) */
689 void auto_super_init__ASuperExpr__accept_auto_super_init(val
* self
, val
* p0
) {
690 val
* var_v
/* var v: AutoSuperInitVisitor */;
691 short int var
/* : Bool */;
694 ((void (*)(val
*, short int))(var_v
->class->vft
[COLOR_auto_super_init__AutoSuperInitVisitor__has_explicit_super_init_61d
]))(var_v
, var
) /* has_explicit_super_init= on <var_v:AutoSuperInitVisitor>*/;
697 /* method auto_super_init#ASuperExpr#accept_auto_super_init for (self: Object, AutoSuperInitVisitor) */
698 void VIRTUAL_auto_super_init__ASuperExpr__accept_auto_super_init(val
* self
, val
* p0
) {
699 auto_super_init__ASuperExpr__accept_auto_super_init(self
, p0
);