1 #include "separate_compiler.sep.0.h"
2 /* method separate_compiler#ToolContext#opt_separate for (self: ToolContext): OptionBool */
3 val
* separate_compiler__ToolContext__opt_separate(val
* self
) {
4 val
* var
/* : OptionBool */;
5 val
* var1
/* : OptionBool */;
6 var1
= self
->attrs
[COLOR_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", "src/separate_compiler.nit", 24);
16 /* method separate_compiler#ToolContext#opt_separate for (self: Object): OptionBool */
17 val
* VIRTUAL_separate_compiler__ToolContext__opt_separate(val
* self
) {
18 val
* var
/* : OptionBool */;
19 val
* var1
/* : OptionBool */;
20 val
* var3
/* : OptionBool */;
21 { /* Inline separate_compiler#ToolContext#opt_separate (self) on <self:Object(ToolContext)> */
22 var3
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_separate
].val
; /* _opt_separate on <self:Object(ToolContext)> */
23 if (unlikely(var3
== NULL
)) {
24 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_separate");
25 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 24);
35 /* method separate_compiler#ToolContext#opt_no_inline_intern for (self: ToolContext): OptionBool */
36 val
* separate_compiler__ToolContext__opt_no_inline_intern(val
* self
) {
37 val
* var
/* : OptionBool */;
38 val
* var1
/* : OptionBool */;
39 var1
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_no_inline_intern
].val
; /* _opt_no_inline_intern on <self:ToolContext> */
40 if (unlikely(var1
== NULL
)) {
41 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_inline_intern");
42 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 26);
49 /* method separate_compiler#ToolContext#opt_no_inline_intern for (self: Object): OptionBool */
50 val
* VIRTUAL_separate_compiler__ToolContext__opt_no_inline_intern(val
* self
) {
51 val
* var
/* : OptionBool */;
52 val
* var1
/* : OptionBool */;
53 val
* var3
/* : OptionBool */;
54 { /* Inline separate_compiler#ToolContext#opt_no_inline_intern (self) on <self:Object(ToolContext)> */
55 var3
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_no_inline_intern
].val
; /* _opt_no_inline_intern on <self:Object(ToolContext)> */
56 if (unlikely(var3
== NULL
)) {
57 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_inline_intern");
58 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 26);
68 /* method separate_compiler#ToolContext#opt_no_union_attribute for (self: ToolContext): OptionBool */
69 val
* separate_compiler__ToolContext__opt_no_union_attribute(val
* self
) {
70 val
* var
/* : OptionBool */;
71 val
* var1
/* : OptionBool */;
72 var1
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_no_union_attribute
].val
; /* _opt_no_union_attribute on <self:ToolContext> */
73 if (unlikely(var1
== NULL
)) {
74 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_union_attribute");
75 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 28);
82 /* method separate_compiler#ToolContext#opt_no_union_attribute for (self: Object): OptionBool */
83 val
* VIRTUAL_separate_compiler__ToolContext__opt_no_union_attribute(val
* self
) {
84 val
* var
/* : OptionBool */;
85 val
* var1
/* : OptionBool */;
86 val
* var3
/* : OptionBool */;
87 { /* Inline separate_compiler#ToolContext#opt_no_union_attribute (self) on <self:Object(ToolContext)> */
88 var3
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_no_union_attribute
].val
; /* _opt_no_union_attribute on <self:Object(ToolContext)> */
89 if (unlikely(var3
== NULL
)) {
90 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_union_attribute");
91 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 28);
101 /* method separate_compiler#ToolContext#opt_no_shortcut_equate for (self: ToolContext): OptionBool */
102 val
* separate_compiler__ToolContext__opt_no_shortcut_equate(val
* self
) {
103 val
* var
/* : OptionBool */;
104 val
* var1
/* : OptionBool */;
105 var1
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_no_shortcut_equate
].val
; /* _opt_no_shortcut_equate on <self:ToolContext> */
106 if (unlikely(var1
== NULL
)) {
107 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_shortcut_equate");
108 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 30);
115 /* method separate_compiler#ToolContext#opt_no_shortcut_equate for (self: Object): OptionBool */
116 val
* VIRTUAL_separate_compiler__ToolContext__opt_no_shortcut_equate(val
* self
) {
117 val
* var
/* : OptionBool */;
118 val
* var1
/* : OptionBool */;
119 val
* var3
/* : OptionBool */;
120 { /* Inline separate_compiler#ToolContext#opt_no_shortcut_equate (self) on <self:Object(ToolContext)> */
121 var3
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_no_shortcut_equate
].val
; /* _opt_no_shortcut_equate on <self:Object(ToolContext)> */
122 if (unlikely(var3
== NULL
)) {
123 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_shortcut_equate");
124 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 30);
134 /* method separate_compiler#ToolContext#opt_inline_coloring_numbers for (self: ToolContext): OptionBool */
135 val
* separate_compiler__ToolContext__opt_inline_coloring_numbers(val
* self
) {
136 val
* var
/* : OptionBool */;
137 val
* var1
/* : OptionBool */;
138 var1
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_inline_coloring_numbers
].val
; /* _opt_inline_coloring_numbers on <self:ToolContext> */
139 if (unlikely(var1
== NULL
)) {
140 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_coloring_numbers");
141 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 32);
148 /* method separate_compiler#ToolContext#opt_inline_coloring_numbers for (self: Object): OptionBool */
149 val
* VIRTUAL_separate_compiler__ToolContext__opt_inline_coloring_numbers(val
* self
) {
150 val
* var
/* : OptionBool */;
151 val
* var1
/* : OptionBool */;
152 val
* var3
/* : OptionBool */;
153 { /* Inline separate_compiler#ToolContext#opt_inline_coloring_numbers (self) on <self:Object(ToolContext)> */
154 var3
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_inline_coloring_numbers
].val
; /* _opt_inline_coloring_numbers on <self:Object(ToolContext)> */
155 if (unlikely(var3
== NULL
)) {
156 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_coloring_numbers");
157 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 32);
167 /* method separate_compiler#ToolContext#opt_inline_some_methods for (self: ToolContext): OptionBool */
168 val
* separate_compiler__ToolContext__opt_inline_some_methods(val
* self
) {
169 val
* var
/* : OptionBool */;
170 val
* var1
/* : OptionBool */;
171 var1
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_inline_some_methods
].val
; /* _opt_inline_some_methods on <self:ToolContext> */
172 if (unlikely(var1
== NULL
)) {
173 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_some_methods");
174 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 34);
181 /* method separate_compiler#ToolContext#opt_inline_some_methods for (self: Object): OptionBool */
182 val
* VIRTUAL_separate_compiler__ToolContext__opt_inline_some_methods(val
* self
) {
183 val
* var
/* : OptionBool */;
184 val
* var1
/* : OptionBool */;
185 val
* var3
/* : OptionBool */;
186 { /* Inline separate_compiler#ToolContext#opt_inline_some_methods (self) on <self:Object(ToolContext)> */
187 var3
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_inline_some_methods
].val
; /* _opt_inline_some_methods on <self:Object(ToolContext)> */
188 if (unlikely(var3
== NULL
)) {
189 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_some_methods");
190 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 34);
200 /* method separate_compiler#ToolContext#opt_direct_call_monomorph for (self: ToolContext): OptionBool */
201 val
* separate_compiler__ToolContext__opt_direct_call_monomorph(val
* self
) {
202 val
* var
/* : OptionBool */;
203 val
* var1
/* : OptionBool */;
204 var1
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_direct_call_monomorph
].val
; /* _opt_direct_call_monomorph on <self:ToolContext> */
205 if (unlikely(var1
== NULL
)) {
206 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_direct_call_monomorph");
207 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 36);
214 /* method separate_compiler#ToolContext#opt_direct_call_monomorph for (self: Object): OptionBool */
215 val
* VIRTUAL_separate_compiler__ToolContext__opt_direct_call_monomorph(val
* self
) {
216 val
* var
/* : OptionBool */;
217 val
* var1
/* : OptionBool */;
218 val
* var3
/* : OptionBool */;
219 { /* Inline separate_compiler#ToolContext#opt_direct_call_monomorph (self) on <self:Object(ToolContext)> */
220 var3
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_direct_call_monomorph
].val
; /* _opt_direct_call_monomorph on <self:Object(ToolContext)> */
221 if (unlikely(var3
== NULL
)) {
222 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_direct_call_monomorph");
223 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 36);
233 /* method separate_compiler#ToolContext#opt_skip_dead_methods for (self: ToolContext): OptionBool */
234 val
* separate_compiler__ToolContext__opt_skip_dead_methods(val
* self
) {
235 val
* var
/* : OptionBool */;
236 val
* var1
/* : OptionBool */;
237 var1
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_skip_dead_methods
].val
; /* _opt_skip_dead_methods on <self:ToolContext> */
238 if (unlikely(var1
== NULL
)) {
239 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_skip_dead_methods");
240 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 38);
247 /* method separate_compiler#ToolContext#opt_skip_dead_methods for (self: Object): OptionBool */
248 val
* VIRTUAL_separate_compiler__ToolContext__opt_skip_dead_methods(val
* self
) {
249 val
* var
/* : OptionBool */;
250 val
* var1
/* : OptionBool */;
251 val
* var3
/* : OptionBool */;
252 { /* Inline separate_compiler#ToolContext#opt_skip_dead_methods (self) on <self:Object(ToolContext)> */
253 var3
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_skip_dead_methods
].val
; /* _opt_skip_dead_methods on <self:Object(ToolContext)> */
254 if (unlikely(var3
== NULL
)) {
255 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_skip_dead_methods");
256 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 38);
266 /* method separate_compiler#ToolContext#opt_semi_global for (self: ToolContext): OptionBool */
267 val
* separate_compiler__ToolContext__opt_semi_global(val
* self
) {
268 val
* var
/* : OptionBool */;
269 val
* var1
/* : OptionBool */;
270 var1
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_semi_global
].val
; /* _opt_semi_global on <self:ToolContext> */
271 if (unlikely(var1
== NULL
)) {
272 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_semi_global");
273 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 40);
280 /* method separate_compiler#ToolContext#opt_semi_global for (self: Object): OptionBool */
281 val
* VIRTUAL_separate_compiler__ToolContext__opt_semi_global(val
* self
) {
282 val
* var
/* : OptionBool */;
283 val
* var1
/* : OptionBool */;
284 val
* var3
/* : OptionBool */;
285 { /* Inline separate_compiler#ToolContext#opt_semi_global (self) on <self:Object(ToolContext)> */
286 var3
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_semi_global
].val
; /* _opt_semi_global on <self:Object(ToolContext)> */
287 if (unlikely(var3
== NULL
)) {
288 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_semi_global");
289 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 40);
299 /* method separate_compiler#ToolContext#opt_colo_dead_methods for (self: ToolContext): OptionBool */
300 val
* separate_compiler__ToolContext__opt_colo_dead_methods(val
* self
) {
301 val
* var
/* : OptionBool */;
302 val
* var1
/* : OptionBool */;
303 var1
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_colo_dead_methods
].val
; /* _opt_colo_dead_methods on <self:ToolContext> */
304 if (unlikely(var1
== NULL
)) {
305 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_colo_dead_methods");
306 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 42);
313 /* method separate_compiler#ToolContext#opt_colo_dead_methods for (self: Object): OptionBool */
314 val
* VIRTUAL_separate_compiler__ToolContext__opt_colo_dead_methods(val
* self
) {
315 val
* var
/* : OptionBool */;
316 val
* var1
/* : OptionBool */;
317 val
* var3
/* : OptionBool */;
318 { /* Inline separate_compiler#ToolContext#opt_colo_dead_methods (self) on <self:Object(ToolContext)> */
319 var3
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_colo_dead_methods
].val
; /* _opt_colo_dead_methods on <self:Object(ToolContext)> */
320 if (unlikely(var3
== NULL
)) {
321 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_colo_dead_methods");
322 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 42);
332 /* method separate_compiler#ToolContext#opt_tables_metrics for (self: ToolContext): OptionBool */
333 val
* separate_compiler__ToolContext__opt_tables_metrics(val
* self
) {
334 val
* var
/* : OptionBool */;
335 val
* var1
/* : OptionBool */;
336 var1
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_tables_metrics
].val
; /* _opt_tables_metrics on <self:ToolContext> */
337 if (unlikely(var1
== NULL
)) {
338 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_tables_metrics");
339 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 44);
346 /* method separate_compiler#ToolContext#opt_tables_metrics for (self: Object): OptionBool */
347 val
* VIRTUAL_separate_compiler__ToolContext__opt_tables_metrics(val
* self
) {
348 val
* var
/* : OptionBool */;
349 val
* var1
/* : OptionBool */;
350 val
* var3
/* : OptionBool */;
351 { /* Inline separate_compiler#ToolContext#opt_tables_metrics (self) on <self:Object(ToolContext)> */
352 var3
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_tables_metrics
].val
; /* _opt_tables_metrics on <self:Object(ToolContext)> */
353 if (unlikely(var3
== NULL
)) {
354 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_tables_metrics");
355 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 44);
365 /* method separate_compiler#ToolContext#init for (self: ToolContext) */
366 void separate_compiler__ToolContext__init(val
* self
) {
367 val
* var
/* : OptionContext */;
368 val
* var2
/* : OptionContext */;
369 val
* var3
/* : OptionBool */;
370 val
* var5
/* : OptionBool */;
371 val
* var6
/* : Array[Option] */;
372 long var7
/* : Int */;
373 val
* var8
/* : NativeArray[Option] */;
374 val
* var9
/* : OptionContext */;
375 val
* var11
/* : OptionContext */;
376 val
* var12
/* : OptionBool */;
377 val
* var14
/* : OptionBool */;
378 val
* var15
/* : Array[Option] */;
379 long var16
/* : Int */;
380 val
* var17
/* : NativeArray[Option] */;
381 val
* var18
/* : OptionContext */;
382 val
* var20
/* : OptionContext */;
383 val
* var21
/* : OptionBool */;
384 val
* var23
/* : OptionBool */;
385 val
* var24
/* : Array[Option] */;
386 long var25
/* : Int */;
387 val
* var26
/* : NativeArray[Option] */;
388 val
* var27
/* : OptionContext */;
389 val
* var29
/* : OptionContext */;
390 val
* var30
/* : OptionBool */;
391 val
* var32
/* : OptionBool */;
392 val
* var33
/* : Array[Option] */;
393 long var34
/* : Int */;
394 val
* var35
/* : NativeArray[Option] */;
395 val
* var36
/* : OptionContext */;
396 val
* var38
/* : OptionContext */;
397 val
* var39
/* : OptionBool */;
398 val
* var41
/* : OptionBool */;
399 val
* var42
/* : OptionBool */;
400 val
* var44
/* : OptionBool */;
401 val
* var45
/* : OptionBool */;
402 val
* var47
/* : OptionBool */;
403 val
* var48
/* : OptionBool */;
404 val
* var50
/* : OptionBool */;
405 val
* var51
/* : OptionBool */;
406 val
* var53
/* : OptionBool */;
407 val
* var54
/* : Array[Option] */;
408 long var55
/* : Int */;
409 val
* var56
/* : NativeArray[Option] */;
410 val
* var57
/* : OptionContext */;
411 val
* var59
/* : OptionContext */;
412 val
* var60
/* : OptionBool */;
413 val
* var62
/* : OptionBool */;
414 val
* var63
/* : Array[Option] */;
415 long var64
/* : Int */;
416 val
* var65
/* : NativeArray[Option] */;
417 val
* var66
/* : OptionContext */;
418 val
* var68
/* : OptionContext */;
419 val
* var69
/* : OptionBool */;
420 val
* var71
/* : OptionBool */;
421 val
* var72
/* : Array[Option] */;
422 long var73
/* : Int */;
423 val
* var74
/* : NativeArray[Option] */;
425 ((void (*)(val
*))(self
->class->vft
[COLOR_separate_compiler__ToolContext__init
]))(self
) /* init on <self:ToolContext>*/;
428 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
429 var2
= self
->attrs
[COLOR_toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
430 if (unlikely(var2
== NULL
)) {
431 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
432 PRINT_ERROR(" (%s:%d)\n", "src/toolcontext.nit", 166);
440 { /* Inline separate_compiler#ToolContext#opt_separate (self) on <self:ToolContext> */
441 var5
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_separate
].val
; /* _opt_separate on <self:ToolContext> */
442 if (unlikely(var5
== NULL
)) {
443 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_separate");
444 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 24);
451 var6
= NEW_array__Array(&type_array__Arrayopts__Option
);
452 { /* var6 = array_instance Array[Option] */
454 var8
= NEW_array__NativeArray(var7
, &type_array__NativeArrayopts__Option
);
455 ((struct instance_array__NativeArray
*)var8
)->values
[0] = (val
*) var3
;
457 ((void (*)(val
*, val
*, long))(var6
->class->vft
[COLOR_array__Array__with_native
]))(var6
, var8
, var7
) /* with_native on <var6:Array[Option]>*/;
461 opts__OptionContext__add_option(var
, var6
); /* Direct call opts#OptionContext#add_option on <var:OptionContext>*/
464 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
465 var11
= self
->attrs
[COLOR_toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
466 if (unlikely(var11
== NULL
)) {
467 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
468 PRINT_ERROR(" (%s:%d)\n", "src/toolcontext.nit", 166);
476 { /* Inline separate_compiler#ToolContext#opt_no_inline_intern (self) on <self:ToolContext> */
477 var14
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_no_inline_intern
].val
; /* _opt_no_inline_intern on <self:ToolContext> */
478 if (unlikely(var14
== NULL
)) {
479 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_inline_intern");
480 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 26);
487 var15
= NEW_array__Array(&type_array__Arrayopts__Option
);
488 { /* var15 = array_instance Array[Option] */
490 var17
= NEW_array__NativeArray(var16
, &type_array__NativeArrayopts__Option
);
491 ((struct instance_array__NativeArray
*)var17
)->values
[0] = (val
*) var12
;
493 ((void (*)(val
*, val
*, long))(var15
->class->vft
[COLOR_array__Array__with_native
]))(var15
, var17
, var16
) /* with_native on <var15:Array[Option]>*/;
497 opts__OptionContext__add_option(var9
, var15
); /* Direct call opts#OptionContext#add_option on <var9:OptionContext>*/
500 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
501 var20
= self
->attrs
[COLOR_toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
502 if (unlikely(var20
== NULL
)) {
503 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
504 PRINT_ERROR(" (%s:%d)\n", "src/toolcontext.nit", 166);
512 { /* Inline separate_compiler#ToolContext#opt_no_union_attribute (self) on <self:ToolContext> */
513 var23
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_no_union_attribute
].val
; /* _opt_no_union_attribute on <self:ToolContext> */
514 if (unlikely(var23
== NULL
)) {
515 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_union_attribute");
516 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 28);
523 var24
= NEW_array__Array(&type_array__Arrayopts__Option
);
524 { /* var24 = array_instance Array[Option] */
526 var26
= NEW_array__NativeArray(var25
, &type_array__NativeArrayopts__Option
);
527 ((struct instance_array__NativeArray
*)var26
)->values
[0] = (val
*) var21
;
529 ((void (*)(val
*, val
*, long))(var24
->class->vft
[COLOR_array__Array__with_native
]))(var24
, var26
, var25
) /* with_native on <var24:Array[Option]>*/;
533 opts__OptionContext__add_option(var18
, var24
); /* Direct call opts#OptionContext#add_option on <var18:OptionContext>*/
536 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
537 var29
= self
->attrs
[COLOR_toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
538 if (unlikely(var29
== NULL
)) {
539 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
540 PRINT_ERROR(" (%s:%d)\n", "src/toolcontext.nit", 166);
548 { /* Inline separate_compiler#ToolContext#opt_no_shortcut_equate (self) on <self:ToolContext> */
549 var32
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_no_shortcut_equate
].val
; /* _opt_no_shortcut_equate on <self:ToolContext> */
550 if (unlikely(var32
== NULL
)) {
551 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_shortcut_equate");
552 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 30);
559 var33
= NEW_array__Array(&type_array__Arrayopts__Option
);
560 { /* var33 = array_instance Array[Option] */
562 var35
= NEW_array__NativeArray(var34
, &type_array__NativeArrayopts__Option
);
563 ((struct instance_array__NativeArray
*)var35
)->values
[0] = (val
*) var30
;
565 ((void (*)(val
*, val
*, long))(var33
->class->vft
[COLOR_array__Array__with_native
]))(var33
, var35
, var34
) /* with_native on <var33:Array[Option]>*/;
569 opts__OptionContext__add_option(var27
, var33
); /* Direct call opts#OptionContext#add_option on <var27:OptionContext>*/
572 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
573 var38
= self
->attrs
[COLOR_toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
574 if (unlikely(var38
== NULL
)) {
575 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
576 PRINT_ERROR(" (%s:%d)\n", "src/toolcontext.nit", 166);
584 { /* Inline separate_compiler#ToolContext#opt_inline_coloring_numbers (self) on <self:ToolContext> */
585 var41
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_inline_coloring_numbers
].val
; /* _opt_inline_coloring_numbers on <self:ToolContext> */
586 if (unlikely(var41
== NULL
)) {
587 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_coloring_numbers");
588 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 32);
596 { /* Inline separate_compiler#ToolContext#opt_inline_some_methods (self) on <self:ToolContext> */
597 var44
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_inline_some_methods
].val
; /* _opt_inline_some_methods on <self:ToolContext> */
598 if (unlikely(var44
== NULL
)) {
599 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_some_methods");
600 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 34);
608 { /* Inline separate_compiler#ToolContext#opt_direct_call_monomorph (self) on <self:ToolContext> */
609 var47
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_direct_call_monomorph
].val
; /* _opt_direct_call_monomorph on <self:ToolContext> */
610 if (unlikely(var47
== NULL
)) {
611 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_direct_call_monomorph");
612 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 36);
620 { /* Inline separate_compiler#ToolContext#opt_skip_dead_methods (self) on <self:ToolContext> */
621 var50
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_skip_dead_methods
].val
; /* _opt_skip_dead_methods on <self:ToolContext> */
622 if (unlikely(var50
== NULL
)) {
623 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_skip_dead_methods");
624 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 38);
632 { /* Inline separate_compiler#ToolContext#opt_semi_global (self) on <self:ToolContext> */
633 var53
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_semi_global
].val
; /* _opt_semi_global on <self:ToolContext> */
634 if (unlikely(var53
== NULL
)) {
635 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_semi_global");
636 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 40);
643 var54
= NEW_array__Array(&type_array__Arrayopts__Option
);
644 { /* var54 = array_instance Array[Option] */
646 var56
= NEW_array__NativeArray(var55
, &type_array__NativeArrayopts__Option
);
647 ((struct instance_array__NativeArray
*)var56
)->values
[0] = (val
*) var39
;
648 ((struct instance_array__NativeArray
*)var56
)->values
[1] = (val
*) var42
;
649 ((struct instance_array__NativeArray
*)var56
)->values
[2] = (val
*) var45
;
650 ((struct instance_array__NativeArray
*)var56
)->values
[3] = (val
*) var48
;
651 ((struct instance_array__NativeArray
*)var56
)->values
[4] = (val
*) var51
;
653 ((void (*)(val
*, val
*, long))(var54
->class->vft
[COLOR_array__Array__with_native
]))(var54
, var56
, var55
) /* with_native on <var54:Array[Option]>*/;
657 opts__OptionContext__add_option(var36
, var54
); /* Direct call opts#OptionContext#add_option on <var36:OptionContext>*/
660 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
661 var59
= self
->attrs
[COLOR_toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
662 if (unlikely(var59
== NULL
)) {
663 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
664 PRINT_ERROR(" (%s:%d)\n", "src/toolcontext.nit", 166);
672 { /* Inline separate_compiler#ToolContext#opt_colo_dead_methods (self) on <self:ToolContext> */
673 var62
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_colo_dead_methods
].val
; /* _opt_colo_dead_methods on <self:ToolContext> */
674 if (unlikely(var62
== NULL
)) {
675 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_colo_dead_methods");
676 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 42);
683 var63
= NEW_array__Array(&type_array__Arrayopts__Option
);
684 { /* var63 = array_instance Array[Option] */
686 var65
= NEW_array__NativeArray(var64
, &type_array__NativeArrayopts__Option
);
687 ((struct instance_array__NativeArray
*)var65
)->values
[0] = (val
*) var60
;
689 ((void (*)(val
*, val
*, long))(var63
->class->vft
[COLOR_array__Array__with_native
]))(var63
, var65
, var64
) /* with_native on <var63:Array[Option]>*/;
693 opts__OptionContext__add_option(var57
, var63
); /* Direct call opts#OptionContext#add_option on <var57:OptionContext>*/
696 { /* Inline toolcontext#ToolContext#option_context (self) on <self:ToolContext> */
697 var68
= self
->attrs
[COLOR_toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
698 if (unlikely(var68
== NULL
)) {
699 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
700 PRINT_ERROR(" (%s:%d)\n", "src/toolcontext.nit", 166);
708 { /* Inline separate_compiler#ToolContext#opt_tables_metrics (self) on <self:ToolContext> */
709 var71
= self
->attrs
[COLOR_separate_compiler__ToolContext___opt_tables_metrics
].val
; /* _opt_tables_metrics on <self:ToolContext> */
710 if (unlikely(var71
== NULL
)) {
711 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_tables_metrics");
712 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 44);
719 var72
= NEW_array__Array(&type_array__Arrayopts__Option
);
720 { /* var72 = array_instance Array[Option] */
722 var74
= NEW_array__NativeArray(var73
, &type_array__NativeArrayopts__Option
);
723 ((struct instance_array__NativeArray
*)var74
)->values
[0] = (val
*) var69
;
725 ((void (*)(val
*, val
*, long))(var72
->class->vft
[COLOR_array__Array__with_native
]))(var72
, var74
, var73
) /* with_native on <var72:Array[Option]>*/;
729 opts__OptionContext__add_option(var66
, var72
); /* Direct call opts#OptionContext#add_option on <var66:OptionContext>*/
733 /* method separate_compiler#ToolContext#init for (self: Object) */
734 void VIRTUAL_separate_compiler__ToolContext__init(val
* self
) {
735 separate_compiler__ToolContext__init(self
); /* Direct call separate_compiler#ToolContext#init on <self:Object(ToolContext)>*/
738 /* method separate_compiler#ToolContext#process_options for (self: ToolContext, Sequence[String]) */
739 void separate_compiler__ToolContext__process_options(val
* self
, val
* p0
) {
740 val
* var_args
/* var args: Sequence[String] */;
741 val
* var_tc
/* var tc: ToolContext */;
742 val
* var
/* : OptionBool */;
743 val
* var2
/* : OptionBool */;
744 val
* var3
/* : nullable Object */;
745 val
* var5
/* : nullable Object */;
746 short int var6
/* : Bool */;
747 val
* var7
/* : OptionBool */;
748 val
* var9
/* : OptionBool */;
749 short int var10
/* : Bool */;
750 short int var12
/* : Bool */;
753 const struct type
* type_struct
;
754 const char* var_class_name
;
755 val
* var13
/* : nullable Object */;
756 val
* var14
/* : OptionBool */;
757 val
* var16
/* : OptionBool */;
758 short int var17
/* : Bool */;
759 short int var19
/* : Bool */;
762 const struct type
* type_struct22
;
763 const char* var_class_name23
;
764 val
* var24
/* : nullable Object */;
765 val
* var25
/* : OptionBool */;
766 val
* var27
/* : OptionBool */;
767 short int var28
/* : Bool */;
768 short int var30
/* : Bool */;
771 const struct type
* type_struct33
;
772 const char* var_class_name34
;
773 val
* var35
/* : nullable Object */;
774 val
* var36
/* : OptionBool */;
775 val
* var38
/* : OptionBool */;
776 short int var39
/* : Bool */;
777 short int var41
/* : Bool */;
780 const struct type
* type_struct44
;
781 const char* var_class_name45
;
782 val
* var46
/* : nullable Object */;
785 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_separate_compiler__ToolContext__process_options
]))(self
, p0
) /* process_options on <self:ToolContext>*/;
789 { /* Inline separate_compiler#ToolContext#opt_semi_global (var_tc) on <var_tc:ToolContext> */
790 var2
= var_tc
->attrs
[COLOR_separate_compiler__ToolContext___opt_semi_global
].val
; /* _opt_semi_global on <var_tc:ToolContext> */
791 if (unlikely(var2
== NULL
)) {
792 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_semi_global");
793 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 40);
801 { /* Inline opts#Option#value (var) on <var:OptionBool> */
802 var5
= var
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var:OptionBool> */
807 var6
= ((struct instance_kernel__Bool
*)var3
)->value
; /* autounbox from nullable Object to Bool */;
810 { /* Inline separate_compiler#ToolContext#opt_inline_coloring_numbers (var_tc) on <var_tc:ToolContext> */
811 var9
= var_tc
->attrs
[COLOR_separate_compiler__ToolContext___opt_inline_coloring_numbers
].val
; /* _opt_inline_coloring_numbers on <var_tc:ToolContext> */
812 if (unlikely(var9
== NULL
)) {
813 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_coloring_numbers");
814 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 32);
823 { /* Inline opts#Option#value= (var7,var10) on <var7:OptionBool> */
824 /* Covariant cast for argument 0 (value) <var10:Bool> isa VALUE */
825 /* <var10:Bool> isa VALUE */
826 type_struct
= var7
->type
->resolution_table
->types
[COLOR_opts__Option_VTVALUE
];
827 cltype
= type_struct
->color
;
828 idtype
= type_struct
->id
;
829 if(cltype
>= (&type_kernel__Bool
)->table_size
) {
832 var12
= (&type_kernel__Bool
)->type_table
[cltype
] == idtype
;
834 if (unlikely(!var12
)) {
835 var_class_name
= type_kernel__Bool
.name
;
836 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "VALUE", var_class_name
);
837 PRINT_ERROR(" (%s:%d)\n", "lib/opts.nit", 40);
840 var13
= BOX_kernel__Bool(var10
); /* autobox from Bool to nullable Object */
841 var7
->attrs
[COLOR_opts__Option___value
].val
= var13
; /* _value on <var7:OptionBool> */
846 { /* Inline separate_compiler#ToolContext#opt_inline_some_methods (var_tc) on <var_tc:ToolContext> */
847 var16
= var_tc
->attrs
[COLOR_separate_compiler__ToolContext___opt_inline_some_methods
].val
; /* _opt_inline_some_methods on <var_tc:ToolContext> */
848 if (unlikely(var16
== NULL
)) {
849 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_some_methods");
850 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 34);
859 { /* Inline opts#Option#value= (var14,var17) on <var14:OptionBool> */
860 /* Covariant cast for argument 0 (value) <var17:Bool> isa VALUE */
861 /* <var17:Bool> isa VALUE */
862 type_struct22
= var14
->type
->resolution_table
->types
[COLOR_opts__Option_VTVALUE
];
863 cltype20
= type_struct22
->color
;
864 idtype21
= type_struct22
->id
;
865 if(cltype20
>= (&type_kernel__Bool
)->table_size
) {
868 var19
= (&type_kernel__Bool
)->type_table
[cltype20
] == idtype21
;
870 if (unlikely(!var19
)) {
871 var_class_name23
= type_kernel__Bool
.name
;
872 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "VALUE", var_class_name23
);
873 PRINT_ERROR(" (%s:%d)\n", "lib/opts.nit", 40);
876 var24
= BOX_kernel__Bool(var17
); /* autobox from Bool to nullable Object */
877 var14
->attrs
[COLOR_opts__Option___value
].val
= var24
; /* _value on <var14:OptionBool> */
882 { /* Inline separate_compiler#ToolContext#opt_direct_call_monomorph (var_tc) on <var_tc:ToolContext> */
883 var27
= var_tc
->attrs
[COLOR_separate_compiler__ToolContext___opt_direct_call_monomorph
].val
; /* _opt_direct_call_monomorph on <var_tc:ToolContext> */
884 if (unlikely(var27
== NULL
)) {
885 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_direct_call_monomorph");
886 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 36);
895 { /* Inline opts#Option#value= (var25,var28) on <var25:OptionBool> */
896 /* Covariant cast for argument 0 (value) <var28:Bool> isa VALUE */
897 /* <var28:Bool> isa VALUE */
898 type_struct33
= var25
->type
->resolution_table
->types
[COLOR_opts__Option_VTVALUE
];
899 cltype31
= type_struct33
->color
;
900 idtype32
= type_struct33
->id
;
901 if(cltype31
>= (&type_kernel__Bool
)->table_size
) {
904 var30
= (&type_kernel__Bool
)->type_table
[cltype31
] == idtype32
;
906 if (unlikely(!var30
)) {
907 var_class_name34
= type_kernel__Bool
.name
;
908 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "VALUE", var_class_name34
);
909 PRINT_ERROR(" (%s:%d)\n", "lib/opts.nit", 40);
912 var35
= BOX_kernel__Bool(var28
); /* autobox from Bool to nullable Object */
913 var25
->attrs
[COLOR_opts__Option___value
].val
= var35
; /* _value on <var25:OptionBool> */
918 { /* Inline separate_compiler#ToolContext#opt_skip_dead_methods (var_tc) on <var_tc:ToolContext> */
919 var38
= var_tc
->attrs
[COLOR_separate_compiler__ToolContext___opt_skip_dead_methods
].val
; /* _opt_skip_dead_methods on <var_tc:ToolContext> */
920 if (unlikely(var38
== NULL
)) {
921 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_skip_dead_methods");
922 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 38);
931 { /* Inline opts#Option#value= (var36,var39) on <var36:OptionBool> */
932 /* Covariant cast for argument 0 (value) <var39:Bool> isa VALUE */
933 /* <var39:Bool> isa VALUE */
934 type_struct44
= var36
->type
->resolution_table
->types
[COLOR_opts__Option_VTVALUE
];
935 cltype42
= type_struct44
->color
;
936 idtype43
= type_struct44
->id
;
937 if(cltype42
>= (&type_kernel__Bool
)->table_size
) {
940 var41
= (&type_kernel__Bool
)->type_table
[cltype42
] == idtype43
;
942 if (unlikely(!var41
)) {
943 var_class_name45
= type_kernel__Bool
.name
;
944 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "VALUE", var_class_name45
);
945 PRINT_ERROR(" (%s:%d)\n", "lib/opts.nit", 40);
948 var46
= BOX_kernel__Bool(var39
); /* autobox from Bool to nullable Object */
949 var36
->attrs
[COLOR_opts__Option___value
].val
= var46
; /* _value on <var36:OptionBool> */
957 /* method separate_compiler#ToolContext#process_options for (self: Object, Sequence[String]) */
958 void VIRTUAL_separate_compiler__ToolContext__process_options(val
* self
, val
* p0
) {
959 separate_compiler__ToolContext__process_options(self
, p0
); /* Direct call separate_compiler#ToolContext#process_options on <self:Object(ToolContext)>*/
962 /* method separate_compiler#SeparateCompilerPhase#process_mainmodule for (self: SeparateCompilerPhase, MModule, SequenceRead[MModule]) */
963 void separate_compiler__SeparateCompilerPhase__process_mainmodule(val
* self
, val
* p0
, val
* p1
) {
964 val
* var_mainmodule
/* var mainmodule: MModule */;
965 val
* var_given_mmodules
/* var given_mmodules: SequenceRead[MModule] */;
966 val
* var
/* : ToolContext */;
967 val
* var2
/* : ToolContext */;
968 val
* var3
/* : OptionBool */;
969 val
* var5
/* : OptionBool */;
970 val
* var6
/* : nullable Object */;
971 val
* var8
/* : nullable Object */;
972 short int var9
/* : Bool */;
973 short int var10
/* : Bool */;
974 val
* var11
/* : ToolContext */;
975 val
* var13
/* : ToolContext */;
976 val
* var14
/* : ModelBuilder */;
977 val
* var_modelbuilder
/* var modelbuilder: ModelBuilder */;
978 val
* var15
/* : RapidTypeAnalysis */;
979 val
* var_analysis
/* var analysis: RapidTypeAnalysis */;
981 var_given_mmodules
= p1
;
983 { /* Inline phase#Phase#toolcontext (self) on <self:SeparateCompilerPhase> */
984 var2
= self
->attrs
[COLOR_phase__Phase___toolcontext
].val
; /* _toolcontext on <self:SeparateCompilerPhase> */
985 if (unlikely(var2
== NULL
)) {
986 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
987 PRINT_ERROR(" (%s:%d)\n", "src/phase.nit", 145);
995 { /* Inline separate_compiler#ToolContext#opt_separate (var) on <var:ToolContext> */
996 var5
= var
->attrs
[COLOR_separate_compiler__ToolContext___opt_separate
].val
; /* _opt_separate on <var:ToolContext> */
997 if (unlikely(var5
== NULL
)) {
998 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_separate");
999 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 24);
1007 { /* Inline opts#Option#value (var3) on <var3:OptionBool> */
1008 var8
= var3
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var3:OptionBool> */
1013 var9
= ((struct instance_kernel__Bool
*)var6
)->value
; /* autounbox from nullable Object to Bool */;
1020 { /* Inline phase#Phase#toolcontext (self) on <self:SeparateCompilerPhase> */
1021 var13
= self
->attrs
[COLOR_phase__Phase___toolcontext
].val
; /* _toolcontext on <self:SeparateCompilerPhase> */
1022 if (unlikely(var13
== NULL
)) {
1023 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1024 PRINT_ERROR(" (%s:%d)\n", "src/phase.nit", 145);
1028 RET_LABEL12
:(void)0;
1032 var14
= modelbuilder__ToolContext__modelbuilder(var11
);
1034 var_modelbuilder
= var14
;
1036 var15
= rapid_type_analysis__ModelBuilder__do_rapid_type_analysis(var_modelbuilder
, var_mainmodule
);
1038 var_analysis
= var15
;
1040 separate_compiler__ModelBuilder__run_separate_compiler(var_modelbuilder
, var_mainmodule
, var_analysis
); /* Direct call separate_compiler#ModelBuilder#run_separate_compiler on <var_modelbuilder:ModelBuilder>*/
1044 /* method separate_compiler#SeparateCompilerPhase#process_mainmodule for (self: Object, MModule, SequenceRead[MModule]) */
1045 void VIRTUAL_separate_compiler__SeparateCompilerPhase__process_mainmodule(val
* self
, val
* p0
, val
* p1
) {
1046 separate_compiler__SeparateCompilerPhase__process_mainmodule(self
, p0
, p1
); /* Direct call separate_compiler#SeparateCompilerPhase#process_mainmodule on <self:Object(SeparateCompilerPhase)>*/
1049 /* method separate_compiler#ModelBuilder#run_separate_compiler for (self: ModelBuilder, MModule, nullable RapidTypeAnalysis) */
1050 void separate_compiler__ModelBuilder__run_separate_compiler(val
* self
, val
* p0
, val
* p1
) {
1051 val
* var_mainmodule
/* var mainmodule: MModule */;
1052 val
* var_runtime_type_analysis
/* var runtime_type_analysis: nullable RapidTypeAnalysis */;
1053 long var
/* : Int */;
1054 long var2
/* : Int */;
1055 long var_time0
/* var time0: Int */;
1056 val
* var3
/* : ToolContext */;
1057 val
* var5
/* : ToolContext */;
1058 static val
* varonce
;
1059 val
* var6
/* : String */;
1060 char* var7
/* : NativeString */;
1061 long var8
/* : Int */;
1062 val
* var9
/* : FlatString */;
1063 long var10
/* : Int */;
1064 val
* var11
/* : SeparateCompiler */;
1065 val
* var_compiler
/* var compiler: SeparateCompiler */;
1066 val
* var12
/* : ToolContext */;
1067 val
* var14
/* : ToolContext */;
1068 static val
* varonce15
;
1069 val
* var16
/* : String */;
1070 char* var17
/* : NativeString */;
1071 long var18
/* : Int */;
1072 val
* var19
/* : FlatString */;
1073 long var20
/* : Int */;
1074 val
* var21
/* : String */;
1075 val
* var23
/* : String */;
1076 static val
* varonce24
;
1077 val
* var25
/* : String */;
1078 char* var26
/* : NativeString */;
1079 long var27
/* : Int */;
1080 val
* var28
/* : FlatString */;
1081 val
* var29
/* : Array[Object] */;
1082 long var30
/* : Int */;
1083 val
* var31
/* : NativeArray[Object] */;
1084 val
* var32
/* : String */;
1085 val
* var33
/* : CodeFile */;
1086 val
* var34
/* : POSetElement[MModule] */;
1087 val
* var36
/* : POSetElement[MModule] */;
1088 val
* var37
/* : Collection[Object] */;
1089 val
* var38
/* : Iterator[nullable Object] */;
1090 short int var39
/* : Bool */;
1091 val
* var40
/* : nullable Object */;
1092 val
* var_m
/* var m: MModule */;
1093 val
* var41
/* : Array[MClass] */;
1094 val
* var43
/* : Array[MClass] */;
1095 val
* var44
/* : ArrayIterator[nullable Object] */;
1096 short int var45
/* : Bool */;
1097 val
* var46
/* : nullable Object */;
1098 val
* var_mclass
/* var mclass: MClass */;
1099 short int var47
/* : Bool */;
1100 val
* var48
/* : MClassKind */;
1101 val
* var50
/* : MClassKind */;
1102 val
* var51
/* : MClassKind */;
1103 short int var52
/* : Bool */;
1104 short int var53
/* : Bool */;
1105 val
* var_other
/* var other: nullable Object */;
1106 short int var55
/* : Bool */;
1107 short int var57
/* : Bool */;
1108 short int var_
/* var : Bool */;
1109 val
* var58
/* : MClassKind */;
1110 val
* var60
/* : MClassKind */;
1111 val
* var61
/* : MClassKind */;
1112 short int var62
/* : Bool */;
1113 short int var63
/* : Bool */;
1114 short int var65
/* : Bool */;
1115 short int var67
/* : Bool */;
1116 val
* var69
/* : String */;
1117 val
* var71
/* : String */;
1118 static val
* varonce72
;
1119 val
* var73
/* : String */;
1120 char* var74
/* : NativeString */;
1121 long var75
/* : Int */;
1122 val
* var76
/* : FlatString */;
1123 val
* var77
/* : Array[Object] */;
1124 long var78
/* : Int */;
1125 val
* var79
/* : NativeArray[Object] */;
1126 val
* var80
/* : String */;
1127 val
* var81
/* : CodeFile */;
1128 val
* var82
/* : POSetElement[MModule] */;
1129 val
* var84
/* : POSetElement[MModule] */;
1130 val
* var85
/* : Collection[Object] */;
1131 val
* var86
/* : Iterator[nullable Object] */;
1132 short int var87
/* : Bool */;
1133 val
* var88
/* : nullable Object */;
1134 val
* var_m89
/* var m: MModule */;
1135 val
* var90
/* : ToolContext */;
1136 val
* var92
/* : ToolContext */;
1137 static val
* varonce93
;
1138 val
* var94
/* : String */;
1139 char* var95
/* : NativeString */;
1140 long var96
/* : Int */;
1141 val
* var97
/* : FlatString */;
1142 val
* var98
/* : Array[Object] */;
1143 long var99
/* : Int */;
1144 val
* var100
/* : NativeArray[Object] */;
1145 val
* var101
/* : String */;
1146 long var102
/* : Int */;
1147 val
* var103
/* : String */;
1148 val
* var105
/* : String */;
1149 static val
* varonce106
;
1150 val
* var107
/* : String */;
1151 char* var108
/* : NativeString */;
1152 long var109
/* : Int */;
1153 val
* var110
/* : FlatString */;
1154 val
* var111
/* : Array[Object] */;
1155 long var112
/* : Int */;
1156 val
* var113
/* : NativeArray[Object] */;
1157 val
* var114
/* : String */;
1158 val
* var115
/* : CodeFile */;
1159 val
* var117
/* : ToolContext */;
1160 val
* var119
/* : ToolContext */;
1161 static val
* varonce120
;
1162 val
* var121
/* : String */;
1163 char* var122
/* : NativeString */;
1164 long var123
/* : Int */;
1165 val
* var124
/* : FlatString */;
1166 long var125
/* : Int */;
1167 val
* var126
/* : String */;
1168 val
* var128
/* : String */;
1169 static val
* varonce129
;
1170 val
* var130
/* : String */;
1171 char* var131
/* : NativeString */;
1172 long var132
/* : Int */;
1173 val
* var133
/* : FlatString */;
1174 val
* var134
/* : Array[Object] */;
1175 long var135
/* : Int */;
1176 val
* var136
/* : NativeArray[Object] */;
1177 val
* var137
/* : String */;
1178 val
* var138
/* : CodeFile */;
1179 val
* var139
/* : POSet[MType] */;
1180 val
* var_mtypes
/* var mtypes: POSet[MType] */;
1181 val
* var140
/* : Iterator[Object] */;
1182 short int var141
/* : Bool */;
1183 val
* var142
/* : nullable Object */;
1184 val
* var_t
/* var t: MType */;
1185 val
* var144
/* : Set[MType] */;
1186 val
* var146
/* : Set[MType] */;
1187 val
* var147
/* : Iterator[nullable Object] */;
1188 short int var148
/* : Bool */;
1189 val
* var149
/* : nullable Object */;
1190 val
* var_t150
/* var t: MType */;
1191 short int var151
/* : Bool */;
1192 long var153
/* : Int */;
1193 long var155
/* : Int */;
1194 long var_time1
/* var time1: Int */;
1195 val
* var156
/* : ToolContext */;
1196 val
* var158
/* : ToolContext */;
1197 static val
* varonce159
;
1198 val
* var160
/* : String */;
1199 char* var161
/* : NativeString */;
1200 long var162
/* : Int */;
1201 val
* var163
/* : FlatString */;
1202 long var164
/* : Int */;
1203 short int var166
/* : Bool */;
1206 const char* var_class_name
;
1207 long var167
/* : Int */;
1208 static val
* varonce168
;
1209 val
* var169
/* : String */;
1210 char* var170
/* : NativeString */;
1211 long var171
/* : Int */;
1212 val
* var172
/* : FlatString */;
1213 val
* var173
/* : Array[Object] */;
1214 long var174
/* : Int */;
1215 val
* var175
/* : NativeArray[Object] */;
1216 val
* var176
/* : Object */;
1217 val
* var177
/* : String */;
1218 long var178
/* : Int */;
1219 var_mainmodule
= p0
;
1220 var_runtime_type_analysis
= p1
;
1222 { /* Inline time#Object#get_time (self) on <self:ModelBuilder> */
1223 var2
= kernel_Any_Any_get_time_0(self
);
1231 { /* Inline modelbuilder#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
1232 var5
= self
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
1233 if (unlikely(var5
== NULL
)) {
1234 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1235 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
1245 var7
= "*** GENERATING C ***";
1247 var9
= string__NativeString__to_s_with_length(var7
, var8
);
1253 toolcontext__ToolContext__info(var3
, var6
, var10
); /* Direct call toolcontext#ToolContext#info on <var3:ToolContext>*/
1255 var11
= NEW_separate_compiler__SeparateCompiler(&type_separate_compiler__SeparateCompiler
);
1257 separate_compiler__SeparateCompiler__init(var11
, var_mainmodule
, self
, var_runtime_type_analysis
); /* Direct call separate_compiler#SeparateCompiler#init on <var11:SeparateCompiler>*/
1259 var_compiler
= var11
;
1261 abstract_compiler__AbstractCompiler__compile_header(var_compiler
); /* Direct call abstract_compiler#AbstractCompiler#compile_header on <var_compiler:SeparateCompiler>*/
1264 { /* Inline modelbuilder#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
1265 var14
= self
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
1266 if (unlikely(var14
== NULL
)) {
1267 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1268 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
1272 RET_LABEL13
:(void)0;
1278 var17
= "Property coloring";
1280 var19
= string__NativeString__to_s_with_length(var17
, var18
);
1286 toolcontext__ToolContext__info(var12
, var16
, var20
); /* Direct call toolcontext#ToolContext#info on <var12:ToolContext>*/
1289 { /* Inline mmodule#MModule#name (var_mainmodule) on <var_mainmodule:MModule> */
1290 var23
= var_mainmodule
->attrs
[COLOR_mmodule__MModule___name
].val
; /* _name on <var_mainmodule:MModule> */
1291 if (unlikely(var23
== NULL
)) {
1292 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _name");
1293 PRINT_ERROR(" (%s:%d)\n", "src/model/mmodule.nit", 86);
1297 RET_LABEL22
:(void)0;
1305 var28
= string__NativeString__to_s_with_length(var26
, var27
);
1309 var29
= NEW_array__Array(&type_array__Arraykernel__Object
);
1310 { /* var29 = array_instance Array[Object] */
1312 var31
= NEW_array__NativeArray(var30
, &type_array__NativeArraykernel__Object
);
1313 ((struct instance_array__NativeArray
*)var31
)->values
[0] = (val
*) var21
;
1314 ((struct instance_array__NativeArray
*)var31
)->values
[1] = (val
*) var25
;
1316 ((void (*)(val
*, val
*, long))(var29
->class->vft
[COLOR_array__Array__with_native
]))(var29
, var31
, var30
) /* with_native on <var29:Array[Object]>*/;
1320 var32
= ((val
* (*)(val
*))(var29
->class->vft
[COLOR_string__Object__to_s
]))(var29
) /* to_s on <var29:Array[Object]>*/;
1323 var33
= abstract_compiler__AbstractCompiler__new_file(var_compiler
, var32
);
1327 separate_compiler__SeparateCompiler__do_property_coloring(var_compiler
); /* Direct call separate_compiler#SeparateCompiler#do_property_coloring on <var_compiler:SeparateCompiler>*/
1330 { /* Inline mmodule#MModule#in_importation (var_mainmodule) on <var_mainmodule:MModule> */
1331 var36
= var_mainmodule
->attrs
[COLOR_mmodule__MModule___in_importation
].val
; /* _in_importation on <var_mainmodule:MModule> */
1332 if (unlikely(var36
== NULL
)) {
1333 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _in_importation");
1334 PRINT_ERROR(" (%s:%d)\n", "src/model/mmodule.nit", 101);
1338 RET_LABEL35
:(void)0;
1342 var37
= poset__POSetElement__greaters(var34
);
1345 var38
= ((val
* (*)(val
*))(var37
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var37
) /* iterator on <var37:Collection[Object](Collection[MModule])>*/;
1349 var39
= ((short int (*)(val
*))(var38
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var38
) /* is_ok on <var38:Iterator[nullable Object]>*/;
1353 var40
= ((val
* (*)(val
*))(var38
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var38
) /* item on <var38:Iterator[nullable Object]>*/;
1357 { /* Inline model#MModule#intro_mclasses (var_m) on <var_m:MModule> */
1358 var43
= var_m
->attrs
[COLOR_model__MModule___intro_mclasses
].val
; /* _intro_mclasses on <var_m:MModule> */
1359 if (unlikely(var43
== NULL
)) {
1360 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _intro_mclasses");
1361 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 138);
1365 RET_LABEL42
:(void)0;
1369 var44
= array__AbstractArrayRead__iterator(var41
);
1373 var45
= array__ArrayIterator__is_ok(var44
);
1377 var46
= array__ArrayIterator__item(var44
);
1381 { /* Inline model#MClass#kind (var_mclass) on <var_mclass:MClass> */
1382 var50
= var_mclass
->attrs
[COLOR_model__MClass___kind
].val
; /* _kind on <var_mclass:MClass> */
1383 if (unlikely(var50
== NULL
)) {
1384 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _kind");
1385 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 355);
1389 RET_LABEL49
:(void)0;
1393 var51
= model__Object__abstract_kind(self
);
1396 { /* Inline kernel#Object#== (var48,var51) on <var48:MClassKind> */
1399 { /* Inline kernel#Object#is_same_instance (var48,var_other) on <var48:MClassKind> */
1400 var57
= var48
== var_other
;
1403 RET_LABEL56
:(void)0;
1408 RET_LABEL54
:(void)0;
1417 { /* Inline model#MClass#kind (var_mclass) on <var_mclass:MClass> */
1418 var60
= var_mclass
->attrs
[COLOR_model__MClass___kind
].val
; /* _kind on <var_mclass:MClass> */
1419 if (unlikely(var60
== NULL
)) {
1420 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _kind");
1421 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 355);
1425 RET_LABEL59
:(void)0;
1429 var61
= model__Object__interface_kind(self
);
1432 { /* Inline kernel#Object#== (var58,var61) on <var58:MClassKind> */
1435 { /* Inline kernel#Object#is_same_instance (var58,var_other) on <var58:MClassKind> */
1436 var67
= var58
== var_other
;
1439 RET_LABEL66
:(void)0;
1444 RET_LABEL64
:(void)0;
1451 goto CONTINUE_label
;
1455 ((void (*)(val
*, val
*))(var_compiler
->class->vft
[COLOR_separate_compiler__SeparateCompiler__compile_class_to_c
]))(var_compiler
, var_mclass
) /* compile_class_to_c on <var_compiler:SeparateCompiler>*/;
1457 CONTINUE_label
: (void)0;
1459 array__ArrayIterator__next(var44
); /* Direct call array#ArrayIterator#next on <var44:ArrayIterator[nullable Object]>*/
1462 BREAK_label
: (void)0;
1463 CONTINUE_label68
: (void)0;
1465 ((void (*)(val
*))(var38
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var38
) /* next on <var38:Iterator[nullable Object]>*/;
1468 BREAK_label68
: (void)0;
1470 { /* Inline mmodule#MModule#name (var_mainmodule) on <var_mainmodule:MModule> */
1471 var71
= var_mainmodule
->attrs
[COLOR_mmodule__MModule___name
].val
; /* _name on <var_mainmodule:MModule> */
1472 if (unlikely(var71
== NULL
)) {
1473 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _name");
1474 PRINT_ERROR(" (%s:%d)\n", "src/model/mmodule.nit", 86);
1478 RET_LABEL70
:(void)0;
1486 var76
= string__NativeString__to_s_with_length(var74
, var75
);
1490 var77
= NEW_array__Array(&type_array__Arraykernel__Object
);
1491 { /* var77 = array_instance Array[Object] */
1493 var79
= NEW_array__NativeArray(var78
, &type_array__NativeArraykernel__Object
);
1494 ((struct instance_array__NativeArray
*)var79
)->values
[0] = (val
*) var69
;
1495 ((struct instance_array__NativeArray
*)var79
)->values
[1] = (val
*) var73
;
1497 ((void (*)(val
*, val
*, long))(var77
->class->vft
[COLOR_array__Array__with_native
]))(var77
, var79
, var78
) /* with_native on <var77:Array[Object]>*/;
1501 var80
= ((val
* (*)(val
*))(var77
->class->vft
[COLOR_string__Object__to_s
]))(var77
) /* to_s on <var77:Array[Object]>*/;
1504 var81
= abstract_compiler__AbstractCompiler__new_file(var_compiler
, var80
);
1508 abstract_compiler__AbstractCompiler__compile_nitni_global_ref_functions(var_compiler
); /* Direct call abstract_compiler#AbstractCompiler#compile_nitni_global_ref_functions on <var_compiler:SeparateCompiler>*/
1511 abstract_compiler__AbstractCompiler__compile_main_function(var_compiler
); /* Direct call abstract_compiler#AbstractCompiler#compile_main_function on <var_compiler:SeparateCompiler>*/
1514 { /* Inline mmodule#MModule#in_importation (var_mainmodule) on <var_mainmodule:MModule> */
1515 var84
= var_mainmodule
->attrs
[COLOR_mmodule__MModule___in_importation
].val
; /* _in_importation on <var_mainmodule:MModule> */
1516 if (unlikely(var84
== NULL
)) {
1517 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _in_importation");
1518 PRINT_ERROR(" (%s:%d)\n", "src/model/mmodule.nit", 101);
1522 RET_LABEL83
:(void)0;
1526 var85
= poset__POSetElement__greaters(var82
);
1529 var86
= ((val
* (*)(val
*))(var85
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var85
) /* iterator on <var85:Collection[Object](Collection[MModule])>*/;
1533 var87
= ((short int (*)(val
*))(var86
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var86
) /* is_ok on <var86:Iterator[nullable Object]>*/;
1537 var88
= ((val
* (*)(val
*))(var86
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var86
) /* item on <var86:Iterator[nullable Object]>*/;
1541 { /* Inline modelbuilder#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
1542 var92
= self
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
1543 if (unlikely(var92
== NULL
)) {
1544 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1545 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
1549 RET_LABEL91
:(void)0;
1555 var95
= "Generate C for module ";
1557 var97
= string__NativeString__to_s_with_length(var95
, var96
);
1561 var98
= NEW_array__Array(&type_array__Arraykernel__Object
);
1562 { /* var98 = array_instance Array[Object] */
1564 var100
= NEW_array__NativeArray(var99
, &type_array__NativeArraykernel__Object
);
1565 ((struct instance_array__NativeArray
*)var100
)->values
[0] = (val
*) var94
;
1566 ((struct instance_array__NativeArray
*)var100
)->values
[1] = (val
*) var_m89
;
1568 ((void (*)(val
*, val
*, long))(var98
->class->vft
[COLOR_array__Array__with_native
]))(var98
, var100
, var99
) /* with_native on <var98:Array[Object]>*/;
1572 var101
= ((val
* (*)(val
*))(var98
->class->vft
[COLOR_string__Object__to_s
]))(var98
) /* to_s on <var98:Array[Object]>*/;
1576 toolcontext__ToolContext__info(var90
, var101
, var102
); /* Direct call toolcontext#ToolContext#info on <var90:ToolContext>*/
1579 { /* Inline mmodule#MModule#name (var_m89) on <var_m89:MModule> */
1580 var105
= var_m89
->attrs
[COLOR_mmodule__MModule___name
].val
; /* _name on <var_m89:MModule> */
1581 if (unlikely(var105
== NULL
)) {
1582 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _name");
1583 PRINT_ERROR(" (%s:%d)\n", "src/model/mmodule.nit", 86);
1587 RET_LABEL104
:(void)0;
1591 var107
= varonce106
;
1595 var110
= string__NativeString__to_s_with_length(var108
, var109
);
1597 varonce106
= var107
;
1599 var111
= NEW_array__Array(&type_array__Arraykernel__Object
);
1600 { /* var111 = array_instance Array[Object] */
1602 var113
= NEW_array__NativeArray(var112
, &type_array__NativeArraykernel__Object
);
1603 ((struct instance_array__NativeArray
*)var113
)->values
[0] = (val
*) var103
;
1604 ((struct instance_array__NativeArray
*)var113
)->values
[1] = (val
*) var107
;
1606 ((void (*)(val
*, val
*, long))(var111
->class->vft
[COLOR_array__Array__with_native
]))(var111
, var113
, var112
) /* with_native on <var111:Array[Object]>*/;
1610 var114
= ((val
* (*)(val
*))(var111
->class->vft
[COLOR_string__Object__to_s
]))(var111
) /* to_s on <var111:Array[Object]>*/;
1613 var115
= abstract_compiler__AbstractCompiler__new_file(var_compiler
, var114
);
1617 separate_compiler__SeparateCompiler__compile_module_to_c(var_compiler
, var_m89
); /* Direct call separate_compiler#SeparateCompiler#compile_module_to_c on <var_compiler:SeparateCompiler>*/
1619 CONTINUE_label116
: (void)0;
1621 ((void (*)(val
*))(var86
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var86
) /* next on <var86:Iterator[nullable Object]>*/;
1624 BREAK_label116
: (void)0;
1626 { /* Inline modelbuilder#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
1627 var119
= self
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
1628 if (unlikely(var119
== NULL
)) {
1629 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1630 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
1634 RET_LABEL118
:(void)0;
1638 var121
= varonce120
;
1640 var122
= "Type coloring";
1642 var124
= string__NativeString__to_s_with_length(var122
, var123
);
1644 varonce120
= var121
;
1648 toolcontext__ToolContext__info(var117
, var121
, var125
); /* Direct call toolcontext#ToolContext#info on <var117:ToolContext>*/
1651 { /* Inline mmodule#MModule#name (var_mainmodule) on <var_mainmodule:MModule> */
1652 var128
= var_mainmodule
->attrs
[COLOR_mmodule__MModule___name
].val
; /* _name on <var_mainmodule:MModule> */
1653 if (unlikely(var128
== NULL
)) {
1654 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _name");
1655 PRINT_ERROR(" (%s:%d)\n", "src/model/mmodule.nit", 86);
1659 RET_LABEL127
:(void)0;
1663 var130
= varonce129
;
1667 var133
= string__NativeString__to_s_with_length(var131
, var132
);
1669 varonce129
= var130
;
1671 var134
= NEW_array__Array(&type_array__Arraykernel__Object
);
1672 { /* var134 = array_instance Array[Object] */
1674 var136
= NEW_array__NativeArray(var135
, &type_array__NativeArraykernel__Object
);
1675 ((struct instance_array__NativeArray
*)var136
)->values
[0] = (val
*) var126
;
1676 ((struct instance_array__NativeArray
*)var136
)->values
[1] = (val
*) var130
;
1678 ((void (*)(val
*, val
*, long))(var134
->class->vft
[COLOR_array__Array__with_native
]))(var134
, var136
, var135
) /* with_native on <var134:Array[Object]>*/;
1682 var137
= ((val
* (*)(val
*))(var134
->class->vft
[COLOR_string__Object__to_s
]))(var134
) /* to_s on <var134:Array[Object]>*/;
1685 var138
= abstract_compiler__AbstractCompiler__new_file(var_compiler
, var137
);
1689 var139
= separate_compiler__SeparateCompiler__do_type_coloring(var_compiler
);
1691 var_mtypes
= var139
;
1693 var140
= poset__POSet__iterator(var_mtypes
);
1697 var141
= ((short int (*)(val
*))(var140
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var140
) /* is_ok on <var140:Iterator[Object]>*/;
1701 var142
= ((val
* (*)(val
*))(var140
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var140
) /* item on <var140:Iterator[Object]>*/;
1705 separate_compiler__SeparateCompiler__compile_type_to_c(var_compiler
, var_t
); /* Direct call separate_compiler#SeparateCompiler#compile_type_to_c on <var_compiler:SeparateCompiler>*/
1707 CONTINUE_label143
: (void)0;
1709 ((void (*)(val
*))(var140
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var140
) /* next on <var140:Iterator[Object]>*/;
1712 BREAK_label143
: (void)0;
1714 { /* Inline separate_compiler#SeparateCompiler#undead_types (var_compiler) on <var_compiler:SeparateCompiler> */
1715 var146
= var_compiler
->attrs
[COLOR_separate_compiler__SeparateCompiler___undead_types
].val
; /* _undead_types on <var_compiler:SeparateCompiler> */
1716 if (unlikely(var146
== NULL
)) {
1717 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _undead_types");
1718 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 155);
1722 RET_LABEL145
:(void)0;
1726 var147
= ((val
* (*)(val
*))(var144
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var144
) /* iterator on <var144:Set[MType]>*/;
1730 var148
= ((short int (*)(val
*))(var147
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var147
) /* is_ok on <var147:Iterator[nullable Object]>*/;
1734 var149
= ((val
* (*)(val
*))(var147
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var147
) /* item on <var147:Iterator[nullable Object]>*/;
1738 var151
= poset__POSet__has(var_mtypes
, var_t150
);
1741 goto CONTINUE_label152
;
1745 separate_compiler__SeparateCompiler__compile_type_to_c(var_compiler
, var_t150
); /* Direct call separate_compiler#SeparateCompiler#compile_type_to_c on <var_compiler:SeparateCompiler>*/
1747 CONTINUE_label152
: (void)0;
1749 ((void (*)(val
*))(var147
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var147
) /* next on <var147:Iterator[nullable Object]>*/;
1752 BREAK_label152
: (void)0;
1754 separate_compiler__SeparateCompiler__display_stats(var_compiler
); /* Direct call separate_compiler#SeparateCompiler#display_stats on <var_compiler:SeparateCompiler>*/
1757 { /* Inline time#Object#get_time (self) on <self:ModelBuilder> */
1758 var155
= kernel_Any_Any_get_time_0(self
);
1761 RET_LABEL154
:(void)0;
1766 { /* Inline modelbuilder#ModelBuilder#toolcontext (self) on <self:ModelBuilder> */
1767 var158
= self
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <self:ModelBuilder> */
1768 if (unlikely(var158
== NULL
)) {
1769 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1770 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
1774 RET_LABEL157
:(void)0;
1778 var160
= varonce159
;
1780 var161
= "*** END GENERATING C: ";
1782 var163
= string__NativeString__to_s_with_length(var161
, var162
);
1784 varonce159
= var160
;
1787 { /* Inline kernel#Int#- (var_time1,var_time0) on <var_time1:Int> */
1788 /* Covariant cast for argument 0 (i) <var_time0:Int> isa OTHER */
1789 /* <var_time0:Int> isa OTHER */
1790 var166
= 1; /* easy <var_time0:Int> isa OTHER*/
1791 if (unlikely(!var166
)) {
1792 var_class_name
= type_kernel__Int
.name
;
1793 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1794 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 331);
1797 var167
= var_time1
- var_time0
;
1800 RET_LABEL165
:(void)0;
1804 var169
= varonce168
;
1808 var172
= string__NativeString__to_s_with_length(var170
, var171
);
1810 varonce168
= var169
;
1812 var173
= NEW_array__Array(&type_array__Arraykernel__Object
);
1813 { /* var173 = array_instance Array[Object] */
1815 var175
= NEW_array__NativeArray(var174
, &type_array__NativeArraykernel__Object
);
1816 ((struct instance_array__NativeArray
*)var175
)->values
[0] = (val
*) var160
;
1817 var176
= BOX_kernel__Int(var164
); /* autobox from Int to Object */
1818 ((struct instance_array__NativeArray
*)var175
)->values
[1] = (val
*) var176
;
1819 ((struct instance_array__NativeArray
*)var175
)->values
[2] = (val
*) var169
;
1821 ((void (*)(val
*, val
*, long))(var173
->class->vft
[COLOR_array__Array__with_native
]))(var173
, var175
, var174
) /* with_native on <var173:Array[Object]>*/;
1825 var177
= ((val
* (*)(val
*))(var173
->class->vft
[COLOR_string__Object__to_s
]))(var173
) /* to_s on <var173:Array[Object]>*/;
1829 toolcontext__ToolContext__info(var156
, var177
, var178
); /* Direct call toolcontext#ToolContext#info on <var156:ToolContext>*/
1832 abstract_compiler__ModelBuilder__write_and_make(self
, var_compiler
); /* Direct call abstract_compiler#ModelBuilder#write_and_make on <self:ModelBuilder>*/
1836 /* method separate_compiler#ModelBuilder#run_separate_compiler for (self: Object, MModule, nullable RapidTypeAnalysis) */
1837 void VIRTUAL_separate_compiler__ModelBuilder__run_separate_compiler(val
* self
, val
* p0
, val
* p1
) {
1838 separate_compiler__ModelBuilder__run_separate_compiler(self
, p0
, p1
); /* Direct call separate_compiler#ModelBuilder#run_separate_compiler on <self:Object(ModelBuilder)>*/
1841 /* method separate_compiler#ModelBuilder#nb_invok_by_tables for (self: ModelBuilder): Int */
1842 long separate_compiler__ModelBuilder__nb_invok_by_tables(val
* self
) {
1843 long var
/* : Int */;
1844 long var1
/* : Int */;
1845 var1
= self
->attrs
[COLOR_separate_compiler__ModelBuilder___nb_invok_by_tables
].l
; /* _nb_invok_by_tables on <self:ModelBuilder> */
1850 /* method separate_compiler#ModelBuilder#nb_invok_by_tables for (self: Object): Int */
1851 long VIRTUAL_separate_compiler__ModelBuilder__nb_invok_by_tables(val
* self
) {
1852 long var
/* : Int */;
1853 long var1
/* : Int */;
1854 long var3
/* : Int */;
1855 { /* Inline separate_compiler#ModelBuilder#nb_invok_by_tables (self) on <self:Object(ModelBuilder)> */
1856 var3
= self
->attrs
[COLOR_separate_compiler__ModelBuilder___nb_invok_by_tables
].l
; /* _nb_invok_by_tables on <self:Object(ModelBuilder)> */
1864 /* method separate_compiler#ModelBuilder#nb_invok_by_tables= for (self: ModelBuilder, Int) */
1865 void separate_compiler__ModelBuilder__nb_invok_by_tables_61d(val
* self
, long p0
) {
1866 self
->attrs
[COLOR_separate_compiler__ModelBuilder___nb_invok_by_tables
].l
= p0
; /* _nb_invok_by_tables on <self:ModelBuilder> */
1869 /* method separate_compiler#ModelBuilder#nb_invok_by_tables= for (self: Object, Int) */
1870 void VIRTUAL_separate_compiler__ModelBuilder__nb_invok_by_tables_61d(val
* self
, long p0
) {
1871 { /* Inline separate_compiler#ModelBuilder#nb_invok_by_tables= (self,p0) on <self:Object(ModelBuilder)> */
1872 self
->attrs
[COLOR_separate_compiler__ModelBuilder___nb_invok_by_tables
].l
= p0
; /* _nb_invok_by_tables on <self:Object(ModelBuilder)> */
1877 /* method separate_compiler#ModelBuilder#nb_invok_by_direct for (self: ModelBuilder): Int */
1878 long separate_compiler__ModelBuilder__nb_invok_by_direct(val
* self
) {
1879 long var
/* : Int */;
1880 long var1
/* : Int */;
1881 var1
= self
->attrs
[COLOR_separate_compiler__ModelBuilder___nb_invok_by_direct
].l
; /* _nb_invok_by_direct on <self:ModelBuilder> */
1886 /* method separate_compiler#ModelBuilder#nb_invok_by_direct for (self: Object): Int */
1887 long VIRTUAL_separate_compiler__ModelBuilder__nb_invok_by_direct(val
* self
) {
1888 long var
/* : Int */;
1889 long var1
/* : Int */;
1890 long var3
/* : Int */;
1891 { /* Inline separate_compiler#ModelBuilder#nb_invok_by_direct (self) on <self:Object(ModelBuilder)> */
1892 var3
= self
->attrs
[COLOR_separate_compiler__ModelBuilder___nb_invok_by_direct
].l
; /* _nb_invok_by_direct on <self:Object(ModelBuilder)> */
1900 /* method separate_compiler#ModelBuilder#nb_invok_by_direct= for (self: ModelBuilder, Int) */
1901 void separate_compiler__ModelBuilder__nb_invok_by_direct_61d(val
* self
, long p0
) {
1902 self
->attrs
[COLOR_separate_compiler__ModelBuilder___nb_invok_by_direct
].l
= p0
; /* _nb_invok_by_direct on <self:ModelBuilder> */
1905 /* method separate_compiler#ModelBuilder#nb_invok_by_direct= for (self: Object, Int) */
1906 void VIRTUAL_separate_compiler__ModelBuilder__nb_invok_by_direct_61d(val
* self
, long p0
) {
1907 { /* Inline separate_compiler#ModelBuilder#nb_invok_by_direct= (self,p0) on <self:Object(ModelBuilder)> */
1908 self
->attrs
[COLOR_separate_compiler__ModelBuilder___nb_invok_by_direct
].l
= p0
; /* _nb_invok_by_direct on <self:Object(ModelBuilder)> */
1913 /* method separate_compiler#ModelBuilder#nb_invok_by_inline for (self: ModelBuilder): Int */
1914 long separate_compiler__ModelBuilder__nb_invok_by_inline(val
* self
) {
1915 long var
/* : Int */;
1916 long var1
/* : Int */;
1917 var1
= self
->attrs
[COLOR_separate_compiler__ModelBuilder___nb_invok_by_inline
].l
; /* _nb_invok_by_inline on <self:ModelBuilder> */
1922 /* method separate_compiler#ModelBuilder#nb_invok_by_inline for (self: Object): Int */
1923 long VIRTUAL_separate_compiler__ModelBuilder__nb_invok_by_inline(val
* self
) {
1924 long var
/* : Int */;
1925 long var1
/* : Int */;
1926 long var3
/* : Int */;
1927 { /* Inline separate_compiler#ModelBuilder#nb_invok_by_inline (self) on <self:Object(ModelBuilder)> */
1928 var3
= self
->attrs
[COLOR_separate_compiler__ModelBuilder___nb_invok_by_inline
].l
; /* _nb_invok_by_inline on <self:Object(ModelBuilder)> */
1936 /* method separate_compiler#ModelBuilder#nb_invok_by_inline= for (self: ModelBuilder, Int) */
1937 void separate_compiler__ModelBuilder__nb_invok_by_inline_61d(val
* self
, long p0
) {
1938 self
->attrs
[COLOR_separate_compiler__ModelBuilder___nb_invok_by_inline
].l
= p0
; /* _nb_invok_by_inline on <self:ModelBuilder> */
1941 /* method separate_compiler#ModelBuilder#nb_invok_by_inline= for (self: Object, Int) */
1942 void VIRTUAL_separate_compiler__ModelBuilder__nb_invok_by_inline_61d(val
* self
, long p0
) {
1943 { /* Inline separate_compiler#ModelBuilder#nb_invok_by_inline= (self,p0) on <self:Object(ModelBuilder)> */
1944 self
->attrs
[COLOR_separate_compiler__ModelBuilder___nb_invok_by_inline
].l
= p0
; /* _nb_invok_by_inline on <self:Object(ModelBuilder)> */
1949 /* method separate_compiler#SeparateCompiler#runtime_type_analysis for (self: SeparateCompiler): nullable RapidTypeAnalysis */
1950 val
* separate_compiler__SeparateCompiler__runtime_type_analysis(val
* self
) {
1951 val
* var
/* : nullable RapidTypeAnalysis */;
1952 val
* var1
/* : nullable RapidTypeAnalysis */;
1953 var1
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
1958 /* method separate_compiler#SeparateCompiler#runtime_type_analysis for (self: Object): nullable RapidTypeAnalysis */
1959 val
* VIRTUAL_separate_compiler__SeparateCompiler__runtime_type_analysis(val
* self
) {
1960 val
* var
/* : nullable RapidTypeAnalysis */;
1961 val
* var1
/* : nullable RapidTypeAnalysis */;
1962 val
* var3
/* : nullable RapidTypeAnalysis */;
1963 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:Object(SeparateCompiler)> */
1964 var3
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:Object(SeparateCompiler)> */
1972 /* method separate_compiler#SeparateCompiler#runtime_type_analysis= for (self: SeparateCompiler, nullable RapidTypeAnalysis) */
1973 void separate_compiler__SeparateCompiler__runtime_type_analysis_61d(val
* self
, val
* p0
) {
1974 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___runtime_type_analysis
].val
= p0
; /* _runtime_type_analysis on <self:SeparateCompiler> */
1977 /* method separate_compiler#SeparateCompiler#runtime_type_analysis= for (self: Object, nullable RapidTypeAnalysis) */
1978 void VIRTUAL_separate_compiler__SeparateCompiler__runtime_type_analysis_61d(val
* self
, val
* p0
) {
1979 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis= (self,p0) on <self:Object(SeparateCompiler)> */
1980 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___runtime_type_analysis
].val
= p0
; /* _runtime_type_analysis on <self:Object(SeparateCompiler)> */
1985 /* method separate_compiler#SeparateCompiler#undead_types for (self: SeparateCompiler): Set[MType] */
1986 val
* separate_compiler__SeparateCompiler__undead_types(val
* self
) {
1987 val
* var
/* : Set[MType] */;
1988 val
* var1
/* : Set[MType] */;
1989 var1
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___undead_types
].val
; /* _undead_types on <self:SeparateCompiler> */
1990 if (unlikely(var1
== NULL
)) {
1991 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _undead_types");
1992 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 155);
1999 /* method separate_compiler#SeparateCompiler#undead_types for (self: Object): Set[MType] */
2000 val
* VIRTUAL_separate_compiler__SeparateCompiler__undead_types(val
* self
) {
2001 val
* var
/* : Set[MType] */;
2002 val
* var1
/* : Set[MType] */;
2003 val
* var3
/* : Set[MType] */;
2004 { /* Inline separate_compiler#SeparateCompiler#undead_types (self) on <self:Object(SeparateCompiler)> */
2005 var3
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___undead_types
].val
; /* _undead_types on <self:Object(SeparateCompiler)> */
2006 if (unlikely(var3
== NULL
)) {
2007 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _undead_types");
2008 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 155);
2018 /* method separate_compiler#SeparateCompiler#live_unresolved_types for (self: SeparateCompiler): Map[MClassDef, Set[MType]] */
2019 val
* separate_compiler__SeparateCompiler__live_unresolved_types(val
* self
) {
2020 val
* var
/* : Map[MClassDef, Set[MType]] */;
2021 val
* var1
/* : Map[MClassDef, Set[MType]] */;
2022 var1
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___live_unresolved_types
].val
; /* _live_unresolved_types on <self:SeparateCompiler> */
2023 if (unlikely(var1
== NULL
)) {
2024 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_unresolved_types");
2025 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 156);
2032 /* method separate_compiler#SeparateCompiler#live_unresolved_types for (self: Object): Map[MClassDef, Set[MType]] */
2033 val
* VIRTUAL_separate_compiler__SeparateCompiler__live_unresolved_types(val
* self
) {
2034 val
* var
/* : Map[MClassDef, Set[MType]] */;
2035 val
* var1
/* : Map[MClassDef, Set[MType]] */;
2036 val
* var3
/* : Map[MClassDef, Set[MType]] */;
2037 { /* Inline separate_compiler#SeparateCompiler#live_unresolved_types (self) on <self:Object(SeparateCompiler)> */
2038 var3
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___live_unresolved_types
].val
; /* _live_unresolved_types on <self:Object(SeparateCompiler)> */
2039 if (unlikely(var3
== NULL
)) {
2040 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_unresolved_types");
2041 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 156);
2051 /* method separate_compiler#SeparateCompiler#type_ids for (self: SeparateCompiler): Map[MType, Int] */
2052 val
* separate_compiler__SeparateCompiler__type_ids(val
* self
) {
2053 val
* var
/* : Map[MType, Int] */;
2054 val
* var1
/* : Map[MType, Int] */;
2055 var1
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_ids
].val
; /* _type_ids on <self:SeparateCompiler> */
2056 if (unlikely(var1
== NULL
)) {
2057 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_ids");
2058 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 158);
2065 /* method separate_compiler#SeparateCompiler#type_ids for (self: Object): Map[MType, Int] */
2066 val
* VIRTUAL_separate_compiler__SeparateCompiler__type_ids(val
* self
) {
2067 val
* var
/* : Map[MType, Int] */;
2068 val
* var1
/* : Map[MType, Int] */;
2069 val
* var3
/* : Map[MType, Int] */;
2070 { /* Inline separate_compiler#SeparateCompiler#type_ids (self) on <self:Object(SeparateCompiler)> */
2071 var3
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_ids
].val
; /* _type_ids on <self:Object(SeparateCompiler)> */
2072 if (unlikely(var3
== NULL
)) {
2073 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_ids");
2074 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 158);
2084 /* method separate_compiler#SeparateCompiler#type_ids= for (self: SeparateCompiler, Map[MType, Int]) */
2085 void separate_compiler__SeparateCompiler__type_ids_61d(val
* self
, val
* p0
) {
2086 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_ids
].val
= p0
; /* _type_ids on <self:SeparateCompiler> */
2089 /* method separate_compiler#SeparateCompiler#type_ids= for (self: Object, Map[MType, Int]) */
2090 void VIRTUAL_separate_compiler__SeparateCompiler__type_ids_61d(val
* self
, val
* p0
) {
2091 { /* Inline separate_compiler#SeparateCompiler#type_ids= (self,p0) on <self:Object(SeparateCompiler)> */
2092 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_ids
].val
= p0
; /* _type_ids on <self:Object(SeparateCompiler)> */
2097 /* method separate_compiler#SeparateCompiler#type_colors for (self: SeparateCompiler): Map[MType, Int] */
2098 val
* separate_compiler__SeparateCompiler__type_colors(val
* self
) {
2099 val
* var
/* : Map[MType, Int] */;
2100 val
* var1
/* : Map[MType, Int] */;
2101 var1
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_colors
].val
; /* _type_colors on <self:SeparateCompiler> */
2102 if (unlikely(var1
== NULL
)) {
2103 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_colors");
2104 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 159);
2111 /* method separate_compiler#SeparateCompiler#type_colors for (self: Object): Map[MType, Int] */
2112 val
* VIRTUAL_separate_compiler__SeparateCompiler__type_colors(val
* self
) {
2113 val
* var
/* : Map[MType, Int] */;
2114 val
* var1
/* : Map[MType, Int] */;
2115 val
* var3
/* : Map[MType, Int] */;
2116 { /* Inline separate_compiler#SeparateCompiler#type_colors (self) on <self:Object(SeparateCompiler)> */
2117 var3
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_colors
].val
; /* _type_colors on <self:Object(SeparateCompiler)> */
2118 if (unlikely(var3
== NULL
)) {
2119 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_colors");
2120 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 159);
2130 /* method separate_compiler#SeparateCompiler#type_colors= for (self: SeparateCompiler, Map[MType, Int]) */
2131 void separate_compiler__SeparateCompiler__type_colors_61d(val
* self
, val
* p0
) {
2132 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_colors
].val
= p0
; /* _type_colors on <self:SeparateCompiler> */
2135 /* method separate_compiler#SeparateCompiler#type_colors= for (self: Object, Map[MType, Int]) */
2136 void VIRTUAL_separate_compiler__SeparateCompiler__type_colors_61d(val
* self
, val
* p0
) {
2137 { /* Inline separate_compiler#SeparateCompiler#type_colors= (self,p0) on <self:Object(SeparateCompiler)> */
2138 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_colors
].val
= p0
; /* _type_colors on <self:Object(SeparateCompiler)> */
2143 /* method separate_compiler#SeparateCompiler#opentype_colors for (self: SeparateCompiler): Map[MType, Int] */
2144 val
* separate_compiler__SeparateCompiler__opentype_colors(val
* self
) {
2145 val
* var
/* : Map[MType, Int] */;
2146 val
* var1
/* : Map[MType, Int] */;
2147 var1
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___opentype_colors
].val
; /* _opentype_colors on <self:SeparateCompiler> */
2148 if (unlikely(var1
== NULL
)) {
2149 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opentype_colors");
2150 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 160);
2157 /* method separate_compiler#SeparateCompiler#opentype_colors for (self: Object): Map[MType, Int] */
2158 val
* VIRTUAL_separate_compiler__SeparateCompiler__opentype_colors(val
* self
) {
2159 val
* var
/* : Map[MType, Int] */;
2160 val
* var1
/* : Map[MType, Int] */;
2161 val
* var3
/* : Map[MType, Int] */;
2162 { /* Inline separate_compiler#SeparateCompiler#opentype_colors (self) on <self:Object(SeparateCompiler)> */
2163 var3
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___opentype_colors
].val
; /* _opentype_colors on <self:Object(SeparateCompiler)> */
2164 if (unlikely(var3
== NULL
)) {
2165 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opentype_colors");
2166 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 160);
2176 /* method separate_compiler#SeparateCompiler#opentype_colors= for (self: SeparateCompiler, Map[MType, Int]) */
2177 void separate_compiler__SeparateCompiler__opentype_colors_61d(val
* self
, val
* p0
) {
2178 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___opentype_colors
].val
= p0
; /* _opentype_colors on <self:SeparateCompiler> */
2181 /* method separate_compiler#SeparateCompiler#opentype_colors= for (self: Object, Map[MType, Int]) */
2182 void VIRTUAL_separate_compiler__SeparateCompiler__opentype_colors_61d(val
* self
, val
* p0
) {
2183 { /* Inline separate_compiler#SeparateCompiler#opentype_colors= (self,p0) on <self:Object(SeparateCompiler)> */
2184 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___opentype_colors
].val
= p0
; /* _opentype_colors on <self:Object(SeparateCompiler)> */
2189 /* method separate_compiler#SeparateCompiler#method_colors for (self: SeparateCompiler): Map[PropertyLayoutElement, Int] */
2190 val
* separate_compiler__SeparateCompiler__method_colors(val
* self
) {
2191 val
* var
/* : Map[PropertyLayoutElement, Int] */;
2192 val
* var1
/* : Map[PropertyLayoutElement, Int] */;
2193 var1
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___method_colors
].val
; /* _method_colors on <self:SeparateCompiler> */
2194 if (unlikely(var1
== NULL
)) {
2195 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _method_colors");
2196 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 161);
2203 /* method separate_compiler#SeparateCompiler#method_colors for (self: Object): Map[PropertyLayoutElement, Int] */
2204 val
* VIRTUAL_separate_compiler__SeparateCompiler__method_colors(val
* self
) {
2205 val
* var
/* : Map[PropertyLayoutElement, Int] */;
2206 val
* var1
/* : Map[PropertyLayoutElement, Int] */;
2207 val
* var3
/* : Map[PropertyLayoutElement, Int] */;
2208 { /* Inline separate_compiler#SeparateCompiler#method_colors (self) on <self:Object(SeparateCompiler)> */
2209 var3
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___method_colors
].val
; /* _method_colors on <self:Object(SeparateCompiler)> */
2210 if (unlikely(var3
== NULL
)) {
2211 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _method_colors");
2212 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 161);
2222 /* method separate_compiler#SeparateCompiler#method_colors= for (self: SeparateCompiler, Map[PropertyLayoutElement, Int]) */
2223 void separate_compiler__SeparateCompiler__method_colors_61d(val
* self
, val
* p0
) {
2224 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___method_colors
].val
= p0
; /* _method_colors on <self:SeparateCompiler> */
2227 /* method separate_compiler#SeparateCompiler#method_colors= for (self: Object, Map[PropertyLayoutElement, Int]) */
2228 void VIRTUAL_separate_compiler__SeparateCompiler__method_colors_61d(val
* self
, val
* p0
) {
2229 { /* Inline separate_compiler#SeparateCompiler#method_colors= (self,p0) on <self:Object(SeparateCompiler)> */
2230 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___method_colors
].val
= p0
; /* _method_colors on <self:Object(SeparateCompiler)> */
2235 /* method separate_compiler#SeparateCompiler#attr_colors for (self: SeparateCompiler): Map[MAttribute, Int] */
2236 val
* separate_compiler__SeparateCompiler__attr_colors(val
* self
) {
2237 val
* var
/* : Map[MAttribute, Int] */;
2238 val
* var1
/* : Map[MAttribute, Int] */;
2239 var1
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___attr_colors
].val
; /* _attr_colors on <self:SeparateCompiler> */
2240 if (unlikely(var1
== NULL
)) {
2241 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _attr_colors");
2242 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 162);
2249 /* method separate_compiler#SeparateCompiler#attr_colors for (self: Object): Map[MAttribute, Int] */
2250 val
* VIRTUAL_separate_compiler__SeparateCompiler__attr_colors(val
* self
) {
2251 val
* var
/* : Map[MAttribute, Int] */;
2252 val
* var1
/* : Map[MAttribute, Int] */;
2253 val
* var3
/* : Map[MAttribute, Int] */;
2254 { /* Inline separate_compiler#SeparateCompiler#attr_colors (self) on <self:Object(SeparateCompiler)> */
2255 var3
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___attr_colors
].val
; /* _attr_colors on <self:Object(SeparateCompiler)> */
2256 if (unlikely(var3
== NULL
)) {
2257 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _attr_colors");
2258 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 162);
2268 /* method separate_compiler#SeparateCompiler#attr_colors= for (self: SeparateCompiler, Map[MAttribute, Int]) */
2269 void separate_compiler__SeparateCompiler__attr_colors_61d(val
* self
, val
* p0
) {
2270 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___attr_colors
].val
= p0
; /* _attr_colors on <self:SeparateCompiler> */
2273 /* method separate_compiler#SeparateCompiler#attr_colors= for (self: Object, Map[MAttribute, Int]) */
2274 void VIRTUAL_separate_compiler__SeparateCompiler__attr_colors_61d(val
* self
, val
* p0
) {
2275 { /* Inline separate_compiler#SeparateCompiler#attr_colors= (self,p0) on <self:Object(SeparateCompiler)> */
2276 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___attr_colors
].val
= p0
; /* _attr_colors on <self:Object(SeparateCompiler)> */
2281 /* method separate_compiler#SeparateCompiler#init for (self: SeparateCompiler, MModule, ModelBuilder, nullable RapidTypeAnalysis) */
2282 void separate_compiler__SeparateCompiler__init(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
2283 val
* var_mainmodule
/* var mainmodule: MModule */;
2284 val
* var_mmbuilder
/* var mmbuilder: ModelBuilder */;
2285 val
* var_runtime_type_analysis
/* var runtime_type_analysis: nullable RapidTypeAnalysis */;
2286 static val
* varonce
;
2287 val
* var
/* : String */;
2288 char* var1
/* : NativeString */;
2289 long var2
/* : Int */;
2290 val
* var3
/* : FlatString */;
2291 val
* var4
/* : CodeFile */;
2292 val
* var_file
/* var file: CodeFile */;
2293 val
* var5
/* : CodeWriter */;
2294 var_mainmodule
= p0
;
2296 var_runtime_type_analysis
= p2
;
2298 abstract_compiler__AbstractCompiler__init(self
, var_mainmodule
, var_mmbuilder
); /* Direct call abstract_compiler#AbstractCompiler#init on <self:SeparateCompiler>*/
2303 var1
= "nit.common";
2305 var3
= string__NativeString__to_s_with_length(var1
, var2
);
2310 var4
= abstract_compiler__AbstractCompiler__new_file(self
, var
);
2313 var5
= NEW_abstract_compiler__CodeWriter(&type_abstract_compiler__CodeWriter
);
2315 abstract_compiler__CodeWriter__init(var5
, var_file
); /* Direct call abstract_compiler#CodeWriter#init on <var5:CodeWriter>*/
2318 { /* Inline abstract_compiler#AbstractCompiler#header= (self,var5) on <self:SeparateCompiler> */
2319 self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___header
].val
= var5
; /* _header on <self:SeparateCompiler> */
2324 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis= (self,var_runtime_type_analysis) on <self:SeparateCompiler> */
2325 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___runtime_type_analysis
].val
= var_runtime_type_analysis
; /* _runtime_type_analysis on <self:SeparateCompiler> */
2330 separate_compiler__SeparateCompiler__compile_box_kinds(self
); /* Direct call separate_compiler#SeparateCompiler#compile_box_kinds on <self:SeparateCompiler>*/
2334 /* method separate_compiler#SeparateCompiler#init for (self: Object, MModule, ModelBuilder, nullable RapidTypeAnalysis) */
2335 void VIRTUAL_separate_compiler__SeparateCompiler__init(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
2336 separate_compiler__SeparateCompiler__init(self
, p0
, p1
, p2
); /* Direct call separate_compiler#SeparateCompiler#init on <self:Object(SeparateCompiler)>*/
2339 /* method separate_compiler#SeparateCompiler#compile_header_structs for (self: SeparateCompiler) */
2340 void separate_compiler__SeparateCompiler__compile_header_structs(val
* self
) {
2341 val
* var
/* : CodeWriter */;
2342 val
* var2
/* : CodeWriter */;
2343 static val
* varonce
;
2344 val
* var3
/* : String */;
2345 char* var4
/* : NativeString */;
2346 long var5
/* : Int */;
2347 val
* var6
/* : FlatString */;
2348 val
* var7
/* : CodeWriter */;
2349 val
* var9
/* : CodeWriter */;
2350 static val
* varonce10
;
2351 val
* var11
/* : String */;
2352 char* var12
/* : NativeString */;
2353 long var13
/* : Int */;
2354 val
* var14
/* : FlatString */;
2355 val
* var15
/* : CodeWriter */;
2356 val
* var17
/* : CodeWriter */;
2357 static val
* varonce18
;
2358 val
* var19
/* : String */;
2359 char* var20
/* : NativeString */;
2360 long var21
/* : Int */;
2361 val
* var22
/* : FlatString */;
2362 val
* var23
/* : CodeWriter */;
2363 val
* var25
/* : CodeWriter */;
2364 static val
* varonce26
;
2365 val
* var27
/* : String */;
2366 char* var28
/* : NativeString */;
2367 long var29
/* : Int */;
2368 val
* var30
/* : FlatString */;
2369 val
* var31
/* : CodeWriter */;
2370 val
* var33
/* : CodeWriter */;
2371 static val
* varonce34
;
2372 val
* var35
/* : String */;
2373 char* var36
/* : NativeString */;
2374 long var37
/* : Int */;
2375 val
* var38
/* : FlatString */;
2376 val
* var39
/* : CodeWriter */;
2377 val
* var41
/* : CodeWriter */;
2378 static val
* varonce42
;
2379 val
* var43
/* : String */;
2380 char* var44
/* : NativeString */;
2381 long var45
/* : Int */;
2382 val
* var46
/* : FlatString */;
2384 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2385 var2
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2386 if (unlikely(var2
== NULL
)) {
2387 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2388 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 472);
2398 var4
= "typedef void(*nitmethod_t)(void); /* general C type representing a Nit method. */";
2400 var6
= string__NativeString__to_s_with_length(var4
, var5
);
2405 abstract_compiler__CodeWriter__add_decl(var
, var3
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var:CodeWriter>*/
2408 separate_compiler__SeparateCompiler__compile_header_attribute_structs(self
); /* Direct call separate_compiler#SeparateCompiler#compile_header_attribute_structs on <self:SeparateCompiler>*/
2411 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2412 var9
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2413 if (unlikely(var9
== NULL
)) {
2414 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2415 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 472);
2425 var12
= "struct class { int box_kind; nitmethod_t vft[]; }; /* general C type representing a Nit class. */";
2427 var14
= string__NativeString__to_s_with_length(var12
, var13
);
2432 abstract_compiler__CodeWriter__add_decl(var7
, var11
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var7:CodeWriter>*/
2435 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2436 var17
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2437 if (unlikely(var17
== NULL
)) {
2438 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2439 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 472);
2443 RET_LABEL16
:(void)0;
2449 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. */";
2451 var22
= string__NativeString__to_s_with_length(var20
, var21
);
2456 abstract_compiler__CodeWriter__add_decl(var15
, var19
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var15:CodeWriter>*/
2459 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2460 var25
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2461 if (unlikely(var25
== NULL
)) {
2462 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2463 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 472);
2467 RET_LABEL24
:(void)0;
2473 var28
= "struct instance { const struct type *type; const struct class *class; nitattribute_t attrs[]; }; /* general C type representing a Nit instance. */";
2475 var30
= string__NativeString__to_s_with_length(var28
, var29
);
2480 abstract_compiler__CodeWriter__add_decl(var23
, var27
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var23:CodeWriter>*/
2483 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2484 var33
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2485 if (unlikely(var33
== NULL
)) {
2486 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2487 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 472);
2491 RET_LABEL32
:(void)0;
2497 var36
= "struct types { int dummy; const struct type *types[]; }; /* a list types (used for vts, fts and unresolved lists). */";
2499 var38
= string__NativeString__to_s_with_length(var36
, var37
);
2504 abstract_compiler__CodeWriter__add_decl(var31
, var35
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var31:CodeWriter>*/
2507 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2508 var41
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2509 if (unlikely(var41
== NULL
)) {
2510 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2511 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 472);
2515 RET_LABEL40
:(void)0;
2521 var44
= "typedef struct instance val; /* general C type representing a Nit instance. */";
2523 var46
= string__NativeString__to_s_with_length(var44
, var45
);
2528 abstract_compiler__CodeWriter__add_decl(var39
, var43
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var39:CodeWriter>*/
2532 /* method separate_compiler#SeparateCompiler#compile_header_structs for (self: Object) */
2533 void VIRTUAL_separate_compiler__SeparateCompiler__compile_header_structs(val
* self
) {
2534 separate_compiler__SeparateCompiler__compile_header_structs(self
); /* Direct call separate_compiler#SeparateCompiler#compile_header_structs on <self:Object(SeparateCompiler)>*/
2537 /* method separate_compiler#SeparateCompiler#compile_header_attribute_structs for (self: SeparateCompiler) */
2538 void separate_compiler__SeparateCompiler__compile_header_attribute_structs(val
* self
) {
2539 val
* var
/* : ModelBuilder */;
2540 val
* var2
/* : ModelBuilder */;
2541 val
* var3
/* : ToolContext */;
2542 val
* var5
/* : ToolContext */;
2543 val
* var6
/* : OptionBool */;
2544 val
* var8
/* : OptionBool */;
2545 val
* var9
/* : nullable Object */;
2546 val
* var11
/* : nullable Object */;
2547 short int var12
/* : Bool */;
2548 val
* var13
/* : CodeWriter */;
2549 val
* var15
/* : CodeWriter */;
2550 static val
* varonce
;
2551 val
* var16
/* : String */;
2552 char* var17
/* : NativeString */;
2553 long var18
/* : Int */;
2554 val
* var19
/* : FlatString */;
2555 val
* var20
/* : CodeWriter */;
2556 val
* var22
/* : CodeWriter */;
2557 static val
* varonce23
;
2558 val
* var24
/* : String */;
2559 char* var25
/* : NativeString */;
2560 long var26
/* : Int */;
2561 val
* var27
/* : FlatString */;
2562 val
* var28
/* : CodeWriter */;
2563 val
* var30
/* : CodeWriter */;
2564 static val
* varonce31
;
2565 val
* var32
/* : String */;
2566 char* var33
/* : NativeString */;
2567 long var34
/* : Int */;
2568 val
* var35
/* : FlatString */;
2569 val
* var36
/* : HashMap[MClass, Int] */;
2570 val
* var38
/* : HashMap[MClass, Int] */;
2571 val
* var39
/* : HashMapIterator[Object, nullable Object] */;
2572 short int var40
/* : Bool */;
2573 val
* var41
/* : Object */;
2574 val
* var_c
/* var c: MClass */;
2575 val
* var42
/* : nullable Object */;
2576 long var_v
/* var v: Int */;
2577 long var43
/* : Int */;
2578 val
* var44
/* : MClassType */;
2579 val
* var46
/* : MClassType */;
2580 val
* var_t
/* var t: MClassType */;
2581 val
* var47
/* : CodeWriter */;
2582 val
* var49
/* : CodeWriter */;
2583 val
* var50
/* : String */;
2584 static val
* varonce51
;
2585 val
* var52
/* : String */;
2586 char* var53
/* : NativeString */;
2587 long var54
/* : Int */;
2588 val
* var55
/* : FlatString */;
2589 val
* var56
/* : String */;
2590 static val
* varonce57
;
2591 val
* var58
/* : String */;
2592 char* var59
/* : NativeString */;
2593 long var60
/* : Int */;
2594 val
* var61
/* : FlatString */;
2595 val
* var62
/* : Array[Object] */;
2596 long var63
/* : Int */;
2597 val
* var64
/* : NativeArray[Object] */;
2598 val
* var65
/* : String */;
2599 val
* var66
/* : CodeWriter */;
2600 val
* var68
/* : CodeWriter */;
2601 static val
* varonce69
;
2602 val
* var70
/* : String */;
2603 char* var71
/* : NativeString */;
2604 long var72
/* : Int */;
2605 val
* var73
/* : FlatString */;
2607 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
2608 var2
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
2609 if (unlikely(var2
== NULL
)) {
2610 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
2611 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 443);
2619 { /* Inline modelbuilder#ModelBuilder#toolcontext (var) on <var:ModelBuilder> */
2620 var5
= var
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var:ModelBuilder> */
2621 if (unlikely(var5
== NULL
)) {
2622 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
2623 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
2631 { /* Inline separate_compiler#ToolContext#opt_no_union_attribute (var3) on <var3:ToolContext> */
2632 var8
= var3
->attrs
[COLOR_separate_compiler__ToolContext___opt_no_union_attribute
].val
; /* _opt_no_union_attribute on <var3:ToolContext> */
2633 if (unlikely(var8
== NULL
)) {
2634 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_no_union_attribute");
2635 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 28);
2643 { /* Inline opts#Option#value (var6) on <var6:OptionBool> */
2644 var11
= var6
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var6:OptionBool> */
2646 RET_LABEL10
:(void)0;
2649 var12
= ((struct instance_kernel__Bool
*)var9
)->value
; /* autounbox from nullable Object to Bool */;
2652 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2653 var15
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2654 if (unlikely(var15
== NULL
)) {
2655 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2656 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 472);
2660 RET_LABEL14
:(void)0;
2666 var17
= "typedef void* nitattribute_t; /* general C type representing a Nit attribute. */";
2668 var19
= string__NativeString__to_s_with_length(var17
, var18
);
2673 abstract_compiler__CodeWriter__add_decl(var13
, var16
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var13:CodeWriter>*/
2677 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2678 var22
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2679 if (unlikely(var22
== NULL
)) {
2680 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2681 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 472);
2685 RET_LABEL21
:(void)0;
2691 var25
= "typedef union {";
2693 var27
= string__NativeString__to_s_with_length(var25
, var26
);
2698 abstract_compiler__CodeWriter__add_decl(var20
, var24
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var20:CodeWriter>*/
2701 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2702 var30
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2703 if (unlikely(var30
== NULL
)) {
2704 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2705 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 472);
2709 RET_LABEL29
:(void)0;
2715 var33
= "void* val;";
2717 var35
= string__NativeString__to_s_with_length(var33
, var34
);
2722 abstract_compiler__CodeWriter__add_decl(var28
, var32
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var28:CodeWriter>*/
2725 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:SeparateCompiler> */
2726 var38
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
2727 if (unlikely(var38
== NULL
)) {
2728 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
2729 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 211);
2733 RET_LABEL37
:(void)0;
2737 var39
= hash_collection__HashMap__iterator(var36
);
2741 var40
= hash_collection__HashMapIterator__is_ok(var39
);
2745 var41
= hash_collection__HashMapIterator__key(var39
);
2749 var42
= hash_collection__HashMapIterator__item(var39
);
2751 var43
= ((struct instance_kernel__Int
*)var42
)->value
; /* autounbox from nullable Object to Int */;
2754 { /* Inline model#MClass#mclass_type (var_c) on <var_c:MClass> */
2755 var46
= var_c
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_c:MClass> */
2756 if (unlikely(var46
== NULL
)) {
2757 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
2758 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
2762 RET_LABEL45
:(void)0;
2767 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2768 var49
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2769 if (unlikely(var49
== NULL
)) {
2770 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2771 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 472);
2775 RET_LABEL48
:(void)0;
2779 var50
= abstract_compiler__MClassType__ctype(var_t
);
2786 var55
= string__NativeString__to_s_with_length(var53
, var54
);
2791 var56
= abstract_compiler__MClassType__ctypename(var_t
);
2798 var61
= string__NativeString__to_s_with_length(var59
, var60
);
2802 var62
= NEW_array__Array(&type_array__Arraykernel__Object
);
2803 { /* var62 = array_instance Array[Object] */
2805 var64
= NEW_array__NativeArray(var63
, &type_array__NativeArraykernel__Object
);
2806 ((struct instance_array__NativeArray
*)var64
)->values
[0] = (val
*) var50
;
2807 ((struct instance_array__NativeArray
*)var64
)->values
[1] = (val
*) var52
;
2808 ((struct instance_array__NativeArray
*)var64
)->values
[2] = (val
*) var56
;
2809 ((struct instance_array__NativeArray
*)var64
)->values
[3] = (val
*) var58
;
2811 ((void (*)(val
*, val
*, long))(var62
->class->vft
[COLOR_array__Array__with_native
]))(var62
, var64
, var63
) /* with_native on <var62:Array[Object]>*/;
2815 var65
= ((val
* (*)(val
*))(var62
->class->vft
[COLOR_string__Object__to_s
]))(var62
) /* to_s on <var62:Array[Object]>*/;
2818 abstract_compiler__CodeWriter__add_decl(var47
, var65
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var47:CodeWriter>*/
2820 CONTINUE_label
: (void)0;
2822 hash_collection__HashMapIterator__next(var39
); /* Direct call hash_collection#HashMapIterator#next on <var39:HashMapIterator[Object, nullable Object]>*/
2825 BREAK_label
: (void)0;
2827 { /* Inline abstract_compiler#AbstractCompiler#header (self) on <self:SeparateCompiler> */
2828 var68
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___header
].val
; /* _header on <self:SeparateCompiler> */
2829 if (unlikely(var68
== NULL
)) {
2830 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _header");
2831 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 472);
2835 RET_LABEL67
:(void)0;
2841 var71
= "} nitattribute_t; /* general C type representing a Nit attribute. */";
2843 var73
= string__NativeString__to_s_with_length(var71
, var72
);
2848 abstract_compiler__CodeWriter__add_decl(var66
, var70
); /* Direct call abstract_compiler#CodeWriter#add_decl on <var66:CodeWriter>*/
2853 /* method separate_compiler#SeparateCompiler#compile_header_attribute_structs for (self: Object) */
2854 void VIRTUAL_separate_compiler__SeparateCompiler__compile_header_attribute_structs(val
* self
) {
2855 separate_compiler__SeparateCompiler__compile_header_attribute_structs(self
); /* Direct call separate_compiler#SeparateCompiler#compile_header_attribute_structs on <self:Object(SeparateCompiler)>*/
2858 /* method separate_compiler#SeparateCompiler#compile_box_kinds for (self: SeparateCompiler) */
2859 void separate_compiler__SeparateCompiler__compile_box_kinds(val
* self
) {
2860 val
* var
/* : Array[String] */;
2861 long var1
/* : Int */;
2862 val
* var_
/* var : Array[String] */;
2863 static val
* varonce
;
2864 val
* var2
/* : String */;
2865 char* var3
/* : NativeString */;
2866 long var4
/* : Int */;
2867 val
* var5
/* : FlatString */;
2868 static val
* varonce6
;
2869 val
* var7
/* : String */;
2870 char* var8
/* : NativeString */;
2871 long var9
/* : Int */;
2872 val
* var10
/* : FlatString */;
2873 static val
* varonce11
;
2874 val
* var12
/* : String */;
2875 char* var13
/* : NativeString */;
2876 long var14
/* : Int */;
2877 val
* var15
/* : FlatString */;
2878 static val
* varonce16
;
2879 val
* var17
/* : String */;
2880 char* var18
/* : NativeString */;
2881 long var19
/* : Int */;
2882 val
* var20
/* : FlatString */;
2883 static val
* varonce21
;
2884 val
* var22
/* : String */;
2885 char* var23
/* : NativeString */;
2886 long var24
/* : Int */;
2887 val
* var25
/* : FlatString */;
2888 static val
* varonce26
;
2889 val
* var27
/* : String */;
2890 char* var28
/* : NativeString */;
2891 long var29
/* : Int */;
2892 val
* var30
/* : FlatString */;
2893 val
* var31
/* : ArrayIterator[nullable Object] */;
2894 short int var32
/* : Bool */;
2895 val
* var33
/* : nullable Object */;
2896 val
* var_classname
/* var classname: String */;
2897 val
* var34
/* : MModule */;
2898 val
* var36
/* : MModule */;
2899 val
* var37
/* : Model */;
2900 val
* var39
/* : Model */;
2901 val
* var40
/* : nullable Array[MClass] */;
2902 val
* var_classes
/* var classes: nullable Array[MClass] */;
2903 val
* var41
/* : null */;
2904 short int var42
/* : Bool */;
2905 short int var43
/* : Bool */;
2906 long var44
/* : Int */;
2907 long var45
/* : Int */;
2908 short int var46
/* : Bool */;
2909 short int var47
/* : Bool */;
2910 short int var49
/* : Bool */;
2911 static val
* varonce50
;
2912 val
* var51
/* : String */;
2913 char* var52
/* : NativeString */;
2914 long var53
/* : Int */;
2915 val
* var54
/* : FlatString */;
2916 val
* var55
/* : String */;
2917 val
* var56
/* : HashMap[MClass, Int] */;
2918 val
* var58
/* : HashMap[MClass, Int] */;
2919 val
* var59
/* : nullable Object */;
2920 val
* var60
/* : HashMap[MClass, Int] */;
2921 val
* var62
/* : HashMap[MClass, Int] */;
2922 long var63
/* : Int */;
2923 long var64
/* : Int */;
2924 long var65
/* : Int */;
2925 short int var67
/* : Bool */;
2928 const char* var_class_name
;
2929 long var68
/* : Int */;
2930 val
* var69
/* : nullable Object */;
2931 var
= NEW_array__Array(&type_array__Arraystring__String
);
2934 array__Array__with_capacity(var
, var1
); /* Direct call array#Array#with_capacity on <var:Array[String]>*/
2942 var5
= string__NativeString__to_s_with_length(var3
, var4
);
2947 array__AbstractArray__push(var_
, var2
); /* Direct call array#AbstractArray#push on <var_:Array[String]>*/
2954 var10
= string__NativeString__to_s_with_length(var8
, var9
);
2959 array__AbstractArray__push(var_
, var7
); /* Direct call array#AbstractArray#push on <var_:Array[String]>*/
2966 var15
= string__NativeString__to_s_with_length(var13
, var14
);
2971 array__AbstractArray__push(var_
, var12
); /* Direct call array#AbstractArray#push on <var_:Array[String]>*/
2978 var20
= string__NativeString__to_s_with_length(var18
, var19
);
2983 array__AbstractArray__push(var_
, var17
); /* Direct call array#AbstractArray#push on <var_:Array[String]>*/
2988 var23
= "NativeString";
2990 var25
= string__NativeString__to_s_with_length(var23
, var24
);
2995 array__AbstractArray__push(var_
, var22
); /* Direct call array#AbstractArray#push on <var_:Array[String]>*/
3002 var30
= string__NativeString__to_s_with_length(var28
, var29
);
3007 array__AbstractArray__push(var_
, var27
); /* Direct call array#AbstractArray#push on <var_:Array[String]>*/
3010 var31
= array__AbstractArrayRead__iterator(var_
);
3014 var32
= array__ArrayIterator__is_ok(var31
);
3018 var33
= array__ArrayIterator__item(var31
);
3020 var_classname
= var33
;
3022 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
3023 var36
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
3024 if (unlikely(var36
== NULL
)) {
3025 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
3026 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
3030 RET_LABEL35
:(void)0;
3034 { /* Inline mmodule#MModule#model (var34) on <var34:MModule> */
3035 var39
= var34
->attrs
[COLOR_mmodule__MModule___model
].val
; /* _model on <var34:MModule> */
3036 if (unlikely(var39
== NULL
)) {
3037 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _model");
3038 PRINT_ERROR(" (%s:%d)\n", "src/model/mmodule.nit", 74);
3042 RET_LABEL38
:(void)0;
3046 var40
= model__Model__get_mclasses_by_name(var37
, var_classname
);
3048 var_classes
= var40
;
3050 if (var_classes
== NULL
) {
3051 var42
= 1; /* is null */
3053 var42
= 0; /* arg is null but recv is not */
3056 var43
= abstract_collection__SequenceRead___61d_61d(var_classes
, var41
);
3060 goto CONTINUE_label
;
3064 var44
= array__AbstractArrayRead__length(var_classes
);
3068 { /* Inline kernel#Int#== (var44,var45) on <var44:Int> */
3069 var49
= var44
== var45
;
3072 RET_LABEL48
:(void)0;
3076 if (unlikely(!var46
)) {
3082 var54
= string__NativeString__to_s_with_length(var52
, var53
);
3087 var55
= string__Collection__join(var_classes
, var51
);
3090 file__Object__print(self
, var55
); /* Direct call file#Object#print on <self:SeparateCompiler>*/
3092 PRINT_ERROR("Runtime error: %s", "Assert failed");
3093 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 206);
3097 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:SeparateCompiler> */
3098 var58
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
3099 if (unlikely(var58
== NULL
)) {
3100 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
3101 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 211);
3105 RET_LABEL57
:(void)0;
3109 var59
= abstract_collection__SequenceRead__first(var_classes
);
3112 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:SeparateCompiler> */
3113 var62
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
3114 if (unlikely(var62
== NULL
)) {
3115 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
3116 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 211);
3120 RET_LABEL61
:(void)0;
3124 var63
= hash_collection__HashMap__length(var60
);
3128 { /* Inline kernel#Int#+ (var63,var64) on <var63:Int> */
3129 /* Covariant cast for argument 0 (i) <var64:Int> isa OTHER */
3130 /* <var64:Int> isa OTHER */
3131 var67
= 1; /* easy <var64:Int> isa OTHER*/
3132 if (unlikely(!var67
)) {
3133 var_class_name
= type_kernel__Int
.name
;
3134 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
3135 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 328);
3138 var68
= var63
+ var64
;
3141 RET_LABEL66
:(void)0;
3145 var69
= BOX_kernel__Int(var65
); /* autobox from Int to nullable Object */
3146 hash_collection__HashMap___91d_93d_61d(var56
, var59
, var69
); /* Direct call hash_collection#HashMap#[]= on <var56:HashMap[MClass, Int]>*/
3148 CONTINUE_label
: (void)0;
3150 array__ArrayIterator__next(var31
); /* Direct call array#ArrayIterator#next on <var31:ArrayIterator[nullable Object]>*/
3153 BREAK_label
: (void)0;
3156 /* method separate_compiler#SeparateCompiler#compile_box_kinds for (self: Object) */
3157 void VIRTUAL_separate_compiler__SeparateCompiler__compile_box_kinds(val
* self
) {
3158 separate_compiler__SeparateCompiler__compile_box_kinds(self
); /* Direct call separate_compiler#SeparateCompiler#compile_box_kinds on <self:Object(SeparateCompiler)>*/
3161 /* method separate_compiler#SeparateCompiler#box_kinds for (self: SeparateCompiler): HashMap[MClass, Int] */
3162 val
* separate_compiler__SeparateCompiler__box_kinds(val
* self
) {
3163 val
* var
/* : HashMap[MClass, Int] */;
3164 val
* var1
/* : HashMap[MClass, Int] */;
3165 var1
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
3166 if (unlikely(var1
== NULL
)) {
3167 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
3168 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 211);
3175 /* method separate_compiler#SeparateCompiler#box_kinds for (self: Object): HashMap[MClass, Int] */
3176 val
* VIRTUAL_separate_compiler__SeparateCompiler__box_kinds(val
* self
) {
3177 val
* var
/* : HashMap[MClass, Int] */;
3178 val
* var1
/* : HashMap[MClass, Int] */;
3179 val
* var3
/* : HashMap[MClass, Int] */;
3180 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:Object(SeparateCompiler)> */
3181 var3
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:Object(SeparateCompiler)> */
3182 if (unlikely(var3
== NULL
)) {
3183 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
3184 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 211);
3194 /* method separate_compiler#SeparateCompiler#box_kind_of for (self: SeparateCompiler, MClass): Int */
3195 long separate_compiler__SeparateCompiler__box_kind_of(val
* self
, val
* p0
) {
3196 long var
/* : Int */;
3197 val
* var_mclass
/* var mclass: MClass */;
3198 val
* var1
/* : MClassType */;
3199 val
* var3
/* : MClassType */;
3200 val
* var4
/* : String */;
3201 static val
* varonce
;
3202 val
* var5
/* : String */;
3203 char* var6
/* : NativeString */;
3204 long var7
/* : Int */;
3205 val
* var8
/* : FlatString */;
3206 short int var9
/* : Bool */;
3207 short int var10
/* : Bool */;
3208 long var11
/* : Int */;
3209 val
* var12
/* : MClassKind */;
3210 val
* var14
/* : MClassKind */;
3211 val
* var15
/* : MClassKind */;
3212 short int var16
/* : Bool */;
3213 short int var17
/* : Bool */;
3214 val
* var_other
/* var other: nullable Object */;
3215 short int var19
/* : Bool */;
3216 short int var21
/* : Bool */;
3217 val
* var22
/* : HashMap[MClass, Int] */;
3218 val
* var24
/* : HashMap[MClass, Int] */;
3219 val
* var25
/* : MModule */;
3220 val
* var27
/* : MModule */;
3221 static val
* varonce28
;
3222 val
* var29
/* : String */;
3223 char* var30
/* : NativeString */;
3224 long var31
/* : Int */;
3225 val
* var32
/* : FlatString */;
3226 val
* var33
/* : MClass */;
3227 val
* var34
/* : nullable Object */;
3228 long var35
/* : Int */;
3229 val
* var36
/* : HashMap[MClass, Int] */;
3230 val
* var38
/* : HashMap[MClass, Int] */;
3231 val
* var39
/* : nullable Object */;
3232 long var40
/* : Int */;
3235 { /* Inline model#MClass#mclass_type (var_mclass) on <var_mclass:MClass> */
3236 var3
= var_mclass
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_mclass:MClass> */
3237 if (unlikely(var3
== NULL
)) {
3238 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
3239 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
3247 var4
= abstract_compiler__MClassType__ctype(var1
);
3254 var8
= string__NativeString__to_s_with_length(var6
, var7
);
3259 var10
= string__FlatString___61d_61d(var4
, var5
);
3268 { /* Inline model#MClass#kind (var_mclass) on <var_mclass:MClass> */
3269 var14
= var_mclass
->attrs
[COLOR_model__MClass___kind
].val
; /* _kind on <var_mclass:MClass> */
3270 if (unlikely(var14
== NULL
)) {
3271 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _kind");
3272 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 355);
3276 RET_LABEL13
:(void)0;
3280 var15
= model__Object__extern_kind(self
);
3283 { /* Inline kernel#Object#== (var12,var15) on <var12:MClassKind> */
3286 { /* Inline kernel#Object#is_same_instance (var12,var_other) on <var12:MClassKind> */
3287 var21
= var12
== var_other
;
3290 RET_LABEL20
:(void)0;
3295 RET_LABEL18
:(void)0;
3301 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:SeparateCompiler> */
3302 var24
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
3303 if (unlikely(var24
== NULL
)) {
3304 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
3305 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 211);
3309 RET_LABEL23
:(void)0;
3313 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
3314 var27
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
3315 if (unlikely(var27
== NULL
)) {
3316 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
3317 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
3321 RET_LABEL26
:(void)0;
3329 var32
= string__NativeString__to_s_with_length(var30
, var31
);
3334 var33
= model__MModule__get_primitive_class(var25
, var29
);
3337 var34
= hash_collection__HashMap___91d_93d(var22
, var33
);
3339 var35
= ((struct instance_kernel__Int
*)var34
)->value
; /* autounbox from nullable Object to Int */;
3344 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:SeparateCompiler> */
3345 var38
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
3346 if (unlikely(var38
== NULL
)) {
3347 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
3348 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 211);
3352 RET_LABEL37
:(void)0;
3356 var39
= hash_collection__HashMap___91d_93d(var36
, var_mclass
);
3358 var40
= ((struct instance_kernel__Int
*)var39
)->value
; /* autounbox from nullable Object to Int */;
3366 /* method separate_compiler#SeparateCompiler#box_kind_of for (self: Object, MClass): Int */
3367 long VIRTUAL_separate_compiler__SeparateCompiler__box_kind_of(val
* self
, val
* p0
) {
3368 long var
/* : Int */;
3369 long var1
/* : Int */;
3370 var1
= separate_compiler__SeparateCompiler__box_kind_of(self
, p0
);
3375 /* method separate_compiler#SeparateCompiler#compile_color_consts for (self: SeparateCompiler, Map[Object, Int]) */
3376 void separate_compiler__SeparateCompiler__compile_color_consts(val
* self
, val
* p0
) {
3377 val
* var_colors
/* var colors: Map[Object, Int] */;
3378 val
* var
/* : AbstractCompilerVisitor */;
3379 val
* var_v
/* var v: SeparateCompilerVisitor */;
3380 val
* var1
/* : MapIterator[Object, nullable Object] */;
3381 short int var2
/* : Bool */;
3382 val
* var3
/* : Object */;
3383 val
* var_m
/* var m: Object */;
3384 val
* var4
/* : nullable Object */;
3385 long var_c
/* var c: Int */;
3386 long var5
/* : Int */;
3389 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_compiler__AbstractCompiler__new_visitor
]))(self
) /* new_visitor on <self:SeparateCompiler>*/;
3393 var1
= ((val
* (*)(val
*))(var_colors
->class->vft
[COLOR_abstract_collection__MapRead__iterator
]))(var_colors
) /* iterator on <var_colors:Map[Object, Int]>*/;
3397 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(var1
) /* is_ok on <var1:MapIterator[Object, nullable Object]>*/;
3401 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__key
]))(var1
) /* key on <var1:MapIterator[Object, nullable Object]>*/;
3405 var4
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__item
]))(var1
) /* item on <var1:MapIterator[Object, nullable Object]>*/;
3407 var5
= ((struct instance_kernel__Int
*)var4
)->value
; /* autounbox from nullable Object to Int */;
3410 separate_compiler__SeparateCompiler__compile_color_const(self
, var_v
, var_m
, var_c
); /* Direct call separate_compiler#SeparateCompiler#compile_color_const on <self:SeparateCompiler>*/
3412 CONTINUE_label
: (void)0;
3414 ((void (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__MapIterator__next
]))(var1
) /* next on <var1:MapIterator[Object, nullable Object]>*/;
3417 BREAK_label
: (void)0;
3420 /* method separate_compiler#SeparateCompiler#compile_color_consts for (self: Object, Map[Object, Int]) */
3421 void VIRTUAL_separate_compiler__SeparateCompiler__compile_color_consts(val
* self
, val
* p0
) {
3422 separate_compiler__SeparateCompiler__compile_color_consts(self
, p0
); /* Direct call separate_compiler#SeparateCompiler#compile_color_consts on <self:Object(SeparateCompiler)>*/
3425 /* method separate_compiler#SeparateCompiler#compile_color_const for (self: SeparateCompiler, SeparateCompilerVisitor, Object, Int) */
3426 void separate_compiler__SeparateCompiler__compile_color_const(val
* self
, val
* p0
, val
* p1
, long p2
) {
3427 val
* var_v
/* var v: SeparateCompilerVisitor */;
3428 val
* var_m
/* var m: Object */;
3429 long var_color
/* var color: Int */;
3430 val
* var
/* : HashSet[Object] */;
3431 val
* var2
/* : HashSet[Object] */;
3432 short int var3
/* : Bool */;
3433 short int var4
/* : Bool */;
3436 val
* var5
/* : ModelBuilder */;
3437 val
* var7
/* : ModelBuilder */;
3438 val
* var8
/* : ToolContext */;
3439 val
* var10
/* : ToolContext */;
3440 val
* var11
/* : OptionBool */;
3441 val
* var13
/* : OptionBool */;
3442 val
* var14
/* : nullable Object */;
3443 val
* var16
/* : nullable Object */;
3444 short int var17
/* : Bool */;
3445 val
* var18
/* : String */;
3446 static val
* varonce
;
3447 val
* var19
/* : String */;
3448 char* var20
/* : NativeString */;
3449 long var21
/* : Int */;
3450 val
* var22
/* : FlatString */;
3451 val
* var23
/* : String */;
3452 static val
* varonce24
;
3453 val
* var25
/* : String */;
3454 char* var26
/* : NativeString */;
3455 long var27
/* : Int */;
3456 val
* var28
/* : FlatString */;
3457 val
* var29
/* : Array[Object] */;
3458 long var30
/* : Int */;
3459 val
* var31
/* : NativeArray[Object] */;
3460 val
* var32
/* : Object */;
3461 val
* var33
/* : String */;
3462 val
* var34
/* : String */;
3463 static val
* varonce35
;
3464 val
* var36
/* : String */;
3465 char* var37
/* : NativeString */;
3466 long var38
/* : Int */;
3467 val
* var39
/* : FlatString */;
3468 val
* var40
/* : String */;
3469 static val
* varonce41
;
3470 val
* var42
/* : String */;
3471 char* var43
/* : NativeString */;
3472 long var44
/* : Int */;
3473 val
* var45
/* : FlatString */;
3474 val
* var46
/* : Array[Object] */;
3475 long var47
/* : Int */;
3476 val
* var48
/* : NativeArray[Object] */;
3477 val
* var49
/* : String */;
3478 static val
* varonce50
;
3479 val
* var51
/* : String */;
3480 char* var52
/* : NativeString */;
3481 long var53
/* : Int */;
3482 val
* var54
/* : FlatString */;
3483 val
* var55
/* : String */;
3484 static val
* varonce56
;
3485 val
* var57
/* : String */;
3486 char* var58
/* : NativeString */;
3487 long var59
/* : Int */;
3488 val
* var60
/* : FlatString */;
3489 static val
* varonce61
;
3490 val
* var62
/* : String */;
3491 char* var63
/* : NativeString */;
3492 long var64
/* : Int */;
3493 val
* var65
/* : FlatString */;
3494 val
* var66
/* : Array[Object] */;
3495 long var67
/* : Int */;
3496 val
* var68
/* : NativeArray[Object] */;
3497 val
* var69
/* : Object */;
3498 val
* var70
/* : String */;
3499 short int var71
/* : Bool */;
3502 val
* var74
/* : ModelBuilder */;
3503 val
* var76
/* : ModelBuilder */;
3504 val
* var77
/* : ToolContext */;
3505 val
* var79
/* : ToolContext */;
3506 val
* var80
/* : OptionBool */;
3507 val
* var82
/* : OptionBool */;
3508 val
* var83
/* : nullable Object */;
3509 val
* var85
/* : nullable Object */;
3510 short int var86
/* : Bool */;
3511 val
* var87
/* : String */;
3512 static val
* varonce88
;
3513 val
* var89
/* : String */;
3514 char* var90
/* : NativeString */;
3515 long var91
/* : Int */;
3516 val
* var92
/* : FlatString */;
3517 val
* var93
/* : String */;
3518 static val
* varonce94
;
3519 val
* var95
/* : String */;
3520 char* var96
/* : NativeString */;
3521 long var97
/* : Int */;
3522 val
* var98
/* : FlatString */;
3523 val
* var99
/* : Array[Object] */;
3524 long var100
/* : Int */;
3525 val
* var101
/* : NativeArray[Object] */;
3526 val
* var102
/* : Object */;
3527 val
* var103
/* : String */;
3528 val
* var104
/* : String */;
3529 static val
* varonce105
;
3530 val
* var106
/* : String */;
3531 char* var107
/* : NativeString */;
3532 long var108
/* : Int */;
3533 val
* var109
/* : FlatString */;
3534 val
* var110
/* : String */;
3535 static val
* varonce111
;
3536 val
* var112
/* : String */;
3537 char* var113
/* : NativeString */;
3538 long var114
/* : Int */;
3539 val
* var115
/* : FlatString */;
3540 val
* var116
/* : Array[Object] */;
3541 long var117
/* : Int */;
3542 val
* var118
/* : NativeArray[Object] */;
3543 val
* var119
/* : String */;
3544 static val
* varonce120
;
3545 val
* var121
/* : String */;
3546 char* var122
/* : NativeString */;
3547 long var123
/* : Int */;
3548 val
* var124
/* : FlatString */;
3549 val
* var125
/* : String */;
3550 static val
* varonce126
;
3551 val
* var127
/* : String */;
3552 char* var128
/* : NativeString */;
3553 long var129
/* : Int */;
3554 val
* var130
/* : FlatString */;
3555 static val
* varonce131
;
3556 val
* var132
/* : String */;
3557 char* var133
/* : NativeString */;
3558 long var134
/* : Int */;
3559 val
* var135
/* : FlatString */;
3560 val
* var136
/* : Array[Object] */;
3561 long var137
/* : Int */;
3562 val
* var138
/* : NativeArray[Object] */;
3563 val
* var139
/* : Object */;
3564 val
* var140
/* : String */;
3565 short int var141
/* : Bool */;
3568 val
* var144
/* : ModelBuilder */;
3569 val
* var146
/* : ModelBuilder */;
3570 val
* var147
/* : ToolContext */;
3571 val
* var149
/* : ToolContext */;
3572 val
* var150
/* : OptionBool */;
3573 val
* var152
/* : OptionBool */;
3574 val
* var153
/* : nullable Object */;
3575 val
* var155
/* : nullable Object */;
3576 short int var156
/* : Bool */;
3577 val
* var157
/* : String */;
3578 static val
* varonce158
;
3579 val
* var159
/* : String */;
3580 char* var160
/* : NativeString */;
3581 long var161
/* : Int */;
3582 val
* var162
/* : FlatString */;
3583 val
* var163
/* : String */;
3584 static val
* varonce164
;
3585 val
* var165
/* : String */;
3586 char* var166
/* : NativeString */;
3587 long var167
/* : Int */;
3588 val
* var168
/* : FlatString */;
3589 val
* var169
/* : Array[Object] */;
3590 long var170
/* : Int */;
3591 val
* var171
/* : NativeArray[Object] */;
3592 val
* var172
/* : Object */;
3593 val
* var173
/* : String */;
3594 val
* var174
/* : String */;
3595 static val
* varonce175
;
3596 val
* var176
/* : String */;
3597 char* var177
/* : NativeString */;
3598 long var178
/* : Int */;
3599 val
* var179
/* : FlatString */;
3600 val
* var180
/* : String */;
3601 static val
* varonce181
;
3602 val
* var182
/* : String */;
3603 char* var183
/* : NativeString */;
3604 long var184
/* : Int */;
3605 val
* var185
/* : FlatString */;
3606 val
* var186
/* : Array[Object] */;
3607 long var187
/* : Int */;
3608 val
* var188
/* : NativeArray[Object] */;
3609 val
* var189
/* : String */;
3610 static val
* varonce190
;
3611 val
* var191
/* : String */;
3612 char* var192
/* : NativeString */;
3613 long var193
/* : Int */;
3614 val
* var194
/* : FlatString */;
3615 val
* var195
/* : String */;
3616 static val
* varonce196
;
3617 val
* var197
/* : String */;
3618 char* var198
/* : NativeString */;
3619 long var199
/* : Int */;
3620 val
* var200
/* : FlatString */;
3621 static val
* varonce201
;
3622 val
* var202
/* : String */;
3623 char* var203
/* : NativeString */;
3624 long var204
/* : Int */;
3625 val
* var205
/* : FlatString */;
3626 val
* var206
/* : Array[Object] */;
3627 long var207
/* : Int */;
3628 val
* var208
/* : NativeArray[Object] */;
3629 val
* var209
/* : Object */;
3630 val
* var210
/* : String */;
3631 val
* var211
/* : HashSet[Object] */;
3632 val
* var213
/* : HashSet[Object] */;
3637 { /* Inline separate_compiler#SeparateCompiler#color_consts_done (self) on <self:SeparateCompiler> */
3638 var2
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___color_consts_done
].val
; /* _color_consts_done on <self:SeparateCompiler> */
3639 if (unlikely(var2
== NULL
)) {
3640 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _color_consts_done");
3641 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 259);
3649 var3
= hash_collection__HashSet__has(var
, var_m
);
3655 /* <var_m:Object> isa MProperty */
3656 cltype
= type_model__MProperty
.color
;
3657 idtype
= type_model__MProperty
.id
;
3658 if(cltype
>= var_m
->type
->table_size
) {
3661 var4
= var_m
->type
->type_table
[cltype
] == idtype
;
3665 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
3666 var7
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
3667 if (unlikely(var7
== NULL
)) {
3668 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
3669 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 443);
3677 { /* Inline modelbuilder#ModelBuilder#toolcontext (var5) on <var5:ModelBuilder> */
3678 var10
= var5
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var5:ModelBuilder> */
3679 if (unlikely(var10
== NULL
)) {
3680 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
3681 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
3689 { /* Inline separate_compiler#ToolContext#opt_inline_coloring_numbers (var8) on <var8:ToolContext> */
3690 var13
= var8
->attrs
[COLOR_separate_compiler__ToolContext___opt_inline_coloring_numbers
].val
; /* _opt_inline_coloring_numbers on <var8:ToolContext> */
3691 if (unlikely(var13
== NULL
)) {
3692 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_coloring_numbers");
3693 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 32);
3697 RET_LABEL12
:(void)0;
3701 { /* Inline opts#Option#value (var11) on <var11:OptionBool> */
3702 var16
= var11
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var11:OptionBool> */
3704 RET_LABEL15
:(void)0;
3707 var17
= ((struct instance_kernel__Bool
*)var14
)->value
; /* autounbox from nullable Object to Bool */;
3710 var18
= separate_compiler__MProperty__const_color(var_m
);
3717 var22
= string__NativeString__to_s_with_length(var20
, var21
);
3722 var23
= separate_compiler__MProperty__const_color(var_m
);
3729 var28
= string__NativeString__to_s_with_length(var26
, var27
);
3733 var29
= NEW_array__Array(&type_array__Arraykernel__Object
);
3734 { /* var29 = array_instance Array[Object] */
3736 var31
= NEW_array__NativeArray(var30
, &type_array__NativeArraykernel__Object
);
3737 ((struct instance_array__NativeArray
*)var31
)->values
[0] = (val
*) var19
;
3738 ((struct instance_array__NativeArray
*)var31
)->values
[1] = (val
*) var23
;
3739 ((struct instance_array__NativeArray
*)var31
)->values
[2] = (val
*) var25
;
3740 var32
= BOX_kernel__Int(var_color
); /* autobox from Int to Object */
3741 ((struct instance_array__NativeArray
*)var31
)->values
[3] = (val
*) var32
;
3743 ((void (*)(val
*, val
*, long))(var29
->class->vft
[COLOR_array__Array__with_native
]))(var29
, var31
, var30
) /* with_native on <var29:Array[Object]>*/;
3747 var33
= ((val
* (*)(val
*))(var29
->class->vft
[COLOR_string__Object__to_s
]))(var29
) /* to_s on <var29:Array[Object]>*/;
3750 abstract_compiler__AbstractCompiler__provide_declaration(self
, var18
, var33
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
3754 var34
= separate_compiler__MProperty__const_color(var_m
);
3759 var37
= "extern const int ";
3761 var39
= string__NativeString__to_s_with_length(var37
, var38
);
3766 var40
= separate_compiler__MProperty__const_color(var_m
);
3773 var45
= string__NativeString__to_s_with_length(var43
, var44
);
3777 var46
= NEW_array__Array(&type_array__Arraykernel__Object
);
3778 { /* var46 = array_instance Array[Object] */
3780 var48
= NEW_array__NativeArray(var47
, &type_array__NativeArraykernel__Object
);
3781 ((struct instance_array__NativeArray
*)var48
)->values
[0] = (val
*) var36
;
3782 ((struct instance_array__NativeArray
*)var48
)->values
[1] = (val
*) var40
;
3783 ((struct instance_array__NativeArray
*)var48
)->values
[2] = (val
*) var42
;
3785 ((void (*)(val
*, val
*, long))(var46
->class->vft
[COLOR_array__Array__with_native
]))(var46
, var48
, var47
) /* with_native on <var46:Array[Object]>*/;
3789 var49
= ((val
* (*)(val
*))(var46
->class->vft
[COLOR_string__Object__to_s
]))(var46
) /* to_s on <var46:Array[Object]>*/;
3792 abstract_compiler__AbstractCompiler__provide_declaration(self
, var34
, var49
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
3797 var52
= "const int ";
3799 var54
= string__NativeString__to_s_with_length(var52
, var53
);
3804 var55
= separate_compiler__MProperty__const_color(var_m
);
3811 var60
= string__NativeString__to_s_with_length(var58
, var59
);
3820 var65
= string__NativeString__to_s_with_length(var63
, var64
);
3824 var66
= NEW_array__Array(&type_array__Arraykernel__Object
);
3825 { /* var66 = array_instance Array[Object] */
3827 var68
= NEW_array__NativeArray(var67
, &type_array__NativeArraykernel__Object
);
3828 ((struct instance_array__NativeArray
*)var68
)->values
[0] = (val
*) var51
;
3829 ((struct instance_array__NativeArray
*)var68
)->values
[1] = (val
*) var55
;
3830 ((struct instance_array__NativeArray
*)var68
)->values
[2] = (val
*) var57
;
3831 var69
= BOX_kernel__Int(var_color
); /* autobox from Int to Object */
3832 ((struct instance_array__NativeArray
*)var68
)->values
[3] = (val
*) var69
;
3833 ((struct instance_array__NativeArray
*)var68
)->values
[4] = (val
*) var62
;
3835 ((void (*)(val
*, val
*, long))(var66
->class->vft
[COLOR_array__Array__with_native
]))(var66
, var68
, var67
) /* with_native on <var66:Array[Object]>*/;
3839 var70
= ((val
* (*)(val
*))(var66
->class->vft
[COLOR_string__Object__to_s
]))(var66
) /* to_s on <var66:Array[Object]>*/;
3842 abstract_compiler__AbstractCompilerVisitor__add(var_v
, var70
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add on <var_v:SeparateCompilerVisitor>*/
3846 /* <var_m:Object> isa MPropDef */
3847 cltype72
= type_model__MPropDef
.color
;
3848 idtype73
= type_model__MPropDef
.id
;
3849 if(cltype72
>= var_m
->type
->table_size
) {
3852 var71
= var_m
->type
->type_table
[cltype72
] == idtype73
;
3856 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
3857 var76
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
3858 if (unlikely(var76
== NULL
)) {
3859 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
3860 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 443);
3864 RET_LABEL75
:(void)0;
3868 { /* Inline modelbuilder#ModelBuilder#toolcontext (var74) on <var74:ModelBuilder> */
3869 var79
= var74
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var74:ModelBuilder> */
3870 if (unlikely(var79
== NULL
)) {
3871 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
3872 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
3876 RET_LABEL78
:(void)0;
3880 { /* Inline separate_compiler#ToolContext#opt_inline_coloring_numbers (var77) on <var77:ToolContext> */
3881 var82
= var77
->attrs
[COLOR_separate_compiler__ToolContext___opt_inline_coloring_numbers
].val
; /* _opt_inline_coloring_numbers on <var77:ToolContext> */
3882 if (unlikely(var82
== NULL
)) {
3883 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_coloring_numbers");
3884 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 32);
3888 RET_LABEL81
:(void)0;
3892 { /* Inline opts#Option#value (var80) on <var80:OptionBool> */
3893 var85
= var80
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var80:OptionBool> */
3895 RET_LABEL84
:(void)0;
3898 var86
= ((struct instance_kernel__Bool
*)var83
)->value
; /* autounbox from nullable Object to Bool */;
3901 var87
= separate_compiler__MPropDef__const_color(var_m
);
3908 var92
= string__NativeString__to_s_with_length(var90
, var91
);
3913 var93
= separate_compiler__MPropDef__const_color(var_m
);
3920 var98
= string__NativeString__to_s_with_length(var96
, var97
);
3924 var99
= NEW_array__Array(&type_array__Arraykernel__Object
);
3925 { /* var99 = array_instance Array[Object] */
3927 var101
= NEW_array__NativeArray(var100
, &type_array__NativeArraykernel__Object
);
3928 ((struct instance_array__NativeArray
*)var101
)->values
[0] = (val
*) var89
;
3929 ((struct instance_array__NativeArray
*)var101
)->values
[1] = (val
*) var93
;
3930 ((struct instance_array__NativeArray
*)var101
)->values
[2] = (val
*) var95
;
3931 var102
= BOX_kernel__Int(var_color
); /* autobox from Int to Object */
3932 ((struct instance_array__NativeArray
*)var101
)->values
[3] = (val
*) var102
;
3934 ((void (*)(val
*, val
*, long))(var99
->class->vft
[COLOR_array__Array__with_native
]))(var99
, var101
, var100
) /* with_native on <var99:Array[Object]>*/;
3938 var103
= ((val
* (*)(val
*))(var99
->class->vft
[COLOR_string__Object__to_s
]))(var99
) /* to_s on <var99:Array[Object]>*/;
3941 abstract_compiler__AbstractCompiler__provide_declaration(self
, var87
, var103
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
3945 var104
= separate_compiler__MPropDef__const_color(var_m
);
3948 var106
= varonce105
;
3950 var107
= "extern const int ";
3952 var109
= string__NativeString__to_s_with_length(var107
, var108
);
3954 varonce105
= var106
;
3957 var110
= separate_compiler__MPropDef__const_color(var_m
);
3960 var112
= varonce111
;
3964 var115
= string__NativeString__to_s_with_length(var113
, var114
);
3966 varonce111
= var112
;
3968 var116
= NEW_array__Array(&type_array__Arraykernel__Object
);
3969 { /* var116 = array_instance Array[Object] */
3971 var118
= NEW_array__NativeArray(var117
, &type_array__NativeArraykernel__Object
);
3972 ((struct instance_array__NativeArray
*)var118
)->values
[0] = (val
*) var106
;
3973 ((struct instance_array__NativeArray
*)var118
)->values
[1] = (val
*) var110
;
3974 ((struct instance_array__NativeArray
*)var118
)->values
[2] = (val
*) var112
;
3976 ((void (*)(val
*, val
*, long))(var116
->class->vft
[COLOR_array__Array__with_native
]))(var116
, var118
, var117
) /* with_native on <var116:Array[Object]>*/;
3980 var119
= ((val
* (*)(val
*))(var116
->class->vft
[COLOR_string__Object__to_s
]))(var116
) /* to_s on <var116:Array[Object]>*/;
3983 abstract_compiler__AbstractCompiler__provide_declaration(self
, var104
, var119
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
3986 var121
= varonce120
;
3988 var122
= "const int ";
3990 var124
= string__NativeString__to_s_with_length(var122
, var123
);
3992 varonce120
= var121
;
3995 var125
= separate_compiler__MPropDef__const_color(var_m
);
3998 var127
= varonce126
;
4002 var130
= string__NativeString__to_s_with_length(var128
, var129
);
4004 varonce126
= var127
;
4007 var132
= varonce131
;
4011 var135
= string__NativeString__to_s_with_length(var133
, var134
);
4013 varonce131
= var132
;
4015 var136
= NEW_array__Array(&type_array__Arraykernel__Object
);
4016 { /* var136 = array_instance Array[Object] */
4018 var138
= NEW_array__NativeArray(var137
, &type_array__NativeArraykernel__Object
);
4019 ((struct instance_array__NativeArray
*)var138
)->values
[0] = (val
*) var121
;
4020 ((struct instance_array__NativeArray
*)var138
)->values
[1] = (val
*) var125
;
4021 ((struct instance_array__NativeArray
*)var138
)->values
[2] = (val
*) var127
;
4022 var139
= BOX_kernel__Int(var_color
); /* autobox from Int to Object */
4023 ((struct instance_array__NativeArray
*)var138
)->values
[3] = (val
*) var139
;
4024 ((struct instance_array__NativeArray
*)var138
)->values
[4] = (val
*) var132
;
4026 ((void (*)(val
*, val
*, long))(var136
->class->vft
[COLOR_array__Array__with_native
]))(var136
, var138
, var137
) /* with_native on <var136:Array[Object]>*/;
4030 var140
= ((val
* (*)(val
*))(var136
->class->vft
[COLOR_string__Object__to_s
]))(var136
) /* to_s on <var136:Array[Object]>*/;
4033 abstract_compiler__AbstractCompilerVisitor__add(var_v
, var140
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add on <var_v:SeparateCompilerVisitor>*/
4037 /* <var_m:Object> isa MType */
4038 cltype142
= type_model__MType
.color
;
4039 idtype143
= type_model__MType
.id
;
4040 if(cltype142
>= var_m
->type
->table_size
) {
4043 var141
= var_m
->type
->type_table
[cltype142
] == idtype143
;
4047 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
4048 var146
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
4049 if (unlikely(var146
== NULL
)) {
4050 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
4051 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 443);
4055 RET_LABEL145
:(void)0;
4059 { /* Inline modelbuilder#ModelBuilder#toolcontext (var144) on <var144:ModelBuilder> */
4060 var149
= var144
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var144:ModelBuilder> */
4061 if (unlikely(var149
== NULL
)) {
4062 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
4063 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
4067 RET_LABEL148
:(void)0;
4071 { /* Inline separate_compiler#ToolContext#opt_inline_coloring_numbers (var147) on <var147:ToolContext> */
4072 var152
= var147
->attrs
[COLOR_separate_compiler__ToolContext___opt_inline_coloring_numbers
].val
; /* _opt_inline_coloring_numbers on <var147:ToolContext> */
4073 if (unlikely(var152
== NULL
)) {
4074 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_inline_coloring_numbers");
4075 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 32);
4079 RET_LABEL151
:(void)0;
4083 { /* Inline opts#Option#value (var150) on <var150:OptionBool> */
4084 var155
= var150
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var150:OptionBool> */
4086 RET_LABEL154
:(void)0;
4089 var156
= ((struct instance_kernel__Bool
*)var153
)->value
; /* autounbox from nullable Object to Bool */;
4092 var157
= separate_compiler__MType__const_color(var_m
);
4095 var159
= varonce158
;
4097 var160
= "#define ";
4099 var162
= string__NativeString__to_s_with_length(var160
, var161
);
4101 varonce158
= var159
;
4104 var163
= separate_compiler__MType__const_color(var_m
);
4107 var165
= varonce164
;
4111 var168
= string__NativeString__to_s_with_length(var166
, var167
);
4113 varonce164
= var165
;
4115 var169
= NEW_array__Array(&type_array__Arraykernel__Object
);
4116 { /* var169 = array_instance Array[Object] */
4118 var171
= NEW_array__NativeArray(var170
, &type_array__NativeArraykernel__Object
);
4119 ((struct instance_array__NativeArray
*)var171
)->values
[0] = (val
*) var159
;
4120 ((struct instance_array__NativeArray
*)var171
)->values
[1] = (val
*) var163
;
4121 ((struct instance_array__NativeArray
*)var171
)->values
[2] = (val
*) var165
;
4122 var172
= BOX_kernel__Int(var_color
); /* autobox from Int to Object */
4123 ((struct instance_array__NativeArray
*)var171
)->values
[3] = (val
*) var172
;
4125 ((void (*)(val
*, val
*, long))(var169
->class->vft
[COLOR_array__Array__with_native
]))(var169
, var171
, var170
) /* with_native on <var169:Array[Object]>*/;
4129 var173
= ((val
* (*)(val
*))(var169
->class->vft
[COLOR_string__Object__to_s
]))(var169
) /* to_s on <var169:Array[Object]>*/;
4132 abstract_compiler__AbstractCompiler__provide_declaration(self
, var157
, var173
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
4136 var174
= separate_compiler__MType__const_color(var_m
);
4139 var176
= varonce175
;
4141 var177
= "extern const int ";
4143 var179
= string__NativeString__to_s_with_length(var177
, var178
);
4145 varonce175
= var176
;
4148 var180
= separate_compiler__MType__const_color(var_m
);
4151 var182
= varonce181
;
4155 var185
= string__NativeString__to_s_with_length(var183
, var184
);
4157 varonce181
= var182
;
4159 var186
= NEW_array__Array(&type_array__Arraykernel__Object
);
4160 { /* var186 = array_instance Array[Object] */
4162 var188
= NEW_array__NativeArray(var187
, &type_array__NativeArraykernel__Object
);
4163 ((struct instance_array__NativeArray
*)var188
)->values
[0] = (val
*) var176
;
4164 ((struct instance_array__NativeArray
*)var188
)->values
[1] = (val
*) var180
;
4165 ((struct instance_array__NativeArray
*)var188
)->values
[2] = (val
*) var182
;
4167 ((void (*)(val
*, val
*, long))(var186
->class->vft
[COLOR_array__Array__with_native
]))(var186
, var188
, var187
) /* with_native on <var186:Array[Object]>*/;
4171 var189
= ((val
* (*)(val
*))(var186
->class->vft
[COLOR_string__Object__to_s
]))(var186
) /* to_s on <var186:Array[Object]>*/;
4174 abstract_compiler__AbstractCompiler__provide_declaration(self
, var174
, var189
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
4177 var191
= varonce190
;
4179 var192
= "const int ";
4181 var194
= string__NativeString__to_s_with_length(var192
, var193
);
4183 varonce190
= var191
;
4186 var195
= separate_compiler__MType__const_color(var_m
);
4189 var197
= varonce196
;
4193 var200
= string__NativeString__to_s_with_length(var198
, var199
);
4195 varonce196
= var197
;
4198 var202
= varonce201
;
4202 var205
= string__NativeString__to_s_with_length(var203
, var204
);
4204 varonce201
= var202
;
4206 var206
= NEW_array__Array(&type_array__Arraykernel__Object
);
4207 { /* var206 = array_instance Array[Object] */
4209 var208
= NEW_array__NativeArray(var207
, &type_array__NativeArraykernel__Object
);
4210 ((struct instance_array__NativeArray
*)var208
)->values
[0] = (val
*) var191
;
4211 ((struct instance_array__NativeArray
*)var208
)->values
[1] = (val
*) var195
;
4212 ((struct instance_array__NativeArray
*)var208
)->values
[2] = (val
*) var197
;
4213 var209
= BOX_kernel__Int(var_color
); /* autobox from Int to Object */
4214 ((struct instance_array__NativeArray
*)var208
)->values
[3] = (val
*) var209
;
4215 ((struct instance_array__NativeArray
*)var208
)->values
[4] = (val
*) var202
;
4217 ((void (*)(val
*, val
*, long))(var206
->class->vft
[COLOR_array__Array__with_native
]))(var206
, var208
, var207
) /* with_native on <var206:Array[Object]>*/;
4221 var210
= ((val
* (*)(val
*))(var206
->class->vft
[COLOR_string__Object__to_s
]))(var206
) /* to_s on <var206:Array[Object]>*/;
4224 abstract_compiler__AbstractCompilerVisitor__add(var_v
, var210
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add on <var_v:SeparateCompilerVisitor>*/
4232 { /* Inline separate_compiler#SeparateCompiler#color_consts_done (self) on <self:SeparateCompiler> */
4233 var213
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___color_consts_done
].val
; /* _color_consts_done on <self:SeparateCompiler> */
4234 if (unlikely(var213
== NULL
)) {
4235 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _color_consts_done");
4236 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 259);
4240 RET_LABEL212
:(void)0;
4244 hash_collection__HashSet__add(var211
, var_m
); /* Direct call hash_collection#HashSet#add on <var211:HashSet[Object]>*/
4248 /* method separate_compiler#SeparateCompiler#compile_color_const for (self: Object, SeparateCompilerVisitor, Object, Int) */
4249 void VIRTUAL_separate_compiler__SeparateCompiler__compile_color_const(val
* self
, val
* p0
, val
* p1
, long p2
) {
4250 separate_compiler__SeparateCompiler__compile_color_const(self
, p0
, p1
, p2
); /* Direct call separate_compiler#SeparateCompiler#compile_color_const on <self:Object(SeparateCompiler)>*/
4253 /* method separate_compiler#SeparateCompiler#color_consts_done for (self: SeparateCompiler): HashSet[Object] */
4254 val
* separate_compiler__SeparateCompiler__color_consts_done(val
* self
) {
4255 val
* var
/* : HashSet[Object] */;
4256 val
* var1
/* : HashSet[Object] */;
4257 var1
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___color_consts_done
].val
; /* _color_consts_done on <self:SeparateCompiler> */
4258 if (unlikely(var1
== NULL
)) {
4259 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _color_consts_done");
4260 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 259);
4267 /* method separate_compiler#SeparateCompiler#color_consts_done for (self: Object): HashSet[Object] */
4268 val
* VIRTUAL_separate_compiler__SeparateCompiler__color_consts_done(val
* self
) {
4269 val
* var
/* : HashSet[Object] */;
4270 val
* var1
/* : HashSet[Object] */;
4271 val
* var3
/* : HashSet[Object] */;
4272 { /* Inline separate_compiler#SeparateCompiler#color_consts_done (self) on <self:Object(SeparateCompiler)> */
4273 var3
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___color_consts_done
].val
; /* _color_consts_done on <self:Object(SeparateCompiler)> */
4274 if (unlikely(var3
== NULL
)) {
4275 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _color_consts_done");
4276 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 259);
4286 /* method separate_compiler#SeparateCompiler#do_property_coloring for (self: SeparateCompiler) */
4287 void separate_compiler__SeparateCompiler__do_property_coloring(val
* self
) {
4288 val
* var
/* : nullable RapidTypeAnalysis */;
4289 val
* var2
/* : nullable RapidTypeAnalysis */;
4290 val
* var_rta
/* var rta: nullable RapidTypeAnalysis */;
4291 val
* var3
/* : MModule */;
4292 val
* var5
/* : MModule */;
4293 val
* var6
/* : POSet[MClass] */;
4294 val
* var_poset
/* var poset: POSet[MClass] */;
4295 val
* var7
/* : HashSet[MClass] */;
4296 val
* var_mclasses
/* var mclasses: HashSet[MClass] */;
4297 val
* var8
/* : POSetColorer[MClass] */;
4298 val
* var_colorer
/* var colorer: POSetColorer[MClass] */;
4299 val
* var10
/* : Array[MMethod] */;
4300 val
* var_dead_methods
/* var dead_methods: Array[MMethod] */;
4301 val
* var11
/* : HashMap[MClass, Set[PropertyLayoutElement]] */;
4302 val
* var_mmethods
/* var mmethods: HashMap[MClass, Set[PropertyLayoutElement]] */;
4303 val
* var12
/* : HashMap[MClass, Set[MAttribute]] */;
4304 val
* var_mattributes
/* var mattributes: HashMap[MClass, Set[MAttribute]] */;
4305 val
* var13
/* : Iterator[Object] */;
4306 short int var14
/* : Bool */;
4307 val
* var15
/* : nullable Object */;
4308 val
* var_mclass
/* var mclass: MClass */;
4309 val
* var16
/* : HashSet[PropertyLayoutElement] */;
4310 val
* var17
/* : HashSet[MAttribute] */;
4311 val
* var18
/* : MModule */;
4312 val
* var20
/* : MModule */;
4313 val
* var21
/* : Set[MProperty] */;
4314 val
* var22
/* : Iterator[nullable Object] */;
4315 short int var23
/* : Bool */;
4316 val
* var24
/* : nullable Object */;
4317 val
* var_mprop
/* var mprop: MProperty */;
4318 short int var25
/* : Bool */;
4321 short int var26
/* : Bool */;
4322 short int var27
/* : Bool */;
4323 val
* var28
/* : ModelBuilder */;
4324 val
* var30
/* : ModelBuilder */;
4325 val
* var31
/* : ToolContext */;
4326 val
* var33
/* : ToolContext */;
4327 val
* var34
/* : OptionBool */;
4328 val
* var36
/* : OptionBool */;
4329 val
* var37
/* : nullable Object */;
4330 val
* var39
/* : nullable Object */;
4331 short int var40
/* : Bool */;
4332 short int var41
/* : Bool */;
4333 short int var_
/* var : Bool */;
4334 val
* var42
/* : null */;
4335 short int var43
/* : Bool */;
4336 short int var44
/* : Bool */;
4337 val
* var_other
/* var other: nullable Object */;
4338 short int var46
/* : Bool */;
4339 short int var47
/* : Bool */;
4340 short int var48
/* : Bool */;
4341 short int var_49
/* var : Bool */;
4342 val
* var50
/* : HashSet[MMethod] */;
4343 val
* var52
/* : HashSet[MMethod] */;
4344 short int var53
/* : Bool */;
4345 short int var54
/* : Bool */;
4346 val
* var55
/* : nullable Object */;
4347 short int var56
/* : Bool */;
4350 val
* var59
/* : nullable Object */;
4351 val
* var61
/* : HashSet[MMethodDef] */;
4352 val
* var_all_super_calls
/* var all_super_calls: HashSet[MMethodDef] */;
4353 val
* var62
/* : MModule */;
4354 val
* var64
/* : MModule */;
4355 val
* var65
/* : POSetElement[MModule] */;
4356 val
* var67
/* : POSetElement[MModule] */;
4357 val
* var68
/* : Collection[Object] */;
4358 val
* var69
/* : Iterator[nullable Object] */;
4359 short int var70
/* : Bool */;
4360 val
* var71
/* : nullable Object */;
4361 val
* var_mmodule
/* var mmodule: MModule */;
4362 val
* var72
/* : Array[MClassDef] */;
4363 val
* var74
/* : Array[MClassDef] */;
4364 val
* var75
/* : ArrayIterator[nullable Object] */;
4365 short int var76
/* : Bool */;
4366 val
* var77
/* : nullable Object */;
4367 val
* var_mclassdef
/* var mclassdef: MClassDef */;
4368 val
* var78
/* : Array[MPropDef] */;
4369 val
* var80
/* : Array[MPropDef] */;
4370 val
* var81
/* : ArrayIterator[nullable Object] */;
4371 short int var82
/* : Bool */;
4372 val
* var83
/* : nullable Object */;
4373 val
* var_mpropdef
/* var mpropdef: MPropDef */;
4374 short int var84
/* : Bool */;
4377 short int var87
/* : Bool */;
4378 short int var89
/* : Bool */;
4379 short int var91
/* : Bool */;
4380 val
* var94
/* : null */;
4381 short int var95
/* : Bool */;
4382 short int var96
/* : Bool */;
4383 short int var98
/* : Bool */;
4384 short int var99
/* : Bool */;
4385 short int var100
/* : Bool */;
4386 val
* var101
/* : HashSet[MMethodDef] */;
4387 val
* var103
/* : HashSet[MMethodDef] */;
4388 val
* var_super_calls
/* var super_calls: nullable Object */;
4389 val
* var104
/* : Iterator[Object] */;
4390 short int var105
/* : Bool */;
4391 val
* var106
/* : nullable Object */;
4392 val
* var_mmethoddef
/* var mmethoddef: MMethodDef */;
4393 val
* var107
/* : MClassDef */;
4394 val
* var109
/* : MClassDef */;
4395 val
* var110
/* : MClass */;
4396 val
* var112
/* : MClass */;
4397 val
* var_mclass113
/* var mclass: MClass */;
4398 val
* var114
/* : nullable Object */;
4399 val
* var115
/* : MModule */;
4400 val
* var117
/* : MModule */;
4401 val
* var118
/* : POSetElement[MClass] */;
4402 val
* var119
/* : Collection[Object] */;
4403 val
* var120
/* : Iterator[nullable Object] */;
4404 short int var121
/* : Bool */;
4405 val
* var122
/* : nullable Object */;
4406 val
* var_descendant
/* var descendant: MClass */;
4407 val
* var123
/* : nullable Object */;
4408 val
* var126
/* : POSetBucketsColorer[MClass, PropertyLayoutElement] */;
4409 val
* var127
/* : Map[Object, Set[Object]] */;
4410 val
* var_meth_colorer
/* var meth_colorer: POSetBucketsColorer[MClass, PropertyLayoutElement] */;
4411 val
* var128
/* : Map[Object, Int] */;
4412 val
* var130
/* : Map[MClass, Array[nullable MPropDef]] */;
4413 val
* var132
/* : Map[PropertyLayoutElement, Int] */;
4414 val
* var134
/* : Map[PropertyLayoutElement, Int] */;
4415 val
* var135
/* : ArrayIterator[nullable Object] */;
4416 short int var136
/* : Bool */;
4417 val
* var137
/* : nullable Object */;
4418 val
* var_mproperty
/* var mproperty: MMethod */;
4419 val
* var138
/* : AbstractCompilerVisitor */;
4420 long var139
/* : Int */;
4421 long var140
/* : Int */;
4422 long var142
/* : Int */;
4423 val
* var144
/* : Iterator[Object] */;
4424 short int var145
/* : Bool */;
4425 val
* var146
/* : nullable Object */;
4426 val
* var_mpropdef147
/* var mpropdef: MMethodDef */;
4427 short int var148
/* : Bool */;
4428 val
* var150
/* : AbstractCompilerVisitor */;
4429 long var151
/* : Int */;
4430 long var152
/* : Int */;
4431 long var154
/* : Int */;
4432 val
* var155
/* : POSetBucketsColorer[MClass, MAttribute] */;
4433 val
* var156
/* : Map[Object, Set[Object]] */;
4434 val
* var_attr_colorer
/* var attr_colorer: POSetBucketsColorer[MClass, MAttribute] */;
4435 val
* var157
/* : Map[Object, Int] */;
4436 val
* var159
/* : Map[MClass, Array[nullable MPropDef]] */;
4437 val
* var161
/* : Map[MAttribute, Int] */;
4438 val
* var163
/* : Map[MAttribute, Int] */;
4440 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
4441 var2
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
4448 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
4449 var5
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
4450 if (unlikely(var5
== NULL
)) {
4451 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
4452 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
4460 var6
= model__MModule__flatten_mclass_hierarchy(var3
);
4463 var7
= NEW_hash_collection__HashSet(&type_hash_collection__HashSetmodel__MClass
);
4465 hash_collection__HashSet__from(var7
, var_poset
); /* Direct call hash_collection#HashSet#from on <var7:HashSet[MClass]>*/
4467 var_mclasses
= var7
;
4468 var8
= NEW_coloring__POSetColorer(&type_coloring__POSetColorermodel__MClass
);
4470 { /* Inline coloring#POSetColorer#init (var8) on <var8:POSetColorer[MClass]> */
4476 coloring__POSetColorer__colorize(var_colorer
, var_poset
); /* Direct call coloring#POSetColorer#colorize on <var_colorer:POSetColorer[MClass]>*/
4478 var10
= NEW_array__Array(&type_array__Arraymodel__MMethod
);
4480 array__Array__init(var10
); /* Direct call array#Array#init on <var10:Array[MMethod]>*/
4482 var_dead_methods
= var10
;
4483 var11
= NEW_hash_collection__HashMap(&type_hash_collection__HashMapmodel__MClassabstract_collection__Setseparate_compiler__PropertyLayoutElement
);
4485 hash_collection__HashMap__init(var11
); /* Direct call hash_collection#HashMap#init on <var11:HashMap[MClass, Set[PropertyLayoutElement]]>*/
4487 var_mmethods
= var11
;
4488 var12
= NEW_hash_collection__HashMap(&type_hash_collection__HashMapmodel__MClassabstract_collection__Setmodel__MAttribute
);
4490 hash_collection__HashMap__init(var12
); /* Direct call hash_collection#HashMap#init on <var12:HashMap[MClass, Set[MAttribute]]>*/
4492 var_mattributes
= var12
;
4494 var13
= hash_collection__HashSet__iterator(var_mclasses
);
4498 var14
= ((short int (*)(val
*))(var13
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var13
) /* is_ok on <var13:Iterator[Object]>*/;
4502 var15
= ((val
* (*)(val
*))(var13
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var13
) /* item on <var13:Iterator[Object]>*/;
4505 var16
= NEW_hash_collection__HashSet(&type_hash_collection__HashSetseparate_compiler__PropertyLayoutElement
);
4507 hash_collection__HashSet__init(var16
); /* Direct call hash_collection#HashSet#init on <var16:HashSet[PropertyLayoutElement]>*/
4510 hash_collection__HashMap___91d_93d_61d(var_mmethods
, var_mclass
, var16
); /* Direct call hash_collection#HashMap#[]= on <var_mmethods:HashMap[MClass, Set[PropertyLayoutElement]]>*/
4512 var17
= NEW_hash_collection__HashSet(&type_hash_collection__HashSetmodel__MAttribute
);
4514 hash_collection__HashSet__init(var17
); /* Direct call hash_collection#HashSet#init on <var17:HashSet[MAttribute]>*/
4517 hash_collection__HashMap___91d_93d_61d(var_mattributes
, var_mclass
, var17
); /* Direct call hash_collection#HashMap#[]= on <var_mattributes:HashMap[MClass, Set[MAttribute]]>*/
4520 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
4521 var20
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
4522 if (unlikely(var20
== NULL
)) {
4523 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
4524 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
4528 RET_LABEL19
:(void)0;
4532 var21
= abstract_compiler__MModule__properties(var18
, var_mclass
);
4535 var22
= ((val
* (*)(val
*))(var21
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var21
) /* iterator on <var21:Set[MProperty]>*/;
4539 var23
= ((short int (*)(val
*))(var22
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var22
) /* is_ok on <var22:Iterator[nullable Object]>*/;
4543 var24
= ((val
* (*)(val
*))(var22
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var22
) /* item on <var22:Iterator[nullable Object]>*/;
4546 /* <var_mprop:MProperty> isa MMethod */
4547 cltype
= type_model__MMethod
.color
;
4548 idtype
= type_model__MMethod
.id
;
4549 if(cltype
>= var_mprop
->type
->table_size
) {
4552 var25
= var_mprop
->type
->type_table
[cltype
] == idtype
;
4556 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
4557 var30
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
4558 if (unlikely(var30
== NULL
)) {
4559 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
4560 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 443);
4564 RET_LABEL29
:(void)0;
4568 { /* Inline modelbuilder#ModelBuilder#toolcontext (var28) on <var28:ModelBuilder> */
4569 var33
= var28
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var28:ModelBuilder> */
4570 if (unlikely(var33
== NULL
)) {
4571 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
4572 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
4576 RET_LABEL32
:(void)0;
4580 { /* Inline separate_compiler#ToolContext#opt_colo_dead_methods (var31) on <var31:ToolContext> */
4581 var36
= var31
->attrs
[COLOR_separate_compiler__ToolContext___opt_colo_dead_methods
].val
; /* _opt_colo_dead_methods on <var31:ToolContext> */
4582 if (unlikely(var36
== NULL
)) {
4583 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_colo_dead_methods");
4584 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 42);
4588 RET_LABEL35
:(void)0;
4592 { /* Inline opts#Option#value (var34) on <var34:OptionBool> */
4593 var39
= var34
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var34:OptionBool> */
4595 RET_LABEL38
:(void)0;
4598 var40
= ((struct instance_kernel__Bool
*)var37
)->value
; /* autounbox from nullable Object to Bool */;
4603 if (var_rta
== NULL
) {
4604 var43
= 0; /* is null */
4606 var43
= 1; /* arg is null and recv is not */
4609 { /* Inline kernel#Object#!= (var_rta,var42) on <var_rta:nullable RapidTypeAnalysis> */
4612 var47
= ((short int (*)(val
*, val
*))(var_rta
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_rta
, var_other
) /* == on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)>*/;
4618 RET_LABEL45
:(void)0;
4629 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_methods (var_rta) on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)> */
4630 var52
= var_rta
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___live_methods
].val
; /* _live_methods on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)> */
4631 if (unlikely(var52
== NULL
)) {
4632 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_methods");
4633 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 77);
4637 RET_LABEL51
:(void)0;
4641 var53
= hash_collection__HashSet__has(var50
, var_mprop
);
4650 array__Array__add(var_dead_methods
, var_mprop
); /* Direct call array#Array#add on <var_dead_methods:Array[MMethod]>*/
4652 goto CONTINUE_label
;
4656 var55
= hash_collection__HashMap___91d_93d(var_mmethods
, var_mclass
);
4659 ((void (*)(val
*, val
*))(var55
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var55
, var_mprop
) /* add on <var55:nullable Object(Set[PropertyLayoutElement])>*/;
4662 /* <var_mprop:MProperty> isa MAttribute */
4663 cltype57
= type_model__MAttribute
.color
;
4664 idtype58
= type_model__MAttribute
.id
;
4665 if(cltype57
>= var_mprop
->type
->table_size
) {
4668 var56
= var_mprop
->type
->type_table
[cltype57
] == idtype58
;
4672 var59
= hash_collection__HashMap___91d_93d(var_mattributes
, var_mclass
);
4675 ((void (*)(val
*, val
*))(var59
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var59
, var_mprop
) /* add on <var59:nullable Object(Set[MAttribute])>*/;
4680 CONTINUE_label
: (void)0;
4682 ((void (*)(val
*))(var22
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var22
) /* next on <var22:Iterator[nullable Object]>*/;
4685 BREAK_label
: (void)0;
4686 CONTINUE_label60
: (void)0;
4688 ((void (*)(val
*))(var13
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var13
) /* next on <var13:Iterator[Object]>*/;
4691 BREAK_label60
: (void)0;
4692 var61
= NEW_hash_collection__HashSet(&type_hash_collection__HashSetmodel__MMethodDef
);
4694 hash_collection__HashSet__init(var61
); /* Direct call hash_collection#HashSet#init on <var61:HashSet[MMethodDef]>*/
4696 var_all_super_calls
= var61
;
4698 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
4699 var64
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
4700 if (unlikely(var64
== NULL
)) {
4701 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
4702 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
4706 RET_LABEL63
:(void)0;
4710 { /* Inline mmodule#MModule#in_importation (var62) on <var62:MModule> */
4711 var67
= var62
->attrs
[COLOR_mmodule__MModule___in_importation
].val
; /* _in_importation on <var62:MModule> */
4712 if (unlikely(var67
== NULL
)) {
4713 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _in_importation");
4714 PRINT_ERROR(" (%s:%d)\n", "src/model/mmodule.nit", 101);
4718 RET_LABEL66
:(void)0;
4722 var68
= poset__POSetElement__greaters(var65
);
4725 var69
= ((val
* (*)(val
*))(var68
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var68
) /* iterator on <var68:Collection[Object](Collection[MModule])>*/;
4729 var70
= ((short int (*)(val
*))(var69
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var69
) /* is_ok on <var69:Iterator[nullable Object]>*/;
4733 var71
= ((val
* (*)(val
*))(var69
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var69
) /* item on <var69:Iterator[nullable Object]>*/;
4735 var_mmodule
= var71
;
4737 { /* Inline model#MModule#mclassdefs (var_mmodule) on <var_mmodule:MModule> */
4738 var74
= var_mmodule
->attrs
[COLOR_model__MModule___mclassdefs
].val
; /* _mclassdefs on <var_mmodule:MModule> */
4739 if (unlikely(var74
== NULL
)) {
4740 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdefs");
4741 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 141);
4745 RET_LABEL73
:(void)0;
4749 var75
= array__AbstractArrayRead__iterator(var72
);
4753 var76
= array__ArrayIterator__is_ok(var75
);
4757 var77
= array__ArrayIterator__item(var75
);
4759 var_mclassdef
= var77
;
4761 { /* Inline model#MClassDef#mpropdefs (var_mclassdef) on <var_mclassdef:MClassDef> */
4762 var80
= var_mclassdef
->attrs
[COLOR_model__MClassDef___mpropdefs
].val
; /* _mpropdefs on <var_mclassdef:MClassDef> */
4763 if (unlikely(var80
== NULL
)) {
4764 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mpropdefs");
4765 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 574);
4769 RET_LABEL79
:(void)0;
4773 var81
= array__AbstractArrayRead__iterator(var78
);
4777 var82
= array__ArrayIterator__is_ok(var81
);
4781 var83
= array__ArrayIterator__item(var81
);
4783 var_mpropdef
= var83
;
4784 /* <var_mpropdef:MPropDef> isa MMethodDef */
4785 cltype85
= type_model__MMethodDef
.color
;
4786 idtype86
= type_model__MMethodDef
.id
;
4787 if(cltype85
>= var_mpropdef
->type
->table_size
) {
4790 var84
= var_mpropdef
->type
->type_table
[cltype85
] == idtype86
;
4794 goto CONTINUE_label88
;
4798 { /* Inline modelize_property#MPropDef#has_supercall (var_mpropdef) on <var_mpropdef:MPropDef(MMethodDef)> */
4799 var91
= var_mpropdef
->attrs
[COLOR_modelize_property__MPropDef___has_supercall
].s
; /* _has_supercall on <var_mpropdef:MPropDef(MMethodDef)> */
4801 RET_LABEL90
:(void)0;
4806 hash_collection__HashSet__add(var_all_super_calls
, var_mpropdef
); /* Direct call hash_collection#HashSet#add on <var_all_super_calls:HashSet[MMethodDef]>*/
4810 CONTINUE_label88
: (void)0;
4812 array__ArrayIterator__next(var81
); /* Direct call array#ArrayIterator#next on <var81:ArrayIterator[nullable Object]>*/
4815 BREAK_label88
: (void)0;
4816 CONTINUE_label92
: (void)0;
4818 array__ArrayIterator__next(var75
); /* Direct call array#ArrayIterator#next on <var75:ArrayIterator[nullable Object]>*/
4821 BREAK_label92
: (void)0;
4822 CONTINUE_label93
: (void)0;
4824 ((void (*)(val
*))(var69
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var69
) /* next on <var69:Iterator[nullable Object]>*/;
4827 BREAK_label93
: (void)0;
4829 if (var_rta
== NULL
) {
4830 var95
= 0; /* is null */
4832 var95
= 1; /* arg is null and recv is not */
4835 { /* Inline kernel#Object#!= (var_rta,var94) on <var_rta:nullable RapidTypeAnalysis> */
4838 var99
= ((short int (*)(val
*, val
*))(var_rta
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_rta
, var_other
) /* == on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)>*/;
4844 RET_LABEL97
:(void)0;
4850 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_super_sends (var_rta) on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)> */
4851 var103
= var_rta
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___live_super_sends
].val
; /* _live_super_sends on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)> */
4852 if (unlikely(var103
== NULL
)) {
4853 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_super_sends");
4854 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 110);
4858 RET_LABEL102
:(void)0;
4861 var_super_calls
= var101
;
4863 var_super_calls
= var_all_super_calls
;
4866 var104
= hash_collection__HashSet__iterator(var_super_calls
);
4870 var105
= ((short int (*)(val
*))(var104
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var104
) /* is_ok on <var104:Iterator[Object]>*/;
4874 var106
= ((val
* (*)(val
*))(var104
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var104
) /* item on <var104:Iterator[Object]>*/;
4876 var_mmethoddef
= var106
;
4878 { /* Inline model#MPropDef#mclassdef (var_mmethoddef) on <var_mmethoddef:MMethodDef> */
4879 var109
= var_mmethoddef
->attrs
[COLOR_model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_mmethoddef:MMethodDef> */
4880 if (unlikely(var109
== NULL
)) {
4881 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
4882 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1879);
4886 RET_LABEL108
:(void)0;
4890 { /* Inline model#MClassDef#mclass (var107) on <var107:MClassDef> */
4891 var112
= var107
->attrs
[COLOR_model__MClassDef___mclass
].val
; /* _mclass on <var107:MClassDef> */
4892 if (unlikely(var112
== NULL
)) {
4893 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass");
4894 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 474);
4898 RET_LABEL111
:(void)0;
4901 var_mclass113
= var110
;
4903 var114
= hash_collection__HashMap___91d_93d(var_mmethods
, var_mclass113
);
4906 ((void (*)(val
*, val
*))(var114
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var114
, var_mmethoddef
) /* add on <var114:nullable Object(Set[PropertyLayoutElement])>*/;
4909 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
4910 var117
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
4911 if (unlikely(var117
== NULL
)) {
4912 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
4913 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
4917 RET_LABEL116
:(void)0;
4921 var118
= model__MClass__in_hierarchy(var_mclass113
, var115
);
4924 var119
= poset__POSetElement__smallers(var118
);
4927 var120
= ((val
* (*)(val
*))(var119
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var119
) /* iterator on <var119:Collection[Object](Collection[MClass])>*/;
4931 var121
= ((short int (*)(val
*))(var120
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var120
) /* is_ok on <var120:Iterator[nullable Object]>*/;
4935 var122
= ((val
* (*)(val
*))(var120
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var120
) /* item on <var120:Iterator[nullable Object]>*/;
4937 var_descendant
= var122
;
4939 var123
= hash_collection__HashMap___91d_93d(var_mmethods
, var_descendant
);
4942 ((void (*)(val
*, val
*))(var123
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var123
, var_mmethoddef
) /* add on <var123:nullable Object(Set[PropertyLayoutElement])>*/;
4944 CONTINUE_label124
: (void)0;
4946 ((void (*)(val
*))(var120
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var120
) /* next on <var120:Iterator[nullable Object]>*/;
4949 BREAK_label124
: (void)0;
4950 CONTINUE_label125
: (void)0;
4952 ((void (*)(val
*))(var104
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var104
) /* next on <var104:Iterator[Object]>*/;
4955 BREAK_label125
: (void)0;
4956 var126
= NEW_coloring__POSetBucketsColorer(&type_coloring__POSetBucketsColorermodel__MClassseparate_compiler__PropertyLayoutElement
);
4958 var127
= coloring__POSetColorer__conflicts(var_colorer
);
4961 coloring__POSetBucketsColorer__init(var126
, var_poset
, var127
); /* Direct call coloring#POSetBucketsColorer#init on <var126:POSetBucketsColorer[MClass, PropertyLayoutElement]>*/
4963 var_meth_colorer
= var126
;
4965 var128
= coloring__POSetBucketsColorer__colorize(var_meth_colorer
, var_mmethods
);
4968 { /* Inline separate_compiler#SeparateCompiler#method_colors= (self,var128) on <self:SeparateCompiler> */
4969 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___method_colors
].val
= var128
; /* _method_colors on <self:SeparateCompiler> */
4970 RET_LABEL129
:(void)0;
4974 var130
= separate_compiler__SeparateCompiler__build_method_tables(self
, var_mclasses
, var_super_calls
);
4977 { /* Inline separate_compiler#SeparateCompiler#method_tables= (self,var130) on <self:SeparateCompiler> */
4978 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___method_tables
].val
= var130
; /* _method_tables on <self:SeparateCompiler> */
4979 RET_LABEL131
:(void)0;
4983 { /* Inline separate_compiler#SeparateCompiler#method_colors (self) on <self:SeparateCompiler> */
4984 var134
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___method_colors
].val
; /* _method_colors on <self:SeparateCompiler> */
4985 if (unlikely(var134
== NULL
)) {
4986 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _method_colors");
4987 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 161);
4991 RET_LABEL133
:(void)0;
4995 separate_compiler__SeparateCompiler__compile_color_consts(self
, var132
); /* Direct call separate_compiler#SeparateCompiler#compile_color_consts on <self:SeparateCompiler>*/
4998 var135
= array__AbstractArrayRead__iterator(var_dead_methods
);
5002 var136
= array__ArrayIterator__is_ok(var135
);
5006 var137
= array__ArrayIterator__item(var135
);
5008 var_mproperty
= var137
;
5010 var138
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_compiler__AbstractCompiler__new_visitor
]))(self
) /* new_visitor on <self:SeparateCompiler>*/;
5014 { /* Inline kernel#Int#unary - (var139) on <var139:Int> */
5018 RET_LABEL141
:(void)0;
5022 separate_compiler__SeparateCompiler__compile_color_const(self
, var138
, var_mproperty
, var140
); /* Direct call separate_compiler#SeparateCompiler#compile_color_const on <self:SeparateCompiler>*/
5024 CONTINUE_label143
: (void)0;
5026 array__ArrayIterator__next(var135
); /* Direct call array#ArrayIterator#next on <var135:ArrayIterator[nullable Object]>*/
5029 BREAK_label143
: (void)0;
5031 var144
= hash_collection__HashSet__iterator(var_all_super_calls
);
5035 var145
= ((short int (*)(val
*))(var144
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var144
) /* is_ok on <var144:Iterator[Object]>*/;
5039 var146
= ((val
* (*)(val
*))(var144
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var144
) /* item on <var144:Iterator[Object]>*/;
5041 var_mpropdef147
= var146
;
5043 var148
= hash_collection__HashSet__has(var_super_calls
, var_mpropdef147
);
5046 goto CONTINUE_label149
;
5050 var150
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_compiler__AbstractCompiler__new_visitor
]))(self
) /* new_visitor on <self:SeparateCompiler>*/;
5054 { /* Inline kernel#Int#unary - (var151) on <var151:Int> */
5058 RET_LABEL153
:(void)0;
5062 separate_compiler__SeparateCompiler__compile_color_const(self
, var150
, var_mpropdef147
, var152
); /* Direct call separate_compiler#SeparateCompiler#compile_color_const on <self:SeparateCompiler>*/
5064 CONTINUE_label149
: (void)0;
5066 ((void (*)(val
*))(var144
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var144
) /* next on <var144:Iterator[Object]>*/;
5069 BREAK_label149
: (void)0;
5070 var155
= NEW_coloring__POSetBucketsColorer(&type_coloring__POSetBucketsColorermodel__MClassmodel__MAttribute
);
5072 var156
= coloring__POSetColorer__conflicts(var_colorer
);
5075 coloring__POSetBucketsColorer__init(var155
, var_poset
, var156
); /* Direct call coloring#POSetBucketsColorer#init on <var155:POSetBucketsColorer[MClass, MAttribute]>*/
5077 var_attr_colorer
= var155
;
5079 var157
= coloring__POSetBucketsColorer__colorize(var_attr_colorer
, var_mattributes
);
5082 { /* Inline separate_compiler#SeparateCompiler#attr_colors= (self,var157) on <self:SeparateCompiler> */
5083 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___attr_colors
].val
= var157
; /* _attr_colors on <self:SeparateCompiler> */
5084 RET_LABEL158
:(void)0;
5088 var159
= separate_compiler__SeparateCompiler__build_attr_tables(self
, var_mclasses
);
5091 { /* Inline separate_compiler#SeparateCompiler#attr_tables= (self,var159) on <self:SeparateCompiler> */
5092 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___attr_tables
].val
= var159
; /* _attr_tables on <self:SeparateCompiler> */
5093 RET_LABEL160
:(void)0;
5097 { /* Inline separate_compiler#SeparateCompiler#attr_colors (self) on <self:SeparateCompiler> */
5098 var163
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___attr_colors
].val
; /* _attr_colors on <self:SeparateCompiler> */
5099 if (unlikely(var163
== NULL
)) {
5100 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _attr_colors");
5101 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 162);
5105 RET_LABEL162
:(void)0;
5109 separate_compiler__SeparateCompiler__compile_color_consts(self
, var161
); /* Direct call separate_compiler#SeparateCompiler#compile_color_consts on <self:SeparateCompiler>*/
5113 /* method separate_compiler#SeparateCompiler#do_property_coloring for (self: Object) */
5114 void VIRTUAL_separate_compiler__SeparateCompiler__do_property_coloring(val
* self
) {
5115 separate_compiler__SeparateCompiler__do_property_coloring(self
); /* Direct call separate_compiler#SeparateCompiler#do_property_coloring on <self:Object(SeparateCompiler)>*/
5118 /* method separate_compiler#SeparateCompiler#build_method_tables for (self: SeparateCompiler, Set[MClass], Set[MMethodDef]): Map[MClass, Array[nullable MPropDef]] */
5119 val
* separate_compiler__SeparateCompiler__build_method_tables(val
* self
, val
* p0
, val
* p1
) {
5120 val
* var
/* : Map[MClass, Array[nullable MPropDef]] */;
5121 val
* var_mclasses
/* var mclasses: Set[MClass] */;
5122 val
* var_super_calls
/* var super_calls: Set[MMethodDef] */;
5123 val
* var1
/* : HashMap[MClass, Array[nullable MPropDef]] */;
5124 val
* var_tables
/* var tables: HashMap[MClass, Array[nullable MPropDef]] */;
5125 val
* var2
/* : Iterator[nullable Object] */;
5126 short int var3
/* : Bool */;
5127 val
* var4
/* : nullable Object */;
5128 val
* var_mclass
/* var mclass: MClass */;
5129 val
* var5
/* : Array[nullable MPropDef] */;
5130 val
* var_table
/* var table: Array[nullable MPropDef] */;
5131 val
* var6
/* : MModule */;
5132 val
* var8
/* : MModule */;
5133 val
* var9
/* : Set[MProperty] */;
5134 val
* var_mproperties
/* var mproperties: Set[MProperty] */;
5135 val
* var10
/* : MClassDef */;
5136 val
* var11
/* : MClassType */;
5137 val
* var13
/* : MClassType */;
5138 val
* var_mtype
/* var mtype: MClassType */;
5139 val
* var14
/* : Iterator[nullable Object] */;
5140 short int var15
/* : Bool */;
5141 val
* var16
/* : nullable Object */;
5142 val
* var_mproperty
/* var mproperty: MProperty */;
5143 short int var17
/* : Bool */;
5146 short int var18
/* : Bool */;
5147 val
* var19
/* : Map[PropertyLayoutElement, Int] */;
5148 val
* var21
/* : Map[PropertyLayoutElement, Int] */;
5149 short int var22
/* : Bool */;
5150 short int var23
/* : Bool */;
5151 val
* var24
/* : Map[PropertyLayoutElement, Int] */;
5152 val
* var26
/* : Map[PropertyLayoutElement, Int] */;
5153 val
* var27
/* : nullable Object */;
5154 long var28
/* : Int */;
5155 long var_color
/* var color: Int */;
5156 long var29
/* : Int */;
5157 short int var30
/* : Bool */;
5158 short int var32
/* : Bool */;
5161 const char* var_class_name
;
5162 short int var35
/* : Bool */;
5163 val
* var36
/* : Range[Int] */;
5164 long var37
/* : Int */;
5165 val
* var38
/* : Discrete */;
5166 val
* var39
/* : Discrete */;
5167 val
* var40
/* : Iterator[Discrete] */;
5168 short int var41
/* : Bool */;
5169 val
* var42
/* : nullable Object */;
5170 long var_i
/* var i: Int */;
5171 long var43
/* : Int */;
5172 val
* var44
/* : null */;
5173 val
* var46
/* : MModule */;
5174 val
* var48
/* : MModule */;
5175 val
* var49
/* : MPropDef */;
5176 val
* var50
/* : Iterator[nullable Object] */;
5177 short int var51
/* : Bool */;
5178 val
* var52
/* : nullable Object */;
5179 val
* var_supercall
/* var supercall: MMethodDef */;
5180 val
* var53
/* : MModule */;
5181 val
* var55
/* : MModule */;
5182 val
* var56
/* : Set[MClassDef] */;
5183 val
* var57
/* : MClassDef */;
5184 val
* var59
/* : MClassDef */;
5185 short int var60
/* : Bool */;
5186 short int var61
/* : Bool */;
5187 val
* var63
/* : Map[PropertyLayoutElement, Int] */;
5188 val
* var65
/* : Map[PropertyLayoutElement, Int] */;
5189 val
* var66
/* : nullable Object */;
5190 long var67
/* : Int */;
5191 long var_color68
/* var color: Int */;
5192 long var69
/* : Int */;
5193 short int var70
/* : Bool */;
5194 short int var72
/* : Bool */;
5197 const char* var_class_name75
;
5198 short int var76
/* : Bool */;
5199 val
* var77
/* : Range[Int] */;
5200 long var78
/* : Int */;
5201 val
* var79
/* : Discrete */;
5202 val
* var80
/* : Discrete */;
5203 val
* var81
/* : Iterator[Discrete] */;
5204 short int var82
/* : Bool */;
5205 val
* var83
/* : nullable Object */;
5206 long var_i84
/* var i: Int */;
5207 long var85
/* : Int */;
5208 val
* var86
/* : null */;
5209 val
* var88
/* : MModule */;
5210 val
* var90
/* : MModule */;
5211 val
* var91
/* : MPropDef */;
5212 val
* var_mmethoddef
/* var mmethoddef: MMethodDef */;
5214 var_super_calls
= p1
;
5215 var1
= NEW_hash_collection__HashMap(&type_hash_collection__HashMapmodel__MClassarray__Arraynullable_model__MPropDef
);
5217 hash_collection__HashMap__init(var1
); /* Direct call hash_collection#HashMap#init on <var1:HashMap[MClass, Array[nullable MPropDef]]>*/
5221 var2
= ((val
* (*)(val
*))(var_mclasses
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_mclasses
) /* iterator on <var_mclasses:Set[MClass]>*/;
5225 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
5229 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
5232 var5
= NEW_array__Array(&type_array__Arraynullable_model__MPropDef
);
5234 array__Array__init(var5
); /* Direct call array#Array#init on <var5:Array[nullable MPropDef]>*/
5238 hash_collection__HashMap___91d_93d_61d(var_tables
, var_mclass
, var_table
); /* Direct call hash_collection#HashMap#[]= on <var_tables:HashMap[MClass, Array[nullable MPropDef]]>*/
5241 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
5242 var8
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
5243 if (unlikely(var8
== NULL
)) {
5244 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
5245 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
5253 var9
= abstract_compiler__MModule__properties(var6
, var_mclass
);
5255 var_mproperties
= var9
;
5257 var10
= model__MClass__intro(var_mclass
);
5260 { /* Inline model#MClassDef#bound_mtype (var10) on <var10:MClassDef> */
5261 var13
= var10
->attrs
[COLOR_model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var10:MClassDef> */
5262 if (unlikely(var13
== NULL
)) {
5263 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
5264 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 477);
5268 RET_LABEL12
:(void)0;
5273 var14
= ((val
* (*)(val
*))(var_mproperties
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_mproperties
) /* iterator on <var_mproperties:Set[MProperty]>*/;
5277 var15
= ((short int (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var14
) /* is_ok on <var14:Iterator[nullable Object]>*/;
5281 var16
= ((val
* (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var14
) /* item on <var14:Iterator[nullable Object]>*/;
5283 var_mproperty
= var16
;
5284 /* <var_mproperty:MProperty> isa MMethod */
5285 cltype
= type_model__MMethod
.color
;
5286 idtype
= type_model__MMethod
.id
;
5287 if(cltype
>= var_mproperty
->type
->table_size
) {
5290 var17
= var_mproperty
->type
->type_table
[cltype
] == idtype
;
5294 goto CONTINUE_label
;
5298 { /* Inline separate_compiler#SeparateCompiler#method_colors (self) on <self:SeparateCompiler> */
5299 var21
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___method_colors
].val
; /* _method_colors on <self:SeparateCompiler> */
5300 if (unlikely(var21
== NULL
)) {
5301 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _method_colors");
5302 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 161);
5306 RET_LABEL20
:(void)0;
5310 var22
= abstract_collection__MapRead__has_key(var19
, var_mproperty
);
5314 goto CONTINUE_label
;
5318 { /* Inline separate_compiler#SeparateCompiler#method_colors (self) on <self:SeparateCompiler> */
5319 var26
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___method_colors
].val
; /* _method_colors on <self:SeparateCompiler> */
5320 if (unlikely(var26
== NULL
)) {
5321 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _method_colors");
5322 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 161);
5326 RET_LABEL25
:(void)0;
5330 var27
= ((val
* (*)(val
*, val
*))(var24
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var24
, var_mproperty
) /* [] on <var24:Map[PropertyLayoutElement, Int]>*/;
5332 var28
= ((struct instance_kernel__Int
*)var27
)->value
; /* autounbox from nullable Object to Int */;
5335 var29
= array__AbstractArrayRead__length(var_table
);
5338 { /* Inline kernel#Int#<= (var29,var_color) on <var29:Int> */
5339 /* Covariant cast for argument 0 (i) <var_color:Int> isa OTHER */
5340 /* <var_color:Int> isa OTHER */
5341 var32
= 1; /* easy <var_color:Int> isa OTHER*/
5342 if (unlikely(!var32
)) {
5343 var_class_name
= type_kernel__Int
.name
;
5344 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
5345 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 324);
5348 var35
= var29
<= var_color
;
5351 RET_LABEL31
:(void)0;
5355 var36
= NEW_range__Range(&type_range__Rangekernel__Int
);
5357 var37
= array__AbstractArrayRead__length(var_table
);
5360 var38
= BOX_kernel__Int(var37
); /* autobox from Int to Discrete */
5361 var39
= BOX_kernel__Int(var_color
); /* autobox from Int to Discrete */
5362 range__Range__without_last(var36
, var38
, var39
); /* Direct call range#Range#without_last on <var36:Range[Int]>*/
5365 var40
= range__Range__iterator(var36
);
5369 var41
= ((short int (*)(val
*))(var40
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var40
) /* is_ok on <var40:Iterator[Discrete]>*/;
5373 var42
= ((val
* (*)(val
*))(var40
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var40
) /* item on <var40:Iterator[Discrete]>*/;
5375 var43
= ((struct instance_kernel__Int
*)var42
)->value
; /* autounbox from nullable Object to Int */;
5379 array__Array___91d_93d_61d(var_table
, var_i
, var44
); /* Direct call array#Array#[]= on <var_table:Array[nullable MPropDef]>*/
5381 CONTINUE_label45
: (void)0;
5383 ((void (*)(val
*))(var40
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var40
) /* next on <var40:Iterator[Discrete]>*/;
5386 BREAK_label45
: (void)0;
5390 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
5391 var48
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
5392 if (unlikely(var48
== NULL
)) {
5393 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
5394 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
5398 RET_LABEL47
:(void)0;
5402 var49
= model__MProperty__lookup_first_definition(var_mproperty
, var46
, var_mtype
);
5405 array__Array___91d_93d_61d(var_table
, var_color
, var49
); /* Direct call array#Array#[]= on <var_table:Array[nullable MPropDef]>*/
5407 CONTINUE_label
: (void)0;
5409 ((void (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var14
) /* next on <var14:Iterator[nullable Object]>*/;
5412 BREAK_label
: (void)0;
5414 var50
= ((val
* (*)(val
*))(var_super_calls
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_super_calls
) /* iterator on <var_super_calls:Set[MMethodDef]>*/;
5418 var51
= ((short int (*)(val
*))(var50
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var50
) /* is_ok on <var50:Iterator[nullable Object]>*/;
5422 var52
= ((val
* (*)(val
*))(var50
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var50
) /* item on <var50:Iterator[nullable Object]>*/;
5424 var_supercall
= var52
;
5426 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
5427 var55
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
5428 if (unlikely(var55
== NULL
)) {
5429 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
5430 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
5434 RET_LABEL54
:(void)0;
5438 var56
= model__MClassType__collect_mclassdefs(var_mtype
, var53
);
5441 { /* Inline model#MPropDef#mclassdef (var_supercall) on <var_supercall:MMethodDef> */
5442 var59
= var_supercall
->attrs
[COLOR_model__MPropDef___mclassdef
].val
; /* _mclassdef on <var_supercall:MMethodDef> */
5443 if (unlikely(var59
== NULL
)) {
5444 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdef");
5445 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 1879);
5449 RET_LABEL58
:(void)0;
5453 var60
= ((short int (*)(val
*, val
*))(var56
->class->vft
[COLOR_abstract_collection__Collection__has
]))(var56
, var57
) /* has on <var56:Set[MClassDef]>*/;
5457 goto CONTINUE_label62
;
5461 { /* Inline separate_compiler#SeparateCompiler#method_colors (self) on <self:SeparateCompiler> */
5462 var65
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___method_colors
].val
; /* _method_colors on <self:SeparateCompiler> */
5463 if (unlikely(var65
== NULL
)) {
5464 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _method_colors");
5465 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 161);
5469 RET_LABEL64
:(void)0;
5473 var66
= ((val
* (*)(val
*, val
*))(var63
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var63
, var_supercall
) /* [] on <var63:Map[PropertyLayoutElement, Int]>*/;
5475 var67
= ((struct instance_kernel__Int
*)var66
)->value
; /* autounbox from nullable Object to Int */;
5476 var_color68
= var67
;
5478 var69
= array__AbstractArrayRead__length(var_table
);
5481 { /* Inline kernel#Int#<= (var69,var_color68) on <var69:Int> */
5482 /* Covariant cast for argument 0 (i) <var_color68:Int> isa OTHER */
5483 /* <var_color68:Int> isa OTHER */
5484 var72
= 1; /* easy <var_color68:Int> isa OTHER*/
5485 if (unlikely(!var72
)) {
5486 var_class_name75
= type_kernel__Int
.name
;
5487 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name75
);
5488 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 324);
5491 var76
= var69
<= var_color68
;
5494 RET_LABEL71
:(void)0;
5498 var77
= NEW_range__Range(&type_range__Rangekernel__Int
);
5500 var78
= array__AbstractArrayRead__length(var_table
);
5503 var79
= BOX_kernel__Int(var78
); /* autobox from Int to Discrete */
5504 var80
= BOX_kernel__Int(var_color68
); /* autobox from Int to Discrete */
5505 range__Range__without_last(var77
, var79
, var80
); /* Direct call range#Range#without_last on <var77:Range[Int]>*/
5508 var81
= range__Range__iterator(var77
);
5512 var82
= ((short int (*)(val
*))(var81
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var81
) /* is_ok on <var81:Iterator[Discrete]>*/;
5516 var83
= ((val
* (*)(val
*))(var81
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var81
) /* item on <var81:Iterator[Discrete]>*/;
5518 var85
= ((struct instance_kernel__Int
*)var83
)->value
; /* autounbox from nullable Object to Int */;
5522 array__Array___91d_93d_61d(var_table
, var_i84
, var86
); /* Direct call array#Array#[]= on <var_table:Array[nullable MPropDef]>*/
5524 CONTINUE_label87
: (void)0;
5526 ((void (*)(val
*))(var81
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var81
) /* next on <var81:Iterator[Discrete]>*/;
5529 BREAK_label87
: (void)0;
5533 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
5534 var90
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
5535 if (unlikely(var90
== NULL
)) {
5536 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
5537 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
5541 RET_LABEL89
:(void)0;
5545 var91
= model__MPropDef__lookup_next_definition(var_supercall
, var88
, var_mtype
);
5547 var_mmethoddef
= var91
;
5549 array__Array___91d_93d_61d(var_table
, var_color68
, var_mmethoddef
); /* Direct call array#Array#[]= on <var_table:Array[nullable MPropDef]>*/
5551 CONTINUE_label62
: (void)0;
5553 ((void (*)(val
*))(var50
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var50
) /* next on <var50:Iterator[nullable Object]>*/;
5556 BREAK_label62
: (void)0;
5557 CONTINUE_label92
: (void)0;
5559 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
5562 BREAK_label92
: (void)0;
5568 /* method separate_compiler#SeparateCompiler#build_method_tables for (self: Object, Set[MClass], Set[MMethodDef]): Map[MClass, Array[nullable MPropDef]] */
5569 val
* VIRTUAL_separate_compiler__SeparateCompiler__build_method_tables(val
* self
, val
* p0
, val
* p1
) {
5570 val
* var
/* : Map[MClass, Array[nullable MPropDef]] */;
5571 val
* var1
/* : Map[MClass, Array[nullable MPropDef]] */;
5572 var1
= separate_compiler__SeparateCompiler__build_method_tables(self
, p0
, p1
);
5577 /* method separate_compiler#SeparateCompiler#build_attr_tables for (self: SeparateCompiler, Set[MClass]): Map[MClass, Array[nullable MPropDef]] */
5578 val
* separate_compiler__SeparateCompiler__build_attr_tables(val
* self
, val
* p0
) {
5579 val
* var
/* : Map[MClass, Array[nullable MPropDef]] */;
5580 val
* var_mclasses
/* var mclasses: Set[MClass] */;
5581 val
* var1
/* : HashMap[MClass, Array[nullable MPropDef]] */;
5582 val
* var_tables
/* var tables: HashMap[MClass, Array[nullable MPropDef]] */;
5583 val
* var2
/* : Iterator[nullable Object] */;
5584 short int var3
/* : Bool */;
5585 val
* var4
/* : nullable Object */;
5586 val
* var_mclass
/* var mclass: MClass */;
5587 val
* var5
/* : Array[nullable MPropDef] */;
5588 val
* var_table
/* var table: Array[nullable MPropDef] */;
5589 val
* var6
/* : MModule */;
5590 val
* var8
/* : MModule */;
5591 val
* var9
/* : Set[MProperty] */;
5592 val
* var_mproperties
/* var mproperties: Set[MProperty] */;
5593 val
* var10
/* : MClassDef */;
5594 val
* var11
/* : MClassType */;
5595 val
* var13
/* : MClassType */;
5596 val
* var_mtype
/* var mtype: MClassType */;
5597 val
* var14
/* : Iterator[nullable Object] */;
5598 short int var15
/* : Bool */;
5599 val
* var16
/* : nullable Object */;
5600 val
* var_mproperty
/* var mproperty: MProperty */;
5601 short int var17
/* : Bool */;
5604 short int var18
/* : Bool */;
5605 val
* var19
/* : Map[MAttribute, Int] */;
5606 val
* var21
/* : Map[MAttribute, Int] */;
5607 short int var22
/* : Bool */;
5608 short int var23
/* : Bool */;
5609 val
* var24
/* : Map[MAttribute, Int] */;
5610 val
* var26
/* : Map[MAttribute, Int] */;
5611 val
* var27
/* : nullable Object */;
5612 long var28
/* : Int */;
5613 long var_color
/* var color: Int */;
5614 long var29
/* : Int */;
5615 short int var30
/* : Bool */;
5616 short int var32
/* : Bool */;
5619 const char* var_class_name
;
5620 short int var35
/* : Bool */;
5621 val
* var36
/* : Range[Int] */;
5622 long var37
/* : Int */;
5623 val
* var38
/* : Discrete */;
5624 val
* var39
/* : Discrete */;
5625 val
* var40
/* : Iterator[Discrete] */;
5626 short int var41
/* : Bool */;
5627 val
* var42
/* : nullable Object */;
5628 long var_i
/* var i: Int */;
5629 long var43
/* : Int */;
5630 val
* var44
/* : null */;
5631 val
* var46
/* : MModule */;
5632 val
* var48
/* : MModule */;
5633 val
* var49
/* : MPropDef */;
5635 var1
= NEW_hash_collection__HashMap(&type_hash_collection__HashMapmodel__MClassarray__Arraynullable_model__MPropDef
);
5637 hash_collection__HashMap__init(var1
); /* Direct call hash_collection#HashMap#init on <var1:HashMap[MClass, Array[nullable MPropDef]]>*/
5641 var2
= ((val
* (*)(val
*))(var_mclasses
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_mclasses
) /* iterator on <var_mclasses:Set[MClass]>*/;
5645 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
5649 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
5652 var5
= NEW_array__Array(&type_array__Arraynullable_model__MPropDef
);
5654 array__Array__init(var5
); /* Direct call array#Array#init on <var5:Array[nullable MPropDef]>*/
5658 hash_collection__HashMap___91d_93d_61d(var_tables
, var_mclass
, var_table
); /* Direct call hash_collection#HashMap#[]= on <var_tables:HashMap[MClass, Array[nullable MPropDef]]>*/
5661 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
5662 var8
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
5663 if (unlikely(var8
== NULL
)) {
5664 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
5665 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
5673 var9
= abstract_compiler__MModule__properties(var6
, var_mclass
);
5675 var_mproperties
= var9
;
5677 var10
= model__MClass__intro(var_mclass
);
5680 { /* Inline model#MClassDef#bound_mtype (var10) on <var10:MClassDef> */
5681 var13
= var10
->attrs
[COLOR_model__MClassDef___bound_mtype
].val
; /* _bound_mtype on <var10:MClassDef> */
5682 if (unlikely(var13
== NULL
)) {
5683 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _bound_mtype");
5684 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 477);
5688 RET_LABEL12
:(void)0;
5693 var14
= ((val
* (*)(val
*))(var_mproperties
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_mproperties
) /* iterator on <var_mproperties:Set[MProperty]>*/;
5697 var15
= ((short int (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var14
) /* is_ok on <var14:Iterator[nullable Object]>*/;
5701 var16
= ((val
* (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var14
) /* item on <var14:Iterator[nullable Object]>*/;
5703 var_mproperty
= var16
;
5704 /* <var_mproperty:MProperty> isa MAttribute */
5705 cltype
= type_model__MAttribute
.color
;
5706 idtype
= type_model__MAttribute
.id
;
5707 if(cltype
>= var_mproperty
->type
->table_size
) {
5710 var17
= var_mproperty
->type
->type_table
[cltype
] == idtype
;
5714 goto CONTINUE_label
;
5718 { /* Inline separate_compiler#SeparateCompiler#attr_colors (self) on <self:SeparateCompiler> */
5719 var21
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___attr_colors
].val
; /* _attr_colors on <self:SeparateCompiler> */
5720 if (unlikely(var21
== NULL
)) {
5721 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _attr_colors");
5722 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 162);
5726 RET_LABEL20
:(void)0;
5730 var22
= abstract_collection__MapRead__has_key(var19
, var_mproperty
);
5734 goto CONTINUE_label
;
5738 { /* Inline separate_compiler#SeparateCompiler#attr_colors (self) on <self:SeparateCompiler> */
5739 var26
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___attr_colors
].val
; /* _attr_colors on <self:SeparateCompiler> */
5740 if (unlikely(var26
== NULL
)) {
5741 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _attr_colors");
5742 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 162);
5746 RET_LABEL25
:(void)0;
5750 var27
= ((val
* (*)(val
*, val
*))(var24
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var24
, var_mproperty
) /* [] on <var24:Map[MAttribute, Int]>*/;
5752 var28
= ((struct instance_kernel__Int
*)var27
)->value
; /* autounbox from nullable Object to Int */;
5755 var29
= array__AbstractArrayRead__length(var_table
);
5758 { /* Inline kernel#Int#<= (var29,var_color) on <var29:Int> */
5759 /* Covariant cast for argument 0 (i) <var_color:Int> isa OTHER */
5760 /* <var_color:Int> isa OTHER */
5761 var32
= 1; /* easy <var_color:Int> isa OTHER*/
5762 if (unlikely(!var32
)) {
5763 var_class_name
= type_kernel__Int
.name
;
5764 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
5765 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 324);
5768 var35
= var29
<= var_color
;
5771 RET_LABEL31
:(void)0;
5775 var36
= NEW_range__Range(&type_range__Rangekernel__Int
);
5777 var37
= array__AbstractArrayRead__length(var_table
);
5780 var38
= BOX_kernel__Int(var37
); /* autobox from Int to Discrete */
5781 var39
= BOX_kernel__Int(var_color
); /* autobox from Int to Discrete */
5782 range__Range__without_last(var36
, var38
, var39
); /* Direct call range#Range#without_last on <var36:Range[Int]>*/
5785 var40
= range__Range__iterator(var36
);
5789 var41
= ((short int (*)(val
*))(var40
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var40
) /* is_ok on <var40:Iterator[Discrete]>*/;
5793 var42
= ((val
* (*)(val
*))(var40
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var40
) /* item on <var40:Iterator[Discrete]>*/;
5795 var43
= ((struct instance_kernel__Int
*)var42
)->value
; /* autounbox from nullable Object to Int */;
5799 array__Array___91d_93d_61d(var_table
, var_i
, var44
); /* Direct call array#Array#[]= on <var_table:Array[nullable MPropDef]>*/
5801 CONTINUE_label45
: (void)0;
5803 ((void (*)(val
*))(var40
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var40
) /* next on <var40:Iterator[Discrete]>*/;
5806 BREAK_label45
: (void)0;
5810 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
5811 var48
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
5812 if (unlikely(var48
== NULL
)) {
5813 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
5814 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
5818 RET_LABEL47
:(void)0;
5822 var49
= model__MProperty__lookup_first_definition(var_mproperty
, var46
, var_mtype
);
5825 array__Array___91d_93d_61d(var_table
, var_color
, var49
); /* Direct call array#Array#[]= on <var_table:Array[nullable MPropDef]>*/
5827 CONTINUE_label
: (void)0;
5829 ((void (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var14
) /* next on <var14:Iterator[nullable Object]>*/;
5832 BREAK_label
: (void)0;
5833 CONTINUE_label50
: (void)0;
5835 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
5838 BREAK_label50
: (void)0;
5844 /* method separate_compiler#SeparateCompiler#build_attr_tables for (self: Object, Set[MClass]): Map[MClass, Array[nullable MPropDef]] */
5845 val
* VIRTUAL_separate_compiler__SeparateCompiler__build_attr_tables(val
* self
, val
* p0
) {
5846 val
* var
/* : Map[MClass, Array[nullable MPropDef]] */;
5847 val
* var1
/* : Map[MClass, Array[nullable MPropDef]] */;
5848 var1
= separate_compiler__SeparateCompiler__build_attr_tables(self
, p0
);
5853 /* method separate_compiler#SeparateCompiler#do_type_coloring for (self: SeparateCompiler): POSet[MType] */
5854 val
* separate_compiler__SeparateCompiler__do_type_coloring(val
* self
) {
5855 val
* var
/* : POSet[MType] */;
5856 val
* var1
/* : nullable RapidTypeAnalysis */;
5857 val
* var3
/* : nullable RapidTypeAnalysis */;
5858 val
* var4
/* : HashSet[MClassType] */;
5859 val
* var6
/* : HashSet[MClassType] */;
5860 val
* var_live_types
/* var live_types: HashSet[MClassType] */;
5861 val
* var7
/* : nullable RapidTypeAnalysis */;
5862 val
* var9
/* : nullable RapidTypeAnalysis */;
5863 val
* var10
/* : HashSet[MType] */;
5864 val
* var12
/* : HashSet[MType] */;
5865 val
* var_live_cast_types
/* var live_cast_types: HashSet[MType] */;
5866 val
* var13
/* : HashSet[MType] */;
5867 val
* var_mtypes
/* var mtypes: HashSet[MType] */;
5868 val
* var14
/* : HashMap[MClass, Int] */;
5869 val
* var16
/* : HashMap[MClass, Int] */;
5870 val
* var17
/* : RemovableCollection[Object] */;
5871 val
* var19
/* : RemovableCollection[Object] */;
5872 val
* var20
/* : Iterator[nullable Object] */;
5873 short int var21
/* : Bool */;
5874 val
* var22
/* : nullable Object */;
5875 val
* var_c
/* var c: MClass */;
5876 val
* var23
/* : MClassType */;
5877 val
* var25
/* : MClassType */;
5878 val
* var26
/* : POSet[MType] */;
5879 val
* var_poset
/* var poset: POSet[MType] */;
5880 val
* var27
/* : POSetColorer[MType] */;
5881 val
* var_colorer
/* var colorer: POSetColorer[MType] */;
5882 val
* var29
/* : Map[Object, Int] */;
5883 val
* var31
/* : Map[Object, Int] */;
5884 val
* var33
/* : Map[MType, Array[nullable MType]] */;
5886 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
5887 var3
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
5893 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5894 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 410);
5897 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_types (var1) on <var1:nullable RapidTypeAnalysis> */
5898 if (unlikely(var1
== NULL
)) {
5899 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5900 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 55);
5903 var6
= var1
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___live_types
].val
; /* _live_types on <var1:nullable RapidTypeAnalysis> */
5904 if (unlikely(var6
== NULL
)) {
5905 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_types");
5906 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 55);
5913 var_live_types
= var4
;
5915 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
5916 var9
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
5922 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5923 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 411);
5926 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_cast_types (var7) on <var7:nullable RapidTypeAnalysis> */
5927 if (unlikely(var7
== NULL
)) {
5928 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5929 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 67);
5932 var12
= var7
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___live_cast_types
].val
; /* _live_cast_types on <var7:nullable RapidTypeAnalysis> */
5933 if (unlikely(var12
== NULL
)) {
5934 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_cast_types");
5935 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 67);
5939 RET_LABEL11
:(void)0;
5942 var_live_cast_types
= var10
;
5943 var13
= NEW_hash_collection__HashSet(&type_hash_collection__HashSetmodel__MType
);
5945 hash_collection__HashSet__init(var13
); /* Direct call hash_collection#HashSet#init on <var13:HashSet[MType]>*/
5949 abstract_collection__SimpleCollection__add_all(var_mtypes
, var_live_types
); /* Direct call abstract_collection#SimpleCollection#add_all on <var_mtypes:HashSet[MType]>*/
5952 abstract_collection__SimpleCollection__add_all(var_mtypes
, var_live_cast_types
); /* Direct call abstract_collection#SimpleCollection#add_all on <var_mtypes:HashSet[MType]>*/
5955 { /* Inline separate_compiler#SeparateCompiler#box_kinds (self) on <self:SeparateCompiler> */
5956 var16
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___box_kinds
].val
; /* _box_kinds on <self:SeparateCompiler> */
5957 if (unlikely(var16
== NULL
)) {
5958 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _box_kinds");
5959 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 211);
5963 RET_LABEL15
:(void)0;
5967 { /* Inline hash_collection#HashMap#keys (var14) on <var14:HashMap[MClass, Int]> */
5968 var19
= var14
->attrs
[COLOR_hash_collection__HashMap___keys
].val
; /* _keys on <var14:HashMap[MClass, Int]> */
5969 if (unlikely(var19
== NULL
)) {
5970 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _keys");
5971 PRINT_ERROR(" (%s:%d)\n", "lib/standard/collection/hash_collection.nit", 245);
5975 RET_LABEL18
:(void)0;
5979 var20
= ((val
* (*)(val
*))(var17
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var17
) /* iterator on <var17:RemovableCollection[Object](RemovableCollection[MClass])>*/;
5983 var21
= ((short int (*)(val
*))(var20
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var20
) /* is_ok on <var20:Iterator[nullable Object]>*/;
5987 var22
= ((val
* (*)(val
*))(var20
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var20
) /* item on <var20:Iterator[nullable Object]>*/;
5991 { /* Inline model#MClass#mclass_type (var_c) on <var_c:MClass> */
5992 var25
= var_c
->attrs
[COLOR_model__MClass___mclass_type
].val
; /* _mclass_type on <var_c:MClass> */
5993 if (unlikely(var25
== NULL
)) {
5994 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclass_type");
5995 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 417);
5999 RET_LABEL24
:(void)0;
6003 hash_collection__HashSet__add(var_mtypes
, var23
); /* Direct call hash_collection#HashSet#add on <var_mtypes:HashSet[MType]>*/
6005 CONTINUE_label
: (void)0;
6007 ((void (*)(val
*))(var20
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var20
) /* next on <var20:Iterator[nullable Object]>*/;
6010 BREAK_label
: (void)0;
6012 var26
= separate_compiler__SeparateCompiler__poset_from_mtypes(self
, var_mtypes
);
6015 var27
= NEW_coloring__POSetColorer(&type_coloring__POSetColorermodel__MType
);
6017 { /* Inline coloring#POSetColorer#init (var27) on <var27:POSetColorer[MType]> */
6018 RET_LABEL28
:(void)0;
6021 var_colorer
= var27
;
6023 coloring__POSetColorer__colorize(var_colorer
, var_poset
); /* Direct call coloring#POSetColorer#colorize on <var_colorer:POSetColorer[MType]>*/
6026 var29
= coloring__POSetColorer__ids(var_colorer
);
6029 { /* Inline separate_compiler#SeparateCompiler#type_ids= (self,var29) on <self:SeparateCompiler> */
6030 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_ids
].val
= var29
; /* _type_ids on <self:SeparateCompiler> */
6031 RET_LABEL30
:(void)0;
6035 var31
= coloring__POSetColorer__colors(var_colorer
);
6038 { /* Inline separate_compiler#SeparateCompiler#type_colors= (self,var31) on <self:SeparateCompiler> */
6039 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_colors
].val
= var31
; /* _type_colors on <self:SeparateCompiler> */
6040 RET_LABEL32
:(void)0;
6044 var33
= separate_compiler__SeparateCompiler__build_type_tables(self
, var_poset
);
6047 { /* Inline separate_compiler#SeparateCompiler#type_tables= (self,var33) on <self:SeparateCompiler> */
6048 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_tables
].val
= var33
; /* _type_tables on <self:SeparateCompiler> */
6049 RET_LABEL34
:(void)0;
6053 separate_compiler__SeparateCompiler__compile_resolution_tables(self
, var_mtypes
); /* Direct call separate_compiler#SeparateCompiler#compile_resolution_tables on <self:SeparateCompiler>*/
6060 /* method separate_compiler#SeparateCompiler#do_type_coloring for (self: Object): POSet[MType] */
6061 val
* VIRTUAL_separate_compiler__SeparateCompiler__do_type_coloring(val
* self
) {
6062 val
* var
/* : POSet[MType] */;
6063 val
* var1
/* : POSet[MType] */;
6064 var1
= separate_compiler__SeparateCompiler__do_type_coloring(self
);
6069 /* method separate_compiler#SeparateCompiler#poset_from_mtypes for (self: SeparateCompiler, Set[MType]): POSet[MType] */
6070 val
* separate_compiler__SeparateCompiler__poset_from_mtypes(val
* self
, val
* p0
) {
6071 val
* var
/* : POSet[MType] */;
6072 val
* var_mtypes
/* var mtypes: Set[MType] */;
6073 val
* var1
/* : POSet[MType] */;
6074 val
* var_poset
/* var poset: POSet[MType] */;
6075 val
* var3
/* : Iterator[nullable Object] */;
6076 short int var4
/* : Bool */;
6077 val
* var5
/* : nullable Object */;
6078 val
* var_e
/* var e: MType */;
6079 val
* var6
/* : POSetElement[Object] */;
6080 val
* var7
/* : Iterator[nullable Object] */;
6081 short int var8
/* : Bool */;
6082 val
* var9
/* : nullable Object */;
6083 val
* var_o
/* var o: MType */;
6084 short int var10
/* : Bool */;
6085 short int var11
/* : Bool */;
6086 val
* var_other
/* var other: nullable Object */;
6087 short int var13
/* : Bool */;
6088 short int var15
/* : Bool */;
6089 val
* var16
/* : MModule */;
6090 val
* var18
/* : MModule */;
6091 val
* var19
/* : null */;
6092 short int var20
/* : Bool */;
6094 var1
= NEW_poset__POSet(&type_poset__POSetmodel__MType
);
6096 { /* Inline poset#POSet#init (var1) on <var1:POSet[MType]> */
6102 var3
= ((val
* (*)(val
*))(var_mtypes
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_mtypes
) /* iterator on <var_mtypes:Set[MType]>*/;
6106 var4
= ((short int (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var3
) /* is_ok on <var3:Iterator[nullable Object]>*/;
6110 var5
= ((val
* (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var3
) /* item on <var3:Iterator[nullable Object]>*/;
6114 var6
= poset__POSet__add_node(var_poset
, var_e
);
6118 var7
= ((val
* (*)(val
*))(var_mtypes
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_mtypes
) /* iterator on <var_mtypes:Set[MType]>*/;
6122 var8
= ((short int (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var7
) /* is_ok on <var7:Iterator[nullable Object]>*/;
6126 var9
= ((val
* (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var7
) /* item on <var7:Iterator[nullable Object]>*/;
6130 { /* Inline kernel#Object#== (var_e,var_o) on <var_e:MType> */
6133 { /* Inline kernel#Object#is_same_instance (var_e,var_other) on <var_e:MType> */
6134 var15
= var_e
== var_other
;
6137 RET_LABEL14
:(void)0;
6142 RET_LABEL12
:(void)0;
6147 goto CONTINUE_label
;
6151 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
6152 var18
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
6153 if (unlikely(var18
== NULL
)) {
6154 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
6155 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
6159 RET_LABEL17
:(void)0;
6164 var20
= model__MType__is_subtype(var_e
, var16
, var19
, var_o
);
6168 poset__POSet__add_edge(var_poset
, var_e
, var_o
); /* Direct call poset#POSet#add_edge on <var_poset:POSet[MType]>*/
6172 CONTINUE_label
: (void)0;
6174 ((void (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var7
) /* next on <var7:Iterator[nullable Object]>*/;
6177 BREAK_label
: (void)0;
6178 CONTINUE_label21
: (void)0;
6180 ((void (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var3
) /* next on <var3:Iterator[nullable Object]>*/;
6183 BREAK_label21
: (void)0;
6189 /* method separate_compiler#SeparateCompiler#poset_from_mtypes for (self: Object, Set[MType]): POSet[MType] */
6190 val
* VIRTUAL_separate_compiler__SeparateCompiler__poset_from_mtypes(val
* self
, val
* p0
) {
6191 val
* var
/* : POSet[MType] */;
6192 val
* var1
/* : POSet[MType] */;
6193 var1
= separate_compiler__SeparateCompiler__poset_from_mtypes(self
, p0
);
6198 /* method separate_compiler#SeparateCompiler#build_type_tables for (self: SeparateCompiler, POSet[MType]): Map[MType, Array[nullable MType]] */
6199 val
* separate_compiler__SeparateCompiler__build_type_tables(val
* self
, val
* p0
) {
6200 val
* var
/* : Map[MType, Array[nullable MType]] */;
6201 val
* var_mtypes
/* var mtypes: POSet[MType] */;
6202 val
* var1
/* : HashMap[MType, Array[nullable MType]] */;
6203 val
* var_tables
/* var tables: HashMap[MType, Array[nullable MType]] */;
6204 val
* var2
/* : Iterator[Object] */;
6205 short int var3
/* : Bool */;
6206 val
* var4
/* : nullable Object */;
6207 val
* var_mtype
/* var mtype: MType */;
6208 val
* var5
/* : Array[nullable MType] */;
6209 val
* var_table
/* var table: Array[nullable MType] */;
6210 val
* var6
/* : POSetElement[Object] */;
6211 val
* var7
/* : Collection[Object] */;
6212 val
* var8
/* : Iterator[nullable Object] */;
6213 short int var9
/* : Bool */;
6214 val
* var10
/* : nullable Object */;
6215 val
* var_sup
/* var sup: MType */;
6216 val
* var11
/* : Map[MType, Int] */;
6217 val
* var13
/* : Map[MType, Int] */;
6218 val
* var14
/* : nullable Object */;
6219 long var15
/* : Int */;
6220 long var_color
/* var color: Int */;
6221 long var16
/* : Int */;
6222 short int var17
/* : Bool */;
6223 short int var19
/* : Bool */;
6226 const char* var_class_name
;
6227 short int var20
/* : Bool */;
6228 val
* var21
/* : Range[Int] */;
6229 long var22
/* : Int */;
6230 val
* var23
/* : Discrete */;
6231 val
* var24
/* : Discrete */;
6232 val
* var25
/* : Iterator[Discrete] */;
6233 short int var26
/* : Bool */;
6234 val
* var27
/* : nullable Object */;
6235 long var_i
/* var i: Int */;
6236 long var28
/* : Int */;
6237 val
* var29
/* : null */;
6239 var1
= NEW_hash_collection__HashMap(&type_hash_collection__HashMapmodel__MTypearray__Arraynullable_model__MType
);
6241 hash_collection__HashMap__init(var1
); /* Direct call hash_collection#HashMap#init on <var1:HashMap[MType, Array[nullable MType]]>*/
6245 var2
= poset__POSet__iterator(var_mtypes
);
6249 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[Object]>*/;
6253 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[Object]>*/;
6256 var5
= NEW_array__Array(&type_array__Arraynullable_model__MType
);
6258 array__Array__init(var5
); /* Direct call array#Array#init on <var5:Array[nullable MType]>*/
6262 var6
= poset__POSet___91d_93d(var_mtypes
, var_mtype
);
6265 var7
= poset__POSetElement__greaters(var6
);
6268 var8
= ((val
* (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var7
) /* iterator on <var7:Collection[Object](Collection[MType])>*/;
6272 var9
= ((short int (*)(val
*))(var8
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var8
) /* is_ok on <var8:Iterator[nullable Object]>*/;
6276 var10
= ((val
* (*)(val
*))(var8
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var8
) /* item on <var8:Iterator[nullable Object]>*/;
6280 { /* Inline separate_compiler#SeparateCompiler#type_colors (self) on <self:SeparateCompiler> */
6281 var13
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_colors
].val
; /* _type_colors on <self:SeparateCompiler> */
6282 if (unlikely(var13
== NULL
)) {
6283 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_colors");
6284 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 159);
6288 RET_LABEL12
:(void)0;
6292 var14
= ((val
* (*)(val
*, val
*))(var11
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var11
, var_sup
) /* [] on <var11:Map[MType, Int]>*/;
6294 var15
= ((struct instance_kernel__Int
*)var14
)->value
; /* autounbox from nullable Object to Int */;
6297 var16
= array__AbstractArrayRead__length(var_table
);
6300 { /* Inline kernel#Int#<= (var16,var_color) on <var16:Int> */
6301 /* Covariant cast for argument 0 (i) <var_color:Int> isa OTHER */
6302 /* <var_color:Int> isa OTHER */
6303 var19
= 1; /* easy <var_color:Int> isa OTHER*/
6304 if (unlikely(!var19
)) {
6305 var_class_name
= type_kernel__Int
.name
;
6306 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
6307 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 324);
6310 var20
= var16
<= var_color
;
6313 RET_LABEL18
:(void)0;
6317 var21
= NEW_range__Range(&type_range__Rangekernel__Int
);
6319 var22
= array__AbstractArrayRead__length(var_table
);
6322 var23
= BOX_kernel__Int(var22
); /* autobox from Int to Discrete */
6323 var24
= BOX_kernel__Int(var_color
); /* autobox from Int to Discrete */
6324 range__Range__without_last(var21
, var23
, var24
); /* Direct call range#Range#without_last on <var21:Range[Int]>*/
6327 var25
= range__Range__iterator(var21
);
6331 var26
= ((short int (*)(val
*))(var25
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var25
) /* is_ok on <var25:Iterator[Discrete]>*/;
6335 var27
= ((val
* (*)(val
*))(var25
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var25
) /* item on <var25:Iterator[Discrete]>*/;
6337 var28
= ((struct instance_kernel__Int
*)var27
)->value
; /* autounbox from nullable Object to Int */;
6341 array__Array___91d_93d_61d(var_table
, var_i
, var29
); /* Direct call array#Array#[]= on <var_table:Array[nullable MType]>*/
6343 CONTINUE_label
: (void)0;
6345 ((void (*)(val
*))(var25
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var25
) /* next on <var25:Iterator[Discrete]>*/;
6348 BREAK_label
: (void)0;
6352 array__Array___91d_93d_61d(var_table
, var_color
, var_sup
); /* Direct call array#Array#[]= on <var_table:Array[nullable MType]>*/
6354 CONTINUE_label30
: (void)0;
6356 ((void (*)(val
*))(var8
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var8
) /* next on <var8:Iterator[nullable Object]>*/;
6359 BREAK_label30
: (void)0;
6361 hash_collection__HashMap___91d_93d_61d(var_tables
, var_mtype
, var_table
); /* Direct call hash_collection#HashMap#[]= on <var_tables:HashMap[MType, Array[nullable MType]]>*/
6363 CONTINUE_label31
: (void)0;
6365 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[Object]>*/;
6368 BREAK_label31
: (void)0;
6374 /* method separate_compiler#SeparateCompiler#build_type_tables for (self: Object, POSet[MType]): Map[MType, Array[nullable MType]] */
6375 val
* VIRTUAL_separate_compiler__SeparateCompiler__build_type_tables(val
* self
, val
* p0
) {
6376 val
* var
/* : Map[MType, Array[nullable MType]] */;
6377 val
* var1
/* : Map[MType, Array[nullable MType]] */;
6378 var1
= separate_compiler__SeparateCompiler__build_type_tables(self
, p0
);
6383 /* method separate_compiler#SeparateCompiler#compile_resolution_tables for (self: SeparateCompiler, Set[MType]) */
6384 void separate_compiler__SeparateCompiler__compile_resolution_tables(val
* self
, val
* p0
) {
6385 val
* var_mtypes
/* var mtypes: Set[MType] */;
6386 val
* var
/* : HashMap[MClassType, Set[MType]] */;
6387 val
* var_mtype2unresolved
/* var mtype2unresolved: HashMap[MClassType, Set[MType]] */;
6388 val
* var1
/* : nullable RapidTypeAnalysis */;
6389 val
* var3
/* : nullable RapidTypeAnalysis */;
6390 val
* var4
/* : HashSet[MClassType] */;
6391 val
* var6
/* : HashSet[MClassType] */;
6392 val
* var7
/* : Iterator[Object] */;
6393 short int var8
/* : Bool */;
6394 val
* var9
/* : nullable Object */;
6395 val
* var_mtype
/* var mtype: MClassType */;
6396 val
* var10
/* : HashSet[MType] */;
6397 val
* var_set
/* var set: HashSet[MType] */;
6398 val
* var11
/* : MModule */;
6399 val
* var13
/* : MModule */;
6400 val
* var14
/* : Set[MClassDef] */;
6401 val
* var15
/* : Iterator[nullable Object] */;
6402 short int var16
/* : Bool */;
6403 val
* var17
/* : nullable Object */;
6404 val
* var_cd
/* var cd: MClassDef */;
6405 val
* var18
/* : Map[MClassDef, Set[MType]] */;
6406 val
* var20
/* : Map[MClassDef, Set[MType]] */;
6407 short int var21
/* : Bool */;
6408 val
* var22
/* : Map[MClassDef, Set[MType]] */;
6409 val
* var24
/* : Map[MClassDef, Set[MType]] */;
6410 val
* var25
/* : nullable Object */;
6411 val
* var27
/* : BucketsColorer[MType, MType] */;
6412 val
* var_colorer
/* var colorer: BucketsColorer[MType, MType] */;
6413 val
* var29
/* : Map[Object, Int] */;
6414 val
* var31
/* : Map[MClassType, Array[nullable MType]] */;
6415 val
* var33
/* : HashSet[MType] */;
6416 val
* var_all_unresolved
/* var all_unresolved: HashSet[MType] */;
6417 val
* var34
/* : Map[MClassDef, Set[MType]] */;
6418 val
* var36
/* : Map[MClassDef, Set[MType]] */;
6419 val
* var37
/* : Collection[nullable Object] */;
6420 val
* var38
/* : Iterator[nullable Object] */;
6421 short int var39
/* : Bool */;
6422 val
* var40
/* : nullable Object */;
6423 val
* var_t
/* var t: Set[MType] */;
6424 val
* var42
/* : HashMap[MType, Int] */;
6425 val
* var_all_unresolved_types_colors
/* var all_unresolved_types_colors: HashMap[MType, Int] */;
6426 val
* var43
/* : Iterator[Object] */;
6427 short int var44
/* : Bool */;
6428 val
* var45
/* : nullable Object */;
6429 val
* var_t46
/* var t: MType */;
6430 val
* var47
/* : Map[MType, Int] */;
6431 val
* var49
/* : Map[MType, Int] */;
6432 short int var50
/* : Bool */;
6433 val
* var51
/* : Map[MType, Int] */;
6434 val
* var53
/* : Map[MType, Int] */;
6435 val
* var54
/* : nullable Object */;
6436 long var55
/* : Int */;
6437 long var56
/* : Int */;
6438 long var58
/* : Int */;
6439 val
* var59
/* : nullable Object */;
6441 var
= NEW_hash_collection__HashMap(&type_hash_collection__HashMapmodel__MClassTypeabstract_collection__Setmodel__MType
);
6443 hash_collection__HashMap__init(var
); /* Direct call hash_collection#HashMap#init on <var:HashMap[MClassType, Set[MType]]>*/
6445 var_mtype2unresolved
= var
;
6447 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
6448 var3
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
6454 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6455 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 475);
6458 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_types (var1) on <var1:nullable RapidTypeAnalysis> */
6459 if (unlikely(var1
== NULL
)) {
6460 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6461 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 55);
6464 var6
= var1
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___live_types
].val
; /* _live_types on <var1:nullable RapidTypeAnalysis> */
6465 if (unlikely(var6
== NULL
)) {
6466 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_types");
6467 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 55);
6475 var7
= hash_collection__HashSet__iterator(var4
);
6479 var8
= ((short int (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var7
) /* is_ok on <var7:Iterator[Object]>*/;
6483 var9
= ((val
* (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var7
) /* item on <var7:Iterator[Object]>*/;
6486 var10
= NEW_hash_collection__HashSet(&type_hash_collection__HashSetmodel__MType
);
6488 hash_collection__HashSet__init(var10
); /* Direct call hash_collection#HashSet#init on <var10:HashSet[MType]>*/
6492 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
6493 var13
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
6494 if (unlikely(var13
== NULL
)) {
6495 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
6496 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
6500 RET_LABEL12
:(void)0;
6504 var14
= model__MClassType__collect_mclassdefs(var_mtype
, var11
);
6507 var15
= ((val
* (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var14
) /* iterator on <var14:Set[MClassDef]>*/;
6511 var16
= ((short int (*)(val
*))(var15
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var15
) /* is_ok on <var15:Iterator[nullable Object]>*/;
6515 var17
= ((val
* (*)(val
*))(var15
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var15
) /* item on <var15:Iterator[nullable Object]>*/;
6519 { /* Inline separate_compiler#SeparateCompiler#live_unresolved_types (self) on <self:SeparateCompiler> */
6520 var20
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___live_unresolved_types
].val
; /* _live_unresolved_types on <self:SeparateCompiler> */
6521 if (unlikely(var20
== NULL
)) {
6522 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_unresolved_types");
6523 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 156);
6527 RET_LABEL19
:(void)0;
6531 var21
= abstract_collection__MapRead__has_key(var18
, var_cd
);
6535 { /* Inline separate_compiler#SeparateCompiler#live_unresolved_types (self) on <self:SeparateCompiler> */
6536 var24
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___live_unresolved_types
].val
; /* _live_unresolved_types on <self:SeparateCompiler> */
6537 if (unlikely(var24
== NULL
)) {
6538 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_unresolved_types");
6539 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 156);
6543 RET_LABEL23
:(void)0;
6547 var25
= ((val
* (*)(val
*, val
*))(var22
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var22
, var_cd
) /* [] on <var22:Map[MClassDef, Set[MType]]>*/;
6550 abstract_collection__SimpleCollection__add_all(var_set
, var25
); /* Direct call abstract_collection#SimpleCollection#add_all on <var_set:HashSet[MType]>*/
6554 CONTINUE_label
: (void)0;
6556 ((void (*)(val
*))(var15
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var15
) /* next on <var15:Iterator[nullable Object]>*/;
6559 BREAK_label
: (void)0;
6561 hash_collection__HashMap___91d_93d_61d(var_mtype2unresolved
, var_mtype
, var_set
); /* Direct call hash_collection#HashMap#[]= on <var_mtype2unresolved:HashMap[MClassType, Set[MType]]>*/
6563 CONTINUE_label26
: (void)0;
6565 ((void (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var7
) /* next on <var7:Iterator[Object]>*/;
6568 BREAK_label26
: (void)0;
6569 var27
= NEW_coloring__BucketsColorer(&type_coloring__BucketsColorermodel__MTypemodel__MType
);
6571 { /* Inline coloring#BucketsColorer#init (var27) on <var27:BucketsColorer[MType, MType]> */
6572 RET_LABEL28
:(void)0;
6575 var_colorer
= var27
;
6577 var29
= coloring__BucketsColorer__colorize(var_colorer
, var_mtype2unresolved
);
6580 { /* Inline separate_compiler#SeparateCompiler#opentype_colors= (self,var29) on <self:SeparateCompiler> */
6581 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___opentype_colors
].val
= var29
; /* _opentype_colors on <self:SeparateCompiler> */
6582 RET_LABEL30
:(void)0;
6586 var31
= separate_compiler__SeparateCompiler__build_resolution_tables(self
, var_mtype2unresolved
);
6589 { /* Inline separate_compiler#SeparateCompiler#resolution_tables= (self,var31) on <self:SeparateCompiler> */
6590 self
->attrs
[COLOR_separate_compiler__SeparateCompiler___resolution_tables
].val
= var31
; /* _resolution_tables on <self:SeparateCompiler> */
6591 RET_LABEL32
:(void)0;
6594 var33
= NEW_hash_collection__HashSet(&type_hash_collection__HashSetmodel__MType
);
6596 hash_collection__HashSet__init(var33
); /* Direct call hash_collection#HashSet#init on <var33:HashSet[MType]>*/
6598 var_all_unresolved
= var33
;
6600 { /* Inline separate_compiler#SeparateCompiler#live_unresolved_types (self) on <self:SeparateCompiler> */
6601 var36
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___live_unresolved_types
].val
; /* _live_unresolved_types on <self:SeparateCompiler> */
6602 if (unlikely(var36
== NULL
)) {
6603 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_unresolved_types");
6604 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 156);
6608 RET_LABEL35
:(void)0;
6612 var37
= ((val
* (*)(val
*))(var34
->class->vft
[COLOR_abstract_collection__MapRead__values
]))(var34
) /* values on <var34:Map[MClassDef, Set[MType]]>*/;
6615 var38
= ((val
* (*)(val
*))(var37
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var37
) /* iterator on <var37:Collection[nullable Object](RemovableCollection[Set[MType]])>*/;
6619 var39
= ((short int (*)(val
*))(var38
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var38
) /* is_ok on <var38:Iterator[nullable Object]>*/;
6623 var40
= ((val
* (*)(val
*))(var38
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var38
) /* item on <var38:Iterator[nullable Object]>*/;
6627 abstract_collection__SimpleCollection__add_all(var_all_unresolved
, var_t
); /* Direct call abstract_collection#SimpleCollection#add_all on <var_all_unresolved:HashSet[MType]>*/
6629 CONTINUE_label41
: (void)0;
6631 ((void (*)(val
*))(var38
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var38
) /* next on <var38:Iterator[nullable Object]>*/;
6634 BREAK_label41
: (void)0;
6635 var42
= NEW_hash_collection__HashMap(&type_hash_collection__HashMapmodel__MTypekernel__Int
);
6637 hash_collection__HashMap__init(var42
); /* Direct call hash_collection#HashMap#init on <var42:HashMap[MType, Int]>*/
6639 var_all_unresolved_types_colors
= var42
;
6641 var43
= hash_collection__HashSet__iterator(var_all_unresolved
);
6645 var44
= ((short int (*)(val
*))(var43
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var43
) /* is_ok on <var43:Iterator[Object]>*/;
6649 var45
= ((val
* (*)(val
*))(var43
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var43
) /* item on <var43:Iterator[Object]>*/;
6653 { /* Inline separate_compiler#SeparateCompiler#opentype_colors (self) on <self:SeparateCompiler> */
6654 var49
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___opentype_colors
].val
; /* _opentype_colors on <self:SeparateCompiler> */
6655 if (unlikely(var49
== NULL
)) {
6656 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opentype_colors");
6657 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 160);
6661 RET_LABEL48
:(void)0;
6665 var50
= abstract_collection__MapRead__has_key(var47
, var_t46
);
6669 { /* Inline separate_compiler#SeparateCompiler#opentype_colors (self) on <self:SeparateCompiler> */
6670 var53
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___opentype_colors
].val
; /* _opentype_colors on <self:SeparateCompiler> */
6671 if (unlikely(var53
== NULL
)) {
6672 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opentype_colors");
6673 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 160);
6677 RET_LABEL52
:(void)0;
6681 var54
= ((val
* (*)(val
*, val
*))(var51
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var51
, var_t46
) /* [] on <var51:Map[MType, Int]>*/;
6684 hash_collection__HashMap___91d_93d_61d(var_all_unresolved_types_colors
, var_t46
, var54
); /* Direct call hash_collection#HashMap#[]= on <var_all_unresolved_types_colors:HashMap[MType, Int]>*/
6689 { /* Inline kernel#Int#unary - (var55) on <var55:Int> */
6693 RET_LABEL57
:(void)0;
6697 var59
= BOX_kernel__Int(var56
); /* autobox from Int to nullable Object */
6698 hash_collection__HashMap___91d_93d_61d(var_all_unresolved_types_colors
, var_t46
, var59
); /* Direct call hash_collection#HashMap#[]= on <var_all_unresolved_types_colors:HashMap[MType, Int]>*/
6701 CONTINUE_label60
: (void)0;
6703 ((void (*)(val
*))(var43
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var43
) /* next on <var43:Iterator[Object]>*/;
6706 BREAK_label60
: (void)0;
6708 separate_compiler__SeparateCompiler__compile_color_consts(self
, var_all_unresolved_types_colors
); /* Direct call separate_compiler#SeparateCompiler#compile_color_consts on <self:SeparateCompiler>*/
6712 /* method separate_compiler#SeparateCompiler#compile_resolution_tables for (self: Object, Set[MType]) */
6713 void VIRTUAL_separate_compiler__SeparateCompiler__compile_resolution_tables(val
* self
, val
* p0
) {
6714 separate_compiler__SeparateCompiler__compile_resolution_tables(self
, p0
); /* Direct call separate_compiler#SeparateCompiler#compile_resolution_tables on <self:Object(SeparateCompiler)>*/
6717 /* method separate_compiler#SeparateCompiler#build_resolution_tables for (self: SeparateCompiler, Map[MClassType, Set[MType]]): Map[MClassType, Array[nullable MType]] */
6718 val
* separate_compiler__SeparateCompiler__build_resolution_tables(val
* self
, val
* p0
) {
6719 val
* var
/* : Map[MClassType, Array[nullable MType]] */;
6720 val
* var_elements
/* var elements: Map[MClassType, Set[MType]] */;
6721 val
* var1
/* : HashMap[MClassType, Array[nullable MType]] */;
6722 val
* var_tables
/* var tables: HashMap[MClassType, Array[nullable MType]] */;
6723 val
* var2
/* : MapIterator[Object, nullable Object] */;
6724 short int var3
/* : Bool */;
6725 val
* var4
/* : Object */;
6726 val
* var_mclasstype
/* var mclasstype: MClassType */;
6727 val
* var5
/* : nullable Object */;
6728 val
* var_mtypes
/* var mtypes: Set[MType] */;
6729 val
* var6
/* : Array[nullable MType] */;
6730 val
* var_table
/* var table: Array[nullable MType] */;
6731 val
* var7
/* : Iterator[nullable Object] */;
6732 short int var8
/* : Bool */;
6733 val
* var9
/* : nullable Object */;
6734 val
* var_mtype
/* var mtype: MType */;
6735 val
* var10
/* : Map[MType, Int] */;
6736 val
* var12
/* : Map[MType, Int] */;
6737 val
* var13
/* : nullable Object */;
6738 long var14
/* : Int */;
6739 long var_color
/* var color: Int */;
6740 long var15
/* : Int */;
6741 short int var16
/* : Bool */;
6742 short int var18
/* : Bool */;
6745 const char* var_class_name
;
6746 short int var19
/* : Bool */;
6747 val
* var20
/* : Range[Int] */;
6748 long var21
/* : Int */;
6749 val
* var22
/* : Discrete */;
6750 val
* var23
/* : Discrete */;
6751 val
* var24
/* : Iterator[Discrete] */;
6752 short int var25
/* : Bool */;
6753 val
* var26
/* : nullable Object */;
6754 long var_i
/* var i: Int */;
6755 long var27
/* : Int */;
6756 val
* var28
/* : null */;
6758 var1
= NEW_hash_collection__HashMap(&type_hash_collection__HashMapmodel__MClassTypearray__Arraynullable_model__MType
);
6760 hash_collection__HashMap__init(var1
); /* Direct call hash_collection#HashMap#init on <var1:HashMap[MClassType, Array[nullable MType]]>*/
6764 var2
= ((val
* (*)(val
*))(var_elements
->class->vft
[COLOR_abstract_collection__MapRead__iterator
]))(var_elements
) /* iterator on <var_elements:Map[MClassType, Set[MType]]>*/;
6768 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__MapIterator__is_ok
]))(var2
) /* is_ok on <var2:MapIterator[Object, nullable Object]>*/;
6772 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__MapIterator__key
]))(var2
) /* key on <var2:MapIterator[Object, nullable Object]>*/;
6774 var_mclasstype
= var4
;
6776 var5
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__MapIterator__item
]))(var2
) /* item on <var2:MapIterator[Object, nullable Object]>*/;
6779 var6
= NEW_array__Array(&type_array__Arraynullable_model__MType
);
6781 array__Array__init(var6
); /* Direct call array#Array#init on <var6:Array[nullable MType]>*/
6785 var7
= ((val
* (*)(val
*))(var_mtypes
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_mtypes
) /* iterator on <var_mtypes:Set[MType]>*/;
6789 var8
= ((short int (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var7
) /* is_ok on <var7:Iterator[nullable Object]>*/;
6793 var9
= ((val
* (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var7
) /* item on <var7:Iterator[nullable Object]>*/;
6797 { /* Inline separate_compiler#SeparateCompiler#opentype_colors (self) on <self:SeparateCompiler> */
6798 var12
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___opentype_colors
].val
; /* _opentype_colors on <self:SeparateCompiler> */
6799 if (unlikely(var12
== NULL
)) {
6800 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opentype_colors");
6801 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 160);
6805 RET_LABEL11
:(void)0;
6809 var13
= ((val
* (*)(val
*, val
*))(var10
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var10
, var_mtype
) /* [] on <var10:Map[MType, Int]>*/;
6811 var14
= ((struct instance_kernel__Int
*)var13
)->value
; /* autounbox from nullable Object to Int */;
6814 var15
= array__AbstractArrayRead__length(var_table
);
6817 { /* Inline kernel#Int#<= (var15,var_color) on <var15:Int> */
6818 /* Covariant cast for argument 0 (i) <var_color:Int> isa OTHER */
6819 /* <var_color:Int> isa OTHER */
6820 var18
= 1; /* easy <var_color:Int> isa OTHER*/
6821 if (unlikely(!var18
)) {
6822 var_class_name
= type_kernel__Int
.name
;
6823 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
6824 PRINT_ERROR(" (%s:%d)\n", "lib/standard/kernel.nit", 324);
6827 var19
= var15
<= var_color
;
6830 RET_LABEL17
:(void)0;
6834 var20
= NEW_range__Range(&type_range__Rangekernel__Int
);
6836 var21
= array__AbstractArrayRead__length(var_table
);
6839 var22
= BOX_kernel__Int(var21
); /* autobox from Int to Discrete */
6840 var23
= BOX_kernel__Int(var_color
); /* autobox from Int to Discrete */
6841 range__Range__without_last(var20
, var22
, var23
); /* Direct call range#Range#without_last on <var20:Range[Int]>*/
6844 var24
= range__Range__iterator(var20
);
6848 var25
= ((short int (*)(val
*))(var24
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var24
) /* is_ok on <var24:Iterator[Discrete]>*/;
6852 var26
= ((val
* (*)(val
*))(var24
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var24
) /* item on <var24:Iterator[Discrete]>*/;
6854 var27
= ((struct instance_kernel__Int
*)var26
)->value
; /* autounbox from nullable Object to Int */;
6858 array__Array___91d_93d_61d(var_table
, var_i
, var28
); /* Direct call array#Array#[]= on <var_table:Array[nullable MType]>*/
6860 CONTINUE_label
: (void)0;
6862 ((void (*)(val
*))(var24
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var24
) /* next on <var24:Iterator[Discrete]>*/;
6865 BREAK_label
: (void)0;
6869 array__Array___91d_93d_61d(var_table
, var_color
, var_mtype
); /* Direct call array#Array#[]= on <var_table:Array[nullable MType]>*/
6871 CONTINUE_label29
: (void)0;
6873 ((void (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var7
) /* next on <var7:Iterator[nullable Object]>*/;
6876 BREAK_label29
: (void)0;
6878 hash_collection__HashMap___91d_93d_61d(var_tables
, var_mclasstype
, var_table
); /* Direct call hash_collection#HashMap#[]= on <var_tables:HashMap[MClassType, Array[nullable MType]]>*/
6880 CONTINUE_label30
: (void)0;
6882 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__MapIterator__next
]))(var2
) /* next on <var2:MapIterator[Object, nullable Object]>*/;
6885 BREAK_label30
: (void)0;
6891 /* method separate_compiler#SeparateCompiler#build_resolution_tables for (self: Object, Map[MClassType, Set[MType]]): Map[MClassType, Array[nullable MType]] */
6892 val
* VIRTUAL_separate_compiler__SeparateCompiler__build_resolution_tables(val
* self
, val
* p0
) {
6893 val
* var
/* : Map[MClassType, Array[nullable MType]] */;
6894 val
* var1
/* : Map[MClassType, Array[nullable MType]] */;
6895 var1
= separate_compiler__SeparateCompiler__build_resolution_tables(self
, p0
);
6900 /* method separate_compiler#SeparateCompiler#compile_module_to_c for (self: SeparateCompiler, MModule) */
6901 void separate_compiler__SeparateCompiler__compile_module_to_c(val
* self
, val
* p0
) {
6902 val
* var_mmodule
/* var mmodule: MModule */;
6903 val
* var
/* : MModule */;
6904 val
* var2
/* : MModule */;
6905 val
* var_old_module
/* var old_module: MModule */;
6906 val
* var4
/* : Array[MClassDef] */;
6907 val
* var6
/* : Array[MClassDef] */;
6908 val
* var7
/* : ArrayIterator[nullable Object] */;
6909 short int var8
/* : Bool */;
6910 val
* var9
/* : nullable Object */;
6911 val
* var_cd
/* var cd: MClassDef */;
6912 val
* var10
/* : Array[MPropDef] */;
6913 val
* var12
/* : Array[MPropDef] */;
6914 val
* var13
/* : ArrayIterator[nullable Object] */;
6915 short int var14
/* : Bool */;
6916 val
* var15
/* : nullable Object */;
6917 val
* var_pd
/* var pd: MPropDef */;
6918 short int var16
/* : Bool */;
6921 short int var17
/* : Bool */;
6922 val
* var18
/* : nullable RapidTypeAnalysis */;
6923 val
* var20
/* : nullable RapidTypeAnalysis */;
6924 val
* var_rta
/* var rta: nullable RapidTypeAnalysis */;
6925 short int var21
/* : Bool */;
6926 short int var22
/* : Bool */;
6927 val
* var23
/* : ModelBuilder */;
6928 val
* var25
/* : ModelBuilder */;
6929 val
* var26
/* : ToolContext */;
6930 val
* var28
/* : ToolContext */;
6931 val
* var29
/* : OptionBool */;
6932 val
* var31
/* : OptionBool */;
6933 val
* var32
/* : nullable Object */;
6934 val
* var34
/* : nullable Object */;
6935 short int var35
/* : Bool */;
6936 short int var_
/* var : Bool */;
6937 val
* var36
/* : null */;
6938 short int var37
/* : Bool */;
6939 short int var38
/* : Bool */;
6940 val
* var_other
/* var other: nullable Object */;
6941 short int var40
/* : Bool */;
6942 short int var41
/* : Bool */;
6943 short int var42
/* : Bool */;
6944 short int var_43
/* var : Bool */;
6945 val
* var44
/* : HashSet[MMethodDef] */;
6946 val
* var46
/* : HashSet[MMethodDef] */;
6947 short int var47
/* : Bool */;
6948 short int var48
/* : Bool */;
6949 val
* var49
/* : AbstractRuntimeFunction */;
6950 val
* var_r
/* var r: AbstractRuntimeFunction */;
6951 val
* var50
/* : AbstractRuntimeFunction */;
6952 val
* var_r2
/* var r2: AbstractRuntimeFunction */;
6955 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
6956 var2
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
6957 if (unlikely(var2
== NULL
)) {
6958 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
6959 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
6966 var_old_module
= var
;
6968 { /* Inline abstract_compiler#AbstractCompiler#mainmodule= (self,var_mmodule) on <self:SeparateCompiler> */
6969 self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
= var_mmodule
; /* _mainmodule on <self:SeparateCompiler> */
6974 { /* Inline model#MModule#mclassdefs (var_mmodule) on <var_mmodule:MModule> */
6975 var6
= var_mmodule
->attrs
[COLOR_model__MModule___mclassdefs
].val
; /* _mclassdefs on <var_mmodule:MModule> */
6976 if (unlikely(var6
== NULL
)) {
6977 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mclassdefs");
6978 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 141);
6986 var7
= array__AbstractArrayRead__iterator(var4
);
6990 var8
= array__ArrayIterator__is_ok(var7
);
6994 var9
= array__ArrayIterator__item(var7
);
6998 { /* Inline model#MClassDef#mpropdefs (var_cd) on <var_cd:MClassDef> */
6999 var12
= var_cd
->attrs
[COLOR_model__MClassDef___mpropdefs
].val
; /* _mpropdefs on <var_cd:MClassDef> */
7000 if (unlikely(var12
== NULL
)) {
7001 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mpropdefs");
7002 PRINT_ERROR(" (%s:%d)\n", "src/model/model.nit", 574);
7006 RET_LABEL11
:(void)0;
7010 var13
= array__AbstractArrayRead__iterator(var10
);
7014 var14
= array__ArrayIterator__is_ok(var13
);
7018 var15
= array__ArrayIterator__item(var13
);
7021 /* <var_pd:MPropDef> isa MMethodDef */
7022 cltype
= type_model__MMethodDef
.color
;
7023 idtype
= type_model__MMethodDef
.id
;
7024 if(cltype
>= var_pd
->type
->table_size
) {
7027 var16
= var_pd
->type
->type_table
[cltype
] == idtype
;
7031 goto CONTINUE_label
;
7035 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
7036 var20
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
7038 RET_LABEL19
:(void)0;
7043 { /* Inline abstract_compiler#AbstractCompiler#modelbuilder (self) on <self:SeparateCompiler> */
7044 var25
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___modelbuilder
].val
; /* _modelbuilder on <self:SeparateCompiler> */
7045 if (unlikely(var25
== NULL
)) {
7046 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _modelbuilder");
7047 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 443);
7051 RET_LABEL24
:(void)0;
7055 { /* Inline modelbuilder#ModelBuilder#toolcontext (var23) on <var23:ModelBuilder> */
7056 var28
= var23
->attrs
[COLOR_modelbuilder__ModelBuilder___toolcontext
].val
; /* _toolcontext on <var23:ModelBuilder> */
7057 if (unlikely(var28
== NULL
)) {
7058 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
7059 PRINT_ERROR(" (%s:%d)\n", "src/modelbuilder.nit", 101);
7063 RET_LABEL27
:(void)0;
7067 { /* Inline separate_compiler#ToolContext#opt_skip_dead_methods (var26) on <var26:ToolContext> */
7068 var31
= var26
->attrs
[COLOR_separate_compiler__ToolContext___opt_skip_dead_methods
].val
; /* _opt_skip_dead_methods on <var26:ToolContext> */
7069 if (unlikely(var31
== NULL
)) {
7070 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_skip_dead_methods");
7071 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 38);
7075 RET_LABEL30
:(void)0;
7079 { /* Inline opts#Option#value (var29) on <var29:OptionBool> */
7080 var34
= var29
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var29:OptionBool> */
7082 RET_LABEL33
:(void)0;
7085 var35
= ((struct instance_kernel__Bool
*)var32
)->value
; /* autounbox from nullable Object to Bool */;
7089 if (var_rta
== NULL
) {
7090 var37
= 0; /* is null */
7092 var37
= 1; /* arg is null and recv is not */
7095 { /* Inline kernel#Object#!= (var_rta,var36) on <var_rta:nullable RapidTypeAnalysis> */
7098 var41
= ((short int (*)(val
*, val
*))(var_rta
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_rta
, var_other
) /* == on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)>*/;
7104 RET_LABEL39
:(void)0;
7115 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_methoddefs (var_rta) on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)> */
7116 var46
= var_rta
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___live_methoddefs
].val
; /* _live_methoddefs on <var_rta:nullable RapidTypeAnalysis(RapidTypeAnalysis)> */
7117 if (unlikely(var46
== NULL
)) {
7118 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_methoddefs");
7119 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 74);
7123 RET_LABEL45
:(void)0;
7127 var47
= hash_collection__HashSet__has(var44
, var_pd
);
7135 goto CONTINUE_label
;
7139 var49
= separate_compiler__MMethodDef__separate_runtime_function(var_pd
);
7143 ((void (*)(val
*, val
*))(var_r
->class->vft
[COLOR_abstract_compiler__AbstractRuntimeFunction__compile_to_c
]))(var_r
, self
) /* compile_to_c on <var_r:AbstractRuntimeFunction>*/;
7146 var50
= separate_compiler__MMethodDef__virtual_runtime_function(var_pd
);
7150 ((void (*)(val
*, val
*))(var_r2
->class->vft
[COLOR_abstract_compiler__AbstractRuntimeFunction__compile_to_c
]))(var_r2
, self
) /* compile_to_c on <var_r2:AbstractRuntimeFunction>*/;
7152 CONTINUE_label
: (void)0;
7154 array__ArrayIterator__next(var13
); /* Direct call array#ArrayIterator#next on <var13:ArrayIterator[nullable Object]>*/
7157 BREAK_label
: (void)0;
7158 CONTINUE_label51
: (void)0;
7160 array__ArrayIterator__next(var7
); /* Direct call array#ArrayIterator#next on <var7:ArrayIterator[nullable Object]>*/
7163 BREAK_label51
: (void)0;
7165 { /* Inline abstract_compiler#AbstractCompiler#mainmodule= (self,var_old_module) on <self:SeparateCompiler> */
7166 self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
= var_old_module
; /* _mainmodule on <self:SeparateCompiler> */
7167 RET_LABEL52
:(void)0;
7172 /* method separate_compiler#SeparateCompiler#compile_module_to_c for (self: Object, MModule) */
7173 void VIRTUAL_separate_compiler__SeparateCompiler__compile_module_to_c(val
* self
, val
* p0
) {
7174 separate_compiler__SeparateCompiler__compile_module_to_c(self
, p0
); /* Direct call separate_compiler#SeparateCompiler#compile_module_to_c on <self:Object(SeparateCompiler)>*/
7177 /* method separate_compiler#SeparateCompiler#compile_type_to_c for (self: SeparateCompiler, MType) */
7178 void separate_compiler__SeparateCompiler__compile_type_to_c(val
* self
, val
* p0
) {
7179 val
* var_mtype
/* var mtype: MType */;
7180 short int var
/* : Bool */;
7181 short int var1
/* : Bool */;
7182 short int var2
/* : Bool */;
7183 short int var3
/* : Bool */;
7186 short int var_
/* var : Bool */;
7187 val
* var4
/* : nullable RapidTypeAnalysis */;
7188 val
* var6
/* : nullable RapidTypeAnalysis */;
7189 val
* var7
/* : HashSet[MClassType] */;
7190 val
* var9
/* : HashSet[MClassType] */;
7191 short int var10
/* : Bool */;
7192 short int var_is_live
/* var is_live: Bool */;
7193 val
* var11
/* : nullable RapidTypeAnalysis */;
7194 val
* var13
/* : nullable RapidTypeAnalysis */;
7195 val
* var14
/* : HashSet[MType] */;
7196 val
* var16
/* : HashSet[MType] */;
7197 short int var17
/* : Bool */;
7198 short int var_is_cast_live
/* var is_cast_live: Bool */;
7199 val
* var18
/* : String */;
7200 val
* var_c_name
/* var c_name: String */;
7201 val
* var19
/* : SeparateCompilerVisitor */;
7202 val
* var_v
/* var v: SeparateCompilerVisitor */;
7203 static val
* varonce
;
7204 val
* var20
/* : String */;
7205 char* var21
/* : NativeString */;
7206 long var22
/* : Int */;
7207 val
* var23
/* : FlatString */;
7208 static val
* varonce24
;
7209 val
* var25
/* : String */;
7210 char* var26
/* : NativeString */;
7211 long var27
/* : Int */;
7212 val
* var28
/* : FlatString */;
7213 val
* var29
/* : Array[Object] */;
7214 long var30
/* : Int */;
7215 val
* var31
/* : NativeArray[Object] */;
7216 val
* var32
/* : String */;
7217 static val
* varonce33
;
7218 val
* var34
/* : String */;
7219 char* var35
/* : NativeString */;
7220 long var36
/* : Int */;
7221 val
* var37
/* : FlatString */;
7222 val
* var38
/* : Array[Object] */;
7223 long var39
/* : Int */;
7224 val
* var40
/* : NativeArray[Object] */;
7225 val
* var41
/* : String */;
7226 static val
* varonce42
;
7227 val
* var43
/* : String */;
7228 char* var44
/* : NativeString */;
7229 long var45
/* : Int */;
7230 val
* var46
/* : FlatString */;
7231 static val
* varonce47
;
7232 val
* var48
/* : String */;
7233 char* var49
/* : NativeString */;
7234 long var50
/* : Int */;
7235 val
* var51
/* : FlatString */;
7236 val
* var52
/* : Array[Object] */;
7237 long var53
/* : Int */;
7238 val
* var54
/* : NativeArray[Object] */;
7239 val
* var55
/* : String */;
7240 static val
* varonce56
;
7241 val
* var57
/* : String */;
7242 char* var58
/* : NativeString */;
7243 long var59
/* : Int */;
7244 val
* var60
/* : FlatString */;
7245 static val
* varonce61
;
7246 val
* var62
/* : String */;
7247 char* var63
/* : NativeString */;
7248 long var64
/* : Int */;
7249 val
* var65
/* : FlatString */;
7250 val
* var66
/* : Array[Object] */;
7251 long var67
/* : Int */;
7252 val
* var68
/* : NativeArray[Object] */;
7253 val
* var69
/* : String */;
7254 val
* var70
/* : Map[MType, Int] */;
7255 val
* var72
/* : Map[MType, Int] */;
7256 val
* var73
/* : nullable Object */;
7257 static val
* varonce74
;
7258 val
* var75
/* : String */;
7259 char* var76
/* : NativeString */;
7260 long var77
/* : Int */;
7261 val
* var78
/* : FlatString */;
7262 val
* var79
/* : Array[Object] */;
7263 long var80
/* : Int */;
7264 val
* var81
/* : NativeArray[Object] */;
7265 val
* var82
/* : String */;
7266 static val
* varonce83
;
7267 val
* var84
/* : String */;
7268 char* var85
/* : NativeString */;
7269 long var86
/* : Int */;
7270 val
* var87
/* : FlatString */;
7271 static val
* varonce88
;
7272 val
* var89
/* : String */;
7273 char* var90
/* : NativeString */;
7274 long var91
/* : Int */;
7275 val
* var92
/* : FlatString */;
7276 static val
* varonce93
;
7277 val
* var94
/* : String */;
7278 char* var95
/* : NativeString */;
7279 long var96
/* : Int */;
7280 val
* var97
/* : FlatString */;
7281 val
* var98
/* : Array[Object] */;
7282 long var99
/* : Int */;
7283 val
* var100
/* : NativeArray[Object] */;
7284 val
* var101
/* : String */;
7285 val
* var102
/* : Map[MType, Int] */;
7286 val
* var104
/* : Map[MType, Int] */;
7287 val
* var105
/* : nullable Object */;
7288 static val
* varonce106
;
7289 val
* var107
/* : String */;
7290 char* var108
/* : NativeString */;
7291 long var109
/* : Int */;
7292 val
* var110
/* : FlatString */;
7293 val
* var111
/* : Array[Object] */;
7294 long var112
/* : Int */;
7295 val
* var113
/* : NativeArray[Object] */;
7296 val
* var114
/* : String */;
7297 static val
* varonce115
;
7298 val
* var116
/* : String */;
7299 char* var117
/* : NativeString */;
7300 long var118
/* : Int */;
7301 val
* var119
/* : FlatString */;
7302 short int var120
/* : Bool */;
7305 static val
* varonce123
;
7306 val
* var124
/* : String */;
7307 char* var125
/* : NativeString */;
7308 long var126
/* : Int */;
7309 val
* var127
/* : FlatString */;
7310 static val
* varonce128
;
7311 val
* var129
/* : String */;
7312 char* var130
/* : NativeString */;
7313 long var131
/* : Int */;
7314 val
* var132
/* : FlatString */;
7315 val
* var133
/* : MType */;
7316 val
* var_mclass_type
/* var mclass_type: MType */;
7317 short int var134
/* : Bool */;
7320 val
* var137
/* : Map[MClassType, Array[nullable MType]] */;
7321 val
* var139
/* : Map[MClassType, Array[nullable MType]] */;
7322 val
* var140
/* : nullable Object */;
7323 short int var141
/* : Bool */;
7324 static val
* varonce142
;
7325 val
* var143
/* : String */;
7326 char* var144
/* : NativeString */;
7327 long var145
/* : Int */;
7328 val
* var146
/* : FlatString */;
7329 static val
* varonce147
;
7330 val
* var148
/* : String */;
7331 char* var149
/* : NativeString */;
7332 long var150
/* : Int */;
7333 val
* var151
/* : FlatString */;
7334 val
* var152
/* : Array[Object] */;
7335 long var153
/* : Int */;
7336 val
* var154
/* : NativeArray[Object] */;
7337 val
* var155
/* : String */;
7338 static val
* varonce156
;
7339 val
* var157
/* : String */;
7340 char* var158
/* : NativeString */;
7341 long var159
/* : Int */;
7342 val
* var160
/* : FlatString */;
7343 static val
* varonce161
;
7344 val
* var162
/* : String */;
7345 char* var163
/* : NativeString */;
7346 long var164
/* : Int */;
7347 val
* var165
/* : FlatString */;
7348 val
* var166
/* : Array[Object] */;
7349 long var167
/* : Int */;
7350 val
* var168
/* : NativeArray[Object] */;
7351 val
* var169
/* : String */;
7352 static val
* varonce170
;
7353 val
* var171
/* : String */;
7354 char* var172
/* : NativeString */;
7355 long var173
/* : Int */;
7356 val
* var174
/* : FlatString */;
7357 val
* var175
/* : Map[MType, Array[nullable MType]] */;
7358 val
* var177
/* : Map[MType, Array[nullable MType]] */;
7359 val
* var178
/* : nullable Object */;
7360 long var179
/* : Int */;
7361 static val
* varonce180
;
7362 val
* var181
/* : String */;
7363 char* var182
/* : NativeString */;
7364 long var183
/* : Int */;
7365 val
* var184
/* : FlatString */;
7366 val
* var185
/* : Array[Object] */;
7367 long var186
/* : Int */;
7368 val
* var187
/* : NativeArray[Object] */;
7369 val
* var188
/* : Object */;
7370 val
* var189
/* : String */;
7371 static val
* varonce190
;
7372 val
* var191
/* : String */;
7373 char* var192
/* : NativeString */;
7374 long var193
/* : Int */;
7375 val
* var194
/* : FlatString */;
7376 val
* var195
/* : Map[MType, Array[nullable MType]] */;
7377 val
* var197
/* : Map[MType, Array[nullable MType]] */;
7378 val
* var198
/* : nullable Object */;
7379 val
* var199
/* : ArrayIterator[nullable Object] */;
7380 short int var200
/* : Bool */;
7381 val
* var201
/* : nullable Object */;
7382 val
* var_stype
/* var stype: nullable MType */;
7383 val
* var202
/* : null */;
7384 short int var203
/* : Bool */;
7385 short int var204
/* : Bool */;
7386 val
* var_other
/* var other: nullable Object */;
7387 short int var206
/* : Bool */;
7388 short int var208
/* : Bool */;
7389 static val
* varonce209
;
7390 val
* var210
/* : String */;
7391 char* var211
/* : NativeString */;
7392 long var212
/* : Int */;
7393 val
* var213
/* : FlatString */;
7394 val
* var214
/* : Map[MType, Int] */;
7395 val
* var216
/* : Map[MType, Int] */;
7396 val
* var217
/* : nullable Object */;
7397 static val
* varonce218
;
7398 val
* var219
/* : String */;
7399 char* var220
/* : NativeString */;
7400 long var221
/* : Int */;
7401 val
* var222
/* : FlatString */;
7402 static val
* varonce223
;
7403 val
* var224
/* : String */;
7404 char* var225
/* : NativeString */;
7405 long var226
/* : Int */;
7406 val
* var227
/* : FlatString */;
7407 val
* var228
/* : Array[Object] */;
7408 long var229
/* : Int */;
7409 val
* var230
/* : NativeArray[Object] */;
7410 val
* var231
/* : String */;
7411 static val
* varonce232
;
7412 val
* var233
/* : String */;
7413 char* var234
/* : NativeString */;
7414 long var235
/* : Int */;
7415 val
* var236
/* : FlatString */;
7416 static val
* varonce237
;
7417 val
* var238
/* : String */;
7418 char* var239
/* : NativeString */;
7419 long var240
/* : Int */;
7420 val
* var241
/* : FlatString */;
7421 static val
* varonce242
;
7422 val
* var243
/* : String */;
7423 char* var244
/* : NativeString */;
7424 long var245
/* : Int */;
7425 val
* var246
/* : FlatString */;
7428 var
= ((short int (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MType__need_anchor
]))(var_mtype
) /* need_anchor on <var_mtype:MType>*/;
7431 if (unlikely(!var1
)) {
7432 PRINT_ERROR("Runtime error: %s", "Assert failed");
7433 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 554);
7436 /* <var_mtype:MType> isa MClassType */
7437 cltype
= type_model__MClassType
.color
;
7438 idtype
= type_model__MClassType
.id
;
7439 if(cltype
>= var_mtype
->type
->table_size
) {
7442 var3
= var_mtype
->type
->type_table
[cltype
] == idtype
;
7447 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
7448 var6
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
7454 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7455 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 555);
7458 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_types (var4) on <var4:nullable RapidTypeAnalysis> */
7459 if (unlikely(var4
== NULL
)) {
7460 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7461 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 55);
7464 var9
= var4
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___live_types
].val
; /* _live_types on <var4:nullable RapidTypeAnalysis> */
7465 if (unlikely(var9
== NULL
)) {
7466 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_types");
7467 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 55);
7475 var10
= hash_collection__HashSet__has(var7
, var_mtype
);
7483 { /* Inline separate_compiler#SeparateCompiler#runtime_type_analysis (self) on <self:SeparateCompiler> */
7484 var13
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___runtime_type_analysis
].val
; /* _runtime_type_analysis on <self:SeparateCompiler> */
7486 RET_LABEL12
:(void)0;
7489 if (var11
== NULL
) {
7490 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7491 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 556);
7494 { /* Inline rapid_type_analysis#RapidTypeAnalysis#live_cast_types (var11) on <var11:nullable RapidTypeAnalysis> */
7495 if (unlikely(var11
== NULL
)) {
7496 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7497 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 67);
7500 var16
= var11
->attrs
[COLOR_rapid_type_analysis__RapidTypeAnalysis___live_cast_types
].val
; /* _live_cast_types on <var11:nullable RapidTypeAnalysis> */
7501 if (unlikely(var16
== NULL
)) {
7502 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _live_cast_types");
7503 PRINT_ERROR(" (%s:%d)\n", "src/rapid_type_analysis.nit", 67);
7507 RET_LABEL15
:(void)0;
7511 var17
= hash_collection__HashSet__has(var14
, var_mtype
);
7513 var_is_cast_live
= var17
;
7515 var18
= ((val
* (*)(val
*))(var_mtype
->class->vft
[COLOR_abstract_compiler__MType__c_name
]))(var_mtype
) /* c_name on <var_mtype:MType>*/;
7518 var19
= NEW_separate_compiler__SeparateCompilerVisitor(&type_separate_compiler__SeparateCompilerVisitor
);
7520 abstract_compiler__AbstractCompilerVisitor__init(var19
, self
); /* Direct call abstract_compiler#AbstractCompilerVisitor#init on <var19:SeparateCompilerVisitor>*/
7526 var21
= "/* runtime type ";
7528 var23
= string__NativeString__to_s_with_length(var21
, var22
);
7537 var28
= string__NativeString__to_s_with_length(var26
, var27
);
7541 var29
= NEW_array__Array(&type_array__Arraykernel__Object
);
7542 { /* var29 = array_instance Array[Object] */
7544 var31
= NEW_array__NativeArray(var30
, &type_array__NativeArraykernel__Object
);
7545 ((struct instance_array__NativeArray
*)var31
)->values
[0] = (val
*) var20
;
7546 ((struct instance_array__NativeArray
*)var31
)->values
[1] = (val
*) var_mtype
;
7547 ((struct instance_array__NativeArray
*)var31
)->values
[2] = (val
*) var25
;
7549 ((void (*)(val
*, val
*, long))(var29
->class->vft
[COLOR_array__Array__with_native
]))(var29
, var31
, var30
) /* with_native on <var29:Array[Object]>*/;
7553 var32
= ((val
* (*)(val
*))(var29
->class->vft
[COLOR_string__Object__to_s
]))(var29
) /* to_s on <var29:Array[Object]>*/;
7556 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var32
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7563 var37
= string__NativeString__to_s_with_length(var35
, var36
);
7567 var38
= NEW_array__Array(&type_array__Arraykernel__Object
);
7568 { /* var38 = array_instance Array[Object] */
7570 var40
= NEW_array__NativeArray(var39
, &type_array__NativeArraykernel__Object
);
7571 ((struct instance_array__NativeArray
*)var40
)->values
[0] = (val
*) var34
;
7572 ((struct instance_array__NativeArray
*)var40
)->values
[1] = (val
*) var_c_name
;
7574 ((void (*)(val
*, val
*, long))(var38
->class->vft
[COLOR_array__Array__with_native
]))(var38
, var40
, var39
) /* with_native on <var38:Array[Object]>*/;
7578 var41
= ((val
* (*)(val
*))(var38
->class->vft
[COLOR_string__Object__to_s
]))(var38
) /* to_s on <var38:Array[Object]>*/;
7583 var44
= "extern const struct type type_";
7585 var46
= string__NativeString__to_s_with_length(var44
, var45
);
7594 var51
= string__NativeString__to_s_with_length(var49
, var50
);
7598 var52
= NEW_array__Array(&type_array__Arraykernel__Object
);
7599 { /* var52 = array_instance Array[Object] */
7601 var54
= NEW_array__NativeArray(var53
, &type_array__NativeArraykernel__Object
);
7602 ((struct instance_array__NativeArray
*)var54
)->values
[0] = (val
*) var43
;
7603 ((struct instance_array__NativeArray
*)var54
)->values
[1] = (val
*) var_c_name
;
7604 ((struct instance_array__NativeArray
*)var54
)->values
[2] = (val
*) var48
;
7606 ((void (*)(val
*, val
*, long))(var52
->class->vft
[COLOR_array__Array__with_native
]))(var52
, var54
, var53
) /* with_native on <var52:Array[Object]>*/;
7610 var55
= ((val
* (*)(val
*))(var52
->class->vft
[COLOR_string__Object__to_s
]))(var52
) /* to_s on <var52:Array[Object]>*/;
7613 abstract_compiler__AbstractCompiler__provide_declaration(self
, var41
, var55
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
7618 var58
= "const struct type type_";
7620 var60
= string__NativeString__to_s_with_length(var58
, var59
);
7629 var65
= string__NativeString__to_s_with_length(var63
, var64
);
7633 var66
= NEW_array__Array(&type_array__Arraykernel__Object
);
7634 { /* var66 = array_instance Array[Object] */
7636 var68
= NEW_array__NativeArray(var67
, &type_array__NativeArraykernel__Object
);
7637 ((struct instance_array__NativeArray
*)var68
)->values
[0] = (val
*) var57
;
7638 ((struct instance_array__NativeArray
*)var68
)->values
[1] = (val
*) var_c_name
;
7639 ((struct instance_array__NativeArray
*)var68
)->values
[2] = (val
*) var62
;
7641 ((void (*)(val
*, val
*, long))(var66
->class->vft
[COLOR_array__Array__with_native
]))(var66
, var68
, var67
) /* with_native on <var66:Array[Object]>*/;
7645 var69
= ((val
* (*)(val
*))(var66
->class->vft
[COLOR_string__Object__to_s
]))(var66
) /* to_s on <var66:Array[Object]>*/;
7648 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var69
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7650 if (var_is_cast_live
){
7652 { /* Inline separate_compiler#SeparateCompiler#type_ids (self) on <self:SeparateCompiler> */
7653 var72
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_ids
].val
; /* _type_ids on <self:SeparateCompiler> */
7654 if (unlikely(var72
== NULL
)) {
7655 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_ids");
7656 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 158);
7660 RET_LABEL71
:(void)0;
7664 var73
= ((val
* (*)(val
*, val
*))(var70
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var70
, var_mtype
) /* [] on <var70:Map[MType, Int]>*/;
7671 var78
= string__NativeString__to_s_with_length(var76
, var77
);
7675 var79
= NEW_array__Array(&type_array__Arraykernel__Object
);
7676 { /* var79 = array_instance Array[Object] */
7678 var81
= NEW_array__NativeArray(var80
, &type_array__NativeArraykernel__Object
);
7679 ((struct instance_array__NativeArray
*)var81
)->values
[0] = (val
*) var73
;
7680 ((struct instance_array__NativeArray
*)var81
)->values
[1] = (val
*) var75
;
7682 ((void (*)(val
*, val
*, long))(var79
->class->vft
[COLOR_array__Array__with_native
]))(var79
, var81
, var80
) /* with_native on <var79:Array[Object]>*/;
7686 var82
= ((val
* (*)(val
*))(var79
->class->vft
[COLOR_string__Object__to_s
]))(var79
) /* to_s on <var79:Array[Object]>*/;
7689 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var82
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7695 var85
= "-1, /*CAST DEAD*/";
7697 var87
= string__NativeString__to_s_with_length(var85
, var86
);
7702 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var84
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7710 var92
= string__NativeString__to_s_with_length(var90
, var91
);
7717 var95
= "\", /* class_name_string */";
7719 var97
= string__NativeString__to_s_with_length(var95
, var96
);
7723 var98
= NEW_array__Array(&type_array__Arraykernel__Object
);
7724 { /* var98 = array_instance Array[Object] */
7726 var100
= NEW_array__NativeArray(var99
, &type_array__NativeArraykernel__Object
);
7727 ((struct instance_array__NativeArray
*)var100
)->values
[0] = (val
*) var89
;
7728 ((struct instance_array__NativeArray
*)var100
)->values
[1] = (val
*) var_mtype
;
7729 ((struct instance_array__NativeArray
*)var100
)->values
[2] = (val
*) var94
;
7731 ((void (*)(val
*, val
*, long))(var98
->class->vft
[COLOR_array__Array__with_native
]))(var98
, var100
, var99
) /* with_native on <var98:Array[Object]>*/;
7735 var101
= ((val
* (*)(val
*))(var98
->class->vft
[COLOR_string__Object__to_s
]))(var98
) /* to_s on <var98:Array[Object]>*/;
7738 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var101
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7740 if (var_is_cast_live
){
7742 { /* Inline separate_compiler#SeparateCompiler#type_colors (self) on <self:SeparateCompiler> */
7743 var104
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_colors
].val
; /* _type_colors on <self:SeparateCompiler> */
7744 if (unlikely(var104
== NULL
)) {
7745 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_colors");
7746 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 159);
7750 RET_LABEL103
:(void)0;
7754 var105
= ((val
* (*)(val
*, val
*))(var102
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var102
, var_mtype
) /* [] on <var102:Map[MType, Int]>*/;
7757 var107
= varonce106
;
7761 var110
= string__NativeString__to_s_with_length(var108
, var109
);
7763 varonce106
= var107
;
7765 var111
= NEW_array__Array(&type_array__Arraykernel__Object
);
7766 { /* var111 = array_instance Array[Object] */
7768 var113
= NEW_array__NativeArray(var112
, &type_array__NativeArraykernel__Object
);
7769 ((struct instance_array__NativeArray
*)var113
)->values
[0] = (val
*) var105
;
7770 ((struct instance_array__NativeArray
*)var113
)->values
[1] = (val
*) var107
;
7772 ((void (*)(val
*, val
*, long))(var111
->class->vft
[COLOR_array__Array__with_native
]))(var111
, var113
, var112
) /* with_native on <var111:Array[Object]>*/;
7776 var114
= ((val
* (*)(val
*))(var111
->class->vft
[COLOR_string__Object__to_s
]))(var111
) /* to_s on <var111:Array[Object]>*/;
7779 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var114
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7783 var116
= varonce115
;
7785 var117
= "-1, /*CAST DEAD*/";
7787 var119
= string__NativeString__to_s_with_length(var117
, var118
);
7789 varonce115
= var116
;
7792 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var116
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7795 /* <var_mtype:MType> isa MNullableType */
7796 cltype121
= type_model__MNullableType
.color
;
7797 idtype122
= type_model__MNullableType
.id
;
7798 if(cltype121
>= var_mtype
->type
->table_size
) {
7801 var120
= var_mtype
->type
->type_table
[cltype121
] == idtype122
;
7805 var124
= varonce123
;
7809 var127
= string__NativeString__to_s_with_length(var125
, var126
);
7811 varonce123
= var124
;
7814 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var124
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7818 var129
= varonce128
;
7822 var132
= string__NativeString__to_s_with_length(var130
, var131
);
7824 varonce128
= var129
;
7827 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var129
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7832 var133
= ((val
* (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MType__as_notnullable
]))(var_mtype
) /* as_notnullable on <var_mtype:MType>*/;
7834 var_mclass_type
= var133
;
7835 /* <var_mclass_type:MType> isa MClassType */
7836 cltype135
= type_model__MClassType
.color
;
7837 idtype136
= type_model__MClassType
.id
;
7838 if(cltype135
>= var_mclass_type
->type
->table_size
) {
7841 var134
= var_mclass_type
->type
->type_table
[cltype135
] == idtype136
;
7843 if (unlikely(!var134
)) {
7844 PRINT_ERROR("Runtime error: %s", "Assert failed");
7845 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 594);
7849 { /* Inline separate_compiler#SeparateCompiler#resolution_tables (self) on <self:SeparateCompiler> */
7850 var139
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___resolution_tables
].val
; /* _resolution_tables on <self:SeparateCompiler> */
7851 if (unlikely(var139
== NULL
)) {
7852 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _resolution_tables");
7853 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 791);
7857 RET_LABEL138
:(void)0;
7861 var140
= ((val
* (*)(val
*, val
*))(var137
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var137
, var_mclass_type
) /* [] on <var137:Map[MClassType, Array[nullable MType]]>*/;
7864 var141
= array__AbstractArrayRead__is_empty(var140
);
7868 var143
= varonce142
;
7870 var144
= "NULL, /*NO RESOLUTIONS*/";
7872 var146
= string__NativeString__to_s_with_length(var144
, var145
);
7874 varonce142
= var143
;
7877 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var143
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7881 separate_compiler__SeparateCompiler__compile_type_resolution_table(self
, var_mtype
); /* Direct call separate_compiler#SeparateCompiler#compile_type_resolution_table on <self:SeparateCompiler>*/
7884 var148
= varonce147
;
7886 var149
= "resolution_table_";
7888 var151
= string__NativeString__to_s_with_length(var149
, var150
);
7890 varonce147
= var148
;
7892 var152
= NEW_array__Array(&type_array__Arraykernel__Object
);
7893 { /* var152 = array_instance Array[Object] */
7895 var154
= NEW_array__NativeArray(var153
, &type_array__NativeArraykernel__Object
);
7896 ((struct instance_array__NativeArray
*)var154
)->values
[0] = (val
*) var148
;
7897 ((struct instance_array__NativeArray
*)var154
)->values
[1] = (val
*) var_c_name
;
7899 ((void (*)(val
*, val
*, long))(var152
->class->vft
[COLOR_array__Array__with_native
]))(var152
, var154
, var153
) /* with_native on <var152:Array[Object]>*/;
7903 var155
= ((val
* (*)(val
*))(var152
->class->vft
[COLOR_string__Object__to_s
]))(var152
) /* to_s on <var152:Array[Object]>*/;
7906 abstract_compiler__AbstractCompilerVisitor__require_declaration(var_v
, var155
); /* Direct call abstract_compiler#AbstractCompilerVisitor#require_declaration on <var_v:SeparateCompilerVisitor>*/
7909 var157
= varonce156
;
7911 var158
= "&resolution_table_";
7913 var160
= string__NativeString__to_s_with_length(var158
, var159
);
7915 varonce156
= var157
;
7918 var162
= varonce161
;
7922 var165
= string__NativeString__to_s_with_length(var163
, var164
);
7924 varonce161
= var162
;
7926 var166
= NEW_array__Array(&type_array__Arraykernel__Object
);
7927 { /* var166 = array_instance Array[Object] */
7929 var168
= NEW_array__NativeArray(var167
, &type_array__NativeArraykernel__Object
);
7930 ((struct instance_array__NativeArray
*)var168
)->values
[0] = (val
*) var157
;
7931 ((struct instance_array__NativeArray
*)var168
)->values
[1] = (val
*) var_c_name
;
7932 ((struct instance_array__NativeArray
*)var168
)->values
[2] = (val
*) var162
;
7934 ((void (*)(val
*, val
*, long))(var166
->class->vft
[COLOR_array__Array__with_native
]))(var166
, var168
, var167
) /* with_native on <var166:Array[Object]>*/;
7938 var169
= ((val
* (*)(val
*))(var166
->class->vft
[COLOR_string__Object__to_s
]))(var166
) /* to_s on <var166:Array[Object]>*/;
7941 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var169
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7946 var171
= varonce170
;
7948 var172
= "NULL, /*DEAD*/";
7950 var174
= string__NativeString__to_s_with_length(var172
, var173
);
7952 varonce170
= var171
;
7955 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var171
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
7960 { /* Inline separate_compiler#SeparateCompiler#type_tables (self) on <self:SeparateCompiler> */
7961 var177
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_tables
].val
; /* _type_tables on <self:SeparateCompiler> */
7962 if (unlikely(var177
== NULL
)) {
7963 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_tables");
7964 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 790);
7968 RET_LABEL176
:(void)0;
7972 var178
= ((val
* (*)(val
*, val
*))(var175
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var175
, var_mtype
) /* [] on <var175:Map[MType, Array[nullable MType]]>*/;
7975 var179
= array__AbstractArrayRead__length(var178
);
7978 var181
= varonce180
;
7982 var184
= string__NativeString__to_s_with_length(var182
, var183
);
7984 varonce180
= var181
;
7986 var185
= NEW_array__Array(&type_array__Arraykernel__Object
);
7987 { /* var185 = array_instance Array[Object] */
7989 var187
= NEW_array__NativeArray(var186
, &type_array__NativeArraykernel__Object
);
7990 var188
= BOX_kernel__Int(var179
); /* autobox from Int to Object */
7991 ((struct instance_array__NativeArray
*)var187
)->values
[0] = (val
*) var188
;
7992 ((struct instance_array__NativeArray
*)var187
)->values
[1] = (val
*) var181
;
7994 ((void (*)(val
*, val
*, long))(var185
->class->vft
[COLOR_array__Array__with_native
]))(var185
, var187
, var186
) /* with_native on <var185:Array[Object]>*/;
7998 var189
= ((val
* (*)(val
*))(var185
->class->vft
[COLOR_string__Object__to_s
]))(var185
) /* to_s on <var185:Array[Object]>*/;
8001 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var189
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8004 var191
= varonce190
;
8008 var194
= string__NativeString__to_s_with_length(var192
, var193
);
8010 varonce190
= var191
;
8013 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var191
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8016 { /* Inline separate_compiler#SeparateCompiler#type_tables (self) on <self:SeparateCompiler> */
8017 var197
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_tables
].val
; /* _type_tables on <self:SeparateCompiler> */
8018 if (unlikely(var197
== NULL
)) {
8019 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_tables");
8020 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 790);
8024 RET_LABEL196
:(void)0;
8028 var198
= ((val
* (*)(val
*, val
*))(var195
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var195
, var_mtype
) /* [] on <var195:Map[MType, Array[nullable MType]]>*/;
8031 var199
= array__AbstractArrayRead__iterator(var198
);
8035 var200
= array__ArrayIterator__is_ok(var199
);
8039 var201
= array__ArrayIterator__item(var199
);
8043 if (var_stype
== NULL
) {
8044 var203
= 1; /* is null */
8046 var203
= 0; /* arg is null but recv is not */
8049 { /* Inline kernel#Object#== (var_stype,var202) on <var_stype:nullable MType> */
8052 { /* Inline kernel#Object#is_same_instance (var_stype,var_other) on <var_stype:nullable MType(MType)> */
8053 var208
= var_stype
== var_other
;
8056 RET_LABEL207
:(void)0;
8061 RET_LABEL205
:(void)0;
8067 var210
= varonce209
;
8069 var211
= "-1, /* empty */";
8071 var213
= string__NativeString__to_s_with_length(var211
, var212
);
8073 varonce209
= var210
;
8076 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var210
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8080 { /* Inline separate_compiler#SeparateCompiler#type_ids (self) on <self:SeparateCompiler> */
8081 var216
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_ids
].val
; /* _type_ids on <self:SeparateCompiler> */
8082 if (unlikely(var216
== NULL
)) {
8083 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_ids");
8084 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 158);
8088 RET_LABEL215
:(void)0;
8092 var217
= ((val
* (*)(val
*, val
*))(var214
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var214
, var_stype
) /* [] on <var214:Map[MType, Int]>*/;
8095 var219
= varonce218
;
8099 var222
= string__NativeString__to_s_with_length(var220
, var221
);
8101 varonce218
= var219
;
8104 var224
= varonce223
;
8108 var227
= string__NativeString__to_s_with_length(var225
, var226
);
8110 varonce223
= var224
;
8112 var228
= NEW_array__Array(&type_array__Arraykernel__Object
);
8113 { /* var228 = array_instance Array[Object] */
8115 var230
= NEW_array__NativeArray(var229
, &type_array__NativeArraykernel__Object
);
8116 ((struct instance_array__NativeArray
*)var230
)->values
[0] = (val
*) var217
;
8117 ((struct instance_array__NativeArray
*)var230
)->values
[1] = (val
*) var219
;
8118 ((struct instance_array__NativeArray
*)var230
)->values
[2] = (val
*) var_stype
;
8119 ((struct instance_array__NativeArray
*)var230
)->values
[3] = (val
*) var224
;
8121 ((void (*)(val
*, val
*, long))(var228
->class->vft
[COLOR_array__Array__with_native
]))(var228
, var230
, var229
) /* with_native on <var228:Array[Object]>*/;
8125 var231
= ((val
* (*)(val
*))(var228
->class->vft
[COLOR_string__Object__to_s
]))(var228
) /* to_s on <var228:Array[Object]>*/;
8128 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var231
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8131 CONTINUE_label
: (void)0;
8133 array__ArrayIterator__next(var199
); /* Direct call array#ArrayIterator#next on <var199:ArrayIterator[nullable Object]>*/
8136 BREAK_label
: (void)0;
8138 var233
= varonce232
;
8142 var236
= string__NativeString__to_s_with_length(var234
, var235
);
8144 varonce232
= var233
;
8147 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var233
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8151 var238
= varonce237
;
8153 var239
= "0, {}, /*DEAD TYPE*/";
8155 var241
= string__NativeString__to_s_with_length(var239
, var240
);
8157 varonce237
= var238
;
8160 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var238
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8164 var243
= varonce242
;
8168 var246
= string__NativeString__to_s_with_length(var244
, var245
);
8170 varonce242
= var243
;
8173 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var243
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8177 /* method separate_compiler#SeparateCompiler#compile_type_to_c for (self: Object, MType) */
8178 void VIRTUAL_separate_compiler__SeparateCompiler__compile_type_to_c(val
* self
, val
* p0
) {
8179 separate_compiler__SeparateCompiler__compile_type_to_c(self
, p0
); /* Direct call separate_compiler#SeparateCompiler#compile_type_to_c on <self:Object(SeparateCompiler)>*/
8182 /* method separate_compiler#SeparateCompiler#compile_type_resolution_table for (self: SeparateCompiler, MType) */
8183 void separate_compiler__SeparateCompiler__compile_type_resolution_table(val
* self
, val
* p0
) {
8184 val
* var_mtype
/* var mtype: MType */;
8185 val
* var
/* : MType */;
8186 short int var1
/* : Bool */;
8189 const char* var_class_name
;
8190 val
* var_mclass_type
/* var mclass_type: MClassType */;
8191 static val
* varonce
;
8192 val
* var2
/* : String */;
8193 char* var3
/* : NativeString */;
8194 long var4
/* : Int */;
8195 val
* var5
/* : FlatString */;
8196 val
* var6
/* : String */;
8197 val
* var7
/* : Array[Object] */;
8198 long var8
/* : Int */;
8199 val
* var9
/* : NativeArray[Object] */;
8200 val
* var10
/* : String */;
8201 static val
* varonce11
;
8202 val
* var12
/* : String */;
8203 char* var13
/* : NativeString */;
8204 long var14
/* : Int */;
8205 val
* var15
/* : FlatString */;
8206 val
* var16
/* : String */;
8207 static val
* varonce17
;
8208 val
* var18
/* : String */;
8209 char* var19
/* : NativeString */;
8210 long var20
/* : Int */;
8211 val
* var21
/* : FlatString */;
8212 val
* var22
/* : Array[Object] */;
8213 long var23
/* : Int */;
8214 val
* var24
/* : NativeArray[Object] */;
8215 val
* var25
/* : String */;
8216 val
* var26
/* : AbstractCompilerVisitor */;
8217 val
* var_v
/* var v: SeparateCompilerVisitor */;
8218 static val
* varonce27
;
8219 val
* var28
/* : String */;
8220 char* var29
/* : NativeString */;
8221 long var30
/* : Int */;
8222 val
* var31
/* : FlatString */;
8223 val
* var32
/* : String */;
8224 static val
* varonce33
;
8225 val
* var34
/* : String */;
8226 char* var35
/* : NativeString */;
8227 long var36
/* : Int */;
8228 val
* var37
/* : FlatString */;
8229 val
* var38
/* : Array[Object] */;
8230 long var39
/* : Int */;
8231 val
* var40
/* : NativeArray[Object] */;
8232 val
* var41
/* : String */;
8233 static val
* varonce42
;
8234 val
* var43
/* : String */;
8235 char* var44
/* : NativeString */;
8236 long var45
/* : Int */;
8237 val
* var46
/* : FlatString */;
8238 static val
* varonce47
;
8239 val
* var48
/* : String */;
8240 char* var49
/* : NativeString */;
8241 long var50
/* : Int */;
8242 val
* var51
/* : FlatString */;
8243 val
* var52
/* : Map[MClassType, Array[nullable MType]] */;
8244 val
* var54
/* : Map[MClassType, Array[nullable MType]] */;
8245 val
* var55
/* : nullable Object */;
8246 val
* var56
/* : ArrayIterator[nullable Object] */;
8247 short int var57
/* : Bool */;
8248 val
* var58
/* : nullable Object */;
8249 val
* var_t
/* var t: nullable MType */;
8250 val
* var59
/* : null */;
8251 short int var60
/* : Bool */;
8252 short int var61
/* : Bool */;
8253 val
* var_other
/* var other: nullable Object */;
8254 short int var63
/* : Bool */;
8255 short int var65
/* : Bool */;
8256 static val
* varonce66
;
8257 val
* var67
/* : String */;
8258 char* var68
/* : NativeString */;
8259 long var69
/* : Int */;
8260 val
* var70
/* : FlatString */;
8261 val
* var71
/* : MModule */;
8262 val
* var73
/* : MModule */;
8263 short int var74
/* : Bool */;
8264 val
* var75
/* : MType */;
8265 val
* var_tv
/* var tv: MType */;
8266 val
* var76
/* : Map[MType, Int] */;
8267 val
* var78
/* : Map[MType, Int] */;
8268 short int var79
/* : Bool */;
8269 static val
* varonce80
;
8270 val
* var81
/* : String */;
8271 char* var82
/* : NativeString */;
8272 long var83
/* : Int */;
8273 val
* var84
/* : FlatString */;
8274 val
* var85
/* : String */;
8275 val
* var86
/* : Array[Object] */;
8276 long var87
/* : Int */;
8277 val
* var88
/* : NativeArray[Object] */;
8278 val
* var89
/* : String */;
8279 static val
* varonce90
;
8280 val
* var91
/* : String */;
8281 char* var92
/* : NativeString */;
8282 long var93
/* : Int */;
8283 val
* var94
/* : FlatString */;
8284 val
* var95
/* : String */;
8285 static val
* varonce96
;
8286 val
* var97
/* : String */;
8287 char* var98
/* : NativeString */;
8288 long var99
/* : Int */;
8289 val
* var100
/* : FlatString */;
8290 static val
* varonce101
;
8291 val
* var102
/* : String */;
8292 char* var103
/* : NativeString */;
8293 long var104
/* : Int */;
8294 val
* var105
/* : FlatString */;
8295 static val
* varonce106
;
8296 val
* var107
/* : String */;
8297 char* var108
/* : NativeString */;
8298 long var109
/* : Int */;
8299 val
* var110
/* : FlatString */;
8300 val
* var111
/* : Array[Object] */;
8301 long var112
/* : Int */;
8302 val
* var113
/* : NativeArray[Object] */;
8303 val
* var114
/* : String */;
8304 static val
* varonce115
;
8305 val
* var116
/* : String */;
8306 char* var117
/* : NativeString */;
8307 long var118
/* : Int */;
8308 val
* var119
/* : FlatString */;
8309 static val
* varonce120
;
8310 val
* var121
/* : String */;
8311 char* var122
/* : NativeString */;
8312 long var123
/* : Int */;
8313 val
* var124
/* : FlatString */;
8314 static val
* varonce125
;
8315 val
* var126
/* : String */;
8316 char* var127
/* : NativeString */;
8317 long var128
/* : Int */;
8318 val
* var129
/* : FlatString */;
8319 val
* var130
/* : Array[Object] */;
8320 long var131
/* : Int */;
8321 val
* var132
/* : NativeArray[Object] */;
8322 val
* var133
/* : String */;
8323 static val
* varonce134
;
8324 val
* var135
/* : String */;
8325 char* var136
/* : NativeString */;
8326 long var137
/* : Int */;
8327 val
* var138
/* : FlatString */;
8328 static val
* varonce139
;
8329 val
* var140
/* : String */;
8330 char* var141
/* : NativeString */;
8331 long var142
/* : Int */;
8332 val
* var143
/* : FlatString */;
8335 var
= ((val
* (*)(val
*))(var_mtype
->class->vft
[COLOR_model__MType__as_notnullable
]))(var_mtype
) /* as_notnullable on <var_mtype:MType>*/;
8337 /* <var:MType> isa MClassType */
8338 cltype
= type_model__MClassType
.color
;
8339 idtype
= type_model__MClassType
.id
;
8340 if(cltype
>= var
->type
->table_size
) {
8343 var1
= var
->type
->type_table
[cltype
] == idtype
;
8345 if (unlikely(!var1
)) {
8346 var_class_name
= var
== NULL ?
"null" : var
->type
->name
;
8347 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "MClassType", var_class_name
);
8348 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 626);
8351 var_mclass_type
= var
;
8355 var3
= "resolution_table_";
8357 var5
= string__NativeString__to_s_with_length(var3
, var4
);
8362 var6
= ((val
* (*)(val
*))(var_mtype
->class->vft
[COLOR_abstract_compiler__MType__c_name
]))(var_mtype
) /* c_name on <var_mtype:MType>*/;
8364 var7
= NEW_array__Array(&type_array__Arraykernel__Object
);
8365 { /* var7 = array_instance Array[Object] */
8367 var9
= NEW_array__NativeArray(var8
, &type_array__NativeArraykernel__Object
);
8368 ((struct instance_array__NativeArray
*)var9
)->values
[0] = (val
*) var2
;
8369 ((struct instance_array__NativeArray
*)var9
)->values
[1] = (val
*) var6
;
8371 ((void (*)(val
*, val
*, long))(var7
->class->vft
[COLOR_array__Array__with_native
]))(var7
, var9
, var8
) /* with_native on <var7:Array[Object]>*/;
8375 var10
= ((val
* (*)(val
*))(var7
->class->vft
[COLOR_string__Object__to_s
]))(var7
) /* to_s on <var7:Array[Object]>*/;
8380 var13
= "extern const struct types resolution_table_";
8382 var15
= string__NativeString__to_s_with_length(var13
, var14
);
8387 var16
= ((val
* (*)(val
*))(var_mtype
->class->vft
[COLOR_abstract_compiler__MType__c_name
]))(var_mtype
) /* c_name on <var_mtype:MType>*/;
8394 var21
= string__NativeString__to_s_with_length(var19
, var20
);
8398 var22
= NEW_array__Array(&type_array__Arraykernel__Object
);
8399 { /* var22 = array_instance Array[Object] */
8401 var24
= NEW_array__NativeArray(var23
, &type_array__NativeArraykernel__Object
);
8402 ((struct instance_array__NativeArray
*)var24
)->values
[0] = (val
*) var12
;
8403 ((struct instance_array__NativeArray
*)var24
)->values
[1] = (val
*) var16
;
8404 ((struct instance_array__NativeArray
*)var24
)->values
[2] = (val
*) var18
;
8406 ((void (*)(val
*, val
*, long))(var22
->class->vft
[COLOR_array__Array__with_native
]))(var22
, var24
, var23
) /* with_native on <var22:Array[Object]>*/;
8410 var25
= ((val
* (*)(val
*))(var22
->class->vft
[COLOR_string__Object__to_s
]))(var22
) /* to_s on <var22:Array[Object]>*/;
8413 abstract_compiler__AbstractCompiler__provide_declaration(self
, var10
, var25
); /* Direct call abstract_compiler#AbstractCompiler#provide_declaration on <self:SeparateCompiler>*/
8416 var26
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_compiler__AbstractCompiler__new_visitor
]))(self
) /* new_visitor on <self:SeparateCompiler>*/;
8422 var29
= "const struct types resolution_table_";
8424 var31
= string__NativeString__to_s_with_length(var29
, var30
);
8429 var32
= ((val
* (*)(val
*))(var_mtype
->class->vft
[COLOR_abstract_compiler__MType__c_name
]))(var_mtype
) /* c_name on <var_mtype:MType>*/;
8436 var37
= string__NativeString__to_s_with_length(var35
, var36
);
8440 var38
= NEW_array__Array(&type_array__Arraykernel__Object
);
8441 { /* var38 = array_instance Array[Object] */
8443 var40
= NEW_array__NativeArray(var39
, &type_array__NativeArraykernel__Object
);
8444 ((struct instance_array__NativeArray
*)var40
)->values
[0] = (val
*) var28
;
8445 ((struct instance_array__NativeArray
*)var40
)->values
[1] = (val
*) var32
;
8446 ((struct instance_array__NativeArray
*)var40
)->values
[2] = (val
*) var34
;
8448 ((void (*)(val
*, val
*, long))(var38
->class->vft
[COLOR_array__Array__with_native
]))(var38
, var40
, var39
) /* with_native on <var38:Array[Object]>*/;
8452 var41
= ((val
* (*)(val
*))(var38
->class->vft
[COLOR_string__Object__to_s
]))(var38
) /* to_s on <var38:Array[Object]>*/;
8455 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var41
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8460 var44
= "0, /* dummy */";
8462 var46
= string__NativeString__to_s_with_length(var44
, var45
);
8467 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var43
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8474 var51
= string__NativeString__to_s_with_length(var49
, var50
);
8479 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var48
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8482 { /* Inline separate_compiler#SeparateCompiler#resolution_tables (self) on <self:SeparateCompiler> */
8483 var54
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___resolution_tables
].val
; /* _resolution_tables on <self:SeparateCompiler> */
8484 if (unlikely(var54
== NULL
)) {
8485 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _resolution_tables");
8486 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 791);
8490 RET_LABEL53
:(void)0;
8494 var55
= ((val
* (*)(val
*, val
*))(var52
->class->vft
[COLOR_abstract_collection__MapRead___91d_93d
]))(var52
, var_mclass_type
) /* [] on <var52:Map[MClassType, Array[nullable MType]]>*/;
8497 var56
= array__AbstractArrayRead__iterator(var55
);
8501 var57
= array__ArrayIterator__is_ok(var56
);
8505 var58
= array__ArrayIterator__item(var56
);
8509 if (var_t
== NULL
) {
8510 var60
= 1; /* is null */
8512 var60
= 0; /* arg is null but recv is not */
8515 { /* Inline kernel#Object#== (var_t,var59) on <var_t:nullable MType> */
8518 { /* Inline kernel#Object#is_same_instance (var_t,var_other) on <var_t:nullable MType(MType)> */
8519 var65
= var_t
== var_other
;
8522 RET_LABEL64
:(void)0;
8527 RET_LABEL62
:(void)0;
8535 var68
= "NULL, /* empty */";
8537 var70
= string__NativeString__to_s_with_length(var68
, var69
);
8542 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var67
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8546 { /* Inline abstract_compiler#AbstractCompiler#mainmodule (self) on <self:SeparateCompiler> */
8547 var73
= self
->attrs
[COLOR_abstract_compiler__AbstractCompiler___mainmodule
].val
; /* _mainmodule on <self:SeparateCompiler> */
8548 if (unlikely(var73
== NULL
)) {
8549 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _mainmodule");
8550 PRINT_ERROR(" (%s:%d)\n", "src/abstract_compiler.nit", 436);
8554 RET_LABEL72
:(void)0;
8559 var75
= ((val
* (*)(val
*, val
*, val
*, val
*, short int))(var_t
->class->vft
[COLOR_model__MType__resolve_for
]))(var_t
, var_mclass_type
, var_mclass_type
, var71
, var74
) /* resolve_for on <var_t:nullable MType(MType)>*/;
8563 { /* Inline separate_compiler#SeparateCompiler#type_ids (self) on <self:SeparateCompiler> */
8564 var78
= self
->attrs
[COLOR_separate_compiler__SeparateCompiler___type_ids
].val
; /* _type_ids on <self:SeparateCompiler> */
8565 if (unlikely(var78
== NULL
)) {
8566 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _type_ids");
8567 PRINT_ERROR(" (%s:%d)\n", "src/separate_compiler.nit", 158);
8571 RET_LABEL77
:(void)0;
8575 var79
= abstract_collection__MapRead__has_key(var76
, var_tv
);
8583 var84
= string__NativeString__to_s_with_length(var82
, var83
);
8588 var85
= ((val
* (*)(val
*))(var_tv
->class->vft
[COLOR_abstract_compiler__MType__c_name
]))(var_tv
) /* c_name on <var_tv:MType>*/;
8590 var86
= NEW_array__Array(&type_array__Arraykernel__Object
);
8591 { /* var86 = array_instance Array[Object] */
8593 var88
= NEW_array__NativeArray(var87
, &type_array__NativeArraykernel__Object
);
8594 ((struct instance_array__NativeArray
*)var88
)->values
[0] = (val
*) var81
;
8595 ((struct instance_array__NativeArray
*)var88
)->values
[1] = (val
*) var85
;
8597 ((void (*)(val
*, val
*, long))(var86
->class->vft
[COLOR_array__Array__with_native
]))(var86
, var88
, var87
) /* with_native on <var86:Array[Object]>*/;
8601 var89
= ((val
* (*)(val
*))(var86
->class->vft
[COLOR_string__Object__to_s
]))(var86
) /* to_s on <var86:Array[Object]>*/;
8604 abstract_compiler__AbstractCompilerVisitor__require_declaration(var_v
, var89
); /* Direct call abstract_compiler#AbstractCompilerVisitor#require_declaration on <var_v:SeparateCompilerVisitor>*/
8611 var94
= string__NativeString__to_s_with_length(var92
, var93
);
8616 var95
= ((val
* (*)(val
*))(var_tv
->class->vft
[COLOR_abstract_compiler__MType__c_name
]))(var_tv
) /* c_name on <var_tv:MType>*/;
8623 var100
= string__NativeString__to_s_with_length(var98
, var99
);
8628 var102
= varonce101
;
8632 var105
= string__NativeString__to_s_with_length(var103
, var104
);
8634 varonce101
= var102
;
8637 var107
= varonce106
;
8641 var110
= string__NativeString__to_s_with_length(var108
, var109
);
8643 varonce106
= var107
;
8645 var111
= NEW_array__Array(&type_array__Arraykernel__Object
);
8646 { /* var111 = array_instance Array[Object] */
8648 var113
= NEW_array__NativeArray(var112
, &type_array__NativeArraykernel__Object
);
8649 ((struct instance_array__NativeArray
*)var113
)->values
[0] = (val
*) var91
;
8650 ((struct instance_array__NativeArray
*)var113
)->values
[1] = (val
*) var95
;
8651 ((struct instance_array__NativeArray
*)var113
)->values
[2] = (val
*) var97
;
8652 ((struct instance_array__NativeArray
*)var113
)->values
[3] = (val
*) var_t
;
8653 ((struct instance_array__NativeArray
*)var113
)->values
[4] = (val
*) var102
;
8654 ((struct instance_array__NativeArray
*)var113
)->values
[5] = (val
*) var_tv
;
8655 ((struct instance_array__NativeArray
*)var113
)->values
[6] = (val
*) var107
;
8657 ((void (*)(val
*, val
*, long))(var111
->class->vft
[COLOR_array__Array__with_native
]))(var111
, var113
, var112
) /* with_native on <var111:Array[Object]>*/;
8661 var114
= ((val
* (*)(val
*))(var111
->class->vft
[COLOR_string__Object__to_s
]))(var111
) /* to_s on <var111:Array[Object]>*/;
8664 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var114
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8668 var116
= varonce115
;
8670 var117
= "NULL, /* empty (";
8672 var119
= string__NativeString__to_s_with_length(var117
, var118
);
8674 varonce115
= var116
;
8677 var121
= varonce120
;
8681 var124
= string__NativeString__to_s_with_length(var122
, var123
);
8683 varonce120
= var121
;
8686 var126
= varonce125
;
8688 var127
= " not a live type) */";
8690 var129
= string__NativeString__to_s_with_length(var127
, var128
);
8692 varonce125
= var126
;
8694 var130
= NEW_array__Array(&type_array__Arraykernel__Object
);
8695 { /* var130 = array_instance Array[Object] */
8697 var132
= NEW_array__NativeArray(var131
, &type_array__NativeArraykernel__Object
);
8698 ((struct instance_array__NativeArray
*)var132
)->values
[0] = (val
*) var116
;
8699 ((struct instance_array__NativeArray
*)var132
)->values
[1] = (val
*) var_t
;
8700 ((struct instance_array__NativeArray
*)var132
)->values
[2] = (val
*) var121
;
8701 ((struct instance_array__NativeArray
*)var132
)->values
[3] = (val
*) var_tv
;
8702 ((struct instance_array__NativeArray
*)var132
)->values
[4] = (val
*) var126
;
8704 ((void (*)(val
*, val
*, long))(var130
->class->vft
[COLOR_array__Array__with_native
]))(var130
, var132
, var131
) /* with_native on <var130:Array[Object]>*/;
8708 var133
= ((val
* (*)(val
*))(var130
->class->vft
[COLOR_string__Object__to_s
]))(var130
) /* to_s on <var130:Array[Object]>*/;
8711 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var133
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8715 CONTINUE_label
: (void)0;
8717 array__ArrayIterator__next(var56
); /* Direct call array#ArrayIterator#next on <var56:ArrayIterator[nullable Object]>*/
8720 BREAK_label
: (void)0;
8722 var135
= varonce134
;
8726 var138
= string__NativeString__to_s_with_length(var136
, var137
);
8728 varonce134
= var135
;
8731 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var135
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8734 var140
= varonce139
;
8738 var143
= string__NativeString__to_s_with_length(var141
, var142
);
8740 varonce139
= var140
;
8743 abstract_compiler__AbstractCompilerVisitor__add_decl(var_v
, var140
); /* Direct call abstract_compiler#AbstractCompilerVisitor#add_decl on <var_v:SeparateCompilerVisitor>*/
8747 /* method separate_compiler#SeparateCompiler#compile_type_resolution_table for (self: Object, MType) */
8748 void VIRTUAL_separate_compiler__SeparateCompiler__compile_type_resolution_table(val
* self
, val
* p0
) {
8749 separate_compiler__SeparateCompiler__compile_type_resolution_table(self
, p0
); /* Direct call separate_compiler#SeparateCompiler#compile_type_resolution_table on <self:Object(SeparateCompiler)>*/