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