1 #include "simple_misc_analysis.sep.0.h"
2 /* method simple_misc_analysis#ToolContext#simple_misc_analysis_phase for (self: ToolContext): Phase */
3 val
* simple_misc_analysis__ToolContext__simple_misc_analysis_phase(val
* self
) {
4 val
* var
/* : Phase */;
5 val
* var1
/* : Phase */;
6 var1
= self
->attrs
[COLOR_simple_misc_analysis__ToolContext___64dsimple_misc_analysis_phase
].val
; /* @simple_misc_analysis_phase on <self:ToolContext> */
8 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @simple_misc_analysis_phase");
9 fprintf(stderr
, " (%s:%d)\n", "src/simple_misc_analysis.nit", 29);
16 /* method simple_misc_analysis#ToolContext#simple_misc_analysis_phase for (self: Object): Phase */
17 val
* VIRTUAL_simple_misc_analysis__ToolContext__simple_misc_analysis_phase(val
* self
) {
18 val
* var
/* : Phase */;
19 val
* var1
/* : Phase */;
20 var1
= simple_misc_analysis__ToolContext__simple_misc_analysis_phase(self
);
25 /* method simple_misc_analysis#ToolContext#simple_misc_analysis_phase= for (self: ToolContext, Phase) */
26 void simple_misc_analysis__ToolContext__simple_misc_analysis_phase_61d(val
* self
, val
* p0
) {
27 self
->attrs
[COLOR_simple_misc_analysis__ToolContext___64dsimple_misc_analysis_phase
].val
= p0
; /* @simple_misc_analysis_phase on <self:ToolContext> */
30 /* method simple_misc_analysis#ToolContext#simple_misc_analysis_phase= for (self: Object, Phase) */
31 void VIRTUAL_simple_misc_analysis__ToolContext__simple_misc_analysis_phase_61d(val
* self
, val
* p0
) {
32 simple_misc_analysis__ToolContext__simple_misc_analysis_phase_61d(self
, p0
);
35 /* method simple_misc_analysis#SimpleMiscAnalysisPhase#process_nmodule for (self: SimpleMiscAnalysisPhase, AModule) */
36 void simple_misc_analysis__SimpleMiscAnalysisPhase__process_nmodule(val
* self
, val
* p0
) {
37 val
* var_nmodule
/* var nmodule: AModule */;
38 val
* var
/* : ToolContext */;
40 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_phase__Phase__toolcontext
]))(self
) /* toolcontext on <self:SimpleMiscAnalysisPhase>*/;
41 ((void (*)(val
*, val
*))(var_nmodule
->class->vft
[COLOR_simple_misc_analysis__AModule__do_simple_misc_analysis
]))(var_nmodule
, var
) /* do_simple_misc_analysis on <var_nmodule:AModule>*/;
44 /* method simple_misc_analysis#SimpleMiscAnalysisPhase#process_nmodule for (self: Object, AModule) */
45 void VIRTUAL_simple_misc_analysis__SimpleMiscAnalysisPhase__process_nmodule(val
* self
, val
* p0
) {
46 simple_misc_analysis__SimpleMiscAnalysisPhase__process_nmodule(self
, p0
);
49 /* method simple_misc_analysis#AModule#do_simple_misc_analysis for (self: AModule, ToolContext) */
50 void simple_misc_analysis__AModule__do_simple_misc_analysis(val
* self
, val
* p0
) {
51 val
* var_toolcontext
/* var toolcontext: ToolContext */;
52 val
* var
/* : SimpleMiscVisitor */;
53 val
* var_v
/* var v: SimpleMiscVisitor */;
55 var
= NEW_simple_misc_analysis__SimpleMiscVisitor(&type_simple_misc_analysis__SimpleMiscVisitor
);
56 ((void (*)(val
*, val
*))(var
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__init
]))(var
, var_toolcontext
) /* init on <var:SimpleMiscVisitor>*/;
57 CHECK_NEW_simple_misc_analysis__SimpleMiscVisitor(var
);
59 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_parser_nodes__Visitor__enter_visit
]))(var_v
, self
) /* enter_visit on <var_v:SimpleMiscVisitor>*/;
62 /* method simple_misc_analysis#AModule#do_simple_misc_analysis for (self: Object, ToolContext) */
63 void VIRTUAL_simple_misc_analysis__AModule__do_simple_misc_analysis(val
* self
, val
* p0
) {
64 simple_misc_analysis__AModule__do_simple_misc_analysis(self
, p0
);
67 /* method simple_misc_analysis#SimpleMiscVisitor#visit for (self: SimpleMiscVisitor, ANode) */
68 void simple_misc_analysis__SimpleMiscVisitor__visit(val
* self
, val
* p0
) {
69 val
* var_n
/* var n: ANode */;
71 ((void (*)(val
*, val
*))(var_n
->class->vft
[COLOR_simple_misc_analysis__ANode__accept_simple_misc
]))(var_n
, self
) /* accept_simple_misc on <var_n:ANode>*/;
74 /* method simple_misc_analysis#SimpleMiscVisitor#visit for (self: Object, ANode) */
75 void VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__visit(val
* self
, val
* p0
) {
76 simple_misc_analysis__SimpleMiscVisitor__visit(self
, p0
);
79 /* method simple_misc_analysis#SimpleMiscVisitor#once_count for (self: SimpleMiscVisitor): Int */
80 long simple_misc_analysis__SimpleMiscVisitor__once_count(val
* self
) {
82 long var1
/* : Int */;
83 var1
= self
->attrs
[COLOR_simple_misc_analysis__SimpleMiscVisitor___64donce_count
].l
; /* @once_count on <self:SimpleMiscVisitor> */
88 /* method simple_misc_analysis#SimpleMiscVisitor#once_count for (self: Object): Int */
89 long VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__once_count(val
* self
) {
91 long var1
/* : Int */;
92 var1
= simple_misc_analysis__SimpleMiscVisitor__once_count(self
);
97 /* method simple_misc_analysis#SimpleMiscVisitor#once_count= for (self: SimpleMiscVisitor, Int) */
98 void simple_misc_analysis__SimpleMiscVisitor__once_count_61d(val
* self
, long p0
) {
99 self
->attrs
[COLOR_simple_misc_analysis__SimpleMiscVisitor___64donce_count
].l
= p0
; /* @once_count on <self:SimpleMiscVisitor> */
102 /* method simple_misc_analysis#SimpleMiscVisitor#once_count= for (self: Object, Int) */
103 void VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__once_count_61d(val
* self
, long p0
) {
104 simple_misc_analysis__SimpleMiscVisitor__once_count_61d(self
, p0
);
107 /* method simple_misc_analysis#SimpleMiscVisitor#toolcontext for (self: SimpleMiscVisitor): ToolContext */
108 val
* simple_misc_analysis__SimpleMiscVisitor__toolcontext(val
* self
) {
109 val
* var
/* : ToolContext */;
110 val
* var1
/* : ToolContext */;
111 var1
= self
->attrs
[COLOR_simple_misc_analysis__SimpleMiscVisitor___64dtoolcontext
].val
; /* @toolcontext on <self:SimpleMiscVisitor> */
113 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @toolcontext");
114 fprintf(stderr
, " (%s:%d)\n", "src/simple_misc_analysis.nit", 57);
121 /* method simple_misc_analysis#SimpleMiscVisitor#toolcontext for (self: Object): ToolContext */
122 val
* VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__toolcontext(val
* self
) {
123 val
* var
/* : ToolContext */;
124 val
* var1
/* : ToolContext */;
125 var1
= simple_misc_analysis__SimpleMiscVisitor__toolcontext(self
);
130 /* method simple_misc_analysis#SimpleMiscVisitor#toolcontext= for (self: SimpleMiscVisitor, ToolContext) */
131 void simple_misc_analysis__SimpleMiscVisitor__toolcontext_61d(val
* self
, val
* p0
) {
132 self
->attrs
[COLOR_simple_misc_analysis__SimpleMiscVisitor___64dtoolcontext
].val
= p0
; /* @toolcontext on <self:SimpleMiscVisitor> */
135 /* method simple_misc_analysis#SimpleMiscVisitor#toolcontext= for (self: Object, ToolContext) */
136 void VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__toolcontext_61d(val
* self
, val
* p0
) {
137 simple_misc_analysis__SimpleMiscVisitor__toolcontext_61d(self
, p0
);
140 /* method simple_misc_analysis#SimpleMiscVisitor#warning for (self: SimpleMiscVisitor, ANode, String) */
141 void simple_misc_analysis__SimpleMiscVisitor__warning(val
* self
, val
* p0
, val
* p1
) {
142 val
* var_node
/* var node: ANode */;
143 val
* var_msg
/* var msg: String */;
144 val
* var
/* : ToolContext */;
145 val
* var1
/* : Location */;
148 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__toolcontext
]))(self
) /* toolcontext on <self:SimpleMiscVisitor>*/;
149 var1
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_parser_nodes__ANode__hot_location
]))(var_node
) /* hot_location on <var_node:ANode>*/;
150 ((void (*)(val
*, val
*, val
*))(var
->class->vft
[COLOR_toolcontext__ToolContext__warning
]))(var
, var1
, var_msg
) /* warning on <var:ToolContext>*/;
153 /* method simple_misc_analysis#SimpleMiscVisitor#warning for (self: Object, ANode, String) */
154 void VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__warning(val
* self
, val
* p0
, val
* p1
) {
155 simple_misc_analysis__SimpleMiscVisitor__warning(self
, p0
, p1
);
158 /* method simple_misc_analysis#SimpleMiscVisitor#init for (self: SimpleMiscVisitor, ToolContext) */
159 void simple_misc_analysis__SimpleMiscVisitor__init(val
* self
, val
* p0
) {
160 val
* var_toolcontext
/* var toolcontext: ToolContext */;
161 var_toolcontext
= p0
;
162 ((void (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__Visitor__init
]))(self
) /* init on <self:SimpleMiscVisitor>*/;
163 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__toolcontext_61d
]))(self
, var_toolcontext
) /* toolcontext= on <self:SimpleMiscVisitor>*/;
166 /* method simple_misc_analysis#SimpleMiscVisitor#init for (self: Object, ToolContext) */
167 void VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__init(val
* self
, val
* p0
) {
168 simple_misc_analysis__SimpleMiscVisitor__init(self
, p0
);
171 /* method simple_misc_analysis#ANode#accept_simple_misc for (self: ANode, SimpleMiscVisitor) */
172 void simple_misc_analysis__ANode__accept_simple_misc(val
* self
, val
* p0
) {
173 val
* var_v
/* var v: SimpleMiscVisitor */;
175 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_parser_nodes__ANode__visit_all
]))(self
, var_v
) /* visit_all on <self:ANode>*/;
176 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_simple_misc_analysis__ANode__after_simple_misc
]))(self
, var_v
) /* after_simple_misc on <self:ANode>*/;
179 /* method simple_misc_analysis#ANode#accept_simple_misc for (self: Object, SimpleMiscVisitor) */
180 void VIRTUAL_simple_misc_analysis__ANode__accept_simple_misc(val
* self
, val
* p0
) {
181 simple_misc_analysis__ANode__accept_simple_misc(self
, p0
);
184 /* method simple_misc_analysis#ANode#after_simple_misc for (self: ANode, SimpleMiscVisitor) */
185 void simple_misc_analysis__ANode__after_simple_misc(val
* self
, val
* p0
) {
186 val
* var_v
/* var v: SimpleMiscVisitor */;
190 /* method simple_misc_analysis#ANode#after_simple_misc for (self: Object, SimpleMiscVisitor) */
191 void VIRTUAL_simple_misc_analysis__ANode__after_simple_misc(val
* self
, val
* p0
) {
192 simple_misc_analysis__ANode__after_simple_misc(self
, p0
);
195 /* method simple_misc_analysis#ASignature#after_simple_misc for (self: ASignature, SimpleMiscVisitor) */
196 void simple_misc_analysis__ASignature__after_simple_misc(val
* self
, val
* p0
) {
197 val
* var_v
/* var v: SimpleMiscVisitor */;
198 short int var
/* : Bool */;
199 val
* var1
/* : nullable TOpar */;
200 val
* var2
/* : null */;
201 short int var3
/* : Bool */;
202 short int var_
/* var : Bool */;
203 val
* var4
/* : ANodes[AParam] */;
204 short int var5
/* : Bool */;
206 val
* var6
/* : String */;
207 char* var7
/* : NativeString */;
208 long var8
/* : Int */;
209 val
* var9
/* : String */;
211 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__ASignature__n_opar
]))(self
) /* n_opar on <self:ASignature>*/;
214 var3
= 0; /* is null */
216 var3
= 1; /* arg is null and recv is not */
220 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__ASignature__n_params
]))(self
) /* n_params on <self:ASignature>*/;
221 var5
= ((short int (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(var4
) /* is_empty on <var4:ANodes[AParam]>*/;
230 var7
= "Warning: superfluous parentheses.";
232 var9
= string__NativeString__to_s_with_length(var7
, var8
);
236 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__warning
]))(var_v
, self
, var6
) /* warning on <var_v:SimpleMiscVisitor>*/;
241 /* method simple_misc_analysis#ASignature#after_simple_misc for (self: Object, SimpleMiscVisitor) */
242 void VIRTUAL_simple_misc_analysis__ASignature__after_simple_misc(val
* self
, val
* p0
) {
243 simple_misc_analysis__ASignature__after_simple_misc(self
, p0
);
246 /* method simple_misc_analysis#AExpr#warn_parentheses for (self: AExpr, SimpleMiscVisitor) */
247 void simple_misc_analysis__AExpr__warn_parentheses(val
* self
, val
* p0
) {
248 val
* var_v
/* var v: SimpleMiscVisitor */;
252 /* method simple_misc_analysis#AExpr#warn_parentheses for (self: Object, SimpleMiscVisitor) */
253 void VIRTUAL_simple_misc_analysis__AExpr__warn_parentheses(val
* self
, val
* p0
) {
254 simple_misc_analysis__AExpr__warn_parentheses(self
, p0
);
257 /* method simple_misc_analysis#AParExpr#warn_parentheses for (self: AParExpr, SimpleMiscVisitor) */
258 void simple_misc_analysis__AParExpr__warn_parentheses(val
* self
, val
* p0
) {
259 val
* var_v
/* var v: SimpleMiscVisitor */;
261 val
* var
/* : String */;
262 char* var1
/* : NativeString */;
263 long var2
/* : Int */;
264 val
* var3
/* : String */;
269 var1
= "Warning: superfluous parentheses.";
271 var3
= string__NativeString__to_s_with_length(var1
, var2
);
275 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__warning
]))(var_v
, self
, var
) /* warning on <var_v:SimpleMiscVisitor>*/;
278 /* method simple_misc_analysis#AParExpr#warn_parentheses for (self: Object, SimpleMiscVisitor) */
279 void VIRTUAL_simple_misc_analysis__AParExpr__warn_parentheses(val
* self
, val
* p0
) {
280 simple_misc_analysis__AParExpr__warn_parentheses(self
, p0
);
283 /* method simple_misc_analysis#AParExprs#after_simple_misc for (self: AParExprs, SimpleMiscVisitor) */
284 void simple_misc_analysis__AParExprs__after_simple_misc(val
* self
, val
* p0
) {
285 val
* var_v
/* var v: SimpleMiscVisitor */;
286 val
* var
/* : ANodes[AExpr] */;
287 short int var1
/* : Bool */;
289 val
* var2
/* : String */;
290 char* var3
/* : NativeString */;
291 long var4
/* : Int */;
292 val
* var5
/* : String */;
294 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AExprs__n_exprs
]))(self
) /* n_exprs on <self:AParExprs>*/;
295 var1
= ((short int (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(var
) /* is_empty on <var:ANodes[AExpr]>*/;
300 var3
= "Warning: superfluous parentheses.";
302 var5
= string__NativeString__to_s_with_length(var3
, var4
);
306 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__warning
]))(var_v
, self
, var2
) /* warning on <var_v:SimpleMiscVisitor>*/;
311 /* method simple_misc_analysis#AParExprs#after_simple_misc for (self: Object, SimpleMiscVisitor) */
312 void VIRTUAL_simple_misc_analysis__AParExprs__after_simple_misc(val
* self
, val
* p0
) {
313 simple_misc_analysis__AParExprs__after_simple_misc(self
, p0
);
316 /* method simple_misc_analysis#AReturnExpr#after_simple_misc for (self: AReturnExpr, SimpleMiscVisitor) */
317 void simple_misc_analysis__AReturnExpr__after_simple_misc(val
* self
, val
* p0
) {
318 val
* var_v
/* var v: SimpleMiscVisitor */;
319 val
* var
/* : nullable AExpr */;
320 val
* var_e
/* var e: nullable AExpr */;
321 val
* var1
/* : null */;
322 short int var2
/* : Bool */;
324 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AReturnExpr__n_expr
]))(self
) /* n_expr on <self:AReturnExpr>*/;
328 var2
= 0; /* is null */
330 var2
= 1; /* arg is null and recv is not */
333 ((void (*)(val
*, val
*))(var_e
->class->vft
[COLOR_simple_misc_analysis__AExpr__warn_parentheses
]))(var_e
, var_v
) /* warn_parentheses on <var_e:nullable AExpr(AExpr)>*/;
338 /* method simple_misc_analysis#AReturnExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
339 void VIRTUAL_simple_misc_analysis__AReturnExpr__after_simple_misc(val
* self
, val
* p0
) {
340 simple_misc_analysis__AReturnExpr__after_simple_misc(self
, p0
);
343 /* method simple_misc_analysis#AContinueExpr#after_simple_misc for (self: AContinueExpr, SimpleMiscVisitor) */
344 void simple_misc_analysis__AContinueExpr__after_simple_misc(val
* self
, val
* p0
) {
345 val
* var_v
/* var v: SimpleMiscVisitor */;
346 val
* var
/* : nullable AExpr */;
347 val
* var_e
/* var e: nullable AExpr */;
348 val
* var1
/* : null */;
349 short int var2
/* : Bool */;
351 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AContinueExpr__n_expr
]))(self
) /* n_expr on <self:AContinueExpr>*/;
355 var2
= 0; /* is null */
357 var2
= 1; /* arg is null and recv is not */
360 ((void (*)(val
*, val
*))(var_e
->class->vft
[COLOR_simple_misc_analysis__AExpr__warn_parentheses
]))(var_e
, var_v
) /* warn_parentheses on <var_e:nullable AExpr(AExpr)>*/;
365 /* method simple_misc_analysis#AContinueExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
366 void VIRTUAL_simple_misc_analysis__AContinueExpr__after_simple_misc(val
* self
, val
* p0
) {
367 simple_misc_analysis__AContinueExpr__after_simple_misc(self
, p0
);
370 /* method simple_misc_analysis#ABreakExpr#after_simple_misc for (self: ABreakExpr, SimpleMiscVisitor) */
371 void simple_misc_analysis__ABreakExpr__after_simple_misc(val
* self
, val
* p0
) {
372 val
* var_v
/* var v: SimpleMiscVisitor */;
373 val
* var
/* : nullable AExpr */;
374 val
* var_e
/* var e: nullable AExpr */;
375 val
* var1
/* : null */;
376 short int var2
/* : Bool */;
378 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__ABreakExpr__n_expr
]))(self
) /* n_expr on <self:ABreakExpr>*/;
382 var2
= 0; /* is null */
384 var2
= 1; /* arg is null and recv is not */
387 ((void (*)(val
*, val
*))(var_e
->class->vft
[COLOR_simple_misc_analysis__AExpr__warn_parentheses
]))(var_e
, var_v
) /* warn_parentheses on <var_e:nullable AExpr(AExpr)>*/;
392 /* method simple_misc_analysis#ABreakExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
393 void VIRTUAL_simple_misc_analysis__ABreakExpr__after_simple_misc(val
* self
, val
* p0
) {
394 simple_misc_analysis__ABreakExpr__after_simple_misc(self
, p0
);
397 /* method simple_misc_analysis#AWhileExpr#after_simple_misc for (self: AWhileExpr, SimpleMiscVisitor) */
398 void simple_misc_analysis__AWhileExpr__after_simple_misc(val
* self
, val
* p0
) {
399 val
* var_v
/* var v: SimpleMiscVisitor */;
400 val
* var
/* : AExpr */;
401 short int var1
/* : Bool */;
405 val
* var2
/* : String */;
406 char* var3
/* : NativeString */;
407 long var4
/* : Int */;
408 val
* var5
/* : String */;
409 val
* var6
/* : AExpr */;
411 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AWhileExpr__n_expr
]))(self
) /* n_expr on <self:AWhileExpr>*/;
412 /* <var:AExpr> isa ATrueExpr */
413 cltype
= type_parser_nodes__ATrueExpr
.color
;
414 idtype
= type_parser_nodes__ATrueExpr
.id
;
415 if(cltype
>= var
->type
->table_size
) {
418 var1
= var
->type
->type_table
[cltype
] == idtype
;
424 var3
= "Warning: use \'loop\' instead of \'while true do\'.";
426 var5
= string__NativeString__to_s_with_length(var3
, var4
);
430 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__warning
]))(var_v
, self
, var2
) /* warning on <var_v:SimpleMiscVisitor>*/;
432 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AWhileExpr__n_expr
]))(self
) /* n_expr on <self:AWhileExpr>*/;
433 ((void (*)(val
*, val
*))(var6
->class->vft
[COLOR_simple_misc_analysis__AExpr__warn_parentheses
]))(var6
, var_v
) /* warn_parentheses on <var6:AExpr>*/;
437 /* method simple_misc_analysis#AWhileExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
438 void VIRTUAL_simple_misc_analysis__AWhileExpr__after_simple_misc(val
* self
, val
* p0
) {
439 simple_misc_analysis__AWhileExpr__after_simple_misc(self
, p0
);
442 /* method simple_misc_analysis#AForExpr#after_simple_misc for (self: AForExpr, SimpleMiscVisitor) */
443 void simple_misc_analysis__AForExpr__after_simple_misc(val
* self
, val
* p0
) {
444 val
* var_v
/* var v: SimpleMiscVisitor */;
445 val
* var
/* : AExpr */;
447 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AForExpr__n_expr
]))(self
) /* n_expr on <self:AForExpr>*/;
448 ((void (*)(val
*, val
*))(var
->class->vft
[COLOR_simple_misc_analysis__AExpr__warn_parentheses
]))(var
, var_v
) /* warn_parentheses on <var:AExpr>*/;
451 /* method simple_misc_analysis#AForExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
452 void VIRTUAL_simple_misc_analysis__AForExpr__after_simple_misc(val
* self
, val
* p0
) {
453 simple_misc_analysis__AForExpr__after_simple_misc(self
, p0
);
456 /* method simple_misc_analysis#AIfExpr#after_simple_misc for (self: AIfExpr, SimpleMiscVisitor) */
457 void simple_misc_analysis__AIfExpr__after_simple_misc(val
* self
, val
* p0
) {
458 val
* var_v
/* var v: SimpleMiscVisitor */;
459 val
* var
/* : AExpr */;
461 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AIfExpr__n_expr
]))(self
) /* n_expr on <self:AIfExpr>*/;
462 ((void (*)(val
*, val
*))(var
->class->vft
[COLOR_simple_misc_analysis__AExpr__warn_parentheses
]))(var
, var_v
) /* warn_parentheses on <var:AExpr>*/;
465 /* method simple_misc_analysis#AIfExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
466 void VIRTUAL_simple_misc_analysis__AIfExpr__after_simple_misc(val
* self
, val
* p0
) {
467 simple_misc_analysis__AIfExpr__after_simple_misc(self
, p0
);
470 /* method simple_misc_analysis#AIfexprExpr#after_simple_misc for (self: AIfexprExpr, SimpleMiscVisitor) */
471 void simple_misc_analysis__AIfexprExpr__after_simple_misc(val
* self
, val
* p0
) {
472 val
* var_v
/* var v: SimpleMiscVisitor */;
473 val
* var
/* : AExpr */;
475 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AIfexprExpr__n_expr
]))(self
) /* n_expr on <self:AIfexprExpr>*/;
476 ((void (*)(val
*, val
*))(var
->class->vft
[COLOR_simple_misc_analysis__AExpr__warn_parentheses
]))(var
, var_v
) /* warn_parentheses on <var:AExpr>*/;
479 /* method simple_misc_analysis#AIfexprExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
480 void VIRTUAL_simple_misc_analysis__AIfexprExpr__after_simple_misc(val
* self
, val
* p0
) {
481 simple_misc_analysis__AIfexprExpr__after_simple_misc(self
, p0
);
484 /* method simple_misc_analysis#AOnceExpr#accept_simple_misc for (self: AOnceExpr, SimpleMiscVisitor) */
485 void simple_misc_analysis__AOnceExpr__accept_simple_misc(val
* self
, val
* p0
) {
486 val
* var_v
/* var v: SimpleMiscVisitor */;
487 long var
/* : Int */;
488 long var1
/* : Int */;
489 short int var2
/* : Bool */;
490 short int var4
/* : Bool */;
493 const char* var_class_name
;
494 short int var5
/* : Bool */;
496 val
* var6
/* : String */;
497 char* var7
/* : NativeString */;
498 long var8
/* : Int */;
499 val
* var9
/* : String */;
500 long var10
/* : Int */;
501 long var11
/* : Int */;
502 long var12
/* : Int */;
503 long var14
/* : Int */;
504 long var15
/* : Int */;
505 long var16
/* : Int */;
506 long var17
/* : Int */;
507 long var19
/* : Int */;
509 var
= ((long (*)(val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__once_count
]))(var_v
) /* once_count on <var_v:SimpleMiscVisitor>*/;
511 { /* Inline kernel#Int#> (var,var1) */
512 /* Covariant cast for argument 0 (i) <var1:Int> isa OTHER */
513 /* <var1:Int> isa OTHER */
514 var4
= 1; /* easy <var1:Int> isa OTHER*/
516 var_class_name
= type_kernel__Int
.name
;
517 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
518 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
530 var7
= "Useless once in a once expression.";
532 var9
= string__NativeString__to_s_with_length(var7
, var8
);
536 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__warning
]))(var_v
, self
, var6
) /* warning on <var_v:SimpleMiscVisitor>*/;
539 var10
= ((long (*)(val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__once_count
]))(var_v
) /* once_count on <var_v:SimpleMiscVisitor>*/;
541 { /* Inline kernel#Int#+ (var10,var11) */
542 var14
= var10
+ var11
;
547 ((void (*)(val
*, long))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__once_count_61d
]))(var_v
, var12
) /* once_count= on <var_v:SimpleMiscVisitor>*/;
548 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_simple_misc_analysis__AOnceExpr__accept_simple_misc
]))(self
, p0
) /* accept_simple_misc on <self:AOnceExpr>*/;
549 var15
= ((long (*)(val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__once_count
]))(var_v
) /* once_count on <var_v:SimpleMiscVisitor>*/;
551 { /* Inline kernel#Int#- (var15,var16) */
552 var19
= var15
- var16
;
557 ((void (*)(val
*, long))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__once_count_61d
]))(var_v
, var17
) /* once_count= on <var_v:SimpleMiscVisitor>*/;
560 /* method simple_misc_analysis#AOnceExpr#accept_simple_misc for (self: Object, SimpleMiscVisitor) */
561 void VIRTUAL_simple_misc_analysis__AOnceExpr__accept_simple_misc(val
* self
, val
* p0
) {
562 simple_misc_analysis__AOnceExpr__accept_simple_misc(self
, p0
);