1 #include "typing.sep.0.h"
2 /* method typing#ToolContext#typing_phase for (self: ToolContext): Phase */
3 val
* typing__ToolContext__typing_phase(val
* self
) {
4 val
* var
/* : Phase */;
5 val
* var1
/* : Phase */;
6 var1
= self
->attrs
[COLOR_typing__ToolContext___typing_phase
].val
; /* _typing_phase on <self:ToolContext> */
7 if (unlikely(var1
== NULL
)) {
8 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _typing_phase");
9 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 27);
16 /* method typing#ToolContext#typing_phase for (self: Object): Phase */
17 val
* VIRTUAL_typing__ToolContext__typing_phase(val
* self
) {
18 val
* var
/* : Phase */;
19 val
* var1
/* : Phase */;
20 val
* var3
/* : Phase */;
21 { /* Inline typing#ToolContext#typing_phase (self) on <self:Object(ToolContext)> */
22 var3
= self
->attrs
[COLOR_typing__ToolContext___typing_phase
].val
; /* _typing_phase on <self:Object(ToolContext)> */
23 if (unlikely(var3
== NULL
)) {
24 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _typing_phase");
25 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 27);
35 /* method typing#TypingPhase#process_npropdef for (self: TypingPhase, APropdef) */
36 void typing__TypingPhase__process_npropdef(val
* self
, val
* p0
) {
37 val
* var_npropdef
/* var npropdef: APropdef */;
38 val
* var
/* : ToolContext */;
39 val
* var2
/* : ToolContext */;
40 val
* var3
/* : ModelBuilder */;
43 { /* Inline phase#Phase#toolcontext (self) on <self:TypingPhase> */
44 var2
= self
->attrs
[COLOR_phase__Phase___toolcontext
].val
; /* _toolcontext on <self:TypingPhase> */
45 if (unlikely(var2
== NULL
)) {
46 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
47 PRINT_ERROR(" (%s:%d)\n", "src/phase.nit", 145);
55 var3
= modelbuilder__ToolContext__modelbuilder(var
);
58 ((void (*)(val
*, val
*))(var_npropdef
->class->vft
[COLOR_typing__APropdef__do_typing
]))(var_npropdef
, var3
) /* do_typing on <var_npropdef:APropdef>*/;
62 /* method typing#TypingPhase#process_npropdef for (self: Object, APropdef) */
63 void VIRTUAL_typing__TypingPhase__process_npropdef(val
* self
, val
* p0
) {
64 typing__TypingPhase__process_npropdef(self
, p0
); /* Direct call typing#TypingPhase#process_npropdef on <self:Object(TypingPhase)>*/
67 /* method typing#TypeVisitor#modelbuilder for (self: TypeVisitor): ModelBuilder */
68 val
* typing__TypeVisitor__modelbuilder(val
* self
) {
69 val
* var
/* : ModelBuilder */;
70 val
* var1
/* : ModelBuilder */;
71 var1
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
72 if (unlikely(var1
== NULL
)) {
73 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
74 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
81 /* method typing#TypeVisitor#modelbuilder for (self: Object): ModelBuilder */
82 val
* VIRTUAL_typing__TypeVisitor__modelbuilder(val
* self
) {
83 val
* var
/* : ModelBuilder */;
84 val
* var1
/* : ModelBuilder */;
85 val
* var3
/* : ModelBuilder */;
86 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:Object(TypeVisitor)> */
87 var3
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:Object(TypeVisitor)> */
88 if (unlikely(var3
== NULL
)) {
89 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
90 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
100 /* method typing#TypeVisitor#modelbuilder= for (self: TypeVisitor, ModelBuilder) */
101 void typing__TypeVisitor__modelbuilder_61d(val
* self
, val
* p0
) {
102 self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
= p0
; /* _modelbuilder on <self:TypeVisitor> */
105 /* method typing#TypeVisitor#modelbuilder= for (self: Object, ModelBuilder) */
106 void VIRTUAL_typing__TypeVisitor__modelbuilder_61d(val
* self
, val
* p0
) {
107 { /* Inline typing#TypeVisitor#modelbuilder= (self,p0) on <self:Object(TypeVisitor)> */
108 self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
= p0
; /* _modelbuilder on <self:Object(TypeVisitor)> */
113 /* method typing#TypeVisitor#mmodule for (self: TypeVisitor): MModule */
114 val
* typing__TypeVisitor__mmodule(val
* self
) {
115 val
* var
/* : MModule */;
116 val
* var1
/* : MModule */;
117 var1
= self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <self:TypeVisitor> */
118 if (unlikely(var1
== NULL
)) {
119 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
120 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
127 /* method typing#TypeVisitor#mmodule for (self: Object): MModule */
128 val
* VIRTUAL_typing__TypeVisitor__mmodule(val
* self
) {
129 val
* var
/* : MModule */;
130 val
* var1
/* : MModule */;
131 val
* var3
/* : MModule */;
132 { /* Inline typing#TypeVisitor#mmodule (self) on <self:Object(TypeVisitor)> */
133 var3
= self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <self:Object(TypeVisitor)> */
134 if (unlikely(var3
== NULL
)) {
135 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
136 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
146 /* method typing#TypeVisitor#mmodule= for (self: TypeVisitor, MModule) */
147 void typing__TypeVisitor__mmodule_61d(val
* self
, val
* p0
) {
148 self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
= p0
; /* _mmodule on <self:TypeVisitor> */
151 /* method typing#TypeVisitor#mmodule= for (self: Object, MModule) */
152 void VIRTUAL_typing__TypeVisitor__mmodule_61d(val
* self
, val
* p0
) {
153 { /* Inline typing#TypeVisitor#mmodule= (self,p0) on <self:Object(TypeVisitor)> */
154 self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
= p0
; /* _mmodule on <self:Object(TypeVisitor)> */
159 /* method typing#TypeVisitor#anchor for (self: TypeVisitor): nullable MClassType */
160 val
* typing__TypeVisitor__anchor(val
* self
) {
161 val
* var
/* : nullable MClassType */;
162 val
* var1
/* : nullable MClassType */;
163 var1
= self
->attrs
[COLOR_typing__TypeVisitor___anchor
].val
; /* _anchor on <self:TypeVisitor> */
168 /* method typing#TypeVisitor#anchor for (self: Object): nullable MClassType */
169 val
* VIRTUAL_typing__TypeVisitor__anchor(val
* self
) {
170 val
* var
/* : nullable MClassType */;
171 val
* var1
/* : nullable MClassType */;
172 val
* var3
/* : nullable MClassType */;
173 { /* Inline typing#TypeVisitor#anchor (self) on <self:Object(TypeVisitor)> */
174 var3
= self
->attrs
[COLOR_typing__TypeVisitor___anchor
].val
; /* _anchor on <self:Object(TypeVisitor)> */
182 /* method typing#TypeVisitor#anchor= for (self: TypeVisitor, nullable MClassType) */
183 void typing__TypeVisitor__anchor_61d(val
* self
, val
* p0
) {
184 self
->attrs
[COLOR_typing__TypeVisitor___anchor
].val
= p0
; /* _anchor on <self:TypeVisitor> */
187 /* method typing#TypeVisitor#anchor= for (self: Object, nullable MClassType) */
188 void VIRTUAL_typing__TypeVisitor__anchor_61d(val
* self
, val
* p0
) {
189 { /* Inline typing#TypeVisitor#anchor= (self,p0) on <self:Object(TypeVisitor)> */
190 self
->attrs
[COLOR_typing__TypeVisitor___anchor
].val
= p0
; /* _anchor on <self:Object(TypeVisitor)> */
195 /* method typing#TypeVisitor#mclassdef for (self: TypeVisitor): nullable MClassDef */
196 val
* typing__TypeVisitor__mclassdef(val
* self
) {
197 val
* var
/* : nullable MClassDef */;
198 val
* var1
/* : nullable MClassDef */;
199 var1
= self
->attrs
[COLOR_typing__TypeVisitor___mclassdef
].val
; /* _mclassdef on <self:TypeVisitor> */
204 /* method typing#TypeVisitor#mclassdef for (self: Object): nullable MClassDef */
205 val
* VIRTUAL_typing__TypeVisitor__mclassdef(val
* self
) {
206 val
* var
/* : nullable MClassDef */;
207 val
* var1
/* : nullable MClassDef */;
208 val
* var3
/* : nullable MClassDef */;
209 { /* Inline typing#TypeVisitor#mclassdef (self) on <self:Object(TypeVisitor)> */
210 var3
= self
->attrs
[COLOR_typing__TypeVisitor___mclassdef
].val
; /* _mclassdef on <self:Object(TypeVisitor)> */
218 /* method typing#TypeVisitor#mclassdef= for (self: TypeVisitor, nullable MClassDef) */
219 void typing__TypeVisitor__mclassdef_61d(val
* self
, val
* p0
) {
220 self
->attrs
[COLOR_typing__TypeVisitor___mclassdef
].val
= p0
; /* _mclassdef on <self:TypeVisitor> */
223 /* method typing#TypeVisitor#mclassdef= for (self: Object, nullable MClassDef) */
224 void VIRTUAL_typing__TypeVisitor__mclassdef_61d(val
* self
, val
* p0
) {
225 { /* Inline typing#TypeVisitor#mclassdef= (self,p0) on <self:Object(TypeVisitor)> */
226 self
->attrs
[COLOR_typing__TypeVisitor___mclassdef
].val
= p0
; /* _mclassdef on <self:Object(TypeVisitor)> */
231 /* method typing#TypeVisitor#mpropdef for (self: TypeVisitor): nullable MPropDef */
232 val
* typing__TypeVisitor__mpropdef(val
* self
) {
233 val
* var
/* : nullable MPropDef */;
234 val
* var1
/* : nullable MPropDef */;
235 var1
= self
->attrs
[COLOR_typing__TypeVisitor___mpropdef
].val
; /* _mpropdef on <self:TypeVisitor> */
240 /* method typing#TypeVisitor#mpropdef for (self: Object): nullable MPropDef */
241 val
* VIRTUAL_typing__TypeVisitor__mpropdef(val
* self
) {
242 val
* var
/* : nullable MPropDef */;
243 val
* var1
/* : nullable MPropDef */;
244 val
* var3
/* : nullable MPropDef */;
245 { /* Inline typing#TypeVisitor#mpropdef (self) on <self:Object(TypeVisitor)> */
246 var3
= self
->attrs
[COLOR_typing__TypeVisitor___mpropdef
].val
; /* _mpropdef on <self:Object(TypeVisitor)> */
254 /* method typing#TypeVisitor#mpropdef= for (self: TypeVisitor, nullable MPropDef) */
255 void typing__TypeVisitor__mpropdef_61d(val
* self
, val
* p0
) {
256 self
->attrs
[COLOR_typing__TypeVisitor___mpropdef
].val
= p0
; /* _mpropdef on <self:TypeVisitor> */
259 /* method typing#TypeVisitor#mpropdef= for (self: Object, nullable MPropDef) */
260 void VIRTUAL_typing__TypeVisitor__mpropdef_61d(val
* self
, val
* p0
) {
261 { /* Inline typing#TypeVisitor#mpropdef= (self,p0) on <self:Object(TypeVisitor)> */
262 self
->attrs
[COLOR_typing__TypeVisitor___mpropdef
].val
= p0
; /* _mpropdef on <self:Object(TypeVisitor)> */
267 /* method typing#TypeVisitor#selfvariable for (self: TypeVisitor): Variable */
268 val
* typing__TypeVisitor__selfvariable(val
* self
) {
269 val
* var
/* : Variable */;
270 val
* var1
/* : Variable */;
271 var1
= self
->attrs
[COLOR_typing__TypeVisitor___selfvariable
].val
; /* _selfvariable on <self:TypeVisitor> */
272 if (unlikely(var1
== NULL
)) {
273 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _selfvariable");
274 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 52);
281 /* method typing#TypeVisitor#selfvariable for (self: Object): Variable */
282 val
* VIRTUAL_typing__TypeVisitor__selfvariable(val
* self
) {
283 val
* var
/* : Variable */;
284 val
* var1
/* : Variable */;
285 val
* var3
/* : Variable */;
286 { /* Inline typing#TypeVisitor#selfvariable (self) on <self:Object(TypeVisitor)> */
287 var3
= self
->attrs
[COLOR_typing__TypeVisitor___selfvariable
].val
; /* _selfvariable on <self:Object(TypeVisitor)> */
288 if (unlikely(var3
== NULL
)) {
289 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _selfvariable");
290 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 52);
300 /* method typing#TypeVisitor#selfvariable= for (self: TypeVisitor, Variable) */
301 void typing__TypeVisitor__selfvariable_61d(val
* self
, val
* p0
) {
302 self
->attrs
[COLOR_typing__TypeVisitor___selfvariable
].val
= p0
; /* _selfvariable on <self:TypeVisitor> */
305 /* method typing#TypeVisitor#selfvariable= for (self: Object, Variable) */
306 void VIRTUAL_typing__TypeVisitor__selfvariable_61d(val
* self
, val
* p0
) {
307 { /* Inline typing#TypeVisitor#selfvariable= (self,p0) on <self:Object(TypeVisitor)> */
308 self
->attrs
[COLOR_typing__TypeVisitor___selfvariable
].val
= p0
; /* _selfvariable on <self:Object(TypeVisitor)> */
313 /* method typing#TypeVisitor#is_toplevel_context for (self: TypeVisitor): Bool */
314 short int typing__TypeVisitor__is_toplevel_context(val
* self
) {
315 short int var
/* : Bool */;
316 short int var1
/* : Bool */;
317 var1
= self
->attrs
[COLOR_typing__TypeVisitor___is_toplevel_context
].s
; /* _is_toplevel_context on <self:TypeVisitor> */
322 /* method typing#TypeVisitor#is_toplevel_context for (self: Object): Bool */
323 short int VIRTUAL_typing__TypeVisitor__is_toplevel_context(val
* self
) {
324 short int var
/* : Bool */;
325 short int var1
/* : Bool */;
326 short int var3
/* : Bool */;
327 { /* Inline typing#TypeVisitor#is_toplevel_context (self) on <self:Object(TypeVisitor)> */
328 var3
= self
->attrs
[COLOR_typing__TypeVisitor___is_toplevel_context
].s
; /* _is_toplevel_context on <self:Object(TypeVisitor)> */
336 /* method typing#TypeVisitor#is_toplevel_context= for (self: TypeVisitor, Bool) */
337 void typing__TypeVisitor__is_toplevel_context_61d(val
* self
, short int p0
) {
338 self
->attrs
[COLOR_typing__TypeVisitor___is_toplevel_context
].s
= p0
; /* _is_toplevel_context on <self:TypeVisitor> */
341 /* method typing#TypeVisitor#is_toplevel_context= for (self: Object, Bool) */
342 void VIRTUAL_typing__TypeVisitor__is_toplevel_context_61d(val
* self
, short int p0
) {
343 { /* Inline typing#TypeVisitor#is_toplevel_context= (self,p0) on <self:Object(TypeVisitor)> */
344 self
->attrs
[COLOR_typing__TypeVisitor___is_toplevel_context
].s
= p0
; /* _is_toplevel_context on <self:Object(TypeVisitor)> */
349 /* method typing#TypeVisitor#init for (self: TypeVisitor, ModelBuilder, MModule, nullable MPropDef) */
350 void typing__TypeVisitor__init(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
351 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
352 val
* var_mmodule
/* var mmodule: MModule */;
353 val
* var_mpropdef
/* var mpropdef: nullable MPropDef */;
354 val
* var
/* : null */;
355 short int var3
/* : Bool */;
356 short int var4
/* : Bool */;
357 val
* var_other
/* var other: nullable Object */;
358 short int var6
/* : Bool */;
359 short int var7
/* : Bool */;
360 short int var8
/* : Bool */;
361 val
* var10
/* : MClassDef */;
362 val
* var12
/* : MClassDef */;
363 val
* var_mclassdef
/* var mclassdef: MClassDef */;
364 val
* var14
/* : MClassType */;
365 val
* var16
/* : MClassType */;
366 val
* var18
/* : MClass */;
367 val
* var20
/* : MClass */;
368 val
* var_mclass
/* var mclass: MClass */;
369 val
* var21
/* : Variable */;
371 val
* var22
/* : String */;
372 char* var23
/* : NativeString */;
373 long var24
/* : Int */;
374 val
* var25
/* : FlatString */;
375 val
* var_selfvariable
/* var selfvariable: Variable */;
376 val
* var28
/* : MClassType */;
377 val
* var30
/* : MClassType */;
378 val
* var32
/* : MProperty */;
379 val
* var34
/* : MProperty */;
380 val
* var_mprop
/* var mprop: MProperty */;
381 short int var35
/* : Bool */;
382 short int var36
/* : Bool */;
385 short int var_
/* var : Bool */;
386 short int var37
/* : Bool */;
387 short int var39
/* : Bool */;
388 short int var40
/* : Bool */;
389 var_modelbuilder
= p0
;
393 { /* Inline typing#TypeVisitor#modelbuilder= (self,var_modelbuilder) on <self:TypeVisitor> */
394 self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
= var_modelbuilder
; /* _modelbuilder on <self:TypeVisitor> */
399 { /* Inline typing#TypeVisitor#mmodule= (self,var_mmodule) on <self:TypeVisitor> */
400 self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
= var_mmodule
; /* _mmodule on <self:TypeVisitor> */
405 if (var_mpropdef
== NULL
) {
406 var3
= 0; /* is null */
408 var3
= 1; /* arg is null and recv is not */
411 { /* Inline kernel#Object#!= (var_mpropdef,var) on <var_mpropdef:nullable MPropDef> */
414 var7
= ((short int (*)(val
*, val
*))(var_mpropdef
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_mpropdef
, var_other
) /* == on <var_mpropdef:nullable MPropDef(MPropDef)>*/;
426 { /* Inline typing#TypeVisitor#mpropdef= (self,var_mpropdef) on <self:TypeVisitor> */
427 self
->attrs
[COLOR_typing__TypeVisitor___mpropdef
].val
= var_mpropdef
; /* _mpropdef on <self:TypeVisitor> */
432 { /* Inline model#MPropDef#mclassdef (var_mpropdef) on <var_mpropdef:nullable MPropDef(MPropDef)> */
433 var12
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_mpropdef:nullable MPropDef(MPropDef)> */
434 if (unlikely(var12
== NULL
)) {
435 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
436 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1879);
443 var_mclassdef
= var10
;
445 { /* Inline typing#TypeVisitor#mclassdef= (self,var_mclassdef) on <self:TypeVisitor> */
446 self
->attrs
[COLOR_typing__TypeVisitor___mclassdef
].val
= var_mclassdef
; /* _mclassdef on <self:TypeVisitor> */
451 { /* Inline model#MClassDef#bound_mtype (var_mclassdef) on <var_mclassdef:MClassDef> */
452 var16
= var_mclassdef
->attrs
[COLOR_model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var_mclassdef:MClassDef> */
453 if (unlikely(var16
== NULL
)) {
454 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
455 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 477);
463 { /* Inline typing#TypeVisitor#anchor= (self,var14) on <self:TypeVisitor> */
464 self
->attrs
[COLOR_typing__TypeVisitor___anchor
].val
= var14
; /* _anchor on <self:TypeVisitor> */
469 { /* Inline model#MClassDef#mclass (var_mclassdef) on <var_mclassdef:MClassDef> */
470 var20
= var_mclassdef
->attrs
[COLOR_model__MClassDef___mclass
].val
; /* _mclass on <var_mclassdef:MClassDef> */
471 if (unlikely(var20
== NULL
)) {
472 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
473 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 474);
481 var21
= NEW_scope__Variable(&type_scope__Variable
);
487 var25
= string__NativeString__to_s_with_length(var23
, var24
);
492 { /* Inline scope#Variable#init (var21,var22) on <var21:Variable> */
493 var21
->attrs
[COLOR_scope__Variable___name
].val
= var22
; /* _name on <var21:Variable> */
497 var_selfvariable
= var21
;
499 { /* Inline typing#TypeVisitor#selfvariable= (self,var_selfvariable) on <self:TypeVisitor> */
500 self
->attrs
[COLOR_typing__TypeVisitor___selfvariable
].val
= var_selfvariable
; /* _selfvariable on <self:TypeVisitor> */
505 { /* Inline model#MClass#mclass_type (var_mclass) on <var_mclass:MClass> */
506 var30
= var_mclass
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_mclass:MClass> */
507 if (unlikely(var30
== NULL
)) {
508 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
509 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
517 { /* Inline typing#Variable#declared_type= (var_selfvariable,var28) on <var_selfvariable:Variable> */
518 var_selfvariable
->attrs
[COLOR_typing__Variable___declared_type
].val
= var28
; /* _declared_type on <var_selfvariable:Variable> */
523 { /* Inline model#MPropDef#mproperty (var_mpropdef) on <var_mpropdef:nullable MPropDef(MPropDef)> */
524 var34
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mproperty
].val
; /* _mproperty on <var_mpropdef:nullable MPropDef(MPropDef)> */
525 if (unlikely(var34
== NULL
)) {
526 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
527 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1882);
535 /* <var_mprop:MProperty> isa MMethod */
536 cltype
= type_model__MMethod
.color
;
537 idtype
= type_model__MMethod
.id
;
538 if(cltype
>= var_mprop
->type
->table_size
) {
541 var36
= var_mprop
->type
->type_table
[cltype
] == idtype
;
546 { /* Inline model#MMethod#is_toplevel (var_mprop) on <var_mprop:MProperty(MMethod)> */
547 var39
= var_mprop
->attrs
[COLOR_model__MMethod___is_toplevel
].s
; /* _is_toplevel on <var_mprop:MProperty(MMethod)> */
559 { /* Inline typing#TypeVisitor#is_toplevel_context= (self,var40) on <self:TypeVisitor> */
560 self
->attrs
[COLOR_typing__TypeVisitor___is_toplevel_context
].s
= var40
; /* _is_toplevel_context on <self:TypeVisitor> */
570 /* method typing#TypeVisitor#init for (self: Object, ModelBuilder, MModule, nullable MPropDef) */
571 void VIRTUAL_typing__TypeVisitor__init(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
572 typing__TypeVisitor__init(self
, p0
, p1
, p2
); /* Direct call typing#TypeVisitor#init on <self:Object(TypeVisitor)>*/
575 /* method typing#TypeVisitor#anchor_to for (self: TypeVisitor, MType): MType */
576 val
* typing__TypeVisitor__anchor_to(val
* self
, val
* p0
) {
577 val
* var
/* : MType */;
578 val
* var_mtype
/* var mtype: MType */;
579 val
* var1
/* : nullable MClassType */;
580 val
* var3
/* : nullable MClassType */;
581 val
* var_anchor
/* var anchor: nullable MClassType */;
582 val
* var4
/* : null */;
583 short int var5
/* : Bool */;
584 short int var6
/* : Bool */;
585 val
* var_other
/* var other: nullable Object */;
586 short int var8
/* : Bool */;
587 short int var10
/* : Bool */;
588 short int var11
/* : Bool */;
589 short int var12
/* : Bool */;
590 val
* var13
/* : MModule */;
591 val
* var15
/* : MModule */;
592 val
* var16
/* : MType */;
595 { /* Inline typing#TypeVisitor#anchor (self) on <self:TypeVisitor> */
596 var3
= self
->attrs
[COLOR_typing__TypeVisitor___anchor
].val
; /* _anchor on <self:TypeVisitor> */
603 if (var_anchor
== NULL
) {
604 var5
= 1; /* is null */
606 var5
= 0; /* arg is null but recv is not */
609 { /* Inline kernel#Object#== (var_anchor,var4) on <var_anchor:nullable MClassType> */
612 { /* Inline kernel#Object#is_same_instance (var_anchor,var_other) on <var_anchor:nullable MClassType(MClassType)> */
613 var10
= var_anchor
== var_other
;
627 var11
= ((short int (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MType__need_anchor
]))(var_mtype
) /* need_anchor on <var_mtype:MType>*/;
630 if (unlikely(!var12
)) {
631 PRINT_ERROR("Runtime error: %s", "Assert failed");
632 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 87);
640 { /* Inline typing#TypeVisitor#mmodule (self) on <self:TypeVisitor> */
641 var15
= self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <self:TypeVisitor> */
642 if (unlikely(var15
== NULL
)) {
643 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
644 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
652 var16
= ((val
* (*)(val
*, val
*, val
*))(var_mtype
->class->vft
[COLOR_model__MType__anchor_to
]))(var_mtype
, var13
, var_anchor
) /* anchor_to on <var_mtype:MType>*/;
659 /* method typing#TypeVisitor#anchor_to for (self: Object, MType): MType */
660 val
* VIRTUAL_typing__TypeVisitor__anchor_to(val
* self
, val
* p0
) {
661 val
* var
/* : MType */;
662 val
* var1
/* : MType */;
663 var1
= typing__TypeVisitor__anchor_to(self
, p0
);
668 /* method typing#TypeVisitor#is_subtype for (self: TypeVisitor, MType, MType): Bool */
669 short int typing__TypeVisitor__is_subtype(val
* self
, val
* p0
, val
* p1
) {
670 short int var
/* : Bool */;
671 val
* var_sub
/* var sub: MType */;
672 val
* var_sup
/* var sup: MType */;
673 val
* var1
/* : MModule */;
674 val
* var3
/* : MModule */;
675 val
* var4
/* : nullable MClassType */;
676 val
* var6
/* : nullable MClassType */;
677 short int var7
/* : Bool */;
681 { /* Inline typing#TypeVisitor#mmodule (self) on <self:TypeVisitor> */
682 var3
= self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <self:TypeVisitor> */
683 if (unlikely(var3
== NULL
)) {
684 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
685 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
693 { /* Inline typing#TypeVisitor#anchor (self) on <self:TypeVisitor> */
694 var6
= self
->attrs
[COLOR_typing__TypeVisitor___anchor
].val
; /* _anchor on <self:TypeVisitor> */
700 var7
= model__MType__is_subtype(var_sub
, var1
, var4
, var_sup
);
707 /* method typing#TypeVisitor#is_subtype for (self: Object, MType, MType): Bool */
708 short int VIRTUAL_typing__TypeVisitor__is_subtype(val
* self
, val
* p0
, val
* p1
) {
709 short int var
/* : Bool */;
710 short int var1
/* : Bool */;
711 var1
= typing__TypeVisitor__is_subtype(self
, p0
, p1
);
716 /* method typing#TypeVisitor#resolve_for for (self: TypeVisitor, MType, MType, Bool): MType */
717 val
* typing__TypeVisitor__resolve_for(val
* self
, val
* p0
, val
* p1
, short int p2
) {
718 val
* var
/* : MType */;
719 val
* var_mtype
/* var mtype: MType */;
720 val
* var_subtype
/* var subtype: MType */;
721 short int var_for_self
/* var for_self: Bool */;
722 val
* var1
/* : nullable MClassType */;
723 val
* var3
/* : nullable MClassType */;
724 val
* var4
/* : MModule */;
725 val
* var6
/* : MModule */;
726 short int var7
/* : Bool */;
727 val
* var8
/* : MType */;
728 val
* var_res
/* var res: MType */;
733 { /* Inline typing#TypeVisitor#anchor (self) on <self:TypeVisitor> */
734 var3
= self
->attrs
[COLOR_typing__TypeVisitor___anchor
].val
; /* _anchor on <self:TypeVisitor> */
740 { /* Inline typing#TypeVisitor#mmodule (self) on <self:TypeVisitor> */
741 var6
= self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <self:TypeVisitor> */
742 if (unlikely(var6
== NULL
)) {
743 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
744 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
751 var7
= !var_for_self
;
753 var8
= ((val
* (*)(val
*, val
*, val
*, val
*, short int))(var_mtype
->class->vft
[COLOR_model__MType__resolve_for
]))(var_mtype
, var_subtype
, var1
, var4
, var7
) /* resolve_for on <var_mtype:MType>*/;
761 /* method typing#TypeVisitor#resolve_for for (self: Object, MType, MType, Bool): MType */
762 val
* VIRTUAL_typing__TypeVisitor__resolve_for(val
* self
, val
* p0
, val
* p1
, short int p2
) {
763 val
* var
/* : MType */;
764 val
* var1
/* : MType */;
765 var1
= typing__TypeVisitor__resolve_for(self
, p0
, p1
, p2
);
770 /* method typing#TypeVisitor#check_subtype for (self: TypeVisitor, ANode, MType, MType): nullable MType */
771 val
* typing__TypeVisitor__check_subtype(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
772 val
* var
/* : nullable MType */;
773 val
* var_node
/* var node: ANode */;
774 val
* var_sub
/* var sub: MType */;
775 val
* var_sup
/* var sup: MType */;
776 short int var1
/* : Bool */;
777 val
* var2
/* : MType */;
778 short int var3
/* : Bool */;
779 val
* var4
/* : ModelBuilder */;
780 val
* var6
/* : ModelBuilder */;
782 val
* var7
/* : String */;
783 char* var8
/* : NativeString */;
784 long var9
/* : Int */;
785 val
* var10
/* : FlatString */;
786 static val
* varonce11
;
787 val
* var12
/* : String */;
788 char* var13
/* : NativeString */;
789 long var14
/* : Int */;
790 val
* var15
/* : FlatString */;
791 val
* var16
/* : Array[Object] */;
792 long var17
/* : Int */;
793 val
* var18
/* : NativeArray[Object] */;
794 val
* var19
/* : String */;
795 val
* var20
/* : null */;
800 var1
= typing__TypeVisitor__is_subtype(self
, var_sub
, var_sup
);
808 var2
= typing__TypeVisitor__anchor_to(self
, var_sup
);
811 var3
= typing__TypeVisitor__is_subtype(self
, var_sub
, var2
);
819 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
820 var6
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
821 if (unlikely(var6
== NULL
)) {
822 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
823 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
833 var8
= "Type error: expected ";
835 var10
= string__NativeString__to_s_with_length(var8
, var9
);
844 var15
= string__NativeString__to_s_with_length(var13
, var14
);
848 var16
= NEW_array__Array(&type_array__Arraykernel__Object
);
849 { /* var16 = array_instance Array[Object] */
851 var18
= NEW_array__NativeArray(var17
, &type_array__NativeArraykernel__Object
);
852 ((struct instance_array__NativeArray
*)var18
)->values
[0] = (val
*) var7
;
853 ((struct instance_array__NativeArray
*)var18
)->values
[1] = (val
*) var_sup
;
854 ((struct instance_array__NativeArray
*)var18
)->values
[2] = (val
*) var12
;
855 ((struct instance_array__NativeArray
*)var18
)->values
[3] = (val
*) var_sub
;
857 ((void (*)(val
*, val
*, long))(var16
->class->vft
[COLOR_array__Array__with_native
]))(var16
, var18
, var17
) /* with_native on <var16:Array[Object]>*/;
861 var19
= ((val
* (*)(val
*))(var16
->class->vft
[COLOR_string__Object__to_s
]))(var16
) /* to_s on <var16:Array[Object]>*/;
864 modelbuilder__ModelBuilder__error(var4
, var_node
, var19
); /* Direct call modelbuilder#ModelBuilder#error on <var4:ModelBuilder>*/
872 /* method typing#TypeVisitor#check_subtype for (self: Object, ANode, MType, MType): nullable MType */
873 val
* VIRTUAL_typing__TypeVisitor__check_subtype(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
874 val
* var
/* : nullable MType */;
875 val
* var1
/* : nullable MType */;
876 var1
= typing__TypeVisitor__check_subtype(self
, p0
, p1
, p2
);
881 /* method typing#TypeVisitor#visit_stmt for (self: TypeVisitor, nullable AExpr) */
882 void typing__TypeVisitor__visit_stmt(val
* self
, val
* p0
) {
883 val
* var_nexpr
/* var nexpr: nullable AExpr */;
884 val
* var
/* : null */;
885 short int var1
/* : Bool */;
886 short int var2
/* : Bool */;
887 val
* var_other
/* var other: nullable Object */;
888 short int var4
/* : Bool */;
889 short int var6
/* : Bool */;
892 if (var_nexpr
== NULL
) {
893 var1
= 1; /* is null */
895 var1
= 0; /* arg is null but recv is not */
898 { /* Inline kernel#Object#== (var_nexpr,var) on <var_nexpr:nullable AExpr> */
901 { /* Inline kernel#Object#is_same_instance (var_nexpr,var_other) on <var_nexpr:nullable AExpr(AExpr)> */
902 var6
= var_nexpr
== var_other
;
919 ((void (*)(val
*, val
*))(var_nexpr
->class->vft
[COLOR_typing__AExpr__accept_typing
]))(var_nexpr
, self
) /* accept_typing on <var_nexpr:nullable AExpr(AExpr)>*/;
923 /* method typing#TypeVisitor#visit_stmt for (self: Object, nullable AExpr) */
924 void VIRTUAL_typing__TypeVisitor__visit_stmt(val
* self
, val
* p0
) {
925 typing__TypeVisitor__visit_stmt(self
, p0
); /* Direct call typing#TypeVisitor#visit_stmt on <self:Object(TypeVisitor)>*/
928 /* method typing#TypeVisitor#visit_expr for (self: TypeVisitor, AExpr): nullable MType */
929 val
* typing__TypeVisitor__visit_expr(val
* self
, val
* p0
) {
930 val
* var
/* : nullable MType */;
931 val
* var_nexpr
/* var nexpr: AExpr */;
932 val
* var1
/* : nullable MType */;
933 val
* var_mtype
/* var mtype: nullable MType */;
934 val
* var2
/* : null */;
935 short int var3
/* : Bool */;
936 short int var4
/* : Bool */;
937 val
* var_other
/* var other: nullable Object */;
938 short int var6
/* : Bool */;
939 short int var7
/* : Bool */;
940 short int var8
/* : Bool */;
941 short int var9
/* : Bool */;
942 short int var11
/* : Bool */;
943 short int var12
/* : Bool */;
944 val
* var13
/* : ModelBuilder */;
945 val
* var15
/* : ModelBuilder */;
946 val
* var16
/* : ToolContext */;
947 val
* var18
/* : ToolContext */;
948 long var19
/* : Int */;
949 long var21
/* : Int */;
950 long var22
/* : Int */;
951 short int var23
/* : Bool */;
952 short int var25
/* : Bool */;
955 const char* var_class_name
;
956 short int var26
/* : Bool */;
957 short int var27
/* : Bool */;
958 val
* var28
/* : ModelBuilder */;
959 val
* var30
/* : ModelBuilder */;
960 val
* var31
/* : ToolContext */;
961 val
* var33
/* : ToolContext */;
962 long var34
/* : Int */;
963 long var36
/* : Int */;
964 long var37
/* : Int */;
965 short int var38
/* : Bool */;
966 short int var40
/* : Bool */;
969 const char* var_class_name43
;
970 short int var44
/* : Bool */;
972 val
* var45
/* : String */;
973 char* var46
/* : NativeString */;
974 long var47
/* : Int */;
975 val
* var48
/* : FlatString */;
976 val
* var49
/* : null */;
977 static val
* varonce50
;
978 val
* var51
/* : String */;
979 char* var52
/* : NativeString */;
980 long var53
/* : Int */;
981 val
* var54
/* : FlatString */;
982 val
* var55
/* : null */;
985 ((void (*)(val
*, val
*))(var_nexpr
->class->vft
[COLOR_typing__AExpr__accept_typing
]))(var_nexpr
, self
) /* accept_typing on <var_nexpr:AExpr>*/;
988 var1
= ((val
* (*)(val
*))(var_nexpr
->class->vft
[COLOR_typing__AExpr__mtype
]))(var_nexpr
) /* mtype on <var_nexpr:AExpr>*/;
992 if (var_mtype
== NULL
) {
993 var3
= 0; /* is null */
995 var3
= 1; /* arg is null and recv is not */
998 { /* Inline kernel#Object#!= (var_mtype,var2) on <var_mtype:nullable MType> */
1001 var7
= ((short int (*)(val
*, val
*))(var_mtype
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_mtype
, var_other
) /* == on <var_mtype:nullable MType(MType)>*/;
1017 { /* Inline typing#AExpr#is_typed (var_nexpr) on <var_nexpr:AExpr> */
1018 var11
= var_nexpr
->attrs
[COLOR_typing__AExpr___is_typed
].s
; /* _is_typed on <var_nexpr:AExpr> */
1020 RET_LABEL10
:(void)0;
1026 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
1027 var15
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
1028 if (unlikely(var15
== NULL
)) {
1029 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1030 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
1034 RET_LABEL14
:(void)0;
1038 { /* Inline modelbuilder#ModelBuilder#toolcontext (var13) on <var13:ModelBuilder> */
1039 var18
= var13
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var13:ModelBuilder> */
1040 if (unlikely(var18
== NULL
)) {
1041 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1042 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
1046 RET_LABEL17
:(void)0;
1050 { /* Inline toolcontext#ToolContext#error_count (var16) on <var16:ToolContext> */
1051 var21
= var16
->attrs
[COLOR_toolcontext__ToolContext___error_count
].l
; /* _error_count on <var16:ToolContext> */
1053 RET_LABEL20
:(void)0;
1058 { /* Inline kernel#Int#> (var19,var22) on <var19:Int> */
1059 /* Covariant cast for argument 0 (i) <var22:Int> isa OTHER */
1060 /* <var22:Int> isa OTHER */
1061 var25
= 1; /* easy <var22:Int> isa OTHER*/
1062 if (unlikely(!var25
)) {
1063 var_class_name
= type_kernel__Int
.name
;
1064 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1065 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 327);
1068 var26
= var19
> var22
;
1071 RET_LABEL24
:(void)0;
1077 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
1078 var30
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
1079 if (unlikely(var30
== NULL
)) {
1080 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1081 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
1085 RET_LABEL29
:(void)0;
1089 { /* Inline modelbuilder#ModelBuilder#toolcontext (var28) on <var28:ModelBuilder> */
1090 var33
= var28
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var28:ModelBuilder> */
1091 if (unlikely(var33
== NULL
)) {
1092 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1093 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
1097 RET_LABEL32
:(void)0;
1101 { /* Inline toolcontext#ToolContext#verbose_level (var31) on <var31:ToolContext> */
1102 var36
= var31
->attrs
[COLOR_toolcontext__ToolContext___verbose_level
].l
; /* _verbose_level on <var31:ToolContext> */
1104 RET_LABEL35
:(void)0;
1109 { /* Inline kernel#Int#> (var34,var37) on <var34:Int> */
1110 /* Covariant cast for argument 0 (i) <var37:Int> isa OTHER */
1111 /* <var37:Int> isa OTHER */
1112 var40
= 1; /* easy <var37:Int> isa OTHER*/
1113 if (unlikely(!var40
)) {
1114 var_class_name43
= type_kernel__Int
.name
;
1115 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name43
);
1116 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 327);
1119 var44
= var34
> var37
;
1122 RET_LABEL39
:(void)0;
1129 var46
= "No return type but no error.";
1131 var48
= string__NativeString__to_s_with_length(var46
, var47
);
1136 parser_nodes__ANode__debug(var_nexpr
, var45
); /* Direct call parser_nodes#ANode#debug on <var_nexpr:AExpr>*/
1150 var52
= "Type error: expected expression.";
1152 var54
= string__NativeString__to_s_with_length(var52
, var53
);
1157 typing__TypeVisitor__error(self
, var_nexpr
, var51
); /* Direct call typing#TypeVisitor#error on <self:TypeVisitor>*/
1165 /* method typing#TypeVisitor#visit_expr for (self: Object, AExpr): nullable MType */
1166 val
* VIRTUAL_typing__TypeVisitor__visit_expr(val
* self
, val
* p0
) {
1167 val
* var
/* : nullable MType */;
1168 val
* var1
/* : nullable MType */;
1169 var1
= typing__TypeVisitor__visit_expr(self
, p0
);
1174 /* method typing#TypeVisitor#visit_expr_subtype for (self: TypeVisitor, AExpr, nullable MType): nullable MType */
1175 val
* typing__TypeVisitor__visit_expr_subtype(val
* self
, val
* p0
, val
* p1
) {
1176 val
* var
/* : nullable MType */;
1177 val
* var_nexpr
/* var nexpr: AExpr */;
1178 val
* var_sup
/* var sup: nullable MType */;
1179 val
* var1
/* : nullable MType */;
1180 val
* var_sub
/* var sub: nullable MType */;
1181 val
* var2
/* : null */;
1182 short int var3
/* : Bool */;
1183 short int var4
/* : Bool */;
1184 val
* var_other
/* var other: nullable Object */;
1185 short int var6
/* : Bool */;
1186 short int var8
/* : Bool */;
1187 val
* var9
/* : null */;
1188 val
* var10
/* : null */;
1189 short int var11
/* : Bool */;
1190 short int var12
/* : Bool */;
1191 short int var14
/* : Bool */;
1192 short int var16
/* : Bool */;
1193 val
* var17
/* : null */;
1194 val
* var18
/* : nullable MType */;
1195 val
* var_res
/* var res: nullable MType */;
1196 short int var19
/* : Bool */;
1197 short int var20
/* : Bool */;
1198 val
* var_other22
/* var other: nullable Object */;
1199 short int var23
/* : Bool */;
1200 short int var24
/* : Bool */;
1201 short int var25
/* : Bool */;
1205 var1
= typing__TypeVisitor__visit_expr(self
, var_nexpr
);
1209 if (var_sub
== NULL
) {
1210 var3
= 1; /* is null */
1212 var3
= 0; /* arg is null but recv is not */
1215 { /* Inline kernel#Object#== (var_sub,var2) on <var_sub:nullable MType> */
1218 { /* Inline kernel#Object#is_same_instance (var_sub,var_other) on <var_sub:nullable MType(MType)> */
1219 var8
= var_sub
== var_other
;
1238 if (var_sup
== NULL
) {
1239 var11
= 1; /* is null */
1241 var11
= 0; /* arg is null but recv is not */
1244 { /* Inline kernel#Object#== (var_sup,var10) on <var_sup:nullable MType> */
1247 { /* Inline kernel#Object#is_same_instance (var_sup,var_other) on <var_sup:nullable MType(MType)> */
1248 var16
= var_sup
== var_other
;
1251 RET_LABEL15
:(void)0;
1256 RET_LABEL13
:(void)0;
1267 var18
= typing__TypeVisitor__check_subtype(self
, var_nexpr
, var_sub
, var_sup
);
1270 if (var_res
== NULL
) {
1271 var19
= 1; /* <var_sub:nullable MType(MType)> cannot be null */
1273 { /* Inline kernel#Object#!= (var_res,var_sub) on <var_res:nullable MType> */
1274 var_other22
= var_sub
;
1276 var24
= ((short int (*)(val
*, val
*))(var_res
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_res
, var_other22
) /* == on <var_res:nullable MType(MType)>*/;
1282 RET_LABEL21
:(void)0;
1288 { /* Inline typing#AExpr#implicit_cast_to= (var_nexpr,var_res) on <var_nexpr:AExpr> */
1289 var_nexpr
->attrs
[COLOR_typing__AExpr___implicit_cast_to
].val
= var_res
; /* _implicit_cast_to on <var_nexpr:AExpr> */
1290 RET_LABEL26
:(void)0;
1300 /* method typing#TypeVisitor#visit_expr_subtype for (self: Object, AExpr, nullable MType): nullable MType */
1301 val
* VIRTUAL_typing__TypeVisitor__visit_expr_subtype(val
* self
, val
* p0
, val
* p1
) {
1302 val
* var
/* : nullable MType */;
1303 val
* var1
/* : nullable MType */;
1304 var1
= typing__TypeVisitor__visit_expr_subtype(self
, p0
, p1
);
1309 /* method typing#TypeVisitor#visit_expr_bool for (self: TypeVisitor, AExpr): nullable MType */
1310 val
* typing__TypeVisitor__visit_expr_bool(val
* self
, val
* p0
) {
1311 val
* var
/* : nullable MType */;
1312 val
* var_nexpr
/* var nexpr: AExpr */;
1313 val
* var1
/* : nullable MType */;
1314 val
* var2
/* : nullable MType */;
1317 var1
= typing__TypeVisitor__type_bool(self
, var_nexpr
);
1320 var2
= typing__TypeVisitor__visit_expr_subtype(self
, var_nexpr
, var1
);
1327 /* method typing#TypeVisitor#visit_expr_bool for (self: Object, AExpr): nullable MType */
1328 val
* VIRTUAL_typing__TypeVisitor__visit_expr_bool(val
* self
, val
* p0
) {
1329 val
* var
/* : nullable MType */;
1330 val
* var1
/* : nullable MType */;
1331 var1
= typing__TypeVisitor__visit_expr_bool(self
, p0
);
1336 /* method typing#TypeVisitor#visit_expr_cast for (self: TypeVisitor, ANode, AExpr, AType): nullable MType */
1337 val
* typing__TypeVisitor__visit_expr_cast(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
1338 val
* var
/* : nullable MType */;
1339 val
* var_node
/* var node: ANode */;
1340 val
* var_nexpr
/* var nexpr: AExpr */;
1341 val
* var_ntype
/* var ntype: AType */;
1342 val
* var1
/* : nullable MType */;
1343 val
* var_sub
/* var sub: nullable MType */;
1344 val
* var2
/* : null */;
1345 short int var3
/* : Bool */;
1346 short int var4
/* : Bool */;
1347 val
* var_other
/* var other: nullable Object */;
1348 short int var6
/* : Bool */;
1349 short int var8
/* : Bool */;
1350 val
* var9
/* : null */;
1351 val
* var10
/* : nullable MType */;
1352 val
* var_sup
/* var sup: nullable MType */;
1353 val
* var11
/* : null */;
1354 short int var12
/* : Bool */;
1355 short int var13
/* : Bool */;
1356 short int var15
/* : Bool */;
1357 short int var17
/* : Bool */;
1358 val
* var18
/* : null */;
1359 short int var19
/* : Bool */;
1360 short int var20
/* : Bool */;
1361 short int var22
/* : Bool */;
1362 short int var24
/* : Bool */;
1363 val
* var25
/* : ModelBuilder */;
1364 val
* var27
/* : ModelBuilder */;
1365 static val
* varonce
;
1366 val
* var28
/* : String */;
1367 char* var29
/* : NativeString */;
1368 long var30
/* : Int */;
1369 val
* var31
/* : FlatString */;
1370 static val
* varonce32
;
1371 val
* var33
/* : String */;
1372 char* var34
/* : NativeString */;
1373 long var35
/* : Int */;
1374 val
* var36
/* : FlatString */;
1375 val
* var37
/* : Array[Object] */;
1376 long var38
/* : Int */;
1377 val
* var39
/* : NativeArray[Object] */;
1378 val
* var40
/* : String */;
1379 short int var41
/* : Bool */;
1380 val
* var42
/* : ModelBuilder */;
1381 val
* var44
/* : ModelBuilder */;
1382 static val
* varonce45
;
1383 val
* var46
/* : String */;
1384 char* var47
/* : NativeString */;
1385 long var48
/* : Int */;
1386 val
* var49
/* : FlatString */;
1387 static val
* varonce50
;
1388 val
* var51
/* : String */;
1389 char* var52
/* : NativeString */;
1390 long var53
/* : Int */;
1391 val
* var54
/* : FlatString */;
1392 static val
* varonce55
;
1393 val
* var56
/* : String */;
1394 char* var57
/* : NativeString */;
1395 long var58
/* : Int */;
1396 val
* var59
/* : FlatString */;
1397 val
* var60
/* : Array[Object] */;
1398 long var61
/* : Int */;
1399 val
* var62
/* : NativeArray[Object] */;
1400 val
* var63
/* : String */;
1405 var1
= typing__TypeVisitor__visit_expr(self
, var_nexpr
);
1409 if (var_sub
== NULL
) {
1410 var3
= 1; /* is null */
1412 var3
= 0; /* arg is null but recv is not */
1415 { /* Inline kernel#Object#== (var_sub,var2) on <var_sub:nullable MType> */
1418 { /* Inline kernel#Object#is_same_instance (var_sub,var_other) on <var_sub:nullable MType(MType)> */
1419 var8
= var_sub
== var_other
;
1438 var10
= typing__TypeVisitor__resolve_mtype(self
, var_ntype
);
1442 if (var_sup
== NULL
) {
1443 var12
= 1; /* is null */
1445 var12
= 0; /* arg is null but recv is not */
1448 { /* Inline kernel#Object#== (var_sup,var11) on <var_sup:nullable MType> */
1451 { /* Inline kernel#Object#is_same_instance (var_sup,var_other) on <var_sup:nullable MType(MType)> */
1452 var17
= var_sup
== var_other
;
1455 RET_LABEL16
:(void)0;
1460 RET_LABEL14
:(void)0;
1471 { /* Inline kernel#Object#== (var_sup,var_sub) on <var_sup:nullable MType(MType)> */
1472 var_other
= var_sub
;
1474 { /* Inline kernel#Object#is_same_instance (var_sup,var_other) on <var_sup:nullable MType(MType)> */
1475 var24
= var_sup
== var_other
;
1478 RET_LABEL23
:(void)0;
1483 RET_LABEL21
:(void)0;
1489 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
1490 var27
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
1491 if (unlikely(var27
== NULL
)) {
1492 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1493 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
1497 RET_LABEL26
:(void)0;
1503 var29
= "Warning: Expression is already a ";
1505 var31
= string__NativeString__to_s_with_length(var29
, var30
);
1514 var36
= string__NativeString__to_s_with_length(var34
, var35
);
1518 var37
= NEW_array__Array(&type_array__Arraykernel__Object
);
1519 { /* var37 = array_instance Array[Object] */
1521 var39
= NEW_array__NativeArray(var38
, &type_array__NativeArraykernel__Object
);
1522 ((struct instance_array__NativeArray
*)var39
)->values
[0] = (val
*) var28
;
1523 ((struct instance_array__NativeArray
*)var39
)->values
[1] = (val
*) var_sup
;
1524 ((struct instance_array__NativeArray
*)var39
)->values
[2] = (val
*) var33
;
1526 ((void (*)(val
*, val
*, long))(var37
->class->vft
[COLOR_array__Array__with_native
]))(var37
, var39
, var38
) /* with_native on <var37:Array[Object]>*/;
1530 var40
= ((val
* (*)(val
*))(var37
->class->vft
[COLOR_string__Object__to_s
]))(var37
) /* to_s on <var37:Array[Object]>*/;
1533 modelbuilder__ModelBuilder__warning(var25
, var_node
, var40
); /* Direct call modelbuilder#ModelBuilder#warning on <var25:ModelBuilder>*/
1537 var41
= typing__TypeVisitor__is_subtype(self
, var_sub
, var_sup
);
1541 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
1542 var44
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
1543 if (unlikely(var44
== NULL
)) {
1544 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1545 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
1549 RET_LABEL43
:(void)0;
1555 var47
= "Warning: Expression is already a ";
1557 var49
= string__NativeString__to_s_with_length(var47
, var48
);
1564 var52
= " since it is a ";
1566 var54
= string__NativeString__to_s_with_length(var52
, var53
);
1575 var59
= string__NativeString__to_s_with_length(var57
, var58
);
1579 var60
= NEW_array__Array(&type_array__Arraykernel__Object
);
1580 { /* var60 = array_instance Array[Object] */
1582 var62
= NEW_array__NativeArray(var61
, &type_array__NativeArraykernel__Object
);
1583 ((struct instance_array__NativeArray
*)var62
)->values
[0] = (val
*) var46
;
1584 ((struct instance_array__NativeArray
*)var62
)->values
[1] = (val
*) var_sup
;
1585 ((struct instance_array__NativeArray
*)var62
)->values
[2] = (val
*) var51
;
1586 ((struct instance_array__NativeArray
*)var62
)->values
[3] = (val
*) var_sub
;
1587 ((struct instance_array__NativeArray
*)var62
)->values
[4] = (val
*) var56
;
1589 ((void (*)(val
*, val
*, long))(var60
->class->vft
[COLOR_array__Array__with_native
]))(var60
, var62
, var61
) /* with_native on <var60:Array[Object]>*/;
1593 var63
= ((val
* (*)(val
*))(var60
->class->vft
[COLOR_string__Object__to_s
]))(var60
) /* to_s on <var60:Array[Object]>*/;
1596 modelbuilder__ModelBuilder__warning(var42
, var_node
, var63
); /* Direct call modelbuilder#ModelBuilder#warning on <var42:ModelBuilder>*/
1606 /* method typing#TypeVisitor#visit_expr_cast for (self: Object, ANode, AExpr, AType): nullable MType */
1607 val
* VIRTUAL_typing__TypeVisitor__visit_expr_cast(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
1608 val
* var
/* : nullable MType */;
1609 val
* var1
/* : nullable MType */;
1610 var1
= typing__TypeVisitor__visit_expr_cast(self
, p0
, p1
, p2
);
1615 /* method typing#TypeVisitor#try_get_mproperty_by_name2 for (self: TypeVisitor, ANode, MType, String): nullable MProperty */
1616 val
* typing__TypeVisitor__try_get_mproperty_by_name2(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
1617 val
* var
/* : nullable MProperty */;
1618 val
* var_anode
/* var anode: ANode */;
1619 val
* var_mtype
/* var mtype: MType */;
1620 val
* var_name
/* var name: String */;
1621 val
* var1
/* : ModelBuilder */;
1622 val
* var3
/* : ModelBuilder */;
1623 val
* var4
/* : MModule */;
1624 val
* var6
/* : MModule */;
1625 val
* var7
/* : nullable MProperty */;
1630 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
1631 var3
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
1632 if (unlikely(var3
== NULL
)) {
1633 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1634 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
1642 { /* Inline typing#TypeVisitor#mmodule (self) on <self:TypeVisitor> */
1643 var6
= self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <self:TypeVisitor> */
1644 if (unlikely(var6
== NULL
)) {
1645 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
1646 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
1654 var7
= modelbuilder__ModelBuilder__try_get_mproperty_by_name2(var1
, var_anode
, var4
, var_mtype
, var_name
);
1661 /* method typing#TypeVisitor#try_get_mproperty_by_name2 for (self: Object, ANode, MType, String): nullable MProperty */
1662 val
* VIRTUAL_typing__TypeVisitor__try_get_mproperty_by_name2(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
1663 val
* var
/* : nullable MProperty */;
1664 val
* var1
/* : nullable MProperty */;
1665 var1
= typing__TypeVisitor__try_get_mproperty_by_name2(self
, p0
, p1
, p2
);
1670 /* method typing#TypeVisitor#resolve_mtype for (self: TypeVisitor, AType): nullable MType */
1671 val
* typing__TypeVisitor__resolve_mtype(val
* self
, val
* p0
) {
1672 val
* var
/* : nullable MType */;
1673 val
* var_node
/* var node: AType */;
1674 val
* var1
/* : ModelBuilder */;
1675 val
* var3
/* : ModelBuilder */;
1676 val
* var4
/* : MModule */;
1677 val
* var6
/* : MModule */;
1678 val
* var7
/* : nullable MClassDef */;
1679 val
* var9
/* : nullable MClassDef */;
1680 val
* var10
/* : nullable MType */;
1683 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
1684 var3
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
1685 if (unlikely(var3
== NULL
)) {
1686 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1687 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
1695 { /* Inline typing#TypeVisitor#mmodule (self) on <self:TypeVisitor> */
1696 var6
= self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <self:TypeVisitor> */
1697 if (unlikely(var6
== NULL
)) {
1698 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
1699 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
1707 { /* Inline typing#TypeVisitor#mclassdef (self) on <self:TypeVisitor> */
1708 var9
= self
->attrs
[COLOR_typing__TypeVisitor___mclassdef
].val
; /* _mclassdef on <self:TypeVisitor> */
1714 var10
= modelize_class__ModelBuilder__resolve_mtype(var1
, var4
, var7
, var_node
);
1721 /* method typing#TypeVisitor#resolve_mtype for (self: Object, AType): nullable MType */
1722 val
* VIRTUAL_typing__TypeVisitor__resolve_mtype(val
* self
, val
* p0
) {
1723 val
* var
/* : nullable MType */;
1724 val
* var1
/* : nullable MType */;
1725 var1
= typing__TypeVisitor__resolve_mtype(self
, p0
);
1730 /* method typing#TypeVisitor#try_get_mclass for (self: TypeVisitor, ANode, String): nullable MClass */
1731 val
* typing__TypeVisitor__try_get_mclass(val
* self
, val
* p0
, val
* p1
) {
1732 val
* var
/* : nullable MClass */;
1733 val
* var_node
/* var node: ANode */;
1734 val
* var_name
/* var name: String */;
1735 val
* var1
/* : ModelBuilder */;
1736 val
* var3
/* : ModelBuilder */;
1737 val
* var4
/* : MModule */;
1738 val
* var6
/* : MModule */;
1739 val
* var7
/* : nullable MClass */;
1740 val
* var_mclass
/* var mclass: nullable MClass */;
1744 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
1745 var3
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
1746 if (unlikely(var3
== NULL
)) {
1747 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1748 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
1756 { /* Inline typing#TypeVisitor#mmodule (self) on <self:TypeVisitor> */
1757 var6
= self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <self:TypeVisitor> */
1758 if (unlikely(var6
== NULL
)) {
1759 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
1760 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
1768 var7
= modelbuilder__ModelBuilder__try_get_mclass_by_name(var1
, var_node
, var4
, var_name
);
1776 /* method typing#TypeVisitor#try_get_mclass for (self: Object, ANode, String): nullable MClass */
1777 val
* VIRTUAL_typing__TypeVisitor__try_get_mclass(val
* self
, val
* p0
, val
* p1
) {
1778 val
* var
/* : nullable MClass */;
1779 val
* var1
/* : nullable MClass */;
1780 var1
= typing__TypeVisitor__try_get_mclass(self
, p0
, p1
);
1785 /* method typing#TypeVisitor#get_mclass for (self: TypeVisitor, ANode, String): nullable MClass */
1786 val
* typing__TypeVisitor__get_mclass(val
* self
, val
* p0
, val
* p1
) {
1787 val
* var
/* : nullable MClass */;
1788 val
* var_node
/* var node: ANode */;
1789 val
* var_name
/* var name: String */;
1790 val
* var1
/* : ModelBuilder */;
1791 val
* var3
/* : ModelBuilder */;
1792 val
* var4
/* : MModule */;
1793 val
* var6
/* : MModule */;
1794 val
* var7
/* : nullable MClass */;
1795 val
* var_mclass
/* var mclass: nullable MClass */;
1796 val
* var8
/* : null */;
1797 short int var9
/* : Bool */;
1798 short int var10
/* : Bool */;
1799 val
* var_other
/* var other: nullable Object */;
1800 short int var12
/* : Bool */;
1801 short int var14
/* : Bool */;
1802 val
* var15
/* : ModelBuilder */;
1803 val
* var17
/* : ModelBuilder */;
1804 static val
* varonce
;
1805 val
* var18
/* : String */;
1806 char* var19
/* : NativeString */;
1807 long var20
/* : Int */;
1808 val
* var21
/* : FlatString */;
1809 static val
* varonce22
;
1810 val
* var23
/* : String */;
1811 char* var24
/* : NativeString */;
1812 long var25
/* : Int */;
1813 val
* var26
/* : FlatString */;
1814 val
* var27
/* : Array[Object] */;
1815 long var28
/* : Int */;
1816 val
* var29
/* : NativeArray[Object] */;
1817 val
* var30
/* : String */;
1821 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
1822 var3
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
1823 if (unlikely(var3
== NULL
)) {
1824 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1825 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
1833 { /* Inline typing#TypeVisitor#mmodule (self) on <self:TypeVisitor> */
1834 var6
= self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <self:TypeVisitor> */
1835 if (unlikely(var6
== NULL
)) {
1836 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
1837 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
1845 var7
= modelbuilder__ModelBuilder__try_get_mclass_by_name(var1
, var_node
, var4
, var_name
);
1849 if (var_mclass
== NULL
) {
1850 var9
= 1; /* is null */
1852 var9
= 0; /* arg is null but recv is not */
1855 { /* Inline kernel#Object#== (var_mclass,var8) on <var_mclass:nullable MClass> */
1858 { /* Inline kernel#Object#is_same_instance (var_mclass,var_other) on <var_mclass:nullable MClass(MClass)> */
1859 var14
= var_mclass
== var_other
;
1862 RET_LABEL13
:(void)0;
1867 RET_LABEL11
:(void)0;
1873 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
1874 var17
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
1875 if (unlikely(var17
== NULL
)) {
1876 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1877 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
1881 RET_LABEL16
:(void)0;
1887 var19
= "Type Error: missing primitive class `";
1889 var21
= string__NativeString__to_s_with_length(var19
, var20
);
1898 var26
= string__NativeString__to_s_with_length(var24
, var25
);
1902 var27
= NEW_array__Array(&type_array__Arraykernel__Object
);
1903 { /* var27 = array_instance Array[Object] */
1905 var29
= NEW_array__NativeArray(var28
, &type_array__NativeArraykernel__Object
);
1906 ((struct instance_array__NativeArray
*)var29
)->values
[0] = (val
*) var18
;
1907 ((struct instance_array__NativeArray
*)var29
)->values
[1] = (val
*) var_name
;
1908 ((struct instance_array__NativeArray
*)var29
)->values
[2] = (val
*) var23
;
1910 ((void (*)(val
*, val
*, long))(var27
->class->vft
[COLOR_array__Array__with_native
]))(var27
, var29
, var28
) /* with_native on <var27:Array[Object]>*/;
1914 var30
= ((val
* (*)(val
*))(var27
->class->vft
[COLOR_string__Object__to_s
]))(var27
) /* to_s on <var27:Array[Object]>*/;
1917 modelbuilder__ModelBuilder__error(var15
, var_node
, var30
); /* Direct call modelbuilder#ModelBuilder#error on <var15:ModelBuilder>*/
1926 /* method typing#TypeVisitor#get_mclass for (self: Object, ANode, String): nullable MClass */
1927 val
* VIRTUAL_typing__TypeVisitor__get_mclass(val
* self
, val
* p0
, val
* p1
) {
1928 val
* var
/* : nullable MClass */;
1929 val
* var1
/* : nullable MClass */;
1930 var1
= typing__TypeVisitor__get_mclass(self
, p0
, p1
);
1935 /* method typing#TypeVisitor#type_bool for (self: TypeVisitor, ANode): nullable MType */
1936 val
* typing__TypeVisitor__type_bool(val
* self
, val
* p0
) {
1937 val
* var
/* : nullable MType */;
1938 val
* var_node
/* var node: ANode */;
1939 static val
* varonce
;
1940 val
* var1
/* : String */;
1941 char* var2
/* : NativeString */;
1942 long var3
/* : Int */;
1943 val
* var4
/* : FlatString */;
1944 val
* var5
/* : nullable MClass */;
1945 val
* var_mclass
/* var mclass: nullable MClass */;
1946 val
* var6
/* : null */;
1947 short int var7
/* : Bool */;
1948 short int var8
/* : Bool */;
1949 val
* var_other
/* var other: nullable Object */;
1950 short int var10
/* : Bool */;
1951 short int var12
/* : Bool */;
1952 val
* var13
/* : null */;
1953 val
* var14
/* : MClassType */;
1954 val
* var16
/* : MClassType */;
1961 var4
= string__NativeString__to_s_with_length(var2
, var3
);
1966 var5
= typing__TypeVisitor__get_mclass(self
, var_node
, var1
);
1970 if (var_mclass
== NULL
) {
1971 var7
= 1; /* is null */
1973 var7
= 0; /* arg is null but recv is not */
1976 { /* Inline kernel#Object#== (var_mclass,var6) on <var_mclass:nullable MClass> */
1979 { /* Inline kernel#Object#is_same_instance (var_mclass,var_other) on <var_mclass:nullable MClass(MClass)> */
1980 var12
= var_mclass
== var_other
;
1983 RET_LABEL11
:(void)0;
1999 { /* Inline model#MClass#mclass_type (var_mclass) on <var_mclass:nullable MClass(MClass)> */
2000 var16
= var_mclass
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_mclass:nullable MClass(MClass)> */
2001 if (unlikely(var16
== NULL
)) {
2002 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
2003 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
2007 RET_LABEL15
:(void)0;
2015 /* method typing#TypeVisitor#type_bool for (self: Object, ANode): nullable MType */
2016 val
* VIRTUAL_typing__TypeVisitor__type_bool(val
* self
, val
* p0
) {
2017 val
* var
/* : nullable MType */;
2018 val
* var1
/* : nullable MType */;
2019 var1
= typing__TypeVisitor__type_bool(self
, p0
);
2024 /* method typing#TypeVisitor#get_method for (self: TypeVisitor, ANode, MType, String, Bool): nullable CallSite */
2025 val
* typing__TypeVisitor__get_method(val
* self
, val
* p0
, val
* p1
, val
* p2
, short int p3
) {
2026 val
* var
/* : nullable CallSite */;
2027 val
* var_node
/* var node: ANode */;
2028 val
* var_recvtype
/* var recvtype: MType */;
2029 val
* var_name
/* var name: String */;
2030 short int var_recv_is_self
/* var recv_is_self: Bool */;
2031 val
* var1
/* : MType */;
2032 val
* var_unsafe_type
/* var unsafe_type: MType */;
2033 short int var2
/* : Bool */;
2036 static val
* varonce
;
2037 val
* var3
/* : String */;
2038 char* var4
/* : NativeString */;
2039 long var5
/* : Int */;
2040 val
* var6
/* : FlatString */;
2041 static val
* varonce7
;
2042 val
* var8
/* : String */;
2043 char* var9
/* : NativeString */;
2044 long var10
/* : Int */;
2045 val
* var11
/* : FlatString */;
2046 val
* var12
/* : Array[Object] */;
2047 long var13
/* : Int */;
2048 val
* var14
/* : NativeArray[Object] */;
2049 val
* var15
/* : String */;
2050 val
* var16
/* : null */;
2051 val
* var17
/* : nullable MProperty */;
2052 val
* var_mproperty
/* var mproperty: nullable MProperty */;
2053 val
* var18
/* : null */;
2054 short int var19
/* : Bool */;
2055 short int var20
/* : Bool */;
2056 val
* var_other
/* var other: nullable Object */;
2057 short int var22
/* : Bool */;
2058 short int var24
/* : Bool */;
2059 val
* var25
/* : ModelBuilder */;
2060 val
* var27
/* : ModelBuilder */;
2061 static val
* varonce28
;
2062 val
* var29
/* : String */;
2063 char* var30
/* : NativeString */;
2064 long var31
/* : Int */;
2065 val
* var32
/* : FlatString */;
2066 static val
* varonce33
;
2067 val
* var34
/* : String */;
2068 char* var35
/* : NativeString */;
2069 long var36
/* : Int */;
2070 val
* var37
/* : FlatString */;
2071 static val
* varonce38
;
2072 val
* var39
/* : String */;
2073 char* var40
/* : NativeString */;
2074 long var41
/* : Int */;
2075 val
* var42
/* : FlatString */;
2076 val
* var43
/* : Array[Object] */;
2077 long var44
/* : Int */;
2078 val
* var45
/* : NativeArray[Object] */;
2079 val
* var46
/* : String */;
2080 val
* var47
/* : ModelBuilder */;
2081 val
* var49
/* : ModelBuilder */;
2082 static val
* varonce50
;
2083 val
* var51
/* : String */;
2084 char* var52
/* : NativeString */;
2085 long var53
/* : Int */;
2086 val
* var54
/* : FlatString */;
2087 static val
* varonce55
;
2088 val
* var56
/* : String */;
2089 char* var57
/* : NativeString */;
2090 long var58
/* : Int */;
2091 val
* var59
/* : FlatString */;
2092 static val
* varonce60
;
2093 val
* var61
/* : String */;
2094 char* var62
/* : NativeString */;
2095 long var63
/* : Int */;
2096 val
* var64
/* : FlatString */;
2097 val
* var65
/* : Array[Object] */;
2098 long var66
/* : Int */;
2099 val
* var67
/* : NativeArray[Object] */;
2100 val
* var68
/* : String */;
2101 val
* var69
/* : null */;
2102 short int var70
/* : Bool */;
2105 short int var73
/* : Bool */;
2106 short int var74
/* : Bool */;
2107 short int var75
/* : Bool */;
2108 short int var76
/* : Bool */;
2109 short int var77
/* : Bool */;
2110 short int var79
/* : Bool */;
2111 short int var_
/* var : Bool */;
2112 short int var_80
/* var : Bool */;
2113 short int var81
/* : Bool */;
2114 short int var83
/* : Bool */;
2115 short int var84
/* : Bool */;
2116 short int var_85
/* var : Bool */;
2117 static val
* varonce86
;
2118 val
* var87
/* : String */;
2119 char* var88
/* : NativeString */;
2120 long var89
/* : Int */;
2121 val
* var90
/* : FlatString */;
2122 short int var91
/* : Bool */;
2123 short int var92
/* : Bool */;
2124 val
* var_other94
/* var other: nullable Object */;
2125 short int var95
/* : Bool */;
2126 short int var96
/* : Bool */;
2127 short int var97
/* : Bool */;
2128 short int var_98
/* var : Bool */;
2129 static val
* varonce99
;
2130 val
* var100
/* : String */;
2131 char* var101
/* : NativeString */;
2132 long var102
/* : Int */;
2133 val
* var103
/* : FlatString */;
2134 short int var104
/* : Bool */;
2135 short int var105
/* : Bool */;
2136 short int var107
/* : Bool */;
2137 short int var108
/* : Bool */;
2138 short int var109
/* : Bool */;
2139 static val
* varonce110
;
2140 val
* var111
/* : String */;
2141 char* var112
/* : NativeString */;
2142 long var113
/* : Int */;
2143 val
* var114
/* : FlatString */;
2144 static val
* varonce115
;
2145 val
* var116
/* : String */;
2146 char* var117
/* : NativeString */;
2147 long var118
/* : Int */;
2148 val
* var119
/* : FlatString */;
2149 val
* var120
/* : Array[Object] */;
2150 long var121
/* : Int */;
2151 val
* var122
/* : NativeArray[Object] */;
2152 val
* var123
/* : String */;
2153 short int var124
/* : Bool */;
2154 short int var125
/* : Bool */;
2155 short int var_126
/* var : Bool */;
2156 short int var127
/* : Bool */;
2157 short int var129
/* : Bool */;
2158 static val
* varonce130
;
2159 val
* var131
/* : String */;
2160 char* var132
/* : NativeString */;
2161 long var133
/* : Int */;
2162 val
* var134
/* : FlatString */;
2163 static val
* varonce135
;
2164 val
* var136
/* : String */;
2165 char* var137
/* : NativeString */;
2166 long var138
/* : Int */;
2167 val
* var139
/* : FlatString */;
2168 val
* var140
/* : Array[Object] */;
2169 long var141
/* : Int */;
2170 val
* var142
/* : NativeArray[Object] */;
2171 val
* var143
/* : String */;
2172 short int var144
/* : Bool */;
2173 short int var145
/* : Bool */;
2174 short int var146
/* : Bool */;
2175 val
* var147
/* : MVisibility */;
2176 val
* var149
/* : MVisibility */;
2177 val
* var150
/* : MVisibility */;
2178 short int var151
/* : Bool */;
2179 short int var152
/* : Bool */;
2180 short int var154
/* : Bool */;
2181 short int var156
/* : Bool */;
2182 short int var_157
/* var : Bool */;
2183 short int var158
/* : Bool */;
2184 short int var_159
/* var : Bool */;
2185 val
* var160
/* : MModule */;
2186 val
* var162
/* : MModule */;
2187 val
* var163
/* : MClassDef */;
2188 val
* var165
/* : MClassDef */;
2189 val
* var166
/* : MModule */;
2190 val
* var168
/* : MModule */;
2191 val
* var169
/* : MVisibility */;
2192 val
* var170
/* : MVisibility */;
2193 short int var171
/* : Bool */;
2194 short int var_172
/* var : Bool */;
2195 val
* var173
/* : ModelBuilder */;
2196 val
* var175
/* : ModelBuilder */;
2197 val
* var176
/* : ToolContext */;
2198 val
* var178
/* : ToolContext */;
2199 val
* var179
/* : OptionBool */;
2200 val
* var181
/* : OptionBool */;
2201 val
* var182
/* : nullable Object */;
2202 val
* var184
/* : nullable Object */;
2203 short int var185
/* : Bool */;
2204 short int var186
/* : Bool */;
2205 val
* var187
/* : ModelBuilder */;
2206 val
* var189
/* : ModelBuilder */;
2207 static val
* varonce190
;
2208 val
* var191
/* : String */;
2209 char* var192
/* : NativeString */;
2210 long var193
/* : Int */;
2211 val
* var194
/* : FlatString */;
2212 static val
* varonce195
;
2213 val
* var196
/* : String */;
2214 char* var197
/* : NativeString */;
2215 long var198
/* : Int */;
2216 val
* var199
/* : FlatString */;
2217 val
* var200
/* : Array[Object] */;
2218 long var201
/* : Int */;
2219 val
* var202
/* : NativeArray[Object] */;
2220 val
* var203
/* : String */;
2221 val
* var204
/* : null */;
2222 val
* var205
/* : MModule */;
2223 val
* var207
/* : MModule */;
2224 val
* var208
/* : Array[MPropDef] */;
2225 val
* var_propdefs
/* var propdefs: Array[MMethodDef] */;
2226 long var209
/* : Int */;
2227 long var210
/* : Int */;
2228 short int var211
/* : Bool */;
2229 short int var212
/* : Bool */;
2230 short int var214
/* : Bool */;
2231 val
* var215
/* : ModelBuilder */;
2232 val
* var217
/* : ModelBuilder */;
2233 static val
* varonce218
;
2234 val
* var219
/* : String */;
2235 char* var220
/* : NativeString */;
2236 long var221
/* : Int */;
2237 val
* var222
/* : FlatString */;
2238 static val
* varonce223
;
2239 val
* var224
/* : String */;
2240 char* var225
/* : NativeString */;
2241 long var226
/* : Int */;
2242 val
* var227
/* : FlatString */;
2243 val
* var228
/* : Array[Object] */;
2244 long var229
/* : Int */;
2245 val
* var230
/* : NativeArray[Object] */;
2246 val
* var231
/* : String */;
2247 val
* var232
/* : null */;
2248 long var233
/* : Int */;
2249 long var234
/* : Int */;
2250 short int var235
/* : Bool */;
2251 short int var236
/* : Bool */;
2252 short int var238
/* : Bool */;
2253 val
* var239
/* : nullable Object */;
2254 val
* var_mpropdef
/* var mpropdef: nullable Object */;
2255 val
* var240
/* : ModelBuilder */;
2256 val
* var242
/* : ModelBuilder */;
2257 static val
* varonce243
;
2258 val
* var244
/* : String */;
2259 char* var245
/* : NativeString */;
2260 long var246
/* : Int */;
2261 val
* var247
/* : FlatString */;
2262 static val
* varonce248
;
2263 val
* var249
/* : String */;
2264 char* var250
/* : NativeString */;
2265 long var251
/* : Int */;
2266 val
* var252
/* : FlatString */;
2267 static val
* varonce253
;
2268 val
* var254
/* : String */;
2269 char* var255
/* : NativeString */;
2270 long var256
/* : Int */;
2271 val
* var257
/* : FlatString */;
2272 static val
* varonce258
;
2273 val
* var259
/* : String */;
2274 char* var260
/* : NativeString */;
2275 long var261
/* : Int */;
2276 val
* var262
/* : FlatString */;
2277 val
* var263
/* : String */;
2278 val
* var264
/* : Array[Object] */;
2279 long var265
/* : Int */;
2280 val
* var266
/* : NativeArray[Object] */;
2281 val
* var267
/* : String */;
2282 val
* var268
/* : MPropDef */;
2283 val
* var269
/* : nullable MSignature */;
2284 val
* var271
/* : nullable MSignature */;
2285 val
* var_msignature
/* var msignature: MSignature */;
2286 val
* var272
/* : MType */;
2287 short int var273
/* : Bool */;
2290 const char* var_class_name
;
2291 short int var276
/* : Bool */;
2292 short int var_erasure_cast
/* var erasure_cast: Bool */;
2293 val
* var277
/* : nullable MSignature */;
2294 val
* var279
/* : nullable MSignature */;
2295 val
* var280
/* : nullable MType */;
2296 val
* var282
/* : nullable MType */;
2297 val
* var_rettype
/* var rettype: nullable MType */;
2298 short int var283
/* : Bool */;
2299 short int var284
/* : Bool */;
2300 short int var_285
/* var : Bool */;
2301 val
* var286
/* : null */;
2302 short int var287
/* : Bool */;
2303 short int var288
/* : Bool */;
2304 short int var290
/* : Bool */;
2305 short int var291
/* : Bool */;
2306 short int var292
/* : Bool */;
2307 val
* var293
/* : MType */;
2308 short int var294
/* : Bool */;
2311 val
* var297
/* : nullable MType */;
2312 val
* var299
/* : nullable MType */;
2313 val
* var_erased_rettype
/* var erased_rettype: nullable MType */;
2314 val
* var300
/* : null */;
2315 short int var301
/* : Bool */;
2316 short int var302
/* : Bool */;
2317 short int var304
/* : Bool */;
2318 short int var305
/* : Bool */;
2319 short int var306
/* : Bool */;
2320 short int var307
/* : Bool */;
2321 val
* var308
/* : CallSite */;
2322 val
* var309
/* : MModule */;
2323 val
* var311
/* : MModule */;
2324 val
* var312
/* : nullable MClassType */;
2325 val
* var314
/* : nullable MClassType */;
2326 val
* var_callsite
/* var callsite: CallSite */;
2330 var_recv_is_self
= p3
;
2332 var1
= typing__TypeVisitor__anchor_to(self
, var_recvtype
);
2334 var_unsafe_type
= var1
;
2335 /* <var_recvtype:MType> isa MNullType */
2336 cltype
= type_model__MNullType
.color
;
2337 idtype
= type_model__MNullType
.id
;
2338 if(cltype
>= var_recvtype
->type
->table_size
) {
2341 var2
= var_recvtype
->type
->type_table
[cltype
] == idtype
;
2347 var4
= "Error: Method \'";
2349 var6
= string__NativeString__to_s_with_length(var4
, var5
);
2356 var9
= "\' call on \'null\'.";
2358 var11
= string__NativeString__to_s_with_length(var9
, var10
);
2362 var12
= NEW_array__Array(&type_array__Arraykernel__Object
);
2363 { /* var12 = array_instance Array[Object] */
2365 var14
= NEW_array__NativeArray(var13
, &type_array__NativeArraykernel__Object
);
2366 ((struct instance_array__NativeArray
*)var14
)->values
[0] = (val
*) var3
;
2367 ((struct instance_array__NativeArray
*)var14
)->values
[1] = (val
*) var_name
;
2368 ((struct instance_array__NativeArray
*)var14
)->values
[2] = (val
*) var8
;
2370 ((void (*)(val
*, val
*, long))(var12
->class->vft
[COLOR_array__Array__with_native
]))(var12
, var14
, var13
) /* with_native on <var12:Array[Object]>*/;
2374 var15
= ((val
* (*)(val
*))(var12
->class->vft
[COLOR_string__Object__to_s
]))(var12
) /* to_s on <var12:Array[Object]>*/;
2377 typing__TypeVisitor__error(self
, var_node
, var15
); /* Direct call typing#TypeVisitor#error on <self:TypeVisitor>*/
2385 var17
= typing__TypeVisitor__try_get_mproperty_by_name2(self
, var_node
, var_unsafe_type
, var_name
);
2387 var_mproperty
= var17
;
2389 if (var_mproperty
== NULL
) {
2390 var19
= 1; /* is null */
2392 var19
= 0; /* arg is null but recv is not */
2395 { /* Inline kernel#Object#== (var_mproperty,var18) on <var_mproperty:nullable MProperty> */
2398 { /* Inline kernel#Object#is_same_instance (var_mproperty,var_other) on <var_mproperty:nullable MProperty(MProperty)> */
2399 var24
= var_mproperty
== var_other
;
2402 RET_LABEL23
:(void)0;
2407 RET_LABEL21
:(void)0;
2412 if (var_recv_is_self
){
2414 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
2415 var27
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
2416 if (unlikely(var27
== NULL
)) {
2417 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
2418 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
2422 RET_LABEL26
:(void)0;
2428 var30
= "Error: Method or variable \'";
2430 var32
= string__NativeString__to_s_with_length(var30
, var31
);
2437 var35
= "\' unknown in ";
2439 var37
= string__NativeString__to_s_with_length(var35
, var36
);
2448 var42
= string__NativeString__to_s_with_length(var40
, var41
);
2452 var43
= NEW_array__Array(&type_array__Arraykernel__Object
);
2453 { /* var43 = array_instance Array[Object] */
2455 var45
= NEW_array__NativeArray(var44
, &type_array__NativeArraykernel__Object
);
2456 ((struct instance_array__NativeArray
*)var45
)->values
[0] = (val
*) var29
;
2457 ((struct instance_array__NativeArray
*)var45
)->values
[1] = (val
*) var_name
;
2458 ((struct instance_array__NativeArray
*)var45
)->values
[2] = (val
*) var34
;
2459 ((struct instance_array__NativeArray
*)var45
)->values
[3] = (val
*) var_recvtype
;
2460 ((struct instance_array__NativeArray
*)var45
)->values
[4] = (val
*) var39
;
2462 ((void (*)(val
*, val
*, long))(var43
->class->vft
[COLOR_array__Array__with_native
]))(var43
, var45
, var44
) /* with_native on <var43:Array[Object]>*/;
2466 var46
= ((val
* (*)(val
*))(var43
->class->vft
[COLOR_string__Object__to_s
]))(var43
) /* to_s on <var43:Array[Object]>*/;
2469 modelbuilder__ModelBuilder__error(var25
, var_node
, var46
); /* Direct call modelbuilder#ModelBuilder#error on <var25:ModelBuilder>*/
2473 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
2474 var49
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
2475 if (unlikely(var49
== NULL
)) {
2476 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
2477 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
2481 RET_LABEL48
:(void)0;
2487 var52
= "Error: Method \'";
2489 var54
= string__NativeString__to_s_with_length(var52
, var53
);
2496 var57
= "\' doesn\'t exists in ";
2498 var59
= string__NativeString__to_s_with_length(var57
, var58
);
2507 var64
= string__NativeString__to_s_with_length(var62
, var63
);
2511 var65
= NEW_array__Array(&type_array__Arraykernel__Object
);
2512 { /* var65 = array_instance Array[Object] */
2514 var67
= NEW_array__NativeArray(var66
, &type_array__NativeArraykernel__Object
);
2515 ((struct instance_array__NativeArray
*)var67
)->values
[0] = (val
*) var51
;
2516 ((struct instance_array__NativeArray
*)var67
)->values
[1] = (val
*) var_name
;
2517 ((struct instance_array__NativeArray
*)var67
)->values
[2] = (val
*) var56
;
2518 ((struct instance_array__NativeArray
*)var67
)->values
[3] = (val
*) var_recvtype
;
2519 ((struct instance_array__NativeArray
*)var67
)->values
[4] = (val
*) var61
;
2521 ((void (*)(val
*, val
*, long))(var65
->class->vft
[COLOR_array__Array__with_native
]))(var65
, var67
, var66
) /* with_native on <var65:Array[Object]>*/;
2525 var68
= ((val
* (*)(val
*))(var65
->class->vft
[COLOR_string__Object__to_s
]))(var65
) /* to_s on <var65:Array[Object]>*/;
2528 modelbuilder__ModelBuilder__error(var47
, var_node
, var68
); /* Direct call modelbuilder#ModelBuilder#error on <var47:ModelBuilder>*/
2536 /* <var_mproperty:nullable MProperty(MProperty)> isa MMethod */
2537 cltype71
= type_model__MMethod
.color
;
2538 idtype72
= type_model__MMethod
.id
;
2539 if(cltype71
>= var_mproperty
->type
->table_size
) {
2542 var70
= var_mproperty
->type
->type_table
[cltype71
] == idtype72
;
2544 if (unlikely(!var70
)) {
2545 PRINT_ERROR("Runtime error: %s", "Assert failed");
2546 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 253);
2550 { /* Inline typing#TypeVisitor#is_toplevel_context (self) on <self:TypeVisitor> */
2551 var79
= self
->attrs
[COLOR_typing__TypeVisitor___is_toplevel_context
].s
; /* _is_toplevel_context on <self:TypeVisitor> */
2553 RET_LABEL78
:(void)0;
2558 var76
= var_recv_is_self
;
2565 { /* Inline model#MMethod#is_toplevel (var_mproperty) on <var_mproperty:nullable MProperty(MMethod)> */
2566 var83
= var_mproperty
->attrs
[COLOR_model__MMethod___is_toplevel
].s
; /* _is_toplevel on <var_mproperty:nullable MProperty(MMethod)> */
2568 RET_LABEL82
:(void)0;
2583 var90
= string__NativeString__to_s_with_length(var88
, var89
);
2588 { /* Inline kernel#Object#!= (var_name,var87) on <var_name:String> */
2589 var_other94
= var87
;
2591 var96
= ((short int (*)(val
*, val
*))(var_name
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_name
, var_other94
) /* == on <var_name:String>*/;
2597 RET_LABEL93
:(void)0;
2612 var103
= string__NativeString__to_s_with_length(var101
, var102
);
2617 { /* Inline kernel#Object#!= (var_name,var100) on <var_name:String> */
2618 var_other94
= var100
;
2620 var108
= ((short int (*)(val
*, val
*))(var_name
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_name
, var_other94
) /* == on <var_name:String>*/;
2626 RET_LABEL106
:(void)0;
2636 var111
= varonce110
;
2638 var112
= "Error: \'";
2640 var114
= string__NativeString__to_s_with_length(var112
, var113
);
2642 varonce110
= var111
;
2645 var116
= varonce115
;
2647 var117
= "\' is not a top-level method, thus need a receiver.";
2649 var119
= string__NativeString__to_s_with_length(var117
, var118
);
2651 varonce115
= var116
;
2653 var120
= NEW_array__Array(&type_array__Arraykernel__Object
);
2654 { /* var120 = array_instance Array[Object] */
2656 var122
= NEW_array__NativeArray(var121
, &type_array__NativeArraykernel__Object
);
2657 ((struct instance_array__NativeArray
*)var122
)->values
[0] = (val
*) var111
;
2658 ((struct instance_array__NativeArray
*)var122
)->values
[1] = (val
*) var_name
;
2659 ((struct instance_array__NativeArray
*)var122
)->values
[2] = (val
*) var116
;
2661 ((void (*)(val
*, val
*, long))(var120
->class->vft
[COLOR_array__Array__with_native
]))(var120
, var122
, var121
) /* with_native on <var120:Array[Object]>*/;
2665 var123
= ((val
* (*)(val
*))(var120
->class->vft
[COLOR_string__Object__to_s
]))(var120
) /* to_s on <var120:Array[Object]>*/;
2668 typing__TypeVisitor__error(self
, var_node
, var123
); /* Direct call typing#TypeVisitor#error on <self:TypeVisitor>*/
2672 var125
= !var_recv_is_self
;
2676 { /* Inline model#MMethod#is_toplevel (var_mproperty) on <var_mproperty:nullable MProperty(MMethod)> */
2677 var129
= var_mproperty
->attrs
[COLOR_model__MMethod___is_toplevel
].s
; /* _is_toplevel on <var_mproperty:nullable MProperty(MMethod)> */
2679 RET_LABEL128
:(void)0;
2688 var131
= varonce130
;
2690 var132
= "Error: cannot call \'";
2692 var134
= string__NativeString__to_s_with_length(var132
, var133
);
2694 varonce130
= var131
;
2697 var136
= varonce135
;
2699 var137
= "\', a top-level method, with a receiver.";
2701 var139
= string__NativeString__to_s_with_length(var137
, var138
);
2703 varonce135
= var136
;
2705 var140
= NEW_array__Array(&type_array__Arraykernel__Object
);
2706 { /* var140 = array_instance Array[Object] */
2708 var142
= NEW_array__NativeArray(var141
, &type_array__NativeArraykernel__Object
);
2709 ((struct instance_array__NativeArray
*)var142
)->values
[0] = (val
*) var131
;
2710 ((struct instance_array__NativeArray
*)var142
)->values
[1] = (val
*) var_name
;
2711 ((struct instance_array__NativeArray
*)var142
)->values
[2] = (val
*) var136
;
2713 ((void (*)(val
*, val
*, long))(var140
->class->vft
[COLOR_array__Array__with_native
]))(var140
, var142
, var141
) /* with_native on <var140:Array[Object]>*/;
2717 var143
= ((val
* (*)(val
*))(var140
->class->vft
[COLOR_string__Object__to_s
]))(var140
) /* to_s on <var140:Array[Object]>*/;
2720 typing__TypeVisitor__error(self
, var_node
, var143
); /* Direct call typing#TypeVisitor#error on <self:TypeVisitor>*/
2725 { /* Inline model#MProperty#visibility (var_mproperty) on <var_mproperty:nullable MProperty(MMethod)> */
2726 var149
= var_mproperty
->attrs
[COLOR_model__MProperty___visibility
].val
; /* _visibility on <var_mproperty:nullable MProperty(MMethod)> */
2727 if (unlikely(var149
== NULL
)) {
2728 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _visibility");
2729 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1617);
2733 RET_LABEL148
:(void)0;
2737 var150
= model_base__Object__protected_visibility(self
);
2740 { /* Inline kernel#Object#== (var147,var150) on <var147:MVisibility> */
2743 { /* Inline kernel#Object#is_same_instance (var147,var_other) on <var147:MVisibility> */
2744 var156
= var147
== var_other
;
2747 RET_LABEL155
:(void)0;
2752 RET_LABEL153
:(void)0;
2758 var158
= !var_recv_is_self
;
2766 { /* Inline typing#TypeVisitor#mmodule (self) on <self:TypeVisitor> */
2767 var162
= self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <self:TypeVisitor> */
2768 if (unlikely(var162
== NULL
)) {
2769 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
2770 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
2774 RET_LABEL161
:(void)0;
2778 { /* Inline model#MProperty#intro_mclassdef (var_mproperty) on <var_mproperty:nullable MProperty(MMethod)> */
2779 var165
= var_mproperty
->attrs
[COLOR_model__MProperty___intro_mclassdef
].val
; /* _intro_mclassdef on <var_mproperty:nullable MProperty(MMethod)> */
2780 if (unlikely(var165
== NULL
)) {
2781 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro_mclassdef");
2782 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1602);
2786 RET_LABEL164
:(void)0;
2790 { /* Inline model#MClassDef#mmodule (var163) on <var163:MClassDef> */
2791 var168
= var163
->attrs
[COLOR_model__MClassDef___mmodule
].val
; /* _mmodule on <var163:MClassDef> */
2792 if (unlikely(var168
== NULL
)) {
2793 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
2794 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 471);
2798 RET_LABEL167
:(void)0;
2802 var169
= mmodule__MModule__visibility_for(var160
, var166
);
2805 var170
= model_base__Object__intrude_visibility(self
);
2808 var171
= model_base__MVisibility___60d(var169
, var170
);
2817 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
2818 var175
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
2819 if (unlikely(var175
== NULL
)) {
2820 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
2821 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
2825 RET_LABEL174
:(void)0;
2829 { /* Inline modelbuilder#ModelBuilder#toolcontext (var173) on <var173:ModelBuilder> */
2830 var178
= var173
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var173:ModelBuilder> */
2831 if (unlikely(var178
== NULL
)) {
2832 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
2833 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
2837 RET_LABEL177
:(void)0;
2841 { /* Inline modelbuilder#ToolContext#opt_ignore_visibility (var176) on <var176:ToolContext> */
2842 var181
= var176
->attrs
[COLOR_modelbuilder__ToolContext___opt_ignore_visibility
].val
; /* _opt_ignore_visibility on <var176:ToolContext> */
2843 if (unlikely(var181
== NULL
)) {
2844 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_ignore_visibility");
2845 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 46);
2849 RET_LABEL180
:(void)0;
2853 { /* Inline opts#Option#value (var179) on <var179:OptionBool> */
2854 var184
= var179
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var179:OptionBool> */
2856 RET_LABEL183
:(void)0;
2859 var185
= ((struct instance_kernel__Bool
*)var182
)->value
; /* autounbox from nullable Object to Bool */;
2867 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
2868 var189
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
2869 if (unlikely(var189
== NULL
)) {
2870 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
2871 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
2875 RET_LABEL188
:(void)0;
2879 var191
= varonce190
;
2881 var192
= "Error: Method \'";
2883 var194
= string__NativeString__to_s_with_length(var192
, var193
);
2885 varonce190
= var191
;
2888 var196
= varonce195
;
2890 var197
= "\' is protected and can only acceded by self.";
2892 var199
= string__NativeString__to_s_with_length(var197
, var198
);
2894 varonce195
= var196
;
2896 var200
= NEW_array__Array(&type_array__Arraykernel__Object
);
2897 { /* var200 = array_instance Array[Object] */
2899 var202
= NEW_array__NativeArray(var201
, &type_array__NativeArraykernel__Object
);
2900 ((struct instance_array__NativeArray
*)var202
)->values
[0] = (val
*) var191
;
2901 ((struct instance_array__NativeArray
*)var202
)->values
[1] = (val
*) var_name
;
2902 ((struct instance_array__NativeArray
*)var202
)->values
[2] = (val
*) var196
;
2904 ((void (*)(val
*, val
*, long))(var200
->class->vft
[COLOR_array__Array__with_native
]))(var200
, var202
, var201
) /* with_native on <var200:Array[Object]>*/;
2908 var203
= ((val
* (*)(val
*))(var200
->class->vft
[COLOR_string__Object__to_s
]))(var200
) /* to_s on <var200:Array[Object]>*/;
2911 modelbuilder__ModelBuilder__error(var187
, var_node
, var203
); /* Direct call modelbuilder#ModelBuilder#error on <var187:ModelBuilder>*/
2919 { /* Inline typing#TypeVisitor#mmodule (self) on <self:TypeVisitor> */
2920 var207
= self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <self:TypeVisitor> */
2921 if (unlikely(var207
== NULL
)) {
2922 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
2923 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
2927 RET_LABEL206
:(void)0;
2931 var208
= model__MProperty__lookup_definitions(var_mproperty
, var205
, var_unsafe_type
);
2933 var_propdefs
= var208
;
2935 var209
= array__AbstractArrayRead__length(var_propdefs
);
2939 { /* Inline kernel#Int#== (var209,var210) on <var209:Int> */
2940 var214
= var209
== var210
;
2943 RET_LABEL213
:(void)0;
2949 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
2950 var217
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
2951 if (unlikely(var217
== NULL
)) {
2952 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
2953 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
2957 RET_LABEL216
:(void)0;
2961 var219
= varonce218
;
2963 var220
= "Type error: no definition found for property ";
2965 var222
= string__NativeString__to_s_with_length(var220
, var221
);
2967 varonce218
= var219
;
2970 var224
= varonce223
;
2974 var227
= string__NativeString__to_s_with_length(var225
, var226
);
2976 varonce223
= var224
;
2978 var228
= NEW_array__Array(&type_array__Arraykernel__Object
);
2979 { /* var228 = array_instance Array[Object] */
2981 var230
= NEW_array__NativeArray(var229
, &type_array__NativeArraykernel__Object
);
2982 ((struct instance_array__NativeArray
*)var230
)->values
[0] = (val
*) var219
;
2983 ((struct instance_array__NativeArray
*)var230
)->values
[1] = (val
*) var_name
;
2984 ((struct instance_array__NativeArray
*)var230
)->values
[2] = (val
*) var224
;
2985 ((struct instance_array__NativeArray
*)var230
)->values
[3] = (val
*) var_unsafe_type
;
2987 ((void (*)(val
*, val
*, long))(var228
->class->vft
[COLOR_array__Array__with_native
]))(var228
, var230
, var229
) /* with_native on <var228:Array[Object]>*/;
2991 var231
= ((val
* (*)(val
*))(var228
->class->vft
[COLOR_string__Object__to_s
]))(var228
) /* to_s on <var228:Array[Object]>*/;
2994 modelbuilder__ModelBuilder__error(var215
, var_node
, var231
); /* Direct call modelbuilder#ModelBuilder#error on <var215:ModelBuilder>*/
3001 var233
= array__AbstractArrayRead__length(var_propdefs
);
3005 { /* Inline kernel#Int#== (var233,var234) on <var233:Int> */
3006 var238
= var233
== var234
;
3009 RET_LABEL237
:(void)0;
3015 var239
= abstract_collection__SequenceRead__first(var_propdefs
);
3017 var_mpropdef
= var239
;
3020 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
3021 var242
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
3022 if (unlikely(var242
== NULL
)) {
3023 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
3024 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
3028 RET_LABEL241
:(void)0;
3032 var244
= varonce243
;
3034 var245
= "Warning: confliting property definitions for property ";
3036 var247
= string__NativeString__to_s_with_length(var245
, var246
);
3038 varonce243
= var244
;
3041 var249
= varonce248
;
3045 var252
= string__NativeString__to_s_with_length(var250
, var251
);
3047 varonce248
= var249
;
3050 var254
= varonce253
;
3054 var257
= string__NativeString__to_s_with_length(var255
, var256
);
3056 varonce253
= var254
;
3059 var259
= varonce258
;
3063 var262
= string__NativeString__to_s_with_length(var260
, var261
);
3065 varonce258
= var259
;
3068 var263
= string__Collection__join(var_propdefs
, var259
);
3070 var264
= NEW_array__Array(&type_array__Arraykernel__Object
);
3071 { /* var264 = array_instance Array[Object] */
3073 var266
= NEW_array__NativeArray(var265
, &type_array__NativeArraykernel__Object
);
3074 ((struct instance_array__NativeArray
*)var266
)->values
[0] = (val
*) var244
;
3075 ((struct instance_array__NativeArray
*)var266
)->values
[1] = (val
*) var_name
;
3076 ((struct instance_array__NativeArray
*)var266
)->values
[2] = (val
*) var249
;
3077 ((struct instance_array__NativeArray
*)var266
)->values
[3] = (val
*) var_unsafe_type
;
3078 ((struct instance_array__NativeArray
*)var266
)->values
[4] = (val
*) var254
;
3079 ((struct instance_array__NativeArray
*)var266
)->values
[5] = (val
*) var263
;
3081 ((void (*)(val
*, val
*, long))(var264
->class->vft
[COLOR_array__Array__with_native
]))(var264
, var266
, var265
) /* with_native on <var264:Array[Object]>*/;
3085 var267
= ((val
* (*)(val
*))(var264
->class->vft
[COLOR_string__Object__to_s
]))(var264
) /* to_s on <var264:Array[Object]>*/;
3088 modelbuilder__ModelBuilder__warning(var240
, var_node
, var267
); /* Direct call modelbuilder#ModelBuilder#warning on <var240:ModelBuilder>*/
3091 var268
= model__MProperty__intro(var_mproperty
);
3093 var_mpropdef
= var268
;
3097 { /* Inline model#MMethodDef#msignature (var_mpropdef) on <var_mpropdef:nullable Object(MMethodDef)> */
3098 var271
= var_mpropdef
->attrs
[COLOR_model__MMethodDef___msignature
].val
; /* _msignature on <var_mpropdef:nullable Object(MMethodDef)> */
3100 RET_LABEL270
:(void)0;
3103 if (unlikely(var269
== NULL
)) {
3104 PRINT_ERROR("Runtime error: %s", "Cast failed");
3105 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 281);
3108 var_msignature
= var269
;
3110 var272
= typing__TypeVisitor__resolve_for(self
, var_msignature
, var_recvtype
, var_recv_is_self
);
3112 /* <var272:MType> isa MSignature */
3113 cltype274
= type_model__MSignature
.color
;
3114 idtype275
= type_model__MSignature
.id
;
3115 if(cltype274
>= var272
->type
->table_size
) {
3118 var273
= var272
->type
->type_table
[cltype274
] == idtype275
;
3120 if (unlikely(!var273
)) {
3121 var_class_name
= var272
== NULL ?
"null" : var272
->type
->name
;
3122 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MSignature", var_class_name
);
3123 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 282);
3126 var_msignature
= var272
;
3128 var_erasure_cast
= var276
;
3130 { /* Inline model#MMethodDef#msignature (var_mpropdef) on <var_mpropdef:nullable Object(MMethodDef)> */
3131 var279
= var_mpropdef
->attrs
[COLOR_model__MMethodDef___msignature
].val
; /* _msignature on <var_mpropdef:nullable Object(MMethodDef)> */
3133 RET_LABEL278
:(void)0;
3136 if (var277
== NULL
) {
3137 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3138 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 285);
3141 { /* Inline model#MSignature#return_mtype (var277) on <var277:nullable MSignature> */
3142 if (unlikely(var277
== NULL
)) {
3143 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3144 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1455);
3147 var282
= var277
->attrs
[COLOR_model__MSignature___return_mtype
].val
; /* _return_mtype on <var277:nullable MSignature> */
3149 RET_LABEL281
:(void)0;
3152 var_rettype
= var280
;
3153 var284
= !var_recv_is_self
;
3157 if (var_rettype
== NULL
) {
3158 var287
= 0; /* is null */
3160 var287
= 1; /* arg is null and recv is not */
3163 { /* Inline kernel#Object#!= (var_rettype,var286) on <var_rettype:nullable MType> */
3164 var_other94
= var286
;
3166 var291
= ((short int (*)(val
*, val
*))(var_rettype
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_rettype
, var_other94
) /* == on <var_rettype:nullable MType(MType)>*/;
3172 RET_LABEL289
:(void)0;
3182 var293
= ((val
* (*)(val
*))(var_rettype
->class->vft
[COLOR_model__MType__as_notnullable
]))(var_rettype
) /* as_notnullable on <var_rettype:nullable MType(MType)>*/;
3184 var_rettype
= var293
;
3185 /* <var_rettype:nullable MType(MType)> isa MParameterType */
3186 cltype295
= type_model__MParameterType
.color
;
3187 idtype296
= type_model__MParameterType
.id
;
3188 if(cltype295
>= var_rettype
->type
->table_size
) {
3191 var294
= var_rettype
->type
->type_table
[cltype295
] == idtype296
;
3195 { /* Inline model#MSignature#return_mtype (var_msignature) on <var_msignature:MSignature> */
3196 var299
= var_msignature
->attrs
[COLOR_model__MSignature___return_mtype
].val
; /* _return_mtype on <var_msignature:MSignature> */
3198 RET_LABEL298
:(void)0;
3201 var_erased_rettype
= var297
;
3203 if (var_erased_rettype
== NULL
) {
3204 var301
= 0; /* is null */
3206 var301
= 1; /* arg is null and recv is not */
3209 { /* Inline kernel#Object#!= (var_erased_rettype,var300) on <var_erased_rettype:nullable MType> */
3210 var_other94
= var300
;
3212 var305
= ((short int (*)(val
*, val
*))(var_erased_rettype
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_erased_rettype
, var_other94
) /* == on <var_erased_rettype:nullable MType(MType)>*/;
3218 RET_LABEL303
:(void)0;
3222 if (unlikely(!var301
)) {
3223 PRINT_ERROR("Runtime error: %s", "Assert failed");
3224 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 290);
3228 var_erasure_cast
= var307
;
3233 var308
= NEW_typing__CallSite(&type_typing__CallSite
);
3235 { /* Inline typing#TypeVisitor#mmodule (self) on <self:TypeVisitor> */
3236 var311
= self
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <self:TypeVisitor> */
3237 if (unlikely(var311
== NULL
)) {
3238 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
3239 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
3243 RET_LABEL310
:(void)0;
3247 { /* Inline typing#TypeVisitor#anchor (self) on <self:TypeVisitor> */
3248 var314
= self
->attrs
[COLOR_typing__TypeVisitor___anchor
].val
; /* _anchor on <self:TypeVisitor> */
3250 RET_LABEL313
:(void)0;
3254 { /* Inline typing#CallSite#init (var308,var_node,var_recvtype,var309,var312,var_recv_is_self,var_mproperty,var_mpropdef,var_msignature,var_erasure_cast) on <var308:CallSite> */
3255 var308
->attrs
[COLOR_typing__CallSite___node
].val
= var_node
; /* _node on <var308:CallSite> */
3256 var308
->attrs
[COLOR_typing__CallSite___recv
].val
= var_recvtype
; /* _recv on <var308:CallSite> */
3257 var308
->attrs
[COLOR_typing__CallSite___mmodule
].val
= var309
; /* _mmodule on <var308:CallSite> */
3258 var308
->attrs
[COLOR_typing__CallSite___anchor
].val
= var312
; /* _anchor on <var308:CallSite> */
3259 var308
->attrs
[COLOR_typing__CallSite___recv_is_self
].s
= var_recv_is_self
; /* _recv_is_self on <var308:CallSite> */
3260 var308
->attrs
[COLOR_typing__CallSite___mproperty
].val
= var_mproperty
; /* _mproperty on <var308:CallSite> */
3261 var308
->attrs
[COLOR_typing__CallSite___mpropdef
].val
= var_mpropdef
; /* _mpropdef on <var308:CallSite> */
3262 var308
->attrs
[COLOR_typing__CallSite___msignature
].val
= var_msignature
; /* _msignature on <var308:CallSite> */
3263 var308
->attrs
[COLOR_typing__CallSite___erasure_cast
].s
= var_erasure_cast
; /* _erasure_cast on <var308:CallSite> */
3264 RET_LABEL315
:(void)0;
3267 var_callsite
= var308
;
3273 /* method typing#TypeVisitor#get_method for (self: Object, ANode, MType, String, Bool): nullable CallSite */
3274 val
* VIRTUAL_typing__TypeVisitor__get_method(val
* self
, val
* p0
, val
* p1
, val
* p2
, short int p3
) {
3275 val
* var
/* : nullable CallSite */;
3276 val
* var1
/* : nullable CallSite */;
3277 var1
= typing__TypeVisitor__get_method(self
, p0
, p1
, p2
, p3
);
3282 /* method typing#TypeVisitor#check_signature for (self: TypeVisitor, ANode, Array[AExpr], String, MSignature): Bool */
3283 short int typing__TypeVisitor__check_signature(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
3284 short int var
/* : Bool */;
3285 val
* var_node
/* var node: ANode */;
3286 val
* var_args
/* var args: Array[AExpr] */;
3287 val
* var_name
/* var name: String */;
3288 val
* var_msignature
/* var msignature: MSignature */;
3289 long var1
/* : Int */;
3290 long var3
/* : Int */;
3291 long var_vararg_rank
/* var vararg_rank: Int */;
3292 long var4
/* : Int */;
3293 short int var5
/* : Bool */;
3294 short int var7
/* : Bool */;
3297 const char* var_class_name
;
3298 short int var8
/* : Bool */;
3299 long var9
/* : Int */;
3300 long var10
/* : Int */;
3301 short int var11
/* : Bool */;
3302 short int var13
/* : Bool */;
3305 const char* var_class_name16
;
3306 short int var17
/* : Bool */;
3307 val
* var18
/* : ModelBuilder */;
3308 val
* var20
/* : ModelBuilder */;
3309 static val
* varonce
;
3310 val
* var21
/* : String */;
3311 char* var22
/* : NativeString */;
3312 long var23
/* : Int */;
3313 val
* var24
/* : FlatString */;
3314 static val
* varonce25
;
3315 val
* var26
/* : String */;
3316 char* var27
/* : NativeString */;
3317 long var28
/* : Int */;
3318 val
* var29
/* : FlatString */;
3319 val
* var30
/* : Array[Object] */;
3320 long var31
/* : Int */;
3321 val
* var32
/* : NativeArray[Object] */;
3322 val
* var33
/* : String */;
3323 short int var34
/* : Bool */;
3324 long var35
/* : Int */;
3325 long var36
/* : Int */;
3326 short int var37
/* : Bool */;
3327 short int var38
/* : Bool */;
3328 short int var40
/* : Bool */;
3329 short int var41
/* : Bool */;
3330 val
* var42
/* : ModelBuilder */;
3331 val
* var44
/* : ModelBuilder */;
3332 static val
* varonce45
;
3333 val
* var46
/* : String */;
3334 char* var47
/* : NativeString */;
3335 long var48
/* : Int */;
3336 val
* var49
/* : FlatString */;
3337 long var50
/* : Int */;
3338 static val
* varonce51
;
3339 val
* var52
/* : String */;
3340 char* var53
/* : NativeString */;
3341 long var54
/* : Int */;
3342 val
* var55
/* : FlatString */;
3343 long var56
/* : Int */;
3344 static val
* varonce57
;
3345 val
* var58
/* : String */;
3346 char* var59
/* : NativeString */;
3347 long var60
/* : Int */;
3348 val
* var61
/* : FlatString */;
3349 val
* var62
/* : Array[Object] */;
3350 long var63
/* : Int */;
3351 val
* var64
/* : NativeArray[Object] */;
3352 val
* var65
/* : Object */;
3353 val
* var66
/* : Object */;
3354 val
* var67
/* : String */;
3355 short int var68
/* : Bool */;
3356 long var69
/* : Int */;
3357 long var70
/* : Int */;
3358 long var71
/* : Int */;
3359 short int var73
/* : Bool */;
3362 const char* var_class_name76
;
3363 long var77
/* : Int */;
3364 long var_vararg_decl
/* var vararg_decl: Int */;
3365 val
* var78
/* : Range[Int] */;
3366 long var79
/* : Int */;
3367 long var80
/* : Int */;
3368 val
* var81
/* : Discrete */;
3369 val
* var82
/* : Discrete */;
3370 val
* var83
/* : Iterator[Discrete] */;
3371 short int var84
/* : Bool */;
3372 val
* var85
/* : nullable Object */;
3373 long var_i
/* var i: Int */;
3374 long var86
/* : Int */;
3375 long var_j
/* var j: Int */;
3376 short int var87
/* : Bool */;
3377 short int var88
/* : Bool */;
3378 short int var90
/* : Bool */;
3379 short int var91
/* : Bool */;
3380 short int var93
/* : Bool */;
3383 const char* var_class_name96
;
3384 short int var97
/* : Bool */;
3385 long var98
/* : Int */;
3386 short int var100
/* : Bool */;
3389 const char* var_class_name103
;
3390 long var104
/* : Int */;
3391 val
* var105
/* : Array[MParameter] */;
3392 val
* var107
/* : Array[MParameter] */;
3393 val
* var108
/* : nullable Object */;
3394 val
* var109
/* : MType */;
3395 val
* var111
/* : MType */;
3396 val
* var_paramtype
/* var paramtype: MType */;
3397 val
* var112
/* : nullable Object */;
3398 val
* var113
/* : nullable MType */;
3399 long var114
/* : Int */;
3400 short int var115
/* : Bool */;
3401 short int var117
/* : Bool */;
3404 const char* var_class_name120
;
3405 short int var121
/* : Bool */;
3406 val
* var122
/* : Array[AExpr] */;
3407 val
* var_varargs
/* var varargs: Array[AExpr] */;
3408 val
* var123
/* : Array[MParameter] */;
3409 val
* var125
/* : Array[MParameter] */;
3410 val
* var126
/* : nullable Object */;
3411 val
* var127
/* : MType */;
3412 val
* var129
/* : MType */;
3413 val
* var_paramtype130
/* var paramtype: MType */;
3414 val
* var131
/* : Range[Int] */;
3415 long var132
/* : Int */;
3416 short int var134
/* : Bool */;
3419 const char* var_class_name137
;
3420 long var138
/* : Int */;
3421 val
* var139
/* : Discrete */;
3422 val
* var140
/* : Discrete */;
3423 val
* var141
/* : Iterator[Discrete] */;
3424 short int var142
/* : Bool */;
3425 val
* var143
/* : nullable Object */;
3426 long var_j144
/* var j: Int */;
3427 long var145
/* : Int */;
3428 val
* var146
/* : nullable Object */;
3429 val
* var147
/* : nullable Object */;
3430 val
* var148
/* : nullable MType */;
3431 short int var150
/* : Bool */;
3435 var_msignature
= p3
;
3437 { /* Inline model#MSignature#vararg_rank (var_msignature) on <var_msignature:MSignature> */
3438 var3
= var_msignature
->attrs
[COLOR_model__MSignature___vararg_rank
].l
; /* _vararg_rank on <var_msignature:MSignature> */
3443 var_vararg_rank
= var1
;
3446 { /* Inline kernel#Int#>= (var_vararg_rank,var4) on <var_vararg_rank:Int> */
3447 /* Covariant cast for argument 0 (i) <var4:Int> isa OTHER */
3448 /* <var4:Int> isa OTHER */
3449 var7
= 1; /* easy <var4:Int> isa OTHER*/
3450 if (unlikely(!var7
)) {
3451 var_class_name
= type_kernel__Int
.name
;
3452 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
3453 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 326);
3456 var8
= var_vararg_rank
>= var4
;
3464 var9
= array__AbstractArrayRead__length(var_args
);
3467 var10
= model__MSignature__arity(var_msignature
);
3470 { /* Inline kernel#Int#< (var9,var10) on <var9:Int> */
3471 /* Covariant cast for argument 0 (i) <var10:Int> isa OTHER */
3472 /* <var10:Int> isa OTHER */
3473 var13
= 1; /* easy <var10:Int> isa OTHER*/
3474 if (unlikely(!var13
)) {
3475 var_class_name16
= type_kernel__Int
.name
;
3476 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name16
);
3477 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 325);
3480 var17
= var9
< var10
;
3483 RET_LABEL12
:(void)0;
3488 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
3489 var20
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
3490 if (unlikely(var20
== NULL
)) {
3491 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
3492 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
3496 RET_LABEL19
:(void)0;
3502 var22
= "Error: arity mismatch; prototype is \'";
3504 var24
= string__NativeString__to_s_with_length(var22
, var23
);
3513 var29
= string__NativeString__to_s_with_length(var27
, var28
);
3517 var30
= NEW_array__Array(&type_array__Arraykernel__Object
);
3518 { /* var30 = array_instance Array[Object] */
3520 var32
= NEW_array__NativeArray(var31
, &type_array__NativeArraykernel__Object
);
3521 ((struct instance_array__NativeArray
*)var32
)->values
[0] = (val
*) var21
;
3522 ((struct instance_array__NativeArray
*)var32
)->values
[1] = (val
*) var_name
;
3523 ((struct instance_array__NativeArray
*)var32
)->values
[2] = (val
*) var_msignature
;
3524 ((struct instance_array__NativeArray
*)var32
)->values
[3] = (val
*) var26
;
3526 ((void (*)(val
*, val
*, long))(var30
->class->vft
[COLOR_array__Array__with_native
]))(var30
, var32
, var31
) /* with_native on <var30:Array[Object]>*/;
3530 var33
= ((val
* (*)(val
*))(var30
->class->vft
[COLOR_string__Object__to_s
]))(var30
) /* to_s on <var30:Array[Object]>*/;
3533 modelbuilder__ModelBuilder__error(var18
, var_node
, var33
); /* Direct call modelbuilder#ModelBuilder#error on <var18:ModelBuilder>*/
3542 var35
= array__AbstractArrayRead__length(var_args
);
3545 var36
= model__MSignature__arity(var_msignature
);
3548 { /* Inline kernel#Int#!= (var35,var36) on <var35:Int> */
3549 var40
= var35
== var36
;
3553 RET_LABEL39
:(void)0;
3559 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
3560 var44
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
3561 if (unlikely(var44
== NULL
)) {
3562 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
3563 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
3567 RET_LABEL43
:(void)0;
3573 var47
= "Error: Incorrect number of parameters. Got ";
3575 var49
= string__NativeString__to_s_with_length(var47
, var48
);
3580 var50
= array__AbstractArrayRead__length(var_args
);
3585 var53
= ", expected ";
3587 var55
= string__NativeString__to_s_with_length(var53
, var54
);
3592 var56
= model__MSignature__arity(var_msignature
);
3597 var59
= ". Signature is ";
3599 var61
= string__NativeString__to_s_with_length(var59
, var60
);
3603 var62
= NEW_array__Array(&type_array__Arraykernel__Object
);
3604 { /* var62 = array_instance Array[Object] */
3606 var64
= NEW_array__NativeArray(var63
, &type_array__NativeArraykernel__Object
);
3607 ((struct instance_array__NativeArray
*)var64
)->values
[0] = (val
*) var46
;
3608 var65
= BOX_kernel__Int(var50
); /* autobox from Int to Object */
3609 ((struct instance_array__NativeArray
*)var64
)->values
[1] = (val
*) var65
;
3610 ((struct instance_array__NativeArray
*)var64
)->values
[2] = (val
*) var52
;
3611 var66
= BOX_kernel__Int(var56
); /* autobox from Int to Object */
3612 ((struct instance_array__NativeArray
*)var64
)->values
[3] = (val
*) var66
;
3613 ((struct instance_array__NativeArray
*)var64
)->values
[4] = (val
*) var58
;
3614 ((struct instance_array__NativeArray
*)var64
)->values
[5] = (val
*) var_msignature
;
3616 ((void (*)(val
*, val
*, long))(var62
->class->vft
[COLOR_array__Array__with_native
]))(var62
, var64
, var63
) /* with_native on <var62:Array[Object]>*/;
3620 var67
= ((val
* (*)(val
*))(var62
->class->vft
[COLOR_string__Object__to_s
]))(var62
) /* to_s on <var62:Array[Object]>*/;
3623 modelbuilder__ModelBuilder__error(var42
, var_node
, var67
); /* Direct call modelbuilder#ModelBuilder#error on <var42:ModelBuilder>*/
3632 var69
= array__AbstractArrayRead__length(var_args
);
3635 var70
= model__MSignature__arity(var_msignature
);
3638 { /* Inline kernel#Int#- (var69,var70) on <var69:Int> */
3639 /* Covariant cast for argument 0 (i) <var70:Int> isa OTHER */
3640 /* <var70:Int> isa OTHER */
3641 var73
= 1; /* easy <var70:Int> isa OTHER*/
3642 if (unlikely(!var73
)) {
3643 var_class_name76
= type_kernel__Int
.name
;
3644 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name76
);
3645 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 331);
3648 var77
= var69
- var70
;
3651 RET_LABEL72
:(void)0;
3654 var_vararg_decl
= var71
;
3655 var78
= NEW_range__Range(&type_range__Rangekernel__Int
);
3658 var80
= model__MSignature__arity(var_msignature
);
3661 var81
= BOX_kernel__Int(var79
); /* autobox from Int to Discrete */
3662 var82
= BOX_kernel__Int(var80
); /* autobox from Int to Discrete */
3663 range__Range__without_last(var78
, var81
, var82
); /* Direct call range#Range#without_last on <var78:Range[Int]>*/
3666 var83
= range__Range__iterator(var78
);
3670 var84
= ((short int (*)(val
*))(var83
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var83
) /* is_ok on <var83:Iterator[Discrete]>*/;
3674 var85
= ((val
* (*)(val
*))(var83
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var83
) /* item on <var83:Iterator[Discrete]>*/;
3676 var86
= ((struct instance_kernel__Int
*)var85
)->value
; /* autounbox from nullable Object to Int */;
3680 { /* Inline kernel#Int#== (var_i,var_vararg_rank) on <var_i:Int> */
3681 var90
= var_i
== var_vararg_rank
;
3684 RET_LABEL89
:(void)0;
3689 goto CONTINUE_label
;
3693 { /* Inline kernel#Int#> (var_i,var_vararg_rank) on <var_i:Int> */
3694 /* Covariant cast for argument 0 (i) <var_vararg_rank:Int> isa OTHER */
3695 /* <var_vararg_rank:Int> isa OTHER */
3696 var93
= 1; /* easy <var_vararg_rank:Int> isa OTHER*/
3697 if (unlikely(!var93
)) {
3698 var_class_name96
= type_kernel__Int
.name
;
3699 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name96
);
3700 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 327);
3703 var97
= var_i
> var_vararg_rank
;
3706 RET_LABEL92
:(void)0;
3711 { /* Inline kernel#Int#+ (var_i,var_vararg_decl) on <var_i:Int> */
3712 /* Covariant cast for argument 0 (i) <var_vararg_decl:Int> isa OTHER */
3713 /* <var_vararg_decl:Int> isa OTHER */
3714 var100
= 1; /* easy <var_vararg_decl:Int> isa OTHER*/
3715 if (unlikely(!var100
)) {
3716 var_class_name103
= type_kernel__Int
.name
;
3717 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name103
);
3718 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
3721 var104
= var_i
+ var_vararg_decl
;
3724 RET_LABEL99
:(void)0;
3731 { /* Inline model#MSignature#mparameters (var_msignature) on <var_msignature:MSignature> */
3732 var107
= var_msignature
->attrs
[COLOR_model__MSignature___mparameters
].val
; /* _mparameters on <var_msignature:MSignature> */
3733 if (unlikely(var107
== NULL
)) {
3734 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mparameters");
3735 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1452);
3739 RET_LABEL106
:(void)0;
3743 var108
= array__Array___91d_93d(var105
, var_i
);
3746 { /* Inline model#MParameter#mtype (var108) on <var108:nullable Object(MParameter)> */
3747 var111
= var108
->attrs
[COLOR_model__MParameter___mtype
].val
; /* _mtype on <var108:nullable Object(MParameter)> */
3748 if (unlikely(var111
== NULL
)) {
3749 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mtype");
3750 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1552);
3754 RET_LABEL110
:(void)0;
3757 var_paramtype
= var109
;
3759 var112
= array__Array___91d_93d(var_args
, var_j
);
3762 var113
= typing__TypeVisitor__visit_expr_subtype(self
, var112
, var_paramtype
);
3765 CONTINUE_label
: (void)0;
3767 ((void (*)(val
*))(var83
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var83
) /* next on <var83:Iterator[Discrete]>*/;
3770 BREAK_label
: (void)0;
3773 { /* Inline kernel#Int#>= (var_vararg_rank,var114) on <var_vararg_rank:Int> */
3774 /* Covariant cast for argument 0 (i) <var114:Int> isa OTHER */
3775 /* <var114:Int> isa OTHER */
3776 var117
= 1; /* easy <var114:Int> isa OTHER*/
3777 if (unlikely(!var117
)) {
3778 var_class_name120
= type_kernel__Int
.name
;
3779 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name120
);
3780 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 326);
3783 var121
= var_vararg_rank
>= var114
;
3786 RET_LABEL116
:(void)0;
3790 var122
= NEW_array__Array(&type_array__Arrayparser_nodes__AExpr
);
3792 array__Array__init(var122
); /* Direct call array#Array#init on <var122:Array[AExpr]>*/
3794 var_varargs
= var122
;
3796 { /* Inline model#MSignature#mparameters (var_msignature) on <var_msignature:MSignature> */
3797 var125
= var_msignature
->attrs
[COLOR_model__MSignature___mparameters
].val
; /* _mparameters on <var_msignature:MSignature> */
3798 if (unlikely(var125
== NULL
)) {
3799 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mparameters");
3800 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1452);
3804 RET_LABEL124
:(void)0;
3808 var126
= array__Array___91d_93d(var123
, var_vararg_rank
);
3811 { /* Inline model#MParameter#mtype (var126) on <var126:nullable Object(MParameter)> */
3812 var129
= var126
->attrs
[COLOR_model__MParameter___mtype
].val
; /* _mtype on <var126:nullable Object(MParameter)> */
3813 if (unlikely(var129
== NULL
)) {
3814 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mtype");
3815 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1552);
3819 RET_LABEL128
:(void)0;
3822 var_paramtype130
= var127
;
3823 var131
= NEW_range__Range(&type_range__Rangekernel__Int
);
3825 { /* Inline kernel#Int#+ (var_vararg_rank,var_vararg_decl) on <var_vararg_rank:Int> */
3826 /* Covariant cast for argument 0 (i) <var_vararg_decl:Int> isa OTHER */
3827 /* <var_vararg_decl:Int> isa OTHER */
3828 var134
= 1; /* easy <var_vararg_decl:Int> isa OTHER*/
3829 if (unlikely(!var134
)) {
3830 var_class_name137
= type_kernel__Int
.name
;
3831 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name137
);
3832 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
3835 var138
= var_vararg_rank
+ var_vararg_decl
;
3838 RET_LABEL133
:(void)0;
3842 var139
= BOX_kernel__Int(var_vararg_rank
); /* autobox from Int to Discrete */
3843 var140
= BOX_kernel__Int(var132
); /* autobox from Int to Discrete */
3844 range__Range__init(var131
, var139
, var140
); /* Direct call range#Range#init on <var131:Range[Int]>*/
3847 var141
= range__Range__iterator(var131
);
3851 var142
= ((short int (*)(val
*))(var141
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var141
) /* is_ok on <var141:Iterator[Discrete]>*/;
3855 var143
= ((val
* (*)(val
*))(var141
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var141
) /* item on <var141:Iterator[Discrete]>*/;
3857 var145
= ((struct instance_kernel__Int
*)var143
)->value
; /* autounbox from nullable Object to Int */;
3860 var146
= array__Array___91d_93d(var_args
, var_j144
);
3863 array__Array__add(var_varargs
, var146
); /* Direct call array#Array#add on <var_varargs:Array[AExpr]>*/
3866 var147
= array__Array___91d_93d(var_args
, var_j144
);
3869 var148
= typing__TypeVisitor__visit_expr_subtype(self
, var147
, var_paramtype130
);
3872 CONTINUE_label149
: (void)0;
3874 ((void (*)(val
*))(var141
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var141
) /* next on <var141:Iterator[Discrete]>*/;
3877 BREAK_label149
: (void)0;
3886 /* method typing#TypeVisitor#check_signature for (self: Object, ANode, Array[AExpr], String, MSignature): Bool */
3887 short int VIRTUAL_typing__TypeVisitor__check_signature(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
3888 short int var
/* : Bool */;
3889 short int var1
/* : Bool */;
3890 var1
= typing__TypeVisitor__check_signature(self
, p0
, p1
, p2
, p3
);
3895 /* method typing#TypeVisitor#error for (self: TypeVisitor, ANode, String) */
3896 void typing__TypeVisitor__error(val
* self
, val
* p0
, val
* p1
) {
3897 val
* var_node
/* var node: ANode */;
3898 val
* var_message
/* var message: String */;
3899 val
* var
/* : ModelBuilder */;
3900 val
* var2
/* : ModelBuilder */;
3901 val
* var3
/* : ToolContext */;
3902 val
* var5
/* : ToolContext */;
3903 val
* var6
/* : Location */;
3907 { /* Inline typing#TypeVisitor#modelbuilder (self) on <self:TypeVisitor> */
3908 var2
= self
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <self:TypeVisitor> */
3909 if (unlikely(var2
== NULL
)) {
3910 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
3911 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 36);
3919 { /* Inline modelbuilder#ModelBuilder#toolcontext (var) on <var:ModelBuilder> */
3920 var5
= var
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var:ModelBuilder> */
3921 if (unlikely(var5
== NULL
)) {
3922 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
3923 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
3931 var6
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_parser_nodes__ANode__hot_location
]))(var_node
) /* hot_location on <var_node:ANode>*/;
3934 toolcontext__ToolContext__error(var3
, var6
, var_message
); /* Direct call toolcontext#ToolContext#error on <var3:ToolContext>*/
3938 /* method typing#TypeVisitor#error for (self: Object, ANode, String) */
3939 void VIRTUAL_typing__TypeVisitor__error(val
* self
, val
* p0
, val
* p1
) {
3940 typing__TypeVisitor__error(self
, p0
, p1
); /* Direct call typing#TypeVisitor#error on <self:Object(TypeVisitor)>*/
3943 /* method typing#TypeVisitor#get_variable for (self: TypeVisitor, AExpr, Variable): nullable MType */
3944 val
* typing__TypeVisitor__get_variable(val
* self
, val
* p0
, val
* p1
) {
3945 val
* var
/* : nullable MType */;
3946 val
* var_node
/* var node: AExpr */;
3947 val
* var_variable
/* var variable: Variable */;
3948 val
* var1
/* : nullable FlowContext */;
3949 val
* var3
/* : nullable FlowContext */;
3950 val
* var_flow
/* var flow: nullable FlowContext */;
3951 val
* var4
/* : null */;
3952 short int var5
/* : Bool */;
3953 short int var6
/* : Bool */;
3954 val
* var_other
/* var other: nullable Object */;
3955 short int var8
/* : Bool */;
3956 short int var10
/* : Bool */;
3957 static val
* varonce
;
3958 val
* var11
/* : String */;
3959 char* var12
/* : NativeString */;
3960 long var13
/* : Int */;
3961 val
* var14
/* : FlatString */;
3962 val
* var15
/* : null */;
3963 val
* var16
/* : HashMap[Variable, nullable MType] */;
3964 val
* var18
/* : HashMap[Variable, nullable MType] */;
3965 short int var19
/* : Bool */;
3966 val
* var20
/* : HashMap[Variable, nullable MType] */;
3967 val
* var22
/* : HashMap[Variable, nullable MType] */;
3968 val
* var23
/* : nullable Object */;
3969 val
* var24
/* : nullable Array[nullable MType] */;
3970 val
* var_mtypes
/* var mtypes: nullable Array[nullable MType] */;
3971 short int var25
/* : Bool */;
3972 val
* var26
/* : null */;
3973 short int var27
/* : Bool */;
3974 short int var28
/* : Bool */;
3975 short int var_
/* var : Bool */;
3976 long var29
/* : Int */;
3977 long var30
/* : Int */;
3978 short int var31
/* : Bool */;
3979 short int var32
/* : Bool */;
3980 short int var34
/* : Bool */;
3981 val
* var35
/* : nullable MType */;
3982 val
* var37
/* : nullable MType */;
3983 long var38
/* : Int */;
3984 long var39
/* : Int */;
3985 short int var40
/* : Bool */;
3986 short int var41
/* : Bool */;
3987 short int var43
/* : Bool */;
3988 val
* var44
/* : nullable Object */;
3989 val
* var45
/* : nullable MType */;
3990 val
* var_res
/* var res: nullable MType */;
3991 val
* var46
/* : null */;
3992 short int var47
/* : Bool */;
3993 short int var48
/* : Bool */;
3994 short int var50
/* : Bool */;
3995 short int var52
/* : Bool */;
3996 val
* var53
/* : nullable MType */;
3997 val
* var55
/* : nullable MType */;
4001 { /* Inline flow#AExpr#after_flow_context (var_node) on <var_node:AExpr> */
4002 var3
= var_node
->attrs
[COLOR_flow__AExpr___after_flow_context
].val
; /* _after_flow_context on <var_node:AExpr> */
4009 if (var_flow
== NULL
) {
4010 var5
= 1; /* is null */
4012 var5
= 0; /* arg is null but recv is not */
4015 { /* Inline kernel#Object#== (var_flow,var4) on <var_flow:nullable FlowContext> */
4018 { /* Inline kernel#Object#is_same_instance (var_flow,var_other) on <var_flow:nullable FlowContext(FlowContext)> */
4019 var10
= var_flow
== var_other
;
4035 var12
= "No context!";
4037 var14
= string__NativeString__to_s_with_length(var12
, var13
);
4042 typing__TypeVisitor__error(self
, var_node
, var11
); /* Direct call typing#TypeVisitor#error on <self:TypeVisitor>*/
4050 { /* Inline typing#FlowContext#vars (var_flow) on <var_flow:nullable FlowContext(FlowContext)> */
4051 var18
= var_flow
->attrs
[COLOR_typing__FlowContext___vars
].val
; /* _vars on <var_flow:nullable FlowContext(FlowContext)> */
4052 if (unlikely(var18
== NULL
)) {
4053 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _vars");
4054 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 447);
4058 RET_LABEL17
:(void)0;
4062 var19
= abstract_collection__MapRead__has_key(var16
, var_variable
);
4066 { /* Inline typing#FlowContext#vars (var_flow) on <var_flow:nullable FlowContext(FlowContext)> */
4067 var22
= var_flow
->attrs
[COLOR_typing__FlowContext___vars
].val
; /* _vars on <var_flow:nullable FlowContext(FlowContext)> */
4068 if (unlikely(var22
== NULL
)) {
4069 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _vars");
4070 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 447);
4074 RET_LABEL21
:(void)0;
4078 var23
= hash_collection__HashMap___91d_93d(var20
, var_variable
);
4084 var24
= typing__FlowContext__collect_types(var_flow
, var_variable
);
4088 if (var_mtypes
== NULL
) {
4089 var27
= 1; /* is null */
4091 var27
= 0; /* arg is null but recv is not */
4094 var28
= abstract_collection__SequenceRead___61d_61d(var_mtypes
, var26
);
4102 var29
= array__AbstractArrayRead__length(var_mtypes
);
4106 { /* Inline kernel#Int#== (var29,var30) on <var29:Int> */
4107 var34
= var29
== var30
;
4110 RET_LABEL33
:(void)0;
4118 { /* Inline typing#Variable#declared_type (var_variable) on <var_variable:Variable> */
4119 var37
= var_variable
->attrs
[COLOR_typing__Variable___declared_type
].val
; /* _declared_type on <var_variable:Variable> */
4121 RET_LABEL36
:(void)0;
4128 var38
= array__AbstractArrayRead__length(var_mtypes
);
4132 { /* Inline kernel#Int#== (var38,var39) on <var38:Int> */
4133 var43
= var38
== var39
;
4136 RET_LABEL42
:(void)0;
4142 var44
= abstract_collection__SequenceRead__first(var_mtypes
);
4148 var45
= typing__TypeVisitor__merge_types(self
, var_node
, var_mtypes
);
4152 if (var_res
== NULL
) {
4153 var47
= 1; /* is null */
4155 var47
= 0; /* arg is null but recv is not */
4158 { /* Inline kernel#Object#== (var_res,var46) on <var_res:nullable MType> */
4161 { /* Inline kernel#Object#is_same_instance (var_res,var_other) on <var_res:nullable MType(MType)> */
4162 var52
= var_res
== var_other
;
4165 RET_LABEL51
:(void)0;
4170 RET_LABEL49
:(void)0;
4176 { /* Inline typing#Variable#declared_type (var_variable) on <var_variable:Variable> */
4177 var55
= var_variable
->attrs
[COLOR_typing__Variable___declared_type
].val
; /* _declared_type on <var_variable:Variable> */
4179 RET_LABEL54
:(void)0;
4193 /* method typing#TypeVisitor#get_variable for (self: Object, AExpr, Variable): nullable MType */
4194 val
* VIRTUAL_typing__TypeVisitor__get_variable(val
* self
, val
* p0
, val
* p1
) {
4195 val
* var
/* : nullable MType */;
4196 val
* var1
/* : nullable MType */;
4197 var1
= typing__TypeVisitor__get_variable(self
, p0
, p1
);
4202 /* method typing#TypeVisitor#set_variable for (self: TypeVisitor, AExpr, Variable, nullable MType) */
4203 void typing__TypeVisitor__set_variable(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
4204 val
* var_node
/* var node: AExpr */;
4205 val
* var_variable
/* var variable: Variable */;
4206 val
* var_mtype
/* var mtype: nullable MType */;
4207 val
* var
/* : nullable FlowContext */;
4208 val
* var2
/* : nullable FlowContext */;
4209 val
* var_flow
/* var flow: nullable FlowContext */;
4210 val
* var3
/* : null */;
4211 short int var4
/* : Bool */;
4212 short int var5
/* : Bool */;
4213 val
* var_other
/* var other: nullable Object */;
4214 short int var7
/* : Bool */;
4215 short int var8
/* : Bool */;
4216 short int var9
/* : Bool */;
4221 { /* Inline flow#AExpr#after_flow_context (var_node) on <var_node:AExpr> */
4222 var2
= var_node
->attrs
[COLOR_flow__AExpr___after_flow_context
].val
; /* _after_flow_context on <var_node:AExpr> */
4229 if (var_flow
== NULL
) {
4230 var4
= 0; /* is null */
4232 var4
= 1; /* arg is null and recv is not */
4235 { /* Inline kernel#Object#!= (var_flow,var3) on <var_flow:nullable FlowContext> */
4238 var8
= ((short int (*)(val
*, val
*))(var_flow
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_flow
, var_other
) /* == on <var_flow:nullable FlowContext(FlowContext)>*/;
4248 if (unlikely(!var4
)) {
4249 PRINT_ERROR("Runtime error: %s", "Assert failed");
4250 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 374);
4254 typing__FlowContext__set_var(var_flow
, var_variable
, var_mtype
); /* Direct call typing#FlowContext#set_var on <var_flow:nullable FlowContext(FlowContext)>*/
4258 /* method typing#TypeVisitor#set_variable for (self: Object, AExpr, Variable, nullable MType) */
4259 void VIRTUAL_typing__TypeVisitor__set_variable(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
4260 typing__TypeVisitor__set_variable(self
, p0
, p1
, p2
); /* Direct call typing#TypeVisitor#set_variable on <self:Object(TypeVisitor)>*/
4263 /* method typing#TypeVisitor#merge_types for (self: TypeVisitor, ANode, Array[nullable MType]): nullable MType */
4264 val
* typing__TypeVisitor__merge_types(val
* self
, val
* p0
, val
* p1
) {
4265 val
* var
/* : nullable MType */;
4266 val
* var_node
/* var node: ANode */;
4267 val
* var_col
/* var col: Array[nullable MType] */;
4268 long var1
/* : Int */;
4269 long var2
/* : Int */;
4270 short int var3
/* : Bool */;
4271 short int var4
/* : Bool */;
4272 short int var6
/* : Bool */;
4273 val
* var7
/* : nullable Object */;
4274 val
* var8
/* : Array[nullable MType] */;
4275 val
* var_res
/* var res: Array[nullable MType] */;
4276 val
* var9
/* : ArrayIterator[nullable Object] */;
4277 short int var10
/* : Bool */;
4278 val
* var11
/* : nullable Object */;
4279 val
* var_t1
/* var t1: nullable MType */;
4280 val
* var12
/* : null */;
4281 short int var13
/* : Bool */;
4282 short int var14
/* : Bool */;
4283 val
* var_other
/* var other: nullable Object */;
4284 short int var16
/* : Bool */;
4285 short int var18
/* : Bool */;
4286 short int var19
/* : Bool */;
4287 short int var_found
/* var found: Bool */;
4288 val
* var20
/* : ArrayIterator[nullable Object] */;
4289 short int var21
/* : Bool */;
4290 val
* var22
/* : nullable Object */;
4291 val
* var_t2
/* var t2: nullable MType */;
4292 val
* var23
/* : null */;
4293 short int var24
/* : Bool */;
4294 short int var25
/* : Bool */;
4295 short int var27
/* : Bool */;
4296 short int var29
/* : Bool */;
4297 short int var31
/* : Bool */;
4298 short int var32
/* : Bool */;
4301 short int var_
/* var : Bool */;
4302 short int var33
/* : Bool */;
4305 val
* var36
/* : MType */;
4306 short int var37
/* : Bool */;
4307 short int var38
/* : Bool */;
4308 short int var39
/* : Bool */;
4309 val
* var40
/* : null */;
4313 var1
= array__AbstractArrayRead__length(var_col
);
4317 { /* Inline kernel#Int#== (var1,var2) on <var1:Int> */
4318 var6
= var1
== var2
;
4327 var7
= abstract_collection__SequenceRead__first(var_col
);
4333 var8
= NEW_array__Array(&type_array__Arraynullable_model__MType
);
4335 array__Array__init(var8
); /* Direct call array#Array#init on <var8:Array[nullable MType]>*/
4339 var9
= array__AbstractArrayRead__iterator(var_col
);
4343 var10
= array__ArrayIterator__is_ok(var9
);
4347 var11
= array__ArrayIterator__item(var9
);
4351 if (var_t1
== NULL
) {
4352 var13
= 1; /* is null */
4354 var13
= 0; /* arg is null but recv is not */
4357 { /* Inline kernel#Object#== (var_t1,var12) on <var_t1:nullable MType> */
4360 { /* Inline kernel#Object#is_same_instance (var_t1,var_other) on <var_t1:nullable MType(MType)> */
4361 var18
= var_t1
== var_other
;
4364 RET_LABEL17
:(void)0;
4369 RET_LABEL15
:(void)0;
4374 goto CONTINUE_label
;
4380 var20
= array__AbstractArrayRead__iterator(var_col
);
4384 var21
= array__ArrayIterator__is_ok(var20
);
4388 var22
= array__ArrayIterator__item(var20
);
4392 if (var_t2
== NULL
) {
4393 var24
= 1; /* is null */
4395 var24
= 0; /* arg is null but recv is not */
4398 { /* Inline kernel#Object#== (var_t2,var23) on <var_t2:nullable MType> */
4401 { /* Inline kernel#Object#is_same_instance (var_t2,var_other) on <var_t2:nullable MType(MType)> */
4402 var29
= var_t2
== var_other
;
4405 RET_LABEL28
:(void)0;
4410 RET_LABEL26
:(void)0;
4415 goto CONTINUE_label30
;
4418 /* <var_t2:nullable MType(MType)> isa MNullableType */
4419 cltype
= type_model__MNullableType
.color
;
4420 idtype
= type_model__MNullableType
.id
;
4421 if(cltype
>= var_t2
->type
->table_size
) {
4424 var32
= var_t2
->type
->type_table
[cltype
] == idtype
;
4430 /* <var_t2:nullable MType(MType)> isa MNullType */
4431 cltype34
= type_model__MNullType
.color
;
4432 idtype35
= type_model__MNullType
.id
;
4433 if(cltype34
>= var_t2
->type
->table_size
) {
4436 var33
= var_t2
->type
->type_table
[cltype34
] == idtype35
;
4442 var36
= ((val
* (*)(val
*))(var_t1
->class->vft
[COLOR_model__MType__as_nullable
]))(var_t1
) /* as_nullable on <var_t1:nullable MType(MType)>*/;
4448 var37
= typing__TypeVisitor__is_subtype(self
, var_t2
, var_t1
);
4456 CONTINUE_label30
: (void)0;
4458 array__ArrayIterator__next(var20
); /* Direct call array#ArrayIterator#next on <var20:ArrayIterator[nullable Object]>*/
4461 BREAK_label30
: (void)0;
4467 CONTINUE_label
: (void)0;
4469 array__ArrayIterator__next(var9
); /* Direct call array#ArrayIterator#next on <var9:ArrayIterator[nullable Object]>*/
4472 BREAK_label
: (void)0;
4479 /* method typing#TypeVisitor#merge_types for (self: Object, ANode, Array[nullable MType]): nullable MType */
4480 val
* VIRTUAL_typing__TypeVisitor__merge_types(val
* self
, val
* p0
, val
* p1
) {
4481 val
* var
/* : nullable MType */;
4482 val
* var1
/* : nullable MType */;
4483 var1
= typing__TypeVisitor__merge_types(self
, p0
, p1
);
4488 /* method typing#CallSite#node for (self: CallSite): ANode */
4489 val
* typing__CallSite__node(val
* self
) {
4490 val
* var
/* : ANode */;
4491 val
* var1
/* : ANode */;
4492 var1
= self
->attrs
[COLOR_typing__CallSite___node
].val
; /* _node on <self:CallSite> */
4493 if (unlikely(var1
== NULL
)) {
4494 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _node");
4495 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 405);
4502 /* method typing#CallSite#node for (self: Object): ANode */
4503 val
* VIRTUAL_typing__CallSite__node(val
* self
) {
4504 val
* var
/* : ANode */;
4505 val
* var1
/* : ANode */;
4506 val
* var3
/* : ANode */;
4507 { /* Inline typing#CallSite#node (self) on <self:Object(CallSite)> */
4508 var3
= self
->attrs
[COLOR_typing__CallSite___node
].val
; /* _node on <self:Object(CallSite)> */
4509 if (unlikely(var3
== NULL
)) {
4510 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _node");
4511 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 405);
4521 /* method typing#CallSite#recv for (self: CallSite): MType */
4522 val
* typing__CallSite__recv(val
* self
) {
4523 val
* var
/* : MType */;
4524 val
* var1
/* : MType */;
4525 var1
= self
->attrs
[COLOR_typing__CallSite___recv
].val
; /* _recv on <self:CallSite> */
4526 if (unlikely(var1
== NULL
)) {
4527 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _recv");
4528 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 408);
4535 /* method typing#CallSite#recv for (self: Object): MType */
4536 val
* VIRTUAL_typing__CallSite__recv(val
* self
) {
4537 val
* var
/* : MType */;
4538 val
* var1
/* : MType */;
4539 val
* var3
/* : MType */;
4540 { /* Inline typing#CallSite#recv (self) on <self:Object(CallSite)> */
4541 var3
= self
->attrs
[COLOR_typing__CallSite___recv
].val
; /* _recv on <self:Object(CallSite)> */
4542 if (unlikely(var3
== NULL
)) {
4543 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _recv");
4544 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 408);
4554 /* method typing#CallSite#mmodule for (self: CallSite): MModule */
4555 val
* typing__CallSite__mmodule(val
* self
) {
4556 val
* var
/* : MModule */;
4557 val
* var1
/* : MModule */;
4558 var1
= self
->attrs
[COLOR_typing__CallSite___mmodule
].val
; /* _mmodule on <self:CallSite> */
4559 if (unlikely(var1
== NULL
)) {
4560 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
4561 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 411);
4568 /* method typing#CallSite#mmodule for (self: Object): MModule */
4569 val
* VIRTUAL_typing__CallSite__mmodule(val
* self
) {
4570 val
* var
/* : MModule */;
4571 val
* var1
/* : MModule */;
4572 val
* var3
/* : MModule */;
4573 { /* Inline typing#CallSite#mmodule (self) on <self:Object(CallSite)> */
4574 var3
= self
->attrs
[COLOR_typing__CallSite___mmodule
].val
; /* _mmodule on <self:Object(CallSite)> */
4575 if (unlikely(var3
== NULL
)) {
4576 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
4577 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 411);
4587 /* method typing#CallSite#anchor for (self: CallSite): nullable MClassType */
4588 val
* typing__CallSite__anchor(val
* self
) {
4589 val
* var
/* : nullable MClassType */;
4590 val
* var1
/* : nullable MClassType */;
4591 var1
= self
->attrs
[COLOR_typing__CallSite___anchor
].val
; /* _anchor on <self:CallSite> */
4596 /* method typing#CallSite#anchor for (self: Object): nullable MClassType */
4597 val
* VIRTUAL_typing__CallSite__anchor(val
* self
) {
4598 val
* var
/* : nullable MClassType */;
4599 val
* var1
/* : nullable MClassType */;
4600 val
* var3
/* : nullable MClassType */;
4601 { /* Inline typing#CallSite#anchor (self) on <self:Object(CallSite)> */
4602 var3
= self
->attrs
[COLOR_typing__CallSite___anchor
].val
; /* _anchor on <self:Object(CallSite)> */
4610 /* method typing#CallSite#mproperty for (self: CallSite): MMethod */
4611 val
* typing__CallSite__mproperty(val
* self
) {
4612 val
* var
/* : MMethod */;
4613 val
* var1
/* : MMethod */;
4614 var1
= self
->attrs
[COLOR_typing__CallSite___mproperty
].val
; /* _mproperty on <self:CallSite> */
4615 if (unlikely(var1
== NULL
)) {
4616 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
4617 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 422);
4624 /* method typing#CallSite#mproperty for (self: Object): MMethod */
4625 val
* VIRTUAL_typing__CallSite__mproperty(val
* self
) {
4626 val
* var
/* : MMethod */;
4627 val
* var1
/* : MMethod */;
4628 val
* var3
/* : MMethod */;
4629 { /* Inline typing#CallSite#mproperty (self) on <self:Object(CallSite)> */
4630 var3
= self
->attrs
[COLOR_typing__CallSite___mproperty
].val
; /* _mproperty on <self:Object(CallSite)> */
4631 if (unlikely(var3
== NULL
)) {
4632 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
4633 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 422);
4643 /* method typing#CallSite#mpropdef for (self: CallSite): MMethodDef */
4644 val
* typing__CallSite__mpropdef(val
* self
) {
4645 val
* var
/* : MMethodDef */;
4646 val
* var1
/* : MMethodDef */;
4647 var1
= self
->attrs
[COLOR_typing__CallSite___mpropdef
].val
; /* _mpropdef on <self:CallSite> */
4648 if (unlikely(var1
== NULL
)) {
4649 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mpropdef");
4650 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 425);
4657 /* method typing#CallSite#mpropdef for (self: Object): MMethodDef */
4658 val
* VIRTUAL_typing__CallSite__mpropdef(val
* self
) {
4659 val
* var
/* : MMethodDef */;
4660 val
* var1
/* : MMethodDef */;
4661 val
* var3
/* : MMethodDef */;
4662 { /* Inline typing#CallSite#mpropdef (self) on <self:Object(CallSite)> */
4663 var3
= self
->attrs
[COLOR_typing__CallSite___mpropdef
].val
; /* _mpropdef on <self:Object(CallSite)> */
4664 if (unlikely(var3
== NULL
)) {
4665 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mpropdef");
4666 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 425);
4676 /* method typing#CallSite#msignature for (self: CallSite): MSignature */
4677 val
* typing__CallSite__msignature(val
* self
) {
4678 val
* var
/* : MSignature */;
4679 val
* var1
/* : MSignature */;
4680 var1
= self
->attrs
[COLOR_typing__CallSite___msignature
].val
; /* _msignature on <self:CallSite> */
4681 if (unlikely(var1
== NULL
)) {
4682 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _msignature");
4683 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 429);
4690 /* method typing#CallSite#msignature for (self: Object): MSignature */
4691 val
* VIRTUAL_typing__CallSite__msignature(val
* self
) {
4692 val
* var
/* : MSignature */;
4693 val
* var1
/* : MSignature */;
4694 val
* var3
/* : MSignature */;
4695 { /* Inline typing#CallSite#msignature (self) on <self:Object(CallSite)> */
4696 var3
= self
->attrs
[COLOR_typing__CallSite___msignature
].val
; /* _msignature on <self:Object(CallSite)> */
4697 if (unlikely(var3
== NULL
)) {
4698 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _msignature");
4699 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 429);
4709 /* method typing#CallSite#erasure_cast for (self: CallSite): Bool */
4710 short int typing__CallSite__erasure_cast(val
* self
) {
4711 short int var
/* : Bool */;
4712 short int var1
/* : Bool */;
4713 var1
= self
->attrs
[COLOR_typing__CallSite___erasure_cast
].s
; /* _erasure_cast on <self:CallSite> */
4718 /* method typing#CallSite#erasure_cast for (self: Object): Bool */
4719 short int VIRTUAL_typing__CallSite__erasure_cast(val
* self
) {
4720 short int var
/* : Bool */;
4721 short int var1
/* : Bool */;
4722 short int var3
/* : Bool */;
4723 { /* Inline typing#CallSite#erasure_cast (self) on <self:Object(CallSite)> */
4724 var3
= self
->attrs
[COLOR_typing__CallSite___erasure_cast
].s
; /* _erasure_cast on <self:Object(CallSite)> */
4732 /* method typing#CallSite#check_signature for (self: CallSite, TypeVisitor, Array[AExpr]): Bool */
4733 short int typing__CallSite__check_signature(val
* self
, val
* p0
, val
* p1
) {
4734 short int var
/* : Bool */;
4735 val
* var_v
/* var v: TypeVisitor */;
4736 val
* var_args
/* var args: Array[AExpr] */;
4737 val
* var1
/* : ANode */;
4738 val
* var3
/* : ANode */;
4739 val
* var4
/* : MMethod */;
4740 val
* var6
/* : MMethod */;
4741 val
* var7
/* : String */;
4742 val
* var9
/* : String */;
4743 val
* var10
/* : MSignature */;
4744 val
* var12
/* : MSignature */;
4745 short int var13
/* : Bool */;
4749 { /* Inline typing#CallSite#node (self) on <self:CallSite> */
4750 var3
= self
->attrs
[COLOR_typing__CallSite___node
].val
; /* _node on <self:CallSite> */
4751 if (unlikely(var3
== NULL
)) {
4752 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _node");
4753 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 405);
4761 { /* Inline typing#CallSite#mproperty (self) on <self:CallSite> */
4762 var6
= self
->attrs
[COLOR_typing__CallSite___mproperty
].val
; /* _mproperty on <self:CallSite> */
4763 if (unlikely(var6
== NULL
)) {
4764 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
4765 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 422);
4773 { /* Inline model#MProperty#name (var4) on <var4:MMethod> */
4774 var9
= var4
->attrs
[COLOR_model__MProperty___name
].val
; /* _name on <var4:MMethod> */
4775 if (unlikely(var9
== NULL
)) {
4776 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _name");
4777 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1607);
4785 { /* Inline typing#CallSite#msignature (self) on <self:CallSite> */
4786 var12
= self
->attrs
[COLOR_typing__CallSite___msignature
].val
; /* _msignature on <self:CallSite> */
4787 if (unlikely(var12
== NULL
)) {
4788 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _msignature");
4789 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 429);
4793 RET_LABEL11
:(void)0;
4797 var13
= typing__TypeVisitor__check_signature(var_v
, var1
, var_args
, var7
, var10
);
4804 /* method typing#CallSite#check_signature for (self: Object, TypeVisitor, Array[AExpr]): Bool */
4805 short int VIRTUAL_typing__CallSite__check_signature(val
* self
, val
* p0
, val
* p1
) {
4806 short int var
/* : Bool */;
4807 short int var1
/* : Bool */;
4808 var1
= typing__CallSite__check_signature(self
, p0
, p1
);
4813 /* method typing#CallSite#init for (self: CallSite, ANode, MType, MModule, nullable MClassType, Bool, MMethod, MMethodDef, MSignature, Bool) */
4814 void typing__CallSite__init(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
, short int p4
, val
* p5
, val
* p6
, val
* p7
, short int p8
) {
4815 self
->attrs
[COLOR_typing__CallSite___node
].val
= p0
; /* _node on <self:CallSite> */
4816 self
->attrs
[COLOR_typing__CallSite___recv
].val
= p1
; /* _recv on <self:CallSite> */
4817 self
->attrs
[COLOR_typing__CallSite___mmodule
].val
= p2
; /* _mmodule on <self:CallSite> */
4818 self
->attrs
[COLOR_typing__CallSite___anchor
].val
= p3
; /* _anchor on <self:CallSite> */
4819 self
->attrs
[COLOR_typing__CallSite___recv_is_self
].s
= p4
; /* _recv_is_self on <self:CallSite> */
4820 self
->attrs
[COLOR_typing__CallSite___mproperty
].val
= p5
; /* _mproperty on <self:CallSite> */
4821 self
->attrs
[COLOR_typing__CallSite___mpropdef
].val
= p6
; /* _mpropdef on <self:CallSite> */
4822 self
->attrs
[COLOR_typing__CallSite___msignature
].val
= p7
; /* _msignature on <self:CallSite> */
4823 self
->attrs
[COLOR_typing__CallSite___erasure_cast
].s
= p8
; /* _erasure_cast on <self:CallSite> */
4826 /* method typing#CallSite#init for (self: Object, ANode, MType, MModule, nullable MClassType, Bool, MMethod, MMethodDef, MSignature, Bool) */
4827 void VIRTUAL_typing__CallSite__init(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
, short int p4
, val
* p5
, val
* p6
, val
* p7
, short int p8
) {
4828 { /* Inline typing#CallSite#init (self,p0,p1,p2,p3,p4,p5,p6,p7,p8) on <self:Object(CallSite)> */
4829 self
->attrs
[COLOR_typing__CallSite___node
].val
= p0
; /* _node on <self:Object(CallSite)> */
4830 self
->attrs
[COLOR_typing__CallSite___recv
].val
= p1
; /* _recv on <self:Object(CallSite)> */
4831 self
->attrs
[COLOR_typing__CallSite___mmodule
].val
= p2
; /* _mmodule on <self:Object(CallSite)> */
4832 self
->attrs
[COLOR_typing__CallSite___anchor
].val
= p3
; /* _anchor on <self:Object(CallSite)> */
4833 self
->attrs
[COLOR_typing__CallSite___recv_is_self
].s
= p4
; /* _recv_is_self on <self:Object(CallSite)> */
4834 self
->attrs
[COLOR_typing__CallSite___mproperty
].val
= p5
; /* _mproperty on <self:Object(CallSite)> */
4835 self
->attrs
[COLOR_typing__CallSite___mpropdef
].val
= p6
; /* _mpropdef on <self:Object(CallSite)> */
4836 self
->attrs
[COLOR_typing__CallSite___msignature
].val
= p7
; /* _msignature on <self:Object(CallSite)> */
4837 self
->attrs
[COLOR_typing__CallSite___erasure_cast
].s
= p8
; /* _erasure_cast on <self:Object(CallSite)> */
4842 /* method typing#Variable#declared_type for (self: Variable): nullable MType */
4843 val
* typing__Variable__declared_type(val
* self
) {
4844 val
* var
/* : nullable MType */;
4845 val
* var1
/* : nullable MType */;
4846 var1
= self
->attrs
[COLOR_typing__Variable___declared_type
].val
; /* _declared_type on <self:Variable> */
4851 /* method typing#Variable#declared_type for (self: Object): nullable MType */
4852 val
* VIRTUAL_typing__Variable__declared_type(val
* self
) {
4853 val
* var
/* : nullable MType */;
4854 val
* var1
/* : nullable MType */;
4855 val
* var3
/* : nullable MType */;
4856 { /* Inline typing#Variable#declared_type (self) on <self:Object(Variable)> */
4857 var3
= self
->attrs
[COLOR_typing__Variable___declared_type
].val
; /* _declared_type on <self:Object(Variable)> */
4865 /* method typing#Variable#declared_type= for (self: Variable, nullable MType) */
4866 void typing__Variable__declared_type_61d(val
* self
, val
* p0
) {
4867 self
->attrs
[COLOR_typing__Variable___declared_type
].val
= p0
; /* _declared_type on <self:Variable> */
4870 /* method typing#Variable#declared_type= for (self: Object, nullable MType) */
4871 void VIRTUAL_typing__Variable__declared_type_61d(val
* self
, val
* p0
) {
4872 { /* Inline typing#Variable#declared_type= (self,p0) on <self:Object(Variable)> */
4873 self
->attrs
[COLOR_typing__Variable___declared_type
].val
= p0
; /* _declared_type on <self:Object(Variable)> */
4878 /* method typing#FlowContext#vars for (self: FlowContext): HashMap[Variable, nullable MType] */
4879 val
* typing__FlowContext__vars(val
* self
) {
4880 val
* var
/* : HashMap[Variable, nullable MType] */;
4881 val
* var1
/* : HashMap[Variable, nullable MType] */;
4882 var1
= self
->attrs
[COLOR_typing__FlowContext___vars
].val
; /* _vars on <self:FlowContext> */
4883 if (unlikely(var1
== NULL
)) {
4884 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _vars");
4885 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 447);
4892 /* method typing#FlowContext#vars for (self: Object): HashMap[Variable, nullable MType] */
4893 val
* VIRTUAL_typing__FlowContext__vars(val
* self
) {
4894 val
* var
/* : HashMap[Variable, nullable MType] */;
4895 val
* var1
/* : HashMap[Variable, nullable MType] */;
4896 val
* var3
/* : HashMap[Variable, nullable MType] */;
4897 { /* Inline typing#FlowContext#vars (self) on <self:Object(FlowContext)> */
4898 var3
= self
->attrs
[COLOR_typing__FlowContext___vars
].val
; /* _vars on <self:Object(FlowContext)> */
4899 if (unlikely(var3
== NULL
)) {
4900 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _vars");
4901 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 447);
4911 /* method typing#FlowContext#cache for (self: FlowContext): HashMap[Variable, nullable Array[nullable MType]] */
4912 val
* typing__FlowContext__cache(val
* self
) {
4913 val
* var
/* : HashMap[Variable, nullable Array[nullable MType]] */;
4914 val
* var1
/* : HashMap[Variable, nullable Array[nullable MType]] */;
4915 var1
= self
->attrs
[COLOR_typing__FlowContext___cache
].val
; /* _cache on <self:FlowContext> */
4916 if (unlikely(var1
== NULL
)) {
4917 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _cache");
4918 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 449);
4925 /* method typing#FlowContext#cache for (self: Object): HashMap[Variable, nullable Array[nullable MType]] */
4926 val
* VIRTUAL_typing__FlowContext__cache(val
* self
) {
4927 val
* var
/* : HashMap[Variable, nullable Array[nullable MType]] */;
4928 val
* var1
/* : HashMap[Variable, nullable Array[nullable MType]] */;
4929 val
* var3
/* : HashMap[Variable, nullable Array[nullable MType]] */;
4930 { /* Inline typing#FlowContext#cache (self) on <self:Object(FlowContext)> */
4931 var3
= self
->attrs
[COLOR_typing__FlowContext___cache
].val
; /* _cache on <self:Object(FlowContext)> */
4932 if (unlikely(var3
== NULL
)) {
4933 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _cache");
4934 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 449);
4944 /* method typing#FlowContext#set_var for (self: FlowContext, Variable, nullable MType) */
4945 void typing__FlowContext__set_var(val
* self
, val
* p0
, val
* p1
) {
4946 val
* var_variable
/* var variable: Variable */;
4947 val
* var_mtype
/* var mtype: nullable MType */;
4948 val
* var
/* : HashMap[Variable, nullable MType] */;
4949 val
* var2
/* : HashMap[Variable, nullable MType] */;
4950 val
* var3
/* : HashMap[Variable, nullable Array[nullable MType]] */;
4951 val
* var5
/* : HashMap[Variable, nullable Array[nullable MType]] */;
4952 val
* var6
/* : RemovableCollection[Object] */;
4953 val
* var8
/* : RemovableCollection[Object] */;
4957 { /* Inline typing#FlowContext#vars (self) on <self:FlowContext> */
4958 var2
= self
->attrs
[COLOR_typing__FlowContext___vars
].val
; /* _vars on <self:FlowContext> */
4959 if (unlikely(var2
== NULL
)) {
4960 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _vars");
4961 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 447);
4969 hash_collection__HashMap___91d_93d_61d(var
, var_variable
, var_mtype
); /* Direct call hash_collection#HashMap#[]= on <var:HashMap[Variable, nullable MType]>*/
4972 { /* Inline typing#FlowContext#cache (self) on <self:FlowContext> */
4973 var5
= self
->attrs
[COLOR_typing__FlowContext___cache
].val
; /* _cache on <self:FlowContext> */
4974 if (unlikely(var5
== NULL
)) {
4975 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _cache");
4976 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 449);
4984 { /* Inline hash_collection#HashMap#keys (var3) on <var3:HashMap[Variable, nullable Array[nullable MType]]> */
4985 var8
= var3
->attrs
[COLOR_hash_collection__HashMap___keys
].val
; /* _keys on <var3:HashMap[Variable, nullable Array[nullable MType]]> */
4986 if (unlikely(var8
== NULL
)) {
4987 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _keys");
4988 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 245);
4996 ((void (*)(val
*, val
*))(var6
->class->vft
[COLOR_abstract_collection__RemovableCollection__remove
]))(var6
, var_variable
) /* remove on <var6:RemovableCollection[Object](RemovableCollection[Variable])>*/;
5000 /* method typing#FlowContext#set_var for (self: Object, Variable, nullable MType) */
5001 void VIRTUAL_typing__FlowContext__set_var(val
* self
, val
* p0
, val
* p1
) {
5002 typing__FlowContext__set_var(self
, p0
, p1
); /* Direct call typing#FlowContext#set_var on <self:Object(FlowContext)>*/
5005 /* method typing#FlowContext#collect_types for (self: FlowContext, Variable): nullable Array[nullable MType] */
5006 val
* typing__FlowContext__collect_types(val
* self
, val
* p0
) {
5007 val
* var
/* : nullable Array[nullable MType] */;
5008 val
* var_variable
/* var variable: Variable */;
5009 val
* var1
/* : HashMap[Variable, nullable Array[nullable MType]] */;
5010 val
* var3
/* : HashMap[Variable, nullable Array[nullable MType]] */;
5011 short int var4
/* : Bool */;
5012 val
* var5
/* : HashMap[Variable, nullable Array[nullable MType]] */;
5013 val
* var7
/* : HashMap[Variable, nullable Array[nullable MType]] */;
5014 val
* var8
/* : nullable Object */;
5015 val
* var9
/* : null */;
5016 val
* var_res
/* var res: nullable Array[nullable MType] */;
5017 val
* var10
/* : HashMap[Variable, nullable MType] */;
5018 val
* var12
/* : HashMap[Variable, nullable MType] */;
5019 short int var13
/* : Bool */;
5020 val
* var14
/* : HashMap[Variable, nullable MType] */;
5021 val
* var16
/* : HashMap[Variable, nullable MType] */;
5022 val
* var17
/* : nullable Object */;
5023 val
* var_mtype
/* var mtype: nullable MType */;
5024 val
* var18
/* : Array[nullable MType] */;
5025 long var19
/* : Int */;
5026 val
* var_
/* var : Array[nullable MType] */;
5027 val
* var20
/* : Array[FlowContext] */;
5028 val
* var22
/* : Array[FlowContext] */;
5029 short int var23
/* : Bool */;
5030 val
* var24
/* : Array[nullable MType] */;
5031 long var25
/* : Int */;
5032 val
* var_26
/* var : Array[nullable MType] */;
5033 val
* var27
/* : nullable MType */;
5034 val
* var29
/* : nullable MType */;
5035 val
* var30
/* : Array[FlowContext] */;
5036 val
* var32
/* : Array[FlowContext] */;
5037 val
* var33
/* : ArrayIterator[nullable Object] */;
5038 short int var34
/* : Bool */;
5039 val
* var35
/* : nullable Object */;
5040 val
* var_flow
/* var flow: FlowContext */;
5041 short int var36
/* : Bool */;
5042 val
* var37
/* : nullable Array[nullable MType] */;
5043 val
* var_r2
/* var r2: nullable Array[nullable MType] */;
5044 val
* var38
/* : null */;
5045 short int var39
/* : Bool */;
5046 short int var40
/* : Bool */;
5047 val
* var41
/* : null */;
5048 short int var42
/* : Bool */;
5049 short int var43
/* : Bool */;
5050 val
* var44
/* : Array[nullable Object] */;
5051 val
* var45
/* : ArrayIterator[nullable Object] */;
5052 short int var46
/* : Bool */;
5053 val
* var47
/* : nullable Object */;
5054 val
* var_t
/* var t: nullable MType */;
5055 short int var48
/* : Bool */;
5056 short int var49
/* : Bool */;
5057 val
* var51
/* : HashMap[Variable, nullable Array[nullable MType]] */;
5058 val
* var53
/* : HashMap[Variable, nullable Array[nullable MType]] */;
5061 { /* Inline typing#FlowContext#cache (self) on <self:FlowContext> */
5062 var3
= self
->attrs
[COLOR_typing__FlowContext___cache
].val
; /* _cache on <self:FlowContext> */
5063 if (unlikely(var3
== NULL
)) {
5064 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _cache");
5065 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 449);
5073 var4
= abstract_collection__MapRead__has_key(var1
, var_variable
);
5077 { /* Inline typing#FlowContext#cache (self) on <self:FlowContext> */
5078 var7
= self
->attrs
[COLOR_typing__FlowContext___cache
].val
; /* _cache on <self:FlowContext> */
5079 if (unlikely(var7
== NULL
)) {
5080 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _cache");
5081 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 449);
5089 var8
= hash_collection__HashMap___91d_93d(var5
, var_variable
);
5098 { /* Inline typing#FlowContext#vars (self) on <self:FlowContext> */
5099 var12
= self
->attrs
[COLOR_typing__FlowContext___vars
].val
; /* _vars on <self:FlowContext> */
5100 if (unlikely(var12
== NULL
)) {
5101 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _vars");
5102 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 447);
5106 RET_LABEL11
:(void)0;
5110 var13
= abstract_collection__MapRead__has_key(var10
, var_variable
);
5114 { /* Inline typing#FlowContext#vars (self) on <self:FlowContext> */
5115 var16
= self
->attrs
[COLOR_typing__FlowContext___vars
].val
; /* _vars on <self:FlowContext> */
5116 if (unlikely(var16
== NULL
)) {
5117 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _vars");
5118 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 447);
5122 RET_LABEL15
:(void)0;
5126 var17
= hash_collection__HashMap___91d_93d(var14
, var_variable
);
5129 var18
= NEW_array__Array(&type_array__Arraynullable_model__MType
);
5132 array__Array__with_capacity(var18
, var19
); /* Direct call array#Array#with_capacity on <var18:Array[nullable MType]>*/
5136 array__AbstractArray__push(var_
, var_mtype
); /* Direct call array#AbstractArray#push on <var_:Array[nullable MType]>*/
5141 { /* Inline flow#FlowContext#previous (self) on <self:FlowContext> */
5142 var22
= self
->attrs
[COLOR_flow__FlowContext___previous
].val
; /* _previous on <self:FlowContext> */
5143 if (unlikely(var22
== NULL
)) {
5144 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _previous");
5145 PRINT_ERROR(" (%s:%d)\n", "src/flow.nit", 192);
5149 RET_LABEL21
:(void)0;
5153 var23
= array__AbstractArrayRead__is_empty(var20
);
5156 var24
= NEW_array__Array(&type_array__Arraynullable_model__MType
);
5159 array__Array__with_capacity(var24
, var25
); /* Direct call array#Array#with_capacity on <var24:Array[nullable MType]>*/
5163 { /* Inline typing#Variable#declared_type (var_variable) on <var_variable:Variable> */
5164 var29
= var_variable
->attrs
[COLOR_typing__Variable___declared_type
].val
; /* _declared_type on <var_variable:Variable> */
5166 RET_LABEL28
:(void)0;
5170 array__AbstractArray__push(var_26
, var27
); /* Direct call array#AbstractArray#push on <var_26:Array[nullable MType]>*/
5175 { /* Inline flow#FlowContext#previous (self) on <self:FlowContext> */
5176 var32
= self
->attrs
[COLOR_flow__FlowContext___previous
].val
; /* _previous on <self:FlowContext> */
5177 if (unlikely(var32
== NULL
)) {
5178 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _previous");
5179 PRINT_ERROR(" (%s:%d)\n", "src/flow.nit", 192);
5183 RET_LABEL31
:(void)0;
5187 var33
= array__AbstractArrayRead__iterator(var30
);
5191 var34
= array__ArrayIterator__is_ok(var33
);
5195 var35
= array__ArrayIterator__item(var33
);
5199 var36
= flow__FlowContext__is_unreachable(var_flow
);
5202 goto CONTINUE_label
;
5206 var37
= typing__FlowContext__collect_types(var_flow
, var_variable
);
5210 if (var_r2
== NULL
) {
5211 var39
= 1; /* is null */
5213 var39
= 0; /* arg is null but recv is not */
5216 var40
= abstract_collection__SequenceRead___61d_61d(var_r2
, var38
);
5220 goto CONTINUE_label
;
5224 if (var_res
== NULL
) {
5225 var42
= 1; /* is null */
5227 var42
= 0; /* arg is null but recv is not */
5230 var43
= abstract_collection__SequenceRead___61d_61d(var_res
, var41
);
5235 var44
= array__Collection__to_a(var_r2
);
5240 var45
= array__AbstractArrayRead__iterator(var_r2
);
5244 var46
= array__ArrayIterator__is_ok(var45
);
5248 var47
= array__ArrayIterator__item(var45
);
5252 var48
= array__AbstractArrayRead__has(var_res
, var_t
);
5257 array__Array__add(var_res
, var_t
); /* Direct call array#Array#add on <var_res:nullable Array[nullable MType](Array[nullable MType])>*/
5261 CONTINUE_label50
: (void)0;
5263 array__ArrayIterator__next(var45
); /* Direct call array#ArrayIterator#next on <var45:ArrayIterator[nullable Object]>*/
5266 BREAK_label50
: (void)0;
5268 CONTINUE_label
: (void)0;
5270 array__ArrayIterator__next(var33
); /* Direct call array#ArrayIterator#next on <var33:ArrayIterator[nullable Object]>*/
5273 BREAK_label
: (void)0;
5277 { /* Inline typing#FlowContext#cache (self) on <self:FlowContext> */
5278 var53
= self
->attrs
[COLOR_typing__FlowContext___cache
].val
; /* _cache on <self:FlowContext> */
5279 if (unlikely(var53
== NULL
)) {
5280 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _cache");
5281 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 449);
5285 RET_LABEL52
:(void)0;
5289 hash_collection__HashMap___91d_93d_61d(var51
, var_variable
, var_res
); /* Direct call hash_collection#HashMap#[]= on <var51:HashMap[Variable, nullable Array[nullable MType]]>*/
5296 /* method typing#FlowContext#collect_types for (self: Object, Variable): nullable Array[nullable MType] */
5297 val
* VIRTUAL_typing__FlowContext__collect_types(val
* self
, val
* p0
) {
5298 val
* var
/* : nullable Array[nullable MType] */;
5299 val
* var1
/* : nullable Array[nullable MType] */;
5300 var1
= typing__FlowContext__collect_types(self
, p0
);
5305 /* method typing#APropdef#do_typing for (self: APropdef, ModelBuilder) */
5306 void typing__APropdef__do_typing(val
* self
, val
* p0
) {
5307 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
5308 var_modelbuilder
= p0
;
5311 /* method typing#APropdef#do_typing for (self: Object, ModelBuilder) */
5312 void VIRTUAL_typing__APropdef__do_typing(val
* self
, val
* p0
) {
5313 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
5314 { /* Inline typing#APropdef#do_typing (self,p0) on <self:Object(APropdef)> */
5315 var_modelbuilder
= p0
;
5320 /* method typing#APropdef#selfvariable= for (self: APropdef, nullable Variable) */
5321 void typing__APropdef__selfvariable_61d(val
* self
, val
* p0
) {
5322 self
->attrs
[COLOR_typing__APropdef___selfvariable
].val
= p0
; /* _selfvariable on <self:APropdef> */
5325 /* method typing#APropdef#selfvariable= for (self: Object, nullable Variable) */
5326 void VIRTUAL_typing__APropdef__selfvariable_61d(val
* self
, val
* p0
) {
5327 { /* Inline typing#APropdef#selfvariable= (self,p0) on <self:Object(APropdef)> */
5328 self
->attrs
[COLOR_typing__APropdef___selfvariable
].val
= p0
; /* _selfvariable on <self:Object(APropdef)> */
5333 /* method typing#AMethPropdef#do_typing for (self: AMethPropdef, ModelBuilder) */
5334 void typing__AMethPropdef__do_typing(val
* self
, val
* p0
) {
5335 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
5336 val
* var
/* : nullable AExpr */;
5337 val
* var_nblock
/* var nblock: nullable AExpr */;
5338 val
* var1
/* : null */;
5339 short int var2
/* : Bool */;
5340 short int var3
/* : Bool */;
5341 val
* var_other
/* var other: nullable Object */;
5342 short int var5
/* : Bool */;
5343 short int var7
/* : Bool */;
5344 val
* var8
/* : nullable MPropDef */;
5345 val
* var10
/* : nullable MPropDef */;
5346 val
* var_mpropdef
/* var mpropdef: MMethodDef */;
5347 val
* var11
/* : TypeVisitor */;
5348 val
* var12
/* : MClassDef */;
5349 val
* var14
/* : MClassDef */;
5350 val
* var15
/* : MModule */;
5351 val
* var17
/* : MModule */;
5352 val
* var_v
/* var v: TypeVisitor */;
5353 val
* var18
/* : Variable */;
5354 val
* var20
/* : Variable */;
5355 val
* var22
/* : nullable MPropDef */;
5356 val
* var24
/* : nullable MPropDef */;
5357 val
* var_mmethoddef
/* var mmethoddef: MMethodDef */;
5358 val
* var25
/* : Range[Int] */;
5359 long var26
/* : Int */;
5360 val
* var27
/* : nullable MSignature */;
5361 val
* var29
/* : nullable MSignature */;
5362 long var30
/* : Int */;
5363 val
* var31
/* : Discrete */;
5364 val
* var32
/* : Discrete */;
5365 val
* var33
/* : Iterator[Discrete] */;
5366 short int var34
/* : Bool */;
5367 val
* var35
/* : nullable Object */;
5368 long var_i
/* var i: Int */;
5369 long var36
/* : Int */;
5370 val
* var37
/* : nullable MSignature */;
5371 val
* var39
/* : nullable MSignature */;
5372 val
* var40
/* : Array[MParameter] */;
5373 val
* var42
/* : Array[MParameter] */;
5374 val
* var43
/* : nullable Object */;
5375 val
* var44
/* : MType */;
5376 val
* var46
/* : MType */;
5377 val
* var_mtype
/* var mtype: MType */;
5378 val
* var47
/* : nullable MSignature */;
5379 val
* var49
/* : nullable MSignature */;
5380 long var50
/* : Int */;
5381 long var52
/* : Int */;
5382 short int var53
/* : Bool */;
5383 short int var54
/* : Bool */;
5384 short int var56
/* : Bool */;
5385 val
* var57
/* : nullable ASignature */;
5386 val
* var58
/* : ANodes[AParam] */;
5387 val
* var60
/* : ANodes[AParam] */;
5388 val
* var61
/* : ANode */;
5389 static val
* varonce
;
5390 val
* var62
/* : String */;
5391 char* var63
/* : NativeString */;
5392 long var64
/* : Int */;
5393 val
* var65
/* : FlatString */;
5394 val
* var66
/* : nullable MClass */;
5395 val
* var_arrayclass
/* var arrayclass: nullable MClass */;
5396 val
* var67
/* : null */;
5397 short int var68
/* : Bool */;
5398 short int var69
/* : Bool */;
5399 short int var71
/* : Bool */;
5400 short int var73
/* : Bool */;
5401 val
* var74
/* : Array[MType] */;
5402 long var75
/* : Int */;
5403 val
* var_
/* var : Array[MType] */;
5404 val
* var76
/* : MClassType */;
5405 val
* var77
/* : nullable ASignature */;
5406 val
* var78
/* : ANodes[AParam] */;
5407 val
* var80
/* : ANodes[AParam] */;
5408 val
* var81
/* : ANode */;
5409 val
* var82
/* : nullable Variable */;
5410 val
* var84
/* : nullable Variable */;
5411 val
* var_variable
/* var variable: nullable Variable */;
5412 val
* var85
/* : null */;
5413 short int var86
/* : Bool */;
5414 short int var87
/* : Bool */;
5415 val
* var_other89
/* var other: nullable Object */;
5416 short int var90
/* : Bool */;
5417 short int var91
/* : Bool */;
5418 short int var92
/* : Bool */;
5419 short int var94
/* : Bool */;
5420 val
* var95
/* : nullable FlowContext */;
5421 val
* var97
/* : nullable FlowContext */;
5422 short int var98
/* : Bool */;
5423 short int var99
/* : Bool */;
5424 short int var_100
/* var : Bool */;
5425 val
* var101
/* : nullable MSignature */;
5426 val
* var103
/* : nullable MSignature */;
5427 val
* var104
/* : nullable MType */;
5428 val
* var106
/* : nullable MType */;
5429 val
* var107
/* : null */;
5430 short int var108
/* : Bool */;
5431 short int var109
/* : Bool */;
5432 short int var111
/* : Bool */;
5433 short int var112
/* : Bool */;
5434 short int var113
/* : Bool */;
5435 static val
* varonce114
;
5436 val
* var115
/* : String */;
5437 char* var116
/* : NativeString */;
5438 long var117
/* : Int */;
5439 val
* var118
/* : FlatString */;
5440 var_modelbuilder
= p0
;
5442 var
= parser_nodes__AMethPropdef__n_block(self
);
5446 if (var_nblock
== NULL
) {
5447 var2
= 1; /* is null */
5449 var2
= 0; /* arg is null but recv is not */
5452 { /* Inline kernel#Object#== (var_nblock,var1) on <var_nblock:nullable AExpr> */
5455 { /* Inline kernel#Object#is_same_instance (var_nblock,var_other) on <var_nblock:nullable AExpr(AExpr)> */
5456 var7
= var_nblock
== var_other
;
5473 { /* Inline modelize_property#APropdef#mpropdef (self) on <self:AMethPropdef> */
5474 var10
= self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
; /* _mpropdef on <self:AMethPropdef> */
5479 if (unlikely(var8
== NULL
)) {
5480 PRINT_ERROR("Runtime error: %s", "Cast failed");
5481 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 507);
5484 var_mpropdef
= var8
;
5485 var11
= NEW_typing__TypeVisitor(&type_typing__TypeVisitor
);
5487 { /* Inline model#MPropDef#mclassdef (var_mpropdef) on <var_mpropdef:MMethodDef> */
5488 var14
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_mpropdef:MMethodDef> */
5489 if (unlikely(var14
== NULL
)) {
5490 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
5491 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1879);
5495 RET_LABEL13
:(void)0;
5499 { /* Inline model#MClassDef#mmodule (var12) on <var12:MClassDef> */
5500 var17
= var12
->attrs
[COLOR_model__MClassDef___mmodule
].val
; /* _mmodule on <var12:MClassDef> */
5501 if (unlikely(var17
== NULL
)) {
5502 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
5503 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 471);
5507 RET_LABEL16
:(void)0;
5511 typing__TypeVisitor__init(var11
, var_modelbuilder
, var15
, var_mpropdef
); /* Direct call typing#TypeVisitor#init on <var11:TypeVisitor>*/
5515 { /* Inline typing#TypeVisitor#selfvariable (var_v) on <var_v:TypeVisitor> */
5516 var20
= var_v
->attrs
[COLOR_typing__TypeVisitor___selfvariable
].val
; /* _selfvariable on <var_v:TypeVisitor> */
5517 if (unlikely(var20
== NULL
)) {
5518 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _selfvariable");
5519 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 52);
5523 RET_LABEL19
:(void)0;
5527 { /* Inline typing#APropdef#selfvariable= (self,var18) on <self:AMethPropdef> */
5528 self
->attrs
[COLOR_typing__APropdef___selfvariable
].val
= var18
; /* _selfvariable on <self:AMethPropdef> */
5529 RET_LABEL21
:(void)0;
5533 { /* Inline modelize_property#APropdef#mpropdef (self) on <self:AMethPropdef> */
5534 var24
= self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
; /* _mpropdef on <self:AMethPropdef> */
5536 RET_LABEL23
:(void)0;
5539 if (unlikely(var22
== NULL
)) {
5540 PRINT_ERROR("Runtime error: %s", "Cast failed");
5541 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 511);
5544 var_mmethoddef
= var22
;
5545 var25
= NEW_range__Range(&type_range__Rangekernel__Int
);
5548 { /* Inline model#MMethodDef#msignature (var_mmethoddef) on <var_mmethoddef:MMethodDef> */
5549 var29
= var_mmethoddef
->attrs
[COLOR_model__MMethodDef___msignature
].val
; /* _msignature on <var_mmethoddef:MMethodDef> */
5551 RET_LABEL28
:(void)0;
5554 if (var27
== NULL
) {
5555 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5556 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 512);
5559 var30
= model__MSignature__arity(var27
);
5562 var31
= BOX_kernel__Int(var26
); /* autobox from Int to Discrete */
5563 var32
= BOX_kernel__Int(var30
); /* autobox from Int to Discrete */
5564 range__Range__without_last(var25
, var31
, var32
); /* Direct call range#Range#without_last on <var25:Range[Int]>*/
5567 var33
= range__Range__iterator(var25
);
5571 var34
= ((short int (*)(val
*))(var33
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var33
) /* is_ok on <var33:Iterator[Discrete]>*/;
5575 var35
= ((val
* (*)(val
*))(var33
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var33
) /* item on <var33:Iterator[Discrete]>*/;
5577 var36
= ((struct instance_kernel__Int
*)var35
)->value
; /* autounbox from nullable Object to Int */;
5580 { /* Inline model#MMethodDef#msignature (var_mmethoddef) on <var_mmethoddef:MMethodDef> */
5581 var39
= var_mmethoddef
->attrs
[COLOR_model__MMethodDef___msignature
].val
; /* _msignature on <var_mmethoddef:MMethodDef> */
5583 RET_LABEL38
:(void)0;
5586 if (var37
== NULL
) {
5587 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5588 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 513);
5591 { /* Inline model#MSignature#mparameters (var37) on <var37:nullable MSignature> */
5592 if (unlikely(var37
== NULL
)) {
5593 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5594 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1452);
5597 var42
= var37
->attrs
[COLOR_model__MSignature___mparameters
].val
; /* _mparameters on <var37:nullable MSignature> */
5598 if (unlikely(var42
== NULL
)) {
5599 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mparameters");
5600 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1452);
5604 RET_LABEL41
:(void)0;
5608 var43
= array__Array___91d_93d(var40
, var_i
);
5611 { /* Inline model#MParameter#mtype (var43) on <var43:nullable Object(MParameter)> */
5612 var46
= var43
->attrs
[COLOR_model__MParameter___mtype
].val
; /* _mtype on <var43:nullable Object(MParameter)> */
5613 if (unlikely(var46
== NULL
)) {
5614 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mtype");
5615 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1552);
5619 RET_LABEL45
:(void)0;
5624 { /* Inline model#MMethodDef#msignature (var_mmethoddef) on <var_mmethoddef:MMethodDef> */
5625 var49
= var_mmethoddef
->attrs
[COLOR_model__MMethodDef___msignature
].val
; /* _msignature on <var_mmethoddef:MMethodDef> */
5627 RET_LABEL48
:(void)0;
5630 if (var47
== NULL
) {
5631 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5632 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 514);
5635 { /* Inline model#MSignature#vararg_rank (var47) on <var47:nullable MSignature> */
5636 if (unlikely(var47
== NULL
)) {
5637 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5638 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1497);
5641 var52
= var47
->attrs
[COLOR_model__MSignature___vararg_rank
].l
; /* _vararg_rank on <var47:nullable MSignature> */
5643 RET_LABEL51
:(void)0;
5647 { /* Inline kernel#Int#== (var50,var_i) on <var50:Int> */
5648 var56
= var50
== var_i
;
5651 RET_LABEL55
:(void)0;
5657 var57
= parser_nodes__AMethPropdef__n_signature(self
);
5659 if (var57
== NULL
) {
5660 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5661 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 515);
5664 { /* Inline parser_nodes#ASignature#n_params (var57) on <var57:nullable ASignature> */
5665 if (unlikely(var57
== NULL
)) {
5666 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5667 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 1360);
5670 var60
= var57
->attrs
[COLOR_parser_nodes__ASignature___n_params
].val
; /* _n_params on <var57:nullable ASignature> */
5671 if (unlikely(var60
== NULL
)) {
5672 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_params");
5673 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 1360);
5677 RET_LABEL59
:(void)0;
5681 var61
= parser_nodes__ANodes___91d_93d(var58
, var_i
);
5688 var65
= string__NativeString__to_s_with_length(var63
, var64
);
5693 var66
= typing__TypeVisitor__get_mclass(var_v
, var61
, var62
);
5695 var_arrayclass
= var66
;
5697 if (var_arrayclass
== NULL
) {
5698 var68
= 1; /* is null */
5700 var68
= 0; /* arg is null but recv is not */
5703 { /* Inline kernel#Object#== (var_arrayclass,var67) on <var_arrayclass:nullable MClass> */
5706 { /* Inline kernel#Object#is_same_instance (var_arrayclass,var_other) on <var_arrayclass:nullable MClass(MClass)> */
5707 var73
= var_arrayclass
== var_other
;
5710 RET_LABEL72
:(void)0;
5715 RET_LABEL70
:(void)0;
5723 var74
= NEW_array__Array(&type_array__Arraymodel__MType
);
5726 array__Array__with_capacity(var74
, var75
); /* Direct call array#Array#with_capacity on <var74:Array[MType]>*/
5730 array__AbstractArray__push(var_
, var_mtype
); /* Direct call array#AbstractArray#push on <var_:Array[MType]>*/
5733 var76
= model__MClass__get_mtype(var_arrayclass
, var_
);
5739 var77
= parser_nodes__AMethPropdef__n_signature(self
);
5741 if (var77
== NULL
) {
5742 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5743 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 519);
5746 { /* Inline parser_nodes#ASignature#n_params (var77) on <var77:nullable ASignature> */
5747 if (unlikely(var77
== NULL
)) {
5748 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5749 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 1360);
5752 var80
= var77
->attrs
[COLOR_parser_nodes__ASignature___n_params
].val
; /* _n_params on <var77:nullable ASignature> */
5753 if (unlikely(var80
== NULL
)) {
5754 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_params");
5755 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 1360);
5759 RET_LABEL79
:(void)0;
5763 var81
= parser_nodes__ANodes___91d_93d(var78
, var_i
);
5766 { /* Inline scope#AParam#variable (var81) on <var81:ANode(AParam)> */
5767 var84
= var81
->attrs
[COLOR_scope__AParam___variable
].val
; /* _variable on <var81:ANode(AParam)> */
5769 RET_LABEL83
:(void)0;
5772 var_variable
= var82
;
5774 if (var_variable
== NULL
) {
5775 var86
= 0; /* is null */
5777 var86
= 1; /* arg is null and recv is not */
5780 { /* Inline kernel#Object#!= (var_variable,var85) on <var_variable:nullable Variable> */
5781 var_other89
= var85
;
5783 var91
= ((short int (*)(val
*, val
*))(var_variable
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_variable
, var_other89
) /* == on <var_variable:nullable Variable(Variable)>*/;
5789 RET_LABEL88
:(void)0;
5793 if (unlikely(!var86
)) {
5794 PRINT_ERROR("Runtime error: %s", "Assert failed");
5795 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 520);
5799 { /* Inline typing#Variable#declared_type= (var_variable,var_mtype) on <var_variable:nullable Variable(Variable)> */
5800 var_variable
->attrs
[COLOR_typing__Variable___declared_type
].val
= var_mtype
; /* _declared_type on <var_variable:nullable Variable(Variable)> */
5801 RET_LABEL93
:(void)0;
5804 CONTINUE_label
: (void)0;
5806 ((void (*)(val
*))(var33
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var33
) /* next on <var33:Iterator[Discrete]>*/;
5809 BREAK_label
: (void)0;
5811 typing__TypeVisitor__visit_stmt(var_v
, var_nblock
); /* Direct call typing#TypeVisitor#visit_stmt on <var_v:TypeVisitor>*/
5814 { /* Inline flow#AExpr#after_flow_context (var_nblock) on <var_nblock:nullable AExpr(AExpr)> */
5815 var97
= var_nblock
->attrs
[COLOR_flow__AExpr___after_flow_context
].val
; /* _after_flow_context on <var_nblock:nullable AExpr(AExpr)> */
5817 RET_LABEL96
:(void)0;
5820 if (var95
== NULL
) {
5821 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5822 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 525);
5825 var98
= flow__FlowContext__is_unreachable(var95
);
5831 { /* Inline model#MMethodDef#msignature (var_mmethoddef) on <var_mmethoddef:MMethodDef> */
5832 var103
= var_mmethoddef
->attrs
[COLOR_model__MMethodDef___msignature
].val
; /* _msignature on <var_mmethoddef:MMethodDef> */
5834 RET_LABEL102
:(void)0;
5837 if (var101
== NULL
) {
5838 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5839 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 525);
5842 { /* Inline model#MSignature#return_mtype (var101) on <var101:nullable MSignature> */
5843 if (unlikely(var101
== NULL
)) {
5844 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5845 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1455);
5848 var106
= var101
->attrs
[COLOR_model__MSignature___return_mtype
].val
; /* _return_mtype on <var101:nullable MSignature> */
5850 RET_LABEL105
:(void)0;
5854 if (var104
== NULL
) {
5855 var108
= 0; /* is null */
5857 var108
= 1; /* arg is null and recv is not */
5860 { /* Inline kernel#Object#!= (var104,var107) on <var104:nullable MType> */
5861 var_other89
= var107
;
5863 var112
= ((short int (*)(val
*, val
*))(var104
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var104
, var_other89
) /* == on <var104:nullable MType(MType)>*/;
5869 RET_LABEL110
:(void)0;
5879 var115
= varonce114
;
5881 var116
= "Control error: Reached end of function (a \'return\' with a value was expected).";
5883 var118
= string__NativeString__to_s_with_length(var116
, var117
);
5885 varonce114
= var115
;
5888 typing__TypeVisitor__error(var_v
, self
, var115
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
5894 /* method typing#AMethPropdef#do_typing for (self: Object, ModelBuilder) */
5895 void VIRTUAL_typing__AMethPropdef__do_typing(val
* self
, val
* p0
) {
5896 typing__AMethPropdef__do_typing(self
, p0
); /* Direct call typing#AMethPropdef#do_typing on <self:Object(AMethPropdef)>*/
5899 /* method typing#AAttrPropdef#do_typing for (self: AAttrPropdef, ModelBuilder) */
5900 void typing__AAttrPropdef__do_typing(val
* self
, val
* p0
) {
5901 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
5902 val
* var
/* : nullable MPropDef */;
5903 val
* var2
/* : nullable MPropDef */;
5904 val
* var_mpropdef
/* var mpropdef: MAttributeDef */;
5905 val
* var3
/* : TypeVisitor */;
5906 val
* var4
/* : MClassDef */;
5907 val
* var6
/* : MClassDef */;
5908 val
* var7
/* : MModule */;
5909 val
* var9
/* : MModule */;
5910 val
* var_v
/* var v: TypeVisitor */;
5911 val
* var10
/* : Variable */;
5912 val
* var12
/* : Variable */;
5913 val
* var14
/* : nullable AExpr */;
5914 val
* var_nexpr
/* var nexpr: nullable AExpr */;
5915 val
* var15
/* : null */;
5916 short int var16
/* : Bool */;
5917 short int var17
/* : Bool */;
5918 val
* var_other
/* var other: nullable Object */;
5919 short int var19
/* : Bool */;
5920 short int var20
/* : Bool */;
5921 short int var21
/* : Bool */;
5922 val
* var22
/* : nullable MPropDef */;
5923 val
* var24
/* : nullable MPropDef */;
5924 val
* var25
/* : nullable MType */;
5925 val
* var27
/* : nullable MType */;
5926 val
* var_mtype
/* var mtype: nullable MType */;
5927 val
* var28
/* : nullable MType */;
5928 var_modelbuilder
= p0
;
5930 { /* Inline modelize_property#APropdef#mpropdef (self) on <self:AAttrPropdef> */
5931 var2
= self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
; /* _mpropdef on <self:AAttrPropdef> */
5936 if (unlikely(var
== NULL
)) {
5937 PRINT_ERROR("Runtime error: %s", "Cast failed");
5938 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 535);
5942 var3
= NEW_typing__TypeVisitor(&type_typing__TypeVisitor
);
5944 { /* Inline model#MPropDef#mclassdef (var_mpropdef) on <var_mpropdef:MAttributeDef> */
5945 var6
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_mpropdef:MAttributeDef> */
5946 if (unlikely(var6
== NULL
)) {
5947 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
5948 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1879);
5956 { /* Inline model#MClassDef#mmodule (var4) on <var4:MClassDef> */
5957 var9
= var4
->attrs
[COLOR_model__MClassDef___mmodule
].val
; /* _mmodule on <var4:MClassDef> */
5958 if (unlikely(var9
== NULL
)) {
5959 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
5960 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 471);
5968 typing__TypeVisitor__init(var3
, var_modelbuilder
, var7
, var_mpropdef
); /* Direct call typing#TypeVisitor#init on <var3:TypeVisitor>*/
5972 { /* Inline typing#TypeVisitor#selfvariable (var_v) on <var_v:TypeVisitor> */
5973 var12
= var_v
->attrs
[COLOR_typing__TypeVisitor___selfvariable
].val
; /* _selfvariable on <var_v:TypeVisitor> */
5974 if (unlikely(var12
== NULL
)) {
5975 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _selfvariable");
5976 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 52);
5980 RET_LABEL11
:(void)0;
5984 { /* Inline typing#APropdef#selfvariable= (self,var10) on <self:AAttrPropdef> */
5985 self
->attrs
[COLOR_typing__APropdef___selfvariable
].val
= var10
; /* _selfvariable on <self:AAttrPropdef> */
5986 RET_LABEL13
:(void)0;
5990 var14
= parser_nodes__AAttrPropdef__n_expr(self
);
5994 if (var_nexpr
== NULL
) {
5995 var16
= 0; /* is null */
5997 var16
= 1; /* arg is null and recv is not */
6000 { /* Inline kernel#Object#!= (var_nexpr,var15) on <var_nexpr:nullable AExpr> */
6003 var20
= ((short int (*)(val
*, val
*))(var_nexpr
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nexpr
, var_other
) /* == on <var_nexpr:nullable AExpr(AExpr)>*/;
6009 RET_LABEL18
:(void)0;
6015 { /* Inline modelize_property#APropdef#mpropdef (self) on <self:AAttrPropdef> */
6016 var24
= self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
; /* _mpropdef on <self:AAttrPropdef> */
6018 RET_LABEL23
:(void)0;
6021 if (var22
== NULL
) {
6022 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6023 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 541);
6026 { /* Inline model#MAttributeDef#static_mtype (var22) on <var22:nullable MPropDef(nullable MAttributeDef)> */
6027 if (unlikely(var22
== NULL
)) {
6028 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6029 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1963);
6032 var27
= var22
->attrs
[COLOR_model__MAttributeDef___static_mtype
].val
; /* _static_mtype on <var22:nullable MPropDef(nullable MAttributeDef)> */
6034 RET_LABEL26
:(void)0;
6039 var28
= typing__TypeVisitor__visit_expr_subtype(var_v
, var_nexpr
, var_mtype
);
6046 /* method typing#AAttrPropdef#do_typing for (self: Object, ModelBuilder) */
6047 void VIRTUAL_typing__AAttrPropdef__do_typing(val
* self
, val
* p0
) {
6048 typing__AAttrPropdef__do_typing(self
, p0
); /* Direct call typing#AAttrPropdef#do_typing on <self:Object(AAttrPropdef)>*/
6051 /* method typing#AExpr#mtype for (self: AExpr): nullable MType */
6052 val
* typing__AExpr__mtype(val
* self
) {
6053 val
* var
/* : nullable MType */;
6054 val
* var1
/* : nullable MType */;
6055 var1
= self
->attrs
[COLOR_typing__AExpr___mtype
].val
; /* _mtype on <self:AExpr> */
6060 /* method typing#AExpr#mtype for (self: Object): nullable MType */
6061 val
* VIRTUAL_typing__AExpr__mtype(val
* self
) {
6062 val
* var
/* : nullable MType */;
6063 val
* var1
/* : nullable MType */;
6064 val
* var3
/* : nullable MType */;
6065 { /* Inline typing#AExpr#mtype (self) on <self:Object(AExpr)> */
6066 var3
= self
->attrs
[COLOR_typing__AExpr___mtype
].val
; /* _mtype on <self:Object(AExpr)> */
6074 /* method typing#AExpr#mtype= for (self: AExpr, nullable MType) */
6075 void typing__AExpr__mtype_61d(val
* self
, val
* p0
) {
6076 self
->attrs
[COLOR_typing__AExpr___mtype
].val
= p0
; /* _mtype on <self:AExpr> */
6079 /* method typing#AExpr#mtype= for (self: Object, nullable MType) */
6080 void VIRTUAL_typing__AExpr__mtype_61d(val
* self
, val
* p0
) {
6081 { /* Inline typing#AExpr#mtype= (self,p0) on <self:Object(AExpr)> */
6082 self
->attrs
[COLOR_typing__AExpr___mtype
].val
= p0
; /* _mtype on <self:Object(AExpr)> */
6087 /* method typing#AExpr#is_typed for (self: AExpr): Bool */
6088 short int typing__AExpr__is_typed(val
* self
) {
6089 short int var
/* : Bool */;
6090 short int var1
/* : Bool */;
6091 var1
= self
->attrs
[COLOR_typing__AExpr___is_typed
].s
; /* _is_typed on <self:AExpr> */
6096 /* method typing#AExpr#is_typed for (self: Object): Bool */
6097 short int VIRTUAL_typing__AExpr__is_typed(val
* self
) {
6098 short int var
/* : Bool */;
6099 short int var1
/* : Bool */;
6100 short int var3
/* : Bool */;
6101 { /* Inline typing#AExpr#is_typed (self) on <self:Object(AExpr)> */
6102 var3
= self
->attrs
[COLOR_typing__AExpr___is_typed
].s
; /* _is_typed on <self:Object(AExpr)> */
6110 /* method typing#AExpr#is_typed= for (self: AExpr, Bool) */
6111 void typing__AExpr__is_typed_61d(val
* self
, short int p0
) {
6112 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= p0
; /* _is_typed on <self:AExpr> */
6115 /* method typing#AExpr#is_typed= for (self: Object, Bool) */
6116 void VIRTUAL_typing__AExpr__is_typed_61d(val
* self
, short int p0
) {
6117 { /* Inline typing#AExpr#is_typed= (self,p0) on <self:Object(AExpr)> */
6118 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= p0
; /* _is_typed on <self:Object(AExpr)> */
6123 /* method typing#AExpr#implicit_cast_to for (self: AExpr): nullable MType */
6124 val
* typing__AExpr__implicit_cast_to(val
* self
) {
6125 val
* var
/* : nullable MType */;
6126 val
* var1
/* : nullable MType */;
6127 var1
= self
->attrs
[COLOR_typing__AExpr___implicit_cast_to
].val
; /* _implicit_cast_to on <self:AExpr> */
6132 /* method typing#AExpr#implicit_cast_to for (self: Object): nullable MType */
6133 val
* VIRTUAL_typing__AExpr__implicit_cast_to(val
* self
) {
6134 val
* var
/* : nullable MType */;
6135 val
* var1
/* : nullable MType */;
6136 val
* var3
/* : nullable MType */;
6137 { /* Inline typing#AExpr#implicit_cast_to (self) on <self:Object(AExpr)> */
6138 var3
= self
->attrs
[COLOR_typing__AExpr___implicit_cast_to
].val
; /* _implicit_cast_to on <self:Object(AExpr)> */
6146 /* method typing#AExpr#implicit_cast_to= for (self: AExpr, nullable MType) */
6147 void typing__AExpr__implicit_cast_to_61d(val
* self
, val
* p0
) {
6148 self
->attrs
[COLOR_typing__AExpr___implicit_cast_to
].val
= p0
; /* _implicit_cast_to on <self:AExpr> */
6151 /* method typing#AExpr#implicit_cast_to= for (self: Object, nullable MType) */
6152 void VIRTUAL_typing__AExpr__implicit_cast_to_61d(val
* self
, val
* p0
) {
6153 { /* Inline typing#AExpr#implicit_cast_to= (self,p0) on <self:Object(AExpr)> */
6154 self
->attrs
[COLOR_typing__AExpr___implicit_cast_to
].val
= p0
; /* _implicit_cast_to on <self:Object(AExpr)> */
6159 /* method typing#AExpr#its_variable for (self: AExpr): nullable Variable */
6160 val
* typing__AExpr__its_variable(val
* self
) {
6161 val
* var
/* : nullable Variable */;
6162 val
* var1
/* : null */;
6169 /* method typing#AExpr#its_variable for (self: Object): nullable Variable */
6170 val
* VIRTUAL_typing__AExpr__its_variable(val
* self
) {
6171 val
* var
/* : nullable Variable */;
6172 val
* var1
/* : nullable Variable */;
6173 var1
= typing__AExpr__its_variable(self
);
6178 /* method typing#AExpr#accept_typing for (self: AExpr, TypeVisitor) */
6179 void typing__AExpr__accept_typing(val
* self
, val
* p0
) {
6180 val
* var_v
/* var v: TypeVisitor */;
6181 static val
* varonce
;
6182 val
* var
/* : String */;
6183 char* var1
/* : NativeString */;
6184 long var2
/* : Int */;
6185 val
* var3
/* : FlatString */;
6186 val
* var4
/* : String */;
6187 val
* var5
/* : Array[Object] */;
6188 long var6
/* : Int */;
6189 val
* var7
/* : NativeArray[Object] */;
6190 val
* var8
/* : String */;
6195 var1
= "no implemented accept_typing for ";
6197 var3
= string__NativeString__to_s_with_length(var1
, var2
);
6202 var4
= string__Object__class_name(self
);
6204 var5
= NEW_array__Array(&type_array__Arraykernel__Object
);
6205 { /* var5 = array_instance Array[Object] */
6207 var7
= NEW_array__NativeArray(var6
, &type_array__NativeArraykernel__Object
);
6208 ((struct instance_array__NativeArray
*)var7
)->values
[0] = (val
*) var
;
6209 ((struct instance_array__NativeArray
*)var7
)->values
[1] = (val
*) var4
;
6211 ((void (*)(val
*, val
*, long))(var5
->class->vft
[COLOR_array__Array__with_native
]))(var5
, var7
, var6
) /* with_native on <var5:Array[Object]>*/;
6215 var8
= ((val
* (*)(val
*))(var5
->class->vft
[COLOR_string__Object__to_s
]))(var5
) /* to_s on <var5:Array[Object]>*/;
6218 typing__TypeVisitor__error(var_v
, self
, var8
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
6222 /* method typing#AExpr#accept_typing for (self: Object, TypeVisitor) */
6223 void VIRTUAL_typing__AExpr__accept_typing(val
* self
, val
* p0
) {
6224 typing__AExpr__accept_typing(self
, p0
); /* Direct call typing#AExpr#accept_typing on <self:Object(AExpr)>*/
6227 /* method typing#ABlockExpr#accept_typing for (self: ABlockExpr, TypeVisitor) */
6228 void typing__ABlockExpr__accept_typing(val
* self
, val
* p0
) {
6229 val
* var_v
/* var v: TypeVisitor */;
6230 val
* var
/* : ANodes[AExpr] */;
6231 val
* var2
/* : ANodes[AExpr] */;
6232 val
* var3
/* : Iterator[ANode] */;
6233 short int var4
/* : Bool */;
6234 val
* var5
/* : nullable Object */;
6235 val
* var_e
/* var e: AExpr */;
6236 short int var6
/* : Bool */;
6239 { /* Inline parser_nodes#ABlockExpr#n_expr (self) on <self:ABlockExpr> */
6240 var2
= self
->attrs
[COLOR_parser_nodes__ABlockExpr___n_expr
].val
; /* _n_expr on <self:ABlockExpr> */
6241 if (unlikely(var2
== NULL
)) {
6242 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_expr");
6243 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 1424);
6251 var3
= parser_nodes__ANodes__iterator(var
);
6255 var4
= ((short int (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var3
) /* is_ok on <var3:Iterator[ANode]>*/;
6259 var5
= ((val
* (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var3
) /* item on <var3:Iterator[ANode]>*/;
6263 typing__TypeVisitor__visit_stmt(var_v
, var_e
); /* Direct call typing#TypeVisitor#visit_stmt on <var_v:TypeVisitor>*/
6265 CONTINUE_label
: (void)0;
6267 ((void (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var3
) /* next on <var3:Iterator[ANode]>*/;
6270 BREAK_label
: (void)0;
6273 { /* Inline typing#AExpr#is_typed= (self,var6) on <self:ABlockExpr> */
6274 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var6
; /* _is_typed on <self:ABlockExpr> */
6280 /* method typing#ABlockExpr#accept_typing for (self: Object, TypeVisitor) */
6281 void VIRTUAL_typing__ABlockExpr__accept_typing(val
* self
, val
* p0
) {
6282 typing__ABlockExpr__accept_typing(self
, p0
); /* Direct call typing#ABlockExpr#accept_typing on <self:Object(ABlockExpr)>*/
6285 /* method typing#ABlockExpr#mtype for (self: ABlockExpr): nullable MType */
6286 val
* typing__ABlockExpr__mtype(val
* self
) {
6287 val
* var
/* : nullable MType */;
6288 val
* var1
/* : ANodes[AExpr] */;
6289 val
* var3
/* : ANodes[AExpr] */;
6290 short int var4
/* : Bool */;
6291 val
* var5
/* : null */;
6292 val
* var6
/* : ANodes[AExpr] */;
6293 val
* var8
/* : ANodes[AExpr] */;
6294 val
* var9
/* : nullable Object */;
6295 val
* var10
/* : nullable MType */;
6297 { /* Inline parser_nodes#ABlockExpr#n_expr (self) on <self:ABlockExpr> */
6298 var3
= self
->attrs
[COLOR_parser_nodes__ABlockExpr___n_expr
].val
; /* _n_expr on <self:ABlockExpr> */
6299 if (unlikely(var3
== NULL
)) {
6300 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_expr");
6301 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 1424);
6309 var4
= parser_nodes__ANodes__is_empty(var1
);
6318 { /* Inline parser_nodes#ABlockExpr#n_expr (self) on <self:ABlockExpr> */
6319 var8
= self
->attrs
[COLOR_parser_nodes__ABlockExpr___n_expr
].val
; /* _n_expr on <self:ABlockExpr> */
6320 if (unlikely(var8
== NULL
)) {
6321 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_expr");
6322 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 1424);
6330 var9
= abstract_collection__SequenceRead__last(var6
);
6333 var10
= ((val
* (*)(val
*))(var9
->class->vft
[COLOR_typing__AExpr__mtype
]))(var9
) /* mtype on <var9:nullable Object(AExpr)>*/;
6340 /* method typing#ABlockExpr#mtype for (self: Object): nullable MType */
6341 val
* VIRTUAL_typing__ABlockExpr__mtype(val
* self
) {
6342 val
* var
/* : nullable MType */;
6343 val
* var1
/* : nullable MType */;
6344 var1
= typing__ABlockExpr__mtype(self
);
6349 /* method typing#AVardeclExpr#accept_typing for (self: AVardeclExpr, TypeVisitor) */
6350 void typing__AVardeclExpr__accept_typing(val
* self
, val
* p0
) {
6351 val
* var_v
/* var v: TypeVisitor */;
6352 val
* var
/* : nullable Variable */;
6353 val
* var2
/* : nullable Variable */;
6354 val
* var_variable
/* var variable: nullable Variable */;
6355 val
* var3
/* : null */;
6356 short int var4
/* : Bool */;
6357 short int var5
/* : Bool */;
6358 val
* var_other
/* var other: nullable Object */;
6359 short int var7
/* : Bool */;
6360 short int var9
/* : Bool */;
6361 val
* var10
/* : nullable AType */;
6362 val
* var_ntype
/* var ntype: nullable AType */;
6363 val
* var11
/* : null */;
6364 short int var12
/* : Bool */;
6365 short int var13
/* : Bool */;
6366 short int var15
/* : Bool */;
6367 short int var17
/* : Bool */;
6368 val
* var18
/* : null */;
6369 val
* var_mtype
/* var mtype: nullable MType */;
6370 val
* var19
/* : nullable MType */;
6371 val
* var20
/* : null */;
6372 short int var21
/* : Bool */;
6373 short int var22
/* : Bool */;
6374 short int var24
/* : Bool */;
6375 short int var26
/* : Bool */;
6376 val
* var27
/* : nullable AExpr */;
6377 val
* var_nexpr
/* var nexpr: nullable AExpr */;
6378 val
* var28
/* : null */;
6379 short int var29
/* : Bool */;
6380 short int var30
/* : Bool */;
6381 val
* var_other32
/* var other: nullable Object */;
6382 short int var33
/* : Bool */;
6383 short int var34
/* : Bool */;
6384 short int var35
/* : Bool */;
6385 val
* var36
/* : null */;
6386 short int var37
/* : Bool */;
6387 short int var38
/* : Bool */;
6388 short int var40
/* : Bool */;
6389 short int var41
/* : Bool */;
6390 short int var42
/* : Bool */;
6391 val
* var43
/* : nullable MType */;
6392 val
* var44
/* : nullable MType */;
6393 val
* var45
/* : null */;
6394 short int var46
/* : Bool */;
6395 short int var47
/* : Bool */;
6396 short int var49
/* : Bool */;
6397 short int var51
/* : Bool */;
6398 val
* var_decltype
/* var decltype: nullable MType */;
6399 short int var52
/* : Bool */;
6400 val
* var53
/* : null */;
6401 short int var54
/* : Bool */;
6402 short int var55
/* : Bool */;
6403 short int var57
/* : Bool */;
6404 short int var59
/* : Bool */;
6405 short int var_
/* var : Bool */;
6406 short int var60
/* : Bool */;
6409 static val
* varonce
;
6410 val
* var61
/* : String */;
6411 char* var62
/* : NativeString */;
6412 long var63
/* : Int */;
6413 val
* var64
/* : FlatString */;
6414 val
* var65
/* : nullable MClass */;
6415 val
* var66
/* : MClassType */;
6416 val
* var68
/* : MClassType */;
6417 val
* var69
/* : MType */;
6418 val
* var70
/* : null */;
6419 short int var71
/* : Bool */;
6420 short int var72
/* : Bool */;
6421 short int var74
/* : Bool */;
6422 short int var76
/* : Bool */;
6423 short int var78
/* : Bool */;
6426 { /* Inline scope#AVardeclExpr#variable (self) on <self:AVardeclExpr> */
6427 var2
= self
->attrs
[COLOR_scope__AVardeclExpr___variable
].val
; /* _variable on <self:AVardeclExpr> */
6434 if (var_variable
== NULL
) {
6435 var4
= 1; /* is null */
6437 var4
= 0; /* arg is null but recv is not */
6440 { /* Inline kernel#Object#== (var_variable,var3) on <var_variable:nullable Variable> */
6443 { /* Inline kernel#Object#is_same_instance (var_variable,var_other) on <var_variable:nullable Variable(Variable)> */
6444 var9
= var_variable
== var_other
;
6461 var10
= parser_nodes__AVardeclExpr__n_type(self
);
6465 if (var_ntype
== NULL
) {
6466 var12
= 1; /* is null */
6468 var12
= 0; /* arg is null but recv is not */
6471 { /* Inline kernel#Object#== (var_ntype,var11) on <var_ntype:nullable AType> */
6474 { /* Inline kernel#Object#is_same_instance (var_ntype,var_other) on <var_ntype:nullable AType(AType)> */
6475 var17
= var_ntype
== var_other
;
6478 RET_LABEL16
:(void)0;
6483 RET_LABEL14
:(void)0;
6492 var19
= typing__TypeVisitor__resolve_mtype(var_v
, var_ntype
);
6496 if (var_mtype
== NULL
) {
6497 var21
= 1; /* is null */
6499 var21
= 0; /* arg is null but recv is not */
6502 { /* Inline kernel#Object#== (var_mtype,var20) on <var_mtype:nullable MType> */
6505 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
6506 var26
= var_mtype
== var_other
;
6509 RET_LABEL25
:(void)0;
6514 RET_LABEL23
:(void)0;
6524 var27
= parser_nodes__AVardeclExpr__n_expr(self
);
6528 if (var_nexpr
== NULL
) {
6529 var29
= 0; /* is null */
6531 var29
= 1; /* arg is null and recv is not */
6534 { /* Inline kernel#Object#!= (var_nexpr,var28) on <var_nexpr:nullable AExpr> */
6535 var_other32
= var28
;
6537 var34
= ((short int (*)(val
*, val
*))(var_nexpr
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nexpr
, var_other32
) /* == on <var_nexpr:nullable AExpr(AExpr)>*/;
6543 RET_LABEL31
:(void)0;
6549 if (var_mtype
== NULL
) {
6550 var37
= 0; /* is null */
6552 var37
= 1; /* arg is null and recv is not */
6555 { /* Inline kernel#Object#!= (var_mtype,var36) on <var_mtype:nullable MType> */
6556 var_other32
= var36
;
6558 var41
= ((short int (*)(val
*, val
*))(var_mtype
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_mtype
, var_other32
) /* == on <var_mtype:nullable MType(MType)>*/;
6564 RET_LABEL39
:(void)0;
6570 var43
= typing__TypeVisitor__visit_expr_subtype(var_v
, var_nexpr
, var_mtype
);
6575 var44
= typing__TypeVisitor__visit_expr(var_v
, var_nexpr
);
6579 if (var_mtype
== NULL
) {
6580 var46
= 1; /* is null */
6582 var46
= 0; /* arg is null but recv is not */
6585 { /* Inline kernel#Object#== (var_mtype,var45) on <var_mtype:nullable MType> */
6588 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
6589 var51
= var_mtype
== var_other
;
6592 RET_LABEL50
:(void)0;
6597 RET_LABEL48
:(void)0;
6608 var_decltype
= var_mtype
;
6610 if (var_mtype
== NULL
) {
6611 var54
= 1; /* is null */
6613 var54
= 0; /* arg is null but recv is not */
6616 { /* Inline kernel#Object#== (var_mtype,var53) on <var_mtype:nullable MType> */
6619 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
6620 var59
= var_mtype
== var_other
;
6623 RET_LABEL58
:(void)0;
6628 RET_LABEL56
:(void)0;
6636 /* <var_mtype:nullable MType(MType)> isa MNullType */
6637 cltype
= type_model__MNullType
.color
;
6638 idtype
= type_model__MNullType
.id
;
6639 if(cltype
>= var_mtype
->type
->table_size
) {
6642 var60
= var_mtype
->type
->type_table
[cltype
] == idtype
;
6652 var64
= string__NativeString__to_s_with_length(var62
, var63
);
6657 var65
= typing__TypeVisitor__get_mclass(var_v
, self
, var61
);
6659 if (var65
== NULL
) {
6660 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6661 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 616);
6664 { /* Inline model#MClass#mclass_type (var65) on <var65:nullable MClass> */
6665 if (unlikely(var65
== NULL
)) {
6666 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6667 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
6670 var68
= var65
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var65:nullable MClass> */
6671 if (unlikely(var68
== NULL
)) {
6672 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
6673 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
6677 RET_LABEL67
:(void)0;
6681 var69
= model__MType__as_nullable(var66
);
6683 var_decltype
= var69
;
6685 if (var_mtype
== NULL
) {
6686 var71
= 1; /* is null */
6688 var71
= 0; /* arg is null but recv is not */
6691 { /* Inline kernel#Object#== (var_mtype,var70) on <var_mtype:nullable MType(nullable MNullType)> */
6694 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MNullType(MNullType)> */
6695 var76
= var_mtype
== var_other
;
6698 RET_LABEL75
:(void)0;
6703 RET_LABEL73
:(void)0;
6708 var_mtype
= var_decltype
;
6714 { /* Inline typing#Variable#declared_type= (var_variable,var_decltype) on <var_variable:nullable Variable(Variable)> */
6715 var_variable
->attrs
[COLOR_typing__Variable___declared_type
].val
= var_decltype
; /* _declared_type on <var_variable:nullable Variable(Variable)> */
6716 RET_LABEL77
:(void)0;
6720 typing__TypeVisitor__set_variable(var_v
, self
, var_variable
, var_mtype
); /* Direct call typing#TypeVisitor#set_variable on <var_v:TypeVisitor>*/
6724 { /* Inline typing#AExpr#is_typed= (self,var78) on <self:AVardeclExpr> */
6725 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var78
; /* _is_typed on <self:AVardeclExpr> */
6726 RET_LABEL79
:(void)0;
6731 /* method typing#AVardeclExpr#accept_typing for (self: Object, TypeVisitor) */
6732 void VIRTUAL_typing__AVardeclExpr__accept_typing(val
* self
, val
* p0
) {
6733 typing__AVardeclExpr__accept_typing(self
, p0
); /* Direct call typing#AVardeclExpr#accept_typing on <self:Object(AVardeclExpr)>*/
6736 /* method typing#AVarExpr#its_variable for (self: AVarExpr): nullable Variable */
6737 val
* typing__AVarExpr__its_variable(val
* self
) {
6738 val
* var
/* : nullable Variable */;
6739 val
* var1
/* : nullable Variable */;
6740 val
* var3
/* : nullable Variable */;
6742 { /* Inline scope#AVarFormExpr#variable (self) on <self:AVarExpr> */
6743 var3
= self
->attrs
[COLOR_scope__AVarFormExpr___variable
].val
; /* _variable on <self:AVarExpr> */
6753 /* method typing#AVarExpr#its_variable for (self: Object): nullable Variable */
6754 val
* VIRTUAL_typing__AVarExpr__its_variable(val
* self
) {
6755 val
* var
/* : nullable Variable */;
6756 val
* var1
/* : nullable Variable */;
6757 var1
= typing__AVarExpr__its_variable(self
);
6762 /* method typing#AVarExpr#accept_typing for (self: AVarExpr, TypeVisitor) */
6763 void typing__AVarExpr__accept_typing(val
* self
, val
* p0
) {
6764 val
* var_v
/* var v: TypeVisitor */;
6765 val
* var
/* : nullable Variable */;
6766 val
* var2
/* : nullable Variable */;
6767 val
* var_variable
/* var variable: nullable Variable */;
6768 val
* var3
/* : null */;
6769 short int var4
/* : Bool */;
6770 short int var5
/* : Bool */;
6771 val
* var_other
/* var other: nullable Object */;
6772 short int var7
/* : Bool */;
6773 short int var9
/* : Bool */;
6774 val
* var10
/* : nullable MType */;
6775 val
* var_mtype
/* var mtype: nullable MType */;
6776 val
* var11
/* : null */;
6777 short int var12
/* : Bool */;
6778 short int var13
/* : Bool */;
6779 val
* var_other15
/* var other: nullable Object */;
6780 short int var16
/* : Bool */;
6781 short int var17
/* : Bool */;
6782 short int var18
/* : Bool */;
6785 { /* Inline scope#AVarFormExpr#variable (self) on <self:AVarExpr> */
6786 var2
= self
->attrs
[COLOR_scope__AVarFormExpr___variable
].val
; /* _variable on <self:AVarExpr> */
6793 if (var_variable
== NULL
) {
6794 var4
= 1; /* is null */
6796 var4
= 0; /* arg is null but recv is not */
6799 { /* Inline kernel#Object#== (var_variable,var3) on <var_variable:nullable Variable> */
6802 { /* Inline kernel#Object#is_same_instance (var_variable,var_other) on <var_variable:nullable Variable(Variable)> */
6803 var9
= var_variable
== var_other
;
6820 var10
= typing__TypeVisitor__get_variable(var_v
, self
, var_variable
);
6824 if (var_mtype
== NULL
) {
6825 var12
= 0; /* is null */
6827 var12
= 1; /* arg is null and recv is not */
6830 { /* Inline kernel#Object#!= (var_mtype,var11) on <var_mtype:nullable MType> */
6831 var_other15
= var11
;
6833 var17
= ((short int (*)(val
*, val
*))(var_mtype
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_mtype
, var_other15
) /* == on <var_mtype:nullable MType(MType)>*/;
6839 RET_LABEL14
:(void)0;
6847 { /* Inline typing#AExpr#mtype= (self,var_mtype) on <self:AVarExpr> */
6848 self
->attrs
[COLOR_typing__AExpr___mtype
].val
= var_mtype
; /* _mtype on <self:AVarExpr> */
6849 RET_LABEL19
:(void)0;
6854 /* method typing#AVarExpr#accept_typing for (self: Object, TypeVisitor) */
6855 void VIRTUAL_typing__AVarExpr__accept_typing(val
* self
, val
* p0
) {
6856 typing__AVarExpr__accept_typing(self
, p0
); /* Direct call typing#AVarExpr#accept_typing on <self:Object(AVarExpr)>*/
6859 /* method typing#AVarAssignExpr#accept_typing for (self: AVarAssignExpr, TypeVisitor) */
6860 void typing__AVarAssignExpr__accept_typing(val
* self
, val
* p0
) {
6861 val
* var_v
/* var v: TypeVisitor */;
6862 val
* var
/* : nullable Variable */;
6863 val
* var2
/* : nullable Variable */;
6864 val
* var_variable
/* var variable: nullable Variable */;
6865 val
* var3
/* : null */;
6866 short int var4
/* : Bool */;
6867 short int var5
/* : Bool */;
6868 val
* var_other
/* var other: nullable Object */;
6869 short int var7
/* : Bool */;
6870 short int var8
/* : Bool */;
6871 short int var9
/* : Bool */;
6872 val
* var10
/* : AExpr */;
6873 val
* var11
/* : nullable MType */;
6874 val
* var13
/* : nullable MType */;
6875 val
* var14
/* : nullable MType */;
6876 val
* var_mtype
/* var mtype: nullable MType */;
6877 short int var15
/* : Bool */;
6880 { /* Inline scope#AVarFormExpr#variable (self) on <self:AVarAssignExpr> */
6881 var2
= self
->attrs
[COLOR_scope__AVarFormExpr___variable
].val
; /* _variable on <self:AVarAssignExpr> */
6888 if (var_variable
== NULL
) {
6889 var4
= 0; /* is null */
6891 var4
= 1; /* arg is null and recv is not */
6894 { /* Inline kernel#Object#!= (var_variable,var3) on <var_variable:nullable Variable> */
6897 var8
= ((short int (*)(val
*, val
*))(var_variable
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_variable
, var_other
) /* == on <var_variable:nullable Variable(Variable)>*/;
6907 if (unlikely(!var4
)) {
6908 PRINT_ERROR("Runtime error: %s", "Assert failed");
6909 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 651);
6913 var10
= parser_nodes__AAssignFormExpr__n_value(self
);
6916 { /* Inline typing#Variable#declared_type (var_variable) on <var_variable:nullable Variable(Variable)> */
6917 var13
= var_variable
->attrs
[COLOR_typing__Variable___declared_type
].val
; /* _declared_type on <var_variable:nullable Variable(Variable)> */
6919 RET_LABEL12
:(void)0;
6923 var14
= typing__TypeVisitor__visit_expr_subtype(var_v
, var10
, var11
);
6927 typing__TypeVisitor__set_variable(var_v
, self
, var_variable
, var_mtype
); /* Direct call typing#TypeVisitor#set_variable on <var_v:TypeVisitor>*/
6931 { /* Inline typing#AExpr#is_typed= (self,var15) on <self:AVarAssignExpr> */
6932 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var15
; /* _is_typed on <self:AVarAssignExpr> */
6933 RET_LABEL16
:(void)0;
6938 /* method typing#AVarAssignExpr#accept_typing for (self: Object, TypeVisitor) */
6939 void VIRTUAL_typing__AVarAssignExpr__accept_typing(val
* self
, val
* p0
) {
6940 typing__AVarAssignExpr__accept_typing(self
, p0
); /* Direct call typing#AVarAssignExpr#accept_typing on <self:Object(AVarAssignExpr)>*/
6943 /* method typing#AReassignFormExpr#reassign_callsite for (self: AReassignFormExpr): nullable CallSite */
6944 val
* typing__AReassignFormExpr__reassign_callsite(val
* self
) {
6945 val
* var
/* : nullable CallSite */;
6946 val
* var1
/* : nullable CallSite */;
6947 var1
= self
->attrs
[COLOR_typing__AReassignFormExpr___reassign_callsite
].val
; /* _reassign_callsite on <self:AReassignFormExpr> */
6952 /* method typing#AReassignFormExpr#reassign_callsite for (self: Object): nullable CallSite */
6953 val
* VIRTUAL_typing__AReassignFormExpr__reassign_callsite(val
* self
) {
6954 val
* var
/* : nullable CallSite */;
6955 val
* var1
/* : nullable CallSite */;
6956 val
* var3
/* : nullable CallSite */;
6957 { /* Inline typing#AReassignFormExpr#reassign_callsite (self) on <self:Object(AReassignFormExpr)> */
6958 var3
= self
->attrs
[COLOR_typing__AReassignFormExpr___reassign_callsite
].val
; /* _reassign_callsite on <self:Object(AReassignFormExpr)> */
6966 /* method typing#AReassignFormExpr#reassign_callsite= for (self: AReassignFormExpr, nullable CallSite) */
6967 void typing__AReassignFormExpr__reassign_callsite_61d(val
* self
, val
* p0
) {
6968 self
->attrs
[COLOR_typing__AReassignFormExpr___reassign_callsite
].val
= p0
; /* _reassign_callsite on <self:AReassignFormExpr> */
6971 /* method typing#AReassignFormExpr#reassign_callsite= for (self: Object, nullable CallSite) */
6972 void VIRTUAL_typing__AReassignFormExpr__reassign_callsite_61d(val
* self
, val
* p0
) {
6973 { /* Inline typing#AReassignFormExpr#reassign_callsite= (self,p0) on <self:Object(AReassignFormExpr)> */
6974 self
->attrs
[COLOR_typing__AReassignFormExpr___reassign_callsite
].val
= p0
; /* _reassign_callsite on <self:Object(AReassignFormExpr)> */
6979 /* method typing#AReassignFormExpr#read_type for (self: AReassignFormExpr): nullable MType */
6980 val
* typing__AReassignFormExpr__read_type(val
* self
) {
6981 val
* var
/* : nullable MType */;
6982 val
* var1
/* : nullable MType */;
6983 var1
= self
->attrs
[COLOR_typing__AReassignFormExpr___read_type
].val
; /* _read_type on <self:AReassignFormExpr> */
6988 /* method typing#AReassignFormExpr#read_type for (self: Object): nullable MType */
6989 val
* VIRTUAL_typing__AReassignFormExpr__read_type(val
* self
) {
6990 val
* var
/* : nullable MType */;
6991 val
* var1
/* : nullable MType */;
6992 val
* var3
/* : nullable MType */;
6993 { /* Inline typing#AReassignFormExpr#read_type (self) on <self:Object(AReassignFormExpr)> */
6994 var3
= self
->attrs
[COLOR_typing__AReassignFormExpr___read_type
].val
; /* _read_type on <self:Object(AReassignFormExpr)> */
7002 /* method typing#AReassignFormExpr#read_type= for (self: AReassignFormExpr, nullable MType) */
7003 void typing__AReassignFormExpr__read_type_61d(val
* self
, val
* p0
) {
7004 self
->attrs
[COLOR_typing__AReassignFormExpr___read_type
].val
= p0
; /* _read_type on <self:AReassignFormExpr> */
7007 /* method typing#AReassignFormExpr#read_type= for (self: Object, nullable MType) */
7008 void VIRTUAL_typing__AReassignFormExpr__read_type_61d(val
* self
, val
* p0
) {
7009 { /* Inline typing#AReassignFormExpr#read_type= (self,p0) on <self:Object(AReassignFormExpr)> */
7010 self
->attrs
[COLOR_typing__AReassignFormExpr___read_type
].val
= p0
; /* _read_type on <self:Object(AReassignFormExpr)> */
7015 /* method typing#AReassignFormExpr#resolve_reassignment for (self: AReassignFormExpr, TypeVisitor, MType, MType): nullable MType */
7016 val
* typing__AReassignFormExpr__resolve_reassignment(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
7017 val
* var
/* : nullable MType */;
7018 val
* var_v
/* var v: TypeVisitor */;
7019 val
* var_readtype
/* var readtype: MType */;
7020 val
* var_writetype
/* var writetype: MType */;
7021 val
* var1
/* : AAssignOp */;
7022 short int var2
/* : Bool */;
7025 static val
* varonce
;
7026 val
* var3
/* : String */;
7027 char* var4
/* : NativeString */;
7028 long var5
/* : Int */;
7029 val
* var6
/* : FlatString */;
7030 val
* var_reassign_name
/* var reassign_name: String */;
7031 val
* var7
/* : AAssignOp */;
7032 short int var8
/* : Bool */;
7035 static val
* varonce11
;
7036 val
* var12
/* : String */;
7037 char* var13
/* : NativeString */;
7038 long var14
/* : Int */;
7039 val
* var15
/* : FlatString */;
7040 short int var17
/* : Bool */;
7043 static val
* varonce20
;
7044 val
* var21
/* : String */;
7045 char* var22
/* : NativeString */;
7046 long var23
/* : Int */;
7047 val
* var24
/* : FlatString */;
7048 static val
* varonce25
;
7049 val
* var26
/* : String */;
7050 char* var27
/* : NativeString */;
7051 long var28
/* : Int */;
7052 val
* var29
/* : FlatString */;
7053 val
* var30
/* : Array[Object] */;
7054 long var31
/* : Int */;
7055 val
* var32
/* : NativeArray[Object] */;
7056 val
* var33
/* : String */;
7057 val
* var34
/* : null */;
7058 short int var35
/* : Bool */;
7059 val
* var36
/* : nullable CallSite */;
7060 val
* var_callsite
/* var callsite: nullable CallSite */;
7061 val
* var37
/* : null */;
7062 short int var38
/* : Bool */;
7063 short int var39
/* : Bool */;
7064 val
* var_other
/* var other: nullable Object */;
7065 short int var41
/* : Bool */;
7066 short int var43
/* : Bool */;
7067 val
* var44
/* : null */;
7068 val
* var46
/* : MSignature */;
7069 val
* var48
/* : MSignature */;
7070 val
* var_msignature
/* var msignature: MSignature */;
7071 val
* var49
/* : nullable MType */;
7072 val
* var51
/* : nullable MType */;
7073 val
* var_rettype
/* var rettype: nullable MType */;
7074 short int var52
/* : Bool */;
7075 long var53
/* : Int */;
7076 long var54
/* : Int */;
7077 short int var55
/* : Bool */;
7078 short int var56
/* : Bool */;
7079 short int var58
/* : Bool */;
7080 short int var_
/* var : Bool */;
7081 val
* var59
/* : null */;
7082 short int var60
/* : Bool */;
7083 short int var61
/* : Bool */;
7084 val
* var_other63
/* var other: nullable Object */;
7085 short int var64
/* : Bool */;
7086 short int var65
/* : Bool */;
7087 short int var66
/* : Bool */;
7088 val
* var67
/* : AExpr */;
7089 val
* var68
/* : Array[MParameter] */;
7090 val
* var70
/* : Array[MParameter] */;
7091 val
* var71
/* : nullable Object */;
7092 val
* var72
/* : MType */;
7093 val
* var74
/* : MType */;
7094 val
* var75
/* : nullable MType */;
7095 val
* var_value_type
/* var value_type: nullable MType */;
7096 val
* var76
/* : null */;
7097 short int var77
/* : Bool */;
7098 short int var78
/* : Bool */;
7099 short int var80
/* : Bool */;
7100 short int var82
/* : Bool */;
7101 val
* var83
/* : null */;
7102 val
* var84
/* : nullable MType */;
7107 var1
= parser_nodes__AReassignFormExpr__n_assign_op(self
);
7109 /* <var1:AAssignOp> isa APlusAssignOp */
7110 cltype
= type_parser_nodes__APlusAssignOp
.color
;
7111 idtype
= type_parser_nodes__APlusAssignOp
.id
;
7112 if(cltype
>= var1
->type
->table_size
) {
7115 var2
= var1
->type
->type_table
[cltype
] == idtype
;
7123 var6
= string__NativeString__to_s_with_length(var4
, var5
);
7127 var_reassign_name
= var3
;
7130 var7
= parser_nodes__AReassignFormExpr__n_assign_op(self
);
7132 /* <var7:AAssignOp> isa AMinusAssignOp */
7133 cltype9
= type_parser_nodes__AMinusAssignOp
.color
;
7134 idtype10
= type_parser_nodes__AMinusAssignOp
.id
;
7135 if(cltype9
>= var7
->type
->table_size
) {
7138 var8
= var7
->type
->type_table
[cltype9
] == idtype10
;
7146 var15
= string__NativeString__to_s_with_length(var13
, var14
);
7150 var_reassign_name
= var12
;
7152 PRINT_ERROR("Runtime error: %s", "Aborted");
7153 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 680);
7158 { /* Inline typing#AReassignFormExpr#read_type= (self,var_readtype) on <self:AReassignFormExpr> */
7159 self
->attrs
[COLOR_typing__AReassignFormExpr___read_type
].val
= var_readtype
; /* _read_type on <self:AReassignFormExpr> */
7160 RET_LABEL16
:(void)0;
7163 /* <var_readtype:MType> isa MNullType */
7164 cltype18
= type_model__MNullType
.color
;
7165 idtype19
= type_model__MNullType
.id
;
7166 if(cltype18
>= var_readtype
->type
->table_size
) {
7169 var17
= var_readtype
->type
->type_table
[cltype18
] == idtype19
;
7175 var22
= "Error: Method \'";
7177 var24
= string__NativeString__to_s_with_length(var22
, var23
);
7184 var27
= "\' call on \'null\'.";
7186 var29
= string__NativeString__to_s_with_length(var27
, var28
);
7190 var30
= NEW_array__Array(&type_array__Arraykernel__Object
);
7191 { /* var30 = array_instance Array[Object] */
7193 var32
= NEW_array__NativeArray(var31
, &type_array__NativeArraykernel__Object
);
7194 ((struct instance_array__NativeArray
*)var32
)->values
[0] = (val
*) var21
;
7195 ((struct instance_array__NativeArray
*)var32
)->values
[1] = (val
*) var_reassign_name
;
7196 ((struct instance_array__NativeArray
*)var32
)->values
[2] = (val
*) var26
;
7198 ((void (*)(val
*, val
*, long))(var30
->class->vft
[COLOR_array__Array__with_native
]))(var30
, var32
, var31
) /* with_native on <var30:Array[Object]>*/;
7202 var33
= ((val
* (*)(val
*))(var30
->class->vft
[COLOR_string__Object__to_s
]))(var30
) /* to_s on <var30:Array[Object]>*/;
7205 typing__TypeVisitor__error(var_v
, self
, var33
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
7214 var36
= typing__TypeVisitor__get_method(var_v
, self
, var_readtype
, var_reassign_name
, var35
);
7216 var_callsite
= var36
;
7218 if (var_callsite
== NULL
) {
7219 var38
= 1; /* is null */
7221 var38
= 0; /* arg is null but recv is not */
7224 { /* Inline kernel#Object#== (var_callsite,var37) on <var_callsite:nullable CallSite> */
7227 { /* Inline kernel#Object#is_same_instance (var_callsite,var_other) on <var_callsite:nullable CallSite(CallSite)> */
7228 var43
= var_callsite
== var_other
;
7231 RET_LABEL42
:(void)0;
7236 RET_LABEL40
:(void)0;
7247 { /* Inline typing#AReassignFormExpr#reassign_callsite= (self,var_callsite) on <self:AReassignFormExpr> */
7248 self
->attrs
[COLOR_typing__AReassignFormExpr___reassign_callsite
].val
= var_callsite
; /* _reassign_callsite on <self:AReassignFormExpr> */
7249 RET_LABEL45
:(void)0;
7253 { /* Inline typing#CallSite#msignature (var_callsite) on <var_callsite:nullable CallSite(CallSite)> */
7254 var48
= var_callsite
->attrs
[COLOR_typing__CallSite___msignature
].val
; /* _msignature on <var_callsite:nullable CallSite(CallSite)> */
7255 if (unlikely(var48
== NULL
)) {
7256 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _msignature");
7257 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 429);
7261 RET_LABEL47
:(void)0;
7264 var_msignature
= var46
;
7266 { /* Inline model#MSignature#return_mtype (var_msignature) on <var_msignature:MSignature> */
7267 var51
= var_msignature
->attrs
[COLOR_model__MSignature___return_mtype
].val
; /* _return_mtype on <var_msignature:MSignature> */
7269 RET_LABEL50
:(void)0;
7272 var_rettype
= var49
;
7274 var53
= model__MSignature__arity(var_msignature
);
7278 { /* Inline kernel#Int#== (var53,var54) on <var53:Int> */
7279 var58
= var53
== var54
;
7282 RET_LABEL57
:(void)0;
7289 if (var_rettype
== NULL
) {
7290 var60
= 0; /* is null */
7292 var60
= 1; /* arg is null and recv is not */
7295 { /* Inline kernel#Object#!= (var_rettype,var59) on <var_rettype:nullable MType> */
7296 var_other63
= var59
;
7298 var65
= ((short int (*)(val
*, val
*))(var_rettype
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_rettype
, var_other63
) /* == on <var_rettype:nullable MType(MType)>*/;
7304 RET_LABEL62
:(void)0;
7312 if (unlikely(!var52
)) {
7313 PRINT_ERROR("Runtime error: %s", "Assert failed");
7314 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 696);
7318 var67
= parser_nodes__AReassignFormExpr__n_value(self
);
7321 { /* Inline model#MSignature#mparameters (var_msignature) on <var_msignature:MSignature> */
7322 var70
= var_msignature
->attrs
[COLOR_model__MSignature___mparameters
].val
; /* _mparameters on <var_msignature:MSignature> */
7323 if (unlikely(var70
== NULL
)) {
7324 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mparameters");
7325 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1452);
7329 RET_LABEL69
:(void)0;
7333 var71
= abstract_collection__SequenceRead__first(var68
);
7336 { /* Inline model#MParameter#mtype (var71) on <var71:nullable Object(MParameter)> */
7337 var74
= var71
->attrs
[COLOR_model__MParameter___mtype
].val
; /* _mtype on <var71:nullable Object(MParameter)> */
7338 if (unlikely(var74
== NULL
)) {
7339 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mtype");
7340 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1552);
7344 RET_LABEL73
:(void)0;
7348 var75
= typing__TypeVisitor__visit_expr_subtype(var_v
, var67
, var72
);
7350 var_value_type
= var75
;
7352 if (var_value_type
== NULL
) {
7353 var77
= 1; /* is null */
7355 var77
= 0; /* arg is null but recv is not */
7358 { /* Inline kernel#Object#== (var_value_type,var76) on <var_value_type:nullable MType> */
7361 { /* Inline kernel#Object#is_same_instance (var_value_type,var_other) on <var_value_type:nullable MType(MType)> */
7362 var82
= var_value_type
== var_other
;
7365 RET_LABEL81
:(void)0;
7370 RET_LABEL79
:(void)0;
7381 var84
= typing__TypeVisitor__check_subtype(var_v
, self
, var_rettype
, var_writetype
);
7389 /* method typing#AReassignFormExpr#resolve_reassignment for (self: Object, TypeVisitor, MType, MType): nullable MType */
7390 val
* VIRTUAL_typing__AReassignFormExpr__resolve_reassignment(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
7391 val
* var
/* : nullable MType */;
7392 val
* var1
/* : nullable MType */;
7393 var1
= typing__AReassignFormExpr__resolve_reassignment(self
, p0
, p1
, p2
);
7398 /* method typing#AVarReassignExpr#accept_typing for (self: AVarReassignExpr, TypeVisitor) */
7399 void typing__AVarReassignExpr__accept_typing(val
* self
, val
* p0
) {
7400 val
* var_v
/* var v: TypeVisitor */;
7401 val
* var
/* : nullable Variable */;
7402 val
* var2
/* : nullable Variable */;
7403 val
* var_variable
/* var variable: nullable Variable */;
7404 val
* var3
/* : null */;
7405 short int var4
/* : Bool */;
7406 short int var5
/* : Bool */;
7407 val
* var_other
/* var other: nullable Object */;
7408 short int var7
/* : Bool */;
7409 short int var8
/* : Bool */;
7410 short int var9
/* : Bool */;
7411 val
* var10
/* : nullable MType */;
7412 val
* var_readtype
/* var readtype: nullable MType */;
7413 val
* var11
/* : null */;
7414 short int var12
/* : Bool */;
7415 short int var13
/* : Bool */;
7416 val
* var_other15
/* var other: nullable Object */;
7417 short int var16
/* : Bool */;
7418 short int var18
/* : Bool */;
7419 val
* var20
/* : nullable MType */;
7420 val
* var22
/* : nullable MType */;
7421 val
* var_writetype
/* var writetype: nullable MType */;
7422 val
* var23
/* : null */;
7423 short int var24
/* : Bool */;
7424 short int var25
/* : Bool */;
7425 short int var27
/* : Bool */;
7426 short int var29
/* : Bool */;
7427 val
* var30
/* : nullable MType */;
7428 val
* var_rettype
/* var rettype: nullable MType */;
7429 short int var31
/* : Bool */;
7432 { /* Inline scope#AVarFormExpr#variable (self) on <self:AVarReassignExpr> */
7433 var2
= self
->attrs
[COLOR_scope__AVarFormExpr___variable
].val
; /* _variable on <self:AVarReassignExpr> */
7440 if (var_variable
== NULL
) {
7441 var4
= 0; /* is null */
7443 var4
= 1; /* arg is null and recv is not */
7446 { /* Inline kernel#Object#!= (var_variable,var3) on <var_variable:nullable Variable> */
7449 var8
= ((short int (*)(val
*, val
*))(var_variable
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_variable
, var_other
) /* == on <var_variable:nullable Variable(Variable)>*/;
7459 if (unlikely(!var4
)) {
7460 PRINT_ERROR("Runtime error: %s", "Assert failed");
7461 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 710);
7465 var10
= typing__TypeVisitor__get_variable(var_v
, self
, var_variable
);
7467 var_readtype
= var10
;
7469 if (var_readtype
== NULL
) {
7470 var12
= 1; /* is null */
7472 var12
= 0; /* arg is null but recv is not */
7475 { /* Inline kernel#Object#== (var_readtype,var11) on <var_readtype:nullable MType> */
7476 var_other15
= var11
;
7478 { /* Inline kernel#Object#is_same_instance (var_readtype,var_other15) on <var_readtype:nullable MType(MType)> */
7479 var18
= var_readtype
== var_other15
;
7482 RET_LABEL17
:(void)0;
7487 RET_LABEL14
:(void)0;
7496 { /* Inline typing#AReassignFormExpr#read_type= (self,var_readtype) on <self:AVarReassignExpr> */
7497 self
->attrs
[COLOR_typing__AReassignFormExpr___read_type
].val
= var_readtype
; /* _read_type on <self:AVarReassignExpr> */
7498 RET_LABEL19
:(void)0;
7502 { /* Inline typing#Variable#declared_type (var_variable) on <var_variable:nullable Variable(Variable)> */
7503 var22
= var_variable
->attrs
[COLOR_typing__Variable___declared_type
].val
; /* _declared_type on <var_variable:nullable Variable(Variable)> */
7505 RET_LABEL21
:(void)0;
7508 var_writetype
= var20
;
7510 if (var_writetype
== NULL
) {
7511 var24
= 1; /* is null */
7513 var24
= 0; /* arg is null but recv is not */
7516 { /* Inline kernel#Object#== (var_writetype,var23) on <var_writetype:nullable MType> */
7517 var_other15
= var23
;
7519 { /* Inline kernel#Object#is_same_instance (var_writetype,var_other15) on <var_writetype:nullable MType(MType)> */
7520 var29
= var_writetype
== var_other15
;
7523 RET_LABEL28
:(void)0;
7528 RET_LABEL26
:(void)0;
7537 var30
= typing__AReassignFormExpr__resolve_reassignment(self
, var_v
, var_readtype
, var_writetype
);
7539 var_rettype
= var30
;
7541 typing__TypeVisitor__set_variable(var_v
, self
, var_variable
, var_rettype
); /* Direct call typing#TypeVisitor#set_variable on <var_v:TypeVisitor>*/
7545 { /* Inline typing#AExpr#is_typed= (self,var31) on <self:AVarReassignExpr> */
7546 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var31
; /* _is_typed on <self:AVarReassignExpr> */
7547 RET_LABEL32
:(void)0;
7552 /* method typing#AVarReassignExpr#accept_typing for (self: Object, TypeVisitor) */
7553 void VIRTUAL_typing__AVarReassignExpr__accept_typing(val
* self
, val
* p0
) {
7554 typing__AVarReassignExpr__accept_typing(self
, p0
); /* Direct call typing#AVarReassignExpr#accept_typing on <self:Object(AVarReassignExpr)>*/
7557 /* method typing#AContinueExpr#accept_typing for (self: AContinueExpr, TypeVisitor) */
7558 void typing__AContinueExpr__accept_typing(val
* self
, val
* p0
) {
7559 val
* var_v
/* var v: TypeVisitor */;
7560 val
* var
/* : nullable AExpr */;
7561 val
* var_nexpr
/* var nexpr: nullable AExpr */;
7562 val
* var1
/* : null */;
7563 short int var2
/* : Bool */;
7564 short int var3
/* : Bool */;
7565 val
* var_other
/* var other: nullable Object */;
7566 short int var5
/* : Bool */;
7567 short int var6
/* : Bool */;
7568 short int var7
/* : Bool */;
7569 val
* var8
/* : nullable MType */;
7570 val
* var_mtype
/* var mtype: nullable MType */;
7571 short int var9
/* : Bool */;
7574 var
= parser_nodes__AContinueExpr__n_expr(self
);
7578 if (var_nexpr
== NULL
) {
7579 var2
= 0; /* is null */
7581 var2
= 1; /* arg is null and recv is not */
7584 { /* Inline kernel#Object#!= (var_nexpr,var1) on <var_nexpr:nullable AExpr> */
7587 var6
= ((short int (*)(val
*, val
*))(var_nexpr
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nexpr
, var_other
) /* == on <var_nexpr:nullable AExpr(AExpr)>*/;
7599 var8
= typing__TypeVisitor__visit_expr(var_v
, var_nexpr
);
7606 { /* Inline typing#AExpr#is_typed= (self,var9) on <self:AContinueExpr> */
7607 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var9
; /* _is_typed on <self:AContinueExpr> */
7608 RET_LABEL10
:(void)0;
7613 /* method typing#AContinueExpr#accept_typing for (self: Object, TypeVisitor) */
7614 void VIRTUAL_typing__AContinueExpr__accept_typing(val
* self
, val
* p0
) {
7615 typing__AContinueExpr__accept_typing(self
, p0
); /* Direct call typing#AContinueExpr#accept_typing on <self:Object(AContinueExpr)>*/
7618 /* method typing#ABreakExpr#accept_typing for (self: ABreakExpr, TypeVisitor) */
7619 void typing__ABreakExpr__accept_typing(val
* self
, val
* p0
) {
7620 val
* var_v
/* var v: TypeVisitor */;
7621 val
* var
/* : nullable AExpr */;
7622 val
* var_nexpr
/* var nexpr: nullable AExpr */;
7623 val
* var1
/* : null */;
7624 short int var2
/* : Bool */;
7625 short int var3
/* : Bool */;
7626 val
* var_other
/* var other: nullable Object */;
7627 short int var5
/* : Bool */;
7628 short int var6
/* : Bool */;
7629 short int var7
/* : Bool */;
7630 val
* var8
/* : nullable MType */;
7631 val
* var_mtype
/* var mtype: nullable MType */;
7632 short int var9
/* : Bool */;
7635 var
= parser_nodes__ABreakExpr__n_expr(self
);
7639 if (var_nexpr
== NULL
) {
7640 var2
= 0; /* is null */
7642 var2
= 1; /* arg is null and recv is not */
7645 { /* Inline kernel#Object#!= (var_nexpr,var1) on <var_nexpr:nullable AExpr> */
7648 var6
= ((short int (*)(val
*, val
*))(var_nexpr
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nexpr
, var_other
) /* == on <var_nexpr:nullable AExpr(AExpr)>*/;
7660 var8
= typing__TypeVisitor__visit_expr(var_v
, var_nexpr
);
7667 { /* Inline typing#AExpr#is_typed= (self,var9) on <self:ABreakExpr> */
7668 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var9
; /* _is_typed on <self:ABreakExpr> */
7669 RET_LABEL10
:(void)0;
7674 /* method typing#ABreakExpr#accept_typing for (self: Object, TypeVisitor) */
7675 void VIRTUAL_typing__ABreakExpr__accept_typing(val
* self
, val
* p0
) {
7676 typing__ABreakExpr__accept_typing(self
, p0
); /* Direct call typing#ABreakExpr#accept_typing on <self:Object(ABreakExpr)>*/
7679 /* method typing#AReturnExpr#accept_typing for (self: AReturnExpr, TypeVisitor) */
7680 void typing__AReturnExpr__accept_typing(val
* self
, val
* p0
) {
7681 val
* var_v
/* var v: TypeVisitor */;
7682 val
* var
/* : nullable AExpr */;
7683 val
* var_nexpr
/* var nexpr: nullable AExpr */;
7684 val
* var1
/* : nullable MPropDef */;
7685 val
* var3
/* : nullable MPropDef */;
7686 short int var4
/* : Bool */;
7689 const char* var_class_name
;
7690 val
* var5
/* : nullable MSignature */;
7691 val
* var7
/* : nullable MSignature */;
7692 val
* var8
/* : nullable MType */;
7693 val
* var10
/* : nullable MType */;
7694 val
* var_ret_type
/* var ret_type: nullable MType */;
7695 val
* var11
/* : null */;
7696 short int var12
/* : Bool */;
7697 short int var13
/* : Bool */;
7698 val
* var_other
/* var other: nullable Object */;
7699 short int var15
/* : Bool */;
7700 short int var16
/* : Bool */;
7701 short int var17
/* : Bool */;
7702 val
* var18
/* : null */;
7703 short int var19
/* : Bool */;
7704 short int var20
/* : Bool */;
7705 short int var22
/* : Bool */;
7706 short int var23
/* : Bool */;
7707 short int var24
/* : Bool */;
7708 val
* var25
/* : nullable MType */;
7709 val
* var_mtype
/* var mtype: nullable MType */;
7710 val
* var26
/* : nullable MType */;
7711 val
* var_mtype27
/* var mtype: nullable MType */;
7712 static val
* varonce
;
7713 val
* var28
/* : String */;
7714 char* var29
/* : NativeString */;
7715 long var30
/* : Int */;
7716 val
* var31
/* : FlatString */;
7717 val
* var32
/* : null */;
7718 short int var33
/* : Bool */;
7719 short int var34
/* : Bool */;
7720 short int var36
/* : Bool */;
7721 short int var37
/* : Bool */;
7722 short int var38
/* : Bool */;
7723 static val
* varonce39
;
7724 val
* var40
/* : String */;
7725 char* var41
/* : NativeString */;
7726 long var42
/* : Int */;
7727 val
* var43
/* : FlatString */;
7728 short int var44
/* : Bool */;
7731 var
= parser_nodes__AReturnExpr__n_expr(self
);
7735 { /* Inline typing#TypeVisitor#mpropdef (var_v) on <var_v:TypeVisitor> */
7736 var3
= var_v
->attrs
[COLOR_typing__TypeVisitor___mpropdef
].val
; /* _mpropdef on <var_v:TypeVisitor> */
7741 /* <var1:nullable MPropDef> isa MMethodDef */
7742 cltype
= type_model__MMethodDef
.color
;
7743 idtype
= type_model__MMethodDef
.id
;
7747 if(cltype
>= var1
->type
->table_size
) {
7750 var4
= var1
->type
->type_table
[cltype
] == idtype
;
7753 if (unlikely(!var4
)) {
7754 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
7755 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MMethodDef", var_class_name
);
7756 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 755);
7760 { /* Inline model#MMethodDef#msignature (var1) on <var1:nullable MPropDef(MMethodDef)> */
7761 var7
= var1
->attrs
[COLOR_model__MMethodDef___msignature
].val
; /* _msignature on <var1:nullable MPropDef(MMethodDef)> */
7767 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7768 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 755);
7771 { /* Inline model#MSignature#return_mtype (var5) on <var5:nullable MSignature> */
7772 if (unlikely(var5
== NULL
)) {
7773 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7774 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1455);
7777 var10
= var5
->attrs
[COLOR_model__MSignature___return_mtype
].val
; /* _return_mtype on <var5:nullable MSignature> */
7782 var_ret_type
= var8
;
7784 if (var_nexpr
== NULL
) {
7785 var12
= 0; /* is null */
7787 var12
= 1; /* arg is null and recv is not */
7790 { /* Inline kernel#Object#!= (var_nexpr,var11) on <var_nexpr:nullable AExpr> */
7793 var16
= ((short int (*)(val
*, val
*))(var_nexpr
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nexpr
, var_other
) /* == on <var_nexpr:nullable AExpr(AExpr)>*/;
7799 RET_LABEL14
:(void)0;
7805 if (var_ret_type
== NULL
) {
7806 var19
= 0; /* is null */
7808 var19
= 1; /* arg is null and recv is not */
7811 { /* Inline kernel#Object#!= (var_ret_type,var18) on <var_ret_type:nullable MType> */
7814 var23
= ((short int (*)(val
*, val
*))(var_ret_type
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_ret_type
, var_other
) /* == on <var_ret_type:nullable MType(MType)>*/;
7820 RET_LABEL21
:(void)0;
7826 var25
= typing__TypeVisitor__visit_expr_subtype(var_v
, var_nexpr
, var_ret_type
);
7831 var26
= typing__TypeVisitor__visit_expr(var_v
, var_nexpr
);
7833 var_mtype27
= var26
;
7837 var29
= "Error: Return with value in a procedure.";
7839 var31
= string__NativeString__to_s_with_length(var29
, var30
);
7844 typing__TypeVisitor__error(var_v
, self
, var28
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
7849 if (var_ret_type
== NULL
) {
7850 var33
= 0; /* is null */
7852 var33
= 1; /* arg is null and recv is not */
7855 { /* Inline kernel#Object#!= (var_ret_type,var32) on <var_ret_type:nullable MType> */
7858 var37
= ((short int (*)(val
*, val
*))(var_ret_type
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_ret_type
, var_other
) /* == on <var_ret_type:nullable MType(MType)>*/;
7864 RET_LABEL35
:(void)0;
7872 var41
= "Error: Return without value in a function.";
7874 var43
= string__NativeString__to_s_with_length(var41
, var42
);
7879 typing__TypeVisitor__error(var_v
, self
, var40
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
7886 { /* Inline typing#AExpr#is_typed= (self,var44) on <self:AReturnExpr> */
7887 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var44
; /* _is_typed on <self:AReturnExpr> */
7888 RET_LABEL45
:(void)0;
7893 /* method typing#AReturnExpr#accept_typing for (self: Object, TypeVisitor) */
7894 void VIRTUAL_typing__AReturnExpr__accept_typing(val
* self
, val
* p0
) {
7895 typing__AReturnExpr__accept_typing(self
, p0
); /* Direct call typing#AReturnExpr#accept_typing on <self:Object(AReturnExpr)>*/
7898 /* method typing#AAbortExpr#accept_typing for (self: AAbortExpr, TypeVisitor) */
7899 void typing__AAbortExpr__accept_typing(val
* self
, val
* p0
) {
7900 val
* var_v
/* var v: TypeVisitor */;
7901 short int var
/* : Bool */;
7905 { /* Inline typing#AExpr#is_typed= (self,var) on <self:AAbortExpr> */
7906 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var
; /* _is_typed on <self:AAbortExpr> */
7912 /* method typing#AAbortExpr#accept_typing for (self: Object, TypeVisitor) */
7913 void VIRTUAL_typing__AAbortExpr__accept_typing(val
* self
, val
* p0
) {
7914 typing__AAbortExpr__accept_typing(self
, p0
); /* Direct call typing#AAbortExpr#accept_typing on <self:Object(AAbortExpr)>*/
7917 /* method typing#AIfExpr#accept_typing for (self: AIfExpr, TypeVisitor) */
7918 void typing__AIfExpr__accept_typing(val
* self
, val
* p0
) {
7919 val
* var_v
/* var v: TypeVisitor */;
7920 val
* var
/* : AExpr */;
7921 val
* var1
/* : nullable MType */;
7922 val
* var2
/* : nullable AExpr */;
7923 val
* var3
/* : nullable AExpr */;
7924 short int var4
/* : Bool */;
7927 var
= parser_nodes__AIfExpr__n_expr(self
);
7930 var1
= typing__TypeVisitor__visit_expr_bool(var_v
, var
);
7934 var2
= parser_nodes__AIfExpr__n_then(self
);
7937 typing__TypeVisitor__visit_stmt(var_v
, var2
); /* Direct call typing#TypeVisitor#visit_stmt on <var_v:TypeVisitor>*/
7940 var3
= parser_nodes__AIfExpr__n_else(self
);
7943 typing__TypeVisitor__visit_stmt(var_v
, var3
); /* Direct call typing#TypeVisitor#visit_stmt on <var_v:TypeVisitor>*/
7947 { /* Inline typing#AExpr#is_typed= (self,var4) on <self:AIfExpr> */
7948 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var4
; /* _is_typed on <self:AIfExpr> */
7954 /* method typing#AIfExpr#accept_typing for (self: Object, TypeVisitor) */
7955 void VIRTUAL_typing__AIfExpr__accept_typing(val
* self
, val
* p0
) {
7956 typing__AIfExpr__accept_typing(self
, p0
); /* Direct call typing#AIfExpr#accept_typing on <self:Object(AIfExpr)>*/
7959 /* method typing#AIfexprExpr#accept_typing for (self: AIfexprExpr, TypeVisitor) */
7960 void typing__AIfexprExpr__accept_typing(val
* self
, val
* p0
) {
7961 val
* var_v
/* var v: TypeVisitor */;
7962 val
* var
/* : AExpr */;
7963 val
* var1
/* : nullable MType */;
7964 val
* var2
/* : AExpr */;
7965 val
* var3
/* : nullable MType */;
7966 val
* var_t1
/* var t1: nullable MType */;
7967 val
* var4
/* : AExpr */;
7968 val
* var5
/* : nullable MType */;
7969 val
* var_t2
/* var t2: nullable MType */;
7970 short int var6
/* : Bool */;
7971 val
* var7
/* : null */;
7972 short int var8
/* : Bool */;
7973 short int var9
/* : Bool */;
7974 val
* var_other
/* var other: nullable Object */;
7975 short int var11
/* : Bool */;
7976 short int var13
/* : Bool */;
7977 short int var_
/* var : Bool */;
7978 val
* var14
/* : null */;
7979 short int var15
/* : Bool */;
7980 short int var16
/* : Bool */;
7981 short int var18
/* : Bool */;
7982 short int var20
/* : Bool */;
7983 val
* var21
/* : Array[MType] */;
7984 long var22
/* : Int */;
7985 val
* var_23
/* var : Array[MType] */;
7986 val
* var24
/* : nullable MType */;
7987 val
* var_t
/* var t: nullable MType */;
7988 val
* var25
/* : null */;
7989 short int var26
/* : Bool */;
7990 short int var27
/* : Bool */;
7991 short int var29
/* : Bool */;
7992 short int var31
/* : Bool */;
7993 static val
* varonce
;
7994 val
* var32
/* : String */;
7995 char* var33
/* : NativeString */;
7996 long var34
/* : Int */;
7997 val
* var35
/* : FlatString */;
7998 static val
* varonce36
;
7999 val
* var37
/* : String */;
8000 char* var38
/* : NativeString */;
8001 long var39
/* : Int */;
8002 val
* var40
/* : FlatString */;
8003 val
* var41
/* : Array[Object] */;
8004 long var42
/* : Int */;
8005 val
* var43
/* : NativeArray[Object] */;
8006 val
* var44
/* : String */;
8009 var
= parser_nodes__AIfexprExpr__n_expr(self
);
8012 var1
= typing__TypeVisitor__visit_expr_bool(var_v
, var
);
8016 var2
= parser_nodes__AIfexprExpr__n_then(self
);
8019 var3
= typing__TypeVisitor__visit_expr(var_v
, var2
);
8023 var4
= parser_nodes__AIfexprExpr__n_else(self
);
8026 var5
= typing__TypeVisitor__visit_expr(var_v
, var4
);
8030 if (var_t1
== NULL
) {
8031 var8
= 1; /* is null */
8033 var8
= 0; /* arg is null but recv is not */
8036 { /* Inline kernel#Object#== (var_t1,var7) on <var_t1:nullable MType> */
8039 { /* Inline kernel#Object#is_same_instance (var_t1,var_other) on <var_t1:nullable MType(MType)> */
8040 var13
= var_t1
== var_other
;
8043 RET_LABEL12
:(void)0;
8048 RET_LABEL10
:(void)0;
8057 if (var_t2
== NULL
) {
8058 var15
= 1; /* is null */
8060 var15
= 0; /* arg is null but recv is not */
8063 { /* Inline kernel#Object#== (var_t2,var14) on <var_t2:nullable MType> */
8066 { /* Inline kernel#Object#is_same_instance (var_t2,var_other) on <var_t2:nullable MType(MType)> */
8067 var20
= var_t2
== var_other
;
8070 RET_LABEL19
:(void)0;
8075 RET_LABEL17
:(void)0;
8085 var21
= NEW_array__Array(&type_array__Arraymodel__MType
);
8088 array__Array__with_capacity(var21
, var22
); /* Direct call array#Array#with_capacity on <var21:Array[MType]>*/
8092 array__AbstractArray__push(var_23
, var_t1
); /* Direct call array#AbstractArray#push on <var_23:Array[MType]>*/
8095 array__AbstractArray__push(var_23
, var_t2
); /* Direct call array#AbstractArray#push on <var_23:Array[MType]>*/
8098 var24
= typing__TypeVisitor__merge_types(var_v
, self
, var_23
);
8102 if (var_t
== NULL
) {
8103 var26
= 1; /* is null */
8105 var26
= 0; /* arg is null but recv is not */
8108 { /* Inline kernel#Object#== (var_t,var25) on <var_t:nullable MType> */
8111 { /* Inline kernel#Object#is_same_instance (var_t,var_other) on <var_t:nullable MType(MType)> */
8112 var31
= var_t
== var_other
;
8115 RET_LABEL30
:(void)0;
8120 RET_LABEL28
:(void)0;
8128 var33
= "Type Error: ambiguous type ";
8130 var35
= string__NativeString__to_s_with_length(var33
, var34
);
8139 var40
= string__NativeString__to_s_with_length(var38
, var39
);
8143 var41
= NEW_array__Array(&type_array__Arraykernel__Object
);
8144 { /* var41 = array_instance Array[Object] */
8146 var43
= NEW_array__NativeArray(var42
, &type_array__NativeArraykernel__Object
);
8147 ((struct instance_array__NativeArray
*)var43
)->values
[0] = (val
*) var32
;
8148 ((struct instance_array__NativeArray
*)var43
)->values
[1] = (val
*) var_t1
;
8149 ((struct instance_array__NativeArray
*)var43
)->values
[2] = (val
*) var37
;
8150 ((struct instance_array__NativeArray
*)var43
)->values
[3] = (val
*) var_t2
;
8152 ((void (*)(val
*, val
*, long))(var41
->class->vft
[COLOR_array__Array__with_native
]))(var41
, var43
, var42
) /* with_native on <var41:Array[Object]>*/;
8156 var44
= ((val
* (*)(val
*))(var41
->class->vft
[COLOR_string__Object__to_s
]))(var41
) /* to_s on <var41:Array[Object]>*/;
8159 typing__TypeVisitor__error(var_v
, self
, var44
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
8164 { /* Inline typing#AExpr#mtype= (self,var_t) on <self:AIfexprExpr> */
8165 self
->attrs
[COLOR_typing__AExpr___mtype
].val
= var_t
; /* _mtype on <self:AIfexprExpr> */
8166 RET_LABEL45
:(void)0;
8171 /* method typing#AIfexprExpr#accept_typing for (self: Object, TypeVisitor) */
8172 void VIRTUAL_typing__AIfexprExpr__accept_typing(val
* self
, val
* p0
) {
8173 typing__AIfexprExpr__accept_typing(self
, p0
); /* Direct call typing#AIfexprExpr#accept_typing on <self:Object(AIfexprExpr)>*/
8176 /* method typing#ADoExpr#accept_typing for (self: ADoExpr, TypeVisitor) */
8177 void typing__ADoExpr__accept_typing(val
* self
, val
* p0
) {
8178 val
* var_v
/* var v: TypeVisitor */;
8179 val
* var
/* : nullable AExpr */;
8180 short int var1
/* : Bool */;
8183 var
= parser_nodes__ADoExpr__n_block(self
);
8186 typing__TypeVisitor__visit_stmt(var_v
, var
); /* Direct call typing#TypeVisitor#visit_stmt on <var_v:TypeVisitor>*/
8190 { /* Inline typing#AExpr#is_typed= (self,var1) on <self:ADoExpr> */
8191 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var1
; /* _is_typed on <self:ADoExpr> */
8197 /* method typing#ADoExpr#accept_typing for (self: Object, TypeVisitor) */
8198 void VIRTUAL_typing__ADoExpr__accept_typing(val
* self
, val
* p0
) {
8199 typing__ADoExpr__accept_typing(self
, p0
); /* Direct call typing#ADoExpr#accept_typing on <self:Object(ADoExpr)>*/
8202 /* method typing#AWhileExpr#accept_typing for (self: AWhileExpr, TypeVisitor) */
8203 void typing__AWhileExpr__accept_typing(val
* self
, val
* p0
) {
8204 val
* var_v
/* var v: TypeVisitor */;
8205 val
* var
/* : AExpr */;
8206 val
* var1
/* : nullable MType */;
8207 val
* var2
/* : nullable AExpr */;
8208 short int var3
/* : Bool */;
8211 var
= parser_nodes__AWhileExpr__n_expr(self
);
8214 var1
= typing__TypeVisitor__visit_expr_bool(var_v
, var
);
8218 var2
= parser_nodes__AWhileExpr__n_block(self
);
8221 typing__TypeVisitor__visit_stmt(var_v
, var2
); /* Direct call typing#TypeVisitor#visit_stmt on <var_v:TypeVisitor>*/
8225 { /* Inline typing#AExpr#is_typed= (self,var3) on <self:AWhileExpr> */
8226 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var3
; /* _is_typed on <self:AWhileExpr> */
8232 /* method typing#AWhileExpr#accept_typing for (self: Object, TypeVisitor) */
8233 void VIRTUAL_typing__AWhileExpr__accept_typing(val
* self
, val
* p0
) {
8234 typing__AWhileExpr__accept_typing(self
, p0
); /* Direct call typing#AWhileExpr#accept_typing on <self:Object(AWhileExpr)>*/
8237 /* method typing#ALoopExpr#accept_typing for (self: ALoopExpr, TypeVisitor) */
8238 void typing__ALoopExpr__accept_typing(val
* self
, val
* p0
) {
8239 val
* var_v
/* var v: TypeVisitor */;
8240 val
* var
/* : nullable AExpr */;
8241 short int var1
/* : Bool */;
8244 var
= parser_nodes__ALoopExpr__n_block(self
);
8247 typing__TypeVisitor__visit_stmt(var_v
, var
); /* Direct call typing#TypeVisitor#visit_stmt on <var_v:TypeVisitor>*/
8251 { /* Inline typing#AExpr#is_typed= (self,var1) on <self:ALoopExpr> */
8252 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var1
; /* _is_typed on <self:ALoopExpr> */
8258 /* method typing#ALoopExpr#accept_typing for (self: Object, TypeVisitor) */
8259 void VIRTUAL_typing__ALoopExpr__accept_typing(val
* self
, val
* p0
) {
8260 typing__ALoopExpr__accept_typing(self
, p0
); /* Direct call typing#ALoopExpr#accept_typing on <self:Object(ALoopExpr)>*/
8263 /* method typing#AForExpr#coltype= for (self: AForExpr, nullable MClassType) */
8264 void typing__AForExpr__coltype_61d(val
* self
, val
* p0
) {
8265 self
->attrs
[COLOR_typing__AForExpr___coltype
].val
= p0
; /* _coltype on <self:AForExpr> */
8268 /* method typing#AForExpr#coltype= for (self: Object, nullable MClassType) */
8269 void VIRTUAL_typing__AForExpr__coltype_61d(val
* self
, val
* p0
) {
8270 { /* Inline typing#AForExpr#coltype= (self,p0) on <self:Object(AForExpr)> */
8271 self
->attrs
[COLOR_typing__AForExpr___coltype
].val
= p0
; /* _coltype on <self:Object(AForExpr)> */
8276 /* method typing#AForExpr#method_iterator for (self: AForExpr): nullable CallSite */
8277 val
* typing__AForExpr__method_iterator(val
* self
) {
8278 val
* var
/* : nullable CallSite */;
8279 val
* var1
/* : nullable CallSite */;
8280 var1
= self
->attrs
[COLOR_typing__AForExpr___method_iterator
].val
; /* _method_iterator on <self:AForExpr> */
8285 /* method typing#AForExpr#method_iterator for (self: Object): nullable CallSite */
8286 val
* VIRTUAL_typing__AForExpr__method_iterator(val
* self
) {
8287 val
* var
/* : nullable CallSite */;
8288 val
* var1
/* : nullable CallSite */;
8289 val
* var3
/* : nullable CallSite */;
8290 { /* Inline typing#AForExpr#method_iterator (self) on <self:Object(AForExpr)> */
8291 var3
= self
->attrs
[COLOR_typing__AForExpr___method_iterator
].val
; /* _method_iterator on <self:Object(AForExpr)> */
8299 /* method typing#AForExpr#method_iterator= for (self: AForExpr, nullable CallSite) */
8300 void typing__AForExpr__method_iterator_61d(val
* self
, val
* p0
) {
8301 self
->attrs
[COLOR_typing__AForExpr___method_iterator
].val
= p0
; /* _method_iterator on <self:AForExpr> */
8304 /* method typing#AForExpr#method_iterator= for (self: Object, nullable CallSite) */
8305 void VIRTUAL_typing__AForExpr__method_iterator_61d(val
* self
, val
* p0
) {
8306 { /* Inline typing#AForExpr#method_iterator= (self,p0) on <self:Object(AForExpr)> */
8307 self
->attrs
[COLOR_typing__AForExpr___method_iterator
].val
= p0
; /* _method_iterator on <self:Object(AForExpr)> */
8312 /* method typing#AForExpr#method_is_ok for (self: AForExpr): nullable CallSite */
8313 val
* typing__AForExpr__method_is_ok(val
* self
) {
8314 val
* var
/* : nullable CallSite */;
8315 val
* var1
/* : nullable CallSite */;
8316 var1
= self
->attrs
[COLOR_typing__AForExpr___method_is_ok
].val
; /* _method_is_ok on <self:AForExpr> */
8321 /* method typing#AForExpr#method_is_ok for (self: Object): nullable CallSite */
8322 val
* VIRTUAL_typing__AForExpr__method_is_ok(val
* self
) {
8323 val
* var
/* : nullable CallSite */;
8324 val
* var1
/* : nullable CallSite */;
8325 val
* var3
/* : nullable CallSite */;
8326 { /* Inline typing#AForExpr#method_is_ok (self) on <self:Object(AForExpr)> */
8327 var3
= self
->attrs
[COLOR_typing__AForExpr___method_is_ok
].val
; /* _method_is_ok on <self:Object(AForExpr)> */
8335 /* method typing#AForExpr#method_is_ok= for (self: AForExpr, nullable CallSite) */
8336 void typing__AForExpr__method_is_ok_61d(val
* self
, val
* p0
) {
8337 self
->attrs
[COLOR_typing__AForExpr___method_is_ok
].val
= p0
; /* _method_is_ok on <self:AForExpr> */
8340 /* method typing#AForExpr#method_is_ok= for (self: Object, nullable CallSite) */
8341 void VIRTUAL_typing__AForExpr__method_is_ok_61d(val
* self
, val
* p0
) {
8342 { /* Inline typing#AForExpr#method_is_ok= (self,p0) on <self:Object(AForExpr)> */
8343 self
->attrs
[COLOR_typing__AForExpr___method_is_ok
].val
= p0
; /* _method_is_ok on <self:Object(AForExpr)> */
8348 /* method typing#AForExpr#method_item for (self: AForExpr): nullable CallSite */
8349 val
* typing__AForExpr__method_item(val
* self
) {
8350 val
* var
/* : nullable CallSite */;
8351 val
* var1
/* : nullable CallSite */;
8352 var1
= self
->attrs
[COLOR_typing__AForExpr___method_item
].val
; /* _method_item on <self:AForExpr> */
8357 /* method typing#AForExpr#method_item for (self: Object): nullable CallSite */
8358 val
* VIRTUAL_typing__AForExpr__method_item(val
* self
) {
8359 val
* var
/* : nullable CallSite */;
8360 val
* var1
/* : nullable CallSite */;
8361 val
* var3
/* : nullable CallSite */;
8362 { /* Inline typing#AForExpr#method_item (self) on <self:Object(AForExpr)> */
8363 var3
= self
->attrs
[COLOR_typing__AForExpr___method_item
].val
; /* _method_item on <self:Object(AForExpr)> */
8371 /* method typing#AForExpr#method_item= for (self: AForExpr, nullable CallSite) */
8372 void typing__AForExpr__method_item_61d(val
* self
, val
* p0
) {
8373 self
->attrs
[COLOR_typing__AForExpr___method_item
].val
= p0
; /* _method_item on <self:AForExpr> */
8376 /* method typing#AForExpr#method_item= for (self: Object, nullable CallSite) */
8377 void VIRTUAL_typing__AForExpr__method_item_61d(val
* self
, val
* p0
) {
8378 { /* Inline typing#AForExpr#method_item= (self,p0) on <self:Object(AForExpr)> */
8379 self
->attrs
[COLOR_typing__AForExpr___method_item
].val
= p0
; /* _method_item on <self:Object(AForExpr)> */
8384 /* method typing#AForExpr#method_next for (self: AForExpr): nullable CallSite */
8385 val
* typing__AForExpr__method_next(val
* self
) {
8386 val
* var
/* : nullable CallSite */;
8387 val
* var1
/* : nullable CallSite */;
8388 var1
= self
->attrs
[COLOR_typing__AForExpr___method_next
].val
; /* _method_next on <self:AForExpr> */
8393 /* method typing#AForExpr#method_next for (self: Object): nullable CallSite */
8394 val
* VIRTUAL_typing__AForExpr__method_next(val
* self
) {
8395 val
* var
/* : nullable CallSite */;
8396 val
* var1
/* : nullable CallSite */;
8397 val
* var3
/* : nullable CallSite */;
8398 { /* Inline typing#AForExpr#method_next (self) on <self:Object(AForExpr)> */
8399 var3
= self
->attrs
[COLOR_typing__AForExpr___method_next
].val
; /* _method_next on <self:Object(AForExpr)> */
8407 /* method typing#AForExpr#method_next= for (self: AForExpr, nullable CallSite) */
8408 void typing__AForExpr__method_next_61d(val
* self
, val
* p0
) {
8409 self
->attrs
[COLOR_typing__AForExpr___method_next
].val
= p0
; /* _method_next on <self:AForExpr> */
8412 /* method typing#AForExpr#method_next= for (self: Object, nullable CallSite) */
8413 void VIRTUAL_typing__AForExpr__method_next_61d(val
* self
, val
* p0
) {
8414 { /* Inline typing#AForExpr#method_next= (self,p0) on <self:Object(AForExpr)> */
8415 self
->attrs
[COLOR_typing__AForExpr___method_next
].val
= p0
; /* _method_next on <self:Object(AForExpr)> */
8420 /* method typing#AForExpr#method_key for (self: AForExpr): nullable CallSite */
8421 val
* typing__AForExpr__method_key(val
* self
) {
8422 val
* var
/* : nullable CallSite */;
8423 val
* var1
/* : nullable CallSite */;
8424 var1
= self
->attrs
[COLOR_typing__AForExpr___method_key
].val
; /* _method_key on <self:AForExpr> */
8429 /* method typing#AForExpr#method_key for (self: Object): nullable CallSite */
8430 val
* VIRTUAL_typing__AForExpr__method_key(val
* self
) {
8431 val
* var
/* : nullable CallSite */;
8432 val
* var1
/* : nullable CallSite */;
8433 val
* var3
/* : nullable CallSite */;
8434 { /* Inline typing#AForExpr#method_key (self) on <self:Object(AForExpr)> */
8435 var3
= self
->attrs
[COLOR_typing__AForExpr___method_key
].val
; /* _method_key on <self:Object(AForExpr)> */
8443 /* method typing#AForExpr#method_key= for (self: AForExpr, nullable CallSite) */
8444 void typing__AForExpr__method_key_61d(val
* self
, val
* p0
) {
8445 self
->attrs
[COLOR_typing__AForExpr___method_key
].val
= p0
; /* _method_key on <self:AForExpr> */
8448 /* method typing#AForExpr#method_key= for (self: Object, nullable CallSite) */
8449 void VIRTUAL_typing__AForExpr__method_key_61d(val
* self
, val
* p0
) {
8450 { /* Inline typing#AForExpr#method_key= (self,p0) on <self:Object(AForExpr)> */
8451 self
->attrs
[COLOR_typing__AForExpr___method_key
].val
= p0
; /* _method_key on <self:Object(AForExpr)> */
8456 /* method typing#AForExpr#do_type_iterator for (self: AForExpr, TypeVisitor, MType) */
8457 void typing__AForExpr__do_type_iterator(val
* self
, val
* p0
, val
* p1
) {
8458 val
* var_v
/* var v: TypeVisitor */;
8459 val
* var_mtype
/* var mtype: MType */;
8460 short int var
/* : Bool */;
8463 static val
* varonce
;
8464 val
* var1
/* : String */;
8465 char* var2
/* : NativeString */;
8466 long var3
/* : Int */;
8467 val
* var4
/* : FlatString */;
8468 static val
* varonce5
;
8469 val
* var6
/* : String */;
8470 char* var7
/* : NativeString */;
8471 long var8
/* : Int */;
8472 val
* var9
/* : FlatString */;
8473 val
* var10
/* : nullable MClass */;
8474 val
* var_objcla
/* var objcla: nullable MClass */;
8475 val
* var11
/* : null */;
8476 short int var12
/* : Bool */;
8477 short int var13
/* : Bool */;
8478 val
* var_other
/* var other: nullable Object */;
8479 short int var15
/* : Bool */;
8480 short int var17
/* : Bool */;
8481 static val
* varonce18
;
8482 val
* var19
/* : String */;
8483 char* var20
/* : NativeString */;
8484 long var21
/* : Int */;
8485 val
* var22
/* : FlatString */;
8486 val
* var23
/* : AExpr */;
8487 short int var24
/* : Bool */;
8490 val
* var27
/* : nullable CallSite */;
8491 val
* var_itdef
/* var itdef: nullable CallSite */;
8492 val
* var28
/* : null */;
8493 short int var29
/* : Bool */;
8494 short int var30
/* : Bool */;
8495 short int var32
/* : Bool */;
8496 short int var34
/* : Bool */;
8497 static val
* varonce35
;
8498 val
* var36
/* : String */;
8499 char* var37
/* : NativeString */;
8500 long var38
/* : Int */;
8501 val
* var39
/* : FlatString */;
8502 static val
* varonce40
;
8503 val
* var41
/* : String */;
8504 char* var42
/* : NativeString */;
8505 long var43
/* : Int */;
8506 val
* var44
/* : FlatString */;
8507 val
* var45
/* : Array[Object] */;
8508 long var46
/* : Int */;
8509 val
* var47
/* : NativeArray[Object] */;
8510 val
* var48
/* : String */;
8511 val
* var50
/* : MSignature */;
8512 val
* var52
/* : MSignature */;
8513 val
* var53
/* : nullable MType */;
8514 val
* var55
/* : nullable MType */;
8515 val
* var_ittype
/* var ittype: nullable MType */;
8516 val
* var56
/* : null */;
8517 short int var57
/* : Bool */;
8518 short int var58
/* : Bool */;
8519 short int var60
/* : Bool */;
8520 short int var62
/* : Bool */;
8521 static val
* varonce63
;
8522 val
* var64
/* : String */;
8523 char* var65
/* : NativeString */;
8524 long var66
/* : Int */;
8525 val
* var67
/* : FlatString */;
8526 static val
* varonce68
;
8527 val
* var69
/* : String */;
8528 char* var70
/* : NativeString */;
8529 long var71
/* : Int */;
8530 val
* var72
/* : FlatString */;
8531 val
* var73
/* : nullable MClass */;
8532 val
* var_colit_cla
/* var colit_cla: nullable MClass */;
8533 static val
* varonce74
;
8534 val
* var75
/* : String */;
8535 char* var76
/* : NativeString */;
8536 long var77
/* : Int */;
8537 val
* var78
/* : FlatString */;
8538 val
* var79
/* : nullable MClass */;
8539 val
* var_mapit_cla
/* var mapit_cla: nullable MClass */;
8540 short int var80
/* : Bool */;
8541 short int var_is_col
/* var is_col: Bool */;
8542 short int var81
/* : Bool */;
8543 short int var_is_map
/* var is_map: Bool */;
8544 short int var82
/* : Bool */;
8545 val
* var83
/* : null */;
8546 short int var84
/* : Bool */;
8547 short int var85
/* : Bool */;
8548 val
* var_other87
/* var other: nullable Object */;
8549 short int var88
/* : Bool */;
8550 short int var89
/* : Bool */;
8551 short int var90
/* : Bool */;
8552 short int var_
/* var : Bool */;
8553 val
* var91
/* : Array[MType] */;
8554 long var92
/* : Int */;
8555 val
* var_93
/* var : Array[MType] */;
8556 val
* var94
/* : MClassType */;
8557 val
* var96
/* : MClassType */;
8558 val
* var97
/* : MType */;
8559 val
* var98
/* : MClassType */;
8560 short int var99
/* : Bool */;
8561 val
* var100
/* : MModule */;
8562 val
* var102
/* : MModule */;
8563 val
* var103
/* : nullable MClassType */;
8564 val
* var105
/* : nullable MClassType */;
8565 val
* var106
/* : MClassType */;
8566 val
* var_coltype
/* var coltype: MClassType */;
8567 val
* var107
/* : nullable Array[Variable] */;
8568 val
* var109
/* : nullable Array[Variable] */;
8569 val
* var_variables
/* var variables: nullable Array[Variable] */;
8570 long var110
/* : Int */;
8571 long var111
/* : Int */;
8572 short int var112
/* : Bool */;
8573 short int var113
/* : Bool */;
8574 short int var115
/* : Bool */;
8575 short int var116
/* : Bool */;
8576 static val
* varonce117
;
8577 val
* var118
/* : String */;
8578 char* var119
/* : NativeString */;
8579 long var120
/* : Int */;
8580 val
* var121
/* : FlatString */;
8581 val
* var122
/* : nullable Object */;
8582 val
* var123
/* : Array[MType] */;
8583 val
* var125
/* : Array[MType] */;
8584 val
* var126
/* : nullable Object */;
8585 short int var128
/* : Bool */;
8586 short int var129
/* : Bool */;
8587 val
* var130
/* : null */;
8588 short int var131
/* : Bool */;
8589 short int var132
/* : Bool */;
8590 short int var134
/* : Bool */;
8591 short int var135
/* : Bool */;
8592 short int var136
/* : Bool */;
8593 short int var_137
/* var : Bool */;
8594 val
* var138
/* : Array[MType] */;
8595 long var139
/* : Int */;
8596 val
* var_140
/* var : Array[MType] */;
8597 val
* var141
/* : MClassType */;
8598 val
* var143
/* : MClassType */;
8599 val
* var144
/* : MClassType */;
8600 val
* var146
/* : MClassType */;
8601 val
* var147
/* : MType */;
8602 val
* var148
/* : MClassType */;
8603 short int var149
/* : Bool */;
8604 val
* var150
/* : MModule */;
8605 val
* var152
/* : MModule */;
8606 val
* var153
/* : nullable MClassType */;
8607 val
* var155
/* : nullable MClassType */;
8608 val
* var156
/* : MClassType */;
8609 val
* var_coltype157
/* var coltype: MClassType */;
8610 val
* var158
/* : nullable Array[Variable] */;
8611 val
* var160
/* : nullable Array[Variable] */;
8612 val
* var_variables161
/* var variables: nullable Array[Variable] */;
8613 long var162
/* : Int */;
8614 long var163
/* : Int */;
8615 short int var164
/* : Bool */;
8616 short int var165
/* : Bool */;
8617 short int var167
/* : Bool */;
8618 short int var168
/* : Bool */;
8619 static val
* varonce169
;
8620 val
* var170
/* : String */;
8621 char* var171
/* : NativeString */;
8622 long var172
/* : Int */;
8623 val
* var173
/* : FlatString */;
8624 long var174
/* : Int */;
8625 val
* var175
/* : nullable Object */;
8626 val
* var176
/* : Array[MType] */;
8627 val
* var178
/* : Array[MType] */;
8628 long var179
/* : Int */;
8629 val
* var180
/* : nullable Object */;
8630 long var182
/* : Int */;
8631 val
* var183
/* : nullable Object */;
8632 val
* var184
/* : Array[MType] */;
8633 val
* var186
/* : Array[MType] */;
8634 long var187
/* : Int */;
8635 val
* var188
/* : nullable Object */;
8636 short int var190
/* : Bool */;
8637 short int var191
/* : Bool */;
8638 short int var192
/* : Bool */;
8639 short int var_193
/* var : Bool */;
8640 short int var194
/* : Bool */;
8641 static val
* varonce195
;
8642 val
* var196
/* : String */;
8643 char* var197
/* : NativeString */;
8644 long var198
/* : Int */;
8645 val
* var199
/* : FlatString */;
8646 short int var200
/* : Bool */;
8647 val
* var201
/* : MType */;
8648 val
* var202
/* : MType */;
8649 short int var203
/* : Bool */;
8652 const char* var_class_name
;
8653 static val
* varonce207
;
8654 val
* var208
/* : String */;
8655 char* var209
/* : NativeString */;
8656 long var210
/* : Int */;
8657 val
* var211
/* : FlatString */;
8658 short int var212
/* : Bool */;
8659 val
* var213
/* : nullable CallSite */;
8660 val
* var_ikdef
/* var ikdef: nullable CallSite */;
8661 val
* var214
/* : null */;
8662 short int var215
/* : Bool */;
8663 short int var216
/* : Bool */;
8664 short int var218
/* : Bool */;
8665 short int var220
/* : Bool */;
8666 static val
* varonce221
;
8667 val
* var222
/* : String */;
8668 char* var223
/* : NativeString */;
8669 long var224
/* : Int */;
8670 val
* var225
/* : FlatString */;
8671 static val
* varonce226
;
8672 val
* var227
/* : String */;
8673 char* var228
/* : NativeString */;
8674 long var229
/* : Int */;
8675 val
* var230
/* : FlatString */;
8676 val
* var231
/* : Array[Object] */;
8677 long var232
/* : Int */;
8678 val
* var233
/* : NativeArray[Object] */;
8679 val
* var234
/* : String */;
8680 static val
* varonce236
;
8681 val
* var237
/* : String */;
8682 char* var238
/* : NativeString */;
8683 long var239
/* : Int */;
8684 val
* var240
/* : FlatString */;
8685 short int var241
/* : Bool */;
8686 val
* var242
/* : nullable CallSite */;
8687 val
* var_itemdef
/* var itemdef: nullable CallSite */;
8688 val
* var243
/* : null */;
8689 short int var244
/* : Bool */;
8690 short int var245
/* : Bool */;
8691 short int var247
/* : Bool */;
8692 short int var249
/* : Bool */;
8693 static val
* varonce250
;
8694 val
* var251
/* : String */;
8695 char* var252
/* : NativeString */;
8696 long var253
/* : Int */;
8697 val
* var254
/* : FlatString */;
8698 static val
* varonce255
;
8699 val
* var256
/* : String */;
8700 char* var257
/* : NativeString */;
8701 long var258
/* : Int */;
8702 val
* var259
/* : FlatString */;
8703 val
* var260
/* : Array[Object] */;
8704 long var261
/* : Int */;
8705 val
* var262
/* : NativeArray[Object] */;
8706 val
* var263
/* : String */;
8707 static val
* varonce265
;
8708 val
* var266
/* : String */;
8709 char* var267
/* : NativeString */;
8710 long var268
/* : Int */;
8711 val
* var269
/* : FlatString */;
8712 short int var270
/* : Bool */;
8713 val
* var271
/* : nullable CallSite */;
8714 val
* var_nextdef
/* var nextdef: nullable CallSite */;
8715 val
* var272
/* : null */;
8716 short int var273
/* : Bool */;
8717 short int var274
/* : Bool */;
8718 short int var276
/* : Bool */;
8719 short int var278
/* : Bool */;
8720 static val
* varonce279
;
8721 val
* var280
/* : String */;
8722 char* var281
/* : NativeString */;
8723 long var282
/* : Int */;
8724 val
* var283
/* : FlatString */;
8725 static val
* varonce284
;
8726 val
* var285
/* : String */;
8727 char* var286
/* : NativeString */;
8728 long var287
/* : Int */;
8729 val
* var288
/* : FlatString */;
8730 val
* var289
/* : Array[Object] */;
8731 long var290
/* : Int */;
8732 val
* var291
/* : NativeArray[Object] */;
8733 val
* var292
/* : String */;
8734 static val
* varonce294
;
8735 val
* var295
/* : String */;
8736 char* var296
/* : NativeString */;
8737 long var297
/* : Int */;
8738 val
* var298
/* : FlatString */;
8739 short int var299
/* : Bool */;
8740 val
* var300
/* : nullable CallSite */;
8741 val
* var_keydef
/* var keydef: nullable CallSite */;
8742 val
* var301
/* : null */;
8743 short int var302
/* : Bool */;
8744 short int var303
/* : Bool */;
8745 short int var305
/* : Bool */;
8746 short int var307
/* : Bool */;
8747 static val
* varonce308
;
8748 val
* var309
/* : String */;
8749 char* var310
/* : NativeString */;
8750 long var311
/* : Int */;
8751 val
* var312
/* : FlatString */;
8752 static val
* varonce313
;
8753 val
* var314
/* : String */;
8754 char* var315
/* : NativeString */;
8755 long var316
/* : Int */;
8756 val
* var317
/* : FlatString */;
8757 val
* var318
/* : Array[Object] */;
8758 long var319
/* : Int */;
8759 val
* var320
/* : NativeArray[Object] */;
8760 val
* var321
/* : String */;
8763 /* <var_mtype:MType> isa MNullType */
8764 cltype
= type_model__MNullType
.color
;
8765 idtype
= type_model__MNullType
.id
;
8766 if(cltype
>= var_mtype
->type
->table_size
) {
8769 var
= var_mtype
->type
->type_table
[cltype
] == idtype
;
8775 var2
= "Type error: \'for\' cannot iterate over \'null\'";
8777 var4
= string__NativeString__to_s_with_length(var2
, var3
);
8782 typing__TypeVisitor__error(var_v
, self
, var1
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
8792 var9
= string__NativeString__to_s_with_length(var7
, var8
);
8797 var10
= typing__TypeVisitor__get_mclass(var_v
, self
, var6
);
8801 if (var_objcla
== NULL
) {
8802 var12
= 1; /* is null */
8804 var12
= 0; /* arg is null but recv is not */
8807 { /* Inline kernel#Object#== (var_objcla,var11) on <var_objcla:nullable MClass> */
8810 { /* Inline kernel#Object#is_same_instance (var_objcla,var_other) on <var_objcla:nullable MClass(MClass)> */
8811 var17
= var_objcla
== var_other
;
8814 RET_LABEL16
:(void)0;
8819 RET_LABEL14
:(void)0;
8832 var22
= string__NativeString__to_s_with_length(var20
, var21
);
8837 var23
= parser_nodes__AForExpr__n_expr(self
);
8839 /* <var23:AExpr> isa ASelfExpr */
8840 cltype25
= type_parser_nodes__ASelfExpr
.color
;
8841 idtype26
= type_parser_nodes__ASelfExpr
.id
;
8842 if(cltype25
>= var23
->type
->table_size
) {
8845 var24
= var23
->type
->type_table
[cltype25
] == idtype26
;
8848 var27
= typing__TypeVisitor__get_method(var_v
, self
, var_mtype
, var19
, var24
);
8852 if (var_itdef
== NULL
) {
8853 var29
= 1; /* is null */
8855 var29
= 0; /* arg is null but recv is not */
8858 { /* Inline kernel#Object#== (var_itdef,var28) on <var_itdef:nullable CallSite> */
8861 { /* Inline kernel#Object#is_same_instance (var_itdef,var_other) on <var_itdef:nullable CallSite(CallSite)> */
8862 var34
= var_itdef
== var_other
;
8865 RET_LABEL33
:(void)0;
8870 RET_LABEL31
:(void)0;
8878 var37
= "Type Error: \'for\' expects a type providing \'iterator\' method, got \'";
8880 var39
= string__NativeString__to_s_with_length(var37
, var38
);
8889 var44
= string__NativeString__to_s_with_length(var42
, var43
);
8893 var45
= NEW_array__Array(&type_array__Arraykernel__Object
);
8894 { /* var45 = array_instance Array[Object] */
8896 var47
= NEW_array__NativeArray(var46
, &type_array__NativeArraykernel__Object
);
8897 ((struct instance_array__NativeArray
*)var47
)->values
[0] = (val
*) var36
;
8898 ((struct instance_array__NativeArray
*)var47
)->values
[1] = (val
*) var_mtype
;
8899 ((struct instance_array__NativeArray
*)var47
)->values
[2] = (val
*) var41
;
8901 ((void (*)(val
*, val
*, long))(var45
->class->vft
[COLOR_array__Array__with_native
]))(var45
, var47
, var46
) /* with_native on <var45:Array[Object]>*/;
8905 var48
= ((val
* (*)(val
*))(var45
->class->vft
[COLOR_string__Object__to_s
]))(var45
) /* to_s on <var45:Array[Object]>*/;
8908 typing__TypeVisitor__error(var_v
, self
, var48
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
8914 { /* Inline typing#AForExpr#method_iterator= (self,var_itdef) on <self:AForExpr> */
8915 self
->attrs
[COLOR_typing__AForExpr___method_iterator
].val
= var_itdef
; /* _method_iterator on <self:AForExpr> */
8916 RET_LABEL49
:(void)0;
8920 { /* Inline typing#CallSite#msignature (var_itdef) on <var_itdef:nullable CallSite(CallSite)> */
8921 var52
= var_itdef
->attrs
[COLOR_typing__CallSite___msignature
].val
; /* _msignature on <var_itdef:nullable CallSite(CallSite)> */
8922 if (unlikely(var52
== NULL
)) {
8923 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _msignature");
8924 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 429);
8928 RET_LABEL51
:(void)0;
8932 { /* Inline model#MSignature#return_mtype (var50) on <var50:MSignature> */
8933 var55
= var50
->attrs
[COLOR_model__MSignature___return_mtype
].val
; /* _return_mtype on <var50:MSignature> */
8935 RET_LABEL54
:(void)0;
8940 if (var_ittype
== NULL
) {
8941 var57
= 1; /* is null */
8943 var57
= 0; /* arg is null but recv is not */
8946 { /* Inline kernel#Object#== (var_ittype,var56) on <var_ittype:nullable MType> */
8949 { /* Inline kernel#Object#is_same_instance (var_ittype,var_other) on <var_ittype:nullable MType(MType)> */
8950 var62
= var_ittype
== var_other
;
8953 RET_LABEL61
:(void)0;
8958 RET_LABEL59
:(void)0;
8966 var65
= "Type Error: \'for\' expects method \'iterator\' to return an \'Iterator\' or \'MapIterator\' type\'.";
8968 var67
= string__NativeString__to_s_with_length(var65
, var66
);
8973 typing__TypeVisitor__error(var_v
, self
, var64
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
8983 var72
= string__NativeString__to_s_with_length(var70
, var71
);
8988 var73
= typing__TypeVisitor__try_get_mclass(var_v
, self
, var69
);
8990 var_colit_cla
= var73
;
8994 var76
= "MapIterator";
8996 var78
= string__NativeString__to_s_with_length(var76
, var77
);
9001 var79
= typing__TypeVisitor__try_get_mclass(var_v
, self
, var75
);
9003 var_mapit_cla
= var79
;
9009 if (var_colit_cla
== NULL
) {
9010 var84
= 0; /* is null */
9012 var84
= 1; /* arg is null and recv is not */
9015 { /* Inline kernel#Object#!= (var_colit_cla,var83) on <var_colit_cla:nullable MClass> */
9016 var_other87
= var83
;
9018 var89
= ((short int (*)(val
*, val
*))(var_colit_cla
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_colit_cla
, var_other87
) /* == on <var_colit_cla:nullable MClass(MClass)>*/;
9024 RET_LABEL86
:(void)0;
9030 var91
= NEW_array__Array(&type_array__Arraymodel__MType
);
9033 array__Array__with_capacity(var91
, var92
); /* Direct call array#Array#with_capacity on <var91:Array[MType]>*/
9037 { /* Inline model#MClass#mclass_type (var_objcla) on <var_objcla:nullable MClass(MClass)> */
9038 var96
= var_objcla
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_objcla:nullable MClass(MClass)> */
9039 if (unlikely(var96
== NULL
)) {
9040 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
9041 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
9045 RET_LABEL95
:(void)0;
9049 var97
= model__MType__as_nullable(var94
);
9052 array__AbstractArray__push(var_93
, var97
); /* Direct call array#AbstractArray#push on <var_93:Array[MType]>*/
9055 var98
= model__MClass__get_mtype(var_colit_cla
, var_93
);
9058 var99
= typing__TypeVisitor__is_subtype(var_v
, var_ittype
, var98
);
9066 { /* Inline typing#TypeVisitor#mmodule (var_v) on <var_v:TypeVisitor> */
9067 var102
= var_v
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <var_v:TypeVisitor> */
9068 if (unlikely(var102
== NULL
)) {
9069 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
9070 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
9074 RET_LABEL101
:(void)0;
9078 { /* Inline typing#TypeVisitor#anchor (var_v) on <var_v:TypeVisitor> */
9079 var105
= var_v
->attrs
[COLOR_typing__TypeVisitor___anchor
].val
; /* _anchor on <var_v:TypeVisitor> */
9081 RET_LABEL104
:(void)0;
9085 var106
= model__MType__supertype_to(var_ittype
, var100
, var103
, var_colit_cla
);
9087 var_coltype
= var106
;
9089 { /* Inline scope#AForExpr#variables (self) on <self:AForExpr> */
9090 var109
= self
->attrs
[COLOR_scope__AForExpr___variables
].val
; /* _variables on <self:AForExpr> */
9092 RET_LABEL108
:(void)0;
9095 var_variables
= var107
;
9096 if (var_variables
== NULL
) {
9097 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9098 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 879);
9101 var110
= array__AbstractArrayRead__length(var_variables
);
9105 { /* Inline kernel#Int#!= (var110,var111) on <var110:Int> */
9106 var115
= var110
== var111
;
9110 RET_LABEL114
:(void)0;
9116 var118
= varonce117
;
9118 var119
= "Type Error: \'for\' expects only one variable when using \'Iterator\'.";
9120 var121
= string__NativeString__to_s_with_length(var119
, var120
);
9122 varonce117
= var118
;
9125 typing__TypeVisitor__error(var_v
, self
, var118
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
9128 if (var_variables
== NULL
) {
9129 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9130 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 882);
9133 var122
= abstract_collection__SequenceRead__first(var_variables
);
9136 { /* Inline model#MClassType#arguments (var_coltype) on <var_coltype:MClassType> */
9137 var125
= var_coltype
->attrs
[COLOR_model__MClassType___arguments
].val
; /* _arguments on <var_coltype:MClassType> */
9138 if (unlikely(var125
== NULL
)) {
9139 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _arguments");
9140 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 979);
9144 RET_LABEL124
:(void)0;
9148 var126
= abstract_collection__SequenceRead__first(var123
);
9151 { /* Inline typing#Variable#declared_type= (var122,var126) on <var122:nullable Object(Variable)> */
9152 var122
->attrs
[COLOR_typing__Variable___declared_type
].val
= var126
; /* _declared_type on <var122:nullable Object(Variable)> */
9153 RET_LABEL127
:(void)0;
9158 var_is_col
= var128
;
9162 if (var_mapit_cla
== NULL
) {
9163 var131
= 0; /* is null */
9165 var131
= 1; /* arg is null and recv is not */
9168 { /* Inline kernel#Object#!= (var_mapit_cla,var130) on <var_mapit_cla:nullable MClass> */
9169 var_other87
= var130
;
9171 var135
= ((short int (*)(val
*, val
*))(var_mapit_cla
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_mapit_cla
, var_other87
) /* == on <var_mapit_cla:nullable MClass(MClass)>*/;
9177 RET_LABEL133
:(void)0;
9183 var138
= NEW_array__Array(&type_array__Arraymodel__MType
);
9186 array__Array__with_capacity(var138
, var139
); /* Direct call array#Array#with_capacity on <var138:Array[MType]>*/
9190 { /* Inline model#MClass#mclass_type (var_objcla) on <var_objcla:nullable MClass(MClass)> */
9191 var143
= var_objcla
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_objcla:nullable MClass(MClass)> */
9192 if (unlikely(var143
== NULL
)) {
9193 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
9194 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
9198 RET_LABEL142
:(void)0;
9202 array__AbstractArray__push(var_140
, var141
); /* Direct call array#AbstractArray#push on <var_140:Array[MType]>*/
9205 { /* Inline model#MClass#mclass_type (var_objcla) on <var_objcla:nullable MClass(MClass)> */
9206 var146
= var_objcla
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_objcla:nullable MClass(MClass)> */
9207 if (unlikely(var146
== NULL
)) {
9208 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
9209 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
9213 RET_LABEL145
:(void)0;
9217 var147
= model__MType__as_nullable(var144
);
9220 array__AbstractArray__push(var_140
, var147
); /* Direct call array#AbstractArray#push on <var_140:Array[MType]>*/
9223 var148
= model__MClass__get_mtype(var_mapit_cla
, var_140
);
9226 var149
= typing__TypeVisitor__is_subtype(var_v
, var_ittype
, var148
);
9234 { /* Inline typing#TypeVisitor#mmodule (var_v) on <var_v:TypeVisitor> */
9235 var152
= var_v
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <var_v:TypeVisitor> */
9236 if (unlikely(var152
== NULL
)) {
9237 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
9238 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 38);
9242 RET_LABEL151
:(void)0;
9246 { /* Inline typing#TypeVisitor#anchor (var_v) on <var_v:TypeVisitor> */
9247 var155
= var_v
->attrs
[COLOR_typing__TypeVisitor___anchor
].val
; /* _anchor on <var_v:TypeVisitor> */
9249 RET_LABEL154
:(void)0;
9253 var156
= model__MType__supertype_to(var_ittype
, var150
, var153
, var_mapit_cla
);
9255 var_coltype157
= var156
;
9257 { /* Inline scope#AForExpr#variables (self) on <self:AForExpr> */
9258 var160
= self
->attrs
[COLOR_scope__AForExpr___variables
].val
; /* _variables on <self:AForExpr> */
9260 RET_LABEL159
:(void)0;
9263 var_variables161
= var158
;
9264 if (var_variables161
== NULL
) {
9265 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9266 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 891);
9269 var162
= array__AbstractArrayRead__length(var_variables161
);
9273 { /* Inline kernel#Int#!= (var162,var163) on <var162:Int> */
9274 var167
= var162
== var163
;
9278 RET_LABEL166
:(void)0;
9284 var170
= varonce169
;
9286 var171
= "Type Error: \'for\' expects two variables when using \'MapIterator\'.";
9288 var173
= string__NativeString__to_s_with_length(var171
, var172
);
9290 varonce169
= var170
;
9293 typing__TypeVisitor__error(var_v
, self
, var170
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
9297 if (var_variables161
== NULL
) {
9298 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9299 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 894);
9302 var175
= array__Array___91d_93d(var_variables161
, var174
);
9305 { /* Inline model#MClassType#arguments (var_coltype157) on <var_coltype157:MClassType> */
9306 var178
= var_coltype157
->attrs
[COLOR_model__MClassType___arguments
].val
; /* _arguments on <var_coltype157:MClassType> */
9307 if (unlikely(var178
== NULL
)) {
9308 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _arguments");
9309 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 979);
9313 RET_LABEL177
:(void)0;
9318 var180
= array__Array___91d_93d(var176
, var179
);
9321 { /* Inline typing#Variable#declared_type= (var175,var180) on <var175:nullable Object(Variable)> */
9322 var175
->attrs
[COLOR_typing__Variable___declared_type
].val
= var180
; /* _declared_type on <var175:nullable Object(Variable)> */
9323 RET_LABEL181
:(void)0;
9327 if (var_variables161
== NULL
) {
9328 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9329 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 895);
9332 var183
= array__Array___91d_93d(var_variables161
, var182
);
9335 { /* Inline model#MClassType#arguments (var_coltype157) on <var_coltype157:MClassType> */
9336 var186
= var_coltype157
->attrs
[COLOR_model__MClassType___arguments
].val
; /* _arguments on <var_coltype157:MClassType> */
9337 if (unlikely(var186
== NULL
)) {
9338 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _arguments");
9339 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 979);
9343 RET_LABEL185
:(void)0;
9348 var188
= array__Array___91d_93d(var184
, var187
);
9351 { /* Inline typing#Variable#declared_type= (var183,var188) on <var183:nullable Object(Variable)> */
9352 var183
->attrs
[COLOR_typing__Variable___declared_type
].val
= var188
; /* _declared_type on <var183:nullable Object(Variable)> */
9353 RET_LABEL189
:(void)0;
9358 var_is_map
= var190
;
9361 var192
= !var_is_col
;
9364 var194
= !var_is_map
;
9371 var196
= varonce195
;
9373 var197
= "Type Error: \'for\' expects method \'iterator\' to return an \'Iterator\' or \'MapIterator\' type\'.";
9375 var199
= string__NativeString__to_s_with_length(var197
, var198
);
9377 varonce195
= var196
;
9380 typing__TypeVisitor__error(var_v
, self
, var196
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
9386 var200
= ((short int (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MType__need_anchor
]))(var_mtype
) /* need_anchor on <var_mtype:MType>*/;
9390 var201
= typing__TypeVisitor__anchor_to(var_v
, var_mtype
);
9396 var202
= ((val
* (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MType__as_notnullable
]))(var_mtype
) /* as_notnullable on <var_mtype:MType>*/;
9399 /* <var_mtype:MType> isa MClassType */
9400 cltype204
= type_model__MClassType
.color
;
9401 idtype205
= type_model__MClassType
.id
;
9402 if(cltype204
>= var_mtype
->type
->table_size
) {
9405 var203
= var_mtype
->type
->type_table
[cltype204
] == idtype205
;
9407 if (unlikely(!var203
)) {
9408 var_class_name
= var_mtype
== NULL ?
"null" : var_mtype
->type
->name
;
9409 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
9410 PRINT_ERROR(" (%s:%d)\n", "src/typing.nit", 909);
9414 { /* Inline typing#AForExpr#coltype= (self,var_mtype) on <self:AForExpr> */
9415 self
->attrs
[COLOR_typing__AForExpr___coltype
].val
= var_mtype
; /* _coltype on <self:AForExpr> */
9416 RET_LABEL206
:(void)0;
9420 var208
= varonce207
;
9424 var211
= string__NativeString__to_s_with_length(var209
, var210
);
9426 varonce207
= var208
;
9430 var213
= typing__TypeVisitor__get_method(var_v
, self
, var_ittype
, var208
, var212
);
9434 if (var_ikdef
== NULL
) {
9435 var215
= 1; /* is null */
9437 var215
= 0; /* arg is null but recv is not */
9440 { /* Inline kernel#Object#== (var_ikdef,var214) on <var_ikdef:nullable CallSite> */
9443 { /* Inline kernel#Object#is_same_instance (var_ikdef,var_other) on <var_ikdef:nullable CallSite(CallSite)> */
9444 var220
= var_ikdef
== var_other
;
9447 RET_LABEL219
:(void)0;
9452 RET_LABEL217
:(void)0;
9458 var222
= varonce221
;
9460 var223
= "Type Error: \'for\' expects a method \'is_ok\' in \'Iterator\' type ";
9462 var225
= string__NativeString__to_s_with_length(var223
, var224
);
9464 varonce221
= var222
;
9467 var227
= varonce226
;
9471 var230
= string__NativeString__to_s_with_length(var228
, var229
);
9473 varonce226
= var227
;
9475 var231
= NEW_array__Array(&type_array__Arraykernel__Object
);
9476 { /* var231 = array_instance Array[Object] */
9478 var233
= NEW_array__NativeArray(var232
, &type_array__NativeArraykernel__Object
);
9479 ((struct instance_array__NativeArray
*)var233
)->values
[0] = (val
*) var222
;
9480 ((struct instance_array__NativeArray
*)var233
)->values
[1] = (val
*) var_ittype
;
9481 ((struct instance_array__NativeArray
*)var233
)->values
[2] = (val
*) var227
;
9483 ((void (*)(val
*, val
*, long))(var231
->class->vft
[COLOR_array__Array__with_native
]))(var231
, var233
, var232
) /* with_native on <var231:Array[Object]>*/;
9487 var234
= ((val
* (*)(val
*))(var231
->class->vft
[COLOR_string__Object__to_s
]))(var231
) /* to_s on <var231:Array[Object]>*/;
9490 typing__TypeVisitor__error(var_v
, self
, var234
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
9496 { /* Inline typing#AForExpr#method_is_ok= (self,var_ikdef) on <self:AForExpr> */
9497 self
->attrs
[COLOR_typing__AForExpr___method_is_ok
].val
= var_ikdef
; /* _method_is_ok on <self:AForExpr> */
9498 RET_LABEL235
:(void)0;
9502 var237
= varonce236
;
9506 var240
= string__NativeString__to_s_with_length(var238
, var239
);
9508 varonce236
= var237
;
9512 var242
= typing__TypeVisitor__get_method(var_v
, self
, var_ittype
, var237
, var241
);
9514 var_itemdef
= var242
;
9516 if (var_itemdef
== NULL
) {
9517 var244
= 1; /* is null */
9519 var244
= 0; /* arg is null but recv is not */
9522 { /* Inline kernel#Object#== (var_itemdef,var243) on <var_itemdef:nullable CallSite> */
9525 { /* Inline kernel#Object#is_same_instance (var_itemdef,var_other) on <var_itemdef:nullable CallSite(CallSite)> */
9526 var249
= var_itemdef
== var_other
;
9529 RET_LABEL248
:(void)0;
9534 RET_LABEL246
:(void)0;
9540 var251
= varonce250
;
9542 var252
= "Type Error: \'for\' expects a method \'item\' in \'Iterator\' type ";
9544 var254
= string__NativeString__to_s_with_length(var252
, var253
);
9546 varonce250
= var251
;
9549 var256
= varonce255
;
9553 var259
= string__NativeString__to_s_with_length(var257
, var258
);
9555 varonce255
= var256
;
9557 var260
= NEW_array__Array(&type_array__Arraykernel__Object
);
9558 { /* var260 = array_instance Array[Object] */
9560 var262
= NEW_array__NativeArray(var261
, &type_array__NativeArraykernel__Object
);
9561 ((struct instance_array__NativeArray
*)var262
)->values
[0] = (val
*) var251
;
9562 ((struct instance_array__NativeArray
*)var262
)->values
[1] = (val
*) var_ittype
;
9563 ((struct instance_array__NativeArray
*)var262
)->values
[2] = (val
*) var256
;
9565 ((void (*)(val
*, val
*, long))(var260
->class->vft
[COLOR_array__Array__with_native
]))(var260
, var262
, var261
) /* with_native on <var260:Array[Object]>*/;
9569 var263
= ((val
* (*)(val
*))(var260
->class->vft
[COLOR_string__Object__to_s
]))(var260
) /* to_s on <var260:Array[Object]>*/;
9572 typing__TypeVisitor__error(var_v
, self
, var263
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
9578 { /* Inline typing#AForExpr#method_item= (self,var_itemdef) on <self:AForExpr> */
9579 self
->attrs
[COLOR_typing__AForExpr___method_item
].val
= var_itemdef
; /* _method_item on <self:AForExpr> */
9580 RET_LABEL264
:(void)0;
9584 var266
= varonce265
;
9588 var269
= string__NativeString__to_s_with_length(var267
, var268
);
9590 varonce265
= var266
;
9594 var271
= typing__TypeVisitor__get_method(var_v
, self
, var_ittype
, var266
, var270
);
9596 var_nextdef
= var271
;
9598 if (var_nextdef
== NULL
) {
9599 var273
= 1; /* is null */
9601 var273
= 0; /* arg is null but recv is not */
9604 { /* Inline kernel#Object#== (var_nextdef,var272) on <var_nextdef:nullable CallSite> */
9607 { /* Inline kernel#Object#is_same_instance (var_nextdef,var_other) on <var_nextdef:nullable CallSite(CallSite)> */
9608 var278
= var_nextdef
== var_other
;
9611 RET_LABEL277
:(void)0;
9616 RET_LABEL275
:(void)0;
9622 var280
= varonce279
;
9624 var281
= "Type Error: \'for\' expects a method \'next\' in \'Iterator\' type ";
9626 var283
= string__NativeString__to_s_with_length(var281
, var282
);
9628 varonce279
= var280
;
9631 var285
= varonce284
;
9635 var288
= string__NativeString__to_s_with_length(var286
, var287
);
9637 varonce284
= var285
;
9639 var289
= NEW_array__Array(&type_array__Arraykernel__Object
);
9640 { /* var289 = array_instance Array[Object] */
9642 var291
= NEW_array__NativeArray(var290
, &type_array__NativeArraykernel__Object
);
9643 ((struct instance_array__NativeArray
*)var291
)->values
[0] = (val
*) var280
;
9644 ((struct instance_array__NativeArray
*)var291
)->values
[1] = (val
*) var_ittype
;
9645 ((struct instance_array__NativeArray
*)var291
)->values
[2] = (val
*) var285
;
9647 ((void (*)(val
*, val
*, long))(var289
->class->vft
[COLOR_array__Array__with_native
]))(var289
, var291
, var290
) /* with_native on <var289:Array[Object]>*/;
9651 var292
= ((val
* (*)(val
*))(var289
->class->vft
[COLOR_string__Object__to_s
]))(var289
) /* to_s on <var289:Array[Object]>*/;
9654 typing__TypeVisitor__error(var_v
, self
, var292
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
9660 { /* Inline typing#AForExpr#method_next= (self,var_nextdef) on <self:AForExpr> */
9661 self
->attrs
[COLOR_typing__AForExpr___method_next
].val
= var_nextdef
; /* _method_next on <self:AForExpr> */
9662 RET_LABEL293
:(void)0;
9667 var295
= varonce294
;
9671 var298
= string__NativeString__to_s_with_length(var296
, var297
);
9673 varonce294
= var295
;
9677 var300
= typing__TypeVisitor__get_method(var_v
, self
, var_ittype
, var295
, var299
);
9679 var_keydef
= var300
;
9681 if (var_keydef
== NULL
) {
9682 var302
= 1; /* is null */
9684 var302
= 0; /* arg is null but recv is not */
9687 { /* Inline kernel#Object#== (var_keydef,var301) on <var_keydef:nullable CallSite> */
9690 { /* Inline kernel#Object#is_same_instance (var_keydef,var_other) on <var_keydef:nullable CallSite(CallSite)> */
9691 var307
= var_keydef
== var_other
;
9694 RET_LABEL306
:(void)0;
9699 RET_LABEL304
:(void)0;
9705 var309
= varonce308
;
9707 var310
= "Type Error: \'for\' expects a method \'key\' in \'Iterator\' type ";
9709 var312
= string__NativeString__to_s_with_length(var310
, var311
);
9711 varonce308
= var309
;
9714 var314
= varonce313
;
9718 var317
= string__NativeString__to_s_with_length(var315
, var316
);
9720 varonce313
= var314
;
9722 var318
= NEW_array__Array(&type_array__Arraykernel__Object
);
9723 { /* var318 = array_instance Array[Object] */
9725 var320
= NEW_array__NativeArray(var319
, &type_array__NativeArraykernel__Object
);
9726 ((struct instance_array__NativeArray
*)var320
)->values
[0] = (val
*) var309
;
9727 ((struct instance_array__NativeArray
*)var320
)->values
[1] = (val
*) var_ittype
;
9728 ((struct instance_array__NativeArray
*)var320
)->values
[2] = (val
*) var314
;
9730 ((void (*)(val
*, val
*, long))(var318
->class->vft
[COLOR_array__Array__with_native
]))(var318
, var320
, var319
) /* with_native on <var318:Array[Object]>*/;
9734 var321
= ((val
* (*)(val
*))(var318
->class->vft
[COLOR_string__Object__to_s
]))(var318
) /* to_s on <var318:Array[Object]>*/;
9737 typing__TypeVisitor__error(var_v
, self
, var321
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
9743 { /* Inline typing#AForExpr#method_key= (self,var_keydef) on <self:AForExpr> */
9744 self
->attrs
[COLOR_typing__AForExpr___method_key
].val
= var_keydef
; /* _method_key on <self:AForExpr> */
9745 RET_LABEL322
:(void)0;
9752 /* method typing#AForExpr#do_type_iterator for (self: Object, TypeVisitor, MType) */
9753 void VIRTUAL_typing__AForExpr__do_type_iterator(val
* self
, val
* p0
, val
* p1
) {
9754 typing__AForExpr__do_type_iterator(self
, p0
, p1
); /* Direct call typing#AForExpr#do_type_iterator on <self:Object(AForExpr)>*/
9757 /* method typing#AForExpr#accept_typing for (self: AForExpr, TypeVisitor) */
9758 void typing__AForExpr__accept_typing(val
* self
, val
* p0
) {
9759 val
* var_v
/* var v: TypeVisitor */;
9760 val
* var
/* : AExpr */;
9761 val
* var1
/* : nullable MType */;
9762 val
* var_mtype
/* var mtype: nullable MType */;
9763 val
* var2
/* : null */;
9764 short int var3
/* : Bool */;
9765 short int var4
/* : Bool */;
9766 val
* var_other
/* var other: nullable Object */;
9767 short int var6
/* : Bool */;
9768 short int var8
/* : Bool */;
9769 val
* var9
/* : nullable AExpr */;
9770 short int var10
/* : Bool */;
9773 var
= parser_nodes__AForExpr__n_expr(self
);
9776 var1
= typing__TypeVisitor__visit_expr(var_v
, var
);
9780 if (var_mtype
== NULL
) {
9781 var3
= 1; /* is null */
9783 var3
= 0; /* arg is null but recv is not */
9786 { /* Inline kernel#Object#== (var_mtype,var2) on <var_mtype:nullable MType> */
9789 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
9790 var8
= var_mtype
== var_other
;
9807 typing__AForExpr__do_type_iterator(self
, var_v
, var_mtype
); /* Direct call typing#AForExpr#do_type_iterator on <self:AForExpr>*/
9810 var9
= parser_nodes__AForExpr__n_block(self
);
9813 typing__TypeVisitor__visit_stmt(var_v
, var9
); /* Direct call typing#TypeVisitor#visit_stmt on <var_v:TypeVisitor>*/
9817 { /* Inline typing#AExpr#is_typed= (self,var10) on <self:AForExpr> */
9818 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var10
; /* _is_typed on <self:AForExpr> */
9819 RET_LABEL11
:(void)0;
9824 /* method typing#AForExpr#accept_typing for (self: Object, TypeVisitor) */
9825 void VIRTUAL_typing__AForExpr__accept_typing(val
* self
, val
* p0
) {
9826 typing__AForExpr__accept_typing(self
, p0
); /* Direct call typing#AForExpr#accept_typing on <self:Object(AForExpr)>*/
9829 /* method typing#AAssertExpr#accept_typing for (self: AAssertExpr, TypeVisitor) */
9830 void typing__AAssertExpr__accept_typing(val
* self
, val
* p0
) {
9831 val
* var_v
/* var v: TypeVisitor */;
9832 val
* var
/* : AExpr */;
9833 val
* var1
/* : nullable MType */;
9834 val
* var2
/* : nullable AExpr */;
9835 short int var3
/* : Bool */;
9838 var
= parser_nodes__AAssertExpr__n_expr(self
);
9841 var1
= typing__TypeVisitor__visit_expr_bool(var_v
, var
);
9845 var2
= parser_nodes__AAssertExpr__n_else(self
);
9848 typing__TypeVisitor__visit_stmt(var_v
, var2
); /* Direct call typing#TypeVisitor#visit_stmt on <var_v:TypeVisitor>*/
9852 { /* Inline typing#AExpr#is_typed= (self,var3) on <self:AAssertExpr> */
9853 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var3
; /* _is_typed on <self:AAssertExpr> */
9859 /* method typing#AAssertExpr#accept_typing for (self: Object, TypeVisitor) */
9860 void VIRTUAL_typing__AAssertExpr__accept_typing(val
* self
, val
* p0
) {
9861 typing__AAssertExpr__accept_typing(self
, p0
); /* Direct call typing#AAssertExpr#accept_typing on <self:Object(AAssertExpr)>*/
9864 /* method typing#AOrExpr#accept_typing for (self: AOrExpr, TypeVisitor) */
9865 void typing__AOrExpr__accept_typing(val
* self
, val
* p0
) {
9866 val
* var_v
/* var v: TypeVisitor */;
9867 val
* var
/* : AExpr */;
9868 val
* var1
/* : nullable MType */;
9869 val
* var2
/* : AExpr */;
9870 val
* var3
/* : nullable MType */;
9871 val
* var4
/* : nullable MType */;
9874 var
= parser_nodes__AOrExpr__n_expr(self
);
9877 var1
= typing__TypeVisitor__visit_expr_bool(var_v
, var
);
9881 var2
= parser_nodes__AOrExpr__n_expr2(self
);
9884 var3
= typing__TypeVisitor__visit_expr_bool(var_v
, var2
);
9888 var4
= typing__TypeVisitor__type_bool(var_v
, self
);
9891 { /* Inline typing#AExpr#mtype= (self,var4) on <self:AOrExpr> */
9892 self
->attrs
[COLOR_typing__AExpr___mtype
].val
= var4
; /* _mtype on <self:AOrExpr> */
9898 /* method typing#AOrExpr#accept_typing for (self: Object, TypeVisitor) */
9899 void VIRTUAL_typing__AOrExpr__accept_typing(val
* self
, val
* p0
) {
9900 typing__AOrExpr__accept_typing(self
, p0
); /* Direct call typing#AOrExpr#accept_typing on <self:Object(AOrExpr)>*/
9903 /* method typing#AImpliesExpr#accept_typing for (self: AImpliesExpr, TypeVisitor) */
9904 void typing__AImpliesExpr__accept_typing(val
* self
, val
* p0
) {
9905 val
* var_v
/* var v: TypeVisitor */;
9906 val
* var
/* : AExpr */;
9907 val
* var1
/* : nullable MType */;
9908 val
* var2
/* : AExpr */;
9909 val
* var3
/* : nullable MType */;
9910 val
* var4
/* : nullable MType */;
9913 var
= parser_nodes__AImpliesExpr__n_expr(self
);
9916 var1
= typing__TypeVisitor__visit_expr_bool(var_v
, var
);
9920 var2
= parser_nodes__AImpliesExpr__n_expr2(self
);
9923 var3
= typing__TypeVisitor__visit_expr_bool(var_v
, var2
);
9927 var4
= typing__TypeVisitor__type_bool(var_v
, self
);
9930 { /* Inline typing#AExpr#mtype= (self,var4) on <self:AImpliesExpr> */
9931 self
->attrs
[COLOR_typing__AExpr___mtype
].val
= var4
; /* _mtype on <self:AImpliesExpr> */
9937 /* method typing#AImpliesExpr#accept_typing for (self: Object, TypeVisitor) */
9938 void VIRTUAL_typing__AImpliesExpr__accept_typing(val
* self
, val
* p0
) {
9939 typing__AImpliesExpr__accept_typing(self
, p0
); /* Direct call typing#AImpliesExpr#accept_typing on <self:Object(AImpliesExpr)>*/
9942 /* method typing#AAndExpr#accept_typing for (self: AAndExpr, TypeVisitor) */
9943 void typing__AAndExpr__accept_typing(val
* self
, val
* p0
) {
9944 val
* var_v
/* var v: TypeVisitor */;
9945 val
* var
/* : AExpr */;
9946 val
* var1
/* : nullable MType */;
9947 val
* var2
/* : AExpr */;
9948 val
* var3
/* : nullable MType */;
9949 val
* var4
/* : nullable MType */;
9952 var
= parser_nodes__AAndExpr__n_expr(self
);
9955 var1
= typing__TypeVisitor__visit_expr_bool(var_v
, var
);
9959 var2
= parser_nodes__AAndExpr__n_expr2(self
);
9962 var3
= typing__TypeVisitor__visit_expr_bool(var_v
, var2
);
9966 var4
= typing__TypeVisitor__type_bool(var_v
, self
);
9969 { /* Inline typing#AExpr#mtype= (self,var4) on <self:AAndExpr> */
9970 self
->attrs
[COLOR_typing__AExpr___mtype
].val
= var4
; /* _mtype on <self:AAndExpr> */
9976 /* method typing#AAndExpr#accept_typing for (self: Object, TypeVisitor) */
9977 void VIRTUAL_typing__AAndExpr__accept_typing(val
* self
, val
* p0
) {
9978 typing__AAndExpr__accept_typing(self
, p0
); /* Direct call typing#AAndExpr#accept_typing on <self:Object(AAndExpr)>*/