misc: update Changelog and NOTICE; remove BUGS and TODO
[nit.git] / c_src / genericity._sep.c
1 /* This C file is generated by NIT to compile module genericity. */
2 #include "genericity._sep.h"
3 val_t genericity___MMLocalClass___get_type(val_t self) {
4 struct trace_t trace = {NULL, NULL, 80, LOCATE_genericity___MMLocalClass___get_type};
5 val_t variable[3];
6 struct WBT_ **closurevariable = NULL;
7 trace.prev = tracehead; tracehead = &trace;
8 trace.file = LOCATE_genericity;
9 /* Register variable[0]: Local variable */
10 variable[0] = self;
11 /* Register variable[1]: Method return value and escape marker */
12 /* Register variable[2]: Result */
13 variable[2] = ATTR_static_type___MMLocalClass____base_type_cache(variable[0]) /*MMLocalClass::_base_type_cache*/;
14 /* Register variable[2]: Result */
15 variable[2] = TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[2])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[2], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[2])(variable[2], NIT_NULL /*null*/) /*Object::==*/)))));
16 /* Ensure var variable[2]: Left 'and' operand*/
17 if (UNTAG_Bool(variable[2])) { /* and */
18 /* Register variable[2]: Result */
19 variable[2] = CALL_genericity___MMLocalClass___is_generic(variable[0])(variable[0]) /*MMLocalClass::is_generic*/;
20 }
21 /* Register variable[2]: Result */
22 if (UNTAG_Bool(variable[2])) { /*if*/
23 /* Register variable[2]: Result */
24 variable[2] = CALL_genericity___MMLocalClass___formals_types(variable[0])(variable[0]) /*MMLocalClass::formals_types*/;
25 /* Register variable[2]: Result */
26 variable[2] = CALL_genericity___MMLocalClass___get_instantiate_type(variable[0])(variable[0], variable[2]) /*MMLocalClass::get_instantiate_type*/;
27 ATTR_static_type___MMLocalClass____base_type_cache(variable[0]) /*MMLocalClass::_base_type_cache*/ = variable[2];
28 /* Register variable[2]: Result */
29 variable[2] = ATTR_static_type___MMLocalClass____base_type_cache(variable[0]) /*MMLocalClass::_base_type_cache*/;
30 variable[1] = variable[2];
31 goto return_label0;
32 } else { /*if*/
33 /* Register variable[2]: Result */
34 variable[2] = CALL_SUPER_genericity___MMLocalClass___get_type(variable[0])(variable[0]) /*super MMLocalClass::get_type*/;
35 variable[1] = variable[2];
36 goto return_label0;
37 }
38 return_label0: while(false);
39 tracehead = trace.prev;
40 return variable[1];
41 }
42 val_t genericity___MMLocalClass___get_formal(val_t self, val_t param0) {
43 struct trace_t trace = {NULL, NULL, 25, LOCATE_genericity___MMLocalClass___get_formal};
44 val_t variable[8];
45 struct WBT_ **closurevariable = NULL;
46 trace.prev = tracehead; tracehead = &trace;
47 trace.file = LOCATE_genericity;
48 /* Register variable[0]: Local variable */
49 variable[0] = self;
50 /* Register variable[1]: Local variable */
51 variable[1] = param0;
52 /* Register variable[2]: Method return value and escape marker */
53 /* Register variable[3]: Result */
54 variable[3] = CALL_genericity___MMLocalClass___formals_types(variable[0])(variable[0]) /*MMLocalClass::formals_types*/;
55 /* Register variable[4]: Local variable */
56 variable[4] = variable[3];
57 /* Register variable[5]: Local variable */
58 variable[5] = variable[1] /*pos*/;
59 /* Register variable[6]: Method return value and escape marker */
60 /* Register variable[7]: Result */
61 variable[7] = TAG_Bool(UNTAG_Int( variable[5] /*index*/)>=UNTAG_Int( TAG_Int(0)));
62 /* Ensure var variable[7]: Left 'and' operand*/
63 if (UNTAG_Bool(variable[7])) { /* and */
64 /* Register variable[7]: Result */
65 variable[7] = ATTR_array___AbstractArrayRead____length(variable[4]) /*AbstractArrayRead::_length*/;
66 /* Register variable[7]: Result */
67 variable[7] = TAG_Bool(UNTAG_Int( variable[5] /*index*/)<UNTAG_Int(variable[7]));
68 }
69 /* Register variable[7]: Result */
70 if (!UNTAG_Bool(variable[7])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_genericity, 234); nit_exit(1);}
71 /* Register variable[7]: Result */
72 variable[7] = ATTR_array___Array____items(variable[4]) /*Array::_items*/;
73 /* Register variable[7]: Result */
74 variable[7] = UNBOX_NativeArray(variable[7])[UNTAG_Int( variable[5] /*index*/)];
75 variable[6] = variable[7];
76 goto return_label2;
77 return_label2: while(false);
78 /* Register variable[3]: Result */
79 variable[3] = variable[6];
80 variable[2] = variable[3];
81 goto return_label1;
82 return_label1: while(false);
83 tracehead = trace.prev;
84 return variable[2];
85 }
86 void genericity___MMLocalClass___register_formal(val_t self, val_t param0) {
87 struct trace_t trace = {NULL, NULL, 31, LOCATE_genericity___MMLocalClass___register_formal};
88 val_t variable[5];
89 struct WBT_ **closurevariable = NULL;
90 trace.prev = tracehead; tracehead = &trace;
91 trace.file = LOCATE_genericity;
92 /* Register variable[0]: Local variable */
93 variable[0] = self;
94 /* Register variable[1]: Local variable */
95 variable[1] = param0;
96 /* Register variable[2]: Method return value and escape marker */
97 /* Register variable[3]: Result */
98 variable[3] = CALL_genericity___MMTypeFormalParameter___def_class( variable[1] /*f*/)( variable[1] /*f*/) /*MMTypeFormalParameter::def_class*/;
99 /* Register variable[3]: Result */
100 variable[3] = TAG_Bool((variable[3] == variable[0]) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3],variable[0])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], variable[0]) /*Object::==*/)))));
101 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_genericity___MMLocalClass___register_formal, LOCATE_genericity, 35); nit_exit(1);}
102 /* Register variable[3]: Result */
103 variable[3] = CALL_genericity___MMTypeFormalParameter___position( variable[1] /*f*/)( variable[1] /*f*/) /*MMTypeFormalParameter::position*/;
104 /* Register variable[4]: Result */
105 variable[4] = ATTR_genericity___MMLocalClass____formals_types(variable[0]) /*MMLocalClass::_formals_types*/;
106 /* Register variable[4]: Result */
107 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArrayRead::length*/;
108 /* Register variable[3]: Result */
109 variable[3] = TAG_Bool((variable[3])==(variable[4]));
110 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_genericity___MMLocalClass___register_formal, LOCATE_genericity, 36); nit_exit(1);}
111 /* Register variable[3]: Result */
112 variable[3] = ATTR_genericity___MMLocalClass____formals_types(variable[0]) /*MMLocalClass::_formals_types*/;
113 CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[1] /*f*/) /*AbstractArray::add*/;
114 return_label3: while(false);
115 tracehead = trace.prev;
116 return;
117 }
118 val_t genericity___MMLocalClass___get_instantiate_type(val_t self, val_t param0) {
119 struct trace_t trace = {NULL, NULL, 43, LOCATE_genericity___MMLocalClass___get_instantiate_type};
120 val_t variable[7];
121 struct WBT_ **closurevariable = NULL;
122 trace.prev = tracehead; tracehead = &trace;
123 trace.file = LOCATE_genericity;
124 /* Register variable[0]: Local variable */
125 variable[0] = self;
126 /* Register variable[1]: Local variable */
127 variable[1] = param0;
128 /* Register variable[2]: Method return value and escape marker */
129 /* Register variable[3]: Result */
130 variable[3] = ATTR_genericity___MMLocalClass____types(variable[0]) /*MMLocalClass::_types*/;
131 /* Register variable[3]: For iterator */
132 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArrayRead::iterator*/;
133 while (true) { /*for*/
134 /* Register variable[4]: For 'is_ok' result */
135 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
136 if (!UNTAG_Bool(variable[4])) break; /*for*/
137 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
138 /* Register variable[5]: Local variable */
139 variable[5] = variable[4];
140 /* Register variable[6]: Result */
141 variable[6] = CALL_genericity___MMTypeGeneric___params_equals( variable[5] /*g*/)( variable[5] /*g*/, variable[1] /*t*/) /*MMTypeGeneric::params_equals*/;
142 if (UNTAG_Bool(variable[6])) { /*if*/
143 variable[2] = variable[5] /*g*/;
144 goto return_label4;
145 }
146 continue_5: while(0);
147 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
148 }
149 break_5: while(0);
150 /* Register variable[3]: Local variable */
151 /* Register variable[4]: Result */
152 variable[4] = NEW_MMTypeGeneric_genericity___MMTypeGeneric___init(variable[0], variable[1] /*t*/) /*new MMTypeGeneric*/;
153 variable[3] = variable[4];
154 /* Register variable[4]: Result */
155 variable[4] = ATTR_genericity___MMLocalClass____types(variable[0]) /*MMLocalClass::_types*/;
156 CALL_abstract_collection___SimpleCollection___add(variable[4])(variable[4], variable[3] /*g*/) /*AbstractArray::add*/;
157 variable[2] = variable[3] /*g*/;
158 goto return_label4;
159 return_label4: while(false);
160 tracehead = trace.prev;
161 return variable[2];
162 }
163 val_t genericity___MMLocalClass___formals_types(val_t self) {
164 struct trace_t trace = {NULL, NULL, 57, LOCATE_genericity___MMLocalClass___formals_types};
165 val_t variable[12];
166 struct WBT_ **closurevariable = NULL;
167 trace.prev = tracehead; tracehead = &trace;
168 trace.file = LOCATE_genericity;
169 /* Register variable[0]: Local variable */
170 variable[0] = self;
171 /* Register variable[1]: Method return value and escape marker */
172 /* Register variable[2]: Result */
173 variable[2] = ATTR_genericity___MMLocalClass____formals_types(variable[0]) /*MMLocalClass::_formals_types*/;
174 /* Register variable[2]: Result */
175 variable[2] = CALL_abstract_collection___Collection___is_empty(variable[2])(variable[2]) /*AbstractArrayRead::is_empty*/;
176 if (UNTAG_Bool(variable[2])) { /*if*/
177 /* Register variable[2]: Result */
178 variable[2] = TAG_Bool((variable[0]==NIT_NULL) || VAL_ISA(variable[0], COLOR_MMConcreteClass, ID_MMConcreteClass)) /*cast MMConcreteClass*/;
179 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[2])))) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_genericity___MMLocalClass___formals_types, LOCATE_genericity, 62); nit_exit(1);}
180 /* Register variable[2]: Result */
181 variable[2] = CALL_abstractmetamodel___MMLocalClass___arity(variable[0])(variable[0]) /*MMLocalClass::arity*/;
182 /* Register variable[2]: Result */
183 variable[2] = NEW_Range_range___Range___without_last( TAG_Int(0), variable[2]) /*new Range[Int]*/;
184 /* Register variable[2]: For iterator */
185 variable[2] = CALL_abstract_collection___Collection___iterator(variable[2])(variable[2]) /*Range::iterator*/;
186 while (true) { /*for*/
187 /* Register variable[3]: For 'is_ok' result */
188 variable[3] = CALL_abstract_collection___Iterator___is_ok(variable[2])(variable[2]) /*Iterator::is_ok*/;
189 if (!UNTAG_Bool(variable[3])) break; /*for*/
190 variable[3] = CALL_abstract_collection___Iterator___item(variable[2])(variable[2]) /*Iterator::item*/ /* Ensure var: For item*/;
191 /* Register variable[4]: Local variable */
192 variable[4] = variable[3];
193 /* Register variable[5]: Local variable */
194 /* Register variable[6]: Result */
195 variable[6] = CALL_abstractmetamodel___MMLocalClass___global(variable[0])(variable[0]) /*MMLocalClass::global*/;
196 /* Register variable[6]: Result */
197 variable[6] = CALL_abstractmetamodel___MMGlobalClass___intro(variable[6])(variable[6]) /*MMGlobalClass::intro*/;
198 /* Register variable[6]: Result */
199 variable[6] = CALL_genericity___MMLocalClass___get_formal(variable[6])(variable[6], variable[4] /*i*/) /*MMLocalClass::get_formal*/;
200 variable[5] = variable[6];
201 /* Register variable[6]: Local variable */
202 /* Register variable[7]: Result */
203 variable[7] = CALL_type_formal___MMTypeFormal___name( variable[5] /*oft*/)( variable[5] /*oft*/) /*MMTypeFormal::name*/;
204 /* Register variable[7]: Result */
205 variable[7] = NEW_MMTypeFormalParameter_genericity___MMTypeFormalParameter___init(variable[7], variable[4] /*i*/, variable[0]) /*new MMTypeFormalParameter*/;
206 variable[6] = variable[7];
207 CALL_genericity___MMLocalClass___register_formal(variable[0])(variable[0], variable[6] /*ft*/) /*MMLocalClass::register_formal*/;
208 continue_7: while(0);
209 CALL_abstract_collection___Iterator___next(variable[2])(variable[2]) /*Iterator::next*/;
210 }
211 break_7: while(0);
212 /* Register variable[2]: Result */
213 variable[2] = CALL_abstractmetamodel___MMLocalClass___arity(variable[0])(variable[0]) /*MMLocalClass::arity*/;
214 /* Register variable[2]: Result */
215 variable[2] = NEW_Range_range___Range___without_last( TAG_Int(0), variable[2]) /*new Range[Int]*/;
216 /* Register variable[2]: For iterator */
217 variable[2] = CALL_abstract_collection___Collection___iterator(variable[2])(variable[2]) /*Range::iterator*/;
218 while (true) { /*for*/
219 /* Register variable[3]: For 'is_ok' result */
220 variable[3] = CALL_abstract_collection___Iterator___is_ok(variable[2])(variable[2]) /*Iterator::is_ok*/;
221 if (!UNTAG_Bool(variable[3])) break; /*for*/
222 variable[3] = CALL_abstract_collection___Iterator___item(variable[2])(variable[2]) /*Iterator::item*/ /* Ensure var: For item*/;
223 /* Register variable[4]: Local variable */
224 variable[4] = variable[3];
225 /* Register variable[5]: Local variable */
226 /* Register variable[6]: Result */
227 variable[6] = CALL_abstractmetamodel___MMLocalClass___global(variable[0])(variable[0]) /*MMLocalClass::global*/;
228 /* Register variable[6]: Result */
229 variable[6] = CALL_abstractmetamodel___MMGlobalClass___intro(variable[6])(variable[6]) /*MMGlobalClass::intro*/;
230 /* Register variable[6]: Result */
231 variable[6] = CALL_genericity___MMLocalClass___get_formal(variable[6])(variable[6], variable[4] /*i*/) /*MMLocalClass::get_formal*/;
232 variable[5] = variable[6];
233 /* Register variable[6]: Local variable */
234 /* Register variable[7]: Result */
235 variable[7] = ATTR_genericity___MMLocalClass____formals_types(variable[0]) /*MMLocalClass::_formals_types*/;
236 /* Register variable[8]: Local variable */
237 variable[8] = variable[7];
238 /* Register variable[9]: Local variable */
239 variable[9] = variable[4] /*i*/;
240 /* Register variable[10]: Method return value and escape marker */
241 /* Register variable[11]: Result */
242 variable[11] = TAG_Bool(UNTAG_Int( variable[9] /*index*/)>=UNTAG_Int( TAG_Int(0)));
243 /* Ensure var variable[11]: Left 'and' operand*/
244 if (UNTAG_Bool(variable[11])) { /* and */
245 /* Register variable[11]: Result */
246 variable[11] = ATTR_array___AbstractArrayRead____length(variable[8]) /*AbstractArrayRead::_length*/;
247 /* Register variable[11]: Result */
248 variable[11] = TAG_Bool(UNTAG_Int( variable[9] /*index*/)<UNTAG_Int(variable[11]));
249 }
250 /* Register variable[11]: Result */
251 if (!UNTAG_Bool(variable[11])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_genericity, 234); nit_exit(1);}
252 /* Register variable[11]: Result */
253 variable[11] = ATTR_array___Array____items(variable[8]) /*Array::_items*/;
254 /* Register variable[11]: Result */
255 variable[11] = UNBOX_NativeArray(variable[11])[UNTAG_Int( variable[9] /*index*/)];
256 variable[10] = variable[11];
257 goto return_label9;
258 return_label9: while(false);
259 /* Register variable[7]: Result */
260 variable[7] = variable[10];
261 variable[6] = variable[7];
262 /* Register variable[7]: Result */
263 variable[7] = CALL_type_formal___MMTypeFormal___bound( variable[5] /*oft*/)( variable[5] /*oft*/) /*MMTypeFormal::bound*/;
264 /* Register variable[8]: Result */
265 variable[8] = CALL_abstractmetamodel___MMLocalClass___module(variable[0])(variable[0]) /*MMLocalClass::module*/;
266 /* Register variable[7]: Result */
267 variable[7] = CALL_static_type___MMType___for_module(variable[7])(variable[7], variable[8]) /*MMType::for_module*/;
268 CALL_genericity___MMTypeFormalParameter___bound__eq( variable[6] /*ft*/)( variable[6] /*ft*/, variable[7]) /*MMTypeFormalParameter::bound=*/;
269 continue_8: while(0);
270 CALL_abstract_collection___Iterator___next(variable[2])(variable[2]) /*Iterator::next*/;
271 }
272 break_8: while(0);
273 }
274 /* Register variable[2]: Result */
275 variable[2] = ATTR_genericity___MMLocalClass____formals_types(variable[0]) /*MMLocalClass::_formals_types*/;
276 variable[1] = variable[2];
277 goto return_label6;
278 return_label6: while(false);
279 tracehead = trace.prev;
280 return variable[1];
281 }
282 val_t genericity___MMLocalClass___is_generic(val_t self) {
283 struct trace_t trace = {NULL, NULL, 90, LOCATE_genericity___MMLocalClass___is_generic};
284 val_t variable[3];
285 struct WBT_ **closurevariable = NULL;
286 trace.prev = tracehead; tracehead = &trace;
287 trace.file = LOCATE_genericity;
288 /* Register variable[0]: Local variable */
289 variable[0] = self;
290 /* Register variable[1]: Method return value and escape marker */
291 /* Register variable[2]: Result */
292 variable[2] = CALL_abstractmetamodel___MMLocalClass___arity(variable[0])(variable[0]) /*MMLocalClass::arity*/;
293 /* Register variable[2]: Result */
294 variable[2] = TAG_Bool(UNTAG_Int(variable[2])>UNTAG_Int( TAG_Int(0)));
295 variable[1] = variable[2];
296 goto return_label10;
297 return_label10: while(false);
298 tracehead = trace.prev;
299 return variable[1];
300 }
301 val_t genericity___MMType___is_generic(val_t self) {
302 struct trace_t trace = {NULL, NULL, 95, LOCATE_genericity___MMType___is_generic};
303 val_t *variable = NULL;
304 struct WBT_ **closurevariable = NULL;
305 trace.prev = tracehead; tracehead = &trace;
306 trace.file = LOCATE_genericity;
307 fprintf(stderr, "Deferred method called");
308 fprintf(stderr, " (%s:%d)\n", LOCATE_genericity, 95);
309 nit_exit(1);
310 tracehead = trace.prev;
311 return NIT_NULL;
312 }
313 val_t genericity___MMTypeFormal___is_generic(val_t self) {
314 struct trace_t trace = {NULL, NULL, 100, LOCATE_genericity___MMTypeFormal___is_generic};
315 val_t variable[3];
316 struct WBT_ **closurevariable = NULL;
317 trace.prev = tracehead; tracehead = &trace;
318 trace.file = LOCATE_genericity;
319 /* Register variable[0]: Local variable */
320 variable[0] = self;
321 /* Register variable[1]: Method return value and escape marker */
322 /* Register variable[2]: Result */
323 variable[2] = ATTR_type_formal___MMTypeFormal____bound(variable[0]) /*MMTypeFormal::_bound*/;
324 /* Register variable[2]: Result */
325 variable[2] = CALL_genericity___MMType___is_generic(variable[2])(variable[2]) /*MMType::is_generic*/;
326 variable[1] = variable[2];
327 goto return_label11;
328 return_label11: while(false);
329 tracehead = trace.prev;
330 return variable[1];
331 }
332 val_t genericity___MMTypeSimpleClass___is_generic(val_t self) {
333 struct trace_t trace = {NULL, NULL, 104, LOCATE_genericity___MMTypeSimpleClass___is_generic};
334 val_t variable[2];
335 struct WBT_ **closurevariable = NULL;
336 trace.prev = tracehead; tracehead = &trace;
337 trace.file = LOCATE_genericity;
338 /* Register variable[0]: Local variable */
339 variable[0] = self;
340 /* Register variable[1]: Method return value and escape marker */
341 variable[1] = TAG_Bool(false);
342 goto return_label12;
343 return_label12: while(false);
344 tracehead = trace.prev;
345 return variable[1];
346 }
347 val_t genericity___MMTypeGeneric___to_s(val_t self) {
348 struct trace_t trace = {NULL, NULL, 174, LOCATE_genericity___MMTypeGeneric___to_s};
349 static val_t once_value_14 = NIT_NULL; /* Once value for string variable[3]*/
350 static val_t once_value_15 = NIT_NULL; /* Once value for string variable[3]*/
351 static val_t once_value_16 = NIT_NULL; /* Once value for string variable[4]*/
352 static val_t once_value_17 = NIT_NULL; /* Once value for string variable[3]*/
353 val_t variable[5];
354 struct WBT_ **closurevariable = NULL;
355 trace.prev = tracehead; tracehead = &trace;
356 trace.file = LOCATE_genericity;
357 /* Register variable[0]: Local variable */
358 variable[0] = self;
359 /* Register variable[1]: Method return value and escape marker */
360 variable[2] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
361 /* Register variable[3]: Once String constant */
362 if (once_value_14 != NIT_NULL) variable[3] = once_value_14;
363 else {
364 variable[3] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
365 once_value_14 = variable[3];
366 }
367 /* Register variable[3]: Result */
368 /* Ensure var variable[3]: super-string element*/
369 CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[3]) /*AbstractArray::add*/;
370 /* Register variable[3]: Result */
371 variable[3] = CALL_SUPER_genericity___MMTypeGeneric___to_s(variable[0])(variable[0]) /*super MMTypeGeneric::to_s*/;
372 /* Ensure var variable[3]: super-string element*/
373 CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[3]) /*AbstractArray::add*/;
374 /* Register variable[3]: Once String constant */
375 if (once_value_15 != NIT_NULL) variable[3] = once_value_15;
376 else {
377 variable[3] = NEW_String_string___String___with_native(BOX_NativeString("["), TAG_Int(1)) /*new String*/;
378 once_value_15 = variable[3];
379 }
380 /* Register variable[3]: Result */
381 /* Ensure var variable[3]: super-string element*/
382 CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[3]) /*AbstractArray::add*/;
383 /* Register variable[3]: Result */
384 variable[3] = ATTR_genericity___MMTypeGeneric____params(variable[0]) /*MMTypeGeneric::_params*/;
385 /* Register variable[4]: Once String constant */
386 if (once_value_16 != NIT_NULL) variable[4] = once_value_16;
387 else {
388 variable[4] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)) /*new String*/;
389 once_value_16 = variable[4];
390 }
391 /* Register variable[4]: Result */
392 /* Register variable[3]: Result */
393 variable[3] = CALL_string___Collection___join(variable[3])(variable[3], variable[4]) /*Collection::join*/;
394 /* Ensure var variable[3]: super-string element*/
395 CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[3]) /*AbstractArray::add*/;
396 /* Register variable[3]: Once String constant */
397 if (once_value_17 != NIT_NULL) variable[3] = once_value_17;
398 else {
399 variable[3] = NEW_String_string___String___with_native(BOX_NativeString("]"), TAG_Int(1)) /*new String*/;
400 once_value_17 = variable[3];
401 }
402 /* Register variable[3]: Result */
403 /* Ensure var variable[3]: super-string element*/
404 CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[3]) /*AbstractArray::add*/;
405 /* Register variable[2]: Result */
406 variable[2] = CALL_string___Object___to_s(variable[2])(variable[2]) /*Object::to_s*/;
407 variable[1] = variable[2];
408 goto return_label13;
409 return_label13: while(false);
410 tracehead = trace.prev;
411 return variable[1];
412 }
413 val_t genericity___MMTypeGeneric___is_supertype(val_t self, val_t param0) {
414 struct trace_t trace = {NULL, NULL, 114, LOCATE_genericity___MMTypeGeneric___is_supertype};
415 val_t variable[5];
416 struct WBT_ **closurevariable = NULL;
417 trace.prev = tracehead; tracehead = &trace;
418 trace.file = LOCATE_genericity;
419 /* Register variable[0]: Local variable */
420 variable[0] = self;
421 /* Register variable[1]: Local variable */
422 variable[1] = param0;
423 /* Register variable[2]: Method return value and escape marker */
424 /* Register variable[3]: Result */
425 variable[3] = CALL_static_type___MMType___local_class( variable[1] /*t*/)( variable[1] /*t*/) /*MMType::local_class*/;
426 /* Register variable[3]: Result */
427 variable[3] = CALL_abstractmetamodel___MMLocalClass___cshe(variable[3])(variable[3]) /*MMLocalClass::cshe*/;
428 /* Register variable[4]: Result */
429 variable[4] = ATTR_static_type___MMTypeClass____local_class(variable[0]) /*MMTypeClass::_local_class*/;
430 /* Register variable[3]: Result */
431 variable[3] = CALL_partial_order___PartialOrderElement_____leq(variable[3])(variable[3], variable[4]) /*PartialOrderElement::<=*/;
432 if (UNTAG_Bool(variable[3])) { /*if*/
433 /* Register variable[3]: Local variable */
434 /* Register variable[4]: Result */
435 variable[4] = ATTR_static_type___MMTypeClass____local_class(variable[0]) /*MMTypeClass::_local_class*/;
436 /* Register variable[4]: Result */
437 variable[4] = CALL_static_type___MMType___upcast_for( variable[1] /*t*/)( variable[1] /*t*/, variable[4]) /*MMType::upcast_for*/;
438 variable[3] = variable[4];
439 /* Register variable[4]: Result */
440 variable[4] = TAG_Bool(( variable[3] /*u*/==NIT_NULL) || VAL_ISA( variable[3] /*u*/, COLOR_MMTypeGeneric, ID_MMTypeGeneric)) /*cast MMTypeGeneric*/;
441 if (UNTAG_Bool(variable[4])) { /*if*/
442 /* Register variable[4]: Result */
443 variable[4] = CALL_genericity___MMTypeGeneric___is_subtype(variable[0])(variable[0], variable[3] /*u*/) /*MMTypeGeneric::is_subtype*/;
444 variable[2] = variable[4];
445 goto return_label18;
446 }
447 }
448 variable[2] = TAG_Bool(false);
449 goto return_label18;
450 return_label18: while(false);
451 tracehead = trace.prev;
452 return variable[2];
453 }
454 val_t genericity___MMTypeGeneric___for_module(val_t self, val_t param0) {
455 struct trace_t trace = {NULL, NULL, 134, LOCATE_genericity___MMTypeGeneric___for_module};
456 val_t variable[9];
457 struct WBT_ **closurevariable = NULL;
458 trace.prev = tracehead; tracehead = &trace;
459 trace.file = LOCATE_genericity;
460 /* Register variable[0]: Local variable */
461 variable[0] = self;
462 /* Register variable[1]: Local variable */
463 variable[1] = param0;
464 /* Register variable[2]: Method return value and escape marker */
465 /* Register variable[3]: Local variable */
466 variable[3] = variable[0];
467 /* Register variable[4]: Result */
468 variable[4] = CALL_static_type___MMType___module(variable[0])(variable[0]) /*MMTypeClass::module*/;
469 /* Register variable[4]: Result */
470 variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[4] == variable[1] /*mod*/) || ((variable[4] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[4])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[4], variable[1] /*mod*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[4])(variable[4], variable[1] /*mod*/) /*Object::==*/)))))));
471 if (UNTAG_Bool(variable[4])) { /*if*/
472 /* Register variable[4]: Local variable */
473 /* Register variable[5]: Result */
474 variable[5] = NEW_Array_array___Array___init() /*new Array[MMType]*/;
475 variable[4] = variable[5];
476 /* Register variable[5]: Result */
477 variable[5] = ATTR_genericity___MMTypeGeneric____params(variable[0]) /*MMTypeGeneric::_params*/;
478 /* Register variable[5]: For iterator */
479 variable[5] = CALL_abstract_collection___Collection___iterator(variable[5])(variable[5]) /*AbstractArrayRead::iterator*/;
480 while (true) { /*for*/
481 /* Register variable[6]: For 'is_ok' result */
482 variable[6] = CALL_abstract_collection___Iterator___is_ok(variable[5])(variable[5]) /*ArrayIterator::is_ok*/;
483 if (!UNTAG_Bool(variable[6])) break; /*for*/
484 variable[6] = CALL_abstract_collection___Iterator___item(variable[5])(variable[5]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
485 /* Register variable[7]: Local variable */
486 variable[7] = variable[6];
487 /* Register variable[8]: Result */
488 variable[8] = CALL_static_type___MMType___for_module( variable[7] /*p*/)( variable[7] /*p*/, variable[1] /*mod*/) /*MMType::for_module*/;
489 CALL_abstract_collection___SimpleCollection___add( variable[4] /*parms*/)( variable[4] /*parms*/, variable[8]) /*AbstractArray::add*/;
490 continue_20: while(0);
491 CALL_abstract_collection___Iterator___next(variable[5])(variable[5]) /*ArrayIterator::next*/;
492 }
493 break_20: while(0);
494 /* Register variable[5]: Local variable */
495 /* Register variable[6]: Result */
496 variable[6] = ATTR_static_type___MMTypeClass____local_class(variable[0]) /*MMTypeClass::_local_class*/;
497 /* Register variable[6]: Result */
498 variable[6] = CALL_abstractmetamodel___MMLocalClass___for_module(variable[6])(variable[6], variable[1] /*mod*/) /*MMLocalClass::for_module*/;
499 variable[5] = variable[6];
500 /* Register variable[6]: Result */
501 variable[6] = CALL_genericity___MMLocalClass___get_instantiate_type( variable[5] /*b*/)( variable[5] /*b*/, variable[4] /*parms*/) /*MMLocalClass::get_instantiate_type*/;
502 variable[3] = variable[6] /*t=*/;
503 }
504 /* Register variable[4]: Result */
505 variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[3] /*t*/ == NIT_NULL /*null*/) || (( variable[3] /*t*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[3] /*t*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[3] /*t*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[3] /*t*/)( variable[3] /*t*/, NIT_NULL /*null*/) /*Object::==*/)))))));
506 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_genericity___MMTypeGeneric___for_module, LOCATE_genericity, 145); nit_exit(1);}
507 variable[2] = variable[3] /*t*/;
508 goto return_label19;
509 return_label19: while(false);
510 tracehead = trace.prev;
511 return variable[2];
512 }
513 val_t genericity___MMTypeGeneric___adapt_to(val_t self, val_t param0) {
514 struct trace_t trace = {NULL, NULL, 149, LOCATE_genericity___MMTypeGeneric___adapt_to};
515 val_t variable[8];
516 struct WBT_ **closurevariable = NULL;
517 trace.prev = tracehead; tracehead = &trace;
518 trace.file = LOCATE_genericity;
519 /* Register variable[0]: Local variable */
520 variable[0] = self;
521 /* Register variable[1]: Local variable */
522 variable[1] = param0;
523 /* Register variable[2]: Method return value and escape marker */
524 /* Register variable[3]: Local variable */
525 /* Register variable[4]: Result */
526 variable[4] = NEW_Array_array___Array___init() /*new Array[MMType]*/;
527 variable[3] = variable[4];
528 /* Register variable[4]: Result */
529 variable[4] = ATTR_genericity___MMTypeGeneric____params(variable[0]) /*MMTypeGeneric::_params*/;
530 /* Register variable[4]: For iterator */
531 variable[4] = CALL_abstract_collection___Collection___iterator(variable[4])(variable[4]) /*AbstractArrayRead::iterator*/;
532 while (true) { /*for*/
533 /* Register variable[5]: For 'is_ok' result */
534 variable[5] = CALL_abstract_collection___Iterator___is_ok(variable[4])(variable[4]) /*ArrayIterator::is_ok*/;
535 if (!UNTAG_Bool(variable[5])) break; /*for*/
536 variable[5] = CALL_abstract_collection___Iterator___item(variable[4])(variable[4]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
537 /* Register variable[6]: Local variable */
538 variable[6] = variable[5];
539 /* Register variable[7]: Result */
540 variable[7] = CALL_static_type___MMType___adapt_to( variable[6] /*i*/)( variable[6] /*i*/, variable[1] /*r*/) /*MMType::adapt_to*/;
541 CALL_abstract_collection___SimpleCollection___add( variable[3] /*rv*/)( variable[3] /*rv*/, variable[7]) /*AbstractArray::add*/;
542 continue_22: while(0);
543 CALL_abstract_collection___Iterator___next(variable[4])(variable[4]) /*ArrayIterator::next*/;
544 }
545 break_22: while(0);
546 /* Register variable[4]: Local variable */
547 /* Register variable[5]: Result */
548 variable[5] = ATTR_static_type___MMTypeClass____local_class(variable[0]) /*MMTypeClass::_local_class*/;
549 /* Register variable[5]: Result */
550 variable[5] = CALL_genericity___MMLocalClass___get_instantiate_type(variable[5])(variable[5], variable[3] /*rv*/) /*MMLocalClass::get_instantiate_type*/;
551 variable[4] = variable[5];
552 variable[2] = variable[4] /*l*/;
553 goto return_label21;
554 return_label21: while(false);
555 tracehead = trace.prev;
556 return variable[2];
557 }
558 val_t genericity___MMTypeGeneric___upcast_for(val_t self, val_t param0) {
559 struct trace_t trace = {NULL, NULL, 125, LOCATE_genericity___MMTypeGeneric___upcast_for};
560 val_t variable[5];
561 struct WBT_ **closurevariable = NULL;
562 trace.prev = tracehead; tracehead = &trace;
563 trace.file = LOCATE_genericity;
564 /* Register variable[0]: Local variable */
565 variable[0] = self;
566 /* Register variable[1]: Local variable */
567 variable[1] = param0;
568 /* Register variable[2]: Method return value and escape marker */
569 /* Register variable[3]: Local variable */
570 /* Register variable[4]: Result */
571 variable[4] = CALL_SUPER_genericity___MMTypeGeneric___upcast_for(variable[0])(variable[0], variable[1]) /*super MMTypeGeneric::upcast_for*/;
572 variable[3] = variable[4];
573 /* Register variable[4]: Result */
574 variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[3] /*t*/ == variable[0]) || (( variable[3] /*t*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[3] /*t*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[3] /*t*/,variable[0])):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[3] /*t*/)( variable[3] /*t*/, variable[0]) /*Object::==*/)))))));
575 if (UNTAG_Bool(variable[4])) { /*if*/
576 /* Register variable[4]: Result */
577 variable[4] = CALL_static_type___MMType___adapt_to( variable[3] /*t*/)( variable[3] /*t*/, variable[0]) /*MMType::adapt_to*/;
578 variable[3] = variable[4] /*t=*/;
579 }
580 variable[2] = variable[3] /*t*/;
581 goto return_label23;
582 return_label23: while(false);
583 tracehead = trace.prev;
584 return variable[2];
585 }
586 val_t genericity___MMTypeGeneric___is_generic(val_t self) {
587 struct trace_t trace = {NULL, NULL, 112, LOCATE_genericity___MMTypeGeneric___is_generic};
588 val_t variable[2];
589 struct WBT_ **closurevariable = NULL;
590 trace.prev = tracehead; tracehead = &trace;
591 trace.file = LOCATE_genericity;
592 /* Register variable[0]: Local variable */
593 variable[0] = self;
594 /* Register variable[1]: Method return value and escape marker */
595 variable[1] = TAG_Bool(true);
596 goto return_label24;
597 return_label24: while(false);
598 tracehead = trace.prev;
599 return variable[1];
600 }
601 val_t genericity___MMTypeGeneric___params(val_t self) {
602 struct trace_t trace = {NULL, NULL, 109, LOCATE_genericity___MMTypeGeneric___params};
603 val_t *variable = NULL;
604 struct WBT_ **closurevariable = NULL;
605 trace.prev = tracehead; tracehead = &trace;
606 trace.file = LOCATE_genericity;
607 tracehead = trace.prev;
608 return ATTR_genericity___MMTypeGeneric____params( self) /*MMTypeGeneric::_params*/;
609 }
610 val_t genericity___MMTypeGeneric___params_equals(val_t self, val_t param0) {
611 struct trace_t trace = {NULL, NULL, 159, LOCATE_genericity___MMTypeGeneric___params_equals};
612 val_t variable[11];
613 struct WBT_ **closurevariable = NULL;
614 trace.prev = tracehead; tracehead = &trace;
615 trace.file = LOCATE_genericity;
616 /* Register variable[0]: Local variable */
617 variable[0] = self;
618 /* Register variable[1]: Local variable */
619 variable[1] = param0;
620 /* Register variable[2]: Method return value and escape marker */
621 /* Register variable[3]: Result */
622 variable[3] = CALL_abstract_collection___Collection___length( variable[1] /*t*/)( variable[1] /*t*/) /*AbstractArrayRead::length*/;
623 /* Register variable[4]: Result */
624 variable[4] = ATTR_genericity___MMTypeGeneric____params(variable[0]) /*MMTypeGeneric::_params*/;
625 /* Register variable[4]: Result */
626 variable[4] = CALL_abstract_collection___Collection___length(variable[4])(variable[4]) /*AbstractArrayRead::length*/;
627 /* Register variable[3]: Result */
628 variable[3] = TAG_Bool((variable[3])!=(variable[4]));
629 if (UNTAG_Bool(variable[3])) { /*if*/
630 variable[2] = TAG_Bool(false);
631 goto return_label25;
632 }
633 /* Register variable[3]: Result */
634 variable[3] = CALL_abstract_collection___Collection___length( variable[1] /*t*/)( variable[1] /*t*/) /*AbstractArrayRead::length*/;
635 /* Register variable[3]: Result */
636 variable[3] = NEW_Range_range___Range___without_last( TAG_Int(0), variable[3]) /*new Range[Int]*/;
637 /* Register variable[3]: For iterator */
638 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*Range::iterator*/;
639 while (true) { /*for*/
640 /* Register variable[4]: For 'is_ok' result */
641 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*Iterator::is_ok*/;
642 if (!UNTAG_Bool(variable[4])) break; /*for*/
643 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*Iterator::item*/ /* Ensure var: For item*/;
644 /* Register variable[5]: Local variable */
645 variable[5] = variable[4];
646 /* Register variable[6]: Result */
647 variable[6] = ATTR_genericity___MMTypeGeneric____params(variable[0]) /*MMTypeGeneric::_params*/;
648 /* Register variable[7]: Local variable */
649 variable[7] = variable[6];
650 /* Register variable[8]: Local variable */
651 variable[8] = variable[5] /*i*/;
652 /* Register variable[9]: Method return value and escape marker */
653 /* Register variable[10]: Result */
654 variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*index*/)>=UNTAG_Int( TAG_Int(0)));
655 /* Ensure var variable[10]: Left 'and' operand*/
656 if (UNTAG_Bool(variable[10])) { /* and */
657 /* Register variable[10]: Result */
658 variable[10] = ATTR_array___AbstractArrayRead____length(variable[7]) /*AbstractArrayRead::_length*/;
659 /* Register variable[10]: Result */
660 variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*index*/)<UNTAG_Int(variable[10]));
661 }
662 /* Register variable[10]: Result */
663 if (!UNTAG_Bool(variable[10])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_genericity, 234); nit_exit(1);}
664 /* Register variable[10]: Result */
665 variable[10] = ATTR_array___Array____items(variable[7]) /*Array::_items*/;
666 /* Register variable[10]: Result */
667 variable[10] = UNBOX_NativeArray(variable[10])[UNTAG_Int( variable[8] /*index*/)];
668 variable[9] = variable[10];
669 goto return_label27;
670 return_label27: while(false);
671 /* Register variable[6]: Result */
672 variable[6] = variable[9];
673 /* Register variable[6]: Result */
674 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[6] == NIT_NULL /*null*/) || ((variable[6] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[6])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[6], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[6])(variable[6], NIT_NULL /*null*/) /*Object::==*/)))))));
675 if (!UNTAG_Bool(variable[6])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_genericity___MMTypeGeneric___params_equals, LOCATE_genericity, 165); nit_exit(1);}
676 /* Register variable[6]: Local variable */
677 variable[6] = variable[1] /*t*/;
678 /* Register variable[7]: Local variable */
679 variable[7] = variable[5] /*i*/;
680 /* Register variable[8]: Method return value and escape marker */
681 /* Register variable[9]: Result */
682 variable[9] = TAG_Bool(UNTAG_Int( variable[7] /*index*/)>=UNTAG_Int( TAG_Int(0)));
683 /* Ensure var variable[9]: Left 'and' operand*/
684 if (UNTAG_Bool(variable[9])) { /* and */
685 /* Register variable[9]: Result */
686 variable[9] = ATTR_array___AbstractArrayRead____length(variable[6]) /*AbstractArrayRead::_length*/;
687 /* Register variable[9]: Result */
688 variable[9] = TAG_Bool(UNTAG_Int( variable[7] /*index*/)<UNTAG_Int(variable[9]));
689 }
690 /* Register variable[9]: Result */
691 if (!UNTAG_Bool(variable[9])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_genericity, 234); nit_exit(1);}
692 /* Register variable[9]: Result */
693 variable[9] = ATTR_array___Array____items(variable[6]) /*Array::_items*/;
694 /* Register variable[9]: Result */
695 variable[9] = UNBOX_NativeArray(variable[9])[UNTAG_Int( variable[7] /*index*/)];
696 variable[8] = variable[9];
697 goto return_label28;
698 return_label28: while(false);
699 /* Register variable[6]: Result */
700 variable[6] = variable[8];
701 /* Register variable[6]: Result */
702 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[6] == NIT_NULL /*null*/) || ((variable[6] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[6])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[6], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[6])(variable[6], NIT_NULL /*null*/) /*Object::==*/)))))));
703 if (!UNTAG_Bool(variable[6])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_genericity___MMTypeGeneric___params_equals, LOCATE_genericity, 166); nit_exit(1);}
704 /* Register variable[6]: Result */
705 variable[6] = ATTR_genericity___MMTypeGeneric____params(variable[0]) /*MMTypeGeneric::_params*/;
706 /* Register variable[7]: Local variable */
707 variable[7] = variable[6];
708 /* Register variable[8]: Local variable */
709 variable[8] = variable[5] /*i*/;
710 /* Register variable[9]: Method return value and escape marker */
711 /* Register variable[10]: Result */
712 variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*index*/)>=UNTAG_Int( TAG_Int(0)));
713 /* Ensure var variable[10]: Left 'and' operand*/
714 if (UNTAG_Bool(variable[10])) { /* and */
715 /* Register variable[10]: Result */
716 variable[10] = ATTR_array___AbstractArrayRead____length(variable[7]) /*AbstractArrayRead::_length*/;
717 /* Register variable[10]: Result */
718 variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*index*/)<UNTAG_Int(variable[10]));
719 }
720 /* Register variable[10]: Result */
721 if (!UNTAG_Bool(variable[10])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_genericity, 234); nit_exit(1);}
722 /* Register variable[10]: Result */
723 variable[10] = ATTR_array___Array____items(variable[7]) /*Array::_items*/;
724 /* Register variable[10]: Result */
725 variable[10] = UNBOX_NativeArray(variable[10])[UNTAG_Int( variable[8] /*index*/)];
726 variable[9] = variable[10];
727 goto return_label29;
728 return_label29: while(false);
729 /* Register variable[6]: Result */
730 variable[6] = variable[9];
731 /* Register variable[7]: Local variable */
732 variable[7] = variable[1] /*t*/;
733 /* Register variable[8]: Local variable */
734 variable[8] = variable[5] /*i*/;
735 /* Register variable[9]: Method return value and escape marker */
736 /* Register variable[10]: Result */
737 variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*index*/)>=UNTAG_Int( TAG_Int(0)));
738 /* Ensure var variable[10]: Left 'and' operand*/
739 if (UNTAG_Bool(variable[10])) { /* and */
740 /* Register variable[10]: Result */
741 variable[10] = ATTR_array___AbstractArrayRead____length(variable[7]) /*AbstractArrayRead::_length*/;
742 /* Register variable[10]: Result */
743 variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*index*/)<UNTAG_Int(variable[10]));
744 }
745 /* Register variable[10]: Result */
746 if (!UNTAG_Bool(variable[10])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_genericity, 234); nit_exit(1);}
747 /* Register variable[10]: Result */
748 variable[10] = ATTR_array___Array____items(variable[7]) /*Array::_items*/;
749 /* Register variable[10]: Result */
750 variable[10] = UNBOX_NativeArray(variable[10])[UNTAG_Int( variable[8] /*index*/)];
751 variable[9] = variable[10];
752 goto return_label30;
753 return_label30: while(false);
754 /* Register variable[7]: Result */
755 variable[7] = variable[9];
756 /* Register variable[6]: Result */
757 variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[6] == variable[7]) || ((variable[6] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[6])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[6],variable[7])):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[6])(variable[6], variable[7]) /*Object::==*/)))))));
758 if (UNTAG_Bool(variable[6])) { /*if*/
759 variable[2] = TAG_Bool(false);
760 goto return_label25;
761 }
762 continue_26: while(0);
763 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
764 }
765 break_26: while(0);
766 variable[2] = TAG_Bool(true);
767 goto return_label25;
768 return_label25: while(false);
769 tracehead = trace.prev;
770 return variable[2];
771 }
772 val_t genericity___MMTypeGeneric___is_subtype(val_t self, val_t param0) {
773 struct trace_t trace = {NULL, NULL, 179, LOCATE_genericity___MMTypeGeneric___is_subtype};
774 val_t variable[12];
775 struct WBT_ **closurevariable = NULL;
776 trace.prev = tracehead; tracehead = &trace;
777 trace.file = LOCATE_genericity;
778 /* Register variable[0]: Local variable */
779 variable[0] = self;
780 /* Register variable[1]: Local variable */
781 variable[1] = param0;
782 /* Register variable[2]: Method return value and escape marker */
783 /* Register variable[3]: Result */
784 variable[3] = ATTR_genericity___MMTypeGeneric____params(variable[0]) /*MMTypeGeneric::_params*/;
785 /* Register variable[3]: Result */
786 variable[3] = CALL_abstract_collection___Collection___length(variable[3])(variable[3]) /*AbstractArrayRead::length*/;
787 /* Register variable[3]: Result */
788 variable[3] = NEW_Range_range___Range___without_last( TAG_Int(0), variable[3]) /*new Range[Int]*/;
789 /* Register variable[3]: For iterator */
790 variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*Range::iterator*/;
791 while (true) { /*for*/
792 /* Register variable[4]: For 'is_ok' result */
793 variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*Iterator::is_ok*/;
794 if (!UNTAG_Bool(variable[4])) break; /*for*/
795 variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*Iterator::item*/ /* Ensure var: For item*/;
796 /* Register variable[5]: Local variable */
797 variable[5] = variable[4];
798 /* Register variable[6]: Result */
799 variable[6] = CALL_genericity___MMTypeGeneric___params( variable[1] /*t*/)( variable[1] /*t*/) /*MMTypeGeneric::params*/;
800 /* Register variable[7]: Local variable */
801 variable[7] = variable[6];
802 /* Register variable[8]: Local variable */
803 variable[8] = variable[5] /*i*/;
804 /* Register variable[9]: Method return value and escape marker */
805 /* Register variable[10]: Result */
806 variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*index*/)>=UNTAG_Int( TAG_Int(0)));
807 /* Ensure var variable[10]: Left 'and' operand*/
808 if (UNTAG_Bool(variable[10])) { /* and */
809 /* Register variable[10]: Result */
810 variable[10] = ATTR_array___AbstractArrayRead____length(variable[7]) /*AbstractArrayRead::_length*/;
811 /* Register variable[10]: Result */
812 variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*index*/)<UNTAG_Int(variable[10]));
813 }
814 /* Register variable[10]: Result */
815 if (!UNTAG_Bool(variable[10])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_genericity, 234); nit_exit(1);}
816 /* Register variable[10]: Result */
817 variable[10] = ATTR_array___Array____items(variable[7]) /*Array::_items*/;
818 /* Register variable[10]: Result */
819 variable[10] = UNBOX_NativeArray(variable[10])[UNTAG_Int( variable[8] /*index*/)];
820 variable[9] = variable[10];
821 goto return_label33;
822 return_label33: while(false);
823 /* Register variable[6]: Result */
824 variable[6] = variable[9];
825 /* Register variable[7]: Result */
826 variable[7] = ATTR_genericity___MMTypeGeneric____params(variable[0]) /*MMTypeGeneric::_params*/;
827 /* Register variable[8]: Local variable */
828 variable[8] = variable[7];
829 /* Register variable[9]: Local variable */
830 variable[9] = variable[5] /*i*/;
831 /* Register variable[10]: Method return value and escape marker */
832 /* Register variable[11]: Result */
833 variable[11] = TAG_Bool(UNTAG_Int( variable[9] /*index*/)>=UNTAG_Int( TAG_Int(0)));
834 /* Ensure var variable[11]: Left 'and' operand*/
835 if (UNTAG_Bool(variable[11])) { /* and */
836 /* Register variable[11]: Result */
837 variable[11] = ATTR_array___AbstractArrayRead____length(variable[8]) /*AbstractArrayRead::_length*/;
838 /* Register variable[11]: Result */
839 variable[11] = TAG_Bool(UNTAG_Int( variable[9] /*index*/)<UNTAG_Int(variable[11]));
840 }
841 /* Register variable[11]: Result */
842 if (!UNTAG_Bool(variable[11])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_genericity, 234); nit_exit(1);}
843 /* Register variable[11]: Result */
844 variable[11] = ATTR_array___Array____items(variable[8]) /*Array::_items*/;
845 /* Register variable[11]: Result */
846 variable[11] = UNBOX_NativeArray(variable[11])[UNTAG_Int( variable[9] /*index*/)];
847 variable[10] = variable[11];
848 goto return_label34;
849 return_label34: while(false);
850 /* Register variable[7]: Result */
851 variable[7] = variable[10];
852 /* Register variable[6]: Result */
853 variable[6] = CALL_static_type___MMType_____l(variable[6])(variable[6], variable[7]) /*MMType::<*/;
854 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[6])))) { /*if*/
855 variable[2] = TAG_Bool(false);
856 goto return_label31;
857 }
858 continue_32: while(0);
859 CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*Iterator::next*/;
860 }
861 break_32: while(0);
862 variable[2] = TAG_Bool(true);
863 goto return_label31;
864 return_label31: while(false);
865 tracehead = trace.prev;
866 return variable[2];
867 }
868 void genericity___MMTypeGeneric___init(val_t self, val_t param0, val_t param1, int* init_table) {
869 struct trace_t trace = {NULL, NULL, 192, LOCATE_genericity___MMTypeGeneric___init};
870 val_t variable[4];
871 struct WBT_ **closurevariable = NULL;
872 trace.prev = tracehead; tracehead = &trace;
873 trace.file = LOCATE_genericity;
874 /* Register variable[0]: Local variable */
875 variable[0] = self;
876 /* Register variable[1]: Local variable */
877 variable[1] = param0;
878 /* Register variable[2]: Local variable */
879 variable[2] = param1;
880 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMTypeGeneric].i]) return;
881 /* Register variable[3]: Method return value and escape marker */
882 CALL_static_type___MMTypeClass___init(variable[0])(variable[0], variable[1] /*c*/, init_table /*YYY*/) /*MMTypeClass::init*/;
883 ATTR_genericity___MMTypeGeneric____params(variable[0]) /*MMTypeGeneric::_params*/ = variable[2] /*p*/;
884 return_label35: while(false);
885 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMTypeGeneric].i] = 1;
886 tracehead = trace.prev;
887 return;
888 }
889 val_t genericity___MMTypeFormalParameter___module(val_t self) {
890 struct trace_t trace = {NULL, NULL, 207, LOCATE_genericity___MMTypeFormalParameter___module};
891 val_t variable[3];
892 struct WBT_ **closurevariable = NULL;
893 trace.prev = tracehead; tracehead = &trace;
894 trace.file = LOCATE_genericity;
895 /* Register variable[0]: Local variable */
896 variable[0] = self;
897 /* Register variable[1]: Method return value and escape marker */
898 /* Register variable[2]: Result */
899 variable[2] = ATTR_genericity___MMTypeFormalParameter____def_class(variable[0]) /*MMTypeFormalParameter::_def_class*/;
900 /* Register variable[2]: Result */
901 variable[2] = CALL_abstractmetamodel___MMLocalClass___module(variable[2])(variable[2]) /*MMLocalClass::module*/;
902 variable[1] = variable[2];
903 goto return_label36;
904 return_label36: while(false);
905 tracehead = trace.prev;
906 return variable[1];
907 }
908 val_t genericity___MMTypeFormalParameter___for_module(val_t self, val_t param0) {
909 struct trace_t trace = {NULL, NULL, 209, LOCATE_genericity___MMTypeFormalParameter___for_module};
910 val_t variable[6];
911 struct WBT_ **closurevariable = NULL;
912 trace.prev = tracehead; tracehead = &trace;
913 trace.file = LOCATE_genericity;
914 /* Register variable[0]: Local variable */
915 variable[0] = self;
916 /* Register variable[1]: Local variable */
917 variable[1] = param0;
918 /* Register variable[2]: Method return value and escape marker */
919 /* Register variable[3]: Local variable */
920 variable[3] = variable[0];
921 /* Register variable[4]: Result */
922 variable[4] = CALL_static_type___MMType___module(variable[0])(variable[0]) /*MMTypeFormalParameter::module*/;
923 /* Register variable[4]: Result */
924 variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[4] == variable[1] /*mod*/) || ((variable[4] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[4])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[4], variable[1] /*mod*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[4])(variable[4], variable[1] /*mod*/) /*Object::==*/)))))));
925 if (UNTAG_Bool(variable[4])) { /*if*/
926 /* Register variable[4]: Result */
927 variable[4] = ATTR_genericity___MMTypeFormalParameter____def_class(variable[0]) /*MMTypeFormalParameter::_def_class*/;
928 /* Register variable[4]: Result */
929 variable[4] = CALL_abstractmetamodel___MMLocalClass___global(variable[4])(variable[4]) /*MMLocalClass::global*/;
930 /* Register variable[4]: Result */
931 variable[4] = CALL_abstractmetamodel___MMModule_____bra( variable[1] /*mod*/)( variable[1] /*mod*/, variable[4]) /*MMModule::[]*/;
932 /* Register variable[5]: Result */
933 variable[5] = CALL_genericity___MMTypeFormalParameter___position(variable[0])(variable[0]) /*MMTypeFormalParameter::position*/;
934 /* Register variable[4]: Result */
935 variable[4] = CALL_genericity___MMLocalClass___get_formal(variable[4])(variable[4], variable[5]) /*MMLocalClass::get_formal*/;
936 variable[3] = variable[4] /*t=*/;
937 }
938 /* Register variable[4]: Result */
939 variable[4] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[3] /*t*/ == NIT_NULL /*null*/) || (( variable[3] /*t*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[3] /*t*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[3] /*t*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[3] /*t*/)( variable[3] /*t*/, NIT_NULL /*null*/) /*Object::==*/)))))));
940 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_genericity___MMTypeFormalParameter___for_module, LOCATE_genericity, 215); nit_exit(1);}
941 variable[2] = variable[3] /*t*/;
942 goto return_label37;
943 return_label37: while(false);
944 tracehead = trace.prev;
945 return variable[2];
946 }
947 val_t genericity___MMTypeFormalParameter___adapt_to(val_t self, val_t param0) {
948 struct trace_t trace = {NULL, NULL, 227, LOCATE_genericity___MMTypeFormalParameter___adapt_to};
949 val_t variable[11];
950 struct WBT_ **closurevariable = NULL;
951 trace.prev = tracehead; tracehead = &trace;
952 trace.file = LOCATE_genericity;
953 /* Register variable[0]: Local variable */
954 variable[0] = self;
955 /* Register variable[1]: Local variable */
956 variable[1] = param0;
957 /* Register variable[2]: Method return value and escape marker */
958 /* Register variable[3]: Result */
959 variable[3] = CALL_type_formal___MMType___direct_type( variable[1] /*r*/)( variable[1] /*r*/) /*MMType::direct_type*/;
960 variable[1] = variable[3] /*r=*/;
961 /* Register variable[3]: Local variable */
962 /* Register variable[4]: Result */
963 variable[4] = CALL_genericity___MMTypeFormalParameter___def_class(variable[0])(variable[0]) /*MMTypeFormalParameter::def_class*/;
964 /* Register variable[4]: Result */
965 variable[4] = CALL_static_type___MMType___upcast_for( variable[1] /*r*/)( variable[1] /*r*/, variable[4]) /*MMType::upcast_for*/;
966 variable[3] = variable[4];
967 /* Register variable[4]: Result */
968 variable[4] = TAG_Bool(( variable[3] /*old_r*/==NIT_NULL) || VAL_ISA( variable[3] /*old_r*/, COLOR_MMTypeGeneric, ID_MMTypeGeneric)) /*cast MMTypeGeneric*/;
969 if (!UNTAG_Bool(variable[4])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_genericity___MMTypeFormalParameter___adapt_to, LOCATE_genericity, 235); nit_exit(1);}
970 /* Register variable[4]: Local variable */
971 /* Register variable[5]: Result */
972 variable[5] = CALL_genericity___MMTypeGeneric___params( variable[3] /*old_r*/)( variable[3] /*old_r*/) /*MMTypeGeneric::params*/;
973 /* Register variable[6]: Result */
974 variable[6] = CALL_genericity___MMTypeFormalParameter___position(variable[0])(variable[0]) /*MMTypeFormalParameter::position*/;
975 /* Register variable[7]: Local variable */
976 variable[7] = variable[5];
977 /* Register variable[8]: Local variable */
978 variable[8] = variable[6];
979 /* Register variable[9]: Method return value and escape marker */
980 /* Register variable[10]: Result */
981 variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*index*/)>=UNTAG_Int( TAG_Int(0)));
982 /* Ensure var variable[10]: Left 'and' operand*/
983 if (UNTAG_Bool(variable[10])) { /* and */
984 /* Register variable[10]: Result */
985 variable[10] = ATTR_array___AbstractArrayRead____length(variable[7]) /*AbstractArrayRead::_length*/;
986 /* Register variable[10]: Result */
987 variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*index*/)<UNTAG_Int(variable[10]));
988 }
989 /* Register variable[10]: Result */
990 if (!UNTAG_Bool(variable[10])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_genericity, 234); nit_exit(1);}
991 /* Register variable[10]: Result */
992 variable[10] = ATTR_array___Array____items(variable[7]) /*Array::_items*/;
993 /* Register variable[10]: Result */
994 variable[10] = UNBOX_NativeArray(variable[10])[UNTAG_Int( variable[8] /*index*/)];
995 variable[9] = variable[10];
996 goto return_label39;
997 return_label39: while(false);
998 /* Register variable[5]: Result */
999 variable[5] = variable[9];
1000 variable[4] = variable[5];
1001 /* Register variable[5]: Result */
1002 variable[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[4] /*reduct*/ == NIT_NULL /*null*/) || (( variable[4] /*reduct*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[4] /*reduct*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[4] /*reduct*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[4] /*reduct*/)( variable[4] /*reduct*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1003 if (!UNTAG_Bool(variable[5])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_genericity___MMTypeFormalParameter___adapt_to, LOCATE_genericity, 237); nit_exit(1);}
1004 variable[2] = variable[4] /*reduct*/;
1005 goto return_label38;
1006 return_label38: while(false);
1007 tracehead = trace.prev;
1008 return variable[2];
1009 }
1010 val_t genericity___MMTypeFormalParameter___upcast_for(val_t self, val_t param0) {
1011 struct trace_t trace = {NULL, NULL, 219, LOCATE_genericity___MMTypeFormalParameter___upcast_for};
1012 val_t variable[4];
1013 struct WBT_ **closurevariable = NULL;
1014 trace.prev = tracehead; tracehead = &trace;
1015 trace.file = LOCATE_genericity;
1016 /* Register variable[0]: Local variable */
1017 variable[0] = self;
1018 /* Register variable[1]: Local variable */
1019 variable[1] = param0;
1020 /* Register variable[2]: Method return value and escape marker */
1021 /* Register variable[3]: Result */
1022 variable[3] = ATTR_type_formal___MMTypeFormal____bound(variable[0]) /*MMTypeFormal::_bound*/;
1023 /* Register variable[3]: Result */
1024 variable[3] = CALL_static_type___MMType___upcast_for(variable[3])(variable[3], variable[1] /*c*/) /*MMType::upcast_for*/;
1025 variable[2] = variable[3];
1026 goto return_label40;
1027 return_label40: while(false);
1028 tracehead = trace.prev;
1029 return variable[2];
1030 }
1031 val_t genericity___MMTypeFormalParameter___def_class(val_t self) {
1032 struct trace_t trace = {NULL, NULL, 201, LOCATE_genericity___MMTypeFormalParameter___def_class};
1033 val_t *variable = NULL;
1034 struct WBT_ **closurevariable = NULL;
1035 trace.prev = tracehead; tracehead = &trace;
1036 trace.file = LOCATE_genericity;
1037 tracehead = trace.prev;
1038 return ATTR_genericity___MMTypeFormalParameter____def_class( self) /*MMTypeFormalParameter::_def_class*/;
1039 }
1040 val_t genericity___MMTypeFormalParameter___position(val_t self) {
1041 struct trace_t trace = {NULL, NULL, 204, LOCATE_genericity___MMTypeFormalParameter___position};
1042 val_t *variable = NULL;
1043 struct WBT_ **closurevariable = NULL;
1044 trace.prev = tracehead; tracehead = &trace;
1045 trace.file = LOCATE_genericity;
1046 tracehead = trace.prev;
1047 return ATTR_genericity___MMTypeFormalParameter____position( self) /*MMTypeFormalParameter::_position*/;
1048 }
1049 void genericity___MMTypeFormalParameter___bound__eq(val_t self, val_t param0) {
1050 struct trace_t trace = {NULL, NULL, 221, LOCATE_genericity___MMTypeFormalParameter___bound__eq};
1051 val_t variable[4];
1052 struct WBT_ **closurevariable = NULL;
1053 trace.prev = tracehead; tracehead = &trace;
1054 trace.file = LOCATE_genericity;
1055 /* Register variable[0]: Local variable */
1056 variable[0] = self;
1057 /* Register variable[1]: Local variable */
1058 variable[1] = param0;
1059 /* Register variable[2]: Method return value and escape marker */
1060 /* Register variable[3]: Result */
1061 variable[3] = ATTR_type_formal___MMTypeFormal____bound(variable[0]) /*MMTypeFormal::_bound*/;
1062 /* Register variable[3]: Result */
1063 variable[3] = TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], NIT_NULL /*null*/) /*Object::==*/)))));
1064 if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_genericity___MMTypeFormalParameter___bound__eq, LOCATE_genericity, 223); nit_exit(1);}
1065 ATTR_type_formal___MMTypeFormal____bound(variable[0]) /*MMTypeFormal::_bound*/ = variable[1] /*t*/;
1066 return_label41: while(false);
1067 tracehead = trace.prev;
1068 return;
1069 }
1070 void genericity___MMTypeFormalParameter___with_bound(val_t self, val_t param0, val_t param1, val_t param2, val_t param3, int* init_table) {
1071 struct trace_t trace = {NULL, NULL, 241, LOCATE_genericity___MMTypeFormalParameter___with_bound};
1072 val_t variable[6];
1073 struct WBT_ **closurevariable = NULL;
1074 trace.prev = tracehead; tracehead = &trace;
1075 trace.file = LOCATE_genericity;
1076 /* Register variable[0]: Local variable */
1077 variable[0] = self;
1078 /* Register variable[1]: Local variable */
1079 variable[1] = param0;
1080 /* Register variable[2]: Local variable */
1081 variable[2] = param1;
1082 /* Register variable[3]: Local variable */
1083 variable[3] = param2;
1084 /* Register variable[4]: Local variable */
1085 variable[4] = param3;
1086 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMTypeFormalParameter].i]) return;
1087 /* Register variable[5]: Method return value and escape marker */
1088 CALL_genericity___MMTypeFormalParameter___init(variable[0])(variable[0], variable[1] /*n*/, variable[2] /*p*/, variable[3] /*intro*/, init_table /*YYY*/) /*MMTypeFormalParameter::init*/;
1089 ATTR_type_formal___MMTypeFormal____bound(variable[0]) /*MMTypeFormal::_bound*/ = variable[4] /*b*/;
1090 return_label42: while(false);
1091 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMTypeFormalParameter].i] = 1;
1092 tracehead = trace.prev;
1093 return;
1094 }
1095 void genericity___MMTypeFormalParameter___init(val_t self, val_t param0, val_t param1, val_t param2, int* init_table) {
1096 struct trace_t trace = {NULL, NULL, 247, LOCATE_genericity___MMTypeFormalParameter___init};
1097 val_t variable[6];
1098 struct WBT_ **closurevariable = NULL;
1099 trace.prev = tracehead; tracehead = &trace;
1100 trace.file = LOCATE_genericity;
1101 /* Register variable[0]: Local variable */
1102 variable[0] = self;
1103 /* Register variable[1]: Local variable */
1104 variable[1] = param0;
1105 /* Register variable[2]: Local variable */
1106 variable[2] = param1;
1107 /* Register variable[3]: Local variable */
1108 variable[3] = param2;
1109 if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMTypeFormalParameter].i]) return;
1110 /* Register variable[4]: Method return value and escape marker */
1111 /* Register variable[5]: Result */
1112 variable[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[1] /*n*/ == NIT_NULL /*null*/) || (( variable[1] /*n*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[1] /*n*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[1] /*n*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[1] /*n*/)( variable[1] /*n*/, NIT_NULL /*null*/) /*Object::==*/)))))));
1113 if (!UNTAG_Bool(variable[5])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_genericity___MMTypeFormalParameter___init, LOCATE_genericity, 249); nit_exit(1);}
1114 CALL_type_formal___MMTypeFormal___init(variable[0])(variable[0], variable[1] /*n*/, NIT_NULL /*null*/, init_table /*YYY*/) /*MMTypeFormal::init*/;
1115 ATTR_genericity___MMTypeFormalParameter____position(variable[0]) /*MMTypeFormalParameter::_position*/ = variable[2] /*p*/;
1116 ATTR_genericity___MMTypeFormalParameter____def_class(variable[0]) /*MMTypeFormalParameter::_def_class*/ = variable[3] /*intro*/;
1117 return_label43: while(false);
1118 init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_MMTypeFormalParameter].i] = 1;
1119 tracehead = trace.prev;
1120 return;
1121 }
1122 val_t genericity___MMTypeNone___for_module(val_t self, val_t param0) {
1123 struct trace_t trace = {NULL, NULL, 258, LOCATE_genericity___MMTypeNone___for_module};
1124 val_t variable[3];
1125 struct WBT_ **closurevariable = NULL;
1126 trace.prev = tracehead; tracehead = &trace;
1127 trace.file = LOCATE_genericity;
1128 /* Register variable[0]: Local variable */
1129 variable[0] = self;
1130 /* Register variable[1]: Local variable */
1131 variable[1] = param0;
1132 /* Register variable[2]: Method return value and escape marker */
1133 variable[2] = variable[0];
1134 goto return_label44;
1135 return_label44: while(false);
1136 tracehead = trace.prev;
1137 return variable[2];
1138 }
1139 val_t genericity___MMTypeNone___adapt_to(val_t self, val_t param0) {
1140 struct trace_t trace = {NULL, NULL, 259, LOCATE_genericity___MMTypeNone___adapt_to};
1141 val_t variable[3];
1142 struct WBT_ **closurevariable = NULL;
1143 trace.prev = tracehead; tracehead = &trace;
1144 trace.file = LOCATE_genericity;
1145 /* Register variable[0]: Local variable */
1146 variable[0] = self;
1147 /* Register variable[1]: Local variable */
1148 variable[1] = param0;
1149 /* Register variable[2]: Method return value and escape marker */
1150 variable[2] = variable[0];
1151 goto return_label45;
1152 return_label45: while(false);
1153 tracehead = trace.prev;
1154 return variable[2];
1155 }
1156 val_t genericity___MMTypeNone___is_generic(val_t self) {
1157 struct trace_t trace = {NULL, NULL, 257, LOCATE_genericity___MMTypeNone___is_generic};
1158 val_t variable[2];
1159 struct WBT_ **closurevariable = NULL;
1160 trace.prev = tracehead; tracehead = &trace;
1161 trace.file = LOCATE_genericity;
1162 /* Register variable[0]: Local variable */
1163 variable[0] = self;
1164 /* Register variable[1]: Method return value and escape marker */
1165 variable[1] = TAG_Bool(false);
1166 goto return_label46;
1167 return_label46: while(false);
1168 tracehead = trace.prev;
1169 return variable[1];
1170 }