1 #include "rapid_type_analysis.sep.0.h"
2 /* method rapid_type_analysis#ModelBuilder#do_rapid_type_analysis for (self: ModelBuilder, MModule): RapidTypeAnalysis */
3 val
* rapid_type_analysis__ModelBuilder__do_rapid_type_analysis(val
* self
, val
* p0
) {
4 val
* var
/* : RapidTypeAnalysis */;
5 val
* var_mainmodule
/* var mainmodule: MModule */;
6 val
* var1
/* : RapidTypeAnalysis */;
7 val
* var_analysis
/* var analysis: RapidTypeAnalysis */;
9 var1
= NEW_rapid_type_analysis__RapidTypeAnalysis(&type_rapid_type_analysis__RapidTypeAnalysis
);
10 ((void (*)(val
*, val
*, val
*))(var1
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__init
]))(var1
, self
, var_mainmodule
) /* init on <var1:RapidTypeAnalysis>*/;
11 CHECK_NEW_rapid_type_analysis__RapidTypeAnalysis(var1
);
13 ((void (*)(val
*))(var_analysis
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__run_analysis
]))(var_analysis
) /* run_analysis on <var_analysis:RapidTypeAnalysis>*/;
19 /* method rapid_type_analysis#ModelBuilder#do_rapid_type_analysis for (self: Object, MModule): RapidTypeAnalysis */
20 val
* VIRTUAL_rapid_type_analysis__ModelBuilder__do_rapid_type_analysis(val
* self
, val
* p0
) {
21 val
* var
/* : RapidTypeAnalysis */;
22 val
* var1
/* : RapidTypeAnalysis */;
23 var1
= rapid_type_analysis__ModelBuilder__do_rapid_type_analysis(self
, p0
);
28 /* method rapid_type_analysis#RapidTypeAnalysis#modelbuilder for (self: RapidTypeAnalysis): ModelBuilder */
29 val
* rapid_type_analysis__RapidTypeAnalysis__modelbuilder(val
* self
) {
30 val
* var
/* : ModelBuilder */;
31 val
* var1
/* : ModelBuilder */;
32 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dmodelbuilder
].val
; /* @modelbuilder on <self:RapidTypeAnalysis> */
34 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @modelbuilder");
35 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 43);
42 /* method rapid_type_analysis#RapidTypeAnalysis#modelbuilder for (self: Object): ModelBuilder */
43 val
* VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__modelbuilder(val
* self
) {
44 val
* var
/* : ModelBuilder */;
45 val
* var1
/* : ModelBuilder */;
46 var1
= rapid_type_analysis__RapidTypeAnalysis__modelbuilder(self
);
51 /* method rapid_type_analysis#RapidTypeAnalysis#modelbuilder= for (self: RapidTypeAnalysis, ModelBuilder) */
52 void rapid_type_analysis__RapidTypeAnalysis__modelbuilder_61d(val
* self
, val
* p0
) {
53 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dmodelbuilder
].val
= p0
; /* @modelbuilder on <self:RapidTypeAnalysis> */
56 /* method rapid_type_analysis#RapidTypeAnalysis#modelbuilder= for (self: Object, ModelBuilder) */
57 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__modelbuilder_61d(val
* self
, val
* p0
) {
58 rapid_type_analysis__RapidTypeAnalysis__modelbuilder_61d(self
, p0
);
61 /* method rapid_type_analysis#RapidTypeAnalysis#mainmodule for (self: RapidTypeAnalysis): MModule */
62 val
* rapid_type_analysis__RapidTypeAnalysis__mainmodule(val
* self
) {
63 val
* var
/* : MModule */;
64 val
* var1
/* : MModule */;
65 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dmainmodule
].val
; /* @mainmodule on <self:RapidTypeAnalysis> */
67 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @mainmodule");
68 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 46);
75 /* method rapid_type_analysis#RapidTypeAnalysis#mainmodule for (self: Object): MModule */
76 val
* VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__mainmodule(val
* self
) {
77 val
* var
/* : MModule */;
78 val
* var1
/* : MModule */;
79 var1
= rapid_type_analysis__RapidTypeAnalysis__mainmodule(self
);
84 /* method rapid_type_analysis#RapidTypeAnalysis#mainmodule= for (self: RapidTypeAnalysis, MModule) */
85 void rapid_type_analysis__RapidTypeAnalysis__mainmodule_61d(val
* self
, val
* p0
) {
86 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dmainmodule
].val
= p0
; /* @mainmodule on <self:RapidTypeAnalysis> */
89 /* method rapid_type_analysis#RapidTypeAnalysis#mainmodule= for (self: Object, MModule) */
90 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__mainmodule_61d(val
* self
, val
* p0
) {
91 rapid_type_analysis__RapidTypeAnalysis__mainmodule_61d(self
, p0
);
94 /* method rapid_type_analysis#RapidTypeAnalysis#live_types for (self: RapidTypeAnalysis): HashSet[MClassType] */
95 val
* rapid_type_analysis__RapidTypeAnalysis__live_types(val
* self
) {
96 val
* var
/* : HashSet[MClassType] */;
97 val
* var1
/* : HashSet[MClassType] */;
98 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_types
].val
; /* @live_types on <self:RapidTypeAnalysis> */
100 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @live_types");
101 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 50);
108 /* method rapid_type_analysis#RapidTypeAnalysis#live_types for (self: Object): HashSet[MClassType] */
109 val
* VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_types(val
* self
) {
110 val
* var
/* : HashSet[MClassType] */;
111 val
* var1
/* : HashSet[MClassType] */;
112 var1
= rapid_type_analysis__RapidTypeAnalysis__live_types(self
);
117 /* method rapid_type_analysis#RapidTypeAnalysis#live_types= for (self: RapidTypeAnalysis, HashSet[MClassType]) */
118 void rapid_type_analysis__RapidTypeAnalysis__live_types_61d(val
* self
, val
* p0
) {
119 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_types
].val
= p0
; /* @live_types on <self:RapidTypeAnalysis> */
122 /* method rapid_type_analysis#RapidTypeAnalysis#live_types= for (self: Object, HashSet[MClassType]) */
123 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_types_61d(val
* self
, val
* p0
) {
124 rapid_type_analysis__RapidTypeAnalysis__live_types_61d(self
, p0
);
127 /* method rapid_type_analysis#RapidTypeAnalysis#live_open_types for (self: RapidTypeAnalysis): HashSet[MClassType] */
128 val
* rapid_type_analysis__RapidTypeAnalysis__live_open_types(val
* self
) {
129 val
* var
/* : HashSet[MClassType] */;
130 val
* var1
/* : HashSet[MClassType] */;
131 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_open_types
].val
; /* @live_open_types on <self:RapidTypeAnalysis> */
133 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @live_open_types");
134 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 55);
141 /* method rapid_type_analysis#RapidTypeAnalysis#live_open_types for (self: Object): HashSet[MClassType] */
142 val
* VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_open_types(val
* self
) {
143 val
* var
/* : HashSet[MClassType] */;
144 val
* var1
/* : HashSet[MClassType] */;
145 var1
= rapid_type_analysis__RapidTypeAnalysis__live_open_types(self
);
150 /* method rapid_type_analysis#RapidTypeAnalysis#live_open_types= for (self: RapidTypeAnalysis, HashSet[MClassType]) */
151 void rapid_type_analysis__RapidTypeAnalysis__live_open_types_61d(val
* self
, val
* p0
) {
152 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_open_types
].val
= p0
; /* @live_open_types on <self:RapidTypeAnalysis> */
155 /* method rapid_type_analysis#RapidTypeAnalysis#live_open_types= for (self: Object, HashSet[MClassType]) */
156 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_open_types_61d(val
* self
, val
* p0
) {
157 rapid_type_analysis__RapidTypeAnalysis__live_open_types_61d(self
, p0
);
160 /* method rapid_type_analysis#RapidTypeAnalysis#live_classes for (self: RapidTypeAnalysis): HashSet[MClass] */
161 val
* rapid_type_analysis__RapidTypeAnalysis__live_classes(val
* self
) {
162 val
* var
/* : HashSet[MClass] */;
163 val
* var1
/* : HashSet[MClass] */;
164 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_classes
].val
; /* @live_classes on <self:RapidTypeAnalysis> */
166 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @live_classes");
167 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 59);
174 /* method rapid_type_analysis#RapidTypeAnalysis#live_classes for (self: Object): HashSet[MClass] */
175 val
* VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_classes(val
* self
) {
176 val
* var
/* : HashSet[MClass] */;
177 val
* var1
/* : HashSet[MClass] */;
178 var1
= rapid_type_analysis__RapidTypeAnalysis__live_classes(self
);
183 /* method rapid_type_analysis#RapidTypeAnalysis#live_classes= for (self: RapidTypeAnalysis, HashSet[MClass]) */
184 void rapid_type_analysis__RapidTypeAnalysis__live_classes_61d(val
* self
, val
* p0
) {
185 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_classes
].val
= p0
; /* @live_classes on <self:RapidTypeAnalysis> */
188 /* method rapid_type_analysis#RapidTypeAnalysis#live_classes= for (self: Object, HashSet[MClass]) */
189 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_classes_61d(val
* self
, val
* p0
) {
190 rapid_type_analysis__RapidTypeAnalysis__live_classes_61d(self
, p0
);
193 /* method rapid_type_analysis#RapidTypeAnalysis#live_cast_types for (self: RapidTypeAnalysis): HashSet[MClassType] */
194 val
* rapid_type_analysis__RapidTypeAnalysis__live_cast_types(val
* self
) {
195 val
* var
/* : HashSet[MClassType] */;
196 val
* var1
/* : HashSet[MClassType] */;
197 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_cast_types
].val
; /* @live_cast_types on <self:RapidTypeAnalysis> */
199 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @live_cast_types");
200 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 62);
207 /* method rapid_type_analysis#RapidTypeAnalysis#live_cast_types for (self: Object): HashSet[MClassType] */
208 val
* VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_cast_types(val
* self
) {
209 val
* var
/* : HashSet[MClassType] */;
210 val
* var1
/* : HashSet[MClassType] */;
211 var1
= rapid_type_analysis__RapidTypeAnalysis__live_cast_types(self
);
216 /* method rapid_type_analysis#RapidTypeAnalysis#live_cast_types= for (self: RapidTypeAnalysis, HashSet[MClassType]) */
217 void rapid_type_analysis__RapidTypeAnalysis__live_cast_types_61d(val
* self
, val
* p0
) {
218 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_cast_types
].val
= p0
; /* @live_cast_types on <self:RapidTypeAnalysis> */
221 /* method rapid_type_analysis#RapidTypeAnalysis#live_cast_types= for (self: Object, HashSet[MClassType]) */
222 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_cast_types_61d(val
* self
, val
* p0
) {
223 rapid_type_analysis__RapidTypeAnalysis__live_cast_types_61d(self
, p0
);
226 /* method rapid_type_analysis#RapidTypeAnalysis#live_open_cast_types for (self: RapidTypeAnalysis): HashSet[MType] */
227 val
* rapid_type_analysis__RapidTypeAnalysis__live_open_cast_types(val
* self
) {
228 val
* var
/* : HashSet[MType] */;
229 val
* var1
/* : HashSet[MType] */;
230 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_open_cast_types
].val
; /* @live_open_cast_types on <self:RapidTypeAnalysis> */
232 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @live_open_cast_types");
233 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 65);
240 /* method rapid_type_analysis#RapidTypeAnalysis#live_open_cast_types for (self: Object): HashSet[MType] */
241 val
* VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_open_cast_types(val
* self
) {
242 val
* var
/* : HashSet[MType] */;
243 val
* var1
/* : HashSet[MType] */;
244 var1
= rapid_type_analysis__RapidTypeAnalysis__live_open_cast_types(self
);
249 /* method rapid_type_analysis#RapidTypeAnalysis#live_open_cast_types= for (self: RapidTypeAnalysis, HashSet[MType]) */
250 void rapid_type_analysis__RapidTypeAnalysis__live_open_cast_types_61d(val
* self
, val
* p0
) {
251 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_open_cast_types
].val
= p0
; /* @live_open_cast_types on <self:RapidTypeAnalysis> */
254 /* method rapid_type_analysis#RapidTypeAnalysis#live_open_cast_types= for (self: Object, HashSet[MType]) */
255 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_open_cast_types_61d(val
* self
, val
* p0
) {
256 rapid_type_analysis__RapidTypeAnalysis__live_open_cast_types_61d(self
, p0
);
259 /* method rapid_type_analysis#RapidTypeAnalysis#live_methoddefs for (self: RapidTypeAnalysis): HashSet[MMethodDef] */
260 val
* rapid_type_analysis__RapidTypeAnalysis__live_methoddefs(val
* self
) {
261 val
* var
/* : HashSet[MMethodDef] */;
262 val
* var1
/* : HashSet[MMethodDef] */;
263 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_methoddefs
].val
; /* @live_methoddefs on <self:RapidTypeAnalysis> */
265 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @live_methoddefs");
266 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 69);
273 /* method rapid_type_analysis#RapidTypeAnalysis#live_methoddefs for (self: Object): HashSet[MMethodDef] */
274 val
* VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_methoddefs(val
* self
) {
275 val
* var
/* : HashSet[MMethodDef] */;
276 val
* var1
/* : HashSet[MMethodDef] */;
277 var1
= rapid_type_analysis__RapidTypeAnalysis__live_methoddefs(self
);
282 /* method rapid_type_analysis#RapidTypeAnalysis#live_methoddefs= for (self: RapidTypeAnalysis, HashSet[MMethodDef]) */
283 void rapid_type_analysis__RapidTypeAnalysis__live_methoddefs_61d(val
* self
, val
* p0
) {
284 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_methoddefs
].val
= p0
; /* @live_methoddefs on <self:RapidTypeAnalysis> */
287 /* method rapid_type_analysis#RapidTypeAnalysis#live_methoddefs= for (self: Object, HashSet[MMethodDef]) */
288 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_methoddefs_61d(val
* self
, val
* p0
) {
289 rapid_type_analysis__RapidTypeAnalysis__live_methoddefs_61d(self
, p0
);
292 /* method rapid_type_analysis#RapidTypeAnalysis#live_methods for (self: RapidTypeAnalysis): HashSet[MMethod] */
293 val
* rapid_type_analysis__RapidTypeAnalysis__live_methods(val
* self
) {
294 val
* var
/* : HashSet[MMethod] */;
295 val
* var1
/* : HashSet[MMethod] */;
296 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_methods
].val
; /* @live_methods on <self:RapidTypeAnalysis> */
298 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @live_methods");
299 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 72);
306 /* method rapid_type_analysis#RapidTypeAnalysis#live_methods for (self: Object): HashSet[MMethod] */
307 val
* VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_methods(val
* self
) {
308 val
* var
/* : HashSet[MMethod] */;
309 val
* var1
/* : HashSet[MMethod] */;
310 var1
= rapid_type_analysis__RapidTypeAnalysis__live_methods(self
);
315 /* method rapid_type_analysis#RapidTypeAnalysis#live_methods= for (self: RapidTypeAnalysis, HashSet[MMethod]) */
316 void rapid_type_analysis__RapidTypeAnalysis__live_methods_61d(val
* self
, val
* p0
) {
317 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_methods
].val
= p0
; /* @live_methods on <self:RapidTypeAnalysis> */
320 /* method rapid_type_analysis#RapidTypeAnalysis#live_methods= for (self: Object, HashSet[MMethod]) */
321 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_methods_61d(val
* self
, val
* p0
) {
322 rapid_type_analysis__RapidTypeAnalysis__live_methods_61d(self
, p0
);
325 /* method rapid_type_analysis#RapidTypeAnalysis#live_super_sends for (self: RapidTypeAnalysis): HashSet[MMethodDef] */
326 val
* rapid_type_analysis__RapidTypeAnalysis__live_super_sends(val
* self
) {
327 val
* var
/* : HashSet[MMethodDef] */;
328 val
* var1
/* : HashSet[MMethodDef] */;
329 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_super_sends
].val
; /* @live_super_sends on <self:RapidTypeAnalysis> */
331 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @live_super_sends");
332 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 75);
339 /* method rapid_type_analysis#RapidTypeAnalysis#live_super_sends for (self: Object): HashSet[MMethodDef] */
340 val
* VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_super_sends(val
* self
) {
341 val
* var
/* : HashSet[MMethodDef] */;
342 val
* var1
/* : HashSet[MMethodDef] */;
343 var1
= rapid_type_analysis__RapidTypeAnalysis__live_super_sends(self
);
348 /* method rapid_type_analysis#RapidTypeAnalysis#live_super_sends= for (self: RapidTypeAnalysis, HashSet[MMethodDef]) */
349 void rapid_type_analysis__RapidTypeAnalysis__live_super_sends_61d(val
* self
, val
* p0
) {
350 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dlive_super_sends
].val
= p0
; /* @live_super_sends on <self:RapidTypeAnalysis> */
353 /* method rapid_type_analysis#RapidTypeAnalysis#live_super_sends= for (self: Object, HashSet[MMethodDef]) */
354 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__live_super_sends_61d(val
* self
, val
* p0
) {
355 rapid_type_analysis__RapidTypeAnalysis__live_super_sends_61d(self
, p0
);
358 /* method rapid_type_analysis#RapidTypeAnalysis#totry_methods for (self: RapidTypeAnalysis): HashSet[MMethod] */
359 val
* rapid_type_analysis__RapidTypeAnalysis__totry_methods(val
* self
) {
360 val
* var
/* : HashSet[MMethod] */;
361 val
* var1
/* : HashSet[MMethod] */;
362 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dtotry_methods
].val
; /* @totry_methods on <self:RapidTypeAnalysis> */
364 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @totry_methods");
365 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 78);
372 /* method rapid_type_analysis#RapidTypeAnalysis#totry_methods for (self: Object): HashSet[MMethod] */
373 val
* VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__totry_methods(val
* self
) {
374 val
* var
/* : HashSet[MMethod] */;
375 val
* var1
/* : HashSet[MMethod] */;
376 var1
= rapid_type_analysis__RapidTypeAnalysis__totry_methods(self
);
381 /* method rapid_type_analysis#RapidTypeAnalysis#totry_methods= for (self: RapidTypeAnalysis, HashSet[MMethod]) */
382 void rapid_type_analysis__RapidTypeAnalysis__totry_methods_61d(val
* self
, val
* p0
) {
383 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dtotry_methods
].val
= p0
; /* @totry_methods on <self:RapidTypeAnalysis> */
386 /* method rapid_type_analysis#RapidTypeAnalysis#totry_methods= for (self: Object, HashSet[MMethod]) */
387 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__totry_methods_61d(val
* self
, val
* p0
) {
388 rapid_type_analysis__RapidTypeAnalysis__totry_methods_61d(self
, p0
);
391 /* method rapid_type_analysis#RapidTypeAnalysis#todo for (self: RapidTypeAnalysis): List[MMethodDef] */
392 val
* rapid_type_analysis__RapidTypeAnalysis__todo(val
* self
) {
393 val
* var
/* : List[MMethodDef] */;
394 val
* var1
/* : List[MMethodDef] */;
395 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dtodo
].val
; /* @todo on <self:RapidTypeAnalysis> */
397 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @todo");
398 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 81);
405 /* method rapid_type_analysis#RapidTypeAnalysis#todo for (self: Object): List[MMethodDef] */
406 val
* VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__todo(val
* self
) {
407 val
* var
/* : List[MMethodDef] */;
408 val
* var1
/* : List[MMethodDef] */;
409 var1
= rapid_type_analysis__RapidTypeAnalysis__todo(self
);
414 /* method rapid_type_analysis#RapidTypeAnalysis#todo= for (self: RapidTypeAnalysis, List[MMethodDef]) */
415 void rapid_type_analysis__RapidTypeAnalysis__todo_61d(val
* self
, val
* p0
) {
416 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dtodo
].val
= p0
; /* @todo on <self:RapidTypeAnalysis> */
419 /* method rapid_type_analysis#RapidTypeAnalysis#todo= for (self: Object, List[MMethodDef]) */
420 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__todo_61d(val
* self
, val
* p0
) {
421 rapid_type_analysis__RapidTypeAnalysis__todo_61d(self
, p0
);
424 /* method rapid_type_analysis#RapidTypeAnalysis#run_analysis for (self: RapidTypeAnalysis) */
425 void rapid_type_analysis__RapidTypeAnalysis__run_analysis(val
* self
) {
426 val
* var
/* : MModule */;
427 val
* var1
/* : nullable MClassType */;
428 val
* var_maintype
/* var maintype: nullable MClassType */;
429 val
* var2
/* : null */;
430 short int var3
/* : Bool */;
431 val
* var4
/* : MModule */;
433 val
* var5
/* : String */;
434 char* var6
/* : NativeString */;
435 long var7
/* : Int */;
436 val
* var8
/* : String */;
437 val
* var9
/* : MClass */;
438 val
* var10
/* : nullable MMethod */;
439 val
* var_initprop
/* var initprop: nullable MMethod */;
440 val
* var11
/* : null */;
441 short int var12
/* : Bool */;
442 val
* var13
/* : MModule */;
443 static val
* varonce14
;
444 val
* var15
/* : String */;
445 char* var16
/* : NativeString */;
446 long var17
/* : Int */;
447 val
* var18
/* : String */;
448 val
* var19
/* : MClass */;
449 val
* var20
/* : nullable MMethod */;
450 val
* var_mainprop
/* var mainprop: nullable MMethod */;
451 val
* var21
/* : null */;
452 short int var22
/* : Bool */;
453 val
* var23
/* : ModelBuilder */;
454 val
* var24
/* : Model */;
455 static val
* varonce25
;
456 val
* var26
/* : String */;
457 char* var27
/* : NativeString */;
458 long var28
/* : Int */;
459 val
* var29
/* : String */;
460 val
* var30
/* : nullable Array[MClass] */;
461 val
* var_classes
/* var classes: nullable Array[MClass] */;
462 val
* var31
/* : null */;
463 short int var32
/* : Bool */;
464 val
* var33
/* : Iterator[nullable Object] */;
465 short int var34
/* : Bool */;
466 val
* var35
/* : nullable Object */;
467 val
* var_c
/* var c: MClass */;
468 val
* var36
/* : MClassType */;
469 val
* var37
/* : MClassType */;
470 val
* var38
/* : List[MMethodDef] */;
471 short int var39
/* : Bool */;
472 short int var40
/* : Bool */;
473 val
* var41
/* : List[MMethodDef] */;
474 val
* var42
/* : nullable Object */;
475 val
* var_mmethoddef
/* var mmethoddef: MMethodDef */;
476 val
* var43
/* : RapidTypeVisitor */;
477 val
* var44
/* : MClassDef */;
478 val
* var45
/* : MClassType */;
479 val
* var_v
/* var v: RapidTypeVisitor */;
480 val
* var46
/* : nullable MSignature */;
481 long var47
/* : Int */;
482 long var_vararg_rank
/* var vararg_rank: Int */;
483 long var48
/* : Int */;
484 long var49
/* : Int */;
485 long var51
/* : Int */;
486 short int var52
/* : Bool */;
487 short int var54
/* : Bool */;
490 const char* var_class_name
;
491 short int var55
/* : Bool */;
492 val
* var56
/* : ModelBuilder */;
493 val
* var57
/* : HashMap[MPropDef, APropdef] */;
494 val
* var58
/* : nullable Object */;
495 val
* var_node
/* var node: APropdef */;
496 val
* var59
/* : nullable MSignature */;
497 val
* var60
/* : Array[MParameter] */;
498 val
* var61
/* : nullable Object */;
499 val
* var62
/* : MType */;
500 val
* var_elttype
/* var elttype: MType */;
501 val
* var63
/* : MModule */;
502 static val
* varonce64
;
503 val
* var65
/* : String */;
504 char* var66
/* : NativeString */;
505 long var67
/* : Int */;
506 val
* var68
/* : String */;
507 val
* var69
/* : MClass */;
508 val
* var70
/* : Array[MType] */;
509 long var71
/* : Int */;
510 val
* var72
/* : NativeArray[MType] */;
511 val
* var73
/* : MClassType */;
512 val
* var_vararg
/* var vararg: MClassType */;
513 val
* var74
/* : ModelBuilder */;
514 static val
* varonce75
;
515 val
* var76
/* : String */;
516 char* var77
/* : NativeString */;
517 long var78
/* : Int */;
518 val
* var79
/* : String */;
519 val
* var80
/* : MClass */;
520 val
* var81
/* : MModule */;
521 val
* var82
/* : MMethod */;
522 val
* var83
/* : MModule */;
523 static val
* varonce84
;
524 val
* var85
/* : String */;
525 char* var86
/* : NativeString */;
526 long var87
/* : Int */;
527 val
* var88
/* : String */;
528 val
* var89
/* : MClass */;
529 val
* var90
/* : Array[MType] */;
530 long var91
/* : Int */;
531 val
* var92
/* : NativeArray[MType] */;
532 val
* var93
/* : MClassType */;
533 val
* var_native
/* var native: MClassType */;
534 val
* var94
/* : Range[Int] */;
535 long var95
/* : Int */;
536 val
* var96
/* : nullable MSignature */;
537 long var97
/* : Int */;
538 val
* var98
/* : Discrete */;
539 val
* var99
/* : Discrete */;
540 val
* var100
/* : Iterator[nullable Object] */;
541 short int var101
/* : Bool */;
542 val
* var102
/* : nullable Object */;
543 long var_i
/* var i: Int */;
544 long var103
/* : Int */;
545 val
* var104
/* : MProperty */;
546 val
* var105
/* : MPropDef */;
547 val
* var106
/* : nullable MSignature */;
548 val
* var107
/* : Array[MParameter] */;
549 val
* var108
/* : nullable Object */;
550 val
* var109
/* : MType */;
551 val
* var_origtype
/* var origtype: MType */;
552 short int var110
/* : Bool */;
553 short int var111
/* : Bool */;
554 val
* var113
/* : nullable MSignature */;
555 val
* var114
/* : Array[MParameter] */;
556 val
* var115
/* : nullable Object */;
557 val
* var116
/* : MType */;
558 val
* var_paramtype
/* var paramtype: MType */;
559 val
* var117
/* : ModelBuilder */;
560 val
* var118
/* : HashMap[MPropDef, APropdef] */;
561 short int var119
/* : Bool */;
562 short int var120
/* : Bool */;
563 val
* var121
/* : MProperty */;
564 val
* var122
/* : String */;
565 static val
* varonce123
;
566 val
* var124
/* : String */;
567 char* var125
/* : NativeString */;
568 long var126
/* : Int */;
569 val
* var127
/* : String */;
570 short int var128
/* : Bool */;
571 val
* var129
/* : ModelBuilder */;
572 val
* var130
/* : HashMap[MClassDef, AClassdef] */;
573 val
* var131
/* : MClassDef */;
574 val
* var132
/* : nullable Object */;
575 val
* var_nclassdef
/* var nclassdef: AClassdef */;
576 val
* var133
/* : nullable Collection[MMethod] */;
577 val
* var_super_inits
/* var super_inits: nullable Collection[MMethod] */;
578 val
* var134
/* : null */;
579 short int var135
/* : Bool */;
580 val
* var136
/* : Iterator[nullable Object] */;
581 short int var137
/* : Bool */;
582 val
* var138
/* : nullable Object */;
583 val
* var_su
/* var su: MMethod */;
584 val
* var139
/* : MClassType */;
585 val
* var142
/* : ModelBuilder */;
586 val
* var143
/* : HashMap[MPropDef, APropdef] */;
587 val
* var144
/* : nullable Object */;
588 val
* var_npropdef
/* var npropdef: APropdef */;
589 short int var145
/* : Bool */;
592 val
* var148
/* : nullable Array[MMethod] */;
593 val
* var_auto_super_inits
/* var auto_super_inits: nullable Array[MMethod] */;
594 val
* var149
/* : null */;
595 short int var150
/* : Bool */;
596 val
* var151
/* : Iterator[nullable Object] */;
597 short int var152
/* : Bool */;
598 val
* var153
/* : nullable Object */;
599 val
* var_auto_super_init
/* var auto_super_init: MMethod */;
600 val
* var154
/* : MClassType */;
601 short int var156
/* : Bool */;
602 short int var157
/* : Bool */;
605 short int var_
/* var : Bool */;
606 short int var160
/* : Bool */;
609 val
* var163
/* : nullable MSignature */;
610 val
* var164
/* : nullable MType */;
611 val
* var_ret
/* var ret: nullable MType */;
612 short int var165
/* : Bool */;
613 short int var166
/* : Bool */;
614 short int var167
/* : Bool */;
615 val
* var168
/* : null */;
616 short int var169
/* : Bool */;
617 short int var_170
/* var : Bool */;
618 short int var171
/* : Bool */;
621 short int var_174
/* var : Bool */;
622 val
* var175
/* : MClass */;
623 val
* var176
/* : MClassKind */;
624 val
* var177
/* : MClassKind */;
625 short int var178
/* : Bool */;
626 short int var_179
/* var : Bool */;
627 val
* var180
/* : MClass */;
628 val
* var181
/* : MClassKind */;
629 val
* var182
/* : MClassKind */;
630 short int var183
/* : Bool */;
631 short int var184
/* : Bool */;
634 val
* var187
/* : MClassType */;
635 val
* var188
/* : List[MClassType] */;
636 val
* var_todo_types
/* var todo_types: List[MClassType] */;
637 val
* var189
/* : HashSet[MClassType] */;
638 short int var190
/* : Bool */;
639 short int var191
/* : Bool */;
640 val
* var192
/* : nullable Object */;
641 val
* var_t
/* var t: MClassType */;
642 val
* var193
/* : HashSet[MClassType] */;
643 val
* var194
/* : Iterator[nullable Object] */;
644 short int var195
/* : Bool */;
645 val
* var196
/* : nullable Object */;
646 val
* var_ot
/* var ot: MClassType */;
647 val
* var197
/* : MModule */;
648 short int var198
/* : Bool */;
649 short int var199
/* : Bool */;
650 val
* var201
/* : MModule */;
651 val
* var202
/* : MType */;
652 val
* var_rt
/* var rt: MClassType */;
653 val
* var203
/* : HashSet[MClassType] */;
654 short int var204
/* : Bool */;
655 val
* var205
/* : HashSet[MClassType] */;
656 val
* var207
/* : HashSet[MType] */;
657 val
* var208
/* : Iterator[nullable Object] */;
658 short int var209
/* : Bool */;
659 val
* var210
/* : nullable Object */;
660 val
* var_ot211
/* var ot: MType */;
661 val
* var212
/* : HashSet[MClassType] */;
662 val
* var213
/* : Iterator[nullable Object] */;
663 short int var214
/* : Bool */;
664 val
* var215
/* : nullable Object */;
665 val
* var_t216
/* var t: MClassType */;
666 val
* var217
/* : MModule */;
667 short int var218
/* : Bool */;
668 short int var219
/* : Bool */;
669 val
* var221
/* : MModule */;
670 val
* var222
/* : MType */;
671 val
* var_rt223
/* var rt: MType */;
672 short int var224
/* : Bool */;
675 val
* var227
/* : MType */;
676 short int var228
/* : Bool */;
679 val
* var231
/* : HashSet[MClassType] */;
680 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
681 var1
= ((val
* (*)(val
*))(var
->class->vft
[COLOR_model__MModule__sys_type
]))(var
) /* sys_type on <var:MModule>*/;
684 if (var_maintype
== NULL
) {
685 var3
= 1; /* is null */
687 var3
= 0; /* arg is null but recv is not */
693 ((void (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__add_new
]))(self
, var_maintype
, var_maintype
) /* add_new on <self:RapidTypeAnalysis>*/;
694 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
700 var8
= string__NativeString__to_s_with_length(var6
, var7
);
704 var9
= ((val
* (*)(val
*))(var_maintype
->class->vft
[COLOR_model__MClassType__mclass
]))(var_maintype
) /* mclass on <var_maintype:nullable MClassType(MClassType)>*/;
705 var10
= ((val
* (*)(val
*, val
*, val
*))(var4
->class->vft
[COLOR_model__MModule__try_get_primitive_method
]))(var4
, var5
, var9
) /* try_get_primitive_method on <var4:MModule>*/;
706 var_initprop
= var10
;
708 if (var_initprop
== NULL
) {
709 var12
= 0; /* is null */
711 var12
= 1; /* arg is null and recv is not */
714 ((void (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__add_send
]))(self
, var_maintype
, var_initprop
) /* add_send on <self:RapidTypeAnalysis>*/;
717 var13
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
723 var18
= string__NativeString__to_s_with_length(var16
, var17
);
727 var19
= ((val
* (*)(val
*))(var_maintype
->class->vft
[COLOR_model__MClassType__mclass
]))(var_maintype
) /* mclass on <var_maintype:nullable MClassType(MClassType)>*/;
728 var20
= ((val
* (*)(val
*, val
*, val
*))(var13
->class->vft
[COLOR_model__MModule__try_get_primitive_method
]))(var13
, var15
, var19
) /* try_get_primitive_method on <var13:MModule>*/;
729 var_mainprop
= var20
;
731 if (var_mainprop
== NULL
) {
732 var22
= 0; /* is null */
734 var22
= 1; /* arg is null and recv is not */
737 ((void (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__add_send
]))(self
, var_maintype
, var_mainprop
) /* add_send on <self:RapidTypeAnalysis>*/;
740 var23
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__modelbuilder
]))(self
) /* modelbuilder on <self:RapidTypeAnalysis>*/;
741 var24
= ((val
* (*)(val
*))(var23
->class->vft
[COLOR_modelbuilder__ModelBuilder__model
]))(var23
) /* model on <var23:ModelBuilder>*/;
747 var29
= string__NativeString__to_s_with_length(var27
, var28
);
751 var30
= ((val
* (*)(val
*, val
*))(var24
->class->vft
[COLOR_model__Model__get_mclasses_by_name
]))(var24
, var26
) /* get_mclasses_by_name on <var24:Model>*/;
754 if (var_classes
== NULL
) {
755 var32
= 0; /* is null */
757 var32
= 1; /* arg is null and recv is not */
760 var33
= ((val
* (*)(val
*))(var_classes
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_classes
) /* iterator on <var_classes:nullable Array[MClass](Array[MClass])>*/;
762 var34
= ((short int (*)(val
*))(var33
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var33
) /* is_ok on <var33:Iterator[nullable Object]>*/;
764 var35
= ((val
* (*)(val
*))(var33
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var33
) /* item on <var33:Iterator[nullable Object]>*/;
766 var36
= ((val
* (*)(val
*))(var_c
->class->vft
[COLOR_model__MClass__mclass_type
]))(var_c
) /* mclass_type on <var_c:MClass>*/;
767 var37
= ((val
* (*)(val
*))(var_c
->class->vft
[COLOR_model__MClass__mclass_type
]))(var_c
) /* mclass_type on <var_c:MClass>*/;
768 ((void (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__add_new
]))(self
, var36
, var37
) /* add_new on <self:RapidTypeAnalysis>*/;
769 CONTINUE_label
: (void)0;
770 ((void (*)(val
*))(var33
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var33
) /* next on <var33:Iterator[nullable Object]>*/;
772 BREAK_label
: (void)0;
776 var38
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__todo
]))(self
) /* todo on <self:RapidTypeAnalysis>*/;
777 var39
= ((short int (*)(val
*))(var38
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(var38
) /* is_empty on <var38:List[MMethodDef]>*/;
780 var41
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__todo
]))(self
) /* todo on <self:RapidTypeAnalysis>*/;
781 var42
= ((val
* (*)(val
*))(var41
->class->vft
[COLOR_abstract_collection__Sequence__shift
]))(var41
) /* shift on <var41:List[MMethodDef]>*/;
782 var_mmethoddef
= var42
;
783 var43
= NEW_rapid_type_analysis__RapidTypeVisitor(&type_rapid_type_analysis__RapidTypeVisitor
);
784 var44
= ((val
* (*)(val
*))(var_mmethoddef
->class->vft
[COLOR_model__MPropDef__mclassdef
]))(var_mmethoddef
) /* mclassdef on <var_mmethoddef:MMethodDef>*/;
785 var45
= ((val
* (*)(val
*))(var44
->class->vft
[COLOR_model__MClassDef__bound_mtype
]))(var44
) /* bound_mtype on <var44:MClassDef>*/;
786 ((void (*)(val
*, val
*, val
*, val
*))(var43
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__init
]))(var43
, self
, var45
, var_mmethoddef
) /* init on <var43:RapidTypeVisitor>*/;
787 CHECK_NEW_rapid_type_analysis__RapidTypeVisitor(var43
);
789 var46
= ((val
* (*)(val
*))(var_mmethoddef
->class->vft
[COLOR_model__MMethodDef__msignature
]))(var_mmethoddef
) /* msignature on <var_mmethoddef:MMethodDef>*/;
791 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
792 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 108);
795 var47
= ((long (*)(val
*))(var46
->class->vft
[COLOR_model__MSignature__vararg_rank
]))(var46
) /* vararg_rank on <var46:nullable MSignature>*/;
797 var_vararg_rank
= var47
;
799 { /* Inline kernel#Int#unary - (var48) */
805 { /* Inline kernel#Int#> (var_vararg_rank,var49) */
806 /* Covariant cast for argument 0 (i) <var49:Int> isa OTHER */
807 /* <var49:Int> isa OTHER */
808 var54
= 1; /* easy <var49:Int> isa OTHER*/
810 var_class_name
= type_kernel__Int
.name
;
811 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
812 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
815 var55
= var_vararg_rank
> var49
;
821 var56
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__modelbuilder
]))(self
) /* modelbuilder on <self:RapidTypeAnalysis>*/;
822 var57
= ((val
* (*)(val
*))(var56
->class->vft
[COLOR_modelize_property__ModelBuilder__mpropdef2npropdef
]))(var56
) /* mpropdef2npropdef on <var56:ModelBuilder>*/;
823 var58
= ((val
* (*)(val
*, val
*))(var57
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var57
, var_mmethoddef
) /* [] on <var57:HashMap[MPropDef, APropdef]>*/;
825 var59
= ((val
* (*)(val
*))(var_mmethoddef
->class->vft
[COLOR_model__MMethodDef__msignature
]))(var_mmethoddef
) /* msignature on <var_mmethoddef:MMethodDef>*/;
827 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
828 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 111);
831 var60
= ((val
* (*)(val
*))(var59
->class->vft
[COLOR_model__MSignature__mparameters
]))(var59
) /* mparameters on <var59:nullable MSignature>*/;
833 var61
= ((val
* (*)(val
*, long))(var60
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(var60
, var_vararg_rank
) /* [] on <var60:Array[MParameter]>*/;
834 var62
= ((val
* (*)(val
*))(var61
->class->vft
[COLOR_model__MParameter__mtype
]))(var61
) /* mtype on <var61:nullable Object(MParameter)>*/;
836 var63
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
842 var68
= string__NativeString__to_s_with_length(var66
, var67
);
846 var69
= ((val
* (*)(val
*, val
*))(var63
->class->vft
[COLOR_model__MModule__get_primitive_class
]))(var63
, var65
) /* get_primitive_class on <var63:MModule>*/;
847 var70
= NEW_array__Array(&type_array__Arraymodel__MType
);
848 { /* var70 = array_instance Array[MType] */
850 var72
= NEW_array__NativeArray(var71
, &type_array__NativeArraymodel__MType
);
851 ((struct instance_array__NativeArray
*)var72
)->values
[0] = (val
*) var_elttype
;
852 ((void (*)(val
*, val
*, long))(var70
->class->vft
[COLOR_array__Array__with_native
]))(var70
, var72
, var71
) /* with_native on <var70:Array[MType]>*/;
853 CHECK_NEW_array__Array(var70
);
855 var73
= ((val
* (*)(val
*, val
*))(var69
->class->vft
[COLOR_model__MClass__get_mtype
]))(var69
, var70
) /* get_mtype on <var69:MClass>*/;
857 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var_vararg
) /* add_type on <var_v:RapidTypeVisitor>*/;
858 var74
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__modelbuilder
]))(self
) /* modelbuilder on <self:RapidTypeAnalysis>*/;
862 var77
= "with_native";
864 var79
= string__NativeString__to_s_with_length(var77
, var78
);
868 var80
= ((val
* (*)(val
*))(var_vararg
->class->vft
[COLOR_model__MClassType__mclass
]))(var_vararg
) /* mclass on <var_vararg:MClassType>*/;
869 var81
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
870 var82
= ((val
* (*)(val
*, val
*, val
*, val
*, val
*))(var74
->class->vft
[COLOR_modelbuilder__ModelBuilder__force_get_primitive_method
]))(var74
, var_node
, var76
, var80
, var81
) /* force_get_primitive_method on <var74:ModelBuilder>*/;
871 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var_vararg
, var82
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
872 var83
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
876 var86
= "NativeArray";
878 var88
= string__NativeString__to_s_with_length(var86
, var87
);
882 var89
= ((val
* (*)(val
*, val
*))(var83
->class->vft
[COLOR_model__MModule__get_primitive_class
]))(var83
, var85
) /* get_primitive_class on <var83:MModule>*/;
883 var90
= NEW_array__Array(&type_array__Arraymodel__MType
);
884 { /* var90 = array_instance Array[MType] */
886 var92
= NEW_array__NativeArray(var91
, &type_array__NativeArraymodel__MType
);
887 ((struct instance_array__NativeArray
*)var92
)->values
[0] = (val
*) var_elttype
;
888 ((void (*)(val
*, val
*, long))(var90
->class->vft
[COLOR_array__Array__with_native
]))(var90
, var92
, var91
) /* with_native on <var90:Array[MType]>*/;
889 CHECK_NEW_array__Array(var90
);
891 var93
= ((val
* (*)(val
*, val
*))(var89
->class->vft
[COLOR_model__MClass__get_mtype
]))(var89
, var90
) /* get_mtype on <var89:MClass>*/;
893 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var_native
) /* add_type on <var_v:RapidTypeVisitor>*/;
896 var94
= NEW_range__Range(&type_range__Rangekernel__Int
);
898 var96
= ((val
* (*)(val
*))(var_mmethoddef
->class->vft
[COLOR_model__MMethodDef__msignature
]))(var_mmethoddef
) /* msignature on <var_mmethoddef:MMethodDef>*/;
900 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
901 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 121);
904 var97
= ((long (*)(val
*))(var96
->class->vft
[COLOR_model__MSignature__arity
]))(var96
) /* arity on <var96:nullable MSignature>*/;
906 var98
= BOX_kernel__Int(var95
); /* autobox from Int to Discrete */
907 var99
= BOX_kernel__Int(var97
); /* autobox from Int to Discrete */
908 ((void (*)(val
*, val
*, val
*))(var94
->class->vft
[COLOR_range__Range__without_last
]))(var94
, var98
, var99
) /* without_last on <var94:Range[Int]>*/;
909 CHECK_NEW_range__Range(var94
);
910 var100
= ((val
* (*)(val
*))(var94
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var94
) /* iterator on <var94:Range[Int]>*/;
912 var101
= ((short int (*)(val
*))(var100
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var100
) /* is_ok on <var100:Iterator[nullable Object]>*/;
914 var102
= ((val
* (*)(val
*))(var100
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var100
) /* item on <var100:Iterator[nullable Object]>*/;
915 var103
= ((struct instance_kernel__Int
*)var102
)->value
; /* autounbox from nullable Object to Int */;
917 var104
= ((val
* (*)(val
*))(var_mmethoddef
->class->vft
[COLOR_model__MPropDef__mproperty
]))(var_mmethoddef
) /* mproperty on <var_mmethoddef:MMethodDef>*/;
918 var105
= ((val
* (*)(val
*))(var104
->class->vft
[COLOR_model__MProperty__intro
]))(var104
) /* intro on <var104:MProperty(MMethod)>*/;
919 var106
= ((val
* (*)(val
*))(var105
->class->vft
[COLOR_model__MMethodDef__msignature
]))(var105
) /* msignature on <var105:MPropDef(MMethodDef)>*/;
920 if (var106
== NULL
) {
921 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
922 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 122);
925 var107
= ((val
* (*)(val
*))(var106
->class->vft
[COLOR_model__MSignature__mparameters
]))(var106
) /* mparameters on <var106:nullable MSignature>*/;
927 var108
= ((val
* (*)(val
*, long))(var107
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(var107
, var_i
) /* [] on <var107:Array[MParameter]>*/;
928 var109
= ((val
* (*)(val
*))(var108
->class->vft
[COLOR_model__MParameter__mtype
]))(var108
) /* mtype on <var108:nullable Object(MParameter)>*/;
929 var_origtype
= var109
;
930 var110
= ((short int (*)(val
*))(var_origtype
->class->vft
[COLOR_model__MType__need_anchor
]))(var_origtype
) /* need_anchor on <var_origtype:MType>*/;
933 goto CONTINUE_label112
;
936 var113
= ((val
* (*)(val
*))(var_mmethoddef
->class->vft
[COLOR_model__MMethodDef__msignature
]))(var_mmethoddef
) /* msignature on <var_mmethoddef:MMethodDef>*/;
937 if (var113
== NULL
) {
938 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
939 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 124);
942 var114
= ((val
* (*)(val
*))(var113
->class->vft
[COLOR_model__MSignature__mparameters
]))(var113
) /* mparameters on <var113:nullable MSignature>*/;
944 var115
= ((val
* (*)(val
*, long))(var114
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(var114
, var_i
) /* [] on <var114:Array[MParameter]>*/;
945 var116
= ((val
* (*)(val
*))(var115
->class->vft
[COLOR_model__MParameter__mtype
]))(var115
) /* mtype on <var115:nullable Object(MParameter)>*/;
946 var_paramtype
= var116
;
947 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__add_cast
]))(self
, var_paramtype
) /* add_cast on <self:RapidTypeAnalysis>*/;
948 CONTINUE_label112
: (void)0;
949 ((void (*)(val
*))(var100
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var100
) /* next on <var100:Iterator[nullable Object]>*/;
951 BREAK_label112
: (void)0;
952 var117
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__modelbuilder
]))(self
) /* modelbuilder on <self:RapidTypeAnalysis>*/;
953 var118
= ((val
* (*)(val
*))(var117
->class->vft
[COLOR_modelize_property__ModelBuilder__mpropdef2npropdef
]))(var117
) /* mpropdef2npropdef on <var117:ModelBuilder>*/;
954 var119
= ((short int (*)(val
*, val
*))(var118
->class->vft
[COLOR_abstract_collection__MapRead__has_key
]))(var118
, var_mmethoddef
) /* has_key on <var118:HashMap[MPropDef, APropdef]>*/;
957 var121
= ((val
* (*)(val
*))(var_mmethoddef
->class->vft
[COLOR_model__MPropDef__mproperty
]))(var_mmethoddef
) /* mproperty on <var_mmethoddef:MMethodDef>*/;
958 var122
= ((val
* (*)(val
*))(var121
->class->vft
[COLOR_model__MProperty__name
]))(var121
) /* name on <var121:MProperty(MMethod)>*/;
964 var127
= string__NativeString__to_s_with_length(var125
, var126
);
968 var128
= ((short int (*)(val
*, val
*))(var122
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var122
, var124
) /* == on <var122:String>*/;
970 var129
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__modelbuilder
]))(self
) /* modelbuilder on <self:RapidTypeAnalysis>*/;
971 var130
= ((val
* (*)(val
*))(var129
->class->vft
[COLOR_modelize_class__ModelBuilder__mclassdef2nclassdef
]))(var129
) /* mclassdef2nclassdef on <var129:ModelBuilder>*/;
972 var131
= ((val
* (*)(val
*))(var_mmethoddef
->class->vft
[COLOR_model__MPropDef__mclassdef
]))(var_mmethoddef
) /* mclassdef on <var_mmethoddef:MMethodDef>*/;
973 var132
= ((val
* (*)(val
*, val
*))(var130
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var130
, var131
) /* [] on <var130:HashMap[MClassDef, AClassdef]>*/;
974 var_nclassdef
= var132
;
975 var133
= ((val
* (*)(val
*))(var_nclassdef
->class->vft
[COLOR_modelize_property__AClassdef__super_inits
]))(var_nclassdef
) /* super_inits on <var_nclassdef:AClassdef>*/;
976 var_super_inits
= var133
;
978 if (var_super_inits
== NULL
) {
979 var135
= 0; /* is null */
981 var135
= 1; /* arg is null and recv is not */
984 var136
= ((val
* (*)(val
*))(var_super_inits
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_super_inits
) /* iterator on <var_super_inits:nullable Collection[MMethod](Collection[MMethod])>*/;
986 var137
= ((short int (*)(val
*))(var136
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var136
) /* is_ok on <var136:Iterator[nullable Object]>*/;
988 var138
= ((val
* (*)(val
*))(var136
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var136
) /* item on <var136:Iterator[nullable Object]>*/;
990 var139
= ((val
* (*)(val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__receiver
]))(var_v
) /* receiver on <var_v:RapidTypeVisitor>*/;
991 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var139
, var_su
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
992 CONTINUE_label140
: (void)0;
993 ((void (*)(val
*))(var136
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var136
) /* next on <var136:Iterator[nullable Object]>*/;
995 BREAK_label140
: (void)0;
999 fprintf(stderr
, "Runtime error: %s", "Aborted");
1000 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 142);
1003 goto CONTINUE_label141
;
1006 var142
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__modelbuilder
]))(self
) /* modelbuilder on <self:RapidTypeAnalysis>*/;
1007 var143
= ((val
* (*)(val
*))(var142
->class->vft
[COLOR_modelize_property__ModelBuilder__mpropdef2npropdef
]))(var142
) /* mpropdef2npropdef on <var142:ModelBuilder>*/;
1008 var144
= ((val
* (*)(val
*, val
*))(var143
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var143
, var_mmethoddef
) /* [] on <var143:HashMap[MPropDef, APropdef]>*/;
1009 var_npropdef
= var144
;
1010 /* <var_npropdef:APropdef> isa AConcreteMethPropdef */
1011 cltype146
= type_parser_nodes__AConcreteMethPropdef
.color
;
1012 idtype147
= type_parser_nodes__AConcreteMethPropdef
.id
;
1013 if(cltype146
>= var_npropdef
->type
->table_size
) {
1016 var145
= var_npropdef
->type
->type_table
[cltype146
] == idtype147
;
1019 var148
= ((val
* (*)(val
*))(var_npropdef
->class->vft
[COLOR_auto_super_init__AConcreteMethPropdef__auto_super_inits
]))(var_npropdef
) /* auto_super_inits on <var_npropdef:APropdef(AConcreteMethPropdef)>*/;
1020 var_auto_super_inits
= var148
;
1022 if (var_auto_super_inits
== NULL
) {
1023 var150
= 0; /* is null */
1025 var150
= 1; /* arg is null and recv is not */
1028 var151
= ((val
* (*)(val
*))(var_auto_super_inits
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_auto_super_inits
) /* iterator on <var_auto_super_inits:nullable Array[MMethod](Array[MMethod])>*/;
1030 var152
= ((short int (*)(val
*))(var151
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var151
) /* is_ok on <var151:Iterator[nullable Object]>*/;
1032 var153
= ((val
* (*)(val
*))(var151
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var151
) /* item on <var151:Iterator[nullable Object]>*/;
1033 var_auto_super_init
= var153
;
1034 var154
= ((val
* (*)(val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__receiver
]))(var_v
) /* receiver on <var_v:RapidTypeVisitor>*/;
1035 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var154
, var_auto_super_init
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
1036 CONTINUE_label155
: (void)0;
1037 ((void (*)(val
*))(var151
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var151
) /* next on <var151:Iterator[nullable Object]>*/;
1039 BREAK_label155
: (void)0;
1043 /* <var_npropdef:APropdef> isa AInternMethPropdef */
1044 cltype158
= type_parser_nodes__AInternMethPropdef
.color
;
1045 idtype159
= type_parser_nodes__AInternMethPropdef
.id
;
1046 if(cltype158
>= var_npropdef
->type
->table_size
) {
1049 var157
= var_npropdef
->type
->type_table
[cltype158
] == idtype159
;
1055 /* <var_npropdef:APropdef> isa AExternMethPropdef */
1056 cltype161
= type_parser_nodes__AExternMethPropdef
.color
;
1057 idtype162
= type_parser_nodes__AExternMethPropdef
.id
;
1058 if(cltype161
>= var_npropdef
->type
->table_size
) {
1061 var160
= var_npropdef
->type
->type_table
[cltype161
] == idtype162
;
1066 var163
= ((val
* (*)(val
*))(var_mmethoddef
->class->vft
[COLOR_model__MMethodDef__msignature
]))(var_mmethoddef
) /* msignature on <var_mmethoddef:MMethodDef>*/;
1067 if (var163
== NULL
) {
1068 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
1069 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 158);
1072 var164
= ((val
* (*)(val
*))(var163
->class->vft
[COLOR_model__MSignature__return_mtype
]))(var163
) /* return_mtype on <var163:nullable MSignature>*/;
1076 if (var_ret
== NULL
) {
1077 var169
= 0; /* is null */
1079 var169
= 1; /* arg is null and recv is not */
1083 /* <var_ret:nullable MType(MType)> isa MClassType */
1084 cltype172
= type_model__MClassType
.color
;
1085 idtype173
= type_model__MClassType
.id
;
1086 if(cltype172
>= var_ret
->type
->table_size
) {
1089 var171
= var_ret
->type
->type_table
[cltype172
] == idtype173
;
1097 var175
= ((val
* (*)(val
*))(var_ret
->class->vft
[COLOR_model__MClassType__mclass
]))(var_ret
) /* mclass on <var_ret:nullable MType(MClassType)>*/;
1098 var176
= ((val
* (*)(val
*))(var175
->class->vft
[COLOR_model__MClass__kind
]))(var175
) /* kind on <var175:MClass>*/;
1099 var177
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_model__Object__abstract_kind
]))(self
) /* abstract_kind on <self:RapidTypeAnalysis>*/;
1100 var178
= ((short int (*)(val
*, val
*))(var176
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var176
, var177
) /* != on <var176:MClassKind>*/;
1107 var180
= ((val
* (*)(val
*))(var_ret
->class->vft
[COLOR_model__MClassType__mclass
]))(var_ret
) /* mclass on <var_ret:nullable MType(MClassType)>*/;
1108 var181
= ((val
* (*)(val
*))(var180
->class->vft
[COLOR_model__MClass__kind
]))(var180
) /* kind on <var180:MClass>*/;
1109 var182
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_model__Object__interface_kind
]))(self
) /* interface_kind on <self:RapidTypeAnalysis>*/;
1110 var183
= ((short int (*)(val
*, val
*))(var181
->class->vft
[COLOR_kernel__Object___33d_61d
]))(var181
, var182
) /* != on <var181:MClassKind>*/;
1116 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var_ret
) /* add_type on <var_v:RapidTypeVisitor>*/;
1120 /* <var_npropdef:APropdef> isa AExternInitPropdef */
1121 cltype185
= type_parser_nodes__AExternInitPropdef
.color
;
1122 idtype186
= type_parser_nodes__AExternInitPropdef
.id
;
1123 if(cltype185
>= var_npropdef
->type
->table_size
) {
1126 var184
= var_npropdef
->type
->type_table
[cltype185
] == idtype186
;
1129 var187
= ((val
* (*)(val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__receiver
]))(var_v
) /* receiver on <var_v:RapidTypeVisitor>*/;
1130 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var187
) /* add_type on <var_v:RapidTypeVisitor>*/;
1135 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_parser_nodes__Visitor__enter_visit
]))(var_v
, var_npropdef
) /* enter_visit on <var_v:RapidTypeVisitor>*/;
1136 CONTINUE_label141
: (void)0;
1138 BREAK_label141
: (void)0;
1139 var188
= NEW_list__List(&type_list__Listmodel__MClassType
);
1140 ((void (*)(val
*))(var188
->class->vft
[COLOR_list__List__init
]))(var188
) /* init on <var188:List[MClassType]>*/;
1141 CHECK_NEW_list__List(var188
);
1142 var_todo_types
= var188
;
1143 var189
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_types
]))(self
) /* live_types on <self:RapidTypeAnalysis>*/;
1144 ((void (*)(val
*, val
*))(var_todo_types
->class->vft
[COLOR_abstract_collection__SimpleCollection__add_all
]))(var_todo_types
, var189
) /* add_all on <var_todo_types:List[MClassType]>*/;
1146 var190
= ((short int (*)(val
*))(var_todo_types
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(var_todo_types
) /* is_empty on <var_todo_types:List[MClassType]>*/;
1149 var192
= ((val
* (*)(val
*))(var_todo_types
->class->vft
[COLOR_abstract_collection__Sequence__shift
]))(var_todo_types
) /* shift on <var_todo_types:List[MClassType]>*/;
1151 var193
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_open_types
]))(self
) /* live_open_types on <self:RapidTypeAnalysis>*/;
1152 var194
= ((val
* (*)(val
*))(var193
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var193
) /* iterator on <var193:HashSet[MClassType]>*/;
1154 var195
= ((short int (*)(val
*))(var194
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var194
) /* is_ok on <var194:Iterator[nullable Object]>*/;
1156 var196
= ((val
* (*)(val
*))(var194
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var194
) /* item on <var194:Iterator[nullable Object]>*/;
1158 var197
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
1159 var198
= ((short int (*)(val
*, val
*, val
*, val
*))(var_ot
->class->vft
[COLOR_model__MType__can_resolve_for
]))(var_ot
, var_t
, var_t
, var197
) /* can_resolve_for on <var_ot:MClassType>*/;
1162 goto CONTINUE_label200
;
1165 var201
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
1166 var202
= ((val
* (*)(val
*, val
*, val
*))(var_ot
->class->vft
[COLOR_model__MType__anchor_to
]))(var_ot
, var201
, var_t
) /* anchor_to on <var_ot:MClassType>*/;
1168 var203
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_types
]))(self
) /* live_types on <self:RapidTypeAnalysis>*/;
1169 var204
= ((short int (*)(val
*, val
*))(var203
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var203
, var_rt
) /* has on <var203:HashSet[MClassType]>*/;
1171 goto CONTINUE_label200
;
1174 var205
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_types
]))(self
) /* live_types on <self:RapidTypeAnalysis>*/;
1175 ((void (*)(val
*, val
*))(var205
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var205
, var_rt
) /* add on <var205:HashSet[MClassType]>*/;
1176 ((void (*)(val
*, val
*))(var_todo_types
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var_todo_types
, var_rt
) /* add on <var_todo_types:List[MClassType]>*/;
1177 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__check_depth
]))(self
, var_rt
) /* check_depth on <self:RapidTypeAnalysis>*/;
1178 CONTINUE_label200
: (void)0;
1179 ((void (*)(val
*))(var194
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var194
) /* next on <var194:Iterator[nullable Object]>*/;
1181 BREAK_label200
: (void)0;
1182 CONTINUE_label206
: (void)0;
1184 BREAK_label206
: (void)0;
1185 var207
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_open_cast_types
]))(self
) /* live_open_cast_types on <self:RapidTypeAnalysis>*/;
1186 var208
= ((val
* (*)(val
*))(var207
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var207
) /* iterator on <var207:HashSet[MType]>*/;
1188 var209
= ((short int (*)(val
*))(var208
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var208
) /* is_ok on <var208:Iterator[nullable Object]>*/;
1190 var210
= ((val
* (*)(val
*))(var208
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var208
) /* item on <var208:Iterator[nullable Object]>*/;
1192 var212
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_types
]))(self
) /* live_types on <self:RapidTypeAnalysis>*/;
1193 var213
= ((val
* (*)(val
*))(var212
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var212
) /* iterator on <var212:HashSet[MClassType]>*/;
1195 var214
= ((short int (*)(val
*))(var213
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var213
) /* is_ok on <var213:Iterator[nullable Object]>*/;
1197 var215
= ((val
* (*)(val
*))(var213
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var213
) /* item on <var213:Iterator[nullable Object]>*/;
1199 var217
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
1200 var218
= ((short int (*)(val
*, val
*, val
*, val
*))(var_ot211
->class->vft
[COLOR_model__MType__can_resolve_for
]))(var_ot211
, var_t216
, var_t216
, var217
) /* can_resolve_for on <var_ot211:MType>*/;
1203 goto CONTINUE_label220
;
1206 var221
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
1207 var222
= ((val
* (*)(val
*, val
*, val
*))(var_ot211
->class->vft
[COLOR_model__MType__anchor_to
]))(var_ot211
, var221
, var_t216
) /* anchor_to on <var_ot211:MType>*/;
1209 /* <var_rt223:MType> isa MNullableType */
1210 cltype225
= type_model__MNullableType
.color
;
1211 idtype226
= type_model__MNullableType
.id
;
1212 if(cltype225
>= var_rt223
->type
->table_size
) {
1215 var224
= var_rt223
->type
->type_table
[cltype225
] == idtype226
;
1218 var227
= ((val
* (*)(val
*))(var_rt223
->class->vft
[COLOR_model__MNullableType__mtype
]))(var_rt223
) /* mtype on <var_rt223:MType(MNullableType)>*/;
1222 /* <var_rt223:MType> isa MClassType */
1223 cltype229
= type_model__MClassType
.color
;
1224 idtype230
= type_model__MClassType
.id
;
1225 if(cltype229
>= var_rt223
->type
->table_size
) {
1228 var228
= var_rt223
->type
->type_table
[cltype229
] == idtype230
;
1231 fprintf(stderr
, "Runtime error: %s", "Assert failed");
1232 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 199);
1235 var231
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_cast_types
]))(self
) /* live_cast_types on <self:RapidTypeAnalysis>*/;
1236 ((void (*)(val
*, val
*))(var231
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var231
, var_rt223
) /* add on <var231:HashSet[MClassType]>*/;
1237 CONTINUE_label220
: (void)0;
1238 ((void (*)(val
*))(var213
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var213
) /* next on <var213:Iterator[nullable Object]>*/;
1240 BREAK_label220
: (void)0;
1241 CONTINUE_label232
: (void)0;
1242 ((void (*)(val
*))(var208
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var208
) /* next on <var208:Iterator[nullable Object]>*/;
1244 BREAK_label232
: (void)0;
1247 /* method rapid_type_analysis#RapidTypeAnalysis#run_analysis for (self: Object) */
1248 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__run_analysis(val
* self
) {
1249 rapid_type_analysis__RapidTypeAnalysis__run_analysis(self
);
1252 /* method rapid_type_analysis#RapidTypeAnalysis#check_depth for (self: RapidTypeAnalysis, MClassType) */
1253 void rapid_type_analysis__RapidTypeAnalysis__check_depth(val
* self
, val
* p0
) {
1254 val
* var_mtype
/* var mtype: MClassType */;
1255 long var
/* : Int */;
1256 long var_d
/* var d: Int */;
1257 long var1
/* : Int */;
1258 short int var2
/* : Bool */;
1259 short int var4
/* : Bool */;
1262 const char* var_class_name
;
1263 short int var5
/* : Bool */;
1264 val
* var6
/* : ModelBuilder */;
1265 val
* var7
/* : ToolContext */;
1266 val
* var8
/* : null */;
1267 static val
* varonce
;
1268 val
* var9
/* : String */;
1269 char* var10
/* : NativeString */;
1270 long var11
/* : Int */;
1271 val
* var12
/* : String */;
1272 static val
* varonce13
;
1273 val
* var14
/* : String */;
1274 char* var15
/* : NativeString */;
1275 long var16
/* : Int */;
1276 val
* var17
/* : String */;
1277 static val
* varonce18
;
1278 val
* var19
/* : String */;
1279 char* var20
/* : NativeString */;
1280 long var21
/* : Int */;
1281 val
* var22
/* : String */;
1282 val
* var23
/* : Array[Object] */;
1283 long var24
/* : Int */;
1284 val
* var25
/* : NativeArray[Object] */;
1285 val
* var26
/* : Object */;
1286 val
* var27
/* : String */;
1288 var
= ((long (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MType__length
]))(var_mtype
) /* length on <var_mtype:MClassType>*/;
1291 { /* Inline kernel#Int#> (var_d,var1) */
1292 /* Covariant cast for argument 0 (i) <var1:Int> isa OTHER */
1293 /* <var1:Int> isa OTHER */
1294 var4
= 1; /* easy <var1:Int> isa OTHER*/
1296 var_class_name
= type_kernel__Int
.name
;
1297 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1298 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
1301 var5
= var_d
> var1
;
1307 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__modelbuilder
]))(self
) /* modelbuilder on <self:RapidTypeAnalysis>*/;
1308 var7
= ((val
* (*)(val
*))(var6
->class->vft
[COLOR_modelbuilder__ModelBuilder__toolcontext
]))(var6
) /* toolcontext on <var6:ModelBuilder>*/;
1313 var10
= "Fatal error: limitation in the rapidtype analysis engine: a type depth of ";
1315 var12
= string__NativeString__to_s_with_length(var10
, var11
);
1322 var15
= " is too important, the problematic type is ";
1324 var17
= string__NativeString__to_s_with_length(var15
, var16
);
1333 var22
= string__NativeString__to_s_with_length(var20
, var21
);
1337 var23
= NEW_array__Array(&type_array__Arraykernel__Object
);
1338 { /* var23 = array_instance Array[Object] */
1340 var25
= NEW_array__NativeArray(var24
, &type_array__NativeArraykernel__Object
);
1341 ((struct instance_array__NativeArray
*)var25
)->values
[0] = (val
*) var9
;
1342 var26
= BOX_kernel__Int(var_d
); /* autobox from Int to Object */
1343 ((struct instance_array__NativeArray
*)var25
)->values
[1] = (val
*) var26
;
1344 ((struct instance_array__NativeArray
*)var25
)->values
[2] = (val
*) var14
;
1345 ((struct instance_array__NativeArray
*)var25
)->values
[3] = (val
*) var_mtype
;
1346 ((struct instance_array__NativeArray
*)var25
)->values
[4] = (val
*) var19
;
1347 ((void (*)(val
*, val
*, long))(var23
->class->vft
[COLOR_array__Array__with_native
]))(var23
, var25
, var24
) /* with_native on <var23:Array[Object]>*/;
1348 CHECK_NEW_array__Array(var23
);
1350 var27
= ((val
* (*)(val
*))(var23
->class->vft
[COLOR_string__Object__to_s
]))(var23
) /* to_s on <var23:Array[Object]>*/;
1351 ((void (*)(val
*, val
*, val
*))(var7
->class->vft
[COLOR_toolcontext__ToolContext__fatal_error
]))(var7
, var8
, var27
) /* fatal_error on <var7:ToolContext>*/;
1356 /* method rapid_type_analysis#RapidTypeAnalysis#check_depth for (self: Object, MClassType) */
1357 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__check_depth(val
* self
, val
* p0
) {
1358 rapid_type_analysis__RapidTypeAnalysis__check_depth(self
, p0
);
1361 /* method rapid_type_analysis#RapidTypeAnalysis#add_new for (self: RapidTypeAnalysis, MClassType, MClassType) */
1362 void rapid_type_analysis__RapidTypeAnalysis__add_new(val
* self
, val
* p0
, val
* p1
) {
1363 val
* var_recv
/* var recv: MClassType */;
1364 val
* var_mtype
/* var mtype: MClassType */;
1365 short int var
/* : Bool */;
1366 short int var1
/* : Bool */;
1367 short int var2
/* : Bool */;
1368 val
* var3
/* : HashSet[MClassType] */;
1369 short int var4
/* : Bool */;
1370 val
* var5
/* : HashSet[MClassType] */;
1371 val
* var6
/* : HashSet[MClassType] */;
1372 short int var7
/* : Bool */;
1373 val
* var8
/* : HashSet[MClassType] */;
1374 val
* var9
/* : MClass */;
1375 val
* var_mclass
/* var mclass: MClass */;
1376 val
* var10
/* : HashSet[MClass] */;
1377 short int var11
/* : Bool */;
1378 val
* var12
/* : HashSet[MClass] */;
1379 val
* var13
/* : HashSet[MMethod] */;
1380 val
* var14
/* : Iterator[nullable Object] */;
1381 short int var15
/* : Bool */;
1382 val
* var16
/* : nullable Object */;
1383 val
* var_p
/* var p: MMethod */;
1384 val
* var17
/* : HashSet[MMethodDef] */;
1385 val
* var18
/* : Iterator[nullable Object] */;
1386 short int var19
/* : Bool */;
1387 val
* var20
/* : nullable Object */;
1388 val
* var_p21
/* var p: MMethodDef */;
1389 val
* var23
/* : MModule */;
1390 val
* var24
/* : MType */;
1391 val
* var_bound_mtype
/* var bound_mtype: MClassType */;
1392 val
* var25
/* : MModule */;
1393 val
* var26
/* : Set[MClassDef] */;
1394 val
* var27
/* : Iterator[nullable Object] */;
1395 short int var28
/* : Bool */;
1396 val
* var29
/* : nullable Object */;
1397 val
* var_cd
/* var cd: MClassDef */;
1398 val
* var30
/* : ModelBuilder */;
1399 val
* var31
/* : HashMap[MClassDef, AClassdef] */;
1400 short int var32
/* : Bool */;
1401 short int var33
/* : Bool */;
1402 val
* var35
/* : ModelBuilder */;
1403 val
* var36
/* : HashMap[MClassDef, AClassdef] */;
1404 val
* var37
/* : nullable Object */;
1405 val
* var_nclassdef
/* var nclassdef: AClassdef */;
1406 val
* var38
/* : ANodes[APropdef] */;
1407 val
* var39
/* : Iterator[nullable Object] */;
1408 short int var40
/* : Bool */;
1409 val
* var41
/* : nullable Object */;
1410 val
* var_npropdef
/* var npropdef: APropdef */;
1411 short int var42
/* : Bool */;
1414 short int var43
/* : Bool */;
1415 val
* var45
/* : nullable AExpr */;
1416 val
* var_nexpr
/* var nexpr: nullable AExpr */;
1417 val
* var46
/* : null */;
1418 short int var47
/* : Bool */;
1419 val
* var48
/* : nullable MPropDef */;
1420 val
* var_mpropdef
/* var mpropdef: MAttributeDef */;
1421 val
* var49
/* : RapidTypeVisitor */;
1422 val
* var_v
/* var v: RapidTypeVisitor */;
1425 var
= ((short int (*)(val
*))(var_recv
->class->vft
[COLOR_model__MType__need_anchor
]))(var_recv
) /* need_anchor on <var_recv:MClassType>*/;
1428 fprintf(stderr
, "Runtime error: %s", "Assert failed");
1429 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 217);
1432 var2
= ((short int (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MType__need_anchor
]))(var_mtype
) /* need_anchor on <var_mtype:MClassType>*/;
1434 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_open_types
]))(self
) /* live_open_types on <self:RapidTypeAnalysis>*/;
1435 var4
= ((short int (*)(val
*, val
*))(var3
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var3
, var_mtype
) /* has on <var3:HashSet[MClassType]>*/;
1440 var5
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_open_types
]))(self
) /* live_open_types on <self:RapidTypeAnalysis>*/;
1441 ((void (*)(val
*, val
*))(var5
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var5
, var_mtype
) /* add on <var5:HashSet[MClassType]>*/;
1443 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_types
]))(self
) /* live_types on <self:RapidTypeAnalysis>*/;
1444 var7
= ((short int (*)(val
*, val
*))(var6
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var6
, var_mtype
) /* has on <var6:HashSet[MClassType]>*/;
1449 var8
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_types
]))(self
) /* live_types on <self:RapidTypeAnalysis>*/;
1450 ((void (*)(val
*, val
*))(var8
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var8
, var_mtype
) /* add on <var8:HashSet[MClassType]>*/;
1452 var9
= ((val
* (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MClassType__mclass
]))(var_mtype
) /* mclass on <var_mtype:MClassType>*/;
1454 var10
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_classes
]))(self
) /* live_classes on <self:RapidTypeAnalysis>*/;
1455 var11
= ((short int (*)(val
*, val
*))(var10
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var10
, var_mclass
) /* has on <var10:HashSet[MClass]>*/;
1460 var12
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_classes
]))(self
) /* live_classes on <self:RapidTypeAnalysis>*/;
1461 ((void (*)(val
*, val
*))(var12
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var12
, var_mclass
) /* add on <var12:HashSet[MClass]>*/;
1462 var13
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__totry_methods
]))(self
) /* totry_methods on <self:RapidTypeAnalysis>*/;
1463 var14
= ((val
* (*)(val
*))(var13
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var13
) /* iterator on <var13:HashSet[MMethod]>*/;
1465 var15
= ((short int (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var14
) /* is_ok on <var14:Iterator[nullable Object]>*/;
1467 var16
= ((val
* (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var14
) /* item on <var14:Iterator[nullable Object]>*/;
1469 ((void (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__try_send
]))(self
, var_mtype
, var_p
) /* try_send on <self:RapidTypeAnalysis>*/;
1470 CONTINUE_label
: (void)0;
1471 ((void (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var14
) /* next on <var14:Iterator[nullable Object]>*/;
1473 BREAK_label
: (void)0;
1474 var17
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_super_sends
]))(self
) /* live_super_sends on <self:RapidTypeAnalysis>*/;
1475 var18
= ((val
* (*)(val
*))(var17
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var17
) /* iterator on <var17:HashSet[MMethodDef]>*/;
1477 var19
= ((short int (*)(val
*))(var18
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var18
) /* is_ok on <var18:Iterator[nullable Object]>*/;
1479 var20
= ((val
* (*)(val
*))(var18
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var18
) /* item on <var18:Iterator[nullable Object]>*/;
1481 ((void (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__try_super_send
]))(self
, var_mtype
, var_p21
) /* try_super_send on <self:RapidTypeAnalysis>*/;
1482 CONTINUE_label22
: (void)0;
1483 ((void (*)(val
*))(var18
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var18
) /* next on <var18:Iterator[nullable Object]>*/;
1485 BREAK_label22
: (void)0;
1486 var23
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
1487 var24
= ((val
* (*)(val
*, val
*, val
*))(var_mtype
->class->vft
[COLOR_model__MType__anchor_to
]))(var_mtype
, var23
, var_recv
) /* anchor_to on <var_mtype:MClassType>*/;
1488 var_bound_mtype
= var24
;
1489 var25
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
1490 var26
= ((val
* (*)(val
*, val
*))(var_bound_mtype
->class->vft
[COLOR_model__MType__collect_mclassdefs
]))(var_bound_mtype
, var25
) /* collect_mclassdefs on <var_bound_mtype:MClassType>*/;
1491 var27
= ((val
* (*)(val
*))(var26
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var26
) /* iterator on <var26:Set[MClassDef]>*/;
1493 var28
= ((short int (*)(val
*))(var27
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var27
) /* is_ok on <var27:Iterator[nullable Object]>*/;
1495 var29
= ((val
* (*)(val
*))(var27
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var27
) /* item on <var27:Iterator[nullable Object]>*/;
1497 var30
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__modelbuilder
]))(self
) /* modelbuilder on <self:RapidTypeAnalysis>*/;
1498 var31
= ((val
* (*)(val
*))(var30
->class->vft
[COLOR_modelize_class__ModelBuilder__mclassdef2nclassdef
]))(var30
) /* mclassdef2nclassdef on <var30:ModelBuilder>*/;
1499 var32
= ((short int (*)(val
*, val
*))(var31
->class->vft
[COLOR_abstract_collection__MapRead__has_key
]))(var31
, var_cd
) /* has_key on <var31:HashMap[MClassDef, AClassdef]>*/;
1502 goto CONTINUE_label34
;
1505 var35
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__modelbuilder
]))(self
) /* modelbuilder on <self:RapidTypeAnalysis>*/;
1506 var36
= ((val
* (*)(val
*))(var35
->class->vft
[COLOR_modelize_class__ModelBuilder__mclassdef2nclassdef
]))(var35
) /* mclassdef2nclassdef on <var35:ModelBuilder>*/;
1507 var37
= ((val
* (*)(val
*, val
*))(var36
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var36
, var_cd
) /* [] on <var36:HashMap[MClassDef, AClassdef]>*/;
1508 var_nclassdef
= var37
;
1509 var38
= ((val
* (*)(val
*))(var_nclassdef
->class->vft
[COLOR_parser_nodes__AClassdef__n_propdefs
]))(var_nclassdef
) /* n_propdefs on <var_nclassdef:AClassdef>*/;
1510 var39
= ((val
* (*)(val
*))(var38
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var38
) /* iterator on <var38:ANodes[APropdef]>*/;
1512 var40
= ((short int (*)(val
*))(var39
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var39
) /* is_ok on <var39:Iterator[nullable Object]>*/;
1514 var41
= ((val
* (*)(val
*))(var39
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var39
) /* item on <var39:Iterator[nullable Object]>*/;
1515 var_npropdef
= var41
;
1516 /* <var_npropdef:APropdef> isa AAttrPropdef */
1517 cltype
= type_parser_nodes__AAttrPropdef
.color
;
1518 idtype
= type_parser_nodes__AAttrPropdef
.id
;
1519 if(cltype
>= var_npropdef
->type
->table_size
) {
1522 var42
= var_npropdef
->type
->type_table
[cltype
] == idtype
;
1526 goto CONTINUE_label44
;
1529 var45
= ((val
* (*)(val
*))(var_npropdef
->class->vft
[COLOR_parser_nodes__AAttrPropdef__n_expr
]))(var_npropdef
) /* n_expr on <var_npropdef:APropdef(AAttrPropdef)>*/;
1532 if (var_nexpr
== NULL
) {
1533 var47
= 1; /* is null */
1535 var47
= 0; /* arg is null but recv is not */
1538 goto CONTINUE_label44
;
1541 var48
= ((val
* (*)(val
*))(var_npropdef
->class->vft
[COLOR_modelize_property__APropdef__mpropdef
]))(var_npropdef
) /* mpropdef on <var_npropdef:APropdef(AAttrPropdef)>*/;
1542 if (var48
== NULL
) {
1543 fprintf(stderr
, "Runtime error: %s", "Cast failed");
1544 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 242);
1547 var_mpropdef
= var48
;
1548 var49
= NEW_rapid_type_analysis__RapidTypeVisitor(&type_rapid_type_analysis__RapidTypeVisitor
);
1549 ((void (*)(val
*, val
*, val
*, val
*))(var49
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__init
]))(var49
, self
, var_bound_mtype
, var_mpropdef
) /* init on <var49:RapidTypeVisitor>*/;
1550 CHECK_NEW_rapid_type_analysis__RapidTypeVisitor(var49
);
1552 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_parser_nodes__Visitor__enter_visit
]))(var_v
, var_nexpr
) /* enter_visit on <var_v:RapidTypeVisitor>*/;
1553 CONTINUE_label44
: (void)0;
1554 ((void (*)(val
*))(var39
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var39
) /* next on <var39:Iterator[nullable Object]>*/;
1556 BREAK_label44
: (void)0;
1557 CONTINUE_label34
: (void)0;
1558 ((void (*)(val
*))(var27
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var27
) /* next on <var27:Iterator[nullable Object]>*/;
1560 BREAK_label34
: (void)0;
1563 /* method rapid_type_analysis#RapidTypeAnalysis#add_new for (self: Object, MClassType, MClassType) */
1564 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__add_new(val
* self
, val
* p0
, val
* p1
) {
1565 rapid_type_analysis__RapidTypeAnalysis__add_new(self
, p0
, p1
);
1568 /* method rapid_type_analysis#RapidTypeAnalysis#add_cast for (self: RapidTypeAnalysis, MType) */
1569 void rapid_type_analysis__RapidTypeAnalysis__add_cast(val
* self
, val
* p0
) {
1570 val
* var_mtype
/* var mtype: MType */;
1571 short int var
/* : Bool */;
1574 val
* var1
/* : MType */;
1575 short int var2
/* : Bool */;
1576 val
* var3
/* : HashSet[MType] */;
1577 short int var4
/* : Bool */;
1580 val
* var7
/* : HashSet[MClassType] */;
1582 /* <var_mtype:MType> isa MNullableType */
1583 cltype
= type_model__MNullableType
.color
;
1584 idtype
= type_model__MNullableType
.id
;
1585 if(cltype
>= var_mtype
->type
->table_size
) {
1588 var
= var_mtype
->type
->type_table
[cltype
] == idtype
;
1591 var1
= ((val
* (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MNullableType__mtype
]))(var_mtype
) /* mtype on <var_mtype:MType(MNullableType)>*/;
1595 var2
= ((short int (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MType__need_anchor
]))(var_mtype
) /* need_anchor on <var_mtype:MType>*/;
1597 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_open_cast_types
]))(self
) /* live_open_cast_types on <self:RapidTypeAnalysis>*/;
1598 ((void (*)(val
*, val
*))(var3
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var3
, var_mtype
) /* add on <var3:HashSet[MType]>*/;
1600 /* <var_mtype:MType> isa MClassType */
1601 cltype5
= type_model__MClassType
.color
;
1602 idtype6
= type_model__MClassType
.id
;
1603 if(cltype5
>= var_mtype
->type
->table_size
) {
1606 var4
= var_mtype
->type
->type_table
[cltype5
] == idtype6
;
1609 fprintf(stderr
, "Runtime error: %s", "Assert failed");
1610 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 256);
1613 var7
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_cast_types
]))(self
) /* live_cast_types on <self:RapidTypeAnalysis>*/;
1614 ((void (*)(val
*, val
*))(var7
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var7
, var_mtype
) /* add on <var7:HashSet[MClassType]>*/;
1618 /* method rapid_type_analysis#RapidTypeAnalysis#add_cast for (self: Object, MType) */
1619 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__add_cast(val
* self
, val
* p0
) {
1620 rapid_type_analysis__RapidTypeAnalysis__add_cast(self
, p0
);
1623 /* method rapid_type_analysis#RapidTypeAnalysis#try_send for (self: RapidTypeAnalysis, MClassType, MMethod) */
1624 void rapid_type_analysis__RapidTypeAnalysis__try_send(val
* self
, val
* p0
, val
* p1
) {
1625 val
* var_recv
/* var recv: MClassType */;
1626 val
* var_mproperty
/* var mproperty: MMethod */;
1627 val
* var
/* : MClass */;
1628 val
* var1
/* : MClassDef */;
1629 val
* var2
/* : MClassType */;
1630 val
* var3
/* : MModule */;
1631 short int var4
/* : Bool */;
1632 short int var5
/* : Bool */;
1633 val
* var6
/* : MModule */;
1634 val
* var7
/* : MPropDef */;
1635 val
* var_d
/* var d: MMethodDef */;
1638 var
= ((val
* (*)(val
*))(var_recv
->class->vft
[COLOR_model__MClassType__mclass
]))(var_recv
) /* mclass on <var_recv:MClassType>*/;
1639 var1
= ((val
* (*)(val
*))(var
->class->vft
[COLOR_model__MClass__intro
]))(var
) /* intro on <var:MClass>*/;
1640 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_model__MClassDef__bound_mtype
]))(var1
) /* bound_mtype on <var1:MClassDef>*/;
1642 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
1643 var4
= ((short int (*)(val
*, val
*, val
*))(var_recv
->class->vft
[COLOR_model__MType__has_mproperty
]))(var_recv
, var3
, var_mproperty
) /* has_mproperty on <var_recv:MClassType>*/;
1649 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
1650 var7
= ((val
* (*)(val
*, val
*, val
*))(var_mproperty
->class->vft
[COLOR_model__MProperty__lookup_first_definition
]))(var_mproperty
, var6
, var_recv
) /* lookup_first_definition on <var_mproperty:MMethod>*/;
1652 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__add_call
]))(self
, var_d
) /* add_call on <self:RapidTypeAnalysis>*/;
1655 /* method rapid_type_analysis#RapidTypeAnalysis#try_send for (self: Object, MClassType, MMethod) */
1656 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__try_send(val
* self
, val
* p0
, val
* p1
) {
1657 rapid_type_analysis__RapidTypeAnalysis__try_send(self
, p0
, p1
);
1660 /* method rapid_type_analysis#RapidTypeAnalysis#add_call for (self: RapidTypeAnalysis, MMethodDef) */
1661 void rapid_type_analysis__RapidTypeAnalysis__add_call(val
* self
, val
* p0
) {
1662 val
* var_mpropdef
/* var mpropdef: MMethodDef */;
1663 val
* var
/* : HashSet[MMethodDef] */;
1664 short int var1
/* : Bool */;
1665 val
* var2
/* : HashSet[MMethodDef] */;
1666 val
* var3
/* : List[MMethodDef] */;
1667 val
* var4
/* : MProperty */;
1668 val
* var_mproperty
/* var mproperty: MMethod */;
1669 val
* var5
/* : Array[MPropDef] */;
1670 long var6
/* : Int */;
1671 long var7
/* : Int */;
1672 short int var8
/* : Bool */;
1673 short int var10
/* : Bool */;
1676 const char* var_class_name
;
1677 short int var11
/* : Bool */;
1678 val
* var12
/* : Array[MPropDef] */;
1679 val
* var13
/* : Iterator[nullable Object] */;
1680 short int var14
/* : Bool */;
1681 val
* var15
/* : nullable Object */;
1682 val
* var_d
/* var d: MMethodDef */;
1683 short int var16
/* : Bool */;
1684 val
* var17
/* : HashSet[MMethodDef] */;
1685 short int var18
/* : Bool */;
1686 short int var19
/* : Bool */;
1687 val
* var20
/* : HashSet[MMethod] */;
1688 val
* var21
/* : MProperty */;
1690 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_methoddefs
]))(self
) /* live_methoddefs on <self:RapidTypeAnalysis>*/;
1691 var1
= ((short int (*)(val
*, val
*))(var
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var
, var_mpropdef
) /* has on <var:HashSet[MMethodDef]>*/;
1696 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_methoddefs
]))(self
) /* live_methoddefs on <self:RapidTypeAnalysis>*/;
1697 ((void (*)(val
*, val
*))(var2
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var2
, var_mpropdef
) /* add on <var2:HashSet[MMethodDef]>*/;
1698 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__todo
]))(self
) /* todo on <self:RapidTypeAnalysis>*/;
1699 ((void (*)(val
*, val
*))(var3
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var3
, var_mpropdef
) /* add on <var3:List[MMethodDef]>*/;
1700 var4
= ((val
* (*)(val
*))(var_mpropdef
->class->vft
[COLOR_model__MPropDef__mproperty
]))(var_mpropdef
) /* mproperty on <var_mpropdef:MMethodDef>*/;
1701 var_mproperty
= var4
;
1702 var5
= ((val
* (*)(val
*))(var_mproperty
->class->vft
[COLOR_model__MProperty__mpropdefs
]))(var_mproperty
) /* mpropdefs on <var_mproperty:MMethod>*/;
1703 var6
= ((long (*)(val
*))(var5
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var5
) /* length on <var5:Array[MPropDef](Array[MMethodDef])>*/;
1705 { /* Inline kernel#Int#<= (var6,var7) */
1706 /* Covariant cast for argument 0 (i) <var7:Int> isa OTHER */
1707 /* <var7:Int> isa OTHER */
1708 var10
= 1; /* easy <var7:Int> isa OTHER*/
1710 var_class_name
= type_kernel__Int
.name
;
1711 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1712 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 260);
1715 var11
= var6
<= var7
;
1724 var12
= ((val
* (*)(val
*))(var_mproperty
->class->vft
[COLOR_model__MProperty__mpropdefs
]))(var_mproperty
) /* mpropdefs on <var_mproperty:MMethod>*/;
1725 var13
= ((val
* (*)(val
*))(var12
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var12
) /* iterator on <var12:Array[MPropDef](Array[MMethodDef])>*/;
1727 var14
= ((short int (*)(val
*))(var13
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var13
) /* is_ok on <var13:Iterator[nullable Object]>*/;
1729 var15
= ((val
* (*)(val
*))(var13
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var13
) /* item on <var13:Iterator[nullable Object]>*/;
1731 var16
= ((short int (*)(val
*))(var_d
->class->vft
[COLOR_model__MMethodDef__is_abstract
]))(var_d
) /* is_abstract on <var_d:MMethodDef>*/;
1733 goto CONTINUE_label
;
1736 var17
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_methoddefs
]))(self
) /* live_methoddefs on <self:RapidTypeAnalysis>*/;
1737 var18
= ((short int (*)(val
*, val
*))(var17
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var17
, var_d
) /* has on <var17:HashSet[MMethodDef]>*/;
1743 CONTINUE_label
: (void)0;
1744 ((void (*)(val
*))(var13
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var13
) /* next on <var13:Iterator[nullable Object]>*/;
1746 BREAK_label
: (void)0;
1747 var20
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__totry_methods
]))(self
) /* totry_methods on <self:RapidTypeAnalysis>*/;
1748 var21
= ((val
* (*)(val
*))(var_mpropdef
->class->vft
[COLOR_model__MPropDef__mproperty
]))(var_mpropdef
) /* mproperty on <var_mpropdef:MMethodDef>*/;
1749 ((void (*)(val
*, val
*))(var20
->class->vft
[COLOR_abstract_collection__RemovableCollection__remove
]))(var20
, var21
) /* remove on <var20:HashSet[MMethod]>*/;
1752 /* method rapid_type_analysis#RapidTypeAnalysis#add_call for (self: Object, MMethodDef) */
1753 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__add_call(val
* self
, val
* p0
) {
1754 rapid_type_analysis__RapidTypeAnalysis__add_call(self
, p0
);
1757 /* method rapid_type_analysis#RapidTypeAnalysis#add_send for (self: RapidTypeAnalysis, MType, MMethod) */
1758 void rapid_type_analysis__RapidTypeAnalysis__add_send(val
* self
, val
* p0
, val
* p1
) {
1759 val
* var_recv
/* var recv: MType */;
1760 val
* var_mproperty
/* var mproperty: MMethod */;
1761 val
* var
/* : HashSet[MMethod] */;
1762 short int var1
/* : Bool */;
1763 val
* var2
/* : HashSet[MMethod] */;
1764 val
* var3
/* : Array[MPropDef] */;
1765 long var4
/* : Int */;
1766 long var5
/* : Int */;
1767 short int var6
/* : Bool */;
1768 short int var8
/* : Bool */;
1769 val
* var9
/* : Array[MPropDef] */;
1770 val
* var10
/* : nullable Object */;
1771 val
* var_d
/* var d: MMethodDef */;
1772 val
* var11
/* : HashSet[MMethod] */;
1773 val
* var12
/* : HashSet[MClass] */;
1774 val
* var13
/* : Iterator[nullable Object] */;
1775 short int var14
/* : Bool */;
1776 val
* var15
/* : nullable Object */;
1777 val
* var_c
/* var c: MClass */;
1778 val
* var16
/* : MClassDef */;
1779 val
* var17
/* : MClassType */;
1782 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_methods
]))(self
) /* live_methods on <self:RapidTypeAnalysis>*/;
1783 var1
= ((short int (*)(val
*, val
*))(var
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var
, var_mproperty
) /* has on <var:HashSet[MMethod]>*/;
1788 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_methods
]))(self
) /* live_methods on <self:RapidTypeAnalysis>*/;
1789 ((void (*)(val
*, val
*))(var2
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var2
, var_mproperty
) /* add on <var2:HashSet[MMethod]>*/;
1790 var3
= ((val
* (*)(val
*))(var_mproperty
->class->vft
[COLOR_model__MProperty__mpropdefs
]))(var_mproperty
) /* mpropdefs on <var_mproperty:MMethod>*/;
1791 var4
= ((long (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var3
) /* length on <var3:Array[MPropDef](Array[MMethodDef])>*/;
1793 { /* Inline kernel#Int#== (var4,var5) */
1794 var8
= var4
== var5
;
1800 var9
= ((val
* (*)(val
*))(var_mproperty
->class->vft
[COLOR_model__MProperty__mpropdefs
]))(var_mproperty
) /* mpropdefs on <var_mproperty:MMethod>*/;
1801 var10
= ((val
* (*)(val
*))(var9
->class->vft
[COLOR_abstract_collection__Collection__first
]))(var9
) /* first on <var9:Array[MPropDef](Array[MMethodDef])>*/;
1803 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__add_call
]))(self
, var_d
) /* add_call on <self:RapidTypeAnalysis>*/;
1807 var11
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__totry_methods
]))(self
) /* totry_methods on <self:RapidTypeAnalysis>*/;
1808 ((void (*)(val
*, val
*))(var11
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var11
, var_mproperty
) /* add on <var11:HashSet[MMethod]>*/;
1809 var12
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_classes
]))(self
) /* live_classes on <self:RapidTypeAnalysis>*/;
1810 var13
= ((val
* (*)(val
*))(var12
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var12
) /* iterator on <var12:HashSet[MClass]>*/;
1812 var14
= ((short int (*)(val
*))(var13
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var13
) /* is_ok on <var13:Iterator[nullable Object]>*/;
1814 var15
= ((val
* (*)(val
*))(var13
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var13
) /* item on <var13:Iterator[nullable Object]>*/;
1816 var16
= ((val
* (*)(val
*))(var_c
->class->vft
[COLOR_model__MClass__intro
]))(var_c
) /* intro on <var_c:MClass>*/;
1817 var17
= ((val
* (*)(val
*))(var16
->class->vft
[COLOR_model__MClassDef__bound_mtype
]))(var16
) /* bound_mtype on <var16:MClassDef>*/;
1818 ((void (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__try_send
]))(self
, var17
, var_mproperty
) /* try_send on <self:RapidTypeAnalysis>*/;
1819 CONTINUE_label
: (void)0;
1820 ((void (*)(val
*))(var13
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var13
) /* next on <var13:Iterator[nullable Object]>*/;
1822 BREAK_label
: (void)0;
1825 /* method rapid_type_analysis#RapidTypeAnalysis#add_send for (self: Object, MType, MMethod) */
1826 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__add_send(val
* self
, val
* p0
, val
* p1
) {
1827 rapid_type_analysis__RapidTypeAnalysis__add_send(self
, p0
, p1
);
1830 /* method rapid_type_analysis#RapidTypeAnalysis#try_super_send for (self: RapidTypeAnalysis, MClassType, MMethodDef) */
1831 void rapid_type_analysis__RapidTypeAnalysis__try_super_send(val
* self
, val
* p0
, val
* p1
) {
1832 val
* var_recv
/* var recv: MClassType */;
1833 val
* var_mpropdef
/* var mpropdef: MMethodDef */;
1834 val
* var
/* : MClass */;
1835 val
* var1
/* : MClassDef */;
1836 val
* var2
/* : MClassType */;
1837 val
* var3
/* : MModule */;
1838 val
* var4
/* : Set[MClassDef] */;
1839 val
* var5
/* : MClassDef */;
1840 short int var6
/* : Bool */;
1841 short int var7
/* : Bool */;
1842 val
* var8
/* : MModule */;
1843 val
* var9
/* : MPropDef */;
1844 val
* var_d
/* var d: MMethodDef */;
1847 var
= ((val
* (*)(val
*))(var_recv
->class->vft
[COLOR_model__MClassType__mclass
]))(var_recv
) /* mclass on <var_recv:MClassType>*/;
1848 var1
= ((val
* (*)(val
*))(var
->class->vft
[COLOR_model__MClass__intro
]))(var
) /* intro on <var:MClass>*/;
1849 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_model__MClassDef__bound_mtype
]))(var1
) /* bound_mtype on <var1:MClassDef>*/;
1851 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
1852 var4
= ((val
* (*)(val
*, val
*))(var_recv
->class->vft
[COLOR_model__MType__collect_mclassdefs
]))(var_recv
, var3
) /* collect_mclassdefs on <var_recv:MClassType>*/;
1853 var5
= ((val
* (*)(val
*))(var_mpropdef
->class->vft
[COLOR_model__MPropDef__mclassdef
]))(var_mpropdef
) /* mclassdef on <var_mpropdef:MMethodDef>*/;
1854 var6
= ((short int (*)(val
*, val
*))(var4
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var4
, var5
) /* has on <var4:Set[MClassDef]>*/;
1860 var8
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(self
) /* mainmodule on <self:RapidTypeAnalysis>*/;
1861 var9
= ((val
* (*)(val
*, val
*, val
*))(var_mpropdef
->class->vft
[COLOR_model__MPropDef__lookup_next_definition
]))(var_mpropdef
, var8
, var_recv
) /* lookup_next_definition on <var_mpropdef:MMethodDef>*/;
1863 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__add_call
]))(self
, var_d
) /* add_call on <self:RapidTypeAnalysis>*/;
1866 /* method rapid_type_analysis#RapidTypeAnalysis#try_super_send for (self: Object, MClassType, MMethodDef) */
1867 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__try_super_send(val
* self
, val
* p0
, val
* p1
) {
1868 rapid_type_analysis__RapidTypeAnalysis__try_super_send(self
, p0
, p1
);
1871 /* method rapid_type_analysis#RapidTypeAnalysis#add_super_send for (self: RapidTypeAnalysis, MType, MMethodDef) */
1872 void rapid_type_analysis__RapidTypeAnalysis__add_super_send(val
* self
, val
* p0
, val
* p1
) {
1873 val
* var_recv
/* var recv: MType */;
1874 val
* var_mpropdef
/* var mpropdef: MMethodDef */;
1875 val
* var
/* : HashSet[MMethodDef] */;
1876 short int var1
/* : Bool */;
1877 val
* var2
/* : HashSet[MMethodDef] */;
1878 val
* var3
/* : HashSet[MClassType] */;
1879 val
* var4
/* : Iterator[nullable Object] */;
1880 short int var5
/* : Bool */;
1881 val
* var6
/* : nullable Object */;
1882 val
* var_t
/* var t: MClassType */;
1885 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_super_sends
]))(self
) /* live_super_sends on <self:RapidTypeAnalysis>*/;
1886 var1
= ((short int (*)(val
*, val
*))(var
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var
, var_mpropdef
) /* has on <var:HashSet[MMethodDef]>*/;
1891 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_super_sends
]))(self
) /* live_super_sends on <self:RapidTypeAnalysis>*/;
1892 ((void (*)(val
*, val
*))(var2
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var2
, var_mpropdef
) /* add on <var2:HashSet[MMethodDef]>*/;
1893 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__live_types
]))(self
) /* live_types on <self:RapidTypeAnalysis>*/;
1894 var4
= ((val
* (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var3
) /* iterator on <var3:HashSet[MClassType]>*/;
1896 var5
= ((short int (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var4
) /* is_ok on <var4:Iterator[nullable Object]>*/;
1898 var6
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var4
) /* item on <var4:Iterator[nullable Object]>*/;
1900 ((void (*)(val
*, val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__try_super_send
]))(self
, var_t
, var_mpropdef
) /* try_super_send on <self:RapidTypeAnalysis>*/;
1901 CONTINUE_label
: (void)0;
1902 ((void (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var4
) /* next on <var4:Iterator[nullable Object]>*/;
1904 BREAK_label
: (void)0;
1907 /* method rapid_type_analysis#RapidTypeAnalysis#add_super_send for (self: Object, MType, MMethodDef) */
1908 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__add_super_send(val
* self
, val
* p0
, val
* p1
) {
1909 rapid_type_analysis__RapidTypeAnalysis__add_super_send(self
, p0
, p1
);
1912 /* method rapid_type_analysis#RapidTypeAnalysis#init for (self: RapidTypeAnalysis, ModelBuilder, MModule) */
1913 void rapid_type_analysis__RapidTypeAnalysis__init(val
* self
, val
* p0
, val
* p1
) {
1914 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dmodelbuilder
].val
= p0
; /* @modelbuilder on <self:RapidTypeAnalysis> */
1915 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___64dmainmodule
].val
= p1
; /* @mainmodule on <self:RapidTypeAnalysis> */
1918 /* method rapid_type_analysis#RapidTypeAnalysis#init for (self: Object, ModelBuilder, MModule) */
1919 void VIRTUAL_rapid_type_analysis__RapidTypeAnalysis__init(val
* self
, val
* p0
, val
* p1
) {
1920 rapid_type_analysis__RapidTypeAnalysis__init(self
, p0
, p1
);
1923 /* method rapid_type_analysis#RapidTypeVisitor#analysis for (self: RapidTypeVisitor): RapidTypeAnalysis */
1924 val
* rapid_type_analysis__RapidTypeVisitor__analysis(val
* self
) {
1925 val
* var
/* : RapidTypeAnalysis */;
1926 val
* var1
/* : RapidTypeAnalysis */;
1927 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeVisitor___64danalysis
].val
; /* @analysis on <self:RapidTypeVisitor> */
1929 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @analysis");
1930 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 327);
1937 /* method rapid_type_analysis#RapidTypeVisitor#analysis for (self: Object): RapidTypeAnalysis */
1938 val
* VIRTUAL_rapid_type_analysis__RapidTypeVisitor__analysis(val
* self
) {
1939 val
* var
/* : RapidTypeAnalysis */;
1940 val
* var1
/* : RapidTypeAnalysis */;
1941 var1
= rapid_type_analysis__RapidTypeVisitor__analysis(self
);
1946 /* method rapid_type_analysis#RapidTypeVisitor#analysis= for (self: RapidTypeVisitor, RapidTypeAnalysis) */
1947 void rapid_type_analysis__RapidTypeVisitor__analysis_61d(val
* self
, val
* p0
) {
1948 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeVisitor___64danalysis
].val
= p0
; /* @analysis on <self:RapidTypeVisitor> */
1951 /* method rapid_type_analysis#RapidTypeVisitor#analysis= for (self: Object, RapidTypeAnalysis) */
1952 void VIRTUAL_rapid_type_analysis__RapidTypeVisitor__analysis_61d(val
* self
, val
* p0
) {
1953 rapid_type_analysis__RapidTypeVisitor__analysis_61d(self
, p0
);
1956 /* method rapid_type_analysis#RapidTypeVisitor#receiver for (self: RapidTypeVisitor): MClassType */
1957 val
* rapid_type_analysis__RapidTypeVisitor__receiver(val
* self
) {
1958 val
* var
/* : MClassType */;
1959 val
* var1
/* : MClassType */;
1960 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeVisitor___64dreceiver
].val
; /* @receiver on <self:RapidTypeVisitor> */
1962 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @receiver");
1963 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 328);
1970 /* method rapid_type_analysis#RapidTypeVisitor#receiver for (self: Object): MClassType */
1971 val
* VIRTUAL_rapid_type_analysis__RapidTypeVisitor__receiver(val
* self
) {
1972 val
* var
/* : MClassType */;
1973 val
* var1
/* : MClassType */;
1974 var1
= rapid_type_analysis__RapidTypeVisitor__receiver(self
);
1979 /* method rapid_type_analysis#RapidTypeVisitor#receiver= for (self: RapidTypeVisitor, MClassType) */
1980 void rapid_type_analysis__RapidTypeVisitor__receiver_61d(val
* self
, val
* p0
) {
1981 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeVisitor___64dreceiver
].val
= p0
; /* @receiver on <self:RapidTypeVisitor> */
1984 /* method rapid_type_analysis#RapidTypeVisitor#receiver= for (self: Object, MClassType) */
1985 void VIRTUAL_rapid_type_analysis__RapidTypeVisitor__receiver_61d(val
* self
, val
* p0
) {
1986 rapid_type_analysis__RapidTypeVisitor__receiver_61d(self
, p0
);
1989 /* method rapid_type_analysis#RapidTypeVisitor#mpropdef for (self: RapidTypeVisitor): MPropDef */
1990 val
* rapid_type_analysis__RapidTypeVisitor__mpropdef(val
* self
) {
1991 val
* var
/* : MPropDef */;
1992 val
* var1
/* : MPropDef */;
1993 var1
= self
->attrs
[COLOR_rapid_type_analysis__RapidTypeVisitor___64dmpropdef
].val
; /* @mpropdef on <self:RapidTypeVisitor> */
1995 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @mpropdef");
1996 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 329);
2003 /* method rapid_type_analysis#RapidTypeVisitor#mpropdef for (self: Object): MPropDef */
2004 val
* VIRTUAL_rapid_type_analysis__RapidTypeVisitor__mpropdef(val
* self
) {
2005 val
* var
/* : MPropDef */;
2006 val
* var1
/* : MPropDef */;
2007 var1
= rapid_type_analysis__RapidTypeVisitor__mpropdef(self
);
2012 /* method rapid_type_analysis#RapidTypeVisitor#mpropdef= for (self: RapidTypeVisitor, MPropDef) */
2013 void rapid_type_analysis__RapidTypeVisitor__mpropdef_61d(val
* self
, val
* p0
) {
2014 self
->attrs
[COLOR_rapid_type_analysis__RapidTypeVisitor___64dmpropdef
].val
= p0
; /* @mpropdef on <self:RapidTypeVisitor> */
2017 /* method rapid_type_analysis#RapidTypeVisitor#mpropdef= for (self: Object, MPropDef) */
2018 void VIRTUAL_rapid_type_analysis__RapidTypeVisitor__mpropdef_61d(val
* self
, val
* p0
) {
2019 rapid_type_analysis__RapidTypeVisitor__mpropdef_61d(self
, p0
);
2022 /* method rapid_type_analysis#RapidTypeVisitor#init for (self: RapidTypeVisitor, RapidTypeAnalysis, MClassType, MPropDef) */
2023 void rapid_type_analysis__RapidTypeVisitor__init(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
2024 val
* var_analysis
/* var analysis: RapidTypeAnalysis */;
2025 val
* var_receiver
/* var receiver: MClassType */;
2026 val
* var_mpropdef
/* var mpropdef: MPropDef */;
2027 short int var
/* : Bool */;
2028 short int var1
/* : Bool */;
2032 ((void (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__Visitor__init
]))(self
) /* init on <self:RapidTypeVisitor>*/;
2033 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__analysis_61d
]))(self
, var_analysis
) /* analysis= on <self:RapidTypeVisitor>*/;
2034 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__receiver_61d
]))(self
, var_receiver
) /* receiver= on <self:RapidTypeVisitor>*/;
2035 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__mpropdef_61d
]))(self
, var_mpropdef
) /* mpropdef= on <self:RapidTypeVisitor>*/;
2036 var
= ((short int (*)(val
*))(var_receiver
->class->vft
[COLOR_model__MType__need_anchor
]))(var_receiver
) /* need_anchor on <var_receiver:MClassType>*/;
2039 fprintf(stderr
, "Runtime error: %s", "Assert failed");
2040 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 336);
2045 /* method rapid_type_analysis#RapidTypeVisitor#init for (self: Object, RapidTypeAnalysis, MClassType, MPropDef) */
2046 void VIRTUAL_rapid_type_analysis__RapidTypeVisitor__init(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
2047 rapid_type_analysis__RapidTypeVisitor__init(self
, p0
, p1
, p2
);
2050 /* method rapid_type_analysis#RapidTypeVisitor#visit for (self: RapidTypeVisitor, ANode) */
2051 void rapid_type_analysis__RapidTypeVisitor__visit(val
* self
, val
* p0
) {
2052 val
* var_n
/* var n: ANode */;
2053 short int var
/* : Bool */;
2056 val
* var1
/* : nullable MType */;
2057 val
* var_implicit_cast_to
/* var implicit_cast_to: nullable MType */;
2058 val
* var2
/* : null */;
2059 short int var3
/* : Bool */;
2060 short int var4
/* : Bool */;
2063 short int var7
/* : Bool */;
2065 ((void (*)(val
*, val
*))(var_n
->class->vft
[COLOR_rapid_type_analysis__ANode__accept_rapid_type_visitor
]))(var_n
, self
) /* accept_rapid_type_visitor on <var_n:ANode>*/;
2066 /* <var_n:ANode> isa AExpr */
2067 cltype
= type_parser_nodes__AExpr
.color
;
2068 idtype
= type_parser_nodes__AExpr
.id
;
2069 if(cltype
>= var_n
->type
->table_size
) {
2072 var
= var_n
->type
->type_table
[cltype
] == idtype
;
2075 var1
= ((val
* (*)(val
*))(var_n
->class->vft
[COLOR_typing__AExpr__implicit_cast_to
]))(var_n
) /* implicit_cast_to on <var_n:ANode(AExpr)>*/;
2076 var_implicit_cast_to
= var1
;
2078 if (var_implicit_cast_to
== NULL
) {
2079 var3
= 0; /* is null */
2081 var3
= 1; /* arg is null and recv is not */
2084 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_cast_type
]))(self
, var_implicit_cast_to
) /* add_cast_type on <self:RapidTypeVisitor>*/;
2089 /* <var_n:ANode> isa AAnnotations */
2090 cltype5
= type_parser_nodes__AAnnotations
.color
;
2091 idtype6
= type_parser_nodes__AAnnotations
.id
;
2092 if(cltype5
>= var_n
->type
->table_size
) {
2095 var4
= var_n
->type
->type_table
[cltype5
] == idtype6
;
2099 ((void (*)(val
*, val
*))(var_n
->class->vft
[COLOR_parser_nodes__ANode__visit_all
]))(var_n
, self
) /* visit_all on <var_n:ANode>*/;
2104 /* method rapid_type_analysis#RapidTypeVisitor#visit for (self: Object, ANode) */
2105 void VIRTUAL_rapid_type_analysis__RapidTypeVisitor__visit(val
* self
, val
* p0
) {
2106 rapid_type_analysis__RapidTypeVisitor__visit(self
, p0
);
2109 /* method rapid_type_analysis#RapidTypeVisitor#cleanup_type for (self: RapidTypeVisitor, MType): nullable MClassType */
2110 val
* rapid_type_analysis__RapidTypeVisitor__cleanup_type(val
* self
, val
* p0
) {
2111 val
* var
/* : nullable MClassType */;
2112 val
* var_mtype
/* var mtype: MType */;
2113 val
* var1
/* : RapidTypeAnalysis */;
2114 val
* var2
/* : MModule */;
2115 val
* var3
/* : MClassType */;
2116 val
* var4
/* : MType */;
2117 short int var5
/* : Bool */;
2120 val
* var6
/* : null */;
2121 short int var7
/* : Bool */;
2124 val
* var10
/* : MType */;
2125 short int var11
/* : Bool */;
2128 short int var14
/* : Bool */;
2129 short int var15
/* : Bool */;
2131 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__analysis
]))(self
) /* analysis on <self:RapidTypeVisitor>*/;
2132 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(var1
) /* mainmodule on <var1:RapidTypeAnalysis>*/;
2133 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__receiver
]))(self
) /* receiver on <self:RapidTypeVisitor>*/;
2134 var4
= ((val
* (*)(val
*, val
*, val
*))(var_mtype
->class->vft
[COLOR_model__MType__anchor_to
]))(var_mtype
, var2
, var3
) /* anchor_to on <var_mtype:MType>*/;
2136 /* <var_mtype:MType> isa MNullType */
2137 cltype
= type_model__MNullType
.color
;
2138 idtype
= type_model__MNullType
.id
;
2139 if(cltype
>= var_mtype
->type
->table_size
) {
2142 var5
= var_mtype
->type
->type_table
[cltype
] == idtype
;
2150 /* <var_mtype:MType> isa MNullableType */
2151 cltype8
= type_model__MNullableType
.color
;
2152 idtype9
= type_model__MNullableType
.id
;
2153 if(cltype8
>= var_mtype
->type
->table_size
) {
2156 var7
= var_mtype
->type
->type_table
[cltype8
] == idtype9
;
2159 var10
= ((val
* (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MNullableType__mtype
]))(var_mtype
) /* mtype on <var_mtype:MType(MNullableType)>*/;
2163 /* <var_mtype:MType> isa MClassType */
2164 cltype12
= type_model__MClassType
.color
;
2165 idtype13
= type_model__MClassType
.id
;
2166 if(cltype12
>= var_mtype
->type
->table_size
) {
2169 var11
= var_mtype
->type
->type_table
[cltype12
] == idtype13
;
2172 fprintf(stderr
, "Runtime error: %s", "Assert failed");
2173 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 358);
2176 var14
= ((short int (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MType__need_anchor
]))(var_mtype
) /* need_anchor on <var_mtype:MType(MClassType)>*/;
2179 fprintf(stderr
, "Runtime error: %s", "Assert failed");
2180 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 359);
2188 /* method rapid_type_analysis#RapidTypeVisitor#cleanup_type for (self: Object, MType): nullable MClassType */
2189 val
* VIRTUAL_rapid_type_analysis__RapidTypeVisitor__cleanup_type(val
* self
, val
* p0
) {
2190 val
* var
/* : nullable MClassType */;
2191 val
* var1
/* : nullable MClassType */;
2192 var1
= rapid_type_analysis__RapidTypeVisitor__cleanup_type(self
, p0
);
2197 /* method rapid_type_analysis#RapidTypeVisitor#get_class for (self: RapidTypeVisitor, String): MClass */
2198 val
* rapid_type_analysis__RapidTypeVisitor__get_class(val
* self
, val
* p0
) {
2199 val
* var
/* : MClass */;
2200 val
* var_name
/* var name: String */;
2201 val
* var1
/* : RapidTypeAnalysis */;
2202 val
* var2
/* : MModule */;
2203 val
* var3
/* : MClass */;
2205 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__analysis
]))(self
) /* analysis on <self:RapidTypeVisitor>*/;
2206 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(var1
) /* mainmodule on <var1:RapidTypeAnalysis>*/;
2207 var3
= ((val
* (*)(val
*, val
*))(var2
->class->vft
[COLOR_model__MModule__get_primitive_class
]))(var2
, var_name
) /* get_primitive_class on <var2:MModule>*/;
2213 /* method rapid_type_analysis#RapidTypeVisitor#get_class for (self: Object, String): MClass */
2214 val
* VIRTUAL_rapid_type_analysis__RapidTypeVisitor__get_class(val
* self
, val
* p0
) {
2215 val
* var
/* : MClass */;
2216 val
* var1
/* : MClass */;
2217 var1
= rapid_type_analysis__RapidTypeVisitor__get_class(self
, p0
);
2222 /* method rapid_type_analysis#RapidTypeVisitor#get_method for (self: RapidTypeVisitor, MType, String): MMethod */
2223 val
* rapid_type_analysis__RapidTypeVisitor__get_method(val
* self
, val
* p0
, val
* p1
) {
2224 val
* var
/* : MMethod */;
2225 val
* var_recv
/* var recv: MType */;
2226 val
* var_name
/* var name: String */;
2227 val
* var1
/* : nullable MClassType */;
2228 val
* var_mtype
/* var mtype: nullable MClassType */;
2229 val
* var2
/* : null */;
2230 short int var3
/* : Bool */;
2231 val
* var4
/* : RapidTypeAnalysis */;
2232 val
* var5
/* : ModelBuilder */;
2233 val
* var6
/* : nullable ANode */;
2234 val
* var7
/* : MClass */;
2235 val
* var8
/* : RapidTypeAnalysis */;
2236 val
* var9
/* : MModule */;
2237 val
* var10
/* : MMethod */;
2240 var1
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__cleanup_type
]))(self
, var_recv
) /* cleanup_type on <self:RapidTypeVisitor>*/;
2243 if (var_mtype
== NULL
) {
2244 var3
= 0; /* is null */
2246 var3
= 1; /* arg is null and recv is not */
2249 fprintf(stderr
, "Runtime error: %s", "Assert failed");
2250 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 371);
2253 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__analysis
]))(self
) /* analysis on <self:RapidTypeVisitor>*/;
2254 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__modelbuilder
]))(var4
) /* modelbuilder on <var4:RapidTypeAnalysis>*/;
2255 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__Visitor__current_node
]))(self
) /* current_node on <self:RapidTypeVisitor>*/;
2257 fprintf(stderr
, "Runtime error: %s", "Cast failed");
2258 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 372);
2261 var7
= ((val
* (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MClassType__mclass
]))(var_mtype
) /* mclass on <var_mtype:nullable MClassType(MClassType)>*/;
2262 var8
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__analysis
]))(self
) /* analysis on <self:RapidTypeVisitor>*/;
2263 var9
= ((val
* (*)(val
*))(var8
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(var8
) /* mainmodule on <var8:RapidTypeAnalysis>*/;
2264 var10
= ((val
* (*)(val
*, val
*, val
*, val
*, val
*))(var5
->class->vft
[COLOR_modelbuilder__ModelBuilder__force_get_primitive_method
]))(var5
, var6
, var_name
, var7
, var9
) /* force_get_primitive_method on <var5:ModelBuilder>*/;
2270 /* method rapid_type_analysis#RapidTypeVisitor#get_method for (self: Object, MType, String): MMethod */
2271 val
* VIRTUAL_rapid_type_analysis__RapidTypeVisitor__get_method(val
* self
, val
* p0
, val
* p1
) {
2272 val
* var
/* : MMethod */;
2273 val
* var1
/* : MMethod */;
2274 var1
= rapid_type_analysis__RapidTypeVisitor__get_method(self
, p0
, p1
);
2279 /* method rapid_type_analysis#RapidTypeVisitor#add_type for (self: RapidTypeVisitor, MClassType) */
2280 void rapid_type_analysis__RapidTypeVisitor__add_type(val
* self
, val
* p0
) {
2281 val
* var_mtype
/* var mtype: MClassType */;
2282 val
* var
/* : RapidTypeAnalysis */;
2283 val
* var1
/* : MClassType */;
2285 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__analysis
]))(self
) /* analysis on <self:RapidTypeVisitor>*/;
2286 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__receiver
]))(self
) /* receiver on <self:RapidTypeVisitor>*/;
2287 ((void (*)(val
*, val
*, val
*))(var
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__add_new
]))(var
, var1
, var_mtype
) /* add_new on <var:RapidTypeAnalysis>*/;
2290 /* method rapid_type_analysis#RapidTypeVisitor#add_type for (self: Object, MClassType) */
2291 void VIRTUAL_rapid_type_analysis__RapidTypeVisitor__add_type(val
* self
, val
* p0
) {
2292 rapid_type_analysis__RapidTypeVisitor__add_type(self
, p0
);
2295 /* method rapid_type_analysis#RapidTypeVisitor#add_monomorphic_send for (self: RapidTypeVisitor, MType, MMethod) */
2296 void rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send(val
* self
, val
* p0
, val
* p1
) {
2297 val
* var_mtype
/* var mtype: MType */;
2298 val
* var_mproperty
/* var mproperty: MMethod */;
2299 val
* var
/* : RapidTypeAnalysis */;
2300 short int var1
/* : Bool */;
2303 const char* var_class_name
;
2306 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__analysis
]))(self
) /* analysis on <self:RapidTypeVisitor>*/;
2307 /* <var_mtype:MType> isa MClassType */
2308 cltype
= type_model__MClassType
.color
;
2309 idtype
= type_model__MClassType
.id
;
2310 if(cltype
>= var_mtype
->type
->table_size
) {
2313 var1
= var_mtype
->type
->type_table
[cltype
] == idtype
;
2316 var_class_name
= var_mtype
== NULL ?
"null" : var_mtype
->type
->name
;
2317 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
2318 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 377);
2321 ((void (*)(val
*, val
*, val
*))(var
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__try_send
]))(var
, var_mtype
, var_mproperty
) /* try_send on <var:RapidTypeAnalysis>*/;
2324 /* method rapid_type_analysis#RapidTypeVisitor#add_monomorphic_send for (self: Object, MType, MMethod) */
2325 void VIRTUAL_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send(val
* self
, val
* p0
, val
* p1
) {
2326 rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send(self
, p0
, p1
);
2329 /* method rapid_type_analysis#RapidTypeVisitor#add_send for (self: RapidTypeVisitor, MType, MMethod) */
2330 void rapid_type_analysis__RapidTypeVisitor__add_send(val
* self
, val
* p0
, val
* p1
) {
2331 val
* var_mtype
/* var mtype: MType */;
2332 val
* var_mproperty
/* var mproperty: MMethod */;
2333 val
* var
/* : RapidTypeAnalysis */;
2336 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__analysis
]))(self
) /* analysis on <self:RapidTypeVisitor>*/;
2337 ((void (*)(val
*, val
*, val
*))(var
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__add_send
]))(var
, var_mtype
, var_mproperty
) /* add_send on <var:RapidTypeAnalysis>*/;
2340 /* method rapid_type_analysis#RapidTypeVisitor#add_send for (self: Object, MType, MMethod) */
2341 void VIRTUAL_rapid_type_analysis__RapidTypeVisitor__add_send(val
* self
, val
* p0
, val
* p1
) {
2342 rapid_type_analysis__RapidTypeVisitor__add_send(self
, p0
, p1
);
2345 /* method rapid_type_analysis#RapidTypeVisitor#add_cast_type for (self: RapidTypeVisitor, MType) */
2346 void rapid_type_analysis__RapidTypeVisitor__add_cast_type(val
* self
, val
* p0
) {
2347 val
* var_mtype
/* var mtype: MType */;
2348 val
* var
/* : RapidTypeAnalysis */;
2350 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__analysis
]))(self
) /* analysis on <self:RapidTypeVisitor>*/;
2351 ((void (*)(val
*, val
*))(var
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__add_cast
]))(var
, var_mtype
) /* add_cast on <var:RapidTypeAnalysis>*/;
2354 /* method rapid_type_analysis#RapidTypeVisitor#add_cast_type for (self: Object, MType) */
2355 void VIRTUAL_rapid_type_analysis__RapidTypeVisitor__add_cast_type(val
* self
, val
* p0
) {
2356 rapid_type_analysis__RapidTypeVisitor__add_cast_type(self
, p0
);
2359 /* method rapid_type_analysis#ANode#accept_rapid_type_visitor for (self: ANode, RapidTypeVisitor) */
2360 void rapid_type_analysis__ANode__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2361 val
* var_v
/* var v: RapidTypeVisitor */;
2365 /* method rapid_type_analysis#ANode#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
2366 void VIRTUAL_rapid_type_analysis__ANode__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2367 rapid_type_analysis__ANode__accept_rapid_type_visitor(self
, p0
);
2370 /* method rapid_type_analysis#AIntExpr#accept_rapid_type_visitor for (self: AIntExpr, RapidTypeVisitor) */
2371 void rapid_type_analysis__AIntExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2372 val
* var_v
/* var v: RapidTypeVisitor */;
2373 val
* var
/* : nullable MType */;
2374 short int var1
/* : Bool */;
2377 const char* var_class_name
;
2379 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AExpr__mtype
]))(self
) /* mtype on <self:AIntExpr>*/;
2380 /* <var:nullable MType> isa MClassType */
2381 cltype
= type_model__MClassType
.color
;
2382 idtype
= type_model__MClassType
.id
;
2386 if(cltype
>= var
->type
->table_size
) {
2389 var1
= var
->type
->type_table
[cltype
] == idtype
;
2393 var_class_name
= var
== NULL ?
"null" : var
->type
->name
;
2394 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
2395 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 395);
2398 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var
) /* add_type on <var_v:RapidTypeVisitor>*/;
2401 /* method rapid_type_analysis#AIntExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
2402 void VIRTUAL_rapid_type_analysis__AIntExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2403 rapid_type_analysis__AIntExpr__accept_rapid_type_visitor(self
, p0
);
2406 /* method rapid_type_analysis#AFloatExpr#accept_rapid_type_visitor for (self: AFloatExpr, RapidTypeVisitor) */
2407 void rapid_type_analysis__AFloatExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2408 val
* var_v
/* var v: RapidTypeVisitor */;
2409 val
* var
/* : nullable MType */;
2410 short int var1
/* : Bool */;
2413 const char* var_class_name
;
2415 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AExpr__mtype
]))(self
) /* mtype on <self:AFloatExpr>*/;
2416 /* <var:nullable MType> isa MClassType */
2417 cltype
= type_model__MClassType
.color
;
2418 idtype
= type_model__MClassType
.id
;
2422 if(cltype
>= var
->type
->table_size
) {
2425 var1
= var
->type
->type_table
[cltype
] == idtype
;
2429 var_class_name
= var
== NULL ?
"null" : var
->type
->name
;
2430 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
2431 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 402);
2434 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var
) /* add_type on <var_v:RapidTypeVisitor>*/;
2437 /* method rapid_type_analysis#AFloatExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
2438 void VIRTUAL_rapid_type_analysis__AFloatExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2439 rapid_type_analysis__AFloatExpr__accept_rapid_type_visitor(self
, p0
);
2442 /* method rapid_type_analysis#ACharExpr#accept_rapid_type_visitor for (self: ACharExpr, RapidTypeVisitor) */
2443 void rapid_type_analysis__ACharExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2444 val
* var_v
/* var v: RapidTypeVisitor */;
2445 val
* var
/* : nullable MType */;
2446 short int var1
/* : Bool */;
2449 const char* var_class_name
;
2451 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AExpr__mtype
]))(self
) /* mtype on <self:ACharExpr>*/;
2452 /* <var:nullable MType> isa MClassType */
2453 cltype
= type_model__MClassType
.color
;
2454 idtype
= type_model__MClassType
.id
;
2458 if(cltype
>= var
->type
->table_size
) {
2461 var1
= var
->type
->type_table
[cltype
] == idtype
;
2465 var_class_name
= var
== NULL ?
"null" : var
->type
->name
;
2466 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
2467 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 409);
2470 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var
) /* add_type on <var_v:RapidTypeVisitor>*/;
2473 /* method rapid_type_analysis#ACharExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
2474 void VIRTUAL_rapid_type_analysis__ACharExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2475 rapid_type_analysis__ACharExpr__accept_rapid_type_visitor(self
, p0
);
2478 /* method rapid_type_analysis#AArrayExpr#accept_rapid_type_visitor for (self: AArrayExpr, RapidTypeVisitor) */
2479 void rapid_type_analysis__AArrayExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2480 val
* var_v
/* var v: RapidTypeVisitor */;
2481 val
* var
/* : nullable MType */;
2482 short int var1
/* : Bool */;
2485 const char* var_class_name
;
2486 val
* var_mtype
/* var mtype: MClassType */;
2487 val
* var2
/* : RapidTypeAnalysis */;
2488 val
* var3
/* : MModule */;
2489 static val
* varonce
;
2490 val
* var4
/* : String */;
2491 char* var5
/* : NativeString */;
2492 long var6
/* : Int */;
2493 val
* var7
/* : String */;
2494 val
* var8
/* : MClass */;
2495 val
* var9
/* : Array[MType] */;
2496 val
* var10
/* : nullable Object */;
2497 val
* var11
/* : Array[MType] */;
2498 long var12
/* : Int */;
2499 val
* var13
/* : NativeArray[MType] */;
2500 val
* var14
/* : MClassType */;
2501 val
* var_native
/* var native: MClassType */;
2502 val
* var15
/* : nullable MClassType */;
2503 static val
* varonce16
;
2504 val
* var17
/* : String */;
2505 char* var18
/* : NativeString */;
2506 long var19
/* : Int */;
2507 val
* var20
/* : String */;
2508 val
* var21
/* : MMethod */;
2509 val
* var_prop
/* var prop: MMethod */;
2511 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AExpr__mtype
]))(self
) /* mtype on <self:AArrayExpr>*/;
2512 /* <var:nullable MType> isa MClassType */
2513 cltype
= type_model__MClassType
.color
;
2514 idtype
= type_model__MClassType
.id
;
2518 if(cltype
>= var
->type
->table_size
) {
2521 var1
= var
->type
->type_table
[cltype
] == idtype
;
2525 var_class_name
= var
== NULL ?
"null" : var
->type
->name
;
2526 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
2527 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 416);
2531 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var_mtype
) /* add_type on <var_v:RapidTypeVisitor>*/;
2532 var2
= ((val
* (*)(val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__analysis
]))(var_v
) /* analysis on <var_v:RapidTypeVisitor>*/;
2533 var3
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__mainmodule
]))(var2
) /* mainmodule on <var2:RapidTypeAnalysis>*/;
2537 var5
= "NativeArray";
2539 var7
= string__NativeString__to_s_with_length(var5
, var6
);
2543 var8
= ((val
* (*)(val
*, val
*))(var3
->class->vft
[COLOR_model__MModule__get_primitive_class
]))(var3
, var4
) /* get_primitive_class on <var3:MModule>*/;
2544 var9
= ((val
* (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MClassType__arguments
]))(var_mtype
) /* arguments on <var_mtype:MClassType>*/;
2545 var10
= ((val
* (*)(val
*))(var9
->class->vft
[COLOR_abstract_collection__Collection__first
]))(var9
) /* first on <var9:Array[MType]>*/;
2546 var11
= NEW_array__Array(&type_array__Arraymodel__MType
);
2547 { /* var11 = array_instance Array[MType] */
2549 var13
= NEW_array__NativeArray(var12
, &type_array__NativeArraymodel__MType
);
2550 ((struct instance_array__NativeArray
*)var13
)->values
[0] = (val
*) var10
;
2551 ((void (*)(val
*, val
*, long))(var11
->class->vft
[COLOR_array__Array__with_native
]))(var11
, var13
, var12
) /* with_native on <var11:Array[MType]>*/;
2552 CHECK_NEW_array__Array(var11
);
2554 var14
= ((val
* (*)(val
*, val
*))(var8
->class->vft
[COLOR_model__MClass__get_mtype
]))(var8
, var11
) /* get_mtype on <var8:MClass>*/;
2556 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var_native
) /* add_type on <var_v:RapidTypeVisitor>*/;
2557 var15
= ((val
* (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__cleanup_type
]))(var_v
, var_mtype
) /* cleanup_type on <var_v:RapidTypeVisitor>*/;
2558 if (var15
== NULL
) {
2559 fprintf(stderr
, "Runtime error: %s", "Cast failed");
2560 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 420);
2567 var18
= "with_native";
2569 var20
= string__NativeString__to_s_with_length(var18
, var19
);
2573 var21
= ((val
* (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_method
]))(var_v
, var_mtype
, var17
) /* get_method on <var_v:RapidTypeVisitor>*/;
2575 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var_mtype
, var_prop
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
2578 /* method rapid_type_analysis#AArrayExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
2579 void VIRTUAL_rapid_type_analysis__AArrayExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2580 rapid_type_analysis__AArrayExpr__accept_rapid_type_visitor(self
, p0
);
2583 /* method rapid_type_analysis#AStringFormExpr#accept_rapid_type_visitor for (self: AStringFormExpr, RapidTypeVisitor) */
2584 void rapid_type_analysis__AStringFormExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2585 val
* var_v
/* var v: RapidTypeVisitor */;
2586 static val
* varonce
;
2587 val
* var
/* : String */;
2588 char* var1
/* : NativeString */;
2589 long var2
/* : Int */;
2590 val
* var3
/* : String */;
2591 val
* var4
/* : MClass */;
2592 val
* var5
/* : MClassType */;
2593 val
* var_native
/* var native: MClassType */;
2594 static val
* varonce6
;
2595 val
* var7
/* : String */;
2596 char* var8
/* : NativeString */;
2597 long var9
/* : Int */;
2598 val
* var10
/* : String */;
2599 val
* var11
/* : MMethod */;
2600 val
* var_prop
/* var prop: MMethod */;
2605 var1
= "NativeString";
2607 var3
= string__NativeString__to_s_with_length(var1
, var2
);
2611 var4
= ((val
* (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_class
]))(var_v
, var
) /* get_class on <var_v:RapidTypeVisitor>*/;
2612 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_model__MClass__mclass_type
]))(var4
) /* mclass_type on <var4:MClass>*/;
2614 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var_native
) /* add_type on <var_v:RapidTypeVisitor>*/;
2620 var10
= string__NativeString__to_s_with_length(var8
, var9
);
2624 var11
= ((val
* (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_method
]))(var_v
, var_native
, var7
) /* get_method on <var_v:RapidTypeVisitor>*/;
2626 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var_native
, var_prop
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
2629 /* method rapid_type_analysis#AStringFormExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
2630 void VIRTUAL_rapid_type_analysis__AStringFormExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2631 rapid_type_analysis__AStringFormExpr__accept_rapid_type_visitor(self
, p0
);
2634 /* method rapid_type_analysis#ASuperstringExpr#accept_rapid_type_visitor for (self: ASuperstringExpr, RapidTypeVisitor) */
2635 void rapid_type_analysis__ASuperstringExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2636 val
* var_v
/* var v: RapidTypeVisitor */;
2637 static val
* varonce
;
2638 val
* var
/* : String */;
2639 char* var1
/* : NativeString */;
2640 long var2
/* : Int */;
2641 val
* var3
/* : String */;
2642 val
* var4
/* : MClass */;
2643 static val
* varonce5
;
2644 val
* var6
/* : String */;
2645 char* var7
/* : NativeString */;
2646 long var8
/* : Int */;
2647 val
* var9
/* : String */;
2648 val
* var10
/* : MClass */;
2649 val
* var11
/* : MClassType */;
2650 val
* var12
/* : Array[MClassType] */;
2651 long var13
/* : Int */;
2652 val
* var14
/* : NativeArray[MClassType] */;
2653 val
* var15
/* : MClassType */;
2654 val
* var_arraytype
/* var arraytype: MClassType */;
2655 static val
* varonce16
;
2656 val
* var17
/* : String */;
2657 char* var18
/* : NativeString */;
2658 long var19
/* : Int */;
2659 val
* var20
/* : String */;
2660 val
* var21
/* : MClass */;
2661 static val
* varonce22
;
2662 val
* var23
/* : String */;
2663 char* var24
/* : NativeString */;
2664 long var25
/* : Int */;
2665 val
* var26
/* : String */;
2666 val
* var27
/* : MClass */;
2667 val
* var28
/* : MClassType */;
2668 val
* var29
/* : Array[MClassType] */;
2669 long var30
/* : Int */;
2670 val
* var31
/* : NativeArray[MClassType] */;
2671 val
* var32
/* : MClassType */;
2672 static val
* varonce33
;
2673 val
* var34
/* : String */;
2674 char* var35
/* : NativeString */;
2675 long var36
/* : Int */;
2676 val
* var37
/* : String */;
2677 val
* var38
/* : MMethod */;
2678 val
* var_prop
/* var prop: MMethod */;
2679 static val
* varonce39
;
2680 val
* var40
/* : String */;
2681 char* var41
/* : NativeString */;
2682 long var42
/* : Int */;
2683 val
* var43
/* : String */;
2684 val
* var44
/* : MMethod */;
2685 val
* var_prop2
/* var prop2: MMethod */;
2692 var3
= string__NativeString__to_s_with_length(var1
, var2
);
2696 var4
= ((val
* (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_class
]))(var_v
, var
) /* get_class on <var_v:RapidTypeVisitor>*/;
2702 var9
= string__NativeString__to_s_with_length(var7
, var8
);
2706 var10
= ((val
* (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_class
]))(var_v
, var6
) /* get_class on <var_v:RapidTypeVisitor>*/;
2707 var11
= ((val
* (*)(val
*))(var10
->class->vft
[COLOR_model__MClass__mclass_type
]))(var10
) /* mclass_type on <var10:MClass>*/;
2708 var12
= NEW_array__Array(&type_array__Arraymodel__MClassType
);
2709 { /* var12 = array_instance Array[MClassType] */
2711 var14
= NEW_array__NativeArray(var13
, &type_array__NativeArraymodel__MClassType
);
2712 ((struct instance_array__NativeArray
*)var14
)->values
[0] = (val
*) var11
;
2713 ((void (*)(val
*, val
*, long))(var12
->class->vft
[COLOR_array__Array__with_native
]))(var12
, var14
, var13
) /* with_native on <var12:Array[MClassType]>*/;
2714 CHECK_NEW_array__Array(var12
);
2716 var15
= ((val
* (*)(val
*, val
*))(var4
->class->vft
[COLOR_model__MClass__get_mtype
]))(var4
, var12
) /* get_mtype on <var4:MClass>*/;
2717 var_arraytype
= var15
;
2718 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var_arraytype
) /* add_type on <var_v:RapidTypeVisitor>*/;
2722 var18
= "NativeArray";
2724 var20
= string__NativeString__to_s_with_length(var18
, var19
);
2728 var21
= ((val
* (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_class
]))(var_v
, var17
) /* get_class on <var_v:RapidTypeVisitor>*/;
2734 var26
= string__NativeString__to_s_with_length(var24
, var25
);
2738 var27
= ((val
* (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_class
]))(var_v
, var23
) /* get_class on <var_v:RapidTypeVisitor>*/;
2739 var28
= ((val
* (*)(val
*))(var27
->class->vft
[COLOR_model__MClass__mclass_type
]))(var27
) /* mclass_type on <var27:MClass>*/;
2740 var29
= NEW_array__Array(&type_array__Arraymodel__MClassType
);
2741 { /* var29 = array_instance Array[MClassType] */
2743 var31
= NEW_array__NativeArray(var30
, &type_array__NativeArraymodel__MClassType
);
2744 ((struct instance_array__NativeArray
*)var31
)->values
[0] = (val
*) var28
;
2745 ((void (*)(val
*, val
*, long))(var29
->class->vft
[COLOR_array__Array__with_native
]))(var29
, var31
, var30
) /* with_native on <var29:Array[MClassType]>*/;
2746 CHECK_NEW_array__Array(var29
);
2748 var32
= ((val
* (*)(val
*, val
*))(var21
->class->vft
[COLOR_model__MClass__get_mtype
]))(var21
, var29
) /* get_mtype on <var21:MClass>*/;
2749 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var32
) /* add_type on <var_v:RapidTypeVisitor>*/;
2755 var37
= string__NativeString__to_s_with_length(var35
, var36
);
2759 var38
= ((val
* (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_method
]))(var_v
, var_arraytype
, var34
) /* get_method on <var_v:RapidTypeVisitor>*/;
2761 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var_arraytype
, var_prop
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
2765 var41
= "with_native";
2767 var43
= string__NativeString__to_s_with_length(var41
, var42
);
2771 var44
= ((val
* (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_method
]))(var_v
, var_arraytype
, var40
) /* get_method on <var_v:RapidTypeVisitor>*/;
2773 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var_arraytype
, var_prop2
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
2776 /* method rapid_type_analysis#ASuperstringExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
2777 void VIRTUAL_rapid_type_analysis__ASuperstringExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2778 rapid_type_analysis__ASuperstringExpr__accept_rapid_type_visitor(self
, p0
);
2781 /* method rapid_type_analysis#ACrangeExpr#accept_rapid_type_visitor for (self: ACrangeExpr, RapidTypeVisitor) */
2782 void rapid_type_analysis__ACrangeExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2783 val
* var_v
/* var v: RapidTypeVisitor */;
2784 val
* var
/* : nullable MType */;
2785 short int var1
/* : Bool */;
2788 const char* var_class_name
;
2789 val
* var_mtype
/* var mtype: MClassType */;
2790 static val
* varonce
;
2791 val
* var2
/* : String */;
2792 char* var3
/* : NativeString */;
2793 long var4
/* : Int */;
2794 val
* var5
/* : String */;
2795 val
* var6
/* : MMethod */;
2796 val
* var_prop
/* var prop: MMethod */;
2798 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AExpr__mtype
]))(self
) /* mtype on <self:ACrangeExpr>*/;
2799 /* <var:nullable MType> isa MClassType */
2800 cltype
= type_model__MClassType
.color
;
2801 idtype
= type_model__MClassType
.id
;
2805 if(cltype
>= var
->type
->table_size
) {
2808 var1
= var
->type
->type_table
[cltype
] == idtype
;
2812 var_class_name
= var
== NULL ?
"null" : var
->type
->name
;
2813 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
2814 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 452);
2818 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var_mtype
) /* add_type on <var_v:RapidTypeVisitor>*/;
2824 var5
= string__NativeString__to_s_with_length(var3
, var4
);
2828 var6
= ((val
* (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_method
]))(var_v
, var_mtype
, var2
) /* get_method on <var_v:RapidTypeVisitor>*/;
2830 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var_mtype
, var_prop
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
2833 /* method rapid_type_analysis#ACrangeExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
2834 void VIRTUAL_rapid_type_analysis__ACrangeExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2835 rapid_type_analysis__ACrangeExpr__accept_rapid_type_visitor(self
, p0
);
2838 /* method rapid_type_analysis#AOrangeExpr#accept_rapid_type_visitor for (self: AOrangeExpr, RapidTypeVisitor) */
2839 void rapid_type_analysis__AOrangeExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2840 val
* var_v
/* var v: RapidTypeVisitor */;
2841 val
* var
/* : nullable MType */;
2842 short int var1
/* : Bool */;
2845 const char* var_class_name
;
2846 val
* var_mtype
/* var mtype: MClassType */;
2847 static val
* varonce
;
2848 val
* var2
/* : String */;
2849 char* var3
/* : NativeString */;
2850 long var4
/* : Int */;
2851 val
* var5
/* : String */;
2852 val
* var6
/* : MMethod */;
2853 val
* var_prop
/* var prop: MMethod */;
2855 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AExpr__mtype
]))(self
) /* mtype on <self:AOrangeExpr>*/;
2856 /* <var:nullable MType> isa MClassType */
2857 cltype
= type_model__MClassType
.color
;
2858 idtype
= type_model__MClassType
.id
;
2862 if(cltype
>= var
->type
->table_size
) {
2865 var1
= var
->type
->type_table
[cltype
] == idtype
;
2869 var_class_name
= var
== NULL ?
"null" : var
->type
->name
;
2870 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
2871 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 462);
2875 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var_mtype
) /* add_type on <var_v:RapidTypeVisitor>*/;
2879 var3
= "without_last";
2881 var5
= string__NativeString__to_s_with_length(var3
, var4
);
2885 var6
= ((val
* (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_method
]))(var_v
, var_mtype
, var2
) /* get_method on <var_v:RapidTypeVisitor>*/;
2887 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var_mtype
, var_prop
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
2890 /* method rapid_type_analysis#AOrangeExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
2891 void VIRTUAL_rapid_type_analysis__AOrangeExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2892 rapid_type_analysis__AOrangeExpr__accept_rapid_type_visitor(self
, p0
);
2895 /* method rapid_type_analysis#ATrueExpr#accept_rapid_type_visitor for (self: ATrueExpr, RapidTypeVisitor) */
2896 void rapid_type_analysis__ATrueExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2897 val
* var_v
/* var v: RapidTypeVisitor */;
2898 val
* var
/* : nullable MType */;
2899 short int var1
/* : Bool */;
2902 const char* var_class_name
;
2904 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AExpr__mtype
]))(self
) /* mtype on <self:ATrueExpr>*/;
2905 /* <var:nullable MType> isa MClassType */
2906 cltype
= type_model__MClassType
.color
;
2907 idtype
= type_model__MClassType
.id
;
2911 if(cltype
>= var
->type
->table_size
) {
2914 var1
= var
->type
->type_table
[cltype
] == idtype
;
2918 var_class_name
= var
== NULL ?
"null" : var
->type
->name
;
2919 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
2920 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 472);
2923 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var
) /* add_type on <var_v:RapidTypeVisitor>*/;
2926 /* method rapid_type_analysis#ATrueExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
2927 void VIRTUAL_rapid_type_analysis__ATrueExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2928 rapid_type_analysis__ATrueExpr__accept_rapid_type_visitor(self
, p0
);
2931 /* method rapid_type_analysis#AFalseExpr#accept_rapid_type_visitor for (self: AFalseExpr, RapidTypeVisitor) */
2932 void rapid_type_analysis__AFalseExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2933 val
* var_v
/* var v: RapidTypeVisitor */;
2934 val
* var
/* : nullable MType */;
2935 short int var1
/* : Bool */;
2938 const char* var_class_name
;
2940 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AExpr__mtype
]))(self
) /* mtype on <self:AFalseExpr>*/;
2941 /* <var:nullable MType> isa MClassType */
2942 cltype
= type_model__MClassType
.color
;
2943 idtype
= type_model__MClassType
.id
;
2947 if(cltype
>= var
->type
->table_size
) {
2950 var1
= var
->type
->type_table
[cltype
] == idtype
;
2954 var_class_name
= var
== NULL ?
"null" : var
->type
->name
;
2955 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
2956 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 479);
2959 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var
) /* add_type on <var_v:RapidTypeVisitor>*/;
2962 /* method rapid_type_analysis#AFalseExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
2963 void VIRTUAL_rapid_type_analysis__AFalseExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2964 rapid_type_analysis__AFalseExpr__accept_rapid_type_visitor(self
, p0
);
2967 /* method rapid_type_analysis#AIsaExpr#accept_rapid_type_visitor for (self: AIsaExpr, RapidTypeVisitor) */
2968 void rapid_type_analysis__AIsaExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2969 val
* var_v
/* var v: RapidTypeVisitor */;
2970 val
* var
/* : nullable MType */;
2972 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AIsaExpr__cast_type
]))(self
) /* cast_type on <self:AIsaExpr>*/;
2974 fprintf(stderr
, "Runtime error: %s", "Cast failed");
2975 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 486);
2978 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_cast_type
]))(var_v
, var
) /* add_cast_type on <var_v:RapidTypeVisitor>*/;
2981 /* method rapid_type_analysis#AIsaExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
2982 void VIRTUAL_rapid_type_analysis__AIsaExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2983 rapid_type_analysis__AIsaExpr__accept_rapid_type_visitor(self
, p0
);
2986 /* method rapid_type_analysis#AAsCastExpr#accept_rapid_type_visitor for (self: AAsCastExpr, RapidTypeVisitor) */
2987 void rapid_type_analysis__AAsCastExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
2988 val
* var_v
/* var v: RapidTypeVisitor */;
2989 val
* var
/* : nullable MType */;
2991 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AExpr__mtype
]))(self
) /* mtype on <self:AAsCastExpr>*/;
2993 fprintf(stderr
, "Runtime error: %s", "Cast failed");
2994 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 493);
2997 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_cast_type
]))(var_v
, var
) /* add_cast_type on <var_v:RapidTypeVisitor>*/;
3000 /* method rapid_type_analysis#AAsCastExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
3001 void VIRTUAL_rapid_type_analysis__AAsCastExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3002 rapid_type_analysis__AAsCastExpr__accept_rapid_type_visitor(self
, p0
);
3005 /* method rapid_type_analysis#ASendExpr#accept_rapid_type_visitor for (self: ASendExpr, RapidTypeVisitor) */
3006 void rapid_type_analysis__ASendExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3007 val
* var_v
/* var v: RapidTypeVisitor */;
3008 val
* var
/* : nullable MMethod */;
3009 val
* var_mproperty
/* var mproperty: MMethod */;
3010 val
* var1
/* : AExpr */;
3011 val
* var2
/* : nullable MType */;
3012 val
* var_recvtype
/* var recvtype: MType */;
3014 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__ASendExpr__mproperty
]))(self
) /* mproperty on <self:ASendExpr>*/;
3016 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3017 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 500);
3020 var_mproperty
= var
;
3021 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__ASendExpr__n_expr
]))(self
) /* n_expr on <self:ASendExpr>*/;
3022 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_typing__AExpr__mtype
]))(var1
) /* mtype on <var1:AExpr>*/;
3024 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3025 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 501);
3028 var_recvtype
= var2
;
3029 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_send
]))(var_v
, var_recvtype
, var_mproperty
) /* add_send on <var_v:RapidTypeVisitor>*/;
3032 /* method rapid_type_analysis#ASendExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
3033 void VIRTUAL_rapid_type_analysis__ASendExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3034 rapid_type_analysis__ASendExpr__accept_rapid_type_visitor(self
, p0
);
3037 /* method rapid_type_analysis#ASendReassignFormExpr#accept_rapid_type_visitor for (self: ASendReassignFormExpr, RapidTypeVisitor) */
3038 void rapid_type_analysis__ASendReassignFormExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3039 val
* var_v
/* var v: RapidTypeVisitor */;
3040 val
* var
/* : nullable MType */;
3041 val
* var1
/* : nullable MMethodDef */;
3042 val
* var2
/* : MProperty */;
3043 val
* var3
/* : nullable MMethod */;
3044 val
* var_mproperty
/* var mproperty: MMethod */;
3045 val
* var4
/* : nullable MMethod */;
3046 val
* var_write_mproperty
/* var write_mproperty: MMethod */;
3047 val
* var5
/* : AExpr */;
3048 short int var6
/* : Bool */;
3051 val
* var7
/* : MClassType */;
3052 val
* var8
/* : MClassType */;
3053 val
* var9
/* : AExpr */;
3054 val
* var10
/* : nullable MType */;
3055 val
* var_recvtype
/* var recvtype: MType */;
3057 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AReassignFormExpr__read_type
]))(self
) /* read_type on <self:ASendReassignFormExpr>*/;
3059 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3060 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 510);
3063 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AReassignFormExpr__reassign_property
]))(self
) /* reassign_property on <self:ASendReassignFormExpr>*/;
3065 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
3066 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 510);
3069 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_model__MPropDef__mproperty
]))(var1
) /* mproperty on <var1:nullable MMethodDef>*/;
3071 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_send
]))(var_v
, var
, var2
) /* add_send on <var_v:RapidTypeVisitor>*/;
3072 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__ASendExpr__mproperty
]))(self
) /* mproperty on <self:ASendReassignFormExpr>*/;
3074 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3075 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 511);
3078 var_mproperty
= var3
;
3079 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__ASendReassignFormExpr__write_mproperty
]))(self
) /* write_mproperty on <self:ASendReassignFormExpr>*/;
3081 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3082 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 512);
3085 var_write_mproperty
= var4
;
3086 var5
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__ASendExpr__n_expr
]))(self
) /* n_expr on <self:ASendReassignFormExpr>*/;
3087 /* <var5:AExpr> isa ASelfExpr */
3088 cltype
= type_parser_nodes__ASelfExpr
.color
;
3089 idtype
= type_parser_nodes__ASelfExpr
.id
;
3090 if(cltype
>= var5
->type
->table_size
) {
3093 var6
= var5
->type
->type_table
[cltype
] == idtype
;
3096 var7
= ((val
* (*)(val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__receiver
]))(var_v
) /* receiver on <var_v:RapidTypeVisitor>*/;
3097 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var7
, var_mproperty
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
3098 var8
= ((val
* (*)(val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__receiver
]))(var_v
) /* receiver on <var_v:RapidTypeVisitor>*/;
3099 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var8
, var_write_mproperty
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
3101 var9
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__ASendExpr__n_expr
]))(self
) /* n_expr on <self:ASendReassignFormExpr>*/;
3102 var10
= ((val
* (*)(val
*))(var9
->class->vft
[COLOR_typing__AExpr__mtype
]))(var9
) /* mtype on <var9:AExpr>*/;
3103 if (var10
== NULL
) {
3104 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3105 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 517);
3108 var_recvtype
= var10
;
3109 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_send
]))(var_v
, var_recvtype
, var_mproperty
) /* add_send on <var_v:RapidTypeVisitor>*/;
3110 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_send
]))(var_v
, var_recvtype
, var_write_mproperty
) /* add_send on <var_v:RapidTypeVisitor>*/;
3114 /* method rapid_type_analysis#ASendReassignFormExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
3115 void VIRTUAL_rapid_type_analysis__ASendReassignFormExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3116 rapid_type_analysis__ASendReassignFormExpr__accept_rapid_type_visitor(self
, p0
);
3119 /* method rapid_type_analysis#AVarReassignExpr#accept_rapid_type_visitor for (self: AVarReassignExpr, RapidTypeVisitor) */
3120 void rapid_type_analysis__AVarReassignExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3121 val
* var_v
/* var v: RapidTypeVisitor */;
3122 val
* var
/* : nullable MType */;
3123 val
* var1
/* : nullable MMethodDef */;
3124 val
* var2
/* : MProperty */;
3126 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AReassignFormExpr__read_type
]))(self
) /* read_type on <self:AVarReassignExpr>*/;
3128 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3129 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 527);
3132 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AReassignFormExpr__reassign_property
]))(self
) /* reassign_property on <self:AVarReassignExpr>*/;
3134 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
3135 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 527);
3138 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_model__MPropDef__mproperty
]))(var1
) /* mproperty on <var1:nullable MMethodDef>*/;
3140 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_send
]))(var_v
, var
, var2
) /* add_send on <var_v:RapidTypeVisitor>*/;
3143 /* method rapid_type_analysis#AVarReassignExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
3144 void VIRTUAL_rapid_type_analysis__AVarReassignExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3145 rapid_type_analysis__AVarReassignExpr__accept_rapid_type_visitor(self
, p0
);
3148 /* method rapid_type_analysis#AAttrReassignExpr#accept_rapid_type_visitor for (self: AAttrReassignExpr, RapidTypeVisitor) */
3149 void rapid_type_analysis__AAttrReassignExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3150 val
* var_v
/* var v: RapidTypeVisitor */;
3151 val
* var
/* : nullable MType */;
3152 val
* var1
/* : nullable MMethodDef */;
3153 val
* var2
/* : MProperty */;
3155 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AReassignFormExpr__read_type
]))(self
) /* read_type on <self:AAttrReassignExpr>*/;
3157 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3158 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 534);
3161 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AReassignFormExpr__reassign_property
]))(self
) /* reassign_property on <self:AAttrReassignExpr>*/;
3163 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
3164 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 534);
3167 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_model__MPropDef__mproperty
]))(var1
) /* mproperty on <var1:nullable MMethodDef>*/;
3169 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_send
]))(var_v
, var
, var2
) /* add_send on <var_v:RapidTypeVisitor>*/;
3172 /* method rapid_type_analysis#AAttrReassignExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
3173 void VIRTUAL_rapid_type_analysis__AAttrReassignExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3174 rapid_type_analysis__AAttrReassignExpr__accept_rapid_type_visitor(self
, p0
);
3177 /* method rapid_type_analysis#ASuperExpr#accept_rapid_type_visitor for (self: ASuperExpr, RapidTypeVisitor) */
3178 void rapid_type_analysis__ASuperExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3179 val
* var_v
/* var v: RapidTypeVisitor */;
3180 val
* var
/* : nullable MMethod */;
3181 val
* var_mproperty
/* var mproperty: nullable MMethod */;
3182 val
* var1
/* : null */;
3183 short int var2
/* : Bool */;
3184 val
* var3
/* : MClassType */;
3185 val
* var4
/* : RapidTypeAnalysis */;
3186 val
* var5
/* : MClassType */;
3187 val
* var6
/* : MPropDef */;
3188 short int var7
/* : Bool */;
3191 const char* var_class_name
;
3193 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__ASuperExpr__mproperty
]))(self
) /* mproperty on <self:ASuperExpr>*/;
3194 var_mproperty
= var
;
3196 if (var_mproperty
== NULL
) {
3197 var2
= 0; /* is null */
3199 var2
= 1; /* arg is null and recv is not */
3202 var3
= ((val
* (*)(val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__receiver
]))(var_v
) /* receiver on <var_v:RapidTypeVisitor>*/;
3203 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var3
, var_mproperty
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
3207 var4
= ((val
* (*)(val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__analysis
]))(var_v
) /* analysis on <var_v:RapidTypeVisitor>*/;
3208 var5
= ((val
* (*)(val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__receiver
]))(var_v
) /* receiver on <var_v:RapidTypeVisitor>*/;
3209 var6
= ((val
* (*)(val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__mpropdef
]))(var_v
) /* mpropdef on <var_v:RapidTypeVisitor>*/;
3210 /* <var6:MPropDef> isa MMethodDef */
3211 cltype
= type_model__MMethodDef
.color
;
3212 idtype
= type_model__MMethodDef
.id
;
3213 if(cltype
>= var6
->type
->table_size
) {
3216 var7
= var6
->type
->type_table
[cltype
] == idtype
;
3219 var_class_name
= var6
== NULL ?
"null" : var6
->type
->name
;
3220 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MMethodDef", var_class_name
);
3221 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 547);
3224 ((void (*)(val
*, val
*, val
*))(var4
->class->vft
[COLOR_rapid_type_analysis__RapidTypeAnalysis__add_super_send
]))(var4
, var5
, var6
) /* add_super_send on <var4:RapidTypeAnalysis>*/;
3227 /* method rapid_type_analysis#ASuperExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
3228 void VIRTUAL_rapid_type_analysis__ASuperExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3229 rapid_type_analysis__ASuperExpr__accept_rapid_type_visitor(self
, p0
);
3232 /* method rapid_type_analysis#AForExpr#accept_rapid_type_visitor for (self: AForExpr, RapidTypeVisitor) */
3233 void rapid_type_analysis__AForExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3234 val
* var_v
/* var v: RapidTypeVisitor */;
3235 val
* var
/* : AExpr */;
3236 val
* var1
/* : nullable MType */;
3237 val
* var_recvtype
/* var recvtype: MType */;
3238 val
* var2
/* : nullable MClassType */;
3239 val
* var_colltype
/* var colltype: MClassType */;
3240 static val
* varonce
;
3241 val
* var3
/* : String */;
3242 char* var4
/* : NativeString */;
3243 long var5
/* : Int */;
3244 val
* var6
/* : String */;
3245 val
* var7
/* : MMethod */;
3246 val
* var_itmeth
/* var itmeth: MMethod */;
3247 val
* var8
/* : MPropDef */;
3248 val
* var9
/* : nullable MSignature */;
3249 val
* var10
/* : nullable MType */;
3250 short int var11
/* : Bool */;
3253 const char* var_class_name
;
3254 val
* var12
/* : MClass */;
3255 val
* var13
/* : MClassDef */;
3256 val
* var14
/* : MClassType */;
3257 val
* var_iteratortype
/* var iteratortype: MClassType */;
3258 static val
* varonce15
;
3259 val
* var16
/* : String */;
3260 char* var17
/* : NativeString */;
3261 long var18
/* : Int */;
3262 val
* var19
/* : String */;
3263 val
* var20
/* : MClass */;
3264 val
* var21
/* : MClassType */;
3265 val
* var_objtype
/* var objtype: MClassType */;
3266 static val
* varonce22
;
3267 val
* var23
/* : String */;
3268 char* var24
/* : NativeString */;
3269 long var25
/* : Int */;
3270 val
* var26
/* : String */;
3271 val
* var27
/* : MMethod */;
3272 val
* var28
/* : nullable Array[Variable] */;
3273 long var29
/* : Int */;
3274 long var30
/* : Int */;
3275 short int var31
/* : Bool */;
3276 short int var33
/* : Bool */;
3277 static val
* varonce34
;
3278 val
* var35
/* : String */;
3279 char* var36
/* : NativeString */;
3280 long var37
/* : Int */;
3281 val
* var38
/* : String */;
3282 val
* var39
/* : MMethod */;
3283 val
* var40
/* : nullable Array[Variable] */;
3284 long var41
/* : Int */;
3285 long var42
/* : Int */;
3286 short int var43
/* : Bool */;
3287 short int var45
/* : Bool */;
3288 static val
* varonce46
;
3289 val
* var47
/* : String */;
3290 char* var48
/* : NativeString */;
3291 long var49
/* : Int */;
3292 val
* var50
/* : String */;
3293 val
* var51
/* : MMethod */;
3294 static val
* varonce52
;
3295 val
* var53
/* : String */;
3296 char* var54
/* : NativeString */;
3297 long var55
/* : Int */;
3298 val
* var56
/* : String */;
3299 val
* var57
/* : MMethod */;
3300 static val
* varonce58
;
3301 val
* var59
/* : String */;
3302 char* var60
/* : NativeString */;
3303 long var61
/* : Int */;
3304 val
* var62
/* : String */;
3305 val
* var63
/* : MMethod */;
3307 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_parser_nodes__AForExpr__n_expr
]))(self
) /* n_expr on <self:AForExpr>*/;
3308 var1
= ((val
* (*)(val
*))(var
->class->vft
[COLOR_typing__AExpr__mtype
]))(var
) /* mtype on <var:AExpr>*/;
3310 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3311 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 554);
3314 var_recvtype
= var1
;
3315 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AForExpr__coltype
]))(self
) /* coltype on <self:AForExpr>*/;
3317 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3318 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 555);
3321 var_colltype
= var2
;
3327 var6
= string__NativeString__to_s_with_length(var4
, var5
);
3331 var7
= ((val
* (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_method
]))(var_v
, var_colltype
, var3
) /* get_method on <var_v:RapidTypeVisitor>*/;
3333 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_send
]))(var_v
, var_recvtype
, var_itmeth
) /* add_send on <var_v:RapidTypeVisitor>*/;
3334 var8
= ((val
* (*)(val
*))(var_itmeth
->class->vft
[COLOR_model__MProperty__intro
]))(var_itmeth
) /* intro on <var_itmeth:MMethod>*/;
3335 var9
= ((val
* (*)(val
*))(var8
->class->vft
[COLOR_model__MMethodDef__msignature
]))(var8
) /* msignature on <var8:MPropDef(MMethodDef)>*/;
3337 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
3338 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 558);
3341 var10
= ((val
* (*)(val
*))(var9
->class->vft
[COLOR_model__MSignature__return_mtype
]))(var9
) /* return_mtype on <var9:nullable MSignature>*/;
3343 /* <var10:nullable MType> isa MClassType */
3344 cltype
= type_model__MClassType
.color
;
3345 idtype
= type_model__MClassType
.id
;
3349 if(cltype
>= var10
->type
->table_size
) {
3352 var11
= var10
->type
->type_table
[cltype
] == idtype
;
3356 var_class_name
= var10
== NULL ?
"null" : var10
->type
->name
;
3357 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
3358 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 558);
3361 var12
= ((val
* (*)(val
*))(var10
->class->vft
[COLOR_model__MClassType__mclass
]))(var10
) /* mclass on <var10:nullable MType(MClassType)>*/;
3362 var13
= ((val
* (*)(val
*))(var12
->class->vft
[COLOR_model__MClass__intro
]))(var12
) /* intro on <var12:MClass>*/;
3363 var14
= ((val
* (*)(val
*))(var13
->class->vft
[COLOR_model__MClassDef__bound_mtype
]))(var13
) /* bound_mtype on <var13:MClassDef>*/;
3364 var_iteratortype
= var14
;
3370 var19
= string__NativeString__to_s_with_length(var17
, var18
);
3374 var20
= ((val
* (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_class
]))(var_v
, var16
) /* get_class on <var_v:RapidTypeVisitor>*/;
3375 var21
= ((val
* (*)(val
*))(var20
->class->vft
[COLOR_model__MClass__mclass_type
]))(var20
) /* mclass_type on <var20:MClass>*/;
3376 var_objtype
= var21
;
3382 var26
= string__NativeString__to_s_with_length(var24
, var25
);
3386 var27
= ((val
* (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_method
]))(var_v
, var_iteratortype
, var23
) /* get_method on <var_v:RapidTypeVisitor>*/;
3387 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_send
]))(var_v
, var_objtype
, var27
) /* add_send on <var_v:RapidTypeVisitor>*/;
3388 var28
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_scope__AForExpr__variables
]))(self
) /* variables on <self:AForExpr>*/;
3389 if (var28
== NULL
) {
3390 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
3391 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 561);
3394 var29
= ((long (*)(val
*))(var28
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var28
) /* length on <var28:nullable Array[Variable]>*/;
3397 { /* Inline kernel#Int#== (var29,var30) */
3398 var33
= var29
== var30
;
3401 RET_LABEL32
:(void)0;
3409 var38
= string__NativeString__to_s_with_length(var36
, var37
);
3413 var39
= ((val
* (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_method
]))(var_v
, var_iteratortype
, var35
) /* get_method on <var_v:RapidTypeVisitor>*/;
3414 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_send
]))(var_v
, var_objtype
, var39
) /* add_send on <var_v:RapidTypeVisitor>*/;
3416 var40
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_scope__AForExpr__variables
]))(self
) /* variables on <self:AForExpr>*/;
3417 if (var40
== NULL
) {
3418 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
3419 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 563);
3422 var41
= ((long (*)(val
*))(var40
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var40
) /* length on <var40:nullable Array[Variable]>*/;
3425 { /* Inline kernel#Int#== (var41,var42) */
3426 var45
= var41
== var42
;
3429 RET_LABEL44
:(void)0;
3437 var50
= string__NativeString__to_s_with_length(var48
, var49
);
3441 var51
= ((val
* (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_method
]))(var_v
, var_iteratortype
, var47
) /* get_method on <var_v:RapidTypeVisitor>*/;
3442 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_send
]))(var_v
, var_objtype
, var51
) /* add_send on <var_v:RapidTypeVisitor>*/;
3448 var56
= string__NativeString__to_s_with_length(var54
, var55
);
3452 var57
= ((val
* (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_method
]))(var_v
, var_iteratortype
, var53
) /* get_method on <var_v:RapidTypeVisitor>*/;
3453 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_send
]))(var_v
, var_objtype
, var57
) /* add_send on <var_v:RapidTypeVisitor>*/;
3455 fprintf(stderr
, "Runtime error: %s", "Aborted");
3456 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 567);
3465 var62
= string__NativeString__to_s_with_length(var60
, var61
);
3469 var63
= ((val
* (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__get_method
]))(var_v
, var_iteratortype
, var59
) /* get_method on <var_v:RapidTypeVisitor>*/;
3470 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_send
]))(var_v
, var_objtype
, var63
) /* add_send on <var_v:RapidTypeVisitor>*/;
3473 /* method rapid_type_analysis#AForExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
3474 void VIRTUAL_rapid_type_analysis__AForExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3475 rapid_type_analysis__AForExpr__accept_rapid_type_visitor(self
, p0
);
3478 /* method rapid_type_analysis#ANewExpr#accept_rapid_type_visitor for (self: ANewExpr, RapidTypeVisitor) */
3479 void rapid_type_analysis__ANewExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3480 val
* var_v
/* var v: RapidTypeVisitor */;
3481 val
* var
/* : nullable MType */;
3482 short int var1
/* : Bool */;
3485 const char* var_class_name
;
3486 val
* var_mtype
/* var mtype: MClassType */;
3487 val
* var2
/* : nullable MMethod */;
3488 val
* var_mproperty
/* var mproperty: MMethod */;
3490 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__AExpr__mtype
]))(self
) /* mtype on <self:ANewExpr>*/;
3491 /* <var:nullable MType> isa MClassType */
3492 cltype
= type_model__MClassType
.color
;
3493 idtype
= type_model__MClassType
.id
;
3497 if(cltype
>= var
->type
->table_size
) {
3500 var1
= var
->type
->type_table
[cltype
] == idtype
;
3504 var_class_name
= var
== NULL ?
"null" : var
->type
->name
;
3505 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
3506 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 576);
3510 ((void (*)(val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_type
]))(var_v
, var_mtype
) /* add_type on <var_v:RapidTypeVisitor>*/;
3511 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_typing__ANewExpr__mproperty
]))(self
) /* mproperty on <self:ANewExpr>*/;
3513 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3514 fprintf(stderr
, " (%s:%d)\n", "src/rapid_type_analysis.nit", 578);
3517 var_mproperty
= var2
;
3518 ((void (*)(val
*, val
*, val
*))(var_v
->class->vft
[COLOR_rapid_type_analysis__RapidTypeVisitor__add_monomorphic_send
]))(var_v
, var_mtype
, var_mproperty
) /* add_monomorphic_send on <var_v:RapidTypeVisitor>*/;
3521 /* method rapid_type_analysis#ANewExpr#accept_rapid_type_visitor for (self: Object, RapidTypeVisitor) */
3522 void VIRTUAL_rapid_type_analysis__ANewExpr__accept_rapid_type_visitor(val
* self
, val
* p0
) {
3523 rapid_type_analysis__ANewExpr__accept_rapid_type_visitor(self
, p0
);