6980ed76cbf47345fda501298d27220cbca10685
[nit.git] / c_src / syntax._sep.c
1 /* This C file is generated by NIT to compile module syntax. */
2 #include "syntax._sep.h"
3 val_t syntax___SrcModuleLoader___file_type(val_t p0){
4 struct {struct stack_frame_t me;} fra;
5 val_t REGB0;
6 val_t tmp;
7 static val_t once_value_1; /* Once value */
8 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
9 fra.me.file = LOCATE_syntax;
10 fra.me.line = 31;
11 fra.me.meth = LOCATE_syntax___SrcModuleLoader___file_type;
12 fra.me.has_broke = 0;
13 fra.me.REG_size = 1;
14 fra.me.nitni_local_ref_head = NULL;
15 fra.me.REG[0] = NIT_NULL;
16 fra.me.REG[0] = p0;
17 /* ./syntax//syntax.nit:31 */
18 if (!once_value_1) {
19 fra.me.REG[0] = BOX_NativeString("nit");
20 REGB0 = TAG_Int(3);
21 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
22 once_value_1 = fra.me.REG[0];
23 register_static_object(&once_value_1);
24 } else fra.me.REG[0] = once_value_1;
25 fra.me.REG[0] = fra.me.REG[0];
26 goto label2;
27 label2: while(0);
28 stack_frame_head = fra.me.prev;
29 return fra.me.REG[0];
30 }
31 val_t syntax___SrcModuleLoader___parse_file(val_t p0, val_t p1, val_t p2, val_t p3, val_t p4, val_t p5){
32 struct {struct stack_frame_t me; val_t MORE_REG[7];} fra;
33 val_t REGB0;
34 val_t REGB1;
35 val_t REGB2;
36 val_t tmp;
37 static val_t once_value_4; /* Once value */
38 static val_t once_value_5; /* Once value */
39 static val_t once_value_6; /* Once value */
40 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
41 fra.me.file = LOCATE_syntax;
42 fra.me.line = 33;
43 fra.me.meth = LOCATE_syntax___SrcModuleLoader___parse_file;
44 fra.me.has_broke = 0;
45 fra.me.REG_size = 8;
46 fra.me.nitni_local_ref_head = NULL;
47 fra.me.REG[0] = NIT_NULL;
48 fra.me.REG[1] = NIT_NULL;
49 fra.me.REG[2] = NIT_NULL;
50 fra.me.REG[3] = NIT_NULL;
51 fra.me.REG[4] = NIT_NULL;
52 fra.me.REG[5] = NIT_NULL;
53 fra.me.REG[6] = NIT_NULL;
54 fra.me.REG[7] = NIT_NULL;
55 fra.me.REG[0] = p0;
56 fra.me.REG[1] = p1;
57 fra.me.REG[2] = p2;
58 fra.me.REG[3] = p3;
59 fra.me.REG[4] = p4;
60 fra.me.REG[5] = p5;
61 /* ./syntax//syntax.nit:35 */
62 fra.me.REG[6] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
63 /* ./../lib/standard//collection//array.nit:24 */
64 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[6])!=NIT_NULL);
65 if (UNTAG_Bool(REGB0)) {
66 } else {
67 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
68 }
69 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[6]);
70 /* ./syntax//syntax.nit:35 */
71 REGB1 = TAG_Int(0);
72 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
73 if (UNTAG_Bool(REGB2)) {
74 } else {
75 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
76 }
77 /* ./../lib/standard//kernel.nit:234 */
78 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
79 /* ./syntax//syntax.nit:35 */
80 if (UNTAG_Bool(REGB1)) {
81 fra.me.REG[6] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
82 REGB1 = TAG_Int(0);
83 REGB1 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[6])(fra.me.REG[6], REGB1);
84 REGB1 = CALL_standard___kernel___Char___is_lower(REGB1)(REGB1);
85 } else {
86 REGB0 = TAG_Bool(false);
87 REGB1 = REGB0;
88 }
89 fra.me.REG[6] = REGB1;
90 /* ./syntax//syntax.nit:36 */
91 fra.me.REG[7] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
92 CALL_standard___collection___abstract_collection___Collection___iterate(fra.me.REG[7])(fra.me.REG[7], (&(fra.me)), ((fun_t)OC_syntax___SrcModuleLoader___parse_file_1));
93 switch ((&(fra.me))->has_broke) {
94 case 0: break;
95 case 1: (&(fra.me))->has_broke = 0; goto label3;
96 }
97 label3: while(0);
98 /* ./syntax//syntax.nit:41 */
99 REGB1 = TAG_Bool(!UNTAG_Bool(fra.me.REG[6]));
100 if (UNTAG_Bool(REGB1)) {
101 /* ./syntax//syntax.nit:42 */
102 REGB1 = TAG_Int(5);
103 fra.me.REG[6] = NEW_Array_standard___collection___array___Array___with_capacity(REGB1);
104 if (!once_value_4) {
105 fra.me.REG[7] = BOX_NativeString("");
106 REGB1 = TAG_Int(0);
107 fra.me.REG[7] = NEW_String_standard___string___String___with_native(fra.me.REG[7], REGB1);
108 once_value_4 = fra.me.REG[7];
109 register_static_object(&once_value_4);
110 } else fra.me.REG[7] = once_value_4;
111 fra.me.REG[7] = fra.me.REG[7];
112 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
113 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[3]);
114 if (!once_value_5) {
115 fra.me.REG[7] = BOX_NativeString(": Error module name \"");
116 REGB1 = TAG_Int(21);
117 fra.me.REG[7] = NEW_String_standard___string___String___with_native(fra.me.REG[7], REGB1);
118 once_value_5 = fra.me.REG[7];
119 register_static_object(&once_value_5);
120 } else fra.me.REG[7] = once_value_5;
121 fra.me.REG[7] = fra.me.REG[7];
122 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
123 fra.me.REG[7] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
124 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
125 if (!once_value_6) {
126 fra.me.REG[7] = BOX_NativeString("\", must start with a lower case letter and contain only letters, digits and '_'.");
127 REGB1 = TAG_Int(80);
128 fra.me.REG[7] = NEW_String_standard___string___String___with_native(fra.me.REG[7], REGB1);
129 once_value_6 = fra.me.REG[7];
130 register_static_object(&once_value_6);
131 } else fra.me.REG[7] = once_value_6;
132 fra.me.REG[7] = fra.me.REG[7];
133 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
134 fra.me.REG[6] = CALL_standard___string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
135 CALL_mmloader___ToolContext___error(fra.me.REG[1])(fra.me.REG[1], NIT_NULL, fra.me.REG[6]);
136 }
137 /* ./syntax//syntax.nit:45 */
138 fra.me.REG[2] = NEW_SourceFile_location___SourceFile___init(fra.me.REG[3], fra.me.REG[2]);
139 /* ./syntax//syntax.nit:46 */
140 fra.me.REG[3] = NEW_Lexer_parser___lexer___Lexer___init(fra.me.REG[2]);
141 /* ./syntax//syntax.nit:47 */
142 fra.me.REG[3] = NEW_Parser_parser___Parser___init(fra.me.REG[3]);
143 /* ./syntax//syntax.nit:48 */
144 fra.me.REG[3] = CALL_parser___Parser___parse(fra.me.REG[3])(fra.me.REG[3]);
145 /* ./syntax//syntax.nit:49 */
146 fra.me.REG[6] = CALL_parser___parser_nodes___Start___n_base(fra.me.REG[3])(fra.me.REG[3]);
147 REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
148 if (UNTAG_Bool(REGB1)) {
149 } else {
150 REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
151 if (UNTAG_Bool(REGB0)) {
152 REGB0 = TAG_Bool(false);
153 REGB1 = REGB0;
154 } else {
155 REGB0 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], NIT_NULL);
156 REGB1 = REGB0;
157 }
158 }
159 if (UNTAG_Bool(REGB1)) {
160 /* ./syntax//syntax.nit:50 */
161 fra.me.REG[6] = CALL_parser___parser_nodes___Start___n_eof(fra.me.REG[3])(fra.me.REG[3]);
162 /* ./syntax//syntax.nit:51 */
163 REGB1 = TAG_Bool(VAL_ISA(fra.me.REG[6], COLOR_parser___parser_nodes___AError, ID_parser___parser_nodes___AError)) /*cast AError*/;
164 if (UNTAG_Bool(REGB1)) {
165 } else {
166 nit_abort("Assert failed", NULL, LOCATE_syntax, 51);
167 }
168 /* ./syntax//syntax.nit:52 */
169 fra.me.REG[0] = CALL_parser___parser_nodes___ANode___location(fra.me.REG[6])(fra.me.REG[6]);
170 fra.me.REG[6] = CALL_parser___lexer___AError___message(fra.me.REG[6])(fra.me.REG[6]);
171 CALL_mmloader___ToolContext___fatal_error(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], fra.me.REG[6]);
172 }
173 /* ./syntax//syntax.nit:54 */
174 fra.me.REG[3] = CALL_parser___parser_nodes___Start___n_base(fra.me.REG[3])(fra.me.REG[3]);
175 /* ./syntax//syntax.nit:55 */
176 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
177 if (UNTAG_Bool(REGB1)) {
178 } else {
179 REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
180 if (UNTAG_Bool(REGB0)) {
181 REGB0 = TAG_Bool(false);
182 REGB1 = REGB0;
183 } else {
184 REGB0 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], NIT_NULL);
185 REGB1 = REGB0;
186 }
187 }
188 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
189 if (UNTAG_Bool(REGB1)) {
190 } else {
191 nit_abort("Assert failed", NULL, LOCATE_syntax, 55);
192 }
193 /* ./syntax//syntax.nit:56 */
194 fra.me.REG[2] = NEW_Location_location___Location___with_file(fra.me.REG[2]);
195 /* ./syntax//syntax.nit:57 */
196 fra.me.REG[2] = NEW_MMSrcModule_syntax___syntax_base___MMSrcModule___init(fra.me.REG[1], fra.me.REG[3], fra.me.REG[5], fra.me.REG[4], fra.me.REG[2]);
197 /* ./syntax//syntax.nit:58 */
198 goto label7;
199 label7: while(0);
200 stack_frame_head = fra.me.prev;
201 return fra.me.REG[2];
202 }
203 void OC_syntax___SrcModuleLoader___parse_file_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
204 struct {struct stack_frame_t me;} fra;
205 val_t REGB0;
206 val_t REGB1;
207 val_t REGB2;
208 fun_t CREG[1];
209 val_t tmp;
210 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
211 fra.me.file = LOCATE_syntax;
212 fra.me.line = 0;
213 fra.me.meth = LOCATE_syntax___SrcModuleLoader___parse_file;
214 fra.me.has_broke = 0;
215 fra.me.REG_size = 1;
216 fra.me.nitni_local_ref_head = NULL;
217 fra.me.REG[0] = NIT_NULL;
218 fra.me.closure_ctx = closctx_param;
219 fra.me.closure_funs = CREG;
220 fra.me.REG[0] = p0;
221 CREG[0] = clos_fun0;
222 REGB0 = fra.me.REG[0];
223 REGB1 = CALL_standard___kernel___Char___is_digit(REGB0)(REGB0);
224 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
225 if (UNTAG_Bool(REGB1)) {
226 REGB1 = CALL_standard___kernel___Char___is_letter(REGB0)(REGB0);
227 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
228 } else {
229 REGB2 = TAG_Bool(false);
230 REGB1 = REGB2;
231 }
232 if (UNTAG_Bool(REGB1)) {
233 REGB1 = TAG_Char('_');
234 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
235 if (UNTAG_Bool(REGB2)) {
236 } else {
237 /* ./../lib/standard//kernel.nit:378 */
238 REGB1 = TAG_Bool((REGB0)==(REGB1));
239 /* ./syntax//syntax.nit:36 */
240 REGB2 = REGB1;
241 }
242 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
243 } else {
244 REGB1 = TAG_Bool(false);
245 REGB2 = REGB1;
246 }
247 if (UNTAG_Bool(REGB2)) {
248 /* ./syntax//syntax.nit:38 */
249 REGB2 = TAG_Bool(false);
250 closctx->REG[6] = REGB2;
251 /* ./syntax//syntax.nit:39 */
252 closctx->has_broke = 1;
253 goto label2;
254 }
255 label2: while(0);
256 stack_frame_head = fra.me.prev;
257 return;
258 }
259 void syntax___SrcModuleLoader___process_metamodel(val_t p0, val_t p1, val_t p2){
260 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
261 val_t REGB0;
262 val_t tmp;
263 static val_t once_value_1; /* Once value */
264 static val_t once_value_2; /* Once value */
265 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
266 fra.me.file = LOCATE_syntax;
267 fra.me.line = 61;
268 fra.me.meth = LOCATE_syntax___SrcModuleLoader___process_metamodel;
269 fra.me.has_broke = 0;
270 fra.me.REG_size = 4;
271 fra.me.nitni_local_ref_head = NULL;
272 fra.me.REG[0] = NIT_NULL;
273 fra.me.REG[1] = NIT_NULL;
274 fra.me.REG[2] = NIT_NULL;
275 fra.me.REG[3] = NIT_NULL;
276 fra.me.REG[0] = p0;
277 fra.me.REG[1] = p1;
278 fra.me.REG[2] = p2;
279 REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[2], VTCOLOR_mmloader___ModuleLoader___MODULE(fra.me.REG[0]), VTID_mmloader___ModuleLoader___MODULE(fra.me.REG[0]))) /*cast MODULE*/;
280 if (UNTAG_Bool(REGB0)) {
281 } else {
282 nit_abort("Cast failed", NULL, LOCATE_syntax, 0);
283 }
284 /* ./syntax//syntax.nit:63 */
285 CALL_syntax___MMSrcModule___process_supermodules(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
286 /* ./syntax//syntax.nit:64 */
287 REGB0 = TAG_Int(3);
288 fra.me.REG[0] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
289 if (!once_value_1) {
290 fra.me.REG[3] = BOX_NativeString("Syntax analysis for module: ");
291 REGB0 = TAG_Int(28);
292 fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
293 once_value_1 = fra.me.REG[3];
294 register_static_object(&once_value_1);
295 } else fra.me.REG[3] = once_value_1;
296 fra.me.REG[3] = fra.me.REG[3];
297 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
298 fra.me.REG[3] = CALL_metamodel___abstractmetamodel___MMModule___name(fra.me.REG[2])(fra.me.REG[2]);
299 fra.me.REG[3] = CALL_standard___string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
300 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
301 if (!once_value_2) {
302 fra.me.REG[3] = BOX_NativeString("");
303 REGB0 = TAG_Int(0);
304 fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
305 once_value_2 = fra.me.REG[3];
306 register_static_object(&once_value_2);
307 } else fra.me.REG[3] = once_value_2;
308 fra.me.REG[3] = fra.me.REG[3];
309 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
310 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
311 REGB0 = TAG_Int(2);
312 CALL_mmloader___ToolContext___info(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], REGB0);
313 /* ./syntax//syntax.nit:65 */
314 CALL_syntax___MMSrcModule___process_syntax(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
315 stack_frame_head = fra.me.prev;
316 return;
317 }
318 void syntax___SrcModuleLoader___init(val_t p0, int* init_table){
319 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_syntax___SrcModuleLoader].i;
320 struct {struct stack_frame_t me;} fra;
321 val_t tmp;
322 if (init_table[itpos0]) return;
323 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
324 fra.me.file = LOCATE_syntax;
325 fra.me.line = 68;
326 fra.me.meth = LOCATE_syntax___SrcModuleLoader___init;
327 fra.me.has_broke = 0;
328 fra.me.REG_size = 1;
329 fra.me.nitni_local_ref_head = NULL;
330 fra.me.REG[0] = NIT_NULL;
331 fra.me.REG[0] = p0;
332 /* ./syntax//syntax.nit:68 */
333 CALL_mmloader___ModuleLoader___init(fra.me.REG[0])(fra.me.REG[0], init_table);
334 stack_frame_head = fra.me.prev;
335 init_table[itpos0] = 1;
336 return;
337 }
338 void syntax___MMSrcModule___process_supermodules(val_t p0, val_t p1){
339 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
340 val_t tmp;
341 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
342 fra.me.file = LOCATE_syntax;
343 fra.me.line = 72;
344 fra.me.meth = LOCATE_syntax___MMSrcModule___process_supermodules;
345 fra.me.has_broke = 0;
346 fra.me.REG_size = 3;
347 fra.me.nitni_local_ref_head = NULL;
348 fra.me.REG[0] = NIT_NULL;
349 fra.me.REG[1] = NIT_NULL;
350 fra.me.REG[2] = NIT_NULL;
351 fra.me.REG[0] = p0;
352 fra.me.REG[1] = p1;
353 /* ./syntax//syntax.nit:75 */
354 fra.me.REG[2] = CALL_syntax___syntax_base___MMSrcModule___node(fra.me.REG[0])(fra.me.REG[0]);
355 CALL_syntax___mmbuilder___AModule___import_super_modules(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1], fra.me.REG[0]);
356 stack_frame_head = fra.me.prev;
357 return;
358 }
359 void syntax___MMSrcModule___process_syntax(val_t p0, val_t p1){
360 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
361 val_t REGB0;
362 val_t tmp;
363 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
364 fra.me.file = LOCATE_syntax;
365 fra.me.line = 78;
366 fra.me.meth = LOCATE_syntax___MMSrcModule___process_syntax;
367 fra.me.has_broke = 0;
368 fra.me.REG_size = 2;
369 fra.me.nitni_local_ref_head = NULL;
370 fra.me.REG[0] = NIT_NULL;
371 fra.me.REG[1] = NIT_NULL;
372 fra.me.REG[0] = p0;
373 fra.me.REG[1] = p1;
374 /* ./syntax//syntax.nit:82 */
375 CALL_syntax___mmbuilder___MMSrcModule___do_mmbuilder(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
376 /* ./syntax//syntax.nit:83 */
377 CALL_mmloader___ToolContext___check_errors(fra.me.REG[1])(fra.me.REG[1]);
378 /* ./syntax//syntax.nit:85 */
379 CALL_syntax___typing___MMSrcModule___do_typing(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
380 /* ./syntax//syntax.nit:86 */
381 CALL_mmloader___ToolContext___check_errors(fra.me.REG[1])(fra.me.REG[1]);
382 /* ./syntax//syntax.nit:88 */
383 CALL_syntax___icode_generation___MMSrcModule___generate_icode(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
384 /* ./syntax//syntax.nit:89 */
385 CALL_mmloader___ToolContext___check_errors(fra.me.REG[1])(fra.me.REG[1]);
386 /* ./syntax//syntax.nit:91 */
387 REGB0 = CALL_syntax___ToolContext___keep_ast(fra.me.REG[1])(fra.me.REG[1]);
388 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
389 if (UNTAG_Bool(REGB0)) {
390 CALL_syntax___syntax_base___MMSrcModule___clear_ast(fra.me.REG[0])(fra.me.REG[0]);
391 }
392 stack_frame_head = fra.me.prev;
393 return;
394 }
395 val_t syntax___ToolContext___keep_ast(val_t p0){
396 struct {struct stack_frame_t me;} fra;
397 val_t REGB0;
398 val_t tmp;
399 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
400 fra.me.file = LOCATE_syntax;
401 fra.me.line = 96;
402 fra.me.meth = LOCATE_syntax___ToolContext___keep_ast;
403 fra.me.has_broke = 0;
404 fra.me.REG_size = 1;
405 fra.me.nitni_local_ref_head = NULL;
406 fra.me.REG[0] = NIT_NULL;
407 fra.me.REG[0] = p0;
408 /* ./syntax//syntax.nit:96 */
409 REGB0 = TAG_Bool(ATTR_syntax___ToolContext____keep_ast(fra.me.REG[0])!=NIT_NULL);
410 if (UNTAG_Bool(REGB0)) {
411 } else {
412 nit_abort("Uninitialized attribute %s", "_keep_ast", LOCATE_syntax, 96);
413 }
414 REGB0 = ATTR_syntax___ToolContext____keep_ast(fra.me.REG[0]);
415 stack_frame_head = fra.me.prev;
416 return REGB0;
417 }
418 void syntax___ToolContext___keep_ast__eq(val_t p0, val_t p1){
419 struct {struct stack_frame_t me;} fra;
420 val_t REGB0;
421 val_t tmp;
422 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
423 fra.me.file = LOCATE_syntax;
424 fra.me.line = 96;
425 fra.me.meth = LOCATE_syntax___ToolContext___keep_ast__eq;
426 fra.me.has_broke = 0;
427 fra.me.REG_size = 1;
428 fra.me.nitni_local_ref_head = NULL;
429 fra.me.REG[0] = NIT_NULL;
430 fra.me.REG[0] = p0;
431 REGB0 = p1;
432 /* ./syntax//syntax.nit:96 */
433 ATTR_syntax___ToolContext____keep_ast(fra.me.REG[0]) = REGB0;
434 stack_frame_head = fra.me.prev;
435 return;
436 }