1 #include "modelize_property.sep.0.h"
2 /* method modelize_property#AAttrPropdef#build_property for (self: AAttrPropdef, ModelBuilder, MClassDef) */
3 void modelize_property__AAttrPropdef__build_property(val
* self
, val
* p0
, val
* p1
) {
4 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
5 val
* var_mclassdef
/* var mclassdef: MClassDef */;
6 val
* var
/* : MClass */;
7 val
* var2
/* : MClass */;
8 val
* var_mclass
/* var mclass: MClass */;
9 val
* var3
/* : nullable TAttrid */;
10 val
* var4
/* : null */;
11 short int var5
/* : Bool */;
12 short int var6
/* : Bool */;
13 val
* var_other
/* var other: nullable Object */;
14 short int var8
/* : Bool */;
15 short int var9
/* : Bool */;
16 short int var10
/* : Bool */;
17 val
* var11
/* : nullable TAttrid */;
18 val
* var12
/* : String */;
19 val
* var_name
/* var name: String */;
20 val
* var13
/* : nullable TId */;
21 val
* var14
/* : String */;
22 short int var15
/* : Bool */;
23 val
* var16
/* : MClassKind */;
24 val
* var18
/* : MClassKind */;
25 val
* var19
/* : MClassKind */;
26 short int var20
/* : Bool */;
27 short int var21
/* : Bool */;
28 val
* var_other23
/* var other: nullable Object */;
29 short int var24
/* : Bool */;
30 short int var26
/* : Bool */;
31 short int var_
/* var : Bool */;
32 val
* var27
/* : MClass */;
33 val
* var29
/* : MClass */;
34 val
* var30
/* : MClassKind */;
35 val
* var32
/* : MClassKind */;
36 val
* var33
/* : MClassKind */;
37 short int var34
/* : Bool */;
38 short int var35
/* : Bool */;
39 short int var37
/* : Bool */;
40 short int var39
/* : Bool */;
42 val
* var40
/* : String */;
43 char* var41
/* : NativeString */;
44 long var42
/* : Int */;
45 val
* var43
/* : FlatString */;
46 static val
* varonce44
;
47 val
* var45
/* : String */;
48 char* var46
/* : NativeString */;
49 long var47
/* : Int */;
50 val
* var48
/* : FlatString */;
51 static val
* varonce49
;
52 val
* var50
/* : String */;
53 char* var51
/* : NativeString */;
54 long var52
/* : Int */;
55 val
* var53
/* : FlatString */;
56 val
* var54
/* : Array[Object] */;
57 long var55
/* : Int */;
58 val
* var56
/* : NativeArray[Object] */;
59 val
* var57
/* : String */;
60 val
* var58
/* : MClassKind */;
61 val
* var60
/* : MClassKind */;
62 val
* var61
/* : MClassKind */;
63 short int var62
/* : Bool */;
64 short int var63
/* : Bool */;
65 short int var65
/* : Bool */;
66 short int var67
/* : Bool */;
67 static val
* varonce68
;
68 val
* var69
/* : String */;
69 char* var70
/* : NativeString */;
70 long var71
/* : Int */;
71 val
* var72
/* : FlatString */;
72 static val
* varonce73
;
73 val
* var74
/* : String */;
74 char* var75
/* : NativeString */;
75 long var76
/* : Int */;
76 val
* var77
/* : FlatString */;
77 static val
* varonce78
;
78 val
* var79
/* : String */;
79 char* var80
/* : NativeString */;
80 long var81
/* : Int */;
81 val
* var82
/* : FlatString */;
82 val
* var83
/* : Array[Object] */;
83 long var84
/* : Int */;
84 val
* var85
/* : NativeArray[Object] */;
85 val
* var86
/* : String */;
86 val
* var87
/* : MClassKind */;
87 val
* var89
/* : MClassKind */;
88 val
* var90
/* : MClassKind */;
89 short int var91
/* : Bool */;
90 short int var92
/* : Bool */;
91 short int var94
/* : Bool */;
92 short int var96
/* : Bool */;
93 static val
* varonce97
;
94 val
* var98
/* : String */;
95 char* var99
/* : NativeString */;
96 long var100
/* : Int */;
97 val
* var101
/* : FlatString */;
98 static val
* varonce102
;
99 val
* var103
/* : String */;
100 char* var104
/* : NativeString */;
101 long var105
/* : Int */;
102 val
* var106
/* : FlatString */;
103 static val
* varonce107
;
104 val
* var108
/* : String */;
105 char* var109
/* : NativeString */;
106 long var110
/* : Int */;
107 val
* var111
/* : FlatString */;
108 val
* var112
/* : Array[Object] */;
109 long var113
/* : Int */;
110 val
* var114
/* : NativeArray[Object] */;
111 val
* var115
/* : String */;
112 val
* var116
/* : nullable TAttrid */;
113 val
* var_nid
/* var nid: nullable TAttrid */;
114 val
* var117
/* : null */;
115 short int var118
/* : Bool */;
116 short int var119
/* : Bool */;
117 short int var121
/* : Bool */;
118 short int var122
/* : Bool */;
119 short int var123
/* : Bool */;
120 val
* var124
/* : nullable MProperty */;
121 val
* var_mprop
/* var mprop: nullable MProperty */;
122 val
* var125
/* : null */;
123 short int var126
/* : Bool */;
124 short int var127
/* : Bool */;
125 short int var129
/* : Bool */;
126 short int var131
/* : Bool */;
127 val
* var132
/* : nullable AVisibility */;
128 val
* var133
/* : MVisibility */;
129 val
* var_mvisibility
/* var mvisibility: MVisibility */;
130 val
* var134
/* : MAttribute */;
131 val
* var135
/* : nullable TKwredef */;
132 short int var136
/* : Bool */;
133 short int var137
/* : Bool */;
134 short int var138
/* : Bool */;
135 short int var139
/* : Bool */;
138 val
* var140
/* : nullable AVisibility */;
139 val
* var141
/* : nullable TKwredef */;
140 short int var142
/* : Bool */;
141 short int var143
/* : Bool */;
142 short int var144
/* : Bool */;
143 val
* var145
/* : Map[MProperty, APropdef] */;
144 val
* var147
/* : Map[MProperty, APropdef] */;
145 val
* var148
/* : MAttributeDef */;
146 val
* var149
/* : Location */;
147 val
* var_mpropdef
/* var mpropdef: MAttributeDef */;
148 short int var150
/* : Bool */;
151 const struct type
* type_struct
;
152 const char* var_class_name
;
153 short int var154
/* : Bool */;
156 const struct type
* type_struct157
;
157 const char* var_class_name158
;
158 val
* var159
/* : HashMap[MPropDef, APropdef] */;
159 val
* var161
/* : HashMap[MPropDef, APropdef] */;
160 val
* var162
/* : nullable AAble */;
161 val
* var_nreadable
/* var nreadable: nullable AAble */;
162 val
* var163
/* : null */;
163 short int var164
/* : Bool */;
164 short int var165
/* : Bool */;
165 short int var167
/* : Bool */;
166 short int var168
/* : Bool */;
167 short int var169
/* : Bool */;
168 static val
* varonce170
;
169 val
* var171
/* : String */;
170 char* var172
/* : NativeString */;
171 long var173
/* : Int */;
172 val
* var174
/* : FlatString */;
173 val
* var175
/* : nullable AAble */;
174 val
* var_nwritable
/* var nwritable: nullable AAble */;
175 val
* var176
/* : null */;
176 short int var177
/* : Bool */;
177 short int var178
/* : Bool */;
178 short int var180
/* : Bool */;
179 short int var181
/* : Bool */;
180 short int var182
/* : Bool */;
181 static val
* varonce183
;
182 val
* var184
/* : String */;
183 char* var185
/* : NativeString */;
184 long var186
/* : Int */;
185 val
* var187
/* : FlatString */;
186 val
* var188
/* : nullable TId */;
187 val
* var_nid2
/* var nid2: TId */;
188 val
* var189
/* : MAttribute */;
189 static val
* varonce190
;
190 val
* var191
/* : String */;
191 char* var192
/* : NativeString */;
192 long var193
/* : Int */;
193 val
* var194
/* : FlatString */;
194 val
* var195
/* : String */;
195 val
* var196
/* : MVisibility */;
196 val
* var_mprop197
/* var mprop: MAttribute */;
197 val
* var198
/* : MAttributeDef */;
198 val
* var199
/* : Location */;
199 val
* var_mpropdef200
/* var mpropdef: MAttributeDef */;
200 short int var201
/* : Bool */;
203 const struct type
* type_struct204
;
204 const char* var_class_name205
;
205 short int var207
/* : Bool */;
208 const struct type
* type_struct210
;
209 const char* var_class_name211
;
210 val
* var212
/* : HashMap[MPropDef, APropdef] */;
211 val
* var214
/* : HashMap[MPropDef, APropdef] */;
212 val
* var_readname
/* var readname: String */;
213 val
* var215
/* : nullable MProperty */;
214 short int var216
/* : Bool */;
217 const char* var_class_name219
;
218 val
* var_mreadprop
/* var mreadprop: nullable MMethod */;
219 val
* var220
/* : null */;
220 short int var221
/* : Bool */;
221 short int var222
/* : Bool */;
222 short int var224
/* : Bool */;
223 short int var226
/* : Bool */;
224 val
* var227
/* : nullable AVisibility */;
225 val
* var228
/* : MVisibility */;
226 val
* var_mvisibility229
/* var mvisibility: MVisibility */;
227 val
* var230
/* : MMethod */;
228 val
* var231
/* : nullable TKwredef */;
229 short int var232
/* : Bool */;
230 short int var233
/* : Bool */;
231 short int var234
/* : Bool */;
232 val
* var235
/* : nullable TKwredef */;
233 short int var236
/* : Bool */;
234 short int var237
/* : Bool */;
235 short int var238
/* : Bool */;
236 val
* var239
/* : nullable AVisibility */;
237 val
* var240
/* : Map[MProperty, APropdef] */;
238 val
* var242
/* : Map[MProperty, APropdef] */;
239 val
* var243
/* : MMethodDef */;
240 val
* var244
/* : Location */;
241 val
* var_mreadpropdef
/* var mreadpropdef: MMethodDef */;
242 val
* var246
/* : HashMap[MPropDef, APropdef] */;
243 val
* var248
/* : HashMap[MPropDef, APropdef] */;
244 val
* var249
/* : nullable MDoc */;
245 val
* var251
/* : nullable MDoc */;
246 static val
* varonce253
;
247 val
* var254
/* : String */;
248 char* var255
/* : NativeString */;
249 long var256
/* : Int */;
250 val
* var257
/* : FlatString */;
251 val
* var258
/* : nullable AAnnotation */;
252 val
* var_atlazy
/* var atlazy: nullable AAnnotation */;
253 val
* var259
/* : null */;
254 short int var260
/* : Bool */;
255 short int var261
/* : Bool */;
256 short int var263
/* : Bool */;
257 short int var264
/* : Bool */;
258 short int var265
/* : Bool */;
259 val
* var266
/* : nullable AExpr */;
260 val
* var267
/* : null */;
261 short int var268
/* : Bool */;
262 short int var269
/* : Bool */;
263 short int var271
/* : Bool */;
264 short int var273
/* : Bool */;
265 static val
* varonce274
;
266 val
* var275
/* : String */;
267 char* var276
/* : NativeString */;
268 long var277
/* : Int */;
269 val
* var278
/* : FlatString */;
270 short int var279
/* : Bool */;
271 val
* var281
/* : MAttribute */;
272 static val
* varonce282
;
273 val
* var283
/* : String */;
274 char* var284
/* : NativeString */;
275 long var285
/* : Int */;
276 val
* var286
/* : FlatString */;
277 val
* var287
/* : String */;
278 val
* var288
/* : MVisibility */;
279 val
* var_mlazyprop
/* var mlazyprop: MAttribute */;
280 val
* var289
/* : MAttributeDef */;
281 val
* var290
/* : Location */;
282 val
* var_mlazypropdef
/* var mlazypropdef: MAttributeDef */;
283 static val
* varonce292
;
284 val
* var293
/* : String */;
285 char* var294
/* : NativeString */;
286 long var295
/* : Int */;
287 val
* var296
/* : FlatString */;
288 val
* var297
/* : nullable AAnnotation */;
289 val
* var_atreadonly
/* var atreadonly: nullable AAnnotation */;
290 val
* var298
/* : null */;
291 short int var299
/* : Bool */;
292 short int var300
/* : Bool */;
293 short int var302
/* : Bool */;
294 short int var303
/* : Bool */;
295 short int var304
/* : Bool */;
296 val
* var305
/* : nullable AExpr */;
297 val
* var306
/* : null */;
298 short int var307
/* : Bool */;
299 short int var308
/* : Bool */;
300 short int var310
/* : Bool */;
301 short int var312
/* : Bool */;
302 static val
* varonce313
;
303 val
* var314
/* : String */;
304 char* var315
/* : NativeString */;
305 long var316
/* : Int */;
306 val
* var317
/* : FlatString */;
307 static val
* varonce318
;
308 val
* var319
/* : String */;
309 char* var320
/* : NativeString */;
310 long var321
/* : Int */;
311 val
* var322
/* : FlatString */;
312 val
* var323
/* : String */;
313 val
* var_writename
/* var writename: String */;
314 val
* var324
/* : nullable AAble */;
315 val
* var_nwritable325
/* var nwritable: nullable AAble */;
316 static val
* varonce326
;
317 val
* var327
/* : String */;
318 char* var328
/* : NativeString */;
319 long var329
/* : Int */;
320 val
* var330
/* : FlatString */;
321 val
* var331
/* : nullable AAnnotation */;
322 val
* var_atwritable
/* var atwritable: nullable AAnnotation */;
323 val
* var332
/* : null */;
324 short int var333
/* : Bool */;
325 short int var334
/* : Bool */;
326 short int var336
/* : Bool */;
327 short int var337
/* : Bool */;
328 short int var338
/* : Bool */;
329 val
* var339
/* : ANodes[AAtArg] */;
330 val
* var341
/* : ANodes[AAtArg] */;
331 short int var342
/* : Bool */;
332 short int var343
/* : Bool */;
333 val
* var344
/* : String */;
334 val
* var345
/* : nullable String */;
335 val
* var346
/* : nullable MProperty */;
336 short int var347
/* : Bool */;
339 const char* var_class_name350
;
340 val
* var_mwriteprop
/* var mwriteprop: nullable MMethod */;
341 val
* var351
/* : null */;
342 val
* var_nwkwredef
/* var nwkwredef: nullable Token */;
343 val
* var352
/* : null */;
344 short int var353
/* : Bool */;
345 short int var354
/* : Bool */;
346 short int var356
/* : Bool */;
347 short int var357
/* : Bool */;
348 short int var358
/* : Bool */;
349 val
* var359
/* : nullable TKwredef */;
350 val
* var360
/* : null */;
351 short int var361
/* : Bool */;
352 short int var362
/* : Bool */;
353 short int var364
/* : Bool */;
354 short int var365
/* : Bool */;
355 short int var366
/* : Bool */;
356 val
* var367
/* : nullable TKwredef */;
357 val
* var368
/* : null */;
358 short int var369
/* : Bool */;
359 short int var370
/* : Bool */;
360 short int var372
/* : Bool */;
361 short int var374
/* : Bool */;
362 val
* var375
/* : null */;
363 short int var376
/* : Bool */;
364 short int var377
/* : Bool */;
365 short int var379
/* : Bool */;
366 short int var380
/* : Bool */;
367 short int var381
/* : Bool */;
368 val
* var382
/* : nullable AVisibility */;
369 val
* var383
/* : MVisibility */;
370 val
* var_mvisibility384
/* var mvisibility: nullable Object */;
371 val
* var385
/* : null */;
372 short int var386
/* : Bool */;
373 short int var387
/* : Bool */;
374 short int var389
/* : Bool */;
375 short int var390
/* : Bool */;
376 short int var391
/* : Bool */;
377 val
* var392
/* : nullable AVisibility */;
378 val
* var393
/* : MVisibility */;
379 val
* var394
/* : MVisibility */;
380 val
* var395
/* : MMethod */;
381 short int var396
/* : Bool */;
382 short int var397
/* : Bool */;
383 short int var398
/* : Bool */;
384 val
* var399
/* : nullable Token */;
385 val
* var400
/* : nullable TKwredef */;
386 short int var401
/* : Bool */;
387 short int var402
/* : Bool */;
388 short int var403
/* : Bool */;
389 val
* var404
/* : null */;
390 short int var405
/* : Bool */;
391 short int var406
/* : Bool */;
392 short int var408
/* : Bool */;
393 short int var409
/* : Bool */;
394 short int var410
/* : Bool */;
395 val
* var411
/* : nullable AVisibility */;
396 val
* var412
/* : null */;
397 short int var413
/* : Bool */;
398 short int var414
/* : Bool */;
399 short int var416
/* : Bool */;
400 short int var417
/* : Bool */;
401 short int var418
/* : Bool */;
402 val
* var419
/* : nullable AVisibility */;
403 val
* var420
/* : Map[MProperty, APropdef] */;
404 val
* var422
/* : Map[MProperty, APropdef] */;
405 val
* var423
/* : MMethodDef */;
406 val
* var424
/* : Location */;
407 val
* var_mwritepropdef
/* var mwritepropdef: MMethodDef */;
408 val
* var426
/* : HashMap[MPropDef, APropdef] */;
409 val
* var428
/* : HashMap[MPropDef, APropdef] */;
410 val
* var429
/* : nullable MDoc */;
411 val
* var431
/* : nullable MDoc */;
412 var_modelbuilder
= p0
;
415 { /* Inline model#MClassDef#mclass (var_mclassdef) on <var_mclassdef:MClassDef> */
416 var2
= var_mclassdef
->attrs
[COLOR_model__MClassDef___mclass
].val
; /* _mclass on <var_mclassdef:MClassDef> */
417 if (unlikely(var2
== NULL
)) {
418 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
419 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 474);
428 var3
= parser_nodes__AAttrPropdef__n_id(self
);
432 var5
= 0; /* is null */
434 var5
= 1; /* arg is null and recv is not */
437 { /* Inline kernel#Object#!= (var3,var4) on <var3:nullable TAttrid> */
440 var9
= ((short int (*)(val
*, val
*))(var3
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var3
, var_other
) /* == on <var3:nullable TAttrid(TAttrid)>*/;
452 var11
= parser_nodes__AAttrPropdef__n_id(self
);
455 PRINT_ERROR("Runtime error: %s", "Receiver is null");
456 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 668);
459 var12
= lexer_work__Token__text(var11
);
464 var13
= parser_nodes__AAttrPropdef__n_id2(self
);
467 PRINT_ERROR("Runtime error: %s", "Receiver is null");
468 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 670);
471 var14
= lexer_work__Token__text(var13
);
476 { /* Inline model#MClass#kind (var_mclass) on <var_mclass:MClass> */
477 var18
= var_mclass
->attrs
[COLOR_model__MClass___kind
].val
; /* _kind on <var_mclass:MClass> */
478 if (unlikely(var18
== NULL
)) {
479 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _kind");
480 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 355);
488 var19
= model__Object__interface_kind(self
);
491 { /* Inline kernel#Object#== (var16,var19) on <var16:MClassKind> */
494 { /* Inline kernel#Object#is_same_instance (var16,var_other23) on <var16:MClassKind> */
495 var26
= var16
== var_other23
;
512 { /* Inline model#MClassDef#mclass (var_mclassdef) on <var_mclassdef:MClassDef> */
513 var29
= var_mclassdef
->attrs
[COLOR_model__MClassDef___mclass
].val
; /* _mclass on <var_mclassdef:MClassDef> */
514 if (unlikely(var29
== NULL
)) {
515 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
516 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 474);
524 { /* Inline model#MClass#kind (var27) on <var27:MClass> */
525 var32
= var27
->attrs
[COLOR_model__MClass___kind
].val
; /* _kind on <var27:MClass> */
526 if (unlikely(var32
== NULL
)) {
527 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _kind");
528 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 355);
536 var33
= model__Object__enum_kind(self
);
539 { /* Inline kernel#Object#== (var30,var33) on <var30:MClassKind> */
542 { /* Inline kernel#Object#is_same_instance (var30,var_other23) on <var30:MClassKind> */
543 var39
= var30
== var_other23
;
561 var41
= "Error: Attempt to define attribute ";
563 var43
= string__NativeString__to_s_with_length(var41
, var42
);
570 var46
= " in the interface ";
572 var48
= string__NativeString__to_s_with_length(var46
, var47
);
581 var53
= string__NativeString__to_s_with_length(var51
, var52
);
585 var54
= NEW_array__Array(&type_array__Arraykernel__Object
);
586 { /* var54 = array_instance Array[Object] */
588 var56
= NEW_array__NativeArray(var55
, &type_array__NativeArraykernel__Object
);
589 ((struct instance_array__NativeArray
*)var56
)->values
[0] = (val
*) var40
;
590 ((struct instance_array__NativeArray
*)var56
)->values
[1] = (val
*) var_name
;
591 ((struct instance_array__NativeArray
*)var56
)->values
[2] = (val
*) var45
;
592 ((struct instance_array__NativeArray
*)var56
)->values
[3] = (val
*) var_mclass
;
593 ((struct instance_array__NativeArray
*)var56
)->values
[4] = (val
*) var50
;
595 ((void (*)(val
*, val
*, long))(var54
->class->vft
[COLOR_array__Array__with_native
]))(var54
, var56
, var55
) /* with_native on <var54:Array[Object]>*/;
599 var57
= ((val
* (*)(val
*))(var54
->class->vft
[COLOR_string__Object__to_s
]))(var54
) /* to_s on <var54:Array[Object]>*/;
602 modelbuilder__ModelBuilder__error(var_modelbuilder
, self
, var57
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
606 { /* Inline model#MClass#kind (var_mclass) on <var_mclass:MClass> */
607 var60
= var_mclass
->attrs
[COLOR_model__MClass___kind
].val
; /* _kind on <var_mclass:MClass> */
608 if (unlikely(var60
== NULL
)) {
609 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _kind");
610 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 355);
618 var61
= model__Object__enum_kind(self
);
621 { /* Inline kernel#Object#== (var58,var61) on <var58:MClassKind> */
624 { /* Inline kernel#Object#is_same_instance (var58,var_other23) on <var58:MClassKind> */
625 var67
= var58
== var_other23
;
641 var70
= "Error: Attempt to define attribute ";
643 var72
= string__NativeString__to_s_with_length(var70
, var71
);
650 var75
= " in the enum class ";
652 var77
= string__NativeString__to_s_with_length(var75
, var76
);
661 var82
= string__NativeString__to_s_with_length(var80
, var81
);
665 var83
= NEW_array__Array(&type_array__Arraykernel__Object
);
666 { /* var83 = array_instance Array[Object] */
668 var85
= NEW_array__NativeArray(var84
, &type_array__NativeArraykernel__Object
);
669 ((struct instance_array__NativeArray
*)var85
)->values
[0] = (val
*) var69
;
670 ((struct instance_array__NativeArray
*)var85
)->values
[1] = (val
*) var_name
;
671 ((struct instance_array__NativeArray
*)var85
)->values
[2] = (val
*) var74
;
672 ((struct instance_array__NativeArray
*)var85
)->values
[3] = (val
*) var_mclass
;
673 ((struct instance_array__NativeArray
*)var85
)->values
[4] = (val
*) var79
;
675 ((void (*)(val
*, val
*, long))(var83
->class->vft
[COLOR_array__Array__with_native
]))(var83
, var85
, var84
) /* with_native on <var83:Array[Object]>*/;
679 var86
= ((val
* (*)(val
*))(var83
->class->vft
[COLOR_string__Object__to_s
]))(var83
) /* to_s on <var83:Array[Object]>*/;
682 modelbuilder__ModelBuilder__error(var_modelbuilder
, self
, var86
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
686 { /* Inline model#MClass#kind (var_mclass) on <var_mclass:MClass> */
687 var89
= var_mclass
->attrs
[COLOR_model__MClass___kind
].val
; /* _kind on <var_mclass:MClass> */
688 if (unlikely(var89
== NULL
)) {
689 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _kind");
690 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 355);
698 var90
= model__Object__extern_kind(self
);
701 { /* Inline kernel#Object#== (var87,var90) on <var87:MClassKind> */
704 { /* Inline kernel#Object#is_same_instance (var87,var_other23) on <var87:MClassKind> */
705 var96
= var87
== var_other23
;
721 var99
= "Error: Attempt to define attribute ";
723 var101
= string__NativeString__to_s_with_length(var99
, var100
);
730 var104
= " in the extern class ";
732 var106
= string__NativeString__to_s_with_length(var104
, var105
);
741 var111
= string__NativeString__to_s_with_length(var109
, var110
);
745 var112
= NEW_array__Array(&type_array__Arraykernel__Object
);
746 { /* var112 = array_instance Array[Object] */
748 var114
= NEW_array__NativeArray(var113
, &type_array__NativeArraykernel__Object
);
749 ((struct instance_array__NativeArray
*)var114
)->values
[0] = (val
*) var98
;
750 ((struct instance_array__NativeArray
*)var114
)->values
[1] = (val
*) var_name
;
751 ((struct instance_array__NativeArray
*)var114
)->values
[2] = (val
*) var103
;
752 ((struct instance_array__NativeArray
*)var114
)->values
[3] = (val
*) var_mclass
;
753 ((struct instance_array__NativeArray
*)var114
)->values
[4] = (val
*) var108
;
755 ((void (*)(val
*, val
*, long))(var112
->class->vft
[COLOR_array__Array__with_native
]))(var112
, var114
, var113
) /* with_native on <var112:Array[Object]>*/;
759 var115
= ((val
* (*)(val
*))(var112
->class->vft
[COLOR_string__Object__to_s
]))(var112
) /* to_s on <var112:Array[Object]>*/;
762 modelbuilder__ModelBuilder__error(var_modelbuilder
, self
, var115
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
769 var116
= parser_nodes__AAttrPropdef__n_id(self
);
773 if (var_nid
== NULL
) {
774 var118
= 0; /* is null */
776 var118
= 1; /* arg is null and recv is not */
779 { /* Inline kernel#Object#!= (var_nid,var117) on <var_nid:nullable TAttrid> */
782 var122
= ((short int (*)(val
*, val
*))(var_nid
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nid
, var_other
) /* == on <var_nid:nullable TAttrid(TAttrid)>*/;
788 RET_LABEL120
:(void)0;
794 var124
= modelbuilder__ModelBuilder__try_get_mproperty_by_name(var_modelbuilder
, var_nid
, var_mclassdef
, var_name
);
798 if (var_mprop
== NULL
) {
799 var126
= 1; /* is null */
801 var126
= 0; /* arg is null but recv is not */
804 { /* Inline kernel#Object#== (var_mprop,var125) on <var_mprop:nullable MProperty> */
805 var_other23
= var125
;
807 { /* Inline kernel#Object#is_same_instance (var_mprop,var_other23) on <var_mprop:nullable MProperty(MProperty)> */
808 var131
= var_mprop
== var_other23
;
811 RET_LABEL130
:(void)0;
816 RET_LABEL128
:(void)0;
822 var132
= parser_nodes__APropdef__n_visibility(self
);
825 var133
= modelize_property__APropdef__new_property_visibility(self
, var_modelbuilder
, var_mclassdef
, var132
);
827 var_mvisibility
= var133
;
828 var134
= NEW_model__MAttribute(&type_model__MAttribute
);
830 model__MAttribute__init(var134
, var_mclassdef
, var_name
, var_mvisibility
); /* Direct call model#MAttribute#init on <var134:MAttribute>*/
834 var135
= parser_nodes__APropdef__n_kwredef(self
);
838 var137
= modelize_property__APropdef__check_redef_keyword(self
, var_modelbuilder
, var_mclassdef
, var135
, var136
, var_mprop
);
846 /* <var_mprop:nullable MProperty(MProperty)> isa MAttribute */
847 cltype
= type_model__MAttribute
.color
;
848 idtype
= type_model__MAttribute
.id
;
849 if(cltype
>= var_mprop
->type
->table_size
) {
852 var139
= var_mprop
->type
->type_table
[cltype
] == idtype
;
854 if (unlikely(!var139
)) {
855 PRINT_ERROR("Runtime error: %s", "Assert failed");
856 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 690);
860 var140
= parser_nodes__APropdef__n_visibility(self
);
863 modelize_property__APropdef__check_redef_property_visibility(self
, var_modelbuilder
, var140
, var_mprop
); /* Direct call modelize_property#APropdef#check_redef_property_visibility on <self:AAttrPropdef>*/
866 var141
= parser_nodes__APropdef__n_kwredef(self
);
870 var143
= modelize_property__APropdef__check_redef_keyword(self
, var_modelbuilder
, var_mclassdef
, var141
, var142
, var_mprop
);
879 { /* Inline modelize_property#MClassDef#mprop2npropdef (var_mclassdef) on <var_mclassdef:MClassDef> */
880 var147
= var_mclassdef
->attrs
[COLOR_modelize_property__MClassDef___mprop2npropdef
].val
; /* _mprop2npropdef on <var_mclassdef:MClassDef> */
881 if (unlikely(var147
== NULL
)) {
882 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mprop2npropdef");
883 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 252);
887 RET_LABEL146
:(void)0;
891 ((void (*)(val
*, val
*, val
*))(var145
->class->vft
[COLOR_abstract_collection__Map___91d_93d_61d
]))(var145
, var_mprop
, self
) /* []= on <var145:Map[MProperty, APropdef]>*/;
893 var148
= NEW_model__MAttributeDef(&type_model__MAttributeDef
);
895 var149
= parser_nodes__ANode__location(self
);
898 model__MAttributeDef__init(var148
, var_mclassdef
, var_mprop
, var149
); /* Direct call model#MAttributeDef#init on <var148:MAttributeDef>*/
900 var_mpropdef
= var148
;
901 /* <var_mpropdef:MAttributeDef> isa nullable MPROPDEF */
902 type_struct
= self
->type
->resolution_table
->types
[COLOR_nullable_parser_nodes__APropdef_VTMPROPDEF
];
903 cltype151
= type_struct
->color
;
904 idtype152
= type_struct
->id
;
905 if(cltype151
>= var_mpropdef
->type
->table_size
) {
908 var150
= var_mpropdef
->type
->type_table
[cltype151
] == idtype152
;
910 if (unlikely(!var150
)) {
911 var_class_name
= var_mpropdef
== NULL ?
"null" : var_mpropdef
->type
->name
;
912 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable MPROPDEF", var_class_name
);
913 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 697);
917 { /* Inline modelize_property#APropdef#mpropdef= (self,var_mpropdef) on <self:AAttrPropdef> */
918 /* Covariant cast for argument 0 (mpropdef) <var_mpropdef:MAttributeDef> isa nullable MPROPDEF */
919 /* <var_mpropdef:MAttributeDef> isa nullable MPROPDEF */
920 type_struct157
= self
->type
->resolution_table
->types
[COLOR_nullable_parser_nodes__APropdef_VTMPROPDEF
];
921 cltype155
= type_struct157
->color
;
922 idtype156
= type_struct157
->id
;
923 if(cltype155
>= var_mpropdef
->type
->table_size
) {
926 var154
= var_mpropdef
->type
->type_table
[cltype155
] == idtype156
;
928 if (unlikely(!var154
)) {
929 var_class_name158
= var_mpropdef
== NULL ?
"null" : var_mpropdef
->type
->name
;
930 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable MPROPDEF", var_class_name158
);
931 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 283);
934 self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
= var_mpropdef
; /* _mpropdef on <self:AAttrPropdef> */
935 RET_LABEL153
:(void)0;
939 { /* Inline modelize_property#ModelBuilder#mpropdef2npropdef (var_modelbuilder) on <var_modelbuilder:ModelBuilder> */
940 var161
= var_modelbuilder
->attrs
[COLOR_modelize_property__ModelBuilder___mpropdef2npropdef
].val
; /* _mpropdef2npropdef on <var_modelbuilder:ModelBuilder> */
941 if (unlikely(var161
== NULL
)) {
942 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mpropdef2npropdef");
943 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 39);
947 RET_LABEL160
:(void)0;
951 hash_collection__HashMap___91d_93d_61d(var159
, var_mpropdef
, self
); /* Direct call hash_collection#HashMap#[]= on <var159:HashMap[MPropDef, APropdef]>*/
954 modelize_property__APropdef__set_doc(self
, var_mpropdef
); /* Direct call modelize_property#APropdef#set_doc on <self:AAttrPropdef>*/
957 var162
= parser_nodes__AAttrPropdef__n_readable(self
);
959 var_nreadable
= var162
;
961 if (var_nreadable
== NULL
) {
962 var164
= 0; /* is null */
964 var164
= 1; /* arg is null and recv is not */
967 { /* Inline kernel#Object#!= (var_nreadable,var163) on <var_nreadable:nullable AAble> */
970 var168
= ((short int (*)(val
*, val
*))(var_nreadable
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nreadable
, var_other
) /* == on <var_nreadable:nullable AAble(AAble)>*/;
976 RET_LABEL166
:(void)0;
984 var172
= "Error: old-style getter no more supported";
986 var174
= string__NativeString__to_s_with_length(var172
, var173
);
991 modelbuilder__ModelBuilder__error(var_modelbuilder
, var_nreadable
, var171
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
996 var175
= parser_nodes__AAttrPropdef__n_writable(self
);
998 var_nwritable
= var175
;
1000 if (var_nwritable
== NULL
) {
1001 var177
= 0; /* is null */
1003 var177
= 1; /* arg is null and recv is not */
1006 { /* Inline kernel#Object#!= (var_nwritable,var176) on <var_nwritable:nullable AAble> */
1009 var181
= ((short int (*)(val
*, val
*))(var_nwritable
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nwritable
, var_other
) /* == on <var_nwritable:nullable AAble(AAble)>*/;
1015 RET_LABEL179
:(void)0;
1021 var184
= varonce183
;
1023 var185
= "Error: old-style setter no more supported";
1025 var187
= string__NativeString__to_s_with_length(var185
, var186
);
1027 varonce183
= var184
;
1030 modelbuilder__ModelBuilder__error(var_modelbuilder
, var_nwritable
, var184
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
1036 var188
= parser_nodes__AAttrPropdef__n_id2(self
);
1038 if (unlikely(var188
== NULL
)) {
1039 PRINT_ERROR("Runtime error: %s", "Cast failed");
1040 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 707);
1044 var189
= NEW_model__MAttribute(&type_model__MAttribute
);
1046 var191
= varonce190
;
1050 var194
= string__NativeString__to_s_with_length(var192
, var193
);
1052 varonce190
= var191
;
1055 var195
= string__FlatString___43d(var191
, var_name
);
1058 var196
= model_base__Object__private_visibility(self
);
1061 model__MAttribute__init(var189
, var_mclassdef
, var195
, var196
); /* Direct call model#MAttribute#init on <var189:MAttribute>*/
1063 var_mprop197
= var189
;
1064 var198
= NEW_model__MAttributeDef(&type_model__MAttributeDef
);
1066 var199
= parser_nodes__ANode__location(self
);
1069 model__MAttributeDef__init(var198
, var_mclassdef
, var_mprop197
, var199
); /* Direct call model#MAttributeDef#init on <var198:MAttributeDef>*/
1071 var_mpropdef200
= var198
;
1072 /* <var_mpropdef200:MAttributeDef> isa nullable MPROPDEF */
1073 type_struct204
= self
->type
->resolution_table
->types
[COLOR_nullable_parser_nodes__APropdef_VTMPROPDEF
];
1074 cltype202
= type_struct204
->color
;
1075 idtype203
= type_struct204
->id
;
1076 if(cltype202
>= var_mpropdef200
->type
->table_size
) {
1079 var201
= var_mpropdef200
->type
->type_table
[cltype202
] == idtype203
;
1081 if (unlikely(!var201
)) {
1082 var_class_name205
= var_mpropdef200
== NULL ?
"null" : var_mpropdef200
->type
->name
;
1083 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable MPROPDEF", var_class_name205
);
1084 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 710);
1088 { /* Inline modelize_property#APropdef#mpropdef= (self,var_mpropdef200) on <self:AAttrPropdef> */
1089 /* Covariant cast for argument 0 (mpropdef) <var_mpropdef200:MAttributeDef> isa nullable MPROPDEF */
1090 /* <var_mpropdef200:MAttributeDef> isa nullable MPROPDEF */
1091 type_struct210
= self
->type
->resolution_table
->types
[COLOR_nullable_parser_nodes__APropdef_VTMPROPDEF
];
1092 cltype208
= type_struct210
->color
;
1093 idtype209
= type_struct210
->id
;
1094 if(cltype208
>= var_mpropdef200
->type
->table_size
) {
1097 var207
= var_mpropdef200
->type
->type_table
[cltype208
] == idtype209
;
1099 if (unlikely(!var207
)) {
1100 var_class_name211
= var_mpropdef200
== NULL ?
"null" : var_mpropdef200
->type
->name
;
1101 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable MPROPDEF", var_class_name211
);
1102 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 283);
1105 self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
= var_mpropdef200
; /* _mpropdef on <self:AAttrPropdef> */
1106 RET_LABEL206
:(void)0;
1110 { /* Inline modelize_property#ModelBuilder#mpropdef2npropdef (var_modelbuilder) on <var_modelbuilder:ModelBuilder> */
1111 var214
= var_modelbuilder
->attrs
[COLOR_modelize_property__ModelBuilder___mpropdef2npropdef
].val
; /* _mpropdef2npropdef on <var_modelbuilder:ModelBuilder> */
1112 if (unlikely(var214
== NULL
)) {
1113 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mpropdef2npropdef");
1114 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 39);
1118 RET_LABEL213
:(void)0;
1122 hash_collection__HashMap___91d_93d_61d(var212
, var_mpropdef200
, self
); /* Direct call hash_collection#HashMap#[]= on <var212:HashMap[MPropDef, APropdef]>*/
1125 modelize_property__APropdef__set_doc(self
, var_mpropdef200
); /* Direct call modelize_property#APropdef#set_doc on <self:AAttrPropdef>*/
1127 var_readname
= var_name
;
1129 var215
= modelbuilder__ModelBuilder__try_get_mproperty_by_name(var_modelbuilder
, var_nid2
, var_mclassdef
, var_readname
);
1131 /* <var215:nullable MProperty> isa nullable MMethod */
1132 cltype217
= type_nullable_model__MMethod
.color
;
1133 idtype218
= type_nullable_model__MMethod
.id
;
1134 if(var215
== NULL
) {
1137 if(cltype217
>= var215
->type
->table_size
) {
1140 var216
= var215
->type
->type_table
[cltype217
] == idtype218
;
1143 if (unlikely(!var216
)) {
1144 var_class_name219
= var215
== NULL ?
"null" : var215
->type
->name
;
1145 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable MMethod", var_class_name219
);
1146 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 715);
1149 var_mreadprop
= var215
;
1151 if (var_mreadprop
== NULL
) {
1152 var221
= 1; /* is null */
1154 var221
= 0; /* arg is null but recv is not */
1157 { /* Inline kernel#Object#== (var_mreadprop,var220) on <var_mreadprop:nullable MMethod> */
1158 var_other23
= var220
;
1160 { /* Inline kernel#Object#is_same_instance (var_mreadprop,var_other23) on <var_mreadprop:nullable MMethod(MMethod)> */
1161 var226
= var_mreadprop
== var_other23
;
1164 RET_LABEL225
:(void)0;
1169 RET_LABEL223
:(void)0;
1175 var227
= parser_nodes__APropdef__n_visibility(self
);
1178 var228
= modelize_property__APropdef__new_property_visibility(self
, var_modelbuilder
, var_mclassdef
, var227
);
1180 var_mvisibility229
= var228
;
1181 var230
= NEW_model__MMethod(&type_model__MMethod
);
1183 model__MMethod__init(var230
, var_mclassdef
, var_readname
, var_mvisibility229
); /* Direct call model#MMethod#init on <var230:MMethod>*/
1185 var_mreadprop
= var230
;
1187 var231
= parser_nodes__APropdef__n_kwredef(self
);
1191 var233
= modelize_property__APropdef__check_redef_keyword(self
, var_modelbuilder
, var_mclassdef
, var231
, var232
, var_mreadprop
);
1200 var235
= parser_nodes__APropdef__n_kwredef(self
);
1204 var237
= modelize_property__APropdef__check_redef_keyword(self
, var_modelbuilder
, var_mclassdef
, var235
, var236
, var_mreadprop
);
1212 var239
= parser_nodes__APropdef__n_visibility(self
);
1215 modelize_property__APropdef__check_redef_property_visibility(self
, var_modelbuilder
, var239
, var_mreadprop
); /* Direct call modelize_property#APropdef#check_redef_property_visibility on <self:AAttrPropdef>*/
1219 { /* Inline modelize_property#MClassDef#mprop2npropdef (var_mclassdef) on <var_mclassdef:MClassDef> */
1220 var242
= var_mclassdef
->attrs
[COLOR_modelize_property__MClassDef___mprop2npropdef
].val
; /* _mprop2npropdef on <var_mclassdef:MClassDef> */
1221 if (unlikely(var242
== NULL
)) {
1222 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mprop2npropdef");
1223 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 252);
1227 RET_LABEL241
:(void)0;
1231 ((void (*)(val
*, val
*, val
*))(var240
->class->vft
[COLOR_abstract_collection__Map___91d_93d_61d
]))(var240
, var_mreadprop
, self
) /* []= on <var240:Map[MProperty, APropdef]>*/;
1233 var243
= NEW_model__MMethodDef(&type_model__MMethodDef
);
1235 var244
= parser_nodes__ANode__location(self
);
1238 model__MMethodDef__init(var243
, var_mclassdef
, var_mreadprop
, var244
); /* Direct call model#MMethodDef#init on <var243:MMethodDef>*/
1240 var_mreadpropdef
= var243
;
1242 { /* Inline modelize_property#AAttrPropdef#mreadpropdef= (self,var_mreadpropdef) on <self:AAttrPropdef> */
1243 self
->attrs
[COLOR_modelize_property__AAttrPropdef___mreadpropdef
].val
= var_mreadpropdef
; /* _mreadpropdef on <self:AAttrPropdef> */
1244 RET_LABEL245
:(void)0;
1248 { /* Inline modelize_property#ModelBuilder#mpropdef2npropdef (var_modelbuilder) on <var_modelbuilder:ModelBuilder> */
1249 var248
= var_modelbuilder
->attrs
[COLOR_modelize_property__ModelBuilder___mpropdef2npropdef
].val
; /* _mpropdef2npropdef on <var_modelbuilder:ModelBuilder> */
1250 if (unlikely(var248
== NULL
)) {
1251 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mpropdef2npropdef");
1252 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 39);
1256 RET_LABEL247
:(void)0;
1260 hash_collection__HashMap___91d_93d_61d(var246
, var_mreadpropdef
, self
); /* Direct call hash_collection#HashMap#[]= on <var246:HashMap[MPropDef, APropdef]>*/
1263 { /* Inline mdoc#MEntity#mdoc (var_mpropdef200) on <var_mpropdef200:MAttributeDef> */
1264 var251
= var_mpropdef200
->attrs
[COLOR_mdoc__MEntity___mdoc
].val
; /* _mdoc on <var_mpropdef200:MAttributeDef> */
1266 RET_LABEL250
:(void)0;
1270 { /* Inline mdoc#MEntity#mdoc= (var_mreadpropdef,var249) on <var_mreadpropdef:MMethodDef> */
1271 var_mreadpropdef
->attrs
[COLOR_mdoc__MEntity___mdoc
].val
= var249
; /* _mdoc on <var_mreadpropdef:MMethodDef> */
1272 RET_LABEL252
:(void)0;
1276 var254
= varonce253
;
1280 var257
= string__NativeString__to_s_with_length(var255
, var256
);
1282 varonce253
= var254
;
1285 var258
= annotation__Prod__get_single_annotation(self
, var254
, var_modelbuilder
);
1287 var_atlazy
= var258
;
1289 if (var_atlazy
== NULL
) {
1290 var260
= 0; /* is null */
1292 var260
= 1; /* arg is null and recv is not */
1295 { /* Inline kernel#Object#!= (var_atlazy,var259) on <var_atlazy:nullable AAnnotation> */
1298 var264
= ((short int (*)(val
*, val
*))(var_atlazy
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_atlazy
, var_other
) /* == on <var_atlazy:nullable AAnnotation(AAnnotation)>*/;
1304 RET_LABEL262
:(void)0;
1310 var266
= parser_nodes__AAttrPropdef__n_expr(self
);
1313 if (var266
== NULL
) {
1314 var268
= 1; /* is null */
1316 var268
= 0; /* arg is null but recv is not */
1319 { /* Inline kernel#Object#== (var266,var267) on <var266:nullable AExpr> */
1320 var_other23
= var267
;
1322 { /* Inline kernel#Object#is_same_instance (var266,var_other23) on <var266:nullable AExpr(AExpr)> */
1323 var273
= var266
== var_other23
;
1326 RET_LABEL272
:(void)0;
1331 RET_LABEL270
:(void)0;
1337 var275
= varonce274
;
1339 var276
= "Error: a lazy attribute needs a value";
1341 var278
= string__NativeString__to_s_with_length(var276
, var277
);
1343 varonce274
= var275
;
1346 modelbuilder__ModelBuilder__error(var_modelbuilder
, var_atlazy
, var275
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
1352 { /* Inline modelize_property#AAttrPropdef#is_lazy= (self,var279) on <self:AAttrPropdef> */
1353 self
->attrs
[COLOR_modelize_property__AAttrPropdef___is_lazy
].s
= var279
; /* _is_lazy on <self:AAttrPropdef> */
1354 RET_LABEL280
:(void)0;
1357 var281
= NEW_model__MAttribute(&type_model__MAttribute
);
1359 var283
= varonce282
;
1363 var286
= string__NativeString__to_s_with_length(var284
, var285
);
1365 varonce282
= var283
;
1368 var287
= string__FlatString___43d(var283
, var_name
);
1371 var288
= model_base__Object__none_visibility(self
);
1374 model__MAttribute__init(var281
, var_mclassdef
, var287
, var288
); /* Direct call model#MAttribute#init on <var281:MAttribute>*/
1376 var_mlazyprop
= var281
;
1377 var289
= NEW_model__MAttributeDef(&type_model__MAttributeDef
);
1379 var290
= parser_nodes__ANode__location(self
);
1382 model__MAttributeDef__init(var289
, var_mclassdef
, var_mlazyprop
, var290
); /* Direct call model#MAttributeDef#init on <var289:MAttributeDef>*/
1384 var_mlazypropdef
= var289
;
1386 { /* Inline modelize_property#AAttrPropdef#mlazypropdef= (self,var_mlazypropdef) on <self:AAttrPropdef> */
1387 self
->attrs
[COLOR_modelize_property__AAttrPropdef___mlazypropdef
].val
= var_mlazypropdef
; /* _mlazypropdef on <self:AAttrPropdef> */
1388 RET_LABEL291
:(void)0;
1394 var293
= varonce292
;
1396 var294
= "readonly";
1398 var296
= string__NativeString__to_s_with_length(var294
, var295
);
1400 varonce292
= var293
;
1403 var297
= annotation__Prod__get_single_annotation(self
, var293
, var_modelbuilder
);
1405 var_atreadonly
= var297
;
1407 if (var_atreadonly
== NULL
) {
1408 var299
= 0; /* is null */
1410 var299
= 1; /* arg is null and recv is not */
1413 { /* Inline kernel#Object#!= (var_atreadonly,var298) on <var_atreadonly:nullable AAnnotation> */
1416 var303
= ((short int (*)(val
*, val
*))(var_atreadonly
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_atreadonly
, var_other
) /* == on <var_atreadonly:nullable AAnnotation(AAnnotation)>*/;
1422 RET_LABEL301
:(void)0;
1428 var305
= parser_nodes__AAttrPropdef__n_expr(self
);
1431 if (var305
== NULL
) {
1432 var307
= 1; /* is null */
1434 var307
= 0; /* arg is null but recv is not */
1437 { /* Inline kernel#Object#== (var305,var306) on <var305:nullable AExpr> */
1438 var_other23
= var306
;
1440 { /* Inline kernel#Object#is_same_instance (var305,var_other23) on <var305:nullable AExpr(AExpr)> */
1441 var312
= var305
== var_other23
;
1444 RET_LABEL311
:(void)0;
1449 RET_LABEL309
:(void)0;
1455 var314
= varonce313
;
1457 var315
= "Error: a readonly attribute needs a value";
1459 var317
= string__NativeString__to_s_with_length(var315
, var316
);
1461 varonce313
= var314
;
1464 modelbuilder__ModelBuilder__error(var_modelbuilder
, var_atreadonly
, var314
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
1472 var319
= varonce318
;
1476 var322
= string__NativeString__to_s_with_length(var320
, var321
);
1478 varonce318
= var319
;
1481 var323
= string__FlatString___43d(var_name
, var319
);
1483 var_writename
= var323
;
1485 var324
= parser_nodes__AAttrPropdef__n_writable(self
);
1487 var_nwritable325
= var324
;
1489 var327
= varonce326
;
1491 var328
= "writable";
1493 var330
= string__NativeString__to_s_with_length(var328
, var329
);
1495 varonce326
= var327
;
1498 var331
= annotation__Prod__get_single_annotation(self
, var327
, var_modelbuilder
);
1500 var_atwritable
= var331
;
1502 if (var_atwritable
== NULL
) {
1503 var333
= 0; /* is null */
1505 var333
= 1; /* arg is null and recv is not */
1508 { /* Inline kernel#Object#!= (var_atwritable,var332) on <var_atwritable:nullable AAnnotation> */
1511 var337
= ((short int (*)(val
*, val
*))(var_atwritable
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_atwritable
, var_other
) /* == on <var_atwritable:nullable AAnnotation(AAnnotation)>*/;
1517 RET_LABEL335
:(void)0;
1523 { /* Inline parser_nodes#AAnnotation#n_args (var_atwritable) on <var_atwritable:nullable AAnnotation(AAnnotation)> */
1524 var341
= var_atwritable
->attrs
[COLOR_parser_nodes__AAnnotation___n_args
].val
; /* _n_args on <var_atwritable:nullable AAnnotation(AAnnotation)> */
1525 if (unlikely(var341
== NULL
)) {
1526 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_args");
1527 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2426);
1531 RET_LABEL340
:(void)0;
1535 var342
= parser_nodes__ANodes__is_empty(var339
);
1540 var345
= annotation__AAnnotation__arg_as_id(var_atwritable
, var_modelbuilder
);
1545 var344
= var_writename
;
1547 var_writename
= var344
;
1553 var346
= modelbuilder__ModelBuilder__try_get_mproperty_by_name(var_modelbuilder
, var_nid2
, var_mclassdef
, var_writename
);
1555 /* <var346:nullable MProperty> isa nullable MMethod */
1556 cltype348
= type_nullable_model__MMethod
.color
;
1557 idtype349
= type_nullable_model__MMethod
.id
;
1558 if(var346
== NULL
) {
1561 if(cltype348
>= var346
->type
->table_size
) {
1564 var347
= var346
->type
->type_table
[cltype348
] == idtype349
;
1567 if (unlikely(!var347
)) {
1568 var_class_name350
= var346
== NULL ?
"null" : var346
->type
->name
;
1569 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable MMethod", var_class_name350
);
1570 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 759);
1573 var_mwriteprop
= var346
;
1575 var_nwkwredef
= var351
;
1577 if (var_nwritable325
== NULL
) {
1578 var353
= 0; /* is null */
1580 var353
= 1; /* arg is null and recv is not */
1583 { /* Inline kernel#Object#!= (var_nwritable325,var352) on <var_nwritable325:nullable AAble> */
1586 var357
= ((short int (*)(val
*, val
*))(var_nwritable325
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nwritable325
, var_other
) /* == on <var_nwritable325:nullable AAble(AAble)>*/;
1592 RET_LABEL355
:(void)0;
1598 var359
= parser_nodes__AAble__n_kwredef(var_nwritable325
);
1600 var_nwkwredef
= var359
;
1604 if (var_atwritable
== NULL
) {
1605 var361
= 0; /* is null */
1607 var361
= 1; /* arg is null and recv is not */
1610 { /* Inline kernel#Object#!= (var_atwritable,var360) on <var_atwritable:nullable AAnnotation> */
1613 var365
= ((short int (*)(val
*, val
*))(var_atwritable
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_atwritable
, var_other
) /* == on <var_atwritable:nullable AAnnotation(AAnnotation)>*/;
1619 RET_LABEL363
:(void)0;
1625 var367
= parser_nodes__AAnnotation__n_kwredef(var_atwritable
);
1627 var_nwkwredef
= var367
;
1631 if (var_mwriteprop
== NULL
) {
1632 var369
= 1; /* is null */
1634 var369
= 0; /* arg is null but recv is not */
1637 { /* Inline kernel#Object#== (var_mwriteprop,var368) on <var_mwriteprop:nullable MMethod> */
1638 var_other23
= var368
;
1640 { /* Inline kernel#Object#is_same_instance (var_mwriteprop,var_other23) on <var_mwriteprop:nullable MMethod(MMethod)> */
1641 var374
= var_mwriteprop
== var_other23
;
1644 RET_LABEL373
:(void)0;
1649 RET_LABEL371
:(void)0;
1655 if (var_nwritable325
== NULL
) {
1656 var376
= 0; /* is null */
1658 var376
= 1; /* arg is null and recv is not */
1661 { /* Inline kernel#Object#!= (var_nwritable325,var375) on <var_nwritable325:nullable AAble> */
1664 var380
= ((short int (*)(val
*, val
*))(var_nwritable325
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nwritable325
, var_other
) /* == on <var_nwritable325:nullable AAble(AAble)>*/;
1670 RET_LABEL378
:(void)0;
1676 var382
= parser_nodes__AAble__n_visibility(var_nwritable325
);
1679 var383
= modelize_property__APropdef__new_property_visibility(self
, var_modelbuilder
, var_mclassdef
, var382
);
1681 var_mvisibility384
= var383
;
1684 if (var_atwritable
== NULL
) {
1685 var386
= 0; /* is null */
1687 var386
= 1; /* arg is null and recv is not */
1690 { /* Inline kernel#Object#!= (var_atwritable,var385) on <var_atwritable:nullable AAnnotation> */
1693 var390
= ((short int (*)(val
*, val
*))(var_atwritable
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_atwritable
, var_other
) /* == on <var_atwritable:nullable AAnnotation(AAnnotation)>*/;
1699 RET_LABEL388
:(void)0;
1705 var392
= parser_nodes__AAnnotation__n_visibility(var_atwritable
);
1708 var393
= modelize_property__APropdef__new_property_visibility(self
, var_modelbuilder
, var_mclassdef
, var392
);
1710 var_mvisibility384
= var393
;
1713 var394
= model_base__Object__private_visibility(self
);
1715 var_mvisibility384
= var394
;
1718 var395
= NEW_model__MMethod(&type_model__MMethod
);
1720 model__MMethod__init(var395
, var_mclassdef
, var_writename
, var_mvisibility384
); /* Direct call model#MMethod#init on <var395:MMethod>*/
1722 var_mwriteprop
= var395
;
1725 var397
= modelize_property__APropdef__check_redef_keyword(self
, var_modelbuilder
, var_mclassdef
, var_nwkwredef
, var396
, var_mwriteprop
);
1733 if (var_nwkwredef
!=NULL
) {
1734 var399
= var_nwkwredef
;
1737 var400
= parser_nodes__APropdef__n_kwredef(self
);
1743 var402
= modelize_property__APropdef__check_redef_keyword(self
, var_modelbuilder
, var_mclassdef
, var399
, var401
, var_mwriteprop
);
1751 if (var_nwritable325
== NULL
) {
1752 var405
= 0; /* is null */
1754 var405
= 1; /* arg is null and recv is not */
1757 { /* Inline kernel#Object#!= (var_nwritable325,var404) on <var_nwritable325:nullable AAble> */
1760 var409
= ((short int (*)(val
*, val
*))(var_nwritable325
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nwritable325
, var_other
) /* == on <var_nwritable325:nullable AAble(AAble)>*/;
1766 RET_LABEL407
:(void)0;
1772 var411
= parser_nodes__AAble__n_visibility(var_nwritable325
);
1775 modelize_property__APropdef__check_redef_property_visibility(self
, var_modelbuilder
, var411
, var_mwriteprop
); /* Direct call modelize_property#APropdef#check_redef_property_visibility on <self:AAttrPropdef>*/
1779 if (var_atwritable
== NULL
) {
1780 var413
= 0; /* is null */
1782 var413
= 1; /* arg is null and recv is not */
1785 { /* Inline kernel#Object#!= (var_atwritable,var412) on <var_atwritable:nullable AAnnotation> */
1788 var417
= ((short int (*)(val
*, val
*))(var_atwritable
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_atwritable
, var_other
) /* == on <var_atwritable:nullable AAnnotation(AAnnotation)>*/;
1794 RET_LABEL415
:(void)0;
1800 var419
= parser_nodes__AAnnotation__n_visibility(var_atwritable
);
1803 modelize_property__APropdef__check_redef_property_visibility(self
, var_modelbuilder
, var419
, var_mwriteprop
); /* Direct call modelize_property#APropdef#check_redef_property_visibility on <self:AAttrPropdef>*/
1810 { /* Inline modelize_property#MClassDef#mprop2npropdef (var_mclassdef) on <var_mclassdef:MClassDef> */
1811 var422
= var_mclassdef
->attrs
[COLOR_modelize_property__MClassDef___mprop2npropdef
].val
; /* _mprop2npropdef on <var_mclassdef:MClassDef> */
1812 if (unlikely(var422
== NULL
)) {
1813 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mprop2npropdef");
1814 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 252);
1818 RET_LABEL421
:(void)0;
1822 ((void (*)(val
*, val
*, val
*))(var420
->class->vft
[COLOR_abstract_collection__Map___91d_93d_61d
]))(var420
, var_mwriteprop
, self
) /* []= on <var420:Map[MProperty, APropdef]>*/;
1824 var423
= NEW_model__MMethodDef(&type_model__MMethodDef
);
1826 var424
= parser_nodes__ANode__location(self
);
1829 model__MMethodDef__init(var423
, var_mclassdef
, var_mwriteprop
, var424
); /* Direct call model#MMethodDef#init on <var423:MMethodDef>*/
1831 var_mwritepropdef
= var423
;
1833 { /* Inline modelize_property#AAttrPropdef#mwritepropdef= (self,var_mwritepropdef) on <self:AAttrPropdef> */
1834 self
->attrs
[COLOR_modelize_property__AAttrPropdef___mwritepropdef
].val
= var_mwritepropdef
; /* _mwritepropdef on <self:AAttrPropdef> */
1835 RET_LABEL425
:(void)0;
1839 { /* Inline modelize_property#ModelBuilder#mpropdef2npropdef (var_modelbuilder) on <var_modelbuilder:ModelBuilder> */
1840 var428
= var_modelbuilder
->attrs
[COLOR_modelize_property__ModelBuilder___mpropdef2npropdef
].val
; /* _mpropdef2npropdef on <var_modelbuilder:ModelBuilder> */
1841 if (unlikely(var428
== NULL
)) {
1842 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mpropdef2npropdef");
1843 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 39);
1847 RET_LABEL427
:(void)0;
1851 hash_collection__HashMap___91d_93d_61d(var426
, var_mwritepropdef
, self
); /* Direct call hash_collection#HashMap#[]= on <var426:HashMap[MPropDef, APropdef]>*/
1854 { /* Inline mdoc#MEntity#mdoc (var_mpropdef200) on <var_mpropdef200:MAttributeDef> */
1855 var431
= var_mpropdef200
->attrs
[COLOR_mdoc__MEntity___mdoc
].val
; /* _mdoc on <var_mpropdef200:MAttributeDef> */
1857 RET_LABEL430
:(void)0;
1861 { /* Inline mdoc#MEntity#mdoc= (var_mwritepropdef,var429) on <var_mwritepropdef:MMethodDef> */
1862 var_mwritepropdef
->attrs
[COLOR_mdoc__MEntity___mdoc
].val
= var429
; /* _mdoc on <var_mwritepropdef:MMethodDef> */
1863 RET_LABEL432
:(void)0;
1869 /* method modelize_property#AAttrPropdef#build_property for (self: Object, ModelBuilder, MClassDef) */
1870 void VIRTUAL_modelize_property__AAttrPropdef__build_property(val
* self
, val
* p0
, val
* p1
) {
1871 modelize_property__AAttrPropdef__build_property(self
, p0
, p1
); /* Direct call modelize_property#AAttrPropdef#build_property on <self:Object(AAttrPropdef)>*/
1874 /* method modelize_property#AAttrPropdef#build_signature for (self: AAttrPropdef, ModelBuilder) */
1875 void modelize_property__AAttrPropdef__build_signature(val
* self
, val
* p0
) {
1876 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
1877 val
* var
/* : nullable MPropDef */;
1878 val
* var2
/* : nullable MPropDef */;
1879 val
* var_mpropdef
/* var mpropdef: nullable MAttributeDef */;
1880 val
* var3
/* : null */;
1881 short int var4
/* : Bool */;
1882 short int var5
/* : Bool */;
1883 val
* var_other
/* var other: nullable Object */;
1884 short int var7
/* : Bool */;
1885 short int var9
/* : Bool */;
1886 val
* var10
/* : MClassDef */;
1887 val
* var12
/* : MClassDef */;
1888 val
* var_mclassdef
/* var mclassdef: MClassDef */;
1889 val
* var13
/* : MModule */;
1890 val
* var15
/* : MModule */;
1891 val
* var_mmodule
/* var mmodule: MModule */;
1892 val
* var16
/* : null */;
1893 val
* var_mtype
/* var mtype: nullable MType */;
1894 val
* var17
/* : nullable MMethodDef */;
1895 val
* var19
/* : nullable MMethodDef */;
1896 val
* var_mreadpropdef
/* var mreadpropdef: nullable MMethodDef */;
1897 val
* var20
/* : nullable AType */;
1898 val
* var_ntype
/* var ntype: nullable AType */;
1899 val
* var21
/* : null */;
1900 short int var22
/* : Bool */;
1901 short int var23
/* : Bool */;
1902 val
* var_other25
/* var other: nullable Object */;
1903 short int var26
/* : Bool */;
1904 short int var27
/* : Bool */;
1905 short int var28
/* : Bool */;
1906 val
* var29
/* : nullable MType */;
1907 val
* var30
/* : null */;
1908 short int var31
/* : Bool */;
1909 short int var32
/* : Bool */;
1910 short int var34
/* : Bool */;
1911 short int var36
/* : Bool */;
1912 short int var37
/* : Bool */;
1913 short int var38
/* : Bool */;
1914 val
* var39
/* : null */;
1915 short int var40
/* : Bool */;
1916 short int var41
/* : Bool */;
1917 short int var43
/* : Bool */;
1918 short int var45
/* : Bool */;
1919 short int var_
/* var : Bool */;
1920 val
* var46
/* : null */;
1921 short int var47
/* : Bool */;
1922 short int var48
/* : Bool */;
1923 short int var50
/* : Bool */;
1924 short int var51
/* : Bool */;
1925 short int var52
/* : Bool */;
1926 short int var_53
/* var : Bool */;
1927 short int var54
/* : Bool */;
1928 short int var55
/* : Bool */;
1929 val
* var56
/* : MProperty */;
1930 val
* var58
/* : MProperty */;
1931 val
* var59
/* : MPropDef */;
1932 val
* var60
/* : nullable MSignature */;
1933 val
* var62
/* : nullable MSignature */;
1934 val
* var_msignature
/* var msignature: nullable MSignature */;
1935 val
* var63
/* : null */;
1936 short int var64
/* : Bool */;
1937 short int var65
/* : Bool */;
1938 short int var67
/* : Bool */;
1939 short int var69
/* : Bool */;
1940 val
* var70
/* : nullable MType */;
1941 val
* var72
/* : nullable MType */;
1942 val
* var73
/* : nullable AExpr */;
1943 val
* var_nexpr
/* var nexpr: nullable AExpr */;
1944 val
* var74
/* : null */;
1945 short int var75
/* : Bool */;
1946 short int var76
/* : Bool */;
1947 short int var78
/* : Bool */;
1948 short int var80
/* : Bool */;
1949 val
* var81
/* : null */;
1950 short int var82
/* : Bool */;
1951 short int var83
/* : Bool */;
1952 short int var85
/* : Bool */;
1953 short int var86
/* : Bool */;
1954 short int var87
/* : Bool */;
1955 short int var88
/* : Bool */;
1958 val
* var89
/* : AType */;
1959 val
* var90
/* : nullable MType */;
1960 short int var91
/* : Bool */;
1963 static val
* varonce
;
1964 val
* var94
/* : String */;
1965 char* var95
/* : NativeString */;
1966 long var96
/* : Int */;
1967 val
* var97
/* : FlatString */;
1968 val
* var98
/* : nullable MClass */;
1969 val
* var_cla
/* var cla: nullable MClass */;
1970 val
* var99
/* : null */;
1971 short int var100
/* : Bool */;
1972 short int var101
/* : Bool */;
1973 short int var103
/* : Bool */;
1974 short int var104
/* : Bool */;
1975 short int var105
/* : Bool */;
1976 val
* var106
/* : MClassType */;
1977 val
* var108
/* : MClassType */;
1978 short int var109
/* : Bool */;
1981 static val
* varonce112
;
1982 val
* var113
/* : String */;
1983 char* var114
/* : NativeString */;
1984 long var115
/* : Int */;
1985 val
* var116
/* : FlatString */;
1986 val
* var117
/* : nullable MClass */;
1987 val
* var_cla118
/* var cla: nullable MClass */;
1988 val
* var119
/* : null */;
1989 short int var120
/* : Bool */;
1990 short int var121
/* : Bool */;
1991 short int var123
/* : Bool */;
1992 short int var124
/* : Bool */;
1993 short int var125
/* : Bool */;
1994 val
* var126
/* : MClassType */;
1995 val
* var128
/* : MClassType */;
1996 short int var129
/* : Bool */;
1999 static val
* varonce132
;
2000 val
* var133
/* : String */;
2001 char* var134
/* : NativeString */;
2002 long var135
/* : Int */;
2003 val
* var136
/* : FlatString */;
2004 val
* var137
/* : nullable MClass */;
2005 val
* var_cla138
/* var cla: nullable MClass */;
2006 val
* var139
/* : null */;
2007 short int var140
/* : Bool */;
2008 short int var141
/* : Bool */;
2009 short int var143
/* : Bool */;
2010 short int var144
/* : Bool */;
2011 short int var145
/* : Bool */;
2012 val
* var146
/* : MClassType */;
2013 val
* var148
/* : MClassType */;
2014 short int var149
/* : Bool */;
2017 static val
* varonce152
;
2018 val
* var153
/* : String */;
2019 char* var154
/* : NativeString */;
2020 long var155
/* : Int */;
2021 val
* var156
/* : FlatString */;
2022 val
* var157
/* : nullable MClass */;
2023 val
* var_cla158
/* var cla: nullable MClass */;
2024 val
* var159
/* : null */;
2025 short int var160
/* : Bool */;
2026 short int var161
/* : Bool */;
2027 short int var163
/* : Bool */;
2028 short int var164
/* : Bool */;
2029 short int var165
/* : Bool */;
2030 val
* var166
/* : MClassType */;
2031 val
* var168
/* : MClassType */;
2032 short int var169
/* : Bool */;
2035 static val
* varonce172
;
2036 val
* var173
/* : String */;
2037 char* var174
/* : NativeString */;
2038 long var175
/* : Int */;
2039 val
* var176
/* : FlatString */;
2040 val
* var177
/* : nullable MClass */;
2041 val
* var_cla178
/* var cla: nullable MClass */;
2042 val
* var179
/* : null */;
2043 short int var180
/* : Bool */;
2044 short int var181
/* : Bool */;
2045 short int var183
/* : Bool */;
2046 short int var184
/* : Bool */;
2047 short int var185
/* : Bool */;
2048 val
* var186
/* : MClassType */;
2049 val
* var188
/* : MClassType */;
2050 short int var189
/* : Bool */;
2053 static val
* varonce192
;
2054 val
* var193
/* : String */;
2055 char* var194
/* : NativeString */;
2056 long var195
/* : Int */;
2057 val
* var196
/* : FlatString */;
2058 val
* var197
/* : nullable MClass */;
2059 val
* var_cla198
/* var cla: nullable MClass */;
2060 val
* var199
/* : null */;
2061 short int var200
/* : Bool */;
2062 short int var201
/* : Bool */;
2063 short int var203
/* : Bool */;
2064 short int var204
/* : Bool */;
2065 short int var205
/* : Bool */;
2066 val
* var206
/* : MClassType */;
2067 val
* var208
/* : MClassType */;
2068 static val
* varonce209
;
2069 val
* var210
/* : String */;
2070 char* var211
/* : NativeString */;
2071 long var212
/* : Int */;
2072 val
* var213
/* : FlatString */;
2073 static val
* varonce214
;
2074 val
* var215
/* : String */;
2075 char* var216
/* : NativeString */;
2076 long var217
/* : Int */;
2077 val
* var218
/* : FlatString */;
2078 val
* var219
/* : Array[Object] */;
2079 long var220
/* : Int */;
2080 val
* var221
/* : NativeArray[Object] */;
2081 val
* var222
/* : String */;
2082 val
* var223
/* : null */;
2083 short int var224
/* : Bool */;
2084 short int var225
/* : Bool */;
2085 short int var227
/* : Bool */;
2086 short int var229
/* : Bool */;
2087 val
* var230
/* : null */;
2088 short int var231
/* : Bool */;
2089 short int var232
/* : Bool */;
2090 short int var234
/* : Bool */;
2091 short int var235
/* : Bool */;
2092 short int var236
/* : Bool */;
2093 short int var237
/* : Bool */;
2096 val
* var240
/* : AType */;
2097 val
* var241
/* : nullable MType */;
2098 val
* var_xmtype
/* var xmtype: nullable MType */;
2099 short int var242
/* : Bool */;
2100 short int var243
/* : Bool */;
2101 short int var244
/* : Bool */;
2102 short int var246
/* : Bool */;
2103 short int var248
/* : Bool */;
2104 short int var_249
/* var : Bool */;
2105 val
* var250
/* : ToolContext */;
2106 val
* var252
/* : ToolContext */;
2107 val
* var253
/* : OptionCount */;
2108 val
* var255
/* : OptionCount */;
2109 val
* var256
/* : nullable Object */;
2110 val
* var258
/* : nullable Object */;
2111 long var259
/* : Int */;
2112 short int var260
/* : Bool */;
2113 short int var262
/* : Bool */;
2116 const char* var_class_name
;
2117 long var265
/* : Int */;
2118 short int var266
/* : Bool */;
2119 static val
* varonce267
;
2120 val
* var268
/* : String */;
2121 char* var269
/* : NativeString */;
2122 long var270
/* : Int */;
2123 val
* var271
/* : FlatString */;
2124 val
* var272
/* : null */;
2125 short int var273
/* : Bool */;
2126 short int var274
/* : Bool */;
2127 short int var276
/* : Bool */;
2128 short int var278
/* : Bool */;
2129 static val
* varonce279
;
2130 val
* var280
/* : String */;
2131 char* var281
/* : NativeString */;
2132 long var282
/* : Int */;
2133 val
* var283
/* : FlatString */;
2134 val
* var284
/* : Array[Object] */;
2135 long var285
/* : Int */;
2136 val
* var286
/* : NativeArray[Object] */;
2137 val
* var287
/* : String */;
2138 val
* var289
/* : null */;
2139 short int var290
/* : Bool */;
2140 short int var291
/* : Bool */;
2141 short int var293
/* : Bool */;
2142 short int var294
/* : Bool */;
2143 short int var295
/* : Bool */;
2144 val
* var296
/* : MSignature */;
2145 val
* var297
/* : Array[MParameter] */;
2146 val
* var_msignature298
/* var msignature: MSignature */;
2147 val
* var300
/* : nullable MMethodDef */;
2148 val
* var302
/* : nullable MMethodDef */;
2149 val
* var_mwritepropdef
/* var mwritepropdef: nullable MMethodDef */;
2150 val
* var303
/* : null */;
2151 short int var304
/* : Bool */;
2152 short int var305
/* : Bool */;
2153 short int var307
/* : Bool */;
2154 short int var308
/* : Bool */;
2155 short int var309
/* : Bool */;
2156 val
* var310
/* : nullable TAttrid */;
2157 val
* var311
/* : null */;
2158 short int var312
/* : Bool */;
2159 short int var313
/* : Bool */;
2160 short int var315
/* : Bool */;
2161 short int var316
/* : Bool */;
2162 short int var317
/* : Bool */;
2163 val
* var318
/* : nullable TAttrid */;
2164 val
* var319
/* : String */;
2165 long var320
/* : Int */;
2166 val
* var321
/* : Text */;
2167 val
* var_name
/* var name: String */;
2168 val
* var322
/* : nullable TId */;
2169 val
* var323
/* : String */;
2170 val
* var324
/* : MParameter */;
2171 short int var325
/* : Bool */;
2172 val
* var_mparameter
/* var mparameter: MParameter */;
2173 val
* var326
/* : MSignature */;
2174 val
* var327
/* : Array[MParameter] */;
2175 long var328
/* : Int */;
2176 val
* var_329
/* var : Array[MParameter] */;
2177 val
* var330
/* : null */;
2178 val
* var_msignature331
/* var msignature: MSignature */;
2179 val
* var333
/* : nullable MAttributeDef */;
2180 val
* var335
/* : nullable MAttributeDef */;
2181 val
* var_mlazypropdef
/* var mlazypropdef: nullable MAttributeDef */;
2182 val
* var336
/* : null */;
2183 short int var337
/* : Bool */;
2184 short int var338
/* : Bool */;
2185 short int var340
/* : Bool */;
2186 short int var341
/* : Bool */;
2187 short int var342
/* : Bool */;
2188 val
* var343
/* : Model */;
2189 val
* var345
/* : Model */;
2190 static val
* varonce346
;
2191 val
* var347
/* : String */;
2192 char* var348
/* : NativeString */;
2193 long var349
/* : Int */;
2194 val
* var350
/* : FlatString */;
2195 val
* var351
/* : nullable Array[MClass] */;
2196 val
* var352
/* : nullable Object */;
2197 val
* var353
/* : MClassType */;
2198 val
* var355
/* : MClassType */;
2199 var_modelbuilder
= p0
;
2201 { /* Inline modelize_property#APropdef#mpropdef (self) on <self:AAttrPropdef> */
2202 var2
= self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
; /* _mpropdef on <self:AAttrPropdef> */
2209 if (var_mpropdef
== NULL
) {
2210 var4
= 1; /* is null */
2212 var4
= 0; /* arg is null but recv is not */
2215 { /* Inline kernel#Object#== (var_mpropdef,var3) on <var_mpropdef:nullable MAttributeDef> */
2218 { /* Inline kernel#Object#is_same_instance (var_mpropdef,var_other) on <var_mpropdef:nullable MAttributeDef(MAttributeDef)> */
2219 var9
= var_mpropdef
== var_other
;
2236 { /* Inline model#MPropDef#mclassdef (var_mpropdef) on <var_mpropdef:nullable MAttributeDef(MAttributeDef)> */
2237 var12
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_mpropdef:nullable MAttributeDef(MAttributeDef)> */
2238 if (unlikely(var12
== NULL
)) {
2239 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
2240 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1879);
2244 RET_LABEL11
:(void)0;
2247 var_mclassdef
= var10
;
2249 { /* Inline model#MClassDef#mmodule (var_mclassdef) on <var_mclassdef:MClassDef> */
2250 var15
= var_mclassdef
->attrs
[COLOR_model__MClassDef___mmodule
].val
; /* _mmodule on <var_mclassdef:MClassDef> */
2251 if (unlikely(var15
== NULL
)) {
2252 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
2253 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 471);
2257 RET_LABEL14
:(void)0;
2260 var_mmodule
= var13
;
2264 { /* Inline modelize_property#AAttrPropdef#mreadpropdef (self) on <self:AAttrPropdef> */
2265 var19
= self
->attrs
[COLOR_modelize_property__AAttrPropdef___mreadpropdef
].val
; /* _mreadpropdef on <self:AAttrPropdef> */
2267 RET_LABEL18
:(void)0;
2270 var_mreadpropdef
= var17
;
2272 var20
= parser_nodes__AAttrPropdef__n_type(self
);
2276 if (var_ntype
== NULL
) {
2277 var22
= 0; /* is null */
2279 var22
= 1; /* arg is null and recv is not */
2282 { /* Inline kernel#Object#!= (var_ntype,var21) on <var_ntype:nullable AType> */
2283 var_other25
= var21
;
2285 var27
= ((short int (*)(val
*, val
*))(var_ntype
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_ntype
, var_other25
) /* == on <var_ntype:nullable AType(AType)>*/;
2291 RET_LABEL24
:(void)0;
2297 var29
= modelize_class__ModelBuilder__resolve_mtype(var_modelbuilder
, var_mmodule
, var_mclassdef
, var_ntype
);
2301 if (var_mtype
== NULL
) {
2302 var31
= 1; /* is null */
2304 var31
= 0; /* arg is null but recv is not */
2307 { /* Inline kernel#Object#== (var_mtype,var30) on <var_mtype:nullable MType> */
2310 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
2311 var36
= var_mtype
== var_other
;
2314 RET_LABEL35
:(void)0;
2319 RET_LABEL33
:(void)0;
2330 if (var_mtype
== NULL
) {
2331 var40
= 1; /* is null */
2333 var40
= 0; /* arg is null but recv is not */
2336 { /* Inline kernel#Object#== (var_mtype,var39) on <var_mtype:nullable MType> */
2339 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
2340 var45
= var_mtype
== var_other
;
2343 RET_LABEL44
:(void)0;
2348 RET_LABEL42
:(void)0;
2355 if (var_mreadpropdef
== NULL
) {
2356 var47
= 0; /* is null */
2358 var47
= 1; /* arg is null and recv is not */
2361 { /* Inline kernel#Object#!= (var_mreadpropdef,var46) on <var_mreadpropdef:nullable MMethodDef> */
2362 var_other25
= var46
;
2364 var51
= ((short int (*)(val
*, val
*))(var_mreadpropdef
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_mreadpropdef
, var_other25
) /* == on <var_mreadpropdef:nullable MMethodDef(MMethodDef)>*/;
2370 RET_LABEL49
:(void)0;
2381 var54
= model__MPropDef__is_intro(var_mreadpropdef
);
2390 { /* Inline model#MPropDef#mproperty (var_mreadpropdef) on <var_mreadpropdef:nullable MMethodDef(MMethodDef)> */
2391 var58
= var_mreadpropdef
->attrs
[COLOR_model__MPropDef___mproperty
].val
; /* _mproperty on <var_mreadpropdef:nullable MMethodDef(MMethodDef)> */
2392 if (unlikely(var58
== NULL
)) {
2393 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
2394 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1882);
2398 RET_LABEL57
:(void)0;
2402 var59
= model__MProperty__intro(var56
);
2405 { /* Inline model#MMethodDef#msignature (var59) on <var59:MPropDef(MMethodDef)> */
2406 var62
= var59
->attrs
[COLOR_model__MMethodDef___msignature
].val
; /* _msignature on <var59:MPropDef(MMethodDef)> */
2408 RET_LABEL61
:(void)0;
2411 var_msignature
= var60
;
2413 if (var_msignature
== NULL
) {
2414 var64
= 1; /* is null */
2416 var64
= 0; /* arg is null but recv is not */
2419 { /* Inline kernel#Object#== (var_msignature,var63) on <var_msignature:nullable MSignature> */
2422 { /* Inline kernel#Object#is_same_instance (var_msignature,var_other) on <var_msignature:nullable MSignature(MSignature)> */
2423 var69
= var_msignature
== var_other
;
2426 RET_LABEL68
:(void)0;
2431 RET_LABEL66
:(void)0;
2440 { /* Inline model#MSignature#return_mtype (var_msignature) on <var_msignature:nullable MSignature(MSignature)> */
2441 var72
= var_msignature
->attrs
[COLOR_model__MSignature___return_mtype
].val
; /* _return_mtype on <var_msignature:nullable MSignature(MSignature)> */
2443 RET_LABEL71
:(void)0;
2450 var73
= parser_nodes__AAttrPropdef__n_expr(self
);
2454 if (var_mtype
== NULL
) {
2455 var75
= 1; /* is null */
2457 var75
= 0; /* arg is null but recv is not */
2460 { /* Inline kernel#Object#== (var_mtype,var74) on <var_mtype:nullable MType> */
2463 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
2464 var80
= var_mtype
== var_other
;
2467 RET_LABEL79
:(void)0;
2472 RET_LABEL77
:(void)0;
2478 if (var_nexpr
== NULL
) {
2479 var82
= 0; /* is null */
2481 var82
= 1; /* arg is null and recv is not */
2484 { /* Inline kernel#Object#!= (var_nexpr,var81) on <var_nexpr:nullable AExpr> */
2485 var_other25
= var81
;
2487 var86
= ((short int (*)(val
*, val
*))(var_nexpr
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nexpr
, var_other25
) /* == on <var_nexpr:nullable AExpr(AExpr)>*/;
2493 RET_LABEL84
:(void)0;
2498 /* <var_nexpr:nullable AExpr(AExpr)> isa ANewExpr */
2499 cltype
= type_parser_nodes__ANewExpr
.color
;
2500 idtype
= type_parser_nodes__ANewExpr
.id
;
2501 if(cltype
>= var_nexpr
->type
->table_size
) {
2504 var88
= var_nexpr
->type
->type_table
[cltype
] == idtype
;
2508 var89
= parser_nodes__ANewExpr__n_type(var_nexpr
);
2511 var90
= modelize_class__ModelBuilder__resolve_mtype(var_modelbuilder
, var_mmodule
, var_mclassdef
, var89
);
2515 /* <var_nexpr:nullable AExpr(AExpr)> isa AIntExpr */
2516 cltype92
= type_parser_nodes__AIntExpr
.color
;
2517 idtype93
= type_parser_nodes__AIntExpr
.id
;
2518 if(cltype92
>= var_nexpr
->type
->table_size
) {
2521 var91
= var_nexpr
->type
->type_table
[cltype92
] == idtype93
;
2529 var97
= string__NativeString__to_s_with_length(var95
, var96
);
2534 var98
= modelbuilder__ModelBuilder__try_get_mclass_by_name(var_modelbuilder
, var_nexpr
, var_mmodule
, var94
);
2538 if (var_cla
== NULL
) {
2539 var100
= 0; /* is null */
2541 var100
= 1; /* arg is null and recv is not */
2544 { /* Inline kernel#Object#!= (var_cla,var99) on <var_cla:nullable MClass> */
2545 var_other25
= var99
;
2547 var104
= ((short int (*)(val
*, val
*))(var_cla
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_cla
, var_other25
) /* == on <var_cla:nullable MClass(MClass)>*/;
2553 RET_LABEL102
:(void)0;
2559 { /* Inline model#MClass#mclass_type (var_cla) on <var_cla:nullable MClass(MClass)> */
2560 var108
= var_cla
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_cla:nullable MClass(MClass)> */
2561 if (unlikely(var108
== NULL
)) {
2562 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
2563 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
2567 RET_LABEL107
:(void)0;
2574 /* <var_nexpr:nullable AExpr(AExpr)> isa AFloatExpr */
2575 cltype110
= type_parser_nodes__AFloatExpr
.color
;
2576 idtype111
= type_parser_nodes__AFloatExpr
.id
;
2577 if(cltype110
>= var_nexpr
->type
->table_size
) {
2580 var109
= var_nexpr
->type
->type_table
[cltype110
] == idtype111
;
2584 var113
= varonce112
;
2588 var116
= string__NativeString__to_s_with_length(var114
, var115
);
2590 varonce112
= var113
;
2593 var117
= modelbuilder__ModelBuilder__try_get_mclass_by_name(var_modelbuilder
, var_nexpr
, var_mmodule
, var113
);
2595 var_cla118
= var117
;
2597 if (var_cla118
== NULL
) {
2598 var120
= 0; /* is null */
2600 var120
= 1; /* arg is null and recv is not */
2603 { /* Inline kernel#Object#!= (var_cla118,var119) on <var_cla118:nullable MClass> */
2604 var_other25
= var119
;
2606 var124
= ((short int (*)(val
*, val
*))(var_cla118
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_cla118
, var_other25
) /* == on <var_cla118:nullable MClass(MClass)>*/;
2612 RET_LABEL122
:(void)0;
2618 { /* Inline model#MClass#mclass_type (var_cla118) on <var_cla118:nullable MClass(MClass)> */
2619 var128
= var_cla118
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_cla118:nullable MClass(MClass)> */
2620 if (unlikely(var128
== NULL
)) {
2621 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
2622 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
2626 RET_LABEL127
:(void)0;
2633 /* <var_nexpr:nullable AExpr(AExpr)> isa ACharExpr */
2634 cltype130
= type_parser_nodes__ACharExpr
.color
;
2635 idtype131
= type_parser_nodes__ACharExpr
.id
;
2636 if(cltype130
>= var_nexpr
->type
->table_size
) {
2639 var129
= var_nexpr
->type
->type_table
[cltype130
] == idtype131
;
2643 var133
= varonce132
;
2647 var136
= string__NativeString__to_s_with_length(var134
, var135
);
2649 varonce132
= var133
;
2652 var137
= modelbuilder__ModelBuilder__try_get_mclass_by_name(var_modelbuilder
, var_nexpr
, var_mmodule
, var133
);
2654 var_cla138
= var137
;
2656 if (var_cla138
== NULL
) {
2657 var140
= 0; /* is null */
2659 var140
= 1; /* arg is null and recv is not */
2662 { /* Inline kernel#Object#!= (var_cla138,var139) on <var_cla138:nullable MClass> */
2663 var_other25
= var139
;
2665 var144
= ((short int (*)(val
*, val
*))(var_cla138
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_cla138
, var_other25
) /* == on <var_cla138:nullable MClass(MClass)>*/;
2671 RET_LABEL142
:(void)0;
2677 { /* Inline model#MClass#mclass_type (var_cla138) on <var_cla138:nullable MClass(MClass)> */
2678 var148
= var_cla138
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_cla138:nullable MClass(MClass)> */
2679 if (unlikely(var148
== NULL
)) {
2680 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
2681 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
2685 RET_LABEL147
:(void)0;
2692 /* <var_nexpr:nullable AExpr(AExpr)> isa ABoolExpr */
2693 cltype150
= type_parser_nodes__ABoolExpr
.color
;
2694 idtype151
= type_parser_nodes__ABoolExpr
.id
;
2695 if(cltype150
>= var_nexpr
->type
->table_size
) {
2698 var149
= var_nexpr
->type
->type_table
[cltype150
] == idtype151
;
2702 var153
= varonce152
;
2706 var156
= string__NativeString__to_s_with_length(var154
, var155
);
2708 varonce152
= var153
;
2711 var157
= modelbuilder__ModelBuilder__try_get_mclass_by_name(var_modelbuilder
, var_nexpr
, var_mmodule
, var153
);
2713 var_cla158
= var157
;
2715 if (var_cla158
== NULL
) {
2716 var160
= 0; /* is null */
2718 var160
= 1; /* arg is null and recv is not */
2721 { /* Inline kernel#Object#!= (var_cla158,var159) on <var_cla158:nullable MClass> */
2722 var_other25
= var159
;
2724 var164
= ((short int (*)(val
*, val
*))(var_cla158
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_cla158
, var_other25
) /* == on <var_cla158:nullable MClass(MClass)>*/;
2730 RET_LABEL162
:(void)0;
2736 { /* Inline model#MClass#mclass_type (var_cla158) on <var_cla158:nullable MClass(MClass)> */
2737 var168
= var_cla158
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_cla158:nullable MClass(MClass)> */
2738 if (unlikely(var168
== NULL
)) {
2739 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
2740 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
2744 RET_LABEL167
:(void)0;
2751 /* <var_nexpr:nullable AExpr(AExpr)> isa ASuperstringExpr */
2752 cltype170
= type_parser_nodes__ASuperstringExpr
.color
;
2753 idtype171
= type_parser_nodes__ASuperstringExpr
.id
;
2754 if(cltype170
>= var_nexpr
->type
->table_size
) {
2757 var169
= var_nexpr
->type
->type_table
[cltype170
] == idtype171
;
2761 var173
= varonce172
;
2765 var176
= string__NativeString__to_s_with_length(var174
, var175
);
2767 varonce172
= var173
;
2770 var177
= modelbuilder__ModelBuilder__try_get_mclass_by_name(var_modelbuilder
, var_nexpr
, var_mmodule
, var173
);
2772 var_cla178
= var177
;
2774 if (var_cla178
== NULL
) {
2775 var180
= 0; /* is null */
2777 var180
= 1; /* arg is null and recv is not */
2780 { /* Inline kernel#Object#!= (var_cla178,var179) on <var_cla178:nullable MClass> */
2781 var_other25
= var179
;
2783 var184
= ((short int (*)(val
*, val
*))(var_cla178
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_cla178
, var_other25
) /* == on <var_cla178:nullable MClass(MClass)>*/;
2789 RET_LABEL182
:(void)0;
2795 { /* Inline model#MClass#mclass_type (var_cla178) on <var_cla178:nullable MClass(MClass)> */
2796 var188
= var_cla178
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_cla178:nullable MClass(MClass)> */
2797 if (unlikely(var188
== NULL
)) {
2798 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
2799 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
2803 RET_LABEL187
:(void)0;
2810 /* <var_nexpr:nullable AExpr(AExpr)> isa AStringFormExpr */
2811 cltype190
= type_parser_nodes__AStringFormExpr
.color
;
2812 idtype191
= type_parser_nodes__AStringFormExpr
.id
;
2813 if(cltype190
>= var_nexpr
->type
->table_size
) {
2816 var189
= var_nexpr
->type
->type_table
[cltype190
] == idtype191
;
2820 var193
= varonce192
;
2824 var196
= string__NativeString__to_s_with_length(var194
, var195
);
2826 varonce192
= var193
;
2829 var197
= modelbuilder__ModelBuilder__try_get_mclass_by_name(var_modelbuilder
, var_nexpr
, var_mmodule
, var193
);
2831 var_cla198
= var197
;
2833 if (var_cla198
== NULL
) {
2834 var200
= 0; /* is null */
2836 var200
= 1; /* arg is null and recv is not */
2839 { /* Inline kernel#Object#!= (var_cla198,var199) on <var_cla198:nullable MClass> */
2840 var_other25
= var199
;
2842 var204
= ((short int (*)(val
*, val
*))(var_cla198
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_cla198
, var_other25
) /* == on <var_cla198:nullable MClass(MClass)>*/;
2848 RET_LABEL202
:(void)0;
2854 { /* Inline model#MClass#mclass_type (var_cla198) on <var_cla198:nullable MClass(MClass)> */
2855 var208
= var_cla198
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_cla198:nullable MClass(MClass)> */
2856 if (unlikely(var208
== NULL
)) {
2857 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
2858 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
2862 RET_LABEL207
:(void)0;
2870 var210
= varonce209
;
2872 var211
= "Error: Untyped attribute ";
2874 var213
= string__NativeString__to_s_with_length(var211
, var212
);
2876 varonce209
= var210
;
2879 var215
= varonce214
;
2881 var216
= ". Implicit typing allowed only for literals and new.";
2883 var218
= string__NativeString__to_s_with_length(var216
, var217
);
2885 varonce214
= var215
;
2887 var219
= NEW_array__Array(&type_array__Arraykernel__Object
);
2888 { /* var219 = array_instance Array[Object] */
2890 var221
= NEW_array__NativeArray(var220
, &type_array__NativeArraykernel__Object
);
2891 ((struct instance_array__NativeArray
*)var221
)->values
[0] = (val
*) var210
;
2892 ((struct instance_array__NativeArray
*)var221
)->values
[1] = (val
*) var_mpropdef
;
2893 ((struct instance_array__NativeArray
*)var221
)->values
[2] = (val
*) var215
;
2895 ((void (*)(val
*, val
*, long))(var219
->class->vft
[COLOR_array__Array__with_native
]))(var219
, var221
, var220
) /* with_native on <var219:Array[Object]>*/;
2899 var222
= ((val
* (*)(val
*))(var219
->class->vft
[COLOR_string__Object__to_s
]))(var219
) /* to_s on <var219:Array[Object]>*/;
2902 modelbuilder__ModelBuilder__error(var_modelbuilder
, self
, var222
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
2912 if (var_mtype
== NULL
) {
2913 var224
= 1; /* is null */
2915 var224
= 0; /* arg is null but recv is not */
2918 { /* Inline kernel#Object#== (var_mtype,var223) on <var_mtype:nullable MType> */
2921 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
2922 var229
= var_mtype
== var_other
;
2925 RET_LABEL228
:(void)0;
2930 RET_LABEL226
:(void)0;
2942 if (var_ntype
== NULL
) {
2943 var231
= 0; /* is null */
2945 var231
= 1; /* arg is null and recv is not */
2948 { /* Inline kernel#Object#!= (var_ntype,var230) on <var_ntype:nullable AType> */
2949 var_other25
= var230
;
2951 var235
= ((short int (*)(val
*, val
*))(var_ntype
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_ntype
, var_other25
) /* == on <var_ntype:nullable AType(AType)>*/;
2957 RET_LABEL233
:(void)0;
2962 /* <var_nexpr:nullable AExpr> isa ANewExpr */
2963 cltype238
= type_parser_nodes__ANewExpr
.color
;
2964 idtype239
= type_parser_nodes__ANewExpr
.id
;
2965 if(var_nexpr
== NULL
) {
2968 if(cltype238
>= var_nexpr
->type
->table_size
) {
2971 var237
= var_nexpr
->type
->type_table
[cltype238
] == idtype239
;
2976 var240
= parser_nodes__ANewExpr__n_type(var_nexpr
);
2979 var241
= modelize_class__ModelBuilder__resolve_mtype(var_modelbuilder
, var_mmodule
, var_mclassdef
, var240
);
2981 var_xmtype
= var241
;
2982 if (var_xmtype
== NULL
) {
2983 var243
= 0; /* <var_mtype:nullable MType(MType)> cannot be null */
2985 { /* Inline kernel#Object#== (var_xmtype,var_mtype) on <var_xmtype:nullable MType> */
2986 var_other
= var_mtype
;
2988 { /* Inline kernel#Object#is_same_instance (var_xmtype,var_other) on <var_xmtype:nullable MType(MType)> */
2989 var248
= var_xmtype
== var_other
;
2992 RET_LABEL247
:(void)0;
2997 RET_LABEL245
:(void)0;
3004 { /* Inline modelbuilder#ModelBuilder#toolcontext (var_modelbuilder) on <var_modelbuilder:ModelBuilder> */
3005 var252
= var_modelbuilder
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var_modelbuilder:ModelBuilder> */
3006 if (unlikely(var252
== NULL
)) {
3007 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
3008 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
3012 RET_LABEL251
:(void)0;
3016 { /* Inline toolcontext#ToolContext#opt_warn (var250) on <var250:ToolContext> */
3017 var255
= var250
->attrs
[COLOR_toolcontext__ToolContext___opt_warn
].val
; /* _opt_warn on <var250:ToolContext> */
3018 if (unlikely(var255
== NULL
)) {
3019 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_warn");
3020 PRINT_ERROR(" (%s:%d)\n", "src/toolcontext.nit", 169);
3024 RET_LABEL254
:(void)0;
3028 { /* Inline opts#Option#value (var253) on <var253:OptionCount> */
3029 var258
= var253
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var253:OptionCount> */
3031 RET_LABEL257
:(void)0;
3036 { /* Inline kernel#Int#>= (var256,var259) on <var256:nullable Object(Int)> */
3037 /* Covariant cast for argument 0 (i) <var259:Int> isa OTHER */
3038 /* <var259:Int> isa OTHER */
3039 var262
= 1; /* easy <var259:Int> isa OTHER*/
3040 if (unlikely(!var262
)) {
3041 var_class_name
= type_kernel__Int
.name
;
3042 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
3043 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 326);
3046 var265
= ((struct instance_kernel__Int
*)var256
)->value
; /* autounbox from nullable Object to Int */;
3047 var266
= var265
>= var259
;
3050 RET_LABEL261
:(void)0;
3059 var268
= varonce267
;
3061 var269
= "Warning: useless type definition";
3063 var271
= string__NativeString__to_s_with_length(var269
, var270
);
3065 varonce267
= var268
;
3068 modelbuilder__ModelBuilder__warning(var_modelbuilder
, var_ntype
, var268
); /* Direct call modelbuilder#ModelBuilder#warning on <var_modelbuilder:ModelBuilder>*/
3078 if (var_mtype
== NULL
) {
3079 var273
= 1; /* is null */
3081 var273
= 0; /* arg is null but recv is not */
3084 { /* Inline kernel#Object#== (var_mtype,var272) on <var_mtype:nullable MType> */
3087 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
3088 var278
= var_mtype
== var_other
;
3091 RET_LABEL277
:(void)0;
3096 RET_LABEL275
:(void)0;
3102 var280
= varonce279
;
3104 var281
= "Error: Untyped attribute ";
3106 var283
= string__NativeString__to_s_with_length(var281
, var282
);
3108 varonce279
= var280
;
3110 var284
= NEW_array__Array(&type_array__Arraykernel__Object
);
3111 { /* var284 = array_instance Array[Object] */
3113 var286
= NEW_array__NativeArray(var285
, &type_array__NativeArraykernel__Object
);
3114 ((struct instance_array__NativeArray
*)var286
)->values
[0] = (val
*) var280
;
3115 ((struct instance_array__NativeArray
*)var286
)->values
[1] = (val
*) var_mpropdef
;
3117 ((void (*)(val
*, val
*, long))(var284
->class->vft
[COLOR_array__Array__with_native
]))(var284
, var286
, var285
) /* with_native on <var284:Array[Object]>*/;
3121 var287
= ((val
* (*)(val
*))(var284
->class->vft
[COLOR_string__Object__to_s
]))(var284
) /* to_s on <var284:Array[Object]>*/;
3124 modelbuilder__ModelBuilder__error(var_modelbuilder
, self
, var287
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
3130 { /* Inline model#MAttributeDef#static_mtype= (var_mpropdef,var_mtype) on <var_mpropdef:nullable MAttributeDef(MAttributeDef)> */
3131 var_mpropdef
->attrs
[COLOR_model__MAttributeDef___static_mtype
].val
= var_mtype
; /* _static_mtype on <var_mpropdef:nullable MAttributeDef(MAttributeDef)> */
3132 RET_LABEL288
:(void)0;
3136 if (var_mreadpropdef
== NULL
) {
3137 var290
= 0; /* is null */
3139 var290
= 1; /* arg is null and recv is not */
3142 { /* Inline kernel#Object#!= (var_mreadpropdef,var289) on <var_mreadpropdef:nullable MMethodDef> */
3143 var_other25
= var289
;
3145 var294
= ((short int (*)(val
*, val
*))(var_mreadpropdef
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_mreadpropdef
, var_other25
) /* == on <var_mreadpropdef:nullable MMethodDef(MMethodDef)>*/;
3151 RET_LABEL292
:(void)0;
3156 var296
= NEW_model__MSignature(&type_model__MSignature
);
3157 var297
= NEW_array__Array(&type_array__Arraymodel__MParameter
);
3159 array__Array__init(var297
); /* Direct call array#Array#init on <var297:Array[MParameter]>*/
3162 model__MSignature__init(var296
, var297
, var_mtype
); /* Direct call model#MSignature#init on <var296:MSignature>*/
3164 var_msignature298
= var296
;
3166 { /* Inline model#MMethodDef#msignature= (var_mreadpropdef,var_msignature298) on <var_mreadpropdef:nullable MMethodDef(MMethodDef)> */
3167 var_mreadpropdef
->attrs
[COLOR_model__MMethodDef___msignature
].val
= var_msignature298
; /* _msignature on <var_mreadpropdef:nullable MMethodDef(MMethodDef)> */
3168 RET_LABEL299
:(void)0;
3174 { /* Inline modelize_property#AAttrPropdef#mwritepropdef (self) on <self:AAttrPropdef> */
3175 var302
= self
->attrs
[COLOR_modelize_property__AAttrPropdef___mwritepropdef
].val
; /* _mwritepropdef on <self:AAttrPropdef> */
3177 RET_LABEL301
:(void)0;
3180 var_mwritepropdef
= var300
;
3182 if (var_mwritepropdef
== NULL
) {
3183 var304
= 0; /* is null */
3185 var304
= 1; /* arg is null and recv is not */
3188 { /* Inline kernel#Object#!= (var_mwritepropdef,var303) on <var_mwritepropdef:nullable MMethodDef> */
3189 var_other25
= var303
;
3191 var308
= ((short int (*)(val
*, val
*))(var_mwritepropdef
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_mwritepropdef
, var_other25
) /* == on <var_mwritepropdef:nullable MMethodDef(MMethodDef)>*/;
3197 RET_LABEL306
:(void)0;
3203 var310
= parser_nodes__AAttrPropdef__n_id(self
);
3206 if (var310
== NULL
) {
3207 var312
= 0; /* is null */
3209 var312
= 1; /* arg is null and recv is not */
3212 { /* Inline kernel#Object#!= (var310,var311) on <var310:nullable TAttrid> */
3213 var_other25
= var311
;
3215 var316
= ((short int (*)(val
*, val
*))(var310
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var310
, var_other25
) /* == on <var310:nullable TAttrid(TAttrid)>*/;
3221 RET_LABEL314
:(void)0;
3227 var318
= parser_nodes__AAttrPropdef__n_id(self
);
3229 if (var318
== NULL
) {
3230 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3231 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 868);
3234 var319
= lexer_work__Token__text(var318
);
3238 var321
= string__Text__substring_from(var319
, var320
);
3243 var322
= parser_nodes__AAttrPropdef__n_id2(self
);
3245 if (var322
== NULL
) {
3246 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3247 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 870);
3250 var323
= lexer_work__Token__text(var322
);
3254 var324
= NEW_model__MParameter(&type_model__MParameter
);
3257 model__MParameter__init(var324
, var_name
, var_mtype
, var325
); /* Direct call model#MParameter#init on <var324:MParameter>*/
3259 var_mparameter
= var324
;
3260 var326
= NEW_model__MSignature(&type_model__MSignature
);
3261 var327
= NEW_array__Array(&type_array__Arraymodel__MParameter
);
3264 array__Array__with_capacity(var327
, var328
); /* Direct call array#Array#with_capacity on <var327:Array[MParameter]>*/
3268 array__AbstractArray__push(var_329
, var_mparameter
); /* Direct call array#AbstractArray#push on <var_329:Array[MParameter]>*/
3272 model__MSignature__init(var326
, var_329
, var330
); /* Direct call model#MSignature#init on <var326:MSignature>*/
3274 var_msignature331
= var326
;
3276 { /* Inline model#MMethodDef#msignature= (var_mwritepropdef,var_msignature331) on <var_mwritepropdef:nullable MMethodDef(MMethodDef)> */
3277 var_mwritepropdef
->attrs
[COLOR_model__MMethodDef___msignature
].val
= var_msignature331
; /* _msignature on <var_mwritepropdef:nullable MMethodDef(MMethodDef)> */
3278 RET_LABEL332
:(void)0;
3284 { /* Inline modelize_property#AAttrPropdef#mlazypropdef (self) on <self:AAttrPropdef> */
3285 var335
= self
->attrs
[COLOR_modelize_property__AAttrPropdef___mlazypropdef
].val
; /* _mlazypropdef on <self:AAttrPropdef> */
3287 RET_LABEL334
:(void)0;
3290 var_mlazypropdef
= var333
;
3292 if (var_mlazypropdef
== NULL
) {
3293 var337
= 0; /* is null */
3295 var337
= 1; /* arg is null and recv is not */
3298 { /* Inline kernel#Object#!= (var_mlazypropdef,var336) on <var_mlazypropdef:nullable MAttributeDef> */
3299 var_other25
= var336
;
3301 var341
= ((short int (*)(val
*, val
*))(var_mlazypropdef
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_mlazypropdef
, var_other25
) /* == on <var_mlazypropdef:nullable MAttributeDef(MAttributeDef)>*/;
3307 RET_LABEL339
:(void)0;
3313 { /* Inline modelbuilder#ModelBuilder#model (var_modelbuilder) on <var_modelbuilder:ModelBuilder> */
3314 var345
= var_modelbuilder
->attrs
[COLOR_modelbuilder__ModelBuilder___model
].val
; /* _model on <var_modelbuilder:ModelBuilder> */
3315 if (unlikely(var345
== NULL
)) {
3316 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _model");
3317 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 98);
3321 RET_LABEL344
:(void)0;
3325 var347
= varonce346
;
3329 var350
= string__NativeString__to_s_with_length(var348
, var349
);
3331 varonce346
= var347
;
3334 var351
= model__Model__get_mclasses_by_name(var343
, var347
);
3336 if (var351
== NULL
) {
3337 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3338 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 879);
3341 var352
= abstract_collection__SequenceRead__first(var351
);
3344 { /* Inline model#MClass#mclass_type (var352) on <var352:nullable Object(MClass)> */
3345 var355
= var352
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var352:nullable Object(MClass)> */
3346 if (unlikely(var355
== NULL
)) {
3347 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
3348 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
3352 RET_LABEL354
:(void)0;
3356 { /* Inline model#MAttributeDef#static_mtype= (var_mlazypropdef,var353) on <var_mlazypropdef:nullable MAttributeDef(MAttributeDef)> */
3357 var_mlazypropdef
->attrs
[COLOR_model__MAttributeDef___static_mtype
].val
= var353
; /* _static_mtype on <var_mlazypropdef:nullable MAttributeDef(MAttributeDef)> */
3358 RET_LABEL356
:(void)0;
3365 /* method modelize_property#AAttrPropdef#build_signature for (self: Object, ModelBuilder) */
3366 void VIRTUAL_modelize_property__AAttrPropdef__build_signature(val
* self
, val
* p0
) {
3367 modelize_property__AAttrPropdef__build_signature(self
, p0
); /* Direct call modelize_property#AAttrPropdef#build_signature on <self:Object(AAttrPropdef)>*/
3370 /* method modelize_property#AAttrPropdef#check_signature for (self: AAttrPropdef, ModelBuilder) */
3371 void modelize_property__AAttrPropdef__check_signature(val
* self
, val
* p0
) {
3372 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
3373 val
* var
/* : nullable MPropDef */;
3374 val
* var2
/* : nullable MPropDef */;
3375 val
* var_mpropdef
/* var mpropdef: nullable MAttributeDef */;
3376 val
* var3
/* : null */;
3377 short int var4
/* : Bool */;
3378 short int var5
/* : Bool */;
3379 val
* var_other
/* var other: nullable Object */;
3380 short int var7
/* : Bool */;
3381 short int var9
/* : Bool */;
3382 val
* var10
/* : MClassDef */;
3383 val
* var12
/* : MClassDef */;
3384 val
* var_mclassdef
/* var mclassdef: MClassDef */;
3385 val
* var13
/* : MModule */;
3386 val
* var15
/* : MModule */;
3387 val
* var_mmodule
/* var mmodule: MModule */;
3388 val
* var16
/* : nullable AType */;
3389 val
* var_ntype
/* var ntype: nullable AType */;
3390 val
* var17
/* : nullable MPropDef */;
3391 val
* var19
/* : nullable MPropDef */;
3392 val
* var20
/* : nullable MType */;
3393 val
* var22
/* : nullable MType */;
3394 val
* var_mtype
/* var mtype: nullable MType */;
3395 val
* var23
/* : null */;
3396 short int var24
/* : Bool */;
3397 short int var25
/* : Bool */;
3398 short int var27
/* : Bool */;
3399 short int var29
/* : Bool */;
3400 short int var30
/* : Bool */;
3401 short int var31
/* : Bool */;
3402 val
* var32
/* : MProperty */;
3403 val
* var34
/* : MProperty */;
3404 val
* var35
/* : MPropDef */;
3405 val
* var36
/* : nullable MType */;
3406 val
* var38
/* : nullable MType */;
3407 val
* var_precursor_type
/* var precursor_type: nullable MType */;
3408 val
* var39
/* : null */;
3409 short int var40
/* : Bool */;
3410 short int var41
/* : Bool */;
3411 short int var43
/* : Bool */;
3412 short int var45
/* : Bool */;
3413 short int var46
/* : Bool */;
3414 short int var47
/* : Bool */;
3415 val
* var_other49
/* var other: nullable Object */;
3416 short int var50
/* : Bool */;
3417 short int var51
/* : Bool */;
3418 short int var52
/* : Bool */;
3419 static val
* varonce
;
3420 val
* var53
/* : String */;
3421 char* var54
/* : NativeString */;
3422 long var55
/* : Int */;
3423 val
* var56
/* : FlatString */;
3424 static val
* varonce57
;
3425 val
* var58
/* : String */;
3426 char* var59
/* : NativeString */;
3427 long var60
/* : Int */;
3428 val
* var61
/* : FlatString */;
3429 static val
* varonce62
;
3430 val
* var63
/* : String */;
3431 char* var64
/* : NativeString */;
3432 long var65
/* : Int */;
3433 val
* var66
/* : FlatString */;
3434 val
* var67
/* : Array[Object] */;
3435 long var68
/* : Int */;
3436 val
* var69
/* : NativeArray[Object] */;
3437 val
* var70
/* : String */;
3438 val
* var71
/* : nullable MMethodDef */;
3439 val
* var73
/* : nullable MMethodDef */;
3440 val
* var_meth
/* var meth: nullable MMethodDef */;
3441 val
* var74
/* : null */;
3442 short int var75
/* : Bool */;
3443 short int var76
/* : Bool */;
3444 short int var78
/* : Bool */;
3445 short int var79
/* : Bool */;
3446 short int var80
/* : Bool */;
3447 val
* var_node
/* var node: nullable ANode */;
3448 val
* var81
/* : null */;
3449 short int var82
/* : Bool */;
3450 short int var83
/* : Bool */;
3451 short int var85
/* : Bool */;
3452 short int var87
/* : Bool */;
3453 val
* var88
/* : nullable MMethodDef */;
3454 val
* var90
/* : nullable MMethodDef */;
3455 val
* var91
/* : null */;
3456 short int var92
/* : Bool */;
3457 short int var93
/* : Bool */;
3458 short int var95
/* : Bool */;
3459 short int var96
/* : Bool */;
3460 short int var97
/* : Bool */;
3461 val
* var_node98
/* var node: nullable ANode */;
3462 val
* var99
/* : null */;
3463 short int var100
/* : Bool */;
3464 short int var101
/* : Bool */;
3465 short int var103
/* : Bool */;
3466 short int var105
/* : Bool */;
3467 var_modelbuilder
= p0
;
3469 { /* Inline modelize_property#APropdef#mpropdef (self) on <self:AAttrPropdef> */
3470 var2
= self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
; /* _mpropdef on <self:AAttrPropdef> */
3477 if (var_mpropdef
== NULL
) {
3478 var4
= 1; /* is null */
3480 var4
= 0; /* arg is null but recv is not */
3483 { /* Inline kernel#Object#== (var_mpropdef,var3) on <var_mpropdef:nullable MAttributeDef> */
3486 { /* Inline kernel#Object#is_same_instance (var_mpropdef,var_other) on <var_mpropdef:nullable MAttributeDef(MAttributeDef)> */
3487 var9
= var_mpropdef
== var_other
;
3504 { /* Inline model#MPropDef#mclassdef (var_mpropdef) on <var_mpropdef:nullable MAttributeDef(MAttributeDef)> */
3505 var12
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_mpropdef:nullable MAttributeDef(MAttributeDef)> */
3506 if (unlikely(var12
== NULL
)) {
3507 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
3508 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1879);
3512 RET_LABEL11
:(void)0;
3515 var_mclassdef
= var10
;
3517 { /* Inline model#MClassDef#mmodule (var_mclassdef) on <var_mclassdef:MClassDef> */
3518 var15
= var_mclassdef
->attrs
[COLOR_model__MClassDef___mmodule
].val
; /* _mmodule on <var_mclassdef:MClassDef> */
3519 if (unlikely(var15
== NULL
)) {
3520 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
3521 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 471);
3525 RET_LABEL14
:(void)0;
3528 var_mmodule
= var13
;
3530 var16
= parser_nodes__AAttrPropdef__n_type(self
);
3534 { /* Inline modelize_property#APropdef#mpropdef (self) on <self:AAttrPropdef> */
3535 var19
= self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
; /* _mpropdef on <self:AAttrPropdef> */
3537 RET_LABEL18
:(void)0;
3540 if (var17
== NULL
) {
3541 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3542 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 890);
3545 { /* Inline model#MAttributeDef#static_mtype (var17) on <var17:nullable MPropDef(nullable MAttributeDef)> */
3546 if (unlikely(var17
== NULL
)) {
3547 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3548 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1963);
3551 var22
= var17
->attrs
[COLOR_model__MAttributeDef___static_mtype
].val
; /* _static_mtype on <var17:nullable MPropDef(nullable MAttributeDef)> */
3553 RET_LABEL21
:(void)0;
3558 if (var_mtype
== NULL
) {
3559 var24
= 1; /* is null */
3561 var24
= 0; /* arg is null but recv is not */
3564 { /* Inline kernel#Object#== (var_mtype,var23) on <var_mtype:nullable MType> */
3567 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
3568 var29
= var_mtype
== var_other
;
3571 RET_LABEL28
:(void)0;
3576 RET_LABEL26
:(void)0;
3585 var30
= model__MPropDef__is_intro(var_mpropdef
);
3590 { /* Inline model#MPropDef#mproperty (var_mpropdef) on <var_mpropdef:nullable MAttributeDef(MAttributeDef)> */
3591 var34
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mproperty
].val
; /* _mproperty on <var_mpropdef:nullable MAttributeDef(MAttributeDef)> */
3592 if (unlikely(var34
== NULL
)) {
3593 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
3594 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1882);
3598 RET_LABEL33
:(void)0;
3602 var35
= model__MProperty__intro(var32
);
3605 { /* Inline model#MAttributeDef#static_mtype (var35) on <var35:MPropDef(MAttributeDef)> */
3606 var38
= var35
->attrs
[COLOR_model__MAttributeDef___static_mtype
].val
; /* _static_mtype on <var35:MPropDef(MAttributeDef)> */
3608 RET_LABEL37
:(void)0;
3611 var_precursor_type
= var36
;
3613 if (var_precursor_type
== NULL
) {
3614 var40
= 1; /* is null */
3616 var40
= 0; /* arg is null but recv is not */
3619 { /* Inline kernel#Object#== (var_precursor_type,var39) on <var_precursor_type:nullable MType> */
3622 { /* Inline kernel#Object#is_same_instance (var_precursor_type,var_other) on <var_precursor_type:nullable MType(MType)> */
3623 var45
= var_precursor_type
== var_other
;
3626 RET_LABEL44
:(void)0;
3631 RET_LABEL42
:(void)0;
3640 { /* Inline kernel#Object#!= (var_mtype,var_precursor_type) on <var_mtype:nullable MType(MType)> */
3641 var_other49
= var_precursor_type
;
3643 var51
= ((short int (*)(val
*, val
*))(var_mtype
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_mtype
, var_other49
) /* == on <var_mtype:nullable MType(MType)>*/;
3649 RET_LABEL48
:(void)0;
3654 if (unlikely(var_ntype
== NULL
)) {
3655 PRINT_ERROR("Runtime error: %s", "Cast failed");
3656 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 900);
3662 var54
= "Redef Error: Wrong static type. found ";
3664 var56
= string__NativeString__to_s_with_length(var54
, var55
);
3671 var59
= ", expected ";
3673 var61
= string__NativeString__to_s_with_length(var59
, var60
);
3682 var66
= string__NativeString__to_s_with_length(var64
, var65
);
3686 var67
= NEW_array__Array(&type_array__Arraykernel__Object
);
3687 { /* var67 = array_instance Array[Object] */
3689 var69
= NEW_array__NativeArray(var68
, &type_array__NativeArraykernel__Object
);
3690 ((struct instance_array__NativeArray
*)var69
)->values
[0] = (val
*) var53
;
3691 ((struct instance_array__NativeArray
*)var69
)->values
[1] = (val
*) var_mtype
;
3692 ((struct instance_array__NativeArray
*)var69
)->values
[2] = (val
*) var58
;
3693 ((struct instance_array__NativeArray
*)var69
)->values
[3] = (val
*) var_precursor_type
;
3694 ((struct instance_array__NativeArray
*)var69
)->values
[4] = (val
*) var63
;
3696 ((void (*)(val
*, val
*, long))(var67
->class->vft
[COLOR_array__Array__with_native
]))(var67
, var69
, var68
) /* with_native on <var67:Array[Object]>*/;
3700 var70
= ((val
* (*)(val
*))(var67
->class->vft
[COLOR_string__Object__to_s
]))(var67
) /* to_s on <var67:Array[Object]>*/;
3703 modelbuilder__ModelBuilder__error(var_modelbuilder
, var_ntype
, var70
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
3711 { /* Inline modelize_property#AAttrPropdef#mreadpropdef (self) on <self:AAttrPropdef> */
3712 var73
= self
->attrs
[COLOR_modelize_property__AAttrPropdef___mreadpropdef
].val
; /* _mreadpropdef on <self:AAttrPropdef> */
3714 RET_LABEL72
:(void)0;
3719 if (var_meth
== NULL
) {
3720 var75
= 0; /* is null */
3722 var75
= 1; /* arg is null and recv is not */
3725 { /* Inline kernel#Object#!= (var_meth,var74) on <var_meth:nullable MMethodDef> */
3726 var_other49
= var74
;
3728 var79
= ((short int (*)(val
*, val
*))(var_meth
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_meth
, var_other49
) /* == on <var_meth:nullable MMethodDef(MMethodDef)>*/;
3734 RET_LABEL77
:(void)0;
3740 modelize_property__AAttrPropdef__check_method_signature(self
, var_modelbuilder
, var_meth
); /* Direct call modelize_property#AAttrPropdef#check_method_signature on <self:AAttrPropdef>*/
3742 var_node
= var_ntype
;
3744 if (var_node
== NULL
) {
3745 var82
= 1; /* is null */
3747 var82
= 0; /* arg is null but recv is not */
3750 { /* Inline kernel#Object#== (var_node,var81) on <var_node:nullable ANode> */
3753 { /* Inline kernel#Object#is_same_instance (var_node,var_other) on <var_node:nullable ANode(ANode)> */
3754 var87
= var_node
== var_other
;
3757 RET_LABEL86
:(void)0;
3762 RET_LABEL84
:(void)0;
3771 modelize_property__ModelBuilder__check_visibility(var_modelbuilder
, var_node
, var_mtype
, var_meth
); /* Direct call modelize_property#ModelBuilder#check_visibility on <var_modelbuilder:ModelBuilder>*/
3776 { /* Inline modelize_property#AAttrPropdef#mwritepropdef (self) on <self:AAttrPropdef> */
3777 var90
= self
->attrs
[COLOR_modelize_property__AAttrPropdef___mwritepropdef
].val
; /* _mwritepropdef on <self:AAttrPropdef> */
3779 RET_LABEL89
:(void)0;
3784 if (var_meth
== NULL
) {
3785 var92
= 0; /* is null */
3787 var92
= 1; /* arg is null and recv is not */
3790 { /* Inline kernel#Object#!= (var_meth,var91) on <var_meth:nullable MMethodDef> */
3791 var_other49
= var91
;
3793 var96
= ((short int (*)(val
*, val
*))(var_meth
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_meth
, var_other49
) /* == on <var_meth:nullable MMethodDef(MMethodDef)>*/;
3799 RET_LABEL94
:(void)0;
3805 modelize_property__AAttrPropdef__check_method_signature(self
, var_modelbuilder
, var_meth
); /* Direct call modelize_property#AAttrPropdef#check_method_signature on <self:AAttrPropdef>*/
3807 var_node98
= var_ntype
;
3809 if (var_node98
== NULL
) {
3810 var100
= 1; /* is null */
3812 var100
= 0; /* arg is null but recv is not */
3815 { /* Inline kernel#Object#== (var_node98,var99) on <var_node98:nullable ANode> */
3818 { /* Inline kernel#Object#is_same_instance (var_node98,var_other) on <var_node98:nullable ANode(ANode)> */
3819 var105
= var_node98
== var_other
;
3822 RET_LABEL104
:(void)0;
3827 RET_LABEL102
:(void)0;
3836 modelize_property__ModelBuilder__check_visibility(var_modelbuilder
, var_node98
, var_mtype
, var_meth
); /* Direct call modelize_property#ModelBuilder#check_visibility on <var_modelbuilder:ModelBuilder>*/
3842 /* method modelize_property#AAttrPropdef#check_signature for (self: Object, ModelBuilder) */
3843 void VIRTUAL_modelize_property__AAttrPropdef__check_signature(val
* self
, val
* p0
) {
3844 modelize_property__AAttrPropdef__check_signature(self
, p0
); /* Direct call modelize_property#AAttrPropdef#check_signature on <self:Object(AAttrPropdef)>*/
3847 /* method modelize_property#AAttrPropdef#check_method_signature for (self: AAttrPropdef, ModelBuilder, MMethodDef) */
3848 void modelize_property__AAttrPropdef__check_method_signature(val
* self
, val
* p0
, val
* p1
) {
3849 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
3850 val
* var_mpropdef
/* var mpropdef: MMethodDef */;
3851 val
* var
/* : MClassDef */;
3852 val
* var2
/* : MClassDef */;
3853 val
* var_mclassdef
/* var mclassdef: MClassDef */;
3854 val
* var3
/* : MModule */;
3855 val
* var5
/* : MModule */;
3856 val
* var_mmodule
/* var mmodule: MModule */;
3857 val
* var6
/* : nullable AType */;
3858 val
* var_nsig
/* var nsig: nullable AType */;
3859 val
* var7
/* : nullable MSignature */;
3860 val
* var9
/* : nullable MSignature */;
3861 val
* var_mysignature
/* var mysignature: nullable MSignature */;
3862 val
* var10
/* : null */;
3863 short int var11
/* : Bool */;
3864 short int var12
/* : Bool */;
3865 val
* var_other
/* var other: nullable Object */;
3866 short int var14
/* : Bool */;
3867 short int var16
/* : Bool */;
3868 short int var17
/* : Bool */;
3869 short int var18
/* : Bool */;
3870 val
* var19
/* : MProperty */;
3871 val
* var21
/* : MProperty */;
3872 val
* var22
/* : MPropDef */;
3873 val
* var23
/* : nullable MSignature */;
3874 val
* var25
/* : nullable MSignature */;
3875 val
* var_msignature
/* var msignature: nullable MSignature */;
3876 val
* var26
/* : null */;
3877 short int var27
/* : Bool */;
3878 short int var28
/* : Bool */;
3879 short int var30
/* : Bool */;
3880 short int var32
/* : Bool */;
3881 long var33
/* : Int */;
3882 long var34
/* : Int */;
3883 short int var35
/* : Bool */;
3884 short int var36
/* : Bool */;
3885 short int var38
/* : Bool */;
3886 short int var39
/* : Bool */;
3887 val
* var40
/* : null */;
3888 short int var41
/* : Bool */;
3889 short int var42
/* : Bool */;
3890 val
* var_other44
/* var other: nullable Object */;
3891 short int var45
/* : Bool */;
3892 short int var46
/* : Bool */;
3893 short int var47
/* : Bool */;
3894 val
* var_node
/* var node: ANode */;
3895 static val
* varonce
;
3896 val
* var48
/* : String */;
3897 char* var49
/* : NativeString */;
3898 long var50
/* : Int */;
3899 val
* var51
/* : FlatString */;
3900 long var52
/* : Int */;
3901 static val
* varonce53
;
3902 val
* var54
/* : String */;
3903 char* var55
/* : NativeString */;
3904 long var56
/* : Int */;
3905 val
* var57
/* : FlatString */;
3906 long var58
/* : Int */;
3907 static val
* varonce59
;
3908 val
* var60
/* : String */;
3909 char* var61
/* : NativeString */;
3910 long var62
/* : Int */;
3911 val
* var63
/* : FlatString */;
3912 val
* var64
/* : Array[Object] */;
3913 long var65
/* : Int */;
3914 val
* var66
/* : NativeArray[Object] */;
3915 val
* var67
/* : Object */;
3916 val
* var68
/* : Object */;
3917 val
* var69
/* : String */;
3918 val
* var70
/* : nullable MType */;
3919 val
* var72
/* : nullable MType */;
3920 val
* var_precursor_ret_type
/* var precursor_ret_type: nullable MType */;
3921 val
* var73
/* : nullable MType */;
3922 val
* var75
/* : nullable MType */;
3923 val
* var_ret_type
/* var ret_type: nullable MType */;
3924 short int var76
/* : Bool */;
3925 val
* var77
/* : null */;
3926 short int var78
/* : Bool */;
3927 short int var79
/* : Bool */;
3928 short int var81
/* : Bool */;
3929 short int var82
/* : Bool */;
3930 short int var83
/* : Bool */;
3931 short int var_
/* var : Bool */;
3932 val
* var84
/* : null */;
3933 short int var85
/* : Bool */;
3934 short int var86
/* : Bool */;
3935 short int var88
/* : Bool */;
3936 short int var90
/* : Bool */;
3937 val
* var91
/* : null */;
3938 short int var92
/* : Bool */;
3939 short int var93
/* : Bool */;
3940 short int var95
/* : Bool */;
3941 short int var96
/* : Bool */;
3942 short int var97
/* : Bool */;
3943 val
* var_node98
/* var node: ANode */;
3944 static val
* varonce99
;
3945 val
* var100
/* : String */;
3946 char* var101
/* : NativeString */;
3947 long var102
/* : Int */;
3948 val
* var103
/* : FlatString */;
3949 val
* var104
/* : MProperty */;
3950 val
* var106
/* : MProperty */;
3951 static val
* varonce107
;
3952 val
* var108
/* : String */;
3953 char* var109
/* : NativeString */;
3954 long var110
/* : Int */;
3955 val
* var111
/* : FlatString */;
3956 val
* var112
/* : Array[Object] */;
3957 long var113
/* : Int */;
3958 val
* var114
/* : NativeArray[Object] */;
3959 val
* var115
/* : String */;
3960 long var116
/* : Int */;
3961 long var117
/* : Int */;
3962 short int var118
/* : Bool */;
3963 short int var120
/* : Bool */;
3966 const char* var_class_name
;
3967 short int var121
/* : Bool */;
3968 val
* var122
/* : Range[Int] */;
3969 long var123
/* : Int */;
3970 long var124
/* : Int */;
3971 val
* var125
/* : Discrete */;
3972 val
* var126
/* : Discrete */;
3973 val
* var127
/* : Iterator[Discrete] */;
3974 short int var128
/* : Bool */;
3975 val
* var129
/* : nullable Object */;
3976 long var_i
/* var i: Int */;
3977 long var130
/* : Int */;
3978 val
* var131
/* : Array[MParameter] */;
3979 val
* var133
/* : Array[MParameter] */;
3980 val
* var134
/* : nullable Object */;
3981 val
* var135
/* : MType */;
3982 val
* var137
/* : MType */;
3983 val
* var_myt
/* var myt: MType */;
3984 val
* var138
/* : Array[MParameter] */;
3985 val
* var140
/* : Array[MParameter] */;
3986 val
* var141
/* : nullable Object */;
3987 val
* var142
/* : MType */;
3988 val
* var144
/* : MType */;
3989 val
* var_prt
/* var prt: MType */;
3990 short int var145
/* : Bool */;
3991 val
* var146
/* : MClassType */;
3992 val
* var148
/* : MClassType */;
3993 short int var149
/* : Bool */;
3994 short int var150
/* : Bool */;
3995 short int var_151
/* var : Bool */;
3996 val
* var152
/* : MClassType */;
3997 val
* var154
/* : MClassType */;
3998 short int var155
/* : Bool */;
3999 short int var156
/* : Bool */;
4000 val
* var157
/* : null */;
4001 short int var158
/* : Bool */;
4002 short int var159
/* : Bool */;
4003 short int var161
/* : Bool */;
4004 short int var162
/* : Bool */;
4005 short int var163
/* : Bool */;
4006 val
* var_node164
/* var node: ANode */;
4007 static val
* varonce165
;
4008 val
* var166
/* : String */;
4009 char* var167
/* : NativeString */;
4010 long var168
/* : Int */;
4011 val
* var169
/* : FlatString */;
4012 val
* var170
/* : Array[MParameter] */;
4013 val
* var172
/* : Array[MParameter] */;
4014 val
* var173
/* : nullable Object */;
4015 val
* var174
/* : String */;
4016 val
* var176
/* : String */;
4017 static val
* varonce177
;
4018 val
* var178
/* : String */;
4019 char* var179
/* : NativeString */;
4020 long var180
/* : Int */;
4021 val
* var181
/* : FlatString */;
4022 static val
* varonce182
;
4023 val
* var183
/* : String */;
4024 char* var184
/* : NativeString */;
4025 long var185
/* : Int */;
4026 val
* var186
/* : FlatString */;
4027 static val
* varonce187
;
4028 val
* var188
/* : String */;
4029 char* var189
/* : NativeString */;
4030 long var190
/* : Int */;
4031 val
* var191
/* : FlatString */;
4032 val
* var192
/* : Array[Object] */;
4033 long var193
/* : Int */;
4034 val
* var194
/* : NativeArray[Object] */;
4035 val
* var195
/* : String */;
4036 val
* var196
/* : null */;
4037 short int var197
/* : Bool */;
4038 short int var198
/* : Bool */;
4039 short int var200
/* : Bool */;
4040 short int var201
/* : Bool */;
4041 short int var202
/* : Bool */;
4042 val
* var203
/* : null */;
4043 short int var204
/* : Bool */;
4044 short int var205
/* : Bool */;
4045 short int var207
/* : Bool */;
4046 short int var209
/* : Bool */;
4047 val
* var210
/* : MClassType */;
4048 val
* var212
/* : MClassType */;
4049 short int var213
/* : Bool */;
4050 short int var214
/* : Bool */;
4051 val
* var215
/* : null */;
4052 short int var216
/* : Bool */;
4053 short int var217
/* : Bool */;
4054 short int var219
/* : Bool */;
4055 short int var220
/* : Bool */;
4056 short int var221
/* : Bool */;
4057 val
* var_node222
/* var node: ANode */;
4058 static val
* varonce223
;
4059 val
* var224
/* : String */;
4060 char* var225
/* : NativeString */;
4061 long var226
/* : Int */;
4062 val
* var227
/* : FlatString */;
4063 static val
* varonce228
;
4064 val
* var229
/* : String */;
4065 char* var230
/* : NativeString */;
4066 long var231
/* : Int */;
4067 val
* var232
/* : FlatString */;
4068 static val
* varonce233
;
4069 val
* var234
/* : String */;
4070 char* var235
/* : NativeString */;
4071 long var236
/* : Int */;
4072 val
* var237
/* : FlatString */;
4073 val
* var238
/* : Array[Object] */;
4074 long var239
/* : Int */;
4075 val
* var240
/* : NativeArray[Object] */;
4076 val
* var241
/* : String */;
4077 var_modelbuilder
= p0
;
4080 { /* Inline model#MPropDef#mclassdef (var_mpropdef) on <var_mpropdef:MMethodDef> */
4081 var2
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_mpropdef:MMethodDef> */
4082 if (unlikely(var2
== NULL
)) {
4083 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
4084 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1879);
4091 var_mclassdef
= var
;
4093 { /* Inline model#MClassDef#mmodule (var_mclassdef) on <var_mclassdef:MClassDef> */
4094 var5
= var_mclassdef
->attrs
[COLOR_model__MClassDef___mmodule
].val
; /* _mmodule on <var_mclassdef:MClassDef> */
4095 if (unlikely(var5
== NULL
)) {
4096 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
4097 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 471);
4106 var6
= parser_nodes__AAttrPropdef__n_type(self
);
4110 { /* Inline model#MMethodDef#msignature (var_mpropdef) on <var_mpropdef:MMethodDef> */
4111 var9
= var_mpropdef
->attrs
[COLOR_model__MMethodDef___msignature
].val
; /* _msignature on <var_mpropdef:MMethodDef> */
4116 var_mysignature
= var7
;
4118 if (var_mysignature
== NULL
) {
4119 var11
= 1; /* is null */
4121 var11
= 0; /* arg is null but recv is not */
4124 { /* Inline kernel#Object#== (var_mysignature,var10) on <var_mysignature:nullable MSignature> */
4127 { /* Inline kernel#Object#is_same_instance (var_mysignature,var_other) on <var_mysignature:nullable MSignature(MSignature)> */
4128 var16
= var_mysignature
== var_other
;
4131 RET_LABEL15
:(void)0;
4136 RET_LABEL13
:(void)0;
4145 var17
= model__MPropDef__is_intro(var_mpropdef
);
4150 { /* Inline model#MPropDef#mproperty (var_mpropdef) on <var_mpropdef:MMethodDef> */
4151 var21
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mproperty
].val
; /* _mproperty on <var_mpropdef:MMethodDef> */
4152 if (unlikely(var21
== NULL
)) {
4153 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
4154 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1882);
4158 RET_LABEL20
:(void)0;
4162 var22
= model__MProperty__intro(var19
);
4165 { /* Inline model#MMethodDef#msignature (var22) on <var22:MPropDef(MMethodDef)> */
4166 var25
= var22
->attrs
[COLOR_model__MMethodDef___msignature
].val
; /* _msignature on <var22:MPropDef(MMethodDef)> */
4168 RET_LABEL24
:(void)0;
4171 var_msignature
= var23
;
4173 if (var_msignature
== NULL
) {
4174 var27
= 1; /* is null */
4176 var27
= 0; /* arg is null but recv is not */
4179 { /* Inline kernel#Object#== (var_msignature,var26) on <var_msignature:nullable MSignature> */
4182 { /* Inline kernel#Object#is_same_instance (var_msignature,var_other) on <var_msignature:nullable MSignature(MSignature)> */
4183 var32
= var_msignature
== var_other
;
4186 RET_LABEL31
:(void)0;
4191 RET_LABEL29
:(void)0;
4200 var33
= model__MSignature__arity(var_mysignature
);
4203 var34
= model__MSignature__arity(var_msignature
);
4206 { /* Inline kernel#Int#!= (var33,var34) on <var33:Int> */
4207 var38
= var33
== var34
;
4211 RET_LABEL37
:(void)0;
4217 if (var_nsig
== NULL
) {
4218 var41
= 0; /* is null */
4220 var41
= 1; /* arg is null and recv is not */
4223 { /* Inline kernel#Object#!= (var_nsig,var40) on <var_nsig:nullable AType> */
4224 var_other44
= var40
;
4226 var46
= ((short int (*)(val
*, val
*))(var_nsig
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nsig
, var_other44
) /* == on <var_nsig:nullable AType(AType)>*/;
4232 RET_LABEL43
:(void)0;
4237 var_node
= var_nsig
;
4244 var49
= "Redef Error: ";
4246 var51
= string__NativeString__to_s_with_length(var49
, var50
);
4251 var52
= model__MSignature__arity(var_mysignature
);
4256 var55
= " parameters found, ";
4258 var57
= string__NativeString__to_s_with_length(var55
, var56
);
4263 var58
= model__MSignature__arity(var_msignature
);
4268 var61
= " expected. Signature is ";
4270 var63
= string__NativeString__to_s_with_length(var61
, var62
);
4274 var64
= NEW_array__Array(&type_array__Arraykernel__Object
);
4275 { /* var64 = array_instance Array[Object] */
4277 var66
= NEW_array__NativeArray(var65
, &type_array__NativeArraykernel__Object
);
4278 ((struct instance_array__NativeArray
*)var66
)->values
[0] = (val
*) var48
;
4279 var67
= BOX_kernel__Int(var52
); /* autobox from Int to Object */
4280 ((struct instance_array__NativeArray
*)var66
)->values
[1] = (val
*) var67
;
4281 ((struct instance_array__NativeArray
*)var66
)->values
[2] = (val
*) var54
;
4282 var68
= BOX_kernel__Int(var58
); /* autobox from Int to Object */
4283 ((struct instance_array__NativeArray
*)var66
)->values
[3] = (val
*) var68
;
4284 ((struct instance_array__NativeArray
*)var66
)->values
[4] = (val
*) var60
;
4285 ((struct instance_array__NativeArray
*)var66
)->values
[5] = (val
*) var_mpropdef
;
4286 ((struct instance_array__NativeArray
*)var66
)->values
[6] = (val
*) var_msignature
;
4288 ((void (*)(val
*, val
*, long))(var64
->class->vft
[COLOR_array__Array__with_native
]))(var64
, var66
, var65
) /* with_native on <var64:Array[Object]>*/;
4292 var69
= ((val
* (*)(val
*))(var64
->class->vft
[COLOR_string__Object__to_s
]))(var64
) /* to_s on <var64:Array[Object]>*/;
4295 modelbuilder__ModelBuilder__error(var_modelbuilder
, var_node
, var69
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
4301 { /* Inline model#MSignature#return_mtype (var_msignature) on <var_msignature:nullable MSignature(MSignature)> */
4302 var72
= var_msignature
->attrs
[COLOR_model__MSignature___return_mtype
].val
; /* _return_mtype on <var_msignature:nullable MSignature(MSignature)> */
4304 RET_LABEL71
:(void)0;
4307 var_precursor_ret_type
= var70
;
4309 { /* Inline model#MSignature#return_mtype (var_mysignature) on <var_mysignature:nullable MSignature(MSignature)> */
4310 var75
= var_mysignature
->attrs
[COLOR_model__MSignature___return_mtype
].val
; /* _return_mtype on <var_mysignature:nullable MSignature(MSignature)> */
4312 RET_LABEL74
:(void)0;
4315 var_ret_type
= var73
;
4317 if (var_ret_type
== NULL
) {
4318 var78
= 0; /* is null */
4320 var78
= 1; /* arg is null and recv is not */
4323 { /* Inline kernel#Object#!= (var_ret_type,var77) on <var_ret_type:nullable MType> */
4324 var_other44
= var77
;
4326 var82
= ((short int (*)(val
*, val
*))(var_ret_type
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_ret_type
, var_other44
) /* == on <var_ret_type:nullable MType(MType)>*/;
4332 RET_LABEL80
:(void)0;
4339 if (var_precursor_ret_type
== NULL
) {
4340 var85
= 1; /* is null */
4342 var85
= 0; /* arg is null but recv is not */
4345 { /* Inline kernel#Object#== (var_precursor_ret_type,var84) on <var_precursor_ret_type:nullable MType> */
4348 { /* Inline kernel#Object#is_same_instance (var_precursor_ret_type,var_other) on <var_precursor_ret_type:nullable MType(MType)> */
4349 var90
= var_precursor_ret_type
== var_other
;
4352 RET_LABEL89
:(void)0;
4357 RET_LABEL87
:(void)0;
4367 if (var_nsig
== NULL
) {
4368 var92
= 0; /* is null */
4370 var92
= 1; /* arg is null and recv is not */
4373 { /* Inline kernel#Object#!= (var_nsig,var91) on <var_nsig:nullable AType> */
4374 var_other44
= var91
;
4376 var96
= ((short int (*)(val
*, val
*))(var_nsig
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nsig
, var_other44
) /* == on <var_nsig:nullable AType(AType)>*/;
4382 RET_LABEL94
:(void)0;
4387 var_node98
= var_nsig
;
4394 var101
= "Redef Error: ";
4396 var103
= string__NativeString__to_s_with_length(var101
, var102
);
4401 { /* Inline model#MPropDef#mproperty (var_mpropdef) on <var_mpropdef:MMethodDef> */
4402 var106
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mproperty
].val
; /* _mproperty on <var_mpropdef:MMethodDef> */
4403 if (unlikely(var106
== NULL
)) {
4404 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
4405 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1882);
4409 RET_LABEL105
:(void)0;
4413 var108
= varonce107
;
4415 var109
= " is a procedure, not a function.";
4417 var111
= string__NativeString__to_s_with_length(var109
, var110
);
4419 varonce107
= var108
;
4421 var112
= NEW_array__Array(&type_array__Arraykernel__Object
);
4422 { /* var112 = array_instance Array[Object] */
4424 var114
= NEW_array__NativeArray(var113
, &type_array__NativeArraykernel__Object
);
4425 ((struct instance_array__NativeArray
*)var114
)->values
[0] = (val
*) var100
;
4426 ((struct instance_array__NativeArray
*)var114
)->values
[1] = (val
*) var104
;
4427 ((struct instance_array__NativeArray
*)var114
)->values
[2] = (val
*) var108
;
4429 ((void (*)(val
*, val
*, long))(var112
->class->vft
[COLOR_array__Array__with_native
]))(var112
, var114
, var113
) /* with_native on <var112:Array[Object]>*/;
4433 var115
= ((val
* (*)(val
*))(var112
->class->vft
[COLOR_string__Object__to_s
]))(var112
) /* to_s on <var112:Array[Object]>*/;
4436 modelbuilder__ModelBuilder__error(var_modelbuilder
, var_node98
, var115
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
4442 var116
= model__MSignature__arity(var_mysignature
);
4446 { /* Inline kernel#Int#> (var116,var117) on <var116:Int> */
4447 /* Covariant cast for argument 0 (i) <var117:Int> isa OTHER */
4448 /* <var117:Int> isa OTHER */
4449 var120
= 1; /* easy <var117:Int> isa OTHER*/
4450 if (unlikely(!var120
)) {
4451 var_class_name
= type_kernel__Int
.name
;
4452 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
4453 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 327);
4456 var121
= var116
> var117
;
4459 RET_LABEL119
:(void)0;
4463 var122
= NEW_range__Range(&type_range__Rangekernel__Int
);
4466 var124
= model__MSignature__arity(var_mysignature
);
4469 var125
= BOX_kernel__Int(var123
); /* autobox from Int to Discrete */
4470 var126
= BOX_kernel__Int(var124
); /* autobox from Int to Discrete */
4471 range__Range__without_last(var122
, var125
, var126
); /* Direct call range#Range#without_last on <var122:Range[Int]>*/
4474 var127
= range__Range__iterator(var122
);
4478 var128
= ((short int (*)(val
*))(var127
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var127
) /* is_ok on <var127:Iterator[Discrete]>*/;
4482 var129
= ((val
* (*)(val
*))(var127
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var127
) /* item on <var127:Iterator[Discrete]>*/;
4484 var130
= ((struct instance_kernel__Int
*)var129
)->value
; /* autounbox from nullable Object to Int */;
4487 { /* Inline model#MSignature#mparameters (var_mysignature) on <var_mysignature:nullable MSignature(MSignature)> */
4488 var133
= var_mysignature
->attrs
[COLOR_model__MSignature___mparameters
].val
; /* _mparameters on <var_mysignature:nullable MSignature(MSignature)> */
4489 if (unlikely(var133
== NULL
)) {
4490 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mparameters");
4491 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1452);
4495 RET_LABEL132
:(void)0;
4499 var134
= array__Array___91d_93d(var131
, var_i
);
4502 { /* Inline model#MParameter#mtype (var134) on <var134:nullable Object(MParameter)> */
4503 var137
= var134
->attrs
[COLOR_model__MParameter___mtype
].val
; /* _mtype on <var134:nullable Object(MParameter)> */
4504 if (unlikely(var137
== NULL
)) {
4505 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mtype");
4506 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1552);
4510 RET_LABEL136
:(void)0;
4515 { /* Inline model#MSignature#mparameters (var_msignature) on <var_msignature:nullable MSignature(MSignature)> */
4516 var140
= var_msignature
->attrs
[COLOR_model__MSignature___mparameters
].val
; /* _mparameters on <var_msignature:nullable MSignature(MSignature)> */
4517 if (unlikely(var140
== NULL
)) {
4518 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mparameters");
4519 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1452);
4523 RET_LABEL139
:(void)0;
4527 var141
= array__Array___91d_93d(var138
, var_i
);
4530 { /* Inline model#MParameter#mtype (var141) on <var141:nullable Object(MParameter)> */
4531 var144
= var141
->attrs
[COLOR_model__MParameter___mtype
].val
; /* _mtype on <var141:nullable Object(MParameter)> */
4532 if (unlikely(var144
== NULL
)) {
4533 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mtype");
4534 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1552);
4538 RET_LABEL143
:(void)0;
4543 { /* Inline model#MClassDef#bound_mtype (var_mclassdef) on <var_mclassdef:MClassDef> */
4544 var148
= var_mclassdef
->attrs
[COLOR_model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var_mclassdef:MClassDef> */
4545 if (unlikely(var148
== NULL
)) {
4546 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
4547 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 477);
4551 RET_LABEL147
:(void)0;
4555 var149
= model__MType__is_subtype(var_myt
, var_mmodule
, var146
, var_prt
);
4563 { /* Inline model#MClassDef#bound_mtype (var_mclassdef) on <var_mclassdef:MClassDef> */
4564 var154
= var_mclassdef
->attrs
[COLOR_model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var_mclassdef:MClassDef> */
4565 if (unlikely(var154
== NULL
)) {
4566 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
4567 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 477);
4571 RET_LABEL153
:(void)0;
4575 var155
= model__MType__is_subtype(var_prt
, var_mmodule
, var152
, var_myt
);
4582 if (var_nsig
== NULL
) {
4583 var158
= 0; /* is null */
4585 var158
= 1; /* arg is null and recv is not */
4588 { /* Inline kernel#Object#!= (var_nsig,var157) on <var_nsig:nullable AType> */
4589 var_other44
= var157
;
4591 var162
= ((short int (*)(val
*, val
*))(var_nsig
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nsig
, var_other44
) /* == on <var_nsig:nullable AType(AType)>*/;
4597 RET_LABEL160
:(void)0;
4602 var_node164
= var_nsig
;
4607 var166
= varonce165
;
4609 var167
= "Redef Error: Wrong type for parameter `";
4611 var169
= string__NativeString__to_s_with_length(var167
, var168
);
4613 varonce165
= var166
;
4616 { /* Inline model#MSignature#mparameters (var_mysignature) on <var_mysignature:nullable MSignature(MSignature)> */
4617 var172
= var_mysignature
->attrs
[COLOR_model__MSignature___mparameters
].val
; /* _mparameters on <var_mysignature:nullable MSignature(MSignature)> */
4618 if (unlikely(var172
== NULL
)) {
4619 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mparameters");
4620 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1452);
4624 RET_LABEL171
:(void)0;
4628 var173
= array__Array___91d_93d(var170
, var_i
);
4631 { /* Inline model#MParameter#name (var173) on <var173:nullable Object(MParameter)> */
4632 var176
= var173
->attrs
[COLOR_model__MParameter___name
].val
; /* _name on <var173:nullable Object(MParameter)> */
4633 if (unlikely(var176
== NULL
)) {
4634 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _name");
4635 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1549);
4639 RET_LABEL175
:(void)0;
4643 var178
= varonce177
;
4645 var179
= "\'. found ";
4647 var181
= string__NativeString__to_s_with_length(var179
, var180
);
4649 varonce177
= var178
;
4652 var183
= varonce182
;
4654 var184
= ", expected ";
4656 var186
= string__NativeString__to_s_with_length(var184
, var185
);
4658 varonce182
= var183
;
4661 var188
= varonce187
;
4665 var191
= string__NativeString__to_s_with_length(var189
, var190
);
4667 varonce187
= var188
;
4669 var192
= NEW_array__Array(&type_array__Arraykernel__Object
);
4670 { /* var192 = array_instance Array[Object] */
4672 var194
= NEW_array__NativeArray(var193
, &type_array__NativeArraykernel__Object
);
4673 ((struct instance_array__NativeArray
*)var194
)->values
[0] = (val
*) var166
;
4674 ((struct instance_array__NativeArray
*)var194
)->values
[1] = (val
*) var174
;
4675 ((struct instance_array__NativeArray
*)var194
)->values
[2] = (val
*) var178
;
4676 ((struct instance_array__NativeArray
*)var194
)->values
[3] = (val
*) var_myt
;
4677 ((struct instance_array__NativeArray
*)var194
)->values
[4] = (val
*) var183
;
4678 ((struct instance_array__NativeArray
*)var194
)->values
[5] = (val
*) var_prt
;
4679 ((struct instance_array__NativeArray
*)var194
)->values
[6] = (val
*) var188
;
4681 ((void (*)(val
*, val
*, long))(var192
->class->vft
[COLOR_array__Array__with_native
]))(var192
, var194
, var193
) /* with_native on <var192:Array[Object]>*/;
4685 var195
= ((val
* (*)(val
*))(var192
->class->vft
[COLOR_string__Object__to_s
]))(var192
) /* to_s on <var192:Array[Object]>*/;
4688 modelbuilder__ModelBuilder__error(var_modelbuilder
, var_node164
, var195
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
4692 CONTINUE_label
: (void)0;
4694 ((void (*)(val
*))(var127
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var127
) /* next on <var127:Iterator[Discrete]>*/;
4697 BREAK_label
: (void)0;
4701 if (var_precursor_ret_type
== NULL
) {
4702 var197
= 0; /* is null */
4704 var197
= 1; /* arg is null and recv is not */
4707 { /* Inline kernel#Object#!= (var_precursor_ret_type,var196) on <var_precursor_ret_type:nullable MType> */
4708 var_other44
= var196
;
4710 var201
= ((short int (*)(val
*, val
*))(var_precursor_ret_type
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_precursor_ret_type
, var_other44
) /* == on <var_precursor_ret_type:nullable MType(MType)>*/;
4716 RET_LABEL199
:(void)0;
4722 if (var_ret_type
== NULL
) {
4723 var204
= 1; /* is null */
4725 var204
= 0; /* arg is null but recv is not */
4728 { /* Inline kernel#Object#== (var_ret_type,var203) on <var_ret_type:nullable MType> */
4731 { /* Inline kernel#Object#is_same_instance (var_ret_type,var_other) on <var_ret_type:nullable MType(MType)> */
4732 var209
= var_ret_type
== var_other
;
4735 RET_LABEL208
:(void)0;
4740 RET_LABEL206
:(void)0;
4745 var_ret_type
= var_precursor_ret_type
;
4748 { /* Inline model#MClassDef#bound_mtype (var_mclassdef) on <var_mclassdef:MClassDef> */
4749 var212
= var_mclassdef
->attrs
[COLOR_model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var_mclassdef:MClassDef> */
4750 if (unlikely(var212
== NULL
)) {
4751 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
4752 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 477);
4756 RET_LABEL211
:(void)0;
4760 var213
= model__MType__is_subtype(var_ret_type
, var_mmodule
, var210
, var_precursor_ret_type
);
4765 if (var_nsig
== NULL
) {
4766 var216
= 0; /* is null */
4768 var216
= 1; /* arg is null and recv is not */
4771 { /* Inline kernel#Object#!= (var_nsig,var215) on <var_nsig:nullable AType> */
4772 var_other44
= var215
;
4774 var220
= ((short int (*)(val
*, val
*))(var_nsig
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_nsig
, var_other44
) /* == on <var_nsig:nullable AType(AType)>*/;
4780 RET_LABEL218
:(void)0;
4785 var_node222
= var_nsig
;
4790 var224
= varonce223
;
4792 var225
= "Redef Error: Wrong return type. found ";
4794 var227
= string__NativeString__to_s_with_length(var225
, var226
);
4796 varonce223
= var224
;
4799 var229
= varonce228
;
4801 var230
= ", expected ";
4803 var232
= string__NativeString__to_s_with_length(var230
, var231
);
4805 varonce228
= var229
;
4808 var234
= varonce233
;
4812 var237
= string__NativeString__to_s_with_length(var235
, var236
);
4814 varonce233
= var234
;
4816 var238
= NEW_array__Array(&type_array__Arraykernel__Object
);
4817 { /* var238 = array_instance Array[Object] */
4819 var240
= NEW_array__NativeArray(var239
, &type_array__NativeArraykernel__Object
);
4820 ((struct instance_array__NativeArray
*)var240
)->values
[0] = (val
*) var224
;
4821 ((struct instance_array__NativeArray
*)var240
)->values
[1] = (val
*) var_ret_type
;
4822 ((struct instance_array__NativeArray
*)var240
)->values
[2] = (val
*) var229
;
4823 ((struct instance_array__NativeArray
*)var240
)->values
[3] = (val
*) var_precursor_ret_type
;
4824 ((struct instance_array__NativeArray
*)var240
)->values
[4] = (val
*) var234
;
4826 ((void (*)(val
*, val
*, long))(var238
->class->vft
[COLOR_array__Array__with_native
]))(var238
, var240
, var239
) /* with_native on <var238:Array[Object]>*/;
4830 var241
= ((val
* (*)(val
*))(var238
->class->vft
[COLOR_string__Object__to_s
]))(var238
) /* to_s on <var238:Array[Object]>*/;
4833 modelbuilder__ModelBuilder__error(var_modelbuilder
, var_node222
, var241
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
4844 /* method modelize_property#AAttrPropdef#check_method_signature for (self: Object, ModelBuilder, MMethodDef) */
4845 void VIRTUAL_modelize_property__AAttrPropdef__check_method_signature(val
* self
, val
* p0
, val
* p1
) {
4846 modelize_property__AAttrPropdef__check_method_signature(self
, p0
, p1
); /* Direct call modelize_property#AAttrPropdef#check_method_signature on <self:Object(AAttrPropdef)>*/
4849 /* method modelize_property#ATypePropdef#build_property for (self: ATypePropdef, ModelBuilder, MClassDef) */
4850 void modelize_property__ATypePropdef__build_property(val
* self
, val
* p0
, val
* p1
) {
4851 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
4852 val
* var_mclassdef
/* var mclassdef: MClassDef */;
4853 val
* var
/* : TClassid */;
4854 val
* var1
/* : String */;
4855 val
* var_name
/* var name: String */;
4856 val
* var2
/* : TClassid */;
4857 val
* var3
/* : nullable MProperty */;
4858 val
* var_mprop
/* var mprop: nullable MProperty */;
4859 val
* var4
/* : null */;
4860 short int var5
/* : Bool */;
4861 short int var6
/* : Bool */;
4862 val
* var_other
/* var other: nullable Object */;
4863 short int var8
/* : Bool */;
4864 short int var10
/* : Bool */;
4865 val
* var11
/* : nullable AVisibility */;
4866 val
* var12
/* : MVisibility */;
4867 val
* var_mvisibility
/* var mvisibility: MVisibility */;
4868 val
* var13
/* : MVirtualTypeProp */;
4869 val
* var14
/* : SequenceRead[Char] */;
4870 val
* var16
/* : SequenceRead[Char] */;
4871 val
* var17
/* : Iterator[nullable Object] */;
4872 short int var18
/* : Bool */;
4873 val
* var19
/* : nullable Object */;
4874 char var_c
/* var c: Char */;
4875 char var20
/* : Char */;
4876 short int var21
/* : Bool */;
4877 char var22
/* : Char */;
4878 short int var23
/* : Bool */;
4879 short int var25
/* : Bool */;
4882 const char* var_class_name
;
4883 short int var26
/* : Bool */;
4884 short int var_
/* var : Bool */;
4885 char var27
/* : Char */;
4886 short int var28
/* : Bool */;
4887 short int var30
/* : Bool */;
4890 const char* var_class_name33
;
4891 short int var34
/* : Bool */;
4892 val
* var35
/* : TClassid */;
4893 static val
* varonce
;
4894 val
* var36
/* : String */;
4895 char* var37
/* : NativeString */;
4896 long var38
/* : Int */;
4897 val
* var39
/* : FlatString */;
4898 val
* var40
/* : Array[Object] */;
4899 long var41
/* : Int */;
4900 val
* var42
/* : NativeArray[Object] */;
4901 val
* var43
/* : String */;
4902 val
* var44
/* : nullable TKwredef */;
4903 short int var45
/* : Bool */;
4904 short int var46
/* : Bool */;
4905 short int var47
/* : Bool */;
4906 val
* var48
/* : nullable TKwredef */;
4907 short int var49
/* : Bool */;
4908 short int var50
/* : Bool */;
4909 short int var51
/* : Bool */;
4910 short int var52
/* : Bool */;
4913 val
* var55
/* : nullable AVisibility */;
4914 val
* var56
/* : Map[MProperty, APropdef] */;
4915 val
* var58
/* : Map[MProperty, APropdef] */;
4916 val
* var59
/* : MVirtualTypeDef */;
4917 val
* var60
/* : Location */;
4918 val
* var_mpropdef
/* var mpropdef: MVirtualTypeDef */;
4919 short int var61
/* : Bool */;
4922 const struct type
* type_struct
;
4923 const char* var_class_name64
;
4924 short int var66
/* : Bool */;
4927 const struct type
* type_struct69
;
4928 const char* var_class_name70
;
4929 val
* var71
/* : HashMap[MPropDef, APropdef] */;
4930 val
* var73
/* : HashMap[MPropDef, APropdef] */;
4931 static val
* varonce74
;
4932 val
* var75
/* : String */;
4933 char* var76
/* : NativeString */;
4934 long var77
/* : Int */;
4935 val
* var78
/* : FlatString */;
4936 val
* var79
/* : nullable AAnnotation */;
4937 val
* var_atfixed
/* var atfixed: nullable AAnnotation */;
4938 val
* var80
/* : null */;
4939 short int var81
/* : Bool */;
4940 short int var82
/* : Bool */;
4941 val
* var_other84
/* var other: nullable Object */;
4942 short int var85
/* : Bool */;
4943 short int var86
/* : Bool */;
4944 short int var87
/* : Bool */;
4945 short int var88
/* : Bool */;
4946 var_modelbuilder
= p0
;
4949 var
= parser_nodes__ATypePropdef__n_id(self
);
4952 var1
= lexer_work__Token__text(var
);
4956 var2
= parser_nodes__ATypePropdef__n_id(self
);
4959 var3
= modelbuilder__ModelBuilder__try_get_mproperty_by_name(var_modelbuilder
, var2
, var_mclassdef
, var_name
);
4963 if (var_mprop
== NULL
) {
4964 var5
= 1; /* is null */
4966 var5
= 0; /* arg is null but recv is not */
4969 { /* Inline kernel#Object#== (var_mprop,var4) on <var_mprop:nullable MProperty> */
4972 { /* Inline kernel#Object#is_same_instance (var_mprop,var_other) on <var_mprop:nullable MProperty(MProperty)> */
4973 var10
= var_mprop
== var_other
;
4987 var11
= parser_nodes__APropdef__n_visibility(self
);
4990 var12
= modelize_property__APropdef__new_property_visibility(self
, var_modelbuilder
, var_mclassdef
, var11
);
4992 var_mvisibility
= var12
;
4993 var13
= NEW_model__MVirtualTypeProp(&type_model__MVirtualTypeProp
);
4995 model__MVirtualTypeProp__init(var13
, var_mclassdef
, var_name
, var_mvisibility
); /* Direct call model#MVirtualTypeProp#init on <var13:MVirtualTypeProp>*/
4999 { /* Inline string#FlatString#chars (var_name) on <var_name:String> */
5000 var16
= var_name
->attrs
[COLOR_string__FlatString___chars
].val
; /* _chars on <var_name:String> */
5001 if (unlikely(var16
== NULL
)) {
5002 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _chars");
5003 PRINT_ERROR(" (%s:%d)\n", "lib/standard/string.nit", 746);
5007 RET_LABEL15
:(void)0;
5011 var17
= ((val
* (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var14
) /* iterator on <var14:SequenceRead[Char]>*/;
5015 var18
= ((short int (*)(val
*))(var17
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var17
) /* is_ok on <var17:Iterator[nullable Object]>*/;
5019 var19
= ((val
* (*)(val
*))(var17
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var17
) /* item on <var17:Iterator[nullable Object]>*/;
5021 var20
= ((struct instance_kernel__Char
*)var19
)->value
; /* autounbox from nullable Object to Char */;
5025 { /* Inline kernel#Char#>= (var_c,var22) on <var_c:Char> */
5026 /* Covariant cast for argument 0 (i) <var22:Char> isa OTHER */
5027 /* <var22:Char> isa OTHER */
5028 var25
= 1; /* easy <var22:Char> isa OTHER*/
5029 if (unlikely(!var25
)) {
5030 var_class_name
= type_kernel__Char
.name
;
5031 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
5032 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 501);
5035 var26
= var_c
>= var22
;
5038 RET_LABEL24
:(void)0;
5045 { /* Inline kernel#Char#<= (var_c,var27) on <var_c:Char> */
5046 /* Covariant cast for argument 0 (i) <var27:Char> isa OTHER */
5047 /* <var27:Char> isa OTHER */
5048 var30
= 1; /* easy <var27:Char> isa OTHER*/
5049 if (unlikely(!var30
)) {
5050 var_class_name33
= type_kernel__Char
.name
;
5051 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name33
);
5052 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 499);
5055 var34
= var_c
<= var27
;
5058 RET_LABEL29
:(void)0;
5067 var35
= parser_nodes__ATypePropdef__n_id(self
);
5072 var37
= "Warning: lowercase in the virtual type ";
5074 var39
= string__NativeString__to_s_with_length(var37
, var38
);
5078 var40
= NEW_array__Array(&type_array__Arraykernel__Object
);
5079 { /* var40 = array_instance Array[Object] */
5081 var42
= NEW_array__NativeArray(var41
, &type_array__NativeArraykernel__Object
);
5082 ((struct instance_array__NativeArray
*)var42
)->values
[0] = (val
*) var36
;
5083 ((struct instance_array__NativeArray
*)var42
)->values
[1] = (val
*) var_name
;
5085 ((void (*)(val
*, val
*, long))(var40
->class->vft
[COLOR_array__Array__with_native
]))(var40
, var42
, var41
) /* with_native on <var40:Array[Object]>*/;
5089 var43
= ((val
* (*)(val
*))(var40
->class->vft
[COLOR_string__Object__to_s
]))(var40
) /* to_s on <var40:Array[Object]>*/;
5092 modelbuilder__ModelBuilder__warning(var_modelbuilder
, var35
, var43
); /* Direct call modelbuilder#ModelBuilder#warning on <var_modelbuilder:ModelBuilder>*/
5097 CONTINUE_label
: (void)0;
5099 ((void (*)(val
*))(var17
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var17
) /* next on <var17:Iterator[nullable Object]>*/;
5102 BREAK_label
: (void)0;
5104 var44
= parser_nodes__APropdef__n_kwredef(self
);
5108 var46
= modelize_property__APropdef__check_redef_keyword(self
, var_modelbuilder
, var_mclassdef
, var44
, var45
, var_mprop
);
5117 var48
= parser_nodes__APropdef__n_kwredef(self
);
5121 var50
= modelize_property__APropdef__check_redef_keyword(self
, var_modelbuilder
, var_mclassdef
, var48
, var49
, var_mprop
);
5128 /* <var_mprop:nullable MProperty(MProperty)> isa MVirtualTypeProp */
5129 cltype53
= type_model__MVirtualTypeProp
.color
;
5130 idtype54
= type_model__MVirtualTypeProp
.id
;
5131 if(cltype53
>= var_mprop
->type
->table_size
) {
5134 var52
= var_mprop
->type
->type_table
[cltype53
] == idtype54
;
5136 if (unlikely(!var52
)) {
5137 PRINT_ERROR("Runtime error: %s", "Assert failed");
5138 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 995);
5142 var55
= parser_nodes__APropdef__n_visibility(self
);
5145 modelize_property__APropdef__check_redef_property_visibility(self
, var_modelbuilder
, var55
, var_mprop
); /* Direct call modelize_property#APropdef#check_redef_property_visibility on <self:ATypePropdef>*/
5149 { /* Inline modelize_property#MClassDef#mprop2npropdef (var_mclassdef) on <var_mclassdef:MClassDef> */
5150 var58
= var_mclassdef
->attrs
[COLOR_modelize_property__MClassDef___mprop2npropdef
].val
; /* _mprop2npropdef on <var_mclassdef:MClassDef> */
5151 if (unlikely(var58
== NULL
)) {
5152 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mprop2npropdef");
5153 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 252);
5157 RET_LABEL57
:(void)0;
5161 ((void (*)(val
*, val
*, val
*))(var56
->class->vft
[COLOR_abstract_collection__Map___91d_93d_61d
]))(var56
, var_mprop
, self
) /* []= on <var56:Map[MProperty, APropdef]>*/;
5163 var59
= NEW_model__MVirtualTypeDef(&type_model__MVirtualTypeDef
);
5165 var60
= parser_nodes__ANode__location(self
);
5168 model__MVirtualTypeDef__init(var59
, var_mclassdef
, var_mprop
, var60
); /* Direct call model#MVirtualTypeDef#init on <var59:MVirtualTypeDef>*/
5170 var_mpropdef
= var59
;
5171 /* <var_mpropdef:MVirtualTypeDef> isa nullable MPROPDEF */
5172 type_struct
= self
->type
->resolution_table
->types
[COLOR_nullable_parser_nodes__APropdef_VTMPROPDEF
];
5173 cltype62
= type_struct
->color
;
5174 idtype63
= type_struct
->id
;
5175 if(cltype62
>= var_mpropdef
->type
->table_size
) {
5178 var61
= var_mpropdef
->type
->type_table
[cltype62
] == idtype63
;
5180 if (unlikely(!var61
)) {
5181 var_class_name64
= var_mpropdef
== NULL ?
"null" : var_mpropdef
->type
->name
;
5182 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable MPROPDEF", var_class_name64
);
5183 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 1001);
5187 { /* Inline modelize_property#APropdef#mpropdef= (self,var_mpropdef) on <self:ATypePropdef> */
5188 /* Covariant cast for argument 0 (mpropdef) <var_mpropdef:MVirtualTypeDef> isa nullable MPROPDEF */
5189 /* <var_mpropdef:MVirtualTypeDef> isa nullable MPROPDEF */
5190 type_struct69
= self
->type
->resolution_table
->types
[COLOR_nullable_parser_nodes__APropdef_VTMPROPDEF
];
5191 cltype67
= type_struct69
->color
;
5192 idtype68
= type_struct69
->id
;
5193 if(cltype67
>= var_mpropdef
->type
->table_size
) {
5196 var66
= var_mpropdef
->type
->type_table
[cltype67
] == idtype68
;
5198 if (unlikely(!var66
)) {
5199 var_class_name70
= var_mpropdef
== NULL ?
"null" : var_mpropdef
->type
->name
;
5200 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable MPROPDEF", var_class_name70
);
5201 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 283);
5204 self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
= var_mpropdef
; /* _mpropdef on <self:ATypePropdef> */
5205 RET_LABEL65
:(void)0;
5209 { /* Inline modelize_property#ModelBuilder#mpropdef2npropdef (var_modelbuilder) on <var_modelbuilder:ModelBuilder> */
5210 var73
= var_modelbuilder
->attrs
[COLOR_modelize_property__ModelBuilder___mpropdef2npropdef
].val
; /* _mpropdef2npropdef on <var_modelbuilder:ModelBuilder> */
5211 if (unlikely(var73
== NULL
)) {
5212 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mpropdef2npropdef");
5213 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 39);
5217 RET_LABEL72
:(void)0;
5221 hash_collection__HashMap___91d_93d_61d(var71
, var_mpropdef
, self
); /* Direct call hash_collection#HashMap#[]= on <var71:HashMap[MPropDef, APropdef]>*/
5224 modelize_property__APropdef__set_doc(self
, var_mpropdef
); /* Direct call modelize_property#APropdef#set_doc on <self:ATypePropdef>*/
5231 var78
= string__NativeString__to_s_with_length(var76
, var77
);
5236 var79
= annotation__Prod__get_single_annotation(self
, var75
, var_modelbuilder
);
5238 var_atfixed
= var79
;
5240 if (var_atfixed
== NULL
) {
5241 var81
= 0; /* is null */
5243 var81
= 1; /* arg is null and recv is not */
5246 { /* Inline kernel#Object#!= (var_atfixed,var80) on <var_atfixed:nullable AAnnotation> */
5247 var_other84
= var80
;
5249 var86
= ((short int (*)(val
*, val
*))(var_atfixed
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_atfixed
, var_other84
) /* == on <var_atfixed:nullable AAnnotation(AAnnotation)>*/;
5255 RET_LABEL83
:(void)0;
5262 { /* Inline model#MVirtualTypeDef#is_fixed= (var_mpropdef,var88) on <var_mpropdef:MVirtualTypeDef> */
5263 var_mpropdef
->attrs
[COLOR_model__MVirtualTypeDef___is_fixed
].s
= var88
; /* _is_fixed on <var_mpropdef:MVirtualTypeDef> */
5264 RET_LABEL89
:(void)0;
5271 /* method modelize_property#ATypePropdef#build_property for (self: Object, ModelBuilder, MClassDef) */
5272 void VIRTUAL_modelize_property__ATypePropdef__build_property(val
* self
, val
* p0
, val
* p1
) {
5273 modelize_property__ATypePropdef__build_property(self
, p0
, p1
); /* Direct call modelize_property#ATypePropdef#build_property on <self:Object(ATypePropdef)>*/
5276 /* method modelize_property#ATypePropdef#build_signature for (self: ATypePropdef, ModelBuilder) */
5277 void modelize_property__ATypePropdef__build_signature(val
* self
, val
* p0
) {
5278 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
5279 val
* var
/* : nullable MPropDef */;
5280 val
* var2
/* : nullable MPropDef */;
5281 val
* var_mpropdef
/* var mpropdef: nullable MVirtualTypeDef */;
5282 val
* var3
/* : null */;
5283 short int var4
/* : Bool */;
5284 short int var5
/* : Bool */;
5285 val
* var_other
/* var other: nullable Object */;
5286 short int var7
/* : Bool */;
5287 short int var9
/* : Bool */;
5288 val
* var10
/* : MClassDef */;
5289 val
* var12
/* : MClassDef */;
5290 val
* var_mclassdef
/* var mclassdef: MClassDef */;
5291 val
* var13
/* : MModule */;
5292 val
* var15
/* : MModule */;
5293 val
* var_mmodule
/* var mmodule: MModule */;
5294 val
* var16
/* : null */;
5295 val
* var_mtype
/* var mtype: nullable MType */;
5296 val
* var17
/* : AType */;
5297 val
* var_ntype
/* var ntype: AType */;
5298 val
* var18
/* : nullable MType */;
5299 val
* var19
/* : null */;
5300 short int var20
/* : Bool */;
5301 short int var21
/* : Bool */;
5302 short int var23
/* : Bool */;
5303 short int var25
/* : Bool */;
5304 var_modelbuilder
= p0
;
5306 { /* Inline modelize_property#APropdef#mpropdef (self) on <self:ATypePropdef> */
5307 var2
= self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
; /* _mpropdef on <self:ATypePropdef> */
5314 if (var_mpropdef
== NULL
) {
5315 var4
= 1; /* is null */
5317 var4
= 0; /* arg is null but recv is not */
5320 { /* Inline kernel#Object#== (var_mpropdef,var3) on <var_mpropdef:nullable MVirtualTypeDef> */
5323 { /* Inline kernel#Object#is_same_instance (var_mpropdef,var_other) on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5324 var9
= var_mpropdef
== var_other
;
5341 { /* Inline model#MPropDef#mclassdef (var_mpropdef) on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5342 var12
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5343 if (unlikely(var12
== NULL
)) {
5344 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
5345 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1879);
5349 RET_LABEL11
:(void)0;
5352 var_mclassdef
= var10
;
5354 { /* Inline model#MClassDef#mmodule (var_mclassdef) on <var_mclassdef:MClassDef> */
5355 var15
= var_mclassdef
->attrs
[COLOR_model__MClassDef___mmodule
].val
; /* _mmodule on <var_mclassdef:MClassDef> */
5356 if (unlikely(var15
== NULL
)) {
5357 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
5358 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 471);
5362 RET_LABEL14
:(void)0;
5365 var_mmodule
= var13
;
5369 var17
= parser_nodes__ATypePropdef__n_type(self
);
5373 var18
= modelize_class__ModelBuilder__resolve_mtype(var_modelbuilder
, var_mmodule
, var_mclassdef
, var_ntype
);
5377 if (var_mtype
== NULL
) {
5378 var20
= 1; /* is null */
5380 var20
= 0; /* arg is null but recv is not */
5383 { /* Inline kernel#Object#== (var_mtype,var19) on <var_mtype:nullable MType> */
5386 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
5387 var25
= var_mtype
== var_other
;
5390 RET_LABEL24
:(void)0;
5395 RET_LABEL22
:(void)0;
5404 { /* Inline model#MVirtualTypeDef#bound= (var_mpropdef,var_mtype) on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5405 var_mpropdef
->attrs
[COLOR_model__MVirtualTypeDef___bound
].val
= var_mtype
; /* _bound on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5406 RET_LABEL26
:(void)0;
5411 /* method modelize_property#ATypePropdef#build_signature for (self: Object, ModelBuilder) */
5412 void VIRTUAL_modelize_property__ATypePropdef__build_signature(val
* self
, val
* p0
) {
5413 modelize_property__ATypePropdef__build_signature(self
, p0
); /* Direct call modelize_property#ATypePropdef#build_signature on <self:Object(ATypePropdef)>*/
5416 /* method modelize_property#ATypePropdef#check_signature for (self: ATypePropdef, ModelBuilder) */
5417 void modelize_property__ATypePropdef__check_signature(val
* self
, val
* p0
) {
5418 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
5419 val
* var
/* : nullable MPropDef */;
5420 val
* var2
/* : nullable MPropDef */;
5421 val
* var_mpropdef
/* var mpropdef: nullable MVirtualTypeDef */;
5422 val
* var3
/* : null */;
5423 short int var4
/* : Bool */;
5424 short int var5
/* : Bool */;
5425 val
* var_other
/* var other: nullable Object */;
5426 short int var7
/* : Bool */;
5427 short int var9
/* : Bool */;
5428 val
* var10
/* : nullable MPropDef */;
5429 val
* var12
/* : nullable MPropDef */;
5430 val
* var13
/* : nullable MType */;
5431 val
* var15
/* : nullable MType */;
5432 val
* var_bound
/* var bound: nullable MType */;
5433 val
* var16
/* : null */;
5434 short int var17
/* : Bool */;
5435 short int var18
/* : Bool */;
5436 short int var20
/* : Bool */;
5437 short int var22
/* : Bool */;
5438 val
* var23
/* : AType */;
5439 val
* var24
/* : MClassDef */;
5440 val
* var26
/* : MClassDef */;
5441 val
* var_mclassdef
/* var mclassdef: MClassDef */;
5442 val
* var27
/* : MModule */;
5443 val
* var29
/* : MModule */;
5444 val
* var_mmodule
/* var mmodule: MModule */;
5445 val
* var30
/* : MClassType */;
5446 val
* var32
/* : MClassType */;
5447 val
* var_anchor
/* var anchor: MClassType */;
5448 short int var33
/* : Bool */;
5451 val
* var34
/* : Array[MVirtualType] */;
5452 long var35
/* : Int */;
5453 val
* var_
/* var : Array[MVirtualType] */;
5454 val
* var36
/* : nullable MPropDef */;
5455 val
* var38
/* : nullable MPropDef */;
5456 val
* var39
/* : MProperty */;
5457 val
* var41
/* : MProperty */;
5458 val
* var42
/* : MVirtualType */;
5459 val
* var44
/* : MVirtualType */;
5460 val
* var_seen
/* var seen: Array[MVirtualType] */;
5461 short int var45
/* : Bool */;
5462 static val
* varonce
;
5463 val
* var46
/* : String */;
5464 char* var47
/* : NativeString */;
5465 long var48
/* : Int */;
5466 val
* var49
/* : FlatString */;
5467 static val
* varonce50
;
5468 val
* var51
/* : String */;
5469 char* var52
/* : NativeString */;
5470 long var53
/* : Int */;
5471 val
* var54
/* : FlatString */;
5472 val
* var55
/* : String */;
5473 val
* var56
/* : Array[Object] */;
5474 long var57
/* : Int */;
5475 val
* var58
/* : NativeArray[Object] */;
5476 val
* var59
/* : String */;
5477 val
* var60
/* : MType */;
5478 val
* var_next
/* var next: MType */;
5479 short int var61
/* : Bool */;
5482 short int var64
/* : Bool */;
5483 val
* var65
/* : nullable MType */;
5484 val
* var67
/* : nullable MType */;
5485 val
* var68
/* : MProperty */;
5486 val
* var70
/* : MProperty */;
5487 val
* var71
/* : Array[MPropDef] */;
5488 val
* var72
/* : ArrayIterator[nullable Object] */;
5489 short int var73
/* : Bool */;
5490 val
* var74
/* : nullable Object */;
5491 val
* var_p
/* var p: MVirtualTypeDef */;
5492 val
* var75
/* : nullable MType */;
5493 val
* var77
/* : nullable MType */;
5494 val
* var_supbound
/* var supbound: MType */;
5495 short int var78
/* : Bool */;
5496 short int var80
/* : Bool */;
5497 static val
* varonce81
;
5498 val
* var82
/* : String */;
5499 char* var83
/* : NativeString */;
5500 long var84
/* : Int */;
5501 val
* var85
/* : FlatString */;
5502 val
* var86
/* : MProperty */;
5503 val
* var88
/* : MProperty */;
5504 static val
* varonce89
;
5505 val
* var90
/* : String */;
5506 char* var91
/* : NativeString */;
5507 long var92
/* : Int */;
5508 val
* var93
/* : FlatString */;
5509 val
* var94
/* : MClassDef */;
5510 val
* var96
/* : MClassDef */;
5511 val
* var97
/* : MClass */;
5512 val
* var99
/* : MClass */;
5513 val
* var100
/* : Array[Object] */;
5514 long var101
/* : Int */;
5515 val
* var102
/* : NativeArray[Object] */;
5516 val
* var103
/* : String */;
5517 val
* var105
/* : MClassDef */;
5518 val
* var107
/* : MClassDef */;
5519 val
* var108
/* : MClass */;
5520 val
* var110
/* : MClass */;
5521 val
* var111
/* : MClass */;
5522 val
* var113
/* : MClass */;
5523 short int var114
/* : Bool */;
5524 short int var115
/* : Bool */;
5525 short int var117
/* : Bool */;
5526 short int var119
/* : Bool */;
5527 val
* var120
/* : AType */;
5528 static val
* varonce121
;
5529 val
* var122
/* : String */;
5530 char* var123
/* : NativeString */;
5531 long var124
/* : Int */;
5532 val
* var125
/* : FlatString */;
5533 short int var126
/* : Bool */;
5534 short int var127
/* : Bool */;
5535 val
* var128
/* : AType */;
5536 static val
* varonce129
;
5537 val
* var130
/* : String */;
5538 char* var131
/* : NativeString */;
5539 long var132
/* : Int */;
5540 val
* var133
/* : FlatString */;
5541 static val
* varonce134
;
5542 val
* var135
/* : String */;
5543 char* var136
/* : NativeString */;
5544 long var137
/* : Int */;
5545 val
* var138
/* : FlatString */;
5546 static val
* varonce139
;
5547 val
* var140
/* : String */;
5548 char* var141
/* : NativeString */;
5549 long var142
/* : Int */;
5550 val
* var143
/* : FlatString */;
5551 static val
* varonce144
;
5552 val
* var145
/* : String */;
5553 char* var146
/* : NativeString */;
5554 long var147
/* : Int */;
5555 val
* var148
/* : FlatString */;
5556 val
* var149
/* : Array[Object] */;
5557 long var150
/* : Int */;
5558 val
* var151
/* : NativeArray[Object] */;
5559 val
* var152
/* : String */;
5560 var_modelbuilder
= p0
;
5562 { /* Inline modelize_property#APropdef#mpropdef (self) on <self:ATypePropdef> */
5563 var2
= self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
; /* _mpropdef on <self:ATypePropdef> */
5570 if (var_mpropdef
== NULL
) {
5571 var4
= 1; /* is null */
5573 var4
= 0; /* arg is null but recv is not */
5576 { /* Inline kernel#Object#== (var_mpropdef,var3) on <var_mpropdef:nullable MVirtualTypeDef> */
5579 { /* Inline kernel#Object#is_same_instance (var_mpropdef,var_other) on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5580 var9
= var_mpropdef
== var_other
;
5597 { /* Inline modelize_property#APropdef#mpropdef (self) on <self:ATypePropdef> */
5598 var12
= self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
; /* _mpropdef on <self:ATypePropdef> */
5600 RET_LABEL11
:(void)0;
5603 if (var10
== NULL
) {
5604 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5605 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 1032);
5608 { /* Inline model#MVirtualTypeDef#bound (var10) on <var10:nullable MPropDef(nullable MVirtualTypeDef)> */
5609 if (unlikely(var10
== NULL
)) {
5610 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5611 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1979);
5614 var15
= var10
->attrs
[COLOR_model__MVirtualTypeDef___bound
].val
; /* _bound on <var10:nullable MPropDef(nullable MVirtualTypeDef)> */
5616 RET_LABEL14
:(void)0;
5621 if (var_bound
== NULL
) {
5622 var17
= 1; /* is null */
5624 var17
= 0; /* arg is null but recv is not */
5627 { /* Inline kernel#Object#== (var_bound,var16) on <var_bound:nullable MType> */
5630 { /* Inline kernel#Object#is_same_instance (var_bound,var_other) on <var_bound:nullable MType(MType)> */
5631 var22
= var_bound
== var_other
;
5634 RET_LABEL21
:(void)0;
5639 RET_LABEL19
:(void)0;
5648 var23
= parser_nodes__ATypePropdef__n_type(self
);
5651 modelize_property__ModelBuilder__check_visibility(var_modelbuilder
, var23
, var_bound
, var_mpropdef
); /* Direct call modelize_property#ModelBuilder#check_visibility on <var_modelbuilder:ModelBuilder>*/
5654 { /* Inline model#MPropDef#mclassdef (var_mpropdef) on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5655 var26
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5656 if (unlikely(var26
== NULL
)) {
5657 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
5658 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1879);
5662 RET_LABEL25
:(void)0;
5665 var_mclassdef
= var24
;
5667 { /* Inline model#MClassDef#mmodule (var_mclassdef) on <var_mclassdef:MClassDef> */
5668 var29
= var_mclassdef
->attrs
[COLOR_model__MClassDef___mmodule
].val
; /* _mmodule on <var_mclassdef:MClassDef> */
5669 if (unlikely(var29
== NULL
)) {
5670 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
5671 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 471);
5675 RET_LABEL28
:(void)0;
5678 var_mmodule
= var27
;
5680 { /* Inline model#MClassDef#bound_mtype (var_mclassdef) on <var_mclassdef:MClassDef> */
5681 var32
= var_mclassdef
->attrs
[COLOR_model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var_mclassdef:MClassDef> */
5682 if (unlikely(var32
== NULL
)) {
5683 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
5684 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 477);
5688 RET_LABEL31
:(void)0;
5692 /* <var_bound:nullable MType(MType)> isa MVirtualType */
5693 cltype
= type_model__MVirtualType
.color
;
5694 idtype
= type_model__MVirtualType
.id
;
5695 if(cltype
>= var_bound
->type
->table_size
) {
5698 var33
= var_bound
->type
->type_table
[cltype
] == idtype
;
5701 var34
= NEW_array__Array(&type_array__Arraymodel__MVirtualType
);
5704 array__Array__with_capacity(var34
, var35
); /* Direct call array#Array#with_capacity on <var34:Array[MVirtualType]>*/
5708 { /* Inline modelize_property#APropdef#mpropdef (self) on <self:ATypePropdef> */
5709 var38
= self
->attrs
[COLOR_modelize_property__APropdef___mpropdef
].val
; /* _mpropdef on <self:ATypePropdef> */
5711 RET_LABEL37
:(void)0;
5714 if (var36
== NULL
) {
5715 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5716 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 1044);
5719 { /* Inline model#MPropDef#mproperty (var36) on <var36:nullable MPropDef(nullable MVirtualTypeDef)> */
5720 if (unlikely(var36
== NULL
)) {
5721 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5722 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1882);
5725 var41
= var36
->attrs
[COLOR_model__MPropDef___mproperty
].val
; /* _mproperty on <var36:nullable MPropDef(nullable MVirtualTypeDef)> */
5726 if (unlikely(var41
== NULL
)) {
5727 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
5728 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1882);
5732 RET_LABEL40
:(void)0;
5736 { /* Inline model#MVirtualTypeProp#mvirtualtype (var39) on <var39:MProperty(MVirtualTypeProp)> */
5737 var44
= var39
->attrs
[COLOR_model__MVirtualTypeProp___mvirtualtype
].val
; /* _mvirtualtype on <var39:MProperty(MVirtualTypeProp)> */
5738 if (unlikely(var44
== NULL
)) {
5739 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mvirtualtype");
5740 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1858);
5744 RET_LABEL43
:(void)0;
5748 array__AbstractArray__push(var_
, var42
); /* Direct call array#AbstractArray#push on <var_:Array[MVirtualType]>*/
5753 var45
= array__AbstractArrayRead__has(var_seen
, var_bound
);
5757 array__Array__add(var_seen
, var_bound
); /* Direct call array#Array#add on <var_seen:Array[MVirtualType]>*/
5762 var47
= "Error: circularity of virtual type definition: ";
5764 var49
= string__NativeString__to_s_with_length(var47
, var48
);
5773 var54
= string__NativeString__to_s_with_length(var52
, var53
);
5778 var55
= string__Collection__join(var_seen
, var51
);
5780 var56
= NEW_array__Array(&type_array__Arraykernel__Object
);
5781 { /* var56 = array_instance Array[Object] */
5783 var58
= NEW_array__NativeArray(var57
, &type_array__NativeArraykernel__Object
);
5784 ((struct instance_array__NativeArray
*)var58
)->values
[0] = (val
*) var46
;
5785 ((struct instance_array__NativeArray
*)var58
)->values
[1] = (val
*) var55
;
5787 ((void (*)(val
*, val
*, long))(var56
->class->vft
[COLOR_array__Array__with_native
]))(var56
, var58
, var57
) /* with_native on <var56:Array[Object]>*/;
5791 var59
= ((val
* (*)(val
*))(var56
->class->vft
[COLOR_string__Object__to_s
]))(var56
) /* to_s on <var56:Array[Object]>*/;
5794 modelbuilder__ModelBuilder__error(var_modelbuilder
, self
, var59
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
5800 array__Array__add(var_seen
, var_bound
); /* Direct call array#Array#add on <var_seen:Array[MVirtualType]>*/
5803 var60
= model__MVirtualType__lookup_bound(var_bound
, var_mmodule
, var_anchor
);
5806 /* <var_next:MType> isa MVirtualType */
5807 cltype62
= type_model__MVirtualType
.color
;
5808 idtype63
= type_model__MVirtualType
.id
;
5809 if(cltype62
>= var_next
->type
->table_size
) {
5812 var61
= var_next
->type
->type_table
[cltype62
] == idtype63
;
5819 var_bound
= var_next
;
5820 CONTINUE_label
: (void)0;
5822 BREAK_label
: (void)0;
5826 { /* Inline model#MVirtualTypeDef#bound (var_mpropdef) on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5827 var67
= var_mpropdef
->attrs
[COLOR_model__MVirtualTypeDef___bound
].val
; /* _bound on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5829 RET_LABEL66
:(void)0;
5832 if (unlikely(var65
== NULL
)) {
5833 PRINT_ERROR("Runtime error: %s", "Cast failed");
5834 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 1059);
5839 { /* Inline model#MPropDef#mproperty (var_mpropdef) on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5840 var70
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mproperty
].val
; /* _mproperty on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5841 if (unlikely(var70
== NULL
)) {
5842 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
5843 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1882);
5847 RET_LABEL69
:(void)0;
5851 var71
= model__MProperty__lookup_super_definitions(var68
, var_mmodule
, var_anchor
);
5854 var72
= array__AbstractArrayRead__iterator(var71
);
5858 var73
= array__ArrayIterator__is_ok(var72
);
5862 var74
= array__ArrayIterator__item(var72
);
5866 { /* Inline model#MVirtualTypeDef#bound (var_p) on <var_p:MVirtualTypeDef> */
5867 var77
= var_p
->attrs
[COLOR_model__MVirtualTypeDef___bound
].val
; /* _bound on <var_p:MVirtualTypeDef> */
5869 RET_LABEL76
:(void)0;
5872 if (unlikely(var75
== NULL
)) {
5873 PRINT_ERROR("Runtime error: %s", "Cast failed");
5874 PRINT_ERROR(" (%s:%d)\n", "src/modelize_property.nit", 1061);
5877 var_supbound
= var75
;
5879 { /* Inline model#MVirtualTypeDef#is_fixed (var_p) on <var_p:MVirtualTypeDef> */
5880 var80
= var_p
->attrs
[COLOR_model__MVirtualTypeDef___is_fixed
].s
; /* _is_fixed on <var_p:MVirtualTypeDef> */
5882 RET_LABEL79
:(void)0;
5889 var83
= "Redef Error: Virtual type ";
5891 var85
= string__NativeString__to_s_with_length(var83
, var84
);
5896 { /* Inline model#MPropDef#mproperty (var_mpropdef) on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5897 var88
= var_mpropdef
->attrs
[COLOR_model__MPropDef___mproperty
].val
; /* _mproperty on <var_mpropdef:nullable MVirtualTypeDef(MVirtualTypeDef)> */
5898 if (unlikely(var88
== NULL
)) {
5899 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mproperty");
5900 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1882);
5904 RET_LABEL87
:(void)0;
5910 var91
= " is fixed in super-class ";
5912 var93
= string__NativeString__to_s_with_length(var91
, var92
);
5917 { /* Inline model#MPropDef#mclassdef (var_p) on <var_p:MVirtualTypeDef> */
5918 var96
= var_p
->attrs
[COLOR_model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_p:MVirtualTypeDef> */
5919 if (unlikely(var96
== NULL
)) {
5920 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
5921 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1879);
5925 RET_LABEL95
:(void)0;
5929 { /* Inline model#MClassDef#mclass (var94) on <var94:MClassDef> */
5930 var99
= var94
->attrs
[COLOR_model__MClassDef___mclass
].val
; /* _mclass on <var94:MClassDef> */
5931 if (unlikely(var99
== NULL
)) {
5932 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
5933 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 474);
5937 RET_LABEL98
:(void)0;
5940 var100
= NEW_array__Array(&type_array__Arraykernel__Object
);
5941 { /* var100 = array_instance Array[Object] */
5943 var102
= NEW_array__NativeArray(var101
, &type_array__NativeArraykernel__Object
);
5944 ((struct instance_array__NativeArray
*)var102
)->values
[0] = (val
*) var82
;
5945 ((struct instance_array__NativeArray
*)var102
)->values
[1] = (val
*) var86
;
5946 ((struct instance_array__NativeArray
*)var102
)->values
[2] = (val
*) var90
;
5947 ((struct instance_array__NativeArray
*)var102
)->values
[3] = (val
*) var97
;
5949 ((void (*)(val
*, val
*, long))(var100
->class->vft
[COLOR_array__Array__with_native
]))(var100
, var102
, var101
) /* with_native on <var100:Array[Object]>*/;
5953 var103
= ((val
* (*)(val
*))(var100
->class->vft
[COLOR_string__Object__to_s
]))(var100
) /* to_s on <var100:Array[Object]>*/;
5956 modelbuilder__ModelBuilder__error(var_modelbuilder
, self
, var103
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
5958 goto BREAK_label104
;
5962 { /* Inline model#MPropDef#mclassdef (var_p) on <var_p:MVirtualTypeDef> */
5963 var107
= var_p
->attrs
[COLOR_model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_p:MVirtualTypeDef> */
5964 if (unlikely(var107
== NULL
)) {
5965 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
5966 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1879);
5970 RET_LABEL106
:(void)0;
5974 { /* Inline model#MClassDef#mclass (var105) on <var105:MClassDef> */
5975 var110
= var105
->attrs
[COLOR_model__MClassDef___mclass
].val
; /* _mclass on <var105:MClassDef> */
5976 if (unlikely(var110
== NULL
)) {
5977 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
5978 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 474);
5982 RET_LABEL109
:(void)0;
5986 { /* Inline model#MClassDef#mclass (var_mclassdef) on <var_mclassdef:MClassDef> */
5987 var113
= var_mclassdef
->attrs
[COLOR_model__MClassDef___mclass
].val
; /* _mclass on <var_mclassdef:MClassDef> */
5988 if (unlikely(var113
== NULL
)) {
5989 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
5990 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 474);
5994 RET_LABEL112
:(void)0;
5998 { /* Inline kernel#Object#== (var108,var111) on <var108:MClass> */
6001 { /* Inline kernel#Object#is_same_instance (var108,var_other) on <var108:MClass> */
6002 var119
= var108
== var_other
;
6005 RET_LABEL118
:(void)0;
6010 RET_LABEL116
:(void)0;
6016 var120
= parser_nodes__ATypePropdef__n_type(self
);
6019 var122
= varonce121
;
6021 var123
= "Redef Error: a virtual type cannot be refined.";
6023 var125
= string__NativeString__to_s_with_length(var123
, var124
);
6025 varonce121
= var122
;
6028 modelbuilder__ModelBuilder__warning(var_modelbuilder
, var120
, var122
); /* Direct call modelbuilder#ModelBuilder#warning on <var_modelbuilder:ModelBuilder>*/
6030 goto BREAK_label104
;
6034 var126
= model__MType__is_subtype(var_bound
, var_mmodule
, var_anchor
, var_supbound
);
6039 var128
= parser_nodes__ATypePropdef__n_type(self
);
6042 var130
= varonce129
;
6044 var131
= "Redef Error: Wrong bound type. Found ";
6046 var133
= string__NativeString__to_s_with_length(var131
, var132
);
6048 varonce129
= var130
;
6051 var135
= varonce134
;
6053 var136
= ", expected a subtype of ";
6055 var138
= string__NativeString__to_s_with_length(var136
, var137
);
6057 varonce134
= var135
;
6060 var140
= varonce139
;
6062 var141
= ", as in ";
6064 var143
= string__NativeString__to_s_with_length(var141
, var142
);
6066 varonce139
= var140
;
6069 var145
= varonce144
;
6073 var148
= string__NativeString__to_s_with_length(var146
, var147
);
6075 varonce144
= var145
;
6077 var149
= NEW_array__Array(&type_array__Arraykernel__Object
);
6078 { /* var149 = array_instance Array[Object] */
6080 var151
= NEW_array__NativeArray(var150
, &type_array__NativeArraykernel__Object
);
6081 ((struct instance_array__NativeArray
*)var151
)->values
[0] = (val
*) var130
;
6082 ((struct instance_array__NativeArray
*)var151
)->values
[1] = (val
*) var_bound
;
6083 ((struct instance_array__NativeArray
*)var151
)->values
[2] = (val
*) var135
;
6084 ((struct instance_array__NativeArray
*)var151
)->values
[3] = (val
*) var_supbound
;
6085 ((struct instance_array__NativeArray
*)var151
)->values
[4] = (val
*) var140
;
6086 ((struct instance_array__NativeArray
*)var151
)->values
[5] = (val
*) var_p
;
6087 ((struct instance_array__NativeArray
*)var151
)->values
[6] = (val
*) var145
;
6089 ((void (*)(val
*, val
*, long))(var149
->class->vft
[COLOR_array__Array__with_native
]))(var149
, var151
, var150
) /* with_native on <var149:Array[Object]>*/;
6093 var152
= ((val
* (*)(val
*))(var149
->class->vft
[COLOR_string__Object__to_s
]))(var149
) /* to_s on <var149:Array[Object]>*/;
6096 modelbuilder__ModelBuilder__error(var_modelbuilder
, var128
, var152
); /* Direct call modelbuilder#ModelBuilder#error on <var_modelbuilder:ModelBuilder>*/
6098 goto BREAK_label104
;
6101 CONTINUE_label104
: (void)0;
6103 array__ArrayIterator__next(var72
); /* Direct call array#ArrayIterator#next on <var72:ArrayIterator[nullable Object]>*/
6106 BREAK_label104
: (void)0;
6109 /* method modelize_property#ATypePropdef#check_signature for (self: Object, ModelBuilder) */
6110 void VIRTUAL_modelize_property__ATypePropdef__check_signature(val
* self
, val
* p0
) {
6111 modelize_property__ATypePropdef__check_signature(self
, p0
); /* Direct call modelize_property#ATypePropdef#check_signature on <self:Object(ATypePropdef)>*/