1 #include "nit__separate_compiler.sep.0.h"
2 /* method separate_compiler#ToolContext#opt_separate for (self: ToolContext): OptionBool */
3 val
* nit__separate_compiler___ToolContext___opt_separate(val
* self
) {
4 val
* var
/* : OptionBool */;
5 val
* var1
/* : OptionBool */;
6 var1
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_separate
].val
; /* _opt_separate on <self:ToolContext> */
7 if (unlikely(var1
== NULL
)) {
8 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_separate");
9 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 24);
16 /* method separate_compiler#ToolContext#opt_no_inline_intern for (self: ToolContext): OptionBool */
17 val
* nit__separate_compiler___ToolContext___opt_no_inline_intern(val
* self
) {
18 val
* var
/* : OptionBool */;
19 val
* var1
/* : OptionBool */;
20 var1
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_no_inline_intern
].val
; /* _opt_no_inline_intern on <self:ToolContext> */
21 if (unlikely(var1
== NULL
)) {
22 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_inline_intern");
23 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 26);
30 /* method separate_compiler#ToolContext#opt_no_union_attribute for (self: ToolContext): OptionBool */
31 val
* nit__separate_compiler___ToolContext___opt_no_union_attribute(val
* self
) {
32 val
* var
/* : OptionBool */;
33 val
* var1
/* : OptionBool */;
34 var1
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_no_union_attribute
].val
; /* _opt_no_union_attribute on <self:ToolContext> */
35 if (unlikely(var1
== NULL
)) {
36 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_union_attribute");
37 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 28);
44 /* method separate_compiler#ToolContext#opt_no_shortcut_equate for (self: ToolContext): OptionBool */
45 val
* nit__separate_compiler___ToolContext___opt_no_shortcut_equate(val
* self
) {
46 val
* var
/* : OptionBool */;
47 val
* var1
/* : OptionBool */;
48 var1
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_no_shortcut_equate
].val
; /* _opt_no_shortcut_equate on <self:ToolContext> */
49 if (unlikely(var1
== NULL
)) {
50 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_shortcut_equate");
51 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 30);
58 /* method separate_compiler#ToolContext#opt_colors_are_symbols for (self: ToolContext): OptionBool */
59 val
* nit__separate_compiler___ToolContext___opt_colors_are_symbols(val
* self
) {
60 val
* var
/* : OptionBool */;
61 val
* var1
/* : OptionBool */;
62 var1
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_colors_are_symbols
].val
; /* _opt_colors_are_symbols on <self:ToolContext> */
63 if (unlikely(var1
== NULL
)) {
64 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_colors_are_symbols");
65 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 32);
72 /* method separate_compiler#ToolContext#opt_inline_coloring_numbers for (self: ToolContext): OptionBool */
73 val
* nit__separate_compiler___ToolContext___opt_inline_coloring_numbers(val
* self
) {
74 val
* var
/* : OptionBool */;
75 val
* var1
/* : OptionBool */;
76 var1
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_inline_coloring_numbers
].val
; /* _opt_inline_coloring_numbers on <self:ToolContext> */
77 if (unlikely(var1
== NULL
)) {
78 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_coloring_numbers");
79 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 35);
86 /* method separate_compiler#ToolContext#opt_inline_some_methods for (self: ToolContext): OptionBool */
87 val
* nit__separate_compiler___ToolContext___opt_inline_some_methods(val
* self
) {
88 val
* var
/* : OptionBool */;
89 val
* var1
/* : OptionBool */;
90 var1
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_inline_some_methods
].val
; /* _opt_inline_some_methods on <self:ToolContext> */
91 if (unlikely(var1
== NULL
)) {
92 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_some_methods");
93 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 37);
100 /* method separate_compiler#ToolContext#opt_direct_call_monomorph for (self: ToolContext): OptionBool */
101 val
* nit__separate_compiler___ToolContext___opt_direct_call_monomorph(val
* self
) {
102 val
* var
/* : OptionBool */;
103 val
* var1
/* : OptionBool */;
104 var1
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_direct_call_monomorph
].val
; /* _opt_direct_call_monomorph on <self:ToolContext> */
105 if (unlikely(var1
== NULL
)) {
106 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_direct_call_monomorph");
107 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 39);
114 /* method separate_compiler#ToolContext#opt_skip_dead_methods for (self: ToolContext): OptionBool */
115 val
* nit__separate_compiler___ToolContext___opt_skip_dead_methods(val
* self
) {
116 val
* var
/* : OptionBool */;
117 val
* var1
/* : OptionBool */;
118 var1
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_skip_dead_methods
].val
; /* _opt_skip_dead_methods on <self:ToolContext> */
119 if (unlikely(var1
== NULL
)) {
120 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_skip_dead_methods");
121 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 41);
128 /* method separate_compiler#ToolContext#opt_semi_global for (self: ToolContext): OptionBool */
129 val
* nit__separate_compiler___ToolContext___opt_semi_global(val
* self
) {
130 val
* var
/* : OptionBool */;
131 val
* var1
/* : OptionBool */;
132 var1
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_semi_global
].val
; /* _opt_semi_global on <self:ToolContext> */
133 if (unlikely(var1
== NULL
)) {
134 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_semi_global");
135 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 43);
142 /* method separate_compiler#ToolContext#opt_colo_dead_methods for (self: ToolContext): OptionBool */
143 val
* nit__separate_compiler___ToolContext___opt_colo_dead_methods(val
* self
) {
144 val
* var
/* : OptionBool */;
145 val
* var1
/* : OptionBool */;
146 var1
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_colo_dead_methods
].val
; /* _opt_colo_dead_methods on <self:ToolContext> */
147 if (unlikely(var1
== NULL
)) {
148 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_colo_dead_methods");
149 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 45);
156 /* method separate_compiler#ToolContext#opt_tables_metrics for (self: ToolContext): OptionBool */
157 val
* nit__separate_compiler___ToolContext___opt_tables_metrics(val
* self
) {
158 val
* var
/* : OptionBool */;
159 val
* var1
/* : OptionBool */;
160 var1
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_tables_metrics
].val
; /* _opt_tables_metrics on <self:ToolContext> */
161 if (unlikely(var1
== NULL
)) {
162 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_tables_metrics");
163 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 47);
170 /* method separate_compiler#ToolContext#init for (self: ToolContext) */
171 void nit__separate_compiler___ToolContext___standard__kernel__Object__init(val
* self
) {
172 val
* var
/* : OptionContext */;
173 val
* var2
/* : OptionContext */;
174 val
* var3
/* : OptionBool */;
175 val
* var5
/* : OptionBool */;
176 val
* var6
/* : Array[Option] */;
177 long var7
/* : Int */;
178 val
* var8
/* : NativeArray[Option] */;
179 val
* var9
/* : OptionContext */;
180 val
* var11
/* : OptionContext */;
181 val
* var12
/* : OptionBool */;
182 val
* var14
/* : OptionBool */;
183 val
* var15
/* : Array[Option] */;
184 long var16
/* : Int */;
185 val
* var17
/* : NativeArray[Option] */;
186 val
* var18
/* : OptionContext */;
187 val
* var20
/* : OptionContext */;
188 val
* var21
/* : OptionBool */;
189 val
* var23
/* : OptionBool */;
190 val
* var24
/* : Array[Option] */;
191 long var25
/* : Int */;
192 val
* var26
/* : NativeArray[Option] */;
193 val
* var27
/* : OptionContext */;
194 val
* var29
/* : OptionContext */;
195 val
* var30
/* : OptionBool */;
196 val
* var32
/* : OptionBool */;
197 val
* var33
/* : OptionBool */;
198 val
* var35
/* : OptionBool */;
199 val
* var36
/* : Array[Option] */;
200 long var37
/* : Int */;
201 val
* var38
/* : NativeArray[Option] */;
202 val
* var39
/* : OptionContext */;
203 val
* var41
/* : OptionContext */;
204 val
* var42
/* : OptionBool */;
205 val
* var44
/* : OptionBool */;
206 val
* var45
/* : OptionBool */;
207 val
* var47
/* : OptionBool */;
208 val
* var48
/* : OptionBool */;
209 val
* var50
/* : OptionBool */;
210 val
* var51
/* : OptionBool */;
211 val
* var53
/* : OptionBool */;
212 val
* var54
/* : OptionBool */;
213 val
* var56
/* : OptionBool */;
214 val
* var57
/* : Array[Option] */;
215 long var58
/* : Int */;
216 val
* var59
/* : NativeArray[Option] */;
217 val
* var60
/* : OptionContext */;
218 val
* var62
/* : OptionContext */;
219 val
* var63
/* : OptionBool */;
220 val
* var65
/* : OptionBool */;
221 val
* var66
/* : Array[Option] */;
222 long var67
/* : Int */;
223 val
* var68
/* : NativeArray[Option] */;
224 val
* var69
/* : OptionContext */;
225 val
* var71
/* : OptionContext */;
226 val
* var72
/* : OptionBool */;
227 val
* var74
/* : OptionBool */;
228 val
* var75
/* : Array[Option] */;
229 long var76
/* : Int */;
230 val
* var77
/* : NativeArray[Option] */;
232 ((void (*)(val
* self
))(self
->class->vft
[COLOR_nit__separate_compiler___ToolContext___standard__kernel__Object__init
]))(self
) /* init on <self:ToolContext>*/;
235 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
236 var2
= self
->attrs
[COLOR_nit__toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
237 if (unlikely(var2
== NULL
)) {
238 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
239 PRINT_ERROR(" (%s:%d)\n", FILE_nit__toolcontext
, 270);
247 { /* Inline separate_compiler#ToolContext#opt_separate (self) on <self:ToolContext> */
248 var5
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_separate
].val
; /* _opt_separate on <self:ToolContext> */
249 if (unlikely(var5
== NULL
)) {
250 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_separate");
251 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 24);
258 var6
= NEW_standard__Array(&type_standard__Array__opts__Option
);
259 { /* var6 = array_instance Array[Option] */
261 var8
= NEW_standard__NativeArray(var7
, &type_standard__NativeArray__opts__Option
);
262 ((struct instance_standard__NativeArray
*)var8
)->values
[0] = (val
*) var3
;
264 ((void (*)(val
* self
, val
* p0
, long p1
))(var6
->class->vft
[COLOR_standard__array__Array__with_native
]))(var6
, var8
, var7
) /* with_native on <var6:Array[Option]>*/;
268 opts___opts__OptionContext___add_option(var
, var6
); /* Direct call opts#OptionContext#add_option on <var:OptionContext>*/
271 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
272 var11
= self
->attrs
[COLOR_nit__toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
273 if (unlikely(var11
== NULL
)) {
274 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
275 PRINT_ERROR(" (%s:%d)\n", FILE_nit__toolcontext
, 270);
283 { /* Inline separate_compiler#ToolContext#opt_no_inline_intern (self) on <self:ToolContext> */
284 var14
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_no_inline_intern
].val
; /* _opt_no_inline_intern on <self:ToolContext> */
285 if (unlikely(var14
== NULL
)) {
286 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_inline_intern");
287 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 26);
294 var15
= NEW_standard__Array(&type_standard__Array__opts__Option
);
295 { /* var15 = array_instance Array[Option] */
297 var17
= NEW_standard__NativeArray(var16
, &type_standard__NativeArray__opts__Option
);
298 ((struct instance_standard__NativeArray
*)var17
)->values
[0] = (val
*) var12
;
300 ((void (*)(val
* self
, val
* p0
, long p1
))(var15
->class->vft
[COLOR_standard__array__Array__with_native
]))(var15
, var17
, var16
) /* with_native on <var15:Array[Option]>*/;
304 opts___opts__OptionContext___add_option(var9
, var15
); /* Direct call opts#OptionContext#add_option on <var9:OptionContext>*/
307 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
308 var20
= self
->attrs
[COLOR_nit__toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
309 if (unlikely(var20
== NULL
)) {
310 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
311 PRINT_ERROR(" (%s:%d)\n", FILE_nit__toolcontext
, 270);
319 { /* Inline separate_compiler#ToolContext#opt_no_union_attribute (self) on <self:ToolContext> */
320 var23
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_no_union_attribute
].val
; /* _opt_no_union_attribute on <self:ToolContext> */
321 if (unlikely(var23
== NULL
)) {
322 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_union_attribute");
323 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 28);
330 var24
= NEW_standard__Array(&type_standard__Array__opts__Option
);
331 { /* var24 = array_instance Array[Option] */
333 var26
= NEW_standard__NativeArray(var25
, &type_standard__NativeArray__opts__Option
);
334 ((struct instance_standard__NativeArray
*)var26
)->values
[0] = (val
*) var21
;
336 ((void (*)(val
* self
, val
* p0
, long p1
))(var24
->class->vft
[COLOR_standard__array__Array__with_native
]))(var24
, var26
, var25
) /* with_native on <var24:Array[Option]>*/;
340 opts___opts__OptionContext___add_option(var18
, var24
); /* Direct call opts#OptionContext#add_option on <var18:OptionContext>*/
343 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
344 var29
= self
->attrs
[COLOR_nit__toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
345 if (unlikely(var29
== NULL
)) {
346 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
347 PRINT_ERROR(" (%s:%d)\n", FILE_nit__toolcontext
, 270);
355 { /* Inline separate_compiler#ToolContext#opt_no_shortcut_equate (self) on <self:ToolContext> */
356 var32
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_no_shortcut_equate
].val
; /* _opt_no_shortcut_equate on <self:ToolContext> */
357 if (unlikely(var32
== NULL
)) {
358 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_shortcut_equate");
359 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 30);
367 { /* Inline separate_compiler#ToolContext#opt_colors_are_symbols (self) on <self:ToolContext> */
368 var35
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_colors_are_symbols
].val
; /* _opt_colors_are_symbols on <self:ToolContext> */
369 if (unlikely(var35
== NULL
)) {
370 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_colors_are_symbols");
371 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 32);
378 var36
= NEW_standard__Array(&type_standard__Array__opts__Option
);
379 { /* var36 = array_instance Array[Option] */
381 var38
= NEW_standard__NativeArray(var37
, &type_standard__NativeArray__opts__Option
);
382 ((struct instance_standard__NativeArray
*)var38
)->values
[0] = (val
*) var30
;
383 ((struct instance_standard__NativeArray
*)var38
)->values
[1] = (val
*) var33
;
385 ((void (*)(val
* self
, val
* p0
, long p1
))(var36
->class->vft
[COLOR_standard__array__Array__with_native
]))(var36
, var38
, var37
) /* with_native on <var36:Array[Option]>*/;
389 opts___opts__OptionContext___add_option(var27
, var36
); /* Direct call opts#OptionContext#add_option on <var27:OptionContext>*/
392 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
393 var41
= self
->attrs
[COLOR_nit__toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
394 if (unlikely(var41
== NULL
)) {
395 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
396 PRINT_ERROR(" (%s:%d)\n", FILE_nit__toolcontext
, 270);
404 { /* Inline separate_compiler#ToolContext#opt_inline_coloring_numbers (self) on <self:ToolContext> */
405 var44
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_inline_coloring_numbers
].val
; /* _opt_inline_coloring_numbers on <self:ToolContext> */
406 if (unlikely(var44
== NULL
)) {
407 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_coloring_numbers");
408 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 35);
416 { /* Inline separate_compiler#ToolContext#opt_inline_some_methods (self) on <self:ToolContext> */
417 var47
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_inline_some_methods
].val
; /* _opt_inline_some_methods on <self:ToolContext> */
418 if (unlikely(var47
== NULL
)) {
419 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_some_methods");
420 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 37);
428 { /* Inline separate_compiler#ToolContext#opt_direct_call_monomorph (self) on <self:ToolContext> */
429 var50
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_direct_call_monomorph
].val
; /* _opt_direct_call_monomorph on <self:ToolContext> */
430 if (unlikely(var50
== NULL
)) {
431 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_direct_call_monomorph");
432 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 39);
440 { /* Inline separate_compiler#ToolContext#opt_skip_dead_methods (self) on <self:ToolContext> */
441 var53
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_skip_dead_methods
].val
; /* _opt_skip_dead_methods on <self:ToolContext> */
442 if (unlikely(var53
== NULL
)) {
443 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_skip_dead_methods");
444 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 41);
452 { /* Inline separate_compiler#ToolContext#opt_semi_global (self) on <self:ToolContext> */
453 var56
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_semi_global
].val
; /* _opt_semi_global on <self:ToolContext> */
454 if (unlikely(var56
== NULL
)) {
455 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_semi_global");
456 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 43);
463 var57
= NEW_standard__Array(&type_standard__Array__opts__Option
);
464 { /* var57 = array_instance Array[Option] */
466 var59
= NEW_standard__NativeArray(var58
, &type_standard__NativeArray__opts__Option
);
467 ((struct instance_standard__NativeArray
*)var59
)->values
[0] = (val
*) var42
;
468 ((struct instance_standard__NativeArray
*)var59
)->values
[1] = (val
*) var45
;
469 ((struct instance_standard__NativeArray
*)var59
)->values
[2] = (val
*) var48
;
470 ((struct instance_standard__NativeArray
*)var59
)->values
[3] = (val
*) var51
;
471 ((struct instance_standard__NativeArray
*)var59
)->values
[4] = (val
*) var54
;
473 ((void (*)(val
* self
, val
* p0
, long p1
))(var57
->class->vft
[COLOR_standard__array__Array__with_native
]))(var57
, var59
, var58
) /* with_native on <var57:Array[Option]>*/;
477 opts___opts__OptionContext___add_option(var39
, var57
); /* Direct call opts#OptionContext#add_option on <var39:OptionContext>*/
480 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
481 var62
= self
->attrs
[COLOR_nit__toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
482 if (unlikely(var62
== NULL
)) {
483 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
484 PRINT_ERROR(" (%s:%d)\n", FILE_nit__toolcontext
, 270);
492 { /* Inline separate_compiler#ToolContext#opt_colo_dead_methods (self) on <self:ToolContext> */
493 var65
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_colo_dead_methods
].val
; /* _opt_colo_dead_methods on <self:ToolContext> */
494 if (unlikely(var65
== NULL
)) {
495 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_colo_dead_methods");
496 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 45);
503 var66
= NEW_standard__Array(&type_standard__Array__opts__Option
);
504 { /* var66 = array_instance Array[Option] */
506 var68
= NEW_standard__NativeArray(var67
, &type_standard__NativeArray__opts__Option
);
507 ((struct instance_standard__NativeArray
*)var68
)->values
[0] = (val
*) var63
;
509 ((void (*)(val
* self
, val
* p0
, long p1
))(var66
->class->vft
[COLOR_standard__array__Array__with_native
]))(var66
, var68
, var67
) /* with_native on <var66:Array[Option]>*/;
513 opts___opts__OptionContext___add_option(var60
, var66
); /* Direct call opts#OptionContext#add_option on <var60:OptionContext>*/
516 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
517 var71
= self
->attrs
[COLOR_nit__toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
518 if (unlikely(var71
== NULL
)) {
519 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
520 PRINT_ERROR(" (%s:%d)\n", FILE_nit__toolcontext
, 270);
528 { /* Inline separate_compiler#ToolContext#opt_tables_metrics (self) on <self:ToolContext> */
529 var74
= self
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_tables_metrics
].val
; /* _opt_tables_metrics on <self:ToolContext> */
530 if (unlikely(var74
== NULL
)) {
531 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_tables_metrics");
532 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 47);
539 var75
= NEW_standard__Array(&type_standard__Array__opts__Option
);
540 { /* var75 = array_instance Array[Option] */
542 var77
= NEW_standard__NativeArray(var76
, &type_standard__NativeArray__opts__Option
);
543 ((struct instance_standard__NativeArray
*)var77
)->values
[0] = (val
*) var72
;
545 ((void (*)(val
* self
, val
* p0
, long p1
))(var75
->class->vft
[COLOR_standard__array__Array__with_native
]))(var75
, var77
, var76
) /* with_native on <var75:Array[Option]>*/;
549 opts___opts__OptionContext___add_option(var69
, var75
); /* Direct call opts#OptionContext#add_option on <var69:OptionContext>*/
553 /* method separate_compiler#ToolContext#process_options for (self: ToolContext, Sequence[String]) */
554 void nit__separate_compiler___ToolContext___process_options(val
* self
, val
* p0
) {
555 val
* var_args
/* var args: Sequence[String] */;
556 val
* var_tc
/* var tc: ToolContext */;
557 val
* var
/* : OptionBool */;
558 val
* var2
/* : OptionBool */;
559 val
* var3
/* : nullable Object */;
560 val
* var5
/* : nullable Object */;
561 short int var6
/* : Bool */;
562 val
* var7
/* : OptionBool */;
563 val
* var9
/* : OptionBool */;
564 short int var10
/* : Bool */;
565 short int var12
/* : Bool */;
568 const struct type
* type_struct
;
569 const char* var_class_name
;
570 val
* var13
/* : nullable Object */;
571 val
* var14
/* : OptionBool */;
572 val
* var16
/* : OptionBool */;
573 short int var17
/* : Bool */;
574 short int var19
/* : Bool */;
577 const struct type
* type_struct22
;
578 const char* var_class_name23
;
579 val
* var24
/* : nullable Object */;
580 val
* var25
/* : OptionBool */;
581 val
* var27
/* : OptionBool */;
582 short int var28
/* : Bool */;
583 short int var30
/* : Bool */;
586 const struct type
* type_struct33
;
587 const char* var_class_name34
;
588 val
* var35
/* : nullable Object */;
589 val
* var36
/* : OptionBool */;
590 val
* var38
/* : OptionBool */;
591 short int var39
/* : Bool */;
592 short int var41
/* : Bool */;
595 const struct type
* type_struct44
;
596 const char* var_class_name45
;
597 val
* var46
/* : nullable Object */;
600 ((void (*)(val
* self
, val
* p0
))(self
->class->vft
[COLOR_nit__separate_compiler___ToolContext___process_options
]))(self
, p0
) /* process_options on <self:ToolContext>*/;
604 { /* Inline separate_compiler#ToolContext#opt_semi_global (var_tc) on <var_tc:ToolContext> */
605 var2
= var_tc
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_semi_global
].val
; /* _opt_semi_global on <var_tc:ToolContext> */
606 if (unlikely(var2
== NULL
)) {
607 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_semi_global");
608 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 43);
616 { /* Inline opts#Option#value (var) on <var:OptionBool> */
617 var5
= var
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var:OptionBool> */
622 var6
= ((struct instance_standard__Bool
*)var3
)->value
; /* autounbox from nullable Object to Bool */;
625 { /* Inline separate_compiler#ToolContext#opt_inline_coloring_numbers (var_tc) on <var_tc:ToolContext> */
626 var9
= var_tc
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_inline_coloring_numbers
].val
; /* _opt_inline_coloring_numbers on <var_tc:ToolContext> */
627 if (unlikely(var9
== NULL
)) {
628 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_coloring_numbers");
629 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 35);
638 { /* Inline opts#Option#value= (var7,var10) on <var7:OptionBool> */
639 /* Covariant cast for argument 0 (value) <var10:Bool> isa VALUE */
640 /* <var10:Bool> isa VALUE */
641 type_struct
= var7
->type
->resolution_table
->types
[COLOR_opts__Option__VALUE
];
642 cltype
= type_struct
->color
;
643 idtype
= type_struct
->id
;
644 if(cltype
>= (&type_standard__Bool
)->table_size
) {
647 var12
= (&type_standard__Bool
)->type_table
[cltype
] == idtype
;
649 if (unlikely(!var12
)) {
650 var_class_name
= type_standard__Bool
.name
;
651 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "VALUE", var_class_name
);
652 PRINT_ERROR(" (%s:%d)\n", FILE_opts
, 40);
655 var13
= BOX_standard__Bool(var10
); /* autobox from Bool to nullable Object */
656 var7
->attrs
[COLOR_opts__Option___value
].val
= var13
; /* _value on <var7:OptionBool> */
661 { /* Inline separate_compiler#ToolContext#opt_inline_some_methods (var_tc) on <var_tc:ToolContext> */
662 var16
= var_tc
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_inline_some_methods
].val
; /* _opt_inline_some_methods on <var_tc:ToolContext> */
663 if (unlikely(var16
== NULL
)) {
664 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_some_methods");
665 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 37);
674 { /* Inline opts#Option#value= (var14,var17) on <var14:OptionBool> */
675 /* Covariant cast for argument 0 (value) <var17:Bool> isa VALUE */
676 /* <var17:Bool> isa VALUE */
677 type_struct22
= var14
->type
->resolution_table
->types
[COLOR_opts__Option__VALUE
];
678 cltype20
= type_struct22
->color
;
679 idtype21
= type_struct22
->id
;
680 if(cltype20
>= (&type_standard__Bool
)->table_size
) {
683 var19
= (&type_standard__Bool
)->type_table
[cltype20
] == idtype21
;
685 if (unlikely(!var19
)) {
686 var_class_name23
= type_standard__Bool
.name
;
687 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "VALUE", var_class_name23
);
688 PRINT_ERROR(" (%s:%d)\n", FILE_opts
, 40);
691 var24
= BOX_standard__Bool(var17
); /* autobox from Bool to nullable Object */
692 var14
->attrs
[COLOR_opts__Option___value
].val
= var24
; /* _value on <var14:OptionBool> */
697 { /* Inline separate_compiler#ToolContext#opt_direct_call_monomorph (var_tc) on <var_tc:ToolContext> */
698 var27
= var_tc
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_direct_call_monomorph
].val
; /* _opt_direct_call_monomorph on <var_tc:ToolContext> */
699 if (unlikely(var27
== NULL
)) {
700 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_direct_call_monomorph");
701 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 39);
710 { /* Inline opts#Option#value= (var25,var28) on <var25:OptionBool> */
711 /* Covariant cast for argument 0 (value) <var28:Bool> isa VALUE */
712 /* <var28:Bool> isa VALUE */
713 type_struct33
= var25
->type
->resolution_table
->types
[COLOR_opts__Option__VALUE
];
714 cltype31
= type_struct33
->color
;
715 idtype32
= type_struct33
->id
;
716 if(cltype31
>= (&type_standard__Bool
)->table_size
) {
719 var30
= (&type_standard__Bool
)->type_table
[cltype31
] == idtype32
;
721 if (unlikely(!var30
)) {
722 var_class_name34
= type_standard__Bool
.name
;
723 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "VALUE", var_class_name34
);
724 PRINT_ERROR(" (%s:%d)\n", FILE_opts
, 40);
727 var35
= BOX_standard__Bool(var28
); /* autobox from Bool to nullable Object */
728 var25
->attrs
[COLOR_opts__Option___value
].val
= var35
; /* _value on <var25:OptionBool> */
733 { /* Inline separate_compiler#ToolContext#opt_skip_dead_methods (var_tc) on <var_tc:ToolContext> */
734 var38
= var_tc
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_skip_dead_methods
].val
; /* _opt_skip_dead_methods on <var_tc:ToolContext> */
735 if (unlikely(var38
== NULL
)) {
736 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_skip_dead_methods");
737 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 41);
746 { /* Inline opts#Option#value= (var36,var39) on <var36:OptionBool> */
747 /* Covariant cast for argument 0 (value) <var39:Bool> isa VALUE */
748 /* <var39:Bool> isa VALUE */
749 type_struct44
= var36
->type
->resolution_table
->types
[COLOR_opts__Option__VALUE
];
750 cltype42
= type_struct44
->color
;
751 idtype43
= type_struct44
->id
;
752 if(cltype42
>= (&type_standard__Bool
)->table_size
) {
755 var41
= (&type_standard__Bool
)->type_table
[cltype42
] == idtype43
;
757 if (unlikely(!var41
)) {
758 var_class_name45
= type_standard__Bool
.name
;
759 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "VALUE", var_class_name45
);
760 PRINT_ERROR(" (%s:%d)\n", FILE_opts
, 40);
763 var46
= BOX_standard__Bool(var39
); /* autobox from Bool to nullable Object */
764 var36
->attrs
[COLOR_opts__Option___value
].val
= var46
; /* _value on <var36:OptionBool> */
772 /* method separate_compiler#SeparateCompilerPhase#process_mainmodule for (self: SeparateCompilerPhase, MModule, SequenceRead[MModule]) */
773 void nit___nit__SeparateCompilerPhase___nit__modelbuilder__Phase__process_mainmodule(val
* self
, val
* p0
, val
* p1
) {
774 val
* var_mainmodule
/* var mainmodule: MModule */;
775 val
* var_given_mmodules
/* var given_mmodules: SequenceRead[MModule] */;
776 val
* var
/* : ToolContext */;
777 val
* var2
/* : ToolContext */;
778 val
* var3
/* : OptionBool */;
779 val
* var5
/* : OptionBool */;
780 val
* var6
/* : nullable Object */;
781 val
* var8
/* : nullable Object */;
782 short int var9
/* : Bool */;
783 short int var10
/* : Bool */;
784 val
* var11
/* : ToolContext */;
785 val
* var13
/* : ToolContext */;
786 val
* var14
/* : ModelBuilder */;
787 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
788 val
* var15
/* : RapidTypeAnalysis */;
789 val
* var_analysis
/* var analysis: RapidTypeAnalysis */;
791 var_given_mmodules
= p1
;
793 { /* Inline phase#Phase#toolcontext (self) on <self:SeparateCompilerPhase> */
794 var2
= self
->attrs
[COLOR_nit__phase__Phase___toolcontext
].val
; /* _toolcontext on <self:SeparateCompilerPhase> */
795 if (unlikely(var2
== NULL
)) {
796 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
797 PRINT_ERROR(" (%s:%d)\n", FILE_nit__phase
, 201);
805 { /* Inline separate_compiler#ToolContext#opt_separate (var) on <var:ToolContext> */
806 var5
= var
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_separate
].val
; /* _opt_separate on <var:ToolContext> */
807 if (unlikely(var5
== NULL
)) {
808 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_separate");
809 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 24);
817 { /* Inline opts#Option#value (var3) on <var3:OptionBool> */
818 var8
= var3
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var3:OptionBool> */
823 var9
= ((struct instance_standard__Bool
*)var6
)->value
; /* autounbox from nullable Object to Bool */;
830 { /* Inline phase#Phase#toolcontext (self) on <self:SeparateCompilerPhase> */
831 var13
= self
->attrs
[COLOR_nit__phase__Phase___toolcontext
].val
; /* _toolcontext on <self:SeparateCompilerPhase> */
832 if (unlikely(var13
== NULL
)) {
833 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
834 PRINT_ERROR(" (%s:%d)\n", FILE_nit__phase
, 201);
842 var14
= nit__modelbuilder_base___ToolContext___modelbuilder(var11
);
844 var_modelbuilder
= var14
;
846 var15
= nit__rapid_type_analysis___ModelBuilder___do_rapid_type_analysis(var_modelbuilder
, var_mainmodule
);
848 var_analysis
= var15
;
850 nit__separate_compiler___ModelBuilder___run_separate_compiler(var_modelbuilder
, var_mainmodule
, var_analysis
); /* Direct call separate_compiler#ModelBuilder#run_separate_compiler on <var_modelbuilder:ModelBuilder>*/
854 /* method separate_compiler#ModelBuilder#run_separate_compiler for (self: ModelBuilder, MModule, nullable RapidTypeAnalysis) */
855 void nit__separate_compiler___ModelBuilder___run_separate_compiler(val
* self
, val
* p0
, val
* p1
) {
856 val
* var_mainmodule
/* var mainmodule: MModule */;
857 val
* var_runtime_type_analysis
/* var runtime_type_analysis: nullable RapidTypeAnalysis */;
858 long var
/* : Int */;
859 long var2
/* : Int for extern */;
860 long var_time0
/* var time0: Int */;
861 val
* var3
/* : ToolContext */;
862 val
* var5
/* : ToolContext */;
864 val
* var6
/* : String */;
865 char* var7
/* : NativeString */;
866 long var8
/* : Int */;
867 val
* var9
/* : FlatString */;
868 long var10
/* : Int */;
869 val
* var11
/* : SeparateCompiler */;
870 val
* var_compiler
/* var compiler: SeparateCompiler */;
871 long var12
/* : Int */;
872 long var14
/* : Int for extern */;
873 long var_time1
/* var time1: Int */;
874 val
* var15
/* : ToolContext */;
875 val
* var17
/* : ToolContext */;
876 static val
* varonce18
;
877 val
* var19
/* : String */;
878 char* var20
/* : NativeString */;
879 long var21
/* : Int */;
880 val
* var22
/* : FlatString */;
881 long var23
/* : Int */;
882 short int var25
/* : Bool */;
885 const char* var_class_name
;
886 long var26
/* : Int */;
887 static val
* varonce27
;
888 val
* var28
/* : String */;
889 char* var29
/* : NativeString */;
890 long var30
/* : Int */;
891 val
* var31
/* : FlatString */;
892 val
* var32
/* : Array[Object] */;
893 long var33
/* : Int */;
894 val
* var34
/* : NativeArray[Object] */;
895 val
* var35
/* : Object */;
896 val
* var36
/* : String */;
897 long var37
/* : Int */;
899 var_runtime_type_analysis
= p1
;
901 { /* Inline time#Object#get_time (self) on <self:ModelBuilder> */
902 var2
= kernel_Any_Any_get_time_0(self
);
910 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
911 var5
= self
->attrs
[COLOR_nit__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
912 if (unlikely(var5
== NULL
)) {
913 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
914 PRINT_ERROR(" (%s:%d)\n", FILE_nit__modelbuilder_base
, 47);
924 var7
= "*** GENERATING C ***";
926 var9
= standard___standard__NativeString___to_s_with_length(var7
, var8
);
932 nit___nit__ToolContext___info(var3
, var6
, var10
); /* Direct call toolcontext#ToolContext#info on <var3:ToolContext>*/
934 var11
= NEW_nit__SeparateCompiler(&type_nit__SeparateCompiler
);
936 ((void (*)(val
* self
, val
* p0
))(var11
->class->vft
[COLOR_nit__abstract_compiler__AbstractCompiler__mainmodule_61d
]))(var11
, var_mainmodule
) /* mainmodule= on <var11:SeparateCompiler>*/;
939 ((void (*)(val
* self
, val
* p0
))(var11
->class->vft
[COLOR_nit__abstract_compiler__AbstractCompiler__modelbuilder_61d
]))(var11
, self
) /* modelbuilder= on <var11:SeparateCompiler>*/;
942 ((void (*)(val
* self
, val
* p0
))(var11
->class->vft
[COLOR_nit__separate_compiler__SeparateCompiler__runtime_type_analysis_61d
]))(var11
, var_runtime_type_analysis
) /* runtime_type_analysis= on <var11:SeparateCompiler>*/;
945 ((void (*)(val
* self
))(var11
->class->vft
[COLOR_standard__kernel__Object__init
]))(var11
) /* init on <var11:SeparateCompiler>*/;
947 var_compiler
= var11
;
949 nit___nit__SeparateCompiler___nit__abstract_compiler__AbstractCompiler__do_compilation(var_compiler
); /* Direct call separate_compiler#SeparateCompiler#do_compilation on <var_compiler:SeparateCompiler>*/
952 nit___nit__SeparateCompiler___nit__abstract_compiler__AbstractCompiler__display_stats(var_compiler
); /* Direct call separate_compiler#SeparateCompiler#display_stats on <var_compiler:SeparateCompiler>*/
955 { /* Inline time#Object#get_time (self) on <self:ModelBuilder> */
956 var14
= kernel_Any_Any_get_time_0(self
);
964 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
965 var17
= self
->attrs
[COLOR_nit__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
966 if (unlikely(var17
== NULL
)) {
967 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
968 PRINT_ERROR(" (%s:%d)\n", FILE_nit__modelbuilder_base
, 47);
978 var20
= "*** END GENERATING C: ";
980 var22
= standard___standard__NativeString___to_s_with_length(var20
, var21
);
985 { /* Inline kernel#Int#- (var_time1,var_time0) on <var_time1:Int> */
986 /* Covariant cast for argument 0 (i) <var_time0:Int> isa OTHER */
987 /* <var_time0:Int> isa OTHER */
988 var25
= 1; /* easy <var_time0:Int> isa OTHER*/
989 if (unlikely(!var25
)) {
990 var_class_name
= type_standard__Int
.name
;
991 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
992 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel
, 416);
995 var26
= var_time1
- var_time0
;
1006 var31
= standard___standard__NativeString___to_s_with_length(var29
, var30
);
1010 var32
= NEW_standard__Array(&type_standard__Array__standard__Object
);
1011 { /* var32 = array_instance Array[Object] */
1013 var34
= NEW_standard__NativeArray(var33
, &type_standard__NativeArray__standard__Object
);
1014 ((struct instance_standard__NativeArray
*)var34
)->values
[0] = (val
*) var19
;
1015 var35
= BOX_standard__Int(var23
); /* autobox from Int to Object */
1016 ((struct instance_standard__NativeArray
*)var34
)->values
[1] = (val
*) var35
;
1017 ((struct instance_standard__NativeArray
*)var34
)->values
[2] = (val
*) var28
;
1019 ((void (*)(val
* self
, val
* p0
, long p1
))(var32
->class->vft
[COLOR_standard__array__Array__with_native
]))(var32
, var34
, var33
) /* with_native on <var32:Array[Object]>*/;
1023 var36
= ((val
* (*)(val
* self
))(var32
->class->vft
[COLOR_standard__string__Object__to_s
]))(var32
) /* to_s on <var32:Array[Object]>*/;
1027 nit___nit__ToolContext___info(var15
, var36
, var37
); /* Direct call toolcontext#ToolContext#info on <var15:ToolContext>*/
1030 nit__abstract_compiler___ModelBuilder___write_and_make(self
, var_compiler
); /* Direct call abstract_compiler#ModelBuilder#write_and_make on <self:ModelBuilder>*/
1034 /* method separate_compiler#ModelBuilder#nb_invok_by_tables for (self: ModelBuilder): Int */
1035 long nit__separate_compiler___ModelBuilder___nb_invok_by_tables(val
* self
) {
1036 long var
/* : Int */;
1037 long var1
/* : Int */;
1038 var1
= self
->attrs
[COLOR_nit__separate_compiler__ModelBuilder___nb_invok_by_tables
].l
; /* _nb_invok_by_tables on <self:ModelBuilder> */
1043 /* method separate_compiler#ModelBuilder#nb_invok_by_tables= for (self: ModelBuilder, Int) */
1044 void nit__separate_compiler___ModelBuilder___nb_invok_by_tables_61d(val
* self
, long p0
) {
1045 self
->attrs
[COLOR_nit__separate_compiler__ModelBuilder___nb_invok_by_tables
].l
= p0
; /* _nb_invok_by_tables on <self:ModelBuilder> */
1048 /* method separate_compiler#ModelBuilder#nb_invok_by_direct for (self: ModelBuilder): Int */
1049 long nit__separate_compiler___ModelBuilder___nb_invok_by_direct(val
* self
) {
1050 long var
/* : Int */;
1051 long var1
/* : Int */;
1052 var1
= self
->attrs
[COLOR_nit__separate_compiler__ModelBuilder___nb_invok_by_direct
].l
; /* _nb_invok_by_direct on <self:ModelBuilder> */
1057 /* method separate_compiler#ModelBuilder#nb_invok_by_direct= for (self: ModelBuilder, Int) */
1058 void nit__separate_compiler___ModelBuilder___nb_invok_by_direct_61d(val
* self
, long p0
) {
1059 self
->attrs
[COLOR_nit__separate_compiler__ModelBuilder___nb_invok_by_direct
].l
= p0
; /* _nb_invok_by_direct on <self:ModelBuilder> */
1062 /* method separate_compiler#ModelBuilder#nb_invok_by_inline for (self: ModelBuilder): Int */
1063 long nit__separate_compiler___ModelBuilder___nb_invok_by_inline(val
* self
) {
1064 long var
/* : Int */;
1065 long var1
/* : Int */;
1066 var1
= self
->attrs
[COLOR_nit__separate_compiler__ModelBuilder___nb_invok_by_inline
].l
; /* _nb_invok_by_inline on <self:ModelBuilder> */
1071 /* method separate_compiler#ModelBuilder#nb_invok_by_inline= for (self: ModelBuilder, Int) */
1072 void nit__separate_compiler___ModelBuilder___nb_invok_by_inline_61d(val
* self
, long p0
) {
1073 self
->attrs
[COLOR_nit__separate_compiler__ModelBuilder___nb_invok_by_inline
].l
= p0
; /* _nb_invok_by_inline on <self:ModelBuilder> */
1076 /* method separate_compiler#SeparateCompiler#runtime_type_analysis for (self: SeparateCompiler): nullable RapidTypeAnalysis */
1077 val
* nit___nit__SeparateCompiler___runtime_type_analysis(val
* self
) {
1078 val
* var
/* : nullable RapidTypeAnalysis */;
1079 val
* var1
/* : nullable RapidTypeAnalysis */;
1080 var1
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
1085 /* method separate_compiler#SeparateCompiler#runtime_type_analysis= for (self: SeparateCompiler, nullable RapidTypeAnalysis) */
1086 void nit___nit__SeparateCompiler___runtime_type_analysis_61d(val
* self
, val
* p0
) {
1087 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___runtime_type_analysis
].val
= p0
; /* _runtime_type_analysis on <self:SeparateCompiler> */
1090 /* method separate_compiler#SeparateCompiler#undead_types for (self: SeparateCompiler): Set[MType] */
1091 val
* nit___nit__SeparateCompiler___undead_types(val
* self
) {
1092 val
* var
/* : Set[MType] */;
1093 val
* var1
/* : Set[MType] */;
1094 var1
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___undead_types
].val
; /* _undead_types on <self:SeparateCompiler> */
1095 if (unlikely(var1
== NULL
)) {
1096 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _undead_types");
1097 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 121);
1104 /* method separate_compiler#SeparateCompiler#live_unresolved_types for (self: SeparateCompiler): Map[MClassDef, Set[MType]] */
1105 val
* nit___nit__SeparateCompiler___live_unresolved_types(val
* self
) {
1106 val
* var
/* : Map[MClassDef, Set[MType]] */;
1107 val
* var1
/* : Map[MClassDef, Set[MType]] */;
1108 var1
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___live_unresolved_types
].val
; /* _live_unresolved_types on <self:SeparateCompiler> */
1109 if (unlikely(var1
== NULL
)) {
1110 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_unresolved_types");
1111 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 122);
1118 /* method separate_compiler#SeparateCompiler#type_ids for (self: SeparateCompiler): Map[MType, Int] */
1119 val
* nit___nit__SeparateCompiler___type_ids(val
* self
) {
1120 val
* var
/* : Map[MType, Int] */;
1121 val
* var1
/* : Map[MType, Int] */;
1122 var1
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_ids
].val
; /* _type_ids on <self:SeparateCompiler> */
1123 if (unlikely(var1
== NULL
)) {
1124 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_ids");
1125 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 124);
1132 /* method separate_compiler#SeparateCompiler#type_ids= for (self: SeparateCompiler, Map[MType, Int]) */
1133 void nit___nit__SeparateCompiler___type_ids_61d(val
* self
, val
* p0
) {
1134 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_ids
].val
= p0
; /* _type_ids on <self:SeparateCompiler> */
1137 /* method separate_compiler#SeparateCompiler#type_colors for (self: SeparateCompiler): Map[MType, Int] */
1138 val
* nit___nit__SeparateCompiler___type_colors(val
* self
) {
1139 val
* var
/* : Map[MType, Int] */;
1140 val
* var1
/* : Map[MType, Int] */;
1141 var1
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_colors
].val
; /* _type_colors on <self:SeparateCompiler> */
1142 if (unlikely(var1
== NULL
)) {
1143 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_colors");
1144 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 125);
1151 /* method separate_compiler#SeparateCompiler#type_colors= for (self: SeparateCompiler, Map[MType, Int]) */
1152 void nit___nit__SeparateCompiler___type_colors_61d(val
* self
, val
* p0
) {
1153 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_colors
].val
= p0
; /* _type_colors on <self:SeparateCompiler> */
1156 /* method separate_compiler#SeparateCompiler#opentype_colors for (self: SeparateCompiler): Map[MType, Int] */
1157 val
* nit___nit__SeparateCompiler___opentype_colors(val
* self
) {
1158 val
* var
/* : Map[MType, Int] */;
1159 val
* var1
/* : Map[MType, Int] */;
1160 var1
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___opentype_colors
].val
; /* _opentype_colors on <self:SeparateCompiler> */
1161 if (unlikely(var1
== NULL
)) {
1162 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opentype_colors");
1163 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 126);
1170 /* method separate_compiler#SeparateCompiler#opentype_colors= for (self: SeparateCompiler, Map[MType, Int]) */
1171 void nit___nit__SeparateCompiler___opentype_colors_61d(val
* self
, val
* p0
) {
1172 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___opentype_colors
].val
= p0
; /* _opentype_colors on <self:SeparateCompiler> */
1175 /* method separate_compiler#SeparateCompiler#method_colors for (self: SeparateCompiler): Map[PropertyLayoutElement, Int] */
1176 val
* nit___nit__SeparateCompiler___method_colors(val
* self
) {
1177 val
* var
/* : Map[PropertyLayoutElement, Int] */;
1178 val
* var1
/* : Map[PropertyLayoutElement, Int] */;
1179 var1
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___method_colors
].val
; /* _method_colors on <self:SeparateCompiler> */
1180 if (unlikely(var1
== NULL
)) {
1181 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _method_colors");
1182 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 127);
1189 /* method separate_compiler#SeparateCompiler#method_colors= for (self: SeparateCompiler, Map[PropertyLayoutElement, Int]) */
1190 void nit___nit__SeparateCompiler___method_colors_61d(val
* self
, val
* p0
) {
1191 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___method_colors
].val
= p0
; /* _method_colors on <self:SeparateCompiler> */
1194 /* method separate_compiler#SeparateCompiler#attr_colors for (self: SeparateCompiler): Map[MAttribute, Int] */
1195 val
* nit___nit__SeparateCompiler___attr_colors(val
* self
) {
1196 val
* var
/* : Map[MAttribute, Int] */;
1197 val
* var1
/* : Map[MAttribute, Int] */;
1198 var1
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___attr_colors
].val
; /* _attr_colors on <self:SeparateCompiler> */
1199 if (unlikely(var1
== NULL
)) {
1200 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _attr_colors");
1201 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 128);
1208 /* method separate_compiler#SeparateCompiler#attr_colors= for (self: SeparateCompiler, Map[MAttribute, Int]) */
1209 void nit___nit__SeparateCompiler___attr_colors_61d(val
* self
, val
* p0
) {
1210 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___attr_colors
].val
= p0
; /* _attr_colors on <self:SeparateCompiler> */
1213 /* method separate_compiler#SeparateCompiler#init for (self: SeparateCompiler) */
1214 void nit___nit__SeparateCompiler___standard__kernel__Object__init(val
* self
) {
1215 static val
* varonce
;
1216 val
* var
/* : String */;
1217 char* var1
/* : NativeString */;
1218 long var2
/* : Int */;
1219 val
* var3
/* : FlatString */;
1220 val
* var4
/* : CodeFile */;
1221 val
* var_file
/* var file: CodeFile */;
1222 val
* var5
/* : CodeWriter */;
1224 ((void (*)(val
* self
))(self
->class->vft
[COLOR_nit___nit__SeparateCompiler___standard__kernel__Object__init
]))(self
) /* init on <self:SeparateCompiler>*/;
1229 var1
= "nit.common";
1231 var3
= standard___standard__NativeString___to_s_with_length(var1
, var2
);
1236 var4
= nit___nit__AbstractCompiler___new_file(self
, var
);
1239 var5
= NEW_nit__CodeWriter(&type_nit__CodeWriter
);
1241 ((void (*)(val
* self
, val
* p0
))(var5
->class->vft
[COLOR_nit__abstract_compiler__CodeWriter__file_61d
]))(var5
, var_file
) /* file= on <var5:CodeWriter>*/;
1244 ((void (*)(val
* self
))(var5
->class->vft
[COLOR_standard__kernel__Object__init
]))(var5
) /* init on <var5:CodeWriter>*/;
1247 { /* Inline abstract_compiler#AbstractCompiler#header= (self,var5) on <self:SeparateCompiler> */
1248 self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___header
].val
= var5
; /* _header on <self:SeparateCompiler> */
1253 nit___nit__SeparateCompiler___compile_box_kinds(self
); /* Direct call separate_compiler#SeparateCompiler#compile_box_kinds on <self:SeparateCompiler>*/
1257 /* method separate_compiler#SeparateCompiler#do_compilation for (self: SeparateCompiler) */
1258 void nit___nit__SeparateCompiler___nit__abstract_compiler__AbstractCompiler__do_compilation(val
* self
) {
1259 val
* var_compiler
/* var compiler: SeparateCompiler */;
1260 val
* var
/* : MModule */;
1261 val
* var2
/* : MModule */;
1262 val
* var3
/* : String */;
1263 val
* var_c_name
/* var c_name: String */;
1264 val
* var4
/* : ModelBuilder */;
1265 val
* var6
/* : ModelBuilder */;
1266 val
* var7
/* : ToolContext */;
1267 val
* var9
/* : ToolContext */;
1268 static val
* varonce
;
1269 val
* var10
/* : String */;
1270 char* var11
/* : NativeString */;
1271 long var12
/* : Int */;
1272 val
* var13
/* : FlatString */;
1273 long var14
/* : Int */;
1274 static val
* varonce15
;
1275 val
* var16
/* : String */;
1276 char* var17
/* : NativeString */;
1277 long var18
/* : Int */;
1278 val
* var19
/* : FlatString */;
1279 val
* var20
/* : Array[Object] */;
1280 long var21
/* : Int */;
1281 val
* var22
/* : NativeArray[Object] */;
1282 val
* var23
/* : String */;
1283 val
* var24
/* : CodeFile */;
1284 val
* var25
/* : MModule */;
1285 val
* var27
/* : MModule */;
1286 val
* var28
/* : POSetElement[MModule] */;
1287 val
* var30
/* : POSetElement[MModule] */;
1288 val
* var31
/* : Collection[nullable Object] */;
1289 val
* var_
/* var : Collection[MModule] */;
1290 val
* var32
/* : Iterator[nullable Object] */;
1291 val
* var_33
/* var : Iterator[MModule] */;
1292 short int var34
/* : Bool */;
1293 val
* var35
/* : nullable Object */;
1294 val
* var_m
/* var m: MModule */;
1295 val
* var36
/* : Array[MClass] */;
1296 val
* var38
/* : Array[MClass] */;
1297 val
* var_39
/* var : Array[MClass] */;
1298 val
* var40
/* : ArrayIterator[nullable Object] */;
1299 val
* var_41
/* var : ArrayIterator[MClass] */;
1300 short int var42
/* : Bool */;
1301 val
* var43
/* : nullable Object */;
1302 val
* var_mclass
/* var mclass: MClass */;
1303 static val
* varonce47
;
1304 val
* var48
/* : String */;
1305 char* var49
/* : NativeString */;
1306 long var50
/* : Int */;
1307 val
* var51
/* : FlatString */;
1308 val
* var52
/* : Array[Object] */;
1309 long var53
/* : Int */;
1310 val
* var54
/* : NativeArray[Object] */;
1311 val
* var55
/* : String */;
1312 val
* var56
/* : CodeFile */;
1313 val
* var57
/* : MModule */;
1314 val
* var59
/* : MModule */;
1315 val
* var60
/* : POSetElement[MModule] */;
1316 val
* var62
/* : POSetElement[MModule] */;
1317 val
* var63
/* : Collection[nullable Object] */;
1318 val
* var_64
/* var : Collection[MModule] */;
1319 val
* var65
/* : Iterator[nullable Object] */;
1320 val
* var_66
/* var : Iterator[MModule] */;
1321 short int var67
/* : Bool */;
1322 val
* var68
/* : nullable Object */;
1323 val
* var_m69
/* var m: MModule */;
1324 val
* var70
/* : ModelBuilder */;
1325 val
* var72
/* : ModelBuilder */;
1326 val
* var73
/* : ToolContext */;
1327 val
* var75
/* : ToolContext */;
1328 static val
* varonce76
;
1329 val
* var77
/* : String */;
1330 char* var78
/* : NativeString */;
1331 long var79
/* : Int */;
1332 val
* var80
/* : FlatString */;
1333 val
* var81
/* : String */;
1334 val
* var82
/* : Array[Object] */;
1335 long var83
/* : Int */;
1336 val
* var84
/* : NativeArray[Object] */;
1337 val
* var85
/* : String */;
1338 long var86
/* : Int */;
1339 val
* var87
/* : String */;
1340 static val
* varonce88
;
1341 val
* var89
/* : String */;
1342 char* var90
/* : NativeString */;
1343 long var91
/* : Int */;
1344 val
* var92
/* : FlatString */;
1345 val
* var93
/* : Array[Object] */;
1346 long var94
/* : Int */;
1347 val
* var95
/* : NativeArray[Object] */;
1348 val
* var96
/* : String */;
1349 val
* var97
/* : CodeFile */;
1350 val
* var100
/* : ModelBuilder */;
1351 val
* var102
/* : ModelBuilder */;
1352 val
* var103
/* : ToolContext */;
1353 val
* var105
/* : ToolContext */;
1354 static val
* varonce106
;
1355 val
* var107
/* : String */;
1356 char* var108
/* : NativeString */;
1357 long var109
/* : Int */;
1358 val
* var110
/* : FlatString */;
1359 long var111
/* : Int */;
1360 static val
* varonce112
;
1361 val
* var113
/* : String */;
1362 char* var114
/* : NativeString */;
1363 long var115
/* : Int */;
1364 val
* var116
/* : FlatString */;
1365 val
* var117
/* : Array[Object] */;
1366 long var118
/* : Int */;
1367 val
* var119
/* : NativeArray[Object] */;
1368 val
* var120
/* : String */;
1369 val
* var121
/* : CodeFile */;
1370 var_compiler
= self
;
1372 nit___nit__AbstractCompiler___compile_header(var_compiler
); /* Direct call abstract_compiler#AbstractCompiler#compile_header on <var_compiler:SeparateCompiler>*/
1375 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
1376 var2
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
1377 if (unlikely(var2
== NULL
)) {
1378 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
1379 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
1387 var3
= nit___nit__MModule___nit__model_base__MEntity__c_name(var
);
1391 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
1392 var6
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
1393 if (unlikely(var6
== NULL
)) {
1394 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1395 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 481);
1403 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (var4) on <var4:ModelBuilder> */
1404 var9
= var4
->attrs
[COLOR_nit__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var4:ModelBuilder> */
1405 if (unlikely(var9
== NULL
)) {
1406 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1407 PRINT_ERROR(" (%s:%d)\n", FILE_nit__modelbuilder_base
, 47);
1417 var11
= "Property coloring";
1419 var13
= standard___standard__NativeString___to_s_with_length(var11
, var12
);
1425 nit___nit__ToolContext___info(var7
, var10
, var14
); /* Direct call toolcontext#ToolContext#info on <var7:ToolContext>*/
1432 var19
= standard___standard__NativeString___to_s_with_length(var17
, var18
);
1436 var20
= NEW_standard__Array(&type_standard__Array__standard__Object
);
1437 { /* var20 = array_instance Array[Object] */
1439 var22
= NEW_standard__NativeArray(var21
, &type_standard__NativeArray__standard__Object
);
1440 ((struct instance_standard__NativeArray
*)var22
)->values
[0] = (val
*) var_c_name
;
1441 ((struct instance_standard__NativeArray
*)var22
)->values
[1] = (val
*) var16
;
1443 ((void (*)(val
* self
, val
* p0
, long p1
))(var20
->class->vft
[COLOR_standard__array__Array__with_native
]))(var20
, var22
, var21
) /* with_native on <var20:Array[Object]>*/;
1447 var23
= ((val
* (*)(val
* self
))(var20
->class->vft
[COLOR_standard__string__Object__to_s
]))(var20
) /* to_s on <var20:Array[Object]>*/;
1450 var24
= nit___nit__AbstractCompiler___new_file(var_compiler
, var23
);
1453 nit___nit__SeparateCompiler___do_property_coloring(var_compiler
); /* Direct call separate_compiler#SeparateCompiler#do_property_coloring on <var_compiler:SeparateCompiler>*/
1456 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
1457 var27
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
1458 if (unlikely(var27
== NULL
)) {
1459 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
1460 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
1464 RET_LABEL26
:(void)0;
1468 { /* Inline mmodule#MModule#in_importation (var25) on <var25:MModule> */
1469 var30
= var25
->attrs
[COLOR_nit__mmodule__MModule___in_importation
].val
; /* _in_importation on <var25:MModule> */
1470 if (unlikely(var30
== NULL
)) {
1471 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _in_importation");
1472 PRINT_ERROR(" (%s:%d)\n", FILE_nit__mmodule
, 96);
1476 RET_LABEL29
:(void)0;
1480 var31
= poset___poset__POSetElement___greaters(var28
);
1484 var32
= ((val
* (*)(val
* self
))(var_
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_
) /* iterator on <var_:Collection[MModule]>*/;
1489 var34
= ((short int (*)(val
* self
))(var_33
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_33
) /* is_ok on <var_33:Iterator[MModule]>*/;
1493 var35
= ((val
* (*)(val
* self
))(var_33
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_33
) /* item on <var_33:Iterator[MModule]>*/;
1497 { /* Inline model#MModule#intro_mclasses (var_m) on <var_m:MModule> */
1498 var38
= var_m
->attrs
[COLOR_nit__model__MModule___intro_mclasses
].val
; /* _intro_mclasses on <var_m:MModule> */
1499 if (unlikely(var38
== NULL
)) {
1500 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro_mclasses");
1501 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 128);
1505 RET_LABEL37
:(void)0;
1510 var40
= standard___standard__AbstractArrayRead___standard__abstract_collection__Collection__iterator(var_39
);
1515 var42
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__is_ok(var_41
);
1519 var43
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__item(var_41
);
1523 ((void (*)(val
* self
, val
* p0
))(var_compiler
->class->vft
[COLOR_nit__separate_compiler__SeparateCompiler__compile_class_to_c
]))(var_compiler
, var_mclass
) /* compile_class_to_c on <var_compiler:SeparateCompiler>*/;
1526 standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__next(var_41
); /* Direct call array#ArrayIterator#next on <var_41:ArrayIterator[MClass]>*/
1532 BREAK_label
: (void)0;
1534 { /* Inline abstract_collection#Iterator#finish (var_41) on <var_41:ArrayIterator[MClass]> */
1535 RET_LABEL44
:(void)0;
1539 ((void (*)(val
* self
))(var_33
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_33
) /* next on <var_33:Iterator[MModule]>*/;
1545 BREAK_label45
: (void)0;
1547 { /* Inline abstract_collection#Iterator#finish (var_33) on <var_33:Iterator[MModule]> */
1548 RET_LABEL46
:(void)0;
1556 var51
= standard___standard__NativeString___to_s_with_length(var49
, var50
);
1560 var52
= NEW_standard__Array(&type_standard__Array__standard__Object
);
1561 { /* var52 = array_instance Array[Object] */
1563 var54
= NEW_standard__NativeArray(var53
, &type_standard__NativeArray__standard__Object
);
1564 ((struct instance_standard__NativeArray
*)var54
)->values
[0] = (val
*) var_c_name
;
1565 ((struct instance_standard__NativeArray
*)var54
)->values
[1] = (val
*) var48
;
1567 ((void (*)(val
* self
, val
* p0
, long p1
))(var52
->class->vft
[COLOR_standard__array__Array__with_native
]))(var52
, var54
, var53
) /* with_native on <var52:Array[Object]>*/;
1571 var55
= ((val
* (*)(val
* self
))(var52
->class->vft
[COLOR_standard__string__Object__to_s
]))(var52
) /* to_s on <var52:Array[Object]>*/;
1574 var56
= nit___nit__AbstractCompiler___new_file(var_compiler
, var55
);
1577 nit___nit__AbstractCompiler___compile_nitni_global_ref_functions(var_compiler
); /* Direct call abstract_compiler#AbstractCompiler#compile_nitni_global_ref_functions on <var_compiler:SeparateCompiler>*/
1580 nit___nit__AbstractCompiler___compile_main_function(var_compiler
); /* Direct call abstract_compiler#AbstractCompiler#compile_main_function on <var_compiler:SeparateCompiler>*/
1583 nit___nit__AbstractCompiler___compile_finalizer_function(var_compiler
); /* Direct call abstract_compiler#AbstractCompiler#compile_finalizer_function on <var_compiler:SeparateCompiler>*/
1586 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
1587 var59
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
1588 if (unlikely(var59
== NULL
)) {
1589 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
1590 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
1594 RET_LABEL58
:(void)0;
1598 { /* Inline mmodule#MModule#in_importation (var57) on <var57:MModule> */
1599 var62
= var57
->attrs
[COLOR_nit__mmodule__MModule___in_importation
].val
; /* _in_importation on <var57:MModule> */
1600 if (unlikely(var62
== NULL
)) {
1601 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _in_importation");
1602 PRINT_ERROR(" (%s:%d)\n", FILE_nit__mmodule
, 96);
1606 RET_LABEL61
:(void)0;
1610 var63
= poset___poset__POSetElement___greaters(var60
);
1614 var65
= ((val
* (*)(val
* self
))(var_64
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_64
) /* iterator on <var_64:Collection[MModule]>*/;
1619 var67
= ((short int (*)(val
* self
))(var_66
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_66
) /* is_ok on <var_66:Iterator[MModule]>*/;
1623 var68
= ((val
* (*)(val
* self
))(var_66
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_66
) /* item on <var_66:Iterator[MModule]>*/;
1627 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
1628 var72
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
1629 if (unlikely(var72
== NULL
)) {
1630 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1631 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 481);
1635 RET_LABEL71
:(void)0;
1639 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (var70) on <var70:ModelBuilder> */
1640 var75
= var70
->attrs
[COLOR_nit__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var70:ModelBuilder> */
1641 if (unlikely(var75
== NULL
)) {
1642 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1643 PRINT_ERROR(" (%s:%d)\n", FILE_nit__modelbuilder_base
, 47);
1647 RET_LABEL74
:(void)0;
1653 var78
= "Generate C for module ";
1655 var80
= standard___standard__NativeString___to_s_with_length(var78
, var79
);
1660 var81
= nit___nit__MModule___nit__model_base__MEntity__full_name(var_m69
);
1662 var82
= NEW_standard__Array(&type_standard__Array__standard__Object
);
1663 { /* var82 = array_instance Array[Object] */
1665 var84
= NEW_standard__NativeArray(var83
, &type_standard__NativeArray__standard__Object
);
1666 ((struct instance_standard__NativeArray
*)var84
)->values
[0] = (val
*) var77
;
1667 ((struct instance_standard__NativeArray
*)var84
)->values
[1] = (val
*) var81
;
1669 ((void (*)(val
* self
, val
* p0
, long p1
))(var82
->class->vft
[COLOR_standard__array__Array__with_native
]))(var82
, var84
, var83
) /* with_native on <var82:Array[Object]>*/;
1673 var85
= ((val
* (*)(val
* self
))(var82
->class->vft
[COLOR_standard__string__Object__to_s
]))(var82
) /* to_s on <var82:Array[Object]>*/;
1677 nit___nit__ToolContext___info(var73
, var85
, var86
); /* Direct call toolcontext#ToolContext#info on <var73:ToolContext>*/
1680 var87
= nit___nit__MModule___nit__model_base__MEntity__c_name(var_m69
);
1687 var92
= standard___standard__NativeString___to_s_with_length(var90
, var91
);
1691 var93
= NEW_standard__Array(&type_standard__Array__standard__Object
);
1692 { /* var93 = array_instance Array[Object] */
1694 var95
= NEW_standard__NativeArray(var94
, &type_standard__NativeArray__standard__Object
);
1695 ((struct instance_standard__NativeArray
*)var95
)->values
[0] = (val
*) var87
;
1696 ((struct instance_standard__NativeArray
*)var95
)->values
[1] = (val
*) var89
;
1698 ((void (*)(val
* self
, val
* p0
, long p1
))(var93
->class->vft
[COLOR_standard__array__Array__with_native
]))(var93
, var95
, var94
) /* with_native on <var93:Array[Object]>*/;
1702 var96
= ((val
* (*)(val
* self
))(var93
->class->vft
[COLOR_standard__string__Object__to_s
]))(var93
) /* to_s on <var93:Array[Object]>*/;
1705 var97
= nit___nit__AbstractCompiler___new_file(var_compiler
, var96
);
1708 nit___nit__SeparateCompiler___compile_module_to_c(var_compiler
, var_m69
); /* Direct call separate_compiler#SeparateCompiler#compile_module_to_c on <var_compiler:SeparateCompiler>*/
1711 ((void (*)(val
* self
))(var_66
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_66
) /* next on <var_66:Iterator[MModule]>*/;
1717 BREAK_label98
: (void)0;
1719 { /* Inline abstract_collection#Iterator#finish (var_66) on <var_66:Iterator[MModule]> */
1720 RET_LABEL99
:(void)0;
1724 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
1725 var102
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
1726 if (unlikely(var102
== NULL
)) {
1727 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
1728 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 481);
1732 RET_LABEL101
:(void)0;
1736 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (var100) on <var100:ModelBuilder> */
1737 var105
= var100
->attrs
[COLOR_nit__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var100:ModelBuilder> */
1738 if (unlikely(var105
== NULL
)) {
1739 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1740 PRINT_ERROR(" (%s:%d)\n", FILE_nit__modelbuilder_base
, 47);
1744 RET_LABEL104
:(void)0;
1748 var107
= varonce106
;
1750 var108
= "Type coloring";
1752 var110
= standard___standard__NativeString___to_s_with_length(var108
, var109
);
1754 varonce106
= var107
;
1758 nit___nit__ToolContext___info(var103
, var107
, var111
); /* Direct call toolcontext#ToolContext#info on <var103:ToolContext>*/
1761 var113
= varonce112
;
1765 var116
= standard___standard__NativeString___to_s_with_length(var114
, var115
);
1767 varonce112
= var113
;
1769 var117
= NEW_standard__Array(&type_standard__Array__standard__Object
);
1770 { /* var117 = array_instance Array[Object] */
1772 var119
= NEW_standard__NativeArray(var118
, &type_standard__NativeArray__standard__Object
);
1773 ((struct instance_standard__NativeArray
*)var119
)->values
[0] = (val
*) var_c_name
;
1774 ((struct instance_standard__NativeArray
*)var119
)->values
[1] = (val
*) var113
;
1776 ((void (*)(val
* self
, val
* p0
, long p1
))(var117
->class->vft
[COLOR_standard__array__Array__with_native
]))(var117
, var119
, var118
) /* with_native on <var117:Array[Object]>*/;
1780 var120
= ((val
* (*)(val
* self
))(var117
->class->vft
[COLOR_standard__string__Object__to_s
]))(var117
) /* to_s on <var117:Array[Object]>*/;
1783 var121
= nit___nit__AbstractCompiler___new_file(var_compiler
, var120
);
1786 ((void (*)(val
* self
))(var_compiler
->class->vft
[COLOR_nit__separate_compiler__SeparateCompiler__compile_types
]))(var_compiler
) /* compile_types on <var_compiler:SeparateCompiler>*/;
1790 /* method separate_compiler#SeparateCompiler#compile_types for (self: SeparateCompiler) */
1791 void nit___nit__SeparateCompiler___compile_types(val
* self
) {
1792 val
* var_compiler
/* var compiler: SeparateCompiler */;
1793 val
* var
/* : POSet[MType] */;
1794 val
* var_mtypes
/* var mtypes: POSet[MType] */;
1795 val
* var_
/* var : POSet[MType] */;
1796 val
* var1
/* : Iterator[nullable Object] */;
1797 val
* var_2
/* var : Iterator[MType] */;
1798 short int var3
/* : Bool */;
1799 val
* var4
/* : nullable Object */;
1800 val
* var_t
/* var t: MType */;
1801 val
* var6
/* : Set[MType] */;
1802 val
* var8
/* : Set[MType] */;
1803 val
* var_9
/* var : Set[MType] */;
1804 val
* var10
/* : Iterator[nullable Object] */;
1805 val
* var_11
/* var : Iterator[MType] */;
1806 short int var12
/* : Bool */;
1807 val
* var13
/* : nullable Object */;
1808 val
* var_t14
/* var t: MType */;
1809 short int var15
/* : Bool */;
1810 var_compiler
= self
;
1812 var
= nit___nit__SeparateCompiler___do_type_coloring(var_compiler
);
1817 var1
= poset___poset__POSet___standard__abstract_collection__Collection__iterator(var_
);
1822 var3
= ((short int (*)(val
* self
))(var_2
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_2
) /* is_ok on <var_2:Iterator[MType]>*/;
1826 var4
= ((val
* (*)(val
* self
))(var_2
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_2
) /* item on <var_2:Iterator[MType]>*/;
1830 nit___nit__SeparateCompiler___compile_type_to_c(var_compiler
, var_t
); /* Direct call separate_compiler#SeparateCompiler#compile_type_to_c on <var_compiler:SeparateCompiler>*/
1833 ((void (*)(val
* self
))(var_2
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_2
) /* next on <var_2:Iterator[MType]>*/;
1839 BREAK_label
: (void)0;
1841 { /* Inline abstract_collection#Iterator#finish (var_2) on <var_2:Iterator[MType]> */
1846 { /* Inline separate_compiler#SeparateCompiler#undead_types (var_compiler) on <var_compiler:SeparateCompiler> */
1847 var8
= var_compiler
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___undead_types
].val
; /* _undead_types on <var_compiler:SeparateCompiler> */
1848 if (unlikely(var8
== NULL
)) {
1849 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _undead_types");
1850 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 121);
1859 var10
= ((val
* (*)(val
* self
))(var_9
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_9
) /* iterator on <var_9:Set[MType]>*/;
1864 var12
= ((short int (*)(val
* self
))(var_11
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_11
) /* is_ok on <var_11:Iterator[MType]>*/;
1868 var13
= ((val
* (*)(val
* self
))(var_11
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_11
) /* item on <var_11:Iterator[MType]>*/;
1872 var15
= poset___poset__POSet___standard__abstract_collection__Collection__has(var_mtypes
, var_t14
);
1879 nit___nit__SeparateCompiler___compile_type_to_c(var_compiler
, var_t14
); /* Direct call separate_compiler#SeparateCompiler#compile_type_to_c on <var_compiler:SeparateCompiler>*/
1881 BREAK_label16
: (void)0;
1883 ((void (*)(val
* self
))(var_11
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_11
) /* next on <var_11:Iterator[MType]>*/;
1889 BREAK_label17
: (void)0;
1891 { /* Inline abstract_collection#Iterator#finish (var_11) on <var_11:Iterator[MType]> */
1892 RET_LABEL18
:(void)0;
1897 /* method separate_compiler#SeparateCompiler#compile_header_structs for (self: SeparateCompiler) */
1898 void nit___nit__SeparateCompiler___nit__abstract_compiler__AbstractCompiler__compile_header_structs(val
* self
) {
1899 val
* var
/* : CodeWriter */;
1900 val
* var2
/* : CodeWriter */;
1901 static val
* varonce
;
1902 val
* var3
/* : String */;
1903 char* var4
/* : NativeString */;
1904 long var5
/* : Int */;
1905 val
* var6
/* : FlatString */;
1906 val
* var7
/* : CodeWriter */;
1907 val
* var9
/* : CodeWriter */;
1908 static val
* varonce10
;
1909 val
* var11
/* : String */;
1910 char* var12
/* : NativeString */;
1911 long var13
/* : Int */;
1912 val
* var14
/* : FlatString */;
1913 val
* var15
/* : CodeWriter */;
1914 val
* var17
/* : CodeWriter */;
1915 static val
* varonce18
;
1916 val
* var19
/* : String */;
1917 char* var20
/* : NativeString */;
1918 long var21
/* : Int */;
1919 val
* var22
/* : FlatString */;
1920 val
* var23
/* : CodeWriter */;
1921 val
* var25
/* : CodeWriter */;
1922 static val
* varonce26
;
1923 val
* var27
/* : String */;
1924 char* var28
/* : NativeString */;
1925 long var29
/* : Int */;
1926 val
* var30
/* : FlatString */;
1927 val
* var31
/* : CodeWriter */;
1928 val
* var33
/* : CodeWriter */;
1929 static val
* varonce34
;
1930 val
* var35
/* : String */;
1931 char* var36
/* : NativeString */;
1932 long var37
/* : Int */;
1933 val
* var38
/* : FlatString */;
1934 val
* var39
/* : CodeWriter */;
1935 val
* var41
/* : CodeWriter */;
1936 static val
* varonce42
;
1937 val
* var43
/* : String */;
1938 char* var44
/* : NativeString */;
1939 long var45
/* : Int */;
1940 val
* var46
/* : FlatString */;
1942 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
1943 var2
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
1944 if (unlikely(var2
== NULL
)) {
1945 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
1946 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 523);
1956 var4
= "typedef void(*nitmethod_t)(void); /* general C type representing a Nit method. */";
1958 var6
= standard___standard__NativeString___to_s_with_length(var4
, var5
);
1963 nit___nit__CodeWriter___add_decl(var
, var3
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var:CodeWriter>*/
1966 nit___nit__SeparateCompiler___compile_header_attribute_structs(self
); /* Direct call separate_compiler#SeparateCompiler#compile_header_attribute_structs on <self:SeparateCompiler>*/
1969 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
1970 var9
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
1971 if (unlikely(var9
== NULL
)) {
1972 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
1973 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 523);
1983 var12
= "struct class { int box_kind; nitmethod_t vft[]; }; /* general C type representing a Nit class. */";
1985 var14
= standard___standard__NativeString___to_s_with_length(var12
, var13
);
1990 nit___nit__CodeWriter___add_decl(var7
, var11
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var7:CodeWriter>*/
1993 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
1994 var17
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
1995 if (unlikely(var17
== NULL
)) {
1996 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
1997 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 523);
2001 RET_LABEL16
:(void)0;
2007 var20
= "struct type { int id; const char *name; int color; short int is_nullable; const struct types *resolution_table; int table_size; int type_table[]; }; /* general C type representing a Nit type. */";
2009 var22
= standard___standard__NativeString___to_s_with_length(var20
, var21
);
2014 nit___nit__CodeWriter___add_decl(var15
, var19
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var15:CodeWriter>*/
2017 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2018 var25
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2019 if (unlikely(var25
== NULL
)) {
2020 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2021 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 523);
2025 RET_LABEL24
:(void)0;
2031 var28
= "struct instance { const struct type *type; const struct class *class; nitattribute_t attrs[]; }; /* general C type representing a Nit instance. */";
2033 var30
= standard___standard__NativeString___to_s_with_length(var28
, var29
);
2038 nit___nit__CodeWriter___add_decl(var23
, var27
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var23:CodeWriter>*/
2041 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2042 var33
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2043 if (unlikely(var33
== NULL
)) {
2044 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2045 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 523);
2049 RET_LABEL32
:(void)0;
2055 var36
= "struct types { int dummy; const struct type *types[]; }; /* a list types (used for vts, fts and unresolved lists). */";
2057 var38
= standard___standard__NativeString___to_s_with_length(var36
, var37
);
2062 nit___nit__CodeWriter___add_decl(var31
, var35
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var31:CodeWriter>*/
2065 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2066 var41
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2067 if (unlikely(var41
== NULL
)) {
2068 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2069 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 523);
2073 RET_LABEL40
:(void)0;
2079 var44
= "typedef struct instance val; /* general C type representing a Nit instance. */";
2081 var46
= standard___standard__NativeString___to_s_with_length(var44
, var45
);
2086 nit___nit__CodeWriter___add_decl(var39
, var43
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var39:CodeWriter>*/
2090 /* method separate_compiler#SeparateCompiler#compile_header_attribute_structs for (self: SeparateCompiler) */
2091 void nit___nit__SeparateCompiler___compile_header_attribute_structs(val
* self
) {
2092 val
* var
/* : ModelBuilder */;
2093 val
* var2
/* : ModelBuilder */;
2094 val
* var3
/* : ToolContext */;
2095 val
* var5
/* : ToolContext */;
2096 val
* var6
/* : OptionBool */;
2097 val
* var8
/* : OptionBool */;
2098 val
* var9
/* : nullable Object */;
2099 val
* var11
/* : nullable Object */;
2100 short int var12
/* : Bool */;
2101 val
* var13
/* : CodeWriter */;
2102 val
* var15
/* : CodeWriter */;
2103 static val
* varonce
;
2104 val
* var16
/* : String */;
2105 char* var17
/* : NativeString */;
2106 long var18
/* : Int */;
2107 val
* var19
/* : FlatString */;
2108 val
* var20
/* : CodeWriter */;
2109 val
* var22
/* : CodeWriter */;
2110 static val
* varonce23
;
2111 val
* var24
/* : String */;
2112 char* var25
/* : NativeString */;
2113 long var26
/* : Int */;
2114 val
* var27
/* : FlatString */;
2115 val
* var28
/* : CodeWriter */;
2116 val
* var30
/* : CodeWriter */;
2117 static val
* varonce31
;
2118 val
* var32
/* : String */;
2119 char* var33
/* : NativeString */;
2120 long var34
/* : Int */;
2121 val
* var35
/* : FlatString */;
2122 val
* var36
/* : HashMap[MClass, Int] */;
2123 val
* var38
/* : HashMap[MClass, Int] */;
2124 val
* var_
/* var : HashMap[MClass, Int] */;
2125 val
* var39
/* : HashMapIterator[nullable Object, nullable Object] */;
2126 val
* var_40
/* var : HashMapIterator[MClass, Int] */;
2127 short int var41
/* : Bool */;
2128 val
* var42
/* : nullable Object */;
2129 val
* var_c
/* var c: MClass */;
2130 val
* var43
/* : nullable Object */;
2131 long var44
/* : Int */;
2132 long var_v
/* var v: Int */;
2133 val
* var45
/* : MClassType */;
2134 val
* var47
/* : MClassType */;
2135 val
* var_t
/* var t: MClassType */;
2136 val
* var48
/* : MClass */;
2137 val
* var50
/* : MClass */;
2138 val
* var51
/* : String */;
2139 val
* var53
/* : String */;
2140 static val
* varonce54
;
2141 val
* var55
/* : String */;
2142 char* var56
/* : NativeString */;
2143 long var57
/* : Int */;
2144 val
* var58
/* : FlatString */;
2145 short int var59
/* : Bool */;
2146 val
* var60
/* : CodeWriter */;
2147 val
* var62
/* : CodeWriter */;
2148 val
* var63
/* : String */;
2149 static val
* varonce64
;
2150 val
* var65
/* : String */;
2151 char* var66
/* : NativeString */;
2152 long var67
/* : Int */;
2153 val
* var68
/* : FlatString */;
2154 val
* var69
/* : String */;
2155 static val
* varonce70
;
2156 val
* var71
/* : String */;
2157 char* var72
/* : NativeString */;
2158 long var73
/* : Int */;
2159 val
* var74
/* : FlatString */;
2160 val
* var75
/* : Array[Object] */;
2161 long var76
/* : Int */;
2162 val
* var77
/* : NativeArray[Object] */;
2163 val
* var78
/* : String */;
2164 val
* var81
/* : CodeWriter */;
2165 val
* var83
/* : CodeWriter */;
2166 static val
* varonce84
;
2167 val
* var85
/* : String */;
2168 char* var86
/* : NativeString */;
2169 long var87
/* : Int */;
2170 val
* var88
/* : FlatString */;
2172 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
2173 var2
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
2174 if (unlikely(var2
== NULL
)) {
2175 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
2176 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 481);
2184 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (var) on <var:ModelBuilder> */
2185 var5
= var
->attrs
[COLOR_nit__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var:ModelBuilder> */
2186 if (unlikely(var5
== NULL
)) {
2187 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
2188 PRINT_ERROR(" (%s:%d)\n", FILE_nit__modelbuilder_base
, 47);
2196 { /* Inline separate_compiler#ToolContext#opt_no_union_attribute (var3) on <var3:ToolContext> */
2197 var8
= var3
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_no_union_attribute
].val
; /* _opt_no_union_attribute on <var3:ToolContext> */
2198 if (unlikely(var8
== NULL
)) {
2199 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_union_attribute");
2200 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 28);
2208 { /* Inline opts#Option#value (var6) on <var6:OptionBool> */
2209 var11
= var6
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var6:OptionBool> */
2211 RET_LABEL10
:(void)0;
2214 var12
= ((struct instance_standard__Bool
*)var9
)->value
; /* autounbox from nullable Object to Bool */;
2217 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2218 var15
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2219 if (unlikely(var15
== NULL
)) {
2220 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2221 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 523);
2225 RET_LABEL14
:(void)0;
2231 var17
= "typedef void* nitattribute_t; /* general C type representing a Nit attribute. */";
2233 var19
= standard___standard__NativeString___to_s_with_length(var17
, var18
);
2238 nit___nit__CodeWriter___add_decl(var13
, var16
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var13:CodeWriter>*/
2242 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2243 var22
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2244 if (unlikely(var22
== NULL
)) {
2245 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2246 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 523);
2250 RET_LABEL21
:(void)0;
2256 var25
= "typedef union {";
2258 var27
= standard___standard__NativeString___to_s_with_length(var25
, var26
);
2263 nit___nit__CodeWriter___add_decl(var20
, var24
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var20:CodeWriter>*/
2266 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2267 var30
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2268 if (unlikely(var30
== NULL
)) {
2269 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2270 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 523);
2274 RET_LABEL29
:(void)0;
2280 var33
= "void* val;";
2282 var35
= standard___standard__NativeString___to_s_with_length(var33
, var34
);
2287 nit___nit__CodeWriter___add_decl(var28
, var32
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var28:CodeWriter>*/
2290 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:SeparateCompiler> */
2291 var38
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
2292 if (unlikely(var38
== NULL
)) {
2293 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
2294 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 233);
2298 RET_LABEL37
:(void)0;
2303 var39
= standard___standard__HashMap___standard__abstract_collection__MapRead__iterator(var_
);
2308 var41
= standard___standard__HashMapIterator___standard__abstract_collection__MapIterator__is_ok(var_40
);
2312 var42
= standard___standard__HashMapIterator___standard__abstract_collection__MapIterator__key(var_40
);
2316 var43
= standard___standard__HashMapIterator___standard__abstract_collection__MapIterator__item(var_40
);
2318 var44
= ((struct instance_standard__Int
*)var43
)->value
; /* autounbox from nullable Object to Int */;
2321 { /* Inline model#MClass#mclass_type (var_c) on <var_c:MClass> */
2322 var47
= var_c
->attrs
[COLOR_nit__model__MClass___mclass_type
].val
; /* _mclass_type on <var_c:MClass> */
2323 if (unlikely(var47
== NULL
)) {
2324 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
2325 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 438);
2329 RET_LABEL46
:(void)0;
2334 { /* Inline model#MClassType#mclass (var_t) on <var_t:MClassType> */
2335 var50
= var_t
->attrs
[COLOR_nit__model__MClassType___mclass
].val
; /* _mclass on <var_t:MClassType> */
2336 if (unlikely(var50
== NULL
)) {
2337 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
2338 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 1058);
2342 RET_LABEL49
:(void)0;
2346 { /* Inline model#MClass#name (var48) on <var48:MClass> */
2347 var53
= var48
->attrs
[COLOR_nit__model__MClass___name
].val
; /* _name on <var48:MClass> */
2348 if (unlikely(var53
== NULL
)) {
2349 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _name");
2350 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 348);
2354 RET_LABEL52
:(void)0;
2362 var58
= standard___standard__NativeString___to_s_with_length(var56
, var57
);
2367 var59
= ((short int (*)(val
* self
, val
* p0
))(var51
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var51
, var55
) /* == on <var51:String>*/;
2374 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2375 var62
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2376 if (unlikely(var62
== NULL
)) {
2377 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2378 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 523);
2382 RET_LABEL61
:(void)0;
2386 var63
= nit__abstract_compiler___MClassType___MType__ctype_extern(var_t
);
2393 var68
= standard___standard__NativeString___to_s_with_length(var66
, var67
);
2398 var69
= nit__abstract_compiler___MClassType___MType__ctypename(var_t
);
2405 var74
= standard___standard__NativeString___to_s_with_length(var72
, var73
);
2409 var75
= NEW_standard__Array(&type_standard__Array__standard__Object
);
2410 { /* var75 = array_instance Array[Object] */
2412 var77
= NEW_standard__NativeArray(var76
, &type_standard__NativeArray__standard__Object
);
2413 ((struct instance_standard__NativeArray
*)var77
)->values
[0] = (val
*) var63
;
2414 ((struct instance_standard__NativeArray
*)var77
)->values
[1] = (val
*) var65
;
2415 ((struct instance_standard__NativeArray
*)var77
)->values
[2] = (val
*) var69
;
2416 ((struct instance_standard__NativeArray
*)var77
)->values
[3] = (val
*) var71
;
2418 ((void (*)(val
* self
, val
* p0
, long p1
))(var75
->class->vft
[COLOR_standard__array__Array__with_native
]))(var75
, var77
, var76
) /* with_native on <var75:Array[Object]>*/;
2422 var78
= ((val
* (*)(val
* self
))(var75
->class->vft
[COLOR_standard__string__Object__to_s
]))(var75
) /* to_s on <var75:Array[Object]>*/;
2425 nit___nit__CodeWriter___add_decl(var60
, var78
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var60:CodeWriter>*/
2427 BREAK_label
: (void)0;
2429 standard___standard__HashMapIterator___standard__abstract_collection__MapIterator__next(var_40
); /* Direct call hash_collection#HashMapIterator#next on <var_40:HashMapIterator[MClass, Int]>*/
2435 BREAK_label79
: (void)0;
2437 { /* Inline abstract_collection#MapIterator#finish (var_40) on <var_40:HashMapIterator[MClass, Int]> */
2438 RET_LABEL80
:(void)0;
2442 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2443 var83
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2444 if (unlikely(var83
== NULL
)) {
2445 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2446 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 523);
2450 RET_LABEL82
:(void)0;
2456 var86
= "} nitattribute_t; /* general C type representing a Nit attribute. */";
2458 var88
= standard___standard__NativeString___to_s_with_length(var86
, var87
);
2463 nit___nit__CodeWriter___add_decl(var81
, var85
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var81:CodeWriter>*/
2468 /* method separate_compiler#SeparateCompiler#compile_box_kinds for (self: SeparateCompiler) */
2469 void nit___nit__SeparateCompiler___compile_box_kinds(val
* self
) {
2470 val
* var
/* : Array[String] */;
2471 long var1
/* : Int */;
2472 val
* var_
/* var : Array[String] */;
2473 static val
* varonce
;
2474 val
* var2
/* : String */;
2475 char* var3
/* : NativeString */;
2476 long var4
/* : Int */;
2477 val
* var5
/* : FlatString */;
2478 static val
* varonce6
;
2479 val
* var7
/* : String */;
2480 char* var8
/* : NativeString */;
2481 long var9
/* : Int */;
2482 val
* var10
/* : FlatString */;
2483 static val
* varonce11
;
2484 val
* var12
/* : String */;
2485 char* var13
/* : NativeString */;
2486 long var14
/* : Int */;
2487 val
* var15
/* : FlatString */;
2488 static val
* varonce16
;
2489 val
* var17
/* : String */;
2490 char* var18
/* : NativeString */;
2491 long var19
/* : Int */;
2492 val
* var20
/* : FlatString */;
2493 static val
* varonce21
;
2494 val
* var22
/* : String */;
2495 char* var23
/* : NativeString */;
2496 long var24
/* : Int */;
2497 val
* var25
/* : FlatString */;
2498 static val
* varonce26
;
2499 val
* var27
/* : String */;
2500 char* var28
/* : NativeString */;
2501 long var29
/* : Int */;
2502 val
* var30
/* : FlatString */;
2503 val
* var_31
/* var : Array[String] */;
2504 val
* var32
/* : ArrayIterator[nullable Object] */;
2505 val
* var_33
/* var : ArrayIterator[String] */;
2506 short int var34
/* : Bool */;
2507 val
* var35
/* : nullable Object */;
2508 val
* var_classname
/* var classname: String */;
2509 val
* var36
/* : MModule */;
2510 val
* var38
/* : MModule */;
2511 val
* var39
/* : Model */;
2512 val
* var41
/* : Model */;
2513 val
* var42
/* : nullable Array[MClass] */;
2514 val
* var_classes
/* var classes: nullable Array[MClass] */;
2515 val
* var43
/* : null */;
2516 short int var44
/* : Bool */;
2517 short int var45
/* : Bool */;
2518 long var46
/* : Int */;
2519 long var48
/* : Int */;
2520 long var49
/* : Int */;
2521 short int var50
/* : Bool */;
2522 short int var52
/* : Bool */;
2523 static val
* varonce53
;
2524 val
* var54
/* : String */;
2525 char* var55
/* : NativeString */;
2526 long var56
/* : Int */;
2527 val
* var57
/* : FlatString */;
2528 val
* var58
/* : String */;
2529 val
* var59
/* : HashMap[MClass, Int] */;
2530 val
* var61
/* : HashMap[MClass, Int] */;
2531 val
* var62
/* : nullable Object */;
2532 val
* var63
/* : HashMap[MClass, Int] */;
2533 val
* var65
/* : HashMap[MClass, Int] */;
2534 long var66
/* : Int */;
2535 long var67
/* : Int */;
2536 long var68
/* : Int */;
2537 short int var70
/* : Bool */;
2540 const char* var_class_name
;
2541 long var71
/* : Int */;
2542 val
* var72
/* : nullable Object */;
2543 var
= NEW_standard__Array(&type_standard__Array__standard__String
);
2546 standard___standard__Array___with_capacity(var
, var1
); /* Direct call array#Array#with_capacity on <var:Array[String]>*/
2554 var5
= standard___standard__NativeString___to_s_with_length(var3
, var4
);
2559 standard___standard__AbstractArray___standard__abstract_collection__Sequence__push(var_
, var2
); /* Direct call array#AbstractArray#push on <var_:Array[String]>*/
2566 var10
= standard___standard__NativeString___to_s_with_length(var8
, var9
);
2571 standard___standard__AbstractArray___standard__abstract_collection__Sequence__push(var_
, var7
); /* Direct call array#AbstractArray#push on <var_:Array[String]>*/
2578 var15
= standard___standard__NativeString___to_s_with_length(var13
, var14
);
2583 standard___standard__AbstractArray___standard__abstract_collection__Sequence__push(var_
, var12
); /* Direct call array#AbstractArray#push on <var_:Array[String]>*/
2590 var20
= standard___standard__NativeString___to_s_with_length(var18
, var19
);
2595 standard___standard__AbstractArray___standard__abstract_collection__Sequence__push(var_
, var17
); /* Direct call array#AbstractArray#push on <var_:Array[String]>*/
2600 var23
= "NativeString";
2602 var25
= standard___standard__NativeString___to_s_with_length(var23
, var24
);
2607 standard___standard__AbstractArray___standard__abstract_collection__Sequence__push(var_
, var22
); /* Direct call array#AbstractArray#push on <var_:Array[String]>*/
2614 var30
= standard___standard__NativeString___to_s_with_length(var28
, var29
);
2619 standard___standard__AbstractArray___standard__abstract_collection__Sequence__push(var_
, var27
); /* Direct call array#AbstractArray#push on <var_:Array[String]>*/
2623 var32
= standard___standard__AbstractArrayRead___standard__abstract_collection__Collection__iterator(var_31
);
2628 var34
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__is_ok(var_33
);
2632 var35
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__item(var_33
);
2634 var_classname
= var35
;
2636 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
2637 var38
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
2638 if (unlikely(var38
== NULL
)) {
2639 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
2640 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
2644 RET_LABEL37
:(void)0;
2648 { /* Inline mmodule#MModule#model (var36) on <var36:MModule> */
2649 var41
= var36
->attrs
[COLOR_nit__mmodule__MModule___model
].val
; /* _model on <var36:MModule> */
2650 if (unlikely(var41
== NULL
)) {
2651 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _model");
2652 PRINT_ERROR(" (%s:%d)\n", FILE_nit__mmodule
, 73);
2656 RET_LABEL40
:(void)0;
2660 var42
= nit__model___Model___get_mclasses_by_name(var39
, var_classname
);
2662 var_classes
= var42
;
2664 if (var_classes
== NULL
) {
2665 var44
= 1; /* is null */
2667 var44
= 0; /* arg is null but recv is not */
2670 var45
= standard___standard__Array___standard__kernel__Object___61d_61d(var_classes
, var43
);
2678 { /* Inline array#AbstractArrayRead#length (var_classes) on <var_classes:nullable Array[MClass](Array[MClass])> */
2679 var48
= var_classes
->attrs
[COLOR_standard__array__AbstractArrayRead___length
].l
; /* _length on <var_classes:nullable Array[MClass](Array[MClass])> */
2681 RET_LABEL47
:(void)0;
2686 { /* Inline kernel#Int#== (var46,var49) on <var46:Int> */
2687 var52
= var46
== var49
;
2690 RET_LABEL51
:(void)0;
2693 if (unlikely(!var50
)) {
2699 var57
= standard___standard__NativeString___to_s_with_length(var55
, var56
);
2704 var58
= standard__string___Collection___join(var_classes
, var54
);
2707 standard__file___Object___print(self
, var58
); /* Direct call file#Object#print on <self:SeparateCompiler>*/
2709 PRINT_ERROR("Runtime error: %s", "Assert failed");
2710 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 228);
2714 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:SeparateCompiler> */
2715 var61
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
2716 if (unlikely(var61
== NULL
)) {
2717 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
2718 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 233);
2722 RET_LABEL60
:(void)0;
2726 var62
= standard___standard__SequenceRead___Collection__first(var_classes
);
2729 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:SeparateCompiler> */
2730 var65
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
2731 if (unlikely(var65
== NULL
)) {
2732 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
2733 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 233);
2737 RET_LABEL64
:(void)0;
2741 var66
= standard___standard__HashMap___standard__abstract_collection__MapRead__length(var63
);
2745 { /* Inline kernel#Int#+ (var66,var67) on <var66:Int> */
2746 /* Covariant cast for argument 0 (i) <var67:Int> isa OTHER */
2747 /* <var67:Int> isa OTHER */
2748 var70
= 1; /* easy <var67:Int> isa OTHER*/
2749 if (unlikely(!var70
)) {
2750 var_class_name
= type_standard__Int
.name
;
2751 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2752 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel
, 413);
2755 var71
= var66
+ var67
;
2758 RET_LABEL69
:(void)0;
2762 var72
= BOX_standard__Int(var68
); /* autobox from Int to nullable Object */
2763 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var59
, var62
, var72
); /* Direct call hash_collection#HashMap#[]= on <var59:HashMap[MClass, Int]>*/
2765 BREAK_label
: (void)0;
2767 standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__next(var_33
); /* Direct call array#ArrayIterator#next on <var_33:ArrayIterator[String]>*/
2773 BREAK_label73
: (void)0;
2775 { /* Inline abstract_collection#Iterator#finish (var_33) on <var_33:ArrayIterator[String]> */
2776 RET_LABEL74
:(void)0;
2781 /* method separate_compiler#SeparateCompiler#box_kinds for (self: SeparateCompiler): HashMap[MClass, Int] */
2782 val
* nit___nit__SeparateCompiler___box_kinds(val
* self
) {
2783 val
* var
/* : HashMap[MClass, Int] */;
2784 val
* var1
/* : HashMap[MClass, Int] */;
2785 var1
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
2786 if (unlikely(var1
== NULL
)) {
2787 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
2788 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 233);
2795 /* method separate_compiler#SeparateCompiler#box_kind_of for (self: SeparateCompiler, MClass): Int */
2796 long nit___nit__SeparateCompiler___box_kind_of(val
* self
, val
* p0
) {
2797 long var
/* : Int */;
2798 val
* var_mclass
/* var mclass: MClass */;
2799 val
* var1
/* : MClassType */;
2800 val
* var3
/* : MClassType */;
2801 val
* var4
/* : String */;
2802 static val
* varonce
;
2803 val
* var5
/* : String */;
2804 char* var6
/* : NativeString */;
2805 long var7
/* : Int */;
2806 val
* var8
/* : FlatString */;
2807 short int var9
/* : Bool */;
2808 long var10
/* : Int */;
2809 short int var11
/* : Bool */;
2810 val
* var12
/* : MClassKind */;
2811 val
* var14
/* : MClassKind */;
2812 val
* var15
/* : MClassKind */;
2813 short int var16
/* : Bool */;
2814 val
* var_other
/* var other: nullable Object */;
2815 short int var18
/* : Bool */;
2816 short int var20
/* : Bool */;
2817 short int var_
/* var : Bool */;
2818 val
* var21
/* : String */;
2819 val
* var23
/* : String */;
2820 static val
* varonce24
;
2821 val
* var25
/* : String */;
2822 char* var26
/* : NativeString */;
2823 long var27
/* : Int */;
2824 val
* var28
/* : FlatString */;
2825 short int var29
/* : Bool */;
2826 val
* var_other31
/* var other: nullable Object */;
2827 short int var32
/* : Bool */;
2828 short int var33
/* : Bool */;
2829 val
* var34
/* : HashMap[MClass, Int] */;
2830 val
* var36
/* : HashMap[MClass, Int] */;
2831 val
* var37
/* : MModule */;
2832 val
* var39
/* : MModule */;
2833 static val
* varonce40
;
2834 val
* var41
/* : String */;
2835 char* var42
/* : NativeString */;
2836 long var43
/* : Int */;
2837 val
* var44
/* : FlatString */;
2838 val
* var45
/* : MClass */;
2839 val
* var46
/* : nullable Object */;
2840 long var47
/* : Int */;
2841 val
* var48
/* : HashMap[MClass, Int] */;
2842 val
* var50
/* : HashMap[MClass, Int] */;
2843 val
* var51
/* : nullable Object */;
2844 long var52
/* : Int */;
2847 { /* Inline model#MClass#mclass_type (var_mclass) on <var_mclass:MClass> */
2848 var3
= var_mclass
->attrs
[COLOR_nit__model__MClass___mclass_type
].val
; /* _mclass_type on <var_mclass:MClass> */
2849 if (unlikely(var3
== NULL
)) {
2850 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
2851 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 438);
2859 var4
= nit__abstract_compiler___MClassType___MType__ctype_extern(var1
);
2866 var8
= standard___standard__NativeString___to_s_with_length(var6
, var7
);
2871 var9
= ((short int (*)(val
* self
, val
* p0
))(var4
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var4
, var5
) /* == on <var4:String>*/;
2879 { /* Inline model#MClass#kind (var_mclass) on <var_mclass:MClass> */
2880 var14
= var_mclass
->attrs
[COLOR_nit__model__MClass___kind
].val
; /* _kind on <var_mclass:MClass> */
2881 if (unlikely(var14
== NULL
)) {
2882 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _kind");
2883 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 399);
2887 RET_LABEL13
:(void)0;
2891 var15
= nit__model___standard__Object___extern_kind(self
);
2894 { /* Inline kernel#Object#== (var12,var15) on <var12:MClassKind> */
2897 { /* Inline kernel#Object#is_same_instance (var12,var_other) on <var12:MClassKind> */
2898 var20
= var12
== var_other
;
2901 RET_LABEL19
:(void)0;
2906 RET_LABEL17
:(void)0;
2912 { /* Inline model#MClass#name (var_mclass) on <var_mclass:MClass> */
2913 var23
= var_mclass
->attrs
[COLOR_nit__model__MClass___name
].val
; /* _name on <var_mclass:MClass> */
2914 if (unlikely(var23
== NULL
)) {
2915 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _name");
2916 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 348);
2920 RET_LABEL22
:(void)0;
2926 var26
= "NativeString";
2928 var28
= standard___standard__NativeString___to_s_with_length(var26
, var27
);
2933 { /* Inline kernel#Object#!= (var21,var25) on <var21:String> */
2934 var_other31
= var25
;
2936 var32
= ((short int (*)(val
* self
, val
* p0
))(var21
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var21
, var_other31
) /* == on <var21:String>*/;
2941 RET_LABEL30
:(void)0;
2950 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:SeparateCompiler> */
2951 var36
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
2952 if (unlikely(var36
== NULL
)) {
2953 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
2954 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 233);
2958 RET_LABEL35
:(void)0;
2962 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
2963 var39
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
2964 if (unlikely(var39
== NULL
)) {
2965 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
2966 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
2970 RET_LABEL38
:(void)0;
2978 var44
= standard___standard__NativeString___to_s_with_length(var42
, var43
);
2983 var45
= nit__model___MModule___get_primitive_class(var37
, var41
);
2986 var46
= standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var34
, var45
);
2988 var47
= ((struct instance_standard__Int
*)var46
)->value
; /* autounbox from nullable Object to Int */;
2993 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:SeparateCompiler> */
2994 var50
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
2995 if (unlikely(var50
== NULL
)) {
2996 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
2997 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 233);
3001 RET_LABEL49
:(void)0;
3005 var51
= standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var48
, var_mclass
);
3007 var52
= ((struct instance_standard__Int
*)var51
)->value
; /* autounbox from nullable Object to Int */;
3015 /* method separate_compiler#SeparateCompiler#compile_color_consts for (self: SeparateCompiler, Map[Object, Int]) */
3016 void nit___nit__SeparateCompiler___compile_color_consts(val
* self
, val
* p0
) {
3017 val
* var_colors
/* var colors: Map[Object, Int] */;
3018 val
* var
/* : AbstractCompilerVisitor */;
3019 val
* var_v
/* var v: SeparateCompilerVisitor */;
3020 val
* var_
/* var : Map[Object, Int] */;
3021 val
* var1
/* : MapIterator[nullable Object, nullable Object] */;
3022 val
* var_2
/* var : MapIterator[Object, Int] */;
3023 short int var3
/* : Bool */;
3024 val
* var4
/* : nullable Object */;
3025 val
* var_m
/* var m: Object */;
3026 val
* var5
/* : nullable Object */;
3027 long var6
/* : Int */;
3028 long var_c
/* var c: Int */;
3031 var
= ((val
* (*)(val
* self
))(self
->class->vft
[COLOR_nit__abstract_compiler__AbstractCompiler__new_visitor
]))(self
) /* new_visitor on <self:SeparateCompiler>*/;
3036 var1
= ((val
* (*)(val
* self
))(var_
->class->vft
[COLOR_standard__abstract_collection__MapRead__iterator
]))(var_
) /* iterator on <var_:Map[Object, Int]>*/;
3041 var3
= ((short int (*)(val
* self
))(var_2
->class->vft
[COLOR_standard__abstract_collection__MapIterator__is_ok
]))(var_2
) /* is_ok on <var_2:MapIterator[Object, Int]>*/;
3045 var4
= ((val
* (*)(val
* self
))(var_2
->class->vft
[COLOR_standard__abstract_collection__MapIterator__key
]))(var_2
) /* key on <var_2:MapIterator[Object, Int]>*/;
3049 var5
= ((val
* (*)(val
* self
))(var_2
->class->vft
[COLOR_standard__abstract_collection__MapIterator__item
]))(var_2
) /* item on <var_2:MapIterator[Object, Int]>*/;
3051 var6
= ((struct instance_standard__Int
*)var5
)->value
; /* autounbox from nullable Object to Int */;
3054 nit___nit__SeparateCompiler___compile_color_const(self
, var_v
, var_m
, var_c
); /* Direct call separate_compiler#SeparateCompiler#compile_color_const on <self:SeparateCompiler>*/
3057 ((void (*)(val
* self
))(var_2
->class->vft
[COLOR_standard__abstract_collection__MapIterator__next
]))(var_2
) /* next on <var_2:MapIterator[Object, Int]>*/;
3063 BREAK_label
: (void)0;
3065 { /* Inline abstract_collection#MapIterator#finish (var_2) on <var_2:MapIterator[Object, Int]> */
3071 /* method separate_compiler#SeparateCompiler#compile_color_const for (self: SeparateCompiler, SeparateCompilerVisitor, Object, Int) */
3072 void nit___nit__SeparateCompiler___compile_color_const(val
* self
, val
* p0
, val
* p1
, long p2
) {
3073 val
* var_v
/* var v: SeparateCompilerVisitor */;
3074 val
* var_m
/* var m: Object */;
3075 long var_color
/* var color: Int */;
3076 val
* var
/* : HashSet[Object] */;
3077 val
* var2
/* : HashSet[Object] */;
3078 short int var3
/* : Bool */;
3079 short int var4
/* : Bool */;
3082 val
* var5
/* : ModelBuilder */;
3083 val
* var7
/* : ModelBuilder */;
3084 val
* var8
/* : ToolContext */;
3085 val
* var10
/* : ToolContext */;
3086 val
* var11
/* : OptionBool */;
3087 val
* var13
/* : OptionBool */;
3088 val
* var14
/* : nullable Object */;
3089 val
* var16
/* : nullable Object */;
3090 short int var17
/* : Bool */;
3091 val
* var18
/* : String */;
3092 static val
* varonce
;
3093 val
* var19
/* : String */;
3094 char* var20
/* : NativeString */;
3095 long var21
/* : Int */;
3096 val
* var22
/* : FlatString */;
3097 val
* var23
/* : String */;
3098 static val
* varonce24
;
3099 val
* var25
/* : String */;
3100 char* var26
/* : NativeString */;
3101 long var27
/* : Int */;
3102 val
* var28
/* : FlatString */;
3103 val
* var29
/* : Array[Object] */;
3104 long var30
/* : Int */;
3105 val
* var31
/* : NativeArray[Object] */;
3106 val
* var32
/* : Object */;
3107 val
* var33
/* : String */;
3108 short int var34
/* : Bool */;
3109 val
* var35
/* : ModelBuilder */;
3110 val
* var37
/* : ModelBuilder */;
3111 val
* var38
/* : ToolContext */;
3112 val
* var40
/* : ToolContext */;
3113 val
* var41
/* : OptionBool */;
3114 val
* var43
/* : OptionBool */;
3115 val
* var44
/* : nullable Object */;
3116 val
* var46
/* : nullable Object */;
3117 short int var47
/* : Bool */;
3118 short int var48
/* : Bool */;
3119 short int var_
/* var : Bool */;
3120 val
* var49
/* : AbstractCompiler */;
3121 val
* var51
/* : AbstractCompiler */;
3122 val
* var52
/* : Platform */;
3123 val
* var54
/* : Platform */;
3124 short int var55
/* : Bool */;
3125 short int var56
/* : Bool */;
3126 val
* var57
/* : String */;
3127 static val
* varonce58
;
3128 val
* var59
/* : String */;
3129 char* var60
/* : NativeString */;
3130 long var61
/* : Int */;
3131 val
* var62
/* : FlatString */;
3132 val
* var63
/* : String */;
3133 static val
* varonce64
;
3134 val
* var65
/* : String */;
3135 char* var66
/* : NativeString */;
3136 long var67
/* : Int */;
3137 val
* var68
/* : FlatString */;
3138 val
* var69
/* : Array[Object] */;
3139 long var70
/* : Int */;
3140 val
* var71
/* : NativeArray[Object] */;
3141 val
* var72
/* : String */;
3142 static val
* varonce73
;
3143 val
* var74
/* : String */;
3144 char* var75
/* : NativeString */;
3145 long var76
/* : Int */;
3146 val
* var77
/* : FlatString */;
3147 val
* var78
/* : String */;
3148 static val
* varonce79
;
3149 val
* var80
/* : String */;
3150 char* var81
/* : NativeString */;
3151 long var82
/* : Int */;
3152 val
* var83
/* : FlatString */;
3153 static val
* varonce84
;
3154 val
* var85
/* : String */;
3155 char* var86
/* : NativeString */;
3156 long var87
/* : Int */;
3157 val
* var88
/* : FlatString */;
3158 val
* var89
/* : Array[Object] */;
3159 long var90
/* : Int */;
3160 val
* var91
/* : NativeArray[Object] */;
3161 val
* var92
/* : Object */;
3162 val
* var93
/* : String */;
3163 val
* var94
/* : String */;
3164 static val
* varonce95
;
3165 val
* var96
/* : String */;
3166 char* var97
/* : NativeString */;
3167 long var98
/* : Int */;
3168 val
* var99
/* : FlatString */;
3169 val
* var100
/* : String */;
3170 static val
* varonce101
;
3171 val
* var102
/* : String */;
3172 char* var103
/* : NativeString */;
3173 long var104
/* : Int */;
3174 val
* var105
/* : FlatString */;
3175 val
* var106
/* : String */;
3176 static val
* varonce107
;
3177 val
* var108
/* : String */;
3178 char* var109
/* : NativeString */;
3179 long var110
/* : Int */;
3180 val
* var111
/* : FlatString */;
3181 val
* var112
/* : String */;
3182 static val
* varonce113
;
3183 val
* var114
/* : String */;
3184 char* var115
/* : NativeString */;
3185 long var116
/* : Int */;
3186 val
* var117
/* : FlatString */;
3187 val
* var118
/* : Array[Object] */;
3188 long var119
/* : Int */;
3189 val
* var120
/* : NativeArray[Object] */;
3190 val
* var121
/* : String */;
3191 long var122
/* : Int */;
3192 long var123
/* : Int */;
3193 long var125
/* : Int */;
3194 short int var126
/* : Bool */;
3195 short int var128
/* : Bool */;
3196 long var129
/* : Int */;
3197 val
* var130
/* : Array[String] */;
3198 val
* var132
/* : Array[String] */;
3199 static val
* varonce133
;
3200 val
* var134
/* : String */;
3201 char* var135
/* : NativeString */;
3202 long var136
/* : Int */;
3203 val
* var137
/* : FlatString */;
3204 val
* var138
/* : String */;
3205 static val
* varonce139
;
3206 val
* var140
/* : String */;
3207 char* var141
/* : NativeString */;
3208 long var142
/* : Int */;
3209 val
* var143
/* : FlatString */;
3210 static val
* varonce144
;
3211 val
* var145
/* : String */;
3212 char* var146
/* : NativeString */;
3213 long var147
/* : Int */;
3214 val
* var148
/* : FlatString */;
3215 val
* var149
/* : Array[Object] */;
3216 long var150
/* : Int */;
3217 val
* var151
/* : NativeArray[Object] */;
3218 val
* var152
/* : Object */;
3219 val
* var153
/* : String */;
3220 val
* var154
/* : HashSet[Object] */;
3221 val
* var156
/* : HashSet[Object] */;
3226 { /* Inline separate_compiler#SeparateCompiler#color_consts_done (self) on <self:SeparateCompiler> */
3227 var2
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___color_consts_done
].val
; /* _color_consts_done on <self:SeparateCompiler> */
3228 if (unlikely(var2
== NULL
)) {
3229 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _color_consts_done");
3230 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 277);
3238 var3
= standard___standard__HashSet___standard__abstract_collection__Collection__has(var
, var_m
);
3244 /* <var_m:Object> isa MEntity */
3245 cltype
= type_nit__MEntity
.color
;
3246 idtype
= type_nit__MEntity
.id
;
3247 if(cltype
>= var_m
->type
->table_size
) {
3250 var4
= var_m
->type
->type_table
[cltype
] == idtype
;
3254 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
3255 var7
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
3256 if (unlikely(var7
== NULL
)) {
3257 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
3258 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 481);
3266 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (var5) on <var5:ModelBuilder> */
3267 var10
= var5
->attrs
[COLOR_nit__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var5:ModelBuilder> */
3268 if (unlikely(var10
== NULL
)) {
3269 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
3270 PRINT_ERROR(" (%s:%d)\n", FILE_nit__modelbuilder_base
, 47);
3278 { /* Inline separate_compiler#ToolContext#opt_inline_coloring_numbers (var8) on <var8:ToolContext> */
3279 var13
= var8
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_inline_coloring_numbers
].val
; /* _opt_inline_coloring_numbers on <var8:ToolContext> */
3280 if (unlikely(var13
== NULL
)) {
3281 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_coloring_numbers");
3282 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 35);
3286 RET_LABEL12
:(void)0;
3290 { /* Inline opts#Option#value (var11) on <var11:OptionBool> */
3291 var16
= var11
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var11:OptionBool> */
3293 RET_LABEL15
:(void)0;
3296 var17
= ((struct instance_standard__Bool
*)var14
)->value
; /* autounbox from nullable Object to Bool */;
3299 var18
= nit__separate_compiler___MEntity___const_color(var_m
);
3306 var22
= standard___standard__NativeString___to_s_with_length(var20
, var21
);
3311 var23
= nit__separate_compiler___MEntity___const_color(var_m
);
3318 var28
= standard___standard__NativeString___to_s_with_length(var26
, var27
);
3322 var29
= NEW_standard__Array(&type_standard__Array__standard__Object
);
3323 { /* var29 = array_instance Array[Object] */
3325 var31
= NEW_standard__NativeArray(var30
, &type_standard__NativeArray__standard__Object
);
3326 ((struct instance_standard__NativeArray
*)var31
)->values
[0] = (val
*) var19
;
3327 ((struct instance_standard__NativeArray
*)var31
)->values
[1] = (val
*) var23
;
3328 ((struct instance_standard__NativeArray
*)var31
)->values
[2] = (val
*) var25
;
3329 var32
= BOX_standard__Int(var_color
); /* autobox from Int to Object */
3330 ((struct instance_standard__NativeArray
*)var31
)->values
[3] = (val
*) var32
;
3332 ((void (*)(val
* self
, val
* p0
, long p1
))(var29
->class->vft
[COLOR_standard__array__Array__with_native
]))(var29
, var31
, var30
) /* with_native on <var29:Array[Object]>*/;
3336 var33
= ((val
* (*)(val
* self
))(var29
->class->vft
[COLOR_standard__string__Object__to_s
]))(var29
) /* to_s on <var29:Array[Object]>*/;
3339 nit___nit__AbstractCompiler___provide_declaration(self
, var18
, var33
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
3343 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
3344 var37
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
3345 if (unlikely(var37
== NULL
)) {
3346 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
3347 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 481);
3351 RET_LABEL36
:(void)0;
3355 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (var35) on <var35:ModelBuilder> */
3356 var40
= var35
->attrs
[COLOR_nit__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var35:ModelBuilder> */
3357 if (unlikely(var40
== NULL
)) {
3358 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
3359 PRINT_ERROR(" (%s:%d)\n", FILE_nit__modelbuilder_base
, 47);
3363 RET_LABEL39
:(void)0;
3367 { /* Inline separate_compiler#ToolContext#opt_colors_are_symbols (var38) on <var38:ToolContext> */
3368 var43
= var38
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_colors_are_symbols
].val
; /* _opt_colors_are_symbols on <var38:ToolContext> */
3369 if (unlikely(var43
== NULL
)) {
3370 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_colors_are_symbols");
3371 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 32);
3375 RET_LABEL42
:(void)0;
3379 { /* Inline opts#Option#value (var41) on <var41:OptionBool> */
3380 var46
= var41
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var41:OptionBool> */
3382 RET_LABEL45
:(void)0;
3385 var47
= ((struct instance_standard__Bool
*)var44
)->value
; /* autounbox from nullable Object to Bool */;
3392 { /* Inline abstract_compiler#AbstractCompilerVisitor#compiler (var_v) on <var_v:SeparateCompilerVisitor> */
3393 var51
= var_v
->attrs
[COLOR_nit__abstract_compiler__AbstractCompilerVisitor___compiler
].val
; /* _compiler on <var_v:SeparateCompilerVisitor> */
3394 if (unlikely(var51
== NULL
)) {
3395 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _compiler");
3396 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 1059);
3400 RET_LABEL50
:(void)0;
3404 { /* Inline abstract_compiler#AbstractCompiler#target_platform (var49) on <var49:AbstractCompiler(SeparateCompiler)> */
3405 var54
= var49
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___target_platform
].val
; /* _target_platform on <var49:AbstractCompiler(SeparateCompiler)> */
3406 if (unlikely(var54
== NULL
)) {
3407 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _target_platform");
3408 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 487);
3412 RET_LABEL53
:(void)0;
3416 var55
= nit___nit__Platform___supports_linker_script(var52
);
3423 var57
= nit__separate_compiler___MEntity___const_color(var_m
);
3428 var60
= "extern const int ";
3430 var62
= standard___standard__NativeString___to_s_with_length(var60
, var61
);
3435 var63
= nit__separate_compiler___MEntity___const_color(var_m
);
3442 var68
= standard___standard__NativeString___to_s_with_length(var66
, var67
);
3446 var69
= NEW_standard__Array(&type_standard__Array__standard__Object
);
3447 { /* var69 = array_instance Array[Object] */
3449 var71
= NEW_standard__NativeArray(var70
, &type_standard__NativeArray__standard__Object
);
3450 ((struct instance_standard__NativeArray
*)var71
)->values
[0] = (val
*) var59
;
3451 ((struct instance_standard__NativeArray
*)var71
)->values
[1] = (val
*) var63
;
3452 ((struct instance_standard__NativeArray
*)var71
)->values
[2] = (val
*) var65
;
3454 ((void (*)(val
* self
, val
* p0
, long p1
))(var69
->class->vft
[COLOR_standard__array__Array__with_native
]))(var69
, var71
, var70
) /* with_native on <var69:Array[Object]>*/;
3458 var72
= ((val
* (*)(val
* self
))(var69
->class->vft
[COLOR_standard__string__Object__to_s
]))(var69
) /* to_s on <var69:Array[Object]>*/;
3461 nit___nit__AbstractCompiler___provide_declaration(self
, var57
, var72
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
3466 var75
= "const int ";
3468 var77
= standard___standard__NativeString___to_s_with_length(var75
, var76
);
3473 var78
= nit__separate_compiler___MEntity___const_color(var_m
);
3480 var83
= standard___standard__NativeString___to_s_with_length(var81
, var82
);
3489 var88
= standard___standard__NativeString___to_s_with_length(var86
, var87
);
3493 var89
= NEW_standard__Array(&type_standard__Array__standard__Object
);
3494 { /* var89 = array_instance Array[Object] */
3496 var91
= NEW_standard__NativeArray(var90
, &type_standard__NativeArray__standard__Object
);
3497 ((struct instance_standard__NativeArray
*)var91
)->values
[0] = (val
*) var74
;
3498 ((struct instance_standard__NativeArray
*)var91
)->values
[1] = (val
*) var78
;
3499 ((struct instance_standard__NativeArray
*)var91
)->values
[2] = (val
*) var80
;
3500 var92
= BOX_standard__Int(var_color
); /* autobox from Int to Object */
3501 ((struct instance_standard__NativeArray
*)var91
)->values
[3] = (val
*) var92
;
3502 ((struct instance_standard__NativeArray
*)var91
)->values
[4] = (val
*) var85
;
3504 ((void (*)(val
* self
, val
* p0
, long p1
))(var89
->class->vft
[COLOR_standard__array__Array__with_native
]))(var89
, var91
, var90
) /* with_native on <var89:Array[Object]>*/;
3508 var93
= ((val
* (*)(val
* self
))(var89
->class->vft
[COLOR_standard__string__Object__to_s
]))(var89
) /* to_s on <var89:Array[Object]>*/;
3511 nit___nit__AbstractCompilerVisitor___add(var_v
, var93
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add on <var_v:SeparateCompilerVisitor>*/
3515 var94
= nit__separate_compiler___MEntity___const_color(var_m
);
3522 var99
= standard___standard__NativeString___to_s_with_length(var97
, var98
);
3527 var100
= nit__separate_compiler___MEntity___const_color(var_m
);
3530 var102
= varonce101
;
3532 var103
= " ((long)&X";
3534 var105
= standard___standard__NativeString___to_s_with_length(var103
, var104
);
3536 varonce101
= var102
;
3539 var106
= nit__separate_compiler___MEntity___const_color(var_m
);
3542 var108
= varonce107
;
3544 var109
= ")\nextern const void X";
3546 var111
= standard___standard__NativeString___to_s_with_length(var109
, var110
);
3548 varonce107
= var108
;
3551 var112
= nit__separate_compiler___MEntity___const_color(var_m
);
3554 var114
= varonce113
;
3558 var117
= standard___standard__NativeString___to_s_with_length(var115
, var116
);
3560 varonce113
= var114
;
3562 var118
= NEW_standard__Array(&type_standard__Array__standard__Object
);
3563 { /* var118 = array_instance Array[Object] */
3565 var120
= NEW_standard__NativeArray(var119
, &type_standard__NativeArray__standard__Object
);
3566 ((struct instance_standard__NativeArray
*)var120
)->values
[0] = (val
*) var96
;
3567 ((struct instance_standard__NativeArray
*)var120
)->values
[1] = (val
*) var100
;
3568 ((struct instance_standard__NativeArray
*)var120
)->values
[2] = (val
*) var102
;
3569 ((struct instance_standard__NativeArray
*)var120
)->values
[3] = (val
*) var106
;
3570 ((struct instance_standard__NativeArray
*)var120
)->values
[4] = (val
*) var108
;
3571 ((struct instance_standard__NativeArray
*)var120
)->values
[5] = (val
*) var112
;
3572 ((struct instance_standard__NativeArray
*)var120
)->values
[6] = (val
*) var114
;
3574 ((void (*)(val
* self
, val
* p0
, long p1
))(var118
->class->vft
[COLOR_standard__array__Array__with_native
]))(var118
, var120
, var119
) /* with_native on <var118:Array[Object]>*/;
3578 var121
= ((val
* (*)(val
* self
))(var118
->class->vft
[COLOR_standard__string__Object__to_s
]))(var118
) /* to_s on <var118:Array[Object]>*/;
3581 nit___nit__AbstractCompiler___provide_declaration(self
, var94
, var121
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
3585 { /* Inline kernel#Int#unary - (var122) on <var122:Int> */
3589 RET_LABEL124
:(void)0;
3593 { /* Inline kernel#Int#== (var_color,var123) on <var_color:Int> */
3594 var128
= var_color
== var123
;
3597 RET_LABEL127
:(void)0;
3606 { /* Inline abstract_compiler#AbstractCompiler#linker_script (self) on <self:SeparateCompiler> */
3607 var132
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___linker_script
].val
; /* _linker_script on <self:SeparateCompiler> */
3608 if (unlikely(var132
== NULL
)) {
3609 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _linker_script");
3610 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 526);
3614 RET_LABEL131
:(void)0;
3618 var134
= varonce133
;
3622 var137
= standard___standard__NativeString___to_s_with_length(var135
, var136
);
3624 varonce133
= var134
;
3627 var138
= nit__separate_compiler___MEntity___const_color(var_m
);
3630 var140
= varonce139
;
3634 var143
= standard___standard__NativeString___to_s_with_length(var141
, var142
);
3636 varonce139
= var140
;
3639 var145
= varonce144
;
3643 var148
= standard___standard__NativeString___to_s_with_length(var146
, var147
);
3645 varonce144
= var145
;
3647 var149
= NEW_standard__Array(&type_standard__Array__standard__Object
);
3648 { /* var149 = array_instance Array[Object] */
3650 var151
= NEW_standard__NativeArray(var150
, &type_standard__NativeArray__standard__Object
);
3651 ((struct instance_standard__NativeArray
*)var151
)->values
[0] = (val
*) var134
;
3652 ((struct instance_standard__NativeArray
*)var151
)->values
[1] = (val
*) var138
;
3653 ((struct instance_standard__NativeArray
*)var151
)->values
[2] = (val
*) var140
;
3654 var152
= BOX_standard__Int(var_color
); /* autobox from Int to Object */
3655 ((struct instance_standard__NativeArray
*)var151
)->values
[3] = (val
*) var152
;
3656 ((struct instance_standard__NativeArray
*)var151
)->values
[4] = (val
*) var145
;
3658 ((void (*)(val
* self
, val
* p0
, long p1
))(var149
->class->vft
[COLOR_standard__array__Array__with_native
]))(var149
, var151
, var150
) /* with_native on <var149:Array[Object]>*/;
3662 var153
= ((val
* (*)(val
* self
))(var149
->class->vft
[COLOR_standard__string__Object__to_s
]))(var149
) /* to_s on <var149:Array[Object]>*/;
3665 standard___standard__Array___standard__abstract_collection__SimpleCollection__add(var130
, var153
); /* Direct call array#Array#add on <var130:Array[String]>*/
3670 PRINT_ERROR("Runtime error: %s", "Aborted");
3671 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 272);
3675 { /* Inline separate_compiler#SeparateCompiler#color_consts_done (self) on <self:SeparateCompiler> */
3676 var156
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___color_consts_done
].val
; /* _color_consts_done on <self:SeparateCompiler> */
3677 if (unlikely(var156
== NULL
)) {
3678 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _color_consts_done");
3679 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 277);
3683 RET_LABEL155
:(void)0;
3687 standard___standard__HashSet___standard__abstract_collection__SimpleCollection__add(var154
, var_m
); /* Direct call hash_collection#HashSet#add on <var154:HashSet[Object]>*/
3691 /* method separate_compiler#SeparateCompiler#color_consts_done for (self: SeparateCompiler): HashSet[Object] */
3692 val
* nit___nit__SeparateCompiler___color_consts_done(val
* self
) {
3693 val
* var
/* : HashSet[Object] */;
3694 val
* var1
/* : HashSet[Object] */;
3695 var1
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___color_consts_done
].val
; /* _color_consts_done on <self:SeparateCompiler> */
3696 if (unlikely(var1
== NULL
)) {
3697 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _color_consts_done");
3698 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 277);
3705 /* method separate_compiler#SeparateCompiler#do_property_coloring for (self: SeparateCompiler) */
3706 void nit___nit__SeparateCompiler___do_property_coloring(val
* self
) {
3707 val
* var
/* : nullable RapidTypeAnalysis */;
3708 val
* var2
/* : nullable RapidTypeAnalysis */;
3709 val
* var_rta
/* var rta: nullable RapidTypeAnalysis */;
3710 val
* var3
/* : MModule */;
3711 val
* var5
/* : MModule */;
3712 val
* var6
/* : POSet[MClass] */;
3713 val
* var_poset
/* var poset: POSet[MClass] */;
3714 val
* var7
/* : HashSet[MClass] */;
3715 val
* var_mclasses
/* var mclasses: HashSet[MClass] */;
3716 val
* var8
/* : POSetColorer[MClass] */;
3717 val
* var_colorer
/* var colorer: POSetColorer[MClass] */;
3718 val
* var10
/* : Array[MMethod] */;
3719 val
* var_dead_methods
/* var dead_methods: Array[MMethod] */;
3720 val
* var11
/* : HashMap[MClass, Set[PropertyLayoutElement]] */;
3721 val
* var_mmethods
/* var mmethods: HashMap[MClass, Set[PropertyLayoutElement]] */;
3722 val
* var12
/* : HashMap[MClass, Set[MAttribute]] */;
3723 val
* var_mattributes
/* var mattributes: HashMap[MClass, Set[MAttribute]] */;
3724 val
* var_
/* var : HashSet[MClass] */;
3725 val
* var13
/* : Iterator[nullable Object] */;
3726 val
* var_14
/* var : Iterator[MClass] */;
3727 short int var15
/* : Bool */;
3728 val
* var16
/* : nullable Object */;
3729 val
* var_mclass
/* var mclass: MClass */;
3730 val
* var17
/* : HashSet[PropertyLayoutElement] */;
3731 val
* var18
/* : HashSet[MAttribute] */;
3732 val
* var19
/* : MModule */;
3733 val
* var21
/* : MModule */;
3734 val
* var22
/* : Set[MProperty] */;
3735 val
* var_23
/* var : Set[MProperty] */;
3736 val
* var24
/* : Iterator[nullable Object] */;
3737 val
* var_25
/* var : Iterator[MProperty] */;
3738 short int var26
/* : Bool */;
3739 val
* var27
/* : nullable Object */;
3740 val
* var_mprop
/* var mprop: MProperty */;
3741 short int var28
/* : Bool */;
3744 short int var29
/* : Bool */;
3745 short int var30
/* : Bool */;
3746 val
* var31
/* : ModelBuilder */;
3747 val
* var33
/* : ModelBuilder */;
3748 val
* var34
/* : ToolContext */;
3749 val
* var36
/* : ToolContext */;
3750 val
* var37
/* : OptionBool */;
3751 val
* var39
/* : OptionBool */;
3752 val
* var40
/* : nullable Object */;
3753 val
* var42
/* : nullable Object */;
3754 short int var43
/* : Bool */;
3755 short int var44
/* : Bool */;
3756 short int var_45
/* var : Bool */;
3757 val
* var46
/* : null */;
3758 short int var47
/* : Bool */;
3759 short int var48
/* : Bool */;
3760 val
* var_other
/* var other: nullable Object */;
3761 short int var50
/* : Bool */;
3762 short int var51
/* : Bool */;
3763 short int var_52
/* var : Bool */;
3764 val
* var53
/* : HashSet[MMethod] */;
3765 val
* var55
/* : HashSet[MMethod] */;
3766 short int var56
/* : Bool */;
3767 short int var57
/* : Bool */;
3768 val
* var58
/* : nullable Object */;
3769 short int var59
/* : Bool */;
3772 val
* var62
/* : nullable Object */;
3773 val
* var67
/* : HashSet[MMethodDef] */;
3774 val
* var_all_super_calls
/* var all_super_calls: HashSet[MMethodDef] */;
3775 val
* var68
/* : MModule */;
3776 val
* var70
/* : MModule */;
3777 val
* var71
/* : POSetElement[MModule] */;
3778 val
* var73
/* : POSetElement[MModule] */;
3779 val
* var74
/* : Collection[nullable Object] */;
3780 val
* var_75
/* var : Collection[MModule] */;
3781 val
* var76
/* : Iterator[nullable Object] */;
3782 val
* var_77
/* var : Iterator[MModule] */;
3783 short int var78
/* : Bool */;
3784 val
* var79
/* : nullable Object */;
3785 val
* var_mmodule
/* var mmodule: MModule */;
3786 val
* var80
/* : Array[MClassDef] */;
3787 val
* var82
/* : Array[MClassDef] */;
3788 val
* var_83
/* var : Array[MClassDef] */;
3789 val
* var84
/* : ArrayIterator[nullable Object] */;
3790 val
* var_85
/* var : ArrayIterator[MClassDef] */;
3791 short int var86
/* : Bool */;
3792 val
* var87
/* : nullable Object */;
3793 val
* var_mclassdef
/* var mclassdef: MClassDef */;
3794 val
* var88
/* : Array[MPropDef] */;
3795 val
* var90
/* : Array[MPropDef] */;
3796 val
* var_91
/* var : Array[MPropDef] */;
3797 val
* var92
/* : ArrayIterator[nullable Object] */;
3798 val
* var_93
/* var : ArrayIterator[MPropDef] */;
3799 short int var94
/* : Bool */;
3800 val
* var95
/* : nullable Object */;
3801 val
* var_mpropdef
/* var mpropdef: MPropDef */;
3802 short int var96
/* : Bool */;
3805 short int var99
/* : Bool */;
3806 short int var101
/* : Bool */;
3807 short int var103
/* : Bool */;
3808 val
* var110
/* : null */;
3809 short int var111
/* : Bool */;
3810 short int var112
/* : Bool */;
3811 short int var114
/* : Bool */;
3812 short int var115
/* : Bool */;
3813 val
* var116
/* : HashSet[MMethodDef] */;
3814 val
* var118
/* : HashSet[MMethodDef] */;
3815 val
* var_super_calls
/* var super_calls: nullable Object */;
3816 val
* var_119
/* var : HashSet[MMethodDef] */;
3817 val
* var120
/* : Iterator[nullable Object] */;
3818 val
* var_121
/* var : Iterator[MMethodDef] */;
3819 short int var122
/* : Bool */;
3820 val
* var123
/* : nullable Object */;
3821 val
* var_mmethoddef
/* var mmethoddef: MMethodDef */;
3822 val
* var124
/* : MClassDef */;
3823 val
* var126
/* : MClassDef */;
3824 val
* var127
/* : MClass */;
3825 val
* var129
/* : MClass */;
3826 val
* var_mclass130
/* var mclass: MClass */;
3827 val
* var131
/* : nullable Object */;
3828 val
* var132
/* : MModule */;
3829 val
* var134
/* : MModule */;
3830 val
* var135
/* : POSetElement[MClass] */;
3831 val
* var136
/* : Collection[nullable Object] */;
3832 val
* var_137
/* var : Collection[MClass] */;
3833 val
* var138
/* : Iterator[nullable Object] */;
3834 val
* var_139
/* var : Iterator[MClass] */;
3835 short int var140
/* : Bool */;
3836 val
* var141
/* : nullable Object */;
3837 val
* var_descendant
/* var descendant: MClass */;
3838 val
* var142
/* : nullable Object */;
3839 val
* var147
/* : POSetBucketsColorer[MClass, PropertyLayoutElement] */;
3840 val
* var148
/* : Map[Object, Set[Object]] */;
3841 val
* var_meth_colorer
/* var meth_colorer: POSetBucketsColorer[MClass, PropertyLayoutElement] */;
3842 val
* var149
/* : Map[Object, Int] */;
3843 val
* var151
/* : Map[MClass, Array[nullable MPropDef]] */;
3844 val
* var153
/* : Map[PropertyLayoutElement, Int] */;
3845 val
* var155
/* : Map[PropertyLayoutElement, Int] */;
3846 val
* var_156
/* var : Array[MMethod] */;
3847 val
* var157
/* : ArrayIterator[nullable Object] */;
3848 val
* var_158
/* var : ArrayIterator[MMethod] */;
3849 short int var159
/* : Bool */;
3850 val
* var160
/* : nullable Object */;
3851 val
* var_mproperty
/* var mproperty: MMethod */;
3852 val
* var161
/* : AbstractCompilerVisitor */;
3853 long var162
/* : Int */;
3854 long var163
/* : Int */;
3855 long var165
/* : Int */;
3856 val
* var_168
/* var : HashSet[MMethodDef] */;
3857 val
* var169
/* : Iterator[nullable Object] */;
3858 val
* var_170
/* var : Iterator[MMethodDef] */;
3859 short int var171
/* : Bool */;
3860 val
* var172
/* : nullable Object */;
3861 val
* var_mpropdef173
/* var mpropdef: MMethodDef */;
3862 short int var174
/* : Bool */;
3863 val
* var176
/* : AbstractCompilerVisitor */;
3864 long var177
/* : Int */;
3865 long var178
/* : Int */;
3866 long var180
/* : Int */;
3867 val
* var183
/* : POSetBucketsColorer[MClass, MAttribute] */;
3868 val
* var184
/* : Map[Object, Set[Object]] */;
3869 val
* var_attr_colorer
/* var attr_colorer: POSetBucketsColorer[MClass, MAttribute] */;
3870 val
* var185
/* : Map[Object, Int] */;
3871 val
* var187
/* : Map[MClass, Array[nullable MPropDef]] */;
3872 val
* var189
/* : Map[MAttribute, Int] */;
3873 val
* var191
/* : Map[MAttribute, Int] */;
3875 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
3876 var2
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
3883 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
3884 var5
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
3885 if (unlikely(var5
== NULL
)) {
3886 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
3887 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
3895 var6
= nit__model___MModule___flatten_mclass_hierarchy(var3
);
3898 var7
= NEW_standard__HashSet(&type_standard__HashSet__nit__MClass
);
3900 standard___standard__HashSet___from(var7
, var_poset
); /* Direct call hash_collection#HashSet#from on <var7:HashSet[MClass]>*/
3902 var_mclasses
= var7
;
3903 var8
= NEW_nit__POSetColorer(&type_nit__POSetColorer__nit__MClass
);
3905 { /* Inline kernel#Object#init (var8) on <var8:POSetColorer[MClass]> */
3911 nit___nit__POSetColorer___colorize(var_colorer
, var_poset
); /* Direct call coloring#POSetColorer#colorize on <var_colorer:POSetColorer[MClass]>*/
3913 var10
= NEW_standard__Array(&type_standard__Array__nit__MMethod
);
3915 standard___standard__Array___standard__kernel__Object__init(var10
); /* Direct call array#Array#init on <var10:Array[MMethod]>*/
3917 var_dead_methods
= var10
;
3918 var11
= NEW_standard__HashMap(&type_standard__HashMap__nit__MClass__standard__Set__nit__PropertyLayoutElement
);
3920 standard___standard__HashMap___standard__kernel__Object__init(var11
); /* Direct call hash_collection#HashMap#init on <var11:HashMap[MClass, Set[PropertyLayoutElement]]>*/
3922 var_mmethods
= var11
;
3923 var12
= NEW_standard__HashMap(&type_standard__HashMap__nit__MClass__standard__Set__nit__MAttribute
);
3925 standard___standard__HashMap___standard__kernel__Object__init(var12
); /* Direct call hash_collection#HashMap#init on <var12:HashMap[MClass, Set[MAttribute]]>*/
3927 var_mattributes
= var12
;
3928 var_
= var_mclasses
;
3930 var13
= standard___standard__HashSet___standard__abstract_collection__Collection__iterator(var_
);
3935 var15
= ((short int (*)(val
* self
))(var_14
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_14
) /* is_ok on <var_14:Iterator[MClass]>*/;
3939 var16
= ((val
* (*)(val
* self
))(var_14
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_14
) /* item on <var_14:Iterator[MClass]>*/;
3942 var17
= NEW_standard__HashSet(&type_standard__HashSet__nit__PropertyLayoutElement
);
3944 standard___standard__HashSet___standard__kernel__Object__init(var17
); /* Direct call hash_collection#HashSet#init on <var17:HashSet[PropertyLayoutElement]>*/
3947 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var_mmethods
, var_mclass
, var17
); /* Direct call hash_collection#HashMap#[]= on <var_mmethods:HashMap[MClass, Set[PropertyLayoutElement]]>*/
3949 var18
= NEW_standard__HashSet(&type_standard__HashSet__nit__MAttribute
);
3951 standard___standard__HashSet___standard__kernel__Object__init(var18
); /* Direct call hash_collection#HashSet#init on <var18:HashSet[MAttribute]>*/
3954 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var_mattributes
, var_mclass
, var18
); /* Direct call hash_collection#HashMap#[]= on <var_mattributes:HashMap[MClass, Set[MAttribute]]>*/
3957 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
3958 var21
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
3959 if (unlikely(var21
== NULL
)) {
3960 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
3961 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
3965 RET_LABEL20
:(void)0;
3969 var22
= nit__abstract_compiler___MModule___properties(var19
, var_mclass
);
3973 var24
= ((val
* (*)(val
* self
))(var_23
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_23
) /* iterator on <var_23:Set[MProperty]>*/;
3978 var26
= ((short int (*)(val
* self
))(var_25
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_25
) /* is_ok on <var_25:Iterator[MProperty]>*/;
3982 var27
= ((val
* (*)(val
* self
))(var_25
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_25
) /* item on <var_25:Iterator[MProperty]>*/;
3985 /* <var_mprop:MProperty> isa MMethod */
3986 cltype
= type_nit__MMethod
.color
;
3987 idtype
= type_nit__MMethod
.id
;
3988 if(cltype
>= var_mprop
->type
->table_size
) {
3991 var28
= var_mprop
->type
->type_table
[cltype
] == idtype
;
3995 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
3996 var33
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
3997 if (unlikely(var33
== NULL
)) {
3998 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
3999 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 481);
4003 RET_LABEL32
:(void)0;
4007 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (var31) on <var31:ModelBuilder> */
4008 var36
= var31
->attrs
[COLOR_nit__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var31:ModelBuilder> */
4009 if (unlikely(var36
== NULL
)) {
4010 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
4011 PRINT_ERROR(" (%s:%d)\n", FILE_nit__modelbuilder_base
, 47);
4015 RET_LABEL35
:(void)0;
4019 { /* Inline separate_compiler#ToolContext#opt_colo_dead_methods (var34) on <var34:ToolContext> */
4020 var39
= var34
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_colo_dead_methods
].val
; /* _opt_colo_dead_methods on <var34:ToolContext> */
4021 if (unlikely(var39
== NULL
)) {
4022 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_colo_dead_methods");
4023 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 45);
4027 RET_LABEL38
:(void)0;
4031 { /* Inline opts#Option#value (var37) on <var37:OptionBool> */
4032 var42
= var37
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var37:OptionBool> */
4034 RET_LABEL41
:(void)0;
4037 var43
= ((struct instance_standard__Bool
*)var40
)->value
; /* autounbox from nullable Object to Bool */;
4042 if (var_rta
== NULL
) {
4043 var47
= 0; /* is null */
4045 var47
= 1; /* arg is null and recv is not */
4048 { /* Inline kernel#Object#!= (var_rta,var46) on <var_rta:nullable RapidTypeAnalysis> */
4051 var50
= ((short int (*)(val
* self
, val
* p0
))(var_rta
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_rta
, var_other
) /* == on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)>*/;
4056 RET_LABEL49
:(void)0;
4067 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_methods (var_rta) on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)> */
4068 var55
= var_rta
->attrs
[COLOR_nit__rapid_type_analysis__RapidTypeAnalysis___live_methods
].val
; /* _live_methods on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)> */
4069 if (unlikely(var55
== NULL
)) {
4070 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_methods");
4071 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 75);
4075 RET_LABEL54
:(void)0;
4079 var56
= standard___standard__HashSet___standard__abstract_collection__Collection__has(var53
, var_mprop
);
4088 standard___standard__Array___standard__abstract_collection__SimpleCollection__add(var_dead_methods
, var_mprop
); /* Direct call array#Array#add on <var_dead_methods:Array[MMethod]>*/
4094 var58
= standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var_mmethods
, var_mclass
);
4097 ((void (*)(val
* self
, val
* p0
))(var58
->class->vft
[COLOR_standard__abstract_collection__SimpleCollection__add
]))(var58
, var_mprop
) /* add on <var58:nullable Object(Set[PropertyLayoutElement])>*/;
4100 /* <var_mprop:MProperty> isa MAttribute */
4101 cltype60
= type_nit__MAttribute
.color
;
4102 idtype61
= type_nit__MAttribute
.id
;
4103 if(cltype60
>= var_mprop
->type
->table_size
) {
4106 var59
= var_mprop
->type
->type_table
[cltype60
] == idtype61
;
4110 var62
= standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var_mattributes
, var_mclass
);
4113 ((void (*)(val
* self
, val
* p0
))(var62
->class->vft
[COLOR_standard__abstract_collection__SimpleCollection__add
]))(var62
, var_mprop
) /* add on <var62:nullable Object(Set[MAttribute])>*/;
4118 BREAK_label
: (void)0;
4120 ((void (*)(val
* self
))(var_25
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_25
) /* next on <var_25:Iterator[MProperty]>*/;
4126 BREAK_label63
: (void)0;
4128 { /* Inline abstract_collection#Iterator#finish (var_25) on <var_25:Iterator[MProperty]> */
4129 RET_LABEL64
:(void)0;
4133 ((void (*)(val
* self
))(var_14
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_14
) /* next on <var_14:Iterator[MClass]>*/;
4139 BREAK_label65
: (void)0;
4141 { /* Inline abstract_collection#Iterator#finish (var_14) on <var_14:Iterator[MClass]> */
4142 RET_LABEL66
:(void)0;
4145 var67
= NEW_standard__HashSet(&type_standard__HashSet__nit__MMethodDef
);
4147 standard___standard__HashSet___standard__kernel__Object__init(var67
); /* Direct call hash_collection#HashSet#init on <var67:HashSet[MMethodDef]>*/
4149 var_all_super_calls
= var67
;
4151 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
4152 var70
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
4153 if (unlikely(var70
== NULL
)) {
4154 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
4155 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
4159 RET_LABEL69
:(void)0;
4163 { /* Inline mmodule#MModule#in_importation (var68) on <var68:MModule> */
4164 var73
= var68
->attrs
[COLOR_nit__mmodule__MModule___in_importation
].val
; /* _in_importation on <var68:MModule> */
4165 if (unlikely(var73
== NULL
)) {
4166 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _in_importation");
4167 PRINT_ERROR(" (%s:%d)\n", FILE_nit__mmodule
, 96);
4171 RET_LABEL72
:(void)0;
4175 var74
= poset___poset__POSetElement___greaters(var71
);
4179 var76
= ((val
* (*)(val
* self
))(var_75
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_75
) /* iterator on <var_75:Collection[MModule]>*/;
4184 var78
= ((short int (*)(val
* self
))(var_77
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_77
) /* is_ok on <var_77:Iterator[MModule]>*/;
4188 var79
= ((val
* (*)(val
* self
))(var_77
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_77
) /* item on <var_77:Iterator[MModule]>*/;
4190 var_mmodule
= var79
;
4192 { /* Inline model#MModule#mclassdefs (var_mmodule) on <var_mmodule:MModule> */
4193 var82
= var_mmodule
->attrs
[COLOR_nit__model__MModule___mclassdefs
].val
; /* _mclassdefs on <var_mmodule:MModule> */
4194 if (unlikely(var82
== NULL
)) {
4195 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdefs");
4196 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 131);
4200 RET_LABEL81
:(void)0;
4205 var84
= standard___standard__AbstractArrayRead___standard__abstract_collection__Collection__iterator(var_83
);
4210 var86
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__is_ok(var_85
);
4214 var87
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__item(var_85
);
4216 var_mclassdef
= var87
;
4218 { /* Inline model#MClassDef#mpropdefs (var_mclassdef) on <var_mclassdef:MClassDef> */
4219 var90
= var_mclassdef
->attrs
[COLOR_nit__model__MClassDef___mpropdefs
].val
; /* _mpropdefs on <var_mclassdef:MClassDef> */
4220 if (unlikely(var90
== NULL
)) {
4221 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mpropdefs");
4222 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 623);
4226 RET_LABEL89
:(void)0;
4231 var92
= standard___standard__AbstractArrayRead___standard__abstract_collection__Collection__iterator(var_91
);
4236 var94
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__is_ok(var_93
);
4240 var95
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__item(var_93
);
4242 var_mpropdef
= var95
;
4243 /* <var_mpropdef:MPropDef> isa MMethodDef */
4244 cltype97
= type_nit__MMethodDef
.color
;
4245 idtype98
= type_nit__MMethodDef
.id
;
4246 if(cltype97
>= var_mpropdef
->type
->table_size
) {
4249 var96
= var_mpropdef
->type
->type_table
[cltype97
] == idtype98
;
4253 goto BREAK_label100
;
4257 { /* Inline modelize_property#MPropDef#has_supercall (var_mpropdef) on <var_mpropdef:MPropDef(MMethodDef)> */
4258 var103
= var_mpropdef
->attrs
[COLOR_nit__modelize_property__MPropDef___has_supercall
].s
; /* _has_supercall on <var_mpropdef:MPropDef(MMethodDef)> */
4260 RET_LABEL102
:(void)0;
4265 standard___standard__HashSet___standard__abstract_collection__SimpleCollection__add(var_all_super_calls
, var_mpropdef
); /* Direct call hash_collection#HashSet#add on <var_all_super_calls:HashSet[MMethodDef]>*/
4269 BREAK_label100
: (void)0;
4271 standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__next(var_93
); /* Direct call array#ArrayIterator#next on <var_93:ArrayIterator[MPropDef]>*/
4274 goto BREAK_label104
;
4277 BREAK_label104
: (void)0;
4279 { /* Inline abstract_collection#Iterator#finish (var_93) on <var_93:ArrayIterator[MPropDef]> */
4280 RET_LABEL105
:(void)0;
4284 standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__next(var_85
); /* Direct call array#ArrayIterator#next on <var_85:ArrayIterator[MClassDef]>*/
4287 goto BREAK_label106
;
4290 BREAK_label106
: (void)0;
4292 { /* Inline abstract_collection#Iterator#finish (var_85) on <var_85:ArrayIterator[MClassDef]> */
4293 RET_LABEL107
:(void)0;
4297 ((void (*)(val
* self
))(var_77
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_77
) /* next on <var_77:Iterator[MModule]>*/;
4300 goto BREAK_label108
;
4303 BREAK_label108
: (void)0;
4305 { /* Inline abstract_collection#Iterator#finish (var_77) on <var_77:Iterator[MModule]> */
4306 RET_LABEL109
:(void)0;
4310 if (var_rta
== NULL
) {
4311 var111
= 0; /* is null */
4313 var111
= 1; /* arg is null and recv is not */
4316 { /* Inline kernel#Object#!= (var_rta,var110) on <var_rta:nullable RapidTypeAnalysis> */
4319 var114
= ((short int (*)(val
* self
, val
* p0
))(var_rta
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_rta
, var_other
) /* == on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)>*/;
4324 RET_LABEL113
:(void)0;
4330 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_super_sends (var_rta) on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)> */
4331 var118
= var_rta
->attrs
[COLOR_nit__rapid_type_analysis__RapidTypeAnalysis___live_super_sends
].val
; /* _live_super_sends on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)> */
4332 if (unlikely(var118
== NULL
)) {
4333 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_super_sends");
4334 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 107);
4338 RET_LABEL117
:(void)0;
4341 var_super_calls
= var116
;
4343 var_super_calls
= var_all_super_calls
;
4345 var_119
= var_super_calls
;
4347 var120
= standard___standard__HashSet___standard__abstract_collection__Collection__iterator(var_119
);
4352 var122
= ((short int (*)(val
* self
))(var_121
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_121
) /* is_ok on <var_121:Iterator[MMethodDef]>*/;
4356 var123
= ((val
* (*)(val
* self
))(var_121
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_121
) /* item on <var_121:Iterator[MMethodDef]>*/;
4358 var_mmethoddef
= var123
;
4360 { /* Inline model#MPropDef#mclassdef (var_mmethoddef) on <var_mmethoddef:MMethodDef> */
4361 var126
= var_mmethoddef
->attrs
[COLOR_nit__model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_mmethoddef:MMethodDef> */
4362 if (unlikely(var126
== NULL
)) {
4363 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
4364 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 2010);
4368 RET_LABEL125
:(void)0;
4372 { /* Inline model#MClassDef#mclass (var124) on <var124:MClassDef> */
4373 var129
= var124
->attrs
[COLOR_nit__model__MClassDef___mclass
].val
; /* _mclass on <var124:MClassDef> */
4374 if (unlikely(var129
== NULL
)) {
4375 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
4376 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 492);
4380 RET_LABEL128
:(void)0;
4383 var_mclass130
= var127
;
4385 var131
= standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var_mmethods
, var_mclass130
);
4388 ((void (*)(val
* self
, val
* p0
))(var131
->class->vft
[COLOR_standard__abstract_collection__SimpleCollection__add
]))(var131
, var_mmethoddef
) /* add on <var131:nullable Object(Set[PropertyLayoutElement])>*/;
4391 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
4392 var134
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
4393 if (unlikely(var134
== NULL
)) {
4394 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
4395 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
4399 RET_LABEL133
:(void)0;
4403 var135
= nit___nit__MClass___in_hierarchy(var_mclass130
, var132
);
4406 var136
= poset___poset__POSetElement___smallers(var135
);
4410 var138
= ((val
* (*)(val
* self
))(var_137
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_137
) /* iterator on <var_137:Collection[MClass]>*/;
4415 var140
= ((short int (*)(val
* self
))(var_139
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_139
) /* is_ok on <var_139:Iterator[MClass]>*/;
4419 var141
= ((val
* (*)(val
* self
))(var_139
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_139
) /* item on <var_139:Iterator[MClass]>*/;
4421 var_descendant
= var141
;
4423 var142
= standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var_mmethods
, var_descendant
);
4426 ((void (*)(val
* self
, val
* p0
))(var142
->class->vft
[COLOR_standard__abstract_collection__SimpleCollection__add
]))(var142
, var_mmethoddef
) /* add on <var142:nullable Object(Set[PropertyLayoutElement])>*/;
4429 ((void (*)(val
* self
))(var_139
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_139
) /* next on <var_139:Iterator[MClass]>*/;
4432 goto BREAK_label143
;
4435 BREAK_label143
: (void)0;
4437 { /* Inline abstract_collection#Iterator#finish (var_139) on <var_139:Iterator[MClass]> */
4438 RET_LABEL144
:(void)0;
4442 ((void (*)(val
* self
))(var_121
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_121
) /* next on <var_121:Iterator[MMethodDef]>*/;
4445 goto BREAK_label145
;
4448 BREAK_label145
: (void)0;
4450 { /* Inline abstract_collection#Iterator#finish (var_121) on <var_121:Iterator[MMethodDef]> */
4451 RET_LABEL146
:(void)0;
4454 var147
= NEW_nit__POSetBucketsColorer(&type_nit__POSetBucketsColorer__nit__MClass__nit__PropertyLayoutElement
);
4456 var148
= nit___nit__POSetColorer___conflicts(var_colorer
);
4459 ((void (*)(val
* self
, val
* p0
))(var147
->class->vft
[COLOR_nit__coloring__POSetBucketsColorer__poset_61d
]))(var147
, var_poset
) /* poset= on <var147:POSetBucketsColorer[MClass, PropertyLayoutElement]>*/;
4462 ((void (*)(val
* self
, val
* p0
))(var147
->class->vft
[COLOR_nit__coloring__POSetBucketsColorer__conflicts_61d
]))(var147
, var148
) /* conflicts= on <var147:POSetBucketsColorer[MClass, PropertyLayoutElement]>*/;
4465 ((void (*)(val
* self
))(var147
->class->vft
[COLOR_standard__kernel__Object__init
]))(var147
) /* init on <var147:POSetBucketsColorer[MClass, PropertyLayoutElement]>*/;
4467 var_meth_colorer
= var147
;
4469 var149
= nit___nit__POSetBucketsColorer___colorize(var_meth_colorer
, var_mmethods
);
4472 { /* Inline separate_compiler#SeparateCompiler#method_colors= (self,var149) on <self:SeparateCompiler> */
4473 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___method_colors
].val
= var149
; /* _method_colors on <self:SeparateCompiler> */
4474 RET_LABEL150
:(void)0;
4478 var151
= nit___nit__SeparateCompiler___build_method_tables(self
, var_mclasses
, var_super_calls
);
4481 { /* Inline separate_compiler#SeparateCompiler#method_tables= (self,var151) on <self:SeparateCompiler> */
4482 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___method_tables
].val
= var151
; /* _method_tables on <self:SeparateCompiler> */
4483 RET_LABEL152
:(void)0;
4487 { /* Inline separate_compiler#SeparateCompiler#method_colors (self) on <self:SeparateCompiler> */
4488 var155
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___method_colors
].val
; /* _method_colors on <self:SeparateCompiler> */
4489 if (unlikely(var155
== NULL
)) {
4490 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _method_colors");
4491 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 127);
4495 RET_LABEL154
:(void)0;
4499 nit___nit__SeparateCompiler___compile_color_consts(self
, var153
); /* Direct call separate_compiler#SeparateCompiler#compile_color_consts on <self:SeparateCompiler>*/
4501 var_156
= var_dead_methods
;
4503 var157
= standard___standard__AbstractArrayRead___standard__abstract_collection__Collection__iterator(var_156
);
4508 var159
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__is_ok(var_158
);
4512 var160
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__item(var_158
);
4514 var_mproperty
= var160
;
4516 var161
= ((val
* (*)(val
* self
))(self
->class->vft
[COLOR_nit__abstract_compiler__AbstractCompiler__new_visitor
]))(self
) /* new_visitor on <self:SeparateCompiler>*/;
4520 { /* Inline kernel#Int#unary - (var162) on <var162:Int> */
4524 RET_LABEL164
:(void)0;
4528 nit___nit__SeparateCompiler___compile_color_const(self
, var161
, var_mproperty
, var163
); /* Direct call separate_compiler#SeparateCompiler#compile_color_const on <self:SeparateCompiler>*/
4531 standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__next(var_158
); /* Direct call array#ArrayIterator#next on <var_158:ArrayIterator[MMethod]>*/
4534 goto BREAK_label166
;
4537 BREAK_label166
: (void)0;
4539 { /* Inline abstract_collection#Iterator#finish (var_158) on <var_158:ArrayIterator[MMethod]> */
4540 RET_LABEL167
:(void)0;
4543 var_168
= var_all_super_calls
;
4545 var169
= standard___standard__HashSet___standard__abstract_collection__Collection__iterator(var_168
);
4550 var171
= ((short int (*)(val
* self
))(var_170
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_170
) /* is_ok on <var_170:Iterator[MMethodDef]>*/;
4554 var172
= ((val
* (*)(val
* self
))(var_170
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_170
) /* item on <var_170:Iterator[MMethodDef]>*/;
4556 var_mpropdef173
= var172
;
4558 var174
= standard___standard__HashSet___standard__abstract_collection__Collection__has(var_super_calls
, var_mpropdef173
);
4561 goto BREAK_label175
;
4565 var176
= ((val
* (*)(val
* self
))(self
->class->vft
[COLOR_nit__abstract_compiler__AbstractCompiler__new_visitor
]))(self
) /* new_visitor on <self:SeparateCompiler>*/;
4569 { /* Inline kernel#Int#unary - (var177) on <var177:Int> */
4573 RET_LABEL179
:(void)0;
4577 nit___nit__SeparateCompiler___compile_color_const(self
, var176
, var_mpropdef173
, var178
); /* Direct call separate_compiler#SeparateCompiler#compile_color_const on <self:SeparateCompiler>*/
4579 BREAK_label175
: (void)0;
4581 ((void (*)(val
* self
))(var_170
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_170
) /* next on <var_170:Iterator[MMethodDef]>*/;
4584 goto BREAK_label181
;
4587 BREAK_label181
: (void)0;
4589 { /* Inline abstract_collection#Iterator#finish (var_170) on <var_170:Iterator[MMethodDef]> */
4590 RET_LABEL182
:(void)0;
4593 var183
= NEW_nit__POSetBucketsColorer(&type_nit__POSetBucketsColorer__nit__MClass__nit__MAttribute
);
4595 var184
= nit___nit__POSetColorer___conflicts(var_colorer
);
4598 ((void (*)(val
* self
, val
* p0
))(var183
->class->vft
[COLOR_nit__coloring__POSetBucketsColorer__poset_61d
]))(var183
, var_poset
) /* poset= on <var183:POSetBucketsColorer[MClass, MAttribute]>*/;
4601 ((void (*)(val
* self
, val
* p0
))(var183
->class->vft
[COLOR_nit__coloring__POSetBucketsColorer__conflicts_61d
]))(var183
, var184
) /* conflicts= on <var183:POSetBucketsColorer[MClass, MAttribute]>*/;
4604 ((void (*)(val
* self
))(var183
->class->vft
[COLOR_standard__kernel__Object__init
]))(var183
) /* init on <var183:POSetBucketsColorer[MClass, MAttribute]>*/;
4606 var_attr_colorer
= var183
;
4608 var185
= nit___nit__POSetBucketsColorer___colorize(var_attr_colorer
, var_mattributes
);
4611 { /* Inline separate_compiler#SeparateCompiler#attr_colors= (self,var185) on <self:SeparateCompiler> */
4612 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___attr_colors
].val
= var185
; /* _attr_colors on <self:SeparateCompiler> */
4613 RET_LABEL186
:(void)0;
4617 var187
= nit___nit__SeparateCompiler___build_attr_tables(self
, var_mclasses
);
4620 { /* Inline separate_compiler#SeparateCompiler#attr_tables= (self,var187) on <self:SeparateCompiler> */
4621 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___attr_tables
].val
= var187
; /* _attr_tables on <self:SeparateCompiler> */
4622 RET_LABEL188
:(void)0;
4626 { /* Inline separate_compiler#SeparateCompiler#attr_colors (self) on <self:SeparateCompiler> */
4627 var191
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___attr_colors
].val
; /* _attr_colors on <self:SeparateCompiler> */
4628 if (unlikely(var191
== NULL
)) {
4629 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _attr_colors");
4630 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 128);
4634 RET_LABEL190
:(void)0;
4638 nit___nit__SeparateCompiler___compile_color_consts(self
, var189
); /* Direct call separate_compiler#SeparateCompiler#compile_color_consts on <self:SeparateCompiler>*/
4642 /* method separate_compiler#SeparateCompiler#build_method_tables for (self: SeparateCompiler, Set[MClass], Set[MMethodDef]): Map[MClass, Array[nullable MPropDef]] */
4643 val
* nit___nit__SeparateCompiler___build_method_tables(val
* self
, val
* p0
, val
* p1
) {
4644 val
* var
/* : Map[MClass, Array[nullable MPropDef]] */;
4645 val
* var_mclasses
/* var mclasses: Set[MClass] */;
4646 val
* var_super_calls
/* var super_calls: Set[MMethodDef] */;
4647 val
* var1
/* : HashMap[MClass, Array[nullable MPropDef]] */;
4648 val
* var_tables
/* var tables: HashMap[MClass, Array[nullable MPropDef]] */;
4649 val
* var_
/* var : Set[MClass] */;
4650 val
* var2
/* : Iterator[nullable Object] */;
4651 val
* var_3
/* var : Iterator[MClass] */;
4652 short int var4
/* : Bool */;
4653 val
* var5
/* : nullable Object */;
4654 val
* var_mclass
/* var mclass: MClass */;
4655 val
* var6
/* : Array[nullable MPropDef] */;
4656 val
* var_table
/* var table: Array[nullable MPropDef] */;
4657 val
* var7
/* : MModule */;
4658 val
* var9
/* : MModule */;
4659 val
* var10
/* : Set[MProperty] */;
4660 val
* var_mproperties
/* var mproperties: Set[MProperty] */;
4661 val
* var11
/* : MClassDef */;
4662 val
* var13
/* : MClassDef */;
4663 val
* var14
/* : MClassType */;
4664 val
* var16
/* : MClassType */;
4665 val
* var_mtype
/* var mtype: MClassType */;
4666 val
* var_17
/* var : Set[MProperty] */;
4667 val
* var18
/* : Iterator[nullable Object] */;
4668 val
* var_19
/* var : Iterator[MProperty] */;
4669 short int var20
/* : Bool */;
4670 val
* var21
/* : nullable Object */;
4671 val
* var_mproperty
/* var mproperty: MProperty */;
4672 short int var22
/* : Bool */;
4675 short int var23
/* : Bool */;
4676 val
* var24
/* : Map[PropertyLayoutElement, Int] */;
4677 val
* var26
/* : Map[PropertyLayoutElement, Int] */;
4678 short int var27
/* : Bool */;
4679 short int var28
/* : Bool */;
4680 val
* var29
/* : Map[PropertyLayoutElement, Int] */;
4681 val
* var31
/* : Map[PropertyLayoutElement, Int] */;
4682 val
* var32
/* : nullable Object */;
4683 long var33
/* : Int */;
4684 long var_color
/* var color: Int */;
4685 long var34
/* : Int */;
4686 long var36
/* : Int */;
4687 short int var37
/* : Bool */;
4688 short int var39
/* : Bool */;
4691 const char* var_class_name
;
4692 short int var42
/* : Bool */;
4693 long var43
/* : Int */;
4694 long var45
/* : Int */;
4695 long var_i
/* var i: Int */;
4696 long var_46
/* var : Int */;
4697 short int var47
/* : Bool */;
4698 short int var49
/* : Bool */;
4701 const char* var_class_name52
;
4702 short int var53
/* : Bool */;
4703 val
* var54
/* : null */;
4704 long var55
/* : Int */;
4705 long var56
/* : Int */;
4706 val
* var58
/* : MModule */;
4707 val
* var60
/* : MModule */;
4708 val
* var61
/* : MPropDef */;
4709 val
* var_64
/* var : Set[MMethodDef] */;
4710 val
* var65
/* : Iterator[nullable Object] */;
4711 val
* var_66
/* var : Iterator[MMethodDef] */;
4712 short int var67
/* : Bool */;
4713 val
* var68
/* : nullable Object */;
4714 val
* var_supercall
/* var supercall: MMethodDef */;
4715 val
* var69
/* : MModule */;
4716 val
* var71
/* : MModule */;
4717 val
* var72
/* : Set[MClassDef] */;
4718 val
* var73
/* : MClassDef */;
4719 val
* var75
/* : MClassDef */;
4720 short int var76
/* : Bool */;
4721 short int var77
/* : Bool */;
4722 val
* var79
/* : Map[PropertyLayoutElement, Int] */;
4723 val
* var81
/* : Map[PropertyLayoutElement, Int] */;
4724 val
* var82
/* : nullable Object */;
4725 long var83
/* : Int */;
4726 long var_color84
/* var color: Int */;
4727 long var85
/* : Int */;
4728 long var87
/* : Int */;
4729 short int var88
/* : Bool */;
4730 short int var90
/* : Bool */;
4733 const char* var_class_name93
;
4734 short int var94
/* : Bool */;
4735 long var95
/* : Int */;
4736 long var97
/* : Int */;
4737 long var_i98
/* var i: Int */;
4738 long var_99
/* var : Int */;
4739 short int var100
/* : Bool */;
4740 short int var102
/* : Bool */;
4743 const char* var_class_name105
;
4744 short int var106
/* : Bool */;
4745 val
* var107
/* : null */;
4746 long var108
/* : Int */;
4747 long var109
/* : Int */;
4748 val
* var111
/* : MModule */;
4749 val
* var113
/* : MModule */;
4750 val
* var114
/* : MPropDef */;
4751 val
* var_mmethoddef
/* var mmethoddef: MMethodDef */;
4753 var_super_calls
= p1
;
4754 var1
= NEW_standard__HashMap(&type_standard__HashMap__nit__MClass__standard__Array__nullable__nit__MPropDef
);
4756 standard___standard__HashMap___standard__kernel__Object__init(var1
); /* Direct call hash_collection#HashMap#init on <var1:HashMap[MClass, Array[nullable MPropDef]]>*/
4759 var_
= var_mclasses
;
4761 var2
= ((val
* (*)(val
* self
))(var_
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_
) /* iterator on <var_:Set[MClass]>*/;
4766 var4
= ((short int (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_3
) /* is_ok on <var_3:Iterator[MClass]>*/;
4770 var5
= ((val
* (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_3
) /* item on <var_3:Iterator[MClass]>*/;
4773 var6
= NEW_standard__Array(&type_standard__Array__nullable__nit__MPropDef
);
4775 standard___standard__Array___standard__kernel__Object__init(var6
); /* Direct call array#Array#init on <var6:Array[nullable MPropDef]>*/
4779 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var_tables
, var_mclass
, var_table
); /* Direct call hash_collection#HashMap#[]= on <var_tables:HashMap[MClass, Array[nullable MPropDef]]>*/
4782 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
4783 var9
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
4784 if (unlikely(var9
== NULL
)) {
4785 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
4786 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
4794 var10
= nit__abstract_compiler___MModule___properties(var7
, var_mclass
);
4796 var_mproperties
= var10
;
4798 { /* Inline model#MClass#intro (var_mclass) on <var_mclass:MClass> */
4799 var13
= var_mclass
->attrs
[COLOR_nit__model__MClass___intro
].val
; /* _intro on <var_mclass:MClass> */
4800 if (unlikely(var13
== NULL
)) {
4801 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro");
4802 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 423);
4806 RET_LABEL12
:(void)0;
4810 { /* Inline model#MClassDef#bound_mtype (var11) on <var11:MClassDef> */
4811 var16
= var11
->attrs
[COLOR_nit__model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var11:MClassDef> */
4812 if (unlikely(var16
== NULL
)) {
4813 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
4814 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 495);
4818 RET_LABEL15
:(void)0;
4822 var_17
= var_mproperties
;
4824 var18
= ((val
* (*)(val
* self
))(var_17
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_17
) /* iterator on <var_17:Set[MProperty]>*/;
4829 var20
= ((short int (*)(val
* self
))(var_19
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_19
) /* is_ok on <var_19:Iterator[MProperty]>*/;
4833 var21
= ((val
* (*)(val
* self
))(var_19
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_19
) /* item on <var_19:Iterator[MProperty]>*/;
4835 var_mproperty
= var21
;
4836 /* <var_mproperty:MProperty> isa MMethod */
4837 cltype
= type_nit__MMethod
.color
;
4838 idtype
= type_nit__MMethod
.id
;
4839 if(cltype
>= var_mproperty
->type
->table_size
) {
4842 var22
= var_mproperty
->type
->type_table
[cltype
] == idtype
;
4850 { /* Inline separate_compiler#SeparateCompiler#method_colors (self) on <self:SeparateCompiler> */
4851 var26
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___method_colors
].val
; /* _method_colors on <self:SeparateCompiler> */
4852 if (unlikely(var26
== NULL
)) {
4853 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _method_colors");
4854 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 127);
4858 RET_LABEL25
:(void)0;
4862 var27
= standard___standard__MapRead___has_key(var24
, var_mproperty
);
4870 { /* Inline separate_compiler#SeparateCompiler#method_colors (self) on <self:SeparateCompiler> */
4871 var31
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___method_colors
].val
; /* _method_colors on <self:SeparateCompiler> */
4872 if (unlikely(var31
== NULL
)) {
4873 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _method_colors");
4874 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 127);
4878 RET_LABEL30
:(void)0;
4882 var32
= ((val
* (*)(val
* self
, val
* p0
))(var29
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var29
, var_mproperty
) /* [] on <var29:Map[PropertyLayoutElement, Int]>*/;
4884 var33
= ((struct instance_standard__Int
*)var32
)->value
; /* autounbox from nullable Object to Int */;
4887 { /* Inline array#AbstractArrayRead#length (var_table) on <var_table:Array[nullable MPropDef]> */
4888 var36
= var_table
->attrs
[COLOR_standard__array__AbstractArrayRead___length
].l
; /* _length on <var_table:Array[nullable MPropDef]> */
4890 RET_LABEL35
:(void)0;
4894 { /* Inline kernel#Int#<= (var34,var_color) on <var34:Int> */
4895 /* Covariant cast for argument 0 (i) <var_color:Int> isa OTHER */
4896 /* <var_color:Int> isa OTHER */
4897 var39
= 1; /* easy <var_color:Int> isa OTHER*/
4898 if (unlikely(!var39
)) {
4899 var_class_name
= type_standard__Int
.name
;
4900 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
4901 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel
, 409);
4904 var42
= var34
<= var_color
;
4907 RET_LABEL38
:(void)0;
4912 { /* Inline array#AbstractArrayRead#length (var_table) on <var_table:Array[nullable MPropDef]> */
4913 var45
= var_table
->attrs
[COLOR_standard__array__AbstractArrayRead___length
].l
; /* _length on <var_table:Array[nullable MPropDef]> */
4915 RET_LABEL44
:(void)0;
4922 { /* Inline kernel#Int#< (var_i,var_46) on <var_i:Int> */
4923 /* Covariant cast for argument 0 (i) <var_46:Int> isa OTHER */
4924 /* <var_46:Int> isa OTHER */
4925 var49
= 1; /* easy <var_46:Int> isa OTHER*/
4926 if (unlikely(!var49
)) {
4927 var_class_name52
= type_standard__Int
.name
;
4928 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name52
);
4929 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel
, 410);
4932 var53
= var_i
< var_46
;
4935 RET_LABEL48
:(void)0;
4941 standard___standard__Array___standard__abstract_collection__Sequence___91d_93d_61d(var_table
, var_i
, var54
); /* Direct call array#Array#[]= on <var_table:Array[nullable MPropDef]>*/
4945 var56
= standard___standard__Int___Discrete__successor(var_i
, var55
);
4952 BREAK_label57
: (void)0;
4956 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
4957 var60
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
4958 if (unlikely(var60
== NULL
)) {
4959 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
4960 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
4964 RET_LABEL59
:(void)0;
4968 var61
= nit___nit__MProperty___lookup_first_definition(var_mproperty
, var58
, var_mtype
);
4971 standard___standard__Array___standard__abstract_collection__Sequence___91d_93d_61d(var_table
, var_color
, var61
); /* Direct call array#Array#[]= on <var_table:Array[nullable MPropDef]>*/
4973 BREAK_label
: (void)0;
4975 ((void (*)(val
* self
))(var_19
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_19
) /* next on <var_19:Iterator[MProperty]>*/;
4981 BREAK_label62
: (void)0;
4983 { /* Inline abstract_collection#Iterator#finish (var_19) on <var_19:Iterator[MProperty]> */
4984 RET_LABEL63
:(void)0;
4987 var_64
= var_super_calls
;
4989 var65
= ((val
* (*)(val
* self
))(var_64
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_64
) /* iterator on <var_64:Set[MMethodDef]>*/;
4994 var67
= ((short int (*)(val
* self
))(var_66
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_66
) /* is_ok on <var_66:Iterator[MMethodDef]>*/;
4998 var68
= ((val
* (*)(val
* self
))(var_66
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_66
) /* item on <var_66:Iterator[MMethodDef]>*/;
5000 var_supercall
= var68
;
5002 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
5003 var71
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
5004 if (unlikely(var71
== NULL
)) {
5005 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
5006 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
5010 RET_LABEL70
:(void)0;
5014 var72
= nit___nit__MClassType___MType__collect_mclassdefs(var_mtype
, var69
);
5017 { /* Inline model#MPropDef#mclassdef (var_supercall) on <var_supercall:MMethodDef> */
5018 var75
= var_supercall
->attrs
[COLOR_nit__model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_supercall:MMethodDef> */
5019 if (unlikely(var75
== NULL
)) {
5020 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
5021 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 2010);
5025 RET_LABEL74
:(void)0;
5029 var76
= ((short int (*)(val
* self
, val
* p0
))(var72
->class->vft
[COLOR_standard__abstract_collection__Collection__has
]))(var72
, var73
) /* has on <var72:Set[MClassDef]>*/;
5037 { /* Inline separate_compiler#SeparateCompiler#method_colors (self) on <self:SeparateCompiler> */
5038 var81
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___method_colors
].val
; /* _method_colors on <self:SeparateCompiler> */
5039 if (unlikely(var81
== NULL
)) {
5040 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _method_colors");
5041 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 127);
5045 RET_LABEL80
:(void)0;
5049 var82
= ((val
* (*)(val
* self
, val
* p0
))(var79
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var79
, var_supercall
) /* [] on <var79:Map[PropertyLayoutElement, Int]>*/;
5051 var83
= ((struct instance_standard__Int
*)var82
)->value
; /* autounbox from nullable Object to Int */;
5052 var_color84
= var83
;
5054 { /* Inline array#AbstractArrayRead#length (var_table) on <var_table:Array[nullable MPropDef]> */
5055 var87
= var_table
->attrs
[COLOR_standard__array__AbstractArrayRead___length
].l
; /* _length on <var_table:Array[nullable MPropDef]> */
5057 RET_LABEL86
:(void)0;
5061 { /* Inline kernel#Int#<= (var85,var_color84) on <var85:Int> */
5062 /* Covariant cast for argument 0 (i) <var_color84:Int> isa OTHER */
5063 /* <var_color84:Int> isa OTHER */
5064 var90
= 1; /* easy <var_color84:Int> isa OTHER*/
5065 if (unlikely(!var90
)) {
5066 var_class_name93
= type_standard__Int
.name
;
5067 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name93
);
5068 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel
, 409);
5071 var94
= var85
<= var_color84
;
5074 RET_LABEL89
:(void)0;
5079 { /* Inline array#AbstractArrayRead#length (var_table) on <var_table:Array[nullable MPropDef]> */
5080 var97
= var_table
->attrs
[COLOR_standard__array__AbstractArrayRead___length
].l
; /* _length on <var_table:Array[nullable MPropDef]> */
5082 RET_LABEL96
:(void)0;
5086 var_99
= var_color84
;
5089 { /* Inline kernel#Int#< (var_i98,var_99) on <var_i98:Int> */
5090 /* Covariant cast for argument 0 (i) <var_99:Int> isa OTHER */
5091 /* <var_99:Int> isa OTHER */
5092 var102
= 1; /* easy <var_99:Int> isa OTHER*/
5093 if (unlikely(!var102
)) {
5094 var_class_name105
= type_standard__Int
.name
;
5095 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name105
);
5096 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel
, 410);
5099 var106
= var_i98
< var_99
;
5102 RET_LABEL101
:(void)0;
5108 standard___standard__Array___standard__abstract_collection__Sequence___91d_93d_61d(var_table
, var_i98
, var107
); /* Direct call array#Array#[]= on <var_table:Array[nullable MPropDef]>*/
5112 var109
= standard___standard__Int___Discrete__successor(var_i98
, var108
);
5116 goto BREAK_label110
;
5119 BREAK_label110
: (void)0;
5123 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
5124 var113
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
5125 if (unlikely(var113
== NULL
)) {
5126 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
5127 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
5131 RET_LABEL112
:(void)0;
5135 var114
= nit___nit__MPropDef___lookup_next_definition(var_supercall
, var111
, var_mtype
);
5137 var_mmethoddef
= var114
;
5139 standard___standard__Array___standard__abstract_collection__Sequence___91d_93d_61d(var_table
, var_color84
, var_mmethoddef
); /* Direct call array#Array#[]= on <var_table:Array[nullable MPropDef]>*/
5141 BREAK_label78
: (void)0;
5143 ((void (*)(val
* self
))(var_66
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_66
) /* next on <var_66:Iterator[MMethodDef]>*/;
5146 goto BREAK_label115
;
5149 BREAK_label115
: (void)0;
5151 { /* Inline abstract_collection#Iterator#finish (var_66) on <var_66:Iterator[MMethodDef]> */
5152 RET_LABEL116
:(void)0;
5156 ((void (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_3
) /* next on <var_3:Iterator[MClass]>*/;
5159 goto BREAK_label117
;
5162 BREAK_label117
: (void)0;
5164 { /* Inline abstract_collection#Iterator#finish (var_3) on <var_3:Iterator[MClass]> */
5165 RET_LABEL118
:(void)0;
5173 /* method separate_compiler#SeparateCompiler#build_attr_tables for (self: SeparateCompiler, Set[MClass]): Map[MClass, Array[nullable MPropDef]] */
5174 val
* nit___nit__SeparateCompiler___build_attr_tables(val
* self
, val
* p0
) {
5175 val
* var
/* : Map[MClass, Array[nullable MPropDef]] */;
5176 val
* var_mclasses
/* var mclasses: Set[MClass] */;
5177 val
* var1
/* : HashMap[MClass, Array[nullable MPropDef]] */;
5178 val
* var_tables
/* var tables: HashMap[MClass, Array[nullable MPropDef]] */;
5179 val
* var_
/* var : Set[MClass] */;
5180 val
* var2
/* : Iterator[nullable Object] */;
5181 val
* var_3
/* var : Iterator[MClass] */;
5182 short int var4
/* : Bool */;
5183 val
* var5
/* : nullable Object */;
5184 val
* var_mclass
/* var mclass: MClass */;
5185 val
* var6
/* : Array[nullable MPropDef] */;
5186 val
* var_table
/* var table: Array[nullable MPropDef] */;
5187 val
* var7
/* : MModule */;
5188 val
* var9
/* : MModule */;
5189 val
* var10
/* : Set[MProperty] */;
5190 val
* var_mproperties
/* var mproperties: Set[MProperty] */;
5191 val
* var11
/* : MClassDef */;
5192 val
* var13
/* : MClassDef */;
5193 val
* var14
/* : MClassType */;
5194 val
* var16
/* : MClassType */;
5195 val
* var_mtype
/* var mtype: MClassType */;
5196 val
* var_17
/* var : Set[MProperty] */;
5197 val
* var18
/* : Iterator[nullable Object] */;
5198 val
* var_19
/* var : Iterator[MProperty] */;
5199 short int var20
/* : Bool */;
5200 val
* var21
/* : nullable Object */;
5201 val
* var_mproperty
/* var mproperty: MProperty */;
5202 short int var22
/* : Bool */;
5205 short int var23
/* : Bool */;
5206 val
* var24
/* : Map[MAttribute, Int] */;
5207 val
* var26
/* : Map[MAttribute, Int] */;
5208 short int var27
/* : Bool */;
5209 short int var28
/* : Bool */;
5210 val
* var29
/* : Map[MAttribute, Int] */;
5211 val
* var31
/* : Map[MAttribute, Int] */;
5212 val
* var32
/* : nullable Object */;
5213 long var33
/* : Int */;
5214 long var_color
/* var color: Int */;
5215 long var34
/* : Int */;
5216 long var36
/* : Int */;
5217 short int var37
/* : Bool */;
5218 short int var39
/* : Bool */;
5221 const char* var_class_name
;
5222 short int var42
/* : Bool */;
5223 long var43
/* : Int */;
5224 long var45
/* : Int */;
5225 long var_i
/* var i: Int */;
5226 long var_46
/* var : Int */;
5227 short int var47
/* : Bool */;
5228 short int var49
/* : Bool */;
5231 const char* var_class_name52
;
5232 short int var53
/* : Bool */;
5233 val
* var54
/* : null */;
5234 long var55
/* : Int */;
5235 long var56
/* : Int */;
5236 val
* var58
/* : MModule */;
5237 val
* var60
/* : MModule */;
5238 val
* var61
/* : MPropDef */;
5240 var1
= NEW_standard__HashMap(&type_standard__HashMap__nit__MClass__standard__Array__nullable__nit__MPropDef
);
5242 standard___standard__HashMap___standard__kernel__Object__init(var1
); /* Direct call hash_collection#HashMap#init on <var1:HashMap[MClass, Array[nullable MPropDef]]>*/
5245 var_
= var_mclasses
;
5247 var2
= ((val
* (*)(val
* self
))(var_
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_
) /* iterator on <var_:Set[MClass]>*/;
5252 var4
= ((short int (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_3
) /* is_ok on <var_3:Iterator[MClass]>*/;
5256 var5
= ((val
* (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_3
) /* item on <var_3:Iterator[MClass]>*/;
5259 var6
= NEW_standard__Array(&type_standard__Array__nullable__nit__MPropDef
);
5261 standard___standard__Array___standard__kernel__Object__init(var6
); /* Direct call array#Array#init on <var6:Array[nullable MPropDef]>*/
5265 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var_tables
, var_mclass
, var_table
); /* Direct call hash_collection#HashMap#[]= on <var_tables:HashMap[MClass, Array[nullable MPropDef]]>*/
5268 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
5269 var9
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
5270 if (unlikely(var9
== NULL
)) {
5271 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
5272 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
5280 var10
= nit__abstract_compiler___MModule___properties(var7
, var_mclass
);
5282 var_mproperties
= var10
;
5284 { /* Inline model#MClass#intro (var_mclass) on <var_mclass:MClass> */
5285 var13
= var_mclass
->attrs
[COLOR_nit__model__MClass___intro
].val
; /* _intro on <var_mclass:MClass> */
5286 if (unlikely(var13
== NULL
)) {
5287 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro");
5288 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 423);
5292 RET_LABEL12
:(void)0;
5296 { /* Inline model#MClassDef#bound_mtype (var11) on <var11:MClassDef> */
5297 var16
= var11
->attrs
[COLOR_nit__model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var11:MClassDef> */
5298 if (unlikely(var16
== NULL
)) {
5299 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
5300 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 495);
5304 RET_LABEL15
:(void)0;
5308 var_17
= var_mproperties
;
5310 var18
= ((val
* (*)(val
* self
))(var_17
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_17
) /* iterator on <var_17:Set[MProperty]>*/;
5315 var20
= ((short int (*)(val
* self
))(var_19
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_19
) /* is_ok on <var_19:Iterator[MProperty]>*/;
5319 var21
= ((val
* (*)(val
* self
))(var_19
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_19
) /* item on <var_19:Iterator[MProperty]>*/;
5321 var_mproperty
= var21
;
5322 /* <var_mproperty:MProperty> isa MAttribute */
5323 cltype
= type_nit__MAttribute
.color
;
5324 idtype
= type_nit__MAttribute
.id
;
5325 if(cltype
>= var_mproperty
->type
->table_size
) {
5328 var22
= var_mproperty
->type
->type_table
[cltype
] == idtype
;
5336 { /* Inline separate_compiler#SeparateCompiler#attr_colors (self) on <self:SeparateCompiler> */
5337 var26
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___attr_colors
].val
; /* _attr_colors on <self:SeparateCompiler> */
5338 if (unlikely(var26
== NULL
)) {
5339 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _attr_colors");
5340 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 128);
5344 RET_LABEL25
:(void)0;
5348 var27
= standard___standard__MapRead___has_key(var24
, var_mproperty
);
5356 { /* Inline separate_compiler#SeparateCompiler#attr_colors (self) on <self:SeparateCompiler> */
5357 var31
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___attr_colors
].val
; /* _attr_colors on <self:SeparateCompiler> */
5358 if (unlikely(var31
== NULL
)) {
5359 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _attr_colors");
5360 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 128);
5364 RET_LABEL30
:(void)0;
5368 var32
= ((val
* (*)(val
* self
, val
* p0
))(var29
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var29
, var_mproperty
) /* [] on <var29:Map[MAttribute, Int]>*/;
5370 var33
= ((struct instance_standard__Int
*)var32
)->value
; /* autounbox from nullable Object to Int */;
5373 { /* Inline array#AbstractArrayRead#length (var_table) on <var_table:Array[nullable MPropDef]> */
5374 var36
= var_table
->attrs
[COLOR_standard__array__AbstractArrayRead___length
].l
; /* _length on <var_table:Array[nullable MPropDef]> */
5376 RET_LABEL35
:(void)0;
5380 { /* Inline kernel#Int#<= (var34,var_color) on <var34:Int> */
5381 /* Covariant cast for argument 0 (i) <var_color:Int> isa OTHER */
5382 /* <var_color:Int> isa OTHER */
5383 var39
= 1; /* easy <var_color:Int> isa OTHER*/
5384 if (unlikely(!var39
)) {
5385 var_class_name
= type_standard__Int
.name
;
5386 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
5387 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel
, 409);
5390 var42
= var34
<= var_color
;
5393 RET_LABEL38
:(void)0;
5398 { /* Inline array#AbstractArrayRead#length (var_table) on <var_table:Array[nullable MPropDef]> */
5399 var45
= var_table
->attrs
[COLOR_standard__array__AbstractArrayRead___length
].l
; /* _length on <var_table:Array[nullable MPropDef]> */
5401 RET_LABEL44
:(void)0;
5408 { /* Inline kernel#Int#< (var_i,var_46) on <var_i:Int> */
5409 /* Covariant cast for argument 0 (i) <var_46:Int> isa OTHER */
5410 /* <var_46:Int> isa OTHER */
5411 var49
= 1; /* easy <var_46:Int> isa OTHER*/
5412 if (unlikely(!var49
)) {
5413 var_class_name52
= type_standard__Int
.name
;
5414 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name52
);
5415 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel
, 410);
5418 var53
= var_i
< var_46
;
5421 RET_LABEL48
:(void)0;
5427 standard___standard__Array___standard__abstract_collection__Sequence___91d_93d_61d(var_table
, var_i
, var54
); /* Direct call array#Array#[]= on <var_table:Array[nullable MPropDef]>*/
5431 var56
= standard___standard__Int___Discrete__successor(var_i
, var55
);
5438 BREAK_label57
: (void)0;
5442 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
5443 var60
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
5444 if (unlikely(var60
== NULL
)) {
5445 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
5446 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
5450 RET_LABEL59
:(void)0;
5454 var61
= nit___nit__MProperty___lookup_first_definition(var_mproperty
, var58
, var_mtype
);
5457 standard___standard__Array___standard__abstract_collection__Sequence___91d_93d_61d(var_table
, var_color
, var61
); /* Direct call array#Array#[]= on <var_table:Array[nullable MPropDef]>*/
5459 BREAK_label
: (void)0;
5461 ((void (*)(val
* self
))(var_19
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_19
) /* next on <var_19:Iterator[MProperty]>*/;
5467 BREAK_label62
: (void)0;
5469 { /* Inline abstract_collection#Iterator#finish (var_19) on <var_19:Iterator[MProperty]> */
5470 RET_LABEL63
:(void)0;
5474 ((void (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_3
) /* next on <var_3:Iterator[MClass]>*/;
5480 BREAK_label64
: (void)0;
5482 { /* Inline abstract_collection#Iterator#finish (var_3) on <var_3:Iterator[MClass]> */
5483 RET_LABEL65
:(void)0;
5491 /* method separate_compiler#SeparateCompiler#do_type_coloring for (self: SeparateCompiler): POSet[MType] */
5492 val
* nit___nit__SeparateCompiler___do_type_coloring(val
* self
) {
5493 val
* var
/* : POSet[MType] */;
5494 val
* var1
/* : nullable RapidTypeAnalysis */;
5495 val
* var3
/* : nullable RapidTypeAnalysis */;
5496 val
* var4
/* : HashSet[MClassType] */;
5497 val
* var6
/* : HashSet[MClassType] */;
5498 val
* var_live_types
/* var live_types: HashSet[MClassType] */;
5499 val
* var7
/* : nullable RapidTypeAnalysis */;
5500 val
* var9
/* : nullable RapidTypeAnalysis */;
5501 val
* var10
/* : HashSet[MType] */;
5502 val
* var12
/* : HashSet[MType] */;
5503 val
* var_live_cast_types
/* var live_cast_types: HashSet[MType] */;
5504 val
* var13
/* : HashSet[MType] */;
5505 val
* var_mtypes
/* var mtypes: HashSet[MType] */;
5506 val
* var14
/* : HashMap[MClass, Int] */;
5507 val
* var16
/* : HashMap[MClass, Int] */;
5508 val
* var17
/* : RemovableCollection[nullable Object] */;
5509 val
* var19
/* : RemovableCollection[nullable Object] */;
5510 val
* var_
/* var : RemovableCollection[MClass] */;
5511 val
* var20
/* : Iterator[nullable Object] */;
5512 val
* var_21
/* var : Iterator[MClass] */;
5513 short int var22
/* : Bool */;
5514 val
* var23
/* : nullable Object */;
5515 val
* var_c
/* var c: MClass */;
5516 val
* var24
/* : MClassType */;
5517 val
* var26
/* : MClassType */;
5518 val
* var28
/* : POSet[MType] */;
5519 val
* var_poset
/* var poset: POSet[MType] */;
5520 val
* var29
/* : POSetColorer[MType] */;
5521 val
* var_colorer
/* var colorer: POSetColorer[MType] */;
5522 val
* var31
/* : Map[Object, Int] */;
5523 val
* var33
/* : Map[Object, Int] */;
5524 val
* var35
/* : Map[MType, Array[nullable MType]] */;
5526 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
5527 var3
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
5533 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5534 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 428);
5537 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_types (var1) on <var1:nullable RapidTypeAnalysis> */
5538 if (unlikely(var1
== NULL
)) {
5539 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5540 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 53);
5543 var6
= var1
->attrs
[COLOR_nit__rapid_type_analysis__RapidTypeAnalysis___live_types
].val
; /* _live_types on <var1:nullable RapidTypeAnalysis> */
5544 if (unlikely(var6
== NULL
)) {
5545 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_types");
5546 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 53);
5553 var_live_types
= var4
;
5555 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
5556 var9
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
5562 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5563 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 429);
5566 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_cast_types (var7) on <var7:nullable RapidTypeAnalysis> */
5567 if (unlikely(var7
== NULL
)) {
5568 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5569 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 65);
5572 var12
= var7
->attrs
[COLOR_nit__rapid_type_analysis__RapidTypeAnalysis___live_cast_types
].val
; /* _live_cast_types on <var7:nullable RapidTypeAnalysis> */
5573 if (unlikely(var12
== NULL
)) {
5574 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_cast_types");
5575 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 65);
5579 RET_LABEL11
:(void)0;
5582 var_live_cast_types
= var10
;
5583 var13
= NEW_standard__HashSet(&type_standard__HashSet__nit__MType
);
5585 standard___standard__HashSet___standard__kernel__Object__init(var13
); /* Direct call hash_collection#HashSet#init on <var13:HashSet[MType]>*/
5589 standard___standard__SimpleCollection___add_all(var_mtypes
, var_live_types
); /* Direct call abstract_collection#SimpleCollection#add_all on <var_mtypes:HashSet[MType]>*/
5592 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:SeparateCompiler> */
5593 var16
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
5594 if (unlikely(var16
== NULL
)) {
5595 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
5596 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 233);
5600 RET_LABEL15
:(void)0;
5604 { /* Inline hash_collection#HashMap#keys (var14) on <var14:HashMap[MClass, Int]> */
5605 var19
= var14
->attrs
[COLOR_standard__hash_collection__HashMap___keys
].val
; /* _keys on <var14:HashMap[MClass, Int]> */
5606 if (unlikely(var19
== NULL
)) {
5607 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _keys");
5608 PRINT_ERROR(" (%s:%d)\n", FILE_standard__hash_collection
, 275);
5612 RET_LABEL18
:(void)0;
5617 var20
= ((val
* (*)(val
* self
))(var_
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_
) /* iterator on <var_:RemovableCollection[MClass]>*/;
5622 var22
= ((short int (*)(val
* self
))(var_21
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_21
) /* is_ok on <var_21:Iterator[MClass]>*/;
5626 var23
= ((val
* (*)(val
* self
))(var_21
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_21
) /* item on <var_21:Iterator[MClass]>*/;
5630 { /* Inline model#MClass#mclass_type (var_c) on <var_c:MClass> */
5631 var26
= var_c
->attrs
[COLOR_nit__model__MClass___mclass_type
].val
; /* _mclass_type on <var_c:MClass> */
5632 if (unlikely(var26
== NULL
)) {
5633 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
5634 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 438);
5638 RET_LABEL25
:(void)0;
5642 standard___standard__HashSet___standard__abstract_collection__SimpleCollection__add(var_mtypes
, var24
); /* Direct call hash_collection#HashSet#add on <var_mtypes:HashSet[MType]>*/
5645 ((void (*)(val
* self
))(var_21
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_21
) /* next on <var_21:Iterator[MClass]>*/;
5651 BREAK_label
: (void)0;
5653 { /* Inline abstract_collection#Iterator#finish (var_21) on <var_21:Iterator[MClass]> */
5654 RET_LABEL27
:(void)0;
5658 var28
= nit___nit__SeparateCompiler___poset_from_mtypes(self
, var_mtypes
, var_live_cast_types
);
5661 var29
= NEW_nit__POSetColorer(&type_nit__POSetColorer__nit__MType
);
5663 { /* Inline kernel#Object#init (var29) on <var29:POSetColorer[MType]> */
5664 RET_LABEL30
:(void)0;
5667 var_colorer
= var29
;
5669 nit___nit__POSetColorer___colorize(var_colorer
, var_poset
); /* Direct call coloring#POSetColorer#colorize on <var_colorer:POSetColorer[MType]>*/
5672 var31
= nit___nit__POSetColorer___ids(var_colorer
);
5675 { /* Inline separate_compiler#SeparateCompiler#type_ids= (self,var31) on <self:SeparateCompiler> */
5676 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_ids
].val
= var31
; /* _type_ids on <self:SeparateCompiler> */
5677 RET_LABEL32
:(void)0;
5681 var33
= nit___nit__POSetColorer___colors(var_colorer
);
5684 { /* Inline separate_compiler#SeparateCompiler#type_colors= (self,var33) on <self:SeparateCompiler> */
5685 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_colors
].val
= var33
; /* _type_colors on <self:SeparateCompiler> */
5686 RET_LABEL34
:(void)0;
5690 var35
= nit___nit__SeparateCompiler___build_type_tables(self
, var_poset
);
5693 { /* Inline separate_compiler#SeparateCompiler#type_tables= (self,var35) on <self:SeparateCompiler> */
5694 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_tables
].val
= var35
; /* _type_tables on <self:SeparateCompiler> */
5695 RET_LABEL36
:(void)0;
5699 nit___nit__SeparateCompiler___compile_resolution_tables(self
, var_mtypes
); /* Direct call separate_compiler#SeparateCompiler#compile_resolution_tables on <self:SeparateCompiler>*/
5706 /* method separate_compiler#SeparateCompiler#poset_from_mtypes for (self: SeparateCompiler, Set[MType], Set[MType]): POSet[MType] */
5707 val
* nit___nit__SeparateCompiler___poset_from_mtypes(val
* self
, val
* p0
, val
* p1
) {
5708 val
* var
/* : POSet[MType] */;
5709 val
* var_mtypes
/* var mtypes: Set[MType] */;
5710 val
* var_cast_types
/* var cast_types: Set[MType] */;
5711 val
* var1
/* : POSet[MType] */;
5712 val
* var_poset
/* var poset: POSet[MType] */;
5713 val
* var_
/* var : Set[MType] */;
5714 val
* var3
/* : Iterator[nullable Object] */;
5715 val
* var_4
/* var : Iterator[MType] */;
5716 short int var5
/* : Bool */;
5717 val
* var6
/* : nullable Object */;
5718 val
* var_e
/* var e: MType */;
5719 val
* var7
/* : POSetElement[nullable Object] */;
5720 val
* var_8
/* var : Set[MType] */;
5721 val
* var9
/* : Iterator[nullable Object] */;
5722 val
* var_10
/* var : Iterator[MType] */;
5723 short int var11
/* : Bool */;
5724 val
* var12
/* : nullable Object */;
5725 val
* var_o
/* var o: MType */;
5726 short int var13
/* : Bool */;
5727 val
* var_other
/* var other: nullable Object */;
5728 short int var15
/* : Bool */;
5729 short int var17
/* : Bool */;
5730 val
* var18
/* : POSetElement[nullable Object] */;
5731 val
* var19
/* : MModule */;
5732 val
* var21
/* : MModule */;
5733 val
* var22
/* : null */;
5734 short int var23
/* : Bool */;
5736 var_cast_types
= p1
;
5737 var1
= NEW_poset__POSet(&type_poset__POSet__nit__MType
);
5739 { /* Inline kernel#Object#init (var1) on <var1:POSet[MType]> */
5746 var3
= ((val
* (*)(val
* self
))(var_
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_
) /* iterator on <var_:Set[MType]>*/;
5751 var5
= ((short int (*)(val
* self
))(var_4
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_4
) /* is_ok on <var_4:Iterator[MType]>*/;
5755 var6
= ((val
* (*)(val
* self
))(var_4
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_4
) /* item on <var_4:Iterator[MType]>*/;
5759 var7
= poset___poset__POSet___add_node(var_poset
, var_e
);
5761 var_8
= var_cast_types
;
5763 var9
= ((val
* (*)(val
* self
))(var_8
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_8
) /* iterator on <var_8:Set[MType]>*/;
5768 var11
= ((short int (*)(val
* self
))(var_10
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_10
) /* is_ok on <var_10:Iterator[MType]>*/;
5772 var12
= ((val
* (*)(val
* self
))(var_10
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_10
) /* item on <var_10:Iterator[MType]>*/;
5776 { /* Inline kernel#Object#== (var_e,var_o) on <var_e:MType> */
5779 { /* Inline kernel#Object#is_same_instance (var_e,var_other) on <var_e:MType> */
5780 var17
= var_e
== var_other
;
5783 RET_LABEL16
:(void)0;
5788 RET_LABEL14
:(void)0;
5796 var18
= poset___poset__POSet___add_node(var_poset
, var_o
);
5799 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
5800 var21
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
5801 if (unlikely(var21
== NULL
)) {
5802 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
5803 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
5807 RET_LABEL20
:(void)0;
5812 var23
= nit___nit__MType___is_subtype(var_e
, var19
, var22
, var_o
);
5816 poset___poset__POSet___add_edge(var_poset
, var_e
, var_o
); /* Direct call poset#POSet#add_edge on <var_poset:POSet[MType]>*/
5820 BREAK_label
: (void)0;
5822 ((void (*)(val
* self
))(var_10
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_10
) /* next on <var_10:Iterator[MType]>*/;
5828 BREAK_label24
: (void)0;
5830 { /* Inline abstract_collection#Iterator#finish (var_10) on <var_10:Iterator[MType]> */
5831 RET_LABEL25
:(void)0;
5835 ((void (*)(val
* self
))(var_4
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_4
) /* next on <var_4:Iterator[MType]>*/;
5841 BREAK_label26
: (void)0;
5843 { /* Inline abstract_collection#Iterator#finish (var_4) on <var_4:Iterator[MType]> */
5844 RET_LABEL27
:(void)0;
5852 /* method separate_compiler#SeparateCompiler#build_type_tables for (self: SeparateCompiler, POSet[MType]): Map[MType, Array[nullable MType]] */
5853 val
* nit___nit__SeparateCompiler___build_type_tables(val
* self
, val
* p0
) {
5854 val
* var
/* : Map[MType, Array[nullable MType]] */;
5855 val
* var_mtypes
/* var mtypes: POSet[MType] */;
5856 val
* var1
/* : HashMap[MType, Array[nullable MType]] */;
5857 val
* var_tables
/* var tables: HashMap[MType, Array[nullable MType]] */;
5858 val
* var_
/* var : POSet[MType] */;
5859 val
* var2
/* : Iterator[nullable Object] */;
5860 val
* var_3
/* var : Iterator[MType] */;
5861 short int var4
/* : Bool */;
5862 val
* var5
/* : nullable Object */;
5863 val
* var_mtype
/* var mtype: MType */;
5864 val
* var6
/* : Array[nullable MType] */;
5865 val
* var_table
/* var table: Array[nullable MType] */;
5866 val
* var7
/* : POSetElement[nullable Object] */;
5867 val
* var8
/* : Collection[nullable Object] */;
5868 val
* var_9
/* var : Collection[MType] */;
5869 val
* var10
/* : Iterator[nullable Object] */;
5870 val
* var_11
/* var : Iterator[MType] */;
5871 short int var12
/* : Bool */;
5872 val
* var13
/* : nullable Object */;
5873 val
* var_sup
/* var sup: MType */;
5874 val
* var14
/* : Map[MType, Int] */;
5875 val
* var16
/* : Map[MType, Int] */;
5876 val
* var17
/* : nullable Object */;
5877 long var18
/* : Int */;
5878 long var_color
/* var color: Int */;
5879 long var19
/* : Int */;
5880 long var21
/* : Int */;
5881 short int var22
/* : Bool */;
5882 short int var24
/* : Bool */;
5885 const char* var_class_name
;
5886 short int var25
/* : Bool */;
5887 long var26
/* : Int */;
5888 long var28
/* : Int */;
5889 long var_i
/* var i: Int */;
5890 long var_29
/* var : Int */;
5891 short int var30
/* : Bool */;
5892 short int var32
/* : Bool */;
5895 const char* var_class_name35
;
5896 short int var36
/* : Bool */;
5897 val
* var37
/* : null */;
5898 long var38
/* : Int */;
5899 long var39
/* : Int */;
5901 var1
= NEW_standard__HashMap(&type_standard__HashMap__nit__MType__standard__Array__nullable__nit__MType
);
5903 standard___standard__HashMap___standard__kernel__Object__init(var1
); /* Direct call hash_collection#HashMap#init on <var1:HashMap[MType, Array[nullable MType]]>*/
5908 var2
= poset___poset__POSet___standard__abstract_collection__Collection__iterator(var_
);
5913 var4
= ((short int (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_3
) /* is_ok on <var_3:Iterator[MType]>*/;
5917 var5
= ((val
* (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_3
) /* item on <var_3:Iterator[MType]>*/;
5920 var6
= NEW_standard__Array(&type_standard__Array__nullable__nit__MType
);
5922 standard___standard__Array___standard__kernel__Object__init(var6
); /* Direct call array#Array#init on <var6:Array[nullable MType]>*/
5926 var7
= poset___poset__POSet____91d_93d(var_mtypes
, var_mtype
);
5929 var8
= poset___poset__POSetElement___greaters(var7
);
5933 var10
= ((val
* (*)(val
* self
))(var_9
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_9
) /* iterator on <var_9:Collection[MType]>*/;
5938 var12
= ((short int (*)(val
* self
))(var_11
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_11
) /* is_ok on <var_11:Iterator[MType]>*/;
5942 var13
= ((val
* (*)(val
* self
))(var_11
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_11
) /* item on <var_11:Iterator[MType]>*/;
5946 { /* Inline separate_compiler#SeparateCompiler#type_colors (self) on <self:SeparateCompiler> */
5947 var16
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_colors
].val
; /* _type_colors on <self:SeparateCompiler> */
5948 if (unlikely(var16
== NULL
)) {
5949 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_colors");
5950 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 125);
5954 RET_LABEL15
:(void)0;
5958 var17
= ((val
* (*)(val
* self
, val
* p0
))(var14
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var14
, var_sup
) /* [] on <var14:Map[MType, Int]>*/;
5960 var18
= ((struct instance_standard__Int
*)var17
)->value
; /* autounbox from nullable Object to Int */;
5963 { /* Inline array#AbstractArrayRead#length (var_table) on <var_table:Array[nullable MType]> */
5964 var21
= var_table
->attrs
[COLOR_standard__array__AbstractArrayRead___length
].l
; /* _length on <var_table:Array[nullable MType]> */
5966 RET_LABEL20
:(void)0;
5970 { /* Inline kernel#Int#<= (var19,var_color) on <var19:Int> */
5971 /* Covariant cast for argument 0 (i) <var_color:Int> isa OTHER */
5972 /* <var_color:Int> isa OTHER */
5973 var24
= 1; /* easy <var_color:Int> isa OTHER*/
5974 if (unlikely(!var24
)) {
5975 var_class_name
= type_standard__Int
.name
;
5976 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
5977 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel
, 409);
5980 var25
= var19
<= var_color
;
5983 RET_LABEL23
:(void)0;
5988 { /* Inline array#AbstractArrayRead#length (var_table) on <var_table:Array[nullable MType]> */
5989 var28
= var_table
->attrs
[COLOR_standard__array__AbstractArrayRead___length
].l
; /* _length on <var_table:Array[nullable MType]> */
5991 RET_LABEL27
:(void)0;
5998 { /* Inline kernel#Int#< (var_i,var_29) on <var_i:Int> */
5999 /* Covariant cast for argument 0 (i) <var_29:Int> isa OTHER */
6000 /* <var_29:Int> isa OTHER */
6001 var32
= 1; /* easy <var_29:Int> isa OTHER*/
6002 if (unlikely(!var32
)) {
6003 var_class_name35
= type_standard__Int
.name
;
6004 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name35
);
6005 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel
, 410);
6008 var36
= var_i
< var_29
;
6011 RET_LABEL31
:(void)0;
6017 standard___standard__Array___standard__abstract_collection__Sequence___91d_93d_61d(var_table
, var_i
, var37
); /* Direct call array#Array#[]= on <var_table:Array[nullable MType]>*/
6021 var39
= standard___standard__Int___Discrete__successor(var_i
, var38
);
6028 BREAK_label
: (void)0;
6032 standard___standard__Array___standard__abstract_collection__Sequence___91d_93d_61d(var_table
, var_color
, var_sup
); /* Direct call array#Array#[]= on <var_table:Array[nullable MType]>*/
6035 ((void (*)(val
* self
))(var_11
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_11
) /* next on <var_11:Iterator[MType]>*/;
6041 BREAK_label40
: (void)0;
6043 { /* Inline abstract_collection#Iterator#finish (var_11) on <var_11:Iterator[MType]> */
6044 RET_LABEL41
:(void)0;
6048 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var_tables
, var_mtype
, var_table
); /* Direct call hash_collection#HashMap#[]= on <var_tables:HashMap[MType, Array[nullable MType]]>*/
6051 ((void (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_3
) /* next on <var_3:Iterator[MType]>*/;
6057 BREAK_label42
: (void)0;
6059 { /* Inline abstract_collection#Iterator#finish (var_3) on <var_3:Iterator[MType]> */
6060 RET_LABEL43
:(void)0;
6068 /* method separate_compiler#SeparateCompiler#compile_resolution_tables for (self: SeparateCompiler, Set[MType]) */
6069 void nit___nit__SeparateCompiler___compile_resolution_tables(val
* self
, val
* p0
) {
6070 val
* var_mtypes
/* var mtypes: Set[MType] */;
6071 val
* var
/* : HashMap[MClassType, Set[MType]] */;
6072 val
* var_mtype2unresolved
/* var mtype2unresolved: HashMap[MClassType, Set[MType]] */;
6073 val
* var1
/* : nullable RapidTypeAnalysis */;
6074 val
* var3
/* : nullable RapidTypeAnalysis */;
6075 val
* var4
/* : HashSet[MClassType] */;
6076 val
* var6
/* : HashSet[MClassType] */;
6077 val
* var_
/* var : HashSet[MClassType] */;
6078 val
* var7
/* : Iterator[nullable Object] */;
6079 val
* var_8
/* var : Iterator[MClassType] */;
6080 short int var9
/* : Bool */;
6081 val
* var10
/* : nullable Object */;
6082 val
* var_mtype
/* var mtype: MClassType */;
6083 val
* var11
/* : HashSet[MType] */;
6084 val
* var_set
/* var set: HashSet[MType] */;
6085 val
* var12
/* : MModule */;
6086 val
* var14
/* : MModule */;
6087 val
* var15
/* : Set[MClassDef] */;
6088 val
* var_16
/* var : Set[MClassDef] */;
6089 val
* var17
/* : Iterator[nullable Object] */;
6090 val
* var_18
/* var : Iterator[MClassDef] */;
6091 short int var19
/* : Bool */;
6092 val
* var20
/* : nullable Object */;
6093 val
* var_cd
/* var cd: MClassDef */;
6094 val
* var21
/* : Map[MClassDef, Set[MType]] */;
6095 val
* var23
/* : Map[MClassDef, Set[MType]] */;
6096 short int var24
/* : Bool */;
6097 val
* var25
/* : Map[MClassDef, Set[MType]] */;
6098 val
* var27
/* : Map[MClassDef, Set[MType]] */;
6099 val
* var28
/* : nullable Object */;
6100 val
* var32
/* : BucketsColorer[MType, MType] */;
6101 val
* var_colorer
/* var colorer: BucketsColorer[MType, MType] */;
6102 val
* var34
/* : Map[Object, Int] */;
6103 val
* var36
/* : Map[MClassType, Array[nullable MType]] */;
6104 val
* var38
/* : HashSet[MType] */;
6105 val
* var_all_unresolved
/* var all_unresolved: HashSet[MType] */;
6106 val
* var39
/* : Map[MClassDef, Set[MType]] */;
6107 val
* var41
/* : Map[MClassDef, Set[MType]] */;
6108 val
* var42
/* : Collection[nullable Object] */;
6109 val
* var_43
/* var : RemovableCollection[Set[MType]] */;
6110 val
* var44
/* : Iterator[nullable Object] */;
6111 val
* var_45
/* var : Iterator[Set[MType]] */;
6112 short int var46
/* : Bool */;
6113 val
* var47
/* : nullable Object */;
6114 val
* var_t
/* var t: Set[MType] */;
6115 val
* var50
/* : HashMap[MType, Int] */;
6116 val
* var_all_unresolved_types_colors
/* var all_unresolved_types_colors: HashMap[MType, Int] */;
6117 val
* var_51
/* var : HashSet[MType] */;
6118 val
* var52
/* : Iterator[nullable Object] */;
6119 val
* var_53
/* var : Iterator[MType] */;
6120 short int var54
/* : Bool */;
6121 val
* var55
/* : nullable Object */;
6122 val
* var_t56
/* var t: MType */;
6123 val
* var57
/* : Map[MType, Int] */;
6124 val
* var59
/* : Map[MType, Int] */;
6125 short int var60
/* : Bool */;
6126 val
* var61
/* : Map[MType, Int] */;
6127 val
* var63
/* : Map[MType, Int] */;
6128 val
* var64
/* : nullable Object */;
6129 long var65
/* : Int */;
6130 long var66
/* : Int */;
6131 long var68
/* : Int */;
6132 val
* var69
/* : nullable Object */;
6134 var
= NEW_standard__HashMap(&type_standard__HashMap__nit__MClassType__standard__Set__nit__MType
);
6136 standard___standard__HashMap___standard__kernel__Object__init(var
); /* Direct call hash_collection#HashMap#init on <var:HashMap[MClassType, Set[MType]]>*/
6138 var_mtype2unresolved
= var
;
6140 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
6141 var3
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
6147 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6148 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 493);
6151 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_types (var1) on <var1:nullable RapidTypeAnalysis> */
6152 if (unlikely(var1
== NULL
)) {
6153 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6154 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 53);
6157 var6
= var1
->attrs
[COLOR_nit__rapid_type_analysis__RapidTypeAnalysis___live_types
].val
; /* _live_types on <var1:nullable RapidTypeAnalysis> */
6158 if (unlikely(var6
== NULL
)) {
6159 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_types");
6160 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 53);
6169 var7
= standard___standard__HashSet___standard__abstract_collection__Collection__iterator(var_
);
6174 var9
= ((short int (*)(val
* self
))(var_8
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_8
) /* is_ok on <var_8:Iterator[MClassType]>*/;
6178 var10
= ((val
* (*)(val
* self
))(var_8
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_8
) /* item on <var_8:Iterator[MClassType]>*/;
6181 var11
= NEW_standard__HashSet(&type_standard__HashSet__nit__MType
);
6183 standard___standard__HashSet___standard__kernel__Object__init(var11
); /* Direct call hash_collection#HashSet#init on <var11:HashSet[MType]>*/
6187 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
6188 var14
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
6189 if (unlikely(var14
== NULL
)) {
6190 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
6191 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
6195 RET_LABEL13
:(void)0;
6199 var15
= nit___nit__MClassType___MType__collect_mclassdefs(var_mtype
, var12
);
6203 var17
= ((val
* (*)(val
* self
))(var_16
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_16
) /* iterator on <var_16:Set[MClassDef]>*/;
6208 var19
= ((short int (*)(val
* self
))(var_18
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_18
) /* is_ok on <var_18:Iterator[MClassDef]>*/;
6212 var20
= ((val
* (*)(val
* self
))(var_18
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_18
) /* item on <var_18:Iterator[MClassDef]>*/;
6216 { /* Inline separate_compiler#SeparateCompiler#live_unresolved_types (self) on <self:SeparateCompiler> */
6217 var23
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___live_unresolved_types
].val
; /* _live_unresolved_types on <self:SeparateCompiler> */
6218 if (unlikely(var23
== NULL
)) {
6219 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_unresolved_types");
6220 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 122);
6224 RET_LABEL22
:(void)0;
6228 var24
= standard___standard__MapRead___has_key(var21
, var_cd
);
6232 { /* Inline separate_compiler#SeparateCompiler#live_unresolved_types (self) on <self:SeparateCompiler> */
6233 var27
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___live_unresolved_types
].val
; /* _live_unresolved_types on <self:SeparateCompiler> */
6234 if (unlikely(var27
== NULL
)) {
6235 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_unresolved_types");
6236 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 122);
6240 RET_LABEL26
:(void)0;
6244 var28
= ((val
* (*)(val
* self
, val
* p0
))(var25
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var25
, var_cd
) /* [] on <var25:Map[MClassDef, Set[MType]]>*/;
6247 standard___standard__SimpleCollection___add_all(var_set
, var28
); /* Direct call abstract_collection#SimpleCollection#add_all on <var_set:HashSet[MType]>*/
6252 ((void (*)(val
* self
))(var_18
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_18
) /* next on <var_18:Iterator[MClassDef]>*/;
6258 BREAK_label
: (void)0;
6260 { /* Inline abstract_collection#Iterator#finish (var_18) on <var_18:Iterator[MClassDef]> */
6261 RET_LABEL29
:(void)0;
6265 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var_mtype2unresolved
, var_mtype
, var_set
); /* Direct call hash_collection#HashMap#[]= on <var_mtype2unresolved:HashMap[MClassType, Set[MType]]>*/
6268 ((void (*)(val
* self
))(var_8
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_8
) /* next on <var_8:Iterator[MClassType]>*/;
6274 BREAK_label30
: (void)0;
6276 { /* Inline abstract_collection#Iterator#finish (var_8) on <var_8:Iterator[MClassType]> */
6277 RET_LABEL31
:(void)0;
6280 var32
= NEW_nit__BucketsColorer(&type_nit__BucketsColorer__nit__MType__nit__MType
);
6282 { /* Inline kernel#Object#init (var32) on <var32:BucketsColorer[MType, MType]> */
6283 RET_LABEL33
:(void)0;
6286 var_colorer
= var32
;
6288 var34
= nit___nit__BucketsColorer___colorize(var_colorer
, var_mtype2unresolved
);
6291 { /* Inline separate_compiler#SeparateCompiler#opentype_colors= (self,var34) on <self:SeparateCompiler> */
6292 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___opentype_colors
].val
= var34
; /* _opentype_colors on <self:SeparateCompiler> */
6293 RET_LABEL35
:(void)0;
6297 var36
= nit___nit__SeparateCompiler___build_resolution_tables(self
, var_mtype2unresolved
);
6300 { /* Inline separate_compiler#SeparateCompiler#resolution_tables= (self,var36) on <self:SeparateCompiler> */
6301 self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___resolution_tables
].val
= var36
; /* _resolution_tables on <self:SeparateCompiler> */
6302 RET_LABEL37
:(void)0;
6305 var38
= NEW_standard__HashSet(&type_standard__HashSet__nit__MType
);
6307 standard___standard__HashSet___standard__kernel__Object__init(var38
); /* Direct call hash_collection#HashSet#init on <var38:HashSet[MType]>*/
6309 var_all_unresolved
= var38
;
6311 { /* Inline separate_compiler#SeparateCompiler#live_unresolved_types (self) on <self:SeparateCompiler> */
6312 var41
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___live_unresolved_types
].val
; /* _live_unresolved_types on <self:SeparateCompiler> */
6313 if (unlikely(var41
== NULL
)) {
6314 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_unresolved_types");
6315 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 122);
6319 RET_LABEL40
:(void)0;
6323 var42
= ((val
* (*)(val
* self
))(var39
->class->vft
[COLOR_standard__abstract_collection__MapRead__values
]))(var39
) /* values on <var39:Map[MClassDef, Set[MType]]>*/;
6327 var44
= ((val
* (*)(val
* self
))(var_43
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_43
) /* iterator on <var_43:RemovableCollection[Set[MType]]>*/;
6332 var46
= ((short int (*)(val
* self
))(var_45
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_45
) /* is_ok on <var_45:Iterator[Set[MType]]>*/;
6336 var47
= ((val
* (*)(val
* self
))(var_45
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_45
) /* item on <var_45:Iterator[Set[MType]]>*/;
6340 standard___standard__SimpleCollection___add_all(var_all_unresolved
, var_t
); /* Direct call abstract_collection#SimpleCollection#add_all on <var_all_unresolved:HashSet[MType]>*/
6343 ((void (*)(val
* self
))(var_45
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_45
) /* next on <var_45:Iterator[Set[MType]]>*/;
6349 BREAK_label48
: (void)0;
6351 { /* Inline abstract_collection#Iterator#finish (var_45) on <var_45:Iterator[Set[MType]]> */
6352 RET_LABEL49
:(void)0;
6355 var50
= NEW_standard__HashMap(&type_standard__HashMap__nit__MType__standard__Int
);
6357 standard___standard__HashMap___standard__kernel__Object__init(var50
); /* Direct call hash_collection#HashMap#init on <var50:HashMap[MType, Int]>*/
6359 var_all_unresolved_types_colors
= var50
;
6360 var_51
= var_all_unresolved
;
6362 var52
= standard___standard__HashSet___standard__abstract_collection__Collection__iterator(var_51
);
6367 var54
= ((short int (*)(val
* self
))(var_53
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_53
) /* is_ok on <var_53:Iterator[MType]>*/;
6371 var55
= ((val
* (*)(val
* self
))(var_53
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_53
) /* item on <var_53:Iterator[MType]>*/;
6375 { /* Inline separate_compiler#SeparateCompiler#opentype_colors (self) on <self:SeparateCompiler> */
6376 var59
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___opentype_colors
].val
; /* _opentype_colors on <self:SeparateCompiler> */
6377 if (unlikely(var59
== NULL
)) {
6378 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opentype_colors");
6379 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 126);
6383 RET_LABEL58
:(void)0;
6387 var60
= standard___standard__MapRead___has_key(var57
, var_t56
);
6391 { /* Inline separate_compiler#SeparateCompiler#opentype_colors (self) on <self:SeparateCompiler> */
6392 var63
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___opentype_colors
].val
; /* _opentype_colors on <self:SeparateCompiler> */
6393 if (unlikely(var63
== NULL
)) {
6394 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opentype_colors");
6395 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 126);
6399 RET_LABEL62
:(void)0;
6403 var64
= ((val
* (*)(val
* self
, val
* p0
))(var61
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var61
, var_t56
) /* [] on <var61:Map[MType, Int]>*/;
6406 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var_all_unresolved_types_colors
, var_t56
, var64
); /* Direct call hash_collection#HashMap#[]= on <var_all_unresolved_types_colors:HashMap[MType, Int]>*/
6411 { /* Inline kernel#Int#unary - (var65) on <var65:Int> */
6415 RET_LABEL67
:(void)0;
6419 var69
= BOX_standard__Int(var66
); /* autobox from Int to nullable Object */
6420 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var_all_unresolved_types_colors
, var_t56
, var69
); /* Direct call hash_collection#HashMap#[]= on <var_all_unresolved_types_colors:HashMap[MType, Int]>*/
6424 ((void (*)(val
* self
))(var_53
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_53
) /* next on <var_53:Iterator[MType]>*/;
6430 BREAK_label70
: (void)0;
6432 { /* Inline abstract_collection#Iterator#finish (var_53) on <var_53:Iterator[MType]> */
6433 RET_LABEL71
:(void)0;
6437 nit___nit__SeparateCompiler___compile_color_consts(self
, var_all_unresolved_types_colors
); /* Direct call separate_compiler#SeparateCompiler#compile_color_consts on <self:SeparateCompiler>*/
6441 /* method separate_compiler#SeparateCompiler#build_resolution_tables for (self: SeparateCompiler, Map[MClassType, Set[MType]]): Map[MClassType, Array[nullable MType]] */
6442 val
* nit___nit__SeparateCompiler___build_resolution_tables(val
* self
, val
* p0
) {
6443 val
* var
/* : Map[MClassType, Array[nullable MType]] */;
6444 val
* var_elements
/* var elements: Map[MClassType, Set[MType]] */;
6445 val
* var1
/* : HashMap[MClassType, Array[nullable MType]] */;
6446 val
* var_tables
/* var tables: HashMap[MClassType, Array[nullable MType]] */;
6447 val
* var_
/* var : Map[MClassType, Set[MType]] */;
6448 val
* var2
/* : MapIterator[nullable Object, nullable Object] */;
6449 val
* var_3
/* var : MapIterator[MClassType, Set[MType]] */;
6450 short int var4
/* : Bool */;
6451 val
* var5
/* : nullable Object */;
6452 val
* var_mclasstype
/* var mclasstype: MClassType */;
6453 val
* var6
/* : nullable Object */;
6454 val
* var_mtypes
/* var mtypes: Set[MType] */;
6455 val
* var7
/* : Array[nullable MType] */;
6456 val
* var_table
/* var table: Array[nullable MType] */;
6457 val
* var_8
/* var : Set[MType] */;
6458 val
* var9
/* : Iterator[nullable Object] */;
6459 val
* var_10
/* var : Iterator[MType] */;
6460 short int var11
/* : Bool */;
6461 val
* var12
/* : nullable Object */;
6462 val
* var_mtype
/* var mtype: MType */;
6463 val
* var13
/* : Map[MType, Int] */;
6464 val
* var15
/* : Map[MType, Int] */;
6465 val
* var16
/* : nullable Object */;
6466 long var17
/* : Int */;
6467 long var_color
/* var color: Int */;
6468 long var18
/* : Int */;
6469 long var20
/* : Int */;
6470 short int var21
/* : Bool */;
6471 short int var23
/* : Bool */;
6474 const char* var_class_name
;
6475 short int var24
/* : Bool */;
6476 long var25
/* : Int */;
6477 long var27
/* : Int */;
6478 long var_i
/* var i: Int */;
6479 long var_28
/* var : Int */;
6480 short int var29
/* : Bool */;
6481 short int var31
/* : Bool */;
6484 const char* var_class_name34
;
6485 short int var35
/* : Bool */;
6486 val
* var36
/* : null */;
6487 long var37
/* : Int */;
6488 long var38
/* : Int */;
6490 var1
= NEW_standard__HashMap(&type_standard__HashMap__nit__MClassType__standard__Array__nullable__nit__MType
);
6492 standard___standard__HashMap___standard__kernel__Object__init(var1
); /* Direct call hash_collection#HashMap#init on <var1:HashMap[MClassType, Array[nullable MType]]>*/
6495 var_
= var_elements
;
6497 var2
= ((val
* (*)(val
* self
))(var_
->class->vft
[COLOR_standard__abstract_collection__MapRead__iterator
]))(var_
) /* iterator on <var_:Map[MClassType, Set[MType]]>*/;
6502 var4
= ((short int (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__MapIterator__is_ok
]))(var_3
) /* is_ok on <var_3:MapIterator[MClassType, Set[MType]]>*/;
6506 var5
= ((val
* (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__MapIterator__key
]))(var_3
) /* key on <var_3:MapIterator[MClassType, Set[MType]]>*/;
6508 var_mclasstype
= var5
;
6510 var6
= ((val
* (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__MapIterator__item
]))(var_3
) /* item on <var_3:MapIterator[MClassType, Set[MType]]>*/;
6513 var7
= NEW_standard__Array(&type_standard__Array__nullable__nit__MType
);
6515 standard___standard__Array___standard__kernel__Object__init(var7
); /* Direct call array#Array#init on <var7:Array[nullable MType]>*/
6520 var9
= ((val
* (*)(val
* self
))(var_8
->class->vft
[COLOR_standard__abstract_collection__Collection__iterator
]))(var_8
) /* iterator on <var_8:Set[MType]>*/;
6525 var11
= ((short int (*)(val
* self
))(var_10
->class->vft
[COLOR_standard__abstract_collection__Iterator__is_ok
]))(var_10
) /* is_ok on <var_10:Iterator[MType]>*/;
6529 var12
= ((val
* (*)(val
* self
))(var_10
->class->vft
[COLOR_standard__abstract_collection__Iterator__item
]))(var_10
) /* item on <var_10:Iterator[MType]>*/;
6533 { /* Inline separate_compiler#SeparateCompiler#opentype_colors (self) on <self:SeparateCompiler> */
6534 var15
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___opentype_colors
].val
; /* _opentype_colors on <self:SeparateCompiler> */
6535 if (unlikely(var15
== NULL
)) {
6536 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opentype_colors");
6537 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 126);
6541 RET_LABEL14
:(void)0;
6545 var16
= ((val
* (*)(val
* self
, val
* p0
))(var13
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var13
, var_mtype
) /* [] on <var13:Map[MType, Int]>*/;
6547 var17
= ((struct instance_standard__Int
*)var16
)->value
; /* autounbox from nullable Object to Int */;
6550 { /* Inline array#AbstractArrayRead#length (var_table) on <var_table:Array[nullable MType]> */
6551 var20
= var_table
->attrs
[COLOR_standard__array__AbstractArrayRead___length
].l
; /* _length on <var_table:Array[nullable MType]> */
6553 RET_LABEL19
:(void)0;
6557 { /* Inline kernel#Int#<= (var18,var_color) on <var18:Int> */
6558 /* Covariant cast for argument 0 (i) <var_color:Int> isa OTHER */
6559 /* <var_color:Int> isa OTHER */
6560 var23
= 1; /* easy <var_color:Int> isa OTHER*/
6561 if (unlikely(!var23
)) {
6562 var_class_name
= type_standard__Int
.name
;
6563 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
6564 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel
, 409);
6567 var24
= var18
<= var_color
;
6570 RET_LABEL22
:(void)0;
6575 { /* Inline array#AbstractArrayRead#length (var_table) on <var_table:Array[nullable MType]> */
6576 var27
= var_table
->attrs
[COLOR_standard__array__AbstractArrayRead___length
].l
; /* _length on <var_table:Array[nullable MType]> */
6578 RET_LABEL26
:(void)0;
6585 { /* Inline kernel#Int#< (var_i,var_28) on <var_i:Int> */
6586 /* Covariant cast for argument 0 (i) <var_28:Int> isa OTHER */
6587 /* <var_28:Int> isa OTHER */
6588 var31
= 1; /* easy <var_28:Int> isa OTHER*/
6589 if (unlikely(!var31
)) {
6590 var_class_name34
= type_standard__Int
.name
;
6591 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name34
);
6592 PRINT_ERROR(" (%s:%d)\n", FILE_standard__kernel
, 410);
6595 var35
= var_i
< var_28
;
6598 RET_LABEL30
:(void)0;
6604 standard___standard__Array___standard__abstract_collection__Sequence___91d_93d_61d(var_table
, var_i
, var36
); /* Direct call array#Array#[]= on <var_table:Array[nullable MType]>*/
6608 var38
= standard___standard__Int___Discrete__successor(var_i
, var37
);
6615 BREAK_label
: (void)0;
6619 standard___standard__Array___standard__abstract_collection__Sequence___91d_93d_61d(var_table
, var_color
, var_mtype
); /* Direct call array#Array#[]= on <var_table:Array[nullable MType]>*/
6622 ((void (*)(val
* self
))(var_10
->class->vft
[COLOR_standard__abstract_collection__Iterator__next
]))(var_10
) /* next on <var_10:Iterator[MType]>*/;
6628 BREAK_label39
: (void)0;
6630 { /* Inline abstract_collection#Iterator#finish (var_10) on <var_10:Iterator[MType]> */
6631 RET_LABEL40
:(void)0;
6635 standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var_tables
, var_mclasstype
, var_table
); /* Direct call hash_collection#HashMap#[]= on <var_tables:HashMap[MClassType, Array[nullable MType]]>*/
6638 ((void (*)(val
* self
))(var_3
->class->vft
[COLOR_standard__abstract_collection__MapIterator__next
]))(var_3
) /* next on <var_3:MapIterator[MClassType, Set[MType]]>*/;
6644 BREAK_label41
: (void)0;
6646 { /* Inline abstract_collection#MapIterator#finish (var_3) on <var_3:MapIterator[MClassType, Set[MType]]> */
6647 RET_LABEL42
:(void)0;
6655 /* method separate_compiler#SeparateCompiler#compile_module_to_c for (self: SeparateCompiler, MModule) */
6656 void nit___nit__SeparateCompiler___compile_module_to_c(val
* self
, val
* p0
) {
6657 val
* var_mmodule
/* var mmodule: MModule */;
6658 val
* var
/* : MModule */;
6659 val
* var2
/* : MModule */;
6660 val
* var_old_module
/* var old_module: MModule */;
6661 val
* var4
/* : Array[MClassDef] */;
6662 val
* var6
/* : Array[MClassDef] */;
6663 val
* var_
/* var : Array[MClassDef] */;
6664 val
* var7
/* : ArrayIterator[nullable Object] */;
6665 val
* var_8
/* var : ArrayIterator[MClassDef] */;
6666 short int var9
/* : Bool */;
6667 val
* var10
/* : nullable Object */;
6668 val
* var_cd
/* var cd: MClassDef */;
6669 val
* var11
/* : Array[MPropDef] */;
6670 val
* var13
/* : Array[MPropDef] */;
6671 val
* var_14
/* var : Array[MPropDef] */;
6672 val
* var15
/* : ArrayIterator[nullable Object] */;
6673 val
* var_16
/* var : ArrayIterator[MPropDef] */;
6674 short int var17
/* : Bool */;
6675 val
* var18
/* : nullable Object */;
6676 val
* var_pd
/* var pd: MPropDef */;
6677 short int var19
/* : Bool */;
6680 short int var20
/* : Bool */;
6681 val
* var21
/* : nullable RapidTypeAnalysis */;
6682 val
* var23
/* : nullable RapidTypeAnalysis */;
6683 val
* var_rta
/* var rta: nullable RapidTypeAnalysis */;
6684 short int var24
/* : Bool */;
6685 short int var25
/* : Bool */;
6686 val
* var26
/* : ModelBuilder */;
6687 val
* var28
/* : ModelBuilder */;
6688 val
* var29
/* : ToolContext */;
6689 val
* var31
/* : ToolContext */;
6690 val
* var32
/* : OptionBool */;
6691 val
* var34
/* : OptionBool */;
6692 val
* var35
/* : nullable Object */;
6693 val
* var37
/* : nullable Object */;
6694 short int var38
/* : Bool */;
6695 short int var_39
/* var : Bool */;
6696 val
* var40
/* : null */;
6697 short int var41
/* : Bool */;
6698 short int var42
/* : Bool */;
6699 val
* var_other
/* var other: nullable Object */;
6700 short int var44
/* : Bool */;
6701 short int var45
/* : Bool */;
6702 short int var_46
/* var : Bool */;
6703 val
* var47
/* : HashSet[MMethodDef] */;
6704 val
* var49
/* : HashSet[MMethodDef] */;
6705 short int var50
/* : Bool */;
6706 short int var51
/* : Bool */;
6707 val
* var52
/* : SeparateRuntimeFunction */;
6708 val
* var_r
/* var r: SeparateRuntimeFunction */;
6709 val
* var53
/* : SeparateRuntimeFunction */;
6710 val
* var_r2
/* var r2: SeparateRuntimeFunction */;
6711 short int var54
/* : Bool */;
6712 short int var56
/* : Bool */;
6713 short int var57
/* : Bool */;
6716 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
6717 var2
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
6718 if (unlikely(var2
== NULL
)) {
6719 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
6720 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
6727 var_old_module
= var
;
6729 { /* Inline abstract_compiler#AbstractCompiler#mainmodule= (self,var_mmodule) on <self:SeparateCompiler> */
6730 self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
= var_mmodule
; /* _mainmodule on <self:SeparateCompiler> */
6735 { /* Inline model#MModule#mclassdefs (var_mmodule) on <var_mmodule:MModule> */
6736 var6
= var_mmodule
->attrs
[COLOR_nit__model__MModule___mclassdefs
].val
; /* _mclassdefs on <var_mmodule:MModule> */
6737 if (unlikely(var6
== NULL
)) {
6738 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdefs");
6739 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 131);
6748 var7
= standard___standard__AbstractArrayRead___standard__abstract_collection__Collection__iterator(var_
);
6753 var9
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__is_ok(var_8
);
6757 var10
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__item(var_8
);
6761 { /* Inline model#MClassDef#mpropdefs (var_cd) on <var_cd:MClassDef> */
6762 var13
= var_cd
->attrs
[COLOR_nit__model__MClassDef___mpropdefs
].val
; /* _mpropdefs on <var_cd:MClassDef> */
6763 if (unlikely(var13
== NULL
)) {
6764 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mpropdefs");
6765 PRINT_ERROR(" (%s:%d)\n", FILE_nit__model
, 623);
6769 RET_LABEL12
:(void)0;
6774 var15
= standard___standard__AbstractArrayRead___standard__abstract_collection__Collection__iterator(var_14
);
6779 var17
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__is_ok(var_16
);
6783 var18
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__item(var_16
);
6786 /* <var_pd:MPropDef> isa MMethodDef */
6787 cltype
= type_nit__MMethodDef
.color
;
6788 idtype
= type_nit__MMethodDef
.id
;
6789 if(cltype
>= var_pd
->type
->table_size
) {
6792 var19
= var_pd
->type
->type_table
[cltype
] == idtype
;
6800 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
6801 var23
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
6803 RET_LABEL22
:(void)0;
6808 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
6809 var28
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
6810 if (unlikely(var28
== NULL
)) {
6811 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
6812 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 481);
6816 RET_LABEL27
:(void)0;
6820 { /* Inline modelbuilder_base#ModelBuilder#toolcontext (var26) on <var26:ModelBuilder> */
6821 var31
= var26
->attrs
[COLOR_nit__modelbuilder_base__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var26:ModelBuilder> */
6822 if (unlikely(var31
== NULL
)) {
6823 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
6824 PRINT_ERROR(" (%s:%d)\n", FILE_nit__modelbuilder_base
, 47);
6828 RET_LABEL30
:(void)0;
6832 { /* Inline separate_compiler#ToolContext#opt_skip_dead_methods (var29) on <var29:ToolContext> */
6833 var34
= var29
->attrs
[COLOR_nit__separate_compiler__ToolContext___opt_skip_dead_methods
].val
; /* _opt_skip_dead_methods on <var29:ToolContext> */
6834 if (unlikely(var34
== NULL
)) {
6835 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_skip_dead_methods");
6836 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 41);
6840 RET_LABEL33
:(void)0;
6844 { /* Inline opts#Option#value (var32) on <var32:OptionBool> */
6845 var37
= var32
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var32:OptionBool> */
6847 RET_LABEL36
:(void)0;
6850 var38
= ((struct instance_standard__Bool
*)var35
)->value
; /* autounbox from nullable Object to Bool */;
6854 if (var_rta
== NULL
) {
6855 var41
= 0; /* is null */
6857 var41
= 1; /* arg is null and recv is not */
6860 { /* Inline kernel#Object#!= (var_rta,var40) on <var_rta:nullable RapidTypeAnalysis> */
6863 var44
= ((short int (*)(val
* self
, val
* p0
))(var_rta
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_rta
, var_other
) /* == on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)>*/;
6868 RET_LABEL43
:(void)0;
6879 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_methoddefs (var_rta) on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)> */
6880 var49
= var_rta
->attrs
[COLOR_nit__rapid_type_analysis__RapidTypeAnalysis___live_methoddefs
].val
; /* _live_methoddefs on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)> */
6881 if (unlikely(var49
== NULL
)) {
6882 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_methoddefs");
6883 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 72);
6887 RET_LABEL48
:(void)0;
6891 var50
= standard___standard__HashSet___standard__abstract_collection__Collection__has(var47
, var_pd
);
6903 var52
= nit__separate_compiler___MMethodDef___separate_runtime_function(var_pd
);
6907 nit___nit__SeparateRuntimeFunction___nit__abstract_compiler__AbstractRuntimeFunction__compile_to_c(var_r
, self
); /* Direct call separate_compiler#SeparateRuntimeFunction#compile_to_c on <var_r:SeparateRuntimeFunction>*/
6910 var53
= nit__separate_compiler___MMethodDef___virtual_runtime_function(var_pd
);
6914 { /* Inline kernel#Object#!= (var_r2,var_r) on <var_r2:SeparateRuntimeFunction> */
6917 var56
= ((short int (*)(val
* self
, val
* p0
))(var_r2
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_r2
, var_other
) /* == on <var_r2:SeparateRuntimeFunction>*/;
6922 RET_LABEL55
:(void)0;
6927 nit___nit__SeparateRuntimeFunction___nit__abstract_compiler__AbstractRuntimeFunction__compile_to_c(var_r2
, self
); /* Direct call separate_compiler#SeparateRuntimeFunction#compile_to_c on <var_r2:SeparateRuntimeFunction>*/
6931 BREAK_label
: (void)0;
6933 standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__next(var_16
); /* Direct call array#ArrayIterator#next on <var_16:ArrayIterator[MPropDef]>*/
6939 BREAK_label58
: (void)0;
6941 { /* Inline abstract_collection#Iterator#finish (var_16) on <var_16:ArrayIterator[MPropDef]> */
6942 RET_LABEL59
:(void)0;
6946 standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__next(var_8
); /* Direct call array#ArrayIterator#next on <var_8:ArrayIterator[MClassDef]>*/
6952 BREAK_label60
: (void)0;
6954 { /* Inline abstract_collection#Iterator#finish (var_8) on <var_8:ArrayIterator[MClassDef]> */
6955 RET_LABEL61
:(void)0;
6959 { /* Inline abstract_compiler#AbstractCompiler#mainmodule= (self,var_old_module) on <self:SeparateCompiler> */
6960 self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
= var_old_module
; /* _mainmodule on <self:SeparateCompiler> */
6961 RET_LABEL62
:(void)0;
6966 /* method separate_compiler#SeparateCompiler#compile_type_to_c for (self: SeparateCompiler, MType) */
6967 void nit___nit__SeparateCompiler___compile_type_to_c(val
* self
, val
* p0
) {
6968 val
* var_mtype
/* var mtype: MType */;
6969 short int var
/* : Bool */;
6970 short int var1
/* : Bool */;
6971 short int var2
/* : Bool */;
6972 short int var3
/* : Bool */;
6975 short int var_
/* var : Bool */;
6976 val
* var4
/* : nullable RapidTypeAnalysis */;
6977 val
* var6
/* : nullable RapidTypeAnalysis */;
6978 val
* var7
/* : HashSet[MClassType] */;
6979 val
* var9
/* : HashSet[MClassType] */;
6980 short int var10
/* : Bool */;
6981 short int var_is_live
/* var is_live: Bool */;
6982 val
* var11
/* : nullable RapidTypeAnalysis */;
6983 val
* var13
/* : nullable RapidTypeAnalysis */;
6984 val
* var14
/* : HashSet[MType] */;
6985 val
* var16
/* : HashSet[MType] */;
6986 short int var17
/* : Bool */;
6987 short int var_is_cast_live
/* var is_cast_live: Bool */;
6988 val
* var18
/* : String */;
6989 val
* var_c_name
/* var c_name: String */;
6990 val
* var19
/* : SeparateCompilerVisitor */;
6991 val
* var_v
/* var v: SeparateCompilerVisitor */;
6992 static val
* varonce
;
6993 val
* var20
/* : String */;
6994 char* var21
/* : NativeString */;
6995 long var22
/* : Int */;
6996 val
* var23
/* : FlatString */;
6997 static val
* varonce24
;
6998 val
* var25
/* : String */;
6999 char* var26
/* : NativeString */;
7000 long var27
/* : Int */;
7001 val
* var28
/* : FlatString */;
7002 val
* var29
/* : Array[Object] */;
7003 long var30
/* : Int */;
7004 val
* var31
/* : NativeArray[Object] */;
7005 val
* var32
/* : String */;
7006 static val
* varonce33
;
7007 val
* var34
/* : String */;
7008 char* var35
/* : NativeString */;
7009 long var36
/* : Int */;
7010 val
* var37
/* : FlatString */;
7011 val
* var38
/* : Array[Object] */;
7012 long var39
/* : Int */;
7013 val
* var40
/* : NativeArray[Object] */;
7014 val
* var41
/* : String */;
7015 static val
* varonce42
;
7016 val
* var43
/* : String */;
7017 char* var44
/* : NativeString */;
7018 long var45
/* : Int */;
7019 val
* var46
/* : FlatString */;
7020 static val
* varonce47
;
7021 val
* var48
/* : String */;
7022 char* var49
/* : NativeString */;
7023 long var50
/* : Int */;
7024 val
* var51
/* : FlatString */;
7025 val
* var52
/* : Array[Object] */;
7026 long var53
/* : Int */;
7027 val
* var54
/* : NativeArray[Object] */;
7028 val
* var55
/* : String */;
7029 static val
* varonce56
;
7030 val
* var57
/* : String */;
7031 char* var58
/* : NativeString */;
7032 long var59
/* : Int */;
7033 val
* var60
/* : FlatString */;
7034 static val
* varonce61
;
7035 val
* var62
/* : String */;
7036 char* var63
/* : NativeString */;
7037 long var64
/* : Int */;
7038 val
* var65
/* : FlatString */;
7039 val
* var66
/* : Array[Object] */;
7040 long var67
/* : Int */;
7041 val
* var68
/* : NativeArray[Object] */;
7042 val
* var69
/* : String */;
7043 val
* var70
/* : Map[MType, Int] */;
7044 val
* var72
/* : Map[MType, Int] */;
7045 val
* var73
/* : nullable Object */;
7046 static val
* varonce74
;
7047 val
* var75
/* : String */;
7048 char* var76
/* : NativeString */;
7049 long var77
/* : Int */;
7050 val
* var78
/* : FlatString */;
7051 val
* var79
/* : Array[Object] */;
7052 long var80
/* : Int */;
7053 val
* var81
/* : NativeArray[Object] */;
7054 val
* var82
/* : String */;
7055 static val
* varonce83
;
7056 val
* var84
/* : String */;
7057 char* var85
/* : NativeString */;
7058 long var86
/* : Int */;
7059 val
* var87
/* : FlatString */;
7060 static val
* varonce88
;
7061 val
* var89
/* : String */;
7062 char* var90
/* : NativeString */;
7063 long var91
/* : Int */;
7064 val
* var92
/* : FlatString */;
7065 static val
* varonce93
;
7066 val
* var94
/* : String */;
7067 char* var95
/* : NativeString */;
7068 long var96
/* : Int */;
7069 val
* var97
/* : FlatString */;
7070 val
* var98
/* : Array[Object] */;
7071 long var99
/* : Int */;
7072 val
* var100
/* : NativeArray[Object] */;
7073 val
* var101
/* : String */;
7074 val
* var102
/* : Map[MType, Int] */;
7075 val
* var104
/* : Map[MType, Int] */;
7076 val
* var105
/* : nullable Object */;
7077 static val
* varonce106
;
7078 val
* var107
/* : String */;
7079 char* var108
/* : NativeString */;
7080 long var109
/* : Int */;
7081 val
* var110
/* : FlatString */;
7082 val
* var111
/* : Array[Object] */;
7083 long var112
/* : Int */;
7084 val
* var113
/* : NativeArray[Object] */;
7085 val
* var114
/* : String */;
7086 static val
* varonce115
;
7087 val
* var116
/* : String */;
7088 char* var117
/* : NativeString */;
7089 long var118
/* : Int */;
7090 val
* var119
/* : FlatString */;
7091 short int var120
/* : Bool */;
7094 static val
* varonce123
;
7095 val
* var124
/* : String */;
7096 char* var125
/* : NativeString */;
7097 long var126
/* : Int */;
7098 val
* var127
/* : FlatString */;
7099 static val
* varonce128
;
7100 val
* var129
/* : String */;
7101 char* var130
/* : NativeString */;
7102 long var131
/* : Int */;
7103 val
* var132
/* : FlatString */;
7104 val
* var133
/* : MType */;
7105 val
* var_mclass_type
/* var mclass_type: MType */;
7106 short int var134
/* : Bool */;
7109 val
* var137
/* : Map[MClassType, Array[nullable MType]] */;
7110 val
* var139
/* : Map[MClassType, Array[nullable MType]] */;
7111 val
* var140
/* : nullable Object */;
7112 short int var141
/* : Bool */;
7113 static val
* varonce142
;
7114 val
* var143
/* : String */;
7115 char* var144
/* : NativeString */;
7116 long var145
/* : Int */;
7117 val
* var146
/* : FlatString */;
7118 static val
* varonce147
;
7119 val
* var148
/* : String */;
7120 char* var149
/* : NativeString */;
7121 long var150
/* : Int */;
7122 val
* var151
/* : FlatString */;
7123 val
* var152
/* : Array[Object] */;
7124 long var153
/* : Int */;
7125 val
* var154
/* : NativeArray[Object] */;
7126 val
* var155
/* : String */;
7127 static val
* varonce156
;
7128 val
* var157
/* : String */;
7129 char* var158
/* : NativeString */;
7130 long var159
/* : Int */;
7131 val
* var160
/* : FlatString */;
7132 static val
* varonce161
;
7133 val
* var162
/* : String */;
7134 char* var163
/* : NativeString */;
7135 long var164
/* : Int */;
7136 val
* var165
/* : FlatString */;
7137 val
* var166
/* : Array[Object] */;
7138 long var167
/* : Int */;
7139 val
* var168
/* : NativeArray[Object] */;
7140 val
* var169
/* : String */;
7141 static val
* varonce170
;
7142 val
* var171
/* : String */;
7143 char* var172
/* : NativeString */;
7144 long var173
/* : Int */;
7145 val
* var174
/* : FlatString */;
7146 val
* var175
/* : Map[MType, Array[nullable MType]] */;
7147 val
* var177
/* : Map[MType, Array[nullable MType]] */;
7148 val
* var178
/* : nullable Object */;
7149 long var179
/* : Int */;
7150 long var181
/* : Int */;
7151 static val
* varonce182
;
7152 val
* var183
/* : String */;
7153 char* var184
/* : NativeString */;
7154 long var185
/* : Int */;
7155 val
* var186
/* : FlatString */;
7156 val
* var187
/* : Array[Object] */;
7157 long var188
/* : Int */;
7158 val
* var189
/* : NativeArray[Object] */;
7159 val
* var190
/* : Object */;
7160 val
* var191
/* : String */;
7161 static val
* varonce192
;
7162 val
* var193
/* : String */;
7163 char* var194
/* : NativeString */;
7164 long var195
/* : Int */;
7165 val
* var196
/* : FlatString */;
7166 val
* var197
/* : Map[MType, Array[nullable MType]] */;
7167 val
* var199
/* : Map[MType, Array[nullable MType]] */;
7168 val
* var200
/* : nullable Object */;
7169 val
* var_201
/* var : Array[nullable MType] */;
7170 val
* var202
/* : ArrayIterator[nullable Object] */;
7171 val
* var_203
/* var : ArrayIterator[nullable MType] */;
7172 short int var204
/* : Bool */;
7173 val
* var205
/* : nullable Object */;
7174 val
* var_stype
/* var stype: nullable MType */;
7175 val
* var206
/* : null */;
7176 short int var207
/* : Bool */;
7177 short int var208
/* : Bool */;
7178 val
* var_other
/* var other: nullable Object */;
7179 short int var210
/* : Bool */;
7180 short int var212
/* : Bool */;
7181 static val
* varonce213
;
7182 val
* var214
/* : String */;
7183 char* var215
/* : NativeString */;
7184 long var216
/* : Int */;
7185 val
* var217
/* : FlatString */;
7186 val
* var218
/* : Map[MType, Int] */;
7187 val
* var220
/* : Map[MType, Int] */;
7188 val
* var221
/* : nullable Object */;
7189 static val
* varonce222
;
7190 val
* var223
/* : String */;
7191 char* var224
/* : NativeString */;
7192 long var225
/* : Int */;
7193 val
* var226
/* : FlatString */;
7194 static val
* varonce227
;
7195 val
* var228
/* : String */;
7196 char* var229
/* : NativeString */;
7197 long var230
/* : Int */;
7198 val
* var231
/* : FlatString */;
7199 val
* var232
/* : Array[Object] */;
7200 long var233
/* : Int */;
7201 val
* var234
/* : NativeArray[Object] */;
7202 val
* var235
/* : String */;
7203 static val
* varonce237
;
7204 val
* var238
/* : String */;
7205 char* var239
/* : NativeString */;
7206 long var240
/* : Int */;
7207 val
* var241
/* : FlatString */;
7208 static val
* varonce242
;
7209 val
* var243
/* : String */;
7210 char* var244
/* : NativeString */;
7211 long var245
/* : Int */;
7212 val
* var246
/* : FlatString */;
7213 static val
* varonce247
;
7214 val
* var248
/* : String */;
7215 char* var249
/* : NativeString */;
7216 long var250
/* : Int */;
7217 val
* var251
/* : FlatString */;
7220 var
= ((short int (*)(val
* self
))(var_mtype
->class->vft
[COLOR_nit__model__MType__need_anchor
]))(var_mtype
) /* need_anchor on <var_mtype:MType>*/;
7223 if (unlikely(!var1
)) {
7224 PRINT_ERROR("Runtime error: %s", "Assert failed");
7225 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 572);
7228 /* <var_mtype:MType> isa MClassType */
7229 cltype
= type_nit__MClassType
.color
;
7230 idtype
= type_nit__MClassType
.id
;
7231 if(cltype
>= var_mtype
->type
->table_size
) {
7234 var3
= var_mtype
->type
->type_table
[cltype
] == idtype
;
7239 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
7240 var6
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
7246 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7247 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 573);
7250 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_types (var4) on <var4:nullable RapidTypeAnalysis> */
7251 if (unlikely(var4
== NULL
)) {
7252 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7253 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 53);
7256 var9
= var4
->attrs
[COLOR_nit__rapid_type_analysis__RapidTypeAnalysis___live_types
].val
; /* _live_types on <var4:nullable RapidTypeAnalysis> */
7257 if (unlikely(var9
== NULL
)) {
7258 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_types");
7259 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 53);
7267 var10
= standard___standard__HashSet___standard__abstract_collection__Collection__has(var7
, var_mtype
);
7275 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
7276 var13
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
7278 RET_LABEL12
:(void)0;
7281 if (var11
== NULL
) {
7282 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7283 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 574);
7286 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_cast_types (var11) on <var11:nullable RapidTypeAnalysis> */
7287 if (unlikely(var11
== NULL
)) {
7288 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7289 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 65);
7292 var16
= var11
->attrs
[COLOR_nit__rapid_type_analysis__RapidTypeAnalysis___live_cast_types
].val
; /* _live_cast_types on <var11:nullable RapidTypeAnalysis> */
7293 if (unlikely(var16
== NULL
)) {
7294 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_cast_types");
7295 PRINT_ERROR(" (%s:%d)\n", FILE_nit__rapid_type_analysis
, 65);
7299 RET_LABEL15
:(void)0;
7303 var17
= standard___standard__HashSet___standard__abstract_collection__Collection__has(var14
, var_mtype
);
7305 var_is_cast_live
= var17
;
7307 var18
= ((val
* (*)(val
* self
))(var_mtype
->class->vft
[COLOR_nit__model_base__MEntity__c_name
]))(var_mtype
) /* c_name on <var_mtype:MType>*/;
7310 var19
= NEW_nit__SeparateCompilerVisitor(&type_nit__SeparateCompilerVisitor
);
7312 ((void (*)(val
* self
, val
* p0
))(var19
->class->vft
[COLOR_nit__abstract_compiler__AbstractCompilerVisitor__compiler_61d
]))(var19
, self
) /* compiler= on <var19:SeparateCompilerVisitor>*/;
7315 ((void (*)(val
* self
))(var19
->class->vft
[COLOR_standard__kernel__Object__init
]))(var19
) /* init on <var19:SeparateCompilerVisitor>*/;
7321 var21
= "/* runtime type ";
7323 var23
= standard___standard__NativeString___to_s_with_length(var21
, var22
);
7332 var28
= standard___standard__NativeString___to_s_with_length(var26
, var27
);
7336 var29
= NEW_standard__Array(&type_standard__Array__standard__Object
);
7337 { /* var29 = array_instance Array[Object] */
7339 var31
= NEW_standard__NativeArray(var30
, &type_standard__NativeArray__standard__Object
);
7340 ((struct instance_standard__NativeArray
*)var31
)->values
[0] = (val
*) var20
;
7341 ((struct instance_standard__NativeArray
*)var31
)->values
[1] = (val
*) var_mtype
;
7342 ((struct instance_standard__NativeArray
*)var31
)->values
[2] = (val
*) var25
;
7344 ((void (*)(val
* self
, val
* p0
, long p1
))(var29
->class->vft
[COLOR_standard__array__Array__with_native
]))(var29
, var31
, var30
) /* with_native on <var29:Array[Object]>*/;
7348 var32
= ((val
* (*)(val
* self
))(var29
->class->vft
[COLOR_standard__string__Object__to_s
]))(var29
) /* to_s on <var29:Array[Object]>*/;
7351 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var32
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7358 var37
= standard___standard__NativeString___to_s_with_length(var35
, var36
);
7362 var38
= NEW_standard__Array(&type_standard__Array__standard__Object
);
7363 { /* var38 = array_instance Array[Object] */
7365 var40
= NEW_standard__NativeArray(var39
, &type_standard__NativeArray__standard__Object
);
7366 ((struct instance_standard__NativeArray
*)var40
)->values
[0] = (val
*) var34
;
7367 ((struct instance_standard__NativeArray
*)var40
)->values
[1] = (val
*) var_c_name
;
7369 ((void (*)(val
* self
, val
* p0
, long p1
))(var38
->class->vft
[COLOR_standard__array__Array__with_native
]))(var38
, var40
, var39
) /* with_native on <var38:Array[Object]>*/;
7373 var41
= ((val
* (*)(val
* self
))(var38
->class->vft
[COLOR_standard__string__Object__to_s
]))(var38
) /* to_s on <var38:Array[Object]>*/;
7378 var44
= "extern const struct type type_";
7380 var46
= standard___standard__NativeString___to_s_with_length(var44
, var45
);
7389 var51
= standard___standard__NativeString___to_s_with_length(var49
, var50
);
7393 var52
= NEW_standard__Array(&type_standard__Array__standard__Object
);
7394 { /* var52 = array_instance Array[Object] */
7396 var54
= NEW_standard__NativeArray(var53
, &type_standard__NativeArray__standard__Object
);
7397 ((struct instance_standard__NativeArray
*)var54
)->values
[0] = (val
*) var43
;
7398 ((struct instance_standard__NativeArray
*)var54
)->values
[1] = (val
*) var_c_name
;
7399 ((struct instance_standard__NativeArray
*)var54
)->values
[2] = (val
*) var48
;
7401 ((void (*)(val
* self
, val
* p0
, long p1
))(var52
->class->vft
[COLOR_standard__array__Array__with_native
]))(var52
, var54
, var53
) /* with_native on <var52:Array[Object]>*/;
7405 var55
= ((val
* (*)(val
* self
))(var52
->class->vft
[COLOR_standard__string__Object__to_s
]))(var52
) /* to_s on <var52:Array[Object]>*/;
7408 nit___nit__AbstractCompiler___provide_declaration(self
, var41
, var55
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
7413 var58
= "const struct type type_";
7415 var60
= standard___standard__NativeString___to_s_with_length(var58
, var59
);
7424 var65
= standard___standard__NativeString___to_s_with_length(var63
, var64
);
7428 var66
= NEW_standard__Array(&type_standard__Array__standard__Object
);
7429 { /* var66 = array_instance Array[Object] */
7431 var68
= NEW_standard__NativeArray(var67
, &type_standard__NativeArray__standard__Object
);
7432 ((struct instance_standard__NativeArray
*)var68
)->values
[0] = (val
*) var57
;
7433 ((struct instance_standard__NativeArray
*)var68
)->values
[1] = (val
*) var_c_name
;
7434 ((struct instance_standard__NativeArray
*)var68
)->values
[2] = (val
*) var62
;
7436 ((void (*)(val
* self
, val
* p0
, long p1
))(var66
->class->vft
[COLOR_standard__array__Array__with_native
]))(var66
, var68
, var67
) /* with_native on <var66:Array[Object]>*/;
7440 var69
= ((val
* (*)(val
* self
))(var66
->class->vft
[COLOR_standard__string__Object__to_s
]))(var66
) /* to_s on <var66:Array[Object]>*/;
7443 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var69
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7445 if (var_is_cast_live
){
7447 { /* Inline separate_compiler#SeparateCompiler#type_ids (self) on <self:SeparateCompiler> */
7448 var72
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_ids
].val
; /* _type_ids on <self:SeparateCompiler> */
7449 if (unlikely(var72
== NULL
)) {
7450 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_ids");
7451 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 124);
7455 RET_LABEL71
:(void)0;
7459 var73
= ((val
* (*)(val
* self
, val
* p0
))(var70
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var70
, var_mtype
) /* [] on <var70:Map[MType, Int]>*/;
7466 var78
= standard___standard__NativeString___to_s_with_length(var76
, var77
);
7470 var79
= NEW_standard__Array(&type_standard__Array__standard__Object
);
7471 { /* var79 = array_instance Array[Object] */
7473 var81
= NEW_standard__NativeArray(var80
, &type_standard__NativeArray__standard__Object
);
7474 ((struct instance_standard__NativeArray
*)var81
)->values
[0] = (val
*) var73
;
7475 ((struct instance_standard__NativeArray
*)var81
)->values
[1] = (val
*) var75
;
7477 ((void (*)(val
* self
, val
* p0
, long p1
))(var79
->class->vft
[COLOR_standard__array__Array__with_native
]))(var79
, var81
, var80
) /* with_native on <var79:Array[Object]>*/;
7481 var82
= ((val
* (*)(val
* self
))(var79
->class->vft
[COLOR_standard__string__Object__to_s
]))(var79
) /* to_s on <var79:Array[Object]>*/;
7484 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var82
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7490 var85
= "-1, /*CAST DEAD*/";
7492 var87
= standard___standard__NativeString___to_s_with_length(var85
, var86
);
7497 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var84
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7505 var92
= standard___standard__NativeString___to_s_with_length(var90
, var91
);
7512 var95
= "\", /* class_name_string */";
7514 var97
= standard___standard__NativeString___to_s_with_length(var95
, var96
);
7518 var98
= NEW_standard__Array(&type_standard__Array__standard__Object
);
7519 { /* var98 = array_instance Array[Object] */
7521 var100
= NEW_standard__NativeArray(var99
, &type_standard__NativeArray__standard__Object
);
7522 ((struct instance_standard__NativeArray
*)var100
)->values
[0] = (val
*) var89
;
7523 ((struct instance_standard__NativeArray
*)var100
)->values
[1] = (val
*) var_mtype
;
7524 ((struct instance_standard__NativeArray
*)var100
)->values
[2] = (val
*) var94
;
7526 ((void (*)(val
* self
, val
* p0
, long p1
))(var98
->class->vft
[COLOR_standard__array__Array__with_native
]))(var98
, var100
, var99
) /* with_native on <var98:Array[Object]>*/;
7530 var101
= ((val
* (*)(val
* self
))(var98
->class->vft
[COLOR_standard__string__Object__to_s
]))(var98
) /* to_s on <var98:Array[Object]>*/;
7533 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var101
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7535 if (var_is_cast_live
){
7537 { /* Inline separate_compiler#SeparateCompiler#type_colors (self) on <self:SeparateCompiler> */
7538 var104
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_colors
].val
; /* _type_colors on <self:SeparateCompiler> */
7539 if (unlikely(var104
== NULL
)) {
7540 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_colors");
7541 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 125);
7545 RET_LABEL103
:(void)0;
7549 var105
= ((val
* (*)(val
* self
, val
* p0
))(var102
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var102
, var_mtype
) /* [] on <var102:Map[MType, Int]>*/;
7552 var107
= varonce106
;
7556 var110
= standard___standard__NativeString___to_s_with_length(var108
, var109
);
7558 varonce106
= var107
;
7560 var111
= NEW_standard__Array(&type_standard__Array__standard__Object
);
7561 { /* var111 = array_instance Array[Object] */
7563 var113
= NEW_standard__NativeArray(var112
, &type_standard__NativeArray__standard__Object
);
7564 ((struct instance_standard__NativeArray
*)var113
)->values
[0] = (val
*) var105
;
7565 ((struct instance_standard__NativeArray
*)var113
)->values
[1] = (val
*) var107
;
7567 ((void (*)(val
* self
, val
* p0
, long p1
))(var111
->class->vft
[COLOR_standard__array__Array__with_native
]))(var111
, var113
, var112
) /* with_native on <var111:Array[Object]>*/;
7571 var114
= ((val
* (*)(val
* self
))(var111
->class->vft
[COLOR_standard__string__Object__to_s
]))(var111
) /* to_s on <var111:Array[Object]>*/;
7574 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var114
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7578 var116
= varonce115
;
7580 var117
= "-1, /*CAST DEAD*/";
7582 var119
= standard___standard__NativeString___to_s_with_length(var117
, var118
);
7584 varonce115
= var116
;
7587 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var116
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7590 /* <var_mtype:MType> isa MNullableType */
7591 cltype121
= type_nit__MNullableType
.color
;
7592 idtype122
= type_nit__MNullableType
.id
;
7593 if(cltype121
>= var_mtype
->type
->table_size
) {
7596 var120
= var_mtype
->type
->type_table
[cltype121
] == idtype122
;
7600 var124
= varonce123
;
7604 var127
= standard___standard__NativeString___to_s_with_length(var125
, var126
);
7606 varonce123
= var124
;
7609 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var124
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7613 var129
= varonce128
;
7617 var132
= standard___standard__NativeString___to_s_with_length(var130
, var131
);
7619 varonce128
= var129
;
7622 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var129
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7627 var133
= ((val
* (*)(val
* self
))(var_mtype
->class->vft
[COLOR_nit__model__MType__as_notnullable
]))(var_mtype
) /* as_notnullable on <var_mtype:MType>*/;
7629 var_mclass_type
= var133
;
7630 /* <var_mclass_type:MType> isa MClassType */
7631 cltype135
= type_nit__MClassType
.color
;
7632 idtype136
= type_nit__MClassType
.id
;
7633 if(cltype135
>= var_mclass_type
->type
->table_size
) {
7636 var134
= var_mclass_type
->type
->type_table
[cltype135
] == idtype136
;
7638 if (unlikely(!var134
)) {
7639 PRINT_ERROR("Runtime error: %s", "Assert failed");
7640 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 612);
7644 { /* Inline separate_compiler#SeparateCompiler#resolution_tables (self) on <self:SeparateCompiler> */
7645 var139
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___resolution_tables
].val
; /* _resolution_tables on <self:SeparateCompiler> */
7646 if (unlikely(var139
== NULL
)) {
7647 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _resolution_tables");
7648 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 855);
7652 RET_LABEL138
:(void)0;
7656 var140
= ((val
* (*)(val
* self
, val
* p0
))(var137
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var137
, var_mclass_type
) /* [] on <var137:Map[MClassType, Array[nullable MType]]>*/;
7659 var141
= standard___standard__AbstractArrayRead___standard__abstract_collection__Collection__is_empty(var140
);
7663 var143
= varonce142
;
7665 var144
= "NULL, /*NO RESOLUTIONS*/";
7667 var146
= standard___standard__NativeString___to_s_with_length(var144
, var145
);
7669 varonce142
= var143
;
7672 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var143
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7676 nit___nit__SeparateCompiler___compile_type_resolution_table(self
, var_mtype
); /* Direct call separate_compiler#SeparateCompiler#compile_type_resolution_table on <self:SeparateCompiler>*/
7679 var148
= varonce147
;
7681 var149
= "resolution_table_";
7683 var151
= standard___standard__NativeString___to_s_with_length(var149
, var150
);
7685 varonce147
= var148
;
7687 var152
= NEW_standard__Array(&type_standard__Array__standard__Object
);
7688 { /* var152 = array_instance Array[Object] */
7690 var154
= NEW_standard__NativeArray(var153
, &type_standard__NativeArray__standard__Object
);
7691 ((struct instance_standard__NativeArray
*)var154
)->values
[0] = (val
*) var148
;
7692 ((struct instance_standard__NativeArray
*)var154
)->values
[1] = (val
*) var_c_name
;
7694 ((void (*)(val
* self
, val
* p0
, long p1
))(var152
->class->vft
[COLOR_standard__array__Array__with_native
]))(var152
, var154
, var153
) /* with_native on <var152:Array[Object]>*/;
7698 var155
= ((val
* (*)(val
* self
))(var152
->class->vft
[COLOR_standard__string__Object__to_s
]))(var152
) /* to_s on <var152:Array[Object]>*/;
7701 nit___nit__AbstractCompilerVisitor___require_declaration(var_v
, var155
); /* Direct call abstract_compiler#AbstractCompilerVisitor#require_declaration on <var_v:SeparateCompilerVisitor>*/
7704 var157
= varonce156
;
7706 var158
= "&resolution_table_";
7708 var160
= standard___standard__NativeString___to_s_with_length(var158
, var159
);
7710 varonce156
= var157
;
7713 var162
= varonce161
;
7717 var165
= standard___standard__NativeString___to_s_with_length(var163
, var164
);
7719 varonce161
= var162
;
7721 var166
= NEW_standard__Array(&type_standard__Array__standard__Object
);
7722 { /* var166 = array_instance Array[Object] */
7724 var168
= NEW_standard__NativeArray(var167
, &type_standard__NativeArray__standard__Object
);
7725 ((struct instance_standard__NativeArray
*)var168
)->values
[0] = (val
*) var157
;
7726 ((struct instance_standard__NativeArray
*)var168
)->values
[1] = (val
*) var_c_name
;
7727 ((struct instance_standard__NativeArray
*)var168
)->values
[2] = (val
*) var162
;
7729 ((void (*)(val
* self
, val
* p0
, long p1
))(var166
->class->vft
[COLOR_standard__array__Array__with_native
]))(var166
, var168
, var167
) /* with_native on <var166:Array[Object]>*/;
7733 var169
= ((val
* (*)(val
* self
))(var166
->class->vft
[COLOR_standard__string__Object__to_s
]))(var166
) /* to_s on <var166:Array[Object]>*/;
7736 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var169
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7741 var171
= varonce170
;
7743 var172
= "NULL, /*DEAD*/";
7745 var174
= standard___standard__NativeString___to_s_with_length(var172
, var173
);
7747 varonce170
= var171
;
7750 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var171
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7755 { /* Inline separate_compiler#SeparateCompiler#type_tables (self) on <self:SeparateCompiler> */
7756 var177
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_tables
].val
; /* _type_tables on <self:SeparateCompiler> */
7757 if (unlikely(var177
== NULL
)) {
7758 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_tables");
7759 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 854);
7763 RET_LABEL176
:(void)0;
7767 var178
= ((val
* (*)(val
* self
, val
* p0
))(var175
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var175
, var_mtype
) /* [] on <var175:Map[MType, Array[nullable MType]]>*/;
7770 { /* Inline array#AbstractArrayRead#length (var178) on <var178:nullable Object(Array[nullable MType])> */
7771 var181
= var178
->attrs
[COLOR_standard__array__AbstractArrayRead___length
].l
; /* _length on <var178:nullable Object(Array[nullable MType])> */
7773 RET_LABEL180
:(void)0;
7777 var183
= varonce182
;
7781 var186
= standard___standard__NativeString___to_s_with_length(var184
, var185
);
7783 varonce182
= var183
;
7785 var187
= NEW_standard__Array(&type_standard__Array__standard__Object
);
7786 { /* var187 = array_instance Array[Object] */
7788 var189
= NEW_standard__NativeArray(var188
, &type_standard__NativeArray__standard__Object
);
7789 var190
= BOX_standard__Int(var179
); /* autobox from Int to Object */
7790 ((struct instance_standard__NativeArray
*)var189
)->values
[0] = (val
*) var190
;
7791 ((struct instance_standard__NativeArray
*)var189
)->values
[1] = (val
*) var183
;
7793 ((void (*)(val
* self
, val
* p0
, long p1
))(var187
->class->vft
[COLOR_standard__array__Array__with_native
]))(var187
, var189
, var188
) /* with_native on <var187:Array[Object]>*/;
7797 var191
= ((val
* (*)(val
* self
))(var187
->class->vft
[COLOR_standard__string__Object__to_s
]))(var187
) /* to_s on <var187:Array[Object]>*/;
7800 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var191
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7803 var193
= varonce192
;
7807 var196
= standard___standard__NativeString___to_s_with_length(var194
, var195
);
7809 varonce192
= var193
;
7812 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var193
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7815 { /* Inline separate_compiler#SeparateCompiler#type_tables (self) on <self:SeparateCompiler> */
7816 var199
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_tables
].val
; /* _type_tables on <self:SeparateCompiler> */
7817 if (unlikely(var199
== NULL
)) {
7818 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_tables");
7819 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 854);
7823 RET_LABEL198
:(void)0;
7827 var200
= ((val
* (*)(val
* self
, val
* p0
))(var197
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var197
, var_mtype
) /* [] on <var197:Map[MType, Array[nullable MType]]>*/;
7831 var202
= standard___standard__AbstractArrayRead___standard__abstract_collection__Collection__iterator(var_201
);
7836 var204
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__is_ok(var_203
);
7840 var205
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__item(var_203
);
7844 if (var_stype
== NULL
) {
7845 var207
= 1; /* is null */
7847 var207
= 0; /* arg is null but recv is not */
7850 { /* Inline kernel#Object#== (var_stype,var206) on <var_stype:nullable MType> */
7853 { /* Inline kernel#Object#is_same_instance (var_stype,var_other) on <var_stype:nullable MType(MType)> */
7854 var212
= var_stype
== var_other
;
7857 RET_LABEL211
:(void)0;
7862 RET_LABEL209
:(void)0;
7868 var214
= varonce213
;
7870 var215
= "-1, /* empty */";
7872 var217
= standard___standard__NativeString___to_s_with_length(var215
, var216
);
7874 varonce213
= var214
;
7877 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var214
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7881 { /* Inline separate_compiler#SeparateCompiler#type_ids (self) on <self:SeparateCompiler> */
7882 var220
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_ids
].val
; /* _type_ids on <self:SeparateCompiler> */
7883 if (unlikely(var220
== NULL
)) {
7884 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_ids");
7885 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 124);
7889 RET_LABEL219
:(void)0;
7893 var221
= ((val
* (*)(val
* self
, val
* p0
))(var218
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var218
, var_stype
) /* [] on <var218:Map[MType, Int]>*/;
7896 var223
= varonce222
;
7900 var226
= standard___standard__NativeString___to_s_with_length(var224
, var225
);
7902 varonce222
= var223
;
7905 var228
= varonce227
;
7909 var231
= standard___standard__NativeString___to_s_with_length(var229
, var230
);
7911 varonce227
= var228
;
7913 var232
= NEW_standard__Array(&type_standard__Array__standard__Object
);
7914 { /* var232 = array_instance Array[Object] */
7916 var234
= NEW_standard__NativeArray(var233
, &type_standard__NativeArray__standard__Object
);
7917 ((struct instance_standard__NativeArray
*)var234
)->values
[0] = (val
*) var221
;
7918 ((struct instance_standard__NativeArray
*)var234
)->values
[1] = (val
*) var223
;
7919 ((struct instance_standard__NativeArray
*)var234
)->values
[2] = (val
*) var_stype
;
7920 ((struct instance_standard__NativeArray
*)var234
)->values
[3] = (val
*) var228
;
7922 ((void (*)(val
* self
, val
* p0
, long p1
))(var232
->class->vft
[COLOR_standard__array__Array__with_native
]))(var232
, var234
, var233
) /* with_native on <var232:Array[Object]>*/;
7926 var235
= ((val
* (*)(val
* self
))(var232
->class->vft
[COLOR_standard__string__Object__to_s
]))(var232
) /* to_s on <var232:Array[Object]>*/;
7929 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var235
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7933 standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__next(var_203
); /* Direct call array#ArrayIterator#next on <var_203:ArrayIterator[nullable MType]>*/
7939 BREAK_label
: (void)0;
7941 { /* Inline abstract_collection#Iterator#finish (var_203) on <var_203:ArrayIterator[nullable MType]> */
7942 RET_LABEL236
:(void)0;
7946 var238
= varonce237
;
7950 var241
= standard___standard__NativeString___to_s_with_length(var239
, var240
);
7952 varonce237
= var238
;
7955 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var238
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7959 var243
= varonce242
;
7961 var244
= "0, {}, /*DEAD TYPE*/";
7963 var246
= standard___standard__NativeString___to_s_with_length(var244
, var245
);
7965 varonce242
= var243
;
7968 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var243
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7972 var248
= varonce247
;
7976 var251
= standard___standard__NativeString___to_s_with_length(var249
, var250
);
7978 varonce247
= var248
;
7981 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var248
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7985 /* method separate_compiler#SeparateCompiler#compile_type_resolution_table for (self: SeparateCompiler, MType) */
7986 void nit___nit__SeparateCompiler___compile_type_resolution_table(val
* self
, val
* p0
) {
7987 val
* var_mtype
/* var mtype: MType */;
7988 val
* var
/* : MType */;
7989 short int var1
/* : Bool */;
7992 const char* var_class_name
;
7993 val
* var_mclass_type
/* var mclass_type: MClassType */;
7994 static val
* varonce
;
7995 val
* var2
/* : String */;
7996 char* var3
/* : NativeString */;
7997 long var4
/* : Int */;
7998 val
* var5
/* : FlatString */;
7999 val
* var6
/* : String */;
8000 val
* var7
/* : Array[Object] */;
8001 long var8
/* : Int */;
8002 val
* var9
/* : NativeArray[Object] */;
8003 val
* var10
/* : String */;
8004 static val
* varonce11
;
8005 val
* var12
/* : String */;
8006 char* var13
/* : NativeString */;
8007 long var14
/* : Int */;
8008 val
* var15
/* : FlatString */;
8009 val
* var16
/* : String */;
8010 static val
* varonce17
;
8011 val
* var18
/* : String */;
8012 char* var19
/* : NativeString */;
8013 long var20
/* : Int */;
8014 val
* var21
/* : FlatString */;
8015 val
* var22
/* : Array[Object] */;
8016 long var23
/* : Int */;
8017 val
* var24
/* : NativeArray[Object] */;
8018 val
* var25
/* : String */;
8019 val
* var26
/* : AbstractCompilerVisitor */;
8020 val
* var_v
/* var v: SeparateCompilerVisitor */;
8021 static val
* varonce27
;
8022 val
* var28
/* : String */;
8023 char* var29
/* : NativeString */;
8024 long var30
/* : Int */;
8025 val
* var31
/* : FlatString */;
8026 val
* var32
/* : String */;
8027 static val
* varonce33
;
8028 val
* var34
/* : String */;
8029 char* var35
/* : NativeString */;
8030 long var36
/* : Int */;
8031 val
* var37
/* : FlatString */;
8032 val
* var38
/* : Array[Object] */;
8033 long var39
/* : Int */;
8034 val
* var40
/* : NativeArray[Object] */;
8035 val
* var41
/* : String */;
8036 static val
* varonce42
;
8037 val
* var43
/* : String */;
8038 char* var44
/* : NativeString */;
8039 long var45
/* : Int */;
8040 val
* var46
/* : FlatString */;
8041 static val
* varonce47
;
8042 val
* var48
/* : String */;
8043 char* var49
/* : NativeString */;
8044 long var50
/* : Int */;
8045 val
* var51
/* : FlatString */;
8046 val
* var52
/* : Map[MClassType, Array[nullable MType]] */;
8047 val
* var54
/* : Map[MClassType, Array[nullable MType]] */;
8048 val
* var55
/* : nullable Object */;
8049 val
* var_
/* var : Array[nullable MType] */;
8050 val
* var56
/* : ArrayIterator[nullable Object] */;
8051 val
* var_57
/* var : ArrayIterator[nullable MType] */;
8052 short int var58
/* : Bool */;
8053 val
* var59
/* : nullable Object */;
8054 val
* var_t
/* var t: nullable MType */;
8055 val
* var60
/* : null */;
8056 short int var61
/* : Bool */;
8057 short int var62
/* : Bool */;
8058 val
* var_other
/* var other: nullable Object */;
8059 short int var64
/* : Bool */;
8060 short int var66
/* : Bool */;
8061 static val
* varonce67
;
8062 val
* var68
/* : String */;
8063 char* var69
/* : NativeString */;
8064 long var70
/* : Int */;
8065 val
* var71
/* : FlatString */;
8066 val
* var72
/* : MModule */;
8067 val
* var74
/* : MModule */;
8068 short int var75
/* : Bool */;
8069 val
* var76
/* : MType */;
8070 val
* var_tv
/* var tv: MType */;
8071 val
* var77
/* : Map[MType, Int] */;
8072 val
* var79
/* : Map[MType, Int] */;
8073 short int var80
/* : Bool */;
8074 static val
* varonce81
;
8075 val
* var82
/* : String */;
8076 char* var83
/* : NativeString */;
8077 long var84
/* : Int */;
8078 val
* var85
/* : FlatString */;
8079 val
* var86
/* : String */;
8080 val
* var87
/* : Array[Object] */;
8081 long var88
/* : Int */;
8082 val
* var89
/* : NativeArray[Object] */;
8083 val
* var90
/* : String */;
8084 static val
* varonce91
;
8085 val
* var92
/* : String */;
8086 char* var93
/* : NativeString */;
8087 long var94
/* : Int */;
8088 val
* var95
/* : FlatString */;
8089 val
* var96
/* : String */;
8090 static val
* varonce97
;
8091 val
* var98
/* : String */;
8092 char* var99
/* : NativeString */;
8093 long var100
/* : Int */;
8094 val
* var101
/* : FlatString */;
8095 static val
* varonce102
;
8096 val
* var103
/* : String */;
8097 char* var104
/* : NativeString */;
8098 long var105
/* : Int */;
8099 val
* var106
/* : FlatString */;
8100 static val
* varonce107
;
8101 val
* var108
/* : String */;
8102 char* var109
/* : NativeString */;
8103 long var110
/* : Int */;
8104 val
* var111
/* : FlatString */;
8105 val
* var112
/* : Array[Object] */;
8106 long var113
/* : Int */;
8107 val
* var114
/* : NativeArray[Object] */;
8108 val
* var115
/* : String */;
8109 static val
* varonce116
;
8110 val
* var117
/* : String */;
8111 char* var118
/* : NativeString */;
8112 long var119
/* : Int */;
8113 val
* var120
/* : FlatString */;
8114 static val
* varonce121
;
8115 val
* var122
/* : String */;
8116 char* var123
/* : NativeString */;
8117 long var124
/* : Int */;
8118 val
* var125
/* : FlatString */;
8119 static val
* varonce126
;
8120 val
* var127
/* : String */;
8121 char* var128
/* : NativeString */;
8122 long var129
/* : Int */;
8123 val
* var130
/* : FlatString */;
8124 val
* var131
/* : Array[Object] */;
8125 long var132
/* : Int */;
8126 val
* var133
/* : NativeArray[Object] */;
8127 val
* var134
/* : String */;
8128 static val
* varonce136
;
8129 val
* var137
/* : String */;
8130 char* var138
/* : NativeString */;
8131 long var139
/* : Int */;
8132 val
* var140
/* : FlatString */;
8133 static val
* varonce141
;
8134 val
* var142
/* : String */;
8135 char* var143
/* : NativeString */;
8136 long var144
/* : Int */;
8137 val
* var145
/* : FlatString */;
8140 var
= ((val
* (*)(val
* self
))(var_mtype
->class->vft
[COLOR_nit__model__MType__as_notnullable
]))(var_mtype
) /* as_notnullable on <var_mtype:MType>*/;
8142 /* <var:MType> isa MClassType */
8143 cltype
= type_nit__MClassType
.color
;
8144 idtype
= type_nit__MClassType
.id
;
8145 if(cltype
>= var
->type
->table_size
) {
8148 var1
= var
->type
->type_table
[cltype
] == idtype
;
8150 if (unlikely(!var1
)) {
8151 var_class_name
= var
== NULL ?
"null" : var
->type
->name
;
8152 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
8153 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 644);
8156 var_mclass_type
= var
;
8160 var3
= "resolution_table_";
8162 var5
= standard___standard__NativeString___to_s_with_length(var3
, var4
);
8167 var6
= ((val
* (*)(val
* self
))(var_mtype
->class->vft
[COLOR_nit__model_base__MEntity__c_name
]))(var_mtype
) /* c_name on <var_mtype:MType>*/;
8169 var7
= NEW_standard__Array(&type_standard__Array__standard__Object
);
8170 { /* var7 = array_instance Array[Object] */
8172 var9
= NEW_standard__NativeArray(var8
, &type_standard__NativeArray__standard__Object
);
8173 ((struct instance_standard__NativeArray
*)var9
)->values
[0] = (val
*) var2
;
8174 ((struct instance_standard__NativeArray
*)var9
)->values
[1] = (val
*) var6
;
8176 ((void (*)(val
* self
, val
* p0
, long p1
))(var7
->class->vft
[COLOR_standard__array__Array__with_native
]))(var7
, var9
, var8
) /* with_native on <var7:Array[Object]>*/;
8180 var10
= ((val
* (*)(val
* self
))(var7
->class->vft
[COLOR_standard__string__Object__to_s
]))(var7
) /* to_s on <var7:Array[Object]>*/;
8185 var13
= "extern const struct types resolution_table_";
8187 var15
= standard___standard__NativeString___to_s_with_length(var13
, var14
);
8192 var16
= ((val
* (*)(val
* self
))(var_mtype
->class->vft
[COLOR_nit__model_base__MEntity__c_name
]))(var_mtype
) /* c_name on <var_mtype:MType>*/;
8199 var21
= standard___standard__NativeString___to_s_with_length(var19
, var20
);
8203 var22
= NEW_standard__Array(&type_standard__Array__standard__Object
);
8204 { /* var22 = array_instance Array[Object] */
8206 var24
= NEW_standard__NativeArray(var23
, &type_standard__NativeArray__standard__Object
);
8207 ((struct instance_standard__NativeArray
*)var24
)->values
[0] = (val
*) var12
;
8208 ((struct instance_standard__NativeArray
*)var24
)->values
[1] = (val
*) var16
;
8209 ((struct instance_standard__NativeArray
*)var24
)->values
[2] = (val
*) var18
;
8211 ((void (*)(val
* self
, val
* p0
, long p1
))(var22
->class->vft
[COLOR_standard__array__Array__with_native
]))(var22
, var24
, var23
) /* with_native on <var22:Array[Object]>*/;
8215 var25
= ((val
* (*)(val
* self
))(var22
->class->vft
[COLOR_standard__string__Object__to_s
]))(var22
) /* to_s on <var22:Array[Object]>*/;
8218 nit___nit__AbstractCompiler___provide_declaration(self
, var10
, var25
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
8221 var26
= ((val
* (*)(val
* self
))(self
->class->vft
[COLOR_nit__abstract_compiler__AbstractCompiler__new_visitor
]))(self
) /* new_visitor on <self:SeparateCompiler>*/;
8227 var29
= "const struct types resolution_table_";
8229 var31
= standard___standard__NativeString___to_s_with_length(var29
, var30
);
8234 var32
= ((val
* (*)(val
* self
))(var_mtype
->class->vft
[COLOR_nit__model_base__MEntity__c_name
]))(var_mtype
) /* c_name on <var_mtype:MType>*/;
8241 var37
= standard___standard__NativeString___to_s_with_length(var35
, var36
);
8245 var38
= NEW_standard__Array(&type_standard__Array__standard__Object
);
8246 { /* var38 = array_instance Array[Object] */
8248 var40
= NEW_standard__NativeArray(var39
, &type_standard__NativeArray__standard__Object
);
8249 ((struct instance_standard__NativeArray
*)var40
)->values
[0] = (val
*) var28
;
8250 ((struct instance_standard__NativeArray
*)var40
)->values
[1] = (val
*) var32
;
8251 ((struct instance_standard__NativeArray
*)var40
)->values
[2] = (val
*) var34
;
8253 ((void (*)(val
* self
, val
* p0
, long p1
))(var38
->class->vft
[COLOR_standard__array__Array__with_native
]))(var38
, var40
, var39
) /* with_native on <var38:Array[Object]>*/;
8257 var41
= ((val
* (*)(val
* self
))(var38
->class->vft
[COLOR_standard__string__Object__to_s
]))(var38
) /* to_s on <var38:Array[Object]>*/;
8260 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var41
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8265 var44
= "0, /* dummy */";
8267 var46
= standard___standard__NativeString___to_s_with_length(var44
, var45
);
8272 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var43
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8279 var51
= standard___standard__NativeString___to_s_with_length(var49
, var50
);
8284 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var48
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8287 { /* Inline separate_compiler#SeparateCompiler#resolution_tables (self) on <self:SeparateCompiler> */
8288 var54
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___resolution_tables
].val
; /* _resolution_tables on <self:SeparateCompiler> */
8289 if (unlikely(var54
== NULL
)) {
8290 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _resolution_tables");
8291 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 855);
8295 RET_LABEL53
:(void)0;
8299 var55
= ((val
* (*)(val
* self
, val
* p0
))(var52
->class->vft
[COLOR_standard__abstract_collection__MapRead___91d_93d
]))(var52
, var_mclass_type
) /* [] on <var52:Map[MClassType, Array[nullable MType]]>*/;
8303 var56
= standard___standard__AbstractArrayRead___standard__abstract_collection__Collection__iterator(var_
);
8308 var58
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__is_ok(var_57
);
8312 var59
= standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__item(var_57
);
8316 if (var_t
== NULL
) {
8317 var61
= 1; /* is null */
8319 var61
= 0; /* arg is null but recv is not */
8322 { /* Inline kernel#Object#== (var_t,var60) on <var_t:nullable MType> */
8325 { /* Inline kernel#Object#is_same_instance (var_t,var_other) on <var_t:nullable MType(MType)> */
8326 var66
= var_t
== var_other
;
8329 RET_LABEL65
:(void)0;
8334 RET_LABEL63
:(void)0;
8342 var69
= "NULL, /* empty */";
8344 var71
= standard___standard__NativeString___to_s_with_length(var69
, var70
);
8349 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var68
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8353 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
8354 var74
= self
->attrs
[COLOR_nit__abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
8355 if (unlikely(var74
== NULL
)) {
8356 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
8357 PRINT_ERROR(" (%s:%d)\n", FILE_nit__abstract_compiler
, 474);
8361 RET_LABEL73
:(void)0;
8366 var76
= ((val
* (*)(val
* self
, val
* p0
, val
* p1
, val
* p2
, short int p3
))(var_t
->class->vft
[COLOR_nit__model__MType__resolve_for
]))(var_t
, var_mclass_type
, var_mclass_type
, var72
, var75
) /* resolve_for on <var_t:nullable MType(MType)>*/;
8370 { /* Inline separate_compiler#SeparateCompiler#type_ids (self) on <self:SeparateCompiler> */
8371 var79
= self
->attrs
[COLOR_nit__separate_compiler__SeparateCompiler___type_ids
].val
; /* _type_ids on <self:SeparateCompiler> */
8372 if (unlikely(var79
== NULL
)) {
8373 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_ids");
8374 PRINT_ERROR(" (%s:%d)\n", FILE_nit__separate_compiler
, 124);
8378 RET_LABEL78
:(void)0;
8382 var80
= standard___standard__MapRead___has_key(var77
, var_tv
);
8390 var85
= standard___standard__NativeString___to_s_with_length(var83
, var84
);
8395 var86
= ((val
* (*)(val
* self
))(var_tv
->class->vft
[COLOR_nit__model_base__MEntity__c_name
]))(var_tv
) /* c_name on <var_tv:MType>*/;
8397 var87
= NEW_standard__Array(&type_standard__Array__standard__Object
);
8398 { /* var87 = array_instance Array[Object] */
8400 var89
= NEW_standard__NativeArray(var88
, &type_standard__NativeArray__standard__Object
);
8401 ((struct instance_standard__NativeArray
*)var89
)->values
[0] = (val
*) var82
;
8402 ((struct instance_standard__NativeArray
*)var89
)->values
[1] = (val
*) var86
;
8404 ((void (*)(val
* self
, val
* p0
, long p1
))(var87
->class->vft
[COLOR_standard__array__Array__with_native
]))(var87
, var89
, var88
) /* with_native on <var87:Array[Object]>*/;
8408 var90
= ((val
* (*)(val
* self
))(var87
->class->vft
[COLOR_standard__string__Object__to_s
]))(var87
) /* to_s on <var87:Array[Object]>*/;
8411 nit___nit__AbstractCompilerVisitor___require_declaration(var_v
, var90
); /* Direct call abstract_compiler#AbstractCompilerVisitor#require_declaration on <var_v:SeparateCompilerVisitor>*/
8418 var95
= standard___standard__NativeString___to_s_with_length(var93
, var94
);
8423 var96
= ((val
* (*)(val
* self
))(var_tv
->class->vft
[COLOR_nit__model_base__MEntity__c_name
]))(var_tv
) /* c_name on <var_tv:MType>*/;
8430 var101
= standard___standard__NativeString___to_s_with_length(var99
, var100
);
8435 var103
= varonce102
;
8439 var106
= standard___standard__NativeString___to_s_with_length(var104
, var105
);
8441 varonce102
= var103
;
8444 var108
= varonce107
;
8448 var111
= standard___standard__NativeString___to_s_with_length(var109
, var110
);
8450 varonce107
= var108
;
8452 var112
= NEW_standard__Array(&type_standard__Array__standard__Object
);
8453 { /* var112 = array_instance Array[Object] */
8455 var114
= NEW_standard__NativeArray(var113
, &type_standard__NativeArray__standard__Object
);
8456 ((struct instance_standard__NativeArray
*)var114
)->values
[0] = (val
*) var92
;
8457 ((struct instance_standard__NativeArray
*)var114
)->values
[1] = (val
*) var96
;
8458 ((struct instance_standard__NativeArray
*)var114
)->values
[2] = (val
*) var98
;
8459 ((struct instance_standard__NativeArray
*)var114
)->values
[3] = (val
*) var_t
;
8460 ((struct instance_standard__NativeArray
*)var114
)->values
[4] = (val
*) var103
;
8461 ((struct instance_standard__NativeArray
*)var114
)->values
[5] = (val
*) var_tv
;
8462 ((struct instance_standard__NativeArray
*)var114
)->values
[6] = (val
*) var108
;
8464 ((void (*)(val
* self
, val
* p0
, long p1
))(var112
->class->vft
[COLOR_standard__array__Array__with_native
]))(var112
, var114
, var113
) /* with_native on <var112:Array[Object]>*/;
8468 var115
= ((val
* (*)(val
* self
))(var112
->class->vft
[COLOR_standard__string__Object__to_s
]))(var112
) /* to_s on <var112:Array[Object]>*/;
8471 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var115
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8475 var117
= varonce116
;
8477 var118
= "NULL, /* empty (";
8479 var120
= standard___standard__NativeString___to_s_with_length(var118
, var119
);
8481 varonce116
= var117
;
8484 var122
= varonce121
;
8488 var125
= standard___standard__NativeString___to_s_with_length(var123
, var124
);
8490 varonce121
= var122
;
8493 var127
= varonce126
;
8495 var128
= " not a live type) */";
8497 var130
= standard___standard__NativeString___to_s_with_length(var128
, var129
);
8499 varonce126
= var127
;
8501 var131
= NEW_standard__Array(&type_standard__Array__standard__Object
);
8502 { /* var131 = array_instance Array[Object] */
8504 var133
= NEW_standard__NativeArray(var132
, &type_standard__NativeArray__standard__Object
);
8505 ((struct instance_standard__NativeArray
*)var133
)->values
[0] = (val
*) var117
;
8506 ((struct instance_standard__NativeArray
*)var133
)->values
[1] = (val
*) var_t
;
8507 ((struct instance_standard__NativeArray
*)var133
)->values
[2] = (val
*) var122
;
8508 ((struct instance_standard__NativeArray
*)var133
)->values
[3] = (val
*) var_tv
;
8509 ((struct instance_standard__NativeArray
*)var133
)->values
[4] = (val
*) var127
;
8511 ((void (*)(val
* self
, val
* p0
, long p1
))(var131
->class->vft
[COLOR_standard__array__Array__with_native
]))(var131
, var133
, var132
) /* with_native on <var131:Array[Object]>*/;
8515 var134
= ((val
* (*)(val
* self
))(var131
->class->vft
[COLOR_standard__string__Object__to_s
]))(var131
) /* to_s on <var131:Array[Object]>*/;
8518 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var134
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8523 standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__next(var_57
); /* Direct call array#ArrayIterator#next on <var_57:ArrayIterator[nullable MType]>*/
8529 BREAK_label
: (void)0;
8531 { /* Inline abstract_collection#Iterator#finish (var_57) on <var_57:ArrayIterator[nullable MType]> */
8532 RET_LABEL135
:(void)0;
8536 var137
= varonce136
;
8540 var140
= standard___standard__NativeString___to_s_with_length(var138
, var139
);
8542 varonce136
= var137
;
8545 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var137
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8548 var142
= varonce141
;
8552 var145
= standard___standard__NativeString___to_s_with_length(var143
, var144
);
8554 varonce141
= var142
;
8557 nit___nit__AbstractCompilerVisitor___add_decl(var_v
, var142
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/