1 #include "typing.sep.0.h"
2 /* method typing#ANewExpr#accept_typing for (self: ANewExpr, TypeVisitor) */
3 void typing__ANewExpr__accept_typing(val
* self
, val
* p0
) {
4 val
* var_v
/* var v: TypeVisitor */;
5 val
* var
/* : AType */;
6 val
* var2
/* : AType */;
7 val
* var3
/* : nullable MType */;
8 val
* var_recvtype
/* var recvtype: nullable MType */;
9 val
* var4
/* : null */;
10 short int var5
/* : Bool */;
11 short int var6
/* : Bool */;
12 val
* var_other
/* var other: nullable Object */;
13 short int var8
/* : Bool */;
14 short int var10
/* : Bool */;
15 short int var11
/* : Bool */;
18 short int var12
/* : Bool */;
19 short int var13
/* : Bool */;
23 val
* var16
/* : String */;
24 char* var17
/* : NativeString */;
25 long var18
/* : Int */;
26 val
* var19
/* : FlatString */;
27 static val
* varonce20
;
28 val
* var21
/* : String */;
29 char* var22
/* : NativeString */;
30 long var23
/* : Int */;
31 val
* var24
/* : FlatString */;
32 val
* var25
/* : Array[Object] */;
33 long var26
/* : Int */;
34 val
* var27
/* : NativeArray[Object] */;
35 val
* var28
/* : String */;
36 static val
* varonce29
;
37 val
* var30
/* : String */;
38 char* var31
/* : NativeString */;
39 long var32
/* : Int */;
40 val
* var33
/* : FlatString */;
41 static val
* varonce34
;
42 val
* var35
/* : String */;
43 char* var36
/* : NativeString */;
44 long var37
/* : Int */;
45 val
* var38
/* : FlatString */;
46 val
* var39
/* : Array[Object] */;
47 long var40
/* : Int */;
48 val
* var41
/* : NativeArray[Object] */;
49 val
* var42
/* : String */;
50 val
* var44
/* : nullable TId */;
51 val
* var46
/* : nullable TId */;
52 val
* var_nid
/* var nid: nullable TId */;
53 val
* var47
/* : null */;
54 short int var48
/* : Bool */;
55 short int var49
/* : Bool */;
56 val
* var_other51
/* var other: nullable Object */;
57 short int var52
/* : Bool */;
58 short int var53
/* : Bool */;
59 short int var54
/* : Bool */;
60 val
* var55
/* : String */;
61 val
* var_name
/* var name: String */;
62 static val
* varonce56
;
63 val
* var57
/* : String */;
64 char* var58
/* : NativeString */;
65 long var59
/* : Int */;
66 val
* var60
/* : FlatString */;
67 short int var61
/* : Bool */;
68 val
* var62
/* : nullable CallSite */;
69 val
* var_callsite
/* var callsite: nullable CallSite */;
70 val
* var63
/* : null */;
71 short int var64
/* : Bool */;
72 short int var65
/* : Bool */;
73 short int var67
/* : Bool */;
74 short int var69
/* : Bool */;
75 val
* var70
/* : MMethod */;
76 val
* var72
/* : MMethod */;
77 short int var73
/* : Bool */;
78 short int var75
/* : Bool */;
79 short int var76
/* : Bool */;
80 val
* var77
/* : MClass */;
81 val
* var79
/* : MClass */;
82 val
* var80
/* : MClassKind */;
83 val
* var82
/* : MClassKind */;
84 val
* var_kind
/* var kind: MClassKind */;
85 val
* var83
/* : MClassKind */;
86 short int var84
/* : Bool */;
87 short int var85
/* : Bool */;
88 short int var87
/* : Bool */;
89 short int var88
/* : Bool */;
90 short int var89
/* : Bool */;
91 static val
* varonce90
;
92 val
* var91
/* : String */;
93 char* var92
/* : NativeString */;
94 long var93
/* : Int */;
95 val
* var94
/* : FlatString */;
96 static val
* varonce95
;
97 val
* var96
/* : String */;
98 char* var97
/* : NativeString */;
99 long var98
/* : Int */;
100 val
* var99
/* : FlatString */;
101 static val
* varonce100
;
102 val
* var101
/* : String */;
103 char* var102
/* : NativeString */;
104 long var103
/* : Int */;
105 val
* var104
/* : FlatString */;
106 val
* var105
/* : Array[Object] */;
107 long var106
/* : Int */;
108 val
* var107
/* : NativeArray[Object] */;
109 val
* var108
/* : String */;
110 val
* var110
/* : MSignature */;
111 val
* var112
/* : MSignature */;
112 val
* var113
/* : nullable MType */;
113 val
* var115
/* : nullable MType */;
114 val
* var117
/* : nullable MType */;
115 val
* var119
/* : nullable MType */;
116 val
* var120
/* : null */;
117 short int var121
/* : Bool */;
118 short int var122
/* : Bool */;
119 short int var124
/* : Bool */;
120 short int var125
/* : Bool */;
121 short int var126
/* : Bool */;
122 val
* var128
/* : MMethod */;
123 val
* var130
/* : MMethod */;
124 val
* var131
/* : MClass */;
125 val
* var133
/* : MClass */;
126 short int var134
/* : Bool */;
127 short int var135
/* : Bool */;
128 static val
* varonce136
;
129 val
* var137
/* : String */;
130 char* var138
/* : NativeString */;
131 long var139
/* : Int */;
132 val
* var140
/* : FlatString */;
133 static val
* varonce141
;
134 val
* var142
/* : String */;
135 char* var143
/* : NativeString */;
136 long var144
/* : Int */;
137 val
* var145
/* : FlatString */;
138 val
* var146
/* : Array[Object] */;
139 long var147
/* : Int */;
140 val
* var148
/* : NativeArray[Object] */;
141 val
* var149
/* : String */;
142 val
* var150
/* : AExprs */;
143 val
* var152
/* : AExprs */;
144 val
* var153
/* : Array[AExpr] */;
145 val
* var_args
/* var args: Array[AExpr] */;
146 short int var154
/* : Bool */;
149 { /* Inline parser_nodes#ANewExpr#n_type (self) on <self:ANewExpr> */
150 var2
= self
->attrs
[COLOR_parser_nodes__ANewExpr___n_type
].val
; /* _n_type on <self:ANewExpr> */
151 if (unlikely(var2
== NULL
)) {
152 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
153 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 1610);
161 var3
= typing__TypeVisitor__resolve_mtype(var_v
, var
);
165 if (var_recvtype
== NULL
) {
166 var5
= 1; /* is null */
168 var5
= 0; /* arg is null but recv is not */
171 { /* Inline kernel#Object#== (var_recvtype,var4) on <var_recvtype:nullable MType> */
174 { /* Inline kernel#Object#is_same_instance (var_recvtype,var_other) on <var_recvtype:nullable MType(MType)> */
175 var10
= var_recvtype
== var_other
;
191 /* <var_recvtype:nullable MType(MType)> isa MClassType */
192 cltype
= type_model__MClassType
.color
;
193 idtype
= type_model__MClassType
.id
;
194 if(cltype
>= var_recvtype
->type
->table_size
) {
197 var11
= var_recvtype
->type
->type_table
[cltype
] == idtype
;
201 /* <var_recvtype:nullable MType(MType)> isa MNullableType */
202 cltype14
= type_model__MNullableType
.color
;
203 idtype15
= type_model__MNullableType
.id
;
204 if(cltype14
>= var_recvtype
->type
->table_size
) {
207 var13
= var_recvtype
->type
->type_table
[cltype14
] == idtype15
;
213 var17
= "Type error: cannot instantiate the nullable type ";
215 var19
= string__NativeString__to_s_with_length(var17
, var18
);
224 var24
= string__NativeString__to_s_with_length(var22
, var23
);
228 var25
= NEW_array__Array(&type_array__Arraykernel__Object
);
229 { /* var25 = array_instance Array[Object] */
231 var27
= NEW_array__NativeArray(var26
, &type_array__NativeArraykernel__Object
);
232 ((struct instance_array__NativeArray
*)var27
)->values
[0] = (val
*) var16
;
233 ((struct instance_array__NativeArray
*)var27
)->values
[1] = (val
*) var_recvtype
;
234 ((struct instance_array__NativeArray
*)var27
)->values
[2] = (val
*) var21
;
236 ((void (*)(val
*, val
*, long))(var25
->class->vft
[COLOR_array__Array__with_native
]))(var25
, var27
, var26
) /* with_native on <var25:Array[Object]>*/;
240 var28
= ((val
* (*)(val
*))(var25
->class->vft
[COLOR_string__Object__to_s
]))(var25
) /* to_s on <var25:Array[Object]>*/;
243 typing__TypeVisitor__error(var_v
, self
, var28
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
250 var31
= "Type error: cannot instantiate the formal type ";
252 var33
= string__NativeString__to_s_with_length(var31
, var32
);
261 var38
= string__NativeString__to_s_with_length(var36
, var37
);
265 var39
= NEW_array__Array(&type_array__Arraykernel__Object
);
266 { /* var39 = array_instance Array[Object] */
268 var41
= NEW_array__NativeArray(var40
, &type_array__NativeArraykernel__Object
);
269 ((struct instance_array__NativeArray
*)var41
)->values
[0] = (val
*) var30
;
270 ((struct instance_array__NativeArray
*)var41
)->values
[1] = (val
*) var_recvtype
;
271 ((struct instance_array__NativeArray
*)var41
)->values
[2] = (val
*) var35
;
273 ((void (*)(val
*, val
*, long))(var39
->class->vft
[COLOR_array__Array__with_native
]))(var39
, var41
, var40
) /* with_native on <var39:Array[Object]>*/;
277 var42
= ((val
* (*)(val
*))(var39
->class->vft
[COLOR_string__Object__to_s
]))(var39
) /* to_s on <var39:Array[Object]>*/;
280 typing__TypeVisitor__error(var_v
, self
, var42
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
287 { /* Inline typing#ANewExpr#recvtype= (self,var_recvtype) on <self:ANewExpr> */
288 self
->attrs
[COLOR_typing__ANewExpr___recvtype
].val
= var_recvtype
; /* _recvtype on <self:ANewExpr> */
293 { /* Inline parser_nodes#ANewExpr#n_id (self) on <self:ANewExpr> */
294 var46
= self
->attrs
[COLOR_parser_nodes__ANewExpr___n_id
].val
; /* _n_id on <self:ANewExpr> */
301 if (var_nid
== NULL
) {
302 var48
= 0; /* is null */
304 var48
= 1; /* arg is null and recv is not */
307 { /* Inline kernel#Object#!= (var_nid,var47) on <var_nid:nullable TId> */
310 var53
= ((short int (*)(val
*, val
*))(var_nid
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nid
, var_other51
) /* == on <var_nid:nullable TId(TId)>*/;
322 var55
= lexer_work__Token__text(var_nid
);
331 var60
= string__NativeString__to_s_with_length(var58
, var59
);
339 var62
= typing__TypeVisitor__get_method(var_v
, self
, var_recvtype
, var_name
, var61
);
341 var_callsite
= var62
;
343 if (var_callsite
== NULL
) {
344 var64
= 1; /* is null */
346 var64
= 0; /* arg is null but recv is not */
349 { /* Inline kernel#Object#== (var_callsite,var63) on <var_callsite:nullable CallSite> */
352 { /* Inline kernel#Object#is_same_instance (var_callsite,var_other) on <var_callsite:nullable CallSite(CallSite)> */
353 var69
= var_callsite
== var_other
;
370 { /* Inline typing#CallSite#mproperty (var_callsite) on <var_callsite:nullable CallSite(CallSite)> */
371 var72
= var_callsite
->attrs
[COLOR_typing__CallSite___mproperty
].val
; /* _mproperty on <var_callsite:nullable CallSite(CallSite)> */
372 if (unlikely(var72
== NULL
)) {
373 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
374 PRINT_ERROR(" (%s:%d)\n", "semantize/typing.nit", 483);
382 { /* Inline model#MMethod#is_new (var70) on <var70:MMethod> */
383 var75
= var70
->attrs
[COLOR_model__MMethod___is_new
].s
; /* _is_new on <var70:MMethod> */
391 { /* Inline model#MClassType#mclass (var_recvtype) on <var_recvtype:nullable MType(MClassType)> */
392 var79
= var_recvtype
->attrs
[COLOR_model__MClassType___mclass
].val
; /* _mclass on <var_recvtype:nullable MType(MClassType)> */
393 if (unlikely(var79
== NULL
)) {
394 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
395 PRINT_ERROR(" (%s:%d)\n", "model/model.nit", 986);
403 { /* Inline model#MClass#kind (var77) on <var77:MClass> */
404 var82
= var77
->attrs
[COLOR_model__MClass___kind
].val
; /* _kind on <var77:MClass> */
405 if (unlikely(var82
== NULL
)) {
406 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _kind");
407 PRINT_ERROR(" (%s:%d)\n", "model/model.nit", 371);
416 var83
= model__Object__concrete_kind(self
);
419 { /* Inline kernel#Object#!= (var_kind,var83) on <var_kind:MClassKind> */
422 var88
= ((short int (*)(val
*, val
*))(var_kind
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_kind
, var_other51
) /* == on <var_kind:MClassKind>*/;
436 var92
= "Cannot instantiate ";
438 var94
= string__NativeString__to_s_with_length(var92
, var93
);
447 var99
= string__NativeString__to_s_with_length(var97
, var98
);
456 var104
= string__NativeString__to_s_with_length(var102
, var103
);
460 var105
= NEW_array__Array(&type_array__Arraykernel__Object
);
461 { /* var105 = array_instance Array[Object] */
463 var107
= NEW_array__NativeArray(var106
, &type_array__NativeArraykernel__Object
);
464 ((struct instance_array__NativeArray
*)var107
)->values
[0] = (val
*) var91
;
465 ((struct instance_array__NativeArray
*)var107
)->values
[1] = (val
*) var_kind
;
466 ((struct instance_array__NativeArray
*)var107
)->values
[2] = (val
*) var96
;
467 ((struct instance_array__NativeArray
*)var107
)->values
[3] = (val
*) var_recvtype
;
468 ((struct instance_array__NativeArray
*)var107
)->values
[4] = (val
*) var101
;
470 ((void (*)(val
*, val
*, long))(var105
->class->vft
[COLOR_array__Array__with_native
]))(var105
, var107
, var106
) /* with_native on <var105:Array[Object]>*/;
474 var108
= ((val
* (*)(val
*))(var105
->class->vft
[COLOR_string__Object__to_s
]))(var105
) /* to_s on <var105:Array[Object]>*/;
477 typing__TypeVisitor__error(var_v
, self
, var108
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
483 { /* Inline typing#AExpr#mtype= (self,var_recvtype) on <self:ANewExpr> */
484 self
->attrs
[COLOR_typing__AExpr___mtype
].val
= var_recvtype
; /* _mtype on <self:ANewExpr> */
485 RET_LABEL109
:(void)0;
490 { /* Inline typing#CallSite#msignature (var_callsite) on <var_callsite:nullable CallSite(CallSite)> */
491 var112
= var_callsite
->attrs
[COLOR_typing__CallSite___msignature
].val
; /* _msignature on <var_callsite:nullable CallSite(CallSite)> */
492 if (unlikely(var112
== NULL
)) {
493 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _msignature");
494 PRINT_ERROR(" (%s:%d)\n", "semantize/typing.nit", 490);
498 RET_LABEL111
:(void)0;
502 { /* Inline model#MSignature#return_mtype (var110) on <var110:MSignature> */
503 var115
= var110
->attrs
[COLOR_model__MSignature___return_mtype
].val
; /* _return_mtype on <var110:MSignature> */
505 RET_LABEL114
:(void)0;
509 { /* Inline typing#AExpr#mtype= (self,var113) on <self:ANewExpr> */
510 self
->attrs
[COLOR_typing__AExpr___mtype
].val
= var113
; /* _mtype on <self:ANewExpr> */
511 RET_LABEL116
:(void)0;
515 { /* Inline typing#AExpr#mtype (self) on <self:ANewExpr> */
516 var119
= self
->attrs
[COLOR_typing__AExpr___mtype
].val
; /* _mtype on <self:ANewExpr> */
518 RET_LABEL118
:(void)0;
522 if (var117
== NULL
) {
523 var121
= 0; /* is null */
525 var121
= 1; /* arg is null and recv is not */
528 { /* Inline kernel#Object#!= (var117,var120) on <var117:nullable MType> */
529 var_other51
= var120
;
531 var125
= ((short int (*)(val
*, val
*))(var117
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var117
, var_other51
) /* == on <var117:nullable MType(MType)>*/;
537 RET_LABEL123
:(void)0;
541 if (unlikely(!var121
)) {
542 PRINT_ERROR("Runtime error: %s", "Assert failed");
543 PRINT_ERROR(" (%s:%d)\n", "semantize/typing.nit", 1734);
548 { /* Inline typing#ANewExpr#callsite= (self,var_callsite) on <self:ANewExpr> */
549 self
->attrs
[COLOR_typing__ANewExpr___callsite
].val
= var_callsite
; /* _callsite on <self:ANewExpr> */
550 RET_LABEL127
:(void)0;
554 { /* Inline typing#CallSite#mproperty (var_callsite) on <var_callsite:nullable CallSite(CallSite)> */
555 var130
= var_callsite
->attrs
[COLOR_typing__CallSite___mproperty
].val
; /* _mproperty on <var_callsite:nullable CallSite(CallSite)> */
556 if (unlikely(var130
== NULL
)) {
557 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
558 PRINT_ERROR(" (%s:%d)\n", "semantize/typing.nit", 483);
562 RET_LABEL129
:(void)0;
566 { /* Inline model#MClassType#mclass (var_recvtype) on <var_recvtype:nullable MType(MClassType)> */
567 var133
= var_recvtype
->attrs
[COLOR_model__MClassType___mclass
].val
; /* _mclass on <var_recvtype:nullable MType(MClassType)> */
568 if (unlikely(var133
== NULL
)) {
569 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
570 PRINT_ERROR(" (%s:%d)\n", "model/model.nit", 986);
574 RET_LABEL132
:(void)0;
578 var134
= model__MMethod__is_init_for(var128
, var131
);
587 var140
= string__NativeString__to_s_with_length(var138
, var139
);
594 var143
= " is not a constructor.";
596 var145
= string__NativeString__to_s_with_length(var143
, var144
);
600 var146
= NEW_array__Array(&type_array__Arraykernel__Object
);
601 { /* var146 = array_instance Array[Object] */
603 var148
= NEW_array__NativeArray(var147
, &type_array__NativeArraykernel__Object
);
604 ((struct instance_array__NativeArray
*)var148
)->values
[0] = (val
*) var137
;
605 ((struct instance_array__NativeArray
*)var148
)->values
[1] = (val
*) var_name
;
606 ((struct instance_array__NativeArray
*)var148
)->values
[2] = (val
*) var142
;
608 ((void (*)(val
*, val
*, long))(var146
->class->vft
[COLOR_array__Array__with_native
]))(var146
, var148
, var147
) /* with_native on <var146:Array[Object]>*/;
612 var149
= ((val
* (*)(val
*))(var146
->class->vft
[COLOR_string__Object__to_s
]))(var146
) /* to_s on <var146:Array[Object]>*/;
615 typing__TypeVisitor__error(var_v
, self
, var149
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
621 { /* Inline parser_nodes#ANewExpr#n_args (self) on <self:ANewExpr> */
622 var152
= self
->attrs
[COLOR_parser_nodes__ANewExpr___n_args
].val
; /* _n_args on <self:ANewExpr> */
623 if (unlikely(var152
== NULL
)) {
624 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_args");
625 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 1614);
629 RET_LABEL151
:(void)0;
633 var153
= typing__AExprs__to_a(var150
);
637 var154
= typing__CallSite__check_signature(var_callsite
, var_v
, var_args
);
641 /* method typing#ANewExpr#accept_typing for (self: Object, TypeVisitor) */
642 void VIRTUAL_typing__ANewExpr__accept_typing(val
* self
, val
* p0
) {
643 typing__ANewExpr__accept_typing(self
, p0
); /* Direct call typing#ANewExpr#accept_typing on <self:Object(ANewExpr)>*/
646 /* method typing#AAttrFormExpr#mproperty for (self: AAttrFormExpr): nullable MAttribute */
647 val
* typing__AAttrFormExpr__mproperty(val
* self
) {
648 val
* var
/* : nullable MAttribute */;
649 val
* var1
/* : nullable MAttribute */;
650 var1
= self
->attrs
[COLOR_typing__AAttrFormExpr___mproperty
].val
; /* _mproperty on <self:AAttrFormExpr> */
655 /* method typing#AAttrFormExpr#mproperty for (self: Object): nullable MAttribute */
656 val
* VIRTUAL_typing__AAttrFormExpr__mproperty(val
* self
) {
657 val
* var
/* : nullable MAttribute */;
658 val
* var1
/* : nullable MAttribute */;
659 val
* var3
/* : nullable MAttribute */;
660 { /* Inline typing#AAttrFormExpr#mproperty (self) on <self:Object(AAttrFormExpr)> */
661 var3
= self
->attrs
[COLOR_typing__AAttrFormExpr___mproperty
].val
; /* _mproperty on <self:Object(AAttrFormExpr)> */
669 /* method typing#AAttrFormExpr#mproperty= for (self: AAttrFormExpr, nullable MAttribute) */
670 void typing__AAttrFormExpr__mproperty_61d(val
* self
, val
* p0
) {
671 self
->attrs
[COLOR_typing__AAttrFormExpr___mproperty
].val
= p0
; /* _mproperty on <self:AAttrFormExpr> */
674 /* method typing#AAttrFormExpr#mproperty= for (self: Object, nullable MAttribute) */
675 void VIRTUAL_typing__AAttrFormExpr__mproperty_61d(val
* self
, val
* p0
) {
676 { /* Inline typing#AAttrFormExpr#mproperty= (self,p0) on <self:Object(AAttrFormExpr)> */
677 self
->attrs
[COLOR_typing__AAttrFormExpr___mproperty
].val
= p0
; /* _mproperty on <self:Object(AAttrFormExpr)> */
682 /* method typing#AAttrFormExpr#attr_type for (self: AAttrFormExpr): nullable MType */
683 val
* typing__AAttrFormExpr__attr_type(val
* self
) {
684 val
* var
/* : nullable MType */;
685 val
* var1
/* : nullable MType */;
686 var1
= self
->attrs
[COLOR_typing__AAttrFormExpr___attr_type
].val
; /* _attr_type on <self:AAttrFormExpr> */
691 /* method typing#AAttrFormExpr#attr_type for (self: Object): nullable MType */
692 val
* VIRTUAL_typing__AAttrFormExpr__attr_type(val
* self
) {
693 val
* var
/* : nullable MType */;
694 val
* var1
/* : nullable MType */;
695 val
* var3
/* : nullable MType */;
696 { /* Inline typing#AAttrFormExpr#attr_type (self) on <self:Object(AAttrFormExpr)> */
697 var3
= self
->attrs
[COLOR_typing__AAttrFormExpr___attr_type
].val
; /* _attr_type on <self:Object(AAttrFormExpr)> */
705 /* method typing#AAttrFormExpr#attr_type= for (self: AAttrFormExpr, nullable MType) */
706 void typing__AAttrFormExpr__attr_type_61d(val
* self
, val
* p0
) {
707 self
->attrs
[COLOR_typing__AAttrFormExpr___attr_type
].val
= p0
; /* _attr_type on <self:AAttrFormExpr> */
710 /* method typing#AAttrFormExpr#attr_type= for (self: Object, nullable MType) */
711 void VIRTUAL_typing__AAttrFormExpr__attr_type_61d(val
* self
, val
* p0
) {
712 { /* Inline typing#AAttrFormExpr#attr_type= (self,p0) on <self:Object(AAttrFormExpr)> */
713 self
->attrs
[COLOR_typing__AAttrFormExpr___attr_type
].val
= p0
; /* _attr_type on <self:Object(AAttrFormExpr)> */
718 /* method typing#AAttrFormExpr#resolve_property for (self: AAttrFormExpr, TypeVisitor) */
719 void typing__AAttrFormExpr__resolve_property(val
* self
, val
* p0
) {
720 val
* var_v
/* var v: TypeVisitor */;
721 val
* var
/* : AExpr */;
722 val
* var2
/* : AExpr */;
723 val
* var3
/* : nullable MType */;
724 val
* var_recvtype
/* var recvtype: nullable MType */;
725 val
* var4
/* : null */;
726 short int var5
/* : Bool */;
727 short int var6
/* : Bool */;
728 val
* var_other
/* var other: nullable Object */;
729 short int var8
/* : Bool */;
730 short int var10
/* : Bool */;
731 val
* var11
/* : TAttrid */;
732 val
* var13
/* : TAttrid */;
733 val
* var14
/* : String */;
734 val
* var_name
/* var name: String */;
735 short int var15
/* : Bool */;
739 val
* var16
/* : String */;
740 char* var17
/* : NativeString */;
741 long var18
/* : Int */;
742 val
* var19
/* : FlatString */;
743 static val
* varonce20
;
744 val
* var21
/* : String */;
745 char* var22
/* : NativeString */;
746 long var23
/* : Int */;
747 val
* var24
/* : FlatString */;
748 val
* var25
/* : Array[Object] */;
749 long var26
/* : Int */;
750 val
* var27
/* : NativeArray[Object] */;
751 val
* var28
/* : String */;
752 val
* var29
/* : MType */;
753 val
* var_unsafe_type
/* var unsafe_type: MType */;
754 val
* var30
/* : nullable MProperty */;
755 val
* var_mproperty
/* var mproperty: nullable MProperty */;
756 val
* var31
/* : null */;
757 short int var32
/* : Bool */;
758 short int var33
/* : Bool */;
759 short int var35
/* : Bool */;
760 short int var37
/* : Bool */;
761 val
* var38
/* : ModelBuilder */;
762 val
* var40
/* : ModelBuilder */;
763 static val
* varonce41
;
764 val
* var42
/* : String */;
765 char* var43
/* : NativeString */;
766 long var44
/* : Int */;
767 val
* var45
/* : FlatString */;
768 static val
* varonce46
;
769 val
* var47
/* : String */;
770 char* var48
/* : NativeString */;
771 long var49
/* : Int */;
772 val
* var50
/* : FlatString */;
773 static val
* varonce51
;
774 val
* var52
/* : String */;
775 char* var53
/* : NativeString */;
776 long var54
/* : Int */;
777 val
* var55
/* : FlatString */;
778 val
* var56
/* : Array[Object] */;
779 long var57
/* : Int */;
780 val
* var58
/* : NativeArray[Object] */;
781 val
* var59
/* : String */;
782 short int var60
/* : Bool */;
785 val
* var64
/* : MModule */;
786 val
* var66
/* : MModule */;
787 val
* var67
/* : Array[MPropDef] */;
788 val
* var_mpropdefs
/* var mpropdefs: Array[MAttributeDef] */;
789 long var68
/* : Int */;
790 long var70
/* : Int */;
791 long var71
/* : Int */;
792 short int var72
/* : Bool */;
793 short int var73
/* : Bool */;
794 short int var75
/* : Bool */;
795 val
* var76
/* : nullable Object */;
796 val
* var_mpropdef
/* var mpropdef: MAttributeDef */;
797 val
* var77
/* : nullable MType */;
798 val
* var79
/* : nullable MType */;
799 val
* var_attr_type
/* var attr_type: MType */;
800 val
* var80
/* : AExpr */;
801 val
* var82
/* : AExpr */;
802 short int var83
/* : Bool */;
805 val
* var86
/* : MType */;
808 { /* Inline parser_nodes#AAttrFormExpr#n_expr (self) on <self:AAttrFormExpr> */
809 var2
= self
->attrs
[COLOR_parser_nodes__AAttrFormExpr___n_expr
].val
; /* _n_expr on <self:AAttrFormExpr> */
810 if (unlikely(var2
== NULL
)) {
811 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_expr");
812 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 1621);
820 var3
= typing__TypeVisitor__visit_expr(var_v
, var
);
824 if (var_recvtype
== NULL
) {
825 var5
= 1; /* is null */
827 var5
= 0; /* arg is null but recv is not */
830 { /* Inline kernel#Object#== (var_recvtype,var4) on <var_recvtype:nullable MType> */
833 { /* Inline kernel#Object#is_same_instance (var_recvtype,var_other) on <var_recvtype:nullable MType(MType)> */
834 var10
= var_recvtype
== var_other
;
851 { /* Inline parser_nodes#AAttrFormExpr#n_id (self) on <self:AAttrFormExpr> */
852 var13
= self
->attrs
[COLOR_parser_nodes__AAttrFormExpr___n_id
].val
; /* _n_id on <self:AAttrFormExpr> */
853 if (unlikely(var13
== NULL
)) {
854 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
855 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 1624);
863 var14
= lexer_work__Token__text(var11
);
866 /* <var_recvtype:nullable MType(MType)> isa MNullType */
867 cltype
= type_model__MNullType
.color
;
868 idtype
= type_model__MNullType
.id
;
869 if(cltype
>= var_recvtype
->type
->table_size
) {
872 var15
= var_recvtype
->type
->type_table
[cltype
] == idtype
;
878 var17
= "Error: Attribute \'";
880 var19
= string__NativeString__to_s_with_length(var17
, var18
);
887 var22
= "\' access on \'null\'.";
889 var24
= string__NativeString__to_s_with_length(var22
, var23
);
893 var25
= NEW_array__Array(&type_array__Arraykernel__Object
);
894 { /* var25 = array_instance Array[Object] */
896 var27
= NEW_array__NativeArray(var26
, &type_array__NativeArraykernel__Object
);
897 ((struct instance_array__NativeArray
*)var27
)->values
[0] = (val
*) var16
;
898 ((struct instance_array__NativeArray
*)var27
)->values
[1] = (val
*) var_name
;
899 ((struct instance_array__NativeArray
*)var27
)->values
[2] = (val
*) var21
;
901 ((void (*)(val
*, val
*, long))(var25
->class->vft
[COLOR_array__Array__with_native
]))(var25
, var27
, var26
) /* with_native on <var25:Array[Object]>*/;
905 var28
= ((val
* (*)(val
*))(var25
->class->vft
[COLOR_string__Object__to_s
]))(var25
) /* to_s on <var25:Array[Object]>*/;
908 typing__TypeVisitor__error(var_v
, self
, var28
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
914 var29
= typing__TypeVisitor__anchor_to(var_v
, var_recvtype
);
916 var_unsafe_type
= var29
;
918 var30
= typing__TypeVisitor__try_get_mproperty_by_name2(var_v
, self
, var_unsafe_type
, var_name
);
920 var_mproperty
= var30
;
922 if (var_mproperty
== NULL
) {
923 var32
= 1; /* is null */
925 var32
= 0; /* arg is null but recv is not */
928 { /* Inline kernel#Object#== (var_mproperty,var31) on <var_mproperty:nullable MProperty> */
931 { /* Inline kernel#Object#is_same_instance (var_mproperty,var_other) on <var_mproperty:nullable MProperty(MProperty)> */
932 var37
= var_mproperty
== var_other
;
946 { /* Inline typing#TypeVisitor#modelbuilder (var_v) on <var_v:TypeVisitor> */
947 var40
= var_v
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <var_v:TypeVisitor> */
948 if (unlikely(var40
== NULL
)) {
949 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
950 PRINT_ERROR(" (%s:%d)\n", "semantize/typing.nit", 34);
960 var43
= "Error: Attribute ";
962 var45
= string__NativeString__to_s_with_length(var43
, var44
);
969 var48
= " doesn\'t exists in ";
971 var50
= string__NativeString__to_s_with_length(var48
, var49
);
980 var55
= string__NativeString__to_s_with_length(var53
, var54
);
984 var56
= NEW_array__Array(&type_array__Arraykernel__Object
);
985 { /* var56 = array_instance Array[Object] */
987 var58
= NEW_array__NativeArray(var57
, &type_array__NativeArraykernel__Object
);
988 ((struct instance_array__NativeArray
*)var58
)->values
[0] = (val
*) var42
;
989 ((struct instance_array__NativeArray
*)var58
)->values
[1] = (val
*) var_name
;
990 ((struct instance_array__NativeArray
*)var58
)->values
[2] = (val
*) var47
;
991 ((struct instance_array__NativeArray
*)var58
)->values
[3] = (val
*) var_recvtype
;
992 ((struct instance_array__NativeArray
*)var58
)->values
[4] = (val
*) var52
;
994 ((void (*)(val
*, val
*, long))(var56
->class->vft
[COLOR_array__Array__with_native
]))(var56
, var58
, var57
) /* with_native on <var56:Array[Object]>*/;
998 var59
= ((val
* (*)(val
*))(var56
->class->vft
[COLOR_string__Object__to_s
]))(var56
) /* to_s on <var56:Array[Object]>*/;
1001 modelbuilder__ModelBuilder__error(var38
, self
, var59
); /* Direct call modelbuilder#ModelBuilder#error on <var38:ModelBuilder>*/
1006 /* <var_mproperty:nullable MProperty(MProperty)> isa MAttribute */
1007 cltype61
= type_model__MAttribute
.color
;
1008 idtype62
= type_model__MAttribute
.id
;
1009 if(cltype61
>= var_mproperty
->type
->table_size
) {
1012 var60
= var_mproperty
->type
->type_table
[cltype61
] == idtype62
;
1014 if (unlikely(!var60
)) {
1015 PRINT_ERROR("Runtime error: %s", "Assert failed");
1016 PRINT_ERROR(" (%s:%d)\n", "semantize/typing.nit", 1775);
1020 { /* Inline typing#AAttrFormExpr#mproperty= (self,var_mproperty) on <self:AAttrFormExpr> */
1021 self
->attrs
[COLOR_typing__AAttrFormExpr___mproperty
].val
= var_mproperty
; /* _mproperty on <self:AAttrFormExpr> */
1022 RET_LABEL63
:(void)0;
1026 { /* Inline typing#TypeVisitor#mmodule (var_v) on <var_v:TypeVisitor> */
1027 var66
= var_v
->attrs
[COLOR_typing__TypeVisitor___mmodule
].val
; /* _mmodule on <var_v:TypeVisitor> */
1028 if (unlikely(var66
== NULL
)) {
1029 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
1030 PRINT_ERROR(" (%s:%d)\n", "semantize/typing.nit", 36);
1034 RET_LABEL65
:(void)0;
1038 var67
= model__MProperty__lookup_definitions(var_mproperty
, var64
, var_unsafe_type
);
1040 var_mpropdefs
= var67
;
1042 { /* Inline array#AbstractArrayRead#length (var_mpropdefs) on <var_mpropdefs:Array[MAttributeDef]> */
1043 var70
= var_mpropdefs
->attrs
[COLOR_array__AbstractArrayRead___length
].l
; /* _length on <var_mpropdefs:Array[MAttributeDef]> */
1045 RET_LABEL69
:(void)0;
1050 { /* Inline kernel#Int#== (var68,var71) on <var68:Int> */
1051 var75
= var68
== var71
;
1054 RET_LABEL74
:(void)0;
1058 if (unlikely(!var72
)) {
1059 PRINT_ERROR("Runtime error: %s", "Assert failed");
1060 PRINT_ERROR(" (%s:%d)\n", "semantize/typing.nit", 1779);
1064 var76
= abstract_collection__SequenceRead__first(var_mpropdefs
);
1066 var_mpropdef
= var76
;
1068 { /* Inline model#MAttributeDef#static_mtype (var_mpropdef) on <var_mpropdef:MAttributeDef> */
1069 var79
= var_mpropdef
->attrs
[COLOR_model__MAttributeDef___static_mtype
].val
; /* _static_mtype on <var_mpropdef:MAttributeDef> */
1071 RET_LABEL78
:(void)0;
1074 if (unlikely(var77
== NULL
)) {
1075 PRINT_ERROR("Runtime error: %s", "Cast failed");
1076 PRINT_ERROR(" (%s:%d)\n", "semantize/typing.nit", 1781);
1079 var_attr_type
= var77
;
1081 { /* Inline parser_nodes#AAttrFormExpr#n_expr (self) on <self:AAttrFormExpr> */
1082 var82
= self
->attrs
[COLOR_parser_nodes__AAttrFormExpr___n_expr
].val
; /* _n_expr on <self:AAttrFormExpr> */
1083 if (unlikely(var82
== NULL
)) {
1084 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_expr");
1085 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 1621);
1089 RET_LABEL81
:(void)0;
1092 /* <var80:AExpr> isa ASelfExpr */
1093 cltype84
= type_parser_nodes__ASelfExpr
.color
;
1094 idtype85
= type_parser_nodes__ASelfExpr
.id
;
1095 if(cltype84
>= var80
->type
->table_size
) {
1098 var83
= var80
->type
->type_table
[cltype84
] == idtype85
;
1101 var86
= typing__TypeVisitor__resolve_for(var_v
, var_attr_type
, var_recvtype
, var83
);
1103 var_attr_type
= var86
;
1105 { /* Inline typing#AAttrFormExpr#attr_type= (self,var_attr_type) on <self:AAttrFormExpr> */
1106 self
->attrs
[COLOR_typing__AAttrFormExpr___attr_type
].val
= var_attr_type
; /* _attr_type on <self:AAttrFormExpr> */
1107 RET_LABEL87
:(void)0;
1112 /* method typing#AAttrFormExpr#resolve_property for (self: Object, TypeVisitor) */
1113 void VIRTUAL_typing__AAttrFormExpr__resolve_property(val
* self
, val
* p0
) {
1114 typing__AAttrFormExpr__resolve_property(self
, p0
); /* Direct call typing#AAttrFormExpr#resolve_property on <self:Object(AAttrFormExpr)>*/
1117 /* method typing#AAttrExpr#accept_typing for (self: AAttrExpr, TypeVisitor) */
1118 void typing__AAttrExpr__accept_typing(val
* self
, val
* p0
) {
1119 val
* var_v
/* var v: TypeVisitor */;
1120 val
* var
/* : nullable MType */;
1121 val
* var2
/* : nullable MType */;
1124 typing__AAttrFormExpr__resolve_property(self
, var_v
); /* Direct call typing#AAttrFormExpr#resolve_property on <self:AAttrExpr>*/
1127 { /* Inline typing#AAttrFormExpr#attr_type (self) on <self:AAttrExpr> */
1128 var2
= self
->attrs
[COLOR_typing__AAttrFormExpr___attr_type
].val
; /* _attr_type on <self:AAttrExpr> */
1134 { /* Inline typing#AExpr#mtype= (self,var) on <self:AAttrExpr> */
1135 self
->attrs
[COLOR_typing__AExpr___mtype
].val
= var
; /* _mtype on <self:AAttrExpr> */
1141 /* method typing#AAttrExpr#accept_typing for (self: Object, TypeVisitor) */
1142 void VIRTUAL_typing__AAttrExpr__accept_typing(val
* self
, val
* p0
) {
1143 typing__AAttrExpr__accept_typing(self
, p0
); /* Direct call typing#AAttrExpr#accept_typing on <self:Object(AAttrExpr)>*/
1146 /* method typing#AAttrAssignExpr#accept_typing for (self: AAttrAssignExpr, TypeVisitor) */
1147 void typing__AAttrAssignExpr__accept_typing(val
* self
, val
* p0
) {
1148 val
* var_v
/* var v: TypeVisitor */;
1149 val
* var
/* : nullable MType */;
1150 val
* var2
/* : nullable MType */;
1151 val
* var_mtype
/* var mtype: nullable MType */;
1152 val
* var3
/* : AExpr */;
1153 val
* var5
/* : AExpr */;
1154 val
* var6
/* : nullable MType */;
1155 short int var7
/* : Bool */;
1158 typing__AAttrFormExpr__resolve_property(self
, var_v
); /* Direct call typing#AAttrFormExpr#resolve_property on <self:AAttrAssignExpr>*/
1161 { /* Inline typing#AAttrFormExpr#attr_type (self) on <self:AAttrAssignExpr> */
1162 var2
= self
->attrs
[COLOR_typing__AAttrFormExpr___attr_type
].val
; /* _attr_type on <self:AAttrAssignExpr> */
1169 { /* Inline parser_nodes#AAssignFormExpr#n_value (self) on <self:AAttrAssignExpr> */
1170 var5
= self
->attrs
[COLOR_parser_nodes__AAssignFormExpr___n_value
].val
; /* _n_value on <self:AAttrAssignExpr> */
1171 if (unlikely(var5
== NULL
)) {
1172 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_value");
1173 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 1445);
1181 var6
= typing__TypeVisitor__visit_expr_subtype(var_v
, var3
, var_mtype
);
1185 { /* Inline typing#AExpr#is_typed= (self,var7) on <self:AAttrAssignExpr> */
1186 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var7
; /* _is_typed on <self:AAttrAssignExpr> */
1192 /* method typing#AAttrAssignExpr#accept_typing for (self: Object, TypeVisitor) */
1193 void VIRTUAL_typing__AAttrAssignExpr__accept_typing(val
* self
, val
* p0
) {
1194 typing__AAttrAssignExpr__accept_typing(self
, p0
); /* Direct call typing#AAttrAssignExpr#accept_typing on <self:Object(AAttrAssignExpr)>*/
1197 /* method typing#AAttrReassignExpr#accept_typing for (self: AAttrReassignExpr, TypeVisitor) */
1198 void typing__AAttrReassignExpr__accept_typing(val
* self
, val
* p0
) {
1199 val
* var_v
/* var v: TypeVisitor */;
1200 val
* var
/* : nullable MType */;
1201 val
* var2
/* : nullable MType */;
1202 val
* var_mtype
/* var mtype: nullable MType */;
1203 val
* var3
/* : null */;
1204 short int var4
/* : Bool */;
1205 short int var5
/* : Bool */;
1206 val
* var_other
/* var other: nullable Object */;
1207 short int var7
/* : Bool */;
1208 short int var9
/* : Bool */;
1209 val
* var10
/* : nullable MType */;
1210 short int var11
/* : Bool */;
1213 typing__AAttrFormExpr__resolve_property(self
, var_v
); /* Direct call typing#AAttrFormExpr#resolve_property on <self:AAttrReassignExpr>*/
1216 { /* Inline typing#AAttrFormExpr#attr_type (self) on <self:AAttrReassignExpr> */
1217 var2
= self
->attrs
[COLOR_typing__AAttrFormExpr___attr_type
].val
; /* _attr_type on <self:AAttrReassignExpr> */
1224 if (var_mtype
== NULL
) {
1225 var4
= 1; /* is null */
1227 var4
= 0; /* arg is null but recv is not */
1230 { /* Inline kernel#Object#== (var_mtype,var3) on <var_mtype:nullable MType> */
1233 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
1234 var9
= var_mtype
== var_other
;
1251 var10
= typing__AReassignFormExpr__resolve_reassignment(self
, var_v
, var_mtype
, var_mtype
);
1255 { /* Inline typing#AExpr#is_typed= (self,var11) on <self:AAttrReassignExpr> */
1256 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var11
; /* _is_typed on <self:AAttrReassignExpr> */
1257 RET_LABEL12
:(void)0;
1262 /* method typing#AAttrReassignExpr#accept_typing for (self: Object, TypeVisitor) */
1263 void VIRTUAL_typing__AAttrReassignExpr__accept_typing(val
* self
, val
* p0
) {
1264 typing__AAttrReassignExpr__accept_typing(self
, p0
); /* Direct call typing#AAttrReassignExpr#accept_typing on <self:Object(AAttrReassignExpr)>*/
1267 /* method typing#AIssetAttrExpr#accept_typing for (self: AIssetAttrExpr, TypeVisitor) */
1268 void typing__AIssetAttrExpr__accept_typing(val
* self
, val
* p0
) {
1269 val
* var_v
/* var v: TypeVisitor */;
1270 val
* var
/* : nullable MType */;
1271 val
* var2
/* : nullable MType */;
1272 val
* var_mtype
/* var mtype: nullable MType */;
1273 val
* var3
/* : null */;
1274 short int var4
/* : Bool */;
1275 short int var5
/* : Bool */;
1276 val
* var_other
/* var other: nullable Object */;
1277 short int var7
/* : Bool */;
1278 short int var9
/* : Bool */;
1279 val
* var10
/* : AExpr */;
1280 val
* var12
/* : AExpr */;
1281 val
* var13
/* : nullable MType */;
1282 val
* var_recvtype
/* var recvtype: MType */;
1283 short int var14
/* : Bool */;
1284 val
* var15
/* : MType */;
1285 val
* var_bound
/* var bound: MType */;
1286 short int var16
/* : Bool */;
1289 static val
* varonce
;
1290 val
* var17
/* : String */;
1291 char* var18
/* : NativeString */;
1292 long var19
/* : Int */;
1293 val
* var20
/* : FlatString */;
1294 val
* var21
/* : nullable MType */;
1297 typing__AAttrFormExpr__resolve_property(self
, var_v
); /* Direct call typing#AAttrFormExpr#resolve_property on <self:AIssetAttrExpr>*/
1300 { /* Inline typing#AAttrFormExpr#attr_type (self) on <self:AIssetAttrExpr> */
1301 var2
= self
->attrs
[COLOR_typing__AAttrFormExpr___attr_type
].val
; /* _attr_type on <self:AIssetAttrExpr> */
1308 if (var_mtype
== NULL
) {
1309 var4
= 1; /* is null */
1311 var4
= 0; /* arg is null but recv is not */
1314 { /* Inline kernel#Object#== (var_mtype,var3) on <var_mtype:nullable MType> */
1317 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
1318 var9
= var_mtype
== var_other
;
1335 { /* Inline parser_nodes#AAttrFormExpr#n_expr (self) on <self:AIssetAttrExpr> */
1336 var12
= self
->attrs
[COLOR_parser_nodes__AAttrFormExpr___n_expr
].val
; /* _n_expr on <self:AIssetAttrExpr> */
1337 if (unlikely(var12
== NULL
)) {
1338 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_expr");
1339 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 1621);
1343 RET_LABEL11
:(void)0;
1347 var13
= ((val
* (*)(val
*))(var10
->class->vft
[COLOR_typing__AExpr__mtype
]))(var10
) /* mtype on <var10:AExpr>*/;
1349 if (unlikely(var13
== NULL
)) {
1350 PRINT_ERROR("Runtime error: %s", "Cast failed");
1351 PRINT_ERROR(" (%s:%d)\n", "semantize/typing.nit", 1827);
1354 var_recvtype
= var13
;
1357 var15
= typing__TypeVisitor__resolve_for(var_v
, var_mtype
, var_recvtype
, var14
);
1360 /* <var_bound:MType> isa MNullableType */
1361 cltype
= type_model__MNullableType
.color
;
1362 idtype
= type_model__MNullableType
.id
;
1363 if(cltype
>= var_bound
->type
->table_size
) {
1366 var16
= var_bound
->type
->type_table
[cltype
] == idtype
;
1372 var18
= "Error: isset on a nullable attribute.";
1374 var20
= string__NativeString__to_s_with_length(var18
, var19
);
1379 typing__TypeVisitor__error(var_v
, self
, var17
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
1384 var21
= typing__TypeVisitor__type_bool(var_v
, self
);
1387 { /* Inline typing#AExpr#mtype= (self,var21) on <self:AIssetAttrExpr> */
1388 self
->attrs
[COLOR_typing__AExpr___mtype
].val
= var21
; /* _mtype on <self:AIssetAttrExpr> */
1389 RET_LABEL22
:(void)0;
1394 /* method typing#AIssetAttrExpr#accept_typing for (self: Object, TypeVisitor) */
1395 void VIRTUAL_typing__AIssetAttrExpr__accept_typing(val
* self
, val
* p0
) {
1396 typing__AIssetAttrExpr__accept_typing(self
, p0
); /* Direct call typing#AIssetAttrExpr#accept_typing on <self:Object(AIssetAttrExpr)>*/
1399 /* method typing#AVarargExpr#accept_typing for (self: AVarargExpr, TypeVisitor) */
1400 void typing__AVarargExpr__accept_typing(val
* self
, val
* p0
) {
1401 val
* var_v
/* var v: TypeVisitor */;
1402 static val
* varonce
;
1403 val
* var
/* : String */;
1404 char* var1
/* : NativeString */;
1405 long var2
/* : Int */;
1406 val
* var3
/* : FlatString */;
1411 var1
= "Syntax error: unexpected `...`";
1413 var3
= string__NativeString__to_s_with_length(var1
, var2
);
1418 typing__TypeVisitor__error(var_v
, self
, var
); /* Direct call typing#TypeVisitor#error on <var_v:TypeVisitor>*/
1422 /* method typing#AVarargExpr#accept_typing for (self: Object, TypeVisitor) */
1423 void VIRTUAL_typing__AVarargExpr__accept_typing(val
* self
, val
* p0
) {
1424 typing__AVarargExpr__accept_typing(self
, p0
); /* Direct call typing#AVarargExpr#accept_typing on <self:Object(AVarargExpr)>*/
1427 /* method typing#ADebugTypeExpr#accept_typing for (self: ADebugTypeExpr, TypeVisitor) */
1428 void typing__ADebugTypeExpr__accept_typing(val
* self
, val
* p0
) {
1429 val
* var_v
/* var v: TypeVisitor */;
1430 val
* var
/* : AExpr */;
1431 val
* var2
/* : AExpr */;
1432 val
* var3
/* : nullable MType */;
1433 val
* var_expr
/* var expr: nullable MType */;
1434 val
* var4
/* : null */;
1435 short int var5
/* : Bool */;
1436 short int var6
/* : Bool */;
1437 val
* var_other
/* var other: nullable Object */;
1438 short int var8
/* : Bool */;
1439 short int var10
/* : Bool */;
1440 val
* var11
/* : MType */;
1441 val
* var_unsafe
/* var unsafe: MType */;
1442 val
* var12
/* : AType */;
1443 val
* var14
/* : AType */;
1444 val
* var_ntype
/* var ntype: AType */;
1445 val
* var15
/* : nullable MType */;
1446 val
* var_mtype
/* var mtype: nullable MType */;
1447 short int var16
/* : Bool */;
1448 val
* var17
/* : null */;
1449 short int var18
/* : Bool */;
1450 short int var19
/* : Bool */;
1451 val
* var_other21
/* var other: nullable Object */;
1452 short int var22
/* : Bool */;
1453 short int var23
/* : Bool */;
1454 short int var24
/* : Bool */;
1455 short int var_
/* var : Bool */;
1456 short int var25
/* : Bool */;
1457 short int var26
/* : Bool */;
1458 short int var28
/* : Bool */;
1459 short int var29
/* : Bool */;
1460 short int var30
/* : Bool */;
1461 val
* var31
/* : MType */;
1462 val
* var_umtype
/* var umtype: MType */;
1463 val
* var32
/* : ModelBuilder */;
1464 val
* var34
/* : ModelBuilder */;
1465 static val
* varonce
;
1466 val
* var35
/* : String */;
1467 char* var36
/* : NativeString */;
1468 long var37
/* : Int */;
1469 val
* var38
/* : FlatString */;
1470 static val
* varonce39
;
1471 val
* var40
/* : String */;
1472 char* var41
/* : NativeString */;
1473 long var42
/* : Int */;
1474 val
* var43
/* : FlatString */;
1475 static val
* varonce44
;
1476 val
* var45
/* : String */;
1477 char* var46
/* : NativeString */;
1478 long var47
/* : Int */;
1479 val
* var48
/* : FlatString */;
1480 static val
* varonce49
;
1481 val
* var50
/* : String */;
1482 char* var51
/* : NativeString */;
1483 long var52
/* : Int */;
1484 val
* var53
/* : FlatString */;
1485 static val
* varonce54
;
1486 val
* var55
/* : String */;
1487 char* var56
/* : NativeString */;
1488 long var57
/* : Int */;
1489 val
* var58
/* : FlatString */;
1490 static val
* varonce59
;
1491 val
* var60
/* : String */;
1492 char* var61
/* : NativeString */;
1493 long var62
/* : Int */;
1494 val
* var63
/* : FlatString */;
1495 val
* var64
/* : Array[Object] */;
1496 long var65
/* : Int */;
1497 val
* var66
/* : NativeArray[Object] */;
1498 val
* var67
/* : String */;
1499 short int var68
/* : Bool */;
1502 { /* Inline parser_nodes#ADebugTypeExpr#n_expr (self) on <self:ADebugTypeExpr> */
1503 var2
= self
->attrs
[COLOR_parser_nodes__ADebugTypeExpr___n_expr
].val
; /* _n_expr on <self:ADebugTypeExpr> */
1504 if (unlikely(var2
== NULL
)) {
1505 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_expr");
1506 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 1939);
1514 var3
= typing__TypeVisitor__visit_expr(var_v
, var
);
1518 if (var_expr
== NULL
) {
1519 var5
= 1; /* is null */
1521 var5
= 0; /* arg is null but recv is not */
1524 { /* Inline kernel#Object#== (var_expr,var4) on <var_expr:nullable MType> */
1527 { /* Inline kernel#Object#is_same_instance (var_expr,var_other) on <var_expr:nullable MType(MType)> */
1528 var10
= var_expr
== var_other
;
1545 var11
= typing__TypeVisitor__anchor_to(var_v
, var_expr
);
1549 { /* Inline parser_nodes#ADebugTypeExpr#n_type (self) on <self:ADebugTypeExpr> */
1550 var14
= self
->attrs
[COLOR_parser_nodes__ADebugTypeExpr___n_type
].val
; /* _n_type on <self:ADebugTypeExpr> */
1551 if (unlikely(var14
== NULL
)) {
1552 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
1553 PRINT_ERROR(" (%s:%d)\n", "parser/parser_nodes.nit", 1940);
1557 RET_LABEL13
:(void)0;
1562 var15
= typing__TypeVisitor__resolve_mtype(var_v
, var_ntype
);
1566 if (var_mtype
== NULL
) {
1567 var18
= 0; /* is null */
1569 var18
= 1; /* arg is null and recv is not */
1572 { /* Inline kernel#Object#!= (var_mtype,var17) on <var_mtype:nullable MType> */
1573 var_other21
= var17
;
1575 var23
= ((short int (*)(val
*, val
*))(var_mtype
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_mtype
, var_other21
) /* == on <var_mtype:nullable MType(MType)>*/;
1581 RET_LABEL20
:(void)0;
1588 { /* Inline kernel#Object#!= (var_mtype,var_expr) on <var_mtype:nullable MType(MType)> */
1589 var_other21
= var_expr
;
1591 var29
= ((short int (*)(val
*, val
*))(var_mtype
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_mtype
, var_other21
) /* == on <var_mtype:nullable MType(MType)>*/;
1597 RET_LABEL27
:(void)0;
1607 var31
= typing__TypeVisitor__anchor_to(var_v
, var_mtype
);
1611 { /* Inline typing#TypeVisitor#modelbuilder (var_v) on <var_v:TypeVisitor> */
1612 var34
= var_v
->attrs
[COLOR_typing__TypeVisitor___modelbuilder
].val
; /* _modelbuilder on <var_v:TypeVisitor> */
1613 if (unlikely(var34
== NULL
)) {
1614 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1615 PRINT_ERROR(" (%s:%d)\n", "semantize/typing.nit", 34);
1619 RET_LABEL33
:(void)0;
1627 var38
= string__NativeString__to_s_with_length(var36
, var37
);
1634 var41
= "Found type ";
1636 var43
= string__NativeString__to_s_with_length(var41
, var42
);
1645 var48
= string__NativeString__to_s_with_length(var46
, var47
);
1652 var51
= "), expected ";
1654 var53
= string__NativeString__to_s_with_length(var51
, var52
);
1663 var58
= string__NativeString__to_s_with_length(var56
, var57
);
1672 var63
= string__NativeString__to_s_with_length(var61
, var62
);
1676 var64
= NEW_array__Array(&type_array__Arraykernel__Object
);
1677 { /* var64 = array_instance Array[Object] */
1679 var66
= NEW_array__NativeArray(var65
, &type_array__NativeArraykernel__Object
);
1680 ((struct instance_array__NativeArray
*)var66
)->values
[0] = (val
*) var40
;
1681 ((struct instance_array__NativeArray
*)var66
)->values
[1] = (val
*) var_expr
;
1682 ((struct instance_array__NativeArray
*)var66
)->values
[2] = (val
*) var45
;
1683 ((struct instance_array__NativeArray
*)var66
)->values
[3] = (val
*) var_unsafe
;
1684 ((struct instance_array__NativeArray
*)var66
)->values
[4] = (val
*) var50
;
1685 ((struct instance_array__NativeArray
*)var66
)->values
[5] = (val
*) var_mtype
;
1686 ((struct instance_array__NativeArray
*)var66
)->values
[6] = (val
*) var55
;
1687 ((struct instance_array__NativeArray
*)var66
)->values
[7] = (val
*) var_umtype
;
1688 ((struct instance_array__NativeArray
*)var66
)->values
[8] = (val
*) var60
;
1690 ((void (*)(val
*, val
*, long))(var64
->class->vft
[COLOR_array__Array__with_native
]))(var64
, var66
, var65
) /* with_native on <var64:Array[Object]>*/;
1694 var67
= ((val
* (*)(val
*))(var64
->class->vft
[COLOR_string__Object__to_s
]))(var64
) /* to_s on <var64:Array[Object]>*/;
1697 modelbuilder__ModelBuilder__warning(var32
, self
, var35
, var67
); /* Direct call modelbuilder#ModelBuilder#warning on <var32:ModelBuilder>*/
1703 { /* Inline typing#AExpr#is_typed= (self,var68) on <self:ADebugTypeExpr> */
1704 self
->attrs
[COLOR_typing__AExpr___is_typed
].s
= var68
; /* _is_typed on <self:ADebugTypeExpr> */
1705 RET_LABEL69
:(void)0;
1710 /* method typing#ADebugTypeExpr#accept_typing for (self: Object, TypeVisitor) */
1711 void VIRTUAL_typing__ADebugTypeExpr__accept_typing(val
* self
, val
* p0
) {
1712 typing__ADebugTypeExpr__accept_typing(self
, p0
); /* Direct call typing#ADebugTypeExpr#accept_typing on <self:Object(ADebugTypeExpr)>*/