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>*/;
58 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_parser_nodes__Visitor__enter_visit
]))(var_v
, self
) /* enter_visit on <var_v:SimpleMiscVisitor>*/;
61 /* method simple_misc_analysis#AModule#do_simple_misc_analysis for (self: Object, ToolContext) */
62 void VIRTUAL_simple_misc_analysis__AModule__do_simple_misc_analysis(val
* self
, val
* p0
) {
63 simple_misc_analysis__AModule__do_simple_misc_analysis(self
, p0
);
66 /* method simple_misc_analysis#SimpleMiscVisitor#visit for (self: SimpleMiscVisitor, ANode) */
67 void simple_misc_analysis__SimpleMiscVisitor__visit(val
* self
, val
* p0
) {
68 val
* var_n
/* var n: ANode */;
70 ((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>*/;
73 /* method simple_misc_analysis#SimpleMiscVisitor#visit for (self: Object, ANode) */
74 void VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__visit(val
* self
, val
* p0
) {
75 simple_misc_analysis__SimpleMiscVisitor__visit(self
, p0
);
78 /* method simple_misc_analysis#SimpleMiscVisitor#once_count for (self: SimpleMiscVisitor): Int */
79 long simple_misc_analysis__SimpleMiscVisitor__once_count(val
* self
) {
81 long var1
/* : Int */;
82 var1
= self
->attrs
[COLOR_simple_misc_analysis__SimpleMiscVisitor___64donce_count
].l
; /* @once_count on <self:SimpleMiscVisitor> */
87 /* method simple_misc_analysis#SimpleMiscVisitor#once_count for (self: Object): Int */
88 long VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__once_count(val
* self
) {
90 long var1
/* : Int */;
91 var1
= simple_misc_analysis__SimpleMiscVisitor__once_count(self
);
96 /* method simple_misc_analysis#SimpleMiscVisitor#once_count= for (self: SimpleMiscVisitor, Int) */
97 void simple_misc_analysis__SimpleMiscVisitor__once_count_61d(val
* self
, long p0
) {
98 self
->attrs
[COLOR_simple_misc_analysis__SimpleMiscVisitor___64donce_count
].l
= p0
; /* @once_count on <self:SimpleMiscVisitor> */
101 /* method simple_misc_analysis#SimpleMiscVisitor#once_count= for (self: Object, Int) */
102 void VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__once_count_61d(val
* self
, long p0
) {
103 simple_misc_analysis__SimpleMiscVisitor__once_count_61d(self
, p0
);
106 /* method simple_misc_analysis#SimpleMiscVisitor#toolcontext for (self: SimpleMiscVisitor): ToolContext */
107 val
* simple_misc_analysis__SimpleMiscVisitor__toolcontext(val
* self
) {
108 val
* var
/* : ToolContext */;
109 val
* var1
/* : ToolContext */;
110 var1
= self
->attrs
[COLOR_simple_misc_analysis__SimpleMiscVisitor___64dtoolcontext
].val
; /* @toolcontext on <self:SimpleMiscVisitor> */
112 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @toolcontext");
113 fprintf(stderr
, " (%s:%d)\n", "src/simple_misc_analysis.nit", 57);
120 /* method simple_misc_analysis#SimpleMiscVisitor#toolcontext for (self: Object): ToolContext */
121 val
* VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__toolcontext(val
* self
) {
122 val
* var
/* : ToolContext */;
123 val
* var1
/* : ToolContext */;
124 var1
= simple_misc_analysis__SimpleMiscVisitor__toolcontext(self
);
129 /* method simple_misc_analysis#SimpleMiscVisitor#toolcontext= for (self: SimpleMiscVisitor, ToolContext) */
130 void simple_misc_analysis__SimpleMiscVisitor__toolcontext_61d(val
* self
, val
* p0
) {
131 self
->attrs
[COLOR_simple_misc_analysis__SimpleMiscVisitor___64dtoolcontext
].val
= p0
; /* @toolcontext on <self:SimpleMiscVisitor> */
134 /* method simple_misc_analysis#SimpleMiscVisitor#toolcontext= for (self: Object, ToolContext) */
135 void VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__toolcontext_61d(val
* self
, val
* p0
) {
136 simple_misc_analysis__SimpleMiscVisitor__toolcontext_61d(self
, p0
);
139 /* method simple_misc_analysis#SimpleMiscVisitor#warning for (self: SimpleMiscVisitor, ANode, String) */
140 void simple_misc_analysis__SimpleMiscVisitor__warning(val
* self
, val
* p0
, val
* p1
) {
141 val
* var_node
/* var node: ANode */;
142 val
* var_msg
/* var msg: String */;
143 val
* var
/* : ToolContext */;
144 val
* var1
/* : Location */;
147 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__toolcontext
]))(self
) /* toolcontext on <self:SimpleMiscVisitor>*/;
148 var1
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_parser_nodes__ANode__hot_location
]))(var_node
) /* hot_location on <var_node:ANode>*/;
149 ((void (*)(val
*, val
*, val
*))(var
->class->vft
[COLOR_toolcontext__ToolContext__warning
]))(var
, var1
, var_msg
) /* warning on <var:ToolContext>*/;
152 /* method simple_misc_analysis#SimpleMiscVisitor#warning for (self: Object, ANode, String) */
153 void VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__warning(val
* self
, val
* p0
, val
* p1
) {
154 simple_misc_analysis__SimpleMiscVisitor__warning(self
, p0
, p1
);
157 /* method simple_misc_analysis#SimpleMiscVisitor#init for (self: SimpleMiscVisitor, ToolContext) */
158 void simple_misc_analysis__SimpleMiscVisitor__init(val
* self
, val
* p0
) {
159 val
* var_toolcontext
/* var toolcontext: ToolContext */;
160 var_toolcontext
= p0
;
161 ((void (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__Visitor__init
]))(self
) /* init on <self:SimpleMiscVisitor>*/;
162 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__toolcontext_61d
]))(self
, var_toolcontext
) /* toolcontext= on <self:SimpleMiscVisitor>*/;
165 /* method simple_misc_analysis#SimpleMiscVisitor#init for (self: Object, ToolContext) */
166 void VIRTUAL_simple_misc_analysis__SimpleMiscVisitor__init(val
* self
, val
* p0
) {
167 simple_misc_analysis__SimpleMiscVisitor__init(self
, p0
);
170 /* method simple_misc_analysis#ANode#accept_simple_misc for (self: ANode, SimpleMiscVisitor) */
171 void simple_misc_analysis__ANode__accept_simple_misc(val
* self
, val
* p0
) {
172 val
* var_v
/* var v: SimpleMiscVisitor */;
174 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_parser_nodes__ANode__visit_all
]))(self
, var_v
) /* visit_all on <self:ANode>*/;
175 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_simple_misc_analysis__ANode__after_simple_misc
]))(self
, var_v
) /* after_simple_misc on <self:ANode>*/;
178 /* method simple_misc_analysis#ANode#accept_simple_misc for (self: Object, SimpleMiscVisitor) */
179 void VIRTUAL_simple_misc_analysis__ANode__accept_simple_misc(val
* self
, val
* p0
) {
180 simple_misc_analysis__ANode__accept_simple_misc(self
, p0
);
183 /* method simple_misc_analysis#ANode#after_simple_misc for (self: ANode, SimpleMiscVisitor) */
184 void simple_misc_analysis__ANode__after_simple_misc(val
* self
, val
* p0
) {
185 val
* var_v
/* var v: SimpleMiscVisitor */;
189 /* method simple_misc_analysis#ANode#after_simple_misc for (self: Object, SimpleMiscVisitor) */
190 void VIRTUAL_simple_misc_analysis__ANode__after_simple_misc(val
* self
, val
* p0
) {
191 simple_misc_analysis__ANode__after_simple_misc(self
, p0
);
194 /* method simple_misc_analysis#ASignature#after_simple_misc for (self: ASignature, SimpleMiscVisitor) */
195 void simple_misc_analysis__ASignature__after_simple_misc(val
* self
, val
* p0
) {
196 val
* var_v
/* var v: SimpleMiscVisitor */;
197 short int var
/* : Bool */;
198 val
* var1
/* : nullable TOpar */;
199 val
* var2
/* : null */;
200 short int var3
/* : Bool */;
201 short int var_
/* var : Bool */;
202 val
* var4
/* : ANodes[AParam] */;
203 short int var5
/* : Bool */;
205 val
* var6
/* : String */;
206 char* var7
/* : NativeString */;
207 long var8
/* : Int */;
208 val
* var9
/* : String */;
210 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__ASignature__n_opar
]))(self
) /* n_opar on <self:ASignature>*/;
213 var3
= 0; /* is null */
215 var3
= 1; /* arg is null and recv is not */
219 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__ASignature__n_params
]))(self
) /* n_params on <self:ASignature>*/;
220 var5
= ((short int (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(var4
) /* is_empty on <var4:ANodes[AParam]>*/;
229 var7
= "Warning: superfluous parentheses.";
231 var9
= string__NativeString__to_s_with_length(var7
, var8
);
235 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__warning
]))(var_v
, self
, var6
) /* warning on <var_v:SimpleMiscVisitor>*/;
240 /* method simple_misc_analysis#ASignature#after_simple_misc for (self: Object, SimpleMiscVisitor) */
241 void VIRTUAL_simple_misc_analysis__ASignature__after_simple_misc(val
* self
, val
* p0
) {
242 simple_misc_analysis__ASignature__after_simple_misc(self
, p0
);
245 /* method simple_misc_analysis#AExpr#warn_parentheses for (self: AExpr, SimpleMiscVisitor) */
246 void simple_misc_analysis__AExpr__warn_parentheses(val
* self
, val
* p0
) {
247 val
* var_v
/* var v: SimpleMiscVisitor */;
251 /* method simple_misc_analysis#AExpr#warn_parentheses for (self: Object, SimpleMiscVisitor) */
252 void VIRTUAL_simple_misc_analysis__AExpr__warn_parentheses(val
* self
, val
* p0
) {
253 simple_misc_analysis__AExpr__warn_parentheses(self
, p0
);
256 /* method simple_misc_analysis#AParExpr#warn_parentheses for (self: AParExpr, SimpleMiscVisitor) */
257 void simple_misc_analysis__AParExpr__warn_parentheses(val
* self
, val
* p0
) {
258 val
* var_v
/* var v: SimpleMiscVisitor */;
260 val
* var
/* : String */;
261 char* var1
/* : NativeString */;
262 long var2
/* : Int */;
263 val
* var3
/* : String */;
268 var1
= "Warning: superfluous parentheses.";
270 var3
= string__NativeString__to_s_with_length(var1
, var2
);
274 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__warning
]))(var_v
, self
, var
) /* warning on <var_v:SimpleMiscVisitor>*/;
277 /* method simple_misc_analysis#AParExpr#warn_parentheses for (self: Object, SimpleMiscVisitor) */
278 void VIRTUAL_simple_misc_analysis__AParExpr__warn_parentheses(val
* self
, val
* p0
) {
279 simple_misc_analysis__AParExpr__warn_parentheses(self
, p0
);
282 /* method simple_misc_analysis#AParExprs#after_simple_misc for (self: AParExprs, SimpleMiscVisitor) */
283 void simple_misc_analysis__AParExprs__after_simple_misc(val
* self
, val
* p0
) {
284 val
* var_v
/* var v: SimpleMiscVisitor */;
285 val
* var
/* : ANodes[AExpr] */;
286 short int var1
/* : Bool */;
288 val
* var2
/* : String */;
289 char* var3
/* : NativeString */;
290 long var4
/* : Int */;
291 val
* var5
/* : String */;
293 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AExprs__n_exprs
]))(self
) /* n_exprs on <self:AParExprs>*/;
294 var1
= ((short int (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(var
) /* is_empty on <var:ANodes[AExpr]>*/;
299 var3
= "Warning: superfluous parentheses.";
301 var5
= string__NativeString__to_s_with_length(var3
, var4
);
305 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__warning
]))(var_v
, self
, var2
) /* warning on <var_v:SimpleMiscVisitor>*/;
310 /* method simple_misc_analysis#AParExprs#after_simple_misc for (self: Object, SimpleMiscVisitor) */
311 void VIRTUAL_simple_misc_analysis__AParExprs__after_simple_misc(val
* self
, val
* p0
) {
312 simple_misc_analysis__AParExprs__after_simple_misc(self
, p0
);
315 /* method simple_misc_analysis#AReturnExpr#after_simple_misc for (self: AReturnExpr, SimpleMiscVisitor) */
316 void simple_misc_analysis__AReturnExpr__after_simple_misc(val
* self
, val
* p0
) {
317 val
* var_v
/* var v: SimpleMiscVisitor */;
318 val
* var
/* : nullable AExpr */;
319 val
* var_e
/* var e: nullable AExpr */;
320 val
* var1
/* : null */;
321 short int var2
/* : Bool */;
323 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AReturnExpr__n_expr
]))(self
) /* n_expr on <self:AReturnExpr>*/;
327 var2
= 0; /* is null */
329 var2
= 1; /* arg is null and recv is not */
332 ((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)>*/;
337 /* method simple_misc_analysis#AReturnExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
338 void VIRTUAL_simple_misc_analysis__AReturnExpr__after_simple_misc(val
* self
, val
* p0
) {
339 simple_misc_analysis__AReturnExpr__after_simple_misc(self
, p0
);
342 /* method simple_misc_analysis#AContinueExpr#after_simple_misc for (self: AContinueExpr, SimpleMiscVisitor) */
343 void simple_misc_analysis__AContinueExpr__after_simple_misc(val
* self
, val
* p0
) {
344 val
* var_v
/* var v: SimpleMiscVisitor */;
345 val
* var
/* : nullable AExpr */;
346 val
* var_e
/* var e: nullable AExpr */;
347 val
* var1
/* : null */;
348 short int var2
/* : Bool */;
350 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AContinueExpr__n_expr
]))(self
) /* n_expr on <self:AContinueExpr>*/;
354 var2
= 0; /* is null */
356 var2
= 1; /* arg is null and recv is not */
359 ((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)>*/;
364 /* method simple_misc_analysis#AContinueExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
365 void VIRTUAL_simple_misc_analysis__AContinueExpr__after_simple_misc(val
* self
, val
* p0
) {
366 simple_misc_analysis__AContinueExpr__after_simple_misc(self
, p0
);
369 /* method simple_misc_analysis#ABreakExpr#after_simple_misc for (self: ABreakExpr, SimpleMiscVisitor) */
370 void simple_misc_analysis__ABreakExpr__after_simple_misc(val
* self
, val
* p0
) {
371 val
* var_v
/* var v: SimpleMiscVisitor */;
372 val
* var
/* : nullable AExpr */;
373 val
* var_e
/* var e: nullable AExpr */;
374 val
* var1
/* : null */;
375 short int var2
/* : Bool */;
377 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__ABreakExpr__n_expr
]))(self
) /* n_expr on <self:ABreakExpr>*/;
381 var2
= 0; /* is null */
383 var2
= 1; /* arg is null and recv is not */
386 ((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)>*/;
391 /* method simple_misc_analysis#ABreakExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
392 void VIRTUAL_simple_misc_analysis__ABreakExpr__after_simple_misc(val
* self
, val
* p0
) {
393 simple_misc_analysis__ABreakExpr__after_simple_misc(self
, p0
);
396 /* method simple_misc_analysis#AWhileExpr#after_simple_misc for (self: AWhileExpr, SimpleMiscVisitor) */
397 void simple_misc_analysis__AWhileExpr__after_simple_misc(val
* self
, val
* p0
) {
398 val
* var_v
/* var v: SimpleMiscVisitor */;
399 val
* var
/* : AExpr */;
400 short int var1
/* : Bool */;
404 val
* var2
/* : String */;
405 char* var3
/* : NativeString */;
406 long var4
/* : Int */;
407 val
* var5
/* : String */;
408 val
* var6
/* : AExpr */;
410 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AWhileExpr__n_expr
]))(self
) /* n_expr on <self:AWhileExpr>*/;
411 /* <var:AExpr> isa ATrueExpr */
412 cltype
= type_parser_nodes__ATrueExpr
.color
;
413 idtype
= type_parser_nodes__ATrueExpr
.id
;
414 if(cltype
>= var
->type
->table_size
) {
417 var1
= var
->type
->type_table
[cltype
] == idtype
;
423 var3
= "Warning: use \'loop\' instead of \'while true do\'.";
425 var5
= string__NativeString__to_s_with_length(var3
, var4
);
429 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__warning
]))(var_v
, self
, var2
) /* warning on <var_v:SimpleMiscVisitor>*/;
431 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AWhileExpr__n_expr
]))(self
) /* n_expr on <self:AWhileExpr>*/;
432 ((void (*)(val
*, val
*))(var6
->class->vft
[COLOR_simple_misc_analysis__AExpr__warn_parentheses
]))(var6
, var_v
) /* warn_parentheses on <var6:AExpr>*/;
436 /* method simple_misc_analysis#AWhileExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
437 void VIRTUAL_simple_misc_analysis__AWhileExpr__after_simple_misc(val
* self
, val
* p0
) {
438 simple_misc_analysis__AWhileExpr__after_simple_misc(self
, p0
);
441 /* method simple_misc_analysis#AForExpr#after_simple_misc for (self: AForExpr, SimpleMiscVisitor) */
442 void simple_misc_analysis__AForExpr__after_simple_misc(val
* self
, val
* p0
) {
443 val
* var_v
/* var v: SimpleMiscVisitor */;
444 val
* var
/* : AExpr */;
446 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AForExpr__n_expr
]))(self
) /* n_expr on <self:AForExpr>*/;
447 ((void (*)(val
*, val
*))(var
->class->vft
[COLOR_simple_misc_analysis__AExpr__warn_parentheses
]))(var
, var_v
) /* warn_parentheses on <var:AExpr>*/;
450 /* method simple_misc_analysis#AForExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
451 void VIRTUAL_simple_misc_analysis__AForExpr__after_simple_misc(val
* self
, val
* p0
) {
452 simple_misc_analysis__AForExpr__after_simple_misc(self
, p0
);
455 /* method simple_misc_analysis#AIfExpr#after_simple_misc for (self: AIfExpr, SimpleMiscVisitor) */
456 void simple_misc_analysis__AIfExpr__after_simple_misc(val
* self
, val
* p0
) {
457 val
* var_v
/* var v: SimpleMiscVisitor */;
458 val
* var
/* : AExpr */;
460 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AIfExpr__n_expr
]))(self
) /* n_expr on <self:AIfExpr>*/;
461 ((void (*)(val
*, val
*))(var
->class->vft
[COLOR_simple_misc_analysis__AExpr__warn_parentheses
]))(var
, var_v
) /* warn_parentheses on <var:AExpr>*/;
464 /* method simple_misc_analysis#AIfExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
465 void VIRTUAL_simple_misc_analysis__AIfExpr__after_simple_misc(val
* self
, val
* p0
) {
466 simple_misc_analysis__AIfExpr__after_simple_misc(self
, p0
);
469 /* method simple_misc_analysis#AIfexprExpr#after_simple_misc for (self: AIfexprExpr, SimpleMiscVisitor) */
470 void simple_misc_analysis__AIfexprExpr__after_simple_misc(val
* self
, val
* p0
) {
471 val
* var_v
/* var v: SimpleMiscVisitor */;
472 val
* var
/* : AExpr */;
474 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AIfexprExpr__n_expr
]))(self
) /* n_expr on <self:AIfexprExpr>*/;
475 ((void (*)(val
*, val
*))(var
->class->vft
[COLOR_simple_misc_analysis__AExpr__warn_parentheses
]))(var
, var_v
) /* warn_parentheses on <var:AExpr>*/;
478 /* method simple_misc_analysis#AIfexprExpr#after_simple_misc for (self: Object, SimpleMiscVisitor) */
479 void VIRTUAL_simple_misc_analysis__AIfexprExpr__after_simple_misc(val
* self
, val
* p0
) {
480 simple_misc_analysis__AIfexprExpr__after_simple_misc(self
, p0
);
483 /* method simple_misc_analysis#AOnceExpr#accept_simple_misc for (self: AOnceExpr, SimpleMiscVisitor) */
484 void simple_misc_analysis__AOnceExpr__accept_simple_misc(val
* self
, val
* p0
) {
485 val
* var_v
/* var v: SimpleMiscVisitor */;
486 long var
/* : Int */;
487 long var1
/* : Int */;
488 short int var2
/* : Bool */;
489 short int var4
/* : Bool */;
492 const char* var_class_name
;
493 short int var5
/* : Bool */;
495 val
* var6
/* : String */;
496 char* var7
/* : NativeString */;
497 long var8
/* : Int */;
498 val
* var9
/* : String */;
499 long var10
/* : Int */;
500 long var11
/* : Int */;
501 long var12
/* : Int */;
502 long var14
/* : Int */;
503 long var15
/* : Int */;
504 long var16
/* : Int */;
505 long var17
/* : Int */;
506 long var19
/* : Int */;
508 var
= ((long (*)(val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__once_count
]))(var_v
) /* once_count on <var_v:SimpleMiscVisitor>*/;
510 { /* Inline kernel#Int#> (var,var1) */
511 /* Covariant cast for argument 0 (i) <var1:Int> isa OTHER */
512 /* <var1:Int> isa OTHER */
513 var4
= 1; /* easy <var1:Int> isa OTHER*/
515 var_class_name
= type_kernel__Int
.name
;
516 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
517 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
529 var7
= "Useless once in a once expression.";
531 var9
= string__NativeString__to_s_with_length(var7
, var8
);
535 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__warning
]))(var_v
, self
, var6
) /* warning on <var_v:SimpleMiscVisitor>*/;
538 var10
= ((long (*)(val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__once_count
]))(var_v
) /* once_count on <var_v:SimpleMiscVisitor>*/;
540 { /* Inline kernel#Int#+ (var10,var11) */
541 var14
= var10
+ var11
;
546 ((void (*)(val
*, long))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__once_count_61d
]))(var_v
, var12
) /* once_count= on <var_v:SimpleMiscVisitor>*/;
547 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_simple_misc_analysis__AOnceExpr__accept_simple_misc
]))(self
, p0
) /* accept_simple_misc on <self:AOnceExpr>*/;
548 var15
= ((long (*)(val
*))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__once_count
]))(var_v
) /* once_count on <var_v:SimpleMiscVisitor>*/;
550 { /* Inline kernel#Int#- (var15,var16) */
551 var19
= var15
- var16
;
556 ((void (*)(val
*, long))(var_v
->class->vft
[COLOR_simple_misc_analysis__SimpleMiscVisitor__once_count_61d
]))(var_v
, var17
) /* once_count= on <var_v:SimpleMiscVisitor>*/;
559 /* method simple_misc_analysis#AOnceExpr#accept_simple_misc for (self: Object, SimpleMiscVisitor) */
560 void VIRTUAL_simple_misc_analysis__AOnceExpr__accept_simple_misc(val
* self
, val
* p0
) {
561 simple_misc_analysis__AOnceExpr__accept_simple_misc(self
, p0
);