new c_src
[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[4]*/
6 val_t variable[5];
7 void **closurevariable = NULL;
8 trace.prev = tracehead; tracehead = &trace;
9 trace.file = LOCATE_inheritance;
10 variable[0] = self;
11 variable[3] = variable[0];
12 if (once_bool_1) variable[4] = once_value_1;
13 else {
14 variable[4] = NEW_String_string___String___with_native(BOX_NativeString("Object"), TAG_Int(6)); /*new String*/
15 variable[4] = CALL_symbol___String___to_symbol(variable[4])(variable[4]) /*String::to_symbol*/;
16 once_value_1 = variable[4];
17 once_bool_1 = true;
18 }
19 variable[3] = CALL_abstractmetamodel___MMModule___class_by_name(variable[3])(variable[3], variable[4]) /*MMModule::class_by_name*/;
20 variable[2] = variable[3];
21 variable[3] = CALL_static_type___MMLocalClass___get_type( variable[2] /*c_name*/)( variable[2] /*c_name*/) /*MMLocalClass::get_type*/;
22 variable[1] = variable[3];
23 goto return_label0;
24 return_label0: while(false);
25 tracehead = trace.prev;
26 return variable[1];
27 }
28 void inheritance___MMModule___import_global_classes(val_t self) {
29 struct trace_t trace = {NULL, NULL, 31, LOCATE_inheritance___MMModule___import_global_classes};
30 val_t variable[11];
31 void **closurevariable = NULL;
32 trace.prev = tracehead; tracehead = &trace;
33 trace.file = LOCATE_inheritance;
34 variable[0] = self;
35 variable[3] = NEW_HashMap_hash___HashMap___init(); /*new HashMap[MMGlobalClass, HashSet[MMLocalClass]]*/
36 variable[2] = variable[3];
37 variable[3] = variable[0];
38 variable[3] = CALL_abstractmetamodel___MMModule___mhe(variable[3])(variable[3]) /*MMModule::mhe*/;
39 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::==*/)))))));
40 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);}
41 variable[3] = variable[0];
42 variable[3] = CALL_abstractmetamodel___MMModule___mhe(variable[3])(variable[3]) /*MMModule::mhe*/;
43 variable[3] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[3])(variable[3]) /*PartialOrderElement::direct_greaters*/;
44 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArray::iterator*/;
45 while (true) { /*for*/
46 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
47 if (!UNTAG_Bool(variable[4])) break; /*for*/
48 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/;
49 variable[5] = variable[4];
50 variable[6] = CALL_abstractmetamodel___MMModule___global_classes( variable[5] /*mod*/)( variable[5] /*mod*/) /*MMModule::global_classes*/;
51 variable[6] = CALL_abstract_collection___Collection___iterator(variable[6])(variable[6]) /*AbstractArray::iterator*/;
52 while (true) { /*for*/
53 variable[7] = CALL_abstract_collection___Iterator___is_ok(variable[6])(variable[6]) /*ArrayIterator::is_ok*/;
54 if (!UNTAG_Bool(variable[7])) break; /*for*/
55 variable[7] = CALL_abstract_collection___Iterator___item(variable[6])(variable[6]) /*ArrayIterator::item*/;
56 variable[8] = variable[7];
57 variable[9] = variable[0];
58 variable[9] = CALL_abstractmetamodel___MMModule___global_classes(variable[9])(variable[9]) /*MMModule::global_classes*/;
59 variable[9] = CALL_abstract_collection___Collection___has(variable[9])(variable[9], variable[8] /*glob*/) /*AbstractArray::has*/;
60 if (UNTAG_Bool(variable[9])) { /*if*/
61 goto continue_4;
62 }
63 variable[9] = variable[0];
64 variable[9] = ATTR_abstractmetamodel___MMModule____global_classes(variable[9]) /*MMModule::_global_classes*/;
65 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[8] /*glob*/) /*AbstractArray::add*/;
66 variable[9] = variable[0];
67 variable[9] = ATTR_abstractmetamodel___MMModule____global_class_by_name(variable[9]) /*MMModule::_global_class_by_name*/;
68 variable[10] = CALL_abstractmetamodel___MMGlobalClass___name( variable[8] /*glob*/)( variable[8] /*glob*/) /*MMGlobalClass::name*/;
69 CALL_abstract_collection___Map_____braeq(variable[9])(variable[9], variable[10], variable[8] /*glob*/) /*Map::[]=*/;
70 continue_4: while(0);
71 CALL_abstract_collection___Iterator___next(variable[6])(variable[6]) /*ArrayIterator::next*/;
72 }
73 break_4: while(0);
74 continue_3: while(0);
75 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
76 }
77 break_3: while(0);
78 return_label2: while(false);
79 tracehead = trace.prev;
80 return;
81 }
82 void inheritance___MMModule___import_local_classes(val_t self) {
83 struct trace_t trace = {NULL, NULL, 46, LOCATE_inheritance___MMModule___import_local_classes};
84 val_t variable[8];
85 void **closurevariable = NULL;
86 trace.prev = tracehead; tracehead = &trace;
87 trace.file = LOCATE_inheritance;
88 variable[0] = self;
89 variable[2] = variable[0];
90 variable[2] = ATTR_abstractmetamodel___MMModule____global_classes(variable[2]) /*MMModule::_global_classes*/;
91 variable[2] = CALL_abstract_collection___Collection___iterator(variable[2])(variable[2]) /*AbstractArray::iterator*/;
92 while (true) { /*for*/
93 variable[3] = CALL_abstract_collection___Iterator___is_ok(variable[2])(variable[2]) /*ArrayIterator::is_ok*/;
94 if (!UNTAG_Bool(variable[3])) break; /*for*/
95 variable[3] = CALL_abstract_collection___Iterator___item(variable[2])(variable[2]) /*ArrayIterator::item*/;
96 variable[4] = variable[3];
97 variable[5] = variable[0];
98 variable[5] = CALL_abstractmetamodel___MMModule_____bra(variable[5])(variable[5], variable[4] /*g*/) /*MMModule::[]*/;
99 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::==*/)))))));
100 if (UNTAG_Bool(variable[5])) { /*if*/
101 goto continue_6;
102 }
103 variable[6] = variable[0];
104 variable[7] = NEW_MMImplicitLocalClass_inheritance___MMImplicitLocalClass___init(variable[6], variable[4] /*g*/); /*new MMImplicitLocalClass*/
105 variable[6] = variable[7];
106 variable[5] = variable[6];
107 continue_6: while(0);
108 CALL_abstract_collection___Iterator___next(variable[2])(variable[2]) /*ArrayIterator::next*/;
109 }
110 break_6: while(0);
111 return_label5: while(false);
112 tracehead = trace.prev;
113 return;
114 }
115 val_t inheritance___MMLocalClass_____bra(val_t self, val_t param0) {
116 struct trace_t trace = {NULL, NULL, 194, LOCATE_inheritance___MMLocalClass_____bra};
117 val_t variable[6];
118 void **closurevariable = NULL;
119 trace.prev = tracehead; tracehead = &trace;
120 trace.file = LOCATE_inheritance;
121 variable[0] = self;
122 variable[1] = param0;
123 variable[4] = CALL_SUPER_inheritance___MMLocalClass_____bra(variable[0])(variable[0], variable[1] /*glob*/) /*super MMLocalClass::[]*/;
124 variable[3] = variable[4];
125 variable[4] = TAG_Bool(( variable[3] /*prop*/ == NIT_NULL /*null*/) || (( variable[3] /*prop*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[3] /*prop*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[3] /*prop*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[3] /*prop*/)( variable[3] /*prop*/, NIT_NULL /*null*/) /*Object::==*/)))));
126 variable[5] = variable[4];
127 if (UNTAG_Bool(variable[5])) { /* and */
128 variable[5] = variable[0];
129 variable[5] = ATTR_abstractmetamodel___MMLocalClass____global_properties(variable[5]) /*MMLocalClass::_global_properties*/;
130 variable[5] = CALL_abstract_collection___Collection___has(variable[5])(variable[5], variable[1] /*glob*/) /*Collection::has*/;
131 }
132 variable[4] = variable[5];
133 if (UNTAG_Bool(variable[4])) { /*if*/
134 variable[4] = variable[0];
135 variable[4] = CALL_inheritance___MMLocalClass___inherit_local_property(variable[4])(variable[4], variable[1] /*glob*/) /*MMLocalClass::inherit_local_property*/;
136 variable[3] = variable[4] /*prop=*/;
137 }
138 variable[2] = variable[3] /*prop*/;
139 goto return_label7;
140 return_label7: while(false);
141 tracehead = trace.prev;
142 return variable[2];
143 }
144 void inheritance___MMLocalClass___compute_super_classes(val_t self) {
145 struct trace_t trace = {NULL, NULL, 64, LOCATE_inheritance___MMLocalClass___compute_super_classes};
146 val_t variable[10];
147 void **closurevariable = NULL;
148 trace.prev = tracehead; tracehead = &trace;
149 trace.file = LOCATE_inheritance;
150 variable[0] = self;
151 variable[2] = variable[0];
152 variable[2] = CALL_inheritance___MMLocalClass___computed_super_classes(variable[2])(variable[2]) /*MMLocalClass::computed_super_classes*/;
153 if (UNTAG_Bool(variable[2])) { /*if*/
154 goto return_label8;
155 } else { /*if*/
156 variable[2] = variable[0];
157 variable[2] = ATTR_inheritance___MMLocalClass____computing_super(variable[2]) /*MMLocalClass::_computing_super*/;
158 if (UNTAG_Bool(variable[2])) { /*if*/
159 variable[2] = variable[0];
160 variable[2] = CALL_file___Object___stderr(variable[2])(variable[2]) /*Object::stderr*/;
161 variable[3] = NEW_Array_array___Array___with_capacity(TAG_Int(3)); /*new Array[String]*/
162 variable[4] = NEW_String_string___String___with_native(BOX_NativeString("Fatal error: Inheritance loop for class "), TAG_Int(40)); /*new String*/
163 variable[5] = variable[4];
164 CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[5]) /*AbstractArray::add*/;
165 variable[6] = variable[0];
166 variable[7] = variable[6];
167 variable[7] = CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/;
168 CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[7]) /*AbstractArray::add*/;
169 variable[8] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
170 variable[9] = variable[8];
171 CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[9]) /*AbstractArray::add*/;
172 variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*Object::to_s*/;
173 CALL_stream___OStream___write(variable[2])(variable[2], variable[3]) /*OFStream::write*/;
174 variable[2] = variable[0];
175 exit(UNTAG_Int( TAG_Int(1)));
176 }
177 }
178 variable[2] = variable[0];
179 ATTR_inheritance___MMLocalClass____computing_super(variable[2]) /*MMLocalClass::_computing_super*/ = TAG_Bool(true);
180 variable[3] = NEW_Array_array___Array___init(); /*new Array[MMLocalClass]*/
181 variable[2] = variable[3];
182 variable[3] = variable[0];
183 CALL_inheritance___MMLocalClass___add_explicit_classes(variable[3])(variable[3], variable[2] /*supers*/) /*MMLocalClass::add_explicit_classes*/;
184 variable[3] = variable[0];
185 CALL_inheritance___MMLocalClass___add_super_classes(variable[3])(variable[3], variable[2] /*supers*/) /*MMLocalClass::add_super_classes*/;
186 variable[3] = variable[0];
187 CALL_inheritance___MMLocalClass___add_default_any_class(variable[3])(variable[3], variable[2] /*supers*/) /*MMLocalClass::add_default_any_class*/;
188 variable[3] = variable[0];
189 CALL_inheritance___MMLocalClass___compute_super_parents(variable[3])(variable[3], variable[2] /*supers*/) /*MMLocalClass::compute_super_parents*/;
190 variable[4] = NEW_HashSet_hash___HashSet___init(); /*new HashSet[MMLocalClass]*/
191 variable[3] = variable[4];
192 CALL_abstract_collection___SimpleCollection___add_all( variable[3] /*set*/)( variable[3] /*set*/, variable[2] /*supers*/) /*SimpleCollection::add_all*/;
193 variable[5] = CALL_array___Collection___to_a( variable[3] /*set*/)( variable[3] /*set*/) /*Collection::to_a*/;
194 variable[4] = variable[5];
195 variable[5] = variable[0];
196 variable[5] = CALL_abstractmetamodel___MMLocalClass___module(variable[5])(variable[5]) /*MMLocalClass::module*/;
197 variable[6] = variable[0];
198 CALL_abstractmetamodel___MMModule___set_supers_class(variable[5])(variable[5], variable[6], variable[4] /*u*/) /*MMModule::set_supers_class*/;
199 variable[5] = variable[0];
200 variable[5] = ATTR_abstractmetamodel___MMLocalClass____crhe(variable[5]) /*MMLocalClass::_crhe*/;
201 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::==*/)))))));
202 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);}
203 variable[5] = variable[0];
204 variable[5] = ATTR_abstractmetamodel___MMLocalClass____cshe(variable[5]) /*MMLocalClass::_cshe*/;
205 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::==*/)))))));
206 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);}
207 variable[5] = variable[0];
208 ATTR_inheritance___MMLocalClass____computing_super(variable[5]) /*MMLocalClass::_computing_super*/ = TAG_Bool(false);
209 return_label8: while(false);
210 tracehead = trace.prev;
211 return;
212 }
213 void inheritance___MMLocalClass___compute_ancestors(val_t self) {
214 struct trace_t trace = {NULL, NULL, 90, LOCATE_inheritance___MMLocalClass___compute_ancestors};
215 val_t variable[9];
216 void **closurevariable = NULL;
217 trace.prev = tracehead; tracehead = &trace;
218 trace.file = LOCATE_inheritance;
219 variable[0] = self;
220 variable[2] = variable[0];
221 variable[2] = CALL_inheritance___MMLocalClass___computed_super_classes(variable[2])(variable[2]) /*MMLocalClass::computed_super_classes*/;
222 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);}
223 variable[2] = variable[0];
224 variable[2] = CALL_inheritance___MMLocalClass___computed_ancestors(variable[2])(variable[2]) /*MMLocalClass::computed_ancestors*/;
225 if (UNTAG_Bool(variable[2])) { /*if*/
226 goto return_label9;
227 }
228 variable[3] = variable[0];
229 variable[4] = variable[0];
230 variable[4] = CALL_inheritance___MMLocalClass___build_ancestors(variable[4])(variable[4]) /*MMLocalClass::build_ancestors*/;
231 variable[3] = CALL_inheritance___MMLocalClass___group_ancestors(variable[3])(variable[3], variable[4]) /*MMLocalClass::group_ancestors*/;
232 variable[2] = variable[3];
233 variable[3] = variable[0];
234 variable[4] = NEW_HashMap_hash___HashMap___init(); /*new HashMap[MMLocalClass, MMAncestor]*/
235 ATTR_static_type___MMLocalClass____ancestors(variable[3]) /*MMLocalClass::_ancestors*/ = variable[4];
236 variable[3] = CALL_abstract_collection___Collection___iterator( variable[2] /*ancestors*/)( variable[2] /*ancestors*/) /*Map::iterator*/;
237 while (true) { /*for*/
238 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*Iterator::is_ok*/;
239 if (!UNTAG_Bool(variable[4])) break; /*for*/
240 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*Iterator::item*/;
241 variable[5] = variable[4];
242 variable[6] = CALL_abstract_collection___Collection___length( variable[5] /*set*/)( variable[5] /*set*/) /*Collection::length*/;
243 variable[6] = TAG_Bool((variable[6])==( TAG_Int(1)));
244 if (UNTAG_Bool(variable[6])) { /*if*/
245 variable[6] = variable[0];
246 variable[7] = CALL_abstract_collection___Collection___first( variable[5] /*set*/)( variable[5] /*set*/) /*Collection::first*/;
247 CALL_static_type___MMLocalClass___add_ancestor(variable[6])(variable[6], variable[7]) /*MMLocalClass::add_ancestor*/;
248 } else { /*if*/
249 variable[7] = variable[0];
250 variable[7] = CALL_inheritance___MMLocalClass___merge_ancestors(variable[7])(variable[7], variable[5] /*set*/) /*MMLocalClass::merge_ancestors*/;
251 variable[6] = variable[7];
252 variable[7] = variable[0];
253 variable[8] = variable[0];
254 variable[8] = CALL_inheritance___MMLocalClass___merge_ancestors(variable[8])(variable[8], variable[5] /*set*/) /*MMLocalClass::merge_ancestors*/;
255 CALL_static_type___MMLocalClass___add_ancestor(variable[7])(variable[7], variable[8]) /*MMLocalClass::add_ancestor*/;
256 }
257 continue_10: while(0);
258 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
259 }
260 break_10: while(0);
261 return_label9: while(false);
262 tracehead = trace.prev;
263 return;
264 }
265 void inheritance___MMLocalClass___inherit_global_properties(val_t self) {
266 struct trace_t trace = {NULL, NULL, 109, LOCATE_inheritance___MMLocalClass___inherit_global_properties};
267 val_t variable[13];
268 void **closurevariable = NULL;
269 trace.prev = tracehead; tracehead = &trace;
270 trace.file = LOCATE_inheritance;
271 variable[0] = self;
272 variable[2] = variable[0];
273 variable[2] = ATTR_abstractmetamodel___MMLocalClass____global_properties(variable[2]) /*MMLocalClass::_global_properties*/;
274 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::==*/)))))));
275 if (UNTAG_Bool(variable[2])) { /*if*/
276 goto return_label11;
277 }
278 variable[2] = variable[0];
279 variable[3] = NEW_HashSet_hash___HashSet___init(); /*new HashSet[MMGlobalProperty]*/
280 ATTR_abstractmetamodel___MMLocalClass____global_properties(variable[2]) /*MMLocalClass::_global_properties*/ = variable[3];
281 variable[2] = variable[0];
282 variable[3] = NEW_HashMap_hash___HashMap___init(); /*new HashMap[Symbol, Array[MMGlobalProperty]]*/
283 ATTR_abstractmetamodel___MMLocalClass____properties_by_name(variable[2]) /*MMLocalClass::_properties_by_name*/ = variable[3];
284 variable[2] = variable[0];
285 variable[3] = NEW_HashMap_hash___HashMap___init(); /*new HashMap[MMGlobalProperty, MMLocalProperty]*/
286 ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(variable[2]) /*MMLocalClass::_local_property_by_global*/ = variable[3];
287 variable[3] = variable[0];
288 variable[3] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(variable[3]) /*MMLocalClass::_properties_by_name*/;
289 variable[2] = variable[3];
290 variable[4] = variable[0];
291 variable[4] = ATTR_abstractmetamodel___MMLocalClass____global_properties(variable[4]) /*MMLocalClass::_global_properties*/;
292 variable[3] = variable[4];
293 variable[4] = variable[0];
294 variable[4] = CALL_abstractmetamodel___MMLocalClass___che(variable[4])(variable[4]) /*MMLocalClass::che*/;
295 variable[4] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[4])(variable[4]) /*PartialOrderElement::direct_greaters*/;
296 variable[4] = CALL_abstract_collection___Collection___iterator(variable[4])(variable[4]) /*AbstractArray::iterator*/;
297 while (true) { /*for*/
298 variable[5] = CALL_abstract_collection___Iterator___is_ok(variable[4])(variable[4]) /*ArrayIterator::is_ok*/;
299 if (!UNTAG_Bool(variable[5])) break; /*for*/
300 variable[5] = CALL_abstract_collection___Iterator___item(variable[4])(variable[4]) /*ArrayIterator::item*/;
301 variable[6] = variable[5];
302 variable[7] = CALL_abstractmetamodel___MMLocalClass___global_properties( variable[6] /*c*/)( variable[6] /*c*/) /*MMLocalClass::global_properties*/;
303 variable[7] = CALL_abstract_collection___Collection___iterator(variable[7])(variable[7]) /*Collection::iterator*/;
304 while (true) { /*for*/
305 variable[8] = CALL_abstract_collection___Iterator___is_ok(variable[7])(variable[7]) /*Iterator::is_ok*/;
306 if (!UNTAG_Bool(variable[8])) break; /*for*/
307 variable[8] = CALL_abstract_collection___Iterator___item(variable[7])(variable[7]) /*Iterator::item*/;
308 variable[9] = variable[8];
309 variable[10] = CALL_abstract_collection___Collection___has( variable[3] /*set*/)( variable[3] /*set*/, variable[9] /*glob*/) /*Collection::has*/;
310 if (UNTAG_Bool(variable[10])) { /*if*/
311 goto continue_13;
312 }
313 CALL_abstract_collection___SimpleCollection___add( variable[3] /*set*/)( variable[3] /*set*/, variable[9] /*glob*/) /*SimpleCollection::add*/;
314 variable[10] = CALL_abstractmetamodel___MMGlobalProperty___is_init( variable[9] /*glob*/)( variable[9] /*glob*/) /*MMGlobalProperty::is_init*/;
315 variable[11] = variable[10];
316 if (UNTAG_Bool(variable[11])) { /* and */
317 variable[11] = CALL_abstractmetamodel___MMGlobalProperty___intro( variable[9] /*glob*/)( variable[9] /*glob*/) /*MMGlobalProperty::intro*/;
318 variable[11] = CALL_abstractmetamodel___MMLocalProperty___local_class(variable[11])(variable[11]) /*MMLocalProperty::local_class*/;
319 variable[11] = CALL_abstractmetamodel___MMLocalClass___global(variable[11])(variable[11]) /*MMLocalClass::global*/;
320 variable[12] = variable[0];
321 variable[12] = CALL_abstractmetamodel___MMLocalClass___global(variable[12])(variable[12]) /*MMLocalClass::global*/;
322 variable[11] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[11] == variable[12]) || ((variable[11] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[11])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[11],variable[12])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[11])(variable[11], variable[12]) /*Object::==*/)))))));
323 }
324 variable[10] = variable[11];
325 if (UNTAG_Bool(variable[10])) { /*if*/
326 goto continue_13;
327 }
328 variable[10] = variable[0];
329 CALL_inheritance___MMLocalClass___make_visible_an_inherited_global_property(variable[10])(variable[10], variable[9] /*glob*/) /*MMLocalClass::make_visible_an_inherited_global_property*/;
330 continue_13: while(0);
331 CALL_abstract_collection___Iterator___next(variable[7])(variable[7]) /*Iterator::next*/;
332 }
333 break_13: while(0);
334 continue_12: while(0);
335 CALL_abstract_collection___Iterator___next(variable[4])(variable[4]) /*ArrayIterator::next*/;
336 }
337 break_12: while(0);
338 return_label11: while(false);
339 tracehead = trace.prev;
340 return;
341 }
342 void inheritance___MMLocalClass___make_visible_an_inherited_global_property(val_t self, val_t param0) {
343 struct trace_t trace = {NULL, NULL, 138, LOCATE_inheritance___MMLocalClass___make_visible_an_inherited_global_property};
344 val_t variable[7];
345 void **closurevariable = NULL;
346 trace.prev = tracehead; tracehead = &trace;
347 trace.file = LOCATE_inheritance;
348 variable[0] = self;
349 variable[1] = param0;
350 variable[4] = variable[0];
351 variable[4] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(variable[4]) /*MMLocalClass::_properties_by_name*/;
352 variable[3] = variable[4];
353 variable[5] = CALL_abstractmetamodel___MMGlobalProperty___intro( variable[1] /*glob*/)( variable[1] /*glob*/) /*MMGlobalProperty::intro*/;
354 variable[5] = CALL_abstractmetamodel___MMLocalProperty___name(variable[5])(variable[5]) /*MMLocalProperty::name*/;
355 variable[4] = variable[5];
356 /*variable[5] is variable conf_set*/
357 variable[6] = CALL_abstract_collection___Map___has_key( variable[3] /*names*/)( variable[3] /*names*/, variable[4] /*gname*/) /*Map::has_key*/;
358 if (UNTAG_Bool(variable[6])) { /*if*/
359 variable[6] = CALL_abstract_collection___Map_____bra( variable[3] /*names*/)( variable[3] /*names*/, variable[4] /*gname*/) /*Map::[]*/;
360 variable[5] = variable[6] /*conf_set=*/;
361 } else { /*if*/
362 variable[6] = NEW_Array_array___Array___init(); /*new Array[MMGlobalProperty]*/
363 variable[5] = variable[6] /*conf_set=*/;
364 CALL_abstract_collection___Map_____braeq( variable[3] /*names*/)( variable[3] /*names*/, variable[4] /*gname*/, variable[5] /*conf_set*/) /*Map::[]=*/;
365 }
366 CALL_abstract_collection___SimpleCollection___add( variable[5] /*conf_set*/)( variable[5] /*conf_set*/, variable[1] /*glob*/) /*AbstractArray::add*/;
367 return_label14: while(false);
368 tracehead = trace.prev;
369 return;
370 }
371 void inheritance___MMLocalClass___add_direct_parent(val_t self, val_t param0) {
372 struct trace_t trace = {NULL, NULL, 153, LOCATE_inheritance___MMLocalClass___add_direct_parent};
373 val_t variable[4];
374 void **closurevariable = NULL;
375 trace.prev = tracehead; tracehead = &trace;
376 trace.file = LOCATE_inheritance;
377 variable[0] = self;
378 variable[1] = param0;
379 variable[3] = variable[0];
380 variable[3] = ATTR_inheritance___MMLocalClass____direct_parents(variable[3]) /*MMLocalClass::_direct_parents*/;
381 CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[1] /*p*/) /*AbstractArray::add*/;
382 return_label15: while(false);
383 tracehead = trace.prev;
384 return;
385 }
386 val_t inheritance___MMLocalClass___computed_super_classes(val_t self) {
387 struct trace_t trace = {NULL, NULL, 159, LOCATE_inheritance___MMLocalClass___computed_super_classes};
388 val_t variable[4];
389 void **closurevariable = NULL;
390 trace.prev = tracehead; tracehead = &trace;
391 trace.file = LOCATE_inheritance;
392 variable[0] = self;
393 variable[2] = variable[0];
394 variable[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(variable[2]) /*MMLocalClass::_crhe*/;
395 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::==*/)))))));
396 variable[3] = variable[2];
397 if (UNTAG_Bool(variable[3])) { /* and */
398 variable[3] = variable[0];
399 variable[3] = ATTR_abstractmetamodel___MMLocalClass____cshe(variable[3]) /*MMLocalClass::_cshe*/;
400 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::==*/)))))));
401 }
402 variable[2] = variable[3];
403 variable[1] = variable[2];
404 goto return_label16;
405 return_label16: while(false);
406 tracehead = trace.prev;
407 return variable[1];
408 }
409 val_t inheritance___MMLocalClass___computed_ancestors(val_t self) {
410 struct trace_t trace = {NULL, NULL, 165, LOCATE_inheritance___MMLocalClass___computed_ancestors};
411 val_t variable[3];
412 void **closurevariable = NULL;
413 trace.prev = tracehead; tracehead = &trace;
414 trace.file = LOCATE_inheritance;
415 variable[0] = self;
416 variable[2] = variable[0];
417 variable[2] = ATTR_static_type___MMLocalClass____ancestors(variable[2]) /*MMLocalClass::_ancestors*/;
418 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::==*/)))))));
419 variable[1] = variable[2];
420 goto return_label17;
421 return_label17: while(false);
422 tracehead = trace.prev;
423 return variable[1];
424 }
425 val_t inheritance___MMLocalClass___ancestor_for(val_t self, val_t param0) {
426 struct trace_t trace = {NULL, NULL, 171, LOCATE_inheritance___MMLocalClass___ancestor_for};
427 val_t variable[8];
428 void **closurevariable = NULL;
429 trace.prev = tracehead; tracehead = &trace;
430 trace.file = LOCATE_inheritance;
431 variable[0] = self;
432 variable[1] = param0;
433 variable[3] = variable[0];
434 variable[3] = CALL_static_type___MMLocalClass___ancestors(variable[3])(variable[3]) /*MMLocalClass::ancestors*/;
435 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::==*/)))))));
436 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);}
437 variable[3] = variable[0];
438 variable[3] = ATTR_static_type___MMLocalClass____ancestors(variable[3]) /*MMLocalClass::_ancestors*/;
439 variable[3] = CALL_abstract_collection___Map___has_key(variable[3])(variable[3], variable[1] /*c*/) /*Map::has_key*/;
440 if (UNTAG_Bool(variable[3])) { /*if*/
441 variable[3] = variable[0];
442 variable[3] = ATTR_static_type___MMLocalClass____ancestors(variable[3]) /*MMLocalClass::_ancestors*/;
443 variable[3] = CALL_abstract_collection___Map_____bra(variable[3])(variable[3], variable[1] /*c*/) /*Map::[]*/;
444 variable[2] = variable[3];
445 goto return_label18;
446 }
447 variable[4] = variable[0];
448 variable[4] = CALL_abstractmetamodel___MMLocalClass___module(variable[4])(variable[4]) /*MMLocalClass::module*/;
449 variable[4] = CALL_abstractmetamodel___MMLocalClass___for_module( variable[1] /*c*/)( variable[1] /*c*/, variable[4]) /*MMLocalClass::for_module*/;
450 variable[3] = variable[4];
451 variable[4] = variable[0];
452 variable[4] = CALL_abstractmetamodel___MMLocalClass___cshe(variable[4])(variable[4]) /*MMLocalClass::cshe*/;
453 variable[4] = CALL_partial_order___PartialOrderElement_____leq(variable[4])(variable[4], variable[3] /*a*/) /*PartialOrderElement::<=*/;
454 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);}
455 /*variable[4] is variable ra*/
456 variable[5] = variable[0];
457 variable[5] = ATTR_static_type___MMLocalClass____ancestors(variable[5]) /*MMLocalClass::_ancestors*/;
458 variable[5] = CALL_abstract_collection___Map___has_key(variable[5])(variable[5], variable[3] /*a*/) /*Map::has_key*/;
459 if (UNTAG_Bool(variable[5])) { /*if*/
460 variable[5] = variable[0];
461 variable[5] = ATTR_static_type___MMLocalClass____ancestors(variable[5]) /*MMLocalClass::_ancestors*/;
462 variable[5] = CALL_abstract_collection___Map_____bra(variable[5])(variable[5], variable[3] /*a*/) /*Map::[]*/;
463 variable[4] = variable[5] /*ra=*/;
464 } else { /*if*/
465 variable[5] = CALL_abstractmetamodel___MMLocalClass___global( variable[1] /*c*/)( variable[1] /*c*/) /*MMLocalClass::global*/;
466 variable[6] = variable[0];
467 variable[6] = ATTR_abstractmetamodel___MMLocalClass____global(variable[6]) /*MMLocalClass::_global*/;
468 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::==*/)))));
469 if (UNTAG_Bool(variable[5])) { /*if*/
470 variable[5] = variable[0];
471 variable[6] = NEW_MMRefineAncestor_inheritance___MMRefineAncestor___init(variable[5], variable[1] /*c*/); /*new MMRefineAncestor*/
472 variable[5] = variable[6];
473 variable[4] = variable[5] /*ra=*/;
474 } else { /*if*/
475 variable[5] = variable[0];
476 variable[5] = CALL_static_type___MMLocalClass___get_type(variable[5])(variable[5]) /*MMLocalClass::get_type*/;
477 variable[6] = CALL_static_type___MMLocalClass___get_type( variable[1] /*c*/)( variable[1] /*c*/) /*MMLocalClass::get_type*/;
478 variable[7] = NEW_MMSpecAncestor_inheritance___MMSpecAncestor___init(variable[5], variable[6]); /*new MMSpecAncestor*/
479 variable[5] = variable[7];
480 variable[4] = variable[5] /*ra=*/;
481 }
482 }
483 variable[5] = variable[0];
484 variable[5] = ATTR_static_type___MMLocalClass____ancestors(variable[5]) /*MMLocalClass::_ancestors*/;
485 CALL_abstract_collection___Map_____braeq(variable[5])(variable[5], variable[1] /*c*/, variable[4] /*ra*/) /*Map::[]=*/;
486 variable[2] = variable[4] /*ra*/;
487 goto return_label18;
488 return_label18: while(false);
489 tracehead = trace.prev;
490 return variable[2];
491 }
492 void inheritance___MMLocalClass___add_default_any_class(val_t self, val_t param0) {
493 struct trace_t trace = {NULL, NULL, 203, LOCATE_inheritance___MMLocalClass___add_default_any_class};
494 static val_t once_value_20; static int once_bool_20; /* Once value for variable[5]*/
495 val_t variable[7];
496 void **closurevariable = NULL;
497 trace.prev = tracehead; tracehead = &trace;
498 trace.file = LOCATE_inheritance;
499 variable[0] = self;
500 variable[1] = param0;
501 variable[3] = CALL_abstract_collection___Collection___is_empty( variable[1] /*supers*/)( variable[1] /*supers*/) /*AbstractArray::is_empty*/;
502 variable[4] = variable[3];
503 if (UNTAG_Bool(variable[4])) { /* and */
504 variable[4] = variable[0];
505 variable[4] = CALL_abstractmetamodel___MMLocalClass___name(variable[4])(variable[4]) /*MMLocalClass::name*/;
506 if (once_bool_20) variable[5] = once_value_20;
507 else {
508 variable[5] = NEW_String_string___String___with_native(BOX_NativeString("Object"), TAG_Int(6)); /*new String*/
509 variable[5] = CALL_symbol___String___to_symbol(variable[5])(variable[5]) /*String::to_symbol*/;
510 once_value_20 = variable[5];
511 once_bool_20 = true;
512 }
513 variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[4] == variable[5]) || ((variable[4] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[4])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[4],variable[5])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[4])(variable[4], variable[5]) /*Object::==*/)))))));
514 }
515 variable[3] = variable[4];
516 if (UNTAG_Bool(variable[3])) { /*if*/
517 variable[4] = variable[0];
518 variable[4] = CALL_abstractmetamodel___MMLocalClass___module(variable[4])(variable[4]) /*MMLocalClass::module*/;
519 variable[4] = CALL_inheritance___MMModule___type_any(variable[4])(variable[4]) /*MMModule::type_any*/;
520 variable[3] = variable[4];
521 variable[4] = CALL_static_type___MMType___local_class( variable[3] /*t_any*/)( variable[3] /*t_any*/) /*MMType::local_class*/;
522 CALL_abstract_collection___SimpleCollection___add( variable[1] /*supers*/)( variable[1] /*supers*/, variable[4]) /*AbstractArray::add*/;
523 variable[5] = variable[0];
524 variable[6] = NEW_MMDefaultAncestor_inheritance___MMDefaultAncestor___init(variable[5], variable[3] /*t_any*/); /*new MMDefaultAncestor*/
525 variable[5] = variable[6];
526 variable[4] = variable[5];
527 variable[5] = variable[0];
528 CALL_inheritance___MMLocalClass___add_direct_parent(variable[5])(variable[5], variable[4] /*default*/) /*MMLocalClass::add_direct_parent*/;
529 }
530 return_label19: while(false);
531 tracehead = trace.prev;
532 return;
533 }
534 void inheritance___MMLocalClass___add_super_classes(val_t self, val_t param0) {
535 struct trace_t trace = {NULL, NULL, 214, LOCATE_inheritance___MMLocalClass___add_super_classes};
536 val_t variable[11];
537 void **closurevariable = NULL;
538 trace.prev = tracehead; tracehead = &trace;
539 trace.file = LOCATE_inheritance;
540 variable[0] = self;
541 variable[1] = param0;
542 variable[3] = variable[0];
543 variable[3] = ATTR_abstractmetamodel___MMLocalClass____crhe(variable[3]) /*MMLocalClass::_crhe*/;
544 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::==*/)))))));
545 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, 217); nit_exit(1);}
546 variable[3] = variable[0];
547 variable[3] = ATTR_abstractmetamodel___MMLocalClass____crhe(variable[3]) /*MMLocalClass::_crhe*/;
548 variable[3] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[3])(variable[3]) /*PartialOrderElement::direct_greaters*/;
549 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArray::iterator*/;
550 while (true) { /*for*/
551 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
552 if (!UNTAG_Bool(variable[4])) break; /*for*/
553 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/;
554 variable[5] = variable[4];
555 variable[6] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[5] /*ref*/)( variable[5] /*ref*/) /*MMLocalClass::cshe*/;
556 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::==*/)))))));
557 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, 219); nit_exit(1);}
558 variable[6] = CALL_abstractmetamodel___MMLocalClass___cshe( variable[5] /*ref*/)( variable[5] /*ref*/) /*MMLocalClass::cshe*/;
559 variable[6] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[6])(variable[6]) /*PartialOrderElement::direct_greaters*/;
560 variable[6] = CALL_abstract_collection___Collection___iterator(variable[6])(variable[6]) /*AbstractArray::iterator*/;
561 while (true) { /*for*/
562 variable[7] = CALL_abstract_collection___Iterator___is_ok(variable[6])(variable[6]) /*ArrayIterator::is_ok*/;
563 if (!UNTAG_Bool(variable[7])) break; /*for*/
564 variable[7] = CALL_abstract_collection___Iterator___item(variable[6])(variable[6]) /*ArrayIterator::item*/;
565 variable[8] = variable[7];
566 variable[10] = variable[0];
567 variable[10] = ATTR_abstractmetamodel___MMLocalClass____module(variable[10]) /*MMLocalClass::_module*/;
568 variable[10] = CALL_abstractmetamodel___MMLocalClass___for_module( variable[8] /*sup*/)( variable[8] /*sup*/, variable[10]) /*MMLocalClass::for_module*/;
569 variable[9] = variable[10];
570 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::==*/)))))));
571 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, 222); nit_exit(1);}
572 CALL_abstract_collection___SimpleCollection___add( variable[1] /*supers*/)( variable[1] /*supers*/, variable[9] /*cla*/) /*AbstractArray::add*/;
573 continue_23: while(0);
574 CALL_abstract_collection___Iterator___next(variable[6])(variable[6]) /*ArrayIterator::next*/;
575 }
576 break_23: while(0);
577 continue_22: while(0);
578 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
579 }
580 break_22: while(0);
581 return_label21: while(false);
582 tracehead = trace.prev;
583 return;
584 }
585 void inheritance___MMLocalClass___add_explicit_classes(val_t self, val_t param0) {
586 struct trace_t trace = {NULL, NULL, 228, LOCATE_inheritance___MMLocalClass___add_explicit_classes};
587 val_t variable[7];
588 void **closurevariable = NULL;
589 trace.prev = tracehead; tracehead = &trace;
590 trace.file = LOCATE_inheritance;
591 variable[0] = self;
592 variable[1] = param0;
593 variable[3] = variable[0];
594 variable[3] = ATTR_inheritance___MMLocalClass____direct_parents(variable[3]) /*MMLocalClass::_direct_parents*/;
595 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArray::iterator*/;
596 while (true) { /*for*/
597 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
598 if (!UNTAG_Bool(variable[4])) break; /*for*/
599 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/;
600 variable[5] = variable[4];
601 variable[6] = CALL_static_type___MMAncestor___local_class( variable[5] /*p*/)( variable[5] /*p*/) /*MMAncestor::local_class*/;
602 CALL_abstract_collection___SimpleCollection___add( variable[1] /*supers*/)( variable[1] /*supers*/, variable[6]) /*AbstractArray::add*/;
603 continue_25: while(0);
604 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
605 }
606 break_25: while(0);
607 return_label24: while(false);
608 tracehead = trace.prev;
609 return;
610 }
611 void inheritance___MMLocalClass___compute_super_parents(val_t self, val_t param0) {
612 struct trace_t trace = {NULL, NULL, 236, LOCATE_inheritance___MMLocalClass___compute_super_parents};
613 val_t variable[7];
614 void **closurevariable = NULL;
615 trace.prev = tracehead; tracehead = &trace;
616 trace.file = LOCATE_inheritance;
617 variable[0] = self;
618 variable[1] = param0;
619 variable[3] = CALL_abstract_collection___Collection___iterator( variable[1] /*supers*/)( variable[1] /*supers*/) /*AbstractArray::iterator*/;
620 while (true) { /*for*/
621 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
622 if (!UNTAG_Bool(variable[4])) break; /*for*/
623 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/;
624 variable[5] = variable[4];
625 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::==*/)))))));
626 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, 240); nit_exit(1);}
627 CALL_inheritance___MMLocalClass___compute_super_classes( variable[5] /*p*/)( variable[5] /*p*/) /*MMLocalClass::compute_super_classes*/;
628 continue_27: while(0);
629 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
630 }
631 break_27: while(0);
632 return_label26: while(false);
633 tracehead = trace.prev;
634 return;
635 }
636 val_t inheritance___MMLocalClass___build_ancestors(val_t self) {
637 struct trace_t trace = {NULL, NULL, 245, LOCATE_inheritance___MMLocalClass___build_ancestors};
638 val_t variable[9];
639 void **closurevariable = NULL;
640 trace.prev = tracehead; tracehead = &trace;
641 trace.file = LOCATE_inheritance;
642 variable[0] = self;
643 variable[3] = NEW_Array_array___Array___init(); /*new Array[MMAncestor]*/
644 variable[2] = variable[3];
645 variable[3] = variable[0];
646 variable[3] = ATTR_abstractmetamodel___MMLocalClass____crhe(variable[3]) /*MMLocalClass::_crhe*/;
647 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::==*/)))))));
648 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___build_ancestors, LOCATE_inheritance, 250); nit_exit(1);}
649 variable[3] = variable[0];
650 variable[3] = ATTR_abstractmetamodel___MMLocalClass____crhe(variable[3]) /*MMLocalClass::_crhe*/;
651 variable[3] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[3])(variable[3]) /*PartialOrderElement::direct_greaters*/;
652 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArray::iterator*/;
653 while (true) { /*for*/
654 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
655 if (!UNTAG_Bool(variable[4])) break; /*for*/
656 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/;
657 variable[5] = variable[4];
658 variable[6] = variable[0];
659 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[5] /*p*/ == variable[6]) || (( variable[5] /*p*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[5] /*p*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[5] /*p*/,variable[6])):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*p*/)( variable[5] /*p*/, variable[6]) /*Object::==*/)))))));
660 if (!UNTAG_Bool(variable[6])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___build_ancestors, LOCATE_inheritance, 252); nit_exit(1);}
661 variable[7] = variable[0];
662 variable[8] = NEW_MMRefineAncestor_inheritance___MMRefineAncestor___init(variable[7], variable[5] /*p*/); /*new MMRefineAncestor*/
663 variable[7] = variable[8];
664 variable[6] = variable[7];
665 CALL_inheritance___MMAncestor___add_in( variable[6] /*anc*/)( variable[6] /*anc*/, variable[2] /*all_ancestors*/) /*MMAncestor::add_in*/;
666 continue_29: while(0);
667 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
668 }
669 break_29: while(0);
670 variable[3] = variable[0];
671 variable[3] = ATTR_inheritance___MMLocalClass____direct_parents(variable[3]) /*MMLocalClass::_direct_parents*/;
672 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArray::iterator*/;
673 while (true) { /*for*/
674 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
675 if (!UNTAG_Bool(variable[4])) break; /*for*/
676 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/;
677 variable[5] = variable[4];
678 variable[6] = CALL_static_type___MMAncestor___local_class( variable[5] /*anc*/)( variable[5] /*anc*/) /*MMAncestor::local_class*/;
679 variable[7] = variable[0];
680 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[6] == variable[7]) || ((variable[6] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[6])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[6],variable[7])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[6])(variable[6], variable[7]) /*Object::==*/)))))));
681 if (!UNTAG_Bool(variable[6])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___build_ancestors, LOCATE_inheritance, 257); nit_exit(1);}
682 CALL_inheritance___MMAncestor___add_in( variable[5] /*anc*/)( variable[5] /*anc*/, variable[2] /*all_ancestors*/) /*MMAncestor::add_in*/;
683 continue_30: while(0);
684 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
685 }
686 break_30: while(0);
687 variable[1] = variable[2] /*all_ancestors*/;
688 goto return_label28;
689 return_label28: while(false);
690 tracehead = trace.prev;
691 return variable[1];
692 }
693 val_t inheritance___MMLocalClass___group_ancestors(val_t self, val_t param0) {
694 struct trace_t trace = {NULL, NULL, 263, LOCATE_inheritance___MMLocalClass___group_ancestors};
695 val_t variable[10];
696 void **closurevariable = NULL;
697 trace.prev = tracehead; tracehead = &trace;
698 trace.file = LOCATE_inheritance;
699 variable[0] = self;
700 variable[1] = param0;
701 variable[4] = NEW_HashMap_hash___HashMap___init(); /*new HashMap[MMLocalClass, Set[MMAncestor]]*/
702 variable[3] = variable[4];
703 variable[4] = CALL_abstract_collection___Collection___iterator( variable[1] /*all*/)( variable[1] /*all*/) /*AbstractArray::iterator*/;
704 while (true) { /*for*/
705 variable[5] = CALL_abstract_collection___Iterator___is_ok(variable[4])(variable[4]) /*ArrayIterator::is_ok*/;
706 if (!UNTAG_Bool(variable[5])) break; /*for*/
707 variable[5] = CALL_abstract_collection___Iterator___item(variable[4])(variable[4]) /*ArrayIterator::item*/;
708 variable[6] = variable[5];
709 variable[8] = CALL_static_type___MMAncestor___local_class( variable[6] /*a*/)( variable[6] /*a*/) /*MMAncestor::local_class*/;
710 variable[7] = variable[8];
711 /*variable[8] is variable set*/
712 CALL_inheritance___MMLocalClass___compute_ancestors( variable[7] /*c*/)( variable[7] /*c*/) /*MMLocalClass::compute_ancestors*/;
713 variable[9] = CALL_abstract_collection___Map___has_key( variable[3] /*map*/)( variable[3] /*map*/, variable[7] /*c*/) /*CoupleMap::has_key*/;
714 if (UNTAG_Bool(variable[9])) { /*if*/
715 variable[9] = CALL_abstract_collection___Map_____bra( variable[3] /*map*/)( variable[3] /*map*/, variable[7] /*c*/) /*CoupleMap::[]*/;
716 variable[8] = variable[9] /*set=*/;
717 } else { /*if*/
718 variable[9] = NEW_HashSet_hash___HashSet___init(); /*new HashSet[MMAncestor]*/
719 variable[8] = variable[9] /*set=*/;
720 CALL_abstract_collection___Map_____braeq( variable[3] /*map*/)( variable[3] /*map*/, variable[7] /*c*/, variable[8] /*set*/) /*HashMap::[]=*/;
721 }
722 CALL_abstract_collection___SimpleCollection___add( variable[8] /*set*/)( variable[8] /*set*/, variable[6] /*a*/) /*SimpleCollection::add*/;
723 continue_32: while(0);
724 CALL_abstract_collection___Iterator___next(variable[4])(variable[4]) /*ArrayIterator::next*/;
725 }
726 break_32: while(0);
727 variable[2] = variable[3] /*map*/;
728 goto return_label31;
729 return_label31: while(false);
730 tracehead = trace.prev;
731 return variable[2];
732 }
733 val_t inheritance___MMLocalClass___merge_ancestors(val_t self, val_t param0) {
734 struct trace_t trace = {NULL, NULL, 285, LOCATE_inheritance___MMLocalClass___merge_ancestors};
735 val_t variable[17];
736 void **closurevariable = NULL;
737 trace.prev = tracehead; tracehead = &trace;
738 trace.file = LOCATE_inheritance;
739 variable[0] = self;
740 variable[1] = param0;
741 variable[4] = NEW_HashSet_hash___HashSet___init(); /*new HashSet[MMAncestor]*/
742 variable[3] = variable[4];
743 variable[5] = NEW_Array_array___Array___init(); /*new Array[MMAncestor]*/
744 variable[4] = variable[5];
745 variable[5] = CALL_abstract_collection___Collection___iterator( variable[1] /*set*/)( variable[1] /*set*/) /*Collection::iterator*/;
746 while (true) { /*for*/
747 variable[6] = CALL_abstract_collection___Iterator___is_ok(variable[5])(variable[5]) /*Iterator::is_ok*/;
748 if (!UNTAG_Bool(variable[6])) break; /*for*/
749 variable[6] = CALL_abstract_collection___Iterator___item(variable[5])(variable[5]) /*Iterator::item*/;
750 variable[7] = variable[6];
751 variable[9] = CALL_abstract_collection___Collection___iterator( variable[1] /*set*/)( variable[1] /*set*/) /*Collection::iterator*/;
752 variable[8] = variable[9];
753 variable[9] = TAG_Bool(true);
754 while (true) { /*while*/
755 variable[10] = CALL_abstract_collection___Iterator___is_ok( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::is_ok*/;
756 variable[11] = variable[10];
757 if (UNTAG_Bool(variable[11])) { /* and */
758 variable[11] = variable[9] /*search*/;
759 }
760 variable[10] = variable[11];
761 if (!UNTAG_Bool(variable[10])) break; /* while*/
762 variable[11] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::item*/;
763 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::==*/)))));
764 variable[10] = variable[11];
765 variable[11] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::item*/;
766 variable[11] = CALL_abstract_collection___Collection___has( variable[3] /*marks*/)( variable[3] /*marks*/, variable[11]) /*HashSet::has*/;
767 variable[10] = variable[11] /*a=*/;
768 variable[11] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::item*/;
769 variable[11] = CALL_static_type___MMAncestor___stype(variable[11])(variable[11]) /*MMAncestor::stype*/;
770 variable[12] = CALL_static_type___MMAncestor___stype( variable[7] /*t*/)( variable[7] /*t*/) /*MMAncestor::stype*/;
771 variable[11] = CALL_static_type___MMType_____l(variable[11])(variable[11], variable[12]) /*MMType::<*/;
772 variable[10] = variable[11] /*a=*/;
773 variable[11] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::item*/;
774 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::==*/)))));
775 variable[12] = variable[11];
776 if (!UNTAG_Bool(variable[12])) { /* or */
777 variable[12] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::item*/;
778 variable[12] = CALL_abstract_collection___Collection___has( variable[3] /*marks*/)( variable[3] /*marks*/, variable[12]) /*HashSet::has*/;
779 }
780 variable[11] = variable[12];
781 variable[11] = TAG_Bool(!UNTAG_Bool(variable[11]));
782 if (UNTAG_Bool(variable[11])) { /* and */
783 variable[11] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::item*/;
784 variable[11] = CALL_static_type___MMAncestor___stype(variable[11])(variable[11]) /*MMAncestor::stype*/;
785 variable[12] = CALL_static_type___MMAncestor___stype( variable[7] /*t*/)( variable[7] /*t*/) /*MMAncestor::stype*/;
786 variable[11] = CALL_static_type___MMType_____l(variable[11])(variable[11], variable[12]) /*MMType::<*/;
787 }
788 if (UNTAG_Bool(variable[11])) { /*if*/
789 CALL_abstract_collection___SimpleCollection___add( variable[3] /*marks*/)( variable[3] /*marks*/, variable[7] /*t*/) /*HashSet::add*/;
790 variable[9] = TAG_Bool(false) /*search=*/;
791 }
792 CALL_abstract_collection___Iterator___next( variable[8] /*it*/)( variable[8] /*it*/) /*Iterator::next*/;
793 continue_35: while(0);
794 }
795 break_35: while(0);
796 variable[10] = CALL_abstract_collection___Collection___has( variable[3] /*marks*/)( variable[3] /*marks*/, variable[7] /*t*/) /*HashSet::has*/;
797 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[10])))) { /*if*/
798 CALL_abstract_collection___SimpleCollection___add( variable[4] /*res*/)( variable[4] /*res*/, variable[7] /*t*/) /*AbstractArray::add*/;
799 }
800 continue_34: while(0);
801 CALL_abstract_collection___Iterator___next(variable[5])(variable[5]) /*Iterator::next*/;
802 }
803 break_34: while(0);
804 variable[5] = CALL_abstract_collection___Collection___length( variable[4] /*res*/)( variable[4] /*res*/) /*AbstractArray::length*/;
805 variable[5] = TAG_Bool(UNTAG_Int(variable[5])>UNTAG_Int( TAG_Int(1)));
806 if (UNTAG_Bool(variable[5])) { /*if*/
807 variable[5] = variable[0];
808 variable[5] = CALL_file___Object___stderr(variable[5])(variable[5]) /*Object::stderr*/;
809 variable[6] = NEW_Array_array___Array___with_capacity(TAG_Int(5)); /*new Array[String]*/
810 variable[7] = NEW_String_string___String___with_native(BOX_NativeString("Fatal error: Incompatibles ancestors for "), TAG_Int(41)); /*new String*/
811 variable[8] = variable[7];
812 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[8]) /*AbstractArray::add*/;
813 variable[9] = variable[0];
814 variable[9] = CALL_abstractmetamodel___MMLocalClass___name(variable[9])(variable[9]) /*MMLocalClass::name*/;
815 variable[10] = variable[9];
816 variable[10] = CALL_string___Object___to_s(variable[10])(variable[10]) /*Object::to_s*/;
817 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[10]) /*AbstractArray::add*/;
818 variable[11] = NEW_String_string___String___with_native(BOX_NativeString(": "), TAG_Int(2)); /*new String*/
819 variable[12] = variable[11];
820 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[12]) /*AbstractArray::add*/;
821 variable[13] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)); /*new String*/
822 variable[13] = CALL_string___Collection___join( variable[4] /*res*/)( variable[4] /*res*/, variable[13]) /*Collection::join*/;
823 variable[14] = variable[13];
824 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[14]) /*AbstractArray::add*/;
825 variable[15] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
826 variable[16] = variable[15];
827 CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[16]) /*AbstractArray::add*/;
828 variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
829 CALL_stream___OStream___write(variable[5])(variable[5], variable[6]) /*OFStream::write*/;
830 variable[5] = variable[0];
831 exit(UNTAG_Int( TAG_Int(1)));
832 }
833 variable[5] = CALL_abstract_collection___Collection___first( variable[4] /*res*/)( variable[4] /*res*/) /*IndexedCollection::first*/;
834 variable[2] = variable[5];
835 goto return_label33;
836 return_label33: while(false);
837 tracehead = trace.prev;
838 return variable[2];
839 }
840 val_t inheritance___MMLocalClass___inherit_local_property(val_t self, val_t param0) {
841 struct trace_t trace = {NULL, NULL, 318, LOCATE_inheritance___MMLocalClass___inherit_local_property};
842 val_t variable[24];
843 void **closurevariable = NULL;
844 trace.prev = tracehead; tracehead = &trace;
845 trace.file = LOCATE_inheritance;
846 variable[0] = self;
847 variable[1] = param0;
848 variable[3] = variable[0];
849 variable[3] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(variable[3]) /*MMLocalClass::_local_property_by_global*/;
850 variable[3] = CALL_abstract_collection___Map___has_key(variable[3])(variable[3], variable[1] /*glob*/) /*Map::has_key*/;
851 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, 323); nit_exit(1);}
852 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::==*/)))))));
853 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, 324); nit_exit(1);}
854 /*variable[3] is variable impl*/
855 variable[5] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy( variable[1] /*glob*/)( variable[1] /*glob*/) /*MMGlobalProperty::property_hierarchy*/;
856 variable[4] = variable[5];
857 variable[6] = variable[0];
858 variable[6] = CALL_abstractmetamodel___MMLocalClass___che(variable[6])(variable[6]) /*MMLocalClass::che*/;
859 variable[6] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[6])(variable[6]) /*PartialOrderElement::direct_greaters*/;
860 variable[5] = variable[6];
861 variable[6] = CALL_abstract_collection___Collection___length( variable[4] /*ghier*/)( variable[4] /*ghier*/) /*PartialOrder::length*/;
862 variable[6] = TAG_Bool((variable[6])==( TAG_Int(1)));
863 if (UNTAG_Bool(variable[6])) { /*if*/
864 variable[6] = CALL_abstractmetamodel___MMGlobalProperty___intro( variable[1] /*glob*/)( variable[1] /*glob*/) /*MMGlobalProperty::intro*/;
865 variable[3] = variable[6] /*impl=*/;
866 } else { /*if*/
867 variable[6] = CALL_abstract_collection___Collection___length( variable[5] /*supers*/)( variable[5] /*supers*/) /*AbstractArray::length*/;
868 variable[6] = TAG_Bool((variable[6])==( TAG_Int(1)));
869 if (UNTAG_Bool(variable[6])) { /*if*/
870 variable[6] = CALL_abstract_collection___Collection___first( variable[5] /*supers*/)( variable[5] /*supers*/) /*IndexedCollection::first*/;
871 variable[6] = CALL_abstractmetamodel___MMLocalClass_____bra(variable[6])(variable[6], variable[1] /*glob*/) /*MMLocalClass::[]*/;
872 variable[3] = variable[6] /*impl=*/;
873 } else { /*if*/
874 variable[7] = NEW_ArraySet_array___ArraySet___init(); /*new ArraySet[MMLocalProperty]*/
875 variable[6] = variable[7];
876 variable[7] = CALL_abstract_collection___Collection___iterator( variable[5] /*supers*/)( variable[5] /*supers*/) /*AbstractArray::iterator*/;
877 while (true) { /*for*/
878 variable[8] = CALL_abstract_collection___Iterator___is_ok(variable[7])(variable[7]) /*ArrayIterator::is_ok*/;
879 if (!UNTAG_Bool(variable[8])) break; /*for*/
880 variable[8] = CALL_abstract_collection___Iterator___item(variable[7])(variable[7]) /*ArrayIterator::item*/;
881 variable[9] = variable[8];
882 variable[11] = CALL_abstractmetamodel___MMLocalClass_____bra( variable[9] /*sc*/)( variable[9] /*sc*/, variable[1] /*glob*/) /*MMLocalClass::[]*/;
883 variable[10] = variable[11];
884 variable[11] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[10] /*p*/ == NIT_NULL /*null*/) || (( variable[10] /*p*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[10] /*p*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[10] /*p*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[10] /*p*/)( variable[10] /*p*/, NIT_NULL /*null*/) /*Object::==*/)))))));
885 if (UNTAG_Bool(variable[11])) { /*if*/
886 CALL_abstract_collection___SimpleCollection___add( variable[6] /*impls*/)( variable[6] /*impls*/, variable[10] /*p*/) /*ArraySet::add*/;
887 }
888 continue_37: while(0);
889 CALL_abstract_collection___Iterator___next(variable[7])(variable[7]) /*ArrayIterator::next*/;
890 }
891 break_37: while(0);
892 variable[8] = CALL_partial_order___PartialOrder___select_smallests( variable[4] /*ghier*/)( variable[4] /*ghier*/, variable[6] /*impls*/) /*PartialOrder::select_smallests*/;
893 variable[7] = variable[8];
894 variable[8] = CALL_abstract_collection___Collection___length( variable[7] /*impls2*/)( variable[7] /*impls2*/) /*AbstractArray::length*/;
895 variable[8] = TAG_Bool((variable[8])!=( TAG_Int(1)));
896 if (UNTAG_Bool(variable[8])) { /*if*/
897 variable[8] = variable[0];
898 variable[8] = CALL_file___Object___stderr(variable[8])(variable[8]) /*Object::stderr*/;
899 variable[9] = NEW_String_string___String___with_native(BOX_NativeString("Fatal error: inherit_local_property error\n"), TAG_Int(42)); /*new String*/
900 CALL_stream___OStream___write(variable[8])(variable[8], variable[9]) /*OFStream::write*/;
901 variable[8] = variable[0];
902 variable[9] = NEW_Array_array___Array___with_capacity(TAG_Int(7)); /*new Array[String]*/
903 variable[10] = NEW_String_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)); /*new String*/
904 variable[11] = variable[10];
905 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[11]) /*AbstractArray::add*/;
906 variable[12] = variable[0];
907 variable[12] = CALL_abstractmetamodel___MMLocalClass___module(variable[12])(variable[12]) /*MMLocalClass::module*/;
908 variable[13] = variable[12];
909 variable[13] = CALL_string___Object___to_s(variable[13])(variable[13]) /*Object::to_s*/;
910 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[13]) /*AbstractArray::add*/;
911 variable[14] = NEW_String_string___String___with_native(BOX_NativeString("::"), TAG_Int(2)); /*new String*/
912 variable[15] = variable[14];
913 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[15]) /*AbstractArray::add*/;
914 variable[16] = variable[0];
915 variable[17] = variable[16];
916 variable[17] = CALL_string___Object___to_s(variable[17])(variable[17]) /*Object::to_s*/;
917 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[17]) /*AbstractArray::add*/;
918 variable[18] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)); /*new String*/
919 variable[19] = variable[18];
920 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[19]) /*AbstractArray::add*/;
921 variable[20] = CALL_abstractmetamodel___MMGlobalProperty___intro( variable[1] /*glob*/)( variable[1] /*glob*/) /*MMGlobalProperty::intro*/;
922 variable[20] = CALL_abstractmetamodel___MMLocalProperty___full_name(variable[20])(variable[20]) /*MMLocalProperty::full_name*/;
923 variable[21] = variable[20];
924 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[21]) /*AbstractArray::add*/;
925 variable[22] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
926 variable[23] = variable[22];
927 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[23]) /*AbstractArray::add*/;
928 variable[9] = CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/;
929 CALL_file___Object___print(variable[8])(variable[8], variable[9]) /*Object::print*/;
930 variable[8] = CALL_abstract_collection___Collection___iterator( variable[7] /*impls2*/)( variable[7] /*impls2*/) /*AbstractArray::iterator*/;
931 while (true) { /*for*/
932 variable[9] = CALL_abstract_collection___Iterator___is_ok(variable[8])(variable[8]) /*ArrayIterator::is_ok*/;
933 if (!UNTAG_Bool(variable[9])) break; /*for*/
934 variable[9] = CALL_abstract_collection___Iterator___item(variable[8])(variable[8]) /*ArrayIterator::item*/;
935 variable[10] = variable[9];
936 variable[11] = variable[0];
937 variable[12] = NEW_Array_array___Array___with_capacity(TAG_Int(3)); /*new Array[String]*/
938 variable[13] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(3)); /*new String*/
939 variable[14] = variable[13];
940 CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[14]) /*AbstractArray::add*/;
941 variable[15] = CALL_abstractmetamodel___MMLocalProperty___full_name( variable[10] /*i*/)( variable[10] /*i*/) /*MMLocalProperty::full_name*/;
942 variable[16] = variable[15];
943 CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[16]) /*AbstractArray::add*/;
944 variable[17] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
945 variable[18] = variable[17];
946 CALL_abstract_collection___SimpleCollection___add(variable[12])(variable[12], variable[18]) /*AbstractArray::add*/;
947 variable[12] = CALL_string___Object___to_s(variable[12])(variable[12]) /*Object::to_s*/;
948 CALL_file___Object___print(variable[11])(variable[11], variable[12]) /*Object::print*/;
949 continue_38: while(0);
950 CALL_abstract_collection___Iterator___next(variable[8])(variable[8]) /*ArrayIterator::next*/;
951 }
952 break_38: while(0);
953 variable[8] = variable[0];
954 variable[9] = NEW_Array_array___Array___with_capacity(TAG_Int(3)); /*new Array[String]*/
955 variable[10] = NEW_String_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)); /*new String*/
956 variable[11] = variable[10];
957 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[11]) /*AbstractArray::add*/;
958 variable[12] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy( variable[1] /*glob*/)( variable[1] /*glob*/) /*MMGlobalProperty::property_hierarchy*/;
959 variable[12] = CALL_abstract_collection___Collection___first(variable[12])(variable[12]) /*PartialOrder::first*/;
960 variable[13] = variable[12];
961 variable[13] = CALL_string___Object___to_s(variable[13])(variable[13]) /*Object::to_s*/;
962 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[13]) /*AbstractArray::add*/;
963 variable[14] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
964 variable[15] = variable[14];
965 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[15]) /*AbstractArray::add*/;
966 variable[9] = CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/;
967 CALL_file___Object___print(variable[8])(variable[8], variable[9]) /*Object::print*/;
968 variable[8] = variable[0];
969 variable[9] = NEW_Array_array___Array___with_capacity(TAG_Int(3)); /*new Array[String]*/
970 variable[10] = NEW_String_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)); /*new String*/
971 variable[11] = variable[10];
972 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[11]) /*AbstractArray::add*/;
973 variable[12] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy( variable[1] /*glob*/)( variable[1] /*glob*/) /*MMGlobalProperty::property_hierarchy*/;
974 variable[12] = CALL_partial_order___PartialOrder___to_dot(variable[12])(variable[12]) /*PartialOrder::to_dot*/;
975 variable[13] = variable[12];
976 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[13]) /*AbstractArray::add*/;
977 variable[14] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
978 variable[15] = variable[14];
979 CALL_abstract_collection___SimpleCollection___add(variable[9])(variable[9], variable[15]) /*AbstractArray::add*/;
980 variable[9] = CALL_string___Object___to_s(variable[9])(variable[9]) /*Object::to_s*/;
981 CALL_file___Object___print(variable[8])(variable[8], variable[9]) /*Object::print*/;
982 variable[8] = variable[0];
983 exit(UNTAG_Int( TAG_Int(1)));
984 }
985 variable[8] = CALL_abstract_collection___Collection___first( variable[7] /*impls2*/)( variable[7] /*impls2*/) /*IndexedCollection::first*/;
986 variable[3] = variable[8] /*impl=*/;
987 }
988 }
989 variable[6] = variable[0];
990 variable[6] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(variable[6]) /*MMLocalClass::_local_property_by_global*/;
991 CALL_abstract_collection___Map_____braeq(variable[6])(variable[6], variable[1] /*glob*/, variable[3] /*impl*/) /*Map::[]=*/;
992 variable[2] = variable[3] /*impl*/;
993 goto return_label36;
994 return_label36: while(false);
995 tracehead = trace.prev;
996 return variable[2];
997 }
998 void inheritance___MMLocalProperty___inherit_global(val_t self, val_t param0) {
999 struct trace_t trace = {NULL, NULL, 374, LOCATE_inheritance___MMLocalProperty___inherit_global};
1000 val_t variable[9];
1001 void **closurevariable = NULL;
1002 trace.prev = tracehead; tracehead = &trace;
1003 trace.file = LOCATE_inheritance;
1004 variable[0] = self;
1005 variable[1] = param0;
1006 variable[3] = variable[0];
1007 CALL_abstractmetamodel___MMLocalProperty___set_global(variable[3])(variable[3], variable[1] /*g*/) /*MMLocalProperty::set_global*/;
1008 variable[4] = NEW_Array_array___Array___init(); /*new Array[MMLocalProperty]*/
1009 variable[3] = variable[4];
1010 variable[4] = variable[0];
1011 variable[4] = CALL_abstractmetamodel___MMLocalProperty___local_class(variable[4])(variable[4]) /*MMLocalProperty::local_class*/;
1012 variable[4] = CALL_abstractmetamodel___MMLocalClass___che(variable[4])(variable[4]) /*MMLocalClass::che*/;
1013 variable[4] = CALL_partial_order___PartialOrderElement___direct_greaters(variable[4])(variable[4]) /*PartialOrderElement::direct_greaters*/;
1014 variable[4] = CALL_abstract_collection___Collection___iterator(variable[4])(variable[4]) /*AbstractArray::iterator*/;
1015 while (true) { /*for*/
1016 variable[5] = CALL_abstract_collection___Iterator___is_ok(variable[4])(variable[4]) /*ArrayIterator::is_ok*/;
1017 if (!UNTAG_Bool(variable[5])) break; /*for*/
1018 variable[5] = CALL_abstract_collection___Iterator___item(variable[4])(variable[4]) /*ArrayIterator::item*/;
1019 variable[6] = variable[5];
1020 variable[8] = CALL_abstractmetamodel___MMLocalClass_____bra( variable[6] /*sc*/)( variable[6] /*sc*/, variable[1] /*g*/) /*MMLocalClass::[]*/;
1021 variable[7] = variable[8];
1022 variable[8] = TAG_Bool(( variable[7] /*p*/ == NIT_NULL /*null*/) || (( variable[7] /*p*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[7] /*p*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[7] /*p*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[7] /*p*/)( variable[7] /*p*/, NIT_NULL /*null*/) /*Object::==*/)))));
1023 if (UNTAG_Bool(variable[8])) { /*if*/
1024 goto continue_40;
1025 }
1026 CALL_abstract_collection___SimpleCollection___add( variable[3] /*impls*/)( variable[3] /*impls*/, variable[7] /*p*/) /*AbstractArray::add*/;
1027 continue_40: while(0);
1028 CALL_abstract_collection___Iterator___next(variable[4])(variable[4]) /*ArrayIterator::next*/;
1029 }
1030 break_40: while(0);
1031 variable[4] = variable[0];
1032 CALL_abstractmetamodel___MMGlobalProperty___add_local_property( variable[1] /*g*/)( variable[1] /*g*/, variable[4], variable[3] /*impls*/) /*MMGlobalProperty::add_local_property*/;
1033 return_label39: while(false);
1034 tracehead = trace.prev;
1035 return;
1036 }
1037 void inheritance___MMAncestor___add_in(val_t self, val_t param0) {
1038 struct trace_t trace = {NULL, NULL, 389, LOCATE_inheritance___MMAncestor___add_in};
1039 val_t variable[12];
1040 void **closurevariable = NULL;
1041 trace.prev = tracehead; tracehead = &trace;
1042 trace.file = LOCATE_inheritance;
1043 variable[0] = self;
1044 variable[1] = param0;
1045 variable[3] = variable[0];
1046 variable[3] = CALL_static_type___MMAncestor___stype(variable[3])(variable[3]) /*MMAncestor::stype*/;
1047 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::==*/)))))));
1048 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);}
1049 variable[3] = variable[0];
1050 variable[3] = CALL_static_type___MMAncestor___stype(variable[3])(variable[3]) /*MMAncestor::stype*/;
1051 variable[3] = CALL_static_type___MMType___local_class(variable[3])(variable[3]) /*MMType::local_class*/;
1052 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::==*/)))))));
1053 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);}
1054 variable[3] = variable[0];
1055 CALL_abstract_collection___SimpleCollection___add( variable[1] /*tab*/)( variable[1] /*tab*/, variable[3]) /*AbstractArray::add*/;
1056 variable[3] = variable[0];
1057 variable[3] = CALL_static_type___MMAncestor___stype(variable[3])(variable[3]) /*MMAncestor::stype*/;
1058 variable[3] = CALL_static_type___MMType___local_class(variable[3])(variable[3]) /*MMType::local_class*/;
1059 CALL_inheritance___MMLocalClass___compute_ancestors(variable[3])(variable[3]) /*MMLocalClass::compute_ancestors*/;
1060 variable[3] = variable[0];
1061 variable[3] = CALL_static_type___MMAncestor___stype(variable[3])(variable[3]) /*MMAncestor::stype*/;
1062 variable[3] = CALL_static_type___MMType___local_class(variable[3])(variable[3]) /*MMType::local_class*/;
1063 variable[3] = CALL_static_type___MMLocalClass___ancestors(variable[3])(variable[3]) /*MMLocalClass::ancestors*/;
1064 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*Map::iterator*/;
1065 while (true) { /*for*/
1066 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*Iterator::is_ok*/;
1067 if (!UNTAG_Bool(variable[4])) break; /*for*/
1068 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*Iterator::item*/;
1069 variable[5] = variable[4];
1070 variable[7] = CALL_static_type___MMAncestor___stype( variable[5] /*anc*/)( variable[5] /*anc*/) /*MMAncestor::stype*/;
1071 variable[8] = variable[0];
1072 variable[8] = CALL_static_type___MMAncestor___stype(variable[8])(variable[8]) /*MMAncestor::stype*/;
1073 variable[8] = CALL_static_type___MMType___module(variable[8])(variable[8]) /*MMType::module*/;
1074 variable[7] = CALL_static_type___MMType___for_module(variable[7])(variable[7], variable[8]) /*MMType::for_module*/;
1075 variable[6] = variable[7];
1076 variable[8] = variable[0];
1077 variable[8] = CALL_static_type___MMAncestor___stype(variable[8])(variable[8]) /*MMAncestor::stype*/;
1078 variable[8] = CALL_static_type___MMType___adapt_to( variable[6] /*aaa*/)( variable[6] /*aaa*/, variable[8]) /*MMType::adapt_to*/;
1079 variable[9] = variable[0];
1080 variable[9] = CALL_static_type___MMAncestor___inheriter(variable[9])(variable[9]) /*MMAncestor::inheriter*/;
1081 variable[9] = CALL_static_type___MMType___module(variable[9])(variable[9]) /*MMType::module*/;
1082 variable[8] = CALL_static_type___MMType___for_module(variable[8])(variable[8], variable[9]) /*MMType::for_module*/;
1083 variable[7] = variable[8];
1084 variable[8] = CALL_static_type___MMType___local_class( variable[7] /*a*/)( variable[7] /*a*/) /*MMType::local_class*/;
1085 variable[9] = variable[0];
1086 variable[9] = CALL_static_type___MMAncestor___inheriter(variable[9])(variable[9]) /*MMAncestor::inheriter*/;
1087 variable[9] = CALL_static_type___MMType___local_class(variable[9])(variable[9]) /*MMType::local_class*/;
1088 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::==*/)))))));
1089 if (UNTAG_Bool(variable[8])) { /*if*/
1090 variable[9] = CALL_abstract_collection___Collection___iterator( variable[1] /*tab*/)( variable[1] /*tab*/) /*AbstractArray::iterator*/;
1091 variable[8] = variable[9];
1092 variable[9] = TAG_Bool(true);
1093 while (true) { /*while*/
1094 variable[10] = CALL_abstract_collection___Iterator___is_ok( variable[8] /*it*/)( variable[8] /*it*/) /*ArrayIterator::is_ok*/;
1095 variable[11] = variable[10];
1096 if (UNTAG_Bool(variable[11])) { /* and */
1097 variable[11] = variable[9] /*b*/;
1098 }
1099 variable[10] = variable[11];
1100 if (!UNTAG_Bool(variable[10])) break; /* while*/
1101 variable[10] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*ArrayIterator::item*/;
1102 variable[10] = CALL_static_type___MMAncestor___inheriter(variable[10])(variable[10]) /*MMAncestor::inheriter*/;
1103 variable[11] = variable[0];
1104 variable[11] = CALL_static_type___MMAncestor___inheriter(variable[11])(variable[11]) /*MMAncestor::inheriter*/;
1105 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::==*/)))));
1106 variable[11] = variable[10];
1107 if (UNTAG_Bool(variable[11])) { /* and */
1108 variable[11] = CALL_abstract_collection___Iterator___item( variable[8] /*it*/)( variable[8] /*it*/) /*ArrayIterator::item*/;
1109 variable[11] = CALL_static_type___MMAncestor___stype(variable[11])(variable[11]) /*MMAncestor::stype*/;
1110 variable[11] = TAG_Bool((variable[11] == variable[7] /*a*/) || ((variable[11] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[11])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[11], variable[7] /*a*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[11])(variable[11], variable[7] /*a*/) /*Object::==*/)))));
1111 }
1112 variable[10] = variable[11];
1113 variable[9] = TAG_Bool(!UNTAG_Bool(variable[10])) /*b=*/;
1114 CALL_abstract_collection___Iterator___next( variable[8] /*it*/)( variable[8] /*it*/) /*ArrayIterator::next*/;
1115 continue_43: while(0);
1116 }
1117 break_43: while(0);
1118 if (UNTAG_Bool( variable[9] /*b*/)) { /*if*/
1119 variable[10] = variable[0];
1120 variable[10] = CALL_static_type___MMAncestor___inheriter(variable[10])(variable[10]) /*MMAncestor::inheriter*/;
1121 variable[11] = NEW_MMSpecAncestor_inheritance___MMSpecAncestor___init(variable[10], variable[7] /*a*/); /*new MMSpecAncestor*/
1122 variable[10] = variable[11];
1123 CALL_abstract_collection___SimpleCollection___add( variable[1] /*tab*/)( variable[1] /*tab*/, variable[10]) /*AbstractArray::add*/;
1124 }
1125 }
1126 continue_42: while(0);
1127 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
1128 }
1129 break_42: while(0);
1130 return_label41: while(false);
1131 tracehead = trace.prev;
1132 return;
1133 }
1134 void inheritance___MMImplicitLocalClass___init(val_t self, val_t param0, val_t param1, int* init_table) {
1135 struct trace_t trace = {NULL, NULL, 419, LOCATE_inheritance___MMImplicitLocalClass___init};
1136 val_t variable[7];
1137 void **closurevariable = NULL;
1138 trace.prev = tracehead; tracehead = &trace;
1139 trace.file = LOCATE_inheritance;
1140 variable[0] = self;
1141 variable[1] = param0;
1142 variable[2] = param1;
1143 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMImplicitLocalClass].i]) return;
1144 variable[5] = CALL_abstractmetamodel___MMGlobalClass___intro( variable[2] /*g*/)( variable[2] /*g*/) /*MMGlobalClass::intro*/;
1145 variable[4] = variable[5];
1146 variable[5] = CALL_abstractmetamodel___MMLocalClass___name( variable[4] /*cla*/)( variable[4] /*cla*/) /*MMLocalClass::name*/;
1147 variable[6] = CALL_abstractmetamodel___MMLocalClass___arity( variable[4] /*cla*/)( variable[4] /*cla*/) /*MMLocalClass::arity*/;
1148 CALL_abstractmetamodel___MMLocalClass___init(variable[0])(variable[0], variable[5], variable[6], init_table /*YYY*/) /*MMLocalClass::init*/;
1149 variable[5] = variable[0];
1150 CALL_abstractmetamodel___MMModule___add_local_class( variable[1] /*mod*/)( variable[1] /*mod*/, variable[5]) /*MMModule::add_local_class*/;
1151 variable[5] = variable[0];
1152 CALL_abstractmetamodel___MMLocalClass___set_global(variable[5])(variable[5], variable[2] /*g*/) /*MMLocalClass::set_global*/;
1153 return_label44: while(false);
1154 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMImplicitLocalClass].i] = 1;
1155 tracehead = trace.prev;
1156 return;
1157 }
1158 val_t inheritance___MMRefineAncestor___local_class(val_t self) {
1159 struct trace_t trace = {NULL, NULL, 430, LOCATE_inheritance___MMRefineAncestor___local_class};
1160 val_t *variable = NULL;
1161 void **closurevariable = NULL;
1162 trace.prev = tracehead; tracehead = &trace;
1163 trace.file = LOCATE_inheritance;
1164 tracehead = trace.prev;
1165 return ATTR_inheritance___MMRefineAncestor____local_class( self) /*MMRefineAncestor::_local_class*/;
1166 }
1167 void inheritance___MMRefineAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
1168 struct trace_t trace = {NULL, NULL, 432, LOCATE_inheritance___MMRefineAncestor___init};
1169 val_t variable[6];
1170 void **closurevariable = NULL;
1171 trace.prev = tracehead; tracehead = &trace;
1172 trace.file = LOCATE_inheritance;
1173 variable[0] = self;
1174 variable[1] = param0;
1175 variable[2] = param1;
1176 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMRefineAncestor].i]) return;
1177 variable[4] = variable[0];
1178 ATTR_inheritance___MMRefineAncestor____local_class(variable[4]) /*MMRefineAncestor::_local_class*/ = variable[2] /*a*/;
1179 variable[4] = variable[0];
1180 variable[5] = CALL_static_type___MMLocalClass___get_type( variable[1] /*b*/)( variable[1] /*b*/) /*MMLocalClass::get_type*/;
1181 CALL_static_type___MMAncestor___inheriter__eq(variable[4])(variable[4], variable[5]) /*MMAncestor::inheriter=*/;
1182 variable[4] = variable[0];
1183 variable[5] = variable[0];
1184 variable[5] = ATTR_inheritance___MMRefineAncestor____local_class(variable[5]) /*MMRefineAncestor::_local_class*/;
1185 variable[5] = CALL_static_type___MMLocalClass___get_type(variable[5])(variable[5]) /*MMLocalClass::get_type*/;
1186 CALL_static_type___MMAncestor___stype__eq(variable[4])(variable[4], variable[5]) /*MMAncestor::stype=*/;
1187 return_label45: while(false);
1188 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMRefineAncestor].i] = 1;
1189 tracehead = trace.prev;
1190 return;
1191 }
1192 val_t inheritance___MMSpecAncestor___local_class(val_t self) {
1193 struct trace_t trace = {NULL, NULL, 443, LOCATE_inheritance___MMSpecAncestor___local_class};
1194 val_t variable[3];
1195 void **closurevariable = NULL;
1196 trace.prev = tracehead; tracehead = &trace;
1197 trace.file = LOCATE_inheritance;
1198 variable[0] = self;
1199 variable[2] = variable[0];
1200 variable[2] = CALL_static_type___MMAncestor___stype(variable[2])(variable[2]) /*MMAncestor::stype*/;
1201 variable[2] = CALL_static_type___MMType___local_class(variable[2])(variable[2]) /*MMType::local_class*/;
1202 variable[1] = variable[2];
1203 goto return_label46;
1204 return_label46: while(false);
1205 tracehead = trace.prev;
1206 return variable[1];
1207 }
1208 void inheritance___MMSpecAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
1209 struct trace_t trace = {NULL, NULL, 445, LOCATE_inheritance___MMSpecAncestor___init};
1210 val_t variable[5];
1211 void **closurevariable = NULL;
1212 trace.prev = tracehead; tracehead = &trace;
1213 trace.file = LOCATE_inheritance;
1214 variable[0] = self;
1215 variable[1] = param0;
1216 variable[2] = param1;
1217 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMSpecAncestor].i]) return;
1218 variable[4] = variable[0];
1219 ATTR_static_type___MMAncestor____inheriter(variable[4]) /*MMAncestor::_inheriter*/ = variable[1] /*inheriter*/;
1220 variable[4] = variable[0];
1221 ATTR_static_type___MMAncestor____stype(variable[4]) /*MMAncestor::_stype*/ = variable[2] /*stype*/;
1222 return_label47: while(false);
1223 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMSpecAncestor].i] = 1;
1224 tracehead = trace.prev;
1225 return;
1226 }
1227 val_t inheritance___MMDefaultAncestor___local_class(val_t self) {
1228 struct trace_t trace = {NULL, NULL, 454, LOCATE_inheritance___MMDefaultAncestor___local_class};
1229 val_t variable[3];
1230 void **closurevariable = NULL;
1231 trace.prev = tracehead; tracehead = &trace;
1232 trace.file = LOCATE_inheritance;
1233 variable[0] = self;
1234 variable[2] = variable[0];
1235 variable[2] = CALL_static_type___MMAncestor___stype(variable[2])(variable[2]) /*MMAncestor::stype*/;
1236 variable[2] = CALL_static_type___MMType___local_class(variable[2])(variable[2]) /*MMType::local_class*/;
1237 variable[1] = variable[2];
1238 goto return_label48;
1239 return_label48: while(false);
1240 tracehead = trace.prev;
1241 return variable[1];
1242 }
1243 void inheritance___MMDefaultAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
1244 struct trace_t trace = {NULL, NULL, 456, LOCATE_inheritance___MMDefaultAncestor___init};
1245 val_t variable[6];
1246 void **closurevariable = NULL;
1247 trace.prev = tracehead; tracehead = &trace;
1248 trace.file = LOCATE_inheritance;
1249 variable[0] = self;
1250 variable[1] = param0;
1251 variable[2] = param1;
1252 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMDefaultAncestor].i]) return;
1253 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::==*/)))))));
1254 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);}
1255 variable[4] = CALL_abstractmetamodel___MMLocalClass___module( variable[1] /*b*/)( variable[1] /*b*/) /*MMLocalClass::module*/;
1256 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::==*/)))))));
1257 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);}
1258 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::==*/)))))));
1259 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMDefaultAncestor___init, LOCATE_inheritance, 460); nit_exit(1);}
1260 variable[4] = variable[0];
1261 variable[5] = CALL_static_type___MMLocalClass___get_type( variable[1] /*b*/)( variable[1] /*b*/) /*MMLocalClass::get_type*/;
1262 CALL_static_type___MMAncestor___inheriter__eq(variable[4])(variable[4], variable[5]) /*MMAncestor::inheriter=*/;
1263 variable[4] = variable[0];
1264 CALL_static_type___MMAncestor___stype__eq(variable[4])(variable[4], variable[2] /*anc*/) /*MMAncestor::stype=*/;
1265 return_label49: while(false);
1266 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMDefaultAncestor].i] = 1;
1267 tracehead = trace.prev;
1268 return;
1269 }