c_src: update
[nit.git] / c_src / inheritance._sep.c
1 /* This C file is generated by NIT to compile module inheritance. */
2 #include "inheritance._sep.h"
3 val_t inheritance___MMModule___type_any(val_t p0){
4 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
5 val_t REGB0;
6 val_t tmp;
7 static val_t once_value_1; /* Once value */
8 static val_t once_value_2; /* Once value */
9 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
10 fra.me.file = LOCATE_inheritance;
11 fra.me.line = 24;
12 fra.me.meth = LOCATE_inheritance___MMModule___type_any;
13 fra.me.has_broke = 0;
14 fra.me.REG_size = 2;
15 fra.me.REG[0] = NIT_NULL;
16 fra.me.REG[1] = NIT_NULL;
17 fra.me.REG[0] = p0;
18 /* ./metamodel//inheritance.nit:27 */
19 if (!once_value_1) {
20 if (!once_value_2) {
21 fra.me.REG[1] = BOX_NativeString("Object");
22 REGB0 = TAG_Int(6);
23 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
24 once_value_2 = fra.me.REG[1];
25 register_static_object(&once_value_2);
26 } else fra.me.REG[1] = once_value_2;
27 fra.me.REG[1] = CALL_symbol___String___to_symbol(fra.me.REG[1])(fra.me.REG[1]);
28 once_value_1 = fra.me.REG[1];
29 register_static_object(&once_value_1);
30 } else fra.me.REG[1] = once_value_1;
31 fra.me.REG[1] = CALL_abstractmetamodel___MMModule___class_by_name(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
32 fra.me.REG[1] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
33 /* ./metamodel//inheritance.nit:28 */
34 goto label3;
35 label3: while(0);
36 stack_frame_head = fra.me.prev;
37 return fra.me.REG[1];
38 }
39 void inheritance___MMModule___import_global_classes(val_t p0){
40 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
41 val_t REGB0;
42 val_t REGB1;
43 val_t tmp;
44 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
45 fra.me.file = LOCATE_inheritance;
46 fra.me.line = 31;
47 fra.me.meth = LOCATE_inheritance___MMModule___import_global_classes;
48 fra.me.has_broke = 0;
49 fra.me.REG_size = 6;
50 fra.me.REG[0] = NIT_NULL;
51 fra.me.REG[1] = NIT_NULL;
52 fra.me.REG[2] = NIT_NULL;
53 fra.me.REG[3] = NIT_NULL;
54 fra.me.REG[4] = NIT_NULL;
55 fra.me.REG[5] = NIT_NULL;
56 fra.me.REG[0] = p0;
57 fra.me.REG[1] = NEW_HashMap_hash_collection___HashMap___init();
58 fra.me.REG[1] = CALL_abstractmetamodel___MMModule___mhe(fra.me.REG[0])(fra.me.REG[0]);
59 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
60 /* ./metamodel//inheritance.nit:35 */
61 if (UNTAG_Bool(REGB0)) {
62 } else {
63 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
64 if (UNTAG_Bool(REGB1)) {
65 REGB1 = TAG_Bool(false);
66 REGB0 = REGB1;
67 } else {
68 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
69 REGB0 = REGB1;
70 }
71 }
72 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
73 if (UNTAG_Bool(REGB0)) {
74 } else {
75 fprintf(stderr, "Assert failed");
76 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 35);
77 nit_exit(1);
78 }
79 fra.me.REG[1] = CALL_abstractmetamodel___MMModule___mhe(fra.me.REG[0])(fra.me.REG[0]);
80 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
81 /* ./metamodel//inheritance.nit:36 */
82 if (UNTAG_Bool(REGB0)) {
83 fprintf(stderr, "Reciever is null");
84 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 36);
85 nit_exit(1);
86 }
87 fra.me.REG[1] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[1])(fra.me.REG[1]);
88 fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
89 while(1) {
90 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
91 if (UNTAG_Bool(REGB0)) {
92 fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
93 fra.me.REG[2] = CALL_abstractmetamodel___MMModule___global_classes(fra.me.REG[2])(fra.me.REG[2]);
94 fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(fra.me.REG[2])(fra.me.REG[2]);
95 /* ./metamodel//inheritance.nit:37 */
96 while(1) {
97 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
98 if (UNTAG_Bool(REGB0)) {
99 fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
100 fra.me.REG[4] = CALL_abstractmetamodel___MMModule___global_classes(fra.me.REG[0])(fra.me.REG[0]);
101 REGB0 = CALL_abstract_collection___Collection___has(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
102 /* ./metamodel//inheritance.nit:38 */
103 if (UNTAG_Bool(REGB0)) {
104 goto label1;
105 }
106 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMModule____global_classes(fra.me.REG[0])!=NIT_NULL);
107 /* ./metamodel//inheritance.nit:39 */
108 if (UNTAG_Bool(REGB0)) {
109 } else {
110 fprintf(stderr, "Uninitialized attribute %s", "_global_classes");
111 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 39);
112 nit_exit(1);
113 }
114 fra.me.REG[4] = ATTR_abstractmetamodel___MMModule____global_classes(fra.me.REG[0]);
115 array___Array___add(fra.me.REG[4], fra.me.REG[3]);
116 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMModule____global_class_by_name(fra.me.REG[0])!=NIT_NULL);
117 /* ./metamodel//inheritance.nit:40 */
118 if (UNTAG_Bool(REGB0)) {
119 } else {
120 fprintf(stderr, "Uninitialized attribute %s", "_global_class_by_name");
121 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 40);
122 nit_exit(1);
123 }
124 fra.me.REG[4] = ATTR_abstractmetamodel___MMModule____global_class_by_name(fra.me.REG[0]);
125 fra.me.REG[5] = CALL_abstractmetamodel___MMGlobalClass___name(fra.me.REG[3])(fra.me.REG[3]);
126 CALL_abstract_collection___Map_____braeq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5], fra.me.REG[3]);
127 label1: while(0);
128 } else {
129 /* ./metamodel//inheritance.nit:37 */
130 goto label2;
131 }
132 CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
133 }
134 label2: while(0);
135 } else {
136 /* ./metamodel//inheritance.nit:36 */
137 goto label3;
138 }
139 CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
140 }
141 label3: while(0);
142 stack_frame_head = fra.me.prev;
143 return;
144 }
145 void inheritance___MMModule___import_local_classes(val_t p0){
146 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
147 val_t REGB0;
148 val_t tmp;
149 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
150 fra.me.file = LOCATE_inheritance;
151 fra.me.line = 46;
152 fra.me.meth = LOCATE_inheritance___MMModule___import_local_classes;
153 fra.me.has_broke = 0;
154 fra.me.REG_size = 4;
155 fra.me.REG[0] = NIT_NULL;
156 fra.me.REG[1] = NIT_NULL;
157 fra.me.REG[2] = NIT_NULL;
158 fra.me.REG[3] = NIT_NULL;
159 fra.me.REG[0] = p0;
160 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMModule____global_classes(fra.me.REG[0])!=NIT_NULL);
161 /* ./metamodel//inheritance.nit:49 */
162 if (UNTAG_Bool(REGB0)) {
163 } else {
164 fprintf(stderr, "Uninitialized attribute %s", "_global_classes");
165 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 49);
166 nit_exit(1);
167 }
168 fra.me.REG[1] = ATTR_abstractmetamodel___MMModule____global_classes(fra.me.REG[0]);
169 fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
170 while(1) {
171 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
172 if (UNTAG_Bool(REGB0)) {
173 fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
174 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMModule____local_class_by_global(fra.me.REG[0])!=NIT_NULL);
175 /* ./metamodel//inheritance.nit:50 */
176 if (UNTAG_Bool(REGB0)) {
177 } else {
178 fprintf(stderr, "Uninitialized attribute %s", "_local_class_by_global");
179 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 50);
180 nit_exit(1);
181 }
182 fra.me.REG[3] = ATTR_abstractmetamodel___MMModule____local_class_by_global(fra.me.REG[0]);
183 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
184 if (UNTAG_Bool(REGB0)) {
185 goto label1;
186 }
187 fra.me.REG[2] = NEW_MMImplicitLocalClass_inheritance___MMImplicitLocalClass___init(fra.me.REG[0], fra.me.REG[2]);
188 /* ./metamodel//inheritance.nit:51 */
189 label1: while(0);
190 } else {
191 /* ./metamodel//inheritance.nit:49 */
192 goto label2;
193 }
194 CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
195 }
196 label2: while(0);
197 stack_frame_head = fra.me.prev;
198 return;
199 }
200 val_t inheritance___MMLocalClass_____bra(val_t p0, val_t p1){
201 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
202 val_t REGB0;
203 val_t tmp;
204 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
205 fra.me.file = LOCATE_inheritance;
206 fra.me.line = 193;
207 fra.me.meth = LOCATE_inheritance___MMLocalClass_____bra;
208 fra.me.has_broke = 0;
209 fra.me.REG_size = 3;
210 fra.me.REG[0] = NIT_NULL;
211 fra.me.REG[1] = NIT_NULL;
212 fra.me.REG[2] = NIT_NULL;
213 fra.me.REG[0] = p0;
214 fra.me.REG[1] = p1;
215 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0])!=NIT_NULL);
216 /* ./metamodel//inheritance.nit:195 */
217 if (UNTAG_Bool(REGB0)) {
218 } else {
219 fprintf(stderr, "Uninitialized attribute %s", "_local_property_by_global");
220 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 195);
221 nit_exit(1);
222 }
223 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0]);
224 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
225 if (UNTAG_Bool(REGB0)) {
226 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0])!=NIT_NULL);
227 /* ./metamodel//inheritance.nit:196 */
228 if (UNTAG_Bool(REGB0)) {
229 } else {
230 fprintf(stderr, "Uninitialized attribute %s", "_local_property_by_global");
231 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 196);
232 nit_exit(1);
233 }
234 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0]);
235 fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
236 goto label1;
237 } else {
238 REGB0 = CALL_abstractmetamodel___MMLocalClass___has_global_property(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
239 /* ./metamodel//inheritance.nit:197 */
240 if (UNTAG_Bool(REGB0)) {
241 fra.me.REG[1] = CALL_inheritance___MMLocalClass___inherit_local_property(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
242 fra.me.REG[2] = fra.me.REG[1];
243 /* ./metamodel//inheritance.nit:198 */
244 goto label1;
245 } else {
246 /* ./metamodel//inheritance.nit:200 */
247 fprintf(stderr, "Aborted");
248 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 200);
249 nit_exit(1);
250 }
251 }
252 label1: while(0);
253 stack_frame_head = fra.me.prev;
254 return fra.me.REG[2];
255 }
256 void inheritance___MMLocalClass___compute_super_classes(val_t p0){
257 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
258 val_t REGB0;
259 val_t REGB1;
260 val_t tmp;
261 static val_t once_value_2; /* Once value */
262 static val_t once_value_3; /* Once value */
263 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
264 fra.me.file = LOCATE_inheritance;
265 fra.me.line = 64;
266 fra.me.meth = LOCATE_inheritance___MMLocalClass___compute_super_classes;
267 fra.me.has_broke = 0;
268 fra.me.REG_size = 4;
269 fra.me.REG[0] = NIT_NULL;
270 fra.me.REG[1] = NIT_NULL;
271 fra.me.REG[2] = NIT_NULL;
272 fra.me.REG[3] = NIT_NULL;
273 fra.me.REG[0] = p0;
274 REGB0 = CALL_inheritance___MMLocalClass___computed_super_classes(fra.me.REG[0])(fra.me.REG[0]);
275 /* ./metamodel//inheritance.nit:67 */
276 if (UNTAG_Bool(REGB0)) {
277 /* ./metamodel//inheritance.nit:69 */
278 goto label1;
279 } else {
280 REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____computing_super(fra.me.REG[0])!=NIT_NULL);
281 /* ./metamodel//inheritance.nit:70 */
282 if (UNTAG_Bool(REGB0)) {
283 } else {
284 fprintf(stderr, "Uninitialized attribute %s", "_computing_super");
285 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 70);
286 nit_exit(1);
287 }
288 REGB0 = ATTR_inheritance___MMLocalClass____computing_super(fra.me.REG[0]);
289 if (UNTAG_Bool(REGB0)) {
290 fra.me.REG[1] = CALL_file___Object___stderr(fra.me.REG[0])(fra.me.REG[0]);
291 REGB0 = TAG_Int(3);
292 fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
293 /* ./metamodel//inheritance.nit:71 */
294 if (!once_value_2) {
295 fra.me.REG[3] = BOX_NativeString("Fatal error: Inheritance loop for class ");
296 REGB0 = TAG_Int(40);
297 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
298 once_value_2 = fra.me.REG[3];
299 register_static_object(&once_value_2);
300 } else fra.me.REG[3] = once_value_2;
301 array___Array___add(fra.me.REG[2], fra.me.REG[3]);
302 fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
303 array___Array___add(fra.me.REG[2], fra.me.REG[3]);
304 if (!once_value_3) {
305 fra.me.REG[3] = BOX_NativeString("\n");
306 REGB0 = TAG_Int(1);
307 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
308 once_value_3 = fra.me.REG[3];
309 register_static_object(&once_value_3);
310 } else fra.me.REG[3] = once_value_3;
311 array___Array___add(fra.me.REG[2], fra.me.REG[3]);
312 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
313 CALL_stream___OStream___write(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
314 REGB0 = TAG_Int(1);
315 /* ./metamodel//inheritance.nit:72 */
316 CALL_kernel___Object___exit(fra.me.REG[0])(fra.me.REG[0], REGB0);
317 }
318 }
319 REGB0 = TAG_Bool(true);
320 /* ./metamodel//inheritance.nit:74 */
321 ATTR_inheritance___MMLocalClass____computing_super(fra.me.REG[0]) = REGB0;
322 fra.me.REG[2] = NEW_Array_array___Array___init();
323 /* ./metamodel//inheritance.nit:77 */
324 CALL_inheritance___MMLocalClass___add_explicit_classes(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
325 /* ./metamodel//inheritance.nit:78 */
326 CALL_inheritance___MMLocalClass___add_super_classes(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
327 /* ./metamodel//inheritance.nit:79 */
328 CALL_inheritance___MMLocalClass___add_default_any_class(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
329 /* ./metamodel//inheritance.nit:80 */
330 CALL_inheritance___MMLocalClass___compute_super_parents(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
331 fra.me.REG[1] = NEW_HashSet_hash_collection___HashSet___init();
332 /* ./metamodel//inheritance.nit:82 */
333 CALL_abstract_collection___SimpleCollection___add_all(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
334 fra.me.REG[1] = CALL_array___Collection___to_a(fra.me.REG[1])(fra.me.REG[1]);
335 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___module(fra.me.REG[0])(fra.me.REG[0]);
336 /* ./metamodel//inheritance.nit:84 */
337 CALL_abstractmetamodel___MMModule___set_supers_class(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0], fra.me.REG[1]);
338 fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
339 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
340 /* ./metamodel//inheritance.nit:85 */
341 if (UNTAG_Bool(REGB0)) {
342 } else {
343 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
344 if (UNTAG_Bool(REGB1)) {
345 REGB1 = TAG_Bool(false);
346 REGB0 = REGB1;
347 } else {
348 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
349 REGB0 = REGB1;
350 }
351 }
352 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
353 if (UNTAG_Bool(REGB0)) {
354 } else {
355 fprintf(stderr, "Assert failed");
356 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 85);
357 nit_exit(1);
358 }
359 fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____cshe(fra.me.REG[0]);
360 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
361 /* ./metamodel//inheritance.nit:86 */
362 if (UNTAG_Bool(REGB0)) {
363 } else {
364 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
365 if (UNTAG_Bool(REGB1)) {
366 REGB1 = TAG_Bool(false);
367 REGB0 = REGB1;
368 } else {
369 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
370 REGB0 = REGB1;
371 }
372 }
373 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
374 if (UNTAG_Bool(REGB0)) {
375 } else {
376 fprintf(stderr, "Assert failed");
377 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 86);
378 nit_exit(1);
379 }
380 REGB0 = TAG_Bool(false);
381 /* ./metamodel//inheritance.nit:87 */
382 ATTR_inheritance___MMLocalClass____computing_super(fra.me.REG[0]) = REGB0;
383 label1: while(0);
384 stack_frame_head = fra.me.prev;
385 return;
386 }
387 void inheritance___MMLocalClass___compute_ancestors(val_t p0){
388 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
389 val_t REGB0;
390 val_t REGB1;
391 val_t REGB2;
392 val_t tmp;
393 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
394 fra.me.file = LOCATE_inheritance;
395 fra.me.line = 90;
396 fra.me.meth = LOCATE_inheritance___MMLocalClass___compute_ancestors;
397 fra.me.has_broke = 0;
398 fra.me.REG_size = 4;
399 fra.me.REG[0] = NIT_NULL;
400 fra.me.REG[1] = NIT_NULL;
401 fra.me.REG[2] = NIT_NULL;
402 fra.me.REG[3] = NIT_NULL;
403 fra.me.REG[0] = p0;
404 REGB0 = CALL_inheritance___MMLocalClass___computed_super_classes(fra.me.REG[0])(fra.me.REG[0]);
405 /* ./metamodel//inheritance.nit:93 */
406 if (UNTAG_Bool(REGB0)) {
407 } else {
408 fprintf(stderr, "Assert failed");
409 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 93);
410 nit_exit(1);
411 }
412 REGB0 = CALL_inheritance___MMLocalClass___computed_ancestors(fra.me.REG[0])(fra.me.REG[0]);
413 /* ./metamodel//inheritance.nit:94 */
414 if (UNTAG_Bool(REGB0)) {
415 goto label1;
416 }
417 fra.me.REG[1] = CALL_inheritance___MMLocalClass___build_ancestors(fra.me.REG[0])(fra.me.REG[0]);
418 fra.me.REG[1] = CALL_inheritance___MMLocalClass___group_ancestors(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
419 fra.me.REG[2] = NEW_HashMap_hash_collection___HashMap___init();
420 /* ./metamodel//inheritance.nit:97 */
421 ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]) = fra.me.REG[2];
422 fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
423 /* ./metamodel//inheritance.nit:99 */
424 while(1) {
425 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
426 if (UNTAG_Bool(REGB0)) {
427 fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
428 REGB0 = CALL_abstract_collection___Collection___length(fra.me.REG[2])(fra.me.REG[2]);
429 REGB1 = TAG_Int(1);
430 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
431 /* ./metamodel//inheritance.nit:100 */
432 if (UNTAG_Bool(REGB2)) {
433 } else {
434 REGB1 = TAG_Bool((REGB0)==(REGB1));
435 REGB2 = REGB1;
436 /* ./metamodel//inheritance.nit:100 */
437 }
438 if (UNTAG_Bool(REGB2)) {
439 fra.me.REG[3] = CALL_abstract_collection___Collection___first(fra.me.REG[2])(fra.me.REG[2]);
440 /* ./metamodel//inheritance.nit:101 */
441 CALL_static_type___MMLocalClass___add_ancestor(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
442 } else {
443 fra.me.REG[3] = CALL_inheritance___MMLocalClass___merge_ancestors(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
444 fra.me.REG[2] = CALL_inheritance___MMLocalClass___merge_ancestors(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
445 /* ./metamodel//inheritance.nit:104 */
446 CALL_static_type___MMLocalClass___add_ancestor(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
447 }
448 } else {
449 /* ./metamodel//inheritance.nit:99 */
450 goto label2;
451 }
452 CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
453 }
454 label2: while(0);
455 label1: while(0);
456 stack_frame_head = fra.me.prev;
457 return;
458 }
459 void inheritance___MMLocalClass___inherit_global_properties(val_t p0){
460 struct {struct stack_frame_t me; val_t MORE_REG[6];} fra;
461 val_t REGB0;
462 val_t REGB1;
463 val_t tmp;
464 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
465 fra.me.file = LOCATE_inheritance;
466 fra.me.line = 111;
467 fra.me.meth = LOCATE_inheritance___MMLocalClass___inherit_global_properties;
468 fra.me.has_broke = 0;
469 fra.me.REG_size = 7;
470 fra.me.REG[0] = NIT_NULL;
471 fra.me.REG[1] = NIT_NULL;
472 fra.me.REG[2] = NIT_NULL;
473 fra.me.REG[3] = NIT_NULL;
474 fra.me.REG[4] = NIT_NULL;
475 fra.me.REG[5] = NIT_NULL;
476 fra.me.REG[6] = NIT_NULL;
477 fra.me.REG[0] = p0;
478 REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0])!=NIT_NULL);
479 /* ./metamodel//inheritance.nit:114 */
480 if (UNTAG_Bool(REGB0)) {
481 } else {
482 fprintf(stderr, "Uninitialized attribute %s", "_are_global_properties_inherited");
483 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 114);
484 nit_exit(1);
485 }
486 REGB0 = ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0]);
487 if (UNTAG_Bool(REGB0)) {
488 goto label1;
489 }
490 REGB0 = TAG_Bool(true);
491 /* ./metamodel//inheritance.nit:115 */
492 ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0]) = REGB0;
493 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
494 /* ./metamodel//inheritance.nit:117 */
495 if (UNTAG_Bool(REGB0)) {
496 } else {
497 fprintf(stderr, "Uninitialized attribute %s", "_properties_by_name");
498 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 117);
499 nit_exit(1);
500 }
501 fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
502 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0])!=NIT_NULL);
503 /* ./metamodel//inheritance.nit:118 */
504 if (UNTAG_Bool(REGB0)) {
505 } else {
506 fprintf(stderr, "Uninitialized attribute %s", "_global_properties");
507 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 118);
508 nit_exit(1);
509 }
510 fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0]);
511 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[0])(fra.me.REG[0]);
512 fra.me.REG[2] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[2])(fra.me.REG[2]);
513 fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(fra.me.REG[2])(fra.me.REG[2]);
514 /* ./metamodel//inheritance.nit:119 */
515 while(1) {
516 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
517 if (UNTAG_Bool(REGB0)) {
518 fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
519 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___global_properties(fra.me.REG[3])(fra.me.REG[3]);
520 fra.me.REG[3] = CALL_abstract_collection___Collection___iterator(fra.me.REG[3])(fra.me.REG[3]);
521 /* ./metamodel//inheritance.nit:120 */
522 while(1) {
523 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[3])(fra.me.REG[3]);
524 if (UNTAG_Bool(REGB0)) {
525 fra.me.REG[4] = CALL_abstract_collection___Iterator___item(fra.me.REG[3])(fra.me.REG[3]);
526 REGB0 = CALL_abstract_collection___Collection___has(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
527 /* ./metamodel//inheritance.nit:121 */
528 if (UNTAG_Bool(REGB0)) {
529 goto label2;
530 }
531 /* ./metamodel//inheritance.nit:123 */
532 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
533 REGB0 = CALL_abstractmetamodel___MMGlobalProperty___is_init(fra.me.REG[4])(fra.me.REG[4]);
534 /* ./metamodel//inheritance.nit:127 */
535 if (UNTAG_Bool(REGB0)) {
536 fra.me.REG[5] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[4])(fra.me.REG[4]);
537 fra.me.REG[5] = CALL_abstractmetamodel___MMLocalProperty___local_class(fra.me.REG[5])(fra.me.REG[5]);
538 fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[5])(fra.me.REG[5]);
539 fra.me.REG[6] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[0])(fra.me.REG[0]);
540 REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[5],fra.me.REG[6]));
541 if (UNTAG_Bool(REGB0)) {
542 } else {
543 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
544 REGB0 = REGB1;
545 }
546 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
547 } else {
548 REGB1 = TAG_Bool(false);
549 REGB0 = REGB1;
550 }
551 if (UNTAG_Bool(REGB0)) {
552 /* ./metamodel//inheritance.nit:129 */
553 goto label2;
554 }
555 /* ./metamodel//inheritance.nit:132 */
556 CALL_inheritance___MMLocalClass___make_visible_an_inherited_global_property(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4]);
557 label2: while(0);
558 } else {
559 /* ./metamodel//inheritance.nit:120 */
560 goto label3;
561 }
562 CALL_abstract_collection___Iterator___next(fra.me.REG[3])(fra.me.REG[3]);
563 }
564 label3: while(0);
565 } else {
566 /* ./metamodel//inheritance.nit:119 */
567 goto label4;
568 }
569 CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
570 }
571 label4: while(0);
572 label1: while(0);
573 stack_frame_head = fra.me.prev;
574 return;
575 }
576 void inheritance___MMLocalClass___make_visible_an_inherited_global_property(val_t p0, val_t p1){
577 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
578 val_t REGB0;
579 val_t tmp;
580 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
581 fra.me.file = LOCATE_inheritance;
582 fra.me.line = 137;
583 fra.me.meth = LOCATE_inheritance___MMLocalClass___make_visible_an_inherited_global_property;
584 fra.me.has_broke = 0;
585 fra.me.REG_size = 5;
586 fra.me.REG[0] = NIT_NULL;
587 fra.me.REG[1] = NIT_NULL;
588 fra.me.REG[2] = NIT_NULL;
589 fra.me.REG[3] = NIT_NULL;
590 fra.me.REG[4] = NIT_NULL;
591 fra.me.REG[0] = p0;
592 fra.me.REG[1] = p1;
593 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
594 /* ./metamodel//inheritance.nit:140 */
595 if (UNTAG_Bool(REGB0)) {
596 } else {
597 fprintf(stderr, "Uninitialized attribute %s", "_properties_by_name");
598 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 140);
599 nit_exit(1);
600 }
601 fra.me.REG[0] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
602 fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[1])(fra.me.REG[1]);
603 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalProperty___name(fra.me.REG[2])(fra.me.REG[2]);
604 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
605 /* ./metamodel//inheritance.nit:143 */
606 if (UNTAG_Bool(REGB0)) {
607 fra.me.REG[3] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
608 /* ./metamodel//inheritance.nit:144 */
609 } else {
610 fra.me.REG[4] = NEW_Array_array___Array___init();
611 fra.me.REG[3] = fra.me.REG[4];
612 /* ./metamodel//inheritance.nit:147 */
613 CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2], fra.me.REG[3]);
614 }
615 /* ./metamodel//inheritance.nit:149 */
616 array___Array___add(fra.me.REG[3], fra.me.REG[1]);
617 stack_frame_head = fra.me.prev;
618 return;
619 }
620 void inheritance___MMLocalClass___add_direct_parent(val_t p0, val_t p1){
621 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
622 val_t REGB0;
623 val_t tmp;
624 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
625 fra.me.file = LOCATE_inheritance;
626 fra.me.line = 152;
627 fra.me.meth = LOCATE_inheritance___MMLocalClass___add_direct_parent;
628 fra.me.has_broke = 0;
629 fra.me.REG_size = 2;
630 fra.me.REG[0] = NIT_NULL;
631 fra.me.REG[1] = NIT_NULL;
632 fra.me.REG[0] = p0;
633 fra.me.REG[1] = p1;
634 REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0])!=NIT_NULL);
635 /* ./metamodel//inheritance.nit:155 */
636 if (UNTAG_Bool(REGB0)) {
637 } else {
638 fprintf(stderr, "Uninitialized attribute %s", "_direct_parents");
639 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 155);
640 nit_exit(1);
641 }
642 fra.me.REG[0] = ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0]);
643 array___Array___add(fra.me.REG[0], fra.me.REG[1]);
644 stack_frame_head = fra.me.prev;
645 return;
646 }
647 val_t inheritance___MMLocalClass___computed_super_classes(val_t p0){
648 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
649 val_t REGB0;
650 val_t REGB1;
651 val_t tmp;
652 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
653 fra.me.file = LOCATE_inheritance;
654 fra.me.line = 158;
655 fra.me.meth = LOCATE_inheritance___MMLocalClass___computed_super_classes;
656 fra.me.has_broke = 0;
657 fra.me.REG_size = 2;
658 fra.me.REG[0] = NIT_NULL;
659 fra.me.REG[1] = NIT_NULL;
660 fra.me.REG[0] = p0;
661 fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
662 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
663 /* ./metamodel//inheritance.nit:161 */
664 if (UNTAG_Bool(REGB0)) {
665 } else {
666 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
667 if (UNTAG_Bool(REGB1)) {
668 REGB1 = TAG_Bool(false);
669 REGB0 = REGB1;
670 } else {
671 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
672 REGB0 = REGB1;
673 }
674 }
675 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
676 if (UNTAG_Bool(REGB0)) {
677 fra.me.REG[0] = ATTR_abstractmetamodel___MMLocalClass____cshe(fra.me.REG[0]);
678 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
679 if (UNTAG_Bool(REGB0)) {
680 } else {
681 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
682 if (UNTAG_Bool(REGB1)) {
683 REGB1 = TAG_Bool(false);
684 REGB0 = REGB1;
685 } else {
686 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
687 REGB0 = REGB1;
688 }
689 }
690 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
691 } else {
692 REGB1 = TAG_Bool(false);
693 REGB0 = REGB1;
694 }
695 goto label1;
696 label1: while(0);
697 stack_frame_head = fra.me.prev;
698 return REGB0;
699 }
700 val_t inheritance___MMLocalClass___computed_ancestors(val_t p0){
701 struct {struct stack_frame_t me;} fra;
702 val_t REGB0;
703 val_t REGB1;
704 val_t tmp;
705 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
706 fra.me.file = LOCATE_inheritance;
707 fra.me.line = 164;
708 fra.me.meth = LOCATE_inheritance___MMLocalClass___computed_ancestors;
709 fra.me.has_broke = 0;
710 fra.me.REG_size = 1;
711 fra.me.REG[0] = NIT_NULL;
712 fra.me.REG[0] = p0;
713 fra.me.REG[0] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
714 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
715 /* ./metamodel//inheritance.nit:167 */
716 if (UNTAG_Bool(REGB0)) {
717 } else {
718 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
719 if (UNTAG_Bool(REGB1)) {
720 REGB1 = TAG_Bool(false);
721 REGB0 = REGB1;
722 } else {
723 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
724 REGB0 = REGB1;
725 }
726 }
727 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
728 goto label1;
729 label1: while(0);
730 stack_frame_head = fra.me.prev;
731 return REGB0;
732 }
733 val_t inheritance___MMLocalClass___ancestor_for(val_t p0, val_t p1){
734 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
735 val_t REGB0;
736 val_t REGB1;
737 val_t tmp;
738 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
739 fra.me.file = LOCATE_inheritance;
740 fra.me.line = 170;
741 fra.me.meth = LOCATE_inheritance___MMLocalClass___ancestor_for;
742 fra.me.has_broke = 0;
743 fra.me.REG_size = 6;
744 fra.me.REG[0] = NIT_NULL;
745 fra.me.REG[1] = NIT_NULL;
746 fra.me.REG[2] = NIT_NULL;
747 fra.me.REG[3] = NIT_NULL;
748 fra.me.REG[4] = NIT_NULL;
749 fra.me.REG[5] = NIT_NULL;
750 fra.me.REG[0] = p0;
751 fra.me.REG[1] = p1;
752 fra.me.REG[2] = CALL_static_type___MMLocalClass___ancestors(fra.me.REG[0])(fra.me.REG[0]);
753 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
754 /* ./metamodel//inheritance.nit:174 */
755 if (UNTAG_Bool(REGB0)) {
756 } else {
757 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
758 if (UNTAG_Bool(REGB1)) {
759 REGB1 = TAG_Bool(false);
760 REGB0 = REGB1;
761 } else {
762 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
763 REGB0 = REGB1;
764 }
765 }
766 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
767 if (UNTAG_Bool(REGB0)) {
768 } else {
769 fprintf(stderr, "Assert failed");
770 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 174);
771 nit_exit(1);
772 }
773 fra.me.REG[2] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
774 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
775 /* ./metamodel//inheritance.nit:176 */
776 if (UNTAG_Bool(REGB0)) {
777 fprintf(stderr, "Reciever is null");
778 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 176);
779 nit_exit(1);
780 }
781 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
782 if (UNTAG_Bool(REGB0)) {
783 fra.me.REG[2] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
784 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
785 /* ./metamodel//inheritance.nit:177 */
786 if (UNTAG_Bool(REGB0)) {
787 fprintf(stderr, "Reciever is null");
788 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 177);
789 nit_exit(1);
790 }
791 fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
792 goto label1;
793 }
794 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___module(fra.me.REG[0])(fra.me.REG[0]);
795 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___for_module(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
796 fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___cshe(fra.me.REG[0])(fra.me.REG[0]);
797 REGB0 = CALL_partial_order___PartialOrderElement_____leq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
798 /* ./metamodel//inheritance.nit:180 */
799 if (UNTAG_Bool(REGB0)) {
800 } else {
801 fprintf(stderr, "Assert failed");
802 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 180);
803 nit_exit(1);
804 }
805 fra.me.REG[4] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
806 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
807 /* ./metamodel//inheritance.nit:182 */
808 if (UNTAG_Bool(REGB0)) {
809 fprintf(stderr, "Reciever is null");
810 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 182);
811 nit_exit(1);
812 }
813 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
814 if (UNTAG_Bool(REGB0)) {
815 fra.me.REG[4] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
816 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
817 /* ./metamodel//inheritance.nit:183 */
818 if (UNTAG_Bool(REGB0)) {
819 fprintf(stderr, "Reciever is null");
820 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 183);
821 nit_exit(1);
822 }
823 fra.me.REG[3] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
824 } else {
825 fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[1])(fra.me.REG[1]);
826 fra.me.REG[5] = ATTR_abstractmetamodel___MMLocalClass____global(fra.me.REG[0]);
827 REGB0 = TAG_Bool(IS_EQUAL_ON(fra.me.REG[4],fra.me.REG[5]));
828 /* ./metamodel//inheritance.nit:184 */
829 if (UNTAG_Bool(REGB0)) {
830 } else {
831 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
832 REGB0 = REGB1;
833 }
834 if (UNTAG_Bool(REGB0)) {
835 fra.me.REG[5] = NEW_MMRefineAncestor_inheritance___MMRefineAncestor___init(fra.me.REG[0], fra.me.REG[1]);
836 fra.me.REG[3] = fra.me.REG[5];
837 /* ./metamodel//inheritance.nit:185 */
838 } else {
839 fra.me.REG[5] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[0])(fra.me.REG[0]);
840 fra.me.REG[4] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
841 fra.me.REG[4] = NEW_MMSpecAncestor_inheritance___MMSpecAncestor___init(fra.me.REG[5], fra.me.REG[4]);
842 fra.me.REG[3] = fra.me.REG[4];
843 /* ./metamodel//inheritance.nit:187 */
844 }
845 }
846 fra.me.REG[0] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
847 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
848 /* ./metamodel//inheritance.nit:189 */
849 if (UNTAG_Bool(REGB0)) {
850 fprintf(stderr, "Reciever is null");
851 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 189);
852 nit_exit(1);
853 }
854 CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[3]);
855 fra.me.REG[2] = fra.me.REG[3];
856 /* ./metamodel//inheritance.nit:190 */
857 goto label1;
858 label1: while(0);
859 stack_frame_head = fra.me.prev;
860 return fra.me.REG[2];
861 }
862 void inheritance___MMLocalClass___add_default_any_class(val_t p0, val_t p1){
863 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
864 val_t REGB0;
865 val_t REGB1;
866 val_t tmp;
867 static val_t once_value_1; /* Once value */
868 static val_t once_value_2; /* Once value */
869 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
870 fra.me.file = LOCATE_inheritance;
871 fra.me.line = 204;
872 fra.me.meth = LOCATE_inheritance___MMLocalClass___add_default_any_class;
873 fra.me.has_broke = 0;
874 fra.me.REG_size = 4;
875 fra.me.REG[0] = NIT_NULL;
876 fra.me.REG[1] = NIT_NULL;
877 fra.me.REG[2] = NIT_NULL;
878 fra.me.REG[3] = NIT_NULL;
879 fra.me.REG[0] = p0;
880 fra.me.REG[1] = p1;
881 REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[1])(fra.me.REG[1]);
882 /* ./metamodel//inheritance.nit:207 */
883 if (UNTAG_Bool(REGB0)) {
884 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
885 if (!once_value_1) {
886 if (!once_value_2) {
887 fra.me.REG[3] = BOX_NativeString("Object");
888 REGB0 = TAG_Int(6);
889 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
890 once_value_2 = fra.me.REG[3];
891 register_static_object(&once_value_2);
892 } else fra.me.REG[3] = once_value_2;
893 fra.me.REG[3] = CALL_symbol___String___to_symbol(fra.me.REG[3])(fra.me.REG[3]);
894 once_value_1 = fra.me.REG[3];
895 register_static_object(&once_value_1);
896 } else fra.me.REG[3] = once_value_1;
897 REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[2],fra.me.REG[3]));
898 if (UNTAG_Bool(REGB0)) {
899 } else {
900 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
901 REGB0 = REGB1;
902 }
903 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
904 } else {
905 REGB1 = TAG_Bool(false);
906 REGB0 = REGB1;
907 }
908 if (UNTAG_Bool(REGB0)) {
909 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___module(fra.me.REG[0])(fra.me.REG[0]);
910 fra.me.REG[3] = CALL_inheritance___MMModule___type_any(fra.me.REG[3])(fra.me.REG[3]);
911 fra.me.REG[2] = CALL_static_type___MMType___local_class(fra.me.REG[3])(fra.me.REG[3]);
912 /* ./metamodel//inheritance.nit:209 */
913 array___Array___add(fra.me.REG[1], fra.me.REG[2]);
914 fra.me.REG[3] = NEW_MMDefaultAncestor_inheritance___MMDefaultAncestor___init(fra.me.REG[0], fra.me.REG[3]);
915 /* ./metamodel//inheritance.nit:211 */
916 CALL_inheritance___MMLocalClass___add_direct_parent(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
917 }
918 stack_frame_head = fra.me.prev;
919 return;
920 }
921 void inheritance___MMLocalClass___add_super_classes(val_t p0, val_t p1){
922 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
923 val_t REGB0;
924 val_t REGB1;
925 val_t tmp;
926 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
927 fra.me.file = LOCATE_inheritance;
928 fra.me.line = 215;
929 fra.me.meth = LOCATE_inheritance___MMLocalClass___add_super_classes;
930 fra.me.has_broke = 0;
931 fra.me.REG_size = 6;
932 fra.me.REG[0] = NIT_NULL;
933 fra.me.REG[1] = NIT_NULL;
934 fra.me.REG[2] = NIT_NULL;
935 fra.me.REG[3] = NIT_NULL;
936 fra.me.REG[4] = NIT_NULL;
937 fra.me.REG[5] = NIT_NULL;
938 fra.me.REG[0] = p0;
939 fra.me.REG[1] = p1;
940 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
941 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
942 /* ./metamodel//inheritance.nit:218 */
943 if (UNTAG_Bool(REGB0)) {
944 } else {
945 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
946 if (UNTAG_Bool(REGB1)) {
947 REGB1 = TAG_Bool(false);
948 REGB0 = REGB1;
949 } else {
950 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
951 REGB0 = REGB1;
952 }
953 }
954 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
955 if (UNTAG_Bool(REGB0)) {
956 } else {
957 fprintf(stderr, "Assert failed");
958 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 218);
959 nit_exit(1);
960 }
961 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
962 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
963 /* ./metamodel//inheritance.nit:219 */
964 if (UNTAG_Bool(REGB0)) {
965 fprintf(stderr, "Reciever is null");
966 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 219);
967 nit_exit(1);
968 }
969 fra.me.REG[2] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[2])(fra.me.REG[2]);
970 fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(fra.me.REG[2])(fra.me.REG[2]);
971 while(1) {
972 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
973 if (UNTAG_Bool(REGB0)) {
974 fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
975 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___cshe(fra.me.REG[3])(fra.me.REG[3]);
976 fra.me.REG[3] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[3])(fra.me.REG[3]);
977 fra.me.REG[3] = CALL_abstract_collection___Collection___iterator(fra.me.REG[3])(fra.me.REG[3]);
978 /* ./metamodel//inheritance.nit:220 */
979 while(1) {
980 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[3])(fra.me.REG[3]);
981 if (UNTAG_Bool(REGB0)) {
982 fra.me.REG[4] = CALL_abstract_collection___Iterator___item(fra.me.REG[3])(fra.me.REG[3]);
983 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____module(fra.me.REG[0])!=NIT_NULL);
984 /* ./metamodel//inheritance.nit:221 */
985 if (UNTAG_Bool(REGB0)) {
986 } else {
987 fprintf(stderr, "Uninitialized attribute %s", "_module");
988 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 221);
989 nit_exit(1);
990 }
991 fra.me.REG[5] = ATTR_abstractmetamodel___MMLocalClass____module(fra.me.REG[0]);
992 fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass___for_module(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
993 /* ./metamodel//inheritance.nit:222 */
994 array___Array___add(fra.me.REG[1], fra.me.REG[5]);
995 } else {
996 /* ./metamodel//inheritance.nit:220 */
997 goto label1;
998 }
999 CALL_abstract_collection___Iterator___next(fra.me.REG[3])(fra.me.REG[3]);
1000 }
1001 label1: while(0);
1002 } else {
1003 /* ./metamodel//inheritance.nit:219 */
1004 goto label2;
1005 }
1006 CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
1007 }
1008 label2: while(0);
1009 stack_frame_head = fra.me.prev;
1010 return;
1011 }
1012 void inheritance___MMLocalClass___add_explicit_classes(val_t p0, val_t p1){
1013 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1014 val_t REGB0;
1015 val_t tmp;
1016 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1017 fra.me.file = LOCATE_inheritance;
1018 fra.me.line = 227;
1019 fra.me.meth = LOCATE_inheritance___MMLocalClass___add_explicit_classes;
1020 fra.me.has_broke = 0;
1021 fra.me.REG_size = 3;
1022 fra.me.REG[0] = NIT_NULL;
1023 fra.me.REG[1] = NIT_NULL;
1024 fra.me.REG[2] = NIT_NULL;
1025 fra.me.REG[0] = p0;
1026 fra.me.REG[1] = p1;
1027 REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0])!=NIT_NULL);
1028 /* ./metamodel//inheritance.nit:230 */
1029 if (UNTAG_Bool(REGB0)) {
1030 } else {
1031 fprintf(stderr, "Uninitialized attribute %s", "_direct_parents");
1032 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 230);
1033 nit_exit(1);
1034 }
1035 fra.me.REG[0] = ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0]);
1036 fra.me.REG[0] = CALL_abstract_collection___Collection___iterator(fra.me.REG[0])(fra.me.REG[0]);
1037 while(1) {
1038 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[0])(fra.me.REG[0]);
1039 if (UNTAG_Bool(REGB0)) {
1040 fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[0])(fra.me.REG[0]);
1041 fra.me.REG[2] = CALL_static_type___MMAncestor___local_class(fra.me.REG[2])(fra.me.REG[2]);
1042 /* ./metamodel//inheritance.nit:231 */
1043 array___Array___add(fra.me.REG[1], fra.me.REG[2]);
1044 } else {
1045 /* ./metamodel//inheritance.nit:230 */
1046 goto label1;
1047 }
1048 CALL_abstract_collection___Iterator___next(fra.me.REG[0])(fra.me.REG[0]);
1049 }
1050 label1: while(0);
1051 stack_frame_head = fra.me.prev;
1052 return;
1053 }
1054 void inheritance___MMLocalClass___compute_super_parents(val_t p0, val_t p1){
1055 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1056 val_t REGB0;
1057 val_t tmp;
1058 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1059 fra.me.file = LOCATE_inheritance;
1060 fra.me.line = 235;
1061 fra.me.meth = LOCATE_inheritance___MMLocalClass___compute_super_parents;
1062 fra.me.has_broke = 0;
1063 fra.me.REG_size = 2;
1064 fra.me.REG[0] = NIT_NULL;
1065 fra.me.REG[1] = NIT_NULL;
1066 fra.me.REG[0] = p0;
1067 fra.me.REG[1] = p1;
1068 fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
1069 /* ./metamodel//inheritance.nit:238 */
1070 while(1) {
1071 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
1072 if (UNTAG_Bool(REGB0)) {
1073 fra.me.REG[0] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
1074 /* ./metamodel//inheritance.nit:239 */
1075 CALL_inheritance___MMLocalClass___compute_super_classes(fra.me.REG[0])(fra.me.REG[0]);
1076 } else {
1077 /* ./metamodel//inheritance.nit:238 */
1078 goto label1;
1079 }
1080 CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
1081 }
1082 label1: while(0);
1083 stack_frame_head = fra.me.prev;
1084 return;
1085 }
1086 val_t inheritance___MMLocalClass___build_ancestors(val_t p0){
1087 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
1088 val_t REGB0;
1089 val_t REGB1;
1090 val_t tmp;
1091 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1092 fra.me.file = LOCATE_inheritance;
1093 fra.me.line = 243;
1094 fra.me.meth = LOCATE_inheritance___MMLocalClass___build_ancestors;
1095 fra.me.has_broke = 0;
1096 fra.me.REG_size = 5;
1097 fra.me.REG[0] = NIT_NULL;
1098 fra.me.REG[1] = NIT_NULL;
1099 fra.me.REG[2] = NIT_NULL;
1100 fra.me.REG[3] = NIT_NULL;
1101 fra.me.REG[4] = NIT_NULL;
1102 fra.me.REG[0] = p0;
1103 fra.me.REG[1] = NEW_Array_array___Array___init();
1104 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
1105 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1106 /* ./metamodel//inheritance.nit:248 */
1107 if (UNTAG_Bool(REGB0)) {
1108 } else {
1109 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1110 if (UNTAG_Bool(REGB1)) {
1111 REGB1 = TAG_Bool(false);
1112 REGB0 = REGB1;
1113 } else {
1114 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
1115 REGB0 = REGB1;
1116 }
1117 }
1118 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1119 if (UNTAG_Bool(REGB0)) {
1120 } else {
1121 fprintf(stderr, "Assert failed");
1122 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 248);
1123 nit_exit(1);
1124 }
1125 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
1126 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1127 /* ./metamodel//inheritance.nit:249 */
1128 if (UNTAG_Bool(REGB0)) {
1129 fprintf(stderr, "Reciever is null");
1130 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 249);
1131 nit_exit(1);
1132 }
1133 fra.me.REG[2] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[2])(fra.me.REG[2]);
1134 fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(fra.me.REG[2])(fra.me.REG[2]);
1135 while(1) {
1136 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
1137 if (UNTAG_Bool(REGB0)) {
1138 fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
1139 REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[0]));
1140 /* ./metamodel//inheritance.nit:250 */
1141 if (UNTAG_Bool(REGB0)) {
1142 } else {
1143 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[0]);
1144 REGB0 = REGB1;
1145 }
1146 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1147 if (UNTAG_Bool(REGB0)) {
1148 } else {
1149 fprintf(stderr, "Assert failed");
1150 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 250);
1151 nit_exit(1);
1152 }
1153 fra.me.REG[3] = NEW_MMRefineAncestor_inheritance___MMRefineAncestor___init(fra.me.REG[0], fra.me.REG[3]);
1154 /* ./metamodel//inheritance.nit:252 */
1155 CALL_inheritance___MMAncestor___add_in(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
1156 } else {
1157 /* ./metamodel//inheritance.nit:249 */
1158 goto label1;
1159 }
1160 CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
1161 }
1162 label1: while(0);
1163 REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0])!=NIT_NULL);
1164 /* ./metamodel//inheritance.nit:254 */
1165 if (UNTAG_Bool(REGB0)) {
1166 } else {
1167 fprintf(stderr, "Uninitialized attribute %s", "_direct_parents");
1168 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 254);
1169 nit_exit(1);
1170 }
1171 fra.me.REG[2] = ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0]);
1172 fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(fra.me.REG[2])(fra.me.REG[2]);
1173 while(1) {
1174 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
1175 if (UNTAG_Bool(REGB0)) {
1176 fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
1177 fra.me.REG[4] = CALL_static_type___MMAncestor___local_class(fra.me.REG[3])(fra.me.REG[3]);
1178 REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[4],fra.me.REG[0]));
1179 /* ./metamodel//inheritance.nit:255 */
1180 if (UNTAG_Bool(REGB0)) {
1181 } else {
1182 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
1183 REGB0 = REGB1;
1184 }
1185 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1186 if (UNTAG_Bool(REGB0)) {
1187 } else {
1188 fprintf(stderr, "Assert failed");
1189 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 255);
1190 nit_exit(1);
1191 }
1192 /* ./metamodel//inheritance.nit:256 */
1193 CALL_inheritance___MMAncestor___add_in(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
1194 } else {
1195 /* ./metamodel//inheritance.nit:254 */
1196 goto label2;
1197 }
1198 CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
1199 }
1200 label2: while(0);
1201 /* ./metamodel//inheritance.nit:258 */
1202 goto label3;
1203 label3: while(0);
1204 stack_frame_head = fra.me.prev;
1205 return fra.me.REG[1];
1206 }
1207 val_t inheritance___MMLocalClass___group_ancestors(val_t p0, val_t p1){
1208 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
1209 val_t REGB0;
1210 val_t tmp;
1211 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1212 fra.me.file = LOCATE_inheritance;
1213 fra.me.line = 261;
1214 fra.me.meth = LOCATE_inheritance___MMLocalClass___group_ancestors;
1215 fra.me.has_broke = 0;
1216 fra.me.REG_size = 6;
1217 fra.me.REG[0] = NIT_NULL;
1218 fra.me.REG[1] = NIT_NULL;
1219 fra.me.REG[2] = NIT_NULL;
1220 fra.me.REG[3] = NIT_NULL;
1221 fra.me.REG[4] = NIT_NULL;
1222 fra.me.REG[5] = NIT_NULL;
1223 fra.me.REG[0] = p0;
1224 fra.me.REG[1] = p1;
1225 fra.me.REG[0] = NEW_HashMap_hash_collection___HashMap___init();
1226 fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
1227 /* ./metamodel//inheritance.nit:266 */
1228 while(1) {
1229 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
1230 if (UNTAG_Bool(REGB0)) {
1231 fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
1232 fra.me.REG[3] = CALL_static_type___MMAncestor___local_class(fra.me.REG[2])(fra.me.REG[2]);
1233 /* ./metamodel//inheritance.nit:271 */
1234 CALL_inheritance___MMLocalClass___compute_ancestors(fra.me.REG[3])(fra.me.REG[3]);
1235 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
1236 /* ./metamodel//inheritance.nit:272 */
1237 if (UNTAG_Bool(REGB0)) {
1238 fra.me.REG[4] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
1239 /* ./metamodel//inheritance.nit:273 */
1240 } else {
1241 fra.me.REG[5] = NEW_HashSet_hash_collection___HashSet___init();
1242 fra.me.REG[4] = fra.me.REG[5];
1243 /* ./metamodel//inheritance.nit:276 */
1244 CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3], fra.me.REG[4]);
1245 }
1246 /* ./metamodel//inheritance.nit:278 */
1247 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
1248 } else {
1249 /* ./metamodel//inheritance.nit:266 */
1250 goto label1;
1251 }
1252 CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
1253 }
1254 label1: while(0);
1255 /* ./metamodel//inheritance.nit:280 */
1256 goto label2;
1257 label2: while(0);
1258 stack_frame_head = fra.me.prev;
1259 return fra.me.REG[0];
1260 }
1261 val_t inheritance___MMLocalClass___merge_ancestors(val_t p0, val_t p1){
1262 struct {struct stack_frame_t me; val_t MORE_REG[8];} fra;
1263 val_t REGB0;
1264 val_t REGB1;
1265 val_t REGB2;
1266 val_t tmp;
1267 static val_t once_value_3; /* Once value */
1268 static val_t once_value_4; /* Once value */
1269 static val_t once_value_5; /* Once value */
1270 static val_t once_value_6; /* Once value */
1271 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1272 fra.me.file = LOCATE_inheritance;
1273 fra.me.line = 283;
1274 fra.me.meth = LOCATE_inheritance___MMLocalClass___merge_ancestors;
1275 fra.me.has_broke = 0;
1276 fra.me.REG_size = 9;
1277 fra.me.REG[0] = NIT_NULL;
1278 fra.me.REG[1] = NIT_NULL;
1279 fra.me.REG[2] = NIT_NULL;
1280 fra.me.REG[3] = NIT_NULL;
1281 fra.me.REG[4] = NIT_NULL;
1282 fra.me.REG[5] = NIT_NULL;
1283 fra.me.REG[6] = NIT_NULL;
1284 fra.me.REG[7] = NIT_NULL;
1285 fra.me.REG[8] = NIT_NULL;
1286 fra.me.REG[0] = p0;
1287 fra.me.REG[1] = p1;
1288 fra.me.REG[2] = NEW_HashSet_hash_collection___HashSet___init();
1289 fra.me.REG[3] = NEW_Array_array___Array___init();
1290 fra.me.REG[4] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
1291 /* ./metamodel//inheritance.nit:288 */
1292 while(1) {
1293 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[4])(fra.me.REG[4]);
1294 if (UNTAG_Bool(REGB0)) {
1295 fra.me.REG[5] = CALL_abstract_collection___Iterator___item(fra.me.REG[4])(fra.me.REG[4]);
1296 fra.me.REG[6] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
1297 REGB0 = TAG_Bool(true);
1298 /* ./metamodel//inheritance.nit:291 */
1299 while(1) {
1300 REGB1 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[6])(fra.me.REG[6]);
1301 if (UNTAG_Bool(REGB1)) {
1302 REGB1 = REGB0;
1303 } else {
1304 REGB2 = TAG_Bool(false);
1305 REGB1 = REGB2;
1306 }
1307 if (UNTAG_Bool(REGB1)) {
1308 fra.me.REG[7] = CALL_abstract_collection___Iterator___item(fra.me.REG[6])(fra.me.REG[6]);
1309 REGB1 = TAG_Bool(IS_EQUAL_ON(fra.me.REG[5],fra.me.REG[7]));
1310 /* ./metamodel//inheritance.nit:293 */
1311 if (UNTAG_Bool(REGB1)) {
1312 } else {
1313 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[7]);
1314 REGB1 = REGB2;
1315 }
1316 fra.me.REG[7] = CALL_abstract_collection___Iterator___item(fra.me.REG[6])(fra.me.REG[6]);
1317 REGB1 = CALL_abstract_collection___Collection___has(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[7]);
1318 fra.me.REG[7] = CALL_abstract_collection___Iterator___item(fra.me.REG[6])(fra.me.REG[6]);
1319 REGB1 = TAG_Bool(fra.me.REG[7]==NIT_NULL);
1320 /* ./metamodel//inheritance.nit:295 */
1321 if (UNTAG_Bool(REGB1)) {
1322 fprintf(stderr, "Reciever is null");
1323 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 295);
1324 nit_exit(1);
1325 }
1326 fra.me.REG[7] = CALL_static_type___MMAncestor___stype(fra.me.REG[7])(fra.me.REG[7]);
1327 fra.me.REG[8] = CALL_static_type___MMAncestor___stype(fra.me.REG[5])(fra.me.REG[5]);
1328 REGB1 = CALL_static_type___MMType_____l(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
1329 fra.me.REG[8] = CALL_abstract_collection___Iterator___item(fra.me.REG[6])(fra.me.REG[6]);
1330 REGB1 = TAG_Bool(IS_EQUAL_ON(fra.me.REG[5],fra.me.REG[8]));
1331 /* ./metamodel//inheritance.nit:297 */
1332 if (UNTAG_Bool(REGB1)) {
1333 } else {
1334 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[8]);
1335 REGB1 = REGB2;
1336 }
1337 if (UNTAG_Bool(REGB1)) {
1338 REGB1 = TAG_Bool(true);
1339 } else {
1340 fra.me.REG[8] = CALL_abstract_collection___Iterator___item(fra.me.REG[6])(fra.me.REG[6]);
1341 REGB2 = CALL_abstract_collection___Collection___has(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[8]);
1342 REGB1 = REGB2;
1343 }
1344 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
1345 if (UNTAG_Bool(REGB1)) {
1346 fra.me.REG[8] = CALL_abstract_collection___Iterator___item(fra.me.REG[6])(fra.me.REG[6]);
1347 REGB1 = TAG_Bool(fra.me.REG[8]==NIT_NULL);
1348 /* ./metamodel//inheritance.nit:298 */
1349 if (UNTAG_Bool(REGB1)) {
1350 fprintf(stderr, "Reciever is null");
1351 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 298);
1352 nit_exit(1);
1353 }
1354 fra.me.REG[8] = CALL_static_type___MMAncestor___stype(fra.me.REG[8])(fra.me.REG[8]);
1355 fra.me.REG[7] = CALL_static_type___MMAncestor___stype(fra.me.REG[5])(fra.me.REG[5]);
1356 REGB1 = CALL_static_type___MMType_____l(fra.me.REG[8])(fra.me.REG[8], fra.me.REG[7]);
1357 /* ./metamodel//inheritance.nit:297 */
1358 } else {
1359 REGB2 = TAG_Bool(false);
1360 REGB1 = REGB2;
1361 }
1362 if (UNTAG_Bool(REGB1)) {
1363 /* ./metamodel//inheritance.nit:299 */
1364 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[5]);
1365 REGB1 = TAG_Bool(false);
1366 REGB0 = REGB1;
1367 /* ./metamodel//inheritance.nit:300 */
1368 }
1369 /* ./metamodel//inheritance.nit:302 */
1370 CALL_abstract_collection___Iterator___next(fra.me.REG[6])(fra.me.REG[6]);
1371 } else {
1372 /* ./metamodel//inheritance.nit:291 */
1373 goto label1;
1374 }
1375 }
1376 label1: while(0);
1377 REGB0 = CALL_abstract_collection___Collection___has(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[5]);
1378 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1379 /* ./metamodel//inheritance.nit:304 */
1380 if (UNTAG_Bool(REGB0)) {
1381 /* ./metamodel//inheritance.nit:305 */
1382 array___Array___add(fra.me.REG[3], fra.me.REG[5]);
1383 }
1384 } else {
1385 /* ./metamodel//inheritance.nit:288 */
1386 goto label2;
1387 }
1388 CALL_abstract_collection___Iterator___next(fra.me.REG[4])(fra.me.REG[4]);
1389 }
1390 label2: while(0);
1391 REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
1392 /* ./../lib/standard//collection//array.nit:23 */
1393 if (UNTAG_Bool(REGB0)) {
1394 } else {
1395 fprintf(stderr, "Uninitialized attribute %s", "_length");
1396 fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23);
1397 nit_exit(1);
1398 }
1399 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
1400 REGB1 = TAG_Int(1);
1401 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
1402 /* ./metamodel//inheritance.nit:309 */
1403 if (UNTAG_Bool(REGB1)) {
1404 fra.me.REG[4] = CALL_file___Object___stderr(fra.me.REG[0])(fra.me.REG[0]);
1405 REGB1 = TAG_Int(5);
1406 fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB1);
1407 /* ./metamodel//inheritance.nit:310 */
1408 if (!once_value_3) {
1409 fra.me.REG[1] = BOX_NativeString("Fatal error: Incompatibles ancestors for ");
1410 REGB1 = TAG_Int(41);
1411 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB1);
1412 once_value_3 = fra.me.REG[1];
1413 register_static_object(&once_value_3);
1414 } else fra.me.REG[1] = once_value_3;
1415 array___Array___add(fra.me.REG[2], fra.me.REG[1]);
1416 fra.me.REG[1] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
1417 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
1418 array___Array___add(fra.me.REG[2], fra.me.REG[1]);
1419 if (!once_value_4) {
1420 fra.me.REG[1] = BOX_NativeString(": ");
1421 REGB1 = TAG_Int(2);
1422 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB1);
1423 once_value_4 = fra.me.REG[1];
1424 register_static_object(&once_value_4);
1425 } else fra.me.REG[1] = once_value_4;
1426 array___Array___add(fra.me.REG[2], fra.me.REG[1]);
1427 if (!once_value_5) {
1428 fra.me.REG[1] = BOX_NativeString(", ");
1429 REGB1 = TAG_Int(2);
1430 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB1);
1431 once_value_5 = fra.me.REG[1];
1432 register_static_object(&once_value_5);
1433 } else fra.me.REG[1] = once_value_5;
1434 fra.me.REG[1] = CALL_string___Collection___join(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
1435 array___Array___add(fra.me.REG[2], fra.me.REG[1]);
1436 if (!once_value_6) {
1437 fra.me.REG[1] = BOX_NativeString("\n");
1438 REGB1 = TAG_Int(1);
1439 fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB1);
1440 once_value_6 = fra.me.REG[1];
1441 register_static_object(&once_value_6);
1442 } else fra.me.REG[1] = once_value_6;
1443 array___Array___add(fra.me.REG[2], fra.me.REG[1]);
1444 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
1445 CALL_stream___OStream___write(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
1446 REGB1 = TAG_Int(1);
1447 /* ./metamodel//inheritance.nit:311 */
1448 CALL_kernel___Object___exit(fra.me.REG[0])(fra.me.REG[0], REGB1);
1449 }
1450 fra.me.REG[3] = CALL_abstract_collection___Collection___first(fra.me.REG[3])(fra.me.REG[3]);
1451 /* ./metamodel//inheritance.nit:313 */
1452 goto label7;
1453 label7: while(0);
1454 stack_frame_head = fra.me.prev;
1455 return fra.me.REG[3];
1456 }
1457 val_t inheritance___MMLocalClass___inherit_local_property(val_t p0, val_t p1){
1458 struct {struct stack_frame_t me; val_t MORE_REG[7];} fra;
1459 val_t REGB0;
1460 val_t REGB1;
1461 val_t REGB2;
1462 val_t tmp;
1463 static val_t once_value_2; /* Once value */
1464 static val_t once_value_3; /* Once value */
1465 static val_t once_value_4; /* Once value */
1466 static val_t once_value_5; /* Once value */
1467 static val_t once_value_6; /* Once value */
1468 static val_t once_value_7; /* Once value */
1469 static val_t once_value_8; /* Once value */
1470 static val_t once_value_10; /* Once value */
1471 static val_t once_value_11; /* Once value */
1472 static val_t once_value_12; /* Once value */
1473 static val_t once_value_13; /* Once value */
1474 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1475 fra.me.file = LOCATE_inheritance;
1476 fra.me.line = 316;
1477 fra.me.meth = LOCATE_inheritance___MMLocalClass___inherit_local_property;
1478 fra.me.has_broke = 0;
1479 fra.me.REG_size = 8;
1480 fra.me.REG[0] = NIT_NULL;
1481 fra.me.REG[1] = NIT_NULL;
1482 fra.me.REG[2] = NIT_NULL;
1483 fra.me.REG[3] = NIT_NULL;
1484 fra.me.REG[4] = NIT_NULL;
1485 fra.me.REG[5] = NIT_NULL;
1486 fra.me.REG[6] = NIT_NULL;
1487 fra.me.REG[7] = NIT_NULL;
1488 fra.me.REG[0] = p0;
1489 fra.me.REG[1] = p1;
1490 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0])!=NIT_NULL);
1491 /* ./metamodel//inheritance.nit:321 */
1492 if (UNTAG_Bool(REGB0)) {
1493 } else {
1494 fprintf(stderr, "Uninitialized attribute %s", "_local_property_by_global");
1495 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 321);
1496 nit_exit(1);
1497 }
1498 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0]);
1499 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
1500 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1501 if (UNTAG_Bool(REGB0)) {
1502 } else {
1503 fprintf(stderr, "Assert failed");
1504 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 321);
1505 nit_exit(1);
1506 }
1507 fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy(fra.me.REG[1])(fra.me.REG[1]);
1508 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[0])(fra.me.REG[0]);
1509 fra.me.REG[3] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[3])(fra.me.REG[3]);
1510 REGB0 = CALL_abstract_collection___Collection___length(fra.me.REG[2])(fra.me.REG[2]);
1511 REGB1 = TAG_Int(1);
1512 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
1513 /* ./metamodel//inheritance.nit:327 */
1514 if (UNTAG_Bool(REGB2)) {
1515 } else {
1516 REGB1 = TAG_Bool((REGB0)==(REGB1));
1517 REGB2 = REGB1;
1518 /* ./metamodel//inheritance.nit:327 */
1519 }
1520 if (UNTAG_Bool(REGB2)) {
1521 fra.me.REG[4] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[1])(fra.me.REG[1]);
1522 /* ./metamodel//inheritance.nit:329 */
1523 } else {
1524 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
1525 /* ./../lib/standard//collection//array.nit:23 */
1526 if (UNTAG_Bool(REGB2)) {
1527 } else {
1528 fprintf(stderr, "Uninitialized attribute %s", "_length");
1529 fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23);
1530 nit_exit(1);
1531 }
1532 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
1533 REGB1 = TAG_Int(1);
1534 REGB0 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1));
1535 /* ./metamodel//inheritance.nit:330 */
1536 if (UNTAG_Bool(REGB0)) {
1537 } else {
1538 REGB1 = TAG_Bool((REGB2)==(REGB1));
1539 REGB0 = REGB1;
1540 /* ./metamodel//inheritance.nit:330 */
1541 }
1542 if (UNTAG_Bool(REGB0)) {
1543 fra.me.REG[5] = CALL_abstract_collection___Collection___first(fra.me.REG[3])(fra.me.REG[3]);
1544 REGB0 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
1545 /* ./metamodel//inheritance.nit:332 */
1546 if (UNTAG_Bool(REGB0)) {
1547 fprintf(stderr, "Reciever is null");
1548 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 332);
1549 nit_exit(1);
1550 }
1551 fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass_____bra(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[1]);
1552 fra.me.REG[4] = fra.me.REG[5];
1553 } else {
1554 fra.me.REG[5] = NEW_ArraySet_array___ArraySet___init();
1555 fra.me.REG[3] = CALL_abstract_collection___Collection___iterator(fra.me.REG[3])(fra.me.REG[3]);
1556 /* ./metamodel//inheritance.nit:337 */
1557 while(1) {
1558 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[3])(fra.me.REG[3]);
1559 if (UNTAG_Bool(REGB0)) {
1560 fra.me.REG[6] = CALL_abstract_collection___Iterator___item(fra.me.REG[3])(fra.me.REG[3]);
1561 REGB0 = CALL_abstractmetamodel___MMLocalClass___has_global_property(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[1]);
1562 /* ./metamodel//inheritance.nit:338 */
1563 if (UNTAG_Bool(REGB0)) {
1564 fra.me.REG[6] = CALL_abstractmetamodel___MMLocalClass_____bra(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[1]);
1565 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[6]);
1566 }
1567 } else {
1568 /* ./metamodel//inheritance.nit:337 */
1569 goto label1;
1570 }
1571 CALL_abstract_collection___Iterator___next(fra.me.REG[3])(fra.me.REG[3]);
1572 }
1573 label1: while(0);
1574 fra.me.REG[5] = CALL_partial_order___PartialOrder___select_smallests(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[5]);
1575 REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[5])!=NIT_NULL);
1576 /* ./../lib/standard//collection//array.nit:23 */
1577 if (UNTAG_Bool(REGB0)) {
1578 } else {
1579 fprintf(stderr, "Uninitialized attribute %s", "_length");
1580 fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23);
1581 nit_exit(1);
1582 }
1583 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[5]);
1584 REGB1 = TAG_Int(1);
1585 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
1586 /* ./metamodel//inheritance.nit:343 */
1587 if (UNTAG_Bool(REGB2)) {
1588 } else {
1589 REGB1 = TAG_Bool((REGB0)==(REGB1));
1590 REGB2 = REGB1;
1591 /* ./metamodel//inheritance.nit:343 */
1592 }
1593 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
1594 if (UNTAG_Bool(REGB2)) {
1595 fra.me.REG[2] = CALL_file___Object___stderr(fra.me.REG[0])(fra.me.REG[0]);
1596 /* ./metamodel//inheritance.nit:344 */
1597 if (!once_value_2) {
1598 fra.me.REG[3] = BOX_NativeString("Fatal error: inherit_local_property error\n");
1599 REGB2 = TAG_Int(42);
1600 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB2);
1601 once_value_2 = fra.me.REG[3];
1602 register_static_object(&once_value_2);
1603 } else fra.me.REG[3] = once_value_2;
1604 CALL_stream___OStream___write(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
1605 REGB2 = TAG_Int(7);
1606 fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB2);
1607 /* ./metamodel//inheritance.nit:345 */
1608 if (!once_value_3) {
1609 fra.me.REG[2] = BOX_NativeString("------- ");
1610 REGB2 = TAG_Int(8);
1611 fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
1612 once_value_3 = fra.me.REG[2];
1613 register_static_object(&once_value_3);
1614 } else fra.me.REG[2] = once_value_3;
1615 array___Array___add(fra.me.REG[3], fra.me.REG[2]);
1616 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___module(fra.me.REG[0])(fra.me.REG[0]);
1617 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
1618 array___Array___add(fra.me.REG[3], fra.me.REG[2]);
1619 if (!once_value_4) {
1620 fra.me.REG[2] = BOX_NativeString("::");
1621 REGB2 = TAG_Int(2);
1622 fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
1623 once_value_4 = fra.me.REG[2];
1624 register_static_object(&once_value_4);
1625 } else fra.me.REG[2] = once_value_4;
1626 array___Array___add(fra.me.REG[3], fra.me.REG[2]);
1627 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
1628 array___Array___add(fra.me.REG[3], fra.me.REG[2]);
1629 if (!once_value_5) {
1630 fra.me.REG[2] = BOX_NativeString(" ");
1631 REGB2 = TAG_Int(1);
1632 fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
1633 once_value_5 = fra.me.REG[2];
1634 register_static_object(&once_value_5);
1635 } else fra.me.REG[2] = once_value_5;
1636 array___Array___add(fra.me.REG[3], fra.me.REG[2]);
1637 fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[1])(fra.me.REG[1]);
1638 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalProperty___full_name(fra.me.REG[2])(fra.me.REG[2]);
1639 array___Array___add(fra.me.REG[3], fra.me.REG[2]);
1640 if (!once_value_6) {
1641 fra.me.REG[2] = BOX_NativeString("");
1642 REGB2 = TAG_Int(0);
1643 fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
1644 once_value_6 = fra.me.REG[2];
1645 register_static_object(&once_value_6);
1646 } else fra.me.REG[2] = once_value_6;
1647 array___Array___add(fra.me.REG[3], fra.me.REG[2]);
1648 fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
1649 CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
1650 fra.me.REG[3] = CALL_abstract_collection___Collection___iterator(fra.me.REG[5])(fra.me.REG[5]);
1651 /* ./metamodel//inheritance.nit:346 */
1652 while(1) {
1653 REGB2 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[3])(fra.me.REG[3]);
1654 if (UNTAG_Bool(REGB2)) {
1655 fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[3])(fra.me.REG[3]);
1656 REGB2 = TAG_Int(3);
1657 fra.me.REG[6] = NEW_Array_array___Array___with_capacity(REGB2);
1658 /* ./metamodel//inheritance.nit:347 */
1659 if (!once_value_7) {
1660 fra.me.REG[7] = BOX_NativeString(" ");
1661 REGB2 = TAG_Int(3);
1662 fra.me.REG[7] = NEW_String_string___String___with_native(fra.me.REG[7], REGB2);
1663 once_value_7 = fra.me.REG[7];
1664 register_static_object(&once_value_7);
1665 } else fra.me.REG[7] = once_value_7;
1666 array___Array___add(fra.me.REG[6], fra.me.REG[7]);
1667 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalProperty___full_name(fra.me.REG[2])(fra.me.REG[2]);
1668 array___Array___add(fra.me.REG[6], fra.me.REG[2]);
1669 if (!once_value_8) {
1670 fra.me.REG[2] = BOX_NativeString("");
1671 REGB2 = TAG_Int(0);
1672 fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
1673 once_value_8 = fra.me.REG[2];
1674 register_static_object(&once_value_8);
1675 } else fra.me.REG[2] = once_value_8;
1676 array___Array___add(fra.me.REG[6], fra.me.REG[2]);
1677 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
1678 CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[6]);
1679 } else {
1680 /* ./metamodel//inheritance.nit:346 */
1681 goto label9;
1682 }
1683 CALL_abstract_collection___Iterator___next(fra.me.REG[3])(fra.me.REG[3]);
1684 }
1685 label9: while(0);
1686 REGB2 = TAG_Int(3);
1687 fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB2);
1688 /* ./metamodel//inheritance.nit:349 */
1689 if (!once_value_10) {
1690 fra.me.REG[6] = BOX_NativeString("------- ");
1691 REGB2 = TAG_Int(8);
1692 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
1693 once_value_10 = fra.me.REG[6];
1694 register_static_object(&once_value_10);
1695 } else fra.me.REG[6] = once_value_10;
1696 array___Array___add(fra.me.REG[3], fra.me.REG[6]);
1697 fra.me.REG[6] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy(fra.me.REG[1])(fra.me.REG[1]);
1698 fra.me.REG[6] = CALL_abstract_collection___Collection___first(fra.me.REG[6])(fra.me.REG[6]);
1699 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
1700 array___Array___add(fra.me.REG[3], fra.me.REG[6]);
1701 if (!once_value_11) {
1702 fra.me.REG[6] = BOX_NativeString("");
1703 REGB2 = TAG_Int(0);
1704 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
1705 once_value_11 = fra.me.REG[6];
1706 register_static_object(&once_value_11);
1707 } else fra.me.REG[6] = once_value_11;
1708 array___Array___add(fra.me.REG[3], fra.me.REG[6]);
1709 fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
1710 CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
1711 REGB2 = TAG_Int(3);
1712 fra.me.REG[3] = NEW_Array_array___Array___with_capacity(REGB2);
1713 /* ./metamodel//inheritance.nit:350 */
1714 if (!once_value_12) {
1715 fra.me.REG[6] = BOX_NativeString("------- ");
1716 REGB2 = TAG_Int(8);
1717 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
1718 once_value_12 = fra.me.REG[6];
1719 register_static_object(&once_value_12);
1720 } else fra.me.REG[6] = once_value_12;
1721 array___Array___add(fra.me.REG[3], fra.me.REG[6]);
1722 fra.me.REG[6] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy(fra.me.REG[1])(fra.me.REG[1]);
1723 fra.me.REG[6] = CALL_partial_order___PartialOrder___to_dot(fra.me.REG[6])(fra.me.REG[6]);
1724 array___Array___add(fra.me.REG[3], fra.me.REG[6]);
1725 if (!once_value_13) {
1726 fra.me.REG[6] = BOX_NativeString("");
1727 REGB2 = TAG_Int(0);
1728 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
1729 once_value_13 = fra.me.REG[6];
1730 register_static_object(&once_value_13);
1731 } else fra.me.REG[6] = once_value_13;
1732 array___Array___add(fra.me.REG[3], fra.me.REG[6]);
1733 fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
1734 CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
1735 REGB2 = TAG_Int(1);
1736 /* ./metamodel//inheritance.nit:351 */
1737 CALL_kernel___Object___exit(fra.me.REG[0])(fra.me.REG[0], REGB2);
1738 }
1739 fra.me.REG[5] = CALL_abstract_collection___Collection___first(fra.me.REG[5])(fra.me.REG[5]);
1740 fra.me.REG[4] = fra.me.REG[5];
1741 /* ./metamodel//inheritance.nit:353 */
1742 }
1743 }
1744 REGB2 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0])!=NIT_NULL);
1745 /* ./metamodel//inheritance.nit:363 */
1746 if (UNTAG_Bool(REGB2)) {
1747 } else {
1748 fprintf(stderr, "Uninitialized attribute %s", "_local_property_by_global");
1749 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 363);
1750 nit_exit(1);
1751 }
1752 fra.me.REG[0] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0]);
1753 CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[4]);
1754 /* ./metamodel//inheritance.nit:365 */
1755 goto label14;
1756 label14: while(0);
1757 stack_frame_head = fra.me.prev;
1758 return fra.me.REG[4];
1759 }
1760 void inheritance___MMLocalProperty___inherit_global(val_t p0, val_t p1){
1761 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
1762 val_t REGB0;
1763 val_t tmp;
1764 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1765 fra.me.file = LOCATE_inheritance;
1766 fra.me.line = 370;
1767 fra.me.meth = LOCATE_inheritance___MMLocalProperty___inherit_global;
1768 fra.me.has_broke = 0;
1769 fra.me.REG_size = 5;
1770 fra.me.REG[0] = NIT_NULL;
1771 fra.me.REG[1] = NIT_NULL;
1772 fra.me.REG[2] = NIT_NULL;
1773 fra.me.REG[3] = NIT_NULL;
1774 fra.me.REG[4] = NIT_NULL;
1775 fra.me.REG[0] = p0;
1776 fra.me.REG[1] = p1;
1777 /* ./metamodel//inheritance.nit:373 */
1778 CALL_abstractmetamodel___MMLocalProperty___set_global(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
1779 fra.me.REG[2] = NEW_Array_array___Array___init();
1780 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalProperty___local_class(fra.me.REG[0])(fra.me.REG[0]);
1781 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[3])(fra.me.REG[3]);
1782 fra.me.REG[3] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[3])(fra.me.REG[3]);
1783 fra.me.REG[3] = CALL_abstract_collection___Collection___iterator(fra.me.REG[3])(fra.me.REG[3]);
1784 /* ./metamodel//inheritance.nit:375 */
1785 while(1) {
1786 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[3])(fra.me.REG[3]);
1787 if (UNTAG_Bool(REGB0)) {
1788 fra.me.REG[4] = CALL_abstract_collection___Iterator___item(fra.me.REG[3])(fra.me.REG[3]);
1789 REGB0 = CALL_abstractmetamodel___MMLocalClass___has_global_property(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
1790 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1791 /* ./metamodel//inheritance.nit:376 */
1792 if (UNTAG_Bool(REGB0)) {
1793 goto label1;
1794 }
1795 fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass_____bra(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
1796 /* ./metamodel//inheritance.nit:377 */
1797 array___Array___add(fra.me.REG[2], fra.me.REG[4]);
1798 label1: while(0);
1799 } else {
1800 /* ./metamodel//inheritance.nit:375 */
1801 goto label2;
1802 }
1803 CALL_abstract_collection___Iterator___next(fra.me.REG[3])(fra.me.REG[3]);
1804 }
1805 label2: while(0);
1806 /* ./metamodel//inheritance.nit:379 */
1807 CALL_abstractmetamodel___MMGlobalProperty___add_local_property(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], fra.me.REG[2]);
1808 stack_frame_head = fra.me.prev;
1809 return;
1810 }
1811 void inheritance___MMAncestor___add_in(val_t p0, val_t p1){
1812 struct {struct stack_frame_t me; val_t MORE_REG[6];} fra;
1813 val_t REGB0;
1814 val_t REGB1;
1815 val_t REGB2;
1816 val_t tmp;
1817 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1818 fra.me.file = LOCATE_inheritance;
1819 fra.me.line = 384;
1820 fra.me.meth = LOCATE_inheritance___MMAncestor___add_in;
1821 fra.me.has_broke = 0;
1822 fra.me.REG_size = 7;
1823 fra.me.REG[0] = NIT_NULL;
1824 fra.me.REG[1] = NIT_NULL;
1825 fra.me.REG[2] = NIT_NULL;
1826 fra.me.REG[3] = NIT_NULL;
1827 fra.me.REG[4] = NIT_NULL;
1828 fra.me.REG[5] = NIT_NULL;
1829 fra.me.REG[6] = NIT_NULL;
1830 fra.me.REG[0] = p0;
1831 fra.me.REG[1] = p1;
1832 /* ./metamodel//inheritance.nit:387 */
1833 array___Array___add(fra.me.REG[1], fra.me.REG[0]);
1834 fra.me.REG[2] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
1835 fra.me.REG[2] = CALL_static_type___MMType___local_class(fra.me.REG[2])(fra.me.REG[2]);
1836 /* ./metamodel//inheritance.nit:388 */
1837 CALL_inheritance___MMLocalClass___compute_ancestors(fra.me.REG[2])(fra.me.REG[2]);
1838 fra.me.REG[2] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
1839 fra.me.REG[2] = CALL_static_type___MMType___local_class(fra.me.REG[2])(fra.me.REG[2]);
1840 fra.me.REG[2] = CALL_static_type___MMLocalClass___ancestors(fra.me.REG[2])(fra.me.REG[2]);
1841 REGB0 = TAG_Bool((fra.me.REG[2]!=NIT_NULL) && VAL_ISA(fra.me.REG[2], COLOR_Map, ID_Map)) /*cast Map[MMLocalClass, MMAncestor]*/;
1842 /* ./metamodel//inheritance.nit:389 */
1843 if (UNTAG_Bool(REGB0)) {
1844 } else {
1845 fprintf(stderr, "Cast failed");
1846 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 389);
1847 nit_exit(1);
1848 }
1849 fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(fra.me.REG[2])(fra.me.REG[2]);
1850 while(1) {
1851 REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
1852 if (UNTAG_Bool(REGB0)) {
1853 fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
1854 fra.me.REG[3] = CALL_static_type___MMAncestor___stype(fra.me.REG[3])(fra.me.REG[3]);
1855 fra.me.REG[4] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
1856 fra.me.REG[4] = CALL_static_type___MMType___module(fra.me.REG[4])(fra.me.REG[4]);
1857 fra.me.REG[4] = CALL_static_type___MMType___for_module(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
1858 fra.me.REG[3] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
1859 fra.me.REG[3] = CALL_static_type___MMType___adapt_to(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
1860 fra.me.REG[4] = CALL_static_type___MMAncestor___inheriter(fra.me.REG[0])(fra.me.REG[0]);
1861 fra.me.REG[4] = CALL_static_type___MMType___module(fra.me.REG[4])(fra.me.REG[4]);
1862 fra.me.REG[4] = CALL_static_type___MMType___for_module(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
1863 fra.me.REG[3] = CALL_static_type___MMType___local_class(fra.me.REG[4])(fra.me.REG[4]);
1864 fra.me.REG[5] = CALL_static_type___MMAncestor___inheriter(fra.me.REG[0])(fra.me.REG[0]);
1865 fra.me.REG[5] = CALL_static_type___MMType___local_class(fra.me.REG[5])(fra.me.REG[5]);
1866 REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[5]));
1867 /* ./metamodel//inheritance.nit:392 */
1868 if (UNTAG_Bool(REGB0)) {
1869 } else {
1870 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[5]);
1871 REGB0 = REGB1;
1872 }
1873 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1874 if (UNTAG_Bool(REGB0)) {
1875 fra.me.REG[5] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
1876 REGB0 = TAG_Bool(true);
1877 /* ./metamodel//inheritance.nit:395 */
1878 while(1) {
1879 REGB1 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[5])(fra.me.REG[5]);
1880 if (UNTAG_Bool(REGB1)) {
1881 REGB1 = REGB0;
1882 } else {
1883 REGB2 = TAG_Bool(false);
1884 REGB1 = REGB2;
1885 }
1886 if (UNTAG_Bool(REGB1)) {
1887 fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[5])(fra.me.REG[5]);
1888 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
1889 /* ./metamodel//inheritance.nit:396 */
1890 if (UNTAG_Bool(REGB1)) {
1891 fprintf(stderr, "Reciever is null");
1892 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 396);
1893 nit_exit(1);
1894 }
1895 fra.me.REG[3] = CALL_static_type___MMAncestor___inheriter(fra.me.REG[3])(fra.me.REG[3]);
1896 fra.me.REG[6] = CALL_static_type___MMAncestor___inheriter(fra.me.REG[0])(fra.me.REG[0]);
1897 REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[6]));
1898 if (UNTAG_Bool(REGB1)) {
1899 } else {
1900 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[6]);
1901 REGB1 = REGB2;
1902 }
1903 if (UNTAG_Bool(REGB1)) {
1904 fra.me.REG[6] = CALL_abstract_collection___Iterator___item(fra.me.REG[5])(fra.me.REG[5]);
1905 REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
1906 if (UNTAG_Bool(REGB1)) {
1907 fprintf(stderr, "Reciever is null");
1908 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 396);
1909 nit_exit(1);
1910 }
1911 fra.me.REG[6] = CALL_static_type___MMAncestor___stype(fra.me.REG[6])(fra.me.REG[6]);
1912 REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[6],fra.me.REG[4]));
1913 if (UNTAG_Bool(REGB1)) {
1914 } else {
1915 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[4]);
1916 REGB1 = REGB2;
1917 }
1918 } else {
1919 REGB2 = TAG_Bool(false);
1920 REGB1 = REGB2;
1921 }
1922 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
1923 REGB0 = REGB1;
1924 /* ./metamodel//inheritance.nit:397 */
1925 CALL_abstract_collection___Iterator___next(fra.me.REG[5])(fra.me.REG[5]);
1926 } else {
1927 /* ./metamodel//inheritance.nit:395 */
1928 goto label1;
1929 }
1930 }
1931 label1: while(0);
1932 /* ./metamodel//inheritance.nit:399 */
1933 if (UNTAG_Bool(REGB0)) {
1934 fra.me.REG[5] = CALL_static_type___MMAncestor___inheriter(fra.me.REG[0])(fra.me.REG[0]);
1935 fra.me.REG[4] = NEW_MMSpecAncestor_inheritance___MMSpecAncestor___init(fra.me.REG[5], fra.me.REG[4]);
1936 /* ./metamodel//inheritance.nit:400 */
1937 array___Array___add(fra.me.REG[1], fra.me.REG[4]);
1938 }
1939 }
1940 } else {
1941 /* ./metamodel//inheritance.nit:389 */
1942 goto label2;
1943 }
1944 CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
1945 }
1946 label2: while(0);
1947 stack_frame_head = fra.me.prev;
1948 return;
1949 }
1950 void inheritance___MMImplicitLocalClass___init(val_t p0, val_t p1, val_t p2, int* init_table){
1951 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMImplicitLocalClass].i;
1952 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
1953 val_t REGB0;
1954 val_t tmp;
1955 if (init_table[itpos0]) return;
1956 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1957 fra.me.file = LOCATE_inheritance;
1958 fra.me.line = 412;
1959 fra.me.meth = LOCATE_inheritance___MMImplicitLocalClass___init;
1960 fra.me.has_broke = 0;
1961 fra.me.REG_size = 6;
1962 fra.me.REG[0] = NIT_NULL;
1963 fra.me.REG[1] = NIT_NULL;
1964 fra.me.REG[2] = NIT_NULL;
1965 fra.me.REG[3] = NIT_NULL;
1966 fra.me.REG[4] = NIT_NULL;
1967 fra.me.REG[5] = NIT_NULL;
1968 fra.me.REG[0] = p0;
1969 fra.me.REG[1] = p1;
1970 fra.me.REG[2] = p2;
1971 fra.me.REG[3] = fra.me.REG[0];
1972 fra.me.REG[4] = CALL_abstractmetamodel___MMGlobalClass___intro(fra.me.REG[2])(fra.me.REG[2]);
1973 fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[4])(fra.me.REG[4]);
1974 REGB0 = CALL_abstractmetamodel___MMLocalClass___arity(fra.me.REG[4])(fra.me.REG[4]);
1975 /* ./metamodel//inheritance.nit:415 */
1976 CALL_abstractmetamodel___MMLocalClass___init(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[5], REGB0, init_table);
1977 /* ./metamodel//inheritance.nit:416 */
1978 CALL_abstractmetamodel___MMLocalClass___set_global(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
1979 stack_frame_head = fra.me.prev;
1980 init_table[itpos0] = 1;
1981 return;
1982 }
1983 val_t inheritance___MMRefineAncestor___local_class(val_t p0){
1984 struct {struct stack_frame_t me;} fra;
1985 val_t REGB0;
1986 val_t tmp;
1987 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1988 fra.me.file = LOCATE_inheritance;
1989 fra.me.line = 422;
1990 fra.me.meth = LOCATE_inheritance___MMRefineAncestor___local_class;
1991 fra.me.has_broke = 0;
1992 fra.me.REG_size = 1;
1993 fra.me.REG[0] = NIT_NULL;
1994 fra.me.REG[0] = p0;
1995 REGB0 = TAG_Bool(ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[0])!=NIT_NULL);
1996 /* ./metamodel//inheritance.nit:422 */
1997 if (UNTAG_Bool(REGB0)) {
1998 } else {
1999 fprintf(stderr, "Uninitialized attribute %s", "_local_class");
2000 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 422);
2001 nit_exit(1);
2002 }
2003 fra.me.REG[0] = ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[0]);
2004 stack_frame_head = fra.me.prev;
2005 return fra.me.REG[0];
2006 }
2007 void inheritance___MMRefineAncestor___init(val_t p0, val_t p1, val_t p2, int* init_table){
2008 int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMRefineAncestor].i;
2009 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2010 val_t REGB0;
2011 val_t tmp;
2012 if (init_table[itpos1]) return;
2013 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2014 fra.me.file = LOCATE_inheritance;
2015 fra.me.line = 424;
2016 fra.me.meth = LOCATE_inheritance___MMRefineAncestor___init;
2017 fra.me.has_broke = 0;
2018 fra.me.REG_size = 4;
2019 fra.me.REG[0] = NIT_NULL;
2020 fra.me.REG[1] = NIT_NULL;
2021 fra.me.REG[2] = NIT_NULL;
2022 fra.me.REG[3] = NIT_NULL;
2023 fra.me.REG[0] = p0;
2024 fra.me.REG[1] = p1;
2025 fra.me.REG[2] = p2;
2026 fra.me.REG[3] = fra.me.REG[0];
2027 /* ./metamodel//inheritance.nit:424 */
2028 CALL_static_type___MMAncestor___init(fra.me.REG[0])(fra.me.REG[0], init_table);
2029 /* ./metamodel//inheritance.nit:426 */
2030 ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[3]) = fra.me.REG[2];
2031 fra.me.REG[1] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
2032 /* ./metamodel//inheritance.nit:427 */
2033 CALL_static_type___MMAncestor___inheriter__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
2034 REGB0 = TAG_Bool(ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[3])!=NIT_NULL);
2035 /* ./metamodel//inheritance.nit:428 */
2036 if (UNTAG_Bool(REGB0)) {
2037 } else {
2038 fprintf(stderr, "Uninitialized attribute %s", "_local_class");
2039 fprintf(stderr, " (%s:%d)\n", LOCATE_inheritance, 428);
2040 nit_exit(1);
2041 }
2042 fra.me.REG[1] = ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[3]);
2043 fra.me.REG[1] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
2044 CALL_static_type___MMAncestor___stype__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
2045 stack_frame_head = fra.me.prev;
2046 init_table[itpos1] = 1;
2047 return;
2048 }
2049 val_t inheritance___MMSpecAncestor___local_class(val_t p0){
2050 struct {struct stack_frame_t me;} fra;
2051 val_t tmp;
2052 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2053 fra.me.file = LOCATE_inheritance;
2054 fra.me.line = 435;
2055 fra.me.meth = LOCATE_inheritance___MMSpecAncestor___local_class;
2056 fra.me.has_broke = 0;
2057 fra.me.REG_size = 1;
2058 fra.me.REG[0] = NIT_NULL;
2059 fra.me.REG[0] = p0;
2060 fra.me.REG[0] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
2061 fra.me.REG[0] = CALL_static_type___MMType___local_class(fra.me.REG[0])(fra.me.REG[0]);
2062 /* ./metamodel//inheritance.nit:435 */
2063 goto label1;
2064 label1: while(0);
2065 stack_frame_head = fra.me.prev;
2066 return fra.me.REG[0];
2067 }
2068 void inheritance___MMSpecAncestor___init(val_t p0, val_t p1, val_t p2, int* init_table){
2069 int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMSpecAncestor].i;
2070 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2071 val_t tmp;
2072 if (init_table[itpos2]) return;
2073 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2074 fra.me.file = LOCATE_inheritance;
2075 fra.me.line = 437;
2076 fra.me.meth = LOCATE_inheritance___MMSpecAncestor___init;
2077 fra.me.has_broke = 0;
2078 fra.me.REG_size = 4;
2079 fra.me.REG[0] = NIT_NULL;
2080 fra.me.REG[1] = NIT_NULL;
2081 fra.me.REG[2] = NIT_NULL;
2082 fra.me.REG[3] = NIT_NULL;
2083 fra.me.REG[0] = p0;
2084 fra.me.REG[1] = p1;
2085 fra.me.REG[2] = p2;
2086 fra.me.REG[3] = fra.me.REG[0];
2087 /* ./metamodel//inheritance.nit:437 */
2088 CALL_static_type___MMAncestor___init(fra.me.REG[0])(fra.me.REG[0], init_table);
2089 /* ./metamodel//inheritance.nit:439 */
2090 ATTR_static_type___MMAncestor____inheriter(fra.me.REG[3]) = fra.me.REG[1];
2091 /* ./metamodel//inheritance.nit:440 */
2092 ATTR_static_type___MMAncestor____stype(fra.me.REG[3]) = fra.me.REG[2];
2093 stack_frame_head = fra.me.prev;
2094 init_table[itpos2] = 1;
2095 return;
2096 }
2097 val_t inheritance___MMDefaultAncestor___local_class(val_t p0){
2098 struct {struct stack_frame_t me;} fra;
2099 val_t tmp;
2100 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2101 fra.me.file = LOCATE_inheritance;
2102 fra.me.line = 446;
2103 fra.me.meth = LOCATE_inheritance___MMDefaultAncestor___local_class;
2104 fra.me.has_broke = 0;
2105 fra.me.REG_size = 1;
2106 fra.me.REG[0] = NIT_NULL;
2107 fra.me.REG[0] = p0;
2108 fra.me.REG[0] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
2109 fra.me.REG[0] = CALL_static_type___MMType___local_class(fra.me.REG[0])(fra.me.REG[0]);
2110 /* ./metamodel//inheritance.nit:446 */
2111 goto label1;
2112 label1: while(0);
2113 stack_frame_head = fra.me.prev;
2114 return fra.me.REG[0];
2115 }
2116 void inheritance___MMDefaultAncestor___init(val_t p0, val_t p1, val_t p2, int* init_table){
2117 int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMDefaultAncestor].i;
2118 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2119 val_t tmp;
2120 if (init_table[itpos3]) return;
2121 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2122 fra.me.file = LOCATE_inheritance;
2123 fra.me.line = 448;
2124 fra.me.meth = LOCATE_inheritance___MMDefaultAncestor___init;
2125 fra.me.has_broke = 0;
2126 fra.me.REG_size = 4;
2127 fra.me.REG[0] = NIT_NULL;
2128 fra.me.REG[1] = NIT_NULL;
2129 fra.me.REG[2] = NIT_NULL;
2130 fra.me.REG[3] = NIT_NULL;
2131 fra.me.REG[0] = p0;
2132 fra.me.REG[1] = p1;
2133 fra.me.REG[2] = p2;
2134 fra.me.REG[3] = fra.me.REG[0];
2135 /* ./metamodel//inheritance.nit:448 */
2136 CALL_static_type___MMAncestor___init(fra.me.REG[0])(fra.me.REG[0], init_table);
2137 fra.me.REG[1] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
2138 /* ./metamodel//inheritance.nit:450 */
2139 CALL_static_type___MMAncestor___inheriter__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
2140 /* ./metamodel//inheritance.nit:451 */
2141 CALL_static_type___MMAncestor___stype__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
2142 stack_frame_head = fra.me.prev;
2143 init_table[itpos3] = 1;
2144 return;
2145 }