misc: update Changelog and NOTICE; remove BUGS and TODO
[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 self) {
4 struct trace_t trace = {NULL, NULL, 24, LOCATE_inheritance___MMModule___type_any};
5 static val_t once_value_1; static int once_bool_1; /* Once value for variable[3]*/
6 static val_t once_value_2 = NIT_NULL; /* Once value for string variable[3]*/
7 val_t variable[4];
8 struct WBT_ **closurevariable = NULL;
9 trace.prev = tracehead; tracehead = &trace;
10 trace.file = LOCATE_inheritance;
11 /* Register variable[0]: Local variable */
12 variable[0] = self;
13 /* Register variable[1]: Method return value and escape marker */
14 /* Register variable[2]: Local variable */
15 /* Register variable[3]: Once expression result */
16 if (once_bool_1) variable[3] = once_value_1;
17 else {
18 /* Register variable[3]: Once String constant */
19 if (once_value_2 != NIT_NULL) variable[3] = once_value_2;
20 else {
21 variable[3] = NEW_String_string___String___with_native(BOX_NativeString("Object"), TAG_Int(6)) /*new String*/;
22 once_value_2 = variable[3];
23 }
24 /* Register variable[3]: Result */
25 /* Register variable[3]: Result */
26 variable[3] = CALL_symbol___String___to_symbol(variable[3])(variable[3]) /*String::to_symbol*/;
27 once_value_1 = variable[3];
28 once_bool_1 = true;
29 }
30 /* Register variable[3]: Result */
31 /* Register variable[3]: Result */
32 variable[3] = CALL_abstractmetamodel___MMModule___class_by_name(variable[0])(variable[0], variable[3]) /*MMModule::class_by_name*/;
33 variable[2] = variable[3];
34 /* Register variable[3]: Result */
35 variable[3] = CALL_static_type___MMLocalClass___get_type( variable[2] /*c_name*/)( variable[2] /*c_name*/) /*MMLocalClass::get_type*/;
36 variable[1] = variable[3];
37 goto return_label0;
38 return_label0: while(false);
39 tracehead = trace.prev;
40 return variable[1];
41 }
42 void inheritance___MMModule___import_global_classes(val_t self) {
43 struct trace_t trace = {NULL, NULL, 31, LOCATE_inheritance___MMModule___import_global_classes};
44 val_t variable[11];
45 struct WBT_ **closurevariable = NULL;
46 trace.prev = tracehead; tracehead = &trace;
47 trace.file = LOCATE_inheritance;
48 /* Register variable[0]: Local variable */
49 variable[0] = self;
50 /* Register variable[1]: Method return value and escape marker */
51 /* Register variable[2]: Local variable */
52 /* Register variable[3]: Result */
53 variable[3] = NEW_HashMap_hash___HashMap___init() /*new HashMap[MMGlobalClass, HashSet[MMLocalClass]]*/;
54 variable[2] = variable[3];
55 /* Register variable[3]: Result */
56 variable[3] = CALL_abstractmetamodel___MMModule___mhe(variable[0])(variable[0]) /*MMModule::mhe*/;
57 /* Register variable[3]: Result */
58 variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], NIT_NULL /*null*/) /*Object::==*/)))))));
59 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMModule___import_global_classes, LOCATE_inheritance, 35); nit_exit(1);}
60 /* Register variable[3]: Result */
61 variable[3] = CALL_abstractmetamodel___MMModule___mhe(variable[0])(variable[0]) /*MMModule::mhe*/;
62 /* Register variable[3]: Result */
63 variable[3] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[3])(variable[3]) /*PartialOrderElement::direct_greaters*/;
64 /* Register variable[3]: For iterator */
65 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArrayRead::iterator*/;
66 while (true) { /*for*/
67 /* Register variable[4]: For 'is_ok' result */
68 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
69 if (!UNTAG_Bool(variable[4])) break; /*for*/
70 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
71 /* Register variable[5]: Local variable */
72 variable[5] = variable[4];
73 /* Register variable[6]: Result */
74 variable[6] = CALL_abstractmetamodel___MMModule___global_classes( variable[5] /*mod*/)( variable[5] /*mod*/) /*MMModule::global_classes*/;
75 /* Register variable[6]: For iterator */
76 variable[6] = CALL_abstract_collection___Collection___iterator(variable[6])(variable[6]) /*AbstractArrayRead::iterator*/;
77 while (true) { /*for*/
78 /* Register variable[7]: For 'is_ok' result */
79 variable[7] = CALL_abstract_collection___Iterator___is_ok(variable[6])(variable[6]) /*ArrayIterator::is_ok*/;
80 if (!UNTAG_Bool(variable[7])) break; /*for*/
81 variable[7] = CALL_abstract_collection___Iterator___item(variable[6])(variable[6]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
82 /* Register variable[8]: Local variable */
83 variable[8] = variable[7];
84 /* Register variable[9]: Result */
85 variable[9] = CALL_abstractmetamodel___MMModule___global_classes(variable[0])(variable[0]) /*MMModule::global_classes*/;
86 /* Register variable[9]: Result */
87 variable[9] = CALL_abstract_collection___Collection___has(variable[9])(variable[9], variable[8] /*glob*/) /*AbstractArrayRead::has*/;
88 if (UNTAG_Bool(variable[9])) { /*if*/
89 goto continue_5;
90 }
91 /* Register variable[9]: Result */
92 variable[9] = ATTR_abstractmetamodel___MMModule____global_classes(variable[0]) /*MMModule::_global_classes*/;
93 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[8] /*glob*/) /*AbstractArray::add*/;
94 /* Register variable[9]: Result */
95 variable[9] = ATTR_abstractmetamodel___MMModule____global_class_by_name(variable[0]) /*MMModule::_global_class_by_name*/;
96 /* Register variable[10]: Result */
97 variable[10] = CALL_abstractmetamodel___MMGlobalClass___name( variable[8] /*glob*/)( variable[8] /*glob*/) /*MMGlobalClass::name*/;
98 CALL_abstract_collection___Map_____braeq(variable[9])(variable[9], variable[10], variable[8] /*glob*/) /*Map::[]=*/;
99 continue_5: while(0);
100 CALL_abstract_collection___Iterator___next(variable[6])(variable[6]) /*ArrayIterator::next*/;
101 }
102 break_5: while(0);
103 continue_4: while(0);
104 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
105 }
106 break_4: while(0);
107 return_label3: while(false);
108 tracehead = trace.prev;
109 return;
110 }
111 void inheritance___MMModule___import_local_classes(val_t self) {
112 struct trace_t trace = {NULL, NULL, 46, LOCATE_inheritance___MMModule___import_local_classes};
113 val_t variable[7];
114 struct WBT_ **closurevariable = NULL;
115 trace.prev = tracehead; tracehead = &trace;
116 trace.file = LOCATE_inheritance;
117 /* Register variable[0]: Local variable */
118 variable[0] = self;
119 /* Register variable[1]: Method return value and escape marker */
120 /* Register variable[2]: Result */
121 variable[2] = ATTR_abstractmetamodel___MMModule____global_classes(variable[0]) /*MMModule::_global_classes*/;
122 /* Register variable[2]: For iterator */
123 variable[2] = CALL_abstract_collection___Collection___iterator(variable[2])(variable[2]) /*AbstractArrayRead::iterator*/;
124 while (true) { /*for*/
125 /* Register variable[3]: For 'is_ok' result */
126 variable[3] = CALL_abstract_collection___Iterator___is_ok(variable[2])(variable[2]) /*ArrayIterator::is_ok*/;
127 if (!UNTAG_Bool(variable[3])) break; /*for*/
128 variable[3] = CALL_abstract_collection___Iterator___item(variable[2])(variable[2]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
129 /* Register variable[4]: Local variable */
130 variable[4] = variable[3];
131 /* Register variable[5]: Result */
132 variable[5] = ATTR_abstractmetamodel___MMModule____local_class_by_global(variable[0]) /*MMModule::_local_class_by_global*/;
133 /* Register variable[5]: Result */
134 variable[5] = CALL_abstract_collection___MapRead___has_key(variable[5])(variable[5], variable[4] /*g*/) /*MapRead::has_key*/;
135 if (UNTAG_Bool(variable[5])) { /*if*/
136 goto continue_7;
137 }
138 /* Register variable[5]: Local variable */
139 /* Register variable[6]: Result */
140 variable[6] = NEW_MMImplicitLocalClass_inheritance___MMImplicitLocalClass___init(variable[0], variable[4] /*g*/) /*new MMImplicitLocalClass*/;
141 variable[5] = variable[6];
142 continue_7: while(0);
143 CALL_abstract_collection___Iterator___next(variable[2])(variable[2]) /*ArrayIterator::next*/;
144 }
145 break_7: while(0);
146 return_label6: while(false);
147 tracehead = trace.prev;
148 return;
149 }
150 val_t inheritance___MMLocalClass_____bra(val_t self, val_t param0) {
151 struct trace_t trace = {NULL, NULL, 194, LOCATE_inheritance___MMLocalClass_____bra};
152 val_t variable[4];
153 struct WBT_ **closurevariable = NULL;
154 trace.prev = tracehead; tracehead = &trace;
155 trace.file = LOCATE_inheritance;
156 /* Register variable[0]: Local variable */
157 variable[0] = self;
158 /* Register variable[1]: Local variable */
159 variable[1] = param0;
160 /* Register variable[2]: Method return value and escape marker */
161 /* Register variable[3]: Result */
162 variable[3] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(variable[0]) /*MMLocalClass::_local_property_by_global*/;
163 /* Register variable[3]: Result */
164 variable[3] = CALL_abstract_collection___MapRead___has_key(variable[3])(variable[3], variable[1] /*glob*/) /*MapRead::has_key*/;
165 if (UNTAG_Bool(variable[3])) { /*if*/
166 /* Register variable[3]: Result */
167 variable[3] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(variable[0]) /*MMLocalClass::_local_property_by_global*/;
168 /* Register variable[3]: Result */
169 variable[3] = CALL_abstract_collection___MapRead_____bra(variable[3])(variable[3], variable[1] /*glob*/) /*MapRead::[]*/;
170 variable[2] = variable[3];
171 goto return_label8;
172 } else { /*if*/
173 /* Register variable[3]: Result */
174 variable[3] = CALL_abstractmetamodel___MMLocalClass___has_global_property(variable[0])(variable[0], variable[1] /*glob*/) /*MMLocalClass::has_global_property*/;
175 if (UNTAG_Bool(variable[3])) { /*if*/
176 /* Register variable[3]: Result */
177 variable[3] = CALL_inheritance___MMLocalClass___inherit_local_property(variable[0])(variable[0], variable[1] /*glob*/) /*MMLocalClass::inherit_local_property*/;
178 variable[2] = variable[3];
179 goto return_label8;
180 } else { /*if*/
181 fprintf(stderr, "Aborted"); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass_____bra, LOCATE_inheritance, 201); nit_exit(1);
182 }
183 }
184 return_label8: while(false);
185 tracehead = trace.prev;
186 return variable[2];
187 }
188 void inheritance___MMLocalClass___compute_super_classes(val_t self) {
189 struct trace_t trace = {NULL, NULL, 64, LOCATE_inheritance___MMLocalClass___compute_super_classes};
190 static val_t once_value_10 = NIT_NULL; /* Once value for string variable[4]*/
191 static val_t once_value_11 = NIT_NULL; /* Once value for string variable[4]*/
192 val_t variable[6];
193 struct WBT_ **closurevariable = NULL;
194 trace.prev = tracehead; tracehead = &trace;
195 trace.file = LOCATE_inheritance;
196 /* Register variable[0]: Local variable */
197 variable[0] = self;
198 /* Register variable[1]: Method return value and escape marker */
199 /* Register variable[2]: Result */
200 variable[2] = CALL_inheritance___MMLocalClass___computed_super_classes(variable[0])(variable[0]) /*MMLocalClass::computed_super_classes*/;
201 if (UNTAG_Bool(variable[2])) { /*if*/
202 goto return_label9;
203 } else { /*if*/
204 /* Register variable[2]: Result */
205 variable[2] = ATTR_inheritance___MMLocalClass____computing_super(variable[0]) /*MMLocalClass::_computing_super*/;
206 if (UNTAG_Bool(variable[2])) { /*if*/
207 /* Register variable[2]: Result */
208 variable[2] = CALL_file___Object___stderr(variable[0])(variable[0]) /*Object::stderr*/;
209 variable[3] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
210 /* Register variable[4]: Once String constant */
211 if (once_value_10 != NIT_NULL) variable[4] = once_value_10;
212 else {
213 variable[4] = NEW_String_string___String___with_native(BOX_NativeString("Fatal error: Inheritance loop for class "), TAG_Int(40)) /*new String*/;
214 once_value_10 = variable[4];
215 }
216 /* Register variable[4]: Result */
217 /* Ensure var variable[4]: super-string element*/
218 CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
219 /* Ensure var variable[0]: super-string element*/
220 CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], CALL_string___Object___to_s(variable[0])(variable[0]) /*Object::to_s*/) /*AbstractArray::add*/;
221 /* Register variable[4]: Once String constant */
222 if (once_value_11 != NIT_NULL) variable[4] = once_value_11;
223 else {
224 variable[4] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)) /*new String*/;
225 once_value_11 = variable[4];
226 }
227 /* Register variable[4]: Result */
228 /* Ensure var variable[4]: super-string element*/
229 CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[4]) /*AbstractArray::add*/;
230 /* Register variable[3]: Result */
231 variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Object::to_s*/;
232 CALL_stream___OStream___write(variable[2])(variable[2], variable[3]) /*OFStream::write*/;
233 exit(UNTAG_Int( TAG_Int(1)));
234 }
235 }
236 ATTR_inheritance___MMLocalClass____computing_super(variable[0]) /*MMLocalClass::_computing_super*/ = TAG_Bool(true);
237 /* Register variable[2]: Local variable */
238 /* Register variable[3]: Result */
239 variable[3] = NEW_Array_array___Array___init() /*new Array[MMLocalClass]*/;
240 variable[2] = variable[3];
241 CALL_inheritance___MMLocalClass___add_explicit_classes(variable[0])(variable[0], variable[2] /*supers*/) /*MMLocalClass::add_explicit_classes*/;
242 CALL_inheritance___MMLocalClass___add_super_classes(variable[0])(variable[0], variable[2] /*supers*/) /*MMLocalClass::add_super_classes*/;
243 CALL_inheritance___MMLocalClass___add_default_any_class(variable[0])(variable[0], variable[2] /*supers*/) /*MMLocalClass::add_default_any_class*/;
244 CALL_inheritance___MMLocalClass___compute_super_parents(variable[0])(variable[0], variable[2] /*supers*/) /*MMLocalClass::compute_super_parents*/;
245 /* Register variable[3]: Local variable */
246 /* Register variable[4]: Result */
247 variable[4] = NEW_HashSet_hash___HashSet___init() /*new HashSet[MMLocalClass]*/;
248 variable[3] = variable[4];
249 CALL_abstract_collection___SimpleCollection___add_all( variable[3] /*set*/)( variable[3] /*set*/, variable[2] /*supers*/) /*SimpleCollection::add_all*/;
250 /* Register variable[4]: Local variable */
251 /* Register variable[5]: Result */
252 variable[5] = CALL_array___Collection___to_a( variable[3] /*set*/)( variable[3] /*set*/) /*Collection::to_a*/;
253 variable[4] = variable[5];
254 /* Register variable[5]: Result */
255 variable[5] = CALL_abstractmetamodel___MMLocalClass___module(variable[0])(variable[0]) /*MMLocalClass::module*/;
256 CALL_abstractmetamodel___MMModule___set_supers_class(variable[5])(variable[5], variable[0], variable[4] /*u*/) /*MMModule::set_supers_class*/;
257 /* Register variable[5]: Result */
258 variable[5] = ATTR_abstractmetamodel___MMLocalClass____crhe(variable[0]) /*MMLocalClass::_crhe*/;
259 /* Register variable[5]: Result */
260 variable[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[5] == NIT_NULL /*null*/) || ((variable[5] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[5])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[5], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[5])(variable[5], NIT_NULL /*null*/) /*Object::==*/)))))));
261 if (!UNTAG_Bool(variable[5])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___compute_super_classes, LOCATE_inheritance, 85); nit_exit(1);}
262 /* Register variable[5]: Result */
263 variable[5] = ATTR_abstractmetamodel___MMLocalClass____cshe(variable[0]) /*MMLocalClass::_cshe*/;
264 /* Register variable[5]: Result */
265 variable[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[5] == NIT_NULL /*null*/) || ((variable[5] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[5])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[5], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[5])(variable[5], NIT_NULL /*null*/) /*Object::==*/)))))));
266 if (!UNTAG_Bool(variable[5])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___compute_super_classes, LOCATE_inheritance, 86); nit_exit(1);}
267 ATTR_inheritance___MMLocalClass____computing_super(variable[0]) /*MMLocalClass::_computing_super*/ = TAG_Bool(false);
268 return_label9: while(false);
269 tracehead = trace.prev;
270 return;
271 }
272 void inheritance___MMLocalClass___compute_ancestors(val_t self) {
273 struct trace_t trace = {NULL, NULL, 90, LOCATE_inheritance___MMLocalClass___compute_ancestors};
274 val_t variable[8];
275 struct WBT_ **closurevariable = NULL;
276 trace.prev = tracehead; tracehead = &trace;
277 trace.file = LOCATE_inheritance;
278 /* Register variable[0]: Local variable */
279 variable[0] = self;
280 /* Register variable[1]: Method return value and escape marker */
281 /* Register variable[2]: Result */
282 variable[2] = CALL_inheritance___MMLocalClass___computed_super_classes(variable[0])(variable[0]) /*MMLocalClass::computed_super_classes*/;
283 if (!UNTAG_Bool(variable[2])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___compute_ancestors, LOCATE_inheritance, 93); nit_exit(1);}
284 /* Register variable[2]: Result */
285 variable[2] = CALL_inheritance___MMLocalClass___computed_ancestors(variable[0])(variable[0]) /*MMLocalClass::computed_ancestors*/;
286 if (UNTAG_Bool(variable[2])) { /*if*/
287 goto return_label12;
288 }
289 /* Register variable[2]: Local variable */
290 /* Register variable[3]: Result */
291 variable[3] = CALL_inheritance___MMLocalClass___build_ancestors(variable[0])(variable[0]) /*MMLocalClass::build_ancestors*/;
292 /* Register variable[3]: Result */
293 variable[3] = CALL_inheritance___MMLocalClass___group_ancestors(variable[0])(variable[0], variable[3]) /*MMLocalClass::group_ancestors*/;
294 variable[2] = variable[3];
295 /* Register variable[3]: Result */
296 variable[3] = NEW_HashMap_hash___HashMap___init() /*new HashMap[MMLocalClass, MMAncestor]*/;
297 ATTR_static_type___MMLocalClass____ancestors(variable[0]) /*MMLocalClass::_ancestors*/ = variable[3];
298 /* Register variable[3]: For iterator */
299 variable[3] = CALL_abstract_collection___Collection___iterator( variable[2] /*ancestors*/)( variable[2] /*ancestors*/) /*MapRead::iterator*/;
300 while (true) { /*for*/
301 /* Register variable[4]: For 'is_ok' result */
302 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*Iterator::is_ok*/;
303 if (!UNTAG_Bool(variable[4])) break; /*for*/
304 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*Iterator::item*/ /* Ensure var: For item*/;
305 /* Register variable[5]: Local variable */
306 variable[5] = variable[4];
307 /* Register variable[6]: Result */
308 variable[6] = CALL_abstract_collection___Collection___length( variable[5] /*set*/)( variable[5] /*set*/) /*Collection::length*/;
309 /* Register variable[6]: Result */
310 variable[6] = TAG_Bool((variable[6])==( TAG_Int(1)));
311 if (UNTAG_Bool(variable[6])) { /*if*/
312 /* Register variable[6]: Result */
313 variable[6] = CALL_abstract_collection___Collection___first( variable[5] /*set*/)( variable[5] /*set*/) /*Collection::first*/;
314 CALL_static_type___MMLocalClass___add_ancestor(variable[0])(variable[0], variable[6]) /*MMLocalClass::add_ancestor*/;
315 } else { /*if*/
316 /* Register variable[6]: Local variable */
317 /* Register variable[7]: Result */
318 variable[7] = CALL_inheritance___MMLocalClass___merge_ancestors(variable[0])(variable[0], variable[5] /*set*/) /*MMLocalClass::merge_ancestors*/;
319 variable[6] = variable[7];
320 /* Register variable[7]: Result */
321 variable[7] = CALL_inheritance___MMLocalClass___merge_ancestors(variable[0])(variable[0], variable[5] /*set*/) /*MMLocalClass::merge_ancestors*/;
322 CALL_static_type___MMLocalClass___add_ancestor(variable[0])(variable[0], variable[7]) /*MMLocalClass::add_ancestor*/;
323 }
324 continue_13: while(0);
325 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
326 }
327 break_13: while(0);
328 return_label12: while(false);
329 tracehead = trace.prev;
330 return;
331 }
332 void inheritance___MMLocalClass___inherit_global_properties(val_t self) {
333 struct trace_t trace = {NULL, NULL, 109, LOCATE_inheritance___MMLocalClass___inherit_global_properties};
334 val_t variable[12];
335 struct WBT_ **closurevariable = NULL;
336 trace.prev = tracehead; tracehead = &trace;
337 trace.file = LOCATE_inheritance;
338 /* Register variable[0]: Local variable */
339 variable[0] = self;
340 /* Register variable[1]: Method return value and escape marker */
341 /* Register variable[2]: Result */
342 variable[2] = ATTR_abstractmetamodel___MMLocalClass____global_properties(variable[0]) /*MMLocalClass::_global_properties*/;
343 /* Register variable[2]: Result */
344 variable[2] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[2])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[2], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[2])(variable[2], NIT_NULL /*null*/) /*Object::==*/)))))));
345 if (UNTAG_Bool(variable[2])) { /*if*/
346 goto return_label14;
347 }
348 /* Register variable[2]: Result */
349 variable[2] = NEW_HashSet_hash___HashSet___init() /*new HashSet[MMGlobalProperty]*/;
350 ATTR_abstractmetamodel___MMLocalClass____global_properties(variable[0]) /*MMLocalClass::_global_properties*/ = variable[2];
351 /* Register variable[2]: Result */
352 variable[2] = NEW_HashMap_hash___HashMap___init() /*new HashMap[Symbol, Array[MMGlobalProperty]]*/;
353 ATTR_abstractmetamodel___MMLocalClass____properties_by_name(variable[0]) /*MMLocalClass::_properties_by_name*/ = variable[2];
354 /* Register variable[2]: Result */
355 variable[2] = NEW_HashMap_hash___HashMap___init() /*new HashMap[MMGlobalProperty, MMLocalProperty]*/;
356 ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(variable[0]) /*MMLocalClass::_local_property_by_global*/ = variable[2];
357 /* Register variable[2]: Local variable */
358 /* Register variable[3]: Result */
359 variable[3] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(variable[0]) /*MMLocalClass::_properties_by_name*/;
360 variable[2] = variable[3];
361 /* Register variable[3]: Local variable */
362 /* Register variable[4]: Result */
363 variable[4] = ATTR_abstractmetamodel___MMLocalClass____global_properties(variable[0]) /*MMLocalClass::_global_properties*/;
364 variable[3] = variable[4];
365 /* Register variable[4]: Result */
366 variable[4] = CALL_abstractmetamodel___MMLocalClass___che(variable[0])(variable[0]) /*MMLocalClass::che*/;
367 /* Register variable[4]: Result */
368 variable[4] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[4])(variable[4]) /*PartialOrderElement::direct_greaters*/;
369 /* Register variable[4]: For iterator */
370 variable[4] = CALL_abstract_collection___Collection___iterator(variable[4])(variable[4]) /*AbstractArrayRead::iterator*/;
371 while (true) { /*for*/
372 /* Register variable[5]: For 'is_ok' result */
373 variable[5] = CALL_abstract_collection___Iterator___is_ok(variable[4])(variable[4]) /*ArrayIterator::is_ok*/;
374 if (!UNTAG_Bool(variable[5])) break; /*for*/
375 variable[5] = CALL_abstract_collection___Iterator___item(variable[4])(variable[4]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
376 /* Register variable[6]: Local variable */
377 variable[6] = variable[5];
378 /* Register variable[7]: Result */
379 variable[7] = CALL_abstractmetamodel___MMLocalClass___global_properties( variable[6] /*c*/)( variable[6] /*c*/) /*MMLocalClass::global_properties*/;
380 /* Register variable[7]: For iterator */
381 variable[7] = CALL_abstract_collection___Collection___iterator(variable[7])(variable[7]) /*Collection::iterator*/;
382 while (true) { /*for*/
383 /* Register variable[8]: For 'is_ok' result */
384 variable[8] = CALL_abstract_collection___Iterator___is_ok(variable[7])(variable[7]) /*Iterator::is_ok*/;
385 if (!UNTAG_Bool(variable[8])) break; /*for*/
386 variable[8] = CALL_abstract_collection___Iterator___item(variable[7])(variable[7]) /*Iterator::item*/ /* Ensure var: For item*/;
387 /* Register variable[9]: Local variable */
388 variable[9] = variable[8];
389 /* Register variable[10]: Result */
390 variable[10] = CALL_abstract_collection___Collection___has( variable[3] /*set*/)( variable[3] /*set*/, variable[9] /*glob*/) /*Collection::has*/;
391 if (UNTAG_Bool(variable[10])) { /*if*/
392 goto continue_16;
393 }
394 CALL_abstract_collection___SimpleCollection___add( variable[3] /*set*/)( variable[3] /*set*/, variable[9] /*glob*/) /*SimpleCollection::add*/;
395 /* Register variable[10]: Result */
396 variable[10] = CALL_abstractmetamodel___MMGlobalProperty___is_init( variable[9] /*glob*/)( variable[9] /*glob*/) /*MMGlobalProperty::is_init*/;
397 /* Ensure var variable[10]: Left 'and' operand*/
398 if (UNTAG_Bool(variable[10])) { /* and */
399 /* Register variable[10]: Result */
400 variable[10] = CALL_abstractmetamodel___MMGlobalProperty___intro( variable[9] /*glob*/)( variable[9] /*glob*/) /*MMGlobalProperty::intro*/;
401 /* Register variable[10]: Result */
402 variable[10] = CALL_abstractmetamodel___MMLocalProperty___local_class(variable[10])(variable[10]) /*MMLocalProperty::local_class*/;
403 /* Register variable[10]: Result */
404 variable[10] = CALL_abstractmetamodel___MMLocalClass___global(variable[10])(variable[10]) /*MMLocalClass::global*/;
405 /* Register variable[11]: Result */
406 variable[11] = CALL_abstractmetamodel___MMLocalClass___global(variable[0])(variable[0]) /*MMLocalClass::global*/;
407 /* Register variable[10]: Result */
408 variable[10] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[10] == variable[11]) || ((variable[10] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[10])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[10],variable[11])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[10])(variable[10], variable[11]) /*Object::==*/)))))));
409 }
410 /* Register variable[10]: Result */
411 if (UNTAG_Bool(variable[10])) { /*if*/
412 goto continue_16;
413 }
414 CALL_inheritance___MMLocalClass___make_visible_an_inherited_global_property(variable[0])(variable[0], variable[9] /*glob*/) /*MMLocalClass::make_visible_an_inherited_global_property*/;
415 continue_16: while(0);
416 CALL_abstract_collection___Iterator___next(variable[7])(variable[7]) /*Iterator::next*/;
417 }
418 break_16: while(0);
419 continue_15: while(0);
420 CALL_abstract_collection___Iterator___next(variable[4])(variable[4]) /*ArrayIterator::next*/;
421 }
422 break_15: while(0);
423 return_label14: while(false);
424 tracehead = trace.prev;
425 return;
426 }
427 void inheritance___MMLocalClass___make_visible_an_inherited_global_property(val_t self, val_t param0) {
428 struct trace_t trace = {NULL, NULL, 138, LOCATE_inheritance___MMLocalClass___make_visible_an_inherited_global_property};
429 val_t variable[7];
430 struct WBT_ **closurevariable = NULL;
431 trace.prev = tracehead; tracehead = &trace;
432 trace.file = LOCATE_inheritance;
433 /* Register variable[0]: Local variable */
434 variable[0] = self;
435 /* Register variable[1]: Local variable */
436 variable[1] = param0;
437 /* Register variable[2]: Method return value and escape marker */
438 /* Register variable[3]: Local variable */
439 /* Register variable[4]: Result */
440 variable[4] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(variable[0]) /*MMLocalClass::_properties_by_name*/;
441 variable[3] = variable[4];
442 /* Register variable[4]: Local variable */
443 /* Register variable[5]: Result */
444 variable[5] = CALL_abstractmetamodel___MMGlobalProperty___intro( variable[1] /*glob*/)( variable[1] /*glob*/) /*MMGlobalProperty::intro*/;
445 /* Register variable[5]: Result */
446 variable[5] = CALL_abstractmetamodel___MMLocalProperty___name(variable[5])(variable[5]) /*MMLocalProperty::name*/;
447 variable[4] = variable[5];
448 /* Register variable[5]: Local variable */
449 /*variable[5] is variable conf_set*/
450 /* Register variable[6]: Result */
451 variable[6] = CALL_abstract_collection___MapRead___has_key( variable[3] /*names*/)( variable[3] /*names*/, variable[4] /*gname*/) /*MapRead::has_key*/;
452 if (UNTAG_Bool(variable[6])) { /*if*/
453 /* Register variable[6]: Result */
454 variable[6] = CALL_abstract_collection___MapRead_____bra( variable[3] /*names*/)( variable[3] /*names*/, variable[4] /*gname*/) /*MapRead::[]*/;
455 variable[5] = variable[6] /*conf_set=*/;
456 } else { /*if*/
457 /* Register variable[6]: Result */
458 variable[6] = NEW_Array_array___Array___init() /*new Array[MMGlobalProperty]*/;
459 variable[5] = variable[6] /*conf_set=*/;
460 CALL_abstract_collection___Map_____braeq( variable[3] /*names*/)( variable[3] /*names*/, variable[4] /*gname*/, variable[5] /*conf_set*/) /*Map::[]=*/;
461 }
462 CALL_abstract_collection___SimpleCollection___add( variable[5] /*conf_set*/)( variable[5] /*conf_set*/, variable[1] /*glob*/) /*AbstractArray::add*/;
463 return_label17: while(false);
464 tracehead = trace.prev;
465 return;
466 }
467 void inheritance___MMLocalClass___add_direct_parent(val_t self, val_t param0) {
468 struct trace_t trace = {NULL, NULL, 153, LOCATE_inheritance___MMLocalClass___add_direct_parent};
469 val_t variable[4];
470 struct WBT_ **closurevariable = NULL;
471 trace.prev = tracehead; tracehead = &trace;
472 trace.file = LOCATE_inheritance;
473 /* Register variable[0]: Local variable */
474 variable[0] = self;
475 /* Register variable[1]: Local variable */
476 variable[1] = param0;
477 /* Register variable[2]: Method return value and escape marker */
478 /* Register variable[3]: Result */
479 variable[3] = ATTR_inheritance___MMLocalClass____direct_parents(variable[0]) /*MMLocalClass::_direct_parents*/;
480 CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[1] /*p*/) /*AbstractArray::add*/;
481 return_label18: while(false);
482 tracehead = trace.prev;
483 return;
484 }
485 val_t inheritance___MMLocalClass___computed_super_classes(val_t self) {
486 struct trace_t trace = {NULL, NULL, 159, LOCATE_inheritance___MMLocalClass___computed_super_classes};
487 val_t variable[3];
488 struct WBT_ **closurevariable = NULL;
489 trace.prev = tracehead; tracehead = &trace;
490 trace.file = LOCATE_inheritance;
491 /* Register variable[0]: Local variable */
492 variable[0] = self;
493 /* Register variable[1]: Method return value and escape marker */
494 /* Register variable[2]: Result */
495 variable[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(variable[0]) /*MMLocalClass::_crhe*/;
496 /* Register variable[2]: Result */
497 variable[2] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[2])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[2], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[2])(variable[2], NIT_NULL /*null*/) /*Object::==*/)))))));
498 /* Ensure var variable[2]: Left 'and' operand*/
499 if (UNTAG_Bool(variable[2])) { /* and */
500 /* Register variable[2]: Result */
501 variable[2] = ATTR_abstractmetamodel___MMLocalClass____cshe(variable[0]) /*MMLocalClass::_cshe*/;
502 /* Register variable[2]: Result */
503 variable[2] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[2])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[2], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[2])(variable[2], NIT_NULL /*null*/) /*Object::==*/)))))));
504 }
505 /* Register variable[2]: Result */
506 variable[1] = variable[2];
507 goto return_label19;
508 return_label19: while(false);
509 tracehead = trace.prev;
510 return variable[1];
511 }
512 val_t inheritance___MMLocalClass___computed_ancestors(val_t self) {
513 struct trace_t trace = {NULL, NULL, 165, LOCATE_inheritance___MMLocalClass___computed_ancestors};
514 val_t variable[3];
515 struct WBT_ **closurevariable = NULL;
516 trace.prev = tracehead; tracehead = &trace;
517 trace.file = LOCATE_inheritance;
518 /* Register variable[0]: Local variable */
519 variable[0] = self;
520 /* Register variable[1]: Method return value and escape marker */
521 /* Register variable[2]: Result */
522 variable[2] = ATTR_static_type___MMLocalClass____ancestors(variable[0]) /*MMLocalClass::_ancestors*/;
523 /* Register variable[2]: Result */
524 variable[2] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[2])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[2], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[2])(variable[2], NIT_NULL /*null*/) /*Object::==*/)))))));
525 variable[1] = variable[2];
526 goto return_label20;
527 return_label20: while(false);
528 tracehead = trace.prev;
529 return variable[1];
530 }
531 val_t inheritance___MMLocalClass___ancestor_for(val_t self, val_t param0) {
532 struct trace_t trace = {NULL, NULL, 171, LOCATE_inheritance___MMLocalClass___ancestor_for};
533 val_t variable[7];
534 struct WBT_ **closurevariable = NULL;
535 trace.prev = tracehead; tracehead = &trace;
536 trace.file = LOCATE_inheritance;
537 /* Register variable[0]: Local variable */
538 variable[0] = self;
539 /* Register variable[1]: Local variable */
540 variable[1] = param0;
541 /* Register variable[2]: Method return value and escape marker */
542 /* Register variable[3]: Result */
543 variable[3] = CALL_static_type___MMLocalClass___ancestors(variable[0])(variable[0]) /*MMLocalClass::ancestors*/;
544 /* Register variable[3]: Result */
545 variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], NIT_NULL /*null*/) /*Object::==*/)))))));
546 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___ancestor_for, LOCATE_inheritance, 175); nit_exit(1);}
547 /* Register variable[3]: Result */
548 variable[3] = ATTR_static_type___MMLocalClass____ancestors(variable[0]) /*MMLocalClass::_ancestors*/;
549 /* Register variable[3]: Result */
550 variable[3] = CALL_abstract_collection___MapRead___has_key(variable[3])(variable[3], variable[1] /*c*/) /*MapRead::has_key*/;
551 if (UNTAG_Bool(variable[3])) { /*if*/
552 /* Register variable[3]: Result */
553 variable[3] = ATTR_static_type___MMLocalClass____ancestors(variable[0]) /*MMLocalClass::_ancestors*/;
554 /* Register variable[3]: Result */
555 variable[3] = CALL_abstract_collection___MapRead_____bra(variable[3])(variable[3], variable[1] /*c*/) /*MapRead::[]*/;
556 variable[2] = variable[3];
557 goto return_label21;
558 }
559 /* Register variable[3]: Local variable */
560 /* Register variable[4]: Result */
561 variable[4] = CALL_abstractmetamodel___MMLocalClass___module(variable[0])(variable[0]) /*MMLocalClass::module*/;
562 /* Register variable[4]: Result */
563 variable[4] = CALL_abstractmetamodel___MMLocalClass___for_module( variable[1] /*c*/)( variable[1] /*c*/, variable[4]) /*MMLocalClass::for_module*/;
564 variable[3] = variable[4];
565 /* Register variable[4]: Result */
566 variable[4] = CALL_abstractmetamodel___MMLocalClass___cshe(variable[0])(variable[0]) /*MMLocalClass::cshe*/;
567 /* Register variable[4]: Result */
568 variable[4] = CALL_partial_order___PartialOrderElement_____leq(variable[4])(variable[4], variable[3] /*a*/) /*PartialOrderElement::<=*/;
569 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___ancestor_for, LOCATE_inheritance, 181); nit_exit(1);}
570 /* Register variable[4]: Local variable */
571 /*variable[4] is variable ra*/
572 /* Register variable[5]: Result */
573 variable[5] = ATTR_static_type___MMLocalClass____ancestors(variable[0]) /*MMLocalClass::_ancestors*/;
574 /* Register variable[5]: Result */
575 variable[5] = CALL_abstract_collection___MapRead___has_key(variable[5])(variable[5], variable[3] /*a*/) /*MapRead::has_key*/;
576 if (UNTAG_Bool(variable[5])) { /*if*/
577 /* Register variable[5]: Result */
578 variable[5] = ATTR_static_type___MMLocalClass____ancestors(variable[0]) /*MMLocalClass::_ancestors*/;
579 /* Register variable[5]: Result */
580 variable[5] = CALL_abstract_collection___MapRead_____bra(variable[5])(variable[5], variable[3] /*a*/) /*MapRead::[]*/;
581 variable[4] = variable[5] /*ra=*/;
582 } else { /*if*/
583 /* Register variable[5]: Result */
584 variable[5] = CALL_abstractmetamodel___MMLocalClass___global( variable[1] /*c*/)( variable[1] /*c*/) /*MMLocalClass::global*/;
585 /* Register variable[6]: Result */
586 variable[6] = ATTR_abstractmetamodel___MMLocalClass____global(variable[0]) /*MMLocalClass::_global*/;
587 /* Register variable[5]: Result */
588 variable[5] = TAG_Bool((variable[5] == variable[6]) || ((variable[5] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[5])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[5],variable[6])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[5])(variable[5], variable[6]) /*Object::==*/)))));
589 if (UNTAG_Bool(variable[5])) { /*if*/
590 /* Register variable[5]: Result */
591 variable[5] = NEW_MMRefineAncestor_inheritance___MMRefineAncestor___init(variable[0], variable[1] /*c*/) /*new MMRefineAncestor*/;
592 variable[4] = variable[5] /*ra=*/;
593 } else { /*if*/
594 /* Register variable[5]: Result */
595 variable[5] = CALL_static_type___MMLocalClass___get_type(variable[0])(variable[0]) /*MMLocalClass::get_type*/;
596 /* Register variable[6]: Result */
597 variable[6] = CALL_static_type___MMLocalClass___get_type( variable[1] /*c*/)( variable[1] /*c*/) /*MMLocalClass::get_type*/;
598 /* Register variable[5]: Result */
599 variable[5] = NEW_MMSpecAncestor_inheritance___MMSpecAncestor___init(variable[5], variable[6]) /*new MMSpecAncestor*/;
600 variable[4] = variable[5] /*ra=*/;
601 }
602 }
603 /* Register variable[5]: Result */
604 variable[5] = ATTR_static_type___MMLocalClass____ancestors(variable[0]) /*MMLocalClass::_ancestors*/;
605 CALL_abstract_collection___Map_____braeq(variable[5])(variable[5], variable[1] /*c*/, variable[4] /*ra*/) /*Map::[]=*/;
606 variable[2] = variable[4] /*ra*/;
607 goto return_label21;
608 return_label21: while(false);
609 tracehead = trace.prev;
610 return variable[2];
611 }
612 void inheritance___MMLocalClass___add_default_any_class(val_t self, val_t param0) {
613 struct trace_t trace = {NULL, NULL, 205, LOCATE_inheritance___MMLocalClass___add_default_any_class};
614 static val_t once_value_23; static int once_bool_23; /* Once value for variable[4]*/
615 static val_t once_value_24 = NIT_NULL; /* Once value for string variable[4]*/
616 val_t variable[6];
617 struct WBT_ **closurevariable = NULL;
618 trace.prev = tracehead; tracehead = &trace;
619 trace.file = LOCATE_inheritance;
620 /* Register variable[0]: Local variable */
621 variable[0] = self;
622 /* Register variable[1]: Local variable */
623 variable[1] = param0;
624 /* Register variable[2]: Method return value and escape marker */
625 /* Register variable[3]: Result */
626 variable[3] = CALL_abstract_collection___Collection___is_empty( variable[1] /*supers*/)( variable[1] /*supers*/) /*AbstractArrayRead::is_empty*/;
627 /* Ensure var variable[3]: Left 'and' operand*/
628 if (UNTAG_Bool(variable[3])) { /* and */
629 /* Register variable[3]: Result */
630 variable[3] = CALL_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
631 /* Register variable[4]: Once expression result */
632 if (once_bool_23) variable[4] = once_value_23;
633 else {
634 /* Register variable[4]: Once String constant */
635 if (once_value_24 != NIT_NULL) variable[4] = once_value_24;
636 else {
637 variable[4] = NEW_String_string___String___with_native(BOX_NativeString("Object"), TAG_Int(6)) /*new String*/;
638 once_value_24 = variable[4];
639 }
640 /* Register variable[4]: Result */
641 /* Register variable[4]: Result */
642 variable[4] = CALL_symbol___String___to_symbol(variable[4])(variable[4]) /*String::to_symbol*/;
643 once_value_23 = variable[4];
644 once_bool_23 = true;
645 }
646 /* Register variable[4]: Result */
647 /* Register variable[3]: Result */
648 variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == variable[4]) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3],variable[4])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], variable[4]) /*Object::==*/)))))));
649 }
650 /* Register variable[3]: Result */
651 if (UNTAG_Bool(variable[3])) { /*if*/
652 /* Register variable[3]: Local variable */
653 /* Register variable[4]: Result */
654 variable[4] = CALL_abstractmetamodel___MMLocalClass___module(variable[0])(variable[0]) /*MMLocalClass::module*/;
655 /* Register variable[4]: Result */
656 variable[4] = CALL_inheritance___MMModule___type_any(variable[4])(variable[4]) /*MMModule::type_any*/;
657 variable[3] = variable[4];
658 /* Register variable[4]: Result */
659 variable[4] = CALL_static_type___MMType___local_class( variable[3] /*t_any*/)( variable[3] /*t_any*/) /*MMType::local_class*/;
660 CALL_abstract_collection___SimpleCollection___add( variable[1] /*supers*/)( variable[1] /*supers*/, variable[4]) /*AbstractArray::add*/;
661 /* Register variable[4]: Local variable */
662 /* Register variable[5]: Result */
663 variable[5] = NEW_MMDefaultAncestor_inheritance___MMDefaultAncestor___init(variable[0], variable[3] /*t_any*/) /*new MMDefaultAncestor*/;
664 variable[4] = variable[5];
665 CALL_inheritance___MMLocalClass___add_direct_parent(variable[0])(variable[0], variable[4] /*default*/) /*MMLocalClass::add_direct_parent*/;
666 }
667 return_label22: while(false);
668 tracehead = trace.prev;
669 return;
670 }
671 void inheritance___MMLocalClass___add_super_classes(val_t self, val_t param0) {
672 struct trace_t trace = {NULL, NULL, 216, LOCATE_inheritance___MMLocalClass___add_super_classes};
673 val_t variable[11];
674 struct WBT_ **closurevariable = NULL;
675 trace.prev = tracehead; tracehead = &trace;
676 trace.file = LOCATE_inheritance;
677 /* Register variable[0]: Local variable */
678 variable[0] = self;
679 /* Register variable[1]: Local variable */
680 variable[1] = param0;
681 /* Register variable[2]: Method return value and escape marker */
682 /* Register variable[3]: Result */
683 variable[3] = ATTR_abstractmetamodel___MMLocalClass____crhe(variable[0]) /*MMLocalClass::_crhe*/;
684 /* Register variable[3]: Result */
685 variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], NIT_NULL /*null*/) /*Object::==*/)))))));
686 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___add_super_classes, LOCATE_inheritance, 219); nit_exit(1);}
687 /* Register variable[3]: Result */
688 variable[3] = ATTR_abstractmetamodel___MMLocalClass____crhe(variable[0]) /*MMLocalClass::_crhe*/;
689 /* Register variable[3]: Result */
690 variable[3] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[3])(variable[3]) /*PartialOrderElement::direct_greaters*/;
691 /* Register variable[3]: For iterator */
692 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArrayRead::iterator*/;
693 while (true) { /*for*/
694 /* Register variable[4]: For 'is_ok' result */
695 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
696 if (!UNTAG_Bool(variable[4])) break; /*for*/
697 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
698 /* Register variable[5]: Local variable */
699 variable[5] = variable[4];
700 /* Register variable[6]: Result */
701 variable[6] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[5] /*ref*/)( variable[5] /*ref*/) /*MMLocalClass::cshe*/;
702 /* Register variable[6]: Result */
703 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[6] == NIT_NULL /*null*/) || ((variable[6] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[6])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[6], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[6])(variable[6], NIT_NULL /*null*/) /*Object::==*/)))))));
704 if (!UNTAG_Bool(variable[6])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___add_super_classes, LOCATE_inheritance, 221); nit_exit(1);}
705 /* Register variable[6]: Result */
706 variable[6] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[5] /*ref*/)( variable[5] /*ref*/) /*MMLocalClass::cshe*/;
707 /* Register variable[6]: Result */
708 variable[6] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[6])(variable[6]) /*PartialOrderElement::direct_greaters*/;
709 /* Register variable[6]: For iterator */
710 variable[6] = CALL_abstract_collection___Collection___iterator(variable[6])(variable[6]) /*AbstractArrayRead::iterator*/;
711 while (true) { /*for*/
712 /* Register variable[7]: For 'is_ok' result */
713 variable[7] = CALL_abstract_collection___Iterator___is_ok(variable[6])(variable[6]) /*ArrayIterator::is_ok*/;
714 if (!UNTAG_Bool(variable[7])) break; /*for*/
715 variable[7] = CALL_abstract_collection___Iterator___item(variable[6])(variable[6]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
716 /* Register variable[8]: Local variable */
717 variable[8] = variable[7];
718 /* Register variable[9]: Local variable */
719 /* Register variable[10]: Result */
720 variable[10] = ATTR_abstractmetamodel___MMLocalClass____module(variable[0]) /*MMLocalClass::_module*/;
721 /* Register variable[10]: Result */
722 variable[10] = CALL_abstractmetamodel___MMLocalClass___for_module( variable[8] /*sup*/)( variable[8] /*sup*/, variable[10]) /*MMLocalClass::for_module*/;
723 variable[9] = variable[10];
724 /* Register variable[10]: Result */
725 variable[10] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[9] /*cla*/ == NIT_NULL /*null*/) || (( variable[9] /*cla*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[9] /*cla*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[9] /*cla*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[9] /*cla*/)( variable[9] /*cla*/, NIT_NULL /*null*/) /*Object::==*/)))))));
726 if (!UNTAG_Bool(variable[10])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___add_super_classes, LOCATE_inheritance, 224); nit_exit(1);}
727 CALL_abstract_collection___SimpleCollection___add( variable[1] /*supers*/)( variable[1] /*supers*/, variable[9] /*cla*/) /*AbstractArray::add*/;
728 continue_27: while(0);
729 CALL_abstract_collection___Iterator___next(variable[6])(variable[6]) /*ArrayIterator::next*/;
730 }
731 break_27: while(0);
732 continue_26: while(0);
733 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
734 }
735 break_26: while(0);
736 return_label25: while(false);
737 tracehead = trace.prev;
738 return;
739 }
740 void inheritance___MMLocalClass___add_explicit_classes(val_t self, val_t param0) {
741 struct trace_t trace = {NULL, NULL, 230, LOCATE_inheritance___MMLocalClass___add_explicit_classes};
742 val_t variable[7];
743 struct WBT_ **closurevariable = NULL;
744 trace.prev = tracehead; tracehead = &trace;
745 trace.file = LOCATE_inheritance;
746 /* Register variable[0]: Local variable */
747 variable[0] = self;
748 /* Register variable[1]: Local variable */
749 variable[1] = param0;
750 /* Register variable[2]: Method return value and escape marker */
751 /* Register variable[3]: Result */
752 variable[3] = ATTR_inheritance___MMLocalClass____direct_parents(variable[0]) /*MMLocalClass::_direct_parents*/;
753 /* Register variable[3]: For iterator */
754 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArrayRead::iterator*/;
755 while (true) { /*for*/
756 /* Register variable[4]: For 'is_ok' result */
757 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
758 if (!UNTAG_Bool(variable[4])) break; /*for*/
759 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
760 /* Register variable[5]: Local variable */
761 variable[5] = variable[4];
762 /* Register variable[6]: Result */
763 variable[6] = CALL_static_type___MMAncestor___local_class( variable[5] /*p*/)( variable[5] /*p*/) /*MMAncestor::local_class*/;
764 CALL_abstract_collection___SimpleCollection___add( variable[1] /*supers*/)( variable[1] /*supers*/, variable[6]) /*AbstractArray::add*/;
765 continue_29: while(0);
766 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
767 }
768 break_29: while(0);
769 return_label28: while(false);
770 tracehead = trace.prev;
771 return;
772 }
773 void inheritance___MMLocalClass___compute_super_parents(val_t self, val_t param0) {
774 struct trace_t trace = {NULL, NULL, 238, LOCATE_inheritance___MMLocalClass___compute_super_parents};
775 val_t variable[7];
776 struct WBT_ **closurevariable = NULL;
777 trace.prev = tracehead; tracehead = &trace;
778 trace.file = LOCATE_inheritance;
779 /* Register variable[0]: Local variable */
780 variable[0] = self;
781 /* Register variable[1]: Local variable */
782 variable[1] = param0;
783 /* Register variable[2]: Method return value and escape marker */
784 /* Register variable[3]: For iterator */
785 variable[3] = CALL_abstract_collection___Collection___iterator( variable[1] /*supers*/)( variable[1] /*supers*/) /*AbstractArrayRead::iterator*/;
786 while (true) { /*for*/
787 /* Register variable[4]: For 'is_ok' result */
788 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
789 if (!UNTAG_Bool(variable[4])) break; /*for*/
790 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
791 /* Register variable[5]: Local variable */
792 variable[5] = variable[4];
793 /* Register variable[6]: Result */
794 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*p*/ == NIT_NULL /*null*/) || (( variable[5] /*p*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*p*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*p*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*p*/)( variable[5] /*p*/, NIT_NULL /*null*/) /*Object::==*/)))))));
795 if (!UNTAG_Bool(variable[6])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___compute_super_parents, LOCATE_inheritance, 242); nit_exit(1);}
796 CALL_inheritance___MMLocalClass___compute_super_classes( variable[5] /*p*/)( variable[5] /*p*/) /*MMLocalClass::compute_super_classes*/;
797 continue_31: while(0);
798 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
799 }
800 break_31: while(0);
801 return_label30: while(false);
802 tracehead = trace.prev;
803 return;
804 }
805 val_t inheritance___MMLocalClass___build_ancestors(val_t self) {
806 struct trace_t trace = {NULL, NULL, 247, LOCATE_inheritance___MMLocalClass___build_ancestors};
807 val_t variable[8];
808 struct WBT_ **closurevariable = NULL;
809 trace.prev = tracehead; tracehead = &trace;
810 trace.file = LOCATE_inheritance;
811 /* Register variable[0]: Local variable */
812 variable[0] = self;
813 /* Register variable[1]: Method return value and escape marker */
814 /* Register variable[2]: Local variable */
815 /* Register variable[3]: Result */
816 variable[3] = NEW_Array_array___Array___init() /*new Array[MMAncestor]*/;
817 variable[2] = variable[3];
818 /* Register variable[3]: Result */
819 variable[3] = ATTR_abstractmetamodel___MMLocalClass____crhe(variable[0]) /*MMLocalClass::_crhe*/;
820 /* Register variable[3]: Result */
821 variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], NIT_NULL /*null*/) /*Object::==*/)))))));
822 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___build_ancestors, LOCATE_inheritance, 252); nit_exit(1);}
823 /* Register variable[3]: Result */
824 variable[3] = ATTR_abstractmetamodel___MMLocalClass____crhe(variable[0]) /*MMLocalClass::_crhe*/;
825 /* Register variable[3]: Result */
826 variable[3] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[3])(variable[3]) /*PartialOrderElement::direct_greaters*/;
827 /* Register variable[3]: For iterator */
828 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArrayRead::iterator*/;
829 while (true) { /*for*/
830 /* Register variable[4]: For 'is_ok' result */
831 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
832 if (!UNTAG_Bool(variable[4])) break; /*for*/
833 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
834 /* Register variable[5]: Local variable */
835 variable[5] = variable[4];
836 /* Register variable[6]: Result */
837 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*p*/ == variable[0]) || (( variable[5] /*p*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*p*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*p*/,variable[0])):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*p*/)( variable[5] /*p*/, variable[0]) /*Object::==*/)))))));
838 if (!UNTAG_Bool(variable[6])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___build_ancestors, LOCATE_inheritance, 254); nit_exit(1);}
839 /* Register variable[6]: Local variable */
840 /* Register variable[7]: Result */
841 variable[7] = NEW_MMRefineAncestor_inheritance___MMRefineAncestor___init(variable[0], variable[5] /*p*/) /*new MMRefineAncestor*/;
842 variable[6] = variable[7];
843 CALL_inheritance___MMAncestor___add_in( variable[6] /*anc*/)( variable[6] /*anc*/, variable[2] /*all_ancestors*/) /*MMAncestor::add_in*/;
844 continue_33: while(0);
845 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
846 }
847 break_33: while(0);
848 /* Register variable[3]: Result */
849 variable[3] = ATTR_inheritance___MMLocalClass____direct_parents(variable[0]) /*MMLocalClass::_direct_parents*/;
850 /* Register variable[3]: For iterator */
851 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArrayRead::iterator*/;
852 while (true) { /*for*/
853 /* Register variable[4]: For 'is_ok' result */
854 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
855 if (!UNTAG_Bool(variable[4])) break; /*for*/
856 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
857 /* Register variable[5]: Local variable */
858 variable[5] = variable[4];
859 /* Register variable[6]: Result */
860 variable[6] = CALL_static_type___MMAncestor___local_class( variable[5] /*anc*/)( variable[5] /*anc*/) /*MMAncestor::local_class*/;
861 /* Register variable[6]: Result */
862 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[6] == variable[0]) || ((variable[6] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[6])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[6],variable[0])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[6])(variable[6], variable[0]) /*Object::==*/)))))));
863 if (!UNTAG_Bool(variable[6])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___build_ancestors, LOCATE_inheritance, 259); nit_exit(1);}
864 CALL_inheritance___MMAncestor___add_in( variable[5] /*anc*/)( variable[5] /*anc*/, variable[2] /*all_ancestors*/) /*MMAncestor::add_in*/;
865 continue_34: while(0);
866 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
867 }
868 break_34: while(0);
869 variable[1] = variable[2] /*all_ancestors*/;
870 goto return_label32;
871 return_label32: while(false);
872 tracehead = trace.prev;
873 return variable[1];
874 }
875 val_t inheritance___MMLocalClass___group_ancestors(val_t self, val_t param0) {
876 struct trace_t trace = {NULL, NULL, 265, LOCATE_inheritance___MMLocalClass___group_ancestors};
877 val_t variable[10];
878 struct WBT_ **closurevariable = NULL;
879 trace.prev = tracehead; tracehead = &trace;
880 trace.file = LOCATE_inheritance;
881 /* Register variable[0]: Local variable */
882 variable[0] = self;
883 /* Register variable[1]: Local variable */
884 variable[1] = param0;
885 /* Register variable[2]: Method return value and escape marker */
886 /* Register variable[3]: Local variable */
887 /* Register variable[4]: Result */
888 variable[4] = NEW_HashMap_hash___HashMap___init() /*new HashMap[MMLocalClass, Set[MMAncestor]]*/;
889 variable[3] = variable[4];
890 /* Register variable[4]: For iterator */
891 variable[4] = CALL_abstract_collection___Collection___iterator( variable[1] /*all*/)( variable[1] /*all*/) /*AbstractArrayRead::iterator*/;
892 while (true) { /*for*/
893 /* Register variable[5]: For 'is_ok' result */
894 variable[5] = CALL_abstract_collection___Iterator___is_ok(variable[4])(variable[4]) /*ArrayIterator::is_ok*/;
895 if (!UNTAG_Bool(variable[5])) break; /*for*/
896 variable[5] = CALL_abstract_collection___Iterator___item(variable[4])(variable[4]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
897 /* Register variable[6]: Local variable */
898 variable[6] = variable[5];
899 /* Register variable[7]: Local variable */
900 /* Register variable[8]: Result */
901 variable[8] = CALL_static_type___MMAncestor___local_class( variable[6] /*a*/)( variable[6] /*a*/) /*MMAncestor::local_class*/;
902 variable[7] = variable[8];
903 /* Register variable[8]: Local variable */
904 /*variable[8] is variable set*/
905 CALL_inheritance___MMLocalClass___compute_ancestors( variable[7] /*c*/)( variable[7] /*c*/) /*MMLocalClass::compute_ancestors*/;
906 /* Register variable[9]: Result */
907 variable[9] = CALL_abstract_collection___MapRead___has_key( variable[3] /*map*/)( variable[3] /*map*/, variable[7] /*c*/) /*CoupleMap::has_key*/;
908 if (UNTAG_Bool(variable[9])) { /*if*/
909 /* Register variable[9]: Result */
910 variable[9] = CALL_abstract_collection___MapRead_____bra( variable[3] /*map*/)( variable[3] /*map*/, variable[7] /*c*/) /*CoupleMap::[]*/;
911 variable[8] = variable[9] /*set=*/;
912 } else { /*if*/
913 /* Register variable[9]: Result */
914 variable[9] = NEW_HashSet_hash___HashSet___init() /*new HashSet[MMAncestor]*/;
915 variable[8] = variable[9] /*set=*/;
916 CALL_abstract_collection___Map_____braeq( variable[3] /*map*/)( variable[3] /*map*/, variable[7] /*c*/, variable[8] /*set*/) /*HashMap::[]=*/;
917 }
918 CALL_abstract_collection___SimpleCollection___add( variable[8] /*set*/)( variable[8] /*set*/, variable[6] /*a*/) /*SimpleCollection::add*/;
919 continue_36: while(0);
920 CALL_abstract_collection___Iterator___next(variable[4])(variable[4]) /*ArrayIterator::next*/;
921 }
922 break_36: while(0);
923 variable[2] = variable[3] /*map*/;
924 goto return_label35;
925 return_label35: while(false);
926 tracehead = trace.prev;
927 return variable[2];
928 }
929 val_t inheritance___MMLocalClass___merge_ancestors(val_t self, val_t param0) {
930 struct trace_t trace = {NULL, NULL, 287, LOCATE_inheritance___MMLocalClass___merge_ancestors};
931 static val_t once_value_40 = NIT_NULL; /* Once value for string variable[7]*/
932 static val_t once_value_41 = NIT_NULL; /* Once value for string variable[7]*/
933 static val_t once_value_42 = NIT_NULL; /* Once value for string variable[7]*/
934 static val_t once_value_43 = NIT_NULL; /* Once value for string variable[7]*/
935 val_t variable[13];
936 struct WBT_ **closurevariable = NULL;
937 trace.prev = tracehead; tracehead = &trace;
938 trace.file = LOCATE_inheritance;
939 /* Register variable[0]: Local variable */
940 variable[0] = self;
941 /* Register variable[1]: Local variable */
942 variable[1] = param0;
943 /* Register variable[2]: Method return value and escape marker */
944 /* Register variable[3]: Local variable */
945 /* Register variable[4]: Result */
946 variable[4] = NEW_HashSet_hash___HashSet___init() /*new HashSet[MMAncestor]*/;
947 variable[3] = variable[4];
948 /* Register variable[4]: Local variable */
949 /* Register variable[5]: Result */
950 variable[5] = NEW_Array_array___Array___init() /*new Array[MMAncestor]*/;
951 variable[4] = variable[5];
952 /* Register variable[5]: For iterator */
953 variable[5] = CALL_abstract_collection___Collection___iterator( variable[1] /*set*/)( variable[1] /*set*/) /*Collection::iterator*/;
954 while (true) { /*for*/
955 /* Register variable[6]: For 'is_ok' result */
956 variable[6] = CALL_abstract_collection___Iterator___is_ok(variable[5])(variable[5]) /*Iterator::is_ok*/;
957 if (!UNTAG_Bool(variable[6])) break; /*for*/
958 variable[6] = CALL_abstract_collection___Iterator___item(variable[5])(variable[5]) /*Iterator::item*/ /* Ensure var: For item*/;
959 /* Register variable[7]: Local variable */
960 variable[7] = variable[6];
961 /* Register variable[8]: Local variable */
962 /* Register variable[9]: Result */
963 variable[9] = CALL_abstract_collection___Collection___iterator( variable[1] /*set*/)( variable[1] /*set*/) /*Collection::iterator*/;
964 variable[8] = variable[9];
965 /* Register variable[9]: Local variable */
966 variable[9] = TAG_Bool(true);
967 while (true) { /*while*/
968 /* Register variable[10]: Result */
969 variable[10] = CALL_abstract_collection___Iterator___is_ok( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::is_ok*/;
970 /* Ensure var variable[10]: Left 'and' operand*/
971 if (UNTAG_Bool(variable[10])) { /* and */
972 variable[10] = variable[9] /*search*/;
973 }
974 /* Register variable[10]: Result */
975 if (!UNTAG_Bool(variable[10])) break; /* while*/
976 /* Register variable[10]: Local variable */
977 /* Register variable[11]: Result */
978 variable[11] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::item*/;
979 /* Register variable[11]: Result */
980 variable[11] = TAG_Bool(( variable[7] /*t*/ == variable[11]) || (( variable[7] /*t*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[7] /*t*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[7] /*t*/,variable[11])):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[7] /*t*/)( variable[7] /*t*/, variable[11]) /*Object::==*/)))));
981 variable[10] = variable[11];
982 /* Register variable[11]: Result */
983 variable[11] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::item*/;
984 /* Register variable[11]: Result */
985 variable[11] = CALL_abstract_collection___Collection___has( variable[3] /*marks*/)( variable[3] /*marks*/, variable[11]) /*HashSet::has*/;
986 variable[10] = variable[11] /*a=*/;
987 /* Register variable[11]: Result */
988 variable[11] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::item*/;
989 /* Register variable[11]: Result */
990 variable[11] = CALL_static_type___MMAncestor___stype(variable[11])(variable[11]) /*MMAncestor::stype*/;
991 /* Register variable[12]: Result */
992 variable[12] = CALL_static_type___MMAncestor___stype( variable[7] /*t*/)( variable[7] /*t*/) /*MMAncestor::stype*/;
993 /* Register variable[11]: Result */
994 variable[11] = CALL_static_type___MMType_____l(variable[11])(variable[11], variable[12]) /*MMType::<*/;
995 variable[10] = variable[11] /*a=*/;
996 /* Register variable[11]: Result */
997 variable[11] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::item*/;
998 /* Register variable[11]: Result */
999 variable[11] = TAG_Bool(( variable[7] /*t*/ == variable[11]) || (( variable[7] /*t*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[7] /*t*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[7] /*t*/,variable[11])):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[7] /*t*/)( variable[7] /*t*/, variable[11]) /*Object::==*/)))));
1000 /* Ensure var variable[11]: Left 'or' operand*/
1001 if (!UNTAG_Bool(variable[11])) { /* or */
1002 /* Register variable[11]: Result */
1003 variable[11] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::item*/;
1004 /* Register variable[11]: Result */
1005 variable[11] = CALL_abstract_collection___Collection___has( variable[3] /*marks*/)( variable[3] /*marks*/, variable[11]) /*HashSet::has*/;
1006 }
1007 /* Register variable[11]: Result */
1008 variable[11] = TAG_Bool(!UNTAG_Bool(variable[11])) /* Ensure var: Left 'and' operand*/;
1009 if (UNTAG_Bool(variable[11])) { /* and */
1010 /* Register variable[11]: Result */
1011 variable[11] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::item*/;
1012 /* Register variable[11]: Result */
1013 variable[11] = CALL_static_type___MMAncestor___stype(variable[11])(variable[11]) /*MMAncestor::stype*/;
1014 /* Register variable[12]: Result */
1015 variable[12] = CALL_static_type___MMAncestor___stype( variable[7] /*t*/)( variable[7] /*t*/) /*MMAncestor::stype*/;
1016 /* Register variable[11]: Result */
1017 variable[11] = CALL_static_type___MMType_____l(variable[11])(variable[11], variable[12]) /*MMType::<*/;
1018 }
1019 /* Register variable[11]: Result */
1020 if (UNTAG_Bool(variable[11])) { /*if*/
1021 CALL_abstract_collection___SimpleCollection___add( variable[3] /*marks*/)( variable[3] /*marks*/, variable[7] /*t*/) /*HashSet::add*/;
1022 variable[9] = TAG_Bool(false) /*search=*/;
1023 }
1024 CALL_abstract_collection___Iterator___next( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::next*/;
1025 continue_39: while(0);
1026 }
1027 break_39: while(0);
1028 /* Register variable[10]: Result */
1029 variable[10] = CALL_abstract_collection___Collection___has( variable[3] /*marks*/)( variable[3] /*marks*/, variable[7] /*t*/) /*HashSet::has*/;
1030 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[10])))) { /*if*/
1031 CALL_abstract_collection___SimpleCollection___add( variable[4] /*res*/)( variable[4] /*res*/, variable[7] /*t*/) /*AbstractArray::add*/;
1032 }
1033 continue_38: while(0);
1034 CALL_abstract_collection___Iterator___next(variable[5])(variable[5]) /*Iterator::next*/;
1035 }
1036 break_38: while(0);
1037 /* Register variable[5]: Result */
1038 variable[5] = CALL_abstract_collection___Collection___length( variable[4] /*res*/)( variable[4] /*res*/) /*AbstractArrayRead::length*/;
1039 /* Register variable[5]: Result */
1040 variable[5] = TAG_Bool(UNTAG_Int(variable[5])>UNTAG_Int( TAG_Int(1)));
1041 if (UNTAG_Bool(variable[5])) { /*if*/
1042 /* Register variable[5]: Result */
1043 variable[5] = CALL_file___Object___stderr(variable[0])(variable[0]) /*Object::stderr*/;
1044 variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
1045 /* Register variable[7]: Once String constant */
1046 if (once_value_40 != NIT_NULL) variable[7] = once_value_40;
1047 else {
1048 variable[7] = NEW_String_string___String___with_native(BOX_NativeString("Fatal error: Incompatibles ancestors for "), TAG_Int(41)) /*new String*/;
1049 once_value_40 = variable[7];
1050 }
1051 /* Register variable[7]: Result */
1052 /* Ensure var variable[7]: super-string element*/
1053 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
1054 /* Register variable[7]: Result */
1055 variable[7] = CALL_abstractmetamodel___MMLocalClass___name(variable[0])(variable[0]) /*MMLocalClass::name*/;
1056 /* Ensure var variable[7]: super-string element*/
1057 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/) /*AbstractArray::add*/;
1058 /* Register variable[7]: Once String constant */
1059 if (once_value_41 != NIT_NULL) variable[7] = once_value_41;
1060 else {
1061 variable[7] = NEW_String_string___String___with_native(BOX_NativeString(": "), TAG_Int(2)) /*new String*/;
1062 once_value_41 = variable[7];
1063 }
1064 /* Register variable[7]: Result */
1065 /* Ensure var variable[7]: super-string element*/
1066 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
1067 /* Register variable[7]: Once String constant */
1068 if (once_value_42 != NIT_NULL) variable[7] = once_value_42;
1069 else {
1070 variable[7] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)) /*new String*/;
1071 once_value_42 = variable[7];
1072 }
1073 /* Register variable[7]: Result */
1074 /* Register variable[7]: Result */
1075 variable[7] = CALL_string___Collection___join( variable[4] /*res*/)( variable[4] /*res*/, variable[7]) /*Collection::join*/;
1076 /* Ensure var variable[7]: super-string element*/
1077 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
1078 /* Register variable[7]: Once String constant */
1079 if (once_value_43 != NIT_NULL) variable[7] = once_value_43;
1080 else {
1081 variable[7] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)) /*new String*/;
1082 once_value_43 = variable[7];
1083 }
1084 /* Register variable[7]: Result */
1085 /* Ensure var variable[7]: super-string element*/
1086 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[7]) /*AbstractArray::add*/;
1087 /* Register variable[6]: Result */
1088 variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
1089 CALL_stream___OStream___write(variable[5])(variable[5], variable[6]) /*OFStream::write*/;
1090 exit(UNTAG_Int( TAG_Int(1)));
1091 }
1092 /* Register variable[5]: Result */
1093 variable[5] = CALL_abstract_collection___Collection___first( variable[4] /*res*/)( variable[4] /*res*/) /*IndexedCollectionRead::first*/;
1094 variable[2] = variable[5];
1095 goto return_label37;
1096 return_label37: while(false);
1097 tracehead = trace.prev;
1098 return variable[2];
1099 }
1100 val_t inheritance___MMLocalClass___inherit_local_property(val_t self, val_t param0) {
1101 struct trace_t trace = {NULL, NULL, 320, LOCATE_inheritance___MMLocalClass___inherit_local_property};
1102 static val_t once_value_46 = NIT_NULL; /* Once value for string variable[9]*/
1103 static val_t once_value_47 = NIT_NULL; /* Once value for string variable[9]*/
1104 static val_t once_value_48 = NIT_NULL; /* Once value for string variable[9]*/
1105 static val_t once_value_49 = NIT_NULL; /* Once value for string variable[9]*/
1106 static val_t once_value_50 = NIT_NULL; /* Once value for string variable[9]*/
1107 static val_t once_value_52 = NIT_NULL; /* Once value for string variable[12]*/
1108 static val_t once_value_53 = NIT_NULL; /* Once value for string variable[12]*/
1109 static val_t once_value_54 = NIT_NULL; /* Once value for string variable[9]*/
1110 static val_t once_value_55 = NIT_NULL; /* Once value for string variable[9]*/
1111 static val_t once_value_56 = NIT_NULL; /* Once value for string variable[9]*/
1112 static val_t once_value_57 = NIT_NULL; /* Once value for string variable[9]*/
1113 val_t variable[13];
1114 struct WBT_ **closurevariable = NULL;
1115 trace.prev = tracehead; tracehead = &trace;
1116 trace.file = LOCATE_inheritance;
1117 /* Register variable[0]: Local variable */
1118 variable[0] = self;
1119 /* Register variable[1]: Local variable */
1120 variable[1] = param0;
1121 /* Register variable[2]: Method return value and escape marker */
1122 /* Register variable[3]: Result */
1123 variable[3] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(variable[0]) /*MMLocalClass::_local_property_by_global*/;
1124 /* Register variable[3]: Result */
1125 variable[3] = CALL_abstract_collection___MapRead___has_key(variable[3])(variable[3], variable[1] /*glob*/) /*MapRead::has_key*/;
1126 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[3])))) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___inherit_local_property, LOCATE_inheritance, 325); nit_exit(1);}
1127 /* Register variable[3]: Result */
1128 variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[1] /*glob*/ == NIT_NULL /*null*/) || (( variable[1] /*glob*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[1] /*glob*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[1] /*glob*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[1] /*glob*/)( variable[1] /*glob*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1129 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___inherit_local_property, LOCATE_inheritance, 326); nit_exit(1);}
1130 /* Register variable[3]: Local variable */
1131 /*variable[3] is variable impl*/
1132 /* Register variable[4]: Local variable */
1133 /* Register variable[5]: Result */
1134 variable[5] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy( variable[1] /*glob*/)( variable[1] /*glob*/) /*MMGlobalProperty::property_hierarchy*/;
1135 variable[4] = variable[5];
1136 /* Register variable[5]: Local variable */
1137 /* Register variable[6]: Result */
1138 variable[6] = CALL_abstractmetamodel___MMLocalClass___che(variable[0])(variable[0]) /*MMLocalClass::che*/;
1139 /* Register variable[6]: Result */
1140 variable[6] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[6])(variable[6]) /*PartialOrderElement::direct_greaters*/;
1141 variable[5] = variable[6];
1142 /* Register variable[6]: Result */
1143 variable[6] = CALL_abstract_collection___Collection___length( variable[4] /*ghier*/)( variable[4] /*ghier*/) /*PartialOrder::length*/;
1144 /* Register variable[6]: Result */
1145 variable[6] = TAG_Bool((variable[6])==( TAG_Int(1)));
1146 if (UNTAG_Bool(variable[6])) { /*if*/
1147 /* Register variable[6]: Result */
1148 variable[6] = CALL_abstractmetamodel___MMGlobalProperty___intro( variable[1] /*glob*/)( variable[1] /*glob*/) /*MMGlobalProperty::intro*/;
1149 variable[3] = variable[6] /*impl=*/;
1150 } else { /*if*/
1151 /* Register variable[6]: Result */
1152 variable[6] = CALL_abstract_collection___Collection___length( variable[5] /*supers*/)( variable[5] /*supers*/) /*AbstractArrayRead::length*/;
1153 /* Register variable[6]: Result */
1154 variable[6] = TAG_Bool((variable[6])==( TAG_Int(1)));
1155 if (UNTAG_Bool(variable[6])) { /*if*/
1156 /* Register variable[6]: Result */
1157 variable[6] = CALL_abstract_collection___Collection___first( variable[5] /*supers*/)( variable[5] /*supers*/) /*IndexedCollectionRead::first*/;
1158 /* Register variable[6]: Result */
1159 variable[6] = CALL_abstractmetamodel___MMLocalClass_____bra(variable[6])(variable[6], variable[1] /*glob*/) /*MMLocalClass::[]*/;
1160 variable[3] = variable[6] /*impl=*/;
1161 } else { /*if*/
1162 /* Register variable[6]: Local variable */
1163 /* Register variable[7]: Result */
1164 variable[7] = NEW_ArraySet_array___ArraySet___init() /*new ArraySet[MMLocalProperty]*/;
1165 variable[6] = variable[7];
1166 /* Register variable[7]: For iterator */
1167 variable[7] = CALL_abstract_collection___Collection___iterator( variable[5] /*supers*/)( variable[5] /*supers*/) /*AbstractArrayRead::iterator*/;
1168 while (true) { /*for*/
1169 /* Register variable[8]: For 'is_ok' result */
1170 variable[8] = CALL_abstract_collection___Iterator___is_ok(variable[7])(variable[7]) /*ArrayIterator::is_ok*/;
1171 if (!UNTAG_Bool(variable[8])) break; /*for*/
1172 variable[8] = CALL_abstract_collection___Iterator___item(variable[7])(variable[7]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
1173 /* Register variable[9]: Local variable */
1174 variable[9] = variable[8];
1175 /* Register variable[10]: Result */
1176 variable[10] = CALL_abstractmetamodel___MMLocalClass___has_global_property( variable[9] /*sc*/)( variable[9] /*sc*/, variable[1] /*glob*/) /*MMLocalClass::has_global_property*/;
1177 if (UNTAG_Bool(variable[10])) { /*if*/
1178 /* Register variable[10]: Result */
1179 variable[10] = CALL_abstractmetamodel___MMLocalClass_____bra( variable[9] /*sc*/)( variable[9] /*sc*/, variable[1] /*glob*/) /*MMLocalClass::[]*/;
1180 CALL_abstract_collection___SimpleCollection___add( variable[6] /*impls*/)( variable[6] /*impls*/, variable[10]) /*ArraySet::add*/;
1181 }
1182 continue_45: while(0);
1183 CALL_abstract_collection___Iterator___next(variable[7])(variable[7]) /*ArrayIterator::next*/;
1184 }
1185 break_45: while(0);
1186 /* Register variable[7]: Local variable */
1187 /* Register variable[8]: Result */
1188 variable[8] = CALL_partial_order___PartialOrder___select_smallests( variable[4] /*ghier*/)( variable[4] /*ghier*/, variable[6] /*impls*/) /*PartialOrder::select_smallests*/;
1189 variable[7] = variable[8];
1190 /* Register variable[8]: Result */
1191 variable[8] = CALL_abstract_collection___Collection___length( variable[7] /*impls2*/)( variable[7] /*impls2*/) /*AbstractArrayRead::length*/;
1192 /* Register variable[8]: Result */
1193 variable[8] = TAG_Bool((variable[8])!=( TAG_Int(1)));
1194 if (UNTAG_Bool(variable[8])) { /*if*/
1195 /* Register variable[8]: Result */
1196 variable[8] = CALL_file___Object___stderr(variable[0])(variable[0]) /*Object::stderr*/;
1197 /* Register variable[9]: Once String constant */
1198 if (once_value_46 != NIT_NULL) variable[9] = once_value_46;
1199 else {
1200 variable[9] = NEW_String_string___String___with_native(BOX_NativeString("Fatal error: inherit_local_property error\n"), TAG_Int(42)) /*new String*/;
1201 once_value_46 = variable[9];
1202 }
1203 /* Register variable[9]: Result */
1204 CALL_stream___OStream___write(variable[8])(variable[8], variable[9]) /*OFStream::write*/;
1205 variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(7)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
1206 /* Register variable[9]: Once String constant */
1207 if (once_value_47 != NIT_NULL) variable[9] = once_value_47;
1208 else {
1209 variable[9] = NEW_String_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)) /*new String*/;
1210 once_value_47 = variable[9];
1211 }
1212 /* Register variable[9]: Result */
1213 /* Ensure var variable[9]: super-string element*/
1214 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1215 /* Register variable[9]: Result */
1216 variable[9] = CALL_abstractmetamodel___MMLocalClass___module(variable[0])(variable[0]) /*MMLocalClass::module*/;
1217 /* Ensure var variable[9]: super-string element*/
1218 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
1219 /* Register variable[9]: Once String constant */
1220 if (once_value_48 != NIT_NULL) variable[9] = once_value_48;
1221 else {
1222 variable[9] = NEW_String_string___String___with_native(BOX_NativeString("::"), TAG_Int(2)) /*new String*/;
1223 once_value_48 = variable[9];
1224 }
1225 /* Register variable[9]: Result */
1226 /* Ensure var variable[9]: super-string element*/
1227 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1228 /* Ensure var variable[0]: super-string element*/
1229 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[0])(variable[0]) /*Object::to_s*/) /*AbstractArray::add*/;
1230 /* Register variable[9]: Once String constant */
1231 if (once_value_49 != NIT_NULL) variable[9] = once_value_49;
1232 else {
1233 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)) /*new String*/;
1234 once_value_49 = variable[9];
1235 }
1236 /* Register variable[9]: Result */
1237 /* Ensure var variable[9]: super-string element*/
1238 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1239 /* Register variable[9]: Result */
1240 variable[9] = CALL_abstractmetamodel___MMGlobalProperty___intro( variable[1] /*glob*/)( variable[1] /*glob*/) /*MMGlobalProperty::intro*/;
1241 /* Register variable[9]: Result */
1242 variable[9] = CALL_abstractmetamodel___MMLocalProperty___full_name(variable[9])(variable[9]) /*MMLocalProperty::full_name*/;
1243 /* Ensure var variable[9]: super-string element*/
1244 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1245 /* Register variable[9]: Once String constant */
1246 if (once_value_50 != NIT_NULL) variable[9] = once_value_50;
1247 else {
1248 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1249 once_value_50 = variable[9];
1250 }
1251 /* Register variable[9]: Result */
1252 /* Ensure var variable[9]: super-string element*/
1253 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1254 /* Register variable[8]: Result */
1255 variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
1256 CALL_file___Object___print(variable[0])(variable[0], variable[8]) /*Object::print*/;
1257 /* Register variable[8]: For iterator */
1258 variable[8] = CALL_abstract_collection___Collection___iterator( variable[7] /*impls2*/)( variable[7] /*impls2*/) /*AbstractArrayRead::iterator*/;
1259 while (true) { /*for*/
1260 /* Register variable[9]: For 'is_ok' result */
1261 variable[9] = CALL_abstract_collection___Iterator___is_ok(variable[8])(variable[8]) /*ArrayIterator::is_ok*/;
1262 if (!UNTAG_Bool(variable[9])) break; /*for*/
1263 variable[9] = CALL_abstract_collection___Iterator___item(variable[8])(variable[8]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
1264 /* Register variable[10]: Local variable */
1265 variable[10] = variable[9];
1266 variable[11] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
1267 /* Register variable[12]: Once String constant */
1268 if (once_value_52 != NIT_NULL) variable[12] = once_value_52;
1269 else {
1270 variable[12] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(3)) /*new String*/;
1271 once_value_52 = variable[12];
1272 }
1273 /* Register variable[12]: Result */
1274 /* Ensure var variable[12]: super-string element*/
1275 CALL_abstract_collection___SimpleCollection___add(variable[11])(variable[11], variable[12]) /*AbstractArray::add*/;
1276 /* Register variable[12]: Result */
1277 variable[12] = CALL_abstractmetamodel___MMLocalProperty___full_name( variable[10] /*i*/)( variable[10] /*i*/) /*MMLocalProperty::full_name*/;
1278 /* Ensure var variable[12]: super-string element*/
1279 CALL_abstract_collection___SimpleCollection___add(variable[11])(variable[11], variable[12]) /*AbstractArray::add*/;
1280 /* Register variable[12]: Once String constant */
1281 if (once_value_53 != NIT_NULL) variable[12] = once_value_53;
1282 else {
1283 variable[12] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1284 once_value_53 = variable[12];
1285 }
1286 /* Register variable[12]: Result */
1287 /* Ensure var variable[12]: super-string element*/
1288 CALL_abstract_collection___SimpleCollection___add(variable[11])(variable[11], variable[12]) /*AbstractArray::add*/;
1289 /* Register variable[11]: Result */
1290 variable[11] = CALL_string___Object___to_s(variable[11])(variable[11]) /*Object::to_s*/;
1291 CALL_file___Object___print(variable[0])(variable[0], variable[11]) /*Object::print*/;
1292 continue_51: while(0);
1293 CALL_abstract_collection___Iterator___next(variable[8])(variable[8]) /*ArrayIterator::next*/;
1294 }
1295 break_51: while(0);
1296 variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
1297 /* Register variable[9]: Once String constant */
1298 if (once_value_54 != NIT_NULL) variable[9] = once_value_54;
1299 else {
1300 variable[9] = NEW_String_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)) /*new String*/;
1301 once_value_54 = variable[9];
1302 }
1303 /* Register variable[9]: Result */
1304 /* Ensure var variable[9]: super-string element*/
1305 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1306 /* Register variable[9]: Result */
1307 variable[9] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy( variable[1] /*glob*/)( variable[1] /*glob*/) /*MMGlobalProperty::property_hierarchy*/;
1308 /* Register variable[9]: Result */
1309 variable[9] = CALL_abstract_collection___Collection___first(variable[9])(variable[9]) /*PartialOrder::first*/;
1310 /* Ensure var variable[9]: super-string element*/
1311 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/) /*AbstractArray::add*/;
1312 /* Register variable[9]: Once String constant */
1313 if (once_value_55 != NIT_NULL) variable[9] = once_value_55;
1314 else {
1315 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1316 once_value_55 = variable[9];
1317 }
1318 /* Register variable[9]: Result */
1319 /* Ensure var variable[9]: super-string element*/
1320 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1321 /* Register variable[8]: Result */
1322 variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
1323 CALL_file___Object___print(variable[0])(variable[0], variable[8]) /*Object::print*/;
1324 variable[8] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
1325 /* Register variable[9]: Once String constant */
1326 if (once_value_56 != NIT_NULL) variable[9] = once_value_56;
1327 else {
1328 variable[9] = NEW_String_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)) /*new String*/;
1329 once_value_56 = variable[9];
1330 }
1331 /* Register variable[9]: Result */
1332 /* Ensure var variable[9]: super-string element*/
1333 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1334 /* Register variable[9]: Result */
1335 variable[9] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy( variable[1] /*glob*/)( variable[1] /*glob*/) /*MMGlobalProperty::property_hierarchy*/;
1336 /* Register variable[9]: Result */
1337 variable[9] = CALL_partial_order___PartialOrder___to_dot(variable[9])(variable[9]) /*PartialOrder::to_dot*/;
1338 /* Ensure var variable[9]: super-string element*/
1339 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1340 /* Register variable[9]: Once String constant */
1341 if (once_value_57 != NIT_NULL) variable[9] = once_value_57;
1342 else {
1343 variable[9] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
1344 once_value_57 = variable[9];
1345 }
1346 /* Register variable[9]: Result */
1347 /* Ensure var variable[9]: super-string element*/
1348 CALL_abstract_collection___SimpleCollection___add(variable[8])(variable[8], variable[9]) /*AbstractArray::add*/;
1349 /* Register variable[8]: Result */
1350 variable[8] = CALL_string___Object___to_s(variable[8])(variable[8]) /*Object::to_s*/;
1351 CALL_file___Object___print(variable[0])(variable[0], variable[8]) /*Object::print*/;
1352 exit(UNTAG_Int( TAG_Int(1)));
1353 }
1354 /* Register variable[8]: Result */
1355 variable[8] = CALL_abstract_collection___Collection___first( variable[7] /*impls2*/)( variable[7] /*impls2*/) /*IndexedCollectionRead::first*/;
1356 variable[3] = variable[8] /*impl=*/;
1357 }
1358 }
1359 /* Register variable[6]: Result */
1360 variable[6] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(variable[0]) /*MMLocalClass::_local_property_by_global*/;
1361 CALL_abstract_collection___Map_____braeq(variable[6])(variable[6], variable[1] /*glob*/, variable[3] /*impl*/) /*Map::[]=*/;
1362 variable[2] = variable[3] /*impl*/;
1363 goto return_label44;
1364 return_label44: while(false);
1365 tracehead = trace.prev;
1366 return variable[2];
1367 }
1368 void inheritance___MMLocalProperty___inherit_global(val_t self, val_t param0) {
1369 struct trace_t trace = {NULL, NULL, 375, LOCATE_inheritance___MMLocalProperty___inherit_global};
1370 val_t variable[8];
1371 struct WBT_ **closurevariable = NULL;
1372 trace.prev = tracehead; tracehead = &trace;
1373 trace.file = LOCATE_inheritance;
1374 /* Register variable[0]: Local variable */
1375 variable[0] = self;
1376 /* Register variable[1]: Local variable */
1377 variable[1] = param0;
1378 /* Register variable[2]: Method return value and escape marker */
1379 CALL_abstractmetamodel___MMLocalProperty___set_global(variable[0])(variable[0], variable[1] /*g*/) /*MMLocalProperty::set_global*/;
1380 /* Register variable[3]: Local variable */
1381 /* Register variable[4]: Result */
1382 variable[4] = NEW_Array_array___Array___init() /*new Array[MMLocalProperty]*/;
1383 variable[3] = variable[4];
1384 /* Register variable[4]: Result */
1385 variable[4] = CALL_abstractmetamodel___MMLocalProperty___local_class(variable[0])(variable[0]) /*MMLocalProperty::local_class*/;
1386 /* Register variable[4]: Result */
1387 variable[4] = CALL_abstractmetamodel___MMLocalClass___che(variable[4])(variable[4]) /*MMLocalClass::che*/;
1388 /* Register variable[4]: Result */
1389 variable[4] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[4])(variable[4]) /*PartialOrderElement::direct_greaters*/;
1390 /* Register variable[4]: For iterator */
1391 variable[4] = CALL_abstract_collection___Collection___iterator(variable[4])(variable[4]) /*AbstractArrayRead::iterator*/;
1392 while (true) { /*for*/
1393 /* Register variable[5]: For 'is_ok' result */
1394 variable[5] = CALL_abstract_collection___Iterator___is_ok(variable[4])(variable[4]) /*ArrayIterator::is_ok*/;
1395 if (!UNTAG_Bool(variable[5])) break; /*for*/
1396 variable[5] = CALL_abstract_collection___Iterator___item(variable[4])(variable[4]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
1397 /* Register variable[6]: Local variable */
1398 variable[6] = variable[5];
1399 /* Register variable[7]: Result */
1400 variable[7] = CALL_abstractmetamodel___MMLocalClass___has_global_property( variable[6] /*sc*/)( variable[6] /*sc*/, variable[1] /*g*/) /*MMLocalClass::has_global_property*/;
1401 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[7])))) { /*if*/
1402 goto continue_59;
1403 }
1404 /* Register variable[7]: Result */
1405 variable[7] = CALL_abstractmetamodel___MMLocalClass_____bra( variable[6] /*sc*/)( variable[6] /*sc*/, variable[1] /*g*/) /*MMLocalClass::[]*/;
1406 CALL_abstract_collection___SimpleCollection___add( variable[3] /*impls*/)( variable[3] /*impls*/, variable[7]) /*AbstractArray::add*/;
1407 continue_59: while(0);
1408 CALL_abstract_collection___Iterator___next(variable[4])(variable[4]) /*ArrayIterator::next*/;
1409 }
1410 break_59: while(0);
1411 CALL_abstractmetamodel___MMGlobalProperty___add_local_property( variable[1] /*g*/)( variable[1] /*g*/, variable[0], variable[3] /*impls*/) /*MMGlobalProperty::add_local_property*/;
1412 return_label58: while(false);
1413 tracehead = trace.prev;
1414 return;
1415 }
1416 void inheritance___MMAncestor___add_in(val_t self, val_t param0) {
1417 struct trace_t trace = {NULL, NULL, 389, LOCATE_inheritance___MMAncestor___add_in};
1418 val_t variable[12];
1419 struct WBT_ **closurevariable = NULL;
1420 trace.prev = tracehead; tracehead = &trace;
1421 trace.file = LOCATE_inheritance;
1422 /* Register variable[0]: Local variable */
1423 variable[0] = self;
1424 /* Register variable[1]: Local variable */
1425 variable[1] = param0;
1426 /* Register variable[2]: Method return value and escape marker */
1427 /* Register variable[3]: Result */
1428 variable[3] = CALL_static_type___MMAncestor___stype(variable[0])(variable[0]) /*MMAncestor::stype*/;
1429 /* Register variable[3]: Result */
1430 variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], NIT_NULL /*null*/) /*Object::==*/)))))));
1431 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", " 'ancestor' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMAncestor___add_in, LOCATE_inheritance, 392); nit_exit(1);}
1432 /* Register variable[3]: Result */
1433 variable[3] = CALL_static_type___MMAncestor___stype(variable[0])(variable[0]) /*MMAncestor::stype*/;
1434 /* Register variable[3]: Result */
1435 variable[3] = CALL_static_type___MMType___local_class(variable[3])(variable[3]) /*MMType::local_class*/;
1436 /* Register variable[3]: Result */
1437 variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], NIT_NULL /*null*/) /*Object::==*/)))))));
1438 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", " 'local_class' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMAncestor___add_in, LOCATE_inheritance, 393); nit_exit(1);}
1439 CALL_abstract_collection___SimpleCollection___add( variable[1] /*tab*/)( variable[1] /*tab*/, variable[0]) /*AbstractArray::add*/;
1440 /* Register variable[3]: Result */
1441 variable[3] = CALL_static_type___MMAncestor___stype(variable[0])(variable[0]) /*MMAncestor::stype*/;
1442 /* Register variable[3]: Result */
1443 variable[3] = CALL_static_type___MMType___local_class(variable[3])(variable[3]) /*MMType::local_class*/;
1444 CALL_inheritance___MMLocalClass___compute_ancestors(variable[3])(variable[3]) /*MMLocalClass::compute_ancestors*/;
1445 /* Register variable[3]: Result */
1446 variable[3] = CALL_static_type___MMAncestor___stype(variable[0])(variable[0]) /*MMAncestor::stype*/;
1447 /* Register variable[3]: Result */
1448 variable[3] = CALL_static_type___MMType___local_class(variable[3])(variable[3]) /*MMType::local_class*/;
1449 /* Register variable[3]: Result */
1450 variable[3] = CALL_static_type___MMLocalClass___ancestors(variable[3])(variable[3]) /*MMLocalClass::ancestors*/;
1451 /* Register variable[3]: For iterator */
1452 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*MapRead::iterator*/;
1453 while (true) { /*for*/
1454 /* Register variable[4]: For 'is_ok' result */
1455 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*Iterator::is_ok*/;
1456 if (!UNTAG_Bool(variable[4])) break; /*for*/
1457 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*Iterator::item*/ /* Ensure var: For item*/;
1458 /* Register variable[5]: Local variable */
1459 variable[5] = variable[4];
1460 /* Register variable[6]: Local variable */
1461 /* Register variable[7]: Result */
1462 variable[7] = CALL_static_type___MMAncestor___stype( variable[5] /*anc*/)( variable[5] /*anc*/) /*MMAncestor::stype*/;
1463 /* Register variable[8]: Result */
1464 variable[8] = CALL_static_type___MMAncestor___stype(variable[0])(variable[0]) /*MMAncestor::stype*/;
1465 /* Register variable[8]: Result */
1466 variable[8] = CALL_static_type___MMType___module(variable[8])(variable[8]) /*MMType::module*/;
1467 /* Register variable[7]: Result */
1468 variable[7] = CALL_static_type___MMType___for_module(variable[7])(variable[7], variable[8]) /*MMType::for_module*/;
1469 variable[6] = variable[7];
1470 /* Register variable[7]: Local variable */
1471 /* Register variable[8]: Result */
1472 variable[8] = CALL_static_type___MMAncestor___stype(variable[0])(variable[0]) /*MMAncestor::stype*/;
1473 /* Register variable[8]: Result */
1474 variable[8] = CALL_static_type___MMType___adapt_to( variable[6] /*aaa*/)( variable[6] /*aaa*/, variable[8]) /*MMType::adapt_to*/;
1475 /* Register variable[9]: Result */
1476 variable[9] = CALL_static_type___MMAncestor___inheriter(variable[0])(variable[0]) /*MMAncestor::inheriter*/;
1477 /* Register variable[9]: Result */
1478 variable[9] = CALL_static_type___MMType___module(variable[9])(variable[9]) /*MMType::module*/;
1479 /* Register variable[8]: Result */
1480 variable[8] = CALL_static_type___MMType___for_module(variable[8])(variable[8], variable[9]) /*MMType::for_module*/;
1481 variable[7] = variable[8];
1482 /* Register variable[8]: Result */
1483 variable[8] = CALL_static_type___MMType___local_class( variable[7] /*a*/)( variable[7] /*a*/) /*MMType::local_class*/;
1484 /* Register variable[9]: Result */
1485 variable[9] = CALL_static_type___MMAncestor___inheriter(variable[0])(variable[0]) /*MMAncestor::inheriter*/;
1486 /* Register variable[9]: Result */
1487 variable[9] = CALL_static_type___MMType___local_class(variable[9])(variable[9]) /*MMType::local_class*/;
1488 /* Register variable[8]: Result */
1489 variable[8] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[8] == variable[9]) || ((variable[8] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[8])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[8],variable[9])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[8])(variable[8], variable[9]) /*Object::==*/)))))));
1490 if (UNTAG_Bool(variable[8])) { /*if*/
1491 /* Register variable[8]: Local variable */
1492 /* Register variable[9]: Result */
1493 variable[9] = CALL_abstract_collection___Collection___iterator( variable[1] /*tab*/)( variable[1] /*tab*/) /*AbstractArrayRead::iterator*/;
1494 variable[8] = variable[9];
1495 /* Register variable[9]: Local variable */
1496 variable[9] = TAG_Bool(true);
1497 while (true) { /*while*/
1498 /* Register variable[10]: Result */
1499 variable[10] = CALL_abstract_collection___Iterator___is_ok( variable[8] /*it*/)( variable[8] /*it*/) /*ArrayIterator::is_ok*/;
1500 /* Ensure var variable[10]: Left 'and' operand*/
1501 if (UNTAG_Bool(variable[10])) { /* and */
1502 variable[10] = variable[9] /*b*/;
1503 }
1504 /* Register variable[10]: Result */
1505 if (!UNTAG_Bool(variable[10])) break; /* while*/
1506 /* Register variable[10]: Result */
1507 variable[10] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*ArrayIterator::item*/;
1508 /* Register variable[10]: Result */
1509 variable[10] = CALL_static_type___MMAncestor___inheriter(variable[10])(variable[10]) /*MMAncestor::inheriter*/;
1510 /* Register variable[11]: Result */
1511 variable[11] = CALL_static_type___MMAncestor___inheriter(variable[0])(variable[0]) /*MMAncestor::inheriter*/;
1512 /* Register variable[10]: Result */
1513 variable[10] = TAG_Bool((variable[10] == variable[11]) || ((variable[10] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[10])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[10],variable[11])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[10])(variable[10], variable[11]) /*Object::==*/)))));
1514 /* Ensure var variable[10]: Left 'and' operand*/
1515 if (UNTAG_Bool(variable[10])) { /* and */
1516 /* Register variable[10]: Result */
1517 variable[10] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*ArrayIterator::item*/;
1518 /* Register variable[10]: Result */
1519 variable[10] = CALL_static_type___MMAncestor___stype(variable[10])(variable[10]) /*MMAncestor::stype*/;
1520 /* Register variable[10]: Result */
1521 variable[10] = TAG_Bool((variable[10] == variable[7] /*a*/) || ((variable[10] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[10])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[10], variable[7] /*a*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[10])(variable[10], variable[7] /*a*/) /*Object::==*/)))));
1522 }
1523 /* Register variable[10]: Result */
1524 variable[9] = TAG_Bool(!UNTAG_Bool(variable[10])) /*b=*/;
1525 CALL_abstract_collection___Iterator___next( variable[8] /*it*/)( variable[8] /*it*/) /*ArrayIterator::next*/;
1526 continue_62: while(0);
1527 }
1528 break_62: while(0);
1529 if (UNTAG_Bool( variable[9] /*b*/)) { /*if*/
1530 /* Register variable[10]: Result */
1531 variable[10] = CALL_static_type___MMAncestor___inheriter(variable[0])(variable[0]) /*MMAncestor::inheriter*/;
1532 /* Register variable[10]: Result */
1533 variable[10] = NEW_MMSpecAncestor_inheritance___MMSpecAncestor___init(variable[10], variable[7] /*a*/) /*new MMSpecAncestor*/;
1534 CALL_abstract_collection___SimpleCollection___add( variable[1] /*tab*/)( variable[1] /*tab*/, variable[10]) /*AbstractArray::add*/;
1535 }
1536 }
1537 continue_61: while(0);
1538 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
1539 }
1540 break_61: while(0);
1541 return_label60: while(false);
1542 tracehead = trace.prev;
1543 return;
1544 }
1545 void inheritance___MMImplicitLocalClass___init(val_t self, val_t param0, val_t param1, int* init_table) {
1546 struct trace_t trace = {NULL, NULL, 419, LOCATE_inheritance___MMImplicitLocalClass___init};
1547 val_t variable[7];
1548 struct WBT_ **closurevariable = NULL;
1549 trace.prev = tracehead; tracehead = &trace;
1550 trace.file = LOCATE_inheritance;
1551 /* Register variable[0]: Local variable */
1552 variable[0] = self;
1553 /* Register variable[1]: Local variable */
1554 variable[1] = param0;
1555 /* Register variable[2]: Local variable */
1556 variable[2] = param1;
1557 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMImplicitLocalClass].i]) return;
1558 /* Register variable[3]: Method return value and escape marker */
1559 /* Register variable[4]: Local variable */
1560 /* Register variable[5]: Result */
1561 variable[5] = CALL_abstractmetamodel___MMGlobalClass___intro( variable[2] /*g*/)( variable[2] /*g*/) /*MMGlobalClass::intro*/;
1562 variable[4] = variable[5];
1563 /* Register variable[5]: Result */
1564 variable[5] = CALL_abstractmetamodel___MMLocalClass___name( variable[4] /*cla*/)( variable[4] /*cla*/) /*MMLocalClass::name*/;
1565 /* Register variable[6]: Result */
1566 variable[6] = CALL_abstractmetamodel___MMLocalClass___arity( variable[4] /*cla*/)( variable[4] /*cla*/) /*MMLocalClass::arity*/;
1567 CALL_abstractmetamodel___MMLocalClass___init(variable[0])(variable[0], variable[1] /*mod*/, variable[5], variable[6], init_table /*YYY*/) /*MMLocalClass::init*/;
1568 CALL_abstractmetamodel___MMLocalClass___set_global(variable[0])(variable[0], variable[2] /*g*/) /*MMLocalClass::set_global*/;
1569 return_label63: while(false);
1570 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMImplicitLocalClass].i] = 1;
1571 tracehead = trace.prev;
1572 return;
1573 }
1574 val_t inheritance___MMRefineAncestor___local_class(val_t self) {
1575 struct trace_t trace = {NULL, NULL, 429, LOCATE_inheritance___MMRefineAncestor___local_class};
1576 val_t *variable = NULL;
1577 struct WBT_ **closurevariable = NULL;
1578 trace.prev = tracehead; tracehead = &trace;
1579 trace.file = LOCATE_inheritance;
1580 tracehead = trace.prev;
1581 return ATTR_inheritance___MMRefineAncestor____local_class( self) /*MMRefineAncestor::_local_class*/;
1582 }
1583 void inheritance___MMRefineAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
1584 struct trace_t trace = {NULL, NULL, 431, LOCATE_inheritance___MMRefineAncestor___init};
1585 val_t variable[5];
1586 struct WBT_ **closurevariable = NULL;
1587 trace.prev = tracehead; tracehead = &trace;
1588 trace.file = LOCATE_inheritance;
1589 /* Register variable[0]: Local variable */
1590 variable[0] = self;
1591 /* Register variable[1]: Local variable */
1592 variable[1] = param0;
1593 /* Register variable[2]: Local variable */
1594 variable[2] = param1;
1595 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMRefineAncestor].i]) return;
1596 /* Register variable[3]: Method return value and escape marker */
1597 ATTR_inheritance___MMRefineAncestor____local_class(variable[0]) /*MMRefineAncestor::_local_class*/ = variable[2] /*a*/;
1598 /* Register variable[4]: Result */
1599 variable[4] = CALL_static_type___MMLocalClass___get_type( variable[1] /*b*/)( variable[1] /*b*/) /*MMLocalClass::get_type*/;
1600 CALL_static_type___MMAncestor___inheriter__eq(variable[0])(variable[0], variable[4]) /*MMAncestor::inheriter=*/;
1601 /* Register variable[4]: Result */
1602 variable[4] = ATTR_inheritance___MMRefineAncestor____local_class(variable[0]) /*MMRefineAncestor::_local_class*/;
1603 /* Register variable[4]: Result */
1604 variable[4] = CALL_static_type___MMLocalClass___get_type(variable[4])(variable[4]) /*MMLocalClass::get_type*/;
1605 CALL_static_type___MMAncestor___stype__eq(variable[0])(variable[0], variable[4]) /*MMAncestor::stype=*/;
1606 return_label64: while(false);
1607 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMRefineAncestor].i] = 1;
1608 tracehead = trace.prev;
1609 return;
1610 }
1611 val_t inheritance___MMSpecAncestor___local_class(val_t self) {
1612 struct trace_t trace = {NULL, NULL, 442, LOCATE_inheritance___MMSpecAncestor___local_class};
1613 val_t variable[3];
1614 struct WBT_ **closurevariable = NULL;
1615 trace.prev = tracehead; tracehead = &trace;
1616 trace.file = LOCATE_inheritance;
1617 /* Register variable[0]: Local variable */
1618 variable[0] = self;
1619 /* Register variable[1]: Method return value and escape marker */
1620 /* Register variable[2]: Result */
1621 variable[2] = CALL_static_type___MMAncestor___stype(variable[0])(variable[0]) /*MMAncestor::stype*/;
1622 /* Register variable[2]: Result */
1623 variable[2] = CALL_static_type___MMType___local_class(variable[2])(variable[2]) /*MMType::local_class*/;
1624 variable[1] = variable[2];
1625 goto return_label65;
1626 return_label65: while(false);
1627 tracehead = trace.prev;
1628 return variable[1];
1629 }
1630 void inheritance___MMSpecAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
1631 struct trace_t trace = {NULL, NULL, 444, LOCATE_inheritance___MMSpecAncestor___init};
1632 val_t variable[4];
1633 struct WBT_ **closurevariable = NULL;
1634 trace.prev = tracehead; tracehead = &trace;
1635 trace.file = LOCATE_inheritance;
1636 /* Register variable[0]: Local variable */
1637 variable[0] = self;
1638 /* Register variable[1]: Local variable */
1639 variable[1] = param0;
1640 /* Register variable[2]: Local variable */
1641 variable[2] = param1;
1642 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMSpecAncestor].i]) return;
1643 /* Register variable[3]: Method return value and escape marker */
1644 ATTR_static_type___MMAncestor____inheriter(variable[0]) /*MMAncestor::_inheriter*/ = variable[1] /*inheriter*/;
1645 ATTR_static_type___MMAncestor____stype(variable[0]) /*MMAncestor::_stype*/ = variable[2] /*stype*/;
1646 return_label66: while(false);
1647 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMSpecAncestor].i] = 1;
1648 tracehead = trace.prev;
1649 return;
1650 }
1651 val_t inheritance___MMDefaultAncestor___local_class(val_t self) {
1652 struct trace_t trace = {NULL, NULL, 453, LOCATE_inheritance___MMDefaultAncestor___local_class};
1653 val_t variable[3];
1654 struct WBT_ **closurevariable = NULL;
1655 trace.prev = tracehead; tracehead = &trace;
1656 trace.file = LOCATE_inheritance;
1657 /* Register variable[0]: Local variable */
1658 variable[0] = self;
1659 /* Register variable[1]: Method return value and escape marker */
1660 /* Register variable[2]: Result */
1661 variable[2] = CALL_static_type___MMAncestor___stype(variable[0])(variable[0]) /*MMAncestor::stype*/;
1662 /* Register variable[2]: Result */
1663 variable[2] = CALL_static_type___MMType___local_class(variable[2])(variable[2]) /*MMType::local_class*/;
1664 variable[1] = variable[2];
1665 goto return_label67;
1666 return_label67: while(false);
1667 tracehead = trace.prev;
1668 return variable[1];
1669 }
1670 void inheritance___MMDefaultAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
1671 struct trace_t trace = {NULL, NULL, 455, LOCATE_inheritance___MMDefaultAncestor___init};
1672 val_t variable[5];
1673 struct WBT_ **closurevariable = NULL;
1674 trace.prev = tracehead; tracehead = &trace;
1675 trace.file = LOCATE_inheritance;
1676 /* Register variable[0]: Local variable */
1677 variable[0] = self;
1678 /* Register variable[1]: Local variable */
1679 variable[1] = param0;
1680 /* Register variable[2]: Local variable */
1681 variable[2] = param1;
1682 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMDefaultAncestor].i]) return;
1683 /* Register variable[3]: Method return value and escape marker */
1684 /* Register variable[4]: Result */
1685 variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[1] /*b*/ == NIT_NULL /*null*/) || (( variable[1] /*b*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[1] /*b*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[1] /*b*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[1] /*b*/)( variable[1] /*b*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1686 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMDefaultAncestor___init, LOCATE_inheritance, 457); nit_exit(1);}
1687 /* Register variable[4]: Result */
1688 variable[4] = CALL_abstractmetamodel___MMLocalClass___module( variable[1] /*b*/)( variable[1] /*b*/) /*MMLocalClass::module*/;
1689 /* Register variable[4]: Result */
1690 variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[4] == NIT_NULL /*null*/) || ((variable[4] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[4])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[4], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[4])(variable[4], NIT_NULL /*null*/) /*Object::==*/)))))));
1691 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMDefaultAncestor___init, LOCATE_inheritance, 458); nit_exit(1);}
1692 /* Register variable[4]: Result */
1693 variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[2] /*anc*/ == NIT_NULL /*null*/) || (( variable[2] /*anc*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[2] /*anc*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[2] /*anc*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[2] /*anc*/)( variable[2] /*anc*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1694 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMDefaultAncestor___init, LOCATE_inheritance, 459); nit_exit(1);}
1695 /* Register variable[4]: Result */
1696 variable[4] = CALL_static_type___MMLocalClass___get_type( variable[1] /*b*/)( variable[1] /*b*/) /*MMLocalClass::get_type*/;
1697 CALL_static_type___MMAncestor___inheriter__eq(variable[0])(variable[0], variable[4]) /*MMAncestor::inheriter=*/;
1698 CALL_static_type___MMAncestor___stype__eq(variable[0])(variable[0], variable[2] /*anc*/) /*MMAncestor::stype=*/;
1699 return_label68: while(false);
1700 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMDefaultAncestor].i] = 1;
1701 tracehead = trace.prev;
1702 return;
1703 }