update NOTICE and LICENSE
[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] = fra.me.REG[1];
28 fra.me.REG[1] = CALL_symbol___String___to_symbol(fra.me.REG[1])(fra.me.REG[1]);
29 once_value_1 = fra.me.REG[1];
30 register_static_object(&once_value_1);
31 } else fra.me.REG[1] = once_value_1;
32 fra.me.REG[1] = fra.me.REG[1];
33 fra.me.REG[1] = CALL_abstractmetamodel___MMModule___class_by_name(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
34 /* ./metamodel//inheritance.nit:28 */
35 fra.me.REG[1] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
36 goto label3;
37 label3: while(0);
38 stack_frame_head = fra.me.prev;
39 return fra.me.REG[1];
40 }
41 void inheritance___MMModule___import_global_classes(val_t p0){
42 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
43 val_t REGB0;
44 val_t REGB1;
45 val_t tmp;
46 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
47 fra.me.file = LOCATE_inheritance;
48 fra.me.line = 31;
49 fra.me.meth = LOCATE_inheritance___MMModule___import_global_classes;
50 fra.me.has_broke = 0;
51 fra.me.REG_size = 4;
52 fra.me.REG[0] = NIT_NULL;
53 fra.me.REG[1] = NIT_NULL;
54 fra.me.REG[2] = NIT_NULL;
55 fra.me.REG[3] = NIT_NULL;
56 fra.me.REG[0] = p0;
57 /* ./metamodel//inheritance.nit:34 */
58 fra.me.REG[1] = NEW_HashMap_hash_collection___HashMap___init();
59 /* ./metamodel//inheritance.nit:35 */
60 fra.me.REG[1] = CALL_abstractmetamodel___MMModule___mhe(fra.me.REG[0])(fra.me.REG[0]);
61 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
62 if (UNTAG_Bool(REGB0)) {
63 } else {
64 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
65 if (UNTAG_Bool(REGB1)) {
66 REGB1 = TAG_Bool(false);
67 REGB0 = REGB1;
68 } else {
69 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
70 REGB0 = REGB1;
71 }
72 }
73 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
74 if (UNTAG_Bool(REGB0)) {
75 } else {
76 nit_abort("Assert failed", NULL, LOCATE_inheritance, 35);
77 }
78 /* ./metamodel//inheritance.nit:36 */
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 if (UNTAG_Bool(REGB0)) {
82 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 36);
83 }
84 fra.me.REG[1] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[1])(fra.me.REG[1]);
85 /* ./../lib/standard//collection//array.nit:234 */
86 REGB0 = TAG_Int(0);
87 /* ./../lib/standard//collection//array.nit:235 */
88 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
89 if (UNTAG_Bool(REGB1)) {
90 } else {
91 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
92 }
93 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
94 /* ./../lib/standard//collection//array.nit:236 */
95 fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[1]);
96 /* ./../lib/standard//collection//array.nit:237 */
97 while(1) {
98 /* ./../lib/standard//collection//array.nit:23 */
99 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
100 if (UNTAG_Bool(REGB1)) {
101 } else {
102 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
103 }
104 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
105 /* ./../lib/standard//kernel.nit:212 */
106 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
107 /* ./../lib/standard//collection//array.nit:237 */
108 if (UNTAG_Bool(REGB1)) {
109 /* ./../lib/standard//collection//array.nit:238 */
110 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
111 if (UNTAG_Bool(REGB1)) {
112 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
113 }
114 /* ./../lib/standard//collection//array.nit:654 */
115 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
116 /* ./metamodel//inheritance.nit:37 */
117 fra.me.REG[3] = CALL_abstractmetamodel___MMModule___global_classes(fra.me.REG[3])(fra.me.REG[3]);
118 CALL_abstract_collection___Collection___iterate(fra.me.REG[3])(fra.me.REG[3], (&(fra.me)), ((fun_t)OC_inheritance___MMModule___import_global_classes_1));
119 /* ./../lib/standard//collection//array.nit:239 */
120 REGB1 = TAG_Int(1);
121 /* ./../lib/standard//kernel.nit:215 */
122 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
123 /* ./../lib/standard//collection//array.nit:239 */
124 REGB0 = REGB1;
125 } else {
126 /* ./../lib/standard//collection//array.nit:237 */
127 goto label3;
128 }
129 }
130 label3: while(0);
131 stack_frame_head = fra.me.prev;
132 return;
133 }
134 void OC_inheritance___MMModule___import_global_classes_1(struct stack_frame_t *closctx, val_t p0){
135 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
136 val_t REGB0;
137 val_t tmp;
138 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
139 fra.me.file = LOCATE_inheritance;
140 fra.me.line = 0;
141 fra.me.meth = LOCATE_inheritance___MMModule___import_global_classes;
142 fra.me.has_broke = 0;
143 fra.me.REG_size = 3;
144 fra.me.REG[0] = NIT_NULL;
145 fra.me.REG[1] = NIT_NULL;
146 fra.me.REG[2] = NIT_NULL;
147 fra.me.REG[0] = p0;
148 /* ./metamodel//inheritance.nit:38 */
149 fra.me.REG[1] = CALL_abstractmetamodel___MMModule___global_classes(closctx->REG[0])(closctx->REG[0]);
150 REGB0 = CALL_abstract_collection___Collection___has(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
151 if (UNTAG_Bool(REGB0)) {
152 goto label2;
153 }
154 /* ./metamodel//inheritance.nit:39 */
155 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMModule____global_classes(closctx->REG[0])!=NIT_NULL);
156 if (UNTAG_Bool(REGB0)) {
157 } else {
158 nit_abort("Uninitialized attribute %s", "_global_classes", LOCATE_inheritance, 39);
159 }
160 fra.me.REG[1] = ATTR_abstractmetamodel___MMModule____global_classes(closctx->REG[0]);
161 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
162 /* ./metamodel//inheritance.nit:40 */
163 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMModule____global_class_by_name(closctx->REG[0])!=NIT_NULL);
164 if (UNTAG_Bool(REGB0)) {
165 } else {
166 nit_abort("Uninitialized attribute %s", "_global_class_by_name", LOCATE_inheritance, 40);
167 }
168 fra.me.REG[1] = ATTR_abstractmetamodel___MMModule____global_class_by_name(closctx->REG[0]);
169 fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalClass___name(fra.me.REG[0])(fra.me.REG[0]);
170 CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2], fra.me.REG[0]);
171 label2: while(0);
172 stack_frame_head = fra.me.prev;
173 return;
174 }
175 void inheritance___MMModule___import_local_classes(val_t p0){
176 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
177 val_t REGB0;
178 val_t tmp;
179 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
180 fra.me.file = LOCATE_inheritance;
181 fra.me.line = 46;
182 fra.me.meth = LOCATE_inheritance___MMModule___import_local_classes;
183 fra.me.has_broke = 0;
184 fra.me.REG_size = 2;
185 fra.me.REG[0] = NIT_NULL;
186 fra.me.REG[1] = NIT_NULL;
187 fra.me.REG[0] = p0;
188 /* ./metamodel//inheritance.nit:49 */
189 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMModule____global_classes(fra.me.REG[0])!=NIT_NULL);
190 if (UNTAG_Bool(REGB0)) {
191 } else {
192 nit_abort("Uninitialized attribute %s", "_global_classes", LOCATE_inheritance, 49);
193 }
194 fra.me.REG[1] = ATTR_abstractmetamodel___MMModule____global_classes(fra.me.REG[0]);
195 CALL_abstract_collection___Collection___iterate(fra.me.REG[1])(fra.me.REG[1], (&(fra.me)), ((fun_t)OC_inheritance___MMModule___import_local_classes_1));
196 stack_frame_head = fra.me.prev;
197 return;
198 }
199 void OC_inheritance___MMModule___import_local_classes_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
200 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
201 val_t REGB0;
202 fun_t CREG[1];
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 = 0;
207 fra.me.meth = LOCATE_inheritance___MMModule___import_local_classes;
208 fra.me.has_broke = 0;
209 fra.me.REG_size = 2;
210 fra.me.REG[0] = NIT_NULL;
211 fra.me.REG[1] = NIT_NULL;
212 fra.me.closure_ctx = closctx_param;
213 fra.me.closure_funs = CREG;
214 fra.me.REG[0] = p0;
215 CREG[0] = clos_fun0;
216 /* ./metamodel//inheritance.nit:50 */
217 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMModule____local_class_by_global(closctx->REG[0])!=NIT_NULL);
218 if (UNTAG_Bool(REGB0)) {
219 } else {
220 nit_abort("Uninitialized attribute %s", "_local_class_by_global", LOCATE_inheritance, 50);
221 }
222 fra.me.REG[1] = ATTR_abstractmetamodel___MMModule____local_class_by_global(closctx->REG[0]);
223 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
224 if (UNTAG_Bool(REGB0)) {
225 goto label2;
226 }
227 /* ./metamodel//inheritance.nit:51 */
228 fra.me.REG[0] = NEW_MMImplicitLocalClass_inheritance___MMImplicitLocalClass___init(closctx->REG[0], fra.me.REG[0]);
229 label2: while(0);
230 stack_frame_head = fra.me.prev;
231 return;
232 }
233 void inheritance___MMLocalClass___compute_super_classes(val_t p0){
234 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
235 val_t REGB0;
236 val_t REGB1;
237 val_t tmp;
238 static val_t once_value_2; /* Once value */
239 static val_t once_value_3; /* Once value */
240 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
241 fra.me.file = LOCATE_inheritance;
242 fra.me.line = 64;
243 fra.me.meth = LOCATE_inheritance___MMLocalClass___compute_super_classes;
244 fra.me.has_broke = 0;
245 fra.me.REG_size = 4;
246 fra.me.REG[0] = NIT_NULL;
247 fra.me.REG[1] = NIT_NULL;
248 fra.me.REG[2] = NIT_NULL;
249 fra.me.REG[3] = NIT_NULL;
250 fra.me.REG[0] = p0;
251 /* ./metamodel//inheritance.nit:67 */
252 REGB0 = CALL_inheritance___MMLocalClass___computed_super_classes(fra.me.REG[0])(fra.me.REG[0]);
253 if (UNTAG_Bool(REGB0)) {
254 /* ./metamodel//inheritance.nit:69 */
255 goto label1;
256 } else {
257 /* ./metamodel//inheritance.nit:70 */
258 REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____computing_super(fra.me.REG[0])!=NIT_NULL);
259 if (UNTAG_Bool(REGB0)) {
260 } else {
261 nit_abort("Uninitialized attribute %s", "_computing_super", LOCATE_inheritance, 70);
262 }
263 REGB0 = ATTR_inheritance___MMLocalClass____computing_super(fra.me.REG[0]);
264 if (UNTAG_Bool(REGB0)) {
265 /* ./metamodel//inheritance.nit:71 */
266 fra.me.REG[1] = CALL_file___Object___stderr(fra.me.REG[0])(fra.me.REG[0]);
267 REGB0 = TAG_Int(3);
268 fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
269 if (!once_value_2) {
270 fra.me.REG[3] = BOX_NativeString("Fatal error: Inheritance loop for class ");
271 REGB0 = TAG_Int(40);
272 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
273 once_value_2 = fra.me.REG[3];
274 register_static_object(&once_value_2);
275 } else fra.me.REG[3] = once_value_2;
276 fra.me.REG[3] = fra.me.REG[3];
277 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
278 fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
279 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
280 if (!once_value_3) {
281 fra.me.REG[3] = BOX_NativeString("\n");
282 REGB0 = TAG_Int(1);
283 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
284 once_value_3 = fra.me.REG[3];
285 register_static_object(&once_value_3);
286 } else fra.me.REG[3] = once_value_3;
287 fra.me.REG[3] = fra.me.REG[3];
288 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
289 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
290 CALL_stream___OStream___write(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
291 /* ./metamodel//inheritance.nit:72 */
292 REGB0 = TAG_Int(1);
293 CALL_kernel___Object___exit(fra.me.REG[0])(fra.me.REG[0], REGB0);
294 }
295 }
296 /* ./metamodel//inheritance.nit:74 */
297 REGB0 = TAG_Bool(true);
298 ATTR_inheritance___MMLocalClass____computing_super(fra.me.REG[0]) = REGB0;
299 /* ./metamodel//inheritance.nit:76 */
300 fra.me.REG[2] = NEW_Array_array___Array___init();
301 /* ./metamodel//inheritance.nit:77 */
302 CALL_inheritance___MMLocalClass___add_explicit_classes(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
303 /* ./metamodel//inheritance.nit:78 */
304 CALL_inheritance___MMLocalClass___add_super_classes(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
305 /* ./metamodel//inheritance.nit:79 */
306 CALL_inheritance___MMLocalClass___add_default_any_class(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
307 /* ./metamodel//inheritance.nit:80 */
308 CALL_inheritance___MMLocalClass___compute_super_parents(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
309 /* ./metamodel//inheritance.nit:81 */
310 fra.me.REG[1] = NEW_HashSet_hash_collection___HashSet___init();
311 /* ./metamodel//inheritance.nit:82 */
312 CALL_abstract_collection___SimpleCollection___add_all(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
313 /* ./metamodel//inheritance.nit:83 */
314 fra.me.REG[1] = CALL_array___Collection___to_a(fra.me.REG[1])(fra.me.REG[1]);
315 /* ./metamodel//inheritance.nit:84 */
316 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___mmmodule(fra.me.REG[0])(fra.me.REG[0]);
317 CALL_abstractmetamodel___MMModule___set_supers_class(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0], fra.me.REG[1]);
318 /* ./metamodel//inheritance.nit:85 */
319 fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
320 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
321 if (UNTAG_Bool(REGB0)) {
322 } else {
323 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
324 if (UNTAG_Bool(REGB1)) {
325 REGB1 = TAG_Bool(false);
326 REGB0 = REGB1;
327 } else {
328 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
329 REGB0 = REGB1;
330 }
331 }
332 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
333 if (UNTAG_Bool(REGB0)) {
334 } else {
335 nit_abort("Assert failed", NULL, LOCATE_inheritance, 85);
336 }
337 /* ./metamodel//inheritance.nit:86 */
338 fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____cshe(fra.me.REG[0]);
339 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
340 if (UNTAG_Bool(REGB0)) {
341 } else {
342 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
343 if (UNTAG_Bool(REGB1)) {
344 REGB1 = TAG_Bool(false);
345 REGB0 = REGB1;
346 } else {
347 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
348 REGB0 = REGB1;
349 }
350 }
351 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
352 if (UNTAG_Bool(REGB0)) {
353 } else {
354 nit_abort("Assert failed", NULL, LOCATE_inheritance, 86);
355 }
356 /* ./metamodel//inheritance.nit:87 */
357 REGB0 = TAG_Bool(false);
358 ATTR_inheritance___MMLocalClass____computing_super(fra.me.REG[0]) = REGB0;
359 label1: while(0);
360 stack_frame_head = fra.me.prev;
361 return;
362 }
363 void inheritance___MMLocalClass___compute_ancestors(val_t p0){
364 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
365 val_t REGB0;
366 val_t tmp;
367 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
368 fra.me.file = LOCATE_inheritance;
369 fra.me.line = 90;
370 fra.me.meth = LOCATE_inheritance___MMLocalClass___compute_ancestors;
371 fra.me.has_broke = 0;
372 fra.me.REG_size = 3;
373 fra.me.REG[0] = NIT_NULL;
374 fra.me.REG[1] = NIT_NULL;
375 fra.me.REG[2] = NIT_NULL;
376 fra.me.REG[0] = p0;
377 /* ./metamodel//inheritance.nit:93 */
378 REGB0 = CALL_inheritance___MMLocalClass___computed_super_classes(fra.me.REG[0])(fra.me.REG[0]);
379 if (UNTAG_Bool(REGB0)) {
380 } else {
381 nit_abort("Assert failed", NULL, LOCATE_inheritance, 93);
382 }
383 /* ./metamodel//inheritance.nit:94 */
384 REGB0 = CALL_inheritance___MMLocalClass___computed_ancestors(fra.me.REG[0])(fra.me.REG[0]);
385 if (UNTAG_Bool(REGB0)) {
386 goto label1;
387 }
388 /* ./metamodel//inheritance.nit:96 */
389 fra.me.REG[1] = CALL_inheritance___MMLocalClass___build_ancestors(fra.me.REG[0])(fra.me.REG[0]);
390 fra.me.REG[1] = CALL_inheritance___MMLocalClass___group_ancestors(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
391 /* ./metamodel//inheritance.nit:97 */
392 fra.me.REG[2] = NEW_HashMap_hash_collection___HashMap___init();
393 ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]) = fra.me.REG[2];
394 CALL_abstract_collection___Collection___iterate(fra.me.REG[1])(fra.me.REG[1], (&(fra.me)), ((fun_t)OC_inheritance___MMLocalClass___compute_ancestors_2));
395 label1: while(0);
396 stack_frame_head = fra.me.prev;
397 return;
398 }
399 void OC_inheritance___MMLocalClass___compute_ancestors_2(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
400 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
401 val_t REGB0;
402 val_t REGB1;
403 val_t REGB2;
404 fun_t CREG[1];
405 val_t tmp;
406 /* ./metamodel//inheritance.nit:99 */
407 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
408 fra.me.file = LOCATE_inheritance;
409 fra.me.line = 0;
410 fra.me.meth = LOCATE_inheritance___MMLocalClass___compute_ancestors;
411 fra.me.has_broke = 0;
412 fra.me.REG_size = 2;
413 fra.me.REG[0] = NIT_NULL;
414 fra.me.REG[1] = NIT_NULL;
415 fra.me.closure_ctx = closctx_param;
416 fra.me.closure_funs = CREG;
417 fra.me.REG[0] = p0;
418 CREG[0] = clos_fun0;
419 /* ./metamodel//inheritance.nit:100 */
420 REGB0 = CALL_abstract_collection___Collection___length(fra.me.REG[0])(fra.me.REG[0]);
421 REGB1 = TAG_Int(1);
422 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
423 if (UNTAG_Bool(REGB2)) {
424 } else {
425 /* ./../lib/standard//kernel.nit:207 */
426 REGB1 = TAG_Bool((REGB0)==(REGB1));
427 /* ./metamodel//inheritance.nit:100 */
428 REGB2 = REGB1;
429 }
430 if (UNTAG_Bool(REGB2)) {
431 /* ./metamodel//inheritance.nit:101 */
432 fra.me.REG[1] = CALL_abstract_collection___Collection___first(fra.me.REG[0])(fra.me.REG[0]);
433 CALL_static_type___MMLocalClass___add_ancestor(closctx->REG[0])(closctx->REG[0], fra.me.REG[1]);
434 } else {
435 /* ./metamodel//inheritance.nit:103 */
436 fra.me.REG[1] = CALL_inheritance___MMLocalClass___merge_ancestors(closctx->REG[0])(closctx->REG[0], fra.me.REG[0]);
437 /* ./metamodel//inheritance.nit:104 */
438 fra.me.REG[0] = CALL_inheritance___MMLocalClass___merge_ancestors(closctx->REG[0])(closctx->REG[0], fra.me.REG[0]);
439 CALL_static_type___MMLocalClass___add_ancestor(closctx->REG[0])(closctx->REG[0], fra.me.REG[0]);
440 }
441 stack_frame_head = fra.me.prev;
442 return;
443 }
444 void inheritance___MMLocalClass___inherit_global_properties(val_t p0){
445 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
446 val_t REGB0;
447 val_t REGB1;
448 val_t tmp;
449 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
450 fra.me.file = LOCATE_inheritance;
451 fra.me.line = 111;
452 fra.me.meth = LOCATE_inheritance___MMLocalClass___inherit_global_properties;
453 fra.me.has_broke = 0;
454 fra.me.REG_size = 5;
455 fra.me.REG[0] = NIT_NULL;
456 fra.me.REG[1] = NIT_NULL;
457 fra.me.REG[2] = NIT_NULL;
458 fra.me.REG[3] = NIT_NULL;
459 fra.me.REG[4] = NIT_NULL;
460 fra.me.REG[0] = p0;
461 /* ./metamodel//inheritance.nit:114 */
462 REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0])!=NIT_NULL);
463 if (UNTAG_Bool(REGB0)) {
464 } else {
465 nit_abort("Uninitialized attribute %s", "_are_global_properties_inherited", LOCATE_inheritance, 114);
466 }
467 REGB0 = ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0]);
468 if (UNTAG_Bool(REGB0)) {
469 goto label1;
470 }
471 /* ./metamodel//inheritance.nit:115 */
472 REGB0 = TAG_Bool(true);
473 ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0]) = REGB0;
474 /* ./metamodel//inheritance.nit:117 */
475 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
476 if (UNTAG_Bool(REGB0)) {
477 } else {
478 nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 117);
479 }
480 fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
481 /* ./metamodel//inheritance.nit:118 */
482 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0])!=NIT_NULL);
483 if (UNTAG_Bool(REGB0)) {
484 } else {
485 nit_abort("Uninitialized attribute %s", "_global_properties", LOCATE_inheritance, 118);
486 }
487 fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0]);
488 /* ./metamodel//inheritance.nit:119 */
489 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[0])(fra.me.REG[0]);
490 fra.me.REG[2] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[2])(fra.me.REG[2]);
491 /* ./../lib/standard//collection//array.nit:234 */
492 REGB0 = TAG_Int(0);
493 /* ./../lib/standard//collection//array.nit:235 */
494 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
495 if (UNTAG_Bool(REGB1)) {
496 } else {
497 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
498 }
499 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
500 /* ./../lib/standard//collection//array.nit:236 */
501 fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[2]);
502 /* ./../lib/standard//collection//array.nit:237 */
503 while(1) {
504 /* ./../lib/standard//collection//array.nit:23 */
505 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
506 if (UNTAG_Bool(REGB1)) {
507 } else {
508 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
509 }
510 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
511 /* ./../lib/standard//kernel.nit:212 */
512 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
513 /* ./../lib/standard//collection//array.nit:237 */
514 if (UNTAG_Bool(REGB1)) {
515 /* ./../lib/standard//collection//array.nit:238 */
516 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
517 if (UNTAG_Bool(REGB1)) {
518 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
519 }
520 /* ./../lib/standard//collection//array.nit:654 */
521 fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB0)];
522 /* ./metamodel//inheritance.nit:120 */
523 fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___global_properties(fra.me.REG[4])(fra.me.REG[4]);
524 CALL_abstract_collection___Collection___iterate(fra.me.REG[4])(fra.me.REG[4], (&(fra.me)), ((fun_t)OC_inheritance___MMLocalClass___inherit_global_properties_2));
525 /* ./../lib/standard//collection//array.nit:239 */
526 REGB1 = TAG_Int(1);
527 /* ./../lib/standard//kernel.nit:215 */
528 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
529 /* ./../lib/standard//collection//array.nit:239 */
530 REGB0 = REGB1;
531 } else {
532 /* ./../lib/standard//collection//array.nit:237 */
533 goto label4;
534 }
535 }
536 label4: while(0);
537 label1: while(0);
538 stack_frame_head = fra.me.prev;
539 return;
540 }
541 void OC_inheritance___MMLocalClass___inherit_global_properties_2(struct stack_frame_t *closctx, val_t p0){
542 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
543 val_t REGB0;
544 val_t REGB1;
545 val_t REGB2;
546 val_t tmp;
547 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
548 fra.me.file = LOCATE_inheritance;
549 fra.me.line = 0;
550 fra.me.meth = LOCATE_inheritance___MMLocalClass___inherit_global_properties;
551 fra.me.has_broke = 0;
552 fra.me.REG_size = 3;
553 fra.me.REG[0] = NIT_NULL;
554 fra.me.REG[1] = NIT_NULL;
555 fra.me.REG[2] = NIT_NULL;
556 fra.me.REG[0] = p0;
557 /* ./metamodel//inheritance.nit:121 */
558 REGB0 = CALL_abstract_collection___Collection___has(closctx->REG[1])(closctx->REG[1], fra.me.REG[0]);
559 if (UNTAG_Bool(REGB0)) {
560 goto label3;
561 }
562 /* ./metamodel//inheritance.nit:123 */
563 CALL_abstract_collection___SimpleCollection___add(closctx->REG[1])(closctx->REG[1], fra.me.REG[0]);
564 /* ./metamodel//inheritance.nit:127 */
565 REGB0 = CALL_abstractmetamodel___MMGlobalProperty___is_init(fra.me.REG[0])(fra.me.REG[0]);
566 if (UNTAG_Bool(REGB0)) {
567 fra.me.REG[1] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[0])(fra.me.REG[0]);
568 fra.me.REG[1] = CALL_abstractmetamodel___MMLocalProperty___local_class(fra.me.REG[1])(fra.me.REG[1]);
569 fra.me.REG[1] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[1])(fra.me.REG[1]);
570 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___global(closctx->REG[0])(closctx->REG[0]);
571 REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[1],fra.me.REG[2]));
572 if (UNTAG_Bool(REGB0)) {
573 } else {
574 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
575 REGB0 = REGB1;
576 }
577 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
578 } else {
579 REGB1 = TAG_Bool(false);
580 REGB0 = REGB1;
581 }
582 if (UNTAG_Bool(REGB0)) {
583 /* ./metamodel//inheritance.nit:129 */
584 goto label3;
585 }
586 /* ./metamodel//inheritance.nit:133 */
587 fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[0])(fra.me.REG[0]);
588 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalProperty___name(fra.me.REG[2])(fra.me.REG[2]);
589 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
590 REGB0 = TAG_Int(0);
591 REGB0 = CALL_abstract_collection___MapRead_____bra(fra.me.REG[2])(fra.me.REG[2], REGB0);
592 REGB1 = TAG_Char('@');
593 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
594 if (UNTAG_Bool(REGB2)) {
595 } else {
596 /* ./../lib/standard//kernel.nit:347 */
597 REGB1 = TAG_Bool((REGB0)==(REGB1));
598 /* ./metamodel//inheritance.nit:133 */
599 REGB2 = REGB1;
600 }
601 if (UNTAG_Bool(REGB2)) {
602 goto label3;
603 }
604 /* ./metamodel//inheritance.nit:135 */
605 CALL_inheritance___MMLocalClass___make_visible_an_inherited_global_property(closctx->REG[0])(closctx->REG[0], fra.me.REG[0]);
606 label3: while(0);
607 stack_frame_head = fra.me.prev;
608 return;
609 }
610 val_t inheritance___MMLocalClass___global_properties(val_t p0){
611 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
612 val_t REGB0;
613 val_t tmp;
614 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
615 fra.me.file = LOCATE_inheritance;
616 fra.me.line = 140;
617 fra.me.meth = LOCATE_inheritance___MMLocalClass___global_properties;
618 fra.me.has_broke = 0;
619 fra.me.REG_size = 2;
620 fra.me.REG[0] = NIT_NULL;
621 fra.me.REG[1] = NIT_NULL;
622 fra.me.REG[0] = p0;
623 /* ./metamodel//inheritance.nit:142 */
624 REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0])!=NIT_NULL);
625 if (UNTAG_Bool(REGB0)) {
626 } else {
627 nit_abort("Uninitialized attribute %s", "_are_global_properties_inherited", LOCATE_inheritance, 142);
628 }
629 REGB0 = ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0]);
630 if (UNTAG_Bool(REGB0)) {
631 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0])!=NIT_NULL);
632 if (UNTAG_Bool(REGB0)) {
633 } else {
634 nit_abort("Uninitialized attribute %s", "_global_properties", LOCATE_inheritance, 142);
635 }
636 fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0]);
637 goto label1;
638 }
639 /* ./metamodel//inheritance.nit:143 */
640 REGB0 = CALL_inheritance___MMLocalClass___computed_super_classes(fra.me.REG[0])(fra.me.REG[0]);
641 if (UNTAG_Bool(REGB0)) {
642 } else {
643 nit_abort("Assert failed", NULL, LOCATE_inheritance, 143);
644 }
645 /* ./metamodel//inheritance.nit:144 */
646 CALL_inheritance___MMLocalClass___inherit_global_properties(fra.me.REG[0])(fra.me.REG[0]);
647 /* ./metamodel//inheritance.nit:145 */
648 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0])!=NIT_NULL);
649 if (UNTAG_Bool(REGB0)) {
650 } else {
651 nit_abort("Uninitialized attribute %s", "_global_properties", LOCATE_inheritance, 145);
652 }
653 fra.me.REG[0] = ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0]);
654 fra.me.REG[1] = fra.me.REG[0];
655 goto label1;
656 label1: while(0);
657 stack_frame_head = fra.me.prev;
658 return fra.me.REG[1];
659 }
660 val_t inheritance___MMLocalClass___has_global_property(val_t p0, val_t p1){
661 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
662 val_t REGB0;
663 val_t REGB1;
664 val_t REGB2;
665 val_t tmp;
666 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
667 fra.me.file = LOCATE_inheritance;
668 fra.me.line = 148;
669 fra.me.meth = LOCATE_inheritance___MMLocalClass___has_global_property;
670 fra.me.has_broke = 0;
671 fra.me.REG_size = 5;
672 fra.me.REG[0] = NIT_NULL;
673 fra.me.REG[1] = NIT_NULL;
674 fra.me.REG[2] = NIT_NULL;
675 fra.me.REG[3] = NIT_NULL;
676 fra.me.REG[4] = NIT_NULL;
677 fra.me.REG[0] = p0;
678 fra.me.REG[1] = p1;
679 /* ./metamodel//inheritance.nit:152 */
680 REGB0 = CALL_inheritance___MMLocalClass___computed_super_classes(fra.me.REG[0])(fra.me.REG[0]);
681 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
682 if (UNTAG_Bool(REGB0)) {
683 REGB0 = TAG_Bool(false);
684 goto label1;
685 }
686 /* ./metamodel//inheritance.nit:154 */
687 REGB1 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0])!=NIT_NULL);
688 if (UNTAG_Bool(REGB1)) {
689 } else {
690 nit_abort("Uninitialized attribute %s", "_global_properties", LOCATE_inheritance, 154);
691 }
692 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0]);
693 /* ./metamodel//inheritance.nit:155 */
694 REGB1 = CALL_abstract_collection___Collection___has(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
695 if (UNTAG_Bool(REGB1)) {
696 REGB1 = TAG_Bool(true);
697 REGB0 = REGB1;
698 goto label1;
699 }
700 /* ./metamodel//inheritance.nit:156 */
701 fra.me.REG[0] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[0])(fra.me.REG[0]);
702 fra.me.REG[0] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[0])(fra.me.REG[0]);
703 /* ./../lib/standard//collection//array.nit:234 */
704 REGB1 = TAG_Int(0);
705 /* ./../lib/standard//collection//array.nit:235 */
706 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
707 if (UNTAG_Bool(REGB2)) {
708 } else {
709 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
710 }
711 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
712 /* ./../lib/standard//collection//array.nit:236 */
713 fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[0]);
714 /* ./../lib/standard//collection//array.nit:237 */
715 while(1) {
716 /* ./../lib/standard//collection//array.nit:23 */
717 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
718 if (UNTAG_Bool(REGB2)) {
719 } else {
720 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
721 }
722 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
723 /* ./../lib/standard//kernel.nit:212 */
724 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
725 /* ./../lib/standard//collection//array.nit:237 */
726 if (UNTAG_Bool(REGB2)) {
727 /* ./../lib/standard//collection//array.nit:238 */
728 REGB2 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
729 if (UNTAG_Bool(REGB2)) {
730 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
731 }
732 /* ./../lib/standard//collection//array.nit:654 */
733 fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB1)];
734 /* ./metamodel//inheritance.nit:157 */
735 REGB2 = CALL_abstractmetamodel___MMLocalClass___has_global_property(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
736 if (UNTAG_Bool(REGB2)) {
737 /* ./metamodel//inheritance.nit:158 */
738 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
739 /* ./metamodel//inheritance.nit:159 */
740 REGB2 = TAG_Bool(true);
741 REGB0 = REGB2;
742 goto label1;
743 }
744 /* ./../lib/standard//collection//array.nit:239 */
745 REGB2 = TAG_Int(1);
746 /* ./../lib/standard//kernel.nit:215 */
747 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
748 /* ./../lib/standard//collection//array.nit:239 */
749 REGB1 = REGB2;
750 } else {
751 /* ./../lib/standard//collection//array.nit:237 */
752 goto label2;
753 }
754 }
755 label2: while(0);
756 /* ./metamodel//inheritance.nit:162 */
757 REGB1 = TAG_Bool(false);
758 REGB0 = REGB1;
759 goto label1;
760 label1: while(0);
761 stack_frame_head = fra.me.prev;
762 return REGB0;
763 }
764 val_t inheritance___MMLocalClass___has_global_property_by_name(val_t p0, val_t p1){
765 struct {struct stack_frame_t me; val_t MORE_REG[8];} fra;
766 val_t REGB0;
767 val_t REGB1;
768 val_t REGB2;
769 val_t REGB3;
770 val_t REGB4;
771 val_t tmp;
772 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
773 fra.me.file = LOCATE_inheritance;
774 fra.me.line = 165;
775 fra.me.meth = LOCATE_inheritance___MMLocalClass___has_global_property_by_name;
776 fra.me.has_broke = 0;
777 fra.me.REG_size = 9;
778 fra.me.REG[0] = NIT_NULL;
779 fra.me.REG[1] = NIT_NULL;
780 fra.me.REG[2] = NIT_NULL;
781 fra.me.REG[3] = NIT_NULL;
782 fra.me.REG[4] = NIT_NULL;
783 fra.me.REG[5] = NIT_NULL;
784 fra.me.REG[6] = NIT_NULL;
785 fra.me.REG[7] = NIT_NULL;
786 fra.me.REG[8] = NIT_NULL;
787 fra.me.REG[0] = p0;
788 fra.me.REG[1] = p1;
789 /* ./metamodel//inheritance.nit:169 */
790 REGB0 = CALL_inheritance___MMLocalClass___computed_super_classes(fra.me.REG[0])(fra.me.REG[0]);
791 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
792 if (UNTAG_Bool(REGB0)) {
793 REGB0 = TAG_Bool(false);
794 goto label1;
795 }
796 /* ./metamodel//inheritance.nit:172 */
797 CALL_inheritance___MMLocalClass___compute_super_classes(fra.me.REG[0])(fra.me.REG[0]);
798 /* ./metamodel//inheritance.nit:174 */
799 REGB1 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
800 if (UNTAG_Bool(REGB1)) {
801 } else {
802 nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 174);
803 }
804 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
805 REGB1 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
806 if (UNTAG_Bool(REGB1)) {
807 /* ./metamodel//inheritance.nit:175 */
808 REGB1 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
809 if (UNTAG_Bool(REGB1)) {
810 } else {
811 nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 175);
812 }
813 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
814 fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
815 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
816 if (UNTAG_Bool(REGB1)) {
817 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 175);
818 }
819 /* ./../lib/standard//collection//array.nit:23 */
820 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
821 if (UNTAG_Bool(REGB1)) {
822 } else {
823 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
824 }
825 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
826 /* ./metamodel//inheritance.nit:175 */
827 REGB2 = TAG_Int(1);
828 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB2));
829 if (UNTAG_Bool(REGB3)) {
830 } else {
831 /* ./../lib/standard//kernel.nit:207 */
832 REGB2 = TAG_Bool((REGB1)==(REGB2));
833 /* ./metamodel//inheritance.nit:175 */
834 REGB3 = REGB2;
835 }
836 REGB0 = REGB3;
837 goto label1;
838 }
839 /* ./metamodel//inheritance.nit:177 */
840 REGB3 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0])!=NIT_NULL);
841 if (UNTAG_Bool(REGB3)) {
842 } else {
843 nit_abort("Uninitialized attribute %s", "_global_properties", LOCATE_inheritance, 177);
844 }
845 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0]);
846 /* ./metamodel//inheritance.nit:179 */
847 REGB3 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
848 if (UNTAG_Bool(REGB3)) {
849 } else {
850 nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 179);
851 }
852 fra.me.REG[3] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
853 REGB3 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
854 if (UNTAG_Bool(REGB3)) {
855 /* ./metamodel//inheritance.nit:180 */
856 REGB3 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
857 if (UNTAG_Bool(REGB3)) {
858 } else {
859 nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 180);
860 }
861 fra.me.REG[3] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
862 fra.me.REG[3] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
863 } else {
864 /* ./metamodel//inheritance.nit:182 */
865 fra.me.REG[4] = NEW_Array_array___Array___init();
866 fra.me.REG[3] = fra.me.REG[4];
867 /* ./metamodel//inheritance.nit:183 */
868 REGB3 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
869 if (UNTAG_Bool(REGB3)) {
870 } else {
871 nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 183);
872 }
873 fra.me.REG[4] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
874 CALL_abstract_collection___Map_____braeq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1], fra.me.REG[3]);
875 }
876 /* ./metamodel//inheritance.nit:185 */
877 fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[0])(fra.me.REG[0]);
878 fra.me.REG[4] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[4])(fra.me.REG[4]);
879 /* ./../lib/standard//collection//array.nit:234 */
880 REGB3 = TAG_Int(0);
881 /* ./../lib/standard//collection//array.nit:235 */
882 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
883 if (UNTAG_Bool(REGB2)) {
884 } else {
885 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
886 }
887 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[4]);
888 /* ./../lib/standard//collection//array.nit:236 */
889 fra.me.REG[5] = ATTR_array___Array____items(fra.me.REG[4]);
890 /* ./../lib/standard//collection//array.nit:237 */
891 while(1) {
892 /* ./../lib/standard//collection//array.nit:23 */
893 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
894 if (UNTAG_Bool(REGB2)) {
895 } else {
896 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
897 }
898 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[4]);
899 /* ./../lib/standard//kernel.nit:212 */
900 REGB2 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB2));
901 /* ./../lib/standard//collection//array.nit:237 */
902 if (UNTAG_Bool(REGB2)) {
903 /* ./../lib/standard//collection//array.nit:238 */
904 REGB2 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
905 if (UNTAG_Bool(REGB2)) {
906 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
907 }
908 /* ./../lib/standard//collection//array.nit:654 */
909 fra.me.REG[6] = ((Nit_NativeArray)fra.me.REG[5])->val[UNTAG_Int(REGB3)];
910 /* ./metamodel//inheritance.nit:186 */
911 REGB2 = CALL_abstractmetamodel___MMLocalClass___has_global_property_by_name(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[1]);
912 if (UNTAG_Bool(REGB2)) {
913 /* ./metamodel//inheritance.nit:187 */
914 fra.me.REG[6] = CALL_abstractmetamodel___MMLocalClass___get_property_by_name(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[1]);
915 /* ./metamodel//inheritance.nit:188 */
916 REGB2 = CALL_abstract_collection___Collection___has(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
917 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
918 if (UNTAG_Bool(REGB2)) {
919 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
920 }
921 /* ./metamodel//inheritance.nit:189 */
922 REGB2 = CALL_abstractmetamodel___MMGlobalProperty___is_init(fra.me.REG[6])(fra.me.REG[6]);
923 if (UNTAG_Bool(REGB2)) {
924 fra.me.REG[7] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[6])(fra.me.REG[6]);
925 fra.me.REG[7] = CALL_abstractmetamodel___MMLocalProperty___local_class(fra.me.REG[7])(fra.me.REG[7]);
926 fra.me.REG[7] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[7])(fra.me.REG[7]);
927 fra.me.REG[8] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[0])(fra.me.REG[0]);
928 REGB2 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[7],fra.me.REG[8]));
929 if (UNTAG_Bool(REGB2)) {
930 } else {
931 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
932 REGB2 = REGB1;
933 }
934 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
935 } else {
936 REGB1 = TAG_Bool(false);
937 REGB2 = REGB1;
938 }
939 if (UNTAG_Bool(REGB2)) {
940 goto label2;
941 }
942 /* ./metamodel//inheritance.nit:190 */
943 fra.me.REG[8] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[6])(fra.me.REG[6]);
944 fra.me.REG[8] = CALL_abstractmetamodel___MMLocalProperty___name(fra.me.REG[8])(fra.me.REG[8]);
945 fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[8])(fra.me.REG[8]);
946 fra.me.REG[8] = CALL_abstract_collection___Collection___first(fra.me.REG[8])(fra.me.REG[8]);
947 REGB2 = TAG_Char('@');
948 REGB1 = TAG_Bool(IS_EQUAL_ON(REGB2,fra.me.REG[8]));
949 if (UNTAG_Bool(REGB1)) {
950 } else {
951 REGB4 = TAG_Bool(fra.me.REG[8]==NIT_NULL);
952 if (UNTAG_Bool(REGB4)) {
953 REGB4 = TAG_Bool(false);
954 REGB1 = REGB4;
955 } else {
956 /* ./../lib/standard//kernel.nit:347 */
957 REGB2 = TAG_Bool((fra.me.REG[8])==(REGB2));
958 /* ./metamodel//inheritance.nit:190 */
959 REGB1 = REGB2;
960 }
961 }
962 if (UNTAG_Bool(REGB1)) {
963 goto label2;
964 }
965 /* ./metamodel//inheritance.nit:191 */
966 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
967 if (UNTAG_Bool(REGB1)) {
968 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 191);
969 }
970 REGB1 = CALL_abstract_collection___Collection___has(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[6]);
971 if (UNTAG_Bool(REGB1)) {
972 goto label2;
973 }
974 /* ./metamodel//inheritance.nit:192 */
975 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
976 if (UNTAG_Bool(REGB1)) {
977 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 192);
978 }
979 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[6]);
980 }
981 label2: while(0);
982 /* ./../lib/standard//collection//array.nit:239 */
983 REGB1 = TAG_Int(1);
984 /* ./../lib/standard//kernel.nit:215 */
985 REGB1 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB1));
986 /* ./../lib/standard//collection//array.nit:239 */
987 REGB3 = REGB1;
988 } else {
989 /* ./../lib/standard//collection//array.nit:237 */
990 goto label3;
991 }
992 }
993 label3: while(0);
994 /* ./metamodel//inheritance.nit:195 */
995 REGB3 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
996 if (UNTAG_Bool(REGB3)) {
997 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 195);
998 }
999 /* ./../lib/standard//collection//array.nit:23 */
1000 REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
1001 if (UNTAG_Bool(REGB3)) {
1002 } else {
1003 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1004 }
1005 REGB3 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
1006 /* ./metamodel//inheritance.nit:195 */
1007 REGB1 = TAG_Int(1);
1008 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB3,REGB1));
1009 if (UNTAG_Bool(REGB2)) {
1010 } else {
1011 /* ./../lib/standard//kernel.nit:207 */
1012 REGB1 = TAG_Bool((REGB3)==(REGB1));
1013 /* ./metamodel//inheritance.nit:195 */
1014 REGB2 = REGB1;
1015 }
1016 REGB0 = REGB2;
1017 goto label1;
1018 label1: while(0);
1019 stack_frame_head = fra.me.prev;
1020 return REGB0;
1021 }
1022 void inheritance___MMLocalClass___make_visible_an_inherited_global_property(val_t p0, val_t p1){
1023 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
1024 val_t REGB0;
1025 val_t tmp;
1026 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1027 fra.me.file = LOCATE_inheritance;
1028 fra.me.line = 198;
1029 fra.me.meth = LOCATE_inheritance___MMLocalClass___make_visible_an_inherited_global_property;
1030 fra.me.has_broke = 0;
1031 fra.me.REG_size = 5;
1032 fra.me.REG[0] = NIT_NULL;
1033 fra.me.REG[1] = NIT_NULL;
1034 fra.me.REG[2] = NIT_NULL;
1035 fra.me.REG[3] = NIT_NULL;
1036 fra.me.REG[4] = NIT_NULL;
1037 fra.me.REG[0] = p0;
1038 fra.me.REG[1] = p1;
1039 /* ./metamodel//inheritance.nit:201 */
1040 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
1041 if (UNTAG_Bool(REGB0)) {
1042 } else {
1043 nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 201);
1044 }
1045 fra.me.REG[0] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
1046 /* ./metamodel//inheritance.nit:202 */
1047 fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[1])(fra.me.REG[1]);
1048 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalProperty___name(fra.me.REG[2])(fra.me.REG[2]);
1049 /* ./metamodel//inheritance.nit:204 */
1050 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
1051 if (UNTAG_Bool(REGB0)) {
1052 /* ./metamodel//inheritance.nit:205 */
1053 fra.me.REG[3] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
1054 } else {
1055 /* ./metamodel//inheritance.nit:207 */
1056 fra.me.REG[4] = NEW_Array_array___Array___init();
1057 fra.me.REG[3] = fra.me.REG[4];
1058 /* ./metamodel//inheritance.nit:208 */
1059 CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2], fra.me.REG[3]);
1060 }
1061 /* ./metamodel//inheritance.nit:210 */
1062 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
1063 stack_frame_head = fra.me.prev;
1064 return;
1065 }
1066 void inheritance___MMLocalClass___add_direct_parent(val_t p0, val_t p1){
1067 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1068 val_t REGB0;
1069 val_t tmp;
1070 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1071 fra.me.file = LOCATE_inheritance;
1072 fra.me.line = 213;
1073 fra.me.meth = LOCATE_inheritance___MMLocalClass___add_direct_parent;
1074 fra.me.has_broke = 0;
1075 fra.me.REG_size = 2;
1076 fra.me.REG[0] = NIT_NULL;
1077 fra.me.REG[1] = NIT_NULL;
1078 fra.me.REG[0] = p0;
1079 fra.me.REG[1] = p1;
1080 /* ./metamodel//inheritance.nit:216 */
1081 REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0])!=NIT_NULL);
1082 if (UNTAG_Bool(REGB0)) {
1083 } else {
1084 nit_abort("Uninitialized attribute %s", "_direct_parents", LOCATE_inheritance, 216);
1085 }
1086 fra.me.REG[0] = ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0]);
1087 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
1088 stack_frame_head = fra.me.prev;
1089 return;
1090 }
1091 val_t inheritance___MMLocalClass___computed_super_classes(val_t p0){
1092 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1093 val_t REGB0;
1094 val_t REGB1;
1095 val_t tmp;
1096 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1097 fra.me.file = LOCATE_inheritance;
1098 fra.me.line = 219;
1099 fra.me.meth = LOCATE_inheritance___MMLocalClass___computed_super_classes;
1100 fra.me.has_broke = 0;
1101 fra.me.REG_size = 2;
1102 fra.me.REG[0] = NIT_NULL;
1103 fra.me.REG[1] = NIT_NULL;
1104 fra.me.REG[0] = p0;
1105 /* ./metamodel//inheritance.nit:222 */
1106 fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
1107 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
1108 if (UNTAG_Bool(REGB0)) {
1109 } else {
1110 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
1111 if (UNTAG_Bool(REGB1)) {
1112 REGB1 = TAG_Bool(false);
1113 REGB0 = REGB1;
1114 } else {
1115 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
1116 REGB0 = REGB1;
1117 }
1118 }
1119 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1120 if (UNTAG_Bool(REGB0)) {
1121 fra.me.REG[0] = ATTR_abstractmetamodel___MMLocalClass____cshe(fra.me.REG[0]);
1122 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
1123 if (UNTAG_Bool(REGB0)) {
1124 } else {
1125 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
1126 if (UNTAG_Bool(REGB1)) {
1127 REGB1 = TAG_Bool(false);
1128 REGB0 = REGB1;
1129 } else {
1130 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
1131 REGB0 = REGB1;
1132 }
1133 }
1134 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1135 } else {
1136 REGB1 = TAG_Bool(false);
1137 REGB0 = REGB1;
1138 }
1139 goto label1;
1140 label1: while(0);
1141 stack_frame_head = fra.me.prev;
1142 return REGB0;
1143 }
1144 val_t inheritance___MMLocalClass___computed_ancestors(val_t p0){
1145 struct {struct stack_frame_t me;} fra;
1146 val_t REGB0;
1147 val_t REGB1;
1148 val_t tmp;
1149 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1150 fra.me.file = LOCATE_inheritance;
1151 fra.me.line = 225;
1152 fra.me.meth = LOCATE_inheritance___MMLocalClass___computed_ancestors;
1153 fra.me.has_broke = 0;
1154 fra.me.REG_size = 1;
1155 fra.me.REG[0] = NIT_NULL;
1156 fra.me.REG[0] = p0;
1157 /* ./metamodel//inheritance.nit:228 */
1158 fra.me.REG[0] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
1159 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
1160 if (UNTAG_Bool(REGB0)) {
1161 } else {
1162 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
1163 if (UNTAG_Bool(REGB1)) {
1164 REGB1 = TAG_Bool(false);
1165 REGB0 = REGB1;
1166 } else {
1167 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
1168 REGB0 = REGB1;
1169 }
1170 }
1171 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1172 goto label1;
1173 label1: while(0);
1174 stack_frame_head = fra.me.prev;
1175 return REGB0;
1176 }
1177 val_t inheritance___MMLocalClass___ancestor_for(val_t p0, val_t p1){
1178 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
1179 val_t REGB0;
1180 val_t REGB1;
1181 val_t tmp;
1182 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1183 fra.me.file = LOCATE_inheritance;
1184 fra.me.line = 231;
1185 fra.me.meth = LOCATE_inheritance___MMLocalClass___ancestor_for;
1186 fra.me.has_broke = 0;
1187 fra.me.REG_size = 6;
1188 fra.me.REG[0] = NIT_NULL;
1189 fra.me.REG[1] = NIT_NULL;
1190 fra.me.REG[2] = NIT_NULL;
1191 fra.me.REG[3] = NIT_NULL;
1192 fra.me.REG[4] = NIT_NULL;
1193 fra.me.REG[5] = NIT_NULL;
1194 fra.me.REG[0] = p0;
1195 fra.me.REG[1] = p1;
1196 /* ./metamodel//inheritance.nit:235 */
1197 fra.me.REG[2] = CALL_static_type___MMLocalClass___ancestors(fra.me.REG[0])(fra.me.REG[0]);
1198 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1199 if (UNTAG_Bool(REGB0)) {
1200 } else {
1201 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1202 if (UNTAG_Bool(REGB1)) {
1203 REGB1 = TAG_Bool(false);
1204 REGB0 = REGB1;
1205 } else {
1206 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
1207 REGB0 = REGB1;
1208 }
1209 }
1210 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1211 if (UNTAG_Bool(REGB0)) {
1212 } else {
1213 nit_abort("Assert failed", NULL, LOCATE_inheritance, 235);
1214 }
1215 /* ./metamodel//inheritance.nit:237 */
1216 fra.me.REG[2] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
1217 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1218 if (UNTAG_Bool(REGB0)) {
1219 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 237);
1220 }
1221 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
1222 if (UNTAG_Bool(REGB0)) {
1223 /* ./metamodel//inheritance.nit:238 */
1224 fra.me.REG[2] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
1225 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1226 if (UNTAG_Bool(REGB0)) {
1227 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 238);
1228 }
1229 fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
1230 goto label1;
1231 }
1232 /* ./metamodel//inheritance.nit:240 */
1233 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___mmmodule(fra.me.REG[0])(fra.me.REG[0]);
1234 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___for_module(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
1235 /* ./metamodel//inheritance.nit:241 */
1236 fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___cshe(fra.me.REG[0])(fra.me.REG[0]);
1237 REGB0 = CALL_partial_order___PartialOrderElement_____leq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
1238 if (UNTAG_Bool(REGB0)) {
1239 } else {
1240 nit_abort("Assert failed", NULL, LOCATE_inheritance, 241);
1241 }
1242 /* ./metamodel//inheritance.nit:243 */
1243 fra.me.REG[4] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
1244 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
1245 if (UNTAG_Bool(REGB0)) {
1246 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 243);
1247 }
1248 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
1249 if (UNTAG_Bool(REGB0)) {
1250 /* ./metamodel//inheritance.nit:244 */
1251 fra.me.REG[4] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
1252 REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
1253 if (UNTAG_Bool(REGB0)) {
1254 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 244);
1255 }
1256 fra.me.REG[3] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
1257 } else {
1258 /* ./metamodel//inheritance.nit:245 */
1259 fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[1])(fra.me.REG[1]);
1260 fra.me.REG[5] = ATTR_abstractmetamodel___MMLocalClass____global(fra.me.REG[0]);
1261 REGB0 = TAG_Bool(IS_EQUAL_ON(fra.me.REG[4],fra.me.REG[5]));
1262 if (UNTAG_Bool(REGB0)) {
1263 } else {
1264 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
1265 REGB0 = REGB1;
1266 }
1267 if (UNTAG_Bool(REGB0)) {
1268 /* ./metamodel//inheritance.nit:246 */
1269 fra.me.REG[5] = NEW_MMRefineAncestor_inheritance___MMRefineAncestor___init(fra.me.REG[0], fra.me.REG[1]);
1270 fra.me.REG[3] = fra.me.REG[5];
1271 } else {
1272 /* ./metamodel//inheritance.nit:248 */
1273 fra.me.REG[5] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[0])(fra.me.REG[0]);
1274 fra.me.REG[4] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
1275 fra.me.REG[4] = NEW_MMSpecAncestor_inheritance___MMSpecAncestor___init(fra.me.REG[5], fra.me.REG[4]);
1276 fra.me.REG[3] = fra.me.REG[4];
1277 }
1278 }
1279 /* ./metamodel//inheritance.nit:250 */
1280 fra.me.REG[0] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
1281 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
1282 if (UNTAG_Bool(REGB0)) {
1283 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 250);
1284 }
1285 CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[3]);
1286 /* ./metamodel//inheritance.nit:251 */
1287 fra.me.REG[2] = fra.me.REG[3];
1288 goto label1;
1289 label1: while(0);
1290 stack_frame_head = fra.me.prev;
1291 return fra.me.REG[2];
1292 }
1293 val_t inheritance___MMLocalClass_____bra(val_t p0, val_t p1){
1294 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1295 val_t REGB0;
1296 val_t tmp;
1297 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1298 fra.me.file = LOCATE_inheritance;
1299 fra.me.line = 254;
1300 fra.me.meth = LOCATE_inheritance___MMLocalClass_____bra;
1301 fra.me.has_broke = 0;
1302 fra.me.REG_size = 3;
1303 fra.me.REG[0] = NIT_NULL;
1304 fra.me.REG[1] = NIT_NULL;
1305 fra.me.REG[2] = NIT_NULL;
1306 fra.me.REG[0] = p0;
1307 fra.me.REG[1] = p1;
1308 /* ./metamodel//inheritance.nit:256 */
1309 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0])!=NIT_NULL);
1310 if (UNTAG_Bool(REGB0)) {
1311 } else {
1312 nit_abort("Uninitialized attribute %s", "_local_property_by_global", LOCATE_inheritance, 256);
1313 }
1314 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0]);
1315 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
1316 if (UNTAG_Bool(REGB0)) {
1317 /* ./metamodel//inheritance.nit:257 */
1318 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0])!=NIT_NULL);
1319 if (UNTAG_Bool(REGB0)) {
1320 } else {
1321 nit_abort("Uninitialized attribute %s", "_local_property_by_global", LOCATE_inheritance, 257);
1322 }
1323 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0]);
1324 fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
1325 goto label1;
1326 } else {
1327 /* ./metamodel//inheritance.nit:258 */
1328 REGB0 = CALL_abstractmetamodel___MMLocalClass___has_global_property(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
1329 if (UNTAG_Bool(REGB0)) {
1330 /* ./metamodel//inheritance.nit:259 */
1331 fra.me.REG[1] = CALL_inheritance___MMLocalClass___inherit_local_property(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
1332 fra.me.REG[2] = fra.me.REG[1];
1333 goto label1;
1334 } else {
1335 /* ./metamodel//inheritance.nit:261 */
1336 nit_abort("Aborted", NULL, LOCATE_inheritance, 261);
1337 }
1338 }
1339 label1: while(0);
1340 stack_frame_head = fra.me.prev;
1341 return fra.me.REG[2];
1342 }
1343 void inheritance___MMLocalClass___add_default_any_class(val_t p0, val_t p1){
1344 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
1345 val_t REGB0;
1346 val_t REGB1;
1347 val_t tmp;
1348 static val_t once_value_1; /* Once value */
1349 static val_t once_value_2; /* Once value */
1350 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1351 fra.me.file = LOCATE_inheritance;
1352 fra.me.line = 265;
1353 fra.me.meth = LOCATE_inheritance___MMLocalClass___add_default_any_class;
1354 fra.me.has_broke = 0;
1355 fra.me.REG_size = 4;
1356 fra.me.REG[0] = NIT_NULL;
1357 fra.me.REG[1] = NIT_NULL;
1358 fra.me.REG[2] = NIT_NULL;
1359 fra.me.REG[3] = NIT_NULL;
1360 fra.me.REG[0] = p0;
1361 fra.me.REG[1] = p1;
1362 /* ./metamodel//inheritance.nit:268 */
1363 REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[1])(fra.me.REG[1]);
1364 if (UNTAG_Bool(REGB0)) {
1365 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
1366 if (!once_value_1) {
1367 if (!once_value_2) {
1368 fra.me.REG[3] = BOX_NativeString("Object");
1369 REGB0 = TAG_Int(6);
1370 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
1371 once_value_2 = fra.me.REG[3];
1372 register_static_object(&once_value_2);
1373 } else fra.me.REG[3] = once_value_2;
1374 fra.me.REG[3] = fra.me.REG[3];
1375 fra.me.REG[3] = CALL_symbol___String___to_symbol(fra.me.REG[3])(fra.me.REG[3]);
1376 once_value_1 = fra.me.REG[3];
1377 register_static_object(&once_value_1);
1378 } else fra.me.REG[3] = once_value_1;
1379 fra.me.REG[3] = fra.me.REG[3];
1380 REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[2],fra.me.REG[3]));
1381 if (UNTAG_Bool(REGB0)) {
1382 } else {
1383 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
1384 REGB0 = REGB1;
1385 }
1386 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1387 } else {
1388 REGB1 = TAG_Bool(false);
1389 REGB0 = REGB1;
1390 }
1391 if (UNTAG_Bool(REGB0)) {
1392 /* ./metamodel//inheritance.nit:269 */
1393 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___mmmodule(fra.me.REG[0])(fra.me.REG[0]);
1394 fra.me.REG[3] = CALL_inheritance___MMModule___type_any(fra.me.REG[3])(fra.me.REG[3]);
1395 /* ./metamodel//inheritance.nit:270 */
1396 fra.me.REG[2] = CALL_static_type___MMType___local_class(fra.me.REG[3])(fra.me.REG[3]);
1397 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
1398 /* ./metamodel//inheritance.nit:271 */
1399 fra.me.REG[3] = NEW_MMDefaultAncestor_inheritance___MMDefaultAncestor___init(fra.me.REG[0], fra.me.REG[3]);
1400 /* ./metamodel//inheritance.nit:272 */
1401 CALL_inheritance___MMLocalClass___add_direct_parent(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
1402 }
1403 stack_frame_head = fra.me.prev;
1404 return;
1405 }
1406 void inheritance___MMLocalClass___add_super_classes(val_t p0, val_t p1){
1407 struct {struct stack_frame_t me; val_t MORE_REG[7];} fra;
1408 val_t REGB0;
1409 val_t REGB1;
1410 val_t REGB2;
1411 val_t tmp;
1412 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1413 fra.me.file = LOCATE_inheritance;
1414 fra.me.line = 276;
1415 fra.me.meth = LOCATE_inheritance___MMLocalClass___add_super_classes;
1416 fra.me.has_broke = 0;
1417 fra.me.REG_size = 8;
1418 fra.me.REG[0] = NIT_NULL;
1419 fra.me.REG[1] = NIT_NULL;
1420 fra.me.REG[2] = NIT_NULL;
1421 fra.me.REG[3] = NIT_NULL;
1422 fra.me.REG[4] = NIT_NULL;
1423 fra.me.REG[5] = NIT_NULL;
1424 fra.me.REG[6] = NIT_NULL;
1425 fra.me.REG[7] = NIT_NULL;
1426 fra.me.REG[0] = p0;
1427 fra.me.REG[1] = p1;
1428 /* ./metamodel//inheritance.nit:279 */
1429 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
1430 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1431 if (UNTAG_Bool(REGB0)) {
1432 } else {
1433 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1434 if (UNTAG_Bool(REGB1)) {
1435 REGB1 = TAG_Bool(false);
1436 REGB0 = REGB1;
1437 } else {
1438 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
1439 REGB0 = REGB1;
1440 }
1441 }
1442 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1443 if (UNTAG_Bool(REGB0)) {
1444 } else {
1445 nit_abort("Assert failed", NULL, LOCATE_inheritance, 279);
1446 }
1447 /* ./metamodel//inheritance.nit:280 */
1448 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
1449 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1450 if (UNTAG_Bool(REGB0)) {
1451 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 280);
1452 }
1453 fra.me.REG[2] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[2])(fra.me.REG[2]);
1454 /* ./../lib/standard//collection//array.nit:234 */
1455 REGB0 = TAG_Int(0);
1456 /* ./../lib/standard//collection//array.nit:235 */
1457 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1458 if (UNTAG_Bool(REGB1)) {
1459 } else {
1460 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
1461 }
1462 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
1463 /* ./../lib/standard//collection//array.nit:236 */
1464 fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[2]);
1465 /* ./../lib/standard//collection//array.nit:237 */
1466 while(1) {
1467 /* ./../lib/standard//collection//array.nit:23 */
1468 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1469 if (UNTAG_Bool(REGB1)) {
1470 } else {
1471 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1472 }
1473 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
1474 /* ./../lib/standard//kernel.nit:212 */
1475 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1476 /* ./../lib/standard//collection//array.nit:237 */
1477 if (UNTAG_Bool(REGB1)) {
1478 /* ./../lib/standard//collection//array.nit:238 */
1479 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
1480 if (UNTAG_Bool(REGB1)) {
1481 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
1482 }
1483 /* ./../lib/standard//collection//array.nit:654 */
1484 fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB0)];
1485 /* ./metamodel//inheritance.nit:281 */
1486 fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___cshe(fra.me.REG[4])(fra.me.REG[4]);
1487 fra.me.REG[4] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[4])(fra.me.REG[4]);
1488 /* ./../lib/standard//collection//array.nit:234 */
1489 REGB1 = TAG_Int(0);
1490 /* ./../lib/standard//collection//array.nit:235 */
1491 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
1492 if (UNTAG_Bool(REGB2)) {
1493 } else {
1494 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
1495 }
1496 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[4]);
1497 /* ./../lib/standard//collection//array.nit:236 */
1498 fra.me.REG[5] = ATTR_array___Array____items(fra.me.REG[4]);
1499 /* ./../lib/standard//collection//array.nit:237 */
1500 while(1) {
1501 /* ./../lib/standard//collection//array.nit:23 */
1502 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
1503 if (UNTAG_Bool(REGB2)) {
1504 } else {
1505 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1506 }
1507 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[4]);
1508 /* ./../lib/standard//kernel.nit:212 */
1509 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
1510 /* ./../lib/standard//collection//array.nit:237 */
1511 if (UNTAG_Bool(REGB2)) {
1512 /* ./../lib/standard//collection//array.nit:238 */
1513 REGB2 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
1514 if (UNTAG_Bool(REGB2)) {
1515 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
1516 }
1517 /* ./../lib/standard//collection//array.nit:654 */
1518 fra.me.REG[6] = ((Nit_NativeArray)fra.me.REG[5])->val[UNTAG_Int(REGB1)];
1519 /* ./metamodel//inheritance.nit:282 */
1520 REGB2 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____mmmodule(fra.me.REG[0])!=NIT_NULL);
1521 if (UNTAG_Bool(REGB2)) {
1522 } else {
1523 nit_abort("Uninitialized attribute %s", "_mmmodule", LOCATE_inheritance, 282);
1524 }
1525 fra.me.REG[7] = ATTR_abstractmetamodel___MMLocalClass____mmmodule(fra.me.REG[0]);
1526 fra.me.REG[7] = CALL_abstractmetamodel___MMLocalClass___for_module(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
1527 /* ./metamodel//inheritance.nit:283 */
1528 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
1529 /* ./../lib/standard//collection//array.nit:239 */
1530 REGB2 = TAG_Int(1);
1531 /* ./../lib/standard//kernel.nit:215 */
1532 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
1533 /* ./../lib/standard//collection//array.nit:239 */
1534 REGB1 = REGB2;
1535 } else {
1536 /* ./../lib/standard//collection//array.nit:237 */
1537 goto label1;
1538 }
1539 }
1540 label1: while(0);
1541 /* ./../lib/standard//collection//array.nit:239 */
1542 REGB1 = TAG_Int(1);
1543 /* ./../lib/standard//kernel.nit:215 */
1544 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1545 /* ./../lib/standard//collection//array.nit:239 */
1546 REGB0 = REGB1;
1547 } else {
1548 /* ./../lib/standard//collection//array.nit:237 */
1549 goto label2;
1550 }
1551 }
1552 label2: while(0);
1553 stack_frame_head = fra.me.prev;
1554 return;
1555 }
1556 void inheritance___MMLocalClass___add_explicit_classes(val_t p0, val_t p1){
1557 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
1558 val_t REGB0;
1559 val_t REGB1;
1560 val_t tmp;
1561 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1562 fra.me.file = LOCATE_inheritance;
1563 fra.me.line = 288;
1564 fra.me.meth = LOCATE_inheritance___MMLocalClass___add_explicit_classes;
1565 fra.me.has_broke = 0;
1566 fra.me.REG_size = 4;
1567 fra.me.REG[0] = NIT_NULL;
1568 fra.me.REG[1] = NIT_NULL;
1569 fra.me.REG[2] = NIT_NULL;
1570 fra.me.REG[3] = NIT_NULL;
1571 fra.me.REG[0] = p0;
1572 fra.me.REG[1] = p1;
1573 /* ./metamodel//inheritance.nit:291 */
1574 REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0])!=NIT_NULL);
1575 if (UNTAG_Bool(REGB0)) {
1576 } else {
1577 nit_abort("Uninitialized attribute %s", "_direct_parents", LOCATE_inheritance, 291);
1578 }
1579 fra.me.REG[0] = ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0]);
1580 /* ./../lib/standard//collection//array.nit:234 */
1581 REGB0 = TAG_Int(0);
1582 /* ./../lib/standard//collection//array.nit:235 */
1583 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1584 if (UNTAG_Bool(REGB1)) {
1585 } else {
1586 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
1587 }
1588 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1589 /* ./../lib/standard//collection//array.nit:236 */
1590 fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[0]);
1591 /* ./../lib/standard//collection//array.nit:237 */
1592 while(1) {
1593 /* ./../lib/standard//collection//array.nit:23 */
1594 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1595 if (UNTAG_Bool(REGB1)) {
1596 } else {
1597 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1598 }
1599 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
1600 /* ./../lib/standard//kernel.nit:212 */
1601 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1602 /* ./../lib/standard//collection//array.nit:237 */
1603 if (UNTAG_Bool(REGB1)) {
1604 /* ./../lib/standard//collection//array.nit:238 */
1605 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1606 if (UNTAG_Bool(REGB1)) {
1607 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
1608 }
1609 /* ./../lib/standard//collection//array.nit:654 */
1610 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
1611 /* ./metamodel//inheritance.nit:292 */
1612 fra.me.REG[3] = CALL_static_type___MMAncestor___local_class(fra.me.REG[3])(fra.me.REG[3]);
1613 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
1614 /* ./../lib/standard//collection//array.nit:239 */
1615 REGB1 = TAG_Int(1);
1616 /* ./../lib/standard//kernel.nit:215 */
1617 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1618 /* ./../lib/standard//collection//array.nit:239 */
1619 REGB0 = REGB1;
1620 } else {
1621 /* ./../lib/standard//collection//array.nit:237 */
1622 goto label1;
1623 }
1624 }
1625 label1: while(0);
1626 stack_frame_head = fra.me.prev;
1627 return;
1628 }
1629 void inheritance___MMLocalClass___compute_super_parents(val_t p0, val_t p1){
1630 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1631 val_t REGB0;
1632 val_t REGB1;
1633 val_t tmp;
1634 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1635 fra.me.file = LOCATE_inheritance;
1636 fra.me.line = 296;
1637 fra.me.meth = LOCATE_inheritance___MMLocalClass___compute_super_parents;
1638 fra.me.has_broke = 0;
1639 fra.me.REG_size = 3;
1640 fra.me.REG[0] = NIT_NULL;
1641 fra.me.REG[1] = NIT_NULL;
1642 fra.me.REG[2] = NIT_NULL;
1643 fra.me.REG[0] = p0;
1644 fra.me.REG[1] = p1;
1645 /* ./../lib/standard//collection//array.nit:234 */
1646 REGB0 = TAG_Int(0);
1647 /* ./../lib/standard//collection//array.nit:235 */
1648 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1649 if (UNTAG_Bool(REGB1)) {
1650 } else {
1651 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
1652 }
1653 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
1654 /* ./../lib/standard//collection//array.nit:236 */
1655 fra.me.REG[0] = ATTR_array___Array____items(fra.me.REG[1]);
1656 /* ./../lib/standard//collection//array.nit:237 */
1657 while(1) {
1658 /* ./../lib/standard//collection//array.nit:23 */
1659 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1660 if (UNTAG_Bool(REGB1)) {
1661 } else {
1662 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1663 }
1664 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
1665 /* ./../lib/standard//kernel.nit:212 */
1666 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1667 /* ./../lib/standard//collection//array.nit:237 */
1668 if (UNTAG_Bool(REGB1)) {
1669 /* ./../lib/standard//collection//array.nit:238 */
1670 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
1671 if (UNTAG_Bool(REGB1)) {
1672 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
1673 }
1674 /* ./../lib/standard//collection//array.nit:654 */
1675 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[0])->val[UNTAG_Int(REGB0)];
1676 /* ./metamodel//inheritance.nit:300 */
1677 CALL_inheritance___MMLocalClass___compute_super_classes(fra.me.REG[2])(fra.me.REG[2]);
1678 /* ./../lib/standard//collection//array.nit:239 */
1679 REGB1 = TAG_Int(1);
1680 /* ./../lib/standard//kernel.nit:215 */
1681 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1682 /* ./../lib/standard//collection//array.nit:239 */
1683 REGB0 = REGB1;
1684 } else {
1685 /* ./../lib/standard//collection//array.nit:237 */
1686 goto label1;
1687 }
1688 }
1689 label1: while(0);
1690 stack_frame_head = fra.me.prev;
1691 return;
1692 }
1693 val_t inheritance___MMLocalClass___build_ancestors(val_t p0){
1694 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
1695 val_t REGB0;
1696 val_t REGB1;
1697 val_t REGB2;
1698 val_t tmp;
1699 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1700 fra.me.file = LOCATE_inheritance;
1701 fra.me.line = 304;
1702 fra.me.meth = LOCATE_inheritance___MMLocalClass___build_ancestors;
1703 fra.me.has_broke = 0;
1704 fra.me.REG_size = 6;
1705 fra.me.REG[0] = NIT_NULL;
1706 fra.me.REG[1] = NIT_NULL;
1707 fra.me.REG[2] = NIT_NULL;
1708 fra.me.REG[3] = NIT_NULL;
1709 fra.me.REG[4] = NIT_NULL;
1710 fra.me.REG[5] = NIT_NULL;
1711 fra.me.REG[0] = p0;
1712 /* ./metamodel//inheritance.nit:307 */
1713 fra.me.REG[1] = NEW_Array_array___Array___init();
1714 /* ./metamodel//inheritance.nit:309 */
1715 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
1716 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1717 if (UNTAG_Bool(REGB0)) {
1718 } else {
1719 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1720 if (UNTAG_Bool(REGB1)) {
1721 REGB1 = TAG_Bool(false);
1722 REGB0 = REGB1;
1723 } else {
1724 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
1725 REGB0 = REGB1;
1726 }
1727 }
1728 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1729 if (UNTAG_Bool(REGB0)) {
1730 } else {
1731 nit_abort("Assert failed", NULL, LOCATE_inheritance, 309);
1732 }
1733 /* ./metamodel//inheritance.nit:310 */
1734 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
1735 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1736 if (UNTAG_Bool(REGB0)) {
1737 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 310);
1738 }
1739 fra.me.REG[2] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[2])(fra.me.REG[2]);
1740 /* ./../lib/standard//collection//array.nit:234 */
1741 REGB0 = TAG_Int(0);
1742 /* ./../lib/standard//collection//array.nit:235 */
1743 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1744 if (UNTAG_Bool(REGB1)) {
1745 } else {
1746 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
1747 }
1748 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
1749 /* ./../lib/standard//collection//array.nit:236 */
1750 fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[2]);
1751 /* ./../lib/standard//collection//array.nit:237 */
1752 while(1) {
1753 /* ./../lib/standard//collection//array.nit:23 */
1754 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1755 if (UNTAG_Bool(REGB1)) {
1756 } else {
1757 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1758 }
1759 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
1760 /* ./../lib/standard//kernel.nit:212 */
1761 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1762 /* ./../lib/standard//collection//array.nit:237 */
1763 if (UNTAG_Bool(REGB1)) {
1764 /* ./../lib/standard//collection//array.nit:238 */
1765 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
1766 if (UNTAG_Bool(REGB1)) {
1767 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
1768 }
1769 /* ./../lib/standard//collection//array.nit:654 */
1770 fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB0)];
1771 /* ./metamodel//inheritance.nit:311 */
1772 REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[4],fra.me.REG[0]));
1773 if (UNTAG_Bool(REGB1)) {
1774 } else {
1775 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
1776 REGB1 = REGB2;
1777 }
1778 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
1779 if (UNTAG_Bool(REGB1)) {
1780 } else {
1781 nit_abort("Assert failed", NULL, LOCATE_inheritance, 311);
1782 }
1783 /* ./metamodel//inheritance.nit:312 */
1784 fra.me.REG[4] = NEW_MMRefineAncestor_inheritance___MMRefineAncestor___init(fra.me.REG[0], fra.me.REG[4]);
1785 /* ./metamodel//inheritance.nit:313 */
1786 CALL_inheritance___MMAncestor___add_in(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
1787 /* ./../lib/standard//collection//array.nit:239 */
1788 REGB1 = TAG_Int(1);
1789 /* ./../lib/standard//kernel.nit:215 */
1790 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1791 /* ./../lib/standard//collection//array.nit:239 */
1792 REGB0 = REGB1;
1793 } else {
1794 /* ./../lib/standard//collection//array.nit:237 */
1795 goto label1;
1796 }
1797 }
1798 label1: while(0);
1799 /* ./metamodel//inheritance.nit:315 */
1800 REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0])!=NIT_NULL);
1801 if (UNTAG_Bool(REGB0)) {
1802 } else {
1803 nit_abort("Uninitialized attribute %s", "_direct_parents", LOCATE_inheritance, 315);
1804 }
1805 fra.me.REG[3] = ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0]);
1806 /* ./../lib/standard//collection//array.nit:234 */
1807 REGB0 = TAG_Int(0);
1808 /* ./../lib/standard//collection//array.nit:235 */
1809 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
1810 if (UNTAG_Bool(REGB1)) {
1811 } else {
1812 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
1813 }
1814 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
1815 /* ./../lib/standard//collection//array.nit:236 */
1816 fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[3]);
1817 /* ./../lib/standard//collection//array.nit:237 */
1818 while(1) {
1819 /* ./../lib/standard//collection//array.nit:23 */
1820 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
1821 if (UNTAG_Bool(REGB1)) {
1822 } else {
1823 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1824 }
1825 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
1826 /* ./../lib/standard//kernel.nit:212 */
1827 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1828 /* ./../lib/standard//collection//array.nit:237 */
1829 if (UNTAG_Bool(REGB1)) {
1830 /* ./../lib/standard//collection//array.nit:238 */
1831 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1832 if (UNTAG_Bool(REGB1)) {
1833 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
1834 }
1835 /* ./../lib/standard//collection//array.nit:654 */
1836 fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
1837 /* ./metamodel//inheritance.nit:316 */
1838 fra.me.REG[5] = CALL_static_type___MMAncestor___local_class(fra.me.REG[4])(fra.me.REG[4]);
1839 REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[5],fra.me.REG[0]));
1840 if (UNTAG_Bool(REGB1)) {
1841 } else {
1842 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[0]);
1843 REGB1 = REGB2;
1844 }
1845 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
1846 if (UNTAG_Bool(REGB1)) {
1847 } else {
1848 nit_abort("Assert failed", NULL, LOCATE_inheritance, 316);
1849 }
1850 /* ./metamodel//inheritance.nit:317 */
1851 CALL_inheritance___MMAncestor___add_in(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
1852 /* ./../lib/standard//collection//array.nit:239 */
1853 REGB1 = TAG_Int(1);
1854 /* ./../lib/standard//kernel.nit:215 */
1855 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1856 /* ./../lib/standard//collection//array.nit:239 */
1857 REGB0 = REGB1;
1858 } else {
1859 /* ./../lib/standard//collection//array.nit:237 */
1860 goto label2;
1861 }
1862 }
1863 label2: while(0);
1864 /* ./metamodel//inheritance.nit:319 */
1865 goto label3;
1866 label3: while(0);
1867 stack_frame_head = fra.me.prev;
1868 return fra.me.REG[1];
1869 }
1870 val_t inheritance___MMLocalClass___group_ancestors(val_t p0, val_t p1){
1871 struct {struct stack_frame_t me; val_t MORE_REG[6];} fra;
1872 val_t REGB0;
1873 val_t REGB1;
1874 val_t tmp;
1875 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1876 fra.me.file = LOCATE_inheritance;
1877 fra.me.line = 322;
1878 fra.me.meth = LOCATE_inheritance___MMLocalClass___group_ancestors;
1879 fra.me.has_broke = 0;
1880 fra.me.REG_size = 7;
1881 fra.me.REG[0] = NIT_NULL;
1882 fra.me.REG[1] = NIT_NULL;
1883 fra.me.REG[2] = NIT_NULL;
1884 fra.me.REG[3] = NIT_NULL;
1885 fra.me.REG[4] = NIT_NULL;
1886 fra.me.REG[5] = NIT_NULL;
1887 fra.me.REG[6] = NIT_NULL;
1888 fra.me.REG[0] = p0;
1889 fra.me.REG[1] = p1;
1890 /* ./metamodel//inheritance.nit:326 */
1891 fra.me.REG[0] = NEW_HashMap_hash_collection___HashMap___init();
1892 /* ./../lib/standard//collection//array.nit:234 */
1893 REGB0 = TAG_Int(0);
1894 /* ./../lib/standard//collection//array.nit:235 */
1895 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1896 if (UNTAG_Bool(REGB1)) {
1897 } else {
1898 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
1899 }
1900 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
1901 /* ./../lib/standard//collection//array.nit:236 */
1902 fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[1]);
1903 /* ./../lib/standard//collection//array.nit:237 */
1904 while(1) {
1905 /* ./../lib/standard//collection//array.nit:23 */
1906 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1907 if (UNTAG_Bool(REGB1)) {
1908 } else {
1909 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1910 }
1911 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
1912 /* ./../lib/standard//kernel.nit:212 */
1913 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1914 /* ./../lib/standard//collection//array.nit:237 */
1915 if (UNTAG_Bool(REGB1)) {
1916 /* ./../lib/standard//collection//array.nit:238 */
1917 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1918 if (UNTAG_Bool(REGB1)) {
1919 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
1920 }
1921 /* ./../lib/standard//collection//array.nit:654 */
1922 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
1923 /* ./metamodel//inheritance.nit:328 */
1924 fra.me.REG[4] = CALL_static_type___MMAncestor___local_class(fra.me.REG[3])(fra.me.REG[3]);
1925 /* ./metamodel//inheritance.nit:332 */
1926 CALL_inheritance___MMLocalClass___compute_ancestors(fra.me.REG[4])(fra.me.REG[4]);
1927 /* ./metamodel//inheritance.nit:333 */
1928 REGB1 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4]);
1929 if (UNTAG_Bool(REGB1)) {
1930 /* ./metamodel//inheritance.nit:334 */
1931 fra.me.REG[5] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4]);
1932 } else {
1933 /* ./metamodel//inheritance.nit:336 */
1934 fra.me.REG[6] = NEW_HashSet_hash_collection___HashSet___init();
1935 fra.me.REG[5] = fra.me.REG[6];
1936 /* ./metamodel//inheritance.nit:337 */
1937 CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4], fra.me.REG[5]);
1938 }
1939 /* ./metamodel//inheritance.nit:339 */
1940 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[3]);
1941 /* ./../lib/standard//collection//array.nit:239 */
1942 REGB1 = TAG_Int(1);
1943 /* ./../lib/standard//kernel.nit:215 */
1944 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1945 /* ./../lib/standard//collection//array.nit:239 */
1946 REGB0 = REGB1;
1947 } else {
1948 /* ./../lib/standard//collection//array.nit:237 */
1949 goto label1;
1950 }
1951 }
1952 label1: while(0);
1953 /* ./metamodel//inheritance.nit:341 */
1954 goto label2;
1955 label2: while(0);
1956 stack_frame_head = fra.me.prev;
1957 return fra.me.REG[0];
1958 }
1959 val_t inheritance___MMLocalClass___merge_ancestors(val_t p0, val_t p1){
1960 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
1961 val_t REGB0;
1962 val_t REGB1;
1963 val_t tmp;
1964 static val_t once_value_3; /* Once value */
1965 static val_t once_value_4; /* Once value */
1966 static val_t once_value_5; /* Once value */
1967 static val_t once_value_6; /* Once value */
1968 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1969 fra.me.file = LOCATE_inheritance;
1970 fra.me.line = 344;
1971 fra.me.meth = LOCATE_inheritance___MMLocalClass___merge_ancestors;
1972 fra.me.has_broke = 0;
1973 fra.me.REG_size = 5;
1974 fra.me.REG[0] = NIT_NULL;
1975 fra.me.REG[1] = NIT_NULL;
1976 fra.me.REG[2] = NIT_NULL;
1977 fra.me.REG[3] = NIT_NULL;
1978 fra.me.REG[4] = NIT_NULL;
1979 fra.me.REG[0] = p0;
1980 fra.me.REG[1] = p1;
1981 /* ./metamodel//inheritance.nit:347 */
1982 fra.me.REG[2] = NEW_HashSet_hash_collection___HashSet___init();
1983 /* ./metamodel//inheritance.nit:348 */
1984 fra.me.REG[3] = NEW_Array_array___Array___init();
1985 CALL_abstract_collection___Collection___iterate(fra.me.REG[1])(fra.me.REG[1], (&(fra.me)), ((fun_t)OC_inheritance___MMLocalClass___merge_ancestors_1));
1986 /* ./../lib/standard//collection//array.nit:23 */
1987 REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
1988 if (UNTAG_Bool(REGB0)) {
1989 } else {
1990 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
1991 }
1992 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
1993 /* ./metamodel//inheritance.nit:370 */
1994 REGB1 = TAG_Int(1);
1995 /* ./../lib/standard//kernel.nit:214 */
1996 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
1997 /* ./metamodel//inheritance.nit:370 */
1998 if (UNTAG_Bool(REGB1)) {
1999 /* ./metamodel//inheritance.nit:371 */
2000 fra.me.REG[2] = CALL_file___Object___stderr(fra.me.REG[0])(fra.me.REG[0]);
2001 REGB1 = TAG_Int(5);
2002 fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB1);
2003 if (!once_value_3) {
2004 fra.me.REG[4] = BOX_NativeString("Fatal error: Incompatibles ancestors for ");
2005 REGB1 = TAG_Int(41);
2006 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB1);
2007 once_value_3 = fra.me.REG[4];
2008 register_static_object(&once_value_3);
2009 } else fra.me.REG[4] = once_value_3;
2010 fra.me.REG[4] = fra.me.REG[4];
2011 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
2012 fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
2013 fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
2014 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
2015 if (!once_value_4) {
2016 fra.me.REG[4] = BOX_NativeString(": ");
2017 REGB1 = TAG_Int(2);
2018 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB1);
2019 once_value_4 = fra.me.REG[4];
2020 register_static_object(&once_value_4);
2021 } else fra.me.REG[4] = once_value_4;
2022 fra.me.REG[4] = fra.me.REG[4];
2023 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
2024 if (!once_value_5) {
2025 fra.me.REG[4] = BOX_NativeString(", ");
2026 REGB1 = TAG_Int(2);
2027 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB1);
2028 once_value_5 = fra.me.REG[4];
2029 register_static_object(&once_value_5);
2030 } else fra.me.REG[4] = once_value_5;
2031 fra.me.REG[4] = fra.me.REG[4];
2032 fra.me.REG[4] = CALL_string___Collection___join(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
2033 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
2034 if (!once_value_6) {
2035 fra.me.REG[4] = BOX_NativeString("\n");
2036 REGB1 = TAG_Int(1);
2037 fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB1);
2038 once_value_6 = fra.me.REG[4];
2039 register_static_object(&once_value_6);
2040 } else fra.me.REG[4] = once_value_6;
2041 fra.me.REG[4] = fra.me.REG[4];
2042 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
2043 fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
2044 CALL_stream___OStream___write(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
2045 /* ./metamodel//inheritance.nit:372 */
2046 REGB1 = TAG_Int(1);
2047 CALL_kernel___Object___exit(fra.me.REG[0])(fra.me.REG[0], REGB1);
2048 }
2049 /* ./metamodel//inheritance.nit:374 */
2050 fra.me.REG[3] = CALL_abstract_collection___Collection___first(fra.me.REG[3])(fra.me.REG[3]);
2051 goto label7;
2052 label7: while(0);
2053 stack_frame_head = fra.me.prev;
2054 return fra.me.REG[3];
2055 }
2056 void OC_inheritance___MMLocalClass___merge_ancestors_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
2057 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2058 val_t REGB0;
2059 val_t REGB1;
2060 val_t REGB2;
2061 fun_t CREG[1];
2062 val_t tmp;
2063 /* ./metamodel//inheritance.nit:349 */
2064 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2065 fra.me.file = LOCATE_inheritance;
2066 fra.me.line = 0;
2067 fra.me.meth = LOCATE_inheritance___MMLocalClass___merge_ancestors;
2068 fra.me.has_broke = 0;
2069 fra.me.REG_size = 4;
2070 fra.me.REG[0] = NIT_NULL;
2071 fra.me.REG[1] = NIT_NULL;
2072 fra.me.REG[2] = NIT_NULL;
2073 fra.me.REG[3] = NIT_NULL;
2074 fra.me.closure_ctx = closctx_param;
2075 fra.me.closure_funs = CREG;
2076 fra.me.REG[0] = p0;
2077 CREG[0] = clos_fun0;
2078 /* ./metamodel//inheritance.nit:350 */
2079 fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(closctx->REG[1])(closctx->REG[1]);
2080 /* ./metamodel//inheritance.nit:351 */
2081 REGB0 = TAG_Bool(true);
2082 /* ./metamodel//inheritance.nit:352 */
2083 while(1) {
2084 REGB1 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
2085 if (UNTAG_Bool(REGB1)) {
2086 REGB1 = REGB0;
2087 } else {
2088 REGB2 = TAG_Bool(false);
2089 REGB1 = REGB2;
2090 }
2091 if (UNTAG_Bool(REGB1)) {
2092 /* ./metamodel//inheritance.nit:354 */
2093 fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
2094 REGB1 = TAG_Bool(IS_EQUAL_ON(fra.me.REG[0],fra.me.REG[2]));
2095 if (UNTAG_Bool(REGB1)) {
2096 } else {
2097 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
2098 REGB1 = REGB2;
2099 }
2100 /* ./metamodel//inheritance.nit:355 */
2101 fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
2102 REGB1 = CALL_abstract_collection___Collection___has(closctx->REG[2])(closctx->REG[2], fra.me.REG[2]);
2103 /* ./metamodel//inheritance.nit:356 */
2104 fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
2105 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
2106 if (UNTAG_Bool(REGB1)) {
2107 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 356);
2108 }
2109 fra.me.REG[2] = CALL_static_type___MMAncestor___stype(fra.me.REG[2])(fra.me.REG[2]);
2110 fra.me.REG[3] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
2111 REGB1 = CALL_static_type___MMType_____l(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
2112 /* ./metamodel//inheritance.nit:358 */
2113 fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
2114 REGB1 = TAG_Bool(IS_EQUAL_ON(fra.me.REG[0],fra.me.REG[3]));
2115 if (UNTAG_Bool(REGB1)) {
2116 } else {
2117 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
2118 REGB1 = REGB2;
2119 }
2120 if (UNTAG_Bool(REGB1)) {
2121 REGB1 = TAG_Bool(true);
2122 } else {
2123 fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
2124 REGB2 = CALL_abstract_collection___Collection___has(closctx->REG[2])(closctx->REG[2], fra.me.REG[3]);
2125 REGB1 = REGB2;
2126 }
2127 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
2128 if (UNTAG_Bool(REGB1)) {
2129 /* ./metamodel//inheritance.nit:359 */
2130 fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
2131 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
2132 if (UNTAG_Bool(REGB1)) {
2133 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 359);
2134 }
2135 fra.me.REG[3] = CALL_static_type___MMAncestor___stype(fra.me.REG[3])(fra.me.REG[3]);
2136 fra.me.REG[2] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
2137 REGB1 = CALL_static_type___MMType_____l(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
2138 } else {
2139 /* ./metamodel//inheritance.nit:358 */
2140 REGB2 = TAG_Bool(false);
2141 REGB1 = REGB2;
2142 }
2143 if (UNTAG_Bool(REGB1)) {
2144 /* ./metamodel//inheritance.nit:360 */
2145 CALL_abstract_collection___SimpleCollection___add(closctx->REG[2])(closctx->REG[2], fra.me.REG[0]);
2146 /* ./metamodel//inheritance.nit:361 */
2147 REGB1 = TAG_Bool(false);
2148 REGB0 = REGB1;
2149 }
2150 /* ./metamodel//inheritance.nit:363 */
2151 CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
2152 } else {
2153 /* ./metamodel//inheritance.nit:352 */
2154 goto label2;
2155 }
2156 }
2157 label2: while(0);
2158 /* ./metamodel//inheritance.nit:365 */
2159 REGB0 = CALL_abstract_collection___Collection___has(closctx->REG[2])(closctx->REG[2], fra.me.REG[0]);
2160 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
2161 if (UNTAG_Bool(REGB0)) {
2162 /* ./metamodel//inheritance.nit:366 */
2163 CALL_abstract_collection___SimpleCollection___add(closctx->REG[3])(closctx->REG[3], fra.me.REG[0]);
2164 }
2165 stack_frame_head = fra.me.prev;
2166 return;
2167 }
2168 val_t inheritance___MMLocalClass___inherit_local_property(val_t p0, val_t p1){
2169 struct {struct stack_frame_t me; val_t MORE_REG[8];} fra;
2170 val_t REGB0;
2171 val_t REGB1;
2172 val_t REGB2;
2173 val_t tmp;
2174 static val_t once_value_2; /* Once value */
2175 static val_t once_value_3; /* Once value */
2176 static val_t once_value_4; /* Once value */
2177 static val_t once_value_5; /* Once value */
2178 static val_t once_value_6; /* Once value */
2179 static val_t once_value_7; /* Once value */
2180 static val_t once_value_8; /* Once value */
2181 static val_t once_value_10; /* Once value */
2182 static val_t once_value_11; /* Once value */
2183 static val_t once_value_12; /* Once value */
2184 static val_t once_value_13; /* Once value */
2185 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2186 fra.me.file = LOCATE_inheritance;
2187 fra.me.line = 377;
2188 fra.me.meth = LOCATE_inheritance___MMLocalClass___inherit_local_property;
2189 fra.me.has_broke = 0;
2190 fra.me.REG_size = 9;
2191 fra.me.REG[0] = NIT_NULL;
2192 fra.me.REG[1] = NIT_NULL;
2193 fra.me.REG[2] = NIT_NULL;
2194 fra.me.REG[3] = NIT_NULL;
2195 fra.me.REG[4] = NIT_NULL;
2196 fra.me.REG[5] = NIT_NULL;
2197 fra.me.REG[6] = NIT_NULL;
2198 fra.me.REG[7] = NIT_NULL;
2199 fra.me.REG[8] = NIT_NULL;
2200 fra.me.REG[0] = p0;
2201 fra.me.REG[1] = p1;
2202 /* ./metamodel//inheritance.nit:382 */
2203 REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0])!=NIT_NULL);
2204 if (UNTAG_Bool(REGB0)) {
2205 } else {
2206 nit_abort("Uninitialized attribute %s", "_local_property_by_global", LOCATE_inheritance, 382);
2207 }
2208 fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0]);
2209 REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
2210 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
2211 if (UNTAG_Bool(REGB0)) {
2212 } else {
2213 nit_abort("Assert failed", NULL, LOCATE_inheritance, 382);
2214 }
2215 /* ./metamodel//inheritance.nit:386 */
2216 fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy(fra.me.REG[1])(fra.me.REG[1]);
2217 /* ./metamodel//inheritance.nit:387 */
2218 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[0])(fra.me.REG[0]);
2219 fra.me.REG[3] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[3])(fra.me.REG[3]);
2220 /* ./metamodel//inheritance.nit:388 */
2221 REGB0 = CALL_abstract_collection___Collection___length(fra.me.REG[2])(fra.me.REG[2]);
2222 REGB1 = TAG_Int(1);
2223 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
2224 if (UNTAG_Bool(REGB2)) {
2225 } else {
2226 /* ./../lib/standard//kernel.nit:207 */
2227 REGB1 = TAG_Bool((REGB0)==(REGB1));
2228 /* ./metamodel//inheritance.nit:388 */
2229 REGB2 = REGB1;
2230 }
2231 if (UNTAG_Bool(REGB2)) {
2232 /* ./metamodel//inheritance.nit:390 */
2233 fra.me.REG[4] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[1])(fra.me.REG[1]);
2234 } else {
2235 /* ./../lib/standard//collection//array.nit:23 */
2236 REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
2237 if (UNTAG_Bool(REGB2)) {
2238 } else {
2239 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
2240 }
2241 REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
2242 /* ./metamodel//inheritance.nit:391 */
2243 REGB1 = TAG_Int(1);
2244 REGB0 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1));
2245 if (UNTAG_Bool(REGB0)) {
2246 } else {
2247 /* ./../lib/standard//kernel.nit:207 */
2248 REGB1 = TAG_Bool((REGB2)==(REGB1));
2249 /* ./metamodel//inheritance.nit:391 */
2250 REGB0 = REGB1;
2251 }
2252 if (UNTAG_Bool(REGB0)) {
2253 /* ./metamodel//inheritance.nit:393 */
2254 fra.me.REG[5] = CALL_abstract_collection___Collection___first(fra.me.REG[3])(fra.me.REG[3]);
2255 REGB0 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
2256 if (UNTAG_Bool(REGB0)) {
2257 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 393);
2258 }
2259 fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass_____bra(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[1]);
2260 fra.me.REG[4] = fra.me.REG[5];
2261 } else {
2262 /* ./metamodel//inheritance.nit:397 */
2263 fra.me.REG[5] = NEW_ArraySet_array___ArraySet___init();
2264 /* ./../lib/standard//collection//array.nit:234 */
2265 REGB0 = TAG_Int(0);
2266 /* ./../lib/standard//collection//array.nit:235 */
2267 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
2268 if (UNTAG_Bool(REGB1)) {
2269 } else {
2270 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
2271 }
2272 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
2273 /* ./../lib/standard//collection//array.nit:236 */
2274 fra.me.REG[6] = ATTR_array___Array____items(fra.me.REG[3]);
2275 /* ./../lib/standard//collection//array.nit:237 */
2276 while(1) {
2277 /* ./../lib/standard//collection//array.nit:23 */
2278 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
2279 if (UNTAG_Bool(REGB1)) {
2280 } else {
2281 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
2282 }
2283 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
2284 /* ./../lib/standard//kernel.nit:212 */
2285 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
2286 /* ./../lib/standard//collection//array.nit:237 */
2287 if (UNTAG_Bool(REGB1)) {
2288 /* ./../lib/standard//collection//array.nit:238 */
2289 REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
2290 if (UNTAG_Bool(REGB1)) {
2291 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
2292 }
2293 /* ./../lib/standard//collection//array.nit:654 */
2294 fra.me.REG[7] = ((Nit_NativeArray)fra.me.REG[6])->val[UNTAG_Int(REGB0)];
2295 /* ./metamodel//inheritance.nit:399 */
2296 REGB1 = CALL_abstractmetamodel___MMLocalClass___has_global_property(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[1]);
2297 if (UNTAG_Bool(REGB1)) {
2298 fra.me.REG[7] = CALL_abstractmetamodel___MMLocalClass_____bra(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[1]);
2299 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[7]);
2300 }
2301 /* ./../lib/standard//collection//array.nit:239 */
2302 REGB1 = TAG_Int(1);
2303 /* ./../lib/standard//kernel.nit:215 */
2304 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2305 /* ./../lib/standard//collection//array.nit:239 */
2306 REGB0 = REGB1;
2307 } else {
2308 /* ./../lib/standard//collection//array.nit:237 */
2309 goto label1;
2310 }
2311 }
2312 label1: while(0);
2313 /* ./metamodel//inheritance.nit:402 */
2314 fra.me.REG[5] = CALL_partial_order___PartialOrder___select_smallests(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[5]);
2315 /* ./../lib/standard//collection//array.nit:23 */
2316 REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[5])!=NIT_NULL);
2317 if (UNTAG_Bool(REGB0)) {
2318 } else {
2319 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
2320 }
2321 REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[5]);
2322 /* ./metamodel//inheritance.nit:404 */
2323 REGB1 = TAG_Int(1);
2324 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
2325 if (UNTAG_Bool(REGB2)) {
2326 } else {
2327 /* ./../lib/standard//kernel.nit:207 */
2328 REGB1 = TAG_Bool((REGB0)==(REGB1));
2329 /* ./metamodel//inheritance.nit:404 */
2330 REGB2 = REGB1;
2331 }
2332 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
2333 if (UNTAG_Bool(REGB2)) {
2334 /* ./metamodel//inheritance.nit:405 */
2335 fra.me.REG[2] = CALL_file___Object___stderr(fra.me.REG[0])(fra.me.REG[0]);
2336 if (!once_value_2) {
2337 fra.me.REG[6] = BOX_NativeString("Fatal error: inherit_local_property error\n");
2338 REGB2 = TAG_Int(42);
2339 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
2340 once_value_2 = fra.me.REG[6];
2341 register_static_object(&once_value_2);
2342 } else fra.me.REG[6] = once_value_2;
2343 fra.me.REG[6] = fra.me.REG[6];
2344 CALL_stream___OStream___write(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
2345 /* ./metamodel//inheritance.nit:406 */
2346 REGB2 = TAG_Int(7);
2347 fra.me.REG[6] = NEW_Array_array___Array___with_capacity(REGB2);
2348 if (!once_value_3) {
2349 fra.me.REG[2] = BOX_NativeString("------- ");
2350 REGB2 = TAG_Int(8);
2351 fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
2352 once_value_3 = fra.me.REG[2];
2353 register_static_object(&once_value_3);
2354 } else fra.me.REG[2] = once_value_3;
2355 fra.me.REG[2] = fra.me.REG[2];
2356 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
2357 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___mmmodule(fra.me.REG[0])(fra.me.REG[0]);
2358 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
2359 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
2360 if (!once_value_4) {
2361 fra.me.REG[2] = BOX_NativeString("::");
2362 REGB2 = TAG_Int(2);
2363 fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
2364 once_value_4 = fra.me.REG[2];
2365 register_static_object(&once_value_4);
2366 } else fra.me.REG[2] = once_value_4;
2367 fra.me.REG[2] = fra.me.REG[2];
2368 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
2369 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
2370 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
2371 if (!once_value_5) {
2372 fra.me.REG[2] = BOX_NativeString(" ");
2373 REGB2 = TAG_Int(1);
2374 fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
2375 once_value_5 = fra.me.REG[2];
2376 register_static_object(&once_value_5);
2377 } else fra.me.REG[2] = once_value_5;
2378 fra.me.REG[2] = fra.me.REG[2];
2379 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
2380 fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[1])(fra.me.REG[1]);
2381 fra.me.REG[2] = CALL_abstractmetamodel___MMLocalProperty___full_name(fra.me.REG[2])(fra.me.REG[2]);
2382 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
2383 if (!once_value_6) {
2384 fra.me.REG[2] = BOX_NativeString("");
2385 REGB2 = TAG_Int(0);
2386 fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
2387 once_value_6 = fra.me.REG[2];
2388 register_static_object(&once_value_6);
2389 } else fra.me.REG[2] = once_value_6;
2390 fra.me.REG[2] = fra.me.REG[2];
2391 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
2392 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
2393 CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[6]);
2394 /* ./../lib/standard//collection//array.nit:231 */
2395 fra.me.REG[6] = fra.me.REG[5];
2396 /* ./../lib/standard//collection//array.nit:234 */
2397 REGB2 = TAG_Int(0);
2398 /* ./../lib/standard//collection//array.nit:235 */
2399 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[6])!=NIT_NULL);
2400 if (UNTAG_Bool(REGB1)) {
2401 } else {
2402 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
2403 }
2404 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[6]);
2405 /* ./../lib/standard//collection//array.nit:236 */
2406 fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[6]);
2407 /* ./../lib/standard//collection//array.nit:237 */
2408 while(1) {
2409 /* ./../lib/standard//collection//array.nit:23 */
2410 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[6])!=NIT_NULL);
2411 if (UNTAG_Bool(REGB1)) {
2412 } else {
2413 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
2414 }
2415 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[6]);
2416 /* ./../lib/standard//kernel.nit:212 */
2417 REGB1 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB1));
2418 /* ./../lib/standard//collection//array.nit:237 */
2419 if (UNTAG_Bool(REGB1)) {
2420 /* ./../lib/standard//collection//array.nit:238 */
2421 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
2422 if (UNTAG_Bool(REGB1)) {
2423 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
2424 }
2425 /* ./../lib/standard//collection//array.nit:654 */
2426 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB2)];
2427 /* ./metamodel//inheritance.nit:408 */
2428 REGB1 = TAG_Int(3);
2429 fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB1);
2430 if (!once_value_7) {
2431 fra.me.REG[8] = BOX_NativeString(" ");
2432 REGB1 = TAG_Int(3);
2433 fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB1);
2434 once_value_7 = fra.me.REG[8];
2435 register_static_object(&once_value_7);
2436 } else fra.me.REG[8] = once_value_7;
2437 fra.me.REG[8] = fra.me.REG[8];
2438 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
2439 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalProperty___full_name(fra.me.REG[3])(fra.me.REG[3]);
2440 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[3]);
2441 if (!once_value_8) {
2442 fra.me.REG[3] = BOX_NativeString("");
2443 REGB1 = TAG_Int(0);
2444 fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB1);
2445 once_value_8 = fra.me.REG[3];
2446 register_static_object(&once_value_8);
2447 } else fra.me.REG[3] = once_value_8;
2448 fra.me.REG[3] = fra.me.REG[3];
2449 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[3]);
2450 fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
2451 CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[7]);
2452 /* ./../lib/standard//collection//array.nit:239 */
2453 REGB1 = TAG_Int(1);
2454 /* ./../lib/standard//kernel.nit:215 */
2455 REGB1 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1));
2456 /* ./../lib/standard//collection//array.nit:239 */
2457 REGB2 = REGB1;
2458 } else {
2459 /* ./../lib/standard//collection//array.nit:237 */
2460 goto label9;
2461 }
2462 }
2463 label9: while(0);
2464 /* ./metamodel//inheritance.nit:410 */
2465 REGB2 = TAG_Int(3);
2466 fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB2);
2467 if (!once_value_10) {
2468 fra.me.REG[6] = BOX_NativeString("------- ");
2469 REGB2 = TAG_Int(8);
2470 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
2471 once_value_10 = fra.me.REG[6];
2472 register_static_object(&once_value_10);
2473 } else fra.me.REG[6] = once_value_10;
2474 fra.me.REG[6] = fra.me.REG[6];
2475 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
2476 fra.me.REG[6] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy(fra.me.REG[1])(fra.me.REG[1]);
2477 fra.me.REG[6] = CALL_abstract_collection___Collection___first(fra.me.REG[6])(fra.me.REG[6]);
2478 fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
2479 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
2480 if (!once_value_11) {
2481 fra.me.REG[6] = BOX_NativeString("");
2482 REGB2 = TAG_Int(0);
2483 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
2484 once_value_11 = fra.me.REG[6];
2485 register_static_object(&once_value_11);
2486 } else fra.me.REG[6] = once_value_11;
2487 fra.me.REG[6] = fra.me.REG[6];
2488 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
2489 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
2490 CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
2491 /* ./metamodel//inheritance.nit:411 */
2492 REGB2 = TAG_Int(3);
2493 fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB2);
2494 if (!once_value_12) {
2495 fra.me.REG[6] = BOX_NativeString("------- ");
2496 REGB2 = TAG_Int(8);
2497 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
2498 once_value_12 = fra.me.REG[6];
2499 register_static_object(&once_value_12);
2500 } else fra.me.REG[6] = once_value_12;
2501 fra.me.REG[6] = fra.me.REG[6];
2502 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
2503 fra.me.REG[6] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy(fra.me.REG[1])(fra.me.REG[1]);
2504 fra.me.REG[6] = CALL_partial_order___PartialOrder___to_dot(fra.me.REG[6])(fra.me.REG[6]);
2505 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
2506 if (!once_value_13) {
2507 fra.me.REG[6] = BOX_NativeString("");
2508 REGB2 = TAG_Int(0);
2509 fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
2510 once_value_13 = fra.me.REG[6];
2511 register_static_object(&once_value_13);
2512 } else fra.me.REG[6] = once_value_13;
2513 fra.me.REG[6] = fra.me.REG[6];
2514 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
2515 fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
2516 CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
2517 /* ./metamodel//inheritance.nit:412 */
2518 REGB2 = TAG_Int(1);
2519 CALL_kernel___Object___exit(fra.me.REG[0])(fra.me.REG[0], REGB2);
2520 }
2521 /* ./metamodel//inheritance.nit:414 */
2522 fra.me.REG[5] = CALL_abstract_collection___Collection___first(fra.me.REG[5])(fra.me.REG[5]);
2523 fra.me.REG[4] = fra.me.REG[5];
2524 }
2525 }
2526 /* ./metamodel//inheritance.nit:424 */
2527 REGB2 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0])!=NIT_NULL);
2528 if (UNTAG_Bool(REGB2)) {
2529 } else {
2530 nit_abort("Uninitialized attribute %s", "_local_property_by_global", LOCATE_inheritance, 424);
2531 }
2532 fra.me.REG[0] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0]);
2533 CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[4]);
2534 /* ./metamodel//inheritance.nit:426 */
2535 goto label14;
2536 label14: while(0);
2537 stack_frame_head = fra.me.prev;
2538 return fra.me.REG[4];
2539 }
2540 void inheritance___MMLocalProperty___inherit_global(val_t p0, val_t p1){
2541 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
2542 val_t REGB0;
2543 val_t REGB1;
2544 val_t tmp;
2545 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2546 fra.me.file = LOCATE_inheritance;
2547 fra.me.line = 431;
2548 fra.me.meth = LOCATE_inheritance___MMLocalProperty___inherit_global;
2549 fra.me.has_broke = 0;
2550 fra.me.REG_size = 6;
2551 fra.me.REG[0] = NIT_NULL;
2552 fra.me.REG[1] = NIT_NULL;
2553 fra.me.REG[2] = NIT_NULL;
2554 fra.me.REG[3] = NIT_NULL;
2555 fra.me.REG[4] = NIT_NULL;
2556 fra.me.REG[5] = NIT_NULL;
2557 fra.me.REG[0] = p0;
2558 fra.me.REG[1] = p1;
2559 /* ./metamodel//inheritance.nit:434 */
2560 CALL_abstractmetamodel___MMLocalProperty___set_global(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
2561 /* ./metamodel//inheritance.nit:435 */
2562 fra.me.REG[2] = NEW_Array_array___Array___init();
2563 /* ./metamodel//inheritance.nit:436 */
2564 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalProperty___local_class(fra.me.REG[0])(fra.me.REG[0]);
2565 fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[3])(fra.me.REG[3]);
2566 fra.me.REG[3] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[3])(fra.me.REG[3]);
2567 /* ./../lib/standard//collection//array.nit:234 */
2568 REGB0 = TAG_Int(0);
2569 /* ./../lib/standard//collection//array.nit:235 */
2570 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
2571 if (UNTAG_Bool(REGB1)) {
2572 } else {
2573 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
2574 }
2575 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
2576 /* ./../lib/standard//collection//array.nit:236 */
2577 fra.me.REG[4] = ATTR_array___Array____items(fra.me.REG[3]);
2578 /* ./../lib/standard//collection//array.nit:237 */
2579 while(1) {
2580 /* ./../lib/standard//collection//array.nit:23 */
2581 REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
2582 if (UNTAG_Bool(REGB1)) {
2583 } else {
2584 nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
2585 }
2586 REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
2587 /* ./../lib/standard//kernel.nit:212 */
2588 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
2589 /* ./../lib/standard//collection//array.nit:237 */
2590 if (UNTAG_Bool(REGB1)) {
2591 /* ./../lib/standard//collection//array.nit:238 */
2592 REGB1 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
2593 if (UNTAG_Bool(REGB1)) {
2594 nit_abort("Reciever is null", NULL, LOCATE_array, 238);
2595 }
2596 /* ./../lib/standard//collection//array.nit:654 */
2597 fra.me.REG[5] = ((Nit_NativeArray)fra.me.REG[4])->val[UNTAG_Int(REGB0)];
2598 /* ./metamodel//inheritance.nit:437 */
2599 REGB1 = CALL_abstractmetamodel___MMLocalClass___has_global_property(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[1]);
2600 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
2601 if (UNTAG_Bool(REGB1)) {
2602 goto label1;
2603 }
2604 /* ./metamodel//inheritance.nit:438 */
2605 fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass_____bra(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[1]);
2606 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[5]);
2607 label1: while(0);
2608 /* ./../lib/standard//collection//array.nit:239 */
2609 REGB1 = TAG_Int(1);
2610 /* ./../lib/standard//kernel.nit:215 */
2611 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2612 /* ./../lib/standard//collection//array.nit:239 */
2613 REGB0 = REGB1;
2614 } else {
2615 /* ./../lib/standard//collection//array.nit:237 */
2616 goto label2;
2617 }
2618 }
2619 label2: while(0);
2620 /* ./metamodel//inheritance.nit:440 */
2621 CALL_abstractmetamodel___MMGlobalProperty___add_local_property(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], fra.me.REG[2]);
2622 stack_frame_head = fra.me.prev;
2623 return;
2624 }
2625 void inheritance___MMAncestor___add_in(val_t p0, val_t p1){
2626 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
2627 val_t REGB0;
2628 val_t tmp;
2629 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2630 fra.me.file = LOCATE_inheritance;
2631 fra.me.line = 445;
2632 fra.me.meth = LOCATE_inheritance___MMAncestor___add_in;
2633 fra.me.has_broke = 0;
2634 fra.me.REG_size = 3;
2635 fra.me.REG[0] = NIT_NULL;
2636 fra.me.REG[1] = NIT_NULL;
2637 fra.me.REG[2] = NIT_NULL;
2638 fra.me.REG[0] = p0;
2639 fra.me.REG[1] = p1;
2640 /* ./metamodel//inheritance.nit:448 */
2641 CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
2642 /* ./metamodel//inheritance.nit:449 */
2643 fra.me.REG[2] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
2644 fra.me.REG[2] = CALL_static_type___MMType___local_class(fra.me.REG[2])(fra.me.REG[2]);
2645 CALL_inheritance___MMLocalClass___compute_ancestors(fra.me.REG[2])(fra.me.REG[2]);
2646 /* ./metamodel//inheritance.nit:450 */
2647 fra.me.REG[2] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
2648 fra.me.REG[2] = CALL_static_type___MMType___local_class(fra.me.REG[2])(fra.me.REG[2]);
2649 fra.me.REG[2] = CALL_static_type___MMLocalClass___ancestors(fra.me.REG[2])(fra.me.REG[2]);
2650 REGB0 = TAG_Bool((fra.me.REG[2]!=NIT_NULL) && VAL_ISA(fra.me.REG[2], COLOR_Map, ID_Map)) /*cast Map[MMLocalClass, MMAncestor]*/;
2651 if (UNTAG_Bool(REGB0)) {
2652 } else {
2653 nit_abort("Cast failed", NULL, LOCATE_inheritance, 450);
2654 }
2655 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
2656 if (UNTAG_Bool(REGB0)) {
2657 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 450);
2658 }
2659 CALL_abstract_collection___Collection___iterate(fra.me.REG[2])(fra.me.REG[2], (&(fra.me)), ((fun_t)OC_inheritance___MMAncestor___add_in_1));
2660 stack_frame_head = fra.me.prev;
2661 return;
2662 }
2663 void OC_inheritance___MMAncestor___add_in_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
2664 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2665 val_t REGB0;
2666 val_t REGB1;
2667 val_t REGB2;
2668 fun_t CREG[1];
2669 val_t tmp;
2670 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2671 fra.me.file = LOCATE_inheritance;
2672 fra.me.line = 0;
2673 fra.me.meth = LOCATE_inheritance___MMAncestor___add_in;
2674 fra.me.has_broke = 0;
2675 fra.me.REG_size = 4;
2676 fra.me.REG[0] = NIT_NULL;
2677 fra.me.REG[1] = NIT_NULL;
2678 fra.me.REG[2] = NIT_NULL;
2679 fra.me.REG[3] = NIT_NULL;
2680 fra.me.closure_ctx = closctx_param;
2681 fra.me.closure_funs = CREG;
2682 fra.me.REG[0] = p0;
2683 CREG[0] = clos_fun0;
2684 /* ./metamodel//inheritance.nit:451 */
2685 fra.me.REG[0] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
2686 fra.me.REG[1] = CALL_static_type___MMAncestor___stype(closctx->REG[0])(closctx->REG[0]);
2687 fra.me.REG[1] = CALL_static_type___MMType___mmmodule(fra.me.REG[1])(fra.me.REG[1]);
2688 fra.me.REG[1] = CALL_static_type___MMType___for_module(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
2689 /* ./metamodel//inheritance.nit:452 */
2690 fra.me.REG[0] = CALL_static_type___MMAncestor___stype(closctx->REG[0])(closctx->REG[0]);
2691 fra.me.REG[0] = CALL_static_type___MMType___adapt_to(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
2692 fra.me.REG[1] = CALL_static_type___MMAncestor___inheriter(closctx->REG[0])(closctx->REG[0]);
2693 fra.me.REG[1] = CALL_static_type___MMType___mmmodule(fra.me.REG[1])(fra.me.REG[1]);
2694 fra.me.REG[1] = CALL_static_type___MMType___for_module(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
2695 /* ./metamodel//inheritance.nit:453 */
2696 fra.me.REG[0] = CALL_static_type___MMType___local_class(fra.me.REG[1])(fra.me.REG[1]);
2697 fra.me.REG[2] = CALL_static_type___MMAncestor___inheriter(closctx->REG[0])(closctx->REG[0]);
2698 fra.me.REG[2] = CALL_static_type___MMType___local_class(fra.me.REG[2])(fra.me.REG[2]);
2699 REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[0],fra.me.REG[2]));
2700 if (UNTAG_Bool(REGB0)) {
2701 } else {
2702 REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
2703 REGB0 = REGB1;
2704 }
2705 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
2706 if (UNTAG_Bool(REGB0)) {
2707 /* ./metamodel//inheritance.nit:454 */
2708 fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(closctx->REG[1])(closctx->REG[1]);
2709 /* ./metamodel//inheritance.nit:455 */
2710 REGB0 = TAG_Bool(true);
2711 /* ./metamodel//inheritance.nit:456 */
2712 while(1) {
2713 REGB1 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
2714 if (UNTAG_Bool(REGB1)) {
2715 REGB1 = REGB0;
2716 } else {
2717 REGB2 = TAG_Bool(false);
2718 REGB1 = REGB2;
2719 }
2720 if (UNTAG_Bool(REGB1)) {
2721 /* ./metamodel//inheritance.nit:457 */
2722 fra.me.REG[0] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
2723 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
2724 if (UNTAG_Bool(REGB1)) {
2725 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 457);
2726 }
2727 fra.me.REG[0] = CALL_static_type___MMAncestor___inheriter(fra.me.REG[0])(fra.me.REG[0]);
2728 fra.me.REG[3] = CALL_static_type___MMAncestor___inheriter(closctx->REG[0])(closctx->REG[0]);
2729 REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[0],fra.me.REG[3]));
2730 if (UNTAG_Bool(REGB1)) {
2731 } else {
2732 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
2733 REGB1 = REGB2;
2734 }
2735 if (UNTAG_Bool(REGB1)) {
2736 fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
2737 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
2738 if (UNTAG_Bool(REGB1)) {
2739 nit_abort("Reciever is null", NULL, LOCATE_inheritance, 457);
2740 }
2741 fra.me.REG[3] = CALL_static_type___MMAncestor___stype(fra.me.REG[3])(fra.me.REG[3]);
2742 REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[1]));
2743 if (UNTAG_Bool(REGB1)) {
2744 } else {
2745 REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
2746 REGB1 = REGB2;
2747 }
2748 } else {
2749 REGB2 = TAG_Bool(false);
2750 REGB1 = REGB2;
2751 }
2752 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
2753 REGB0 = REGB1;
2754 /* ./metamodel//inheritance.nit:458 */
2755 CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
2756 } else {
2757 /* ./metamodel//inheritance.nit:456 */
2758 goto label2;
2759 }
2760 }
2761 label2: while(0);
2762 /* ./metamodel//inheritance.nit:460 */
2763 if (UNTAG_Bool(REGB0)) {
2764 /* ./metamodel//inheritance.nit:461 */
2765 fra.me.REG[2] = CALL_static_type___MMAncestor___inheriter(closctx->REG[0])(closctx->REG[0]);
2766 fra.me.REG[1] = NEW_MMSpecAncestor_inheritance___MMSpecAncestor___init(fra.me.REG[2], fra.me.REG[1]);
2767 CALL_abstract_collection___SimpleCollection___add(closctx->REG[1])(closctx->REG[1], fra.me.REG[1]);
2768 }
2769 }
2770 stack_frame_head = fra.me.prev;
2771 return;
2772 }
2773 void inheritance___MMImplicitLocalClass___init(val_t p0, val_t p1, val_t p2, int* init_table){
2774 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMImplicitLocalClass].i;
2775 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
2776 val_t REGB0;
2777 val_t tmp;
2778 if (init_table[itpos0]) return;
2779 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2780 fra.me.file = LOCATE_inheritance;
2781 fra.me.line = 473;
2782 fra.me.meth = LOCATE_inheritance___MMImplicitLocalClass___init;
2783 fra.me.has_broke = 0;
2784 fra.me.REG_size = 6;
2785 fra.me.REG[0] = NIT_NULL;
2786 fra.me.REG[1] = NIT_NULL;
2787 fra.me.REG[2] = NIT_NULL;
2788 fra.me.REG[3] = NIT_NULL;
2789 fra.me.REG[4] = NIT_NULL;
2790 fra.me.REG[5] = NIT_NULL;
2791 fra.me.REG[0] = p0;
2792 fra.me.REG[1] = p1;
2793 fra.me.REG[2] = p2;
2794 /* ./metamodel//inheritance.nit:473 */
2795 fra.me.REG[3] = fra.me.REG[0];
2796 /* ./metamodel//inheritance.nit:475 */
2797 fra.me.REG[4] = CALL_abstractmetamodel___MMGlobalClass___intro(fra.me.REG[2])(fra.me.REG[2]);
2798 /* ./metamodel//inheritance.nit:476 */
2799 fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[4])(fra.me.REG[4]);
2800 REGB0 = CALL_abstractmetamodel___MMLocalClass___arity(fra.me.REG[4])(fra.me.REG[4]);
2801 CALL_abstractmetamodel___MMLocalClass___init(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[5], REGB0, init_table);
2802 /* ./metamodel//inheritance.nit:477 */
2803 CALL_abstractmetamodel___MMLocalClass___set_global(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
2804 stack_frame_head = fra.me.prev;
2805 init_table[itpos0] = 1;
2806 return;
2807 }
2808 val_t inheritance___MMRefineAncestor___local_class(val_t p0){
2809 struct {struct stack_frame_t me;} fra;
2810 val_t REGB0;
2811 val_t tmp;
2812 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2813 fra.me.file = LOCATE_inheritance;
2814 fra.me.line = 483;
2815 fra.me.meth = LOCATE_inheritance___MMRefineAncestor___local_class;
2816 fra.me.has_broke = 0;
2817 fra.me.REG_size = 1;
2818 fra.me.REG[0] = NIT_NULL;
2819 fra.me.REG[0] = p0;
2820 /* ./metamodel//inheritance.nit:483 */
2821 REGB0 = TAG_Bool(ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[0])!=NIT_NULL);
2822 if (UNTAG_Bool(REGB0)) {
2823 } else {
2824 nit_abort("Uninitialized attribute %s", "_local_class", LOCATE_inheritance, 483);
2825 }
2826 fra.me.REG[0] = ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[0]);
2827 stack_frame_head = fra.me.prev;
2828 return fra.me.REG[0];
2829 }
2830 void inheritance___MMRefineAncestor___init(val_t p0, val_t p1, val_t p2, int* init_table){
2831 int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMRefineAncestor].i;
2832 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2833 val_t REGB0;
2834 val_t tmp;
2835 if (init_table[itpos1]) return;
2836 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2837 fra.me.file = LOCATE_inheritance;
2838 fra.me.line = 485;
2839 fra.me.meth = LOCATE_inheritance___MMRefineAncestor___init;
2840 fra.me.has_broke = 0;
2841 fra.me.REG_size = 4;
2842 fra.me.REG[0] = NIT_NULL;
2843 fra.me.REG[1] = NIT_NULL;
2844 fra.me.REG[2] = NIT_NULL;
2845 fra.me.REG[3] = NIT_NULL;
2846 fra.me.REG[0] = p0;
2847 fra.me.REG[1] = p1;
2848 fra.me.REG[2] = p2;
2849 /* ./metamodel//inheritance.nit:485 */
2850 fra.me.REG[3] = fra.me.REG[0];
2851 CALL_static_type___MMAncestor___init(fra.me.REG[0])(fra.me.REG[0], init_table);
2852 /* ./metamodel//inheritance.nit:487 */
2853 ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[3]) = fra.me.REG[2];
2854 /* ./metamodel//inheritance.nit:488 */
2855 fra.me.REG[1] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
2856 CALL_static_type___MMAncestor___inheriter__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
2857 /* ./metamodel//inheritance.nit:489 */
2858 REGB0 = TAG_Bool(ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[3])!=NIT_NULL);
2859 if (UNTAG_Bool(REGB0)) {
2860 } else {
2861 nit_abort("Uninitialized attribute %s", "_local_class", LOCATE_inheritance, 489);
2862 }
2863 fra.me.REG[1] = ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[3]);
2864 fra.me.REG[1] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
2865 CALL_static_type___MMAncestor___stype__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
2866 stack_frame_head = fra.me.prev;
2867 init_table[itpos1] = 1;
2868 return;
2869 }
2870 val_t inheritance___MMSpecAncestor___local_class(val_t p0){
2871 struct {struct stack_frame_t me;} fra;
2872 val_t tmp;
2873 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2874 fra.me.file = LOCATE_inheritance;
2875 fra.me.line = 496;
2876 fra.me.meth = LOCATE_inheritance___MMSpecAncestor___local_class;
2877 fra.me.has_broke = 0;
2878 fra.me.REG_size = 1;
2879 fra.me.REG[0] = NIT_NULL;
2880 fra.me.REG[0] = p0;
2881 /* ./metamodel//inheritance.nit:496 */
2882 fra.me.REG[0] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
2883 fra.me.REG[0] = CALL_static_type___MMType___local_class(fra.me.REG[0])(fra.me.REG[0]);
2884 goto label1;
2885 label1: while(0);
2886 stack_frame_head = fra.me.prev;
2887 return fra.me.REG[0];
2888 }
2889 void inheritance___MMSpecAncestor___init(val_t p0, val_t p1, val_t p2, int* init_table){
2890 int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMSpecAncestor].i;
2891 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2892 val_t tmp;
2893 if (init_table[itpos2]) return;
2894 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2895 fra.me.file = LOCATE_inheritance;
2896 fra.me.line = 498;
2897 fra.me.meth = LOCATE_inheritance___MMSpecAncestor___init;
2898 fra.me.has_broke = 0;
2899 fra.me.REG_size = 4;
2900 fra.me.REG[0] = NIT_NULL;
2901 fra.me.REG[1] = NIT_NULL;
2902 fra.me.REG[2] = NIT_NULL;
2903 fra.me.REG[3] = NIT_NULL;
2904 fra.me.REG[0] = p0;
2905 fra.me.REG[1] = p1;
2906 fra.me.REG[2] = p2;
2907 /* ./metamodel//inheritance.nit:498 */
2908 fra.me.REG[3] = fra.me.REG[0];
2909 CALL_static_type___MMAncestor___init(fra.me.REG[0])(fra.me.REG[0], init_table);
2910 /* ./metamodel//inheritance.nit:500 */
2911 ATTR_static_type___MMAncestor____inheriter(fra.me.REG[3]) = fra.me.REG[1];
2912 /* ./metamodel//inheritance.nit:501 */
2913 ATTR_static_type___MMAncestor____stype(fra.me.REG[3]) = fra.me.REG[2];
2914 stack_frame_head = fra.me.prev;
2915 init_table[itpos2] = 1;
2916 return;
2917 }
2918 val_t inheritance___MMDefaultAncestor___local_class(val_t p0){
2919 struct {struct stack_frame_t me;} fra;
2920 val_t tmp;
2921 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2922 fra.me.file = LOCATE_inheritance;
2923 fra.me.line = 507;
2924 fra.me.meth = LOCATE_inheritance___MMDefaultAncestor___local_class;
2925 fra.me.has_broke = 0;
2926 fra.me.REG_size = 1;
2927 fra.me.REG[0] = NIT_NULL;
2928 fra.me.REG[0] = p0;
2929 /* ./metamodel//inheritance.nit:507 */
2930 fra.me.REG[0] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
2931 fra.me.REG[0] = CALL_static_type___MMType___local_class(fra.me.REG[0])(fra.me.REG[0]);
2932 goto label1;
2933 label1: while(0);
2934 stack_frame_head = fra.me.prev;
2935 return fra.me.REG[0];
2936 }
2937 void inheritance___MMDefaultAncestor___init(val_t p0, val_t p1, val_t p2, int* init_table){
2938 int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMDefaultAncestor].i;
2939 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2940 val_t tmp;
2941 if (init_table[itpos3]) return;
2942 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2943 fra.me.file = LOCATE_inheritance;
2944 fra.me.line = 509;
2945 fra.me.meth = LOCATE_inheritance___MMDefaultAncestor___init;
2946 fra.me.has_broke = 0;
2947 fra.me.REG_size = 4;
2948 fra.me.REG[0] = NIT_NULL;
2949 fra.me.REG[1] = NIT_NULL;
2950 fra.me.REG[2] = NIT_NULL;
2951 fra.me.REG[3] = NIT_NULL;
2952 fra.me.REG[0] = p0;
2953 fra.me.REG[1] = p1;
2954 fra.me.REG[2] = p2;
2955 /* ./metamodel//inheritance.nit:509 */
2956 fra.me.REG[3] = fra.me.REG[0];
2957 CALL_static_type___MMAncestor___init(fra.me.REG[0])(fra.me.REG[0], init_table);
2958 /* ./metamodel//inheritance.nit:511 */
2959 fra.me.REG[1] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
2960 CALL_static_type___MMAncestor___inheriter__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
2961 /* ./metamodel//inheritance.nit:512 */
2962 CALL_static_type___MMAncestor___stype__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
2963 stack_frame_head = fra.me.prev;
2964 init_table[itpos3] = 1;
2965 return;
2966 }