First NIT release and new clean mercurial repository
[nit.git] / c_src / inheritance._sep.c
1 #include "inheritance._sep.h"
2 val_t inheritance___MMModule___type_any(val_t self) {
3 struct trace_t trace = {NULL, "inheritance::MMModule::type_any (src/metamodel//inheritance.nit:24,2--28:24)"};
4 val_t variable0;
5 val_t variable1;
6 static val_t once_value_variable1_1; static int once_bool_variable1_1;
7 trace.prev = tracehead; tracehead = &trace;
8 if (once_bool_variable1_1) variable1 = once_value_variable1_1;
9 else {
10 variable1 = NEW_string___String___with_native(BOX_NativeString("Object"), TAG_Int(6)); /*new String*/
11 variable1 = ((symbol___String___to_symbol_t)CALL(variable1,COLOR_symbol___String___to_symbol))(variable1) /*String::to_symbol*/;
12 once_value_variable1_1 = variable1;
13 once_bool_variable1_1 = true;
14 }
15 variable1 = ((abstractmetamodel___MMModule___class_by_name_t)CALL( self,COLOR_abstractmetamodel___MMModule___class_by_name))( self, variable1) /*MMModule::class_by_name*/;
16 variable0 = variable1;
17 variable1 = ((static_type___MMLocalClass___get_type_t)CALL( variable0 /*c_name*/,COLOR_static_type___MMLocalClass___get_type))( variable0 /*c_name*/) /*MMLocalClass::get_type*/;
18 variable0 = variable1;
19 goto return_label0;
20 return_label0: while(false);
21 tracehead = trace.prev;
22 return variable0;
23 }
24 void inheritance___MMModule___import_global_classes(val_t self) {
25 struct trace_t trace = {NULL, "inheritance::MMModule::import_global_classes (src/metamodel//inheritance.nit:31,2--40:43)"};
26 val_t variable0;
27 val_t variable1;
28 val_t variable2;
29 val_t variable3;
30 val_t variable4;
31 val_t variable5;
32 val_t variable6;
33 trace.prev = tracehead; tracehead = &trace;
34 variable1 = NEW_hash___HashMap___init(); /*new HashMap[MMGlobalClass, HashSet[MMLocalClass]]*/
35 variable0 = variable1;
36 variable1 = ((abstractmetamodel___MMModule___mhe_t)CALL( self,COLOR_abstractmetamodel___MMModule___mhe))( self) /*MMModule::mhe*/;
37 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
38 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:35,3--20\n"); nit_exit(1);}
39 variable1 = ((abstractmetamodel___MMModule___mhe_t)CALL( self,COLOR_abstractmetamodel___MMModule___mhe))( self) /*MMModule::mhe*/;
40 variable1 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable1,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable1) /*PartialOrderElement::direct_greaters*/;
41 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
42 while (true) { /*for*/
43 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
44 if (!UNTAG_Bool(variable2)) break; /*for*/
45 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
46 variable3 = ((abstractmetamodel___MMModule___global_classes_t)CALL( variable2 /*mod*/,COLOR_abstractmetamodel___MMModule___global_classes))( variable2 /*mod*/) /*MMModule::global_classes*/;
47 variable3 = ((array___AbstractArray___iterator_t)CALL(variable3,COLOR_abstract_collection___Collection___iterator))(variable3) /*Array::iterator*/;
48 while (true) { /*for*/
49 variable4 = ((array___ArrayIterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*ArrayIterator::is_ok*/;
50 if (!UNTAG_Bool(variable4)) break; /*for*/
51 variable4 = ((array___ArrayIterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*ArrayIterator::item*/;
52 variable5 = ((abstractmetamodel___MMModule___global_classes_t)CALL( self,COLOR_abstractmetamodel___MMModule___global_classes))( self) /*MMModule::global_classes*/;
53 variable5 = ((array___AbstractArray___has_t)CALL(variable5,COLOR_abstract_collection___Collection___has))(variable5, variable4 /*glob*/) /*Array::has*/;
54 if (UNTAG_Bool(variable5)) { /*if*/
55 goto continue_4;
56 }
57 variable5 = ATTR_abstractmetamodel___MMModule____global_classes( self) /*MMModule::_global_classes*/;
58 ((array___AbstractArray___add_t)CALL(variable5,COLOR_abstract_collection___SimpleCollection___add))(variable5, variable4 /*glob*/) /*Array::add*/;
59 variable5 = ATTR_abstractmetamodel___MMModule____global_class_by_name( self) /*MMModule::_global_class_by_name*/;
60 variable6 = ((abstractmetamodel___MMGlobalClass___name_t)CALL( variable4 /*glob*/,COLOR_abstractmetamodel___MMGlobalClass___name))( variable4 /*glob*/) /*MMGlobalClass::name*/;
61 ((abstract_collection___Map_____braeq_t)CALL(variable5,COLOR_abstract_collection___Map_____braeq))(variable5, variable6, variable4 /*glob*/) /*Map::[]=*/;
62 continue_4: while(0);
63 ((array___ArrayIterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*ArrayIterator::next*/;
64 }
65 break_4: while(0);
66 continue_3: while(0);
67 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
68 }
69 break_3: while(0);
70 tracehead = trace.prev;
71 return;
72 }
73 void inheritance___MMModule___import_local_classes(val_t self) {
74 struct trace_t trace = {NULL, "inheritance::MMModule::import_local_classes (src/metamodel//inheritance.nit:46,2--51:46)"};
75 val_t variable0;
76 val_t variable1;
77 val_t variable2;
78 val_t variable3;
79 trace.prev = tracehead; tracehead = &trace;
80 variable0 = ATTR_abstractmetamodel___MMModule____global_classes( self) /*MMModule::_global_classes*/;
81 variable0 = ((array___AbstractArray___iterator_t)CALL(variable0,COLOR_abstract_collection___Collection___iterator))(variable0) /*Array::iterator*/;
82 while (true) { /*for*/
83 variable1 = ((array___ArrayIterator___is_ok_t)CALL(variable0,COLOR_abstract_collection___Iterator___is_ok))(variable0) /*ArrayIterator::is_ok*/;
84 if (!UNTAG_Bool(variable1)) break; /*for*/
85 variable1 = ((array___ArrayIterator___item_t)CALL(variable0,COLOR_abstract_collection___Iterator___item))(variable0) /*ArrayIterator::item*/;
86 variable2 = ((abstractmetamodel___MMModule_____bra_t)CALL( self,COLOR_abstractmetamodel___MMModule_____bra))( self, variable1 /*g*/) /*MMModule::[]*/;
87 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable2 == NIT_NULL /*null*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, NIT_NULL /*null*/) /*MMLocalClass::==*/)))))));
88 if (UNTAG_Bool(variable2)) { /*if*/
89 goto continue_6;
90 }
91 variable3 = NEW_inheritance___MMImplicitLocalClass___init( self, variable1 /*g*/); /*new MMImplicitLocalClass*/
92 variable2 = variable3;
93 continue_6: while(0);
94 ((array___ArrayIterator___next_t)CALL(variable0,COLOR_abstract_collection___Iterator___next))(variable0) /*ArrayIterator::next*/;
95 }
96 break_6: while(0);
97 tracehead = trace.prev;
98 return;
99 }
100 void inheritance___MMLocalClass___compute_super_classes(val_t self) {
101 struct trace_t trace = {NULL, "inheritance::MMLocalClass::compute_super_classes (src/metamodel//inheritance.nit:64,2--87:26)"};
102 val_t variable0;
103 val_t variable1;
104 val_t variable2;
105 val_t variable3;
106 val_t variable4;
107 val_t variable5;
108 val_t variable6;
109 trace.prev = tracehead; tracehead = &trace;
110 variable0 = ((inheritance___MMLocalClass___computed_super_classes_t)CALL( self,COLOR_inheritance___MMLocalClass___computed_super_classes))( self) /*MMLocalClass::computed_super_classes*/;
111 if (UNTAG_Bool(variable0)) { /*if*/
112 goto return_label7;
113 } else { /*if*/
114 variable0 = ATTR_inheritance___MMLocalClass____computing_super( self) /*MMLocalClass::_computing_super*/;
115 if (UNTAG_Bool(variable0)) { /*if*/
116 variable0 = ((file___Object___stderr_t)CALL( self,COLOR_file___Object___stderr))( self) /*MMLocalClass::stderr*/;
117 variable1 = NEW_string___String___init(); /*new String*/
118 variable2 = NEW_string___String___with_native(BOX_NativeString("Fatal error: Inheritance loop for class "), TAG_Int(40)); /*new String*/
119 variable3 = variable2;
120 ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable3) /*String::append*/;
121 variable4 = self;
122 variable4 = ((string___String___to_s_t)CALL(variable4,COLOR_string___Object___to_s))(variable4) /*String::to_s*/;
123 ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable4) /*String::append*/;
124 variable5 = NEW_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
125 variable6 = variable5;
126 ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable6) /*String::append*/;
127 ((file___OFStream___write_t)CALL(variable0,COLOR_stream___OStream___write))(variable0, variable1) /*OFStream::write*/;
128 exit(UNTAG_Int( TAG_Int(1)));
129 }
130 }
131 ATTR_inheritance___MMLocalClass____computing_super( self) /*MMLocalClass::_computing_super*/ = TAG_Bool(true);
132 variable1 = NEW_array___Array___init(); /*new Array[MMLocalClass]*/
133 variable0 = variable1;
134 ((inheritance___MMLocalClass___add_explicit_classes_t)CALL( self,COLOR_inheritance___MMLocalClass___add_explicit_classes))( self, variable0 /*supers*/) /*MMLocalClass::add_explicit_classes*/;
135 ((inheritance___MMLocalClass___add_super_classes_t)CALL( self,COLOR_inheritance___MMLocalClass___add_super_classes))( self, variable0 /*supers*/) /*MMLocalClass::add_super_classes*/;
136 ((inheritance___MMLocalClass___add_default_any_class_t)CALL( self,COLOR_inheritance___MMLocalClass___add_default_any_class))( self, variable0 /*supers*/) /*MMLocalClass::add_default_any_class*/;
137 ((inheritance___MMLocalClass___compute_super_parents_t)CALL( self,COLOR_inheritance___MMLocalClass___compute_super_parents))( self, variable0 /*supers*/) /*MMLocalClass::compute_super_parents*/;
138 variable2 = NEW_hash___HashSet___init(); /*new HashSet[MMLocalClass]*/
139 variable1 = variable2;
140 ((abstract_collection___SimpleCollection___add_all_t)CALL( variable1 /*set*/,COLOR_abstract_collection___SimpleCollection___add_all))( variable1 /*set*/, variable0 /*supers*/) /*HashSet::add_all*/;
141 variable3 = ((array___Collection___to_a_t)CALL( variable1 /*set*/,COLOR_array___Collection___to_a))( variable1 /*set*/) /*HashSet::to_a*/;
142 variable2 = variable3;
143 variable3 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
144 ((abstractmetamodel___MMModule___set_supers_class_t)CALL(variable3,COLOR_abstractmetamodel___MMModule___set_supers_class))(variable3, self, variable2 /*u*/) /*MMModule::set_supers_class*/;
145 variable3 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
146 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == NIT_NULL /*null*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
147 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:85,3--22\n"); nit_exit(1);}
148 variable3 = ATTR_abstractmetamodel___MMLocalClass____cshe( self) /*MMLocalClass::_cshe*/;
149 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == NIT_NULL /*null*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
150 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:86,3--22\n"); nit_exit(1);}
151 ATTR_inheritance___MMLocalClass____computing_super( self) /*MMLocalClass::_computing_super*/ = TAG_Bool(false);
152 return_label7: while(false);
153 tracehead = trace.prev;
154 return;
155 }
156 void inheritance___MMLocalClass___compute_ancestors(val_t self) {
157 struct trace_t trace = {NULL, "inheritance::MMLocalClass::compute_ancestors (src/metamodel//inheritance.nit:90,2--104:36)"};
158 val_t variable0;
159 val_t variable1;
160 val_t variable2;
161 val_t variable3;
162 val_t variable4;
163 trace.prev = tracehead; tracehead = &trace;
164 variable0 = ((inheritance___MMLocalClass___computed_super_classes_t)CALL( self,COLOR_inheritance___MMLocalClass___computed_super_classes))( self) /*MMLocalClass::computed_super_classes*/;
165 if (!UNTAG_Bool(variable0)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:93,3--31\n"); nit_exit(1);}
166 variable0 = ((inheritance___MMLocalClass___computed_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___computed_ancestors))( self) /*MMLocalClass::computed_ancestors*/;
167 if (UNTAG_Bool(variable0)) { /*if*/
168 goto return_label8;
169 }
170 variable1 = ((inheritance___MMLocalClass___build_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___build_ancestors))( self) /*MMLocalClass::build_ancestors*/;
171 variable1 = ((inheritance___MMLocalClass___group_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___group_ancestors))( self, variable1) /*MMLocalClass::group_ancestors*/;
172 variable0 = variable1;
173 variable1 = NEW_hash___HashMap___init(); /*new HashMap[MMLocalClass, MMAncestor]*/
174 ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/ = variable1;
175 variable1 = ((abstract_collection___Map___iterator_t)CALL( variable0 /*ancestors*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*ancestors*/) /*Map::iterator*/;
176 while (true) { /*for*/
177 variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*MapIterator::is_ok*/;
178 if (!UNTAG_Bool(variable2)) break; /*for*/
179 variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*MapIterator::item*/;
180 variable3 = ((abstract_collection___Collection___length_t)CALL( variable2 /*set*/,COLOR_abstract_collection___Collection___length))( variable2 /*set*/) /*Set::length*/;
181 variable3 = TAG_Bool((variable3)==( TAG_Int(1)));
182 if (UNTAG_Bool(variable3)) { /*if*/
183 variable3 = ((abstract_collection___Collection___first_t)CALL( variable2 /*set*/,COLOR_abstract_collection___Collection___first))( variable2 /*set*/) /*Set::first*/;
184 ((static_type___MMLocalClass___add_ancestor_t)CALL( self,COLOR_static_type___MMLocalClass___add_ancestor))( self, variable3) /*MMLocalClass::add_ancestor*/;
185 } else { /*if*/
186 variable4 = ((inheritance___MMLocalClass___merge_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___merge_ancestors))( self, variable2 /*set*/) /*MMLocalClass::merge_ancestors*/;
187 variable3 = variable4;
188 variable4 = ((inheritance___MMLocalClass___merge_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___merge_ancestors))( self, variable2 /*set*/) /*MMLocalClass::merge_ancestors*/;
189 ((static_type___MMLocalClass___add_ancestor_t)CALL( self,COLOR_static_type___MMLocalClass___add_ancestor))( self, variable4) /*MMLocalClass::add_ancestor*/;
190 }
191 continue_9: while(0);
192 ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*MapIterator::next*/;
193 }
194 break_9: while(0);
195 return_label8: while(false);
196 tracehead = trace.prev;
197 return;
198 }
199 void inheritance___MMLocalClass___inherit_global_properties(val_t self) {
200 struct trace_t trace = {NULL, "inheritance::MMLocalClass::inherit_global_properties (src/metamodel//inheritance.nit:109,2--141:21)"};
201 val_t variable0;
202 val_t variable1;
203 val_t variable2;
204 val_t variable3;
205 val_t variable4;
206 val_t variable5;
207 val_t variable6;
208 val_t variable7;
209 val_t variable8;
210 trace.prev = tracehead; tracehead = &trace;
211 variable0 = ATTR_abstractmetamodel___MMLocalClass____global_properties( self) /*MMLocalClass::_global_properties*/;
212 variable0 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable0, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*Set::==*/)))))));
213 if (UNTAG_Bool(variable0)) { /*if*/
214 goto return_label10;
215 }
216 variable0 = NEW_hash___HashSet___init(); /*new HashSet[MMGlobalProperty]*/
217 ATTR_abstractmetamodel___MMLocalClass____global_properties( self) /*MMLocalClass::_global_properties*/ = variable0;
218 variable0 = NEW_hash___HashMap___init(); /*new HashMap[Symbol, Array[MMGlobalProperty]]*/
219 ATTR_abstractmetamodel___MMLocalClass____properties_by_name( self) /*MMLocalClass::_properties_by_name*/ = variable0;
220 variable0 = NEW_hash___HashMap___init(); /*new HashMap[MMGlobalProperty, MMLocalProperty]*/
221 ATTR_abstractmetamodel___MMLocalClass____local_property_by_global( self) /*MMLocalClass::_local_property_by_global*/ = variable0;
222 variable1 = ATTR_abstractmetamodel___MMLocalClass____properties_by_name( self) /*MMLocalClass::_properties_by_name*/;
223 variable0 = variable1;
224 variable2 = ATTR_abstractmetamodel___MMLocalClass____global_properties( self) /*MMLocalClass::_global_properties*/;
225 variable1 = variable2;
226 variable2 = ((abstractmetamodel___MMLocalClass___che_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___che))( self) /*MMLocalClass::che*/;
227 variable2 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable2,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable2) /*PartialOrderElement::direct_greaters*/;
228 variable2 = ((array___AbstractArray___iterator_t)CALL(variable2,COLOR_abstract_collection___Collection___iterator))(variable2) /*Array::iterator*/;
229 while (true) { /*for*/
230 variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
231 if (!UNTAG_Bool(variable3)) break; /*for*/
232 variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
233 variable4 = ((abstractmetamodel___MMLocalClass___global_properties_t)CALL( variable3 /*c*/,COLOR_abstractmetamodel___MMLocalClass___global_properties))( variable3 /*c*/) /*MMLocalClass::global_properties*/;
234 variable4 = ((abstract_collection___Collection___iterator_t)CALL(variable4,COLOR_abstract_collection___Collection___iterator))(variable4) /*Set::iterator*/;
235 while (true) { /*for*/
236 variable5 = ((abstract_collection___Iterator___is_ok_t)CALL(variable4,COLOR_abstract_collection___Iterator___is_ok))(variable4) /*Iterator::is_ok*/;
237 if (!UNTAG_Bool(variable5)) break; /*for*/
238 variable5 = ((abstract_collection___Iterator___item_t)CALL(variable4,COLOR_abstract_collection___Iterator___item))(variable4) /*Iterator::item*/;
239 variable6 = ((abstract_collection___Collection___has_t)CALL( variable1 /*set*/,COLOR_abstract_collection___Collection___has))( variable1 /*set*/, variable5 /*glob*/) /*Set::has*/;
240 if (UNTAG_Bool(variable6)) { /*if*/
241 goto continue_12;
242 }
243 ((abstract_collection___SimpleCollection___add_t)CALL( variable1 /*set*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*set*/, variable5 /*glob*/) /*Set::add*/;
244 variable6 = ((abstractmetamodel___MMGlobalProperty___is_init_t)CALL( variable5 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___is_init))( variable5 /*glob*/) /*MMGlobalProperty::is_init*/;
245 variable7 = variable6;
246 if (UNTAG_Bool(variable7)) { /* and */
247 variable7 = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( variable5 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___intro))( variable5 /*glob*/) /*MMGlobalProperty::intro*/;
248 variable7 = ((abstractmetamodel___MMLocalProperty___local_class_t)CALL(variable7,COLOR_abstractmetamodel___MMLocalProperty___local_class))(variable7) /*MMConcreteProperty::local_class*/;
249 variable7 = ((abstractmetamodel___MMLocalClass___global_t)CALL(variable7,COLOR_abstractmetamodel___MMLocalClass___global))(variable7) /*MMLocalClass::global*/;
250 variable8 = ((abstractmetamodel___MMLocalClass___global_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___global))( self) /*MMLocalClass::global*/;
251 variable7 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable7 == variable8) || ((variable7 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable7,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable7,variable8)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable7,COLOR_kernel___Object_____eqeq))(variable7, variable8) /*MMGlobalClass::==*/)))))));
252 }
253 variable6 = variable7;
254 if (UNTAG_Bool(variable6)) { /*if*/
255 goto continue_12;
256 }
257 variable7 = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( variable5 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___intro))( variable5 /*glob*/) /*MMGlobalProperty::intro*/;
258 variable7 = ((abstractmetamodel___MMLocalProperty___name_t)CALL(variable7,COLOR_abstractmetamodel___MMLocalProperty___name))(variable7) /*MMConcreteProperty::name*/;
259 variable6 = variable7;
260 variable7 = NIT_NULL /*decl variable conf_set*/;
261 variable8 = ((abstract_collection___Map___has_key_t)CALL( variable0 /*names*/,COLOR_abstract_collection___Map___has_key))( variable0 /*names*/, variable6 /*gname*/) /*Map::has_key*/;
262 if (UNTAG_Bool(variable8)) { /*if*/
263 variable8 = ((abstract_collection___Map_____bra_t)CALL( variable0 /*names*/,COLOR_abstract_collection___Map_____bra))( variable0 /*names*/, variable6 /*gname*/) /*Map::[]*/;
264 variable7 = variable8 /*conf_set=*/;
265 } else { /*if*/
266 variable8 = NEW_array___Array___init(); /*new Array[MMGlobalProperty]*/
267 variable7 = variable8 /*conf_set=*/;
268 ((abstract_collection___Map_____braeq_t)CALL( variable0 /*names*/,COLOR_abstract_collection___Map_____braeq))( variable0 /*names*/, variable6 /*gname*/, variable7 /*conf_set*/) /*Map::[]=*/;
269 }
270 ((array___AbstractArray___add_t)CALL( variable7 /*conf_set*/,COLOR_abstract_collection___SimpleCollection___add))( variable7 /*conf_set*/, variable5 /*glob*/) /*Array::add*/;
271 continue_12: while(0);
272 ((abstract_collection___Iterator___next_t)CALL(variable4,COLOR_abstract_collection___Iterator___next))(variable4) /*Iterator::next*/;
273 }
274 break_12: while(0);
275 continue_11: while(0);
276 ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
277 }
278 break_11: while(0);
279 return_label10: while(false);
280 tracehead = trace.prev;
281 return;
282 }
283 void inheritance___MMLocalClass___add_direct_parent(val_t self, val_t param0) {
284 struct trace_t trace = {NULL, "inheritance::MMLocalClass::add_direct_parent (src/metamodel//inheritance.nit:146,2--149:23)"};
285 val_t variable0;
286 val_t variable1;
287 trace.prev = tracehead; tracehead = &trace;
288 variable0 = param0;
289 variable1 = ATTR_inheritance___MMLocalClass____direct_parents( self) /*MMLocalClass::_direct_parents*/;
290 ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable0 /*p*/) /*Array::add*/;
291 tracehead = trace.prev;
292 return;
293 }
294 val_t inheritance___MMLocalClass___computed_super_classes(val_t self) {
295 struct trace_t trace = {NULL, "inheritance::MMLocalClass::computed_super_classes (src/metamodel//inheritance.nit:152,2--155:40)"};
296 val_t variable0;
297 val_t variable1;
298 trace.prev = tracehead; tracehead = &trace;
299 variable0 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
300 variable0 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable0, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
301 variable1 = variable0;
302 if (UNTAG_Bool(variable1)) { /* and */
303 variable1 = ATTR_abstractmetamodel___MMLocalClass____cshe( self) /*MMLocalClass::_cshe*/;
304 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
305 }
306 variable0 = variable1;
307 goto return_label14;
308 return_label14: while(false);
309 tracehead = trace.prev;
310 return variable0;
311 }
312 val_t inheritance___MMLocalClass___computed_ancestors(val_t self) {
313 struct trace_t trace = {NULL, "inheritance::MMLocalClass::computed_ancestors (src/metamodel//inheritance.nit:158,2--161:27)"};
314 val_t variable0;
315 trace.prev = tracehead; tracehead = &trace;
316 variable0 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
317 variable0 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable0, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*Map::==*/)))))));
318 goto return_label15;
319 return_label15: while(false);
320 tracehead = trace.prev;
321 return variable0;
322 }
323 val_t inheritance___MMLocalClass___ancestor_for(val_t self, val_t param0) {
324 struct trace_t trace = {NULL, "inheritance::MMLocalClass::ancestor_for (src/metamodel//inheritance.nit:164,2--184:11)"};
325 val_t variable0;
326 val_t variable1;
327 val_t variable2;
328 val_t variable3;
329 val_t variable4;
330 val_t variable5;
331 trace.prev = tracehead; tracehead = &trace;
332 variable0 = param0;
333 variable1 = ((static_type___MMLocalClass___ancestors_t)CALL( self,COLOR_static_type___MMLocalClass___ancestors))( self) /*MMLocalClass::ancestors*/;
334 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*Map::==*/)))))));
335 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:168,3--26\n"); nit_exit(1);}
336 variable1 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
337 variable1 = ((abstract_collection___Map___has_key_t)CALL(variable1,COLOR_abstract_collection___Map___has_key))(variable1, variable0 /*c*/) /*Map::has_key*/;
338 if (UNTAG_Bool(variable1)) { /*if*/
339 variable1 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
340 variable1 = ((abstract_collection___Map_____bra_t)CALL(variable1,COLOR_abstract_collection___Map_____bra))(variable1, variable0 /*c*/) /*Map::[]*/;
341 goto return_label16;
342 }
343 variable2 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
344 variable2 = ((abstractmetamodel___MMLocalClass___for_module_t)CALL( variable0 /*c*/,COLOR_abstractmetamodel___MMLocalClass___for_module))( variable0 /*c*/, variable2) /*MMLocalClass::for_module*/;
345 variable1 = variable2;
346 variable2 = ((abstractmetamodel___MMLocalClass___cshe_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___cshe))( self) /*MMLocalClass::cshe*/;
347 variable2 = ((partial_order___PartialOrderElement_____leq_t)CALL(variable2,COLOR_partial_order___PartialOrderElement_____leq))(variable2, variable1 /*a*/) /*PartialOrderElement::<=*/;
348 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:174,3--18\n"); nit_exit(1);}
349 variable2 = NIT_NULL /*decl variable ra*/;
350 variable3 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
351 variable3 = ((abstract_collection___Map___has_key_t)CALL(variable3,COLOR_abstract_collection___Map___has_key))(variable3, variable1 /*a*/) /*Map::has_key*/;
352 if (UNTAG_Bool(variable3)) { /*if*/
353 variable3 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
354 variable3 = ((abstract_collection___Map_____bra_t)CALL(variable3,COLOR_abstract_collection___Map_____bra))(variable3, variable1 /*a*/) /*Map::[]*/;
355 variable2 = variable3 /*ra=*/;
356 } else { /*if*/
357 variable3 = ((abstractmetamodel___MMLocalClass___global_t)CALL( variable0 /*c*/,COLOR_abstractmetamodel___MMLocalClass___global))( variable0 /*c*/) /*MMLocalClass::global*/;
358 variable4 = ATTR_abstractmetamodel___MMLocalClass____global( self) /*MMLocalClass::_global*/;
359 variable3 = TAG_Bool((variable3 == variable4) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3,variable4)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, variable4) /*MMGlobalClass::==*/)))));
360 if (UNTAG_Bool(variable3)) { /*if*/
361 variable3 = NEW_inheritance___MMRefineAncestor___init( self, variable0 /*c*/); /*new MMRefineAncestor*/
362 variable2 = variable3 /*ra=*/;
363 } else { /*if*/
364 variable3 = ((static_type___MMLocalClass___get_type_t)CALL( self,COLOR_static_type___MMLocalClass___get_type))( self) /*MMLocalClass::get_type*/;
365 variable4 = ((static_type___MMLocalClass___get_type_t)CALL( variable0 /*c*/,COLOR_static_type___MMLocalClass___get_type))( variable0 /*c*/) /*MMLocalClass::get_type*/;
366 variable5 = NEW_inheritance___MMSpecAncestor___init(variable3, variable4); /*new MMSpecAncestor*/
367 variable3 = variable5;
368 variable2 = variable3 /*ra=*/;
369 }
370 }
371 variable3 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
372 ((abstract_collection___Map_____braeq_t)CALL(variable3,COLOR_abstract_collection___Map_____braeq))(variable3, variable0 /*c*/, variable2 /*ra*/) /*Map::[]=*/;
373 variable1 = variable2 /*ra*/;
374 goto return_label16;
375 return_label16: while(false);
376 tracehead = trace.prev;
377 return variable1;
378 }
379 val_t inheritance___MMLocalClass_____bra(val_t self, val_t param0) {
380 struct trace_t trace = {NULL, "inheritance::MMLocalClass::[] (src/metamodel//inheritance.nit:187,2--193:13)"};
381 val_t variable0;
382 val_t variable1;
383 val_t variable2;
384 val_t variable3;
385 trace.prev = tracehead; tracehead = &trace;
386 variable0 = param0;
387 variable2 = ((inheritance___MMLocalClass_____bra_t)CALL( self,COLOR_SUPER_inheritance___MMLocalClass_____bra))( self, variable0 /*glob*/) /*super MMLocalClass::[]*/;
388 variable1 = variable2;
389 variable2 = TAG_Bool(( variable1 /*prop*/ == NIT_NULL /*null*/) || (( variable1 /*prop*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*prop*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*prop*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*prop*/,COLOR_kernel___Object_____eqeq))( variable1 /*prop*/, NIT_NULL /*null*/) /*MMLocalProperty::==*/)))));
390 variable3 = variable2;
391 if (UNTAG_Bool(variable3)) { /* and */
392 variable3 = ATTR_abstractmetamodel___MMLocalClass____global_properties( self) /*MMLocalClass::_global_properties*/;
393 variable3 = ((abstract_collection___Collection___has_t)CALL(variable3,COLOR_abstract_collection___Collection___has))(variable3, variable0 /*glob*/) /*Set::has*/;
394 }
395 variable2 = variable3;
396 if (UNTAG_Bool(variable2)) { /*if*/
397 variable2 = ((inheritance___MMLocalClass___inherit_local_property_t)CALL( self,COLOR_inheritance___MMLocalClass___inherit_local_property))( self, variable0 /*glob*/) /*MMLocalClass::inherit_local_property*/;
398 variable1 = variable2 /*prop=*/;
399 }
400 variable1 = variable1 /*prop*/;
401 goto return_label17;
402 return_label17: while(false);
403 tracehead = trace.prev;
404 return variable1;
405 }
406 void inheritance___MMLocalClass___add_default_any_class(val_t self, val_t param0) {
407 struct trace_t trace = {NULL, "inheritance::MMLocalClass::add_default_any_class (src/metamodel//inheritance.nit:196,2--203:28)"};
408 val_t variable0;
409 val_t variable1;
410 val_t variable2;
411 val_t variable3;
412 static val_t once_value_variable3_19; static int once_bool_variable3_19;
413 trace.prev = tracehead; tracehead = &trace;
414 variable0 = param0;
415 variable1 = ((array___AbstractArray___is_empty_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___Collection___is_empty))( variable0 /*supers*/) /*Array::is_empty*/;
416 variable2 = variable1;
417 if (UNTAG_Bool(variable2)) { /* and */
418 variable2 = ((abstractmetamodel___MMLocalClass___name_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___name))( self) /*MMLocalClass::name*/;
419 if (once_bool_variable3_19) variable3 = once_value_variable3_19;
420 else {
421 variable3 = NEW_string___String___with_native(BOX_NativeString("Object"), TAG_Int(6)); /*new String*/
422 variable3 = ((symbol___String___to_symbol_t)CALL(variable3,COLOR_symbol___String___to_symbol))(variable3) /*String::to_symbol*/;
423 once_value_variable3_19 = variable3;
424 once_bool_variable3_19 = true;
425 }
426 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable2 == variable3) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2,variable3)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, variable3) /*Symbol::==*/)))))));
427 }
428 variable1 = variable2;
429 if (UNTAG_Bool(variable1)) { /*if*/
430 variable2 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
431 variable2 = ((inheritance___MMModule___type_any_t)CALL(variable2,COLOR_inheritance___MMModule___type_any))(variable2) /*MMModule::type_any*/;
432 variable1 = variable2;
433 variable2 = ((static_type___MMType___local_class_t)CALL( variable1 /*t_any*/,COLOR_static_type___MMType___local_class))( variable1 /*t_any*/) /*MMType::local_class*/;
434 ((array___AbstractArray___add_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*supers*/, variable2) /*Array::add*/;
435 variable3 = NEW_inheritance___MMDefaultAncestor___init( self, variable1 /*t_any*/); /*new MMDefaultAncestor*/
436 variable2 = variable3;
437 ((inheritance___MMLocalClass___add_direct_parent_t)CALL( self,COLOR_inheritance___MMLocalClass___add_direct_parent))( self, variable2 /*default*/) /*MMLocalClass::add_direct_parent*/;
438 }
439 tracehead = trace.prev;
440 return;
441 }
442 void inheritance___MMLocalClass___add_super_classes(val_t self, val_t param0) {
443 struct trace_t trace = {NULL, "inheritance::MMLocalClass::add_super_classes (src/metamodel//inheritance.nit:207,2--216:18)"};
444 val_t variable0;
445 val_t variable1;
446 val_t variable2;
447 val_t variable3;
448 val_t variable4;
449 val_t variable5;
450 val_t variable6;
451 trace.prev = tracehead; tracehead = &trace;
452 variable0 = param0;
453 variable1 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
454 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
455 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:210,3--22\n"); nit_exit(1);}
456 variable1 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
457 variable1 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable1,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable1) /*PartialOrderElement::direct_greaters*/;
458 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
459 while (true) { /*for*/
460 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
461 if (!UNTAG_Bool(variable2)) break; /*for*/
462 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
463 variable3 = ((abstractmetamodel___MMLocalClass___cshe_t)CALL( variable2 /*ref*/,COLOR_abstractmetamodel___MMLocalClass___cshe))( variable2 /*ref*/) /*MMLocalClass::cshe*/;
464 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == NIT_NULL /*null*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
465 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:212,4--26\n"); nit_exit(1);}
466 variable3 = ((abstractmetamodel___MMLocalClass___cshe_t)CALL( variable2 /*ref*/,COLOR_abstractmetamodel___MMLocalClass___cshe))( variable2 /*ref*/) /*MMLocalClass::cshe*/;
467 variable3 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable3,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable3) /*PartialOrderElement::direct_greaters*/;
468 variable3 = ((array___AbstractArray___iterator_t)CALL(variable3,COLOR_abstract_collection___Collection___iterator))(variable3) /*Array::iterator*/;
469 while (true) { /*for*/
470 variable4 = ((array___ArrayIterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*ArrayIterator::is_ok*/;
471 if (!UNTAG_Bool(variable4)) break; /*for*/
472 variable4 = ((array___ArrayIterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*ArrayIterator::item*/;
473 variable6 = ATTR_abstractmetamodel___MMLocalClass____module( self) /*MMLocalClass::_module*/;
474 variable6 = ((abstractmetamodel___MMLocalClass___for_module_t)CALL( variable4 /*sup*/,COLOR_abstractmetamodel___MMLocalClass___for_module))( variable4 /*sup*/, variable6) /*MMLocalClass::for_module*/;
475 variable5 = variable6;
476 variable6 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable5 /*cla*/ == NIT_NULL /*null*/) || (( variable5 /*cla*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable5 /*cla*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable5 /*cla*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable5 /*cla*/,COLOR_kernel___Object_____eqeq))( variable5 /*cla*/, NIT_NULL /*null*/) /*MMLocalClass::==*/)))))));
477 if (!UNTAG_Bool(variable6)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:215,5--22\n"); nit_exit(1);}
478 ((array___AbstractArray___add_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*supers*/, variable5 /*cla*/) /*Array::add*/;
479 continue_22: while(0);
480 ((array___ArrayIterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*ArrayIterator::next*/;
481 }
482 break_22: while(0);
483 continue_21: while(0);
484 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
485 }
486 break_21: while(0);
487 tracehead = trace.prev;
488 return;
489 }
490 void inheritance___MMLocalClass___add_explicit_classes(val_t self, val_t param0) {
491 struct trace_t trace = {NULL, "inheritance::MMLocalClass::add_explicit_classes (src/metamodel//inheritance.nit:221,2--225:27)"};
492 val_t variable0;
493 val_t variable1;
494 val_t variable2;
495 val_t variable3;
496 trace.prev = tracehead; tracehead = &trace;
497 variable0 = param0;
498 variable1 = ATTR_inheritance___MMLocalClass____direct_parents( self) /*MMLocalClass::_direct_parents*/;
499 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
500 while (true) { /*for*/
501 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
502 if (!UNTAG_Bool(variable2)) break; /*for*/
503 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
504 variable3 = ((static_type___MMAncestor___local_class_t)CALL( variable2 /*p*/,COLOR_static_type___MMAncestor___local_class))( variable2 /*p*/) /*MMAncestor::local_class*/;
505 ((array___AbstractArray___add_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*supers*/, variable3) /*Array::add*/;
506 continue_24: while(0);
507 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
508 }
509 break_24: while(0);
510 tracehead = trace.prev;
511 return;
512 }
513 void inheritance___MMLocalClass___compute_super_parents(val_t self, val_t param0) {
514 struct trace_t trace = {NULL, "inheritance::MMLocalClass::compute_super_parents (src/metamodel//inheritance.nit:229,2--234:26)"};
515 val_t variable0;
516 val_t variable1;
517 val_t variable2;
518 val_t variable3;
519 trace.prev = tracehead; tracehead = &trace;
520 variable0 = param0;
521 variable1 = ((array___AbstractArray___iterator_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*supers*/) /*Array::iterator*/;
522 while (true) { /*for*/
523 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
524 if (!UNTAG_Bool(variable2)) break; /*for*/
525 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
526 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2 /*p*/ == NIT_NULL /*null*/) || (( variable2 /*p*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable2 /*p*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))( variable2 /*p*/, NIT_NULL /*null*/) /*MMLocalClass::==*/)))))));
527 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:233,4--19\n"); nit_exit(1);}
528 ((inheritance___MMLocalClass___compute_super_classes_t)CALL( variable2 /*p*/,COLOR_inheritance___MMLocalClass___compute_super_classes))( variable2 /*p*/) /*MMLocalClass::compute_super_classes*/;
529 continue_26: while(0);
530 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
531 }
532 break_26: while(0);
533 tracehead = trace.prev;
534 return;
535 }
536 val_t inheritance___MMLocalClass___build_ancestors(val_t self) {
537 struct trace_t trace = {NULL, "inheritance::MMLocalClass::build_ancestors (src/metamodel//inheritance.nit:238,2--253:22)"};
538 val_t variable0;
539 val_t variable1;
540 val_t variable2;
541 val_t variable3;
542 val_t variable4;
543 trace.prev = tracehead; tracehead = &trace;
544 variable1 = NEW_array___Array___init(); /*new Array[MMAncestor]*/
545 variable0 = variable1;
546 variable1 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
547 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
548 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:243,3--22\n"); nit_exit(1);}
549 variable1 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
550 variable1 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable1,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable1) /*PartialOrderElement::direct_greaters*/;
551 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
552 while (true) { /*for*/
553 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
554 if (!UNTAG_Bool(variable2)) break; /*for*/
555 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
556 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2 /*p*/ == self) || (( variable2 /*p*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable2 /*p*/, self)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))( variable2 /*p*/, self) /*MMLocalClass::==*/)))))));
557 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:245,4--19\n"); nit_exit(1);}
558 variable4 = NEW_inheritance___MMRefineAncestor___init( self, variable2 /*p*/); /*new MMRefineAncestor*/
559 variable3 = variable4;
560 ((inheritance___MMAncestor___add_in_t)CALL( variable3 /*anc*/,COLOR_inheritance___MMAncestor___add_in))( variable3 /*anc*/, variable0 /*all_ancestors*/) /*MMRefineAncestor::add_in*/;
561 continue_28: while(0);
562 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
563 }
564 break_28: while(0);
565 variable1 = ATTR_inheritance___MMLocalClass____direct_parents( self) /*MMLocalClass::_direct_parents*/;
566 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
567 while (true) { /*for*/
568 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
569 if (!UNTAG_Bool(variable2)) break; /*for*/
570 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
571 variable3 = ((static_type___MMAncestor___local_class_t)CALL( variable2 /*anc*/,COLOR_static_type___MMAncestor___local_class))( variable2 /*anc*/) /*MMAncestor::local_class*/;
572 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == self) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, self)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, self) /*MMLocalClass::==*/)))))));
573 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:250,4--33\n"); nit_exit(1);}
574 ((inheritance___MMAncestor___add_in_t)CALL( variable2 /*anc*/,COLOR_inheritance___MMAncestor___add_in))( variable2 /*anc*/, variable0 /*all_ancestors*/) /*MMAncestor::add_in*/;
575 continue_29: while(0);
576 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
577 }
578 break_29: while(0);
579 variable0 = variable0 /*all_ancestors*/;
580 goto return_label27;
581 return_label27: while(false);
582 tracehead = trace.prev;
583 return variable0;
584 }
585 val_t inheritance___MMLocalClass___group_ancestors(val_t self, val_t param0) {
586 struct trace_t trace = {NULL, "inheritance::MMLocalClass::group_ancestors (src/metamodel//inheritance.nit:256,2--275:12)"};
587 val_t variable0;
588 val_t variable1;
589 val_t variable2;
590 val_t variable3;
591 val_t variable4;
592 val_t variable5;
593 val_t variable6;
594 trace.prev = tracehead; tracehead = &trace;
595 variable0 = param0;
596 variable2 = NEW_hash___HashMap___init(); /*new HashMap[MMLocalClass, Set[MMAncestor]]*/
597 variable1 = variable2;
598 variable2 = ((array___AbstractArray___iterator_t)CALL( variable0 /*all*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*all*/) /*Array::iterator*/;
599 while (true) { /*for*/
600 variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
601 if (!UNTAG_Bool(variable3)) break; /*for*/
602 variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
603 variable5 = ((static_type___MMAncestor___local_class_t)CALL( variable3 /*a*/,COLOR_static_type___MMAncestor___local_class))( variable3 /*a*/) /*MMAncestor::local_class*/;
604 variable4 = variable5;
605 variable5 = NIT_NULL /*decl variable set*/;
606 ((inheritance___MMLocalClass___compute_ancestors_t)CALL( variable4 /*c*/,COLOR_inheritance___MMLocalClass___compute_ancestors))( variable4 /*c*/) /*MMLocalClass::compute_ancestors*/;
607 variable6 = ((abstract_collection___CoupleMap___has_key_t)CALL( variable1 /*map*/,COLOR_abstract_collection___Map___has_key))( variable1 /*map*/, variable4 /*c*/) /*HashMap::has_key*/;
608 if (UNTAG_Bool(variable6)) { /*if*/
609 variable6 = ((abstract_collection___CoupleMap_____bra_t)CALL( variable1 /*map*/,COLOR_abstract_collection___Map_____bra))( variable1 /*map*/, variable4 /*c*/) /*HashMap::[]*/;
610 variable5 = variable6 /*set=*/;
611 } else { /*if*/
612 variable6 = NEW_hash___HashSet___init(); /*new HashSet[MMAncestor]*/
613 variable5 = variable6 /*set=*/;
614 ((hash___HashMap_____braeq_t)CALL( variable1 /*map*/,COLOR_abstract_collection___Map_____braeq))( variable1 /*map*/, variable4 /*c*/, variable5 /*set*/) /*HashMap::[]=*/;
615 }
616 ((abstract_collection___SimpleCollection___add_t)CALL( variable5 /*set*/,COLOR_abstract_collection___SimpleCollection___add))( variable5 /*set*/, variable3 /*a*/) /*Set::add*/;
617 continue_31: while(0);
618 ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
619 }
620 break_31: while(0);
621 variable1 = variable1 /*map*/;
622 goto return_label30;
623 return_label30: while(false);
624 tracehead = trace.prev;
625 return variable1;
626 }
627 val_t inheritance___MMLocalClass___merge_ancestors(val_t self, val_t param0) {
628 struct trace_t trace = {NULL, "inheritance::MMLocalClass::merge_ancestors (src/metamodel//inheritance.nit:278,2--308:18)"};
629 val_t variable0;
630 val_t variable1;
631 val_t variable2;
632 val_t variable3;
633 val_t variable4;
634 val_t variable5;
635 val_t variable6;
636 val_t variable7;
637 val_t variable8;
638 val_t variable9;
639 val_t variable10;
640 val_t variable11;
641 val_t variable12;
642 val_t variable13;
643 val_t variable14;
644 trace.prev = tracehead; tracehead = &trace;
645 variable0 = param0;
646 variable2 = NEW_hash___HashSet___init(); /*new HashSet[MMAncestor]*/
647 variable1 = variable2;
648 variable3 = NEW_array___Array___init(); /*new Array[MMAncestor]*/
649 variable2 = variable3;
650 variable3 = ((abstract_collection___Collection___iterator_t)CALL( variable0 /*set*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*set*/) /*Set::iterator*/;
651 while (true) { /*for*/
652 variable4 = ((abstract_collection___Iterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*Iterator::is_ok*/;
653 if (!UNTAG_Bool(variable4)) break; /*for*/
654 variable4 = ((abstract_collection___Iterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*Iterator::item*/;
655 variable6 = ((abstract_collection___Collection___iterator_t)CALL( variable0 /*set*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*set*/) /*Set::iterator*/;
656 variable5 = variable6;
657 variable6 = TAG_Bool(true);
658 while (true) { /*while*/
659 variable7 = ((abstract_collection___Iterator___is_ok_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___is_ok))( variable5 /*it*/) /*Iterator::is_ok*/;
660 variable8 = variable7;
661 if (UNTAG_Bool(variable8)) { /* and */
662 variable8 = variable6 /*search*/;
663 }
664 variable7 = variable8;
665 if (!UNTAG_Bool(variable7)) break; /* while*/
666 variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
667 variable8 = TAG_Bool(( variable4 /*t*/ == variable8) || (( variable4 /*t*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable4 /*t*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable4 /*t*/,variable8)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable4 /*t*/,COLOR_kernel___Object_____eqeq))( variable4 /*t*/, variable8) /*MMAncestor::==*/)))));
668 variable7 = variable8;
669 variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
670 variable8 = ((hash___HashSet___has_t)CALL( variable1 /*marks*/,COLOR_abstract_collection___Collection___has))( variable1 /*marks*/, variable8) /*HashSet::has*/;
671 variable7 = variable8 /*a=*/;
672 variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
673 variable8 = ((static_type___MMAncestor___stype_t)CALL(variable8,COLOR_static_type___MMAncestor___stype))(variable8) /*MMAncestor::stype*/;
674 variable9 = ((static_type___MMAncestor___stype_t)CALL( variable4 /*t*/,COLOR_static_type___MMAncestor___stype))( variable4 /*t*/) /*MMAncestor::stype*/;
675 variable8 = ((static_type___MMType_____l_t)CALL(variable8,COLOR_static_type___MMType_____l))(variable8, variable9) /*MMType::<*/;
676 variable7 = variable8 /*a=*/;
677 variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
678 variable8 = TAG_Bool(( variable4 /*t*/ == variable8) || (( variable4 /*t*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable4 /*t*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable4 /*t*/,variable8)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable4 /*t*/,COLOR_kernel___Object_____eqeq))( variable4 /*t*/, variable8) /*MMAncestor::==*/)))));
679 variable9 = variable8;
680 if (!UNTAG_Bool(variable9)) { /* or */
681 variable9 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
682 variable9 = ((hash___HashSet___has_t)CALL( variable1 /*marks*/,COLOR_abstract_collection___Collection___has))( variable1 /*marks*/, variable9) /*HashSet::has*/;
683 }
684 variable8 = variable9;
685 variable8 = TAG_Bool(!UNTAG_Bool(variable8));
686 if (UNTAG_Bool(variable8)) { /* and */
687 variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
688 variable8 = ((static_type___MMAncestor___stype_t)CALL(variable8,COLOR_static_type___MMAncestor___stype))(variable8) /*MMAncestor::stype*/;
689 variable9 = ((static_type___MMAncestor___stype_t)CALL( variable4 /*t*/,COLOR_static_type___MMAncestor___stype))( variable4 /*t*/) /*MMAncestor::stype*/;
690 variable8 = ((static_type___MMType_____l_t)CALL(variable8,COLOR_static_type___MMType_____l))(variable8, variable9) /*MMType::<*/;
691 }
692 if (UNTAG_Bool(variable8)) { /*if*/
693 ((hash___HashSet___add_t)CALL( variable1 /*marks*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*marks*/, variable4 /*t*/) /*HashSet::add*/;
694 variable6 = TAG_Bool(false) /*search=*/;
695 }
696 ((abstract_collection___Iterator___next_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___next))( variable5 /*it*/) /*Iterator::next*/;
697 continue_34: while(0);
698 }
699 break_34: while(0);
700 variable7 = ((hash___HashSet___has_t)CALL( variable1 /*marks*/,COLOR_abstract_collection___Collection___has))( variable1 /*marks*/, variable4 /*t*/) /*HashSet::has*/;
701 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable7)))) { /*if*/
702 ((array___AbstractArray___add_t)CALL( variable2 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*res*/, variable4 /*t*/) /*Array::add*/;
703 }
704 continue_33: while(0);
705 ((abstract_collection___Iterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*Iterator::next*/;
706 }
707 break_33: while(0);
708 variable3 = ((array___AbstractArray___length_t)CALL( variable2 /*res*/,COLOR_abstract_collection___Collection___length))( variable2 /*res*/) /*Array::length*/;
709 variable3 = TAG_Bool(UNTAG_Int(variable3)>UNTAG_Int( TAG_Int(1)));
710 if (UNTAG_Bool(variable3)) { /*if*/
711 variable3 = ((file___Object___stderr_t)CALL( self,COLOR_file___Object___stderr))( self) /*MMLocalClass::stderr*/;
712 variable4 = NEW_string___String___init(); /*new String*/
713 variable5 = NEW_string___String___with_native(BOX_NativeString("Fatal error: Incompatibles ancestors for "), TAG_Int(41)); /*new String*/
714 variable6 = variable5;
715 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable6) /*String::append*/;
716 variable7 = ((abstractmetamodel___MMLocalClass___name_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___name))( self) /*MMLocalClass::name*/;
717 variable8 = variable7;
718 variable8 = ((string___String___to_s_t)CALL(variable8,COLOR_string___Object___to_s))(variable8) /*String::to_s*/;
719 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable8) /*String::append*/;
720 variable9 = NEW_string___String___with_native(BOX_NativeString(": "), TAG_Int(2)); /*new String*/
721 variable10 = variable9;
722 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable10) /*String::append*/;
723 variable11 = NEW_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)); /*new String*/
724 variable11 = ((string___Collection___join_t)CALL( variable2 /*res*/,COLOR_string___Collection___join))( variable2 /*res*/, variable11) /*Array::join*/;
725 variable12 = variable11;
726 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable12) /*String::append*/;
727 variable13 = NEW_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
728 variable14 = variable13;
729 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable14) /*String::append*/;
730 ((file___OFStream___write_t)CALL(variable3,COLOR_stream___OStream___write))(variable3, variable4) /*OFStream::write*/;
731 exit(UNTAG_Int( TAG_Int(1)));
732 }
733 variable3 = ((abstract_collection___IndexedCollection___first_t)CALL( variable2 /*res*/,COLOR_abstract_collection___Collection___first))( variable2 /*res*/) /*Array::first*/;
734 variable1 = variable3;
735 goto return_label32;
736 return_label32: while(false);
737 tracehead = trace.prev;
738 return variable1;
739 }
740 val_t inheritance___MMLocalClass___inherit_local_property(val_t self, val_t param0) {
741 struct trace_t trace = {NULL, "inheritance::MMLocalClass::inherit_local_property (src/metamodel//inheritance.nit:311,2--339:13)"};
742 val_t variable0;
743 val_t variable1;
744 val_t variable2;
745 val_t variable3;
746 val_t variable4;
747 val_t variable5;
748 val_t variable6;
749 val_t variable7;
750 val_t variable8;
751 val_t variable9;
752 val_t variable10;
753 val_t variable11;
754 val_t variable12;
755 val_t variable13;
756 val_t variable14;
757 val_t variable15;
758 trace.prev = tracehead; tracehead = &trace;
759 variable0 = param0;
760 variable1 = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global( self) /*MMLocalClass::_local_property_by_global*/;
761 variable1 = ((abstract_collection___Map___has_key_t)CALL(variable1,COLOR_abstract_collection___Map___has_key))(variable1, variable0 /*glob*/) /*Map::has_key*/;
762 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable1)))) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:316,3--51\n"); nit_exit(1);}
763 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*glob*/ == NIT_NULL /*null*/) || (( variable0 /*glob*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*glob*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*glob*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*glob*/,COLOR_kernel___Object_____eqeq))( variable0 /*glob*/, NIT_NULL /*null*/) /*MMGlobalProperty::==*/)))))));
764 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:317,3--21\n"); nit_exit(1);}
765 variable2 = ((inheritance___MMGlobalProperty___get_compatible_concrete_properties_for_t)CALL( variable0 /*glob*/,COLOR_inheritance___MMGlobalProperty___get_compatible_concrete_properties_for))( variable0 /*glob*/, self) /*MMGlobalProperty::get_compatible_concrete_properties_for*/;
766 variable1 = variable2;
767 variable2 = ((array___AbstractArray___length_t)CALL( variable1 /*impls*/,COLOR_abstract_collection___Collection___length))( variable1 /*impls*/) /*Array::length*/;
768 variable2 = TAG_Bool((variable2)!=( TAG_Int(1)));
769 if (UNTAG_Bool(variable2)) { /*if*/
770 variable2 = ((file___Object___stderr_t)CALL( self,COLOR_file___Object___stderr))( self) /*MMLocalClass::stderr*/;
771 variable3 = NEW_string___String___with_native(BOX_NativeString("Fatal error: inherit_local_property error\n"), TAG_Int(42)); /*new String*/
772 ((file___OFStream___write_t)CALL(variable2,COLOR_stream___OStream___write))(variable2, variable3) /*OFStream::write*/;
773 variable2 = NEW_string___String___init(); /*new String*/
774 variable3 = NEW_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)); /*new String*/
775 variable4 = variable3;
776 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable4) /*String::append*/;
777 variable5 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
778 variable6 = variable5;
779 variable6 = ((string___String___to_s_t)CALL(variable6,COLOR_string___Object___to_s))(variable6) /*String::to_s*/;
780 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable6) /*String::append*/;
781 variable7 = NEW_string___String___with_native(BOX_NativeString("::"), TAG_Int(2)); /*new String*/
782 variable8 = variable7;
783 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable8) /*String::append*/;
784 variable9 = self;
785 variable9 = ((string___String___to_s_t)CALL(variable9,COLOR_string___Object___to_s))(variable9) /*String::to_s*/;
786 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable9) /*String::append*/;
787 variable10 = NEW_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)); /*new String*/
788 variable11 = variable10;
789 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable11) /*String::append*/;
790 variable12 = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( variable0 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___intro))( variable0 /*glob*/) /*MMGlobalProperty::intro*/;
791 variable12 = ((abstractmetamodel___MMLocalProperty___full_name_t)CALL(variable12,COLOR_abstractmetamodel___MMLocalProperty___full_name))(variable12) /*MMConcreteProperty::full_name*/;
792 variable13 = variable12;
793 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable13) /*String::append*/;
794 variable14 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
795 variable15 = variable14;
796 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable15) /*String::append*/;
797 ((file___Object___print_t)CALL( self,COLOR_file___Object___print))( self, variable2) /*MMLocalClass::print*/;
798 variable2 = ((array___AbstractArray___iterator_t)CALL( variable1 /*impls*/,COLOR_abstract_collection___Collection___iterator))( variable1 /*impls*/) /*Array::iterator*/;
799 while (true) { /*for*/
800 variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
801 if (!UNTAG_Bool(variable3)) break; /*for*/
802 variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
803 variable4 = NEW_string___String___init(); /*new String*/
804 variable5 = NEW_string___String___with_native(BOX_NativeString(" "), TAG_Int(3)); /*new String*/
805 variable6 = variable5;
806 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable6) /*String::append*/;
807 variable7 = ((abstractmetamodel___MMLocalProperty___full_name_t)CALL( variable3 /*i*/,COLOR_abstractmetamodel___MMLocalProperty___full_name))( variable3 /*i*/) /*MMConcreteProperty::full_name*/;
808 variable8 = variable7;
809 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable8) /*String::append*/;
810 variable9 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
811 variable10 = variable9;
812 ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable10) /*String::append*/;
813 ((file___Object___print_t)CALL( self,COLOR_file___Object___print))( self, variable4) /*MMLocalClass::print*/;
814 continue_36: while(0);
815 ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
816 }
817 break_36: while(0);
818 variable2 = NEW_string___String___init(); /*new String*/
819 variable3 = NEW_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)); /*new String*/
820 variable4 = variable3;
821 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable4) /*String::append*/;
822 variable5 = ((abstractmetamodel___MMGlobalProperty___concrete_property_hierarchy_t)CALL( variable0 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___concrete_property_hierarchy))( variable0 /*glob*/) /*MMGlobalProperty::concrete_property_hierarchy*/;
823 variable5 = ((partial_order___PartialOrder___first_t)CALL(variable5,COLOR_abstract_collection___Collection___first))(variable5) /*PartialOrder::first*/;
824 variable6 = variable5;
825 variable6 = ((string___String___to_s_t)CALL(variable6,COLOR_string___Object___to_s))(variable6) /*String::to_s*/;
826 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable6) /*String::append*/;
827 variable7 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
828 variable8 = variable7;
829 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable8) /*String::append*/;
830 ((file___Object___print_t)CALL( self,COLOR_file___Object___print))( self, variable2) /*MMLocalClass::print*/;
831 variable2 = NEW_string___String___init(); /*new String*/
832 variable3 = NEW_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)); /*new String*/
833 variable4 = variable3;
834 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable4) /*String::append*/;
835 variable5 = ((abstractmetamodel___MMGlobalProperty___concrete_property_hierarchy_t)CALL( variable0 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___concrete_property_hierarchy))( variable0 /*glob*/) /*MMGlobalProperty::concrete_property_hierarchy*/;
836 variable5 = ((partial_order___PartialOrder___to_dot_t)CALL(variable5,COLOR_partial_order___PartialOrder___to_dot))(variable5) /*PartialOrder::to_dot*/;
837 variable6 = variable5;
838 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable6) /*String::append*/;
839 variable7 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
840 variable8 = variable7;
841 ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable8) /*String::append*/;
842 ((file___Object___print_t)CALL( self,COLOR_file___Object___print))( self, variable2) /*MMLocalClass::print*/;
843 exit(UNTAG_Int( TAG_Int(1)));
844 }
845 variable3 = ((abstract_collection___IndexedCollection___first_t)CALL( variable1 /*impls*/,COLOR_abstract_collection___Collection___first))( variable1 /*impls*/) /*Array::first*/;
846 variable2 = variable3;
847 variable4 = ((abstractmetamodel___MMLocalProperty___local_class_t)CALL( variable2 /*impl*/,COLOR_abstractmetamodel___MMLocalProperty___local_class))( variable2 /*impl*/) /*MMConcreteProperty::local_class*/;
848 variable4 = ((inheritance___MMLocalClass___ancestor_for_t)CALL( self,COLOR_inheritance___MMLocalClass___ancestor_for))( self, variable4) /*MMLocalClass::ancestor_for*/;
849 variable3 = variable4;
850 variable4 = ((static_type___MMAncestor___local_class_t)CALL( variable3 /*ac*/,COLOR_static_type___MMAncestor___local_class))( variable3 /*ac*/) /*MMAncestor::local_class*/;
851 ((inheritance___MMLocalClass___inherit_global_properties_t)CALL(variable4,COLOR_inheritance___MMLocalClass___inherit_global_properties))(variable4) /*MMLocalClass::inherit_global_properties*/;
852 variable5 = ((static_type___MMAncestor___stype_t)CALL( variable3 /*ac*/,COLOR_static_type___MMAncestor___stype))( variable3 /*ac*/) /*MMAncestor::stype*/;
853 variable4 = variable5;
854 variable5 = ((static_type___MMType___local_class_t)CALL( variable4 /*a*/,COLOR_static_type___MMType___local_class))( variable4 /*a*/) /*MMType::local_class*/;
855 variable5 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable5 == self) || ((variable5 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable5,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable5, self)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable5,COLOR_kernel___Object_____eqeq))(variable5, self) /*MMLocalClass::==*/)))))));
856 if (!UNTAG_Bool(variable5)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:335,3--30\n"); nit_exit(1);}
857 variable6 = ((static_type___MMType___select_property_t)CALL( variable4 /*a*/,COLOR_static_type___MMType___select_property))( variable4 /*a*/, variable0 /*glob*/) /*MMType::select_property*/;
858 variable5 = variable6;
859 variable6 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable5 /*sup*/ == NIT_NULL /*null*/) || (( variable5 /*sup*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable5 /*sup*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable5 /*sup*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable5 /*sup*/,COLOR_kernel___Object_____eqeq))( variable5 /*sup*/, NIT_NULL /*null*/) /*MMLocalProperty::==*/)))))));
860 if (!UNTAG_Bool(variable6)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:337,3--20\n"); nit_exit(1);}
861 variable7 = ((static_type___MMLocalClass___get_type_t)CALL( self,COLOR_static_type___MMLocalClass___get_type))( self) /*MMLocalClass::get_type*/;
862 variable7 = ((inheritance___MMLocalProperty___inherit_to_t)CALL( variable5 /*sup*/,COLOR_inheritance___MMLocalProperty___inherit_to))( variable5 /*sup*/, variable7) /*MMLocalProperty::inherit_to*/;
863 variable6 = variable7;
864 variable1 = variable6 /*prop*/;
865 goto return_label35;
866 return_label35: while(false);
867 tracehead = trace.prev;
868 return variable1;
869 }
870 val_t inheritance___MMConcreteProperty___is_deferred(val_t self) {
871 struct trace_t trace = {NULL, "inheritance::MMConcreteProperty::is_deferred (src/metamodel//inheritance.nit:344,2--345:39)"};
872 val_t variable0;
873 trace.prev = tracehead; tracehead = &trace;
874 variable0 = TAG_Bool(false);
875 goto return_label37;
876 return_label37: while(false);
877 tracehead = trace.prev;
878 return variable0;
879 }
880 val_t inheritance___MMGlobalProperty___get_compatible_concrete_properties_for(val_t self, val_t param0) {
881 struct trace_t trace = {NULL, "inheritance::MMGlobalProperty::get_compatible_concrete_properties_for (src/metamodel//inheritance.nit:349,2--373:41)"};
882 val_t variable0;
883 val_t variable1;
884 val_t variable2;
885 val_t variable3;
886 val_t variable4;
887 val_t variable5;
888 val_t variable6;
889 val_t variable7;
890 val_t variable8;
891 trace.prev = tracehead; tracehead = &trace;
892 variable0 = param0;
893 variable2 = ATTR_abstractmetamodel___MMGlobalProperty____concrete_property_hierarchy( self) /*MMGlobalProperty::_concrete_property_hierarchy*/;
894 variable1 = variable2;
895 variable2 = ((partial_order___PartialOrder___length_t)CALL( variable1 /*impl_hier*/,COLOR_abstract_collection___Collection___length))( variable1 /*impl_hier*/) /*PartialOrder::length*/;
896 variable2 = TAG_Bool((variable2)==( TAG_Int(1)));
897 if (UNTAG_Bool(variable2)) { /*if*/
898 variable2 = NEW_array___Array___with_capacity(TAG_Int(1)); /*new Array[MMConcreteProperty]*/
899 variable3 = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( self,COLOR_abstractmetamodel___MMGlobalProperty___intro))( self) /*MMGlobalProperty::intro*/;
900 ((array___AbstractArray___add_t)CALL(variable2,COLOR_abstract_collection___SimpleCollection___add))(variable2, variable3) /*Array::add*/;
901 variable1 = variable2;
902 goto return_label38;
903 }
904 variable3 = NEW_array___ArraySet___init(); /*new ArraySet[MMConcreteProperty]*/
905 variable2 = variable3;
906 variable4 = ((abstractmetamodel___MMLocalClass___che_t)CALL( variable0 /*cla*/,COLOR_abstractmetamodel___MMLocalClass___che))( variable0 /*cla*/) /*MMLocalClass::che*/;
907 variable3 = variable4;
908 if (UNTAG_Bool( TAG_Bool(true))) { /*if*/
909 variable4 = ((abstractmetamodel___MMLocalClass___che_t)CALL( variable0 /*cla*/,COLOR_abstractmetamodel___MMLocalClass___che))( variable0 /*cla*/) /*MMLocalClass::che*/;
910 variable4 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable4,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable4) /*PartialOrderElement::direct_greaters*/;
911 variable4 = ((array___AbstractArray___iterator_t)CALL(variable4,COLOR_abstract_collection___Collection___iterator))(variable4) /*Array::iterator*/;
912 while (true) { /*for*/
913 variable5 = ((array___ArrayIterator___is_ok_t)CALL(variable4,COLOR_abstract_collection___Iterator___is_ok))(variable4) /*ArrayIterator::is_ok*/;
914 if (!UNTAG_Bool(variable5)) break; /*for*/
915 variable5 = ((array___ArrayIterator___item_t)CALL(variable4,COLOR_abstract_collection___Iterator___item))(variable4) /*ArrayIterator::item*/;
916 variable7 = ((inheritance___MMLocalClass_____bra_t)CALL( variable5 /*sc*/,COLOR_abstractmetamodel___MMLocalClass_____bra))( variable5 /*sc*/, self) /*MMLocalClass::[]*/;
917 variable6 = variable7;
918 variable7 = TAG_Bool(( variable6 /*p*/ == NIT_NULL /*null*/) || (( variable6 /*p*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable6 /*p*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable6 /*p*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable6 /*p*/,COLOR_kernel___Object_____eqeq))( variable6 /*p*/, NIT_NULL /*null*/) /*MMLocalProperty::==*/)))));
919 if (UNTAG_Bool(variable7)) { /*if*/
920 goto continue_39;
921 }
922 variable8 = ((abstractmetamodel___MMLocalProperty___concrete_property_t)CALL( variable6 /*p*/,COLOR_abstractmetamodel___MMLocalProperty___concrete_property))( variable6 /*p*/) /*MMLocalProperty::concrete_property*/;
923 variable7 = variable8;
924 ((array___ArraySet___add_t)CALL( variable2 /*impls*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*impls*/, variable7 /*impl*/) /*ArraySet::add*/;
925 continue_39: while(0);
926 ((array___ArrayIterator___next_t)CALL(variable4,COLOR_abstract_collection___Iterator___next))(variable4) /*ArrayIterator::next*/;
927 }
928 break_39: while(0);
929 } else { /*if*/
930 variable4 = ((partial_order___PartialOrder___iterator_t)CALL( variable1 /*impl_hier*/,COLOR_abstract_collection___Collection___iterator))( variable1 /*impl_hier*/) /*PartialOrder::iterator*/;
931 while (true) { /*for*/
932 variable5 = ((abstract_collection___Iterator___is_ok_t)CALL(variable4,COLOR_abstract_collection___Iterator___is_ok))(variable4) /*Iterator::is_ok*/;
933 if (!UNTAG_Bool(variable5)) break; /*for*/
934 variable5 = ((abstract_collection___Iterator___item_t)CALL(variable4,COLOR_abstract_collection___Iterator___item))(variable4) /*Iterator::item*/;
935 variable7 = ((abstractmetamodel___MMLocalProperty___local_class_t)CALL( variable5 /*impl*/,COLOR_abstractmetamodel___MMLocalProperty___local_class))( variable5 /*impl*/) /*MMConcreteProperty::local_class*/;
936 variable6 = variable7;
937 variable7 = ((partial_order___PartialOrderElement_____l_t)CALL( variable3 /*clache*/,COLOR_partial_order___PartialOrderElement_____l))( variable3 /*clache*/, variable6 /*bc*/) /*PartialOrderElement::<*/;
938 if (UNTAG_Bool(variable7)) { /*if*/
939 ((array___ArraySet___add_t)CALL( variable2 /*impls*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*impls*/, variable5 /*impl*/) /*ArraySet::add*/;
940 }
941 continue_40: while(0);
942 ((abstract_collection___Iterator___next_t)CALL(variable4,COLOR_abstract_collection___Iterator___next))(variable4) /*Iterator::next*/;
943 }
944 break_40: while(0);
945 }
946 variable4 = ((partial_order___PartialOrder___select_smallests_t)CALL( variable1 /*impl_hier*/,COLOR_partial_order___PartialOrder___select_smallests))( variable1 /*impl_hier*/, variable2 /*impls*/) /*PartialOrder::select_smallests*/;
947 variable1 = variable4;
948 goto return_label38;
949 return_label38: while(false);
950 tracehead = trace.prev;
951 return variable1;
952 }
953 void inheritance___MMLocalProperty___inherit_global(val_t self, val_t param0) {
954 struct trace_t trace = {NULL, "inheritance::MMLocalProperty::inherit_global (src/metamodel//inheritance.nit:378,2--383:97)"};
955 val_t variable0;
956 val_t variable1;
957 val_t variable2;
958 trace.prev = tracehead; tracehead = &trace;
959 variable0 = param0;
960 ((abstractmetamodel___MMLocalProperty___set_global_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___set_global))( self, variable0 /*g*/) /*MMLocalProperty::set_global*/;
961 variable1 = ((abstractmetamodel___MMLocalProperty___concrete_property_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___concrete_property))( self) /*MMLocalProperty::concrete_property*/;
962 variable2 = ((abstractmetamodel___MMLocalProperty___local_class_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___local_class))( self) /*MMLocalProperty::local_class*/;
963 variable2 = ((inheritance___MMGlobalProperty___get_compatible_concrete_properties_for_t)CALL( variable0 /*g*/,COLOR_inheritance___MMGlobalProperty___get_compatible_concrete_properties_for))( variable0 /*g*/, variable2) /*MMGlobalProperty::get_compatible_concrete_properties_for*/;
964 ((abstractmetamodel___MMGlobalProperty___add_concrete_property_t)CALL( variable0 /*g*/,COLOR_abstractmetamodel___MMGlobalProperty___add_concrete_property))( variable0 /*g*/, variable1, variable2) /*MMGlobalProperty::add_concrete_property*/;
965 tracehead = trace.prev;
966 return;
967 }
968 val_t inheritance___MMLocalProperty___inherit_to(val_t self, val_t param0) {
969 struct trace_t trace = {NULL, "inheritance::MMLocalProperty::inherit_to (src/metamodel//inheritance.nit:386,2--387:44)"};
970 trace.prev = tracehead; tracehead = &trace;
971 fprintf(stderr, "Deferred method inherit_to called (src/metamodel//inheritance.nit:386,2)\n");
972 nit_exit(1);
973 tracehead = trace.prev;
974 return NIT_NULL;
975 }
976 void inheritance___MMLocalProperty___inherit_from(val_t self, val_t param0, val_t param1) {
977 struct trace_t trace = {NULL, "inheritance::MMLocalProperty::inherit_from (src/metamodel//inheritance.nit:389,2--395:22)"};
978 val_t variable0;
979 val_t variable1;
980 val_t variable2;
981 trace.prev = tracehead; tracehead = &trace;
982 variable0 = param0;
983 variable1 = param1;
984 variable2 = ATTR_abstractmetamodel___MMLocalProperty____super_prop( self) /*MMLocalProperty::_super_prop*/;
985 variable2 = TAG_Bool((variable2 == NIT_NULL /*null*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, NIT_NULL /*null*/) /*MMLocalProperty::==*/)))));
986 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:392,3--28\n"); nit_exit(1);}
987 ATTR_abstractmetamodel___MMLocalProperty____super_prop( self) /*MMLocalProperty::_super_prop*/ = variable0 /*s*/;
988 variable2 = ATTR_abstractmetamodel___MMLocalProperty____global( self) /*MMLocalProperty::_global*/;
989 variable2 = TAG_Bool((variable2 == NIT_NULL /*null*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, NIT_NULL /*null*/) /*MMGlobalProperty::==*/)))));
990 if (UNTAG_Bool(variable2)) { /*if*/
991 variable2 = ((abstractmetamodel___MMLocalProperty___global_t)CALL( variable0 /*s*/,COLOR_abstractmetamodel___MMLocalProperty___global))( variable0 /*s*/) /*MMLocalProperty::global*/;
992 ((abstractmetamodel___MMLocalProperty___set_global_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___set_global))( self, variable2) /*MMLocalProperty::set_global*/;
993 }
994 tracehead = trace.prev;
995 return;
996 }
997 val_t inheritance___MMMethod___inherit_to(val_t self, val_t param0) {
998 struct trace_t trace = {NULL, "inheritance::MMMethod::inherit_to (src/metamodel//inheritance.nit:402,2--403:37)"};
999 val_t variable0;
1000 val_t variable1;
1001 trace.prev = tracehead; tracehead = &trace;
1002 variable0 = param0;
1003 variable1 = NEW_inheritance___MMImplicitMethod___init( self, variable0 /*t*/); /*new MMImplicitMethod*/
1004 goto return_label43;
1005 return_label43: while(false);
1006 tracehead = trace.prev;
1007 return variable1;
1008 }
1009 void inheritance___MMImplicitProperty___init(val_t self, val_t param0, val_t param1, int* init_table) {
1010 struct trace_t trace = {NULL, "inheritance::MMImplicitProperty::init (src/metamodel//inheritance.nit:410,2--414:23)"};
1011 val_t variable0;
1012 val_t variable1;
1013 val_t variable2;
1014 val_t variable3;
1015 val_t variable4;
1016 trace.prev = tracehead; tracehead = &trace;
1017 variable0 = param0;
1018 variable1 = param1;
1019 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitProperty].i]) return;
1020 variable2 = ((abstractmetamodel___MMLocalProperty___name_t)CALL( variable0 /*prop*/,COLOR_abstractmetamodel___MMLocalProperty___name))( variable0 /*prop*/) /*MMLocalProperty::name*/;
1021 variable3 = ((static_type___MMType___local_class_t)CALL( variable1 /*bt*/,COLOR_static_type___MMType___local_class))( variable1 /*bt*/) /*MMType::local_class*/;
1022 variable4 = ((abstractmetamodel___MMLocalProperty___concrete_property_t)CALL( variable0 /*prop*/,COLOR_abstractmetamodel___MMLocalProperty___concrete_property))( variable0 /*prop*/) /*MMLocalProperty::concrete_property*/;
1023 ((abstractmetamodel___MMLocalProperty___init_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___init))( self, variable2, variable3, variable4, init_table /*YYY*/) /*MMLocalProperty::init*/;
1024 ((inheritance___MMLocalProperty___inherit_from_t)CALL( self,COLOR_inheritance___MMLocalProperty___inherit_from))( self, variable0 /*prop*/, variable1 /*bt*/) /*MMImplicitProperty::inherit_from*/;
1025 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitProperty].i] = 1;
1026 tracehead = trace.prev;
1027 return;
1028 }
1029 void inheritance___MMImplicitMethod___init(val_t self, val_t param0, val_t param1, int* init_table) {
1030 struct trace_t trace = {NULL, "inheritance::MMImplicitMethod::init (src/metamodel//inheritance.nit:421,2--20)"};
1031 val_t variable0;
1032 val_t variable1;
1033 trace.prev = tracehead; tracehead = &trace;
1034 variable0 = param0;
1035 variable1 = param1;
1036 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitMethod].i]) return;
1037 ((inheritance___MMImplicitProperty___init_t)CALL( self,COLOR_inheritance___MMImplicitProperty___init))( self, param0, param1, init_table /*YYY*/) /*MMImplicitProperty::init*/;
1038 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitMethod].i] = 1;
1039 tracehead = trace.prev;
1040 return;
1041 }
1042 val_t inheritance___MMAttribute___inherit_to(val_t self, val_t param0) {
1043 struct trace_t trace = {NULL, "inheritance::MMAttribute::inherit_to (src/metamodel//inheritance.nit:425,2--427:39)"};
1044 val_t variable0;
1045 val_t variable1;
1046 trace.prev = tracehead; tracehead = &trace;
1047 variable0 = param0;
1048 variable1 = NEW_inheritance___MMImplicitAttribute___init( self, variable0 /*t*/); /*new MMImplicitAttribute*/
1049 goto return_label46;
1050 return_label46: while(false);
1051 tracehead = trace.prev;
1052 return variable1;
1053 }
1054 void inheritance___MMImplicitAttribute___init(val_t self, val_t param0, val_t param1, int* init_table) {
1055 struct trace_t trace = {NULL, "inheritance::MMImplicitAttribute::init (src/metamodel//inheritance.nit:434,2--20)"};
1056 val_t variable0;
1057 val_t variable1;
1058 trace.prev = tracehead; tracehead = &trace;
1059 variable0 = param0;
1060 variable1 = param1;
1061 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitAttribute].i]) return;
1062 ((inheritance___MMImplicitProperty___init_t)CALL( self,COLOR_inheritance___MMImplicitProperty___init))( self, param0, param1, init_table /*YYY*/) /*MMImplicitProperty::init*/;
1063 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitAttribute].i] = 1;
1064 tracehead = trace.prev;
1065 return;
1066 }
1067 void inheritance___MMAncestor___add_in(val_t self, val_t param0) {
1068 struct trace_t trace = {NULL, "inheritance::MMAncestor::add_in (src/metamodel//inheritance.nit:438,2--456:43)"};
1069 val_t variable0;
1070 val_t variable1;
1071 val_t variable2;
1072 val_t variable3;
1073 val_t variable4;
1074 val_t variable5;
1075 val_t variable6;
1076 val_t variable7;
1077 val_t variable8;
1078 trace.prev = tracehead; tracehead = &trace;
1079 variable0 = param0;
1080 variable1 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
1081 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*MMType::==*/)))))));
1082 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert 'ancestor' failed: src/metamodel//inheritance.nit:441,3--32\n"); nit_exit(1);}
1083 variable1 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
1084 variable1 = ((static_type___MMType___local_class_t)CALL(variable1,COLOR_static_type___MMType___local_class))(variable1) /*MMType::local_class*/;
1085 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*MMLocalClass::==*/)))))));
1086 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert 'local_class' failed: src/metamodel//inheritance.nit:442,3--47\n"); nit_exit(1);}
1087 ((array___AbstractArray___add_t)CALL( variable0 /*tab*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*tab*/, self) /*Array::add*/;
1088 variable1 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
1089 variable1 = ((static_type___MMType___local_class_t)CALL(variable1,COLOR_static_type___MMType___local_class))(variable1) /*MMType::local_class*/;
1090 ((inheritance___MMLocalClass___compute_ancestors_t)CALL(variable1,COLOR_inheritance___MMLocalClass___compute_ancestors))(variable1) /*MMLocalClass::compute_ancestors*/;
1091 variable1 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
1092 variable1 = ((static_type___MMType___local_class_t)CALL(variable1,COLOR_static_type___MMType___local_class))(variable1) /*MMType::local_class*/;
1093 variable1 = ((static_type___MMLocalClass___ancestors_t)CALL(variable1,COLOR_static_type___MMLocalClass___ancestors))(variable1) /*MMLocalClass::ancestors*/;
1094 variable1 = ((abstract_collection___Map___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Map::iterator*/;
1095 while (true) { /*for*/
1096 variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*MapIterator::is_ok*/;
1097 if (!UNTAG_Bool(variable2)) break; /*for*/
1098 variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*MapIterator::item*/;
1099 variable4 = ((static_type___MMAncestor___stype_t)CALL( variable2 /*anc*/,COLOR_static_type___MMAncestor___stype))( variable2 /*anc*/) /*MMAncestor::stype*/;
1100 variable5 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
1101 variable5 = ((static_type___MMType___module_t)CALL(variable5,COLOR_static_type___MMType___module))(variable5) /*MMType::module*/;
1102 variable4 = ((static_type___MMType___for_module_t)CALL(variable4,COLOR_static_type___MMType___for_module))(variable4, variable5) /*MMType::for_module*/;
1103 variable3 = variable4;
1104 variable5 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
1105 variable5 = ((static_type___MMType___adapt_to_t)CALL( variable3 /*aaa*/,COLOR_static_type___MMType___adapt_to))( variable3 /*aaa*/, variable5) /*MMType::adapt_to*/;
1106 variable6 = ((static_type___MMAncestor___inheriter_t)CALL( self,COLOR_static_type___MMAncestor___inheriter))( self) /*MMAncestor::inheriter*/;
1107 variable6 = ((static_type___MMType___module_t)CALL(variable6,COLOR_static_type___MMType___module))(variable6) /*MMType::module*/;
1108 variable5 = ((static_type___MMType___for_module_t)CALL(variable5,COLOR_static_type___MMType___for_module))(variable5, variable6) /*MMType::for_module*/;
1109 variable4 = variable5;
1110 variable5 = ((static_type___MMType___local_class_t)CALL( variable4 /*a*/,COLOR_static_type___MMType___local_class))( variable4 /*a*/) /*MMType::local_class*/;
1111 variable6 = ((static_type___MMAncestor___inheriter_t)CALL( self,COLOR_static_type___MMAncestor___inheriter))( self) /*MMAncestor::inheriter*/;
1112 variable6 = ((static_type___MMType___local_class_t)CALL(variable6,COLOR_static_type___MMType___local_class))(variable6) /*MMType::local_class*/;
1113 variable5 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable5 == variable6) || ((variable5 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable5,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable5,variable6)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable5,COLOR_kernel___Object_____eqeq))(variable5, variable6) /*MMLocalClass::==*/)))))));
1114 if (UNTAG_Bool(variable5)) { /*if*/
1115 variable6 = ((array___AbstractArray___iterator_t)CALL( variable0 /*tab*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*tab*/) /*Array::iterator*/;
1116 variable5 = variable6;
1117 variable6 = TAG_Bool(true);
1118 while (true) { /*while*/
1119 variable7 = ((array___ArrayIterator___is_ok_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___is_ok))( variable5 /*it*/) /*ArrayIterator::is_ok*/;
1120 variable8 = variable7;
1121 if (UNTAG_Bool(variable8)) { /* and */
1122 variable8 = variable6 /*b*/;
1123 }
1124 variable7 = variable8;
1125 if (!UNTAG_Bool(variable7)) break; /* while*/
1126 variable7 = ((array___ArrayIterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*ArrayIterator::item*/;
1127 variable7 = ((static_type___MMAncestor___inheriter_t)CALL(variable7,COLOR_static_type___MMAncestor___inheriter))(variable7) /*MMAncestor::inheriter*/;
1128 variable8 = ((static_type___MMAncestor___inheriter_t)CALL( self,COLOR_static_type___MMAncestor___inheriter))( self) /*MMAncestor::inheriter*/;
1129 variable7 = TAG_Bool((variable7 == variable8) || ((variable7 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable7,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable7,variable8)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable7,COLOR_kernel___Object_____eqeq))(variable7, variable8) /*MMType::==*/)))));
1130 variable8 = variable7;
1131 if (UNTAG_Bool(variable8)) { /* and */
1132 variable8 = ((array___ArrayIterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*ArrayIterator::item*/;
1133 variable8 = ((static_type___MMAncestor___stype_t)CALL(variable8,COLOR_static_type___MMAncestor___stype))(variable8) /*MMAncestor::stype*/;
1134 variable8 = TAG_Bool((variable8 == variable4 /*a*/) || ((variable8 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable8,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable8, variable4 /*a*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable8,COLOR_kernel___Object_____eqeq))(variable8, variable4 /*a*/) /*MMType::==*/)))));
1135 }
1136 variable7 = variable8;
1137 variable6 = TAG_Bool(!UNTAG_Bool(variable7)) /*b=*/;
1138 ((array___ArrayIterator___next_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___next))( variable5 /*it*/) /*ArrayIterator::next*/;
1139 continue_50: while(0);
1140 }
1141 break_50: while(0);
1142 if (UNTAG_Bool( variable6 /*b*/)) { /*if*/
1143 variable7 = ((static_type___MMAncestor___inheriter_t)CALL( self,COLOR_static_type___MMAncestor___inheriter))( self) /*MMAncestor::inheriter*/;
1144 variable8 = NEW_inheritance___MMSpecAncestor___init(variable7, variable4 /*a*/); /*new MMSpecAncestor*/
1145 variable7 = variable8;
1146 ((array___AbstractArray___add_t)CALL( variable0 /*tab*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*tab*/, variable7) /*Array::add*/;
1147 }
1148 }
1149 continue_49: while(0);
1150 ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*MapIterator::next*/;
1151 }
1152 break_49: while(0);
1153 tracehead = trace.prev;
1154 return;
1155 }
1156 void inheritance___MMImplicitLocalClass___init(val_t self, val_t param0, val_t param1, int* init_table) {
1157 struct trace_t trace = {NULL, "inheritance::MMImplicitLocalClass::init (src/metamodel//inheritance.nit:468,2--473:14)"};
1158 val_t variable0;
1159 val_t variable1;
1160 val_t variable2;
1161 val_t variable3;
1162 val_t variable4;
1163 trace.prev = tracehead; tracehead = &trace;
1164 variable0 = param0;
1165 variable1 = param1;
1166 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitLocalClass].i]) return;
1167 variable3 = ((abstractmetamodel___MMGlobalClass___intro_t)CALL( variable1 /*g*/,COLOR_abstractmetamodel___MMGlobalClass___intro))( variable1 /*g*/) /*MMGlobalClass::intro*/;
1168 variable2 = variable3;
1169 variable3 = ((abstractmetamodel___MMLocalClass___name_t)CALL( variable2 /*cla*/,COLOR_abstractmetamodel___MMLocalClass___name))( variable2 /*cla*/) /*MMLocalClass::name*/;
1170 variable4 = ((abstractmetamodel___MMLocalClass___arity_t)CALL( variable2 /*cla*/,COLOR_abstractmetamodel___MMLocalClass___arity))( variable2 /*cla*/) /*MMLocalClass::arity*/;
1171 ((abstractmetamodel___MMLocalClass___init_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___init))( self, variable3, variable4, init_table /*YYY*/) /*MMLocalClass::init*/;
1172 ((abstractmetamodel___MMModule___add_local_class_t)CALL( variable0 /*mod*/,COLOR_abstractmetamodel___MMModule___add_local_class))( variable0 /*mod*/, self) /*MMModule::add_local_class*/;
1173 ((abstractmetamodel___MMLocalClass___set_global_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___set_global))( self, variable1 /*g*/) /*MMImplicitLocalClass::set_global*/;
1174 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitLocalClass].i] = 1;
1175 tracehead = trace.prev;
1176 return;
1177 }
1178 val_t inheritance___MMRefineAncestor___local_class(val_t self) {
1179 struct trace_t trace = {NULL, "inheritance::MMRefineAncestor::local_class (src/metamodel//inheritance.nit:479,2--47)"};
1180 trace.prev = tracehead; tracehead = &trace;
1181 tracehead = trace.prev;
1182 return ATTR_inheritance___MMRefineAncestor____local_class( self) /*MMRefineAncestor::_local_class*/;
1183 }
1184 void inheritance___MMRefineAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
1185 struct trace_t trace = {NULL, "inheritance::MMRefineAncestor::init (src/metamodel//inheritance.nit:481,2--485:31)"};
1186 val_t variable0;
1187 val_t variable1;
1188 val_t variable2;
1189 trace.prev = tracehead; tracehead = &trace;
1190 variable0 = param0;
1191 variable1 = param1;
1192 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMRefineAncestor].i]) return;
1193 ATTR_inheritance___MMRefineAncestor____local_class( self) /*MMRefineAncestor::_local_class*/ = variable1 /*a*/;
1194 variable2 = ((static_type___MMLocalClass___get_type_t)CALL( variable0 /*b*/,COLOR_static_type___MMLocalClass___get_type))( variable0 /*b*/) /*MMLocalClass::get_type*/;
1195 ((static_type___MMAncestor___inheriter__eq_t)CALL( self,COLOR_static_type___MMAncestor___inheriter__eq))( self, variable2) /*MMRefineAncestor::inheriter=*/;
1196 variable2 = ATTR_inheritance___MMRefineAncestor____local_class( self) /*MMRefineAncestor::_local_class*/;
1197 variable2 = ((static_type___MMLocalClass___get_type_t)CALL(variable2,COLOR_static_type___MMLocalClass___get_type))(variable2) /*MMLocalClass::get_type*/;
1198 ((static_type___MMAncestor___stype__eq_t)CALL( self,COLOR_static_type___MMAncestor___stype__eq))( self, variable2) /*MMRefineAncestor::stype=*/;
1199 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMRefineAncestor].i] = 1;
1200 tracehead = trace.prev;
1201 return;
1202 }
1203 val_t inheritance___MMSpecAncestor___local_class(val_t self) {
1204 struct trace_t trace = {NULL, "inheritance::MMSpecAncestor::local_class (src/metamodel//inheritance.nit:492,2--51)"};
1205 val_t variable0;
1206 trace.prev = tracehead; tracehead = &trace;
1207 variable0 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMSpecAncestor::stype*/;
1208 variable0 = ((static_type___MMType___local_class_t)CALL(variable0,COLOR_static_type___MMType___local_class))(variable0) /*MMType::local_class*/;
1209 goto return_label53;
1210 return_label53: while(false);
1211 tracehead = trace.prev;
1212 return variable0;
1213 }
1214 void inheritance___MMSpecAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
1215 struct trace_t trace = {NULL, "inheritance::MMSpecAncestor::init (src/metamodel//inheritance.nit:494,2--497:16)"};
1216 val_t variable0;
1217 val_t variable1;
1218 trace.prev = tracehead; tracehead = &trace;
1219 variable0 = param0;
1220 variable1 = param1;
1221 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMSpecAncestor].i]) return;
1222 ATTR_static_type___MMAncestor____inheriter( self) /*MMSpecAncestor::_inheriter*/ = variable0 /*inheriter*/;
1223 ATTR_static_type___MMAncestor____stype( self) /*MMSpecAncestor::_stype*/ = variable1 /*stype*/;
1224 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMSpecAncestor].i] = 1;
1225 tracehead = trace.prev;
1226 return;
1227 }
1228 val_t inheritance___MMDefaultAncestor___local_class(val_t self) {
1229 struct trace_t trace = {NULL, "inheritance::MMDefaultAncestor::local_class (src/metamodel//inheritance.nit:503,2--51)"};
1230 val_t variable0;
1231 trace.prev = tracehead; tracehead = &trace;
1232 variable0 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMDefaultAncestor::stype*/;
1233 variable0 = ((static_type___MMType___local_class_t)CALL(variable0,COLOR_static_type___MMType___local_class))(variable0) /*MMType::local_class*/;
1234 goto return_label55;
1235 return_label55: while(false);
1236 tracehead = trace.prev;
1237 return variable0;
1238 }
1239 void inheritance___MMDefaultAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
1240 struct trace_t trace = {NULL, "inheritance::MMDefaultAncestor::init (src/metamodel//inheritance.nit:505,2--511:13)"};
1241 val_t variable0;
1242 val_t variable1;
1243 val_t variable2;
1244 trace.prev = tracehead; tracehead = &trace;
1245 variable0 = param0;
1246 variable1 = param1;
1247 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMDefaultAncestor].i]) return;
1248 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*b*/ == NIT_NULL /*null*/) || (( variable0 /*b*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*b*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*b*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*b*/,COLOR_kernel___Object_____eqeq))( variable0 /*b*/, NIT_NULL /*null*/) /*MMLocalClass::==*/)))))));
1249 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:507,3--18\n"); nit_exit(1);}
1250 variable2 = ((abstractmetamodel___MMLocalClass___module_t)CALL( variable0 /*b*/,COLOR_abstractmetamodel___MMLocalClass___module))( variable0 /*b*/) /*MMLocalClass::module*/;
1251 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable2 == NIT_NULL /*null*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, NIT_NULL /*null*/) /*MMModule::==*/)))))));
1252 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:508,3--25\n"); nit_exit(1);}
1253 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable1 /*anc*/ == NIT_NULL /*null*/) || (( variable1 /*anc*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*anc*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*anc*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*anc*/,COLOR_kernel___Object_____eqeq))( variable1 /*anc*/, NIT_NULL /*null*/) /*MMType::==*/)))))));
1254 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:509,3--20\n"); nit_exit(1);}
1255 variable2 = ((static_type___MMLocalClass___get_type_t)CALL( variable0 /*b*/,COLOR_static_type___MMLocalClass___get_type))( variable0 /*b*/) /*MMLocalClass::get_type*/;
1256 ((static_type___MMAncestor___inheriter__eq_t)CALL( self,COLOR_static_type___MMAncestor___inheriter__eq))( self, variable2) /*MMDefaultAncestor::inheriter=*/;
1257 ((static_type___MMAncestor___stype__eq_t)CALL( self,COLOR_static_type___MMAncestor___stype__eq))( self, variable1 /*anc*/) /*MMDefaultAncestor::stype=*/;
1258 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMDefaultAncestor].i] = 1;
1259 tracehead = trace.prev;
1260 return;
1261 }