1 #include "nitc__phase.sep.0.h"
2 /* method phase$ToolContext$phases for (self: ToolContext): POSet[Phase] */
3 val
* nitc__phase___ToolContext___phases(val
* self
) {
4 val
* var
/* : POSet[Phase] */;
5 val
* var1
/* : POSet[Phase] */;
6 var1
= self
->attrs
[COLOR_nitc__phase__ToolContext___phases
].val
; /* _phases on <self:ToolContext> */
7 if (unlikely(var1
== NULL
)) {
8 if(catchStack
.cursor
>= 0){
9 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
11 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _phases");
12 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 23);
19 /* method phase$ToolContext$opt_disable_phase for (self: ToolContext): OptionArray */
20 val
* nitc__phase___ToolContext___opt_disable_phase(val
* self
) {
21 val
* var
/* : OptionArray */;
22 val
* var1
/* : OptionArray */;
23 var1
= self
->attrs
[COLOR_nitc__phase__ToolContext___opt_disable_phase
].val
; /* _opt_disable_phase on <self:ToolContext> */
24 if (unlikely(var1
== NULL
)) {
25 if(catchStack
.cursor
>= 0){
26 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
28 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_disable_phase");
29 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 30);
36 /* method phase$ToolContext$opt_sloppy for (self: ToolContext): OptionBool */
37 val
* nitc__phase___ToolContext___opt_sloppy(val
* self
) {
38 val
* var
/* : OptionBool */;
39 val
* var1
/* : OptionBool */;
40 var1
= self
->attrs
[COLOR_nitc__phase__ToolContext___opt_sloppy
].val
; /* _opt_sloppy on <self:ToolContext> */
41 if (unlikely(var1
== NULL
)) {
42 if(catchStack
.cursor
>= 0){
43 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
45 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_sloppy");
46 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 33);
53 /* method phase$ToolContext$init for (self: ToolContext) */
54 void nitc__phase___ToolContext___core__kernel__Object__init(val
* self
) {
55 val
* var
/* : OptionContext */;
56 val
* var2
/* : OptionContext */;
57 val
* var3
/* : OptionArray */;
58 val
* var5
/* : OptionArray */;
59 val
* var6
/* : OptionBool */;
60 val
* var8
/* : OptionBool */;
61 val
* var9
/* : Array[Option] */;
62 val
* var10
/* : NativeArray[Option] */;
64 ((void(*)(val
* self
))(self
->class->vft
[COLOR_nitc__phase___ToolContext___core__kernel__Object__init
]))(self
); /* init on <self:ToolContext>*/
67 { /* Inline toolcontext$ToolContext$option_context (self) on <self:ToolContext> */
68 var2
= self
->attrs
[COLOR_nitc__toolcontext__ToolContext___option_context
].val
; /* _option_context on <self:ToolContext> */
69 if (unlikely(var2
== NULL
)) {
70 if(catchStack
.cursor
>= 0){
71 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
73 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _option_context");
74 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__toolcontext
, 357);
82 { /* Inline phase$ToolContext$opt_disable_phase (self) on <self:ToolContext> */
83 var5
= self
->attrs
[COLOR_nitc__phase__ToolContext___opt_disable_phase
].val
; /* _opt_disable_phase on <self:ToolContext> */
84 if (unlikely(var5
== NULL
)) {
85 if(catchStack
.cursor
>= 0){
86 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
88 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_disable_phase");
89 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 30);
97 { /* Inline phase$ToolContext$opt_sloppy (self) on <self:ToolContext> */
98 var8
= self
->attrs
[COLOR_nitc__phase__ToolContext___opt_sloppy
].val
; /* _opt_sloppy on <self:ToolContext> */
99 if (unlikely(var8
== NULL
)) {
100 if(catchStack
.cursor
>= 0){
101 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
103 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_sloppy");
104 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 33);
111 var9
= NEW_core__Array(&type_core__Array__opts__Option
);
112 { /* var9 = array_instance Array[Option] */
113 var10
= NEW_core__NativeArray((int)2l, &type_core__NativeArray__opts__Option
);
114 ((struct instance_core__NativeArray
*)var10
)->values
[0] = (val
*) var3
;
115 ((struct instance_core__NativeArray
*)var10
)->values
[1] = (val
*) var6
;
117 ((void(*)(val
* self
, val
* p0
, long p1
))(var9
->class->vft
[COLOR_core__array__Array__with_native
]))(var9
, var10
, 2l); /* with_native on <var9:Array[Option]>*/
121 opts___opts__OptionContext___add_option(var
, var9
); /* Direct call opts$OptionContext$add_option on <var:OptionContext>*/
125 /* method phase$ToolContext$process_options for (self: ToolContext, Sequence[String]) */
126 void nitc__phase___ToolContext___process_options(val
* self
, val
* p0
) {
127 val
* var_args
/* var args: Sequence[String] */;
128 val
* var
/* : OptionArray */;
129 val
* var2
/* : OptionArray */;
130 val
* var3
/* : nullable Object */;
131 val
* var5
/* : nullable Object */;
132 val
* var_
/* var : Array[String] */;
133 val
* var6
/* : IndexedIterator[nullable Object] */;
134 val
* var_7
/* var : IndexedIterator[String] */;
135 short int var8
/* : Bool */;
136 val
* var9
/* : nullable Object */;
137 val
* var_v
/* var v: String */;
139 val
* var10
/* : String */;
140 char* var11
/* : CString */;
141 val
* var12
/* : String */;
142 val
* var13
/* : nullable Int */;
143 val
* var14
/* : nullable Int */;
144 val
* var15
/* : nullable Bool */;
145 val
* var16
/* : nullable Bool */;
146 short int var17
/* : Bool */;
147 val
* var18
/* : Sequence[Phase] */;
148 val
* var_19
/* var : Sequence[Phase] */;
149 val
* var20
/* : Iterator[nullable Object] */;
150 val
* var_21
/* var : IndexedIterator[Phase] */;
151 short int var22
/* : Bool */;
152 val
* var24
/* : nullable Object */;
153 val
* var_p
/* var p: Phase */;
154 val
* var25
/* : POSetElement[Phase] */;
155 val
* var27
/* : POSetElement[Phase] */;
156 val
* var28
/* : Collection[nullable Object] */;
157 val
* var_deps
/* var deps: Collection[Phase] */;
158 short int var29
/* : Bool */;
159 val
* var30
/* : Sys */;
160 val
* var31
/* : Sys */;
161 val
* var33
/* : NativeArray[String] */;
162 static val
* varonce32
;
163 static val
* varonce34
;
164 val
* var35
/* : String */;
165 char* var36
/* : CString */;
166 val
* var37
/* : String */;
167 val
* var38
/* : nullable Int */;
168 val
* var39
/* : nullable Int */;
169 val
* var40
/* : nullable Bool */;
170 val
* var41
/* : nullable Bool */;
171 static val
* varonce42
;
172 val
* var43
/* : String */;
173 char* var44
/* : CString */;
174 val
* var45
/* : String */;
175 val
* var46
/* : nullable Int */;
176 val
* var47
/* : nullable Int */;
177 val
* var48
/* : nullable Bool */;
178 val
* var49
/* : nullable Bool */;
179 val
* var50
/* : String */;
180 static val
* varonce51
;
181 val
* var52
/* : String */;
182 char* var53
/* : CString */;
183 val
* var54
/* : String */;
184 val
* var55
/* : nullable Int */;
185 val
* var56
/* : nullable Int */;
186 val
* var57
/* : nullable Bool */;
187 val
* var58
/* : nullable Bool */;
188 val
* var59
/* : String */;
189 val
* var60
/* : String */;
190 val
* var61
/* : Sys */;
191 short int var_found
/* var found: Bool */;
192 val
* var63
/* : POSet[Phase] */;
193 val
* var65
/* : POSet[Phase] */;
194 val
* var_66
/* var : POSet[Phase] */;
195 val
* var67
/* : Iterator[nullable Object] */;
196 val
* var_68
/* var : Iterator[Phase] */;
197 short int var69
/* : Bool */;
198 val
* var71
/* : nullable Object */;
199 val
* var_p72
/* var p: Phase */;
200 val
* var73
/* : String */;
201 short int var74
/* : Bool */;
202 val
* var_other
/* var other: nullable Object */;
203 short int var76
/* : Bool */;
204 short int var77
/* : Bool */;
205 short int var80
/* : Bool */;
206 val
* var82
/* : NativeArray[String] */;
207 static val
* varonce81
;
208 static val
* varonce83
;
209 val
* var84
/* : String */;
210 char* var85
/* : CString */;
211 val
* var86
/* : String */;
212 val
* var87
/* : nullable Int */;
213 val
* var88
/* : nullable Int */;
214 val
* var89
/* : nullable Bool */;
215 val
* var90
/* : nullable Bool */;
216 static val
* varonce91
;
217 val
* var92
/* : String */;
218 char* var93
/* : CString */;
219 val
* var94
/* : String */;
220 val
* var95
/* : nullable Int */;
221 val
* var96
/* : nullable Int */;
222 val
* var97
/* : nullable Bool */;
223 val
* var98
/* : nullable Bool */;
224 val
* var99
/* : String */;
225 val
* var100
/* : OptionBool */;
226 val
* var102
/* : OptionBool */;
227 val
* var103
/* : nullable Object */;
228 val
* var105
/* : nullable Object */;
229 short int var106
/* : Bool */;
232 ((void(*)(val
* self
, val
* p0
))(self
->class->vft
[COLOR_nitc__phase___ToolContext___process_options
]))(self
, p0
); /* process_options on <self:ToolContext>*/
235 { /* Inline phase$ToolContext$opt_disable_phase (self) on <self:ToolContext> */
236 var2
= self
->attrs
[COLOR_nitc__phase__ToolContext___opt_disable_phase
].val
; /* _opt_disable_phase on <self:ToolContext> */
237 if (unlikely(var2
== NULL
)) {
238 if(catchStack
.cursor
>= 0){
239 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
241 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_disable_phase");
242 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 30);
250 { /* Inline opts$Option$value (var) on <var:OptionArray> */
251 var5
= var
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var:OptionArray> */
258 var6
= core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(var_
);
263 var8
= ((short int(*)(val
* self
))((((long)var_7
&3)?class_info
[((long)var_7
&3)]:var_7
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_7
); /* is_ok on <var_7:IndexedIterator[String]>*/
270 var9
= ((val
*(*)(val
* self
))((((long)var_7
&3)?class_info
[((long)var_7
&3)]:var_7
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_7
); /* item on <var_7:IndexedIterator[String]>*/
273 if (likely(varonce
!=NULL
)) {
277 var13
= (val
*)(4l<<2|1);
278 var14
= (val
*)(4l<<2|1);
279 var15
= (val
*)((long)(0)<<2|3);
280 var16
= (val
*)((long)(0)<<2|3);
281 var12
= core__flat___CString___to_s_unsafe(var11
, var13
, var14
, var15
, var16
);
286 var17
= ((short int(*)(val
* self
, val
* p0
))(var_v
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_v
, var10
); /* == on <var_v:String>*/
290 var18
= nitc__phase___ToolContext___phases_list(self
);
294 var20
= ((val
*(*)(val
* self
))((((long)var_19
&3)?class_info
[((long)var_19
&3)]:var_19
->class)->vft
[COLOR_core__abstract_collection__Collection__iterator
]))(var_19
); /* iterator on <var_19:Sequence[Phase]>*/
299 var22
= ((short int(*)(val
* self
))((((long)var_21
&3)?class_info
[((long)var_21
&3)]:var_21
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_21
); /* is_ok on <var_21:IndexedIterator[Phase]>*/
306 var24
= ((val
*(*)(val
* self
))((((long)var_21
&3)?class_info
[((long)var_21
&3)]:var_21
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_21
); /* item on <var_21:IndexedIterator[Phase]>*/
310 { /* Inline phase$Phase$in_hierarchy (var_p) on <var_p:Phase> */
311 var27
= var_p
->attrs
[COLOR_nitc__phase__Phase___in_hierarchy
].val
; /* _in_hierarchy on <var_p:Phase> */
312 if (unlikely(var27
== NULL
)) {
313 if(catchStack
.cursor
>= 0){
314 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
316 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _in_hierarchy");
317 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 213);
325 var28
= poset___poset__POSetElement___direct_greaters(var25
);
329 var29
= ((short int(*)(val
* self
))((((long)var_deps
&3)?class_info
[((long)var_deps
&3)]:var_deps
->class)->vft
[COLOR_core__abstract_collection__Collection__is_empty
]))(var_deps
); /* is_empty on <var_deps:Collection[Phase]>*/
334 core__file___Sys___print(var30
, var_p
); /* Direct call file$Sys$print on <var30:Sys>*/
338 if (unlikely(varonce32
==NULL
)) {
339 var33
= NEW_core__NativeArray((int)4l, &type_core__NativeArray__core__String
);
340 if (likely(varonce34
!=NULL
)) {
344 var38
= (val
*)(7l<<2|1);
345 var39
= (val
*)(7l<<2|1);
346 var40
= (val
*)((long)(0)<<2|3);
347 var41
= (val
*)((long)(0)<<2|3);
348 var37
= core__flat___CString___to_s_unsafe(var36
, var38
, var39
, var40
, var41
);
352 ((struct instance_core__NativeArray
*)var33
)->values
[1]=var35
;
353 if (likely(varonce42
!=NULL
)) {
357 var46
= (val
*)(1l<<2|1);
358 var47
= (val
*)(1l<<2|1);
359 var48
= (val
*)((long)(0)<<2|3);
360 var49
= (val
*)((long)(0)<<2|3);
361 var45
= core__flat___CString___to_s_unsafe(var44
, var46
, var47
, var48
, var49
);
365 ((struct instance_core__NativeArray
*)var33
)->values
[3]=var43
;
371 var50
= ((val
*(*)(val
* self
))(var_p
->class->vft
[COLOR_core__abstract_text__Object__to_s
]))(var_p
); /* to_s on <var_p:Phase>*/
373 ((struct instance_core__NativeArray
*)var33
)->values
[0]=var50
;
374 if (likely(varonce51
!=NULL
)) {
378 var55
= (val
*)(2l<<2|1);
379 var56
= (val
*)(2l<<2|1);
380 var57
= (val
*)((long)(0)<<2|3);
381 var58
= (val
*)((long)(0)<<2|3);
382 var54
= core__flat___CString___to_s_unsafe(var53
, var55
, var56
, var57
, var58
);
387 var59
= core__abstract_text___Collection___join(var_deps
, var52
, ((val
*)NULL
));
389 ((struct instance_core__NativeArray
*)var33
)->values
[2]=var59
;
391 var60
= ((val
*(*)(val
* self
))(var33
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var33
); /* native_to_s on <var33:NativeArray[String]>*/
395 core__file___Sys___print(var31
, var60
); /* Direct call file$Sys$print on <var31:Sys>*/
399 ((void(*)(val
* self
))((((long)var_21
&3)?class_info
[((long)var_21
&3)]:var_21
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_21
); /* next on <var_21:IndexedIterator[Phase]>*/
402 BREAK_label23
: (void)0;
404 ((void(*)(val
* self
))((((long)var_21
&3)?class_info
[((long)var_21
&3)]:var_21
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_21
); /* finish on <var_21:IndexedIterator[Phase]>*/
408 { /* Inline kernel$Sys$exit (var61,0l) on <var61:Sys> */
417 { /* Inline phase$ToolContext$phases (self) on <self:ToolContext> */
418 var65
= self
->attrs
[COLOR_nitc__phase__ToolContext___phases
].val
; /* _phases on <self:ToolContext> */
419 if (unlikely(var65
== NULL
)) {
420 if(catchStack
.cursor
>= 0){
421 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
423 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _phases");
424 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 23);
433 var67
= poset___poset__POSet___core__abstract_collection__Collection__iterator(var_66
);
438 var69
= ((short int(*)(val
* self
))((((long)var_68
&3)?class_info
[((long)var_68
&3)]:var_68
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_68
); /* is_ok on <var_68:Iterator[Phase]>*/
445 var71
= ((val
*(*)(val
* self
))((((long)var_68
&3)?class_info
[((long)var_68
&3)]:var_68
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_68
); /* item on <var_68:Iterator[Phase]>*/
449 var73
= nitc___nitc__Phase___core__abstract_text__Object__to_s(var_p72
);
452 { /* Inline kernel$Object$!= (var_v,var73) on <var_v:String> */
455 var76
= ((short int(*)(val
* self
, val
* p0
))(var_v
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_v
, var_other
); /* == on <var_v:String>*/
469 { /* Inline phase$Phase$disabled= (var_p72,1) on <var_p72:Phase> */
470 var_p72
->attrs
[COLOR_nitc__phase__Phase___disabled
].s
= 1; /* _disabled on <var_p72:Phase> */
474 BREAK_label78
: (void)0;
476 ((void(*)(val
* self
))((((long)var_68
&3)?class_info
[((long)var_68
&3)]:var_68
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_68
); /* next on <var_68:Iterator[Phase]>*/
479 BREAK_label70
: (void)0;
481 ((void(*)(val
* self
))((((long)var_68
&3)?class_info
[((long)var_68
&3)]:var_68
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_68
); /* finish on <var_68:Iterator[Phase]>*/
485 if (unlikely(varonce81
==NULL
)) {
486 var82
= NEW_core__NativeArray((int)3l, &type_core__NativeArray__core__String
);
487 if (likely(varonce83
!=NULL
)) {
490 var85
= "Error: no phase named `";
491 var87
= (val
*)(23l<<2|1);
492 var88
= (val
*)(23l<<2|1);
493 var89
= (val
*)((long)(0)<<2|3);
494 var90
= (val
*)((long)(0)<<2|3);
495 var86
= core__flat___CString___to_s_unsafe(var85
, var87
, var88
, var89
, var90
);
499 ((struct instance_core__NativeArray
*)var82
)->values
[0]=var84
;
500 if (likely(varonce91
!=NULL
)) {
503 var93
= "`. Use `list` to list all phases.";
504 var95
= (val
*)(33l<<2|1);
505 var96
= (val
*)(33l<<2|1);
506 var97
= (val
*)((long)(0)<<2|3);
507 var98
= (val
*)((long)(0)<<2|3);
508 var94
= core__flat___CString___to_s_unsafe(var93
, var95
, var96
, var97
, var98
);
512 ((struct instance_core__NativeArray
*)var82
)->values
[2]=var92
;
517 ((struct instance_core__NativeArray
*)var82
)->values
[1]=var_v
;
519 var99
= ((val
*(*)(val
* self
))(var82
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var82
); /* native_to_s on <var82:NativeArray[String]>*/
523 nitc___nitc__ToolContext___fatal_error(self
, ((val
*)NULL
), var99
); /* Direct call toolcontext$ToolContext$fatal_error on <self:ToolContext>*/
528 ((void(*)(val
* self
))((((long)var_7
&3)?class_info
[((long)var_7
&3)]:var_7
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_7
); /* next on <var_7:IndexedIterator[String]>*/
531 BREAK_label
: (void)0;
533 ((void(*)(val
* self
))((((long)var_7
&3)?class_info
[((long)var_7
&3)]:var_7
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_7
); /* finish on <var_7:IndexedIterator[String]>*/
536 { /* Inline phase$ToolContext$opt_sloppy (self) on <self:ToolContext> */
537 var102
= self
->attrs
[COLOR_nitc__phase__ToolContext___opt_sloppy
].val
; /* _opt_sloppy on <self:ToolContext> */
538 if (unlikely(var102
== NULL
)) {
539 if(catchStack
.cursor
>= 0){
540 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
542 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _opt_sloppy");
543 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 33);
547 RET_LABEL101
:(void)0;
551 { /* Inline opts$Option$value (var100) on <var100:OptionBool> */
552 var105
= var100
->attrs
[COLOR_opts__Option___value
].val
; /* _value on <var100:OptionBool> */
554 RET_LABEL104
:(void)0;
557 var106
= (short int)((long)(var103
)>>2);
560 { /* Inline phase$ToolContext$semantize_is_lazy= (self,1) on <self:ToolContext> */
561 self
->attrs
[COLOR_nitc__phase__ToolContext___semantize_is_lazy
].s
= 1; /* _semantize_is_lazy on <self:ToolContext> */
562 RET_LABEL107
:(void)0;
569 /* method phase$ToolContext$phases_list for (self: ToolContext): Sequence[Phase] */
570 val
* nitc__phase___ToolContext___phases_list(val
* self
) {
571 val
* var
/* : Sequence[Phase] */;
572 short int var1
/* : Bool */;
573 val
* var2
/* : Sequence[Phase] */;
574 val
* var3
/* : Sequence[Phase] */;
575 val
* var5
/* : POSet[Phase] */;
576 val
* var7
/* : POSet[Phase] */;
577 val
* var8
/* : Array[nullable Object] */;
578 val
* var_phases
/* var phases: Array[Phase] */;
579 val
* var9
/* : POSet[Phase] */;
580 val
* var11
/* : POSet[Phase] */;
581 var1
= self
->attrs
[COLOR_nitc__phase__ToolContext___phases_list
].val
!= NULL
; /* _phases_list on <self:ToolContext> */
583 var2
= self
->attrs
[COLOR_nitc__phase__ToolContext___phases_list
].val
; /* _phases_list on <self:ToolContext> */
584 if (unlikely(var2
== NULL
)) {
585 if(catchStack
.cursor
>= 0){
586 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
588 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _phases_list");
589 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 72);
595 { /* Inline phase$ToolContext$phases (self) on <self:ToolContext> */
596 var7
= self
->attrs
[COLOR_nitc__phase__ToolContext___phases
].val
; /* _phases on <self:ToolContext> */
597 if (unlikely(var7
== NULL
)) {
598 if(catchStack
.cursor
>= 0){
599 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
601 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _phases");
602 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 23);
610 var8
= core__array___Collection___to_a(var5
);
614 { /* Inline phase$ToolContext$phases (self) on <self:ToolContext> */
615 var11
= self
->attrs
[COLOR_nitc__phase__ToolContext___phases
].val
; /* _phases on <self:ToolContext> */
616 if (unlikely(var11
== NULL
)) {
617 if(catchStack
.cursor
>= 0){
618 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
620 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _phases");
621 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 23);
629 core___core__Comparator___sort(var9
, var_phases
); /* Direct call sorter$Comparator$sort on <var9:POSet[Phase]>*/
635 self
->attrs
[COLOR_nitc__phase__ToolContext___phases_list
].val
= var3
; /* _phases_list on <self:ToolContext> */
642 /* method phase$ToolContext$semantize_is_lazy for (self: ToolContext): Bool */
643 short int nitc__phase___ToolContext___semantize_is_lazy(val
* self
) {
644 short int var
/* : Bool */;
645 short int var1
/* : Bool */;
646 var1
= self
->attrs
[COLOR_nitc__phase__ToolContext___semantize_is_lazy
].s
; /* _semantize_is_lazy on <self:ToolContext> */
651 /* method phase$ToolContext$semantize_is_lazy= for (self: ToolContext, Bool) */
652 void nitc__phase___ToolContext___semantize_is_lazy_61d(val
* self
, short int p0
) {
653 self
->attrs
[COLOR_nitc__phase__ToolContext___semantize_is_lazy
].s
= p0
; /* _semantize_is_lazy on <self:ToolContext> */
656 /* method phase$ToolContext$phased_modules for (self: ToolContext): HashSet[AModule] */
657 val
* nitc__phase___ToolContext___phased_modules(val
* self
) {
658 val
* var
/* : HashSet[AModule] */;
659 val
* var1
/* : HashSet[AModule] */;
660 var1
= self
->attrs
[COLOR_nitc__phase__ToolContext___phased_modules
].val
; /* _phased_modules on <self:ToolContext> */
661 if (unlikely(var1
== NULL
)) {
662 if(catchStack
.cursor
>= 0){
663 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
665 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _phased_modules");
666 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 86);
673 /* method phase$ToolContext$todo_nmodules= for (self: ToolContext, Sequence[AModule]) */
674 void nitc__phase___ToolContext___todo_nmodules_61d(val
* self
, val
* p0
) {
675 self
->attrs
[COLOR_nitc__phase__ToolContext___todo_nmodules
].val
= p0
; /* _todo_nmodules on <self:ToolContext> */
678 /* method phase$ToolContext$run_phases for (self: ToolContext, Collection[AModule]) */
679 void nitc__phase___ToolContext___run_phases(val
* self
, val
* p0
) {
680 val
* var_nmodules
/* var nmodules: Collection[AModule] */;
681 val
* var
/* : Sys */;
682 long var1
/* : Int */;
683 long var3
/* : Int */;
684 long var_time0
/* var time0: Int */;
686 val
* var4
/* : String */;
687 char* var5
/* : CString */;
688 val
* var6
/* : String */;
689 val
* var7
/* : nullable Int */;
690 val
* var8
/* : nullable Int */;
691 val
* var9
/* : nullable Bool */;
692 val
* var10
/* : nullable Bool */;
693 val
* var11
/* : Sequence[Phase] */;
694 val
* var_phases
/* var phases: Sequence[Phase] */;
695 val
* var_
/* var : Sequence[Phase] */;
696 val
* var12
/* : Iterator[nullable Object] */;
697 val
* var_13
/* var : IndexedIterator[Phase] */;
698 short int var14
/* : Bool */;
699 val
* var15
/* : nullable Object */;
700 val
* var_phase
/* var phase: Phase */;
701 val
* var17
/* : NativeArray[String] */;
702 static val
* varonce16
;
703 static val
* varonce18
;
704 val
* var19
/* : String */;
705 char* var20
/* : CString */;
706 val
* var21
/* : String */;
707 val
* var22
/* : nullable Int */;
708 val
* var23
/* : nullable Int */;
709 val
* var24
/* : nullable Bool */;
710 val
* var25
/* : nullable Bool */;
711 val
* var26
/* : String */;
712 val
* var27
/* : String */;
713 val
* var28
/* : Array[nullable Object] */;
714 val
* var_todo_nmodules
/* var todo_nmodules: Array[AModule] */;
715 short int var30
/* : Bool */;
716 short int var31
/* : Bool */;
717 val
* var32
/* : nullable Object */;
718 val
* var_nmodule
/* var nmodule: AModule */;
719 val
* var33
/* : HashSet[AModule] */;
720 val
* var35
/* : HashSet[AModule] */;
721 short int var36
/* : Bool */;
722 val
* var38
/* : HashSet[AModule] */;
723 val
* var40
/* : HashSet[AModule] */;
724 val
* var42
/* : NativeArray[String] */;
725 static val
* varonce41
;
726 static val
* varonce43
;
727 val
* var44
/* : String */;
728 char* var45
/* : CString */;
729 val
* var46
/* : String */;
730 val
* var47
/* : nullable Int */;
731 val
* var48
/* : nullable Int */;
732 val
* var49
/* : nullable Bool */;
733 val
* var50
/* : nullable Bool */;
734 val
* var51
/* : Location */;
735 val
* var53
/* : Location */;
736 val
* var54
/* : nullable SourceFile */;
737 val
* var56
/* : nullable SourceFile */;
738 val
* var57
/* : String */;
739 val
* var59
/* : String */;
740 val
* var60
/* : String */;
741 val
* var61
/* : AnnotationPhaseVisitor */;
742 val
* var_vannot
/* var vannot: AnnotationPhaseVisitor */;
743 val
* var_63
/* var : Sequence[Phase] */;
744 val
* var64
/* : Iterator[nullable Object] */;
745 val
* var_65
/* var : IndexedIterator[Phase] */;
746 short int var66
/* : Bool */;
747 val
* var68
/* : nullable Object */;
748 val
* var_phase69
/* var phase: Phase */;
749 short int var70
/* : Bool */;
750 short int var72
/* : Bool */;
751 val
* var74
/* : ToolContext */;
752 val
* var76
/* : ToolContext */;
753 short int var77
/* : Bool */;
754 val
* var_other
/* var other: nullable Object */;
755 short int var79
/* : Bool */;
756 short int var81
/* : Bool */;
757 long var82
/* : Int */;
758 long var84
/* : Int */;
759 long var_errcount
/* var errcount: Int */;
760 long var85
/* : Int */;
761 long var87
/* : Int */;
762 short int var88
/* : Bool */;
763 short int var90
/* : Bool */;
764 short int var91
/* : Bool */;
765 short int var92
/* : Bool */;
766 long var93
/* : Int */;
767 long var95
/* : Int */;
768 val
* var96
/* : ANodes[AClassdef] */;
769 val
* var98
/* : ANodes[AClassdef] */;
770 val
* var_99
/* var : ANodes[AClassdef] */;
771 val
* var100
/* : Iterator[ANode] */;
772 val
* var_101
/* var : Iterator[AClassdef] */;
773 short int var102
/* : Bool */;
774 val
* var104
/* : nullable Object */;
775 val
* var_nclassdef
/* var nclassdef: AClassdef */;
776 val
* var105
/* : ToolContext */;
777 val
* var107
/* : ToolContext */;
778 short int var108
/* : Bool */;
779 short int var110
/* : Bool */;
780 short int var112
/* : Bool */;
781 short int var113
/* : Bool */;
782 short int var115
/* : Bool */;
783 short int var116
/* : Bool */;
784 val
* var117
/* : ANodes[APropdef] */;
785 val
* var119
/* : ANodes[APropdef] */;
786 val
* var_120
/* var : ANodes[APropdef] */;
787 val
* var121
/* : Iterator[ANode] */;
788 val
* var_122
/* var : Iterator[APropdef] */;
789 short int var123
/* : Bool */;
790 val
* var125
/* : nullable Object */;
791 val
* var_npropdef
/* var npropdef: APropdef */;
792 val
* var126
/* : ToolContext */;
793 val
* var128
/* : ToolContext */;
794 short int var129
/* : Bool */;
795 short int var131
/* : Bool */;
796 short int var133
/* : Bool */;
797 long var134
/* : Int */;
798 long var136
/* : Int */;
799 short int var137
/* : Bool */;
800 short int var139
/* : Bool */;
801 short int var140
/* : Bool */;
802 short int var141
/* : Bool */;
803 val
* var142
/* : Array[AAnnotation] */;
804 val
* var144
/* : Array[AAnnotation] */;
805 val
* var_145
/* var : Array[AAnnotation] */;
806 val
* var146
/* : IndexedIterator[nullable Object] */;
807 val
* var_147
/* var : IndexedIterator[AAnnotation] */;
808 short int var148
/* : Bool */;
809 val
* var150
/* : nullable Object */;
810 val
* var_na
/* var na: AAnnotation */;
811 val
* var151
/* : nullable ANode */;
812 val
* var153
/* : nullable ANode */;
813 val
* var_p
/* var p: nullable ANode */;
814 short int var154
/* : Bool */;
817 val
* var155
/* : nullable ANode */;
818 val
* var157
/* : nullable ANode */;
819 short int var158
/* : Bool */;
820 short int var159
/* : Bool */;
821 val
* var_other161
/* var other: nullable Object */;
822 short int var162
/* : Bool */;
823 short int var163
/* : Bool */;
824 long var164
/* : Int */;
825 long var166
/* : Int */;
826 short int var167
/* : Bool */;
827 short int var169
/* : Bool */;
828 short int var170
/* : Bool */;
829 short int var171
/* : Bool */;
830 val
* var_nmodule173
/* var nmodule: AModule */;
831 short int var174
/* : Bool */;
832 val
* var176
/* : Sys */;
833 long var177
/* : Int */;
834 long var179
/* : Int */;
835 long var_time1
/* var time1: Int */;
836 val
* var181
/* : NativeArray[String] */;
837 static val
* varonce180
;
838 static val
* varonce182
;
839 val
* var183
/* : String */;
840 char* var184
/* : CString */;
841 val
* var185
/* : String */;
842 val
* var186
/* : nullable Int */;
843 val
* var187
/* : nullable Int */;
844 val
* var188
/* : nullable Bool */;
845 val
* var189
/* : nullable Bool */;
846 static val
* varonce190
;
847 val
* var191
/* : String */;
848 char* var192
/* : CString */;
849 val
* var193
/* : String */;
850 val
* var194
/* : nullable Int */;
851 val
* var195
/* : nullable Int */;
852 val
* var196
/* : nullable Bool */;
853 val
* var197
/* : nullable Bool */;
854 long var198
/* : Int */;
855 short int var200
/* : Bool */;
858 const char* var_class_name
;
859 long var203
/* : Int */;
860 val
* var204
/* : String */;
861 val
* var205
/* : String */;
862 short int var206
/* : Bool */;
866 { /* Inline time$Sys$get_time (var) on <var:Sys> */
867 struct nitni_instance
* var_for_c_0
;
868 var_for_c_0
= nit_alloc(sizeof(struct nitni_instance
));
869 var_for_c_0
->value
= var
;
870 var3
= core__time___Sys_get_time___impl(var_for_c_0
);
877 if (likely(varonce
!=NULL
)) {
880 var5
= "*** SEMANTIC ANALYSIS ***";
881 var7
= (val
*)(25l<<2|1);
882 var8
= (val
*)(25l<<2|1);
883 var9
= (val
*)((long)(0)<<2|3);
884 var10
= (val
*)((long)(0)<<2|3);
885 var6
= core__flat___CString___to_s_unsafe(var5
, var7
, var8
, var9
, var10
);
890 nitc___nitc__ToolContext___info(self
, var4
, 1l); /* Direct call toolcontext$ToolContext$info on <self:ToolContext>*/
893 var11
= nitc__phase___ToolContext___phases_list(self
);
898 var12
= ((val
*(*)(val
* self
))((((long)var_
&3)?class_info
[((long)var_
&3)]:var_
->class)->vft
[COLOR_core__abstract_collection__Collection__iterator
]))(var_
); /* iterator on <var_:Sequence[Phase]>*/
903 var14
= ((short int(*)(val
* self
))((((long)var_13
&3)?class_info
[((long)var_13
&3)]:var_13
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_13
); /* is_ok on <var_13:IndexedIterator[Phase]>*/
910 var15
= ((val
*(*)(val
* self
))((((long)var_13
&3)?class_info
[((long)var_13
&3)]:var_13
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_13
); /* item on <var_13:IndexedIterator[Phase]>*/
913 if (unlikely(varonce16
==NULL
)) {
914 var17
= NEW_core__NativeArray((int)2l, &type_core__NativeArray__core__String
);
915 if (likely(varonce18
!=NULL
)) {
918 var20
= " registered phases: ";
919 var22
= (val
*)(20l<<2|1);
920 var23
= (val
*)(20l<<2|1);
921 var24
= (val
*)((long)(0)<<2|3);
922 var25
= (val
*)((long)(0)<<2|3);
923 var21
= core__flat___CString___to_s_unsafe(var20
, var22
, var23
, var24
, var25
);
927 ((struct instance_core__NativeArray
*)var17
)->values
[0]=var19
;
933 var26
= ((val
*(*)(val
* self
))(var_phase
->class->vft
[COLOR_core__abstract_text__Object__to_s
]))(var_phase
); /* to_s on <var_phase:Phase>*/
935 ((struct instance_core__NativeArray
*)var17
)->values
[1]=var26
;
937 var27
= ((val
*(*)(val
* self
))(var17
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var17
); /* native_to_s on <var17:NativeArray[String]>*/
941 nitc___nitc__ToolContext___info(self
, var27
, 2l); /* Direct call toolcontext$ToolContext$info on <self:ToolContext>*/
944 ((void(*)(val
* self
))((((long)var_13
&3)?class_info
[((long)var_13
&3)]:var_13
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_13
); /* next on <var_13:IndexedIterator[Phase]>*/
947 BREAK_label
: (void)0;
949 ((void(*)(val
* self
))((((long)var_13
&3)?class_info
[((long)var_13
&3)]:var_13
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_13
); /* finish on <var_13:IndexedIterator[Phase]>*/
952 var28
= ((val
*(*)(val
* self
))((((long)var_nmodules
&3)?class_info
[((long)var_nmodules
&3)]:var_nmodules
->class)->vft
[COLOR_core__array__Collection__to_a
]))(var_nmodules
); /* to_a on <var_nmodules:Collection[AModule]>*/
954 var_todo_nmodules
= var28
;
956 { /* Inline phase$ToolContext$todo_nmodules= (self,var_todo_nmodules) on <self:ToolContext> */
957 self
->attrs
[COLOR_nitc__phase__ToolContext___todo_nmodules
].val
= var_todo_nmodules
; /* _todo_nmodules on <self:ToolContext> */
963 var30
= core___core__AbstractArrayRead___core__abstract_collection__Collection__is_empty(var_todo_nmodules
);
968 var32
= core___core__AbstractArray___core__abstract_collection__Sequence__shift(var_todo_nmodules
);
972 { /* Inline phase$ToolContext$phased_modules (self) on <self:ToolContext> */
973 var35
= self
->attrs
[COLOR_nitc__phase__ToolContext___phased_modules
].val
; /* _phased_modules on <self:ToolContext> */
974 if (unlikely(var35
== NULL
)) {
975 if(catchStack
.cursor
>= 0){
976 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
978 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _phased_modules");
979 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 86);
987 var36
= core___core__HashSet___core__abstract_collection__Collection__has(var33
, var_nmodule
);
994 { /* Inline phase$ToolContext$phased_modules (self) on <self:ToolContext> */
995 var40
= self
->attrs
[COLOR_nitc__phase__ToolContext___phased_modules
].val
; /* _phased_modules on <self:ToolContext> */
996 if (unlikely(var40
== NULL
)) {
997 if(catchStack
.cursor
>= 0){
998 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1000 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _phased_modules");
1001 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 86);
1005 RET_LABEL39
:(void)0;
1009 core___core__HashSet___core__abstract_collection__SimpleCollection__add(var38
, var_nmodule
); /* Direct call hash_collection$HashSet$add on <var38:HashSet[AModule]>*/
1011 if (unlikely(varonce41
==NULL
)) {
1012 var42
= NEW_core__NativeArray((int)2l, &type_core__NativeArray__core__String
);
1013 if (likely(varonce43
!=NULL
)) {
1016 var45
= "Semantic analysis module ";
1017 var47
= (val
*)(25l<<2|1);
1018 var48
= (val
*)(25l<<2|1);
1019 var49
= (val
*)((long)(0)<<2|3);
1020 var50
= (val
*)((long)(0)<<2|3);
1021 var46
= core__flat___CString___to_s_unsafe(var45
, var47
, var48
, var49
, var50
);
1025 ((struct instance_core__NativeArray
*)var42
)->values
[0]=var44
;
1031 { /* Inline parser_nodes$ANode$location (var_nmodule) on <var_nmodule:AModule> */
1032 var53
= var_nmodule
->attrs
[COLOR_nitc__parser_nodes__ANode___location
].val
; /* _location on <var_nmodule:AModule> */
1033 if (unlikely(var53
== NULL
)) {
1034 if(catchStack
.cursor
>= 0){
1035 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1037 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _location");
1038 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__parser_nodes
, 25);
1042 RET_LABEL52
:(void)0;
1046 { /* Inline location$Location$file (var51) on <var51:Location> */
1047 var56
= var51
->attrs
[COLOR_nitc__location__Location___file
].val
; /* _file on <var51:Location> */
1049 RET_LABEL55
:(void)0;
1052 if (var54
== NULL
) {
1053 if(catchStack
.cursor
>= 0){
1054 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1056 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1057 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 115);
1060 { /* Inline location$SourceFile$filename (var54) on <var54:nullable SourceFile> */
1061 if (unlikely(var54
== NULL
)) {
1062 if(catchStack
.cursor
>= 0){
1063 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1065 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1066 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__location
, 22);
1069 var59
= var54
->attrs
[COLOR_nitc__location__SourceFile___filename
].val
; /* _filename on <var54:nullable SourceFile> */
1070 if (unlikely(var59
== NULL
)) {
1071 if(catchStack
.cursor
>= 0){
1072 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1074 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _filename");
1075 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__location
, 22);
1079 RET_LABEL58
:(void)0;
1082 ((struct instance_core__NativeArray
*)var42
)->values
[1]=var57
;
1084 var60
= ((val
*(*)(val
* self
))(var42
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var42
); /* native_to_s on <var42:NativeArray[String]>*/
1088 nitc___nitc__ToolContext___info(self
, var60
, 2l); /* Direct call toolcontext$ToolContext$info on <self:ToolContext>*/
1090 var61
= NEW_nitc__phase__AnnotationPhaseVisitor(&type_nitc__phase__AnnotationPhaseVisitor
);
1092 { /* Inline kernel$Object$init (var61) on <var61:AnnotationPhaseVisitor> */
1093 RET_LABEL62
:(void)0;
1098 nitc___nitc__Visitor___enter_visit(var_vannot
, var_nmodule
); /* Direct call parser_nodes$Visitor$enter_visit on <var_vannot:AnnotationPhaseVisitor>*/
1100 var_63
= var_phases
;
1102 var64
= ((val
*(*)(val
* self
))((((long)var_63
&3)?class_info
[((long)var_63
&3)]:var_63
->class)->vft
[COLOR_core__abstract_collection__Collection__iterator
]))(var_63
); /* iterator on <var_63:Sequence[Phase]>*/
1107 var66
= ((short int(*)(val
* self
))((((long)var_65
&3)?class_info
[((long)var_65
&3)]:var_65
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_65
); /* is_ok on <var_65:IndexedIterator[Phase]>*/
1114 var68
= ((val
*(*)(val
* self
))((((long)var_65
&3)?class_info
[((long)var_65
&3)]:var_65
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_65
); /* item on <var_65:IndexedIterator[Phase]>*/
1116 var_phase69
= var68
;
1118 { /* Inline phase$Phase$disabled (var_phase69) on <var_phase69:Phase> */
1119 var72
= var_phase69
->attrs
[COLOR_nitc__phase__Phase___disabled
].s
; /* _disabled on <var_phase69:Phase> */
1121 RET_LABEL71
:(void)0;
1129 { /* Inline phase$Phase$toolcontext (var_phase69) on <var_phase69:Phase> */
1130 var76
= var_phase69
->attrs
[COLOR_nitc__phase__Phase___toolcontext
].val
; /* _toolcontext on <var_phase69:Phase> */
1131 if (unlikely(var76
== NULL
)) {
1132 if(catchStack
.cursor
>= 0){
1133 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1135 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1136 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 210);
1140 RET_LABEL75
:(void)0;
1144 { /* Inline kernel$Object$== (var74,self) on <var74:ToolContext> */
1147 { /* Inline kernel$Object$is_same_instance (var74,var_other) on <var74:ToolContext> */
1148 var81
= var74
== var_other
;
1151 RET_LABEL80
:(void)0;
1156 RET_LABEL78
:(void)0;
1159 if (unlikely(!var77
)) {
1160 if(catchStack
.cursor
>= 0){
1161 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1163 PRINT_ERROR("Runtime error: %s", "Assert failed");
1164 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 122);
1168 { /* Inline toolcontext$ToolContext$error_count (self) on <self:ToolContext> */
1169 var84
= self
->attrs
[COLOR_nitc__toolcontext__ToolContext___error_count
].l
; /* _error_count on <self:ToolContext> */
1171 RET_LABEL83
:(void)0;
1174 var_errcount
= var82
;
1176 ((void(*)(val
* self
, val
* p0
))(var_phase69
->class->vft
[COLOR_nitc__phase__Phase__process_nmodule
]))(var_phase69
, var_nmodule
); /* process_nmodule on <var_phase69:Phase>*/
1179 { /* Inline toolcontext$ToolContext$error_count (self) on <self:ToolContext> */
1180 var87
= self
->attrs
[COLOR_nitc__toolcontext__ToolContext___error_count
].l
; /* _error_count on <self:ToolContext> */
1182 RET_LABEL86
:(void)0;
1186 { /* Inline kernel$Int$!= (var_errcount,var85) on <var_errcount:Int> */
1187 var90
= var_errcount
== var85
;
1191 RET_LABEL89
:(void)0;
1196 var92
= nitc___nitc__ToolContext___check_errors(self
);
1201 { /* Inline toolcontext$ToolContext$error_count (self) on <self:ToolContext> */
1202 var95
= self
->attrs
[COLOR_nitc__toolcontext__ToolContext___error_count
].l
; /* _error_count on <self:ToolContext> */
1204 RET_LABEL94
:(void)0;
1207 var_errcount
= var93
;
1209 { /* Inline parser_nodes$AModule$n_classdefs (var_nmodule) on <var_nmodule:AModule> */
1210 var98
= var_nmodule
->attrs
[COLOR_nitc__parser_nodes__AModule___n_classdefs
].val
; /* _n_classdefs on <var_nmodule:AModule> */
1211 if (unlikely(var98
== NULL
)) {
1212 if(catchStack
.cursor
>= 0){
1213 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1215 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_classdefs");
1216 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__parser_nodes
, 1125);
1220 RET_LABEL97
:(void)0;
1225 var100
= nitc___nitc__ANodes___core__abstract_collection__Collection__iterator(var_99
);
1230 var102
= ((short int(*)(val
* self
))((((long)var_101
&3)?class_info
[((long)var_101
&3)]:var_101
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_101
); /* is_ok on <var_101:Iterator[AClassdef]>*/
1234 goto BREAK_label103
;
1237 var104
= ((val
*(*)(val
* self
))((((long)var_101
&3)?class_info
[((long)var_101
&3)]:var_101
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_101
); /* item on <var_101:Iterator[AClassdef]>*/
1239 var_nclassdef
= var104
;
1241 { /* Inline phase$Phase$toolcontext (var_phase69) on <var_phase69:Phase> */
1242 var107
= var_phase69
->attrs
[COLOR_nitc__phase__Phase___toolcontext
].val
; /* _toolcontext on <var_phase69:Phase> */
1243 if (unlikely(var107
== NULL
)) {
1244 if(catchStack
.cursor
>= 0){
1245 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1247 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1248 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 210);
1252 RET_LABEL106
:(void)0;
1256 { /* Inline kernel$Object$== (var105,self) on <var105:ToolContext> */
1259 { /* Inline kernel$Object$is_same_instance (var105,var_other) on <var105:ToolContext> */
1260 var112
= var105
== var_other
;
1263 RET_LABEL111
:(void)0;
1268 RET_LABEL109
:(void)0;
1271 if (unlikely(!var108
)) {
1272 if(catchStack
.cursor
>= 0){
1273 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1275 PRINT_ERROR("Runtime error: %s", "Assert failed");
1276 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 130);
1280 ((void(*)(val
* self
, val
* p0
))(var_phase69
->class->vft
[COLOR_nitc__phase__Phase__process_nclassdef
]))(var_phase69
, var_nclassdef
); /* process_nclassdef on <var_phase69:Phase>*/
1283 { /* Inline phase$ToolContext$semantize_is_lazy (self) on <self:ToolContext> */
1284 var115
= self
->attrs
[COLOR_nitc__phase__ToolContext___semantize_is_lazy
].s
; /* _semantize_is_lazy on <self:ToolContext> */
1286 RET_LABEL114
:(void)0;
1292 { /* Inline parser_nodes$AClassdef$n_propdefs (var_nclassdef) on <var_nclassdef:AClassdef> */
1293 var119
= var_nclassdef
->attrs
[COLOR_nitc__parser_nodes__AClassdef___n_propdefs
].val
; /* _n_propdefs on <var_nclassdef:AClassdef> */
1294 if (unlikely(var119
== NULL
)) {
1295 if(catchStack
.cursor
>= 0){
1296 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1298 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
1299 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__parser_nodes
, 1218);
1303 RET_LABEL118
:(void)0;
1308 var121
= nitc___nitc__ANodes___core__abstract_collection__Collection__iterator(var_120
);
1313 var123
= ((short int(*)(val
* self
))((((long)var_122
&3)?class_info
[((long)var_122
&3)]:var_122
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_122
); /* is_ok on <var_122:Iterator[APropdef]>*/
1317 goto BREAK_label124
;
1320 var125
= ((val
*(*)(val
* self
))((((long)var_122
&3)?class_info
[((long)var_122
&3)]:var_122
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_122
); /* item on <var_122:Iterator[APropdef]>*/
1322 var_npropdef
= var125
;
1324 { /* Inline phase$Phase$toolcontext (var_phase69) on <var_phase69:Phase> */
1325 var128
= var_phase69
->attrs
[COLOR_nitc__phase__Phase___toolcontext
].val
; /* _toolcontext on <var_phase69:Phase> */
1326 if (unlikely(var128
== NULL
)) {
1327 if(catchStack
.cursor
>= 0){
1328 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1330 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1331 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 210);
1335 RET_LABEL127
:(void)0;
1339 { /* Inline kernel$Object$== (var126,self) on <var126:ToolContext> */
1342 { /* Inline kernel$Object$is_same_instance (var126,var_other) on <var126:ToolContext> */
1343 var133
= var126
== var_other
;
1346 RET_LABEL132
:(void)0;
1351 RET_LABEL130
:(void)0;
1354 if (unlikely(!var129
)) {
1355 if(catchStack
.cursor
>= 0){
1356 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1358 PRINT_ERROR("Runtime error: %s", "Assert failed");
1359 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 133);
1363 nitc__phase___ToolContext___phase_process_npropdef(self
, var_phase69
, var_npropdef
); /* Direct call phase$ToolContext$phase_process_npropdef on <self:ToolContext>*/
1366 ((void(*)(val
* self
))((((long)var_122
&3)?class_info
[((long)var_122
&3)]:var_122
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_122
); /* next on <var_122:Iterator[APropdef]>*/
1369 BREAK_label124
: (void)0;
1371 ((void(*)(val
* self
))((((long)var_122
&3)?class_info
[((long)var_122
&3)]:var_122
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_122
); /* finish on <var_122:Iterator[APropdef]>*/
1376 ((void(*)(val
* self
))((((long)var_101
&3)?class_info
[((long)var_101
&3)]:var_101
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_101
); /* next on <var_101:Iterator[AClassdef]>*/
1379 BREAK_label103
: (void)0;
1381 ((void(*)(val
* self
))((((long)var_101
&3)?class_info
[((long)var_101
&3)]:var_101
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_101
); /* finish on <var_101:Iterator[AClassdef]>*/
1384 { /* Inline toolcontext$ToolContext$error_count (self) on <self:ToolContext> */
1385 var136
= self
->attrs
[COLOR_nitc__toolcontext__ToolContext___error_count
].l
; /* _error_count on <self:ToolContext> */
1387 RET_LABEL135
:(void)0;
1391 { /* Inline kernel$Int$!= (var_errcount,var134) on <var_errcount:Int> */
1392 var139
= var_errcount
== var134
;
1396 RET_LABEL138
:(void)0;
1401 var141
= nitc___nitc__ToolContext___check_errors(self
);
1406 { /* Inline phase$AnnotationPhaseVisitor$annotations (var_vannot) on <var_vannot:AnnotationPhaseVisitor> */
1407 var144
= var_vannot
->attrs
[COLOR_nitc__phase__AnnotationPhaseVisitor___annotations
].val
; /* _annotations on <var_vannot:AnnotationPhaseVisitor> */
1408 if (unlikely(var144
== NULL
)) {
1409 if(catchStack
.cursor
>= 0){
1410 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1412 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _annotations");
1413 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 197);
1417 RET_LABEL143
:(void)0;
1422 var146
= core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(var_145
);
1427 var148
= ((short int(*)(val
* self
))((((long)var_147
&3)?class_info
[((long)var_147
&3)]:var_147
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_147
); /* is_ok on <var_147:IndexedIterator[AAnnotation]>*/
1431 goto BREAK_label149
;
1434 var150
= ((val
*(*)(val
* self
))((((long)var_147
&3)?class_info
[((long)var_147
&3)]:var_147
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_147
); /* item on <var_147:IndexedIterator[AAnnotation]>*/
1438 { /* Inline parser_nodes$ANode$parent (var_na) on <var_na:AAnnotation> */
1439 var153
= var_na
->attrs
[COLOR_nitc__parser_nodes__ANode___parent
].val
; /* _parent on <var_na:AAnnotation> */
1441 RET_LABEL152
:(void)0;
1445 /* <var_p:nullable ANode> isa AAnnotations */
1446 cltype
= type_nitc__AAnnotations
.color
;
1447 idtype
= type_nitc__AAnnotations
.id
;
1451 if(cltype
>= var_p
->type
->table_size
) {
1454 var154
= var_p
->type
->type_table
[cltype
] == idtype
;
1459 { /* Inline parser_nodes$ANode$parent (var_p) on <var_p:nullable ANode(AAnnotations)> */
1460 var157
= var_p
->attrs
[COLOR_nitc__parser_nodes__ANode___parent
].val
; /* _parent on <var_p:nullable ANode(AAnnotations)> */
1462 RET_LABEL156
:(void)0;
1468 if (var_p
== NULL
) {
1469 var158
= 0; /* is null */
1471 var158
= 1; /* arg is null and recv is not */
1474 { /* Inline kernel$Object$!= (var_p,((val*)NULL)) on <var_p:nullable ANode> */
1475 var_other161
= ((val
*)NULL
);
1477 var162
= ((short int(*)(val
* self
, val
* p0
))(var_p
->class->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_p
, var_other161
); /* == on <var_p:nullable ANode(ANode)>*/
1482 RET_LABEL160
:(void)0;
1486 if (unlikely(!var158
)) {
1487 if(catchStack
.cursor
>= 0){
1488 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1490 PRINT_ERROR("Runtime error: %s", "Assert failed");
1491 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 143);
1495 ((void(*)(val
* self
, val
* p0
, val
* p1
))(var_phase69
->class->vft
[COLOR_nitc__phase__Phase__process_annotated_node
]))(var_phase69
, var_p
, var_na
); /* process_annotated_node on <var_phase69:Phase>*/
1498 ((void(*)(val
* self
))((((long)var_147
&3)?class_info
[((long)var_147
&3)]:var_147
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_147
); /* next on <var_147:IndexedIterator[AAnnotation]>*/
1501 BREAK_label149
: (void)0;
1503 ((void(*)(val
* self
))((((long)var_147
&3)?class_info
[((long)var_147
&3)]:var_147
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_147
); /* finish on <var_147:IndexedIterator[AAnnotation]>*/
1506 { /* Inline toolcontext$ToolContext$error_count (self) on <self:ToolContext> */
1507 var166
= self
->attrs
[COLOR_nitc__toolcontext__ToolContext___error_count
].l
; /* _error_count on <self:ToolContext> */
1509 RET_LABEL165
:(void)0;
1513 { /* Inline kernel$Int$!= (var_errcount,var164) on <var_errcount:Int> */
1514 var169
= var_errcount
== var164
;
1518 RET_LABEL168
:(void)0;
1523 var171
= nitc___nitc__ToolContext___check_errors(self
);
1528 { /* Inline phase$Phase$process_nmodule_after (var_phase69,var_nmodule) on <var_phase69:Phase> */
1529 var_nmodule173
= var_nmodule
;
1530 RET_LABEL172
:(void)0;
1533 BREAK_label73
: (void)0;
1535 ((void(*)(val
* self
))((((long)var_65
&3)?class_info
[((long)var_65
&3)]:var_65
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_65
); /* next on <var_65:IndexedIterator[Phase]>*/
1538 BREAK_label67
: (void)0;
1540 ((void(*)(val
* self
))((((long)var_65
&3)?class_info
[((long)var_65
&3)]:var_65
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_65
); /* finish on <var_65:IndexedIterator[Phase]>*/
1543 var174
= nitc___nitc__ToolContext___check_errors(self
);
1546 goto BREAK_label175
;
1548 BREAK_label37
: (void)0;
1550 BREAK_label175
: (void)0;
1553 { /* Inline time$Sys$get_time (var176) on <var176:Sys> */
1554 struct nitni_instance
* var_for_c_0
;
1555 var_for_c_0
= nit_alloc(sizeof(struct nitni_instance
));
1556 var_for_c_0
->value
= var176
;
1557 var179
= core__time___Sys_get_time___impl(var_for_c_0
);
1560 RET_LABEL178
:(void)0;
1564 if (unlikely(varonce180
==NULL
)) {
1565 var181
= NEW_core__NativeArray((int)3l, &type_core__NativeArray__core__String
);
1566 if (likely(varonce182
!=NULL
)) {
1567 var183
= varonce182
;
1569 var184
= "*** END SEMANTIC ANALYSIS: ";
1570 var186
= (val
*)(27l<<2|1);
1571 var187
= (val
*)(27l<<2|1);
1572 var188
= (val
*)((long)(0)<<2|3);
1573 var189
= (val
*)((long)(0)<<2|3);
1574 var185
= core__flat___CString___to_s_unsafe(var184
, var186
, var187
, var188
, var189
);
1576 varonce182
= var183
;
1578 ((struct instance_core__NativeArray
*)var181
)->values
[0]=var183
;
1579 if (likely(varonce190
!=NULL
)) {
1580 var191
= varonce190
;
1583 var194
= (val
*)(4l<<2|1);
1584 var195
= (val
*)(4l<<2|1);
1585 var196
= (val
*)((long)(0)<<2|3);
1586 var197
= (val
*)((long)(0)<<2|3);
1587 var193
= core__flat___CString___to_s_unsafe(var192
, var194
, var195
, var196
, var197
);
1589 varonce190
= var191
;
1591 ((struct instance_core__NativeArray
*)var181
)->values
[2]=var191
;
1593 var181
= varonce180
;
1597 { /* Inline kernel$Int$- (var_time1,var_time0) on <var_time1:Int> */
1598 /* Covariant cast for argument 0 (i) <var_time0:Int> isa OTHER */
1599 /* <var_time0:Int> isa OTHER */
1600 var200
= 1; /* easy <var_time0:Int> isa OTHER*/
1601 if (unlikely(!var200
)) {
1602 var_class_name
= type_core__Int
.name
;
1603 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1604 PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel
, 731);
1607 var203
= var_time1
- var_time0
;
1610 RET_LABEL199
:(void)0;
1613 var204
= core__flat___Int___core__abstract_text__Object__to_s(var198
);
1614 ((struct instance_core__NativeArray
*)var181
)->values
[1]=var204
;
1616 var205
= ((val
*(*)(val
* self
))(var181
->class->vft
[COLOR_core__abstract_text__NativeArray__native_to_s
]))(var181
); /* native_to_s on <var181:NativeArray[String]>*/
1618 varonce180
= var181
;
1620 nitc___nitc__ToolContext___info(self
, var205
, 2l); /* Direct call toolcontext$ToolContext$info on <self:ToolContext>*/
1623 var206
= nitc___nitc__ToolContext___check_errors(self
);
1627 /* method phase$ToolContext$phase_process_npropdef for (self: ToolContext, Phase, APropdef) */
1628 void nitc__phase___ToolContext___phase_process_npropdef(val
* self
, val
* p0
, val
* p1
) {
1629 val
* var_phase
/* var phase: Phase */;
1630 val
* var_npropdef
/* var npropdef: APropdef */;
1634 ((void(*)(val
* self
, val
* p0
))(var_phase
->class->vft
[COLOR_nitc__phase__Phase__process_npropdef
]))(var_phase
, var_npropdef
); /* process_npropdef on <var_phase:Phase>*/
1638 /* method phase$ToolContext$run_phases_on_npropdef for (self: ToolContext, APropdef) */
1639 void nitc__phase___ToolContext___run_phases_on_npropdef(val
* self
, val
* p0
) {
1640 val
* var_npropdef
/* var npropdef: APropdef */;
1641 short int var
/* : Bool */;
1642 short int var2
/* : Bool */;
1643 short int var3
/* : Bool */;
1644 short int var4
/* : Bool */;
1645 short int var6
/* : Bool */;
1646 val
* var8
/* : Sequence[Phase] */;
1647 val
* var_phases
/* var phases: Sequence[Phase] */;
1648 val
* var_
/* var : Sequence[Phase] */;
1649 val
* var9
/* : Iterator[nullable Object] */;
1650 val
* var_10
/* var : IndexedIterator[Phase] */;
1651 short int var11
/* : Bool */;
1652 val
* var12
/* : nullable Object */;
1653 val
* var_phase
/* var phase: Phase */;
1654 short int var13
/* : Bool */;
1655 short int var15
/* : Bool */;
1656 val
* var17
/* : ToolContext */;
1657 val
* var19
/* : ToolContext */;
1658 short int var20
/* : Bool */;
1659 val
* var_other
/* var other: nullable Object */;
1660 short int var22
/* : Bool */;
1661 short int var24
/* : Bool */;
1662 short int var25
/* : Bool */;
1665 { /* Inline phase$ToolContext$semantize_is_lazy (self) on <self:ToolContext> */
1666 var2
= self
->attrs
[COLOR_nitc__phase__ToolContext___semantize_is_lazy
].s
; /* _semantize_is_lazy on <self:ToolContext> */
1677 { /* Inline phase$APropdef$is_phased (var_npropdef) on <var_npropdef:APropdef> */
1678 var6
= var_npropdef
->attrs
[COLOR_nitc__phase__APropdef___is_phased
].s
; /* _is_phased on <var_npropdef:APropdef> */
1688 { /* Inline phase$APropdef$is_phased= (var_npropdef,1) on <var_npropdef:APropdef> */
1689 var_npropdef
->attrs
[COLOR_nitc__phase__APropdef___is_phased
].s
= 1; /* _is_phased on <var_npropdef:APropdef> */
1694 var8
= nitc__phase___ToolContext___phases_list(self
);
1699 var9
= ((val
*(*)(val
* self
))((((long)var_
&3)?class_info
[((long)var_
&3)]:var_
->class)->vft
[COLOR_core__abstract_collection__Collection__iterator
]))(var_
); /* iterator on <var_:Sequence[Phase]>*/
1704 var11
= ((short int(*)(val
* self
))((((long)var_10
&3)?class_info
[((long)var_10
&3)]:var_10
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_10
); /* is_ok on <var_10:IndexedIterator[Phase]>*/
1711 var12
= ((val
*(*)(val
* self
))((((long)var_10
&3)?class_info
[((long)var_10
&3)]:var_10
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_10
); /* item on <var_10:IndexedIterator[Phase]>*/
1715 { /* Inline phase$Phase$disabled (var_phase) on <var_phase:Phase> */
1716 var15
= var_phase
->attrs
[COLOR_nitc__phase__Phase___disabled
].s
; /* _disabled on <var_phase:Phase> */
1718 RET_LABEL14
:(void)0;
1726 { /* Inline phase$Phase$toolcontext (var_phase) on <var_phase:Phase> */
1727 var19
= var_phase
->attrs
[COLOR_nitc__phase__Phase___toolcontext
].val
; /* _toolcontext on <var_phase:Phase> */
1728 if (unlikely(var19
== NULL
)) {
1729 if(catchStack
.cursor
>= 0){
1730 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1732 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1733 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 210);
1737 RET_LABEL18
:(void)0;
1741 { /* Inline kernel$Object$== (var17,self) on <var17:ToolContext> */
1744 { /* Inline kernel$Object$is_same_instance (var17,var_other) on <var17:ToolContext> */
1745 var24
= var17
== var_other
;
1748 RET_LABEL23
:(void)0;
1753 RET_LABEL21
:(void)0;
1756 if (unlikely(!var20
)) {
1757 if(catchStack
.cursor
>= 0){
1758 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1760 PRINT_ERROR("Runtime error: %s", "Assert failed");
1761 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 180);
1765 nitc__phase___ToolContext___phase_process_npropdef(self
, var_phase
, var_npropdef
); /* Direct call phase$ToolContext$phase_process_npropdef on <self:ToolContext>*/
1768 var25
= nitc___nitc__ToolContext___check_errors(self
);
1770 BREAK_label16
: (void)0;
1772 ((void(*)(val
* self
))((((long)var_10
&3)?class_info
[((long)var_10
&3)]:var_10
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_10
); /* next on <var_10:IndexedIterator[Phase]>*/
1775 BREAK_label
: (void)0;
1777 ((void(*)(val
* self
))((((long)var_10
&3)?class_info
[((long)var_10
&3)]:var_10
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_10
); /* finish on <var_10:IndexedIterator[Phase]>*/
1781 /* method phase$APropdef$is_phased for (self: APropdef): Bool */
1782 short int nitc__phase___APropdef___is_phased(val
* self
) {
1783 short int var
/* : Bool */;
1784 short int var1
/* : Bool */;
1785 var1
= self
->attrs
[COLOR_nitc__phase__APropdef___is_phased
].s
; /* _is_phased on <self:APropdef> */
1790 /* method phase$APropdef$is_phased= for (self: APropdef, Bool) */
1791 void nitc__phase___APropdef___is_phased_61d(val
* self
, short int p0
) {
1792 self
->attrs
[COLOR_nitc__phase__APropdef___is_phased
].s
= p0
; /* _is_phased on <self:APropdef> */
1795 /* method phase$AnnotationPhaseVisitor$annotations for (self: AnnotationPhaseVisitor): Array[AAnnotation] */
1796 val
* nitc__phase___nitc__phase__AnnotationPhaseVisitor___annotations(val
* self
) {
1797 val
* var
/* : Array[AAnnotation] */;
1798 val
* var1
/* : Array[AAnnotation] */;
1799 var1
= self
->attrs
[COLOR_nitc__phase__AnnotationPhaseVisitor___annotations
].val
; /* _annotations on <self:AnnotationPhaseVisitor> */
1800 if (unlikely(var1
== NULL
)) {
1801 if(catchStack
.cursor
>= 0){
1802 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1804 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _annotations");
1805 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 197);
1812 /* method phase$AnnotationPhaseVisitor$visit for (self: AnnotationPhaseVisitor, ANode) */
1813 void nitc__phase___nitc__phase__AnnotationPhaseVisitor___nitc__parser_nodes__Visitor__visit(val
* self
, val
* p0
) {
1814 val
* var_n
/* var n: ANode */;
1815 short int var
/* : Bool */;
1818 val
* var1
/* : Array[AAnnotation] */;
1819 val
* var3
/* : Array[AAnnotation] */;
1822 ((void(*)(val
* self
, val
* p0
))(var_n
->class->vft
[COLOR_nitc__parser_nodes__ANode__visit_all
]))(var_n
, self
); /* visit_all on <var_n:ANode>*/
1824 /* <var_n:ANode> isa AAnnotation */
1825 cltype
= type_nitc__AAnnotation
.color
;
1826 idtype
= type_nitc__AAnnotation
.id
;
1827 if(cltype
>= var_n
->type
->table_size
) {
1830 var
= var_n
->type
->type_table
[cltype
] == idtype
;
1834 { /* Inline phase$AnnotationPhaseVisitor$annotations (self) on <self:AnnotationPhaseVisitor> */
1835 var3
= self
->attrs
[COLOR_nitc__phase__AnnotationPhaseVisitor___annotations
].val
; /* _annotations on <self:AnnotationPhaseVisitor> */
1836 if (unlikely(var3
== NULL
)) {
1837 if(catchStack
.cursor
>= 0){
1838 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1840 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _annotations");
1841 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 197);
1849 core___core__Array___core__abstract_collection__SimpleCollection__add(var1
, var_n
); /* Direct call array$Array$add on <var1:Array[AAnnotation]>*/
1855 /* method phase$Phase$toolcontext for (self: Phase): ToolContext */
1856 val
* nitc___nitc__Phase___toolcontext(val
* self
) {
1857 val
* var
/* : ToolContext */;
1858 val
* var1
/* : ToolContext */;
1859 var1
= self
->attrs
[COLOR_nitc__phase__Phase___toolcontext
].val
; /* _toolcontext on <self:Phase> */
1860 if (unlikely(var1
== NULL
)) {
1861 if(catchStack
.cursor
>= 0){
1862 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1864 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1865 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 210);
1872 /* method phase$Phase$toolcontext= for (self: Phase, ToolContext) */
1873 void nitc___nitc__Phase___toolcontext_61d(val
* self
, val
* p0
) {
1874 self
->attrs
[COLOR_nitc__phase__Phase___toolcontext
].val
= p0
; /* _toolcontext on <self:Phase> */
1877 /* method phase$Phase$in_hierarchy for (self: Phase): POSetElement[Phase] */
1878 val
* nitc___nitc__Phase___in_hierarchy(val
* self
) {
1879 val
* var
/* : POSetElement[Phase] */;
1880 val
* var1
/* : POSetElement[Phase] */;
1881 var1
= self
->attrs
[COLOR_nitc__phase__Phase___in_hierarchy
].val
; /* _in_hierarchy on <self:Phase> */
1882 if (unlikely(var1
== NULL
)) {
1883 if(catchStack
.cursor
>= 0){
1884 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1886 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _in_hierarchy");
1887 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 213);
1894 /* method phase$Phase$in_hierarchy= for (self: Phase, POSetElement[Phase]) */
1895 void nitc___nitc__Phase___in_hierarchy_61d(val
* self
, val
* p0
) {
1896 self
->attrs
[COLOR_nitc__phase__Phase___in_hierarchy
].val
= p0
; /* _in_hierarchy on <self:Phase> */
1899 /* method phase$Phase$depends for (self: Phase): nullable Collection[Phase] */
1900 val
* nitc___nitc__Phase___depends(val
* self
) {
1901 val
* var
/* : nullable Collection[Phase] */;
1902 val
* var1
/* : nullable Collection[Phase] */;
1903 var1
= self
->attrs
[COLOR_nitc__phase__Phase___depends
].val
; /* _depends on <self:Phase> */
1908 /* method phase$Phase$depends= for (self: Phase, nullable Collection[Phase]) */
1909 void nitc___nitc__Phase___depends_61d(val
* self
, val
* p0
) {
1910 self
->attrs
[COLOR_nitc__phase__Phase___depends
].val
= p0
; /* _depends on <self:Phase> */
1913 /* method phase$Phase$init for (self: Phase) */
1914 void nitc___nitc__Phase___core__kernel__Object__init(val
* self
) {
1915 val
* var
/* : ToolContext */;
1916 val
* var2
/* : ToolContext */;
1917 val
* var3
/* : POSet[Phase] */;
1918 val
* var5
/* : POSet[Phase] */;
1919 val
* var6
/* : POSetElement[nullable Object] */;
1920 val
* var8
/* : nullable Collection[Phase] */;
1921 val
* var10
/* : nullable Collection[Phase] */;
1922 val
* var_depends
/* var depends: nullable Collection[Phase] */;
1923 short int var11
/* : Bool */;
1924 short int var12
/* : Bool */;
1925 val
* var_other
/* var other: nullable Object */;
1926 short int var14
/* : Bool */;
1927 short int var15
/* : Bool */;
1928 val
* var_
/* var : Collection[Phase] */;
1929 val
* var16
/* : Iterator[nullable Object] */;
1930 val
* var_17
/* var : Iterator[Phase] */;
1931 short int var18
/* : Bool */;
1932 val
* var19
/* : nullable Object */;
1933 val
* var_d
/* var d: Phase */;
1934 val
* var20
/* : ToolContext */;
1935 val
* var22
/* : ToolContext */;
1936 val
* var23
/* : POSet[Phase] */;
1937 val
* var25
/* : POSet[Phase] */;
1939 ((void(*)(val
* self
))(self
->class->vft
[COLOR_nitc___nitc__Phase___core__kernel__Object__init
]))(self
); /* init on <self:Phase>*/
1942 { /* Inline phase$Phase$toolcontext (self) on <self:Phase> */
1943 var2
= self
->attrs
[COLOR_nitc__phase__Phase___toolcontext
].val
; /* _toolcontext on <self:Phase> */
1944 if (unlikely(var2
== NULL
)) {
1945 if(catchStack
.cursor
>= 0){
1946 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1948 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
1949 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 210);
1957 { /* Inline phase$ToolContext$phases (var) on <var:ToolContext> */
1958 var5
= var
->attrs
[COLOR_nitc__phase__ToolContext___phases
].val
; /* _phases on <var:ToolContext> */
1959 if (unlikely(var5
== NULL
)) {
1960 if(catchStack
.cursor
>= 0){
1961 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
1963 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _phases");
1964 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 23);
1972 var6
= poset___poset__POSet___add_node(var3
, self
);
1975 { /* Inline phase$Phase$in_hierarchy= (self,var6) on <self:Phase> */
1976 self
->attrs
[COLOR_nitc__phase__Phase___in_hierarchy
].val
= var6
; /* _in_hierarchy on <self:Phase> */
1981 { /* Inline phase$Phase$depends (self) on <self:Phase> */
1982 var10
= self
->attrs
[COLOR_nitc__phase__Phase___depends
].val
; /* _depends on <self:Phase> */
1988 if (var_depends
== NULL
) {
1989 var11
= 0; /* is null */
1991 var11
= 1; /* arg is null and recv is not */
1994 { /* Inline kernel$Object$!= (var_depends,((val*)NULL)) on <var_depends:nullable Collection[Phase]> */
1995 var_other
= ((val
*)NULL
);
1997 var14
= ((short int(*)(val
* self
, val
* p0
))((((long)var_depends
&3)?class_info
[((long)var_depends
&3)]:var_depends
->class)->vft
[COLOR_core__kernel__Object___61d_61d
]))(var_depends
, var_other
); /* == on <var_depends:nullable Collection[Phase](Collection[Phase])>*/
2002 RET_LABEL13
:(void)0;
2009 var16
= ((val
*(*)(val
* self
))((((long)var_
&3)?class_info
[((long)var_
&3)]:var_
->class)->vft
[COLOR_core__abstract_collection__Collection__iterator
]))(var_
); /* iterator on <var_:Collection[Phase]>*/
2014 var18
= ((short int(*)(val
* self
))((((long)var_17
&3)?class_info
[((long)var_17
&3)]:var_17
->class)->vft
[COLOR_core__abstract_collection__Iterator__is_ok
]))(var_17
); /* is_ok on <var_17:Iterator[Phase]>*/
2021 var19
= ((val
*(*)(val
* self
))((((long)var_17
&3)?class_info
[((long)var_17
&3)]:var_17
->class)->vft
[COLOR_core__abstract_collection__Iterator__item
]))(var_17
); /* item on <var_17:Iterator[Phase]>*/
2025 { /* Inline phase$Phase$toolcontext (self) on <self:Phase> */
2026 var22
= self
->attrs
[COLOR_nitc__phase__Phase___toolcontext
].val
; /* _toolcontext on <self:Phase> */
2027 if (unlikely(var22
== NULL
)) {
2028 if(catchStack
.cursor
>= 0){
2029 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2031 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _toolcontext");
2032 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 210);
2036 RET_LABEL21
:(void)0;
2040 { /* Inline phase$ToolContext$phases (var20) on <var20:ToolContext> */
2041 var25
= var20
->attrs
[COLOR_nitc__phase__ToolContext___phases
].val
; /* _phases on <var20:ToolContext> */
2042 if (unlikely(var25
== NULL
)) {
2043 if(catchStack
.cursor
>= 0){
2044 longjmp(catchStack
.envs
[catchStack
.cursor
], 1);
2046 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _phases");
2047 PRINT_ERROR(" (%s:%d)\n", FILE_nitc__phase
, 23);
2051 RET_LABEL24
:(void)0;
2055 poset___poset__POSet___add_edge(var23
, self
, var_d
); /* Direct call poset$POSet$add_edge on <var23:POSet[Phase]>*/
2058 ((void(*)(val
* self
))((((long)var_17
&3)?class_info
[((long)var_17
&3)]:var_17
->class)->vft
[COLOR_core__abstract_collection__Iterator__next
]))(var_17
); /* next on <var_17:Iterator[Phase]>*/
2061 BREAK_label
: (void)0;
2063 ((void(*)(val
* self
))((((long)var_17
&3)?class_info
[((long)var_17
&3)]:var_17
->class)->vft
[COLOR_core__abstract_collection__Iterator__finish
]))(var_17
); /* finish on <var_17:Iterator[Phase]>*/
2069 /* method phase$Phase$to_s for (self: Phase): String */
2070 val
* nitc___nitc__Phase___core__abstract_text__Object__to_s(val
* self
) {
2071 val
* var
/* : String */;
2072 val
* var1
/* : String */;
2073 static val
* varonce
;
2074 val
* var2
/* : String */;
2075 char* var3
/* : CString */;
2076 val
* var4
/* : String */;
2077 val
* var5
/* : nullable Int */;
2078 val
* var6
/* : nullable Int */;
2079 val
* var7
/* : nullable Bool */;
2080 val
* var8
/* : nullable Bool */;
2081 val
* var9
/* : String */;
2082 val
* var10
/* : String */;
2084 var1
= core__abstract_text___Object___class_name(self
);
2086 if (likely(varonce
!=NULL
)) {
2090 var5
= (val
*)(5l<<2|1);
2091 var6
= (val
*)(5l<<2|1);
2092 var7
= (val
*)((long)(0)<<2|3);
2093 var8
= (val
*)((long)(0)<<2|3);
2094 var4
= core__flat___CString___to_s_unsafe(var3
, var5
, var6
, var7
, var8
);
2099 var9
= core__file___String___strip_extension(var1
, var2
);
2102 var10
= core___core__String___Text__to_snake_case(var9
);
2109 /* method phase$Phase$disabled for (self: Phase): Bool */
2110 short int nitc___nitc__Phase___disabled(val
* self
) {
2111 short int var
/* : Bool */;
2112 short int var1
/* : Bool */;
2113 var1
= self
->attrs
[COLOR_nitc__phase__Phase___disabled
].s
; /* _disabled on <self:Phase> */
2118 /* method phase$Phase$disabled= for (self: Phase, Bool) */
2119 void nitc___nitc__Phase___disabled_61d(val
* self
, short int p0
) {
2120 self
->attrs
[COLOR_nitc__phase__Phase___disabled
].s
= p0
; /* _disabled on <self:Phase> */
2123 /* method phase$Phase$process_nmodule for (self: Phase, AModule) */
2124 void nitc___nitc__Phase___process_nmodule(val
* self
, val
* p0
) {
2125 val
* var_nmodule
/* var nmodule: AModule */;
2129 /* method phase$Phase$process_nclassdef for (self: Phase, AClassdef) */
2130 void nitc___nitc__Phase___process_nclassdef(val
* self
, val
* p0
) {
2131 val
* var_nclassdef
/* var nclassdef: AClassdef */;
2135 /* method phase$Phase$process_npropdef for (self: Phase, APropdef) */
2136 void nitc___nitc__Phase___process_npropdef(val
* self
, val
* p0
) {
2137 val
* var_npropdef
/* var npropdef: APropdef */;
2141 /* method phase$Phase$process_annotated_node for (self: Phase, ANode, AAnnotation) */
2142 void nitc___nitc__Phase___process_annotated_node(val
* self
, val
* p0
, val
* p1
) {
2143 val
* var_node
/* var node: ANode */;
2144 val
* var_nat
/* var nat: AAnnotation */;
2149 /* method phase$Phase$process_nmodule_after for (self: Phase, AModule) */
2150 void nitc___nitc__Phase___process_nmodule_after(val
* self
, val
* p0
) {
2151 val
* var_nmodule
/* var nmodule: AModule */;