First NIT release and new clean mercurial repository
[nit.git] / c_src / genericity._sep.c
1 #include "genericity._sep.h"
2 val_t genericity___MMLocalClass___get_formal(val_t self, val_t param0) {
3 struct trace_t trace = {NULL, "genericity::MMLocalClass::get_formal (src/metamodel//genericity.nit:25,2--28:26)"};
4 val_t variable0;
5 val_t variable1;
6 val_t variable2;
7 val_t variable3;
8 val_t variable4;
9 trace.prev = tracehead; tracehead = &trace;
10 variable0 = param0;
11 variable1 = ((genericity___MMLocalClass___formals_types_t)CALL( self,COLOR_genericity___MMLocalClass___formals_types))( self) /*MMLocalClass::formals_types*/;
12 variable2 = variable0 /*pos*/;
13 variable3 = TAG_Bool(UNTAG_Int( variable2 /*index*/)>=UNTAG_Int( TAG_Int(0)));
14 variable4 = variable3;
15 if (UNTAG_Bool(variable4)) { /* and */
16 variable4 = variable1;
17 variable4 = ATTR_array___AbstractArray____length(variable4) /*Array::_length*/;
18 variable4 = TAG_Bool(UNTAG_Int( variable2 /*index*/)<UNTAG_Int(variable4));
19 }
20 variable3 = variable4;
21 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert 'index' failed: bin/../lib/standard//array.nit:229,3--46\n"); nit_exit(1);}
22 variable3 = variable1;
23 variable3 = ATTR_array___Array____items(variable3) /*Array::_items*/;
24 variable3 = UNBOX_NativeArray(variable3)[UNTAG_Int( variable2 /*index*/)];
25 goto return_label1;
26 return_label1: while(false);
27 variable1 = variable3;
28 goto return_label0;
29 return_label0: while(false);
30 tracehead = trace.prev;
31 return variable1;
32 }
33 void genericity___MMLocalClass___register_formal(val_t self, val_t param0) {
34 struct trace_t trace = {NULL, "genericity::MMLocalClass::register_formal (src/metamodel//genericity.nit:31,2--37:22)"};
35 val_t variable0;
36 val_t variable1;
37 val_t variable2;
38 trace.prev = tracehead; tracehead = &trace;
39 variable0 = param0;
40 variable1 = ((genericity___MMTypeFormalParameter___def_class_t)CALL( variable0 /*f*/,COLOR_genericity___MMTypeFormalParameter___def_class))( variable0 /*f*/) /*MMTypeFormalParameter::def_class*/;
41 variable1 = TAG_Bool((variable1 == self) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, self)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, self) /*MMLocalClass::==*/)))));
42 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:35,3--28\n"); nit_exit(1);}
43 variable1 = ((genericity___MMTypeFormalParameter___position_t)CALL( variable0 /*f*/,COLOR_genericity___MMTypeFormalParameter___position))( variable0 /*f*/) /*MMTypeFormalParameter::position*/;
44 variable2 = ATTR_genericity___MMLocalClass____formals_types( self) /*MMLocalClass::_formals_types*/;
45 variable2 = ((array___AbstractArray___length_t)CALL(variable2,COLOR_abstract_collection___Collection___length))(variable2) /*Array::length*/;
46 variable1 = TAG_Bool((variable1)==(variable2));
47 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:36,3--44\n"); nit_exit(1);}
48 variable1 = ATTR_genericity___MMLocalClass____formals_types( self) /*MMLocalClass::_formals_types*/;
49 ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable0 /*f*/) /*Array::add*/;
50 tracehead = trace.prev;
51 return;
52 }
53 val_t genericity___MMLocalClass___get_instantiate_type(val_t self, val_t param0) {
54 struct trace_t trace = {NULL, "genericity::MMLocalClass::get_instantiate_type (src/metamodel//genericity.nit:43,2--51:10)"};
55 val_t variable0;
56 val_t variable1;
57 val_t variable2;
58 val_t variable3;
59 trace.prev = tracehead; tracehead = &trace;
60 variable0 = param0;
61 variable1 = ATTR_genericity___MMLocalClass____types( self) /*MMLocalClass::_types*/;
62 variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
63 while (true) { /*for*/
64 variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
65 if (!UNTAG_Bool(variable2)) break; /*for*/
66 variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
67 variable3 = ((genericity___MMTypeGeneric___params_equals_t)CALL( variable2 /*g*/,COLOR_genericity___MMTypeGeneric___params_equals))( variable2 /*g*/, variable0 /*t*/) /*MMTypeGeneric::params_equals*/;
68 if (UNTAG_Bool(variable3)) { /*if*/
69 variable1 = variable2 /*g*/;
70 goto return_label3;
71 }
72 continue_4: while(0);
73 ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
74 }
75 break_4: while(0);
76 variable2 = NEW_genericity___MMTypeGeneric___init( self, variable0 /*t*/); /*new MMTypeGeneric*/
77 variable1 = variable2;
78 variable2 = ATTR_genericity___MMLocalClass____types( self) /*MMLocalClass::_types*/;
79 ((array___AbstractArray___add_t)CALL(variable2,COLOR_abstract_collection___SimpleCollection___add))(variable2, variable1 /*g*/) /*Array::add*/;
80 variable1 = variable1 /*g*/;
81 goto return_label3;
82 return_label3: while(false);
83 tracehead = trace.prev;
84 return variable1;
85 }
86 val_t genericity___MMLocalClass___formals_types(val_t self) {
87 struct trace_t trace = {NULL, "genericity::MMLocalClass::formals_types (src/metamodel//genericity.nit:57,2--77:23)"};
88 val_t variable0;
89 val_t variable1;
90 val_t variable2;
91 val_t variable3;
92 val_t variable4;
93 val_t variable5;
94 val_t variable6;
95 val_t variable7;
96 trace.prev = tracehead; tracehead = &trace;
97 variable0 = ATTR_genericity___MMLocalClass____formals_types( self) /*MMLocalClass::_formals_types*/;
98 variable0 = ((array___AbstractArray___is_empty_t)CALL(variable0,COLOR_abstract_collection___Collection___is_empty))(variable0) /*Array::is_empty*/;
99 if (UNTAG_Bool(variable0)) { /*if*/
100 variable0 = TAG_Bool(( self==NIT_NULL) || VAL_ISA( self, COLOR_MMConcreteClass, ID_MMConcreteClass)) /*cast MMConcreteClass*/;
101 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable0)))) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:62,4--38\n"); nit_exit(1);}
102 variable0 = ((abstractmetamodel___MMLocalClass___arity_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___arity))( self) /*MMLocalClass::arity*/;
103 variable1 = NEW_range___Range___without_last( TAG_Int(0), variable0); /*new Range[Int]*/
104 variable0 = variable1;
105 variable0 = ((range___Range___iterator_t)CALL(variable0,COLOR_abstract_collection___Collection___iterator))(variable0) /*Range::iterator*/;
106 while (true) { /*for*/
107 variable1 = ((abstract_collection___Iterator___is_ok_t)CALL(variable0,COLOR_abstract_collection___Iterator___is_ok))(variable0) /*Iterator::is_ok*/;
108 if (!UNTAG_Bool(variable1)) break; /*for*/
109 variable1 = ((abstract_collection___Iterator___item_t)CALL(variable0,COLOR_abstract_collection___Iterator___item))(variable0) /*Iterator::item*/;
110 variable3 = ((abstractmetamodel___MMLocalClass___global_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___global))( self) /*MMLocalClass::global*/;
111 variable3 = ((abstractmetamodel___MMGlobalClass___intro_t)CALL(variable3,COLOR_abstractmetamodel___MMGlobalClass___intro))(variable3) /*MMGlobalClass::intro*/;
112 variable3 = ((genericity___MMLocalClass___get_formal_t)CALL(variable3,COLOR_genericity___MMLocalClass___get_formal))(variable3, variable1 /*i*/) /*MMLocalClass::get_formal*/;
113 variable2 = variable3;
114 variable4 = ((type_formal___MMTypeFormal___name_t)CALL( variable2 /*oft*/,COLOR_type_formal___MMTypeFormal___name))( variable2 /*oft*/) /*MMTypeFormalParameter::name*/;
115 variable5 = NEW_genericity___MMTypeFormalParameter___init(variable4, variable1 /*i*/, self); /*new MMTypeFormalParameter*/
116 variable4 = variable5;
117 variable3 = variable4;
118 ((genericity___MMLocalClass___register_formal_t)CALL( self,COLOR_genericity___MMLocalClass___register_formal))( self, variable3 /*ft*/) /*MMLocalClass::register_formal*/;
119 continue_6: while(0);
120 ((abstract_collection___Iterator___next_t)CALL(variable0,COLOR_abstract_collection___Iterator___next))(variable0) /*Iterator::next*/;
121 }
122 break_6: while(0);
123 variable0 = ((abstractmetamodel___MMLocalClass___arity_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___arity))( self) /*MMLocalClass::arity*/;
124 variable1 = NEW_range___Range___without_last( TAG_Int(0), variable0); /*new Range[Int]*/
125 variable0 = variable1;
126 variable0 = ((range___Range___iterator_t)CALL(variable0,COLOR_abstract_collection___Collection___iterator))(variable0) /*Range::iterator*/;
127 while (true) { /*for*/
128 variable1 = ((abstract_collection___Iterator___is_ok_t)CALL(variable0,COLOR_abstract_collection___Iterator___is_ok))(variable0) /*Iterator::is_ok*/;
129 if (!UNTAG_Bool(variable1)) break; /*for*/
130 variable1 = ((abstract_collection___Iterator___item_t)CALL(variable0,COLOR_abstract_collection___Iterator___item))(variable0) /*Iterator::item*/;
131 variable3 = ((abstractmetamodel___MMLocalClass___global_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___global))( self) /*MMLocalClass::global*/;
132 variable3 = ((abstractmetamodel___MMGlobalClass___intro_t)CALL(variable3,COLOR_abstractmetamodel___MMGlobalClass___intro))(variable3) /*MMGlobalClass::intro*/;
133 variable3 = ((genericity___MMLocalClass___get_formal_t)CALL(variable3,COLOR_genericity___MMLocalClass___get_formal))(variable3, variable1 /*i*/) /*MMLocalClass::get_formal*/;
134 variable2 = variable3;
135 variable4 = ATTR_genericity___MMLocalClass____formals_types( self) /*MMLocalClass::_formals_types*/;
136 variable5 = variable1 /*i*/;
137 variable6 = TAG_Bool(UNTAG_Int( variable5 /*index*/)>=UNTAG_Int( TAG_Int(0)));
138 variable7 = variable6;
139 if (UNTAG_Bool(variable7)) { /* and */
140 variable7 = variable4;
141 variable7 = ATTR_array___AbstractArray____length(variable7) /*Array::_length*/;
142 variable7 = TAG_Bool(UNTAG_Int( variable5 /*index*/)<UNTAG_Int(variable7));
143 }
144 variable6 = variable7;
145 if (!UNTAG_Bool(variable6)) { fprintf(stderr, "Assert 'index' failed: bin/../lib/standard//array.nit:229,3--46\n"); nit_exit(1);}
146 variable6 = variable4;
147 variable6 = ATTR_array___Array____items(variable6) /*Array::_items*/;
148 variable6 = UNBOX_NativeArray(variable6)[UNTAG_Int( variable5 /*index*/)];
149 goto return_label8;
150 return_label8: while(false);
151 variable4 = variable6;
152 variable3 = variable4;
153 variable4 = ((type_formal___MMTypeFormal___bound_t)CALL( variable2 /*oft*/,COLOR_type_formal___MMTypeFormal___bound))( variable2 /*oft*/) /*MMTypeFormalParameter::bound*/;
154 variable5 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
155 variable4 = ((static_type___MMType___for_module_t)CALL(variable4,COLOR_static_type___MMType___for_module))(variable4, variable5) /*MMType::for_module*/;
156 ((genericity___MMTypeFormalParameter___bound__eq_t)CALL( variable3 /*ft*/,COLOR_genericity___MMTypeFormalParameter___bound__eq))( variable3 /*ft*/, variable4) /*MMTypeFormalParameter::bound=*/;
157 continue_7: while(0);
158 ((abstract_collection___Iterator___next_t)CALL(variable0,COLOR_abstract_collection___Iterator___next))(variable0) /*Iterator::next*/;
159 }
160 break_7: while(0);
161 }
162 variable0 = ATTR_genericity___MMLocalClass____formals_types( self) /*MMLocalClass::_formals_types*/;
163 goto return_label5;
164 return_label5: while(false);
165 tracehead = trace.prev;
166 return variable0;
167 }
168 val_t genericity___MMLocalClass___get_type(val_t self) {
169 struct trace_t trace = {NULL, "genericity::MMLocalClass::get_type (src/metamodel//genericity.nit:80,2--86:15)"};
170 val_t variable0;
171 val_t variable1;
172 trace.prev = tracehead; tracehead = &trace;
173 variable0 = ATTR_static_type___MMLocalClass____base_type_cache( self) /*MMLocalClass::_base_type_cache*/;
174 variable0 = 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*/) /*MMType::==*/)))));
175 variable1 = variable0;
176 if (UNTAG_Bool(variable1)) { /* and */
177 variable1 = ((genericity___MMLocalClass___is_generic_t)CALL( self,COLOR_genericity___MMLocalClass___is_generic))( self) /*MMLocalClass::is_generic*/;
178 }
179 variable0 = variable1;
180 if (UNTAG_Bool(variable0)) { /*if*/
181 variable0 = ((genericity___MMLocalClass___formals_types_t)CALL( self,COLOR_genericity___MMLocalClass___formals_types))( self) /*MMLocalClass::formals_types*/;
182 variable0 = ((genericity___MMLocalClass___get_instantiate_type_t)CALL( self,COLOR_genericity___MMLocalClass___get_instantiate_type))( self, variable0) /*MMLocalClass::get_instantiate_type*/;
183 ATTR_static_type___MMLocalClass____base_type_cache( self) /*MMLocalClass::_base_type_cache*/ = variable0;
184 variable0 = ATTR_static_type___MMLocalClass____base_type_cache( self) /*MMLocalClass::_base_type_cache*/;
185 goto return_label9;
186 } else { /*if*/
187 variable0 = ((genericity___MMLocalClass___get_type_t)CALL( self,COLOR_SUPER_genericity___MMLocalClass___get_type))( self) /*super MMLocalClass::get_type*/;
188 goto return_label9;
189 }
190 return_label9: while(false);
191 tracehead = trace.prev;
192 return variable0;
193 }
194 val_t genericity___MMLocalClass___is_generic(val_t self) {
195 struct trace_t trace = {NULL, "genericity::MMLocalClass::is_generic (src/metamodel//genericity.nit:90,2--91:42)"};
196 val_t variable0;
197 trace.prev = tracehead; tracehead = &trace;
198 variable0 = ((abstractmetamodel___MMLocalClass___arity_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___arity))( self) /*MMLocalClass::arity*/;
199 variable0 = TAG_Bool(UNTAG_Int(variable0)>UNTAG_Int( TAG_Int(0)));
200 goto return_label10;
201 return_label10: while(false);
202 tracehead = trace.prev;
203 return variable0;
204 }
205 val_t genericity___MMSignature___adaptation_to(val_t self, val_t param0) {
206 struct trace_t trace = {NULL, "genericity::MMSignature::adaptation_to (src/metamodel//genericity.nit:95,2--113:31)"};
207 val_t variable0;
208 val_t variable1;
209 val_t variable2;
210 val_t variable3;
211 val_t variable4;
212 val_t variable5;
213 trace.prev = tracehead; tracehead = &trace;
214 variable0 = param0;
215 variable1 = ATTR_static_type___MMSignature____recv( self) /*MMSignature::_recv*/;
216 variable1 = TAG_Bool((variable1 == variable0 /*r*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, variable0 /*r*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, variable0 /*r*/) /*MMType::==*/)))));
217 if (UNTAG_Bool(variable1)) { /*if*/
218 variable1 = self;
219 goto return_label11;
220 }
221 variable2 = ((static_type___MMType___module_t)CALL( variable0 /*r*/,COLOR_static_type___MMType___module))( variable0 /*r*/) /*MMType::module*/;
222 variable1 = variable2;
223 variable3 = ATTR_static_type___MMSignature____params( self) /*MMSignature::_params*/;
224 variable2 = variable3;
225 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2 /*p*/ == NIT_NULL /*null*/) || (( variable2 /*p*/ != NIT_NULL) && UNTAG_Bool(((array___AbstractArray_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))( variable2 /*p*/, NIT_NULL /*null*/) /*Array::==*/)))));
226 if (UNTAG_Bool(variable3)) { /*if*/
227 variable3 = NEW_array___Array___init(); /*new Array[MMType]*/
228 variable2 = variable3 /*p=*/;
229 variable3 = ATTR_static_type___MMSignature____params( self) /*MMSignature::_params*/;
230 variable3 = ((array___AbstractArray___iterator_t)CALL(variable3,COLOR_abstract_collection___Collection___iterator))(variable3) /*Array::iterator*/;
231 while (true) { /*for*/
232 variable4 = ((array___ArrayIterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*ArrayIterator::is_ok*/;
233 if (!UNTAG_Bool(variable4)) break; /*for*/
234 variable4 = ((array___ArrayIterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*ArrayIterator::item*/;
235 variable5 = ((static_type___MMType___for_module_t)CALL( variable4 /*i*/,COLOR_static_type___MMType___for_module))( variable4 /*i*/, variable1 /*mod*/) /*MMType::for_module*/;
236 variable5 = ((static_type___MMType___adapt_to_t)CALL(variable5,COLOR_static_type___MMType___adapt_to))(variable5, variable0 /*r*/) /*MMType::adapt_to*/;
237 ((array___AbstractArray___add_t)CALL( variable2 /*p*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*p*/, variable5) /*Array::add*/;
238 continue_12: while(0);
239 ((array___ArrayIterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*ArrayIterator::next*/;
240 }
241 break_12: while(0);
242 }
243 variable4 = ATTR_static_type___MMSignature____return_type( self) /*MMSignature::_return_type*/;
244 variable3 = variable4;
245 variable4 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable3 /*rv*/ == NIT_NULL /*null*/) || (( variable3 /*rv*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable3 /*rv*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable3 /*rv*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable3 /*rv*/,COLOR_kernel___Object_____eqeq))( variable3 /*rv*/, NIT_NULL /*null*/) /*MMType::==*/)))))));
246 if (UNTAG_Bool(variable4)) { /*if*/
247 variable4 = ((static_type___MMType___for_module_t)CALL( variable3 /*rv*/,COLOR_static_type___MMType___for_module))( variable3 /*rv*/, variable1 /*mod*/) /*MMType::for_module*/;
248 variable4 = ((static_type___MMType___adapt_to_t)CALL(variable4,COLOR_static_type___MMType___adapt_to))(variable4, variable0 /*r*/) /*MMType::adapt_to*/;
249 variable3 = variable4 /*rv=*/;
250 }
251 variable4 = NEW_static_type___MMSignature___init( variable2 /*p*/, variable3 /*rv*/, variable0 /*r*/); /*new MMSignature*/
252 variable1 = variable4;
253 goto return_label11;
254 return_label11: while(false);
255 tracehead = trace.prev;
256 return variable1;
257 }
258 val_t genericity___MMLocalProperty___recv(val_t self) {
259 struct trace_t trace = {NULL, "genericity::MMLocalProperty::recv (src/metamodel//genericity.nit:121,2--124:23)"};
260 val_t variable0;
261 trace.prev = tracehead; tracehead = &trace;
262 variable0 = ((genericity___MMLocalProperty___signature_t)CALL( self,COLOR_static_type___MMLocalProperty___signature))( self) /*MMLocalProperty::signature*/;
263 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*/) /*MMSignature::==*/)))))));
264 if (!UNTAG_Bool(variable0)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:123,3--26\n"); nit_exit(1);}
265 variable0 = ((genericity___MMLocalProperty___signature_t)CALL( self,COLOR_static_type___MMLocalProperty___signature))( self) /*MMLocalProperty::signature*/;
266 variable0 = ((static_type___MMSignature___recv_t)CALL(variable0,COLOR_static_type___MMSignature___recv))(variable0) /*MMSignature::recv*/;
267 goto return_label13;
268 return_label13: while(false);
269 tracehead = trace.prev;
270 return variable0;
271 }
272 void genericity___MMLocalProperty___recv__eq(val_t self, val_t param0) {
273 struct trace_t trace = {NULL, "genericity::MMLocalProperty::recv= (src/metamodel//genericity.nit:127,2--132:19)"};
274 val_t variable0;
275 val_t variable1;
276 trace.prev = tracehead; tracehead = &trace;
277 variable0 = param0;
278 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*rec*/ == NIT_NULL /*null*/) || (( variable0 /*rec*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*rec*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*rec*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*rec*/,COLOR_kernel___Object_____eqeq))( variable0 /*rec*/, NIT_NULL /*null*/) /*MMType::==*/)))))));
279 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:129,3--20\n"); nit_exit(1);}
280 variable1 = ATTR_static_type___MMLocalProperty____signature_cache( self) /*MMLocalProperty::_signature_cache*/;
281 variable1 = 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*/) /*MMSignature::==*/)))));
282 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:131,3--33\n"); nit_exit(1);}
283 ATTR_genericity___MMLocalProperty____recv_alone( self) /*MMLocalProperty::_recv_alone*/ = variable0 /*rec*/;
284 tracehead = trace.prev;
285 return;
286 }
287 val_t genericity___MMLocalProperty___signature(val_t self) {
288 struct trace_t trace = {NULL, "genericity::MMLocalProperty::signature (src/metamodel//genericity.nit:135,2--160:25)"};
289 val_t variable0;
290 val_t variable1;
291 val_t variable2;
292 val_t variable3;
293 val_t variable4;
294 trace.prev = tracehead; tracehead = &trace;
295 variable1 = ATTR_static_type___MMLocalProperty____signature_cache( self) /*MMLocalProperty::_signature_cache*/;
296 variable0 = variable1;
297 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*sig*/ == NIT_NULL /*null*/) || (( variable0 /*sig*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*sig*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*sig*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*sig*/,COLOR_kernel___Object_____eqeq))( variable0 /*sig*/, NIT_NULL /*null*/) /*MMSignature::==*/)))))));
298 if (UNTAG_Bool(variable1)) { /*if*/
299 variable0 = variable0 /*sig*/;
300 goto return_label15;
301 }
302 variable1 = TAG_Bool(( self==NIT_NULL) || VAL_ISA( self, COLOR_MMConcreteProperty, ID_MMConcreteProperty)) /*cast MMConcreteProperty*/;
303 if (UNTAG_Bool(variable1)) { /*if*/
304 variable0 = NIT_NULL /*null*/;
305 goto return_label15;
306 }
307 variable2 = ATTR_abstractmetamodel___MMLocalProperty____super_prop( self) /*MMLocalProperty::_super_prop*/;
308 variable1 = variable2;
309 variable3 = ATTR_abstractmetamodel___MMLocalProperty____concrete_property( self) /*MMLocalProperty::_concrete_property*/;
310 variable2 = variable3;
311 variable3 = TAG_Bool(( variable1 /*sp*/ == NIT_NULL /*null*/) || (( variable1 /*sp*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*sp*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*sp*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*sp*/,COLOR_kernel___Object_____eqeq))( variable1 /*sp*/, NIT_NULL /*null*/) /*MMLocalProperty::==*/)))));
312 if (UNTAG_Bool(variable3)) { /*if*/
313 variable3 = ((genericity___MMLocalProperty___signature_t)CALL( variable2 /*impl*/,COLOR_static_type___MMLocalProperty___signature))( variable2 /*impl*/) /*MMConcreteProperty::signature*/;
314 ATTR_static_type___MMLocalProperty____signature_cache( self) /*MMLocalProperty::_signature_cache*/ = variable3;
315 variable3 = ATTR_static_type___MMLocalProperty____signature_cache( self) /*MMLocalProperty::_signature_cache*/;
316 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*/) /*MMSignature::==*/)))))));
317 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:150,4--34\n"); nit_exit(1);}
318 } else { /*if*/
319 variable3 = ((genericity___MMLocalProperty___signature_t)CALL( variable1 /*sp*/,COLOR_static_type___MMLocalProperty___signature))( variable1 /*sp*/) /*MMLocalProperty::signature*/;
320 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*/) /*MMSignature::==*/)))))));
321 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:153,4--30\n"); nit_exit(1);}
322 variable3 = ATTR_genericity___MMLocalProperty____recv_alone( self) /*MMLocalProperty::_recv_alone*/;
323 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*/) /*MMType::==*/)))))));
324 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:154,4--29\n"); nit_exit(1);}
325 variable3 = ((genericity___MMLocalProperty___signature_t)CALL( variable1 /*sp*/,COLOR_static_type___MMLocalProperty___signature))( variable1 /*sp*/) /*MMLocalProperty::signature*/;
326 variable4 = ATTR_genericity___MMLocalProperty____recv_alone( self) /*MMLocalProperty::_recv_alone*/;
327 variable3 = ((genericity___MMSignature___adaptation_to_t)CALL(variable3,COLOR_genericity___MMSignature___adaptation_to))(variable3, variable4) /*MMSignature::adaptation_to*/;
328 ATTR_static_type___MMLocalProperty____signature_cache( self) /*MMLocalProperty::_signature_cache*/ = variable3;
329 }
330 variable3 = ATTR_static_type___MMLocalProperty____signature_cache( self) /*MMLocalProperty::_signature_cache*/;
331 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*/) /*MMSignature::==*/)))))));
332 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:158,3--33\n"); nit_exit(1);}
333 variable3 = ATTR_static_type___MMLocalProperty____signature_cache( self) /*MMLocalProperty::_signature_cache*/;
334 variable0 = variable3;
335 goto return_label15;
336 return_label15: while(false);
337 tracehead = trace.prev;
338 return variable0;
339 }
340 val_t genericity___MMLocalProperty___adapt_property(val_t self, val_t param0) {
341 struct trace_t trace = {NULL, "genericity::MMLocalProperty::adapt_property (src/metamodel//genericity.nit:163,2--172:22)"};
342 val_t variable0;
343 val_t variable1;
344 val_t variable2;
345 trace.prev = tracehead; tracehead = &trace;
346 variable0 = param0;
347 variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*t*/ == NIT_NULL /*null*/) || (( variable0 /*t*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*t*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*t*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*t*/,COLOR_kernel___Object_____eqeq))( variable0 /*t*/, NIT_NULL /*null*/) /*MMType::==*/)))))));
348 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:167,3--18\n"); nit_exit(1);}
349 variable2 = ((abstractmetamodel___MMLocalProperty___local_class_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___local_class))( self) /*MMLocalProperty::local_class*/;
350 variable2 = ((genericity___MMLocalClass___get_type_t)CALL(variable2,COLOR_static_type___MMLocalClass___get_type))(variable2) /*MMLocalClass::get_type*/;
351 variable1 = variable2;
352 variable2 = TAG_Bool(( variable0 /*t*/ == variable1 /*recv*/) || (( variable0 /*t*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*t*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*t*/, variable1 /*recv*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*t*/,COLOR_kernel___Object_____eqeq))( variable0 /*t*/, variable1 /*recv*/) /*MMType::==*/)))));
353 if (UNTAG_Bool(variable2)) { /*if*/
354 variable1 = self;
355 goto return_label16;
356 } else { /*if*/
357 variable2 = ((inheritance___MMLocalProperty___inherit_to_t)CALL( self,COLOR_inheritance___MMLocalProperty___inherit_to))( self, variable0 /*t*/) /*MMLocalProperty::inherit_to*/;
358 variable1 = variable2;
359 goto return_label16;
360 }
361 return_label16: while(false);
362 tracehead = trace.prev;
363 return variable1;
364 }
365 void genericity___MMLocalProperty___inherit_from(val_t self, val_t param0, val_t param1) {
366 struct trace_t trace = {NULL, "genericity::MMLocalProperty::inherit_from (src/metamodel//genericity.nit:176,2--179:17)"};
367 val_t variable0;
368 val_t variable1;
369 trace.prev = tracehead; tracehead = &trace;
370 variable0 = param0;
371 variable1 = param1;
372 ((genericity___MMLocalProperty___inherit_from_t)CALL( self,COLOR_SUPER_genericity___MMLocalProperty___inherit_from))( self, param0, param1) /*super MMLocalProperty::inherit_from*/;
373 ATTR_genericity___MMLocalProperty____recv_alone( self) /*MMLocalProperty::_recv_alone*/ = variable1 /*t*/;
374 tracehead = trace.prev;
375 return;
376 }
377 val_t genericity___MMType___is_generic(val_t self) {
378 struct trace_t trace = {NULL, "genericity::MMType::is_generic (src/metamodel//genericity.nit:184,2--185:22)"};
379 trace.prev = tracehead; tracehead = &trace;
380 fprintf(stderr, "Deferred method is_generic called (src/metamodel//genericity.nit:184,2)\n");
381 nit_exit(1);
382 tracehead = trace.prev;
383 return NIT_NULL;
384 }
385 val_t genericity___MMTypeFormal___is_generic(val_t self) {
386 struct trace_t trace = {NULL, "genericity::MMTypeFormal::is_generic (src/metamodel//genericity.nit:189,2--50)"};
387 val_t variable0;
388 trace.prev = tracehead; tracehead = &trace;
389 variable0 = ATTR_type_formal___MMTypeFormal____bound( self) /*MMTypeFormal::_bound*/;
390 variable0 = ((genericity___MMType___is_generic_t)CALL(variable0,COLOR_genericity___MMType___is_generic))(variable0) /*MMType::is_generic*/;
391 goto return_label18;
392 return_label18: while(false);
393 tracehead = trace.prev;
394 return variable0;
395 }
396 val_t genericity___MMTypeSimpleClass___is_generic(val_t self) {
397 struct trace_t trace = {NULL, "genericity::MMTypeSimpleClass::is_generic (src/metamodel//genericity.nit:193,2--39)"};
398 val_t variable0;
399 trace.prev = tracehead; tracehead = &trace;
400 variable0 = TAG_Bool(false);
401 goto return_label19;
402 return_label19: while(false);
403 tracehead = trace.prev;
404 return variable0;
405 }
406 val_t genericity___MMTypeGeneric___params(val_t self) {
407 struct trace_t trace = {NULL, "genericity::MMTypeGeneric::params (src/metamodel//genericity.nit:198,2--199:36)"};
408 trace.prev = tracehead; tracehead = &trace;
409 tracehead = trace.prev;
410 return ATTR_genericity___MMTypeGeneric____params( self) /*MMTypeGeneric::_params*/;
411 }
412 val_t genericity___MMTypeGeneric___is_generic(val_t self) {
413 struct trace_t trace = {NULL, "genericity::MMTypeGeneric::is_generic (src/metamodel//genericity.nit:202,2--37)"};
414 val_t variable0;
415 trace.prev = tracehead; tracehead = &trace;
416 variable0 = TAG_Bool(true);
417 goto return_label20;
418 return_label20: while(false);
419 tracehead = trace.prev;
420 return variable0;
421 }
422 val_t genericity___MMTypeGeneric___is_supertype(val_t self, val_t param0) {
423 struct trace_t trace = {NULL, "genericity::MMTypeGeneric::is_supertype (src/metamodel//genericity.nit:204,2--212:14)"};
424 val_t variable0;
425 val_t variable1;
426 val_t variable2;
427 trace.prev = tracehead; tracehead = &trace;
428 variable0 = param0;
429 variable1 = ((static_type___MMType___local_class_t)CALL( variable0 /*t*/,COLOR_static_type___MMType___local_class))( variable0 /*t*/) /*MMType::local_class*/;
430 variable1 = ((abstractmetamodel___MMLocalClass___cshe_t)CALL(variable1,COLOR_abstractmetamodel___MMLocalClass___cshe))(variable1) /*MMLocalClass::cshe*/;
431 variable2 = ATTR_static_type___MMTypeClass____local_class( self) /*MMTypeGeneric::_local_class*/;
432 variable1 = ((partial_order___PartialOrderElement_____leq_t)CALL(variable1,COLOR_partial_order___PartialOrderElement_____leq))(variable1, variable2) /*PartialOrderElement::<=*/;
433 if (UNTAG_Bool(variable1)) { /*if*/
434 variable2 = ATTR_static_type___MMTypeClass____local_class( self) /*MMTypeGeneric::_local_class*/;
435 variable2 = ((static_type___MMType___upcast_for_t)CALL( variable0 /*t*/,COLOR_static_type___MMType___upcast_for))( variable0 /*t*/, variable2) /*MMType::upcast_for*/;
436 variable1 = variable2;
437 variable2 = TAG_Bool(( variable1 /*u*/==NIT_NULL) || VAL_ISA( variable1 /*u*/, COLOR_MMTypeGeneric, ID_MMTypeGeneric)) /*cast MMTypeGeneric*/;
438 if (UNTAG_Bool(variable2)) { /*if*/
439 variable2 = ((genericity___MMTypeGeneric___is_subtype_t)CALL( self,COLOR_genericity___MMTypeGeneric___is_subtype))( self, variable1 /*u*/) /*MMTypeGeneric::is_subtype*/;
440 variable1 = variable2;
441 goto return_label21;
442 }
443 }
444 variable1 = TAG_Bool(false);
445 goto return_label21;
446 return_label21: while(false);
447 tracehead = trace.prev;
448 return variable1;
449 }
450 val_t genericity___MMTypeGeneric___upcast_for(val_t self, val_t param0) {
451 struct trace_t trace = {NULL, "genericity::MMTypeGeneric::upcast_for (src/metamodel//genericity.nit:215,2--221:10)"};
452 val_t variable0;
453 val_t variable1;
454 val_t variable2;
455 trace.prev = tracehead; tracehead = &trace;
456 variable0 = param0;
457 variable2 = ((genericity___MMTypeGeneric___upcast_for_t)CALL( self,COLOR_SUPER_genericity___MMTypeGeneric___upcast_for))( self, param0) /*super MMTypeGeneric::upcast_for*/;
458 variable1 = variable2;
459 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable1 /*t*/ == self) || (( variable1 /*t*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*t*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*t*/, self)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*t*/,COLOR_kernel___Object_____eqeq))( variable1 /*t*/, self) /*MMType::==*/)))))));
460 if (UNTAG_Bool(variable2)) { /*if*/
461 variable2 = ((static_type___MMType___adapt_to_t)CALL( variable1 /*t*/,COLOR_static_type___MMType___adapt_to))( variable1 /*t*/, self) /*MMType::adapt_to*/;
462 variable1 = variable2 /*t=*/;
463 }
464 variable1 = variable1 /*t*/;
465 goto return_label22;
466 return_label22: while(false);
467 tracehead = trace.prev;
468 return variable1;
469 }
470 val_t genericity___MMTypeGeneric___for_module(val_t self, val_t param0) {
471 struct trace_t trace = {NULL, "genericity::MMTypeGeneric::for_module (src/metamodel//genericity.nit:224,2--236:10)"};
472 val_t variable0;
473 val_t variable1;
474 val_t variable2;
475 val_t variable3;
476 val_t variable4;
477 val_t variable5;
478 trace.prev = tracehead; tracehead = &trace;
479 variable0 = param0;
480 variable1 = self;
481 variable2 = ((static_type___MMTypeClass___module_t)CALL( self,COLOR_static_type___MMType___module))( self) /*MMTypeGeneric::module*/;
482 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable2 == variable0 /*mod*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, variable0 /*mod*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, variable0 /*mod*/) /*MMModule::==*/)))))));
483 if (UNTAG_Bool(variable2)) { /*if*/
484 variable3 = NEW_array___Array___init(); /*new Array[MMType]*/
485 variable2 = variable3;
486 variable3 = ATTR_genericity___MMTypeGeneric____params( self) /*MMTypeGeneric::_params*/;
487 variable3 = ((array___AbstractArray___iterator_t)CALL(variable3,COLOR_abstract_collection___Collection___iterator))(variable3) /*Array::iterator*/;
488 while (true) { /*for*/
489 variable4 = ((array___ArrayIterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*ArrayIterator::is_ok*/;
490 if (!UNTAG_Bool(variable4)) break; /*for*/
491 variable4 = ((array___ArrayIterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*ArrayIterator::item*/;
492 variable5 = ((static_type___MMType___for_module_t)CALL( variable4 /*p*/,COLOR_static_type___MMType___for_module))( variable4 /*p*/, variable0 /*mod*/) /*MMType::for_module*/;
493 ((array___AbstractArray___add_t)CALL( variable2 /*parms*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*parms*/, variable5) /*Array::add*/;
494 continue_24: while(0);
495 ((array___ArrayIterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*ArrayIterator::next*/;
496 }
497 break_24: while(0);
498 variable4 = ATTR_static_type___MMTypeClass____local_class( self) /*MMTypeGeneric::_local_class*/;
499 variable4 = ((abstractmetamodel___MMLocalClass___for_module_t)CALL(variable4,COLOR_abstractmetamodel___MMLocalClass___for_module))(variable4, variable0 /*mod*/) /*MMLocalClass::for_module*/;
500 variable3 = variable4;
501 variable4 = ((genericity___MMLocalClass___get_instantiate_type_t)CALL( variable3 /*b*/,COLOR_genericity___MMLocalClass___get_instantiate_type))( variable3 /*b*/, variable2 /*parms*/) /*MMLocalClass::get_instantiate_type*/;
502 variable1 = variable4 /*t=*/;
503 }
504 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable1 /*t*/ == NIT_NULL /*null*/) || (( variable1 /*t*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*t*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*t*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*t*/,COLOR_kernel___Object_____eqeq))( variable1 /*t*/, NIT_NULL /*null*/) /*MMType::==*/)))))));
505 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:235,3--18\n"); nit_exit(1);}
506 variable1 = variable1 /*t*/;
507 goto return_label23;
508 return_label23: while(false);
509 tracehead = trace.prev;
510 return variable1;
511 }
512 val_t genericity___MMTypeGeneric___adapt_to(val_t self, val_t param0) {
513 struct trace_t trace = {NULL, "genericity::MMTypeGeneric::adapt_to (src/metamodel//genericity.nit:239,2--246:10)"};
514 val_t variable0;
515 val_t variable1;
516 val_t variable2;
517 val_t variable3;
518 val_t variable4;
519 trace.prev = tracehead; tracehead = &trace;
520 variable0 = param0;
521 variable2 = NEW_array___Array___init(); /*new Array[MMType]*/
522 variable1 = variable2;
523 variable2 = ATTR_genericity___MMTypeGeneric____params( self) /*MMTypeGeneric::_params*/;
524 variable2 = ((array___AbstractArray___iterator_t)CALL(variable2,COLOR_abstract_collection___Collection___iterator))(variable2) /*Array::iterator*/;
525 while (true) { /*for*/
526 variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
527 if (!UNTAG_Bool(variable3)) break; /*for*/
528 variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
529 variable4 = ((static_type___MMType___adapt_to_t)CALL( variable3 /*i*/,COLOR_static_type___MMType___adapt_to))( variable3 /*i*/, variable0 /*r*/) /*MMType::adapt_to*/;
530 ((array___AbstractArray___add_t)CALL( variable1 /*rv*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*rv*/, variable4) /*Array::add*/;
531 continue_26: while(0);
532 ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
533 }
534 break_26: while(0);
535 variable3 = ATTR_static_type___MMTypeClass____local_class( self) /*MMTypeGeneric::_local_class*/;
536 variable3 = ((genericity___MMLocalClass___get_instantiate_type_t)CALL(variable3,COLOR_genericity___MMLocalClass___get_instantiate_type))(variable3, variable1 /*rv*/) /*MMLocalClass::get_instantiate_type*/;
537 variable2 = variable3;
538 variable1 = variable2 /*l*/;
539 goto return_label25;
540 return_label25: while(false);
541 tracehead = trace.prev;
542 return variable1;
543 }
544 val_t genericity___MMTypeGeneric___params_equals(val_t self, val_t param0) {
545 struct trace_t trace = {NULL, "genericity::MMTypeGeneric::params_equals (src/metamodel//genericity.nit:249,2--261:13)"};
546 val_t variable0;
547 val_t variable1;
548 val_t variable2;
549 val_t variable3;
550 val_t variable4;
551 val_t variable5;
552 val_t variable6;
553 trace.prev = tracehead; tracehead = &trace;
554 variable0 = param0;
555 variable1 = ((array___AbstractArray___length_t)CALL( variable0 /*t*/,COLOR_abstract_collection___Collection___length))( variable0 /*t*/) /*Array::length*/;
556 variable2 = ATTR_genericity___MMTypeGeneric____params( self) /*MMTypeGeneric::_params*/;
557 variable2 = ((array___AbstractArray___length_t)CALL(variable2,COLOR_abstract_collection___Collection___length))(variable2) /*Array::length*/;
558 variable1 = TAG_Bool((variable1)!=(variable2));
559 if (UNTAG_Bool(variable1)) { /*if*/
560 variable1 = TAG_Bool(false);
561 goto return_label27;
562 }
563 variable1 = ((array___AbstractArray___length_t)CALL( variable0 /*t*/,COLOR_abstract_collection___Collection___length))( variable0 /*t*/) /*Array::length*/;
564 variable2 = NEW_range___Range___without_last( TAG_Int(0), variable1); /*new Range[Int]*/
565 variable1 = variable2;
566 variable1 = ((range___Range___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Range::iterator*/;
567 while (true) { /*for*/
568 variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*Iterator::is_ok*/;
569 if (!UNTAG_Bool(variable2)) break; /*for*/
570 variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*Iterator::item*/;
571 variable3 = ATTR_genericity___MMTypeGeneric____params( self) /*MMTypeGeneric::_params*/;
572 variable4 = variable2 /*i*/;
573 variable5 = TAG_Bool(UNTAG_Int( variable4 /*index*/)>=UNTAG_Int( TAG_Int(0)));
574 variable6 = variable5;
575 if (UNTAG_Bool(variable6)) { /* and */
576 variable6 = variable3;
577 variable6 = ATTR_array___AbstractArray____length(variable6) /*Array::_length*/;
578 variable6 = TAG_Bool(UNTAG_Int( variable4 /*index*/)<UNTAG_Int(variable6));
579 }
580 variable5 = variable6;
581 if (!UNTAG_Bool(variable5)) { fprintf(stderr, "Assert 'index' failed: bin/../lib/standard//array.nit:229,3--46\n"); nit_exit(1);}
582 variable5 = variable3;
583 variable5 = ATTR_array___Array____items(variable5) /*Array::_items*/;
584 variable5 = UNBOX_NativeArray(variable5)[UNTAG_Int( variable4 /*index*/)];
585 goto return_label29;
586 return_label29: while(false);
587 variable3 = variable5;
588 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*/) /*MMType::==*/)))))));
589 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:255,4--28\n"); nit_exit(1);}
590 variable3 = variable2 /*i*/;
591 variable4 = TAG_Bool(UNTAG_Int( variable3 /*index*/)>=UNTAG_Int( TAG_Int(0)));
592 variable5 = variable4;
593 if (UNTAG_Bool(variable5)) { /* and */
594 variable5 = ATTR_array___AbstractArray____length( variable0 /*t*/) /*Array::_length*/;
595 variable5 = TAG_Bool(UNTAG_Int( variable3 /*index*/)<UNTAG_Int(variable5));
596 }
597 variable4 = variable5;
598 if (!UNTAG_Bool(variable4)) { fprintf(stderr, "Assert 'index' failed: bin/../lib/standard//array.nit:229,3--46\n"); nit_exit(1);}
599 variable4 = ATTR_array___Array____items( variable0 /*t*/) /*Array::_items*/;
600 variable4 = UNBOX_NativeArray(variable4)[UNTAG_Int( variable3 /*index*/)];
601 goto return_label30;
602 return_label30: while(false);
603 variable3 = variable4;
604 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*/) /*MMType::==*/)))))));
605 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:256,4--22\n"); nit_exit(1);}
606 variable3 = ATTR_genericity___MMTypeGeneric____params( self) /*MMTypeGeneric::_params*/;
607 variable4 = variable2 /*i*/;
608 variable5 = TAG_Bool(UNTAG_Int( variable4 /*index*/)>=UNTAG_Int( TAG_Int(0)));
609 variable6 = variable5;
610 if (UNTAG_Bool(variable6)) { /* and */
611 variable6 = variable3;
612 variable6 = ATTR_array___AbstractArray____length(variable6) /*Array::_length*/;
613 variable6 = TAG_Bool(UNTAG_Int( variable4 /*index*/)<UNTAG_Int(variable6));
614 }
615 variable5 = variable6;
616 if (!UNTAG_Bool(variable5)) { fprintf(stderr, "Assert 'index' failed: bin/../lib/standard//array.nit:229,3--46\n"); nit_exit(1);}
617 variable5 = variable3;
618 variable5 = ATTR_array___Array____items(variable5) /*Array::_items*/;
619 variable5 = UNBOX_NativeArray(variable5)[UNTAG_Int( variable4 /*index*/)];
620 goto return_label31;
621 return_label31: while(false);
622 variable3 = variable5;
623 variable4 = variable2 /*i*/;
624 variable5 = TAG_Bool(UNTAG_Int( variable4 /*index*/)>=UNTAG_Int( TAG_Int(0)));
625 variable6 = variable5;
626 if (UNTAG_Bool(variable6)) { /* and */
627 variable6 = ATTR_array___AbstractArray____length( variable0 /*t*/) /*Array::_length*/;
628 variable6 = TAG_Bool(UNTAG_Int( variable4 /*index*/)<UNTAG_Int(variable6));
629 }
630 variable5 = variable6;
631 if (!UNTAG_Bool(variable5)) { fprintf(stderr, "Assert 'index' failed: bin/../lib/standard//array.nit:229,3--46\n"); nit_exit(1);}
632 variable5 = ATTR_array___Array____items( variable0 /*t*/) /*Array::_items*/;
633 variable5 = UNBOX_NativeArray(variable5)[UNTAG_Int( variable4 /*index*/)];
634 goto return_label32;
635 return_label32: while(false);
636 variable4 = variable5;
637 variable3 = TAG_Bool(!UNTAG_Bool(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) /*MMType::==*/)))))));
638 if (UNTAG_Bool(variable3)) { /*if*/
639 variable1 = TAG_Bool(false);
640 goto return_label27;
641 }
642 continue_28: while(0);
643 ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*Iterator::next*/;
644 }
645 break_28: while(0);
646 variable1 = TAG_Bool(true);
647 goto return_label27;
648 return_label27: while(false);
649 tracehead = trace.prev;
650 return variable1;
651 }
652 val_t genericity___MMTypeGeneric___select_property(val_t self, val_t param0) {
653 struct trace_t trace = {NULL, "genericity::MMTypeGeneric::select_property (src/metamodel//genericity.nit:264,2--280:17)"};
654 val_t variable0;
655 val_t variable1;
656 val_t variable2;
657 val_t variable3;
658 trace.prev = tracehead; tracehead = &trace;
659 variable0 = param0;
660 variable1 = TAG_Bool(( variable0 /*g*/ == NIT_NULL /*null*/) || (( variable0 /*g*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*g*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*g*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*g*/,COLOR_kernel___Object_____eqeq))( variable0 /*g*/, NIT_NULL /*null*/) /*MMGlobalProperty::==*/)))));
661 if (UNTAG_Bool(variable1)) { /*if*/
662 variable1 = NIT_NULL /*null*/;
663 goto return_label33;
664 }
665 variable1 = ATTR_genericity___MMTypeGeneric____props( self) /*MMTypeGeneric::_props*/;
666 variable1 = ((abstract_collection___Map___has_key_t)CALL(variable1,COLOR_abstract_collection___Map___has_key))(variable1, variable0 /*g*/) /*Map::has_key*/;
667 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable1)))) { /*if*/
668 variable1 = ATTR_static_type___MMTypeClass____local_class( self) /*MMTypeGeneric::_local_class*/;
669 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::==*/)))))));
670 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:270,4--30\n"); nit_exit(1);}
671 variable2 = ATTR_static_type___MMTypeClass____local_class( self) /*MMTypeGeneric::_local_class*/;
672 variable2 = ((inheritance___MMLocalClass_____bra_t)CALL(variable2,COLOR_abstractmetamodel___MMLocalClass_____bra))(variable2, variable0 /*g*/) /*MMLocalClass::[]*/;
673 variable1 = variable2;
674 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable1 /*p*/ == NIT_NULL /*null*/) || (( variable1 /*p*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*p*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*p*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*p*/,COLOR_kernel___Object_____eqeq))( variable1 /*p*/, NIT_NULL /*null*/) /*MMLocalProperty::==*/)))))));
675 if (UNTAG_Bool(variable2)) { /*if*/
676 variable3 = ((genericity___MMLocalProperty___adapt_property_t)CALL( variable1 /*p*/,COLOR_genericity___MMLocalProperty___adapt_property))( variable1 /*p*/, self) /*MMLocalProperty::adapt_property*/;
677 variable2 = variable3;
678 variable3 = ATTR_genericity___MMTypeGeneric____props( self) /*MMTypeGeneric::_props*/;
679 ((abstract_collection___Map_____braeq_t)CALL(variable3,COLOR_abstract_collection___Map_____braeq))(variable3, variable0 /*g*/, variable2 /*p2*/) /*Map::[]=*/;
680 variable1 = variable2 /*p2*/;
681 goto return_label33;
682 } else { /*if*/
683 if (!UNTAG_Bool( TAG_Bool(false))) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:277,5--16\n"); nit_exit(1);}
684 }
685 }
686 variable1 = ATTR_genericity___MMTypeGeneric____props( self) /*MMTypeGeneric::_props*/;
687 variable1 = ((abstract_collection___Map_____bra_t)CALL(variable1,COLOR_abstract_collection___Map_____bra))(variable1, variable0 /*g*/) /*Map::[]*/;
688 goto return_label33;
689 return_label33: while(false);
690 tracehead = trace.prev;
691 return variable1;
692 }
693 val_t genericity___MMTypeGeneric___to_s(val_t self) {
694 struct trace_t trace = {NULL, "genericity::MMTypeGeneric::to_s (src/metamodel//genericity.nit:283,2--285:40)"};
695 val_t variable0;
696 val_t variable1;
697 val_t variable2;
698 val_t variable3;
699 val_t variable4;
700 val_t variable5;
701 val_t variable6;
702 val_t variable7;
703 val_t variable8;
704 val_t variable9;
705 val_t variable10;
706 trace.prev = tracehead; tracehead = &trace;
707 variable0 = NEW_string___String___init(); /*new String*/
708 variable1 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
709 variable2 = variable1;
710 ((string___String___append_t)CALL(variable0,COLOR_abstract_collection___IndexedCollection___append))(variable0, variable2) /*String::append*/;
711 variable3 = ((genericity___MMTypeGeneric___to_s_t)CALL( self,COLOR_SUPER_genericity___MMTypeGeneric___to_s))( self) /*super MMTypeGeneric::to_s*/;
712 variable4 = variable3;
713 ((string___String___append_t)CALL(variable0,COLOR_abstract_collection___IndexedCollection___append))(variable0, variable4) /*String::append*/;
714 variable5 = NEW_string___String___with_native(BOX_NativeString("["), TAG_Int(1)); /*new String*/
715 variable6 = variable5;
716 ((string___String___append_t)CALL(variable0,COLOR_abstract_collection___IndexedCollection___append))(variable0, variable6) /*String::append*/;
717 variable7 = ATTR_genericity___MMTypeGeneric____params( self) /*MMTypeGeneric::_params*/;
718 variable8 = NEW_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)); /*new String*/
719 variable7 = ((string___Collection___join_t)CALL(variable7,COLOR_string___Collection___join))(variable7, variable8) /*Array::join*/;
720 variable8 = variable7;
721 ((string___String___append_t)CALL(variable0,COLOR_abstract_collection___IndexedCollection___append))(variable0, variable8) /*String::append*/;
722 variable9 = NEW_string___String___with_native(BOX_NativeString("]"), TAG_Int(1)); /*new String*/
723 variable10 = variable9;
724 ((string___String___append_t)CALL(variable0,COLOR_abstract_collection___IndexedCollection___append))(variable0, variable10) /*String::append*/;
725 goto return_label34;
726 return_label34: while(false);
727 tracehead = trace.prev;
728 return variable0;
729 }
730 val_t genericity___MMTypeGeneric___is_subtype(val_t self, val_t param0) {
731 struct trace_t trace = {NULL, "genericity::MMTypeGeneric::is_subtype (src/metamodel//genericity.nit:288,2--298:13)"};
732 val_t variable0;
733 val_t variable1;
734 val_t variable2;
735 val_t variable3;
736 val_t variable4;
737 val_t variable5;
738 val_t variable6;
739 val_t variable7;
740 trace.prev = tracehead; tracehead = &trace;
741 variable0 = param0;
742 variable1 = ATTR_genericity___MMTypeGeneric____params( self) /*MMTypeGeneric::_params*/;
743 variable1 = ((array___AbstractArray___length_t)CALL(variable1,COLOR_abstract_collection___Collection___length))(variable1) /*Array::length*/;
744 variable2 = NEW_range___Range___without_last( TAG_Int(0), variable1); /*new Range[Int]*/
745 variable1 = variable2;
746 variable1 = ((range___Range___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Range::iterator*/;
747 while (true) { /*for*/
748 variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*Iterator::is_ok*/;
749 if (!UNTAG_Bool(variable2)) break; /*for*/
750 variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*Iterator::item*/;
751 variable3 = ((genericity___MMTypeGeneric___params_t)CALL( variable0 /*t*/,COLOR_genericity___MMTypeGeneric___params))( variable0 /*t*/) /*MMTypeGeneric::params*/;
752 variable4 = variable2 /*i*/;
753 variable5 = TAG_Bool(UNTAG_Int( variable4 /*index*/)>=UNTAG_Int( TAG_Int(0)));
754 variable6 = variable5;
755 if (UNTAG_Bool(variable6)) { /* and */
756 variable6 = variable3;
757 variable6 = ATTR_array___AbstractArray____length(variable6) /*Array::_length*/;
758 variable6 = TAG_Bool(UNTAG_Int( variable4 /*index*/)<UNTAG_Int(variable6));
759 }
760 variable5 = variable6;
761 if (!UNTAG_Bool(variable5)) { fprintf(stderr, "Assert 'index' failed: bin/../lib/standard//array.nit:229,3--46\n"); nit_exit(1);}
762 variable5 = variable3;
763 variable5 = ATTR_array___Array____items(variable5) /*Array::_items*/;
764 variable5 = UNBOX_NativeArray(variable5)[UNTAG_Int( variable4 /*index*/)];
765 goto return_label37;
766 return_label37: while(false);
767 variable3 = variable5;
768 variable4 = ATTR_genericity___MMTypeGeneric____params( self) /*MMTypeGeneric::_params*/;
769 variable5 = variable2 /*i*/;
770 variable6 = TAG_Bool(UNTAG_Int( variable5 /*index*/)>=UNTAG_Int( TAG_Int(0)));
771 variable7 = variable6;
772 if (UNTAG_Bool(variable7)) { /* and */
773 variable7 = variable4;
774 variable7 = ATTR_array___AbstractArray____length(variable7) /*Array::_length*/;
775 variable7 = TAG_Bool(UNTAG_Int( variable5 /*index*/)<UNTAG_Int(variable7));
776 }
777 variable6 = variable7;
778 if (!UNTAG_Bool(variable6)) { fprintf(stderr, "Assert 'index' failed: bin/../lib/standard//array.nit:229,3--46\n"); nit_exit(1);}
779 variable6 = variable4;
780 variable6 = ATTR_array___Array____items(variable6) /*Array::_items*/;
781 variable6 = UNBOX_NativeArray(variable6)[UNTAG_Int( variable5 /*index*/)];
782 goto return_label38;
783 return_label38: while(false);
784 variable4 = variable6;
785 variable3 = ((static_type___MMType_____l_t)CALL(variable3,COLOR_static_type___MMType_____l))(variable3, variable4) /*MMType::<*/;
786 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable3)))) { /*if*/
787 variable1 = TAG_Bool(false);
788 goto return_label35;
789 }
790 continue_36: while(0);
791 ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*Iterator::next*/;
792 }
793 break_36: while(0);
794 variable1 = TAG_Bool(true);
795 goto return_label35;
796 return_label35: while(false);
797 tracehead = trace.prev;
798 return variable1;
799 }
800 void genericity___MMTypeGeneric___init(val_t self, val_t param0, val_t param1, int* init_table) {
801 struct trace_t trace = {NULL, "genericity::MMTypeGeneric::init (src/metamodel//genericity.nit:301,2--304:13)"};
802 val_t variable0;
803 val_t variable1;
804 trace.prev = tracehead; tracehead = &trace;
805 variable0 = param0;
806 variable1 = param1;
807 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMTypeGeneric].i]) return;
808 ((static_type___MMTypeClass___init_t)CALL( self,COLOR_static_type___MMTypeClass___init))( self, variable0 /*c*/, init_table /*YYY*/) /*MMTypeClass::init*/;
809 ATTR_genericity___MMTypeGeneric____params( self) /*MMTypeGeneric::_params*/ = variable1 /*p*/;
810 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMTypeGeneric].i] = 1;
811 tracehead = trace.prev;
812 return;
813 }
814 val_t genericity___MMTypeFormalParameter___def_class(val_t self) {
815 struct trace_t trace = {NULL, "genericity::MMTypeFormalParameter::def_class (src/metamodel//genericity.nit:310,2--311:39)"};
816 trace.prev = tracehead; tracehead = &trace;
817 tracehead = trace.prev;
818 return ATTR_genericity___MMTypeFormalParameter____def_class( self) /*MMTypeFormalParameter::_def_class*/;
819 }
820 val_t genericity___MMTypeFormalParameter___position(val_t self) {
821 struct trace_t trace = {NULL, "genericity::MMTypeFormalParameter::position (src/metamodel//genericity.nit:313,2--314:29)"};
822 trace.prev = tracehead; tracehead = &trace;
823 tracehead = trace.prev;
824 return ATTR_genericity___MMTypeFormalParameter____position( self) /*MMTypeFormalParameter::_position*/;
825 }
826 val_t genericity___MMTypeFormalParameter___module(val_t self) {
827 struct trace_t trace = {NULL, "genericity::MMTypeFormalParameter::module (src/metamodel//genericity.nit:316,2--46)"};
828 val_t variable0;
829 trace.prev = tracehead; tracehead = &trace;
830 variable0 = ATTR_genericity___MMTypeFormalParameter____def_class( self) /*MMTypeFormalParameter::_def_class*/;
831 variable0 = ((abstractmetamodel___MMLocalClass___module_t)CALL(variable0,COLOR_abstractmetamodel___MMLocalClass___module))(variable0) /*MMLocalClass::module*/;
832 goto return_label40;
833 return_label40: while(false);
834 tracehead = trace.prev;
835 return variable0;
836 }
837 val_t genericity___MMTypeFormalParameter___for_module(val_t self, val_t param0) {
838 struct trace_t trace = {NULL, "genericity::MMTypeFormalParameter::for_module (src/metamodel//genericity.nit:318,2--325:10)"};
839 val_t variable0;
840 val_t variable1;
841 val_t variable2;
842 val_t variable3;
843 trace.prev = tracehead; tracehead = &trace;
844 variable0 = param0;
845 variable1 = self;
846 variable2 = ((genericity___MMTypeFormalParameter___module_t)CALL( self,COLOR_static_type___MMType___module))( self) /*MMTypeFormalParameter::module*/;
847 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable2 == variable0 /*mod*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, variable0 /*mod*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, variable0 /*mod*/) /*MMModule::==*/)))))));
848 if (UNTAG_Bool(variable2)) { /*if*/
849 variable2 = ATTR_genericity___MMTypeFormalParameter____def_class( self) /*MMTypeFormalParameter::_def_class*/;
850 variable2 = ((abstractmetamodel___MMLocalClass___global_t)CALL(variable2,COLOR_abstractmetamodel___MMLocalClass___global))(variable2) /*MMLocalClass::global*/;
851 variable2 = ((abstractmetamodel___MMModule_____bra_t)CALL( variable0 /*mod*/,COLOR_abstractmetamodel___MMModule_____bra))( variable0 /*mod*/, variable2) /*MMModule::[]*/;
852 variable3 = ((genericity___MMTypeFormalParameter___position_t)CALL( self,COLOR_genericity___MMTypeFormalParameter___position))( self) /*MMTypeFormalParameter::position*/;
853 variable2 = ((genericity___MMLocalClass___get_formal_t)CALL(variable2,COLOR_genericity___MMLocalClass___get_formal))(variable2, variable3) /*MMLocalClass::get_formal*/;
854 variable1 = variable2 /*t=*/;
855 }
856 variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable1 /*t*/ == NIT_NULL /*null*/) || (( variable1 /*t*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*t*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*t*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*t*/,COLOR_kernel___Object_____eqeq))( variable1 /*t*/, NIT_NULL /*null*/) /*MMType::==*/)))))));
857 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:324,3--18\n"); nit_exit(1);}
858 variable1 = variable1 /*t*/;
859 goto return_label41;
860 return_label41: while(false);
861 tracehead = trace.prev;
862 return variable1;
863 }
864 val_t genericity___MMTypeFormalParameter___upcast_for(val_t self, val_t param0) {
865 struct trace_t trace = {NULL, "genericity::MMTypeFormalParameter::upcast_for (src/metamodel//genericity.nit:328,2--40)"};
866 val_t variable0;
867 val_t variable1;
868 trace.prev = tracehead; tracehead = &trace;
869 variable0 = param0;
870 variable1 = self;
871 goto return_label42;
872 return_label42: while(false);
873 tracehead = trace.prev;
874 return variable1;
875 }
876 void genericity___MMTypeFormalParameter___bound__eq(val_t self, val_t param0) {
877 struct trace_t trace = {NULL, "genericity::MMTypeFormalParameter::bound= (src/metamodel//genericity.nit:330,3--333:13)"};
878 val_t variable0;
879 val_t variable1;
880 trace.prev = tracehead; tracehead = &trace;
881 variable0 = param0;
882 variable1 = ATTR_type_formal___MMTypeFormal____bound( self) /*MMTypeFormalParameter::_bound*/;
883 variable1 = 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::==*/)))));
884 if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:332,3--23\n"); nit_exit(1);}
885 ATTR_type_formal___MMTypeFormal____bound( self) /*MMTypeFormalParameter::_bound*/ = variable0 /*t*/;
886 tracehead = trace.prev;
887 return;
888 }
889 val_t genericity___MMTypeFormalParameter___adapt_to(val_t self, val_t param0) {
890 struct trace_t trace = {NULL, "genericity::MMTypeFormalParameter::adapt_to (src/metamodel//genericity.nit:336,2--343:15)"};
891 val_t variable0;
892 val_t variable1;
893 val_t variable2;
894 val_t variable3;
895 val_t variable4;
896 val_t variable5;
897 val_t variable6;
898 val_t variable7;
899 trace.prev = tracehead; tracehead = &trace;
900 variable0 = param0;
901 variable2 = ((genericity___MMTypeFormalParameter___def_class_t)CALL( self,COLOR_genericity___MMTypeFormalParameter___def_class))( self) /*MMTypeFormalParameter::def_class*/;
902 variable2 = ((static_type___MMType___upcast_for_t)CALL( variable0 /*r*/,COLOR_static_type___MMType___upcast_for))( variable0 /*r*/, variable2) /*MMType::upcast_for*/;
903 variable1 = variable2;
904 variable2 = TAG_Bool(( variable1 /*old_r*/==NIT_NULL) || VAL_ISA( variable1 /*old_r*/, COLOR_MMTypeGeneric, ID_MMTypeGeneric)) /*cast MMTypeGeneric*/;
905 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:340,3--32\n"); nit_exit(1);}
906 variable3 = ((genericity___MMTypeGeneric___params_t)CALL( variable1 /*old_r*/,COLOR_genericity___MMTypeGeneric___params))( variable1 /*old_r*/) /*MMTypeGeneric::params*/;
907 variable4 = ((genericity___MMTypeFormalParameter___position_t)CALL( self,COLOR_genericity___MMTypeFormalParameter___position))( self) /*MMTypeFormalParameter::position*/;
908 variable5 = variable4;
909 variable6 = TAG_Bool(UNTAG_Int( variable5 /*index*/)>=UNTAG_Int( TAG_Int(0)));
910 variable7 = variable6;
911 if (UNTAG_Bool(variable7)) { /* and */
912 variable7 = variable3;
913 variable7 = ATTR_array___AbstractArray____length(variable7) /*Array::_length*/;
914 variable7 = TAG_Bool(UNTAG_Int( variable5 /*index*/)<UNTAG_Int(variable7));
915 }
916 variable6 = variable7;
917 if (!UNTAG_Bool(variable6)) { fprintf(stderr, "Assert 'index' failed: bin/../lib/standard//array.nit:229,3--46\n"); nit_exit(1);}
918 variable6 = variable3;
919 variable6 = ATTR_array___Array____items(variable6) /*Array::_items*/;
920 variable6 = UNBOX_NativeArray(variable6)[UNTAG_Int( variable5 /*index*/)];
921 goto return_label45;
922 return_label45: while(false);
923 variable3 = variable6;
924 variable2 = variable3;
925 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2 /*reduct*/ == NIT_NULL /*null*/) || (( variable2 /*reduct*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable2 /*reduct*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable2 /*reduct*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable2 /*reduct*/,COLOR_kernel___Object_____eqeq))( variable2 /*reduct*/, NIT_NULL /*null*/) /*MMType::==*/)))))));
926 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:342,3--23\n"); nit_exit(1);}
927 variable1 = variable2 /*reduct*/;
928 goto return_label44;
929 return_label44: while(false);
930 tracehead = trace.prev;
931 return variable1;
932 }
933 void genericity___MMTypeFormalParameter___with_bound(val_t self, val_t param0, val_t param1, val_t param2, val_t param3, int* init_table) {
934 struct trace_t trace = {NULL, "genericity::MMTypeFormalParameter::with_bound (src/metamodel//genericity.nit:346,2--349:12)"};
935 val_t variable0;
936 val_t variable1;
937 val_t variable2;
938 val_t variable3;
939 trace.prev = tracehead; tracehead = &trace;
940 variable0 = param0;
941 variable1 = param1;
942 variable2 = param2;
943 variable3 = param3;
944 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMTypeFormalParameter].i]) return;
945 ((genericity___MMTypeFormalParameter___init_t)CALL( self,COLOR_genericity___MMTypeFormalParameter___init))( self, variable0 /*n*/, variable1 /*p*/, variable2 /*intro*/, init_table /*YYY*/) /*MMTypeFormalParameter::init*/;
946 ATTR_type_formal___MMTypeFormal____bound( self) /*MMTypeFormalParameter::_bound*/ = variable3 /*b*/;
947 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMTypeFormalParameter].i] = 1;
948 tracehead = trace.prev;
949 return;
950 }
951 void genericity___MMTypeFormalParameter___init(val_t self, val_t param0, val_t param1, val_t param2, int* init_table) {
952 struct trace_t trace = {NULL, "genericity::MMTypeFormalParameter::init (src/metamodel//genericity.nit:352,2--357:20)"};
953 val_t variable0;
954 val_t variable1;
955 val_t variable2;
956 val_t variable3;
957 trace.prev = tracehead; tracehead = &trace;
958 variable0 = param0;
959 variable1 = param1;
960 variable2 = param2;
961 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMTypeFormalParameter].i]) return;
962 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*n*/ == NIT_NULL /*null*/) || (( variable0 /*n*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*n*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*n*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*n*/,COLOR_kernel___Object_____eqeq))( variable0 /*n*/, NIT_NULL /*null*/) /*Symbol::==*/)))))));
963 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//genericity.nit:354,3--18\n"); nit_exit(1);}
964 ATTR_type_formal___MMTypeFormal____name( self) /*MMTypeFormalParameter::_name*/ = variable0 /*n*/;
965 ATTR_genericity___MMTypeFormalParameter____position( self) /*MMTypeFormalParameter::_position*/ = variable1 /*p*/;
966 ATTR_genericity___MMTypeFormalParameter____def_class( self) /*MMTypeFormalParameter::_def_class*/ = variable2 /*intro*/;
967 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMTypeFormalParameter].i] = 1;
968 tracehead = trace.prev;
969 return;
970 }
971 val_t genericity___MMTypeNone___is_generic(val_t self) {
972 struct trace_t trace = {NULL, "genericity::MMTypeNone::is_generic (src/metamodel//genericity.nit:362,2--38)"};
973 val_t variable0;
974 trace.prev = tracehead; tracehead = &trace;
975 variable0 = TAG_Bool(false);
976 goto return_label48;
977 return_label48: while(false);
978 tracehead = trace.prev;
979 return variable0;
980 }
981 val_t genericity___MMTypeNone___for_module(val_t self, val_t param0) {
982 struct trace_t trace = {NULL, "genericity::MMTypeNone::for_module (src/metamodel//genericity.nit:363,3--43)"};
983 val_t variable0;
984 val_t variable1;
985 trace.prev = tracehead; tracehead = &trace;
986 variable0 = param0;
987 variable1 = self;
988 goto return_label49;
989 return_label49: while(false);
990 tracehead = trace.prev;
991 return variable1;
992 }
993 val_t genericity___MMTypeNone___adapt_to(val_t self, val_t param0) {
994 struct trace_t trace = {NULL, "genericity::MMTypeNone::adapt_to (src/metamodel//genericity.nit:364,3--39)"};
995 val_t variable0;
996 val_t variable1;
997 trace.prev = tracehead; tracehead = &trace;
998 variable0 = param0;
999 variable1 = self;
1000 goto return_label50;
1001 return_label50: while(false);
1002 tracehead = trace.prev;
1003 return variable1;
1004 }