1 #include "nitc__modelbuilder_base.sep.0.h"
2 /* method modelbuilder_base#ToolContext#modelbuilder for (self: ToolContext): ModelBuilder */
3 val
* nitc__modelbuilder_base___ToolContext___modelbuilder(val
* self
) {
4 val
* var
/* : ModelBuilder */;
5 val
* var1
/* : nullable ModelBuilder */;
6 val
* var3
/* : nullable ModelBuilder */;
8 { /* Inline modelbuilder_base#ToolContext#modelbuilder_real (self) on <self:ToolContext> */
9 var3
= self
->attrs
[COLOR_nitc__modelbuilder_base__ToolContext___modelbuilder_real
].val
; /* _modelbuilder_real on <self:ToolContext> */
14 if (unlikely(var1
== NULL
)) {
15 PRINT_ERROR("Runtime error: %s", "Cast failed");
16 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 36);
24 /* method modelbuilder_base#ToolContext#modelbuilder_real for (self: ToolContext): nullable ModelBuilder */
25 val
* nitc__modelbuilder_base___ToolContext___modelbuilder_real(val
* self
) {
26 val
* var
/* : nullable ModelBuilder */;
27 val
* var1
/* : nullable ModelBuilder */;
28 var1
= self
->attrs
[COLOR_nitc__modelbuilder_base__ToolContext___modelbuilder_real
].val
; /* _modelbuilder_real on <self:ToolContext> */
33 /* method modelbuilder_base#ToolContext#modelbuilder_real= for (self: ToolContext, nullable ModelBuilder) */
34 void nitc__modelbuilder_base___ToolContext___modelbuilder_real_61d(val
* self
, val
* p0
) {
35 self
->attrs
[COLOR_nitc__modelbuilder_base__ToolContext___modelbuilder_real
].val
= p0
; /* _modelbuilder_real on <self:ToolContext> */
38 /* method modelbuilder_base#ModelBuilder#model for (self: ModelBuilder): Model */
39 val
* nitc___nitc__ModelBuilder___model(val
* self
) {
40 val
* var
/* : Model */;
41 val
* var1
/* : Model */;
42 var1
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___model
].val
; /* _model on <self:ModelBuilder> */
43 if (unlikely(var1
== NULL
)) {
44 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _model");
45 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 44);
52 /* method modelbuilder_base#ModelBuilder#model= for (self: ModelBuilder, Model) */
53 void nitc___nitc__ModelBuilder___model_61d(val
* self
, val
* p0
) {
54 self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___model
].val
= p0
; /* _model on <self:ModelBuilder> */
57 /* method modelbuilder_base#ModelBuilder#toolcontext for (self: ModelBuilder): ToolContext */
58 val
* nitc___nitc__ModelBuilder___toolcontext(val
* self
) {
59 val
* var
/* : ToolContext */;
60 val
* var1
/* : ToolContext */;
61 var1
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
62 if (unlikely(var1
== NULL
)) {
63 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
64 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 47);
71 /* method modelbuilder_base#ModelBuilder#toolcontext= for (self: ModelBuilder, ToolContext) */
72 void nitc___nitc__ModelBuilder___toolcontext_61d(val
* self
, val
* p0
) {
73 self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___toolcontext
].val
= p0
; /* _toolcontext on <self:ModelBuilder> */
76 /* method modelbuilder_base#ModelBuilder#init for (self: ModelBuilder) */
77 void nitc___nitc__ModelBuilder___core__kernel__Object__init(val
* self
) {
78 val
* var
/* : ToolContext */;
79 val
* var2
/* : ToolContext */;
80 val
* var3
/* : nullable ModelBuilder */;
81 val
* var5
/* : nullable ModelBuilder */;
82 short int var6
/* : Bool */;
83 short int var7
/* : Bool */;
84 val
* var_other
/* var other: nullable Object */;
85 short int var9
/* : Bool */;
86 short int var11
/* : Bool */;
87 val
* var12
/* : ToolContext */;
88 val
* var14
/* : ToolContext */;
90 ((void(*)(val
* self
))(self
->class->vft
[COLOR_nitc___nitc__ModelBuilder___core__kernel__Object__init
]))(self
); /* init on <self:ModelBuilder>*/
93 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
94 var2
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
95 if (unlikely(var2
== NULL
)) {
96 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
97 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 47);
105 { /* Inline modelbuilder_base#ToolContext#modelbuilder_real (var) on <var:ToolContext> */
106 var5
= var
->attrs
[COLOR_nitc__modelbuilder_base__ToolContext___modelbuilder_real
].val
; /* _modelbuilder_real on <var:ToolContext> */
112 var6
= 1; /* is null */
114 var6
= 0; /* arg is null but recv is not */
117 { /* Inline kernel#Object#== (var3,((val*)NULL)) on <var3:nullable ModelBuilder> */
118 var_other
= ((val
*)NULL
);
120 { /* Inline kernel#Object#is_same_instance (var3,var_other) on <var3:nullable ModelBuilder(ModelBuilder)> */
121 var11
= var3
== var_other
;
133 if (unlikely(!var6
)) {
134 PRINT_ERROR("Runtime error: %s", "Assert failed");
135 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 54);
139 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
140 var14
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
141 if (unlikely(var14
== NULL
)) {
142 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
143 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 47);
151 { /* Inline modelbuilder_base#ToolContext#modelbuilder_real= (var12,self) on <var12:ToolContext> */
152 var12
->attrs
[COLOR_nitc__modelbuilder_base__ToolContext___modelbuilder_real
].val
= self
; /* _modelbuilder_real on <var12:ToolContext> */
158 /* method modelbuilder_base#ModelBuilder#try_get_mclass_by_name for (self: ModelBuilder, ANode, MModule, String): nullable MClass */
159 val
* nitc___nitc__ModelBuilder___try_get_mclass_by_name(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
160 val
* var
/* : nullable MClass */;
161 val
* var_anode
/* var anode: ANode */;
162 val
* var_mmodule
/* var mmodule: MModule */;
163 val
* var_name
/* var name: String */;
164 val
* var1
/* : Model */;
165 val
* var3
/* : Model */;
166 val
* var4
/* : nullable Array[MClass] */;
167 val
* var_classes
/* var classes: nullable Array[MClass] */;
168 short int var5
/* : Bool */;
169 short int var6
/* : Bool */;
170 val
* var_res
/* var res: nullable MClass */;
171 val
* var_
/* var : Array[MClass] */;
172 val
* var7
/* : IndexedIterator[nullable Object] */;
173 val
* var_8
/* var : IndexedIterator[MClass] */;
174 short int var9
/* : Bool */;
175 val
* var10
/* : nullable Object */;
176 val
* var_mclass
/* var mclass: MClass */;
177 val
* var11
/* : POSetElement[MModule] */;
178 val
* var13
/* : POSetElement[MModule] */;
179 val
* var14
/* : MModule */;
180 val
* var16
/* : MModule */;
181 short int var17
/* : Bool */;
182 short int var18
/* : Bool */;
183 val
* var20
/* : MModule */;
184 val
* var22
/* : MModule */;
185 val
* var23
/* : MVisibility */;
186 val
* var25
/* : MVisibility */;
187 short int var26
/* : Bool */;
188 short int var27
/* : Bool */;
189 short int var28
/* : Bool */;
190 short int var29
/* : Bool */;
191 val
* var_other
/* var other: nullable Object */;
192 short int var31
/* : Bool */;
193 short int var33
/* : Bool */;
194 val
* var34
/* : NativeArray[String] */;
196 static val
* varonce35
;
197 val
* var36
/* : String */;
198 char* var37
/* : NativeString */;
199 val
* var38
/* : String */;
200 static val
* varonce39
;
201 val
* var40
/* : String */;
202 char* var41
/* : NativeString */;
203 val
* var42
/* : String */;
204 static val
* varonce43
;
205 val
* var44
/* : String */;
206 char* var45
/* : NativeString */;
207 val
* var46
/* : String */;
208 static val
* varonce47
;
209 val
* var48
/* : String */;
210 char* var49
/* : NativeString */;
211 val
* var50
/* : String */;
212 val
* var51
/* : String */;
213 val
* var52
/* : String */;
214 val
* var53
/* : String */;
219 { /* Inline modelbuilder_base#ModelBuilder#model (self) on <self:ModelBuilder> */
220 var3
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___model
].val
; /* _model on <self:ModelBuilder> */
221 if (unlikely(var3
== NULL
)) {
222 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _model");
223 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 44);
231 var4
= nitc__model___Model___get_mclasses_by_name(var1
, var_name
);
234 if (var_classes
== NULL
) {
235 var5
= 1; /* is null */
237 var5
= 0; /* arg is null but recv is not */
240 var6
= core___core__Array___core__kernel__Object___61d_61d(var_classes
, ((val
*)NULL
));
248 var_res
= ((val
*)NULL
);
251 var7
= core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(var_
);
256 var9
= ((short int(*)(val
* self
))((((long)var_8
&3)?class_info
[((long)var_8
&3)]:var_8
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_8
); /* is_ok on <var_8:IndexedIterator[MClass]>*/
263 var10
= ((val
*(*)(val
* self
))((((long)var_8
&3)?class_info
[((long)var_8
&3)]:var_8
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_8
); /* item on <var_8:IndexedIterator[MClass]>*/
267 { /* Inline mmodule#MModule#in_importation (var_mmodule) on <var_mmodule:MModule> */
268 var13
= var_mmodule
->attrs
[COLOR_nitc__mmodule__MModule___in_importation
].val
; /* _in_importation on <var_mmodule:MModule> */
269 if (unlikely(var13
== NULL
)) {
270 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _in_importation");
271 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__mmodule
, 104);
279 { /* Inline model#MClass#intro_mmodule (var_mclass) on <var_mclass:MClass> */
280 var16
= var_mclass
->attrs
[COLOR_nitc__model__MClass___intro_mmodule
].val
; /* _intro_mmodule on <var_mclass:MClass> */
281 if (unlikely(var16
== NULL
)) {
282 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro_mmodule");
283 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 380);
291 var17
= poset___poset__POSetElement____60d_61d(var11
, var14
);
299 { /* Inline model#MClass#intro_mmodule (var_mclass) on <var_mclass:MClass> */
300 var22
= var_mclass
->attrs
[COLOR_nitc__model__MClass___intro_mmodule
].val
; /* _intro_mmodule on <var_mclass:MClass> */
301 if (unlikely(var22
== NULL
)) {
302 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro_mmodule");
303 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 380);
311 { /* Inline model#MClass#visibility (var_mclass) on <var_mclass:MClass> */
312 var25
= var_mclass
->attrs
[COLOR_nitc__model__MClass___visibility
].val
; /* _visibility on <var_mclass:MClass> */
313 if (unlikely(var25
== NULL
)) {
314 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _visibility");
315 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 463);
323 var26
= nitc___nitc__MModule___is_visible(var_mmodule
, var20
, var23
);
330 if (var_res
== NULL
) {
331 var28
= 1; /* is null */
333 var28
= 0; /* arg is null but recv is not */
336 { /* Inline kernel#Object#== (var_res,((val*)NULL)) on <var_res:nullable MClass> */
337 var_other
= ((val
*)NULL
);
339 { /* Inline kernel#Object#is_same_instance (var_res,var_other) on <var_res:nullable MClass(MClass)> */
340 var33
= var_res
== var_other
;
353 var_res
= var_mclass
;
355 if (unlikely(varonce
==NULL
)) {
356 var34
= NEW_core__NativeArray(7l, &type_core__NativeArray__core__String
);
357 if (likely(varonce35
!=NULL
)) {
360 var37
= "Error: ambiguous class name `";
361 var38
= core__flat___NativeString___to_s_full(var37
, 29l, 29l);
365 ((struct instance_core__NativeArray
*)var34
)->values
[0]=var36
;
366 if (likely(varonce39
!=NULL
)) {
369 var41
= "`; conflict between `";
370 var42
= core__flat___NativeString___to_s_full(var41
, 21l, 21l);
374 ((struct instance_core__NativeArray
*)var34
)->values
[2]=var40
;
375 if (likely(varonce43
!=NULL
)) {
379 var46
= core__flat___NativeString___to_s_full(var45
, 7l, 7l);
383 ((struct instance_core__NativeArray
*)var34
)->values
[4]=var44
;
384 if (likely(varonce47
!=NULL
)) {
388 var50
= core__flat___NativeString___to_s_full(var49
, 2l, 2l);
392 ((struct instance_core__NativeArray
*)var34
)->values
[6]=var48
;
397 ((struct instance_core__NativeArray
*)var34
)->values
[1]=var_name
;
399 var51
= nitc___nitc__MClass___nitc__model_base__MEntity__full_name(var_mclass
);
401 ((struct instance_core__NativeArray
*)var34
)->values
[3]=var51
;
403 var52
= nitc___nitc__MClass___nitc__model_base__MEntity__full_name(var_res
);
405 ((struct instance_core__NativeArray
*)var34
)->values
[5]=var52
;
407 var53
= ((val
*(*)(val
* self
))(var34
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var34
); /* native_to_s on <var34:NativeArray[String]>*/
411 nitc___nitc__ModelBuilder___error(self
, var_anode
, var53
); /* Direct call modelbuilder_base#ModelBuilder#error on <self:ModelBuilder>*/
416 BREAK_label19
: (void)0;
418 ((void(*)(val
* self
))((((long)var_8
&3)?class_info
[((long)var_8
&3)]:var_8
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_8
); /* next on <var_8:IndexedIterator[MClass]>*/
421 BREAK_label
: (void)0;
423 ((void(*)(val
* self
))((((long)var_8
&3)?class_info
[((long)var_8
&3)]:var_8
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_8
); /* finish on <var_8:IndexedIterator[MClass]>*/
430 /* method modelbuilder_base#ModelBuilder#get_mclass_by_name for (self: ModelBuilder, ANode, MModule, String): nullable MClass */
431 val
* nitc___nitc__ModelBuilder___get_mclass_by_name(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
432 val
* var
/* : nullable MClass */;
433 val
* var_node
/* var node: ANode */;
434 val
* var_mmodule
/* var mmodule: MModule */;
435 val
* var_name
/* var name: String */;
436 val
* var1
/* : nullable MClass */;
437 val
* var_mclass
/* var mclass: nullable MClass */;
438 short int var2
/* : Bool */;
439 short int var3
/* : Bool */;
440 val
* var_other
/* var other: nullable Object */;
441 short int var5
/* : Bool */;
442 short int var7
/* : Bool */;
443 val
* var8
/* : NativeArray[String] */;
445 static val
* varonce9
;
446 val
* var10
/* : String */;
447 char* var11
/* : NativeString */;
448 val
* var12
/* : String */;
449 static val
* varonce13
;
450 val
* var14
/* : String */;
451 char* var15
/* : NativeString */;
452 val
* var16
/* : String */;
453 val
* var17
/* : String */;
458 var1
= nitc___nitc__ModelBuilder___try_get_mclass_by_name(self
, var_node
, var_mmodule
, var_name
);
461 if (var_mclass
== NULL
) {
462 var2
= 1; /* is null */
464 var2
= 0; /* arg is null but recv is not */
467 { /* Inline kernel#Object#== (var_mclass,((val*)NULL)) on <var_mclass:nullable MClass> */
468 var_other
= ((val
*)NULL
);
470 { /* Inline kernel#Object#is_same_instance (var_mclass,var_other) on <var_mclass:nullable MClass(MClass)> */
471 var7
= var_mclass
== var_other
;
484 if (unlikely(varonce
==NULL
)) {
485 var8
= NEW_core__NativeArray(3l, &type_core__NativeArray__core__String
);
486 if (likely(varonce9
!=NULL
)) {
489 var11
= "Type Error: missing primitive class `";
490 var12
= core__flat___NativeString___to_s_full(var11
, 37l, 37l);
494 ((struct instance_core__NativeArray
*)var8
)->values
[0]=var10
;
495 if (likely(varonce13
!=NULL
)) {
499 var16
= core__flat___NativeString___to_s_full(var15
, 2l, 2l);
503 ((struct instance_core__NativeArray
*)var8
)->values
[2]=var14
;
508 ((struct instance_core__NativeArray
*)var8
)->values
[1]=var_name
;
510 var17
= ((val
*(*)(val
* self
))(var8
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var8
); /* native_to_s on <var8:NativeArray[String]>*/
514 nitc___nitc__ModelBuilder___error(self
, var_node
, var17
); /* Direct call modelbuilder_base#ModelBuilder#error on <self:ModelBuilder>*/
523 /* method modelbuilder_base#ModelBuilder#try_get_mproperty_by_name2 for (self: ModelBuilder, ANode, MModule, MType, String): nullable MProperty */
524 val
* nitc___nitc__ModelBuilder___try_get_mproperty_by_name2(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
525 val
* var
/* : nullable MProperty */;
526 val
* var_anode
/* var anode: ANode */;
527 val
* var_mmodule
/* var mmodule: MModule */;
528 val
* var_mtype
/* var mtype: MType */;
529 val
* var_name
/* var name: String */;
530 val
* var1
/* : Model */;
531 val
* var3
/* : Model */;
532 val
* var4
/* : nullable Array[MProperty] */;
533 val
* var_props
/* var props: nullable Array[MProperty] */;
534 short int var5
/* : Bool */;
535 short int var6
/* : Bool */;
536 val
* var7
/* : HashMap3[MModule, MType, String, nullable MProperty] */;
537 val
* var9
/* : HashMap3[MModule, MType, String, nullable MProperty] */;
538 val
* var10
/* : nullable Object */;
539 val
* var_cache
/* var cache: nullable MProperty */;
540 short int var11
/* : Bool */;
541 short int var12
/* : Bool */;
542 val
* var_other
/* var other: nullable Object */;
543 short int var14
/* : Bool */;
544 short int var15
/* : Bool */;
545 val
* var_res
/* var res: nullable MProperty */;
546 val
* var_ress
/* var ress: nullable Array[MProperty] */;
547 val
* var_
/* var : Array[MProperty] */;
548 val
* var16
/* : IndexedIterator[nullable Object] */;
549 val
* var_17
/* var : IndexedIterator[MProperty] */;
550 short int var18
/* : Bool */;
551 val
* var19
/* : nullable Object */;
552 val
* var_mprop
/* var mprop: MProperty */;
553 short int var20
/* : Bool */;
554 short int var21
/* : Bool */;
555 val
* var23
/* : MClassDef */;
556 val
* var25
/* : MClassDef */;
557 val
* var26
/* : MModule */;
558 val
* var28
/* : MModule */;
559 val
* var29
/* : MVisibility */;
560 val
* var31
/* : MVisibility */;
561 short int var32
/* : Bool */;
562 short int var33
/* : Bool */;
563 short int var34
/* : Bool */;
564 short int var35
/* : Bool */;
565 short int var36
/* : Bool */;
568 short int var_37
/* var : Bool */;
569 short int var38
/* : Bool */;
570 short int var40
/* : Bool */;
571 short int var_41
/* var : Bool */;
572 short int var42
/* : Bool */;
573 short int var43
/* : Bool */;
576 short int var46
/* : Bool */;
577 short int var_47
/* var : Bool */;
578 val
* var48
/* : MClassDef */;
579 val
* var50
/* : MClassDef */;
580 val
* var51
/* : MClass */;
581 val
* var53
/* : MClass */;
582 val
* var54
/* : MClass */;
583 val
* var56
/* : MClass */;
584 short int var57
/* : Bool */;
585 short int var59
/* : Bool */;
586 short int var60
/* : Bool */;
587 short int var61
/* : Bool */;
588 short int var62
/* : Bool */;
589 val
* var_other64
/* var other: nullable Object */;
590 short int var65
/* : Bool */;
591 short int var67
/* : Bool */;
592 short int var68
/* : Bool */;
593 short int var69
/* : Bool */;
594 short int var70
/* : Bool */;
595 short int var71
/* : Bool */;
598 short int var_74
/* var : Bool */;
599 short int var75
/* : Bool */;
602 short int var_78
/* var : Bool */;
603 short int var79
/* : Bool */;
604 short int var81
/* : Bool */;
605 short int var_82
/* var : Bool */;
606 short int var83
/* : Bool */;
607 short int var85
/* : Bool */;
608 val
* var86
/* : MClassDef */;
609 val
* var88
/* : MClassDef */;
610 val
* var89
/* : MClassType */;
611 val
* var91
/* : MClassType */;
612 val
* var_restype
/* var restype: MClassType */;
613 val
* var92
/* : MClassDef */;
614 val
* var94
/* : MClassDef */;
615 val
* var95
/* : MClassType */;
616 val
* var97
/* : MClassType */;
617 val
* var_mproptype
/* var mproptype: MClassType */;
618 short int var98
/* : Bool */;
619 short int var99
/* : Bool */;
620 short int var100
/* : Bool */;
621 val
* var101
/* : Array[MProperty] */;
622 short int var102
/* : Bool */;
623 short int var103
/* : Bool */;
624 short int var104
/* : Bool */;
625 short int var105
/* : Bool */;
626 short int var107
/* : Bool */;
627 short int var108
/* : Bool */;
628 short int var_109
/* var : Bool */;
629 short int var110
/* : Bool */;
632 short int var_113
/* var : Bool */;
633 short int var114
/* : Bool */;
634 short int var116
/* : Bool */;
635 val
* var117
/* : MClassDef */;
636 val
* var119
/* : MClassDef */;
637 val
* var120
/* : MClassType */;
638 val
* var122
/* : MClassType */;
639 val
* var_restype123
/* var restype: MClassType */;
640 val
* var124
/* : Array[MProperty] */;
641 val
* var_ress2
/* var ress2: Array[MProperty] */;
642 val
* var_125
/* var : Array[MProperty] */;
643 val
* var126
/* : IndexedIterator[nullable Object] */;
644 val
* var_127
/* var : IndexedIterator[MProperty] */;
645 short int var128
/* : Bool */;
646 val
* var130
/* : nullable Object */;
647 val
* var_mprop131
/* var mprop: MProperty */;
648 val
* var132
/* : MClassDef */;
649 val
* var134
/* : MClassDef */;
650 val
* var135
/* : MClassType */;
651 val
* var137
/* : MClassType */;
652 val
* var_mproptype138
/* var mproptype: MClassType */;
653 short int var139
/* : Bool */;
654 short int var140
/* : Bool */;
655 short int var141
/* : Bool */;
656 short int var142
/* : Bool */;
659 short int var145
/* : Bool */;
660 short int var_146
/* var : Bool */;
661 short int var147
/* : Bool */;
662 short int var149
/* : Bool */;
663 short int var150
/* : Bool */;
664 short int var151
/* : Bool */;
665 short int var152
/* : Bool */;
666 short int var153
/* : Bool */;
667 short int var155
/* : Bool */;
668 short int var156
/* : Bool */;
669 long var157
/* : Int */;
670 long var159
/* : Int */;
671 short int var160
/* : Bool */;
672 short int var162
/* : Bool */;
675 const char* var_class_name
;
676 short int var165
/* : Bool */;
677 val
* var166
/* : Array[String] */;
678 val
* var_s
/* var s: Array[String] */;
679 val
* var_167
/* var : Array[MProperty] */;
680 val
* var168
/* : IndexedIterator[nullable Object] */;
681 val
* var_169
/* var : IndexedIterator[MProperty] */;
682 short int var170
/* : Bool */;
683 val
* var172
/* : nullable Object */;
684 val
* var_mprop173
/* var mprop: MProperty */;
685 val
* var174
/* : String */;
686 val
* var175
/* : NativeArray[String] */;
688 static val
* varonce176
;
689 val
* var177
/* : String */;
690 char* var178
/* : NativeString */;
691 val
* var179
/* : String */;
692 static val
* varonce180
;
693 val
* var181
/* : String */;
694 char* var182
/* : NativeString */;
695 val
* var183
/* : String */;
696 static val
* varonce184
;
697 val
* var185
/* : String */;
698 char* var186
/* : NativeString */;
699 val
* var187
/* : String */;
700 static val
* varonce188
;
701 val
* var189
/* : String */;
702 char* var190
/* : NativeString */;
703 val
* var191
/* : String */;
704 val
* var192
/* : String */;
705 static val
* varonce193
;
706 val
* var194
/* : String */;
707 char* var195
/* : NativeString */;
708 val
* var196
/* : String */;
709 val
* var197
/* : String */;
710 val
* var198
/* : String */;
711 val
* var199
/* : HashMap3[MModule, MType, String, nullable MProperty] */;
712 val
* var201
/* : HashMap3[MModule, MType, String, nullable MProperty] */;
718 { /* Inline modelbuilder_base#ModelBuilder#model (self) on <self:ModelBuilder> */
719 var3
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___model
].val
; /* _model on <self:ModelBuilder> */
720 if (unlikely(var3
== NULL
)) {
721 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _model");
722 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 44);
730 var4
= nitc__model___Model___get_mproperties_by_name(var1
, var_name
);
733 if (var_props
== NULL
) {
734 var5
= 1; /* is null */
736 var5
= 0; /* arg is null but recv is not */
739 var6
= core___core__Array___core__kernel__Object___61d_61d(var_props
, ((val
*)NULL
));
748 { /* Inline modelbuilder_base#ModelBuilder#try_get_mproperty_by_name2_cache (self) on <self:ModelBuilder> */
749 var9
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___try_get_mproperty_by_name2_cache
].val
; /* _try_get_mproperty_by_name2_cache on <self:ModelBuilder> */
750 if (unlikely(var9
== NULL
)) {
751 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _try_get_mproperty_by_name2_cache");
752 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 178);
760 var10
= more_collections___more_collections__HashMap3____91d_93d(var7
, var_mmodule
, var_mtype
, var_name
);
763 if (var_cache
== NULL
) {
764 var11
= 0; /* is null */
766 var11
= 1; /* arg is null and recv is not */
769 { /* Inline kernel#Object#!= (var_cache,((val*)NULL)) on <var_cache:nullable MProperty> */
770 var_other
= ((val
*)NULL
);
772 var14
= ((short int(*)(val
* self
, val
* p0
))(var_cache
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_cache
, var_other
); /* == on <var_cache:nullable MProperty(MProperty)>*/
786 var_res
= ((val
*)NULL
);
787 var_ress
= ((val
*)NULL
);
790 var16
= core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(var_
);
795 var18
= ((short int(*)(val
* self
))((((long)var_17
&3)?class_info
[((long)var_17
&3)]:var_17
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_17
); /* is_ok on <var_17:IndexedIterator[MProperty]>*/
802 var19
= ((val
*(*)(val
* self
))((((long)var_17
&3)?class_info
[((long)var_17
&3)]:var_17
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_17
); /* item on <var_17:IndexedIterator[MProperty]>*/
806 var20
= nitc___nitc__MType___has_mproperty(var_mtype
, var_mmodule
, var_mprop
);
814 { /* Inline model#MProperty#intro_mclassdef (var_mprop) on <var_mprop:MProperty> */
815 var25
= var_mprop
->attrs
[COLOR_nitc__model__MProperty___intro_mclassdef
].val
; /* _intro_mclassdef on <var_mprop:MProperty> */
816 if (unlikely(var25
== NULL
)) {
817 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro_mclassdef");
818 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 1946);
826 { /* Inline model#MClassDef#mmodule (var23) on <var23:MClassDef> */
827 var28
= var23
->attrs
[COLOR_nitc__model__MClassDef___mmodule
].val
; /* _mmodule on <var23:MClassDef> */
828 if (unlikely(var28
== NULL
)) {
829 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
830 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 573);
838 { /* Inline model#MProperty#visibility (var_mprop) on <var_mprop:MProperty> */
839 var31
= var_mprop
->attrs
[COLOR_nitc__model__MProperty___visibility
].val
; /* _visibility on <var_mprop:MProperty> */
840 if (unlikely(var31
== NULL
)) {
841 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _visibility");
842 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 1967);
850 var32
= nitc___nitc__MModule___is_visible(var_mmodule
, var26
, var29
);
857 /* <var_mprop:MProperty> isa MMethod */
858 cltype
= type_nitc__MMethod
.color
;
859 idtype
= type_nitc__MMethod
.id
;
860 if(cltype
>= var_mprop
->type
->table_size
) {
863 var36
= var_mprop
->type
->type_table
[cltype
] == idtype
;
868 { /* Inline model#MMethod#is_new (var_mprop) on <var_mprop:MProperty(MMethod)> */
869 var40
= var_mprop
->attrs
[COLOR_nitc__model__MMethod___is_new
].s
; /* _is_new on <var_mprop:MProperty(MMethod)> */
880 /* <var_mtype:MType> isa MClassType */
881 cltype44
= type_nitc__MClassType
.color
;
882 idtype45
= type_nitc__MClassType
.id
;
883 if(cltype44
>= var_mtype
->type
->table_size
) {
886 var43
= var_mtype
->type
->type_table
[cltype44
] == idtype45
;
894 { /* Inline model#MProperty#intro_mclassdef (var_mprop) on <var_mprop:MProperty(MMethod)> */
895 var50
= var_mprop
->attrs
[COLOR_nitc__model__MProperty___intro_mclassdef
].val
; /* _intro_mclassdef on <var_mprop:MProperty(MMethod)> */
896 if (unlikely(var50
== NULL
)) {
897 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro_mclassdef");
898 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 1946);
906 { /* Inline model#MClassDef#mclass (var48) on <var48:MClassDef> */
907 var53
= var48
->attrs
[COLOR_nitc__model__MClassDef___mclass
].val
; /* _mclass on <var48:MClassDef> */
908 if (unlikely(var53
== NULL
)) {
909 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
910 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 576);
918 { /* Inline model#MClassType#mclass (var_mtype) on <var_mtype:MType(MClassType)> */
919 var56
= var_mtype
->attrs
[COLOR_nitc__model__MClassType___mclass
].val
; /* _mclass on <var_mtype:MType(MClassType)> */
920 if (unlikely(var56
== NULL
)) {
921 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
922 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 1163);
930 { /* Inline kernel#Object#!= (var51,var54) on <var51:MClass> */
933 var59
= ((short int(*)(val
* self
, val
* p0
))(var51
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var51
, var_other
); /* == on <var51:MClass>*/
951 if (var_res
== NULL
) {
952 var61
= 1; /* is null */
954 var61
= 0; /* arg is null but recv is not */
957 { /* Inline kernel#Object#== (var_res,((val*)NULL)) on <var_res:nullable MProperty> */
958 var_other64
= ((val
*)NULL
);
960 { /* Inline kernel#Object#is_same_instance (var_res,var_other64) on <var_res:nullable MProperty(MProperty)> */
961 var67
= var_res
== var_other64
;
978 /* <var_res:nullable MProperty(MProperty)> isa MMethod */
979 cltype72
= type_nitc__MMethod
.color
;
980 idtype73
= type_nitc__MMethod
.id
;
981 if(cltype72
>= var_res
->type
->table_size
) {
984 var71
= var_res
->type
->type_table
[cltype72
] == idtype73
;
988 /* <var_mprop:MProperty> isa MMethod */
989 cltype76
= type_nitc__MMethod
.color
;
990 idtype77
= type_nitc__MMethod
.id
;
991 if(cltype76
>= var_mprop
->type
->table_size
) {
994 var75
= var_mprop
->type
->type_table
[cltype76
] == idtype77
;
1003 { /* Inline model#MMethod#is_init (var_res) on <var_res:nullable MProperty(MMethod)> */
1004 var81
= var_res
->attrs
[COLOR_nitc__model__MMethod___is_init
].s
; /* _is_init on <var_res:nullable MProperty(MMethod)> */
1006 RET_LABEL80
:(void)0;
1016 { /* Inline model#MMethod#is_init (var_mprop) on <var_mprop:MProperty(MMethod)> */
1017 var85
= var_mprop
->attrs
[COLOR_nitc__model__MMethod___is_init
].s
; /* _is_init on <var_mprop:MProperty(MMethod)> */
1019 RET_LABEL84
:(void)0;
1028 { /* Inline model#MProperty#intro_mclassdef (var_res) on <var_res:nullable MProperty(MMethod)> */
1029 var88
= var_res
->attrs
[COLOR_nitc__model__MProperty___intro_mclassdef
].val
; /* _intro_mclassdef on <var_res:nullable MProperty(MMethod)> */
1030 if (unlikely(var88
== NULL
)) {
1031 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro_mclassdef");
1032 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 1946);
1036 RET_LABEL87
:(void)0;
1040 { /* Inline model#MClassDef#bound_mtype (var86) on <var86:MClassDef> */
1041 var91
= var86
->attrs
[COLOR_nitc__model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var86:MClassDef> */
1042 if (unlikely(var91
== NULL
)) {
1043 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
1044 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 579);
1048 RET_LABEL90
:(void)0;
1051 var_restype
= var89
;
1053 { /* Inline model#MProperty#intro_mclassdef (var_mprop) on <var_mprop:MProperty(MMethod)> */
1054 var94
= var_mprop
->attrs
[COLOR_nitc__model__MProperty___intro_mclassdef
].val
; /* _intro_mclassdef on <var_mprop:MProperty(MMethod)> */
1055 if (unlikely(var94
== NULL
)) {
1056 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro_mclassdef");
1057 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 1946);
1061 RET_LABEL93
:(void)0;
1065 { /* Inline model#MClassDef#bound_mtype (var92) on <var92:MClassDef> */
1066 var97
= var92
->attrs
[COLOR_nitc__model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var92:MClassDef> */
1067 if (unlikely(var97
== NULL
)) {
1068 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
1069 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 579);
1073 RET_LABEL96
:(void)0;
1076 var_mproptype
= var95
;
1078 var98
= nitc___nitc__MType___is_subtype(var_mproptype
, var_mmodule
, ((val
*)NULL
), var_restype
);
1081 var_res
= var_mprop
;
1087 if (var_ress
== NULL
) {
1088 var99
= 1; /* is null */
1090 var99
= 0; /* arg is null but recv is not */
1093 var100
= core___core__Array___core__kernel__Object___61d_61d(var_ress
, ((val
*)NULL
));
1097 var101
= NEW_core__Array(&type_core__Array__nitc__MProperty
);
1099 core___core__Array___core__kernel__Object__init(var101
); /* Direct call array#Array#init on <var101:Array[MProperty]>*/
1103 core___core__Array___core__abstract_collection__SimpleCollection__add(var_ress
, var_res
); /* Direct call array#Array#add on <var_ress:nullable Array[MProperty](Array[MProperty])>*/
1108 core___core__Array___core__abstract_collection__SimpleCollection__add(var_ress
, var_mprop
); /* Direct call array#Array#add on <var_ress:nullable Array[MProperty](Array[MProperty])>*/
1110 BREAK_label22
: (void)0;
1112 ((void(*)(val
* self
))((((long)var_17
&3)?class_info
[((long)var_17
&3)]:var_17
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_17
); /* next on <var_17:IndexedIterator[MProperty]>*/
1115 BREAK_label
: (void)0;
1117 ((void(*)(val
* self
))((((long)var_17
&3)?class_info
[((long)var_17
&3)]:var_17
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_17
); /* finish on <var_17:IndexedIterator[MProperty]>*/
1119 if (var_ress
== NULL
) {
1120 var104
= 0; /* is null */
1122 var104
= 1; /* arg is null and recv is not */
1125 { /* Inline kernel#Object#!= (var_ress,((val*)NULL)) on <var_ress:nullable Array[MProperty]> */
1126 var_other
= ((val
*)NULL
);
1128 var107
= ((short int(*)(val
* self
, val
* p0
))(var_ress
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_ress
, var_other
); /* == on <var_ress:nullable Array[MProperty](Array[MProperty])>*/
1133 RET_LABEL106
:(void)0;
1139 /* <var_res:nullable MProperty> isa MMethod */
1140 cltype111
= type_nitc__MMethod
.color
;
1141 idtype112
= type_nitc__MMethod
.id
;
1142 if(var_res
== NULL
) {
1145 if(cltype111
>= var_res
->type
->table_size
) {
1148 var110
= var_res
->type
->type_table
[cltype111
] == idtype112
;
1158 { /* Inline model#MMethod#is_init (var_res) on <var_res:nullable MProperty(MMethod)> */
1159 var116
= var_res
->attrs
[COLOR_nitc__model__MMethod___is_init
].s
; /* _is_init on <var_res:nullable MProperty(MMethod)> */
1161 RET_LABEL115
:(void)0;
1170 { /* Inline model#MProperty#intro_mclassdef (var_res) on <var_res:nullable MProperty(MMethod)> */
1171 var119
= var_res
->attrs
[COLOR_nitc__model__MProperty___intro_mclassdef
].val
; /* _intro_mclassdef on <var_res:nullable MProperty(MMethod)> */
1172 if (unlikely(var119
== NULL
)) {
1173 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro_mclassdef");
1174 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 1946);
1178 RET_LABEL118
:(void)0;
1182 { /* Inline model#MClassDef#bound_mtype (var117) on <var117:MClassDef> */
1183 var122
= var117
->attrs
[COLOR_nitc__model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var117:MClassDef> */
1184 if (unlikely(var122
== NULL
)) {
1185 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
1186 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 579);
1190 RET_LABEL121
:(void)0;
1193 var_restype123
= var120
;
1194 var124
= NEW_core__Array(&type_core__Array__nitc__MProperty
);
1196 core___core__Array___core__kernel__Object__init(var124
); /* Direct call array#Array#init on <var124:Array[MProperty]>*/
1201 var126
= core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(var_125
);
1206 var128
= ((short int(*)(val
* self
))((((long)var_127
&3)?class_info
[((long)var_127
&3)]:var_127
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_127
); /* is_ok on <var_127:IndexedIterator[MProperty]>*/
1210 goto BREAK_label129
;
1213 var130
= ((val
*(*)(val
* self
))((((long)var_127
&3)?class_info
[((long)var_127
&3)]:var_127
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_127
); /* item on <var_127:IndexedIterator[MProperty]>*/
1215 var_mprop131
= var130
;
1217 { /* Inline model#MProperty#intro_mclassdef (var_mprop131) on <var_mprop131:MProperty> */
1218 var134
= var_mprop131
->attrs
[COLOR_nitc__model__MProperty___intro_mclassdef
].val
; /* _intro_mclassdef on <var_mprop131:MProperty> */
1219 if (unlikely(var134
== NULL
)) {
1220 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro_mclassdef");
1221 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 1946);
1225 RET_LABEL133
:(void)0;
1229 { /* Inline model#MClassDef#bound_mtype (var132) on <var132:MClassDef> */
1230 var137
= var132
->attrs
[COLOR_nitc__model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var132:MClassDef> */
1231 if (unlikely(var137
== NULL
)) {
1232 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
1233 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 579);
1237 RET_LABEL136
:(void)0;
1240 var_mproptype138
= var135
;
1242 var139
= nitc___nitc__MType___is_subtype(var_restype123
, var_mmodule
, ((val
*)NULL
), var_mproptype138
);
1247 core___core__Array___core__abstract_collection__SimpleCollection__add(var_ress2
, var_mprop131
); /* Direct call array#Array#add on <var_ress2:Array[MProperty]>*/
1250 /* <var_mprop131:MProperty> isa MMethod */
1251 cltype143
= type_nitc__MMethod
.color
;
1252 idtype144
= type_nitc__MMethod
.id
;
1253 if(cltype143
>= var_mprop131
->type
->table_size
) {
1256 var142
= var_mprop131
->type
->type_table
[cltype143
] == idtype144
;
1264 { /* Inline model#MMethod#is_init (var_mprop131) on <var_mprop131:MProperty(MMethod)> */
1265 var149
= var_mprop131
->attrs
[COLOR_nitc__model__MMethod___is_init
].s
; /* _is_init on <var_mprop131:MProperty(MMethod)> */
1267 RET_LABEL148
:(void)0;
1275 core___core__Array___core__abstract_collection__SimpleCollection__add(var_ress2
, var_mprop131
); /* Direct call array#Array#add on <var_ress2:Array[MProperty]>*/
1281 ((void(*)(val
* self
))((((long)var_127
&3)?class_info
[((long)var_127
&3)]:var_127
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_127
); /* next on <var_127:IndexedIterator[MProperty]>*/
1284 BREAK_label129
: (void)0;
1286 ((void(*)(val
* self
))((((long)var_127
&3)?class_info
[((long)var_127
&3)]:var_127
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_127
); /* finish on <var_127:IndexedIterator[MProperty]>*/
1289 var151
= core___core__AbstractArrayRead___core__abstract_collection__Collection__is_empty(var_ress2
);
1292 var_ress
= ((val
*)NULL
);
1294 var_ress
= var_ress2
;
1296 core___core__Array___core__abstract_collection__SimpleCollection__add(var_ress
, var_res
); /* Direct call array#Array#add on <var_ress:nullable Array[MProperty](Array[MProperty])>*/
1301 if (var_ress
== NULL
) {
1302 var152
= 0; /* is null */
1304 var152
= 1; /* arg is null and recv is not */
1307 { /* Inline kernel#Object#!= (var_ress,((val*)NULL)) on <var_ress:nullable Array[MProperty]> */
1308 var_other
= ((val
*)NULL
);
1310 var155
= ((short int(*)(val
* self
, val
* p0
))(var_ress
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_ress
, var_other
); /* == on <var_ress:nullable Array[MProperty](Array[MProperty])>*/
1315 RET_LABEL154
:(void)0;
1321 { /* Inline array#AbstractArrayRead#length (var_ress) on <var_ress:nullable Array[MProperty](Array[MProperty])> */
1322 var159
= var_ress
->attrs
[COLOR_core__array__AbstractArrayRead___length
].l
; /* _length on <var_ress:nullable Array[MProperty](Array[MProperty])> */
1324 RET_LABEL158
:(void)0;
1328 { /* Inline kernel#Int#> (var157,1l) on <var157:Int> */
1329 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
1330 /* <1l:Int> isa OTHER */
1331 var162
= 1; /* easy <1l:Int> isa OTHER*/
1332 if (unlikely(!var162
)) {
1333 var_class_name
= type_core__Int
.name
;
1334 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1335 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 730);
1338 var165
= var157
> 1l;
1341 RET_LABEL161
:(void)0;
1344 if (unlikely(!var160
)) {
1345 PRINT_ERROR("Runtime error: %s", "Assert failed");
1346 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 168);
1349 var166
= NEW_core__Array(&type_core__Array__core__String
);
1351 core___core__Array___core__kernel__Object__init(var166
); /* Direct call array#Array#init on <var166:Array[String]>*/
1356 var168
= core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(var_167
);
1361 var170
= ((short int(*)(val
* self
))((((long)var_169
&3)?class_info
[((long)var_169
&3)]:var_169
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_169
); /* is_ok on <var_169:IndexedIterator[MProperty]>*/
1365 goto BREAK_label171
;
1368 var172
= ((val
*(*)(val
* self
))((((long)var_169
&3)?class_info
[((long)var_169
&3)]:var_169
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_169
); /* item on <var_169:IndexedIterator[MProperty]>*/
1370 var_mprop173
= var172
;
1372 var174
= nitc___nitc__MProperty___nitc__model_base__MEntity__full_name(var_mprop173
);
1375 core___core__Array___core__abstract_collection__SimpleCollection__add(var_s
, var174
); /* Direct call array#Array#add on <var_s:Array[String]>*/
1378 ((void(*)(val
* self
))((((long)var_169
&3)?class_info
[((long)var_169
&3)]:var_169
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_169
); /* next on <var_169:IndexedIterator[MProperty]>*/
1381 BREAK_label171
: (void)0;
1383 ((void(*)(val
* self
))((((long)var_169
&3)?class_info
[((long)var_169
&3)]:var_169
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_169
); /* finish on <var_169:IndexedIterator[MProperty]>*/
1385 if (unlikely(varonce
==NULL
)) {
1386 var175
= NEW_core__NativeArray(7l, &type_core__NativeArray__core__String
);
1387 if (likely(varonce176
!=NULL
)) {
1388 var177
= varonce176
;
1390 var178
= "Error: ambiguous property name `";
1391 var179
= core__flat___NativeString___to_s_full(var178
, 32l, 32l);
1393 varonce176
= var177
;
1395 ((struct instance_core__NativeArray
*)var175
)->values
[0]=var177
;
1396 if (likely(varonce180
!=NULL
)) {
1397 var181
= varonce180
;
1400 var183
= core__flat___NativeString___to_s_full(var182
, 7l, 7l);
1402 varonce180
= var181
;
1404 ((struct instance_core__NativeArray
*)var175
)->values
[2]=var181
;
1405 if (likely(varonce184
!=NULL
)) {
1406 var185
= varonce184
;
1408 var186
= "`; conflict between ";
1409 var187
= core__flat___NativeString___to_s_full(var186
, 20l, 20l);
1411 varonce184
= var185
;
1413 ((struct instance_core__NativeArray
*)var175
)->values
[4]=var185
;
1414 if (likely(varonce188
!=NULL
)) {
1415 var189
= varonce188
;
1418 var191
= core__flat___NativeString___to_s_full(var190
, 1l, 1l);
1420 varonce188
= var189
;
1422 ((struct instance_core__NativeArray
*)var175
)->values
[6]=var189
;
1427 ((struct instance_core__NativeArray
*)var175
)->values
[1]=var_name
;
1429 var192
= ((val
*(*)(val
* self
))(var_mtype
->class->vft
[COLOR_core__abstract_text__Object__to_s
]))(var_mtype
); /* to_s on <var_mtype:MType>*/
1431 ((struct instance_core__NativeArray
*)var175
)->values
[3]=var192
;
1432 if (likely(varonce193
!=NULL
)) {
1433 var194
= varonce193
;
1436 var196
= core__flat___NativeString___to_s_full(var195
, 5l, 5l);
1438 varonce193
= var194
;
1441 var197
= core__abstract_text___Collection___join(var_s
, var194
);
1443 ((struct instance_core__NativeArray
*)var175
)->values
[5]=var197
;
1445 var198
= ((val
*(*)(val
* self
))(var175
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var175
); /* native_to_s on <var175:NativeArray[String]>*/
1449 nitc___nitc__ModelBuilder___error(self
, var_anode
, var198
); /* Direct call modelbuilder_base#ModelBuilder#error on <self:ModelBuilder>*/
1454 { /* Inline modelbuilder_base#ModelBuilder#try_get_mproperty_by_name2_cache (self) on <self:ModelBuilder> */
1455 var201
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___try_get_mproperty_by_name2_cache
].val
; /* _try_get_mproperty_by_name2_cache on <self:ModelBuilder> */
1456 if (unlikely(var201
== NULL
)) {
1457 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _try_get_mproperty_by_name2_cache");
1458 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 178);
1462 RET_LABEL200
:(void)0;
1466 more_collections___more_collections__HashMap3____91d_93d_61d(var199
, var_mmodule
, var_mtype
, var_name
, var_res
); /* Direct call more_collections#HashMap3#[]= on <var199:HashMap3[MModule, MType, String, nullable MProperty]>*/
1473 /* method modelbuilder_base#ModelBuilder#try_get_mproperty_by_name2_cache for (self: ModelBuilder): HashMap3[MModule, MType, String, nullable MProperty] */
1474 val
* nitc___nitc__ModelBuilder___try_get_mproperty_by_name2_cache(val
* self
) {
1475 val
* var
/* : HashMap3[MModule, MType, String, nullable MProperty] */;
1476 val
* var1
/* : HashMap3[MModule, MType, String, nullable MProperty] */;
1477 var1
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___try_get_mproperty_by_name2_cache
].val
; /* _try_get_mproperty_by_name2_cache on <self:ModelBuilder> */
1478 if (unlikely(var1
== NULL
)) {
1479 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _try_get_mproperty_by_name2_cache");
1480 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 178);
1487 /* method modelbuilder_base#ModelBuilder#try_get_mproperty_by_name for (self: ModelBuilder, ANode, MClassDef, String): nullable MProperty */
1488 val
* nitc___nitc__ModelBuilder___try_get_mproperty_by_name(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
1489 val
* var
/* : nullable MProperty */;
1490 val
* var_anode
/* var anode: ANode */;
1491 val
* var_mclassdef
/* var mclassdef: MClassDef */;
1492 val
* var_name
/* var name: String */;
1493 val
* var1
/* : MModule */;
1494 val
* var3
/* : MModule */;
1495 val
* var4
/* : MClassType */;
1496 val
* var6
/* : MClassType */;
1497 val
* var7
/* : nullable MProperty */;
1502 { /* Inline model#MClassDef#mmodule (var_mclassdef) on <var_mclassdef:MClassDef> */
1503 var3
= var_mclassdef
->attrs
[COLOR_nitc__model__MClassDef___mmodule
].val
; /* _mmodule on <var_mclassdef:MClassDef> */
1504 if (unlikely(var3
== NULL
)) {
1505 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mmodule");
1506 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 573);
1514 { /* Inline model#MClassDef#bound_mtype (var_mclassdef) on <var_mclassdef:MClassDef> */
1515 var6
= var_mclassdef
->attrs
[COLOR_nitc__model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var_mclassdef:MClassDef> */
1516 if (unlikely(var6
== NULL
)) {
1517 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
1518 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 579);
1526 var7
= nitc___nitc__ModelBuilder___try_get_mproperty_by_name2(self
, var_anode
, var1
, var4
, var_name
);
1533 /* method modelbuilder_base#ModelBuilder#error for (self: ModelBuilder, nullable ANode, String) */
1534 void nitc___nitc__ModelBuilder___error(val
* self
, val
* p0
, val
* p1
) {
1535 val
* var_n
/* var n: nullable ANode */;
1536 val
* var_text
/* var text: String */;
1537 val
* var_l
/* var l: nullable Object */;
1538 short int var
/* : Bool */;
1539 short int var1
/* : Bool */;
1540 val
* var_other
/* var other: nullable Object */;
1541 short int var3
/* : Bool */;
1542 short int var4
/* : Bool */;
1543 val
* var5
/* : Location */;
1544 val
* var7
/* : ToolContext */;
1545 val
* var9
/* : ToolContext */;
1546 val
* var10
/* : Message */;
1549 var_l
= ((val
*)NULL
);
1550 if (var_n
== NULL
) {
1551 var
= 0; /* is null */
1553 var
= 1; /* arg is null and recv is not */
1556 { /* Inline kernel#Object#!= (var_n,((val*)NULL)) on <var_n:nullable ANode> */
1557 var_other
= ((val
*)NULL
);
1559 var3
= ((short int(*)(val
* self
, val
* p0
))(var_n
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_n
, var_other
); /* == on <var_n:nullable ANode(ANode)>*/
1570 var5
= ((val
*(*)(val
* self
))(var_n
->class->vft
[COLOR_nitc__parser_nodes__ANode__hot_location
]))(var_n
); /* hot_location on <var_n:nullable ANode(ANode)>*/
1574 { /* Inline modelbuilder_base#ANode#is_broken= (var_n,1) on <var_n:nullable ANode(ANode)> */
1575 var_n
->attrs
[COLOR_nitc__modelbuilder_base__ANode___is_broken
].s
= 1; /* _is_broken on <var_n:nullable ANode(ANode)> */
1582 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
1583 var9
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
1584 if (unlikely(var9
== NULL
)) {
1585 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1586 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 47);
1594 var10
= nitc___nitc__ToolContext___error(var7
, var_l
, var_text
);
1598 /* method modelbuilder_base#ModelBuilder#warning for (self: ModelBuilder, nullable ANode, String, String) */
1599 void nitc___nitc__ModelBuilder___warning(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
1600 val
* var_n
/* var n: nullable ANode */;
1601 val
* var_tag
/* var tag: String */;
1602 val
* var_text
/* var text: String */;
1603 val
* var_l
/* var l: nullable Object */;
1604 short int var
/* : Bool */;
1605 short int var1
/* : Bool */;
1606 val
* var_other
/* var other: nullable Object */;
1607 short int var3
/* : Bool */;
1608 short int var4
/* : Bool */;
1609 val
* var5
/* : Location */;
1610 val
* var6
/* : ToolContext */;
1611 val
* var8
/* : ToolContext */;
1612 val
* var9
/* : nullable Message */;
1616 var_l
= ((val
*)NULL
);
1617 if (var_n
== NULL
) {
1618 var
= 0; /* is null */
1620 var
= 1; /* arg is null and recv is not */
1623 { /* Inline kernel#Object#!= (var_n,((val*)NULL)) on <var_n:nullable ANode> */
1624 var_other
= ((val
*)NULL
);
1626 var3
= ((short int(*)(val
* self
, val
* p0
))(var_n
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_n
, var_other
); /* == on <var_n:nullable ANode(ANode)>*/
1637 var5
= ((val
*(*)(val
* self
))(var_n
->class->vft
[COLOR_nitc__parser_nodes__ANode__hot_location
]))(var_n
); /* hot_location on <var_n:nullable ANode(ANode)>*/
1643 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
1644 var8
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
1645 if (unlikely(var8
== NULL
)) {
1646 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1647 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 47);
1655 var9
= nitc___nitc__ToolContext___warning(var6
, var_l
, var_tag
, var_text
);
1659 /* method modelbuilder_base#ModelBuilder#advice for (self: ModelBuilder, nullable ANode, String, String) */
1660 void nitc___nitc__ModelBuilder___advice(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
1661 val
* var_n
/* var n: nullable ANode */;
1662 val
* var_tag
/* var tag: String */;
1663 val
* var_text
/* var text: String */;
1664 val
* var_l
/* var l: nullable Object */;
1665 short int var
/* : Bool */;
1666 short int var1
/* : Bool */;
1667 val
* var_other
/* var other: nullable Object */;
1668 short int var3
/* : Bool */;
1669 short int var4
/* : Bool */;
1670 val
* var5
/* : Location */;
1671 val
* var6
/* : ToolContext */;
1672 val
* var8
/* : ToolContext */;
1673 val
* var9
/* : nullable Message */;
1677 var_l
= ((val
*)NULL
);
1678 if (var_n
== NULL
) {
1679 var
= 0; /* is null */
1681 var
= 1; /* arg is null and recv is not */
1684 { /* Inline kernel#Object#!= (var_n,((val*)NULL)) on <var_n:nullable ANode> */
1685 var_other
= ((val
*)NULL
);
1687 var3
= ((short int(*)(val
* self
, val
* p0
))(var_n
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_n
, var_other
); /* == on <var_n:nullable ANode(ANode)>*/
1698 var5
= ((val
*(*)(val
* self
))(var_n
->class->vft
[COLOR_nitc__parser_nodes__ANode__hot_location
]))(var_n
); /* hot_location on <var_n:nullable ANode(ANode)>*/
1704 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
1705 var8
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
1706 if (unlikely(var8
== NULL
)) {
1707 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1708 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 47);
1716 var9
= nitc___nitc__ToolContext___advice(var6
, var_l
, var_tag
, var_text
);
1720 /* method modelbuilder_base#ModelBuilder#force_get_primitive_method for (self: ModelBuilder, nullable ANode, String, MClass, MModule): MMethod */
1721 val
* nitc___nitc__ModelBuilder___force_get_primitive_method(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
1722 val
* var
/* : MMethod */;
1723 val
* var_n
/* var n: nullable ANode */;
1724 val
* var_name
/* var name: String */;
1725 val
* var_recv
/* var recv: MClass */;
1726 val
* var_mmodule
/* var mmodule: MModule */;
1727 val
* var1
/* : nullable MMethod */;
1728 val
* var_res
/* var res: nullable MMethod */;
1729 short int var2
/* : Bool */;
1730 short int var3
/* : Bool */;
1731 val
* var_other
/* var other: nullable Object */;
1732 short int var5
/* : Bool */;
1733 short int var7
/* : Bool */;
1734 val
* var_l
/* var l: nullable Object */;
1735 short int var8
/* : Bool */;
1736 short int var9
/* : Bool */;
1737 val
* var_other11
/* var other: nullable Object */;
1738 short int var12
/* : Bool */;
1739 short int var13
/* : Bool */;
1740 val
* var14
/* : Location */;
1741 val
* var15
/* : ToolContext */;
1742 val
* var17
/* : ToolContext */;
1743 val
* var18
/* : NativeArray[String] */;
1744 static val
* varonce
;
1745 static val
* varonce19
;
1746 val
* var20
/* : String */;
1747 char* var21
/* : NativeString */;
1748 val
* var22
/* : String */;
1749 static val
* varonce23
;
1750 val
* var24
/* : String */;
1751 char* var25
/* : NativeString */;
1752 val
* var26
/* : String */;
1753 static val
* varonce27
;
1754 val
* var28
/* : String */;
1755 char* var29
/* : NativeString */;
1756 val
* var30
/* : String */;
1757 val
* var31
/* : String */;
1758 val
* var32
/* : String */;
1764 var1
= nitc__model___MModule___try_get_primitive_method(var_mmodule
, var_name
, var_recv
);
1767 if (var_res
== NULL
) {
1768 var2
= 1; /* is null */
1770 var2
= 0; /* arg is null but recv is not */
1773 { /* Inline kernel#Object#== (var_res,((val*)NULL)) on <var_res:nullable MMethod> */
1774 var_other
= ((val
*)NULL
);
1776 { /* Inline kernel#Object#is_same_instance (var_res,var_other) on <var_res:nullable MMethod(MMethod)> */
1777 var7
= var_res
== var_other
;
1790 var_l
= ((val
*)NULL
);
1791 if (var_n
== NULL
) {
1792 var8
= 0; /* is null */
1794 var8
= 1; /* arg is null and recv is not */
1797 { /* Inline kernel#Object#!= (var_n,((val*)NULL)) on <var_n:nullable ANode> */
1798 var_other11
= ((val
*)NULL
);
1800 var12
= ((short int(*)(val
* self
, val
* p0
))(var_n
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_n
, var_other11
); /* == on <var_n:nullable ANode(ANode)>*/
1805 RET_LABEL10
:(void)0;
1811 var14
= ((val
*(*)(val
* self
))(var_n
->class->vft
[COLOR_nitc__parser_nodes__ANode__hot_location
]))(var_n
); /* hot_location on <var_n:nullable ANode(ANode)>*/
1817 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
1818 var17
= self
->attrs
[COLOR_nitc__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
1819 if (unlikely(var17
== NULL
)) {
1820 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1821 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 47);
1825 RET_LABEL16
:(void)0;
1828 if (unlikely(varonce
==NULL
)) {
1829 var18
= NEW_core__NativeArray(5l, &type_core__NativeArray__core__String
);
1830 if (likely(varonce19
!=NULL
)) {
1833 var21
= "Fatal Error: `";
1834 var22
= core__flat___NativeString___to_s_full(var21
, 14l, 14l);
1838 ((struct instance_core__NativeArray
*)var18
)->values
[0]=var20
;
1839 if (likely(varonce23
!=NULL
)) {
1842 var25
= "` must have a property named `";
1843 var26
= core__flat___NativeString___to_s_full(var25
, 30l, 30l);
1847 ((struct instance_core__NativeArray
*)var18
)->values
[2]=var24
;
1848 if (likely(varonce27
!=NULL
)) {
1852 var30
= core__flat___NativeString___to_s_full(var29
, 2l, 2l);
1856 ((struct instance_core__NativeArray
*)var18
)->values
[4]=var28
;
1862 var31
= ((val
*(*)(val
* self
))(var_recv
->class->vft
[COLOR_core__abstract_text__Object__to_s
]))(var_recv
); /* to_s on <var_recv:MClass>*/
1864 ((struct instance_core__NativeArray
*)var18
)->values
[1]=var31
;
1865 ((struct instance_core__NativeArray
*)var18
)->values
[3]=var_name
;
1867 var32
= ((val
*(*)(val
* self
))(var18
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var18
); /* native_to_s on <var18:NativeArray[String]>*/
1871 nitc___nitc__ToolContext___fatal_error(var15
, var_l
, var32
); /* Direct call toolcontext#ToolContext#fatal_error on <var15:ToolContext>*/
1873 PRINT_ERROR("Runtime error: %s", "Aborted");
1874 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 227);
1883 /* method modelbuilder_base#ModelBuilder#resolve_mtype_unchecked for (self: ModelBuilder, MModule, nullable MClassDef, AType, Bool): nullable MType */
1884 val
* nitc___nitc__ModelBuilder___resolve_mtype_unchecked(val
* self
, val
* p0
, val
* p1
, val
* p2
, short int p3
) {
1885 val
* var
/* : nullable MType */;
1886 val
* var_mmodule
/* var mmodule: MModule */;
1887 val
* var_mclassdef
/* var mclassdef: nullable MClassDef */;
1888 val
* var_ntype
/* var ntype: AType */;
1889 short int var_with_virtual
/* var with_virtual: Bool */;
1890 val
* var1
/* : AQclassid */;
1891 val
* var3
/* : AQclassid */;
1892 val
* var4
/* : TClassid */;
1893 val
* var6
/* : TClassid */;
1894 val
* var7
/* : String */;
1895 val
* var_name
/* var name: String */;
1896 short int var8
/* : Bool */;
1897 short int var9
/* : Bool */;
1898 short int var10
/* : Bool */;
1899 val
* var_other
/* var other: nullable Object */;
1900 short int var12
/* : Bool */;
1901 short int var13
/* : Bool */;
1902 short int var_
/* var : Bool */;
1903 val
* var14
/* : nullable MProperty */;
1904 short int var15
/* : Bool */;
1907 const char* var_class_name
;
1908 val
* var_prop
/* var prop: nullable MVirtualTypeProp */;
1909 short int var16
/* : Bool */;
1910 short int var17
/* : Bool */;
1911 short int var19
/* : Bool */;
1912 short int var20
/* : Bool */;
1913 val
* var21
/* : ANodes[AType] */;
1914 val
* var23
/* : ANodes[AType] */;
1915 short int var24
/* : Bool */;
1916 short int var25
/* : Bool */;
1917 val
* var26
/* : NativeArray[String] */;
1918 static val
* varonce
;
1919 static val
* varonce27
;
1920 val
* var28
/* : String */;
1921 char* var29
/* : NativeString */;
1922 val
* var30
/* : String */;
1923 static val
* varonce31
;
1924 val
* var32
/* : String */;
1925 char* var33
/* : NativeString */;
1926 val
* var34
/* : String */;
1927 val
* var35
/* : String */;
1928 val
* var36
/* : MVirtualType */;
1929 val
* var38
/* : MVirtualType */;
1930 val
* var_res
/* var res: MType */;
1931 val
* var39
/* : nullable TKwnullable */;
1932 val
* var41
/* : nullable TKwnullable */;
1933 short int var42
/* : Bool */;
1934 short int var43
/* : Bool */;
1935 short int var45
/* : Bool */;
1936 short int var46
/* : Bool */;
1937 val
* var47
/* : MType */;
1938 short int var49
/* : Bool */;
1939 short int var50
/* : Bool */;
1940 short int var52
/* : Bool */;
1941 short int var53
/* : Bool */;
1942 val
* var54
/* : MClass */;
1943 val
* var56
/* : MClass */;
1944 val
* var57
/* : Array[MParameterType] */;
1945 val
* var59
/* : Array[MParameterType] */;
1946 val
* var_60
/* var : Array[MParameterType] */;
1947 val
* var61
/* : IndexedIterator[nullable Object] */;
1948 val
* var_62
/* var : IndexedIterator[MParameterType] */;
1949 short int var63
/* : Bool */;
1950 val
* var64
/* : nullable Object */;
1951 val
* var_p
/* var p: MParameterType */;
1952 val
* var65
/* : String */;
1953 val
* var67
/* : String */;
1954 short int var68
/* : Bool */;
1955 short int var70
/* : Bool */;
1956 short int var71
/* : Bool */;
1957 val
* var73
/* : ANodes[AType] */;
1958 val
* var75
/* : ANodes[AType] */;
1959 short int var76
/* : Bool */;
1960 short int var77
/* : Bool */;
1961 val
* var79
/* : NativeArray[String] */;
1962 static val
* varonce78
;
1963 static val
* varonce80
;
1964 val
* var81
/* : String */;
1965 char* var82
/* : NativeString */;
1966 val
* var83
/* : String */;
1967 static val
* varonce84
;
1968 val
* var85
/* : String */;
1969 char* var86
/* : NativeString */;
1970 val
* var87
/* : String */;
1971 val
* var88
/* : String */;
1972 val
* var89
/* : nullable TKwnullable */;
1973 val
* var91
/* : nullable TKwnullable */;
1974 short int var92
/* : Bool */;
1975 short int var93
/* : Bool */;
1976 short int var95
/* : Bool */;
1977 short int var96
/* : Bool */;
1978 val
* var97
/* : MType */;
1979 val
* var99
/* : nullable MClass */;
1980 val
* var_mclass
/* var mclass: nullable MClass */;
1981 short int var100
/* : Bool */;
1982 short int var101
/* : Bool */;
1983 short int var103
/* : Bool */;
1984 short int var104
/* : Bool */;
1985 val
* var105
/* : ANodes[AType] */;
1986 val
* var107
/* : ANodes[AType] */;
1987 long var108
/* : Int */;
1988 long var_arity
/* var arity: Int */;
1989 long var109
/* : Int */;
1990 long var111
/* : Int */;
1991 short int var112
/* : Bool */;
1992 short int var114
/* : Bool */;
1993 short int var115
/* : Bool */;
1994 short int var116
/* : Bool */;
1995 short int var118
/* : Bool */;
1996 val
* var120
/* : NativeArray[String] */;
1997 static val
* varonce119
;
1998 static val
* varonce121
;
1999 val
* var122
/* : String */;
2000 char* var123
/* : NativeString */;
2001 val
* var124
/* : String */;
2002 static val
* varonce125
;
2003 val
* var126
/* : String */;
2004 char* var127
/* : NativeString */;
2005 val
* var128
/* : String */;
2006 val
* var129
/* : String */;
2007 val
* var130
/* : String */;
2008 long var131
/* : Int */;
2009 long var133
/* : Int */;
2010 short int var134
/* : Bool */;
2011 short int var136
/* : Bool */;
2012 val
* var138
/* : NativeArray[String] */;
2013 static val
* varonce137
;
2014 static val
* varonce139
;
2015 val
* var140
/* : String */;
2016 char* var141
/* : NativeString */;
2017 val
* var142
/* : String */;
2018 static val
* varonce143
;
2019 val
* var144
/* : String */;
2020 char* var145
/* : NativeString */;
2021 val
* var146
/* : String */;
2022 val
* var147
/* : String */;
2023 val
* var149
/* : NativeArray[String] */;
2024 static val
* varonce148
;
2025 static val
* varonce150
;
2026 val
* var151
/* : String */;
2027 char* var152
/* : NativeString */;
2028 val
* var153
/* : String */;
2029 static val
* varonce154
;
2030 val
* var155
/* : String */;
2031 char* var156
/* : NativeString */;
2032 val
* var157
/* : String */;
2033 static val
* varonce158
;
2034 val
* var159
/* : String */;
2035 char* var160
/* : NativeString */;
2036 val
* var161
/* : String */;
2037 static val
* varonce162
;
2038 val
* var163
/* : String */;
2039 char* var164
/* : NativeString */;
2040 val
* var165
/* : String */;
2041 long var166
/* : Int */;
2042 long var168
/* : Int */;
2043 val
* var169
/* : String */;
2044 val
* var170
/* : String */;
2045 val
* var171
/* : String */;
2046 val
* var172
/* : String */;
2047 short int var173
/* : Bool */;
2048 short int var175
/* : Bool */;
2049 val
* var176
/* : MClassType */;
2050 val
* var178
/* : MClassType */;
2051 val
* var179
/* : nullable TKwnullable */;
2052 val
* var181
/* : nullable TKwnullable */;
2053 short int var182
/* : Bool */;
2054 short int var183
/* : Bool */;
2055 short int var185
/* : Bool */;
2056 short int var186
/* : Bool */;
2057 val
* var187
/* : MType */;
2058 val
* var189
/* : Array[MType] */;
2059 val
* var_mtypes
/* var mtypes: Array[MType] */;
2060 val
* var190
/* : ANodes[AType] */;
2061 val
* var192
/* : ANodes[AType] */;
2062 val
* var_193
/* var : ANodes[AType] */;
2063 val
* var194
/* : Iterator[ANode] */;
2064 val
* var_195
/* var : Iterator[AType] */;
2065 short int var196
/* : Bool */;
2066 val
* var198
/* : nullable Object */;
2067 val
* var_nt
/* var nt: AType */;
2068 val
* var199
/* : nullable MType */;
2069 val
* var_mt
/* var mt: nullable MType */;
2070 short int var200
/* : Bool */;
2071 short int var201
/* : Bool */;
2072 val
* var_other203
/* var other: nullable Object */;
2073 short int var204
/* : Bool */;
2074 short int var206
/* : Bool */;
2075 val
* var207
/* : MClassType */;
2076 val
* var208
/* : nullable TKwnullable */;
2077 val
* var210
/* : nullable TKwnullable */;
2078 short int var211
/* : Bool */;
2079 short int var212
/* : Bool */;
2080 short int var214
/* : Bool */;
2081 short int var215
/* : Bool */;
2082 val
* var216
/* : MType */;
2083 val
* var219
/* : NativeArray[String] */;
2084 static val
* varonce218
;
2085 static val
* varonce220
;
2086 val
* var221
/* : String */;
2087 char* var222
/* : NativeString */;
2088 val
* var223
/* : String */;
2089 static val
* varonce224
;
2090 val
* var225
/* : String */;
2091 char* var226
/* : NativeString */;
2092 val
* var227
/* : String */;
2093 static val
* varonce228
;
2094 val
* var229
/* : String */;
2095 char* var230
/* : NativeString */;
2096 val
* var231
/* : String */;
2097 val
* var232
/* : String */;
2098 val
* var233
/* : String */;
2102 var_with_virtual
= p3
;
2104 { /* Inline parser_nodes#AType#n_qid (var_ntype) on <var_ntype:AType> */
2105 var3
= var_ntype
->attrs
[COLOR_nitc__parser_nodes__AType___n_qid
].val
; /* _n_qid on <var_ntype:AType> */
2106 if (unlikely(var3
== NULL
)) {
2107 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_qid");
2108 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__parser_nodes
, 1709);
2116 { /* Inline parser_nodes#AQclassid#n_id (var1) on <var1:AQclassid> */
2117 var6
= var1
->attrs
[COLOR_nitc__parser_nodes__AQclassid___n_id
].val
; /* _n_id on <var1:AQclassid> */
2118 if (unlikely(var6
== NULL
)) {
2119 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
2120 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__parser_nodes
, 1668);
2128 var7
= nitc__lexer_work___Token___text(var4
);
2131 if (var_mclassdef
== NULL
) {
2132 var9
= 0; /* is null */
2134 var9
= 1; /* arg is null and recv is not */
2137 { /* Inline kernel#Object#!= (var_mclassdef,((val*)NULL)) on <var_mclassdef:nullable MClassDef> */
2138 var_other
= ((val
*)NULL
);
2140 var12
= ((short int(*)(val
* self
, val
* p0
))(var_mclassdef
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_mclassdef
, var_other
); /* == on <var_mclassdef:nullable MClassDef(MClassDef)>*/
2145 RET_LABEL11
:(void)0;
2151 var8
= var_with_virtual
;
2157 var14
= nitc___nitc__ModelBuilder___try_get_mproperty_by_name(self
, var_ntype
, var_mclassdef
, var_name
);
2159 /* <var14:nullable MProperty> isa nullable MVirtualTypeProp */
2160 cltype
= type_nullable__nitc__MVirtualTypeProp
.color
;
2161 idtype
= type_nullable__nitc__MVirtualTypeProp
.id
;
2165 if(cltype
>= var14
->type
->table_size
) {
2168 var15
= var14
->type
->type_table
[cltype
] == idtype
;
2171 if (unlikely(!var15
)) {
2172 var_class_name
= var14
== NULL ?
"null" : var14
->type
->name
;
2173 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable MVirtualTypeProp", var_class_name
);
2174 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 243);
2178 if (var_prop
== NULL
) {
2179 var16
= 0; /* is null */
2181 var16
= 1; /* arg is null and recv is not */
2184 { /* Inline kernel#Object#!= (var_prop,((val*)NULL)) on <var_prop:nullable MVirtualTypeProp> */
2185 var_other
= ((val
*)NULL
);
2187 var19
= ((short int(*)(val
* self
, val
* p0
))(var_prop
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_prop
, var_other
); /* == on <var_prop:nullable MVirtualTypeProp(MVirtualTypeProp)>*/
2192 RET_LABEL18
:(void)0;
2198 { /* Inline parser_nodes#AType#n_types (var_ntype) on <var_ntype:AType> */
2199 var23
= var_ntype
->attrs
[COLOR_nitc__parser_nodes__AType___n_types
].val
; /* _n_types on <var_ntype:AType> */
2200 if (unlikely(var23
== NULL
)) {
2201 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_types");
2202 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__parser_nodes
, 1715);
2206 RET_LABEL22
:(void)0;
2210 var24
= nitc___nitc__ANodes___core__abstract_collection__Collection__is_empty(var21
);
2214 if (unlikely(varonce
==NULL
)) {
2215 var26
= NEW_core__NativeArray(3l, &type_core__NativeArray__core__String
);
2216 if (likely(varonce27
!=NULL
)) {
2219 var29
= "Type Error: formal type `";
2220 var30
= core__flat___NativeString___to_s_full(var29
, 25l, 25l);
2224 ((struct instance_core__NativeArray
*)var26
)->values
[0]=var28
;
2225 if (likely(varonce31
!=NULL
)) {
2228 var33
= "` cannot have formal parameters.";
2229 var34
= core__flat___NativeString___to_s_full(var33
, 32l, 32l);
2233 ((struct instance_core__NativeArray
*)var26
)->values
[2]=var32
;
2238 ((struct instance_core__NativeArray
*)var26
)->values
[1]=var_name
;
2240 var35
= ((val
*(*)(val
* self
))(var26
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var26
); /* native_to_s on <var26:NativeArray[String]>*/
2244 nitc___nitc__ModelBuilder___error(self
, var_ntype
, var35
); /* Direct call modelbuilder_base#ModelBuilder#error on <self:ModelBuilder>*/
2249 { /* Inline model#MVirtualTypeProp#mvirtualtype (var_prop) on <var_prop:nullable MVirtualTypeProp(MVirtualTypeProp)> */
2250 var38
= var_prop
->attrs
[COLOR_nitc__model__MVirtualTypeProp___mvirtualtype
].val
; /* _mvirtualtype on <var_prop:nullable MVirtualTypeProp(MVirtualTypeProp)> */
2251 if (unlikely(var38
== NULL
)) {
2252 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mvirtualtype");
2253 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 2209);
2257 RET_LABEL37
:(void)0;
2262 { /* Inline parser_nodes#AType#n_kwnullable (var_ntype) on <var_ntype:AType> */
2263 var41
= var_ntype
->attrs
[COLOR_nitc__parser_nodes__AType___n_kwnullable
].val
; /* _n_kwnullable on <var_ntype:AType> */
2265 RET_LABEL40
:(void)0;
2268 if (var39
== NULL
) {
2269 var42
= 0; /* is null */
2271 var42
= 1; /* arg is null and recv is not */
2274 { /* Inline kernel#Object#!= (var39,((val*)NULL)) on <var39:nullable TKwnullable> */
2275 var_other
= ((val
*)NULL
);
2277 var45
= ((short int(*)(val
* self
, val
* p0
))(var39
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var39
, var_other
); /* == on <var39:nullable TKwnullable(TKwnullable)>*/
2282 RET_LABEL44
:(void)0;
2288 var47
= nitc___nitc__MType___as_nullable(var_res
);
2294 { /* Inline modelbuilder_base#AType#mtype= (var_ntype,var_res) on <var_ntype:AType> */
2295 var_ntype
->attrs
[COLOR_nitc__modelbuilder_base__AType___mtype
].val
= var_res
; /* _mtype on <var_ntype:AType> */
2296 RET_LABEL48
:(void)0;
2305 if (var_mclassdef
== NULL
) {
2306 var49
= 0; /* is null */
2308 var49
= 1; /* arg is null and recv is not */
2311 { /* Inline kernel#Object#!= (var_mclassdef,((val*)NULL)) on <var_mclassdef:nullable MClassDef> */
2312 var_other
= ((val
*)NULL
);
2314 var52
= ((short int(*)(val
* self
, val
* p0
))(var_mclassdef
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_mclassdef
, var_other
); /* == on <var_mclassdef:nullable MClassDef(MClassDef)>*/
2319 RET_LABEL51
:(void)0;
2325 { /* Inline model#MClassDef#mclass (var_mclassdef) on <var_mclassdef:nullable MClassDef(MClassDef)> */
2326 var56
= var_mclassdef
->attrs
[COLOR_nitc__model__MClassDef___mclass
].val
; /* _mclass on <var_mclassdef:nullable MClassDef(MClassDef)> */
2327 if (unlikely(var56
== NULL
)) {
2328 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
2329 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 576);
2333 RET_LABEL55
:(void)0;
2337 { /* Inline model#MClass#mparameters (var54) on <var54:MClass> */
2338 var59
= var54
->attrs
[COLOR_nitc__model__MClass___mparameters
].val
; /* _mparameters on <var54:MClass> */
2339 if (unlikely(var59
== NULL
)) {
2340 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mparameters");
2341 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 405);
2345 RET_LABEL58
:(void)0;
2350 var61
= core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(var_60
);
2355 var63
= ((short int(*)(val
* self
))((((long)var_62
&3)?class_info
[((long)var_62
&3)]:var_62
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_62
); /* is_ok on <var_62:IndexedIterator[MParameterType]>*/
2362 var64
= ((val
*(*)(val
* self
))((((long)var_62
&3)?class_info
[((long)var_62
&3)]:var_62
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_62
); /* item on <var_62:IndexedIterator[MParameterType]>*/
2366 { /* Inline model#MParameterType#name (var_p) on <var_p:MParameterType> */
2367 var67
= var_p
->attrs
[COLOR_nitc__model__MParameterType___name
].val
; /* _name on <var_p:MParameterType> */
2368 if (unlikely(var67
== NULL
)) {
2369 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _name");
2370 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 1507);
2374 RET_LABEL66
:(void)0;
2378 { /* Inline kernel#Object#!= (var65,var_name) on <var65:String> */
2379 var_other
= var_name
;
2381 var70
= ((short int(*)(val
* self
, val
* p0
))(var65
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var65
, var_other
); /* == on <var65:String>*/
2386 RET_LABEL69
:(void)0;
2394 { /* Inline parser_nodes#AType#n_types (var_ntype) on <var_ntype:AType> */
2395 var75
= var_ntype
->attrs
[COLOR_nitc__parser_nodes__AType___n_types
].val
; /* _n_types on <var_ntype:AType> */
2396 if (unlikely(var75
== NULL
)) {
2397 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_types");
2398 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__parser_nodes
, 1715);
2402 RET_LABEL74
:(void)0;
2406 var76
= nitc___nitc__ANodes___core__abstract_collection__Collection__is_empty(var73
);
2410 if (unlikely(varonce78
==NULL
)) {
2411 var79
= NEW_core__NativeArray(3l, &type_core__NativeArray__core__String
);
2412 if (likely(varonce80
!=NULL
)) {
2415 var82
= "Type Error: formal type `";
2416 var83
= core__flat___NativeString___to_s_full(var82
, 25l, 25l);
2420 ((struct instance_core__NativeArray
*)var79
)->values
[0]=var81
;
2421 if (likely(varonce84
!=NULL
)) {
2424 var86
= "` cannot have formal parameters.";
2425 var87
= core__flat___NativeString___to_s_full(var86
, 32l, 32l);
2429 ((struct instance_core__NativeArray
*)var79
)->values
[2]=var85
;
2434 ((struct instance_core__NativeArray
*)var79
)->values
[1]=var_name
;
2436 var88
= ((val
*(*)(val
* self
))(var79
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var79
); /* native_to_s on <var79:NativeArray[String]>*/
2440 nitc___nitc__ModelBuilder___error(self
, var_ntype
, var88
); /* Direct call modelbuilder_base#ModelBuilder#error on <self:ModelBuilder>*/
2446 { /* Inline parser_nodes#AType#n_kwnullable (var_ntype) on <var_ntype:AType> */
2447 var91
= var_ntype
->attrs
[COLOR_nitc__parser_nodes__AType___n_kwnullable
].val
; /* _n_kwnullable on <var_ntype:AType> */
2449 RET_LABEL90
:(void)0;
2452 if (var89
== NULL
) {
2453 var92
= 0; /* is null */
2455 var92
= 1; /* arg is null and recv is not */
2458 { /* Inline kernel#Object#!= (var89,((val*)NULL)) on <var89:nullable TKwnullable> */
2459 var_other
= ((val
*)NULL
);
2461 var95
= ((short int(*)(val
* self
, val
* p0
))(var89
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var89
, var_other
); /* == on <var89:nullable TKwnullable(TKwnullable)>*/
2466 RET_LABEL94
:(void)0;
2472 var97
= nitc___nitc__MType___as_nullable(var_res
);
2478 { /* Inline modelbuilder_base#AType#mtype= (var_ntype,var_res) on <var_ntype:AType> */
2479 var_ntype
->attrs
[COLOR_nitc__modelbuilder_base__AType___mtype
].val
= var_res
; /* _mtype on <var_ntype:AType> */
2480 RET_LABEL98
:(void)0;
2485 BREAK_label72
: (void)0;
2487 ((void(*)(val
* self
))((((long)var_62
&3)?class_info
[((long)var_62
&3)]:var_62
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_62
); /* next on <var_62:IndexedIterator[MParameterType]>*/
2490 BREAK_label
: (void)0;
2492 ((void(*)(val
* self
))((((long)var_62
&3)?class_info
[((long)var_62
&3)]:var_62
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_62
); /* finish on <var_62:IndexedIterator[MParameterType]>*/
2497 var99
= nitc___nitc__ModelBuilder___try_get_mclass_by_name(self
, var_ntype
, var_mmodule
, var_name
);
2500 if (var_mclass
== NULL
) {
2501 var100
= 0; /* is null */
2503 var100
= 1; /* arg is null and recv is not */
2506 { /* Inline kernel#Object#!= (var_mclass,((val*)NULL)) on <var_mclass:nullable MClass> */
2507 var_other
= ((val
*)NULL
);
2509 var103
= ((short int(*)(val
* self
, val
* p0
))(var_mclass
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_mclass
, var_other
); /* == on <var_mclass:nullable MClass(MClass)>*/
2514 RET_LABEL102
:(void)0;
2520 { /* Inline parser_nodes#AType#n_types (var_ntype) on <var_ntype:AType> */
2521 var107
= var_ntype
->attrs
[COLOR_nitc__parser_nodes__AType___n_types
].val
; /* _n_types on <var_ntype:AType> */
2522 if (unlikely(var107
== NULL
)) {
2523 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_types");
2524 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__parser_nodes
, 1715);
2528 RET_LABEL106
:(void)0;
2532 var108
= nitc___nitc__ANodes___core__abstract_collection__Collection__length(var105
);
2536 { /* Inline model#MClass#arity (var_mclass) on <var_mclass:nullable MClass(MClass)> */
2537 var111
= var_mclass
->attrs
[COLOR_nitc__model__MClass___arity
].l
; /* _arity on <var_mclass:nullable MClass(MClass)> */
2539 RET_LABEL110
:(void)0;
2543 { /* Inline kernel#Int#!= (var_arity,var109) on <var_arity:Int> */
2544 var114
= var_arity
== var109
;
2548 RET_LABEL113
:(void)0;
2553 { /* Inline kernel#Int#== (var_arity,0l) on <var_arity:Int> */
2554 var118
= var_arity
== 0l;
2557 RET_LABEL117
:(void)0;
2561 if (unlikely(varonce119
==NULL
)) {
2562 var120
= NEW_core__NativeArray(3l, &type_core__NativeArray__core__String
);
2563 if (likely(varonce121
!=NULL
)) {
2564 var122
= varonce121
;
2566 var123
= "Type Error: `";
2567 var124
= core__flat___NativeString___to_s_full(var123
, 13l, 13l);
2569 varonce121
= var122
;
2571 ((struct instance_core__NativeArray
*)var120
)->values
[0]=var122
;
2572 if (likely(varonce125
!=NULL
)) {
2573 var126
= varonce125
;
2575 var127
= "` is a generic class.";
2576 var128
= core__flat___NativeString___to_s_full(var127
, 21l, 21l);
2578 varonce125
= var126
;
2580 ((struct instance_core__NativeArray
*)var120
)->values
[2]=var126
;
2582 var120
= varonce119
;
2586 var129
= nitc___nitc__MClass___signature_to_s(var_mclass
);
2588 ((struct instance_core__NativeArray
*)var120
)->values
[1]=var129
;
2590 var130
= ((val
*(*)(val
* self
))(var120
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var120
); /* native_to_s on <var120:NativeArray[String]>*/
2592 varonce119
= var120
;
2594 nitc___nitc__ModelBuilder___error(self
, var_ntype
, var130
); /* Direct call modelbuilder_base#ModelBuilder#error on <self:ModelBuilder>*/
2598 { /* Inline model#MClass#arity (var_mclass) on <var_mclass:nullable MClass(MClass)> */
2599 var133
= var_mclass
->attrs
[COLOR_nitc__model__MClass___arity
].l
; /* _arity on <var_mclass:nullable MClass(MClass)> */
2601 RET_LABEL132
:(void)0;
2605 { /* Inline kernel#Int#== (var131,0l) on <var131:Int> */
2606 var136
= var131
== 0l;
2609 RET_LABEL135
:(void)0;
2613 if (unlikely(varonce137
==NULL
)) {
2614 var138
= NEW_core__NativeArray(3l, &type_core__NativeArray__core__String
);
2615 if (likely(varonce139
!=NULL
)) {
2616 var140
= varonce139
;
2618 var141
= "Type Error: `";
2619 var142
= core__flat___NativeString___to_s_full(var141
, 13l, 13l);
2621 varonce139
= var140
;
2623 ((struct instance_core__NativeArray
*)var138
)->values
[0]=var140
;
2624 if (likely(varonce143
!=NULL
)) {
2625 var144
= varonce143
;
2627 var145
= "` is not a generic class.";
2628 var146
= core__flat___NativeString___to_s_full(var145
, 25l, 25l);
2630 varonce143
= var144
;
2632 ((struct instance_core__NativeArray
*)var138
)->values
[2]=var144
;
2634 var138
= varonce137
;
2637 ((struct instance_core__NativeArray
*)var138
)->values
[1]=var_name
;
2639 var147
= ((val
*(*)(val
* self
))(var138
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var138
); /* native_to_s on <var138:NativeArray[String]>*/
2641 varonce137
= var138
;
2643 nitc___nitc__ModelBuilder___error(self
, var_ntype
, var147
); /* Direct call modelbuilder_base#ModelBuilder#error on <self:ModelBuilder>*/
2646 if (unlikely(varonce148
==NULL
)) {
2647 var149
= NEW_core__NativeArray(7l, &type_core__NativeArray__core__String
);
2648 if (likely(varonce150
!=NULL
)) {
2649 var151
= varonce150
;
2651 var152
= "Type Error: expected ";
2652 var153
= core__flat___NativeString___to_s_full(var152
, 21l, 21l);
2654 varonce150
= var151
;
2656 ((struct instance_core__NativeArray
*)var149
)->values
[0]=var151
;
2657 if (likely(varonce154
!=NULL
)) {
2658 var155
= varonce154
;
2660 var156
= " formal argument(s) for `";
2661 var157
= core__flat___NativeString___to_s_full(var156
, 25l, 25l);
2663 varonce154
= var155
;
2665 ((struct instance_core__NativeArray
*)var149
)->values
[2]=var155
;
2666 if (likely(varonce158
!=NULL
)) {
2667 var159
= varonce158
;
2670 var161
= core__flat___NativeString___to_s_full(var160
, 7l, 7l);
2672 varonce158
= var159
;
2674 ((struct instance_core__NativeArray
*)var149
)->values
[4]=var159
;
2675 if (likely(varonce162
!=NULL
)) {
2676 var163
= varonce162
;
2679 var165
= core__flat___NativeString___to_s_full(var164
, 1l, 1l);
2681 varonce162
= var163
;
2683 ((struct instance_core__NativeArray
*)var149
)->values
[6]=var163
;
2685 var149
= varonce148
;
2689 { /* Inline model#MClass#arity (var_mclass) on <var_mclass:nullable MClass(MClass)> */
2690 var168
= var_mclass
->attrs
[COLOR_nitc__model__MClass___arity
].l
; /* _arity on <var_mclass:nullable MClass(MClass)> */
2692 RET_LABEL167
:(void)0;
2695 var169
= core__flat___Int___core__abstract_text__Object__to_s(var166
);
2696 ((struct instance_core__NativeArray
*)var149
)->values
[1]=var169
;
2698 var170
= nitc___nitc__MClass___signature_to_s(var_mclass
);
2700 ((struct instance_core__NativeArray
*)var149
)->values
[3]=var170
;
2701 var171
= core__flat___Int___core__abstract_text__Object__to_s(var_arity
);
2702 ((struct instance_core__NativeArray
*)var149
)->values
[5]=var171
;
2704 var172
= ((val
*(*)(val
* self
))(var149
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var149
); /* native_to_s on <var149:NativeArray[String]>*/
2706 varonce148
= var149
;
2708 nitc___nitc__ModelBuilder___error(self
, var_ntype
, var172
); /* Direct call modelbuilder_base#ModelBuilder#error on <self:ModelBuilder>*/
2717 { /* Inline kernel#Int#== (var_arity,0l) on <var_arity:Int> */
2718 var175
= var_arity
== 0l;
2721 RET_LABEL174
:(void)0;
2726 { /* Inline model#MClass#mclass_type (var_mclass) on <var_mclass:nullable MClass(MClass)> */
2727 var178
= var_mclass
->attrs
[COLOR_nitc__model__MClass___mclass_type
].val
; /* _mclass_type on <var_mclass:nullable MClass(MClass)> */
2728 if (unlikely(var178
== NULL
)) {
2729 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
2730 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 507);
2734 RET_LABEL177
:(void)0;
2739 { /* Inline parser_nodes#AType#n_kwnullable (var_ntype) on <var_ntype:AType> */
2740 var181
= var_ntype
->attrs
[COLOR_nitc__parser_nodes__AType___n_kwnullable
].val
; /* _n_kwnullable on <var_ntype:AType> */
2742 RET_LABEL180
:(void)0;
2745 if (var179
== NULL
) {
2746 var182
= 0; /* is null */
2748 var182
= 1; /* arg is null and recv is not */
2751 { /* Inline kernel#Object#!= (var179,((val*)NULL)) on <var179:nullable TKwnullable> */
2752 var_other
= ((val
*)NULL
);
2754 var185
= ((short int(*)(val
* self
, val
* p0
))(var179
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var179
, var_other
); /* == on <var179:nullable TKwnullable(TKwnullable)>*/
2759 RET_LABEL184
:(void)0;
2765 var187
= nitc___nitc__MType___as_nullable(var_res
);
2771 { /* Inline modelbuilder_base#AType#mtype= (var_ntype,var_res) on <var_ntype:AType> */
2772 var_ntype
->attrs
[COLOR_nitc__modelbuilder_base__AType___mtype
].val
= var_res
; /* _mtype on <var_ntype:AType> */
2773 RET_LABEL188
:(void)0;
2779 var189
= NEW_core__Array(&type_core__Array__nitc__MType
);
2781 core___core__Array___core__kernel__Object__init(var189
); /* Direct call array#Array#init on <var189:Array[MType]>*/
2783 var_mtypes
= var189
;
2785 { /* Inline parser_nodes#AType#n_types (var_ntype) on <var_ntype:AType> */
2786 var192
= var_ntype
->attrs
[COLOR_nitc__parser_nodes__AType___n_types
].val
; /* _n_types on <var_ntype:AType> */
2787 if (unlikely(var192
== NULL
)) {
2788 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_types");
2789 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__parser_nodes
, 1715);
2793 RET_LABEL191
:(void)0;
2798 var194
= nitc___nitc__ANodes___core__abstract_collection__Collection__iterator(var_193
);
2803 var196
= ((short int(*)(val
* self
))((((long)var_195
&3)?class_info
[((long)var_195
&3)]:var_195
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_195
); /* is_ok on <var_195:Iterator[AType]>*/
2807 goto BREAK_label197
;
2810 var198
= ((val
*(*)(val
* self
))((((long)var_195
&3)?class_info
[((long)var_195
&3)]:var_195
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_195
); /* item on <var_195:Iterator[AType]>*/
2814 var199
= nitc___nitc__ModelBuilder___resolve_mtype_unchecked(self
, var_mmodule
, var_mclassdef
, var_nt
, var_with_virtual
);
2817 if (var_mt
== NULL
) {
2818 var200
= 1; /* is null */
2820 var200
= 0; /* arg is null but recv is not */
2823 { /* Inline kernel#Object#== (var_mt,((val*)NULL)) on <var_mt:nullable MType> */
2824 var_other203
= ((val
*)NULL
);
2826 { /* Inline kernel#Object#is_same_instance (var_mt,var_other203) on <var_mt:nullable MType(MType)> */
2827 var206
= var_mt
== var_other203
;
2830 RET_LABEL205
:(void)0;
2835 RET_LABEL202
:(void)0;
2845 core___core__Array___core__abstract_collection__SimpleCollection__add(var_mtypes
, var_mt
); /* Direct call array#Array#add on <var_mtypes:Array[MType]>*/
2848 ((void(*)(val
* self
))((((long)var_195
&3)?class_info
[((long)var_195
&3)]:var_195
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_195
); /* next on <var_195:Iterator[AType]>*/
2851 BREAK_label197
: (void)0;
2853 ((void(*)(val
* self
))((((long)var_195
&3)?class_info
[((long)var_195
&3)]:var_195
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_195
); /* finish on <var_195:Iterator[AType]>*/
2856 var207
= nitc___nitc__MClass___get_mtype(var_mclass
, var_mtypes
);
2860 { /* Inline parser_nodes#AType#n_kwnullable (var_ntype) on <var_ntype:AType> */
2861 var210
= var_ntype
->attrs
[COLOR_nitc__parser_nodes__AType___n_kwnullable
].val
; /* _n_kwnullable on <var_ntype:AType> */
2863 RET_LABEL209
:(void)0;
2866 if (var208
== NULL
) {
2867 var211
= 0; /* is null */
2869 var211
= 1; /* arg is null and recv is not */
2872 { /* Inline kernel#Object#!= (var208,((val*)NULL)) on <var208:nullable TKwnullable> */
2873 var_other
= ((val
*)NULL
);
2875 var214
= ((short int(*)(val
* self
, val
* p0
))(var208
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var208
, var_other
); /* == on <var208:nullable TKwnullable(TKwnullable)>*/
2880 RET_LABEL213
:(void)0;
2886 var216
= nitc___nitc__MType___as_nullable(var_res
);
2892 { /* Inline modelbuilder_base#AType#mtype= (var_ntype,var_res) on <var_ntype:AType> */
2893 var_ntype
->attrs
[COLOR_nitc__modelbuilder_base__AType___mtype
].val
= var_res
; /* _mtype on <var_ntype:AType> */
2894 RET_LABEL217
:(void)0;
2902 if (unlikely(varonce218
==NULL
)) {
2903 var219
= NEW_core__NativeArray(5l, &type_core__NativeArray__core__String
);
2904 if (likely(varonce220
!=NULL
)) {
2905 var221
= varonce220
;
2907 var222
= "Error: class `";
2908 var223
= core__flat___NativeString___to_s_full(var222
, 14l, 14l);
2910 varonce220
= var221
;
2912 ((struct instance_core__NativeArray
*)var219
)->values
[0]=var221
;
2913 if (likely(varonce224
!=NULL
)) {
2914 var225
= varonce224
;
2916 var226
= "` not found in module `";
2917 var227
= core__flat___NativeString___to_s_full(var226
, 23l, 23l);
2919 varonce224
= var225
;
2921 ((struct instance_core__NativeArray
*)var219
)->values
[2]=var225
;
2922 if (likely(varonce228
!=NULL
)) {
2923 var229
= varonce228
;
2926 var231
= core__flat___NativeString___to_s_full(var230
, 2l, 2l);
2928 varonce228
= var229
;
2930 ((struct instance_core__NativeArray
*)var219
)->values
[4]=var229
;
2932 var219
= varonce218
;
2935 ((struct instance_core__NativeArray
*)var219
)->values
[1]=var_name
;
2937 var232
= ((val
*(*)(val
* self
))(var_mmodule
->class->vft
[COLOR_core__abstract_text__Object__to_s
]))(var_mmodule
); /* to_s on <var_mmodule:MModule>*/
2939 ((struct instance_core__NativeArray
*)var219
)->values
[3]=var232
;
2941 var233
= ((val
*(*)(val
* self
))(var219
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var219
); /* native_to_s on <var219:NativeArray[String]>*/
2943 varonce218
= var219
;
2945 nitc___nitc__ModelBuilder___error(self
, var_ntype
, var233
); /* Direct call modelbuilder_base#ModelBuilder#error on <self:ModelBuilder>*/
2952 /* method modelbuilder_base#ModelBuilder#resolve_mtype for (self: ModelBuilder, MModule, nullable MClassDef, AType): nullable MType */
2953 val
* nitc___nitc__ModelBuilder___resolve_mtype(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
2954 val
* var
/* : nullable MType */;
2955 val
* var_mmodule
/* var mmodule: MModule */;
2956 val
* var_mclassdef
/* var mclassdef: nullable MClassDef */;
2957 val
* var_ntype
/* var ntype: AType */;
2958 val
* var1
/* : nullable MType */;
2959 val
* var3
/* : nullable MType */;
2960 val
* var_mtype
/* var mtype: nullable MType */;
2961 short int var4
/* : Bool */;
2962 short int var5
/* : Bool */;
2963 val
* var_other
/* var other: nullable Object */;
2964 short int var7
/* : Bool */;
2965 short int var9
/* : Bool */;
2966 val
* var10
/* : nullable MType */;
2967 short int var11
/* : Bool */;
2968 short int var12
/* : Bool */;
2969 short int var14
/* : Bool */;
2970 short int var16
/* : Bool */;
2971 short int var17
/* : Bool */;
2972 short int var19
/* : Bool */;
2973 short int var20
/* : Bool */;
2976 val
* var21
/* : MClass */;
2977 val
* var23
/* : MClass */;
2978 val
* var_mclass
/* var mclass: MClass */;
2979 long var_i
/* var i: Int */;
2980 long var24
/* : Int */;
2981 long var26
/* : Int */;
2982 long var_
/* var : Int */;
2983 short int var27
/* : Bool */;
2984 short int var29
/* : Bool */;
2987 const char* var_class_name
;
2988 short int var32
/* : Bool */;
2989 val
* var33
/* : nullable MClassDef */;
2990 val
* var_intro
/* var intro: nullable MClassDef */;
2991 short int var34
/* : Bool */;
2992 short int var35
/* : Bool */;
2993 short int var37
/* : Bool */;
2994 short int var39
/* : Bool */;
2995 val
* var40
/* : MClassType */;
2996 val
* var42
/* : MClassType */;
2997 val
* var43
/* : Array[MType] */;
2998 val
* var44
/* : nullable Object */;
2999 val
* var_bound
/* var bound: MType */;
3000 val
* var45
/* : ANodes[AType] */;
3001 val
* var47
/* : ANodes[AType] */;
3002 val
* var48
/* : ANode */;
3003 val
* var_nt
/* var nt: AType */;
3004 val
* var49
/* : nullable MType */;
3005 val
* var_mt
/* var mt: nullable MType */;
3006 short int var50
/* : Bool */;
3007 short int var51
/* : Bool */;
3008 short int var53
/* : Bool */;
3009 short int var55
/* : Bool */;
3010 short int var56
/* : Bool */;
3011 short int var57
/* : Bool */;
3012 val
* var_other59
/* var other: nullable Object */;
3013 short int var60
/* : Bool */;
3014 short int var61
/* : Bool */;
3015 val
* var62
/* : MClassType */;
3016 val
* var64
/* : MClassType */;
3017 val
* var_anchor
/* var anchor: nullable Object */;
3018 short int var65
/* : Bool */;
3019 short int var66
/* : Bool */;
3020 val
* var67
/* : NativeArray[String] */;
3021 static val
* varonce
;
3022 static val
* varonce68
;
3023 val
* var69
/* : String */;
3024 char* var70
/* : NativeString */;
3025 val
* var71
/* : String */;
3026 static val
* varonce72
;
3027 val
* var73
/* : String */;
3028 char* var74
/* : NativeString */;
3029 val
* var75
/* : String */;
3030 static val
* varonce76
;
3031 val
* var77
/* : String */;
3032 char* var78
/* : NativeString */;
3033 val
* var79
/* : String */;
3034 val
* var80
/* : String */;
3035 val
* var81
/* : String */;
3036 val
* var82
/* : String */;
3037 long var83
/* : Int */;
3042 { /* Inline modelbuilder_base#AType#mtype (var_ntype) on <var_ntype:AType> */
3043 var3
= var_ntype
->attrs
[COLOR_nitc__modelbuilder_base__AType___mtype
].val
; /* _mtype on <var_ntype:AType> */
3049 if (var_mtype
== NULL
) {
3050 var4
= 1; /* is null */
3052 var4
= 0; /* arg is null but recv is not */
3055 { /* Inline kernel#Object#== (var_mtype,((val*)NULL)) on <var_mtype:nullable MType> */
3056 var_other
= ((val
*)NULL
);
3058 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
3059 var9
= var_mtype
== var_other
;
3073 var10
= nitc___nitc__ModelBuilder___resolve_mtype_unchecked(self
, var_mmodule
, var_mclassdef
, var_ntype
, 1);
3078 if (var_mtype
== NULL
) {
3079 var11
= 1; /* is null */
3081 var11
= 0; /* arg is null but recv is not */
3084 { /* Inline kernel#Object#== (var_mtype,((val*)NULL)) on <var_mtype:nullable MType> */
3085 var_other
= ((val
*)NULL
);
3087 { /* Inline kernel#Object#is_same_instance (var_mtype,var_other) on <var_mtype:nullable MType(MType)> */
3088 var16
= var_mtype
== var_other
;
3091 RET_LABEL15
:(void)0;
3096 RET_LABEL13
:(void)0;
3106 { /* Inline modelbuilder_base#AType#checked_mtype (var_ntype) on <var_ntype:AType> */
3107 var19
= var_ntype
->attrs
[COLOR_nitc__modelbuilder_base__AType___checked_mtype
].s
; /* _checked_mtype on <var_ntype:AType> */
3109 RET_LABEL18
:(void)0;
3117 /* <var_mtype:nullable MType(MType)> isa MGenericType */
3118 cltype
= type_nitc__MGenericType
.color
;
3119 idtype
= type_nitc__MGenericType
.id
;
3120 if(cltype
>= var_mtype
->type
->table_size
) {
3123 var20
= var_mtype
->type
->type_table
[cltype
] == idtype
;
3127 { /* Inline model#MClassType#mclass (var_mtype) on <var_mtype:nullable MType(MGenericType)> */
3128 var23
= var_mtype
->attrs
[COLOR_nitc__model__MClassType___mclass
].val
; /* _mclass on <var_mtype:nullable MType(MGenericType)> */
3129 if (unlikely(var23
== NULL
)) {
3130 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
3131 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 1163);
3135 RET_LABEL22
:(void)0;
3141 { /* Inline model#MClass#arity (var_mclass) on <var_mclass:MClass> */
3142 var26
= var_mclass
->attrs
[COLOR_nitc__model__MClass___arity
].l
; /* _arity on <var_mclass:MClass> */
3144 RET_LABEL25
:(void)0;
3150 { /* Inline kernel#Int#< (var_i,var_) on <var_i:Int> */
3151 /* Covariant cast for argument 0 (i) <var_:Int> isa OTHER */
3152 /* <var_:Int> isa OTHER */
3153 var29
= 1; /* easy <var_:Int> isa OTHER*/
3154 if (unlikely(!var29
)) {
3155 var_class_name
= type_core__Int
.name
;
3156 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
3157 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 728);
3160 var32
= var_i
< var_
;
3163 RET_LABEL28
:(void)0;
3171 var33
= nitc___nitc__MClass___try_intro(var_mclass
);
3174 if (var_intro
== NULL
) {
3175 var34
= 1; /* is null */
3177 var34
= 0; /* arg is null but recv is not */
3180 { /* Inline kernel#Object#== (var_intro,((val*)NULL)) on <var_intro:nullable MClassDef> */
3181 var_other
= ((val
*)NULL
);
3183 { /* Inline kernel#Object#is_same_instance (var_intro,var_other) on <var_intro:nullable MClassDef(MClassDef)> */
3184 var39
= var_intro
== var_other
;
3187 RET_LABEL38
:(void)0;
3192 RET_LABEL36
:(void)0;
3202 { /* Inline model#MClassDef#bound_mtype (var_intro) on <var_intro:nullable MClassDef(MClassDef)> */
3203 var42
= var_intro
->attrs
[COLOR_nitc__model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var_intro:nullable MClassDef(MClassDef)> */
3204 if (unlikely(var42
== NULL
)) {
3205 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
3206 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 579);
3210 RET_LABEL41
:(void)0;
3214 var43
= ((val
*(*)(val
* self
))(var40
->class->vft
[COLOR_nitc__model__MClassType__arguments
]))(var40
); /* arguments on <var40:MClassType>*/
3217 var44
= core___core__Array___core__abstract_collection__SequenceRead___91d_93d(var43
, var_i
);
3221 { /* Inline parser_nodes#AType#n_types (var_ntype) on <var_ntype:AType> */
3222 var47
= var_ntype
->attrs
[COLOR_nitc__parser_nodes__AType___n_types
].val
; /* _n_types on <var_ntype:AType> */
3223 if (unlikely(var47
== NULL
)) {
3224 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_types");
3225 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__parser_nodes
, 1715);
3229 RET_LABEL46
:(void)0;
3233 var48
= nitc___nitc__ANodes___core__abstract_collection__SequenceRead___91d_93d(var45
, var_i
);
3237 var49
= nitc___nitc__ModelBuilder___resolve_mtype(self
, var_mmodule
, var_mclassdef
, var_nt
);
3240 if (var_mt
== NULL
) {
3241 var50
= 1; /* is null */
3243 var50
= 0; /* arg is null but recv is not */
3246 { /* Inline kernel#Object#== (var_mt,((val*)NULL)) on <var_mt:nullable MType> */
3247 var_other
= ((val
*)NULL
);
3249 { /* Inline kernel#Object#is_same_instance (var_mt,var_other) on <var_mt:nullable MType(MType)> */
3250 var55
= var_mt
== var_other
;
3253 RET_LABEL54
:(void)0;
3258 RET_LABEL52
:(void)0;
3267 if (var_mclassdef
== NULL
) {
3268 var56
= 0; /* is null */
3270 var56
= 1; /* arg is null and recv is not */
3273 { /* Inline kernel#Object#!= (var_mclassdef,((val*)NULL)) on <var_mclassdef:nullable MClassDef> */
3274 var_other59
= ((val
*)NULL
);
3276 var60
= ((short int(*)(val
* self
, val
* p0
))(var_mclassdef
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_mclassdef
, var_other59
); /* == on <var_mclassdef:nullable MClassDef(MClassDef)>*/
3281 RET_LABEL58
:(void)0;
3287 { /* Inline model#MClassDef#bound_mtype (var_mclassdef) on <var_mclassdef:nullable MClassDef(MClassDef)> */
3288 var64
= var_mclassdef
->attrs
[COLOR_nitc__model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var_mclassdef:nullable MClassDef(MClassDef)> */
3289 if (unlikely(var64
== NULL
)) {
3290 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
3291 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__model
, 579);
3295 RET_LABEL63
:(void)0;
3300 var_anchor
= ((val
*)NULL
);
3303 var65
= nitc___nitc__ModelBuilder___check_subtype(self
, var_nt
, var_mmodule
, var_anchor
, var_mt
, var_bound
);
3307 if (unlikely(varonce
==NULL
)) {
3308 var67
= NEW_core__NativeArray(5l, &type_core__NativeArray__core__String
);
3309 if (likely(varonce68
!=NULL
)) {
3312 var70
= "Type Error: expected `";
3313 var71
= core__flat___NativeString___to_s_full(var70
, 22l, 22l);
3317 ((struct instance_core__NativeArray
*)var67
)->values
[0]=var69
;
3318 if (likely(varonce72
!=NULL
)) {
3322 var75
= core__flat___NativeString___to_s_full(var74
, 8l, 8l);
3326 ((struct instance_core__NativeArray
*)var67
)->values
[2]=var73
;
3327 if (likely(varonce76
!=NULL
)) {
3331 var79
= core__flat___NativeString___to_s_full(var78
, 2l, 2l);
3335 ((struct instance_core__NativeArray
*)var67
)->values
[4]=var77
;
3341 var80
= ((val
*(*)(val
* self
))(var_bound
->class->vft
[COLOR_core__abstract_text__Object__to_s
]))(var_bound
); /* to_s on <var_bound:MType>*/
3343 ((struct instance_core__NativeArray
*)var67
)->values
[1]=var80
;
3345 var81
= ((val
*(*)(val
* self
))(var_mt
->class->vft
[COLOR_core__abstract_text__Object__to_s
]))(var_mt
); /* to_s on <var_mt:nullable MType(MType)>*/
3347 ((struct instance_core__NativeArray
*)var67
)->values
[3]=var81
;
3349 var82
= ((val
*(*)(val
* self
))(var67
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var67
); /* native_to_s on <var67:NativeArray[String]>*/
3353 nitc___nitc__ModelBuilder___error(self
, var_nt
, var82
); /* Direct call modelbuilder_base#ModelBuilder#error on <self:ModelBuilder>*/
3360 var83
= core___core__Int___Discrete__successor(var_i
, 1l);
3364 BREAK_label
: (void)0;
3368 { /* Inline modelbuilder_base#AType#checked_mtype= (var_ntype,1) on <var_ntype:AType> */
3369 var_ntype
->attrs
[COLOR_nitc__modelbuilder_base__AType___checked_mtype
].s
= 1; /* _checked_mtype on <var_ntype:AType> */
3370 RET_LABEL84
:(void)0;
3378 /* method modelbuilder_base#ModelBuilder#check_subtype for (self: ModelBuilder, ANode, MModule, nullable MClassType, MType, MType): Bool */
3379 short int nitc___nitc__ModelBuilder___check_subtype(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
, val
* p4
) {
3380 short int var
/* : Bool */;
3381 val
* var_node
/* var node: ANode */;
3382 val
* var_mmodule
/* var mmodule: MModule */;
3383 val
* var_anchor
/* var anchor: nullable MClassType */;
3384 val
* var_sub
/* var sub: MType */;
3385 val
* var_sup
/* var sup: MType */;
3386 short int var1
/* : Bool */;
3393 var1
= nitc___nitc__MType___is_subtype(var_sub
, var_mmodule
, var_anchor
, var_sup
);
3400 /* method modelbuilder_base#ModelBuilder#check_sametype for (self: ModelBuilder, ANode, MModule, nullable MClassType, MType, MType): Bool */
3401 short int nitc___nitc__ModelBuilder___check_sametype(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
, val
* p4
) {
3402 short int var
/* : Bool */;
3403 val
* var_node
/* var node: ANode */;
3404 val
* var_mmodule
/* var mmodule: MModule */;
3405 val
* var_anchor
/* var anchor: nullable MClassType */;
3406 val
* var_sub
/* var sub: MType */;
3407 val
* var_sup
/* var sup: MType */;
3408 short int var1
/* : Bool */;
3409 short int var2
/* : Bool */;
3410 short int var_
/* var : Bool */;
3411 short int var3
/* : Bool */;
3418 var2
= nitc___nitc__MType___is_subtype(var_sub
, var_mmodule
, var_anchor
, var_sup
);
3423 var3
= nitc___nitc__MType___is_subtype(var_sup
, var_mmodule
, var_anchor
, var_sub
);
3434 /* method modelbuilder_base#ANode#is_broken for (self: ANode): Bool */
3435 short int nitc__modelbuilder_base___ANode___is_broken(val
* self
) {
3436 short int var
/* : Bool */;
3437 short int var1
/* : Bool */;
3438 var1
= self
->attrs
[COLOR_nitc__modelbuilder_base__ANode___is_broken
].s
; /* _is_broken on <self:ANode> */
3443 /* method modelbuilder_base#ANode#is_broken= for (self: ANode, Bool) */
3444 void nitc__modelbuilder_base___ANode___is_broken_61d(val
* self
, short int p0
) {
3445 self
->attrs
[COLOR_nitc__modelbuilder_base__ANode___is_broken
].s
= p0
; /* _is_broken on <self:ANode> */
3448 /* method modelbuilder_base#AType#mtype for (self: AType): nullable MType */
3449 val
* nitc__modelbuilder_base___AType___mtype(val
* self
) {
3450 val
* var
/* : nullable MType */;
3451 val
* var1
/* : nullable MType */;
3452 var1
= self
->attrs
[COLOR_nitc__modelbuilder_base__AType___mtype
].val
; /* _mtype on <self:AType> */
3457 /* method modelbuilder_base#AType#mtype= for (self: AType, nullable MType) */
3458 void nitc__modelbuilder_base___AType___mtype_61d(val
* self
, val
* p0
) {
3459 self
->attrs
[COLOR_nitc__modelbuilder_base__AType___mtype
].val
= p0
; /* _mtype on <self:AType> */
3462 /* method modelbuilder_base#AType#checked_mtype for (self: AType): Bool */
3463 short int nitc__modelbuilder_base___AType___checked_mtype(val
* self
) {
3464 short int var
/* : Bool */;
3465 short int var1
/* : Bool */;
3466 var1
= self
->attrs
[COLOR_nitc__modelbuilder_base__AType___checked_mtype
].s
; /* _checked_mtype on <self:AType> */
3471 /* method modelbuilder_base#AType#checked_mtype= for (self: AType, Bool) */
3472 void nitc__modelbuilder_base___AType___checked_mtype_61d(val
* self
, short int p0
) {
3473 self
->attrs
[COLOR_nitc__modelbuilder_base__AType___checked_mtype
].s
= p0
; /* _checked_mtype on <self:AType> */
3476 /* method modelbuilder_base#AIntrudeVisibility#mvisibility for (self: AIntrudeVisibility): MVisibility */
3477 val
* nitc__modelbuilder_base___AIntrudeVisibility___AVisibility__mvisibility(val
* self
) {
3478 val
* var
/* : MVisibility */;
3479 val
* var1
/* : Sys */;
3480 val
* var2
/* : MVisibility */;
3483 var2
= nitc__model_base___core__Sys___intrude_visibility(var1
);
3490 /* method modelbuilder_base#APublicVisibility#mvisibility for (self: APublicVisibility): MVisibility */
3491 val
* nitc__modelbuilder_base___APublicVisibility___AVisibility__mvisibility(val
* self
) {
3492 val
* var
/* : MVisibility */;
3493 val
* var1
/* : Sys */;
3494 val
* var2
/* : MVisibility */;
3497 var2
= nitc__model_base___core__Sys___public_visibility(var1
);
3504 /* method modelbuilder_base#AProtectedVisibility#mvisibility for (self: AProtectedVisibility): MVisibility */
3505 val
* nitc__modelbuilder_base___AProtectedVisibility___AVisibility__mvisibility(val
* self
) {
3506 val
* var
/* : MVisibility */;
3507 val
* var1
/* : Sys */;
3508 val
* var2
/* : MVisibility */;
3511 var2
= nitc__model_base___core__Sys___protected_visibility(var1
);
3518 /* method modelbuilder_base#APrivateVisibility#mvisibility for (self: APrivateVisibility): MVisibility */
3519 val
* nitc__modelbuilder_base___APrivateVisibility___AVisibility__mvisibility(val
* self
) {
3520 val
* var
/* : MVisibility */;
3521 val
* var1
/* : Sys */;
3522 val
* var2
/* : MVisibility */;
3525 var2
= nitc__model_base___core__Sys___private_visibility(var1
);
3532 /* method modelbuilder_base#ADoc#mdoc_cache for (self: ADoc): nullable MDoc */
3533 val
* nitc__modelbuilder_base___ADoc___mdoc_cache(val
* self
) {
3534 val
* var
/* : nullable MDoc */;
3535 val
* var1
/* : nullable MDoc */;
3536 var1
= self
->attrs
[COLOR_nitc__modelbuilder_base__ADoc___mdoc_cache
].val
; /* _mdoc_cache on <self:ADoc> */
3541 /* method modelbuilder_base#ADoc#mdoc_cache= for (self: ADoc, nullable MDoc) */
3542 void nitc__modelbuilder_base___ADoc___mdoc_cache_61d(val
* self
, val
* p0
) {
3543 self
->attrs
[COLOR_nitc__modelbuilder_base__ADoc___mdoc_cache
].val
= p0
; /* _mdoc_cache on <self:ADoc> */
3546 /* method modelbuilder_base#ADoc#to_mdoc for (self: ADoc): MDoc */
3547 val
* nitc__modelbuilder_base___ADoc___to_mdoc(val
* self
) {
3548 val
* var
/* : MDoc */;
3549 val
* var1
/* : nullable MDoc */;
3550 val
* var3
/* : nullable MDoc */;
3551 val
* var_res
/* var res: nullable MDoc */;
3552 short int var4
/* : Bool */;
3553 short int var5
/* : Bool */;
3554 val
* var_other
/* var other: nullable Object */;
3555 short int var7
/* : Bool */;
3556 short int var8
/* : Bool */;
3557 val
* var9
/* : MDoc */;
3558 val
* var10
/* : Location */;
3559 val
* var12
/* : Location */;
3560 val
* var13
/* : ANodes[TComment] */;
3561 val
* var15
/* : ANodes[TComment] */;
3562 val
* var_
/* var : ANodes[TComment] */;
3563 val
* var16
/* : Iterator[ANode] */;
3564 val
* var_17
/* var : Iterator[TComment] */;
3565 short int var18
/* : Bool */;
3566 val
* var19
/* : nullable Object */;
3567 val
* var_c
/* var c: TComment */;
3568 val
* var20
/* : String */;
3569 val
* var_text
/* var text: String */;
3570 long var21
/* : Int */;
3571 short int var22
/* : Bool */;
3572 short int var24
/* : Bool */;
3575 const char* var_class_name
;
3576 short int var25
/* : Bool */;
3577 val
* var26
/* : Array[String] */;
3578 val
* var28
/* : Array[String] */;
3579 static val
* varonce
;
3580 val
* var29
/* : String */;
3581 char* var30
/* : NativeString */;
3582 val
* var31
/* : String */;
3583 val
* var33
/* : SequenceRead[Char] */;
3584 val
* var34
/* : nullable Object */;
3585 short int var35
/* : Bool */;
3586 short int var37
/* : Bool */;
3587 uint32_t var38
/* : Char */;
3588 val
* var39
/* : SequenceRead[Char] */;
3589 val
* var40
/* : nullable Object */;
3590 short int var41
/* : Bool */;
3591 short int var43
/* : Bool */;
3592 uint32_t var44
/* : Char */;
3593 val
* var45
/* : Text */;
3594 val
* var46
/* : Text */;
3595 val
* var47
/* : SequenceRead[Char] */;
3596 val
* var48
/* : nullable Object */;
3597 short int var49
/* : Bool */;
3598 short int var51
/* : Bool */;
3599 uint32_t var52
/* : Char */;
3600 long var53
/* : Int */;
3601 long var54
/* : Int */;
3602 short int var56
/* : Bool */;
3605 const char* var_class_name59
;
3606 long var60
/* : Int */;
3607 val
* var61
/* : Text */;
3608 val
* var62
/* : Array[String] */;
3609 val
* var64
/* : Array[String] */;
3611 { /* Inline modelbuilder_base#ADoc#mdoc_cache (self) on <self:ADoc> */
3612 var3
= self
->attrs
[COLOR_nitc__modelbuilder_base__ADoc___mdoc_cache
].val
; /* _mdoc_cache on <self:ADoc> */
3618 if (var_res
== NULL
) {
3619 var4
= 0; /* is null */
3621 var4
= 1; /* arg is null and recv is not */
3624 { /* Inline kernel#Object#!= (var_res,((val*)NULL)) on <var_res:nullable MDoc> */
3625 var_other
= ((val
*)NULL
);
3627 var7
= ((short int(*)(val
* self
, val
* p0
))(var_res
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_res
, var_other
); /* == on <var_res:nullable MDoc(MDoc)>*/
3641 var9
= NEW_nitc__MDoc(&type_nitc__MDoc
);
3643 { /* Inline parser_nodes#ANode#location (self) on <self:ADoc> */
3644 var12
= self
->attrs
[COLOR_nitc__parser_nodes__ANode___location
].val
; /* _location on <self:ADoc> */
3645 if (unlikely(var12
== NULL
)) {
3646 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _location");
3647 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__parser_nodes
, 24);
3651 RET_LABEL11
:(void)0;
3655 ((void(*)(val
* self
, val
* p0
))(var9
->class->vft
[COLOR_nitc__mdoc__MDoc__location_61d
]))(var9
, var10
); /* location= on <var9:MDoc>*/
3658 ((void(*)(val
* self
))(var9
->class->vft
[COLOR_core__kernel__Object__init
]))(var9
); /* init on <var9:MDoc>*/
3662 { /* Inline parser_nodes#ADoc#n_comment (self) on <self:ADoc> */
3663 var15
= self
->attrs
[COLOR_nitc__parser_nodes__ADoc___n_comment
].val
; /* _n_comment on <self:ADoc> */
3664 if (unlikely(var15
== NULL
)) {
3665 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_comment");
3666 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__parser_nodes
, 2883);
3670 RET_LABEL14
:(void)0;
3675 var16
= nitc___nitc__ANodes___core__abstract_collection__Collection__iterator(var_
);
3680 var18
= ((short int(*)(val
* self
))((((long)var_17
&3)?class_info
[((long)var_17
&3)]:var_17
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_17
); /* is_ok on <var_17:Iterator[TComment]>*/
3687 var19
= ((val
*(*)(val
* self
))((((long)var_17
&3)?class_info
[((long)var_17
&3)]:var_17
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_17
); /* item on <var_17:Iterator[TComment]>*/
3691 var20
= nitc__lexer_work___Token___text(var_c
);
3695 var21
= ((long(*)(val
* self
))(var_text
->class->vft
[COLOR_core__abstract_text__Text__length
]))(var_text
); /* length on <var_text:String>*/
3698 { /* Inline kernel#Int#< (var21,2l) on <var21:Int> */
3699 /* Covariant cast for argument 0 (i) <2l:Int> isa OTHER */
3700 /* <2l:Int> isa OTHER */
3701 var24
= 1; /* easy <2l:Int> isa OTHER*/
3702 if (unlikely(!var24
)) {
3703 var_class_name
= type_core__Int
.name
;
3704 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
3705 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 728);
3711 RET_LABEL23
:(void)0;
3716 { /* Inline mdoc#MDoc#content (var_res) on <var_res:nullable MDoc(MDoc)> */
3717 var28
= var_res
->attrs
[COLOR_nitc__mdoc__MDoc___content
].val
; /* _content on <var_res:nullable MDoc(MDoc)> */
3718 if (unlikely(var28
== NULL
)) {
3719 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _content");
3720 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__mdoc
, 23);
3724 RET_LABEL27
:(void)0;
3727 if (likely(varonce
!=NULL
)) {
3731 var31
= core__flat___NativeString___to_s_full(var30
, 0l, 0l);
3736 core___core__Array___core__abstract_collection__SimpleCollection__add(var26
, var29
); /* Direct call array#Array#add on <var26:Array[String]>*/
3742 var33
= ((val
*(*)(val
* self
))(var_text
->class->vft
[COLOR_core__abstract_text__Text__chars
]))(var_text
); /* chars on <var_text:String>*/
3745 var34
= ((val
*(*)(val
* self
, long p0
))((((long)var33
&3)?class_info
[((long)var33
&3)]:var33
->class)->vft
[COLOR_core__abstract_collection__SequenceRead___91d_93d
]))(var33
, 0l); /* [] on <var33:SequenceRead[Char]>*/
3748 { /* Inline kernel#Char#== (var34,'#') on <var34:nullable Object(Char)> */
3749 var38
= (uint32_t)((long)(var34
)>>2);
3750 var37
= var38
== '#';
3753 RET_LABEL36
:(void)0;
3756 if (unlikely(!var35
)) {
3757 PRINT_ERROR("Runtime error: %s", "Assert failed");
3758 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__modelbuilder_base
, 418);
3762 var39
= ((val
*(*)(val
* self
))(var_text
->class->vft
[COLOR_core__abstract_text__Text__chars
]))(var_text
); /* chars on <var_text:String>*/
3765 var40
= ((val
*(*)(val
* self
, long p0
))((((long)var39
&3)?class_info
[((long)var39
&3)]:var39
->class)->vft
[COLOR_core__abstract_collection__SequenceRead___91d_93d
]))(var39
, 1l); /* [] on <var39:SequenceRead[Char]>*/
3768 { /* Inline kernel#Char#== (var40,' ') on <var40:nullable Object(Char)> */
3769 var44
= (uint32_t)((long)(var40
)>>2);
3770 var43
= var44
== ' ';
3773 RET_LABEL42
:(void)0;
3778 var45
= ((val
*(*)(val
* self
, long p0
))(var_text
->class->vft
[COLOR_core__abstract_text__Text__substring_from
]))(var_text
, 2l); /* substring_from on <var_text:String>*/
3783 var46
= ((val
*(*)(val
* self
, long p0
))(var_text
->class->vft
[COLOR_core__abstract_text__Text__substring_from
]))(var_text
, 1l); /* substring_from on <var_text:String>*/
3788 var47
= ((val
*(*)(val
* self
))(var_text
->class->vft
[COLOR_core__abstract_text__Text__chars
]))(var_text
); /* chars on <var_text:String>*/
3791 var48
= ((val
*(*)(val
* self
))((((long)var47
&3)?class_info
[((long)var47
&3)]:var47
->class)->vft
[COLOR_core__abstract_collection__SequenceRead__last
]))(var47
); /* last on <var47:SequenceRead[Char]>*/
3794 { /* Inline kernel#Char#== (var48,'\n') on <var48:nullable Object(Char)> */
3795 var52
= (uint32_t)((long)(var48
)>>2);
3796 var51
= var52
== '\n';
3799 RET_LABEL50
:(void)0;
3804 var53
= ((long(*)(val
* self
))(var_text
->class->vft
[COLOR_core__abstract_text__Text__length
]))(var_text
); /* length on <var_text:String>*/
3807 { /* Inline kernel#Int#- (var53,1l) on <var53:Int> */
3808 /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */
3809 /* <1l:Int> isa OTHER */
3810 var56
= 1; /* easy <1l:Int> isa OTHER*/
3811 if (unlikely(!var56
)) {
3812 var_class_name59
= type_core__Int
.name
;
3813 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name59
);
3814 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 734);
3820 RET_LABEL55
:(void)0;
3824 var61
= ((val
*(*)(val
* self
, long p0
, long p1
))(var_text
->class->vft
[COLOR_core__abstract_text__Text__substring
]))(var_text
, 0l, var54
); /* substring on <var_text:String>*/
3830 { /* Inline mdoc#MDoc#content (var_res) on <var_res:nullable MDoc(MDoc)> */
3831 var64
= var_res
->attrs
[COLOR_nitc__mdoc__MDoc___content
].val
; /* _content on <var_res:nullable MDoc(MDoc)> */
3832 if (unlikely(var64
== NULL
)) {
3833 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _content");
3834 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__mdoc
, 23);
3838 RET_LABEL63
:(void)0;
3842 core___core__Array___core__abstract_collection__SimpleCollection__add(var62
, var_text
); /* Direct call array#Array#add on <var62:Array[String]>*/
3844 BREAK_label32
: (void)0;
3846 ((void(*)(val
* self
))((((long)var_17
&3)?class_info
[((long)var_17
&3)]:var_17
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_17
); /* next on <var_17:Iterator[TComment]>*/
3849 BREAK_label
: (void)0;
3851 ((void(*)(val
* self
))((((long)var_17
&3)?class_info
[((long)var_17
&3)]:var_17
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_17
); /* finish on <var_17:Iterator[TComment]>*/
3854 { /* Inline modelbuilder_base#ADoc#mdoc_cache= (self,var_res) on <self:ADoc> */
3855 self
->attrs
[COLOR_nitc__modelbuilder_base__ADoc___mdoc_cache
].val
= var_res
; /* _mdoc_cache on <self:ADoc> */
3856 RET_LABEL65
:(void)0;